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
backup/backup
vagrant/spec/support/package.rb
BackupSpec.Package.files
def files @files ||= begin storage = model.storages.first return [] unless storage # model didn't store anything path = storage.send(:remote_path) unless path == File.expand_path(path) path.sub!(/(ssh|rsync)-daemon-module/, '') path = File.expand_path(File.join('~/', path)) end Dir[File.join(path, "#{ model.trigger }.tar*")].sort end end
ruby
def files @files ||= begin storage = model.storages.first return [] unless storage # model didn't store anything path = storage.send(:remote_path) unless path == File.expand_path(path) path.sub!(/(ssh|rsync)-daemon-module/, '') path = File.expand_path(File.join('~/', path)) end Dir[File.join(path, "#{ model.trigger }.tar*")].sort end end
[ "def", "files", "@files", "||=", "begin", "storage", "=", "model", ".", "storages", ".", "first", "return", "[", "]", "unless", "storage", "# model didn't store anything", "path", "=", "storage", ".", "send", "(", ":remote_path", ")", "unless", "path", "==", ...
If a trigger is run multiple times within a test (like when testing cycling), multiple packages will exist under different timestamp folders. This allows us to find the package files for the specific model given. For most tests the Local storage is used, which will have a remote_path that's already expanded. Others like SCP, RSync (:ssh mode), etc... will have a remote_path that's relative to the vagrant user's home. The exception is the RSync daemon modes, where remote_path will begin with daemon module names, which are mapped to the vagrant user's home.
[ "If", "a", "trigger", "is", "run", "multiple", "times", "within", "a", "test", "(", "like", "when", "testing", "cycling", ")", "multiple", "packages", "will", "exist", "under", "different", "timestamp", "folders", ".", "This", "allows", "us", "to", "find", ...
64370f925e859f858766b674717a3dbee0de7a26
https://github.com/backup/backup/blob/64370f925e859f858766b674717a3dbee0de7a26/vagrant/spec/support/package.rb#L41-L53
train
Returns an array of the files that are in the archive.
[ 30522, 13366, 6764, 1030, 6764, 1064, 1064, 1027, 4088, 5527, 1027, 2944, 1012, 5527, 2015, 1012, 2034, 2709, 1031, 1033, 4983, 5527, 1001, 2944, 2134, 1005, 1056, 3573, 2505, 4130, 1027, 5527, 1012, 4604, 1006, 1024, 6556, 1035, 4130, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
appium/ruby_lib
lib/appium_lib/common/helper.rb
Appium.Common.get_page_class
def get_page_class parser = @count_elements_parser ||= Nokogiri::XML::SAX::Parser.new(CountElements.new(@core.device)) parser.document.reset parser.parse get_source parser.document.formatted_result end
ruby
def get_page_class parser = @count_elements_parser ||= Nokogiri::XML::SAX::Parser.new(CountElements.new(@core.device)) parser.document.reset parser.parse get_source parser.document.formatted_result end
[ "def", "get_page_class", "parser", "=", "@count_elements_parser", "||=", "Nokogiri", "::", "XML", "::", "SAX", "::", "Parser", ".", "new", "(", "CountElements", ".", "new", "(", "@core", ".", "device", ")", ")", "parser", ".", "document", ".", "reset", "pa...
class CountElements Returns a string of class counts of visible elements. @return [String] @example get_page_class #=> "24x XCUIElementTypeStaticText\n12x XCUIElementTypeCell\n8x XCUIElementTypeOther\n # 2x XCUIElementTypeWindow\n1x XCUIElementTypeStatusBar\n1x XCUIElementTypeTable\n1 # x XCUIElementTypeNavigationBar\n1x XCUIElementTypeApplication"
[ "class", "CountElements", "Returns", "a", "string", "of", "class", "counts", "of", "visible", "elements", ".", "@return", "[", "String", "]" ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/common/helper.rb#L115-L122
train
Get the page class number and the result of the query.
[ 30522, 13366, 2131, 1035, 3931, 1035, 2465, 11968, 8043, 1027, 1030, 4175, 1035, 3787, 1035, 11968, 8043, 1064, 1064, 1027, 2053, 3683, 23243, 1024, 1024, 20950, 1024, 1024, 19656, 1024, 1024, 11968, 8043, 1012, 2047, 1006, 4175, 12260, 816...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb
Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.list_by_resource_group_with_http_info
def list_by_resource_group_with_http_info(resource_group_name, skiptoken:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, skiptoken:skiptoken, custom_headers:custom_headers).value! end
ruby
def list_by_resource_group_with_http_info(resource_group_name, skiptoken:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, skiptoken:skiptoken, custom_headers:custom_headers).value! end
[ "def", "list_by_resource_group_with_http_info", "(", "resource_group_name", ",", "skiptoken", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_by_resource_group_async", "(", "resource_group_name", ",", "skiptoken", ":", "skiptoken", ",", "custom_headers", ":custo...
Gets the web services in the specified resource group. @param resource_group_name [String] Name of the resource group in which the web service is located. @param skiptoken [String] Continuation token for pagination. @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", "the", "web", "services", "in", "the", "specified", "resource", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L455-L457
train
Gets the list of all the segmentation elements in a resource group.
[ 30522, 13366, 2862, 1035, 2011, 1035, 7692, 1035, 2177, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 13558, 18715, 2368, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/management_policies.rb
Azure::Storage::Mgmt::V2018_11_01.ManagementPolicies.create_or_update_with_http_info
def create_or_update_with_http_info(resource_group_name, account_name, properties, custom_headers:nil) create_or_update_async(resource_group_name, account_name, properties, custom_headers:custom_headers).value! end
ruby
def create_or_update_with_http_info(resource_group_name, account_name, properties, custom_headers:nil) create_or_update_async(resource_group_name, account_name, properties, custom_headers:custom_headers).value! end
[ "def", "create_or_update_with_http_info", "(", "resource_group_name", ",", "account_name", ",", "properties", ",", "custom_headers", ":", "nil", ")", "create_or_update_async", "(", "resource_group_name", ",", "account_name", ",", "properties", ",", "custom_headers", ":cus...
Sets the managementpolicy to 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 properties [ManagementPolicy] The ManagementPolicy set to a storage account. @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.
[ "Sets", "the", "managementpolicy", "to", "the", "specified", "storage", "account", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/management_policies.rb#L168-L170
train
Creates or updates a managed network interface.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 5144, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3443, 1035, 2030, 1035, 10651, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activerecord/lib/active_record/relation/finder_methods.rb
ActiveRecord.FinderMethods.exists?
def exists?(conditions = :none) if Base === conditions raise ArgumentError, <<-MSG.squish You are passing an instance of ActiveRecord::Base to `exists?`. Please pass the id of the object by calling `.id`. MSG end return false if !conditions || limit_value == 0 if eager_loading? relation = apply_join_dependency(eager_loading: false) return relation.exists?(conditions) end relation = construct_relation_for_exists(conditions) skip_query_cache_if_necessary { connection.select_one(relation.arel, "#{name} Exists?") } ? true : false end
ruby
def exists?(conditions = :none) if Base === conditions raise ArgumentError, <<-MSG.squish You are passing an instance of ActiveRecord::Base to `exists?`. Please pass the id of the object by calling `.id`. MSG end return false if !conditions || limit_value == 0 if eager_loading? relation = apply_join_dependency(eager_loading: false) return relation.exists?(conditions) end relation = construct_relation_for_exists(conditions) skip_query_cache_if_necessary { connection.select_one(relation.arel, "#{name} Exists?") } ? true : false end
[ "def", "exists?", "(", "conditions", "=", ":none", ")", "if", "Base", "===", "conditions", "raise", "ArgumentError", ",", "<<-MSG", ".", "squish", "MSG", "end", "return", "false", "if", "!", "conditions", "||", "limit_value", "==", "0", "if", "eager_loading?...
Returns true if a record exists in the table that matches the +id+ or conditions given, or false otherwise. The argument can take six forms: * Integer - Finds the record with this primary key. * String - Finds the record with a primary key corresponding to this string (such as <tt>'5'</tt>). * Array - Finds the record that matches these +find+-style conditions (such as <tt>['name LIKE ?', "%#{query}%"]</tt>). * Hash - Finds the record that matches these +find+-style conditions (such as <tt>{name: 'David'}</tt>). * +false+ - Returns always +false+. * No args - Returns +false+ if the relation is empty, +true+ otherwise. For more information about specifying conditions as a hash or array, see the Conditions section in the introduction to ActiveRecord::Base. Note: You can't pass in a condition as a string (like <tt>name = 'Jamie'</tt>), since it would be sanitized and then queried against the primary key column, like <tt>id = 'name = \'Jamie\''</tt>. Person.exists?(5) Person.exists?('5') Person.exists?(['name LIKE ?', "%#{query}%"]) Person.exists?(id: [1, 4, 8]) Person.exists?(name: 'David') Person.exists?(false) Person.exists? Person.where(name: 'Spartacus', rating: 4).exists?
[ "Returns", "true", "if", "a", "record", "exists", "in", "the", "table", "that", "matches", "the", "+", "id", "+", "or", "conditions", "given", "or", "false", "otherwise", ".", "The", "argument", "can", "take", "six", "forms", ":" ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/relation/finder_methods.rb#L300-L318
train
Returns true if the object exists in the database.
[ 30522, 13366, 6526, 1029, 1006, 3785, 1027, 1024, 3904, 1007, 2065, 2918, 1027, 1027, 1027, 3785, 5333, 6685, 2121, 29165, 1010, 1026, 1026, 1011, 5796, 2290, 1012, 5490, 27020, 2232, 2017, 2024, 4458, 2019, 6013, 1997, 3161, 2890, 27108, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb
Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Webhooks.begin_update_with_http_info
def begin_update_with_http_info(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers:nil) begin_update_async(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers:custom_headers).value! end
ruby
def begin_update_with_http_info(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers:nil) begin_update_async(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers:custom_headers).value! end
[ "def", "begin_update_with_http_info", "(", "resource_group_name", ",", "registry_name", ",", "webhook_name", ",", "webhook_update_parameters", ",", "custom_headers", ":", "nil", ")", "begin_update_async", "(", "resource_group_name", ",", "registry_name", ",", "webhook_name"...
Updates a webhook with the specified parameters. @param resource_group_name [String] The name of the resource group to which the container registry belongs. @param registry_name [String] The name of the container registry. @param webhook_name [String] The name of the webhook. @param webhook_update_parameters [WebhookUpdateParameters] The parameters for updating a webhook. @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", "webhook", "with", "the", "specified", "parameters", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb#L940-L942
train
Updates a webhook.
[ 30522, 13366, 4088, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 4773, 6806, 6559, 1035, 2171, 1010, 4773, 6806, 6559, 1035, 10651, 1035, 11709, 1010, 7661, 1035, 20346...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb
Azure::Automation::Mgmt::V2015_10_31.JobOperations.resume
def resume(resource_group_name, automation_account_name, job_id, custom_headers:nil) response = resume_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value! nil end
ruby
def resume(resource_group_name, automation_account_name, job_id, custom_headers:nil) response = resume_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value! nil end
[ "def", "resume", "(", "resource_group_name", ",", "automation_account_name", ",", "job_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "resume_async", "(", "resource_group_name", ",", "automation_account_name", ",", "job_id", ",", "custom_headers", ":cus...
Resume the job identified by jobId. @param resource_group_name [String] Name of an Azure Resource group. @param automation_account_name [String] The name of the automation account. @param job_id The job id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Resume", "the", "job", "identified", "by", "jobId", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb#L732-L735
train
Resumes a specified job.
[ 30522, 13366, 13746, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 19309, 1035, 4070, 1035, 2171, 1010, 3105, 1035, 8909, 1010, 7661, 1035, 30524, 2140, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
actionview/lib/action_view/lookup_context.rb
ActionView.LookupContext.locale=
def locale=(value) if value config = I18n.config.respond_to?(:original_config) ? I18n.config.original_config : I18n.config config.locale = value end super(default_locale) end
ruby
def locale=(value) if value config = I18n.config.respond_to?(:original_config) ? I18n.config.original_config : I18n.config config.locale = value end super(default_locale) end
[ "def", "locale", "=", "(", "value", ")", "if", "value", "config", "=", "I18n", ".", "config", ".", "respond_to?", "(", ":original_config", ")", "?", "I18n", ".", "config", ".", "original_config", ":", "I18n", ".", "config", "config", ".", "locale", "=", ...
Overload locale= to also set the I18n.locale. If the current I18n.config object responds to original_config, it means that it has a copy of the original I18n configuration and it's acting as proxy, which we need to skip.
[ "Overload", "locale", "=", "to", "also", "set", "the", "I18n", ".", "locale", ".", "If", "the", "current", "I18n", ".", "config", "object", "responds", "to", "original_config", "it", "means", "that", "it", "has", "a", "copy", "of", "the", "original", "I1...
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/lookup_context.rb#L307-L314
train
Set the locale for this language.
[ 30522, 13366, 2334, 2063, 1027, 1006, 3643, 1007, 2065, 3643, 9530, 8873, 2290, 1027, 1045, 15136, 2078, 1012, 9530, 8873, 2290, 1012, 6869, 1035, 2000, 1029, 1006, 1024, 2434, 1035, 9530, 8873, 2290, 1007, 1029, 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...
jekyll/jekyll
lib/jekyll/cache.rb
Jekyll.Cache.dump
def dump(path, value) return unless disk_cache_enabled? FileUtils.mkdir_p(File.dirname(path)) File.open(path, "wb") do |cached_file| Marshal.dump(value, cached_file) end end
ruby
def dump(path, value) return unless disk_cache_enabled? FileUtils.mkdir_p(File.dirname(path)) File.open(path, "wb") do |cached_file| Marshal.dump(value, cached_file) end end
[ "def", "dump", "(", "path", ",", "value", ")", "return", "unless", "disk_cache_enabled?", "FileUtils", ".", "mkdir_p", "(", "File", ".", "dirname", "(", "path", ")", ")", "File", ".", "open", "(", "path", ",", "\"wb\"", ")", "do", "|", "cached_file", "...
rubocop:enable Security/MarshalLoad Given a path and a value, save value to disk at path. This should NEVER be called in Safe Mode Returns nothing.
[ "rubocop", ":", "enable", "Security", "/", "MarshalLoad", "Given", "a", "path", "and", "a", "value", "save", "value", "to", "disk", "at", "path", ".", "This", "should", "NEVER", "be", "called", "in", "Safe", "Mode" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/cache.rb#L181-L188
train
Dump the given value to a file
[ 30522, 13366, 15653, 1006, 4130, 1010, 3643, 1007, 2709, 4983, 9785, 1035, 17053, 1035, 9124, 1029, 5371, 21823, 4877, 1012, 12395, 4305, 2099, 1035, 1052, 1006, 5371, 1012, 16101, 18442, 1006, 4130, 1007, 1007, 5371, 1012, 2330, 1006, 4130...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/property_sort_order.rb
SCSSLint.Linter::PropertySortOrder.ignore_property?
def ignore_property?(prop_node) return true if prop_node.name.any? { |part| !part.is_a?(String) } config['ignore_unspecified'] && @preferred_order && !@preferred_order.include?(prop_node.name.join) end
ruby
def ignore_property?(prop_node) return true if prop_node.name.any? { |part| !part.is_a?(String) } config['ignore_unspecified'] && @preferred_order && !@preferred_order.include?(prop_node.name.join) end
[ "def", "ignore_property?", "(", "prop_node", ")", "return", "true", "if", "prop_node", ".", "name", ".", "any?", "{", "|", "part", "|", "!", "part", ".", "is_a?", "(", "String", ")", "}", "config", "[", "'ignore_unspecified'", "]", "&&", "@preferred_order"...
Return whether to ignore a property in the sort order. This includes: - properties containing interpolation - properties not explicitly defined in the sort order (if ignore_unspecified is set)
[ "Return", "whether", "to", "ignore", "a", "property", "in", "the", "sort", "order", "." ]
e99afe4ede041a431a06e585c12ce82f6ad50116
https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/property_sort_order.rb#L182-L188
train
Returns true if the property is ignored
[ 30522, 13366, 8568, 1035, 3200, 1029, 1006, 17678, 1035, 13045, 1007, 2709, 2995, 2065, 17678, 1035, 13045, 1012, 2171, 1012, 2151, 1029, 1063, 1064, 2112, 1064, 999, 2112, 1012, 2003, 1035, 1037, 1029, 1006, 5164, 1007, 1065, 9530, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb
Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.analyze_image_by_domain_in_stream_with_http_info
def analyze_image_by_domain_in_stream_with_http_info(model, image, language:nil, custom_headers:nil) analyze_image_by_domain_in_stream_async(model, image, language:language, custom_headers:custom_headers).value! end
ruby
def analyze_image_by_domain_in_stream_with_http_info(model, image, language:nil, custom_headers:nil) analyze_image_by_domain_in_stream_async(model, image, language:language, custom_headers:custom_headers).value! end
[ "def", "analyze_image_by_domain_in_stream_with_http_info", "(", "model", ",", "image", ",", "language", ":", "nil", ",", "custom_headers", ":", "nil", ")", "analyze_image_by_domain_in_stream_async", "(", "model", ",", "image", ",", "language", ":", "language", ",", ...
This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong. @param model [String] The domain-specific content to recognize. @param image An image stream. @param language [Enum] The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh' @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.
[ "This", "operation", "recognizes", "content", "within", "an", "image", "by", "applying", "a", "domain", "-", "specific", "model", ".", "The", "list", "of", "domain", "-", "specific", "models", "that", "are", "supported", "by", "the", "Computer", "Vision", "A...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L2572-L2574
train
Analyze an image by domain in a stream.
[ 30522, 13366, 17908, 1035, 3746, 1035, 2011, 1035, 5884, 1035, 1999, 1035, 5460, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2944, 1010, 3746, 1010, 2653, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 17908, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb
Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.begin_generatevpnclientpackage_with_http_info
def begin_generatevpnclientpackage_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_generatevpnclientpackage_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_generatevpnclientpackage_with_http_info", "(", "resource_group_name", ",", "virtual_network_gateway_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_generatevpnclientpackage_async", "(", "resource_group_name", ",", "virtual_network_gateway_name...
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. @param resource_group_name [String] The name of the resource group. @param virtual_network_gateway_name [String] The name of the virtual network gateway. @param parameters [VpnClientParameters] Parameters supplied to the generate virtual network gateway VPN client package 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", "VPN", "client", "package", "for", "P2S", "client", "of", "the", "virtual", "network", "gateway", "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_gateways.rb#L1621-L1623
train
Generates a VPN client package for P2S client.
[ 30522, 13366, 4088, 1035, 9699, 2615, 2361, 12273, 8751, 3372, 23947, 4270, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 11909, 1035, 2171, 1010, 11709, 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...
aws/aws-sdk-ruby
gems/aws-sdk-s3/lib/aws-sdk-s3/bucket.rb
Aws::S3.Bucket.create
def create(options = {}) options = options.merge(bucket: @name) resp = @client.create_bucket(options) resp.data end
ruby
def create(options = {}) options = options.merge(bucket: @name) resp = @client.create_bucket(options) resp.data end
[ "def", "create", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "bucket", ":", "@name", ")", "resp", "=", "@client", ".", "create_bucket", "(", "options", ")", "resp", ".", "data", "end" ]
@!group Actions @example Request syntax with placeholder values bucket.create({ acl: "private", # accepts private, public-read, public-read-write, authenticated-read create_bucket_configuration: { location_constraint: "EU", # accepts EU, eu-west-1, us-west-1, us-west-2, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1, eu-central-1 }, grant_full_control: "GrantFullControl", grant_read: "GrantRead", grant_read_acp: "GrantReadACP", grant_write: "GrantWrite", grant_write_acp: "GrantWriteACP", object_lock_enabled_for_bucket: false, }) @param [Hash] options ({}) @option options [String] :acl The canned ACL to apply to the bucket. @option options [Types::CreateBucketConfiguration] :create_bucket_configuration @option options [String] :grant_full_control Allows grantee the read, write, read ACP, and write ACP permissions on the bucket. @option options [String] :grant_read Allows grantee to list the objects in the bucket. @option options [String] :grant_read_acp Allows grantee to read the bucket ACL. @option options [String] :grant_write Allows grantee to create, overwrite, and delete any object in the bucket. @option options [String] :grant_write_acp Allows grantee to write the ACL for the applicable bucket. @option options [Boolean] :object_lock_enabled_for_bucket Specifies whether you want S3 Object Lock to be enabled for the new bucket. @return [Types::CreateBucketOutput]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket.rb#L248-L252
train
Creates a new bucket
[ 30522, 13366, 3443, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 13610, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 13610, 1006, 7047, 1007, 24501, 2361, 1012, 2951, 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...
watir/watir
lib/watir/elements/select.rb
Watir.Select.select!
def select!(*str_or_rx) results = str_or_rx.flatten.map { |v| select_by!(v, :single) } results.first end
ruby
def select!(*str_or_rx) results = str_or_rx.flatten.map { |v| select_by!(v, :single) } results.first end
[ "def", "select!", "(", "*", "str_or_rx", ")", "results", "=", "str_or_rx", ".", "flatten", ".", "map", "{", "|", "v", "|", "select_by!", "(", "v", ",", ":single", ")", "}", "results", ".", "first", "end" ]
Uses JavaScript to select the option whose text matches the given string. @param [String, Regexp] str_or_rx @raise [Watir::Exception::NoValueFoundException] if the value does not exist.
[ "Uses", "JavaScript", "to", "select", "the", "option", "whose", "text", "matches", "the", "given", "string", "." ]
2d8db09811c6221ae401b85b2f61f5fa66e463a3
https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/select.rb#L57-L60
train
Select the first element of the list
[ 30522, 13366, 7276, 999, 1006, 1008, 2358, 2099, 1035, 2030, 1035, 1054, 2595, 1007, 3463, 1027, 2358, 2099, 1035, 2030, 1035, 1054, 2595, 1012, 4257, 6528, 1012, 4949, 1063, 1064, 1058, 1064, 7276, 1035, 2011, 999, 1006, 1058, 1010, 1024...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_pattern_any_entity_infos
def list_pattern_any_entity_infos(app_id, version_id, skip:0, take:100, custom_headers:nil) response = list_pattern_any_entity_infos_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_pattern_any_entity_infos(app_id, version_id, skip:0, take:100, custom_headers:nil) response = list_pattern_any_entity_infos_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_pattern_any_entity_infos", "(", "app_id", ",", "version_id", ",", "skip", ":", "0", ",", "take", ":", "100", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_pattern_any_entity_infos_async", "(", "app_id", ",", "version_id", ",", "skip...
Get information about the Pattern.Any entity models in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param skip [Integer] The number of entries to skip. Default value is 0. @param take [Integer] The number of entries to return. Maximum page size is 500. Default is 100. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.
[ "Get", "information", "about", "the", "Pattern", ".", "Any", "entity", "models", "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#L5889-L5892
train
Gets the pattern any entity infos for a version of the application.
[ 30522, 13366, 2862, 1035, 5418, 1035, 2151, 1035, 9178, 1035, 18558, 2015, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 13558, 1024, 1014, 1010, 2202, 1024, 2531, 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...
spohlenz/tinymce-rails
lib/tinymce/rails/helper.rb
TinyMCE::Rails.Helper.tinymce_configurations_javascript
def tinymce_configurations_javascript(options={}) javascript = [] TinyMCE::Rails.each_configuration do |name, config| config = config.merge(options) if options.present? javascript << "TinyMCERails.configuration.#{name} = #{config.to_javascript};".html_safe end safe_join(javascript, "\n") end
ruby
def tinymce_configurations_javascript(options={}) javascript = [] TinyMCE::Rails.each_configuration do |name, config| config = config.merge(options) if options.present? javascript << "TinyMCERails.configuration.#{name} = #{config.to_javascript};".html_safe end safe_join(javascript, "\n") end
[ "def", "tinymce_configurations_javascript", "(", "options", "=", "{", "}", ")", "javascript", "=", "[", "]", "TinyMCE", "::", "Rails", ".", "each_configuration", "do", "|", "name", ",", "config", "|", "config", "=", "config", ".", "merge", "(", "options", ...
Returns the JavaScript code for initializing each configuration defined within tinymce.yml.
[ "Returns", "the", "JavaScript", "code", "for", "initializing", "each", "configuration", "defined", "within", "tinymce", ".", "yml", "." ]
6f94b295f030939c8b3c7739f13812e42e6d920a
https://github.com/spohlenz/tinymce-rails/blob/6f94b295f030939c8b3c7739f13812e42e6d920a/lib/tinymce/rails/helper.rb#L39-L48
train
Returns the JavaScript code for the TinyMCE configurations.
[ 30522, 13366, 4714, 12458, 2063, 1035, 22354, 1035, 9262, 22483, 1006, 7047, 1027, 1063, 1065, 1007, 9262, 22483, 1027, 1031, 1033, 4714, 12458, 2063, 1024, 1024, 15168, 1012, 2169, 1035, 9563, 2079, 1064, 2171, 1010, 9530, 8873, 2290, 1064...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/managed_clusters.rb
Azure::ContainerService::Mgmt::V2019_02_01.ManagedClusters.reset_aadprofile
def reset_aadprofile(resource_group_name, resource_name, parameters, custom_headers:nil) response = reset_aadprofile_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers).value! nil end
ruby
def reset_aadprofile(resource_group_name, resource_name, parameters, custom_headers:nil) response = reset_aadprofile_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers).value! nil end
[ "def", "reset_aadprofile", "(", "resource_group_name", ",", "resource_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "reset_aadprofile_async", "(", "resource_group_name", ",", "resource_name", ",", "parameters", ",", "custom_headers",...
Reset AAD Profile of a managed cluster. Update the AAD Profile for a managed cluster. @param resource_group_name [String] The name of the resource group. @param resource_name [String] The name of the managed cluster resource. @param parameters [ManagedClusterAADProfile] Parameters supplied to the Reset AAD Profile operation for a Managed Cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Reset", "AAD", "Profile", "of", "a", "managed", "cluster", "." ]
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/managed_clusters.rb#L925-L928
train
Resets an existing AAD profile.
[ 30522, 13366, 25141, 1035, 9779, 18927, 3217, 8873, 2571, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 25141, 1035, 9779, 18927, 3217, 8873, 2571...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongo-ruby-driver
lib/mongo/session.rb
Mongo.Session.validate_read_preference!
def validate_read_preference!(command) return unless in_transaction? && non_primary_read_preference_mode?(command) raise Mongo::Error::InvalidTransactionOperation.new( Mongo::Error::InvalidTransactionOperation::INVALID_READ_PREFERENCE) end
ruby
def validate_read_preference!(command) return unless in_transaction? && non_primary_read_preference_mode?(command) raise Mongo::Error::InvalidTransactionOperation.new( Mongo::Error::InvalidTransactionOperation::INVALID_READ_PREFERENCE) end
[ "def", "validate_read_preference!", "(", "command", ")", "return", "unless", "in_transaction?", "&&", "non_primary_read_preference_mode?", "(", "command", ")", "raise", "Mongo", "::", "Error", "::", "InvalidTransactionOperation", ".", "new", "(", "Mongo", "::", "Error...
Ensure that the read preference of a command primary. @example session.validate_read_preference!(command) @raise [ Mongo::Error::InvalidTransactionOperation ] If the read preference of the command is not primary. @since 2.6.0 @api private
[ "Ensure", "that", "the", "read", "preference", "of", "a", "command", "primary", "." ]
dca26d0870cb3386fad9ccc1d17228097c1fe1c8
https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/session.rb#L351-L356
train
Validate read preference mode
[ 30522, 13366, 9398, 3686, 1035, 3191, 1035, 12157, 999, 1006, 3094, 1007, 2709, 4983, 1999, 1035, 12598, 1029, 1004, 1004, 2512, 1035, 3078, 1035, 3191, 1035, 12157, 1035, 5549, 1029, 1006, 3094, 1007, 5333, 12256, 3995, 1024, 1024, 7561, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.interword_spacing
def interword_spacing(space) begin Float(space) rescue ArgumentError Kernel.raise ArgumentError, 'invalid value for interword_spacing' rescue TypeError Kernel.raise TypeError, "can't convert #{space.class} into Float" end primitive "interword-spacing #{space}" end
ruby
def interword_spacing(space) begin Float(space) rescue ArgumentError Kernel.raise ArgumentError, 'invalid value for interword_spacing' rescue TypeError Kernel.raise TypeError, "can't convert #{space.class} into Float" end primitive "interword-spacing #{space}" end
[ "def", "interword_spacing", "(", "space", ")", "begin", "Float", "(", "space", ")", "rescue", "ArgumentError", "Kernel", ".", "raise", "ArgumentError", ",", "'invalid value for interword_spacing'", "rescue", "TypeError", "Kernel", ".", "raise", "TypeError", ",", "\"...
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#L381-L390
train
Returns the interword spacing of the space.
[ 30522, 13366, 6970, 18351, 1035, 12403, 6129, 1006, 2686, 1007, 4088, 14257, 1006, 2686, 1007, 5343, 6685, 2121, 29165, 16293, 1012, 5333, 6685, 2121, 29165, 1010, 1005, 19528, 3643, 2005, 6970, 18351, 1035, 12403, 6129, 1005, 5343, 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...
roo-rb/roo
lib/roo/excelx.rb
Roo.Excelx.cell
def cell(row, col, sheet = nil) key = normalize(row, col) safe_send(sheet_for(sheet).cells[key], :value) end
ruby
def cell(row, col, sheet = nil) key = normalize(row, col) safe_send(sheet_for(sheet).cells[key], :value) end
[ "def", "cell", "(", "row", ",", "col", ",", "sheet", "=", "nil", ")", "key", "=", "normalize", "(", "row", ",", "col", ")", "safe_send", "(", "sheet_for", "(", "sheet", ")", ".", "cells", "[", "key", "]", ",", ":value", ")", "end" ]
Returns the content of a spreadsheet-cell. (1,1) is the upper left corner. (1,1), (1,'A'), ('A',1), ('a',1) all refers to the cell at the first line and first row.
[ "Returns", "the", "content", "of", "a", "spreadsheet", "-", "cell", ".", "(", "1", "1", ")", "is", "the", "upper", "left", "corner", ".", "(", "1", "1", ")", "(", "1", "A", ")", "(", "A", "1", ")", "(", "a", "1", ")", "all", "refers", "to", ...
4ec1104f0c3c2a29711c0c907371cd2be12bcc3c
https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/excelx.rb#L113-L116
train
Returns the cell value for a given cell
[ 30522, 13366, 3526, 1006, 5216, 1010, 8902, 1010, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.get_site_detector
def get_site_detector(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil) first_page = get_site_detector_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers) first_page.get_all_items end
ruby
def get_site_detector(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil) first_page = get_site_detector_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "get_site_detector", "(", "resource_group_name", ",", "site_name", ",", "diagnostic_category", ",", "detector_name", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "get_site_detector_as_lazy", "(", "resource_group_name", ",", "site_name", ",", "diagno...
Get Detector Get Detector @param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<DetectorDefinition>] operation results.
[ "Get", "Detector" ]
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#L1145-L1148
train
Gets the detected language of the site.
[ 30522, 13366, 2131, 1035, 2609, 1035, 19034, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2609, 1035, 2171, 1010, 16474, 1035, 4696, 1010, 19034, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
plaid/plaid-ruby
lib/plaid/products/asset_report.rb
Plaid.AssetReport.create
def create(access_tokens, days_requested, options = {}) post_with_auth 'asset_report/create', AssetReportCreateResponse, access_tokens: access_tokens, days_requested: days_requested, options: options end
ruby
def create(access_tokens, days_requested, options = {}) post_with_auth 'asset_report/create', AssetReportCreateResponse, access_tokens: access_tokens, days_requested: days_requested, options: options end
[ "def", "create", "(", "access_tokens", ",", "days_requested", ",", "options", "=", "{", "}", ")", "post_with_auth", "'asset_report/create'", ",", "AssetReportCreateResponse", ",", "access_tokens", ":", "access_tokens", ",", "days_requested", ":", "days_requested", ","...
Public: Create an asset report. access_tokens - An array of access tokens, one token for each Item to be included in the Asset Report. days_requested - Days of transaction history requested to be included in the Asset Report. Plaid will return as much data as possible within the implied date range, up to a maximum of 730 days (2 years) of history. options - An optional object containing client-provided user information, a client-provided report ID, and a webhook. For more information, see the website listed above. Returns a AssetReportCreateResponse object.
[ "Public", ":", "Create", "an", "asset", "report", "." ]
ce3da1c5559c739de88c5f59e54eef875f296673
https://github.com/plaid/plaid-ruby/blob/ce3da1c5559c739de88c5f59e54eef875f296673/lib/plaid/products/asset_report.rb#L18-L24
train
Create an asset report
[ 30522, 13366, 3443, 1006, 3229, 1035, 19204, 2015, 1010, 2420, 1035, 7303, 1010, 7047, 1027, 1063, 1065, 1007, 2695, 1035, 2007, 1035, 8740, 2705, 1005, 11412, 1035, 3189, 1013, 3443, 1005, 1010, 11412, 2890, 6442, 16748, 24932, 2229, 26029...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
plataformatec/simple_form
lib/simple_form/form_builder.rb
SimpleForm.FormBuilder.lookup_action
def lookup_action #:nodoc: @lookup_action ||= begin action = template.controller && template.controller.action_name return unless action action = action.to_s ACTIONS[action] || action end end
ruby
def lookup_action #:nodoc: @lookup_action ||= begin action = template.controller && template.controller.action_name return unless action action = action.to_s ACTIONS[action] || action end end
[ "def", "lookup_action", "#:nodoc:", "@lookup_action", "||=", "begin", "action", "=", "template", ".", "controller", "&&", "template", ".", "controller", ".", "action_name", "return", "unless", "action", "action", "=", "action", ".", "to_s", "ACTIONS", "[", "acti...
The action to be used in lookup.
[ "The", "action", "to", "be", "used", "in", "lookup", "." ]
4dd9261ebb392e46a9beeefe8d83081e7c6e56b5
https://github.com/plataformatec/simple_form/blob/4dd9261ebb392e46a9beeefe8d83081e7c6e56b5/lib/simple_form/form_builder.rb#L473-L480
train
Returns the action that is defined in the template.
[ 30522, 13366, 2298, 6279, 1035, 2895, 1001, 1024, 7293, 10085, 1024, 1030, 2298, 6279, 1035, 2895, 1064, 1064, 1027, 4088, 2895, 1027, 23561, 1012, 11486, 1004, 1004, 23561, 1012, 11486, 1012, 2895, 1035, 2171, 2709, 4983, 2895, 2895, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb
Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.recognize_text
def recognize_text(url, mode, custom_headers:nil) response = recognize_text_async(url, mode, custom_headers:custom_headers).value! nil end
ruby
def recognize_text(url, mode, custom_headers:nil) response = recognize_text_async(url, mode, custom_headers:custom_headers).value! nil end
[ "def", "recognize_text", "(", "url", ",", "mode", ",", "custom_headers", ":", "nil", ")", "response", "=", "recognize_text_async", "(", "url", ",", "mode", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", "end" ]
Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation. @param mode [TextRecognitionMode] Type of text to recognize. Possible values include: 'Handwritten', 'Printed' @param url [String] Publicly reachable URL of an image. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Recognize", "Text", "operation", ".", "When", "you", "use", "the", "Recognize", "Text", "interface", "the", "response", "contains", "a", "field", "called", "Operation", "-", "Location", ".", "The", "Operation", "-", "Location", "field", "contains", "the", "UR...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L1389-L1392
train
Recognizes text in a given image.
[ 30522, 13366, 6807, 1035, 3793, 1006, 24471, 2140, 1010, 5549, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 6807, 1035, 3793, 1035, 2004, 6038, 2278, 1006, 24471, 2140, 1010, 5549, 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...
daddyz/phonelib
lib/phonelib/phone_analyzer.rb
Phonelib.PhoneAnalyzer.convert_to_e164
def convert_to_e164(phone, data) match = phone.match full_regex_for_data(data, Core::VALID_PATTERN, !original_starts_with_plus?) case when match "#{data[Core::COUNTRY_CODE]}#{match.to_a.last}" when phone.match(cr("^#{data[Core::INTERNATIONAL_PREFIX]}")) phone.sub(cr("^#{data[Core::INTERNATIONAL_PREFIX]}"), Core::PLUS_SIGN) when original_starts_with_plus? && phone.start_with?(data[Core::COUNTRY_CODE]) phone else "#{data[Core::COUNTRY_CODE]}#{phone}" end end
ruby
def convert_to_e164(phone, data) match = phone.match full_regex_for_data(data, Core::VALID_PATTERN, !original_starts_with_plus?) case when match "#{data[Core::COUNTRY_CODE]}#{match.to_a.last}" when phone.match(cr("^#{data[Core::INTERNATIONAL_PREFIX]}")) phone.sub(cr("^#{data[Core::INTERNATIONAL_PREFIX]}"), Core::PLUS_SIGN) when original_starts_with_plus? && phone.start_with?(data[Core::COUNTRY_CODE]) phone else "#{data[Core::COUNTRY_CODE]}#{phone}" end end
[ "def", "convert_to_e164", "(", "phone", ",", "data", ")", "match", "=", "phone", ".", "match", "full_regex_for_data", "(", "data", ",", "Core", "::", "VALID_PATTERN", ",", "!", "original_starts_with_plus?", ")", "case", "when", "match", "\"#{data[Core::COUNTRY_COD...
Create phone representation in e164 format ==== Attributes * +phone+ - phone number for parsing * +data+ - country data to be based on for creating e164 representation
[ "Create", "phone", "representation", "in", "e164", "format" ]
aa0023eab7c896b71275bf342bc7f49735cbdbbf
https://github.com/daddyz/phonelib/blob/aa0023eab7c896b71275bf342bc7f49735cbdbbf/lib/phonelib/phone_analyzer.rb#L123-L135
train
Convert phone to e164
[ 30522, 13366, 10463, 1035, 2000, 1035, 1041, 16048, 2549, 1006, 3042, 1010, 2951, 1007, 2674, 1027, 3042, 1012, 2674, 2440, 1035, 19723, 10288, 1035, 2005, 1035, 2951, 1006, 2951, 1010, 4563, 1024, 1024, 9398, 1035, 5418, 1010, 999, 2434, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/user_profile_helper.rb
Decidim.UserProfileHelper.user_profile_tab
def user_profile_tab(text, link, options = {}) active = is_active_link?(link, (options[:aria_link_type] || :inclusive)) content_tag(:li, class: "tabs-title#{active ? " is-active" : nil}") do aria_selected_link_to(text, link, options) end end
ruby
def user_profile_tab(text, link, options = {}) active = is_active_link?(link, (options[:aria_link_type] || :inclusive)) content_tag(:li, class: "tabs-title#{active ? " is-active" : nil}") do aria_selected_link_to(text, link, options) end end
[ "def", "user_profile_tab", "(", "text", ",", "link", ",", "options", "=", "{", "}", ")", "active", "=", "is_active_link?", "(", "link", ",", "(", "options", "[", ":aria_link_type", "]", "||", ":inclusive", ")", ")", "content_tag", "(", ":li", ",", "class...
Public: Shows a menu tab with a section. It highlights automatically bye detecting if the current path is a subset of the provided route. text - The text to show in the tab. link - The path to link to. options - Extra options. aria_link_type - :inclusive or :exact, depending on the type of highlighting desired. Returns a String with the menu tab.
[ "Public", ":", "Shows", "a", "menu", "tab", "with", "a", "section", ".", "It", "highlights", "automatically", "bye", "detecting", "if", "the", "current", "path", "is", "a", "subset", "of", "the", "provided", "route", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/user_profile_helper.rb#L16-L22
train
Creates a tab with a title and a link to the user profile
[ 30522, 13366, 5310, 1035, 6337, 1035, 21628, 1006, 3793, 1010, 4957, 1010, 7047, 1027, 1063, 1065, 1007, 3161, 1027, 2003, 1035, 3161, 1035, 4957, 1029, 1006, 4957, 1010, 1006, 7047, 1031, 1024, 9342, 1035, 4957, 1035, 2828, 1033, 1064, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_deployed_service_package_health_using_policy
def get_deployed_service_package_health_using_policy(node_name, application_id, service_package_name, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) response = get_deployed_service_package_health_using_policy_async(node_name, application_id, service_package_name, events_health_state_filter:events_health_state_filter, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_deployed_service_package_health_using_policy(node_name, application_id, service_package_name, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) response = get_deployed_service_package_health_using_policy_async(node_name, application_id, service_package_name, events_health_state_filter:events_health_state_filter, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_deployed_service_package_health_using_policy", "(", "node_name", ",", "application_id", ",", "service_package_name", ",", "events_health_state_filter", ":", "0", ",", "application_health_policy", ":", "nil", ",", "timeout", ":", "60", ",", "custom_headers", ":...
Gets the information about health of service package for a specific application deployed on a Service Fabric node using the specified policy. Gets the information about health of an service package for a specific application deployed on a Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the deployed service package. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. @param service_package_name [String] The name of the service package. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @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 [DeployedServicePackageHealth] operation results.
[ "Gets", "the", "information", "about", "health", "of", "service", "package", "for", "a", "specific", "application", "deployed", "on", "a", "Service", "Fabric", "node", "using", "the", "specified", "policy", "." ]
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#L16526-L16529
train
Gets the health of the service package deployed to a Service Fabric node.
[ 30522, 13366, 2131, 1035, 7333, 1035, 2326, 1035, 7427, 1035, 2740, 1035, 2478, 1035, 3343, 1006, 13045, 1035, 2171, 1010, 4646, 1035, 8909, 1010, 2326, 1035, 7427, 1035, 2171, 1010, 2824, 1035, 2740, 1035, 2110, 1035, 11307, 1024, 1014, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb
Azure::EventHub::Mgmt::V2018_01_01_preview.Clusters.put
def put(resource_group_name, cluster_name, custom_headers:nil) response = put_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def put(resource_group_name, cluster_name, custom_headers:nil) response = put_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "put", "(", "resource_group_name", ",", "cluster_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "put_async", "(", "resource_group_name", ",", "cluster_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "bo...
Creates or updates an instance of an Event Hubs Cluster. @param resource_group_name [String] Name of the resource group within the Azure subscription. @param cluster_name [String] The name of the Event Hubs Cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Cluster] operation results.
[ "Creates", "or", "updates", "an", "instance", "of", "an", "Event", "Hubs", "Cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb#L315-L318
train
Put a cluster in a resource group.
[ 30522, 13366, 2404, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9324, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2404, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9324, 1035, 2171, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/regenerator.rb
Jekyll.Regenerator.modified?
def modified?(path) return true if disabled? # objects that don't have a path are always regenerated return true if path.nil? # Check for path in cache return cache[path] if cache.key? path if metadata[path] # If we have seen this file before, # check if it or one of its dependencies has been modified existing_file_modified?(path) else # If we have not seen this file before, add it to the metadata and regenerate it add(path) end end
ruby
def modified?(path) return true if disabled? # objects that don't have a path are always regenerated return true if path.nil? # Check for path in cache return cache[path] if cache.key? path if metadata[path] # If we have seen this file before, # check if it or one of its dependencies has been modified existing_file_modified?(path) else # If we have not seen this file before, add it to the metadata and regenerate it add(path) end end
[ "def", "modified?", "(", "path", ")", "return", "true", "if", "disabled?", "# objects that don't have a path are always regenerated", "return", "true", "if", "path", ".", "nil?", "# Check for path in cache", "return", "cache", "[", "path", "]", "if", "cache", ".", "...
Checks if a path's (or one of its dependencies) mtime has changed Returns a boolean.
[ "Checks", "if", "a", "path", "s", "(", "or", "one", "of", "its", "dependencies", ")", "mtime", "has", "changed" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/regenerator.rb#L84-L101
train
Returns true if the file has been modified
[ 30522, 13366, 6310, 1029, 1006, 4130, 1007, 2709, 2995, 2065, 9776, 1029, 1001, 5200, 2008, 2123, 1005, 1056, 2031, 1037, 4130, 2024, 2467, 19723, 24454, 4383, 2709, 2995, 2065, 4130, 1012, 9152, 2140, 1029, 1001, 4638, 2005, 4130, 1999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
troessner/reek
lib/reek/context_builder.rb
Reek.ContextBuilder.process
def process(exp) exp.children.grep(AST::Node).each { |child| build(child, exp) } end
ruby
def process(exp) exp.children.grep(AST::Node).each { |child| build(child, exp) } end
[ "def", "process", "(", "exp", ")", "exp", ".", "children", ".", "grep", "(", "AST", "::", "Node", ")", ".", "each", "{", "|", "child", "|", "build", "(", "child", ",", "exp", ")", "}", "end" ]
Handles every node for which we have no context_processor.
[ "Handles", "every", "node", "for", "which", "we", "have", "no", "context_processor", "." ]
8c6b5c0c6228a6981ab48543457889f9ea984054
https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/context_builder.rb#L74-L76
train
Builds the given AST node
[ 30522, 13366, 2832, 1006, 4654, 2361, 1007, 4654, 2361, 1012, 2336, 1012, 24665, 13699, 1006, 2004, 2102, 1024, 1024, 13045, 1007, 1012, 2169, 1063, 1064, 2775, 1064, 3857, 1006, 2775, 1010, 4654, 2361, 1007, 1065, 2203, 102, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
RailsEventStore/rails_event_store
ruby_event_store/lib/ruby_event_store/specification.rb
RubyEventStore.Specification.to
def to(stop) raise InvalidPageStop if stop.nil? || stop.empty? raise EventNotFound.new(stop) unless reader.has_event?(stop) Specification.new(reader, result.dup { |r| r.stop = stop }) end
ruby
def to(stop) raise InvalidPageStop if stop.nil? || stop.empty? raise EventNotFound.new(stop) unless reader.has_event?(stop) Specification.new(reader, result.dup { |r| r.stop = stop }) end
[ "def", "to", "(", "stop", ")", "raise", "InvalidPageStop", "if", "stop", ".", "nil?", "||", "stop", ".", "empty?", "raise", "EventNotFound", ".", "new", "(", "stop", ")", "unless", "reader", ".", "has_event?", "(", "stop", ")", "Specification", ".", "new...
Limits the query to events before or after another event. {http://railseventstore.org/docs/read/ Find out more}. @param start [String] id of event to start reading from. @return [Specification]
[ "Limits", "the", "query", "to", "events", "before", "or", "after", "another", "event", ".", "{", "http", ":", "//", "railseventstore", ".", "org", "/", "docs", "/", "read", "/", "Find", "out", "more", "}", "." ]
3ee4f3148499794154ee6fec74ccf6d4670d85ac
https://github.com/RailsEventStore/rails_event_store/blob/3ee4f3148499794154ee6fec74ccf6d4670d85ac/ruby_event_store/lib/ruby_event_store/specification.rb#L38-L42
train
Returns the index of the current page.
[ 30522, 13366, 2000, 1006, 2644, 1007, 5333, 19528, 13704, 16033, 2361, 2065, 2644, 1012, 9152, 2140, 1029, 1064, 1064, 2644, 1012, 4064, 1029, 5333, 2724, 17048, 14876, 8630, 1012, 2047, 1006, 2644, 1007, 4983, 8068, 1012, 2038, 1035, 2724,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb
Azure::ApiManagement::Mgmt::V2016_10_10.ApiManagementServices.get_sso_token
def get_sso_token(resource_group_name, service_name, custom_headers:nil) response = get_sso_token_async(resource_group_name, service_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_sso_token(resource_group_name, service_name, custom_headers:nil) response = get_sso_token_async(resource_group_name, service_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_sso_token", "(", "resource_group_name", ",", "service_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_sso_token_async", "(", "resource_group_name", ",", "service_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "res...
Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ApiManagementServiceGetSsoTokenResult] operation results.
[ "Gets", "the", "Single", "-", "Sign", "-", "On", "token", "for", "the", "API", "Management", "Service", "which", "is", "valid", "for", "5", "Minutes", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb#L699-L702
train
Gets the SSO token for the specified service.
[ 30522, 13366, 2131, 1035, 7020, 2080, 1035, 19204, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 30524, 19204, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/device_settings.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.DeviceSettings.begin_sync_remotemanagement_certificate
def begin_sync_remotemanagement_certificate(device_name, resource_group_name, manager_name, custom_headers:nil) response = begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value! nil end
ruby
def begin_sync_remotemanagement_certificate(device_name, resource_group_name, manager_name, custom_headers:nil) response = begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_sync_remotemanagement_certificate", "(", "device_name", ",", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_sync_remotemanagement_certificate_async", "(", "device_name", ",", "resource_group_name", ","...
sync Remote management Certificate between appliance and Service @param device_name [String] The device name @param resource_group_name [String] The resource group name @param manager_name [String] The manager name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "sync", "Remote", "management", "Certificate", "between", "appliance", "and", "Service" ]
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/device_settings.rb#L982-L985
train
Syncs the certificate of a managed cluster.
[ 30522, 13366, 4088, 1035, 26351, 1035, 6556, 24805, 20511, 1035, 8196, 1006, 5080, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 26351,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_table.rb
Aws::EC2.RouteTable.create_route
def create_route(options = {}) options = options.merge(route_table_id: @id) resp = @client.create_route(options) Route.new( route_table_id: @id, destination_cidr_block: options[:destination_cidr_block], client: @client ) end
ruby
def create_route(options = {}) options = options.merge(route_table_id: @id) resp = @client.create_route(options) Route.new( route_table_id: @id, destination_cidr_block: options[:destination_cidr_block], client: @client ) end
[ "def", "create_route", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "route_table_id", ":", "@id", ")", "resp", "=", "@client", ".", "create_route", "(", "options", ")", "Route", ".", "new", "(", "route_table_id", ":",...
@example Request syntax with placeholder values route = route_table.create_route({ destination_cidr_block: "String", destination_ipv_6_cidr_block: "String", dry_run: false, egress_only_internet_gateway_id: "String", gateway_id: "String", instance_id: "String", nat_gateway_id: "String", transit_gateway_id: "String", network_interface_id: "String", vpc_peering_connection_id: "String", }) @param [Hash] options ({}) @option options [String] :destination_cidr_block The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. @option options [String] :destination_ipv_6_cidr_block The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match. @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @option options [String] :egress_only_internet_gateway_id \[IPv6 traffic only\] The ID of an egress-only internet gateway. @option options [String] :gateway_id The ID of an internet gateway or virtual private gateway attached to your VPC. @option options [String] :instance_id The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached. @option options [String] :nat_gateway_id \[IPv4 traffic only\] The ID of a NAT gateway. @option options [String] :transit_gateway_id The ID of a transit gateway. @option options [String] :network_interface_id The ID of a network interface. @option options [String] :vpc_peering_connection_id The ID of a VPC peering connection. @return [Route]
[ "@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_table.rb#L258-L266
train
Creates a route in the route table
[ 30522, 13366, 3443, 1035, 2799, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 2799, 1035, 2795, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 2799, 1006, 7047, 1007, 2799, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-core/lib/aws-sdk-core/client_stubs.rb
Aws.ClientStubs.stub_responses
def stub_responses(operation_name, *stubs) if config.stub_responses apply_stubs(operation_name, stubs.flatten) else msg = 'stubbing is not enabled; enable stubbing in the constructor ' msg << 'with `:stub_responses => true`' raise msg end end
ruby
def stub_responses(operation_name, *stubs) if config.stub_responses apply_stubs(operation_name, stubs.flatten) else msg = 'stubbing is not enabled; enable stubbing in the constructor ' msg << 'with `:stub_responses => true`' raise msg end end
[ "def", "stub_responses", "(", "operation_name", ",", "*", "stubs", ")", "if", "config", ".", "stub_responses", "apply_stubs", "(", "operation_name", ",", "stubs", ".", "flatten", ")", "else", "msg", "=", "'stubbing is not enabled; enable stubbing in the constructor '", ...
Configures what data / errors should be returned from the named operation when response stubbing is enabled. ## Basic usage When you enable response stubbing, the client will generate fake responses and will not make any HTTP requests. client = Aws::S3::Client.new(stub_responses: true) client.list_buckets #=> #<struct Aws::S3::Types::ListBucketsOutput buckets=[], owner=nil> You can provide stub data that will be returned by the client. # stub data in the constructor client = Aws::S3::Client.new(stub_responses: { list_buckets: { buckets: [{name: 'my-bucket' }] }, get_object: { body: 'data' }, }) client.list_buckets.buckets.map(&:name) #=> ['my-bucket'] client.get_object(bucket:'name', key:'key').body.read #=> 'data' You can also specify the stub data using {#stub_responses} client = Aws::S3::Client.new(stub_responses: true) client.stub_responses(:list_buckets, { buckets: [{ name: 'my-bucket' }] }) client.list_buckets.buckets.map(&:name) #=> ['my-bucket'] With a Resource class {#stub_responses} on the corresponding client: s3 = Aws::S3::Resource.new(stub_responses: true) s3.client.stub_responses(:list_buckets, { buckets: [{ name: 'my-bucket' }] }) s3.buckets.map(&:name) #=> ['my-bucket'] Lastly, default stubs can be configured via `Aws.config`: Aws.config[:s3] = { stub_responses: { list_buckets: { buckets: [{name: 'my-bucket' }] } } } Aws::S3::Client.new.list_buckets.buckets.map(&:name) #=> ['my-bucket'] Aws::S3::Resource.new.buckets.map(&:name) #=> ['my-bucket'] ## Dynamic Stubbing In addition to creating static stubs, it's also possible to generate stubs dynamically based on the parameters with which operations were called, by passing a `Proc` object: s3 = Aws::S3::Resource.new(stub_responses: true) s3.client.stub_responses(:put_object, -> (context) { s3.client.stub_responses(:get_object, content_type: context.params[:content_type]) }) The yielded object is an instance of {Seahorse::Client::RequestContext}. ## Stubbing Errors When stubbing is enabled, the SDK will default to generate fake responses with placeholder values. You can override the data returned. You can also specify errors it should raise. # simulate service errors, give the error code client.stub_responses(:get_object, 'NotFound') client.get_object(bucket:'aws-sdk', key:'foo') #=> raises Aws::S3::Errors::NotFound # to simulate other errors, give the error class, you must # be able to construct an instance with `.new` client.stub_responses(:get_object, Timeout::Error) client.get_object(bucket:'aws-sdk', key:'foo') #=> raises new Timeout::Error # or you can give an instance of an error class client.stub_responses(:get_object, RuntimeError.new('custom message')) client.get_object(bucket:'aws-sdk', key:'foo') #=> raises the given runtime error object ## Stubbing HTTP Responses As an alternative to providing the response data, you can provide an HTTP response. client.stub_responses(:get_object, { status_code: 200, headers: { 'header-name' => 'header-value' }, body: "...", }) To stub a HTTP response, pass a Hash with all three of the following keys set: * **`:status_code`** - <Integer> - The HTTP status code * **`:headers`** - Hash<String,String> - A hash of HTTP header keys and values * **`:body`** - <String,IO> - The HTTP response body. ## Stubbing Multiple Responses Calling an operation multiple times will return similar responses. You can configure multiple stubs and they will be returned in sequence. client.stub_responses(:head_object, [ 'NotFound', { content_length: 150 }, ]) client.head_object(bucket:'aws-sdk', key:'foo') #=> raises Aws::S3::Errors::NotFound resp = client.head_object(bucket:'aws-sdk', key:'foo') resp.content_length #=> 150 @param [Symbol] operation_name @param [Mixed] stubs One or more responses to return from the named operation. @return [void] @raise [RuntimeError] Raises a runtime error when called on a client that has not enabled response stubbing via `:stub_responses => true`.
[ "Configures", "what", "data", "/", "errors", "should", "be", "returned", "from", "the", "named", "operation", "when", "response", "stubbing", "is", "enabled", "." ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-core/lib/aws-sdk-core/client_stubs.rb#L175-L183
train
Apply stubbing to the response
[ 30522, 13366, 24646, 2497, 1035, 10960, 1006, 3169, 1035, 2171, 1010, 1008, 24646, 5910, 1007, 2065, 9530, 8873, 2290, 1012, 24646, 2497, 1035, 10960, 6611, 1035, 24646, 5910, 1006, 3169, 1035, 2171, 1010, 24646, 5910, 1012, 4257, 6528, 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...
Katello/katello
app/models/katello/repository.rb
Katello.Repository.master?
def master? !self.yum? || # non-yum repos self.in_default_view? || # default content view repos (self.archive? && !self.content_view.composite) || # non-composite content view archive repos (self.content_view.composite? && self.component_source_repositories.count > 1) # composite archive repo with more than 1 source repository end
ruby
def master? !self.yum? || # non-yum repos self.in_default_view? || # default content view repos (self.archive? && !self.content_view.composite) || # non-composite content view archive repos (self.content_view.composite? && self.component_source_repositories.count > 1) # composite archive repo with more than 1 source repository end
[ "def", "master?", "!", "self", ".", "yum?", "||", "# non-yum repos", "self", ".", "in_default_view?", "||", "# default content view repos", "(", "self", ".", "archive?", "&&", "!", "self", ".", "content_view", ".", "composite", ")", "||", "# non-composite content ...
a master repository actually has content (rpms, errata, etc) in the pulp repository. For these repositories, we can use the YumDistributor to generate metadata and can index the content from pulp, or for the case of content view archives without filters, can also use the YumCloneDistributor
[ "a", "master", "repository", "actually", "has", "content", "(", "rpms", "errata", "etc", ")", "in", "the", "pulp", "repository", ".", "For", "these", "repositories", "we", "can", "use", "the", "YumDistributor", "to", "generate", "metadata", "and", "can", "in...
a1c9280067607999cae43bab89b53ba870856b76
https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/models/katello/repository.rb#L619-L624
train
Returns true if the master is a master view
[ 30522, 13366, 3040, 1029, 999, 2969, 1012, 9805, 2213, 1029, 1064, 1064, 1001, 2512, 1011, 9805, 2213, 16360, 2891, 2969, 1012, 1999, 1035, 12398, 1035, 3193, 1029, 1064, 1064, 1001, 12398, 4180, 3193, 16360, 2891, 1006, 2969, 1012, 8756, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.unpublish_iteration
def unpublish_iteration(project_id, iteration_id, custom_headers:nil) response = unpublish_iteration_async(project_id, iteration_id, custom_headers:custom_headers).value! nil end
ruby
def unpublish_iteration(project_id, iteration_id, custom_headers:nil) response = unpublish_iteration_async(project_id, iteration_id, custom_headers:custom_headers).value! nil end
[ "def", "unpublish_iteration", "(", "project_id", ",", "iteration_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "unpublish_iteration_async", "(", "project_id", ",", "iteration_id", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", "...
Unpublish a specific iteration. @param project_id The project id. @param iteration_id The iteration id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Unpublish", "a", "specific", "iteration", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L3909-L3912
train
Unpublishes the specified iteration.
[ 30522, 13366, 4895, 14289, 16558, 4509, 1035, 27758, 1006, 2622, 1035, 8909, 1010, 27758, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4895, 14289, 16558, 4509, 1035, 27758, 1035, 2004, 6038, 2278, 1006, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.rb
SCSSLint.Linter.source_from_range
def source_from_range(source_range) # rubocop:disable Metrics/AbcSize current_line = source_range.start_pos.line - 1 last_line = source_range.end_pos.line - 1 start_pos = source_range.start_pos.offset - 1 source = if current_line == last_line engine.lines[current_line][start_pos..(source_range.end_pos.offset - 1)] else engine.lines[current_line][start_pos..-1] end current_line += 1 while current_line < last_line source += engine.lines[current_line].to_s current_line += 1 end if source_range.start_pos.line != source_range.end_pos.line source += ((engine.lines[current_line] || '')[0...source_range.end_pos.offset]).to_s end source end
ruby
def source_from_range(source_range) # rubocop:disable Metrics/AbcSize current_line = source_range.start_pos.line - 1 last_line = source_range.end_pos.line - 1 start_pos = source_range.start_pos.offset - 1 source = if current_line == last_line engine.lines[current_line][start_pos..(source_range.end_pos.offset - 1)] else engine.lines[current_line][start_pos..-1] end current_line += 1 while current_line < last_line source += engine.lines[current_line].to_s current_line += 1 end if source_range.start_pos.line != source_range.end_pos.line source += ((engine.lines[current_line] || '')[0...source_range.end_pos.offset]).to_s end source end
[ "def", "source_from_range", "(", "source_range", ")", "# rubocop:disable Metrics/AbcSize", "current_line", "=", "source_range", ".", "start_pos", ".", "line", "-", "1", "last_line", "=", "source_range", ".", "end_pos", ".", "line", "-", "1", "start_pos", "=", "sou...
Extracts the original source code given a range. @param source_range [Sass::Source::Range] @return [String] the original source code
[ "Extracts", "the", "original", "source", "code", "given", "a", "range", "." ]
e99afe4ede041a431a06e585c12ce82f6ad50116
https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter.rb#L89-L112
train
Returns the source code from the given source range.
[ 30522, 13366, 3120, 1035, 2013, 1035, 2846, 1006, 3120, 1035, 2846, 1007, 1001, 14548, 24163, 2361, 1024, 4487, 19150, 12046, 2015, 1013, 5925, 5332, 4371, 2783, 1035, 2240, 1027, 3120, 1035, 2846, 1012, 2707, 1035, 13433, 2015, 1012, 2240,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/module_tool/checksums.rb
Puppet::ModuleTool.Checksums.data
def data unless @data @data = {} @path.find do |descendant| if Puppet::ModuleTool.artifact?(descendant) Find.prune elsif descendant.file? path = descendant.relative_path_from(@path) @data[path.to_s] = checksum(descendant) end end end return @data end
ruby
def data unless @data @data = {} @path.find do |descendant| if Puppet::ModuleTool.artifact?(descendant) Find.prune elsif descendant.file? path = descendant.relative_path_from(@path) @data[path.to_s] = checksum(descendant) end end end return @data end
[ "def", "data", "unless", "@data", "@data", "=", "{", "}", "@path", ".", "find", "do", "|", "descendant", "|", "if", "Puppet", "::", "ModuleTool", ".", "artifact?", "(", "descendant", ")", "Find", ".", "prune", "elsif", "descendant", ".", "file?", "path",...
Return checksums for object's +Pathname+, generate if it's needed. Result is a hash of path strings to checksum strings.
[ "Return", "checksums", "for", "object", "s", "+", "Pathname", "+", "generate", "if", "it", "s", "needed", ".", "Result", "is", "a", "hash", "of", "path", "strings", "to", "checksum", "strings", "." ]
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/module_tool/checksums.rb#L26-L39
train
Get the data of the artifact
[ 30522, 13366, 2951, 4983, 1030, 2951, 1030, 2951, 1027, 1063, 1065, 1030, 4130, 1012, 2424, 2079, 1064, 12608, 1064, 2065, 13997, 1024, 1024, 11336, 3406, 4747, 1012, 20785, 1029, 1006, 12608, 1007, 2424, 1012, 10975, 9816, 3449, 5332, 2546...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb
Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.list_at_resource_level
def list_at_resource_level(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil) first_page = list_at_resource_level_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_at_resource_level(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil) first_page = list_at_resource_level_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_at_resource_level", "(", "resource_group_name", ",", "resource_provider_namespace", ",", "parent_resource_path", ",", "resource_type", ",", "resource_name", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_at_resou...
Gets all the management locks of a resource or any level below resource. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param resource_provider_namespace [String] Resource identity. @param parent_resource_path [String] Resource identity. @param resource_type [String] Resource identity. @param resource_name [String] Resource identity. @param filter [String] The filter to apply on the operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<ManagementLockObject>] operation results.
[ "Gets", "all", "the", "management", "locks", "of", "a", "resource", "or", "any", "level", "below", "resource", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L942-L945
train
Gets all the advisors in a resource group.
[ 30522, 13366, 2862, 1035, 2012, 1035, 7692, 1035, 2504, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 10802, 1035, 3415, 15327, 1010, 6687, 1035, 7692, 1035, 4130, 1010, 7692, 1035, 2828, 1010, 7692, 1035, 2171, 1010, 11307, 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_graph_rbac/lib/1.6/generated/azure_graph_rbac/groups.rb
Azure::GraphRbac::V1_6.Groups.add_member
def add_member(group_object_id, parameters, custom_headers:nil) response = add_member_async(group_object_id, parameters, custom_headers:custom_headers).value! nil end
ruby
def add_member(group_object_id, parameters, custom_headers:nil) response = add_member_async(group_object_id, parameters, custom_headers:custom_headers).value! nil end
[ "def", "add_member", "(", "group_object_id", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "add_member_async", "(", "group_object_id", ",", "parameters", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", "end" ]
Add a member to a group. @param group_object_id [String] The object ID of the group to which to add the member. @param parameters [GroupAddMemberParameters] The URL of the member object, such as https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Add", "a", "member", "to", "a", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_graph_rbac/lib/1.6/generated/azure_graph_rbac/groups.rb#L221-L224
train
Add a member to a group object.
[ 30522, 13366, 5587, 1035, 2266, 1006, 2177, 1035, 4874, 1035, 8909, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 5587, 1035, 2266, 1035, 2004, 6038, 2278, 1006, 2177, 1035, 4874, 1035, 8909, 1010, 11709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_cdn/lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb
Azure::CDN::Mgmt::V2015_06_01.Endpoints.begin_delete_if_exists_with_http_info
def begin_delete_if_exists_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers:nil) begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value! end
ruby
def begin_delete_if_exists_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers:nil) begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value! end
[ "def", "begin_delete_if_exists_with_http_info", "(", "endpoint_name", ",", "profile_name", ",", "resource_group_name", ",", "custom_headers", ":", "nil", ")", "begin_delete_if_exists_async", "(", "endpoint_name", ",", "profile_name", ",", "resource_group_name", ",", "custom...
Deletes an existing CDN endpoint with the specified parameters. @param endpoint_name [String] Name of the endpoint within the CDN profile. @param profile_name [String] Name of the CDN profile within the resource group. @param resource_group_name [String] Name of the resource group within the Azure subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Deletes", "an", "existing", "CDN", "endpoint", "with", "the", "specified", "parameters", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb#L980-L982
train
Deletes an endpoint.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1035, 2065, 1035, 6526, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2203, 8400, 1035, 2171, 1010, 6337, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
roo-rb/roo
lib/roo/excelx.rb
Roo.Excelx.excelx_format
def excelx_format(row, col, sheet = nil) key = normalize(row, col) sheet_for(sheet).excelx_format(key) end
ruby
def excelx_format(row, col, sheet = nil) key = normalize(row, col) sheet_for(sheet).excelx_format(key) end
[ "def", "excelx_format", "(", "row", ",", "col", ",", "sheet", "=", "nil", ")", "key", "=", "normalize", "(", "row", ",", "col", ")", "sheet_for", "(", "sheet", ")", ".", "excelx_format", "(", "key", ")", "end" ]
returns the internal format of an excel cell
[ "returns", "the", "internal", "format", "of", "an", "excel", "cell" ]
4ec1104f0c3c2a29711c0c907371cd2be12bcc3c
https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/excelx.rb#L226-L229
train
Format a cell in an Excel file.
[ 30522, 13366, 24970, 2595, 1035, 4289, 1006, 5216, 1010, 8902, 1010, 7123, 1027, 9152, 2140, 1007, 3145, 1027, 3671, 4697, 1006, 5216, 1010, 8902, 1007, 7123, 1035, 2005, 1006, 7123, 1007, 1012, 24970, 2595, 1035, 4289, 1006, 3145, 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_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb
Azure::PolicyInsights::Mgmt::V2018_04_04.PolicyStates.summarize_for_subscription
def summarize_for_subscription(subscription_id, query_options:nil, custom_headers:nil) response = summarize_for_subscription_async(subscription_id, query_options:query_options, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def summarize_for_subscription(subscription_id, query_options:nil, custom_headers:nil) response = summarize_for_subscription_async(subscription_id, query_options:query_options, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "summarize_for_subscription", "(", "subscription_id", ",", "query_options", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "summarize_for_subscription_async", "(", "subscription_id", ",", "query_options", ":query_options", ",", "custom_headers...
Summarizes policy states for the resources under the subscription. @param subscription_id [String] Microsoft Azure subscription ID. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [SummarizeResults] operation results.
[ "Summarizes", "policy", "states", "for", "the", "resources", "under", "the", "subscription", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb#L405-L408
train
Gets the number of documents that are available for a subscription.
[ 30522, 13366, 7680, 7849, 4697, 1035, 2005, 1035, 15002, 1006, 15002, 1035, 8909, 1010, 23032, 1035, 7047, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 7680, 7849, 4697, 1035, 2005, 1035, 15002, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_circuits.rb
Azure::Network::Mgmt::V2019_02_01.ExpressRouteCircuits.begin_update_tags_with_http_info
def begin_update_tags_with_http_info(resource_group_name, circuit_name, parameters, custom_headers:nil) begin_update_tags_async(resource_group_name, circuit_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_update_tags_with_http_info(resource_group_name, circuit_name, parameters, custom_headers:nil) begin_update_tags_async(resource_group_name, circuit_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_update_tags_with_http_info", "(", "resource_group_name", ",", "circuit_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_update_tags_async", "(", "resource_group_name", ",", "circuit_name", ",", "parameters", ",", "custom_headers", ":c...
Updates an express route circuit tags. @param resource_group_name [String] The name of the resource group. @param circuit_name [String] The name of the circuit. @param parameters [TagsObject] Parameters supplied to update express route circuit 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", "an", "express", "route", "circuit", "tags", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_circuits.rb#L973-L975
train
Updates the tags of the specified express route circuit.
[ 30522, 13366, 4088, 1035, 10651, 1035, 22073, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4984, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, 1035, 10651, 1035, 2207...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
toptal/chewy
lib/chewy/query.rb
Chewy.Query.filter
def filter(params = nil, &block) params = Filters.new(&block).__render__ if block chain { criteria.update_filters params } end
ruby
def filter(params = nil, &block) params = Filters.new(&block).__render__ if block chain { criteria.update_filters params } end
[ "def", "filter", "(", "params", "=", "nil", ",", "&", "block", ")", "params", "=", "Filters", ".", "new", "(", "block", ")", ".", "__render__", "if", "block", "chain", "{", "criteria", ".", "update_filters", "params", "}", "end" ]
Adds one or more filter to the search request Internally filters are stored as an array While the full query compilation this array compiles according to `:filter_mode` option value By default it joins inside `and` filter See `#filter_mode` chainable method for more info. Also this method supports block DSL. See `Chewy::Query::Filters` for more info. @example UsersIndex.filter(term: {name: 'Johny'}).filter(range: {age: {lte: 42}}) UsersIndex::User.filter(term: {name: 'Johny'}).filter(range: {age: {lte: 42}}) UsersIndex.filter{ name == 'Johny' }.filter{ age <= 42 } # => {body: {query: {filtered: { query: {...}, filter: {and: [{term: {name: 'Johny'}}, {range: {age: {lte: 42}}}]} }}}} If only one filter was specified, it will become a result filter as is, without joining. @example UsersIndex.filter(term: {name: 'Johny'}) # => {body: {query: {filtered: { query: {...}, filter: {term: {name: 'Johny'}} }}}}
[ "Adds", "one", "or", "more", "filter", "to", "the", "search", "request", "Internally", "filters", "are", "stored", "as", "an", "array", "While", "the", "full", "query", "compilation", "this", "array", "compiles", "according", "to", ":", "filter_mode", "option"...
cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b
https://github.com/toptal/chewy/blob/cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b/lib/chewy/query.rb#L727-L730
train
Update the filters
[ 30522, 13366, 11307, 1006, 11498, 5244, 1027, 9152, 2140, 1010, 1004, 3796, 1007, 11498, 5244, 1027, 17736, 1012, 2047, 1006, 1004, 3796, 1007, 1012, 1035, 1035, 17552, 1035, 1035, 2065, 3796, 4677, 1063, 9181, 1012, 10651, 1035, 17736, 114...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_batch/lib/2015-12-01/generated/azure_mgmt_batch/application_package_operations.rb
Azure::Batch::Mgmt::V2015_12_01.ApplicationPackageOperations.activate_with_http_info
def activate_with_http_info(resource_group_name, account_name, application_id, version, parameters, custom_headers:nil) activate_async(resource_group_name, account_name, application_id, version, parameters, custom_headers:custom_headers).value! end
ruby
def activate_with_http_info(resource_group_name, account_name, application_id, version, parameters, custom_headers:nil) activate_async(resource_group_name, account_name, application_id, version, parameters, custom_headers:custom_headers).value! end
[ "def", "activate_with_http_info", "(", "resource_group_name", ",", "account_name", ",", "application_id", ",", "version", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "activate_async", "(", "resource_group_name", ",", "account_name", ",", "application_id",...
Activates the specified application package. @param resource_group_name [String] The name of the resource group that contains the Batch account. @param account_name [String] The name of the Batch account. @param application_id [String] The ID of the application. @param version [String] The version of the application to activate. @param parameters [ActivateApplicationPackageParameters] The parameters for the request. @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.
[ "Activates", "the", "specified", "application", "package", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2015-12-01/generated/azure_mgmt_batch/application_package_operations.rb#L58-L60
train
Activate an application.
[ 30522, 13366, 20544, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 4646, 1035, 8909, 1010, 2544, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 20544, 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_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb
Azure::Compute::Mgmt::V2019_03_01.VirtualMachineScaleSetExtensions.begin_create_or_update
def begin_create_or_update(resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_create_or_update(resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_create_or_update", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vmss_extension_name", ",", "extension_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_create_or_update_async", "(", "resource_group_name", ",", "vm_scal...
The operation to create or update an extension. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set where the extension should be create or updated. @param vmss_extension_name [String] The name of the VM scale set extension. @param extension_parameters [VirtualMachineScaleSetExtension] Parameters supplied to the Create VM scale set Extension operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [VirtualMachineScaleSetExtension] operation results.
[ "The", "operation", "to", "create", "or", "update", "an", "extension", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb#L327-L330
train
Creates or updates an extension.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 1058, 5244, 2015, 1035, 5331, 30524, 10651, 1035, 2004, 6038, 2278, 1006, 7692, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb
Azure::Links::Mgmt::V2016_09_01.ResourceLinks.list_at_subscription
def list_at_subscription(filter:nil, custom_headers:nil) first_page = list_at_subscription_as_lazy(filter:filter, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_at_subscription(filter:nil, custom_headers:nil) first_page = list_at_subscription_as_lazy(filter:filter, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_at_subscription", "(", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_at_subscription_as_lazy", "(", "filter", ":", "filter", ",", "custom_headers", ":custom_headers", ")", "first_page", ".", "get_all_items", "end...
Gets all the linked resources for the subscription. @param filter [String] The filter to apply on the list resource links operation. The supported filter for list resource links is targetid. For example, $filter=targetid eq {value} @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<ResourceLink>] operation results.
[ "Gets", "all", "the", "linked", "resources", "for", "the", "subscription", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb#L344-L347
train
Gets all the available product terms.
[ 30522, 13366, 2862, 1035, 2012, 1035, 15002, 1006, 11307, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 2012, 1035, 15002, 1035, 2004, 1035, 13971, 1006, 11307, 1024, 11307, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb
Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.delete_at_subscription
def delete_at_subscription(remediation_name, custom_headers:nil) response = delete_at_subscription_async(remediation_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def delete_at_subscription(remediation_name, custom_headers:nil) response = delete_at_subscription_async(remediation_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "delete_at_subscription", "(", "remediation_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_at_subscription_async", "(", "remediation_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", ...
Deletes an existing remediation at subscription scope. @param remediation_name [String] The name of the remediation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Remediation] operation results.
[ "Deletes", "an", "existing", "remediation", "at", "subscription", "scope", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L1095-L1098
train
Deletes a remediation at subscription scope.
[ 30522, 13366, 3972, 12870, 1035, 2012, 1035, 15002, 1006, 2128, 16969, 3508, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2012, 1035, 15002, 1035, 2004, 6038, 2278, 1006, 2128, 16969, 350...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/filters.rb
Jekyll.Filters.compare_property_vs_target
def compare_property_vs_target(property, target) case target when NilClass return true if property.nil? when Liquid::Expression::MethodLiteral # `empty` or `blank` return true if Array(property).join == target.to_s else Array(property).each do |prop| return true if prop.to_s == target.to_s end end false end
ruby
def compare_property_vs_target(property, target) case target when NilClass return true if property.nil? when Liquid::Expression::MethodLiteral # `empty` or `blank` return true if Array(property).join == target.to_s else Array(property).each do |prop| return true if prop.to_s == target.to_s end end false end
[ "def", "compare_property_vs_target", "(", "property", ",", "target", ")", "case", "target", "when", "NilClass", "return", "true", "if", "property", ".", "nil?", "when", "Liquid", "::", "Expression", "::", "MethodLiteral", "# `empty` or `blank`", "return", "true", ...
`where` filter helper
[ "where", "filter", "helper" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/filters.rb#L329-L342
train
Compare the property and target
[ 30522, 13366, 12826, 1035, 3200, 1035, 5443, 1035, 4539, 1006, 3200, 1010, 4539, 1007, 2553, 4539, 2043, 9152, 15472, 27102, 2709, 2995, 2065, 3200, 1012, 9152, 2140, 1029, 2043, 6381, 1024, 1024, 3670, 1024, 1024, 4118, 22779, 7941, 1001, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb
Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.list_by_subscription_id
def list_by_subscription_id(skiptoken:nil, custom_headers:nil) first_page = list_by_subscription_id_as_lazy(skiptoken:skiptoken, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_by_subscription_id(skiptoken:nil, custom_headers:nil) first_page = list_by_subscription_id_as_lazy(skiptoken:skiptoken, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_by_subscription_id", "(", "skiptoken", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_by_subscription_id_as_lazy", "(", "skiptoken", ":", "skiptoken", ",", "custom_headers", ":custom_headers", ")", "first_page", ".", "get_all...
Gets the web services in the specified subscription. @param skiptoken [String] Continuation token for pagination. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<WebService>] operation results.
[ "Gets", "the", "web", "services", "in", "the", "specified", "subscription", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L531-L534
train
Gets all the vulnerability assessment terms.
[ 30522, 13366, 2862, 1035, 2011, 1035, 15002, 1035, 8909, 1006, 13558, 18715, 2368, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 2011, 1035, 15002, 1035, 8909, 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/plugin_manager.rb
Jekyll.PluginManager.require_theme_deps
def require_theme_deps return false unless site.theme.runtime_dependencies site.theme.runtime_dependencies.each do |dep| next if dep.name == "jekyll" External.require_with_graceful_fail(dep.name) if plugin_allowed?(dep.name) end end
ruby
def require_theme_deps return false unless site.theme.runtime_dependencies site.theme.runtime_dependencies.each do |dep| next if dep.name == "jekyll" External.require_with_graceful_fail(dep.name) if plugin_allowed?(dep.name) end end
[ "def", "require_theme_deps", "return", "false", "unless", "site", ".", "theme", ".", "runtime_dependencies", "site", ".", "theme", ".", "runtime_dependencies", ".", "each", "do", "|", "dep", "|", "next", "if", "dep", ".", "name", "==", "\"jekyll\"", "External"...
Require each of the runtime_dependencies specified by the theme's gemspec. Returns false only if no dependencies have been specified, otherwise nothing.
[ "Require", "each", "of", "the", "runtime_dependencies", "specified", "by", "the", "theme", "s", "gemspec", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/plugin_manager.rb#L38-L46
train
Require all the dependencies of the current theme.
[ 30522, 13366, 5478, 1035, 4323, 1035, 2139, 4523, 2709, 6270, 4983, 2609, 1012, 4323, 1012, 2448, 7292, 1035, 12530, 15266, 2609, 1012, 4323, 1012, 2448, 7292, 1035, 12530, 15266, 1012, 2169, 2079, 1064, 2139, 2361, 1064, 2279, 2065, 2139, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Features.delete_phrase_list_with_http_info
def delete_phrase_list_with_http_info(app_id, version_id, phraselist_id, custom_headers:nil) delete_phrase_list_async(app_id, version_id, phraselist_id, custom_headers:custom_headers).value! end
ruby
def delete_phrase_list_with_http_info(app_id, version_id, phraselist_id, custom_headers:nil) delete_phrase_list_async(app_id, version_id, phraselist_id, custom_headers:custom_headers).value! end
[ "def", "delete_phrase_list_with_http_info", "(", "app_id", ",", "version_id", ",", "phraselist_id", ",", "custom_headers", ":", "nil", ")", "delete_phrase_list_async", "(", "app_id", ",", "version_id", ",", "phraselist_id", ",", "custom_headers", ":custom_headers", ")",...
Deletes a phraselist feature from a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param phraselist_id [Integer] The ID of the feature to be deleted. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Deletes", "a", "phraselist", "feature", "from", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb#L728-L730
train
Deletes the phrase list of a given App Version.
[ 30522, 13366, 3972, 12870, 1035, 7655, 1035, 2862, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 7655, 9863, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3972, 12870, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
httprb/http
lib/http/connection.rb
HTTP.Connection.readpartial
def readpartial(size = BUFFER_SIZE) return unless @pending_response chunk = @parser.read(size) return chunk if chunk finished = (read_more(size) == :eof) || @parser.finished? chunk = @parser.read(size) finish_response if finished chunk.to_s end
ruby
def readpartial(size = BUFFER_SIZE) return unless @pending_response chunk = @parser.read(size) return chunk if chunk finished = (read_more(size) == :eof) || @parser.finished? chunk = @parser.read(size) finish_response if finished chunk.to_s end
[ "def", "readpartial", "(", "size", "=", "BUFFER_SIZE", ")", "return", "unless", "@pending_response", "chunk", "=", "@parser", ".", "read", "(", "size", ")", "return", "chunk", "if", "chunk", "finished", "=", "(", "read_more", "(", "size", ")", "==", ":eof"...
Read a chunk of the body @return [String] data chunk @return [nil] when no more data left
[ "Read", "a", "chunk", "of", "the", "body" ]
f37a10ea4fab3ee411907ea2e4251ddf0ca33a93
https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/connection.rb#L86-L97
train
Read a chunk of data from the response.
[ 30522, 13366, 3191, 19362, 30524, 1064, 1064, 1030, 11968, 8043, 1012, 2736, 1029, 20000, 1027, 1030, 11968, 8043, 1012, 3191, 1006, 2946, 1007, 3926, 1035, 3433, 2065, 2736, 20000, 1012, 2000, 1035, 1055, 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_policy/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_set_definitions.rb
Azure::Policy::Mgmt::V2017_06_01_preview.PolicySetDefinitions.get_built_in
def get_built_in(policy_set_definition_name, custom_headers:nil) response = get_built_in_async(policy_set_definition_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_built_in(policy_set_definition_name, custom_headers:nil) response = get_built_in_async(policy_set_definition_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_built_in", "(", "policy_set_definition_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_built_in_async", "(", "policy_set_definition_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", ...
Gets the built in policy set definition. @param policy_set_definition_name [String] The name of the policy set definition to get. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PolicySetDefinition] operation results.
[ "Gets", "the", "built", "in", "policy", "set", "definition", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_set_definitions.rb#L318-L321
train
Gets the policy set definition built - in.
[ 30522, 13366, 2131, 1035, 2328, 1035, 1999, 1006, 3343, 1035, 2275, 1035, 6210, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 2328, 1035, 1999, 1035, 2004, 6038, 2278, 1006, 3343, 1035, 2275, 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_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb
Azure::Web::Mgmt::V2016_03_01.WebSiteManagementClient.move
def move(resource_group_name, move_resource_envelope, custom_headers:nil) response = move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value! nil end
ruby
def move(resource_group_name, move_resource_envelope, custom_headers:nil) response = move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value! nil end
[ "def", "move", "(", "resource_group_name", ",", "move_resource_envelope", ",", "custom_headers", ":", "nil", ")", "response", "=", "move_async", "(", "resource_group_name", ",", "move_resource_envelope", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "n...
Move resources between resource groups. Move resources between resource groups. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param move_resource_envelope [CsmMoveResourceEnvelope] Object that represents the resource to move. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Move", "resources", "between", "resource", "groups", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb#L1337-L1340
train
Moves a resource to an existing group.
[ 30522, 13366, 2693, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2693, 1035, 7692, 1035, 11255, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2693, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2693, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.authorize_egress
def authorize_egress(options = {}) options = options.merge(group_id: @id) resp = @client.authorize_security_group_egress(options) resp.data end
ruby
def authorize_egress(options = {}) options = options.merge(group_id: @id) resp = @client.authorize_security_group_egress(options) resp.data end
[ "def", "authorize_egress", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "group_id", ":", "@id", ")", "resp", "=", "@client", ".", "authorize_security_group_egress", "(", "options", ")", "resp", ".", "data", "end" ]
@!group Actions @example Request syntax with placeholder values security_group.authorize_egress({ dry_run: false, ip_permissions: [ { from_port: 1, ip_protocol: "String", ip_ranges: [ { cidr_ip: "String", description: "String", }, ], ipv_6_ranges: [ { cidr_ipv_6: "String", description: "String", }, ], prefix_list_ids: [ { description: "String", prefix_list_id: "String", }, ], to_port: 1, user_id_group_pairs: [ { description: "String", group_id: "String", group_name: "String", peering_status: "String", user_id: "String", vpc_id: "String", vpc_peering_connection_id: "String", }, ], }, ], cidr_ip: "String", from_port: 1, ip_protocol: "String", to_port: 1, source_security_group_name: "String", source_security_group_owner_id: "String", }) @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`. @option options [Array<Types::IpPermission>] :ip_permissions The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions. @option options [String] :cidr_ip Not supported. Use a set of IP permissions to specify the CIDR. @option options [Integer] :from_port Not supported. Use a set of IP permissions to specify the port. @option options [String] :ip_protocol Not supported. Use a set of IP permissions to specify the protocol name or number. @option options [Integer] :to_port Not supported. Use a set of IP permissions to specify the port. @option options [String] :source_security_group_name Not supported. Use a set of IP permissions to specify a destination security group. @option options [String] :source_security_group_owner_id Not supported. Use a set of IP permissions to specify a destination security group. @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/security_group.rb#L280-L284
train
Authorize Egress security group
[ 30522, 13366, 3166, 4697, 1035, 1041, 17603, 4757, 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, 3166, 4697, 1035, 3036, 1035, 2177, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
floere/phony
lib/phony/country_codes.rb
Phony.CountryCodes.vanity?
def vanity? number country, _, national = partial_split number country.vanity? national end
ruby
def vanity? number country, _, national = partial_split number country.vanity? national end
[ "def", "vanity?", "number", "country", ",", "_", ",", "national", "=", "partial_split", "number", "country", ".", "vanity?", "national", "end" ]
Is the given number a vanity number?
[ "Is", "the", "given", "number", "a", "vanity", "number?" ]
9ca50743499cf478a25fdb927bcdacd29d2c90c7
https://github.com/floere/phony/blob/9ca50743499cf478a25fdb927bcdacd29d2c90c7/lib/phony/country_codes.rb#L118-L121
train
Returns true if the number is a vanity number.
[ 30522, 13366, 18736, 1029, 2193, 2406, 1010, 1035, 1010, 2120, 1027, 7704, 1035, 3975, 2193, 2406, 1012, 18736, 1029, 2120, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb
Azure::SQL::Mgmt::V2014_04_01.Databases.get_by_recommended_elastic_pool
def get_by_recommended_elastic_pool(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:nil) response = get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_by_recommended_elastic_pool(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:nil) response = get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_by_recommended_elastic_pool", "(", "resource_group_name", ",", "server_name", ",", "recommended_elastic_pool_name", ",", "database_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_by_recommended_elastic_pool_async", "(", "resource_group_name", ...
Gets a database inside of a recommended elastic pool. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server. @param recommended_elastic_pool_name [String] The name of the elastic pool to be retrieved. @param database_name [String] The name of the database to be retrieved. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Database] operation results.
[ "Gets", "a", "database", "inside", "of", "a", "recommended", "elastic", "pool", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb#L765-L768
train
Gets the elastic pool information for a database.
[ 30522, 13366, 2131, 1035, 2011, 1035, 6749, 1035, 21274, 1035, 4770, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 6749, 1035, 21274, 1035, 4770, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
coinbase/geoengineer
lib/geoengineer/resources/aws/api_gateway/helpers.rb
GeoEngineer::ApiGatewayHelpers.ClassMethods._fetch_remote_rest_api_resources_for_rest_api
def _fetch_remote_rest_api_resources_for_rest_api(provider, rr) cache = GeoEngineer::ApiGatewayHelpers._rest_api_resource_cache[provider] ||= {} return cache[rr[:_terraform_id]] if cache[rr[:_terraform_id]] cache[rr[:_terraform_id]] = __fetch_remote_rest_api_resources_for_rest_api(provider, rr) end
ruby
def _fetch_remote_rest_api_resources_for_rest_api(provider, rr) cache = GeoEngineer::ApiGatewayHelpers._rest_api_resource_cache[provider] ||= {} return cache[rr[:_terraform_id]] if cache[rr[:_terraform_id]] cache[rr[:_terraform_id]] = __fetch_remote_rest_api_resources_for_rest_api(provider, rr) end
[ "def", "_fetch_remote_rest_api_resources_for_rest_api", "(", "provider", ",", "rr", ")", "cache", "=", "GeoEngineer", "::", "ApiGatewayHelpers", ".", "_rest_api_resource_cache", "[", "provider", "]", "||=", "{", "}", "return", "cache", "[", "rr", "[", ":_terraform_i...
Resources
[ "Resources" ]
d26f8850a492ddb3d27e78b25d1313cf593df5a9
https://github.com/coinbase/geoengineer/blob/d26f8850a492ddb3d27e78b25d1313cf593df5a9/lib/geoengineer/resources/aws/api_gateway/helpers.rb#L64-L69
train
Fetch remote REST API resources for the specified REST API
[ 30522, 13366, 1035, 18584, 1035, 6556, 1035, 2717, 1035, 17928, 1035, 4219, 1035, 2005, 1035, 2717, 1035, 17928, 1006, 10802, 1010, 25269, 1007, 17053, 1027, 20248, 13159, 3170, 2121, 1024, 1024, 17928, 5867, 4576, 16001, 7347, 1012, 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...
piotrmurach/github
lib/github_api/api.rb
Github.API.filter_callbacks
def filter_callbacks(kind, action_name) self.class.send("#{kind}_callbacks").select do |callback| callback[:only].nil? || callback[:only].include?(action_name) end end
ruby
def filter_callbacks(kind, action_name) self.class.send("#{kind}_callbacks").select do |callback| callback[:only].nil? || callback[:only].include?(action_name) end end
[ "def", "filter_callbacks", "(", "kind", ",", "action_name", ")", "self", ".", "class", ".", "send", "(", "\"#{kind}_callbacks\"", ")", ".", "select", "do", "|", "callback", "|", "callback", "[", ":only", "]", ".", "nil?", "||", "callback", "[", ":only", ...
Filter callbacks based on kind @param [Symbol] kind one of :before or :after @return [Array[Hash]] @api private
[ "Filter", "callbacks", "based", "on", "kind" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/api.rb#L224-L228
train
Filter the callbacks that are associated with the given action
[ 30522, 13366, 11307, 1035, 2655, 12221, 1006, 2785, 1010, 2895, 1035, 2171, 1007, 2969, 1012, 2465, 1012, 4604, 1006, 1000, 1001, 1063, 2785, 1065, 1035, 2655, 12221, 1000, 1007, 1012, 7276, 2079, 1064, 2655, 5963, 1064, 2655, 5963, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_postgresql/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/configurations.rb
Azure::Postgresql::Mgmt::V2017_12_01_preview.Configurations.create_or_update_async
def create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Postgresql::Mgmt::V2017_12_01_preview::Models::Configuration.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Postgresql::Mgmt::V2017_12_01_preview::Models::Configuration.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "create_or_update_async", "(", "resource_group_name", ",", "server_name", ",", "configuration_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_create_or_update_async", "(", "resource_group_name", ",", "serve...
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server. @param configuration_name [String] The name of the server configuration. @param parameters [Configuration] The required parameters for updating a server configuration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", "that", "contains", "the", "resource", ".", "You", "can", "obtain", "this", "value", "from", "the", "Azure", "Resource", "Manager", "API", "or", "the", "por...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_postgresql/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/configurations.rb#L61-L77
train
Creates or updates a configuration.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 9563, 1035, 30524, 2171, 1010, 8241, 1035, 2171, 1010, 9563, 1035, 2171, 1010, 11709, 1010, 7661, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb
Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_usages
def list_usages(resource_group_name, name, filter:nil, custom_headers:nil) first_page = list_usages_as_lazy(resource_group_name, name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_usages(resource_group_name, name, filter:nil, custom_headers:nil) first_page = list_usages_as_lazy(resource_group_name, name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_usages", "(", "resource_group_name", ",", "name", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_usages_as_lazy", "(", "resource_group_name", ",", "name", ",", "filter", ":", "filter", ",", "custom_header...
Get global usage metrics of an App Service Environment. Get global usage metrics of an App Service Environment. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param filter [String] Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<CsmUsageQuota>] operation results.
[ "Get", "global", "usage", "metrics", "of", "an", "App", "Service", "Environment", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L2931-L2934
train
Gets all the usages of a virtual machine.
[ 30522, 13366, 2862, 1035, 8192, 2015, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 11307, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 8192, 2015, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb
Azure::StreamAnalytics::Mgmt::V2016_03_01.Outputs.update
def update(output, resource_group_name, job_name, output_name, if_match:nil, custom_headers:nil) response = update_async(output, resource_group_name, job_name, output_name, if_match:if_match, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update(output, resource_group_name, job_name, output_name, if_match:nil, custom_headers:nil) response = update_async(output, resource_group_name, job_name, output_name, if_match:if_match, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update", "(", "output", ",", "resource_group_name", ",", "job_name", ",", "output_name", ",", "if_match", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_async", "(", "output", ",", "resource_group_name", ",", "job_name", "...
Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. @param output [Output] An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param if_match [String] The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Output] operation results.
[ "Updates", "an", "existing", "output", "under", "an", "existing", "streaming", "job", ".", "This", "can", "be", "used", "to", "partially", "update", "(", "ie", ".", "update", "one", "or", "two", "properties", ")", "an", "output", "without", "affecting", "t...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb#L196-L199
train
Updates an existing output.
[ 30522, 13366, 10651, 1006, 6434, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3105, 1035, 2171, 1010, 6434, 1035, 2171, 1010, 2065, 1035, 2674, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term_lists.rb
Azure::CognitiveServices::ContentModerator::V1_0.ListManagementTermLists.update_with_http_info
def update_with_http_info(list_id, content_type, body, custom_headers:nil) update_async(list_id, content_type, body, custom_headers:custom_headers).value! end
ruby
def update_with_http_info(list_id, content_type, body, custom_headers:nil) update_async(list_id, content_type, body, custom_headers:custom_headers).value! end
[ "def", "update_with_http_info", "(", "list_id", ",", "content_type", ",", "body", ",", "custom_headers", ":", "nil", ")", "update_async", "(", "list_id", ",", "content_type", ",", "body", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "end" ]
Updates an Term List. @param list_id [String] List Id of the image list. @param content_type [String] The content type. @param body [Body] Schema of the body. @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", "an", "Term", "List", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term_lists.rb#L245-L247
train
Updates a list s list specification.
[ 30522, 13366, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2862, 1035, 8909, 1010, 4180, 1035, 2828, 1010, 2303, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10651, 1035, 2004, 6038, 2278, 1006, 2862, 1035, 8909, 1010, 4180, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face_list_operations.rb
Azure::CognitiveServices::Face::V1_0.FaceListOperations.get_with_http_info
def get_with_http_info(face_list_id, return_recognition_model:false, custom_headers:nil) get_async(face_list_id, return_recognition_model:return_recognition_model, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(face_list_id, return_recognition_model:false, custom_headers:nil) get_async(face_list_id, return_recognition_model:return_recognition_model, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "face_list_id", ",", "return_recognition_model", ":", "false", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "face_list_id", ",", "return_recognition_model", ":return_recognition_model", ",", "custom_headers", ":custom_headers",...
Retrieve a face list’s faceListId, name, userData, recognitionModel and faces in the face list. @param face_list_id [String] Id referencing a particular face list. @param return_recognition_model [Boolean] A value indicating whether the operation should return 'recognitionModel' in response. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Retrieve", "a", "face", "list’s", "faceListId", "name", "userData", "recognitionModel", "and", "faces", "in", "the", "face", "list", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face_list_operations.rb#L247-L249
train
Gets the specified face list s segmentation.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2227, 1035, 2862, 1035, 8909, 1010, 2709, 1035, 5038, 1035, 2944, 1024, 6270, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 2004, 6038, 2278, 1006, 2227, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.create_compose_deployment_with_http_info
def create_compose_deployment_with_http_info(create_compose_deployment_description, timeout:60, custom_headers:nil) create_compose_deployment_async(create_compose_deployment_description, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def create_compose_deployment_with_http_info(create_compose_deployment_description, timeout:60, custom_headers:nil) create_compose_deployment_async(create_compose_deployment_description, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "create_compose_deployment_with_http_info", "(", "create_compose_deployment_description", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "create_compose_deployment_async", "(", "create_compose_deployment_description", ",", "timeout", ":", "timeout", ...
Creates a Service Fabric compose deployment. Compose is a file format that describes multi-container applications. This API allows deploying container based applications defined in compose format in a Service Fabric cluster. Once the deployment is created it's status can be tracked via `GetComposeDeploymentStatus` API. @param create_compose_deployment_description [CreateComposeDeploymentDescription] Describes the compose deployment that needs to be created. @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.
[ "Creates", "a", "Service", "Fabric", "compose", "deployment", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L17736-L17738
train
Creates a new Compose Deployment.
[ 30522, 13366, 3443, 1035, 17202, 1035, 10813, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 3443, 1035, 17202, 1035, 10813, 1035, 6412, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3443, 1035, 17202, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-glacier/lib/aws-sdk-glacier/archive.rb
Aws::Glacier.Archive.initiate_archive_retrieval
def initiate_archive_retrieval(options = {}) options = Aws::Util.deep_merge(options, vault_name: @vault_name, account_id: @account_id, job_parameters: { type: "archive-retrieval", archive_id: @id } ) resp = @client.initiate_job(options) Job.new( id: resp.data.job_id, account_id: @account_id, vault_name: @vault_name, client: @client ) end
ruby
def initiate_archive_retrieval(options = {}) options = Aws::Util.deep_merge(options, vault_name: @vault_name, account_id: @account_id, job_parameters: { type: "archive-retrieval", archive_id: @id } ) resp = @client.initiate_job(options) Job.new( id: resp.data.job_id, account_id: @account_id, vault_name: @vault_name, client: @client ) end
[ "def", "initiate_archive_retrieval", "(", "options", "=", "{", "}", ")", "options", "=", "Aws", "::", "Util", ".", "deep_merge", "(", "options", ",", "vault_name", ":", "@vault_name", ",", "account_id", ":", "@account_id", ",", "job_parameters", ":", "{", "t...
@example Request syntax with placeholder values archive.initiate_archive_retrieval() @param [Hash] options ({}) @return [Job]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-glacier/lib/aws-sdk-glacier/archive.rb#L194-L210
train
Initiate an archive - retrieval job
[ 30522, 13366, 17820, 1035, 8756, 1035, 30524, 1030, 11632, 1035, 2171, 1010, 4070, 1035, 8909, 1024, 1030, 4070, 1035, 8909, 1010, 3105, 1035, 11709, 1024, 1063, 2828, 1024, 1000, 8756, 1011, 26384, 1000, 1010, 8756, 1035, 8909, 1024, 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...
hashicorp/vault-ruby
lib/vault/persistent.rb
Vault.PersistentHTTP.request
def request uri, req = nil, &block retried = false bad_response = false uri = URI uri req = request_setup req || uri response = nil connection_for uri do |connection| http = connection.http begin connection.requests += 1 response = http.request req, &block if req.connection_close? or (response.http_version <= '1.0' and not response.connection_keep_alive?) or response.connection_close? then finish connection end rescue Net::HTTPBadResponse => e message = error_message connection finish connection raise Error, "too many bad responses #{message}" if bad_response or not can_retry? req bad_response = true retry rescue *RETRIED_EXCEPTIONS => e request_failed e, req, connection if retried or not can_retry? req reset connection retried = true retry rescue Errno::EINVAL, Errno::ETIMEDOUT => e # not retried on ruby 2 request_failed e, req, connection if retried or not can_retry? req reset connection retried = true retry rescue Exception => e finish connection raise ensure connection.last_use = Time.now end end @http_versions["#{uri.host}:#{uri.port}"] ||= response.http_version response end
ruby
def request uri, req = nil, &block retried = false bad_response = false uri = URI uri req = request_setup req || uri response = nil connection_for uri do |connection| http = connection.http begin connection.requests += 1 response = http.request req, &block if req.connection_close? or (response.http_version <= '1.0' and not response.connection_keep_alive?) or response.connection_close? then finish connection end rescue Net::HTTPBadResponse => e message = error_message connection finish connection raise Error, "too many bad responses #{message}" if bad_response or not can_retry? req bad_response = true retry rescue *RETRIED_EXCEPTIONS => e request_failed e, req, connection if retried or not can_retry? req reset connection retried = true retry rescue Errno::EINVAL, Errno::ETIMEDOUT => e # not retried on ruby 2 request_failed e, req, connection if retried or not can_retry? req reset connection retried = true retry rescue Exception => e finish connection raise ensure connection.last_use = Time.now end end @http_versions["#{uri.host}:#{uri.port}"] ||= response.http_version response end
[ "def", "request", "uri", ",", "req", "=", "nil", ",", "&", "block", "retried", "=", "false", "bad_response", "=", "false", "uri", "=", "URI", "uri", "req", "=", "request_setup", "req", "||", "uri", "response", "=", "nil", "connection_for", "uri", "do", ...
Makes a request on +uri+. If +req+ is nil a Net::HTTP::Get is performed against +uri+. If a block is passed #request behaves like Net::HTTP#request (the body of the response will not have been read). +req+ must be a Net::HTTPRequest subclass (see Net::HTTP for a list). If there is an error and the request is idempotent according to RFC 2616 it will be retried automatically.
[ "Makes", "a", "request", "on", "+", "uri", "+", ".", "If", "+", "req", "+", "is", "nil", "a", "Net", "::", "HTTP", "::", "Get", "is", "performed", "against", "+", "uri", "+", "." ]
02f0532a802ba1a2a0d8703a4585dab76eb9d864
https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/persistent.rb#L925-L984
train
Request a request to the server
[ 30522, 13366, 5227, 24471, 2072, 1010, 2128, 4160, 1027, 9152, 2140, 1010, 1004, 3796, 2128, 18886, 2098, 1027, 6270, 2919, 1035, 3433, 1027, 6270, 24471, 2072, 1027, 24471, 2072, 24471, 2072, 2128, 4160, 1027, 5227, 1035, 16437, 2128, 4160...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/route_filters.rb
Azure::Network::Mgmt::V2018_07_01.RouteFilters.begin_update
def begin_update(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:nil) response = begin_update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_update(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:nil) response = begin_update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_update", "(", "resource_group_name", ",", "route_filter_name", ",", "route_filter_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_update_async", "(", "resource_group_name", ",", "route_filter_name", ",", "route_filter_parameters", ...
Updates a route filter in a specified resource group. @param resource_group_name [String] The name of the resource group. @param route_filter_name [String] The name of the route filter. @param route_filter_parameters [PatchRouteFilter] Parameters supplied to the update route filter operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [RouteFilter] operation results.
[ "Updates", "a", "route", "filter", "in", "a", "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/route_filters.rb#L633-L636
train
Updates a route filter.
[ 30522, 13366, 4088, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2799, 1035, 11307, 1035, 2171, 1010, 2799, 1035, 11307, 1035, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 10651, 1035, 2004...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_partition_event_list_with_http_info
def get_partition_event_list_with_http_info(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) get_partition_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value! end
ruby
def get_partition_event_list_with_http_info(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) get_partition_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value! end
[ "def", "get_partition_event_list_with_http_info", "(", "partition_id", ",", "start_time_utc", ",", "end_time_utc", ",", "timeout", ":", "60", ",", "events_types_filter", ":", "nil", ",", "exclude_analysis_events", ":", "nil", ",", "skip_correlation_lookup", ":", "nil", ...
Gets a Partition-related events. The response is list of PartitionEvent objects. @param partition_id The identity of the partition. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @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 events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "a", "Partition", "-", "related", "events", "." ]
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#L28565-L28567
train
Gets the list of events for the specified partition.
[ 30522, 13366, 2131, 1035, 13571, 1035, 2724, 1035, 2862, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 13571, 1035, 8909, 1010, 2707, 1035, 2051, 1035, 11396, 1010, 2203, 1035, 2051, 1035, 11396, 1010, 2051, 5833, 1024, 3438, 1010, 2824, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_managed_applications/lib/2018-06-01/generated/azure_mgmt_managed_applications/application_definitions.rb
Azure::ManagedApplications::Mgmt::V2018_06_01.ApplicationDefinitions.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, application_definition_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, application_definition_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, application_definition_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, application_definition_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "application_definition_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "application_definition_name", ",", "param...
Creates a new managed application definition. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param application_definition_name [String] The name of the managed application definition. @param parameters [ApplicationDefinition] Parameters supplied to the create or update an managed application definition. @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", "a", "new", "managed", "application", "definition", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_managed_applications/lib/2018-06-01/generated/azure_mgmt_managed_applications/application_definitions.rb#L626-L628
train
Creates or updates an existing App Service Environment.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4646, 1035, 6210, 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_redis/lib/2016-04-01/generated/azure_mgmt_redis/firewall_rules.rb
Azure::Redis::Mgmt::V2016_04_01.FirewallRules.list
def list(resource_group_name, cache_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, cache_name, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list(resource_group_name, cache_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, cache_name, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list", "(", "resource_group_name", ",", "cache_name", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_as_lazy", "(", "resource_group_name", ",", "cache_name", ",", "custom_headers", ":custom_headers", ")", "first_page", ".", "get_all_items", ...
Gets all firewall rules in the specified redis cache. @param resource_group_name [String] The name of the resource group. @param cache_name [String] The name of the Redis cache. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<RedisFirewallRule>] operation results.
[ "Gets", "all", "firewall", "rules", "in", "the", "specified", "redis", "cache", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2016-04-01/generated/azure_mgmt_redis/firewall_rules.rb#L34-L37
train
Gets all the available adhoc terms of the specified resource group.
[ 30522, 13366, 2862, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 17053, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 17053, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb
Azure::Network::Mgmt::V2019_02_01.P2sVpnServerConfigurations.list_by_virtual_wan_next
def list_by_virtual_wan_next(next_page_link, custom_headers:nil) response = list_by_virtual_wan_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_virtual_wan_next(next_page_link, custom_headers:nil) response = list_by_virtual_wan_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_virtual_wan_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_virtual_wan_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", ...
Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. @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 [ListP2SVpnServerConfigurationsResult] operation results.
[ "Retrieves", "all", "P2SVpnServerConfigurations", "for", "a", "particular", "VirtualWan", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb#L548-L551
train
Gets the list of all the virtual wan applications.
[ 30522, 13366, 2862, 1035, 2011, 1035, 7484, 1035, 14071, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 7484, 1035, 14071, 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...
plataformatec/responders
lib/responders/controller_method.rb
Responders.ControllerMethod.responders
def responders(*responders) self.responder = responders.inject(Class.new(responder)) do |klass, responder| responder = case responder when Module responder when String, Symbol Responders.const_get("#{responder.to_s.camelize}Responder") else raise "responder has to be a string, a symbol or a module" end klass.send(:include, responder) klass end end
ruby
def responders(*responders) self.responder = responders.inject(Class.new(responder)) do |klass, responder| responder = case responder when Module responder when String, Symbol Responders.const_get("#{responder.to_s.camelize}Responder") else raise "responder has to be a string, a symbol or a module" end klass.send(:include, responder) klass end end
[ "def", "responders", "(", "*", "responders", ")", "self", ".", "responder", "=", "responders", ".", "inject", "(", "Class", ".", "new", "(", "responder", ")", ")", "do", "|", "klass", ",", "responder", "|", "responder", "=", "case", "responder", "when", ...
Adds the given responders to the current controller's responder, allowing you to cherry-pick which responders you want per controller. class InvitationsController < ApplicationController responders :flash, :http_cache end Takes symbols and strings and translates them to VariableResponder (eg. :flash becomes FlashResponder). Also allows passing in the responders modules in directly, so you could do: responders FlashResponder, HttpCacheResponder Or a mix of both methods: responders :flash, MyCustomResponder
[ "Adds", "the", "given", "responders", "to", "the", "current", "controller", "s", "responder", "allowing", "you", "to", "cherry", "-", "pick", "which", "responders", "you", "want", "per", "controller", "." ]
a1a2706091d4ffcbbe387407ddfc5671a59ad842
https://github.com/plataformatec/responders/blob/a1a2706091d4ffcbbe387407ddfc5671a59ad842/lib/responders/controller_method.rb#L19-L33
train
Set the responders to the current object
[ 30522, 13366, 6869, 2545, 1006, 1008, 6869, 2545, 1007, 2969, 1012, 6869, 2121, 1027, 6869, 2545, 1012, 1999, 20614, 1006, 2465, 1012, 2047, 1006, 6869, 2121, 1007, 1007, 2079, 1064, 1047, 27102, 1010, 6869, 2121, 1064, 6869, 2121, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.get_composite_entity_with_http_info
def get_composite_entity_with_http_info(app_id, version_id, c_entity_id, custom_headers:nil) get_composite_entity_async(app_id, version_id, c_entity_id, custom_headers:custom_headers).value! end
ruby
def get_composite_entity_with_http_info(app_id, version_id, c_entity_id, custom_headers:nil) get_composite_entity_async(app_id, version_id, c_entity_id, custom_headers:custom_headers).value! end
[ "def", "get_composite_entity_with_http_info", "(", "app_id", ",", "version_id", ",", "c_entity_id", ",", "custom_headers", ":", "nil", ")", "get_composite_entity_async", "(", "app_id", ",", "version_id", ",", "c_entity_id", ",", "custom_headers", ":custom_headers", ")",...
Gets information about a composite entity in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param c_entity_id The composite entity extractor ID. @param 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", "information", "about", "a", "composite", "entity", "in", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L2749-L2751
train
Gets the composite entity.
[ 30522, 13366, 2131, 1035, 12490, 1035, 9178, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 1039, 1035, 9178, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 12490,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/2017-11-01/generated/azure_mgmt_network/express_route_circuit_authorizations.rb
Azure::Network::Mgmt::V2017_11_01.ExpressRouteCircuitAuthorizations.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, circuit_name, authorization_name, authorization_parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, circuit_name, authorization_name, authorization_parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, circuit_name, authorization_name, authorization_parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, circuit_name, authorization_name, authorization_parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "circuit_name", ",", "authorization_name", ",", "authorization_parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "circuit_name", ...
Creates or updates an authorization in the specified express route circuit. @param resource_group_name [String] The name of the resource group. @param circuit_name [String] The name of the express route circuit. @param authorization_name [String] The name of the authorization. @param authorization_parameters [ExpressRouteCircuitAuthorization] Parameters supplied to the create or update express route circuit authorization 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", "an", "authorization", "in", "the", "specified", "express", "route", "circuit", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2017-11-01/generated/azure_mgmt_network/express_route_circuit_authorizations.rb#L420-L422
train
Creates or updates an express route circuit authorization.
[ 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, 20104, 1035, 2171, 1010, 20104, 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_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_system_update_with_http_info
def begin_system_update_with_http_info(resource_group_name, workspace_name, compute_name, custom_headers:nil) begin_system_update_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value! end
ruby
def begin_system_update_with_http_info(resource_group_name, workspace_name, compute_name, custom_headers:nil) begin_system_update_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value! end
[ "def", "begin_system_update_with_http_info", "(", "resource_group_name", ",", "workspace_name", ",", "compute_name", ",", "custom_headers", ":", "nil", ")", "begin_system_update_async", "(", "resource_group_name", ",", "workspace_name", ",", "compute_name", ",", "custom_hea...
System Update On 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. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "System", "Update", "On", "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#L708-L710
train
Updates a compute s information.
[ 30522, 13366, 4088, 1035, 2291, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2573, 15327, 1035, 2171, 1010, 24134, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, 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
samples/smelly_source/inline.rb
Inline.C.module_name
def module_name unless defined? @module_name then module_name = @mod.name.gsub('::','__') md5 = Digest::MD5.new @sig.keys.sort_by { |x| x.to_s }.each { |m| md5 << m.to_s } @module_name = "Inline_#{module_name}_#{md5.to_s[0,4]}" end @module_name end
ruby
def module_name unless defined? @module_name then module_name = @mod.name.gsub('::','__') md5 = Digest::MD5.new @sig.keys.sort_by { |x| x.to_s }.each { |m| md5 << m.to_s } @module_name = "Inline_#{module_name}_#{md5.to_s[0,4]}" end @module_name end
[ "def", "module_name", "unless", "defined?", "@module_name", "then", "module_name", "=", "@mod", ".", "name", ".", "gsub", "(", "'::'", ",", "'__'", ")", "md5", "=", "Digest", "::", "MD5", ".", "new", "@sig", ".", "keys", ".", "sort_by", "{", "|", "x", ...
def generate
[ "def", "generate" ]
8c6b5c0c6228a6981ab48543457889f9ea984054
https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/samples/smelly_source/inline.rb#L265-L273
train
Returns the module name for this module.
[ 30522, 13366, 11336, 1035, 2171, 4983, 4225, 1029, 1030, 11336, 1035, 2171, 2059, 11336, 1035, 2171, 1027, 1030, 16913, 1012, 2171, 1012, 28177, 12083, 1006, 1005, 1024, 1024, 1005, 1010, 1005, 1035, 1035, 1005, 1007, 9108, 2629, 1027, 1788...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb
Aws::AutoScaling.AutoScalingGroup.put_scheduled_update_group_action
def put_scheduled_update_group_action(options = {}) options = options.merge(auto_scaling_group_name: @name) resp = @client.put_scheduled_update_group_action(options) ScheduledAction.new( name: options[:scheduled_action_name], client: @client ) end
ruby
def put_scheduled_update_group_action(options = {}) options = options.merge(auto_scaling_group_name: @name) resp = @client.put_scheduled_update_group_action(options) ScheduledAction.new( name: options[:scheduled_action_name], client: @client ) end
[ "def", "put_scheduled_update_group_action", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "auto_scaling_group_name", ":", "@name", ")", "resp", "=", "@client", ".", "put_scheduled_update_group_action", "(", "options", ")", "Sche...
@example Request syntax with placeholder values scheduledaction = auto_scaling_group.put_scheduled_update_group_action({ scheduled_action_name: "XmlStringMaxLen255", # required time: Time.now, start_time: Time.now, end_time: Time.now, recurrence: "XmlStringMaxLen255", min_size: 1, max_size: 1, desired_capacity: 1, }) @param [Hash] options ({}) @option options [required, String] :scheduled_action_name The name of this scaling action. @option options [Time,DateTime,Date,Integer,String] :time This parameter is deprecated. @option options [Time,DateTime,Date,Integer,String] :start_time The time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and in quotes (for example, `"2019-06-01T00:00:00Z"`). If you specify `Recurrence` and `StartTime`, Amazon EC2 Auto Scaling performs the action at this time, and then performs the action based on the specified recurrence. If you try to schedule your action in the past, Amazon EC2 Auto Scaling returns an error message. @option options [Time,DateTime,Date,Integer,String] :end_time The time for the recurring schedule to end. Amazon EC2 Auto Scaling does not perform the action after this time. @option options [String] :recurrence The recurring schedule for this action, in Unix cron syntax format. This format consists of five fields separated by white spaces: \[Minute\] \[Hour\] \[Day\_of\_Month\] \[Month\_of\_Year\] \[Day\_of\_Week\]. The value must be in quotes (for example, `"30 0 1 1,6,12 *"`). For more information about this format, see [Crontab][1]. [1]: http://crontab.org @option options [Integer] :min_size The minimum size for the Auto Scaling group. @option options [Integer] :max_size The maximum size for the Auto Scaling group. @option options [Integer] :desired_capacity The number of EC2 instances that should be running in the group. @return [ScheduledAction]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L675-L682
train
Put a scheduled update group action
[ 30522, 13366, 2404, 1035, 5115, 1035, 10651, 1035, 2177, 1035, 2895, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 8285, 1035, 25169, 1035, 2177, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/spring
lib/spring/json.rb
Spring.OkJson.ucharenc
def ucharenc(a, i, u) if u <= Uchar1max a[i] = (u & 0xff).chr 1 elsif u <= Uchar2max a[i+0] = (Utag2 | ((u>>6)&0xff)).chr a[i+1] = (Utagx | (u&Umaskx)).chr 2 elsif u <= Uchar3max a[i+0] = (Utag3 | ((u>>12)&0xff)).chr a[i+1] = (Utagx | ((u>>6)&Umaskx)).chr a[i+2] = (Utagx | (u&Umaskx)).chr 3 else a[i+0] = (Utag4 | ((u>>18)&0xff)).chr a[i+1] = (Utagx | ((u>>12)&Umaskx)).chr a[i+2] = (Utagx | ((u>>6)&Umaskx)).chr a[i+3] = (Utagx | (u&Umaskx)).chr 4 end end
ruby
def ucharenc(a, i, u) if u <= Uchar1max a[i] = (u & 0xff).chr 1 elsif u <= Uchar2max a[i+0] = (Utag2 | ((u>>6)&0xff)).chr a[i+1] = (Utagx | (u&Umaskx)).chr 2 elsif u <= Uchar3max a[i+0] = (Utag3 | ((u>>12)&0xff)).chr a[i+1] = (Utagx | ((u>>6)&Umaskx)).chr a[i+2] = (Utagx | (u&Umaskx)).chr 3 else a[i+0] = (Utag4 | ((u>>18)&0xff)).chr a[i+1] = (Utagx | ((u>>12)&Umaskx)).chr a[i+2] = (Utagx | ((u>>6)&Umaskx)).chr a[i+3] = (Utagx | (u&Umaskx)).chr 4 end end
[ "def", "ucharenc", "(", "a", ",", "i", ",", "u", ")", "if", "u", "<=", "Uchar1max", "a", "[", "i", "]", "=", "(", "u", "&", "0xff", ")", ".", "chr", "1", "elsif", "u", "<=", "Uchar2max", "a", "[", "i", "+", "0", "]", "=", "(", "Utag2", "|...
Encodes unicode character u as UTF-8 bytes in string a at position i. Returns the number of bytes written.
[ "Encodes", "unicode", "character", "u", "as", "UTF", "-", "8", "bytes", "in", "string", "a", "at", "position", "i", ".", "Returns", "the", "number", "of", "bytes", "written", "." ]
e7a36afa436fcc59b6945f68dbc08f1076e65585
https://github.com/rails/spring/blob/e7a36afa436fcc59b6945f68dbc08f1076e65585/lib/spring/json.rb#L397-L417
train
Returns a + i + = 1 + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u + u +
[ 30522, 13366, 15384, 8167, 2368, 2278, 1006, 1037, 1010, 1045, 1010, 1057, 1007, 2065, 1057, 1026, 1027, 15384, 8167, 2487, 17848, 1037, 1031, 1045, 1033, 1027, 1006, 1057, 1004, 1014, 2595, 4246, 1007, 1012, 10381, 2099, 1015, 3449, 5332, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-07-01/generated/azure_mgmt_storage/blob_containers.rb
Azure::Storage::Mgmt::V2018_07_01.BlobContainers.lease_with_http_info
def lease_with_http_info(resource_group_name, account_name, container_name, parameters:nil, custom_headers:nil) lease_async(resource_group_name, account_name, container_name, parameters:parameters, custom_headers:custom_headers).value! end
ruby
def lease_with_http_info(resource_group_name, account_name, container_name, parameters:nil, custom_headers:nil) lease_async(resource_group_name, account_name, container_name, parameters:parameters, custom_headers:custom_headers).value! end
[ "def", "lease_with_http_info", "(", "resource_group_name", ",", "account_name", ",", "container_name", ",", "parameters", ":", "nil", ",", "custom_headers", ":", "nil", ")", "lease_async", "(", "resource_group_name", ",", "account_name", ",", "container_name", ",", ...
The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. @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 container_name [String] The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. @param parameters [LeaseContainerRequest] Lease Container request body. @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.
[ "The", "Lease", "Container", "operation", "establishes", "and", "manages", "a", "lock", "on", "a", "container", "for", "delete", "operations", ".", "The", "lock", "duration", "can", "be", "15", "to", "60", "seconds", "or", "can", "be", "infinite", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb#L1767-L1769
train
Gets the lease for the specified container.
[ 30522, 13366, 10084, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 11661, 1035, 2171, 1010, 11709, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10084, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb
Azure::StorageSync::Mgmt::V2018_07_01.ServerEndpoints.list_by_sync_group_with_http_info
def list_by_sync_group_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:nil) list_by_sync_group_async(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:custom_headers).value! end
ruby
def list_by_sync_group_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:nil) list_by_sync_group_async(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:custom_headers).value! end
[ "def", "list_by_sync_group_with_http_info", "(", "resource_group_name", ",", "storage_sync_service_name", ",", "sync_group_name", ",", "custom_headers", ":", "nil", ")", "list_by_sync_group_async", "(", "resource_group_name", ",", "storage_sync_service_name", ",", "sync_group_n...
Get a ServerEndpoint list. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param storage_sync_service_name [String] Name of Storage Sync Service resource. @param sync_group_name [String] Name of Sync Group resource. @param 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", "a", "ServerEndpoint", "list", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb#L320-L322
train
Gets the list of all the documents in a sync group.
[ 30522, 13366, 2862, 1035, 2011, 1035, 26351, 1035, 2177, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 5527, 1035, 26351, 1035, 2326, 1035, 2171, 1010, 26351, 1035, 2177, 1035, 2171, 1010, 7661, 1035, 20346,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ruby/racc
lib/racc/grammar.rb
Racc.Grammar.useless_symbols
def useless_symbols raise 'Grammar not yet closed' unless @closed @useless_symbols ||= begin @symbols.select do |sym| !sym.generated? && sym != @start && (!sym.reachable.include?(@start) || !productive_symbols.include?(sym)) && none? { |rule| rule.explicit_precedence == sym } end.freeze end end
ruby
def useless_symbols raise 'Grammar not yet closed' unless @closed @useless_symbols ||= begin @symbols.select do |sym| !sym.generated? && sym != @start && (!sym.reachable.include?(@start) || !productive_symbols.include?(sym)) && none? { |rule| rule.explicit_precedence == sym } end.freeze end end
[ "def", "useless_symbols", "raise", "'Grammar not yet closed'", "unless", "@closed", "@useless_symbols", "||=", "begin", "@symbols", ".", "select", "do", "|", "sym", "|", "!", "sym", ".", "generated?", "&&", "sym", "!=", "@start", "&&", "(", "!", "sym", ".", ...
A useless symbol can never be a part of any valid parse tree, and is not used for a =<sym> precedence declaration either
[ "A", "useless", "symbol", "can", "never", "be", "a", "part", "of", "any", "valid", "parse", "tree", "and", "is", "not", "used", "for", "a", "=", "<sym", ">", "precedence", "declaration", "either" ]
d3244edfa11dd6e86e43f570c6444d41c7e3552a
https://github.com/ruby/racc/blob/d3244edfa11dd6e86e43f570c6444d41c7e3552a/lib/racc/grammar.rb#L206-L216
train
Returns the list of all the symbols that are useless.
[ 30522, 13366, 11809, 1035, 9255, 5333, 1005, 8035, 2025, 2664, 2701, 1005, 4983, 1030, 2701, 1030, 11809, 1035, 9255, 1064, 1064, 1027, 4088, 1030, 9255, 1012, 7276, 2079, 1064, 25353, 2213, 1064, 999, 25353, 2213, 1012, 7013, 1029, 1004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb
Azure::ApiManagement::Mgmt::V2016_10_10.ApiManagementServices.upload_certificate_with_http_info
def upload_certificate_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! end
ruby
def upload_certificate_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! end
[ "def", "upload_certificate_with_http_info", "(", "resource_group_name", ",", "service_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "upload_certificate_async", "(", "resource_group_name", ",", "service_name", ",", "parameters", ",", "custom_headers", "...
Upload Custom Domain SSL certificate for an API Management service. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param parameters [ApiManagementServiceUploadCertificateParameters] Parameters supplied to the Upload SSL certificate for an API Management service 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.
[ "Upload", "Custom", "Domain", "SSL", "certificate", "for", "an", "API", "Management", "service", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb#L915-L917
train
Uploads a certificate to a service.
[ 30522, 13366, 2039, 11066, 1035, 8196, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2039, 11066, 1035, 8196, 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...
rubocop-hq/rubocop
lib/rubocop/config.rb
RuboCop.Config.possibly_include_hidden?
def possibly_include_hidden? return @possibly_include_hidden if defined?(@possibly_include_hidden) @possibly_include_hidden = patterns_to_include.any? do |s| s.is_a?(Regexp) || s.start_with?('.') || s.include?('/.') end end
ruby
def possibly_include_hidden? return @possibly_include_hidden if defined?(@possibly_include_hidden) @possibly_include_hidden = patterns_to_include.any? do |s| s.is_a?(Regexp) || s.start_with?('.') || s.include?('/.') end end
[ "def", "possibly_include_hidden?", "return", "@possibly_include_hidden", "if", "defined?", "(", "@possibly_include_hidden", ")", "@possibly_include_hidden", "=", "patterns_to_include", ".", "any?", "do", "|", "s", "|", "s", ".", "is_a?", "(", "Regexp", ")", "||", "s...
Returns true if there's a chance that an Include pattern matches hidden files, false if that's definitely not possible.
[ "Returns", "true", "if", "there", "s", "a", "chance", "that", "an", "Include", "pattern", "matches", "hidden", "files", "false", "if", "that", "s", "definitely", "not", "possible", "." ]
2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0
https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/config.rb#L410-L416
train
Returns true if the current object is possibly included hidden.
[ 30522, 13366, 4298, 1035, 2421, 1035, 5023, 1029, 2709, 1030, 4298, 1035, 2421, 1035, 5023, 2065, 4225, 1029, 1006, 1030, 4298, 1035, 2421, 1035, 5023, 1007, 1030, 4298, 1035, 2421, 1035, 5023, 1027, 7060, 1035, 2000, 1035, 2421, 1012, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sensu/sensu
lib/sensu/utilities.rb
Sensu.Utilities.deep_dup
def deep_dup(obj) if obj.class == Hash new_obj = obj.dup new_obj.each do |key, value| new_obj[deep_dup(key)] = deep_dup(value) end new_obj elsif obj.class == Array arr = [] obj.each do |item| arr << deep_dup(item) end arr elsif obj.class == String obj.dup else obj end end
ruby
def deep_dup(obj) if obj.class == Hash new_obj = obj.dup new_obj.each do |key, value| new_obj[deep_dup(key)] = deep_dup(value) end new_obj elsif obj.class == Array arr = [] obj.each do |item| arr << deep_dup(item) end arr elsif obj.class == String obj.dup else obj end end
[ "def", "deep_dup", "(", "obj", ")", "if", "obj", ".", "class", "==", "Hash", "new_obj", "=", "obj", ".", "dup", "new_obj", ".", "each", "do", "|", "key", ",", "value", "|", "new_obj", "[", "deep_dup", "(", "key", ")", "]", "=", "deep_dup", "(", "...
Creates a deep dup of basic ruby objects with support for walking hashes and arrays. @param obj [Object] @return [obj] a dup of the original object.
[ "Creates", "a", "deep", "dup", "of", "basic", "ruby", "objects", "with", "support", "for", "walking", "hashes", "and", "arrays", "." ]
51319e4b58c8d9986f101ad71ff729aa3e51e951
https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/utilities.rb#L59-L77
train
Deep dups a Hash or Array of Hash objects
[ 30522, 13366, 2784, 1035, 4241, 2361, 1006, 27885, 3501, 1007, 2065, 27885, 3501, 1012, 2465, 1027, 1027, 23325, 2047, 1035, 27885, 3501, 1027, 27885, 3501, 1012, 4241, 2361, 2047, 1035, 27885, 3501, 1012, 2169, 2079, 1064, 3145, 1010, 3643...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
decidim/decidim
decidim-core/lib/decidim/file_zipper.rb
Decidim.FileZipper.zip
def zip @zip ||= Zip::OutputStream.write_buffer do |zipfile| zipfile.put_next_entry(@filename) zipfile.write @data end.string end
ruby
def zip @zip ||= Zip::OutputStream.write_buffer do |zipfile| zipfile.put_next_entry(@filename) zipfile.write @data end.string end
[ "def", "zip", "@zip", "||=", "Zip", "::", "OutputStream", ".", "write_buffer", "do", "|", "zipfile", "|", "zipfile", ".", "put_next_entry", "(", "@filename", ")", "zipfile", ".", "write", "@data", "end", ".", "string", "end" ]
Public: Initializes the zipper with a filename and the data to be zipped. filename - The file name of the file *inside* the zip. data - A string with the data to be zipped. Public: Zips the file. Returns a String with the zipped version of the file.
[ "Public", ":", "Initializes", "the", "zipper", "with", "a", "filename", "and", "the", "data", "to", "be", "zipped", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/file_zipper.rb#L22-L27
train
Create a zip file with the data
[ 30522, 13366, 14101, 1030, 14101, 1064, 1064, 1027, 14101, 1024, 1024, 27852, 25379, 1012, 4339, 1035, 17698, 2079, 1064, 14101, 8873, 2571, 1064, 14101, 8873, 2571, 1012, 2404, 1035, 2279, 1035, 4443, 1006, 1030, 5371, 18442, 1007, 14101, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.horizontal_frame_padding
def horizontal_frame_padding padding = fetch_config['padding'] if padding.kind_of?(String) && padding.split('x').length == 2 padding = padding.split('x')[0] padding = padding.to_i unless padding.end_with?('%') end return scale_padding(padding) end
ruby
def horizontal_frame_padding padding = fetch_config['padding'] if padding.kind_of?(String) && padding.split('x').length == 2 padding = padding.split('x')[0] padding = padding.to_i unless padding.end_with?('%') end return scale_padding(padding) end
[ "def", "horizontal_frame_padding", "padding", "=", "fetch_config", "[", "'padding'", "]", "if", "padding", ".", "kind_of?", "(", "String", ")", "&&", "padding", ".", "split", "(", "'x'", ")", ".", "length", "==", "2", "padding", "=", "padding", ".", "split...
Horizontal adding around the frames
[ "Horizontal", "adding", "around", "the", "frames" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L193-L200
train
Returns the horizontal frame padding
[ 30522, 13366, 9876, 1035, 4853, 1035, 11687, 4667, 11687, 4667, 1027, 18584, 1035, 9530, 8873, 2290, 1031, 1005, 11687, 4667, 1005, 1033, 2065, 11687, 4667, 1012, 2785, 1035, 1997, 1029, 1006, 5164, 1007, 1004, 1004, 11687, 4667, 1012, 3975...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/component_manifest.rb
Decidim.ComponentManifest.settings
def settings(name = :global, &block) @settings ||= {} name = name.to_sym settings = (@settings[name] ||= SettingsManifest.new) yield(settings) if block settings end
ruby
def settings(name = :global, &block) @settings ||= {} name = name.to_sym settings = (@settings[name] ||= SettingsManifest.new) yield(settings) if block settings end
[ "def", "settings", "(", "name", "=", ":global", ",", "&", "block", ")", "@settings", "||=", "{", "}", "name", "=", "name", ".", "to_sym", "settings", "=", "(", "@settings", "[", "name", "]", "||=", "SettingsManifest", ".", "new", ")", "yield", "(", "...
Public: Adds configurable attributes for this component, scoped to a name. It uses the DSL specified under `Decidim::SettingsManifest`. name - Either `global` or `step` &block - The DSL present on `Decidim::SettingsManifest` Examples: component.settings(:global) do |settings| settings.attribute :voting_enabled, type: :boolean, default: true end Returns nothing.
[ "Public", ":", "Adds", "configurable", "attributes", "for", "this", "component", "scoped", "to", "a", "name", ".", "It", "uses", "the", "DSL", "specified", "under", "Decidim", "::", "SettingsManifest", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/component_manifest.rb#L127-L133
train
Returns the settings for the current environment.
[ 30522, 13366, 10906, 1006, 2171, 1027, 1024, 3795, 1010, 1004, 3796, 1007, 1030, 10906, 1064, 1064, 1027, 1063, 1065, 2171, 1027, 2171, 1012, 2000, 1035, 25353, 2213, 10906, 1027, 1006, 1030, 10906, 1031, 2171, 1033, 1064, 1064, 1027, 10906...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/voice/network.rb
Discordrb::Voice.VoiceWS.send_heartbeat
def send_heartbeat millis = Time.now.strftime('%s%L').to_i @bot.debug("Sending voice heartbeat at #{millis}") @client.send({ op: 3, d: nil }.to_json) end
ruby
def send_heartbeat millis = Time.now.strftime('%s%L').to_i @bot.debug("Sending voice heartbeat at #{millis}") @client.send({ op: 3, d: nil }.to_json) end
[ "def", "send_heartbeat", "millis", "=", "Time", ".", "now", ".", "strftime", "(", "'%s%L'", ")", ".", "to_i", "@bot", ".", "debug", "(", "\"Sending voice heartbeat at #{millis}\"", ")", "@client", ".", "send", "(", "{", "op", ":", "3", ",", "d", ":", "ni...
Send a heartbeat (op 3), has to be done every @heartbeat_interval seconds or the connection will terminate
[ "Send", "a", "heartbeat", "(", "op", "3", ")", "has", "to", "be", "done", "every" ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/voice/network.rb#L179-L187
train
Send a heartbeat to the client
[ 30522, 13366, 4604, 1035, 12251, 4971, 2483, 1027, 2051, 1012, 2085, 1012, 2358, 12881, 7292, 1006, 1005, 1003, 1055, 1003, 1048, 1005, 1007, 1012, 2000, 1035, 1045, 1030, 28516, 1012, 2139, 8569, 2290, 1006, 1000, 6016, 2376, 12251, 2012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_database_vulnerability_assessment_rule_baselines.rb
Azure::SQL::Mgmt::V2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentRuleBaselines.get_with_http_info
def get_with_http_info(resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers:nil) get_async(resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers:nil) get_async(resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "managed_instance_name", ",", "database_name", ",", "rule_id", ",", "baseline_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "managed_instance_name", ",", "databa...
Gets a database's vulnerability assessment rule baseline. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managed_instance_name [String] The name of the managed instance. @param database_name [String] The name of the database for which the vulnerability assessment rule baseline is defined. @param rule_id [String] The vulnerability assessment rule ID. @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule). Possible values include: 'master', 'default' @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "a", "database", "s", "vulnerability", "assessment", "rule", "baseline", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_database_vulnerability_assessment_rule_baselines.rb#L70-L72
train
Gets the specified rule in a database.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3266, 1035, 6013, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 3627, 1035, 8909, 1010, 26163, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/volume_containers.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.VolumeContainers.begin_delete_with_http_info
def begin_delete_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers:nil) begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers:custom_headers).value! end
ruby
def begin_delete_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers:nil) begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers:custom_headers).value! end
[ "def", "begin_delete_with_http_info", "(", "device_name", ",", "volume_container_name", ",", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":", "nil", ")", "begin_delete_async", "(", "device_name", ",", "volume_container_name", ",", "resource_group_name...
Deletes the volume container. @param device_name [String] The device name @param volume_container_name [String] The name of the volume container. @param resource_group_name [String] The resource group name @param manager_name [String] The manager name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Deletes", "the", "volume", "container", "." ]
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/volume_containers.rb#L669-L671
train
Deletes the specified volume container.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 5080, 1035, 2171, 1010, 3872, 1035, 11661, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_replica_health_using_policy
def get_replica_health_using_policy(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) response = get_replica_health_using_policy_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_replica_health_using_policy(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) response = get_replica_health_using_policy_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_replica_health_using_policy", "(", "partition_id", ",", "replica_id", ",", "events_health_state_filter", ":", "0", ",", "application_health_policy", ":", "nil", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_repl...
Gets the health of a Service Fabric stateful service replica or stateless service instance using the specified policy. Gets the health of a Service Fabric stateful service replica or stateless service instance. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the replica. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @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 [ReplicaHealth] operation results.
[ "Gets", "the", "health", "of", "a", "Service", "Fabric", "stateful", "service", "replica", "or", "stateless", "service", "instance", "using", "the", "specified", "policy", "." ]
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#L14905-L14908
train
Gets the health of the replica using the specified policy.
[ 30522, 13366, 2131, 1035, 15059, 1035, 2740, 1035, 2478, 1035, 3343, 1006, 13571, 1035, 8909, 1010, 15059, 1035, 8909, 1010, 2824, 1035, 2740, 1035, 2110, 1035, 11307, 1024, 1014, 1010, 4646, 1035, 2740, 1035, 3343, 1024, 9152, 2140, 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...
rails/rails
activerecord/lib/active_record/attribute_methods.rb
ActiveRecord.AttributeMethods.attribute_present?
def attribute_present?(attribute) value = _read_attribute(attribute) !value.nil? && !(value.respond_to?(:empty?) && value.empty?) end
ruby
def attribute_present?(attribute) value = _read_attribute(attribute) !value.nil? && !(value.respond_to?(:empty?) && value.empty?) end
[ "def", "attribute_present?", "(", "attribute", ")", "value", "=", "_read_attribute", "(", "attribute", ")", "!", "value", ".", "nil?", "&&", "!", "(", "value", ".", "respond_to?", "(", ":empty?", ")", "&&", "value", ".", "empty?", ")", "end" ]
Returns +true+ if the specified +attribute+ has been set by the user or by a database load and is neither +nil+ nor <tt>empty?</tt> (the latter only applies to objects that respond to <tt>empty?</tt>, most notably Strings). Otherwise, +false+. Note that it always returns +true+ with boolean attributes. class Task < ActiveRecord::Base end task = Task.new(title: '', is_done: false) task.attribute_present?(:title) # => false task.attribute_present?(:is_done) # => true task.title = 'Buy milk' task.is_done = true task.attribute_present?(:title) # => true task.attribute_present?(:is_done) # => true
[ "Returns", "+", "true", "+", "if", "the", "specified", "+", "attribute", "+", "has", "been", "set", "by", "the", "user", "or", "by", "a", "database", "load", "and", "is", "neither", "+", "nil", "+", "nor", "<tt", ">", "empty?<", "/", "tt", ">", "("...
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/attribute_methods.rb#L351-L354
train
Returns true if the attribute is present in the current object.
[ 30522, 13366, 17961, 1035, 30524, 1007, 1004, 1004, 3643, 1012, 4064, 1029, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-dynamodb/lib/aws-sdk-dynamodb/resource.rb
Aws::DynamoDB.Resource.create_table
def create_table(options = {}) resp = @client.create_table(options) Table.new( name: resp.data.table_description.table_name, data: resp.data.table_description, client: @client ) end
ruby
def create_table(options = {}) resp = @client.create_table(options) Table.new( name: resp.data.table_description.table_name, data: resp.data.table_description, client: @client ) end
[ "def", "create_table", "(", "options", "=", "{", "}", ")", "resp", "=", "@client", ".", "create_table", "(", "options", ")", "Table", ".", "new", "(", "name", ":", "resp", ".", "data", ".", "table_description", ".", "table_name", ",", "data", ":", "res...
@example Request syntax with placeholder values table = dynamo_db.create_table({ attribute_definitions: [ # required { attribute_name: "KeySchemaAttributeName", # required attribute_type: "S", # required, accepts S, N, B }, ], table_name: "TableName", # required key_schema: [ # required { attribute_name: "KeySchemaAttributeName", # required key_type: "HASH", # required, accepts HASH, RANGE }, ], local_secondary_indexes: [ { index_name: "IndexName", # required key_schema: [ # required { attribute_name: "KeySchemaAttributeName", # required key_type: "HASH", # required, accepts HASH, RANGE }, ], projection: { # required projection_type: "ALL", # accepts ALL, KEYS_ONLY, INCLUDE non_key_attributes: ["NonKeyAttributeName"], }, }, ], global_secondary_indexes: [ { index_name: "IndexName", # required key_schema: [ # required { attribute_name: "KeySchemaAttributeName", # required key_type: "HASH", # required, accepts HASH, RANGE }, ], projection: { # required projection_type: "ALL", # accepts ALL, KEYS_ONLY, INCLUDE non_key_attributes: ["NonKeyAttributeName"], }, provisioned_throughput: { read_capacity_units: 1, # required write_capacity_units: 1, # required }, }, ], billing_mode: "PROVISIONED", # accepts PROVISIONED, PAY_PER_REQUEST provisioned_throughput: { read_capacity_units: 1, # required write_capacity_units: 1, # required }, stream_specification: { stream_enabled: false, stream_view_type: "NEW_IMAGE", # accepts NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES, KEYS_ONLY }, sse_specification: { enabled: false, sse_type: "AES256", # accepts AES256, KMS kms_master_key_id: "KMSMasterKeyId", }, tags: [ { key: "TagKeyString", # required value: "TagValueString", # required }, ], }) @param [Hash] options ({}) @option options [required, Array<Types::AttributeDefinition>] :attribute_definitions An array of attributes that describe the key schema for the table and indexes. @option options [required, String] :table_name The name of the table to create. @option options [required, Array<Types::KeySchemaElement>] :key_schema Specifies the attributes that make up the primary key for a table or an index. The attributes in `KeySchema` must also be defined in the `AttributeDefinitions` array. For more information, see [Data Model][1] in the *Amazon DynamoDB Developer Guide*. Each `KeySchemaElement` in the array is composed of: * `AttributeName` - The name of this key attribute. * `KeyType` - The role that the key attribute will assume: * `HASH` - partition key * `RANGE` - sort key <note markdown="1"> The partition key of an item is also known as its *hash attribute*. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute*. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. </note> For a simple primary key (partition key), you must provide exactly one element with a `KeyType` of `HASH`. For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a `KeyType` of `HASH`, and the second element must have a `KeyType` of `RANGE`. For more information, see [Specifying the Primary Key][2] in the *Amazon DynamoDB Developer Guide*. [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html [2]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key @option options [Array<Types::LocalSecondaryIndex>] :local_secondary_indexes One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained. Each local secondary index in the array includes the following: * `IndexName` - The name of the local secondary index. Must be unique only for this table. * `KeySchema` - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table. * `Projection` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * `ProjectionType` - One of the following: * `KEYS_ONLY` - Only the index and primary keys are projected into the index. * `INCLUDE` - Only the specified table attributes are projected into the index. The list of projected attributes are in `NonKeyAttributes`. * `ALL` - All of the table attributes are projected into the index. * `NonKeyAttributes` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in `NonKeyAttributes`, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. @option options [Array<Types::GlobalSecondaryIndex>] :global_secondary_indexes One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following: * `IndexName` - The name of the global secondary index. Must be unique only for this table. * `KeySchema` - Specifies the key schema for the global secondary index. * `Projection` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * `ProjectionType` - One of the following: * `KEYS_ONLY` - Only the index and primary keys are projected into the index. * `INCLUDE` - Only the specified table attributes are projected into the index. The list of projected attributes are in `NonKeyAttributes`. * `ALL` - All of the table attributes are projected into the index. * `NonKeyAttributes` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in `NonKeyAttributes`, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * `ProvisionedThroughput` - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units. @option options [String] :billing_mode Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * `PROVISIONED` - Sets the billing mode to `PROVISIONED`. We recommend using `PROVISIONED` for predictable workloads. * `PAY_PER_REQUEST` - Sets the billing mode to `PAY_PER_REQUEST`. We recommend using `PAY_PER_REQUEST` for unpredictable workloads. @option options [Types::ProvisionedThroughput] :provisioned_throughput Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the `UpdateTable` operation. If you set BillingMode as `PROVISIONED`, you must specify this property. If you set BillingMode as `PAY_PER_REQUEST`, you cannot specify this property. For current minimum and maximum provisioned throughput values, see [Limits][1] in the *Amazon DynamoDB Developer Guide*. [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html @option options [Types::StreamSpecification] :stream_specification The settings for DynamoDB Streams on the table. These settings consist of: * `StreamEnabled` - Indicates whether Streams is to be enabled (true) or disabled (false). * `StreamViewType` - When an item in the table is modified, `StreamViewType` determines what information is written to the table's stream. Valid values for `StreamViewType` are: * `KEYS_ONLY` - Only the key attributes of the modified item are written to the stream. * `NEW_IMAGE` - The entire item, as it appears after it was modified, is written to the stream. * `OLD_IMAGE` - The entire item, as it appeared before it was modified, is written to the stream. * `NEW_AND_OLD_IMAGES` - Both the new and the old item images of the item are written to the stream. @option options [Types::SSESpecification] :sse_specification Represents the settings used to enable server-side encryption. @option options [Array<Types::Tag>] :tags A list of key-value pairs to label the table. For more information, see [Tagging for DynamoDB][1]. [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html @return [Table]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/resource.rb#L489-L496
train
Create a new table in the cluster
[ 30522, 13366, 3443, 1035, 2795, 1006, 7047, 1027, 1063, 1065, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 2795, 1006, 7047, 1007, 2795, 1012, 2047, 1006, 2171, 1024, 24501, 2361, 1012, 2951, 1012, 2795, 1035, 6412, 1012, 2795, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb
Aws::AutoScaling.AutoScalingGroup.enable_metrics_collection
def enable_metrics_collection(options = {}) options = options.merge(auto_scaling_group_name: @name) resp = @client.enable_metrics_collection(options) resp.data end
ruby
def enable_metrics_collection(options = {}) options = options.merge(auto_scaling_group_name: @name) resp = @client.enable_metrics_collection(options) resp.data end
[ "def", "enable_metrics_collection", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "auto_scaling_group_name", ":", "@name", ")", "resp", "=", "@client", ".", "enable_metrics_collection", "(", "options", ")", "resp", ".", "dat...
@example Request syntax with placeholder values auto_scaling_group.enable_metrics_collection({ metrics: ["XmlStringMaxLen255"], granularity: "XmlStringMaxLen255", # required }) @param [Hash] options ({}) @option options [Array<String>] :metrics One or more of the following metrics. If you omit this parameter, all metrics are enabled. * `GroupMinSize` * `GroupMaxSize` * `GroupDesiredCapacity` * `GroupInServiceInstances` * `GroupPendingInstances` * `GroupStandbyInstances` * `GroupTerminatingInstances` * `GroupTotalInstances` @option options [required, String] :granularity The granularity to associate with the metrics to collect. The only valid value is `1Minute`. @return [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L496-L500
train
Enables the metrics collection
[ 30522, 13366, 9585, 1035, 12046, 2015, 1035, 3074, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 8285, 1035, 25169, 1035, 2177, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 9585, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hanami/hanami
lib/hanami/configuration.rb
Hanami.Configuration.mount
def mount(app, options) mounted[app] = App.new(app, options.fetch(:at)) end
ruby
def mount(app, options) mounted[app] = App.new(app, options.fetch(:at)) end
[ "def", "mount", "(", "app", ",", "options", ")", "mounted", "[", "app", "]", "=", "App", ".", "new", "(", "app", ",", "options", ".", "fetch", "(", ":at", ")", ")", "end" ]
@api private Mount a Hanami::Application or a Rack app @param app [#call] an application compatible with Rack SPEC @param options [Hash] a set of options @option :at [String] options the mount point @since 0.9.0 @example # config/environment.rb # ... Hanami.configure do mount Web::Application, at: '/' # ... end
[ "@api", "private", "Mount", "a", "Hanami", "::", "Application", "or", "a", "Rack", "app" ]
8c6e5147e92ef869b25379448572da3698eacfdc
https://github.com/hanami/hanami/blob/8c6e5147e92ef869b25379448572da3698eacfdc/lib/hanami/configuration.rb#L34-L36
train
Mount an app to the container
[ 30522, 13366, 4057, 1006, 10439, 1010, 7047, 1007, 5614, 1031, 10439, 1033, 1027, 10439, 1012, 2047, 1006, 10439, 1010, 7047, 1012, 18584, 1006, 1024, 2012, 1007, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
phusion/passenger
src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb
PhusionPassenger.LoaderSharedHelpers.before_handling_requests
def before_handling_requests(forked, options) if forked # Reseed pseudo-random number generator for security reasons. srand end if options["process_title"] && !options["process_title"].empty? $0 = options["process_title"] + ": " + options["app_group_name"] end # If we were forked from a preloader process then clear or # re-establish ActiveRecord database connections. This prevents # child processes from concurrently accessing the same # database connection handles. if forked && defined?(ActiveRecord::Base) if ActiveRecord::Base.respond_to?(:clear_all_connections!) ActiveRecord::Base.clear_all_connections! elsif ActiveRecord::Base.respond_to?(:clear_active_connections!) ActiveRecord::Base.clear_active_connections! elsif ActiveRecord::Base.respond_to?(:connected?) && ActiveRecord::Base.connected? ActiveRecord::Base.establish_connection end end # Fire off events. PhusionPassenger.call_event(:starting_worker_process, forked) if options["pool_account_username"] && options["pool_account_password_base64"] password = options["pool_account_password_base64"].unpack('m').first PhusionPassenger.call_event(:credentials, options["pool_account_username"], password) else PhusionPassenger.call_event(:credentials, nil, nil) end end
ruby
def before_handling_requests(forked, options) if forked # Reseed pseudo-random number generator for security reasons. srand end if options["process_title"] && !options["process_title"].empty? $0 = options["process_title"] + ": " + options["app_group_name"] end # If we were forked from a preloader process then clear or # re-establish ActiveRecord database connections. This prevents # child processes from concurrently accessing the same # database connection handles. if forked && defined?(ActiveRecord::Base) if ActiveRecord::Base.respond_to?(:clear_all_connections!) ActiveRecord::Base.clear_all_connections! elsif ActiveRecord::Base.respond_to?(:clear_active_connections!) ActiveRecord::Base.clear_active_connections! elsif ActiveRecord::Base.respond_to?(:connected?) && ActiveRecord::Base.connected? ActiveRecord::Base.establish_connection end end # Fire off events. PhusionPassenger.call_event(:starting_worker_process, forked) if options["pool_account_username"] && options["pool_account_password_base64"] password = options["pool_account_password_base64"].unpack('m').first PhusionPassenger.call_event(:credentials, options["pool_account_username"], password) else PhusionPassenger.call_event(:credentials, nil, nil) end end
[ "def", "before_handling_requests", "(", "forked", ",", "options", ")", "if", "forked", "# Reseed pseudo-random number generator for security reasons.", "srand", "end", "if", "options", "[", "\"process_title\"", "]", "&&", "!", "options", "[", "\"process_title\"", "]", "...
To be called before the request handler main loop is entered, but after the app startup file has been loaded. This function will fire off necessary events and perform necessary preparation tasks. +forked+ indicates whether the current worker process is forked off from an ApplicationSpawner that has preloaded the app code. +options+ are the spawn options that were passed.
[ "To", "be", "called", "before", "the", "request", "handler", "main", "loop", "is", "entered", "but", "after", "the", "app", "startup", "file", "has", "been", "loaded", ".", "This", "function", "will", "fire", "off", "necessary", "events", "and", "perform", ...
970964b53e0ba86959acdf40f06c99b0c4a128ca
https://github.com/phusion/passenger/blob/970964b53e0ba86959acdf40f06c99b0c4a128ca/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb#L300-L334
train
This method is called before handling requests.
[ 30522, 13366, 2077, 1035, 8304, 1035, 11186, 1006, 9292, 2098, 1010, 7047, 1007, 2065, 9292, 2098, 1001, 24501, 13089, 18404, 1011, 6721, 2193, 13103, 2005, 3036, 4436, 1012, 5034, 5685, 2203, 2065, 7047, 1031, 1000, 2832, 1035, 2516, 1000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...