repo
stringclasses
235 values
path
stringlengths
11
168
func_name
stringlengths
12
143
original_string
stringlengths
83
6.91k
language
stringclasses
1 value
code
stringlengths
83
6.91k
code_tokens
listlengths
15
1.01k
docstring
stringlengths
5
25.7k
docstring_tokens
listlengths
1
427
sha
stringclasses
235 values
url
stringlengths
99
268
partition
stringclasses
1 value
summary
stringlengths
7
202
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb
Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachines.begin_convert_to_managed_disks
def begin_convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil) response = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil) response = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_convert_to_managed_disks", "(", "resource_group_name", ",", "vm_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_convert_to_managed_disks_async", "(", "resource_group_name", ",", "vm_name", ",", "custom_headers", ":custom_headers", ")", ...
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. @param resource_group_name [String] The name of the resource group. @param vm_name [String] The name of the virtual machine. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [OperationStatusResponse] operation results.
[ "Converts", "virtual", "machine", "disks", "from", "blob", "-", "based", "to", "managed", "disks", ".", "Virtual", "machine", "must", "be", "stop", "-", "deallocated", "before", "invoking", "this", "operation", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb#L1307-L1310
train
Convert virtual machine to managed disks.
[ 30522, 13366, 4088, 1035, 10463, 1035, 2000, 1035, 3266, 1035, 23999, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 10463, 1035, 2000, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ankane/searchkick
lib/searchkick/index.rb
Searchkick.Index.reindex_scope
def reindex_scope(relation, import: true, resume: false, retain: false, async: false, refresh_interval: nil, scope: nil) if resume index_name = all_indices.sort.last raise Searchkick::Error, "No index to resume" unless index_name index = Searchkick::Index.new(index_name, @options) else clean_indices unless retain index_options = relation.searchkick_index_options index_options.deep_merge!(settings: {index: {refresh_interval: refresh_interval}}) if refresh_interval index = create_index(index_options: index_options) end import_options = { resume: resume, async: async, full: true, scope: scope } # check if alias exists alias_exists = alias_exists? if alias_exists # import before promotion index.import_scope(relation, **import_options) if import # get existing indices to remove unless async promote(index.name, update_refresh_interval: !refresh_interval.nil?) clean_indices unless retain end else delete if exists? promote(index.name, update_refresh_interval: !refresh_interval.nil?) # import after promotion index.import_scope(relation, **import_options) if import end if async if async.is_a?(Hash) && async[:wait] puts "Created index: #{index.name}" puts "Jobs queued. Waiting..." loop do sleep 3 status = Searchkick.reindex_status(index.name) break if status[:completed] puts "Batches left: #{status[:batches_left]}" end # already promoted if alias didn't exist if alias_exists puts "Jobs complete. Promoting..." promote(index.name, update_refresh_interval: !refresh_interval.nil?) end clean_indices unless retain puts "SUCCESS!" end {index_name: index.name} else index.refresh true end rescue Elasticsearch::Transport::Transport::Errors::BadRequest => e if e.message.include?("No handler for type [text]") raise UnsupportedVersionError, "This version of Searchkick requires Elasticsearch 5 or greater" end raise e end
ruby
def reindex_scope(relation, import: true, resume: false, retain: false, async: false, refresh_interval: nil, scope: nil) if resume index_name = all_indices.sort.last raise Searchkick::Error, "No index to resume" unless index_name index = Searchkick::Index.new(index_name, @options) else clean_indices unless retain index_options = relation.searchkick_index_options index_options.deep_merge!(settings: {index: {refresh_interval: refresh_interval}}) if refresh_interval index = create_index(index_options: index_options) end import_options = { resume: resume, async: async, full: true, scope: scope } # check if alias exists alias_exists = alias_exists? if alias_exists # import before promotion index.import_scope(relation, **import_options) if import # get existing indices to remove unless async promote(index.name, update_refresh_interval: !refresh_interval.nil?) clean_indices unless retain end else delete if exists? promote(index.name, update_refresh_interval: !refresh_interval.nil?) # import after promotion index.import_scope(relation, **import_options) if import end if async if async.is_a?(Hash) && async[:wait] puts "Created index: #{index.name}" puts "Jobs queued. Waiting..." loop do sleep 3 status = Searchkick.reindex_status(index.name) break if status[:completed] puts "Batches left: #{status[:batches_left]}" end # already promoted if alias didn't exist if alias_exists puts "Jobs complete. Promoting..." promote(index.name, update_refresh_interval: !refresh_interval.nil?) end clean_indices unless retain puts "SUCCESS!" end {index_name: index.name} else index.refresh true end rescue Elasticsearch::Transport::Transport::Errors::BadRequest => e if e.message.include?("No handler for type [text]") raise UnsupportedVersionError, "This version of Searchkick requires Elasticsearch 5 or greater" end raise e end
[ "def", "reindex_scope", "(", "relation", ",", "import", ":", "true", ",", "resume", ":", "false", ",", "retain", ":", "false", ",", "async", ":", "false", ",", "refresh_interval", ":", "nil", ",", "scope", ":", "nil", ")", "if", "resume", "index_name", ...
https://gist.github.com/jarosan/3124884 http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/
[ "https", ":", "//", "gist", ".", "github", ".", "com", "/", "jarosan", "/", "3124884", "http", ":", "//", "www", ".", "elasticsearch", ".", "org", "/", "blog", "/", "changing", "-", "mapping", "-", "with", "-", "zero", "-", "downtime", "/" ]
33ee919b56a5204d9e5c519f87e1681216be7699
https://github.com/ankane/searchkick/blob/33ee919b56a5204d9e5c519f87e1681216be7699/lib/searchkick/index.rb#L264-L333
train
Reindex the scope of the relation
[ 30522, 13366, 27788, 3207, 2595, 1035, 9531, 1006, 7189, 1010, 12324, 1024, 2995, 1010, 13746, 1024, 6270, 1010, 9279, 1024, 6270, 1010, 2004, 6038, 2278, 1024, 6270, 1010, 25416, 21898, 1035, 13483, 1024, 9152, 2140, 1010, 9531, 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...
fastlane/fastlane
gym/lib/gym/runner.rb
Gym.Runner.build_app
def build_app command = BuildCommandGenerator.generate print_command(command, "Generated Build Command") if FastlaneCore::Globals.verbose? FastlaneCore::CommandExecutor.execute(command: command, print_all: true, print_command: !Gym.config[:silent], error: proc do |output| ErrorHandler.handle_build_error(output) end) mark_archive_as_built_by_gym(BuildCommandGenerator.archive_path) UI.success("Successfully stored the archive. You can find it in the Xcode Organizer.") unless Gym.config[:archive_path].nil? UI.verbose("Stored the archive in: " + BuildCommandGenerator.archive_path) post_build_app end
ruby
def build_app command = BuildCommandGenerator.generate print_command(command, "Generated Build Command") if FastlaneCore::Globals.verbose? FastlaneCore::CommandExecutor.execute(command: command, print_all: true, print_command: !Gym.config[:silent], error: proc do |output| ErrorHandler.handle_build_error(output) end) mark_archive_as_built_by_gym(BuildCommandGenerator.archive_path) UI.success("Successfully stored the archive. You can find it in the Xcode Organizer.") unless Gym.config[:archive_path].nil? UI.verbose("Stored the archive in: " + BuildCommandGenerator.archive_path) post_build_app end
[ "def", "build_app", "command", "=", "BuildCommandGenerator", ".", "generate", "print_command", "(", "command", ",", "\"Generated Build Command\"", ")", "if", "FastlaneCore", "::", "Globals", ".", "verbose?", "FastlaneCore", "::", "CommandExecutor", ".", "execute", "("...
Builds the app and prepares the archive
[ "Builds", "the", "app", "and", "prepares", "the", "archive" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/gym/lib/gym/runner.rb#L90-L105
train
Generate a new app
[ 30522, 13366, 3857, 1035, 10439, 3094, 1027, 3857, 9006, 2386, 11818, 3678, 8844, 1012, 9699, 6140, 1035, 3094, 1006, 3094, 1010, 1000, 7013, 3857, 3094, 1000, 1007, 2065, 3435, 20644, 17345, 1024, 1024, 3795, 2015, 1012, 12034, 9232, 1029,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fastlane/fastlane
fastlane_core/lib/fastlane_core/configuration/configuration.rb
FastlaneCore.Configuration.verify_default_value_matches_verify_block
def verify_default_value_matches_verify_block @available_options.each do |item| next unless item.verify_block && item.default_value begin unless @values[item.key] # this is important to not verify if there already is a value there item.verify_block.call(item.default_value) end rescue => ex UI.error(ex) UI.user_error!("Invalid default value for #{item.key}, doesn't match verify_block") end end end
ruby
def verify_default_value_matches_verify_block @available_options.each do |item| next unless item.verify_block && item.default_value begin unless @values[item.key] # this is important to not verify if there already is a value there item.verify_block.call(item.default_value) end rescue => ex UI.error(ex) UI.user_error!("Invalid default value for #{item.key}, doesn't match verify_block") end end end
[ "def", "verify_default_value_matches_verify_block", "@available_options", ".", "each", "do", "|", "item", "|", "next", "unless", "item", ".", "verify_block", "&&", "item", ".", "default_value", "begin", "unless", "@values", "[", "item", ".", "key", "]", "# this is...
Verifies the default value is also valid
[ "Verifies", "the", "default", "value", "is", "also", "valid" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/configuration/configuration.rb#L141-L154
train
verify_default_value_matches_verify_block
[ 30522, 13366, 20410, 1035, 12398, 1035, 3643, 1035, 3503, 1035, 20410, 1035, 3796, 1030, 2800, 1035, 7047, 1012, 2169, 2079, 1064, 8875, 1064, 2279, 4983, 8875, 1012, 20410, 1035, 3796, 1004, 1004, 8875, 1012, 12398, 1035, 3643, 4088, 4983,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb
Azure::ApiManagement::Mgmt::V2016_07_07.GroupUsers.list_by_group
def list_by_group(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) first_page = list_by_group_as_lazy(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_by_group(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) first_page = list_by_group_as_lazy(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_by_group", "(", "resource_group_name", ",", "service_name", ",", "group_id", ",", "filter", ":", "nil", ",", "top", ":", "nil", ",", "skip", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_by_group_as_lazy", "(", "re...
Lists a collection of the members of the group, specified by its identifier. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param group_id [String] Group identifier. Must be unique in the current API Management service instance. @param filter [String] | Field | Supported operators | Supported functions | |------------------|------------------------|-----------------------------------| | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | state | eq | N/A | | registrationDate | ge, le, eq, ne, gt, lt | N/A | | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<UserContract>] operation results.
[ "Lists", "a", "collection", "of", "the", "members", "of", "the", "group", "specified", "by", "its", "identifier", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb#L55-L58
train
Gets all the segmentation products in a group.
[ 30522, 13366, 2862, 1035, 2011, 1035, 2177, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 2177, 1035, 8909, 1010, 11307, 1024, 9152, 2140, 1010, 2327, 1024, 9152, 2140, 1010, 13558, 1024, 9152, 2140, 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_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb
Azure::SQL::Mgmt::V2015_05_01_preview.ManagedInstances.list_by_instance_pool_next
def list_by_instance_pool_next(next_page_link, custom_headers:nil) response = list_by_instance_pool_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_instance_pool_next(next_page_link, custom_headers:nil) response = list_by_instance_pool_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_instance_pool_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_instance_pool_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless...
Gets a list of all managed instances in an instance pool. @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 [ManagedInstanceListResult] operation results.
[ "Gets", "a", "list", "of", "all", "managed", "instances", "in", "an", "instance", "pool", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb#L962-L965
train
Gets the list of all the available virtual network endpoints in an instance pool.
[ 30522, 13366, 2862, 1035, 2011, 1035, 6013, 1035, 4770, 30524, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 7661, 1035, 20346, 2015, 1007, 1012, 3643, 999, 3433, 1012, 2303, 4983, 3433, 1012, 9152, 2140, 1029, 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...
grpc/grpc
src/ruby/lib/grpc/generic/rpc_server.rb
GRPC.Pool.start
def start @stop_mutex.synchronize do fail 'already stopped' if @stopped end until @workers.size == @size.to_i new_worker_queue = Queue.new @ready_workers << new_worker_queue next_thread = Thread.new(new_worker_queue) do |jobs| catch(:exit) do # allows { throw :exit } to kill a thread loop_execute_jobs(jobs) end remove_current_thread end @workers << next_thread end end
ruby
def start @stop_mutex.synchronize do fail 'already stopped' if @stopped end until @workers.size == @size.to_i new_worker_queue = Queue.new @ready_workers << new_worker_queue next_thread = Thread.new(new_worker_queue) do |jobs| catch(:exit) do # allows { throw :exit } to kill a thread loop_execute_jobs(jobs) end remove_current_thread end @workers << next_thread end end
[ "def", "start", "@stop_mutex", ".", "synchronize", "do", "fail", "'already stopped'", "if", "@stopped", "end", "until", "@workers", ".", "size", "==", "@size", ".", "to_i", "new_worker_queue", "=", "Queue", ".", "new", "@ready_workers", "<<", "new_worker_queue", ...
Starts running the jobs in the thread pool.
[ "Starts", "running", "the", "jobs", "in", "the", "thread", "pool", "." ]
f3937f0e55227a4ef3a23f895d3b204a947610f8
https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/rpc_server.rb#L75-L90
train
Starts a new thread
[ 30522, 13366, 2707, 1030, 2644, 1035, 20101, 2595, 1012, 26351, 8093, 10698, 4371, 2079, 8246, 1005, 2525, 3030, 1005, 2065, 1030, 3030, 2203, 2127, 1030, 3667, 1012, 2946, 1027, 1027, 1030, 2946, 1012, 2000, 1035, 1045, 2047, 1035, 7309, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.ImageList.iterations=
def iterations=(n) n = Integer(n) Kernel.raise ArgumentError, 'iterations must be between 0 and 65535' if n < 0 || n > 65_535 @images.each { |f| f.iterations = n } self end
ruby
def iterations=(n) n = Integer(n) Kernel.raise ArgumentError, 'iterations must be between 0 and 65535' if n < 0 || n > 65_535 @images.each { |f| f.iterations = n } self end
[ "def", "iterations", "=", "(", "n", ")", "n", "=", "Integer", "(", "n", ")", "Kernel", ".", "raise", "ArgumentError", ",", "'iterations must be between 0 and 65535'", "if", "n", "<", "0", "||", "n", ">", "65_535", "@images", ".", "each", "{", "|", "f", ...
Set the number of iterations of an animated GIF
[ "Set", "the", "number", "of", "iterations", "of", "an", "animated", "GIF" ]
ef6688ed9d76bf123c2ea1a483eff8635051adb7
https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L1566-L1571
train
Set the number of iterations for this image.
[ 30522, 13366, 27758, 2015, 1027, 1006, 1050, 1007, 1050, 1027, 16109, 1006, 1050, 1007, 16293, 1012, 5333, 6685, 2121, 29165, 1010, 1005, 27758, 2015, 2442, 2022, 2090, 1014, 1998, 3515, 22275, 2629, 1005, 2065, 1050, 1026, 1014, 1064, 1064...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/resource_health_metadata_operations.rb
Azure::Web::Mgmt::V2018_02_01.ResourceHealthMetadataOperations.list_by_site_next
def list_by_site_next(next_page_link, custom_headers:nil) response = list_by_site_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_site_next(next_page_link, custom_headers:nil) response = list_by_site_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_site_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_site_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", ...
Gets the category of ResourceHealthMetadata to use for the given site as a collection Gets the category of ResourceHealthMetadata to use for the given site as a collection @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 [ResourceHealthMetadataCollection] operation results.
[ "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", "as", "a", "collection" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/resource_health_metadata_operations.rb#L870-L873
train
Gets the list of all the available adhoc terms.
[ 30522, 13366, 2862, 1035, 2011, 1035, 2609, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 2609, 1035, 2279, 1035, 2004, 6038, 2278, 1006, 2279, 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...
RailsEventStore/rails_event_store
ruby_event_store/lib/ruby_event_store/specification.rb
RubyEventStore.Specification.reduce
def reduce(accumulator = nil, &block) raise ArgumentError.new("Block must be given") unless block_given? each.reduce(accumulator, &block) end
ruby
def reduce(accumulator = nil, &block) raise ArgumentError.new("Block must be given") unless block_given? each.reduce(accumulator, &block) end
[ "def", "reduce", "(", "accumulator", "=", "nil", ",", "&", "block", ")", "raise", "ArgumentError", ".", "new", "(", "\"Block must be given\"", ")", "unless", "block_given?", "each", ".", "reduce", "(", "accumulator", ",", "block", ")", "end" ]
Reduces the results of the query based on the specification built up to this point result using provided block. {http://railseventstore.org/docs/read/ Find out more}. @accumulator starting state for reduce operation @return reduce result as defined by block given
[ "Reduces", "the", "results", "of", "the", "query", "based", "on", "the", "specification", "built", "up", "to", "this", "point", "result", "using", "provided", "block", ".", "{", "http", ":", "//", "railseventstore", ".", "org", "/", "docs", "/", "read", ...
3ee4f3148499794154ee6fec74ccf6d4670d85ac
https://github.com/RailsEventStore/rails_event_store/blob/3ee4f3148499794154ee6fec74ccf6d4670d85ac/ruby_event_store/lib/ruby_event_store/specification.rb#L114-L117
train
Reduce the elements of the array using the given accumulator.
[ 30522, 13366, 5547, 1006, 16222, 2819, 20350, 1027, 9152, 2140, 1010, 1004, 3796, 1007, 5333, 6685, 2121, 29165, 1012, 2047, 1006, 1000, 3796, 2442, 2022, 2445, 1000, 1007, 4983, 3796, 1035, 2445, 1029, 2169, 1012, 5547, 1006, 16222, 2819, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb
Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationRecoveryPlans.begin_planned_failover
def begin_planned_failover(recovery_plan_name, input, custom_headers:nil) response = begin_planned_failover_async(recovery_plan_name, input, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_planned_failover(recovery_plan_name, input, custom_headers:nil) response = begin_planned_failover_async(recovery_plan_name, input, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_planned_failover", "(", "recovery_plan_name", ",", "input", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_planned_failover_async", "(", "recovery_plan_name", ",", "input", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "r...
Execute planned failover of the recovery plan. The operation to start the planned failover of a recovery plan. @param recovery_plan_name [String] Recovery plan name. @param input [RecoveryPlanPlannedFailoverInput] Failover input. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [RecoveryPlan] operation results.
[ "Execute", "planned", "failover", "of", "the", "recovery", "plan", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb#L1007-L1010
train
Executes a plan failover.
[ 30522, 13366, 4088, 1035, 3740, 1035, 8246, 7840, 1006, 7233, 1035, 2933, 1035, 2171, 1010, 7953, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3740, 1035, 8246, 7840, 1035, 2004, 6038, 2278, 1006, 7233, 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...
seejohnrun/ice_cube
lib/ice_cube/schedule.rb
IceCube.Schedule.next_occurrences
def next_occurrences(num, from = nil, options = {}) from = TimeUtil.match_zone(from, start_time) || TimeUtil.now(start_time) enumerate_occurrences(from + 1, nil, options).take(num) end
ruby
def next_occurrences(num, from = nil, options = {}) from = TimeUtil.match_zone(from, start_time) || TimeUtil.now(start_time) enumerate_occurrences(from + 1, nil, options).take(num) end
[ "def", "next_occurrences", "(", "num", ",", "from", "=", "nil", ",", "options", "=", "{", "}", ")", "from", "=", "TimeUtil", ".", "match_zone", "(", "from", ",", "start_time", ")", "||", "TimeUtil", ".", "now", "(", "start_time", ")", "enumerate_occurren...
The next n occurrences after now
[ "The", "next", "n", "occurrences", "after", "now" ]
fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd
https://github.com/seejohnrun/ice_cube/blob/fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd/lib/ice_cube/schedule.rb#L171-L174
train
Returns the next number of occurrences
[ 30522, 13366, 2279, 1035, 27247, 1006, 16371, 2213, 1010, 2013, 1027, 9152, 2140, 1010, 7047, 1027, 1063, 1065, 1007, 2013, 1027, 2051, 21823, 2140, 1012, 2674, 1035, 4224, 1006, 2013, 1010, 2707, 1035, 2051, 1007, 1064, 1064, 2051, 21823, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb
Azure::ServiceFabric::Mgmt::V2017_07_01_preview.ClusterVersions.list_by_environment
def list_by_environment(location, environment, api_version, subscription_id, custom_headers:nil) response = list_by_environment_async(location, environment, api_version, subscription_id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_environment(location, environment, api_version, subscription_id, custom_headers:nil) response = list_by_environment_async(location, environment, api_version, subscription_id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_environment", "(", "location", ",", "environment", ",", "api_version", ",", "subscription_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_environment_async", "(", "location", ",", "environment", ",", "api_version", ",", "subscr...
List cluster code versions by environment List cluster code versions by environment @param location [String] The location for the cluster code versions, this is different from cluster location @param environment [Enum] Cluster operating system, the default means all. Possible values include: 'Windows', 'Linux' @param api_version [String] The version of the API. @param subscription_id [String] The customer subscription identifier @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ClusterCodeVersionsListResult] operation results.
[ "List", "cluster", "code", "versions", "by", "environment" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb#L374-L377
train
Gets the list of all the available terms of the environment.
[ 30522, 13366, 2862, 1035, 2011, 1035, 4044, 1006, 3295, 1010, 4044, 1010, 17928, 1035, 2544, 1010, 15002, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 4044, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb
Azure::Compute::Mgmt::V2019_03_01.VirtualMachineScaleSets.begin_power_off_with_http_info
def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil) begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value! end
ruby
def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil) begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value! end
[ "def", "begin_power_off_with_http_info", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vm_instance_ids", ":", "nil", ",", "skip_shutdown", ":", "false", ",", "custom_headers", ":", "nil", ")", "begin_power_off_async", "(", "resource_group_name", ",", "vm_s...
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set. @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of virtual machine instance IDs from the VM scale set. @param skip_shutdown [Boolean] The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified @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.
[ "Power", "off", "(", "stop", ")", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "Note", "that", "resources", "are", "still", "attached", "and", "you", "are", "getting", "charged", "for", "the", "resources", ".", "Inste...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1884-L1886
train
Power off the virtual machine in a VM scale set.
[ 30522, 13366, 4088, 1035, 2373, 1035, 2125, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 1058, 2213, 1035, 6013, 1035, 8909, 2015, 1024, 9152, 2140, 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...
decidim/decidim
decidim-core/lib/decidim/view_hooks.rb
Decidim.ViewHooks.render
def render(name, view_context) hooks[name].map do |hook| hook.render(view_context) end.join("").html_safe end
ruby
def render(name, view_context) hooks[name].map do |hook| hook.render(view_context) end.join("").html_safe end
[ "def", "render", "(", "name", ",", "view_context", ")", "hooks", "[", "name", "]", ".", "map", "do", "|", "hook", "|", "hook", ".", "render", "(", "view_context", ")", "end", ".", "join", "(", "\"\"", ")", ".", "html_safe", "end" ]
Public: Renders all the view hooks registered for a given hook `name`. Needs a `view_context` parameter, which will almost always be `self` from the helper method or the view that calls this. The easiest is to call this method from within a Helper: module MyViewHooksRenderHelper def my_render_hooks(name) Decidim.view_hooks.render(name, self) end end def ApplicationController helper MyViewHooksRenderHelper end Then from your views you need to call `my_render_hooks(name)`. name - The name of the view hook `view_context` - a context to render the view hooks. Returns an HTML safe String.
[ "Public", ":", "Renders", "all", "the", "view", "hooks", "registered", "for", "a", "given", "hook", "name", ".", "Needs", "a", "view_context", "parameter", "which", "will", "almost", "always", "be", "self", "from", "the", "helper", "method", "or", "the", "...
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/view_hooks.rb#L77-L81
train
Renders the given hook.
[ 30522, 13366, 17552, 1006, 2171, 1010, 3193, 1035, 6123, 1007, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_application_event_list
def get_application_event_list(application_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) response = get_application_event_list_async(application_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! response.body unless response.nil? end
ruby
def get_application_event_list(application_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) response = get_application_event_list_async(application_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! response.body unless response.nil? end
[ "def", "get_application_event_list", "(", "application_id", ",", "start_time_utc", ",", "end_time_utc", ",", "timeout", ":", "60", ",", "events_types_filter", ":", "nil", ",", "exclude_analysis_events", ":", "nil", ",", "skip_correlation_lookup", ":", "nil", ",", "c...
Gets an Application-related events. The response is list of ApplicationEvent objects. @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 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 [Array] operation results.
[ "Gets", "an", "Application", "-", "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#L27858-L27861
train
Gets the list of events for the specified application.
[ 30522, 13366, 2131, 1035, 4646, 1035, 2724, 1035, 2862, 1006, 4646, 1035, 8909, 1010, 2707, 1035, 2051, 1035, 11396, 1010, 2203, 1035, 2051, 1035, 11396, 1010, 2051, 5833, 1024, 3438, 1010, 2824, 1035, 4127, 1035, 11307, 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...
cheezy/page-object
lib/page-object/accessors.rb
PageObject.Accessors.div
def div(name, identifier={:index => 0}, &block) standard_methods(name, identifier, 'div_for', &block) define_method(name) do return platform.div_text_for identifier.clone unless block_given? self.send("#{name}_element").text end end
ruby
def div(name, identifier={:index => 0}, &block) standard_methods(name, identifier, 'div_for', &block) define_method(name) do return platform.div_text_for identifier.clone unless block_given? self.send("#{name}_element").text end end
[ "def", "div", "(", "name", ",", "identifier", "=", "{", ":index", "=>", "0", "}", ",", "&", "block", ")", "standard_methods", "(", "name", ",", "identifier", ",", "'div_for'", ",", "block", ")", "define_method", "(", "name", ")", "do", "return", "platf...
adds three methods - one to retrieve the text from a div, another to return the div element, and another to check the div's existence. @example div(:message, :id => 'message') # will generate 'message', 'message_element', and 'message?' methods @param [Symbol] the name used for the generated methods @param [Hash] identifier how we find a div. @param optional block to be invoked when element method is called
[ "adds", "three", "methods", "-", "one", "to", "retrieve", "the", "text", "from", "a", "div", "another", "to", "return", "the", "div", "element", "and", "another", "to", "check", "the", "div", "s", "existence", "." ]
850d775bf63768fbb1551a34480195785fe8e193
https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L452-L458
train
Creates a div method.
[ 30522, 13366, 4487, 2615, 1006, 2171, 1010, 8909, 4765, 18095, 1027, 1063, 1024, 5950, 1027, 1028, 1014, 1065, 1010, 1004, 3796, 1007, 3115, 1035, 4725, 1006, 2171, 1010, 8909, 4765, 18095, 1010, 1005, 4487, 2615, 1035, 2005, 1005, 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...
hashicorp/vault-ruby
lib/vault/api/approle.rb
Vault.AppRole.secret_id_accessors
def secret_id_accessors(role_name, options = {}) headers = extract_headers!(options) json = client.list("/v1/auth/approle/role/#{encode_path(role_name)}/secret-id", options, headers) return Secret.decode(json).data[:keys] || [] rescue HTTPError => e return [] if e.code == 404 raise end
ruby
def secret_id_accessors(role_name, options = {}) headers = extract_headers!(options) json = client.list("/v1/auth/approle/role/#{encode_path(role_name)}/secret-id", options, headers) return Secret.decode(json).data[:keys] || [] rescue HTTPError => e return [] if e.code == 404 raise end
[ "def", "secret_id_accessors", "(", "role_name", ",", "options", "=", "{", "}", ")", "headers", "=", "extract_headers!", "(", "options", ")", "json", "=", "client", ".", "list", "(", "\"/v1/auth/approle/role/#{encode_path(role_name)}/secret-id\"", ",", "options", ","...
Lists the accessors of all the SecretIDs issued against the AppRole. This includes the accessors for "custom" SecretIDs as well. If there are no SecretIDs against this role, an empty array will be returned. @example Vault.approle.secret_ids("testrole") #=> ["ce102d2a-...", "a1c8dee4-..."] @return [Array<String>]
[ "Lists", "the", "accessors", "of", "all", "the", "SecretIDs", "issued", "against", "the", "AppRole", ".", "This", "includes", "the", "accessors", "for", "custom", "SecretIDs", "as", "well", ".", "If", "there", "are", "no", "SecretIDs", "against", "this", "ro...
02f0532a802ba1a2a0d8703a4585dab76eb9d864
https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/approle.rb#L209-L216
train
Get the accessors for a role
[ 30522, 13366, 3595, 1035, 8909, 1035, 3229, 5668, 1006, 2535, 1035, 2171, 1010, 7047, 1027, 1063, 1065, 1007, 20346, 2015, 1027, 14817, 1035, 20346, 2015, 999, 1006, 7047, 1007, 1046, 3385, 1027, 7396, 1012, 2862, 1006, 1000, 1013, 1058, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
railties/lib/rails/console/app.rb
Rails.ConsoleMethods.reload!
def reload!(print = true) puts "Reloading..." if print Rails.application.reloader.reload! true end
ruby
def reload!(print = true) puts "Reloading..." if print Rails.application.reloader.reload! true end
[ "def", "reload!", "(", "print", "=", "true", ")", "puts", "\"Reloading...\"", "if", "print", "Rails", ".", "application", ".", "reloader", ".", "reload!", "true", "end" ]
reloads the environment
[ "reloads", "the", "environment" ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/console/app.rb#L32-L36
train
Reloads the current page.
[ 30522, 13366, 2128, 11066, 999, 1006, 6140, 1027, 2995, 1007, 8509, 1000, 2128, 18570, 1012, 1012, 1012, 1000, 2065, 6140, 15168, 1012, 4646, 1012, 2128, 11066, 2121, 1012, 2128, 11066, 999, 2995, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_resources/lib/2018-05-01/generated/azure_mgmt_resources/deployment_operations.rb
Azure::Resources::Mgmt::V2018_05_01.DeploymentOperations.list
def list(resource_group_name, deployment_name, top:nil, custom_headers:nil) first_page = list_as_lazy(resource_group_name, deployment_name, top:top, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list(resource_group_name, deployment_name, top:nil, custom_headers:nil) first_page = list_as_lazy(resource_group_name, deployment_name, top:top, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list", "(", "resource_group_name", ",", "deployment_name", ",", "top", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_as_lazy", "(", "resource_group_name", ",", "deployment_name", ",", "top", ":", "top", ",", "custom_headers...
Gets all deployments operations for a deployment. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param deployment_name [String] The name of the deployment with the operation to get. @param top [Integer] The number of results to return. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<DeploymentOperation>] operation results.
[ "Gets", "all", "deployments", "operations", "for", "a", "deployment", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2018-05-01/generated/azure_mgmt_resources/deployment_operations.rb#L334-L337
train
Gets all the segmentation of a deployment.
[ 30522, 13366, 2862, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 10813, 1035, 2171, 1010, 2327, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 2004, 1035, 13971, 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...
Dynamoid/dynamoid
lib/dynamoid/adapter.rb
Dynamoid.Adapter.method_missing
def method_missing(method, *args, &block) return benchmark(method, *args) { adapter.send(method, *args, &block) } if adapter.respond_to?(method) super end
ruby
def method_missing(method, *args, &block) return benchmark(method, *args) { adapter.send(method, *args, &block) } if adapter.respond_to?(method) super end
[ "def", "method_missing", "(", "method", ",", "*", "args", ",", "&", "block", ")", "return", "benchmark", "(", "method", ",", "args", ")", "{", "adapter", ".", "send", "(", "method", ",", "args", ",", "block", ")", "}", "if", "adapter", ".", "respond_...
Delegate all methods that aren't defind here to the underlying adapter. @since 0.2.0
[ "Delegate", "all", "methods", "that", "aren", "t", "defind", "here", "to", "the", "underlying", "adapter", "." ]
9e3d006b039e45877b003564ded65509b10b6354
https://github.com/Dynamoid/dynamoid/blob/9e3d006b039e45877b003564ded65509b10b6354/lib/dynamoid/adapter.rb#L156-L160
train
This method is used to call the adapter method.
[ 30522, 13366, 4118, 1035, 4394, 1006, 4118, 1010, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2709, 6847, 10665, 1006, 4118, 1010, 1008, 12098, 5620, 1007, 1063, 15581, 2121, 1012, 4604, 1006, 4118, 1010, 1008, 12098, 5620, 1010, 1004, 3796,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb
Azure::Scheduler::Mgmt::V2016_03_01.Jobs.create_or_update_with_http_info
def create_or_update_with_http_info(resource_group_name, job_collection_name, job_name, job, custom_headers:nil) create_or_update_async(resource_group_name, job_collection_name, job_name, job, custom_headers:custom_headers).value! end
ruby
def create_or_update_with_http_info(resource_group_name, job_collection_name, job_name, job, custom_headers:nil) create_or_update_async(resource_group_name, job_collection_name, job_name, job, custom_headers:custom_headers).value! end
[ "def", "create_or_update_with_http_info", "(", "resource_group_name", ",", "job_collection_name", ",", "job_name", ",", "job", ",", "custom_headers", ":", "nil", ")", "create_or_update_async", "(", "resource_group_name", ",", "job_collection_name", ",", "job_name", ",", ...
Provisions a new job or updates an existing job. @param resource_group_name [String] The resource group name. @param job_collection_name [String] The job collection name. @param job_name [String] The job name. @param job [JobDefinition] The job 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.
[ "Provisions", "a", "new", "job", "or", "updates", "an", "existing", "job", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb#L149-L151
train
Creates or updates a job in the specified job collection.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3105, 1035, 3074, 1035, 2171, 1010, 3105, 1035, 2171, 1010, 3105, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb
Azure::Compute::Mgmt::V2017_12_01.VirtualMachineScaleSetVMs.get_instance_view
def get_instance_view(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_instance_view(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_instance_view", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "instance_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_instance_view_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "instance_id", ",", "cust...
Gets the status of a virtual machine from a VM scale set. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set. @param instance_id [String] The instance ID of the virtual machine. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [VirtualMachineScaleSetVMInstanceView] operation results.
[ "Gets", "the", "status", "of", "a", "virtual", "machine", "from", "a", "VM", "scale", "set", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb#L362-L365
train
Gets the view of the virtual machine in a VM scale set.
[ 30522, 13366, 2131, 1035, 6013, 1035, 3193, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 6013, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb
Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.force_recovery_service_fabric_platform_update_domain_walk_with_http_info
def force_recovery_service_fabric_platform_update_domain_walk_with_http_info(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil) force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:custom_headers).value! end
ruby
def force_recovery_service_fabric_platform_update_domain_walk_with_http_info(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil) force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:custom_headers).value! end
[ "def", "force_recovery_service_fabric_platform_update_domain_walk_with_http_info", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "platform_update_domain", ",", "custom_headers", ":", "nil", ")", "force_recovery_service_fabric_platform_update_domain_walk_async", "(", "resou...
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set. @param platform_update_domain [Integer] The platform update domain for which a manual recovery walk is requested @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.
[ "Manual", "platform", "update", "domain", "walk", "to", "update", "virtual", "machines", "in", "a", "service", "fabric", "virtual", "machine", "scale", "set", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1167-L1169
train
Walks the virtual machine scale set to the latest virtual machine scale set.
[ 30522, 13366, 2486, 1035, 7233, 1035, 2326, 1035, 8313, 1035, 4132, 1035, 10651, 1035, 5884, 1035, 3328, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
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.start_application_upgrade
def start_application_upgrade(application_id, application_upgrade_description, timeout:60, custom_headers:nil) response = start_application_upgrade_async(application_id, application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value! nil end
ruby
def start_application_upgrade(application_id, application_upgrade_description, timeout:60, custom_headers:nil) response = start_application_upgrade_async(application_id, application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value! nil end
[ "def", "start_application_upgrade", "(", "application_id", ",", "application_upgrade_description", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "start_application_upgrade_async", "(", "application_id", ",", "application_upgrade_descrip...
Starts upgrading an application in the Service Fabric cluster. Validates the supplied application upgrade parameters and starts upgrading the application if the parameters are valid. @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 application_upgrade_description [ApplicationUpgradeDescription] Parameters for an application upgrade. @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.
[ "Starts", "upgrading", "an", "application", "in", "the", "Service", "Fabric", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L7730-L7733
train
Starts an upgrade of the specified application.
[ 30522, 13366, 2707, 1035, 4646, 1035, 12200, 1006, 4646, 1035, 8909, 1010, 4646, 1035, 12200, 1035, 6412, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2707, 1035, 4646, 1035, 12200, 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_container_service/lib/2017-08-31/generated/azure_mgmt_container_service/managed_clusters.rb
Azure::ContainerService::Mgmt::V2017_08_31.ManagedClusters.get_access_profiles_with_http_info
def get_access_profiles_with_http_info(resource_group_name, resource_name, role_name, custom_headers:nil) get_access_profiles_async(resource_group_name, resource_name, role_name, custom_headers:custom_headers).value! end
ruby
def get_access_profiles_with_http_info(resource_group_name, resource_name, role_name, custom_headers:nil) get_access_profiles_async(resource_group_name, resource_name, role_name, custom_headers:custom_headers).value! end
[ "def", "get_access_profiles_with_http_info", "(", "resource_group_name", ",", "resource_name", ",", "role_name", ",", "custom_headers", ":", "nil", ")", "get_access_profiles_async", "(", "resource_group_name", ",", "resource_name", ",", "role_name", ",", "custom_headers", ...
Gets access profile of a managed cluster. Use ManagedClusters_GetAccessProfile instead. @param resource_group_name [String] The name of the resource group. @param resource_name [String] The name of the managed cluster resource. @param role_name [String] The name of the role for managed cluster accessProfile 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.
[ "Gets", "access", "profile", "of", "a", "managed", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2017-08-31/generated/azure_mgmt_container_service/managed_clusters.rb#L456-L458
train
Gets the access profiles for the specified App Service Environment.
[ 30522, 13366, 2131, 1035, 3229, 1035, 17879, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 2535, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 3229, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb
Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.get_project
def get_project(project_id, custom_headers:nil) response = get_project_async(project_id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_project(project_id, custom_headers:nil) response = get_project_async(project_id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_project", "(", "project_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_project_async", "(", "project_id", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", ".", "nil?", "e...
Get a specific project. @param project_id The id of the project to get. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Project] operation results.
[ "Get", "a", "specific", "project", "." ]
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#L3032-L3035
train
Gets the project s coverages.
[ 30522, 13366, 2131, 1035, 2622, 1006, 2622, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 2622, 1035, 2004, 6038, 2278, 1006, 2622, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 7661, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rmagick/rmagick
lib/rvg/rvg.rb
Magick.RVG.bgfill
def bgfill if @background_fill.nil? color = Magick::Pixel.new(0, 0, 0, Magick::TransparentOpacity) else color = @background_fill color.opacity = (1.0 - @background_fill_opacity) * Magick::TransparentOpacity end color end
ruby
def bgfill if @background_fill.nil? color = Magick::Pixel.new(0, 0, 0, Magick::TransparentOpacity) else color = @background_fill color.opacity = (1.0 - @background_fill_opacity) * Magick::TransparentOpacity end color end
[ "def", "bgfill", "if", "@background_fill", ".", "nil?", "color", "=", "Magick", "::", "Pixel", ".", "new", "(", "0", ",", "0", ",", "0", ",", "Magick", "::", "TransparentOpacity", ")", "else", "color", "=", "@background_fill", "color", ".", "opacity", "=...
background_fill defaults to 'none'. If background_fill has been set to something else, combine it with the background_fill_opacity.
[ "background_fill", "defaults", "to", "none", ".", "If", "background_fill", "has", "been", "set", "to", "something", "else", "combine", "it", "with", "the", "background_fill_opacity", "." ]
ef6688ed9d76bf123c2ea1a483eff8635051adb7
https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rvg/rvg.rb#L61-L69
train
Returns the color of the image.
[ 30522, 13366, 1038, 25708, 8591, 2065, 1030, 4281, 1035, 6039, 1012, 9152, 2140, 1029, 3609, 1027, 3894, 2243, 1024, 1024, 22138, 1012, 2047, 1006, 1014, 1010, 1014, 1010, 1014, 1010, 3894, 2243, 1024, 1024, 13338, 29477, 12972, 1007, 2842,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
decidim/decidim
decidim-core/lib/decidim/form_builder.rb
Decidim.FormBuilder.find_validator
def find_validator(attribute, klass) return unless object.respond_to?(:_validators) object._validators[attribute].find { |validator| validator.class == klass } end
ruby
def find_validator(attribute, klass) return unless object.respond_to?(:_validators) object._validators[attribute].find { |validator| validator.class == klass } end
[ "def", "find_validator", "(", "attribute", ",", "klass", ")", "return", "unless", "object", ".", "respond_to?", "(", ":_validators", ")", "object", ".", "_validators", "[", "attribute", "]", ".", "find", "{", "|", "validator", "|", "validator", ".", "class",...
Private: Finds a validator. attribute - The attribute to validate. klass - The Class of the validator to find. Returns a klass object.
[ "Private", ":", "Finds", "a", "validator", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L525-L528
train
Find a validator for the given attribute
[ 30522, 13366, 2424, 1035, 9398, 8844, 1006, 17961, 1010, 1047, 27102, 1007, 2709, 4983, 4874, 1012, 6869, 1035, 2000, 1029, 1006, 1024, 1035, 9398, 18926, 1007, 4874, 1012, 1035, 9398, 18926, 1031, 17961, 1033, 1012, 2424, 1063, 1064, 9398,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/registries.rb
Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Registries.regenerate_credential
def regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil) response = regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil) response = regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "regenerate_credential", "(", "resource_group_name", ",", "registry_name", ",", "regenerate_credential_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "regenerate_credential_async", "(", "resource_group_name", ",", "registry_name", ",", "regener...
Regenerates one of the login credentials for the specified container registry. @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 regenerate_credential_parameters [RegenerateCredentialParameters] Specifies name of the password which should be regenerated -- password or password2. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [RegistryListCredentialsResult] operation results.
[ "Regenerates", "one", "of", "the", "login", "credentials", "for", "the", "specified", "container", "registry", "." ]
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/registries.rb#L648-L651
train
Regenerate credential for a container registry.
[ 30522, 13366, 19723, 24454, 3686, 1035, 13675, 14728, 19909, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 19723, 24454, 3686, 1035, 13675, 14728, 19909, 1035, 11709, 1010, 7661, 1035, 20346, 30524, 1035, 2004, 6038, 2278...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
chef/chef
lib/chef/shell/model_wrapper.rb
Shell.ModelWrapper.list_objects
def list_objects objects = @model_class.method(:list).arity == 0 ? @model_class.list : @model_class.list(true) objects.map { |obj| Array(obj).find { |o| o.kind_of?(@model_class) } } end
ruby
def list_objects objects = @model_class.method(:list).arity == 0 ? @model_class.list : @model_class.list(true) objects.map { |obj| Array(obj).find { |o| o.kind_of?(@model_class) } } end
[ "def", "list_objects", "objects", "=", "@model_class", ".", "method", "(", ":list", ")", ".", "arity", "==", "0", "?", "@model_class", ".", "list", ":", "@model_class", ".", "list", "(", "true", ")", "objects", ".", "map", "{", "|", "obj", "|", "Array"...
paper over inconsistencies in the model classes APIs, and return the objects the user wanted instead of the URI=>object stuff
[ "paper", "over", "inconsistencies", "in", "the", "model", "classes", "APIs", "and", "return", "the", "objects", "the", "user", "wanted", "instead", "of", "the", "URI", "=", ">", "object", "stuff" ]
61f69e18e69e0dca6e8cffdcd7451181d874cdb3
https://github.com/chef/chef/blob/61f69e18e69e0dca6e8cffdcd7451181d874cdb3/lib/chef/shell/model_wrapper.rb#L82-L85
train
Returns an array of objects that are in the correct order.
[ 30522, 13366, 2862, 1035, 5200, 5200, 1027, 1030, 2944, 1035, 2465, 1012, 4118, 1006, 1024, 2862, 1007, 1012, 10488, 3723, 1027, 1027, 1014, 1029, 1030, 2944, 1035, 2465, 1012, 2862, 1024, 1030, 2944, 1035, 2465, 1012, 2862, 1006, 2995, 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_event_grid/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb
Azure::EventGrid::Mgmt::V2017_06_15_preview.EventSubscriptions.create
def create(scope, event_subscription_name, event_subscription_info, custom_headers:nil) response = create_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create(scope, event_subscription_name, event_subscription_info, custom_headers:nil) response = create_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create", "(", "scope", ",", "event_subscription_name", ",", "event_subscription_info", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_async", "(", "scope", ",", "event_subscription_name", ",", "event_subscription_info", ",", "custom_headers", ...
Create an event subscription Asynchronously creates a new event subscription to the specified scope. Existing event subscriptions cannot be updated with this API and should instead use the Update event subscription API. @param scope [String] The scope of the resource to which the event subscription needs to be created. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. @param event_subscription_name [String] Name of the event subscription to be created. Event subscription names must be between 3 and 64 characters in length and use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EventSubscription] operation results.
[ "Create", "an", "event", "subscription" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb#L177-L180
train
Creates an event subscription.
[ 30522, 13366, 3443, 1006, 9531, 1010, 2724, 1035, 15002, 1035, 2171, 1010, 2724, 1035, 15002, 1035, 18558, 1010, 7661, 1035, 20346, 30524, 1007, 1012, 3643, 999, 3433, 1012, 2303, 4983, 3433, 1012, 9152, 2140, 1029, 2203, 102, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
resque/resque
lib/resque/worker.rb
Resque.Worker.run_hook
def run_hook(name, *args) hooks = Resque.send(name) return if hooks.empty? return if name == :before_first_fork && @before_first_fork_hook_ran msg = "Running #{name} hooks" msg << " with #{args.inspect}" if args.any? log_with_severity :info, msg hooks.each do |hook| args.any? ? hook.call(*args) : hook.call @before_first_fork_hook_ran = true if name == :before_first_fork end end
ruby
def run_hook(name, *args) hooks = Resque.send(name) return if hooks.empty? return if name == :before_first_fork && @before_first_fork_hook_ran msg = "Running #{name} hooks" msg << " with #{args.inspect}" if args.any? log_with_severity :info, msg hooks.each do |hook| args.any? ? hook.call(*args) : hook.call @before_first_fork_hook_ran = true if name == :before_first_fork end end
[ "def", "run_hook", "(", "name", ",", "*", "args", ")", "hooks", "=", "Resque", ".", "send", "(", "name", ")", "return", "if", "hooks", ".", "empty?", "return", "if", "name", "==", ":before_first_fork", "&&", "@before_first_fork_hook_ran", "msg", "=", "\"Ru...
Runs a named hook, passing along any arguments.
[ "Runs", "a", "named", "hook", "passing", "along", "any", "arguments", "." ]
adb633a0f6b98b1eb5a5a85bb36ebac9309978fd
https://github.com/resque/resque/blob/adb633a0f6b98b1eb5a5a85bb36ebac9309978fd/lib/resque/worker.rb#L645-L657
train
Run a hook
[ 30522, 13366, 2448, 1035, 8103, 1006, 2171, 1010, 1008, 12098, 5620, 1007, 18008, 1027, 24501, 4226, 1012, 4604, 1006, 2171, 1007, 2709, 2065, 18008, 1012, 4064, 1029, 2709, 2065, 2171, 1027, 1027, 1024, 2077, 1035, 2034, 1035, 9292, 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...
meew0/discordrb
lib/discordrb/events/message.rb
Discordrb::Events.Respondable.send_message
def send_message(content, tts = false, embed = nil) channel.send_message(content, tts, embed) end
ruby
def send_message(content, tts = false, embed = nil) channel.send_message(content, tts, embed) end
[ "def", "send_message", "(", "content", ",", "tts", "=", "false", ",", "embed", "=", "nil", ")", "channel", ".", "send_message", "(", "content", ",", "tts", ",", "embed", ")", "end" ]
Sends a message to the channel this message was sent in, right now. It is usually preferable to use {#<<} instead because it avoids rate limiting problems @param content [String] The message to send to the channel @param tts [true, false] Whether or not this message should be sent using Discord text-to-speech. @param embed [Hash, Discordrb::Webhooks::Embed, nil] The rich embed to append to this message. @return [Discordrb::Message] the message that was sent
[ "Sends", "a", "message", "to", "the", "channel", "this", "message", "was", "sent", "in", "right", "now", ".", "It", "is", "usually", "preferable", "to", "use", "{", "#<<", "}", "instead", "because", "it", "avoids", "rate", "limiting", "problems" ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/events/message.rb#L18-L20
train
Send a message to the channel.
[ 30522, 13366, 4604, 1035, 4471, 1006, 4180, 1010, 23746, 2015, 1027, 6270, 1010, 7861, 8270, 1027, 9152, 2140, 1007, 3149, 1012, 4604, 1035, 4471, 1006, 4180, 1010, 23746, 2015, 1010, 7861, 8270, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb
Azure::EventHub::Mgmt::V2018_01_01_preview.Namespaces.get_ip_filter_rule_with_http_info
def get_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil) get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value! end
ruby
def get_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil) get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value! end
[ "def", "get_ip_filter_rule_with_http_info", "(", "resource_group_name", ",", "namespace_name", ",", "ip_filter_rule_name", ",", "custom_headers", ":", "nil", ")", "get_ip_filter_rule_async", "(", "resource_group_name", ",", "namespace_name", ",", "ip_filter_rule_name", ",", ...
Gets an IpFilterRule for a Namespace by rule name. @param resource_group_name [String] Name of the resource group within the Azure subscription. @param namespace_name [String] The Namespace name @param ip_filter_rule_name [String] The IP Filter Rule 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.
[ "Gets", "an", "IpFilterRule", "for", "a", "Namespace", "by", "rule", "name", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb#L861-L863
train
Gets the specified ip filter rule.
[ 30522, 13366, 2131, 1035, 12997, 1035, 11307, 1035, 3627, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3415, 15327, 1035, 2171, 1010, 12997, 1035, 11307, 1035, 3627, 1035, 2171, 1010, 7661, 1035, 20346, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kpumuk/meta-tags
lib/meta_tags/meta_tags_collection.rb
MetaTags.MetaTagsCollection.normalize_open_graph
def normalize_open_graph(meta_tags) meta_tags = meta_tags.kind_of?(HashWithIndifferentAccess) ? meta_tags.dup : meta_tags.with_indifferent_access meta_tags[:og] = meta_tags.delete(:open_graph) if meta_tags.key?(:open_graph) meta_tags end
ruby
def normalize_open_graph(meta_tags) meta_tags = meta_tags.kind_of?(HashWithIndifferentAccess) ? meta_tags.dup : meta_tags.with_indifferent_access meta_tags[:og] = meta_tags.delete(:open_graph) if meta_tags.key?(:open_graph) meta_tags end
[ "def", "normalize_open_graph", "(", "meta_tags", ")", "meta_tags", "=", "meta_tags", ".", "kind_of?", "(", "HashWithIndifferentAccess", ")", "?", "meta_tags", ".", "dup", ":", "meta_tags", ".", "with_indifferent_access", "meta_tags", "[", ":og", "]", "=", "meta_ta...
Converts input hash to HashWithIndifferentAccess and renames :open_graph to :og. @param [Hash] meta_tags list of meta tags. @return [HashWithIndifferentAccess] normalized meta tags list.
[ "Converts", "input", "hash", "to", "HashWithIndifferentAccess", "and", "renames", ":", "open_graph", "to", ":", "og", "." ]
03585f95edf96cd17024c5c155ce46ec8bc47232
https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/meta_tags_collection.rb#L176-L180
train
Normalize open graph tags
[ 30522, 13366, 3671, 4697, 1035, 2330, 1035, 10629, 1006, 18804, 1035, 22073, 1007, 18804, 1035, 22073, 1027, 18804, 1035, 22073, 1012, 2785, 1035, 1997, 1029, 1006, 23325, 24415, 22254, 13355, 7869, 12380, 9468, 7971, 1007, 1029, 18804, 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_sql/lib/2018-06-01-preview/generated/azure_mgmt_sql/database_tables.rb
Azure::SQL::Mgmt::V2018_06_01_preview.DatabaseTables.list_by_schema
def list_by_schema(resource_group_name, server_name, database_name, schema_name, filter:nil, custom_headers:nil) first_page = list_by_schema_as_lazy(resource_group_name, server_name, database_name, schema_name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_by_schema(resource_group_name, server_name, database_name, schema_name, filter:nil, custom_headers:nil) first_page = list_by_schema_as_lazy(resource_group_name, server_name, database_name, schema_name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_by_schema", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "schema_name", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_by_schema_as_lazy", "(", "resource_group_name", ",", "serve...
List database tables @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server. @param database_name [String] The name of the database. @param schema_name [String] The name of the schema. @param filter [String] An OData filter expression that filters elements in the collection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<DatabaseTable>] operation results.
[ "List", "database", "tables" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2018-06-01-preview/generated/azure_mgmt_sql/database_tables.rb#L43-L46
train
Gets all the documents in a schema.
[ 30522, 13366, 2862, 1035, 2011, 1035, 8040, 28433, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 8040, 28433, 1035, 2171, 1010, 11307, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb
Azure::CognitiveServices::ContentModerator::V1_0.ListManagementImage.add_image_url_input_with_http_info
def add_image_url_input_with_http_info(list_id, content_type, image_url, tag:nil, label:nil, custom_headers:nil) add_image_url_input_async(list_id, content_type, image_url, tag:tag, label:label, custom_headers:custom_headers).value! end
ruby
def add_image_url_input_with_http_info(list_id, content_type, image_url, tag:nil, label:nil, custom_headers:nil) add_image_url_input_async(list_id, content_type, image_url, tag:tag, label:label, custom_headers:custom_headers).value! end
[ "def", "add_image_url_input_with_http_info", "(", "list_id", ",", "content_type", ",", "image_url", ",", "tag", ":", "nil", ",", "label", ":", "nil", ",", "custom_headers", ":", "nil", ")", "add_image_url_input_async", "(", "list_id", ",", "content_type", ",", "...
Add an image to the list with list Id equal to list Id passed. @param list_id [String] List Id of the image list. @param content_type [String] The content type. @param image_url [ImageUrl] The image url. @param tag [Integer] Tag for the image. @param label [String] The image label. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Add", "an", "image", "to", "the", "list", "with", "list", "Id", "equal", "to", "list", "Id", "passed", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb#L438-L440
train
Adds an image url to a list.
[ 30522, 13366, 5587, 1035, 3746, 1035, 24471, 2140, 1035, 7953, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2862, 1035, 8909, 1010, 4180, 1035, 2828, 1010, 3746, 1035, 24471, 2140, 30524, 1024, 9152, 2140, 1007, 5587, 1035, 3746, 1035, 24471,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/vpn_connections.rb
Azure::Network::Mgmt::V2019_02_01.VpnConnections.list_by_vpn_gateway_as_lazy
def list_by_vpn_gateway_as_lazy(resource_group_name, gateway_name, custom_headers:nil) response = list_by_vpn_gateway_async(resource_group_name, gateway_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_vpn_gateway_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_vpn_gateway_as_lazy(resource_group_name, gateway_name, custom_headers:nil) response = list_by_vpn_gateway_async(resource_group_name, gateway_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_vpn_gateway_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_vpn_gateway_as_lazy", "(", "resource_group_name", ",", "gateway_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_vpn_gateway_async", "(", "resource_group_name", ",", "gateway_name", ",", "custom_headers", ":custom_headers", ")", "."...
Retrieves all vpn connections for a particular virtual wan vpn gateway. @param resource_group_name [String] The resource group name of the VpnGateway. @param gateway_name [String] The name of the gateway. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ListVpnConnectionsResult] which provide lazy access to pages of the response.
[ "Retrieves", "all", "vpn", "connections", "for", "a", "particular", "virtual", "wan", "vpn", "gateway", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/vpn_connections.rb#L625-L634
train
Gets all the virtual network gateway policies in a virtual network gateway.
[ 30522, 13366, 2862, 1035, 2011, 1035, 21210, 2078, 1035, 11909, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11909, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 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...
sporkmonger/addressable
lib/addressable/uri.rb
Addressable.URI.normalized_path
def normalized_path @normalized_path ||= begin path = self.path.to_s if self.scheme == nil && path =~ NORMPATH # Relative paths with colons in the first segment are ambiguous. path = path.sub(":", "%2F") end # String#split(delimeter, -1) uses the more strict splitting behavior # found by default in Python. result = path.strip.split(SLASH, -1).map do |segment| Addressable::URI.normalize_component( segment, Addressable::URI::CharacterClasses::PCHAR ) end.join(SLASH) result = URI.normalize_path(result) if result.empty? && ["http", "https", "ftp", "tftp"].include?(self.normalized_scheme) result = SLASH.dup end result end # All normalized values should be UTF-8 @normalized_path.force_encoding(Encoding::UTF_8) if @normalized_path @normalized_path end
ruby
def normalized_path @normalized_path ||= begin path = self.path.to_s if self.scheme == nil && path =~ NORMPATH # Relative paths with colons in the first segment are ambiguous. path = path.sub(":", "%2F") end # String#split(delimeter, -1) uses the more strict splitting behavior # found by default in Python. result = path.strip.split(SLASH, -1).map do |segment| Addressable::URI.normalize_component( segment, Addressable::URI::CharacterClasses::PCHAR ) end.join(SLASH) result = URI.normalize_path(result) if result.empty? && ["http", "https", "ftp", "tftp"].include?(self.normalized_scheme) result = SLASH.dup end result end # All normalized values should be UTF-8 @normalized_path.force_encoding(Encoding::UTF_8) if @normalized_path @normalized_path end
[ "def", "normalized_path", "@normalized_path", "||=", "begin", "path", "=", "self", ".", "path", ".", "to_s", "if", "self", ".", "scheme", "==", "nil", "&&", "path", "=~", "NORMPATH", "# Relative paths with colons in the first segment are ambiguous.", "path", "=", "p...
The path component for this URI, normalized. @return [String] The path component, normalized.
[ "The", "path", "component", "for", "this", "URI", "normalized", "." ]
5894c95a7768435cb46d1355954611dbd194832e
https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1510-L1536
train
Returns the normalized path of the URI.
[ 30522, 13366, 3671, 3550, 1035, 4130, 1030, 3671, 3550, 1035, 4130, 1064, 1064, 1027, 4088, 4130, 1027, 2969, 1012, 4130, 1012, 2000, 1035, 1055, 2065, 2969, 1012, 5679, 1027, 1027, 9152, 2140, 1004, 1004, 4130, 1027, 1066, 13373, 15069, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_versioning.rb
Aws::S3.BucketVersioning.put
def put(options = {}) options = options.merge(bucket: @bucket_name) resp = @client.put_bucket_versioning(options) resp.data end
ruby
def put(options = {}) options = options.merge(bucket: @bucket_name) resp = @client.put_bucket_versioning(options) resp.data end
[ "def", "put", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "bucket", ":", "@bucket_name", ")", "resp", "=", "@client", ".", "put_bucket_versioning", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values bucket_versioning.put({ content_md5: "ContentMD5", mfa: "MFA", versioning_configuration: { # required mfa_delete: "Enabled", # accepts Enabled, Disabled status: "Enabled", # accepts Enabled, Suspended }, }) @param [Hash] options ({}) @option options [String] :content_md5 @option options [String] :mfa The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. @option options [required, Types::VersioningConfiguration] :versioning_configuration @return [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_versioning.rb#L220-L224
train
Put the versioning data to the bucket.
[ 30522, 13366, 2404, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 13610, 1024, 1030, 13610, 1035, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 2404, 1035, 13610, 1035, 2544, 2075, 1006, 7047, 1007, 24501, 2361...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
backup/backup
lib/backup/model.rb
Backup.Model.log!
def log!(action) case action when :started Logger.info "Performing Backup for '#{label} (#{trigger})'!\n" \ "[ backup #{VERSION} : #{RUBY_DESCRIPTION} ]" when :finished if exit_status > 1 ex = exit_status == 2 ? Error : FatalError err = ex.wrap(exception, "Backup for #{label} (#{trigger}) Failed!") Logger.error err Logger.error "\nBacktrace:\n\s\s" + err.backtrace.join("\n\s\s") + "\n\n" Cleaner.warnings(self) else msg = "Backup for '#{label} (#{trigger})' " if exit_status == 1 msg << "Completed Successfully (with Warnings) in #{duration}" Logger.warn msg else msg << "Completed Successfully in #{duration}" Logger.info msg end end end end
ruby
def log!(action) case action when :started Logger.info "Performing Backup for '#{label} (#{trigger})'!\n" \ "[ backup #{VERSION} : #{RUBY_DESCRIPTION} ]" when :finished if exit_status > 1 ex = exit_status == 2 ? Error : FatalError err = ex.wrap(exception, "Backup for #{label} (#{trigger}) Failed!") Logger.error err Logger.error "\nBacktrace:\n\s\s" + err.backtrace.join("\n\s\s") + "\n\n" Cleaner.warnings(self) else msg = "Backup for '#{label} (#{trigger})' " if exit_status == 1 msg << "Completed Successfully (with Warnings) in #{duration}" Logger.warn msg else msg << "Completed Successfully in #{duration}" Logger.info msg end end end end
[ "def", "log!", "(", "action", ")", "case", "action", "when", ":started", "Logger", ".", "info", "\"Performing Backup for '#{label} (#{trigger})'!\\n\"", "\"[ backup #{VERSION} : #{RUBY_DESCRIPTION} ]\"", "when", ":finished", "if", "exit_status", ">", "1", "ex", "=", "exit...
Logs messages when the model starts and finishes. #exception will be set here if #exit_status is > 1, since log(:finished) is called before the +after+ hook.
[ "Logs", "messages", "when", "the", "model", "starts", "and", "finishes", "." ]
64370f925e859f858766b674717a3dbee0de7a26
https://github.com/backup/backup/blob/64370f925e859f858766b674717a3dbee0de7a26/lib/backup/model.rb#L434-L459
train
Log the action of the backup
[ 30522, 13366, 8833, 999, 1006, 2895, 1007, 2553, 2895, 2043, 1024, 2318, 8833, 4590, 1012, 18558, 1000, 4488, 10200, 2005, 1005, 1001, 1063, 3830, 1065, 1006, 1001, 1063, 9495, 1065, 1007, 1005, 999, 1032, 1050, 1000, 1032, 1000, 1031, 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...
adimichele/hubspot-ruby
lib/hubspot/form.rb
Hubspot.Form.submit
def submit(opts={}) response = Hubspot::FormsConnection.submit(SUBMIT_DATA_PATH, params: { form_guid: @guid }, body: opts) [204, 302, 200].include?(response.code) end
ruby
def submit(opts={}) response = Hubspot::FormsConnection.submit(SUBMIT_DATA_PATH, params: { form_guid: @guid }, body: opts) [204, 302, 200].include?(response.code) end
[ "def", "submit", "(", "opts", "=", "{", "}", ")", "response", "=", "Hubspot", "::", "FormsConnection", ".", "submit", "(", "SUBMIT_DATA_PATH", ",", "params", ":", "{", "form_guid", ":", "@guid", "}", ",", "body", ":", "opts", ")", "[", "204", ",", "3...
{https://developers.hubspot.com/docs/methods/forms/submit_form}
[ "{", "https", ":", "//", "developers", ".", "hubspot", ".", "com", "/", "docs", "/", "methods", "/", "forms", "/", "submit_form", "}" ]
8eb0a64dd0c14c79e631e81bfdc169583e775a46
https://github.com/adimichele/hubspot-ruby/blob/8eb0a64dd0c14c79e631e81bfdc169583e775a46/lib/hubspot/form.rb#L65-L68
train
Submit the form
[ 30522, 13366, 12040, 1006, 23569, 2015, 1027, 1063, 1065, 1007, 3433, 1027, 9594, 13102, 4140, 1024, 1024, 3596, 8663, 2638, 7542, 1012, 12040, 1006, 12040, 1035, 2951, 1035, 4130, 1010, 11498, 5244, 1024, 1063, 2433, 1035, 26458, 30524, 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...
mojombo/chronic
lib/chronic/handlers.rb
Chronic.Handlers.handle_rdn_rmn_od
def handle_rdn_rmn_od(tokens, options) month = tokens[1].get_tag(RepeaterMonthName) day = tokens[2].get_tag(OrdinalDay).type time_tokens = tokens.last(tokens.size - 3) year = self.now.year return if month_overflow?(year, month.index, day) begin if time_tokens.empty? start_time = Chronic.time_class.local(year, month.index, day) end_time = time_with_rollover(year, month.index, day + 1) Span.new(start_time, end_time) else day_start = Chronic.time_class.local(year, month.index, day) day_or_time(day_start, time_tokens, options) end rescue ArgumentError nil end end
ruby
def handle_rdn_rmn_od(tokens, options) month = tokens[1].get_tag(RepeaterMonthName) day = tokens[2].get_tag(OrdinalDay).type time_tokens = tokens.last(tokens.size - 3) year = self.now.year return if month_overflow?(year, month.index, day) begin if time_tokens.empty? start_time = Chronic.time_class.local(year, month.index, day) end_time = time_with_rollover(year, month.index, day + 1) Span.new(start_time, end_time) else day_start = Chronic.time_class.local(year, month.index, day) day_or_time(day_start, time_tokens, options) end rescue ArgumentError nil end end
[ "def", "handle_rdn_rmn_od", "(", "tokens", ",", "options", ")", "month", "=", "tokens", "[", "1", "]", ".", "get_tag", "(", "RepeaterMonthName", ")", "day", "=", "tokens", "[", "2", "]", ".", "get_tag", "(", "OrdinalDay", ")", ".", "type", "time_tokens",...
Handle RepeaterDayName RepeaterMonthName OrdinalDay
[ "Handle", "RepeaterDayName", "RepeaterMonthName", "OrdinalDay" ]
2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c
https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L307-L327
train
Handle RDN OD
[ 30522, 13366, 5047, 1035, 16428, 2078, 1035, 28549, 2078, 1035, 1051, 2094, 1006, 19204, 2015, 1010, 7047, 1007, 3204, 1027, 19204, 2015, 1031, 1015, 1033, 1012, 2131, 1035, 6415, 1006, 9377, 2121, 9629, 7295, 14074, 1007, 2154, 1027, 19204...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
zendesk/ruby-kafka
lib/kafka/producer.rb
Kafka.Producer.deliver_messages
def deliver_messages # There's no need to do anything if the buffer is empty. return if buffer_size == 0 @instrumenter.instrument("deliver_messages.producer") do |notification| message_count = buffer_size notification[:message_count] = message_count notification[:attempts] = 0 begin deliver_messages_with_retries(notification) ensure notification[:delivered_message_count] = message_count - buffer_size end end end
ruby
def deliver_messages # There's no need to do anything if the buffer is empty. return if buffer_size == 0 @instrumenter.instrument("deliver_messages.producer") do |notification| message_count = buffer_size notification[:message_count] = message_count notification[:attempts] = 0 begin deliver_messages_with_retries(notification) ensure notification[:delivered_message_count] = message_count - buffer_size end end end
[ "def", "deliver_messages", "# There's no need to do anything if the buffer is empty.", "return", "if", "buffer_size", "==", "0", "@instrumenter", ".", "instrument", "(", "\"deliver_messages.producer\"", ")", "do", "|", "notification", "|", "message_count", "=", "buffer_size",...
Sends all buffered messages to the Kafka brokers. Depending on the value of `required_acks` used when initializing the producer, this call may block until the specified number of replicas have acknowledged the writes. The `ack_timeout` setting places an upper bound on the amount of time the call will block before failing. @raise [DeliveryFailed] if not all messages could be successfully sent. @return [nil]
[ "Sends", "all", "buffered", "messages", "to", "the", "Kafka", "brokers", "." ]
2a73471b6a607a52dc85c79301ba522acb4566b5
https://github.com/zendesk/ruby-kafka/blob/2a73471b6a607a52dc85c79301ba522acb4566b5/lib/kafka/producer.rb#L242-L258
train
Deliver messages to the producer.
[ 30522, 13366, 8116, 1035, 7696, 1001, 2045, 1005, 1055, 2053, 2342, 2000, 2079, 2505, 2065, 1996, 17698, 2003, 4064, 1012, 2709, 2065, 17698, 1035, 2946, 1027, 1027, 1014, 1030, 6602, 2121, 1012, 6602, 1006, 1000, 8116, 1035, 7696, 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...
resque/resque
lib/resque/worker.rb
Resque.Worker.report_failed_job
def report_failed_job(job,exception) log_with_severity :error, "#{job.inspect} failed: #{exception.inspect}" begin job.fail(exception) rescue Object => exception log_with_severity :error, "Received exception when reporting failure: #{exception.inspect}" end begin failed! rescue Object => exception log_with_severity :error, "Received exception when increasing failed jobs counter (redis issue) : #{exception.inspect}" end end
ruby
def report_failed_job(job,exception) log_with_severity :error, "#{job.inspect} failed: #{exception.inspect}" begin job.fail(exception) rescue Object => exception log_with_severity :error, "Received exception when reporting failure: #{exception.inspect}" end begin failed! rescue Object => exception log_with_severity :error, "Received exception when increasing failed jobs counter (redis issue) : #{exception.inspect}" end end
[ "def", "report_failed_job", "(", "job", ",", "exception", ")", "log_with_severity", ":error", ",", "\"#{job.inspect} failed: #{exception.inspect}\"", "begin", "job", ".", "fail", "(", "exception", ")", "rescue", "Object", "=>", "exception", "log_with_severity", ":error"...
Reports the exception and marks the job as failed
[ "Reports", "the", "exception", "and", "marks", "the", "job", "as", "failed" ]
adb633a0f6b98b1eb5a5a85bb36ebac9309978fd
https://github.com/resque/resque/blob/adb633a0f6b98b1eb5a5a85bb36ebac9309978fd/lib/resque/worker.rb#L286-L298
train
Report the failed job to redis
[ 30522, 13366, 3189, 1035, 3478, 1035, 3105, 1006, 3105, 1010, 6453, 1007, 8833, 1035, 2007, 1035, 18976, 1024, 7561, 1010, 1000, 1001, 1063, 3105, 1012, 22459, 1065, 3478, 1024, 1001, 1063, 6453, 1012, 22459, 1065, 1000, 4088, 3105, 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...
meew0/discordrb
lib/discordrb/voice/network.rb
Discordrb::Voice.VoiceUDP.encrypt_audio
def encrypt_audio(header, buf) raise 'No secret key found, despite encryption being enabled!' unless @secret_key box = RbNaCl::SecretBox.new(@secret_key) # The nonce is the header of the voice packet with 12 null bytes appended nonce = header + ([0] * 12).pack('C*') box.encrypt(nonce, buf) end
ruby
def encrypt_audio(header, buf) raise 'No secret key found, despite encryption being enabled!' unless @secret_key box = RbNaCl::SecretBox.new(@secret_key) # The nonce is the header of the voice packet with 12 null bytes appended nonce = header + ([0] * 12).pack('C*') box.encrypt(nonce, buf) end
[ "def", "encrypt_audio", "(", "header", ",", "buf", ")", "raise", "'No secret key found, despite encryption being enabled!'", "unless", "@secret_key", "box", "=", "RbNaCl", "::", "SecretBox", ".", "new", "(", "@secret_key", ")", "# The nonce is the header of the voice packet...
Encrypts audio data using RbNaCl @param header [String] The header of the packet, to be used as the nonce @param buf [String] The encoded audio data to be encrypted @return [String] the audio data, encrypted
[ "Encrypts", "audio", "data", "using", "RbNaCl" ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/voice/network.rb#L101-L110
train
Encrypt the audio packet with the given header
[ 30522, 13366, 4372, 26775, 22571, 2102, 1035, 5746, 1006, 20346, 30524, 1030, 3595, 1035, 3145, 3482, 1027, 21144, 18357, 2140, 1024, 1024, 3595, 8758, 1012, 2047, 1006, 1030, 3595, 1035, 3145, 1007, 1001, 1996, 2512, 3401, 2003, 1996, 2034...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/cloud_endpoints.rb
Azure::StorageSync::Mgmt::V2018_07_01.CloudEndpoints.begin_post_backup_with_http_info
def begin_post_backup_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil) begin_post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_post_backup_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil) begin_post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_post_backup_with_http_info", "(", "resource_group_name", ",", "storage_sync_service_name", ",", "sync_group_name", ",", "cloud_endpoint_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_post_backup_async", "(", "resource_group_name", ",", ...
Post Backup a given CloudEndpoint. @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 cloud_endpoint_name [String] Name of Cloud Endpoint object. @param parameters [BackupRequest] Body of Backup 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.
[ "Post", "Backup", "a", "given", "CloudEndpoint", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb#L1009-L1011
train
Creates a new backup of the specified cloud endpoint.
[ 30522, 13366, 4088, 1035, 2695, 1035, 10200, 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, 6112, 1035, 2203, 8400, 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...
randym/axlsx
lib/axlsx/workbook/worksheet/page_margins.rb
Axlsx.PageMargins.set
def set(margins) margins.select do |k, v| next unless [:left, :right, :top, :bottom, :header, :footer].include? k send("#{k}=", v) end end
ruby
def set(margins) margins.select do |k, v| next unless [:left, :right, :top, :bottom, :header, :footer].include? k send("#{k}=", v) end end
[ "def", "set", "(", "margins", ")", "margins", ".", "select", "do", "|", "k", ",", "v", "|", "next", "unless", "[", ":left", ",", ":right", ",", ":top", ",", ":bottom", ",", ":header", ",", ":footer", "]", ".", "include?", "k", "send", "(", "\"#{k}=...
Set some or all margins at once. @param [Hash] margins the margins to set (possible keys are :left, :right, :top, :bottom, :header and :footer).
[ "Set", "some", "or", "all", "margins", "at", "once", "." ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/page_margins.rb#L68-L73
train
Set the margins for this image
[ 30522, 13366, 2275, 1006, 17034, 1007, 17034, 1012, 7276, 2079, 1064, 1047, 1010, 1058, 1064, 2279, 4983, 1031, 1024, 2187, 1010, 1024, 2157, 1010, 1024, 2327, 1010, 1024, 3953, 1010, 1024, 20346, 1010, 1024, 3329, 2121, 1033, 1012, 2421, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
chef/chef-zero
lib/chef_zero/server.rb
ChefZero.Server.ssl_opts
def ssl_opts ssl_opts = OpenSSL::SSL::OP_ALL ssl_opts &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ssl_opts |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION) ssl_opts |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2) ssl_opts |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3) ssl_opts end
ruby
def ssl_opts ssl_opts = OpenSSL::SSL::OP_ALL ssl_opts &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ssl_opts |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION) ssl_opts |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2) ssl_opts |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3) ssl_opts end
[ "def", "ssl_opts", "ssl_opts", "=", "OpenSSL", "::", "SSL", "::", "OP_ALL", "ssl_opts", "&=", "~", "OpenSSL", "::", "SSL", "::", "OP_DONT_INSERT_EMPTY_FRAGMENTS", "if", "defined?", "(", "OpenSSL", "::", "SSL", "::", "OP_DONT_INSERT_EMPTY_FRAGMENTS", ")", "ssl_opts...
Disable unsecure ssl Ref: https://www.ruby-lang.org/en/news/2014/10/27/changing-default-settings-of-ext-openssl/
[ "Disable", "unsecure", "ssl", "Ref", ":", "https", ":", "//", "www", ".", "ruby", "-", "lang", ".", "org", "/", "en", "/", "news", "/", "2014", "/", "10", "/", "27", "/", "changing", "-", "default", "-", "settings", "-", "of", "-", "ext", "-", ...
5873d906942770a34f0cf0fed05973ec3240a275
https://github.com/chef/chef-zero/blob/5873d906942770a34f0cf0fed05973ec3240a275/lib/chef_zero/server.rb#L715-L722
train
Returns the ssl options for the current request.
[ 30522, 13366, 7020, 2140, 1035, 23569, 2015, 7020, 2140, 1035, 23569, 2015, 1027, 7480, 14540, 1024, 1024, 7020, 2140, 1024, 1024, 6728, 1035, 2035, 7020, 2140, 1035, 23569, 2015, 1004, 1027, 1066, 7480, 14540, 1024, 1024, 7020, 2140, 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...
roo-rb/roo
lib/roo/excelx.rb
Roo.Excelx.extract_worksheet_rels
def extract_worksheet_rels(entries, path) wb_rels = entries.find { |e| e.name[/workbook.xml.rels$/] } fail ArgumentError 'missing required workbook file' if wb_rels.nil? wb_rels.extract(path) rels_doc = Roo::Utils.load_xml(path).remove_namespaces! relationships = rels_doc.xpath('//Relationship').select do |relationship| worksheet_types.include? relationship['Type'] end relationships.each_with_object({}) do |relationship, hash| hash[relationship['Id']] = relationship['Target'] end end
ruby
def extract_worksheet_rels(entries, path) wb_rels = entries.find { |e| e.name[/workbook.xml.rels$/] } fail ArgumentError 'missing required workbook file' if wb_rels.nil? wb_rels.extract(path) rels_doc = Roo::Utils.load_xml(path).remove_namespaces! relationships = rels_doc.xpath('//Relationship').select do |relationship| worksheet_types.include? relationship['Type'] end relationships.each_with_object({}) do |relationship, hash| hash[relationship['Id']] = relationship['Target'] end end
[ "def", "extract_worksheet_rels", "(", "entries", ",", "path", ")", "wb_rels", "=", "entries", ".", "find", "{", "|", "e", "|", "e", ".", "name", "[", "/", "/", "]", "}", "fail", "ArgumentError", "'missing required workbook file'", "if", "wb_rels", ".", "ni...
Internal wb_rels - A Zip::Entry for the workbook.xml.rels file. path - A String for the Zip::Entry's destination path. Examples extract_worksheets(<Zip::Entry>, 'tmpdir/roo_workbook.xml.rels') # => { "rId1"=>"worksheets/sheet1.xml", "rId2"=>"worksheets/sheet2.xml", "rId3"=>"worksheets/sheet3.xml" } Returns a Hash.
[ "Internal" ]
4ec1104f0c3c2a29711c0c907371cd2be12bcc3c
https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/excelx.rb#L355-L369
train
Extract the workbook relationships from the given workbook file
[ 30522, 13366, 14817, 1035, 2573, 21030, 2102, 1035, 2128, 4877, 1006, 10445, 1010, 4130, 1007, 25610, 1035, 2128, 4877, 1027, 10445, 1012, 2424, 1063, 1064, 1041, 1064, 1041, 1012, 2171, 1031, 1013, 2147, 8654, 1012, 20950, 1012, 2128, 4877...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/authorization_form_helper.rb
Decidim.AuthorizationFormHelper.authorization_form_for
def authorization_form_for(record, options = {}, &block) default_options = { builder: AuthorizationFormBuilder, as: "authorization_handler", url: decidim_verifications.authorizations_path } options = default_options.merge(options) decidim_form_for(record, options, &block) end
ruby
def authorization_form_for(record, options = {}, &block) default_options = { builder: AuthorizationFormBuilder, as: "authorization_handler", url: decidim_verifications.authorizations_path } options = default_options.merge(options) decidim_form_for(record, options, &block) end
[ "def", "authorization_form_for", "(", "record", ",", "options", "=", "{", "}", ",", "&", "block", ")", "default_options", "=", "{", "builder", ":", "AuthorizationFormBuilder", ",", "as", ":", "\"authorization_handler\"", ",", "url", ":", "decidim_verifications", ...
Creates a ew authorization form in a view, accepts the same arguments as `form_for`. record - The record to use in the form, it shoulde be a descendant of AuthorizationHandler. options - An optional hash with options to pass wo the form builder. block - A block with the content of the form. Returns a String.
[ "Creates", "a", "ew", "authorization", "form", "in", "a", "view", "accepts", "the", "same", "arguments", "as", "form_for", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/authorization_form_helper.rb#L15-L24
train
Returns an authorization form for the given record.
[ 30522, 13366, 20104, 1035, 2433, 1035, 2005, 1006, 2501, 1010, 7047, 1027, 1063, 1065, 1010, 1004, 3796, 1007, 12398, 1035, 7047, 1027, 1063, 12508, 1024, 20104, 30524, 4130, 1065, 7047, 1027, 12398, 1035, 7047, 1012, 13590, 1006, 7047, 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...
sinatra/sinatra
sinatra-contrib/lib/sinatra/config_file.rb
Sinatra.ConfigFile.config_file
def config_file(*paths) Dir.chdir(root || '.') do paths.each do |pattern| Dir.glob(pattern) do |file| raise UnsupportedConfigType unless ['.yml', '.erb'].include?(File.extname(file)) logger.info "loading config file '#{file}'" if logging? && respond_to?(:logger) document = ERB.new(IO.read(file)).result yaml = YAML.load(document) config = config_for_env(yaml) config.each_pair { |key, value| set(key, value) } end end end end
ruby
def config_file(*paths) Dir.chdir(root || '.') do paths.each do |pattern| Dir.glob(pattern) do |file| raise UnsupportedConfigType unless ['.yml', '.erb'].include?(File.extname(file)) logger.info "loading config file '#{file}'" if logging? && respond_to?(:logger) document = ERB.new(IO.read(file)).result yaml = YAML.load(document) config = config_for_env(yaml) config.each_pair { |key, value| set(key, value) } end end end end
[ "def", "config_file", "(", "*", "paths", ")", "Dir", ".", "chdir", "(", "root", "||", "'.'", ")", "do", "paths", ".", "each", "do", "|", "pattern", "|", "Dir", ".", "glob", "(", "pattern", ")", "do", "|", "file", "|", "raise", "UnsupportedConfigType"...
Loads the configuration from the YAML files whose +paths+ are passed as arguments, filtering the settings for the current environment. Note that these +paths+ can actually be globs.
[ "Loads", "the", "configuration", "from", "the", "YAML", "files", "whose", "+", "paths", "+", "are", "passed", "as", "arguments", "filtering", "the", "settings", "for", "the", "current", "environment", ".", "Note", "that", "these", "+", "paths", "+", "can", ...
1aa64f9858edc3f93cc8d46e26f724c1ae103b1c
https://github.com/sinatra/sinatra/blob/1aa64f9858edc3f93cc8d46e26f724c1ae103b1c/sinatra-contrib/lib/sinatra/config_file.rb#L120-L133
train
Load config file
[ 30522, 13366, 9530, 8873, 2290, 1035, 5371, 1006, 1008, 10425, 1007, 16101, 1012, 10381, 4305, 2099, 1006, 7117, 1064, 1064, 1005, 1012, 1005, 1007, 2079, 10425, 1012, 2169, 2079, 1064, 5418, 1064, 16101, 1012, 1043, 4135, 2497, 1006, 5418,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ios/element/text.rb
Appium.Ios.text
def text(value) return ele_index static_text_class, value if value.is_a? Numeric ele_by_json_visible_contains static_text_class, value end
ruby
def text(value) return ele_index static_text_class, value if value.is_a? Numeric ele_by_json_visible_contains static_text_class, value end
[ "def", "text", "(", "value", ")", "return", "ele_index", "static_text_class", ",", "value", "if", "value", ".", "is_a?", "Numeric", "ele_by_json_visible_contains", "static_text_class", ",", "value", "end" ]
Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index. @param value [String, Integer] the value to find. If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned. @return [UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
[ "Find", "the", "first", "UIAStaticText|XCUIElementTypeStaticText", "that", "contains", "value", "or", "by", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/element/text.rb#L33-L37
train
Returns the text element that contains the given value.
[ 30522, 13366, 3793, 1006, 3643, 1007, 2709, 3449, 2063, 1035, 5950, 10763, 1035, 3793, 1035, 2465, 1010, 3643, 2065, 3643, 1012, 2003, 1035, 1037, 1029, 16371, 25531, 3449, 2063, 1035, 2011, 1035, 1046, 3385, 1035, 5710, 1035, 3397, 10763, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activesupport/lib/active_support/time_with_zone.rb
ActiveSupport.TimeWithZone.formatted_offset
def formatted_offset(colon = true, alternate_utc_string = nil) utc? && alternate_utc_string || TimeZone.seconds_to_utc_offset(utc_offset, colon) end
ruby
def formatted_offset(colon = true, alternate_utc_string = nil) utc? && alternate_utc_string || TimeZone.seconds_to_utc_offset(utc_offset, colon) end
[ "def", "formatted_offset", "(", "colon", "=", "true", ",", "alternate_utc_string", "=", "nil", ")", "utc?", "&&", "alternate_utc_string", "||", "TimeZone", ".", "seconds_to_utc_offset", "(", "utc_offset", ",", "colon", ")", "end" ]
Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC. Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" Time.zone.now.formatted_offset(true) # => "-05:00" Time.zone.now.formatted_offset(false) # => "-0500" Time.zone = 'UTC' # => "UTC" Time.zone.now.formatted_offset(true, "0") # => "0"
[ "Returns", "a", "formatted", "string", "of", "the", "offset", "from", "UTC", "or", "an", "alternative", "string", "if", "the", "time", "zone", "is", "already", "UTC", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/time_with_zone.rb#L126-L128
train
Returns the formatted offset for this time
[ 30522, 13366, 4289, 3064, 1035, 16396, 1006, 16844, 1027, 2995, 1010, 6585, 1035, 11396, 1035, 5164, 1027, 9152, 2140, 1007, 11396, 1029, 1004, 1004, 6585, 1035, 11396, 1035, 5164, 1064, 1064, 2051, 15975, 1012, 3823, 1035, 2000, 1035, 1139...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ruby2d/ruby2d
lib/ruby2d/window.rb
Ruby2D.Window.set
def set(opts) # Store new window attributes, or ignore if nil @title = opts[:title] || @title if Color.is_valid? opts[:background] @background = Color.new(opts[:background]) end @icon = opts[:icon] || @icon @width = opts[:width] || @width @height = opts[:height] || @height @fps_cap = opts[:fps_cap] || @fps_cap @viewport_width = opts[:viewport_width] || @viewport_width @viewport_height = opts[:viewport_height] || @viewport_height @resizable = opts[:resizable] || @resizable @borderless = opts[:borderless] || @borderless @fullscreen = opts[:fullscreen] || @fullscreen @highdpi = opts[:highdpi] || @highdpi unless opts[:diagnostics].nil? @diagnostics = opts[:diagnostics] ext_diagnostics(@diagnostics) end end
ruby
def set(opts) # Store new window attributes, or ignore if nil @title = opts[:title] || @title if Color.is_valid? opts[:background] @background = Color.new(opts[:background]) end @icon = opts[:icon] || @icon @width = opts[:width] || @width @height = opts[:height] || @height @fps_cap = opts[:fps_cap] || @fps_cap @viewport_width = opts[:viewport_width] || @viewport_width @viewport_height = opts[:viewport_height] || @viewport_height @resizable = opts[:resizable] || @resizable @borderless = opts[:borderless] || @borderless @fullscreen = opts[:fullscreen] || @fullscreen @highdpi = opts[:highdpi] || @highdpi unless opts[:diagnostics].nil? @diagnostics = opts[:diagnostics] ext_diagnostics(@diagnostics) end end
[ "def", "set", "(", "opts", ")", "# Store new window attributes, or ignore if nil", "@title", "=", "opts", "[", ":title", "]", "||", "@title", "if", "Color", ".", "is_valid?", "opts", "[", ":background", "]", "@background", "=", "Color", ".", "new", "(", "opts"...
Set a window attribute
[ "Set", "a", "window", "attribute" ]
43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4
https://github.com/ruby2d/ruby2d/blob/43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4/lib/ruby2d/window.rb#L195-L215
train
Set the window attributes
[ 30522, 13366, 2275, 1006, 23569, 2015, 1007, 1001, 3573, 2047, 3332, 12332, 1010, 2030, 8568, 2065, 9152, 2140, 1030, 2516, 1027, 23569, 2015, 1031, 1024, 2516, 1033, 1064, 1064, 1030, 2516, 2065, 3609, 1012, 2003, 1035, 9398, 1029, 23569, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
github-changelog-generator/github-changelog-generator
lib/github_changelog_generator/generator/entry.rb
GitHubChangelogGenerator.Entry.add_unmapped_section
def add_unmapped_section(issues) unless issues.empty? # Distinguish between issues and pull requests if issues.first.key?("pull_request") name = "merged" prefix = @options[:merge_prefix] add_wo_labels = @options[:add_pr_wo_labels] else name = "issues" prefix = @options[:issue_prefix] add_wo_labels = @options[:add_issues_wo_labels] end add_issues = if add_wo_labels issues else # Only add unmapped issues issues.select { |issue| issue["labels"].any? } end merged = Section.new(name: name, prefix: prefix, labels: [], issues: add_issues, options: @options) unless add_issues.empty? @sections << merged end nil end
ruby
def add_unmapped_section(issues) unless issues.empty? # Distinguish between issues and pull requests if issues.first.key?("pull_request") name = "merged" prefix = @options[:merge_prefix] add_wo_labels = @options[:add_pr_wo_labels] else name = "issues" prefix = @options[:issue_prefix] add_wo_labels = @options[:add_issues_wo_labels] end add_issues = if add_wo_labels issues else # Only add unmapped issues issues.select { |issue| issue["labels"].any? } end merged = Section.new(name: name, prefix: prefix, labels: [], issues: add_issues, options: @options) unless add_issues.empty? @sections << merged end nil end
[ "def", "add_unmapped_section", "(", "issues", ")", "unless", "issues", ".", "empty?", "# Distinguish between issues and pull requests", "if", "issues", ".", "first", ".", "key?", "(", "\"pull_request\"", ")", "name", "=", "\"merged\"", "prefix", "=", "@options", "["...
Creates a section for issues/PRs with no labels or no mapped labels. @param [Array] issues @return [Nil]
[ "Creates", "a", "section", "for", "issues", "/", "PRs", "with", "no", "labels", "or", "no", "mapped", "labels", "." ]
f18c64b5cc0d7473b059275b88385ac11ca8b564
https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/entry.rb#L185-L207
train
Add a section to the list of unmapped issues
[ 30522, 13366, 5587, 1035, 4895, 2863, 11469, 1035, 2930, 1006, 3314, 1007, 4983, 3314, 1012, 4064, 1029, 1001, 10782, 2090, 3314, 1998, 4139, 11186, 2065, 3314, 1012, 2034, 1012, 3145, 1029, 1006, 1000, 4139, 1035, 5227, 1000, 1007, 2171, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb
Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.get_tag_with_http_info
def get_tag_with_http_info(project_id, tag_id, iteration_id:nil, custom_headers:nil) get_tag_async(project_id, tag_id, iteration_id:iteration_id, custom_headers:custom_headers).value! end
ruby
def get_tag_with_http_info(project_id, tag_id, iteration_id:nil, custom_headers:nil) get_tag_async(project_id, tag_id, iteration_id:iteration_id, custom_headers:custom_headers).value! end
[ "def", "get_tag_with_http_info", "(", "project_id", ",", "tag_id", ",", "iteration_id", ":", "nil", ",", "custom_headers", ":", "nil", ")", "get_tag_async", "(", "project_id", ",", "tag_id", ",", "iteration_id", ":iteration_id", ",", "custom_headers", ":custom_heade...
Get information about a specific tag. @param project_id The project this tag belongs to. @param tag_id The tag id. @param iteration_id The iteration to retrieve this tag from. Optional, defaults to current training set. @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", "information", "about", "a", "specific", "tag", "." ]
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#L4227-L4229
train
Gets the content of the specified tag.
[ 30522, 13366, 2131, 1035, 6415, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2622, 1035, 8909, 1010, 6415, 1035, 8909, 1010, 27758, 1035, 8909, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 30524, 7661, 1035, 20346, 2015, 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...
fluent/fluentd
lib/fluent/event.rb
Fluent.MessagePackEventStream.slice
def slice(index, num) ensure_unpacked! MultiEventStream.new(@unpacked_times.slice(index, num), @unpacked_records.slice(index, num)) end
ruby
def slice(index, num) ensure_unpacked! MultiEventStream.new(@unpacked_times.slice(index, num), @unpacked_records.slice(index, num)) end
[ "def", "slice", "(", "index", ",", "num", ")", "ensure_unpacked!", "MultiEventStream", ".", "new", "(", "@unpacked_times", ".", "slice", "(", "index", ",", "num", ")", ",", "@unpacked_records", ".", "slice", "(", "index", ",", "num", ")", ")", "end" ]
This method returns MultiEventStream, because there are no reason to surve binary serialized by msgpack.
[ "This", "method", "returns", "MultiEventStream", "because", "there", "are", "no", "reason", "to", "surve", "binary", "serialized", "by", "msgpack", "." ]
add2af9a5b7f74fc36957b8e6138b3c5a2871a92
https://github.com/fluent/fluentd/blob/add2af9a5b7f74fc36957b8e6138b3c5a2871a92/lib/fluent/event.rb#L248-L251
train
Slice the stream into the specified index and num records.
[ 30522, 13366, 14704, 1006, 5950, 1010, 16371, 2213, 1007, 5676, 1035, 4895, 23947, 2098, 999, 4800, 18697, 7666, 25379, 1012, 2047, 1006, 1030, 4895, 23947, 2098, 1035, 2335, 1012, 14704, 1006, 5950, 1010, 16371, 2213, 1007, 1010, 1030, 489...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_operations.rb
Azure::CognitiveServices::Face::V1_0.LargePersonGroupOperations.create
def create(large_person_group_id, name:nil, user_data:nil, recognition_model:nil, custom_headers:nil) response = create_async(large_person_group_id, name:name, user_data:user_data, recognition_model:recognition_model, custom_headers:custom_headers).value! nil end
ruby
def create(large_person_group_id, name:nil, user_data:nil, recognition_model:nil, custom_headers:nil) response = create_async(large_person_group_id, name:name, user_data:user_data, recognition_model:recognition_model, custom_headers:custom_headers).value! nil end
[ "def", "create", "(", "large_person_group_id", ",", "name", ":", "nil", ",", "user_data", ":", "nil", ",", "recognition_model", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_async", "(", "large_person_group_id", ",", "name", ":",...
Create a new large person group with user-specified largePersonGroupId, name, an optional userData and recognitionModel. <br /> A large person group is the container of the uploaded person data, including face images and face recognition feature, and up to 1,000,000 people. <br /> After creation, use [LargePersonGroup Person - Create](/docs/services/563879b61984550e40cbbe8d/operations/599adcba3a7b9412a4d53f40) to add person into the group, and call [LargePersonGroup - Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4) to get this group ready for [Face - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). <br /> The person face, image, and userData will be stored on server until [LargePersonGroup Person - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) or [LargePersonGroup - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) is called. <br /> * Free-tier subscription quota: 1,000 large person groups. * S0-tier subscription quota: 1,000,000 large person groups. <br /> 'recognitionModel' should be specified to associate with this large person group. The default value for 'recognitionModel' is 'recognition_01', if the latest model needed, please explicitly specify the model you need in this parameter. New faces that are added to an existing large person group will use the recognition model that's already associated with the collection. Existing face features in a large person group can't be updated to features extracted by another version of recognition model. @param large_person_group_id [String] Id referencing a particular large person group. @param name [String] User defined name, maximum length is 128. @param user_data [String] User specified data. Length should not exceed 16KB. @param recognition_model [RecognitionModel] Possible values include: 'recognition_01', 'recognition_02' @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Create", "a", "new", "large", "person", "group", "with", "user", "-", "specified", "largePersonGroupId", "name", "an", "optional", "userData", "and", "recognitionModel", ".", "<br", "/", ">", "A", "large", "person", "group", "is", "the", "container", "of", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_operations.rb#L65-L68
train
Creates a new large person group.
[ 30522, 13366, 3443, 1006, 2312, 1035, 2711, 1035, 2177, 1035, 8909, 1010, 2171, 1024, 9152, 2140, 1010, 5310, 1035, 2951, 1024, 9152, 2140, 1010, 5038, 1035, 2944, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb
Azure::KeyVault::V2016_10_01.KeyVaultClient.get_storage_accounts_with_http_info
def get_storage_accounts_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil) get_storage_accounts_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value! end
ruby
def get_storage_accounts_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil) get_storage_accounts_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value! end
[ "def", "get_storage_accounts_with_http_info", "(", "vault_base_url", ",", "maxresults", ":", "nil", ",", "custom_headers", ":", "nil", ")", "get_storage_accounts_async", "(", "vault_base_url", ",", "maxresults", ":", "maxresults", ",", "custom_headers", ":custom_headers",...
List storage accounts managed by the specified key vault. This operation requires the storage/list permission. @param vault_base_url [String] The vault name, for example https://myvault.vault.azure.net. @param maxresults [Integer] Maximum number of results to return in a page. If not specified the service will return up to 25 results. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "List", "storage", "accounts", "managed", "by", "the", "specified", "key", "vault", ".", "This", "operation", "requires", "the", "storage", "/", "list", "permission", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L6988-L6990
train
Gets the storage accounts associated with the specified vault.
[ 30522, 13366, 2131, 1035, 5527, 1035, 6115, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 4098, 6072, 11314, 2015, 1024, 9152, 2140, 1010, 7661, 30524, 1035, 5527, 1035, 6115, 1035, 2004, 6038, 2278,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
colszowka/simplecov
lib/simplecov/source_file.rb
SimpleCov.SourceFile.process_skipped_lines
def process_skipped_lines(lines) skipping = false lines.each do |line| if SimpleCov::LinesClassifier.no_cov_line?(line.src) skipping = !skipping line.skipped! elsif skipping line.skipped! end end end
ruby
def process_skipped_lines(lines) skipping = false lines.each do |line| if SimpleCov::LinesClassifier.no_cov_line?(line.src) skipping = !skipping line.skipped! elsif skipping line.skipped! end end end
[ "def", "process_skipped_lines", "(", "lines", ")", "skipping", "=", "false", "lines", ".", "each", "do", "|", "line", "|", "if", "SimpleCov", "::", "LinesClassifier", ".", "no_cov_line?", "(", "line", ".", "src", ")", "skipping", "=", "!", "skipping", "lin...
Will go through all source files and mark lines that are wrapped within # :nocov: comment blocks as skipped.
[ "Will", "go", "through", "all", "source", "files", "and", "mark", "lines", "that", "are", "wrapped", "within", "#", ":", "nocov", ":", "comment", "blocks", "as", "skipped", "." ]
8f6978a2513f10c4dd8d7dd7eed666fe3f2b55c2
https://github.com/colszowka/simplecov/blob/8f6978a2513f10c4dd8d7dd7eed666fe3f2b55c2/lib/simplecov/source_file.rb#L181-L192
train
process skipped lines
[ 30522, 13366, 2832, 1035, 16791, 1035, 3210, 1006, 3210, 1007, 25978, 1027, 6270, 3210, 1012, 2169, 2079, 1064, 2240, 1064, 2065, 3722, 3597, 2615, 1024, 1024, 3210, 26266, 18095, 1012, 2053, 1035, 2522, 2615, 1035, 2240, 1029, 1006, 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...
tongueroo/jets
lib/jets/middleware/default_stack.rb
Jets::Middleware.DefaultStack.use_webpacker
def use_webpacker(middleware) return unless Jets.webpacker? # checks for local development if webpacker installed # Different check for middleware because we need webpacker helpers for url helpers. # But we dont want to actually serve via webpacker middleware when running on AWS. # By this time the url helpers are serving assets out of s3. return if File.exist?("#{Jets.root}/config/disable-webpacker-middleware.txt") # created as part of `jets deploy` require "jets/controller/middleware/webpacker_setup" middleware.use Webpacker::DevServerProxy end
ruby
def use_webpacker(middleware) return unless Jets.webpacker? # checks for local development if webpacker installed # Different check for middleware because we need webpacker helpers for url helpers. # But we dont want to actually serve via webpacker middleware when running on AWS. # By this time the url helpers are serving assets out of s3. return if File.exist?("#{Jets.root}/config/disable-webpacker-middleware.txt") # created as part of `jets deploy` require "jets/controller/middleware/webpacker_setup" middleware.use Webpacker::DevServerProxy end
[ "def", "use_webpacker", "(", "middleware", ")", "return", "unless", "Jets", ".", "webpacker?", "# checks for local development if webpacker installed", "# Different check for middleware because we need webpacker helpers for url helpers.", "# But we dont want to actually serve via webpacker m...
Written as method to easily not include webpacker for case when either webpacker not installed at all or disabled upon `jets deploy`.
[ "Written", "as", "method", "to", "easily", "not", "include", "webpacker", "for", "case", "when", "either", "webpacker", "not", "installed", "at", "all", "or", "disabled", "upon", "jets", "deploy", "." ]
46943a519224067e58aa3e2d5656e3ca083150f9
https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/middleware/default_stack.rb#L30-L38
train
Use webpacker middleware
[ 30522, 13366, 2224, 1035, 4773, 23947, 2121, 1006, 2690, 8059, 1007, 2709, 4983, 9924, 1012, 4773, 23947, 2121, 1029, 1001, 14148, 2005, 2334, 2458, 2065, 4773, 23947, 2121, 5361, 1001, 2367, 4638, 2005, 2690, 8059, 2138, 2057, 2342, 4773, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-rds/lib/aws-sdk-rds/db_instance.rb
Aws::RDS.DBInstance.create_snapshot
def create_snapshot(options = {}) options = options.merge(db_instance_identifier: @id) resp = @client.create_db_snapshot(options) DBSnapshot.new( instance_id: resp.data.db_snapshot.db_instance_identifier, snapshot_id: resp.data.db_snapshot.db_snapshot_identifier, data: resp.data.db_snapshot, client: @client ) end
ruby
def create_snapshot(options = {}) options = options.merge(db_instance_identifier: @id) resp = @client.create_db_snapshot(options) DBSnapshot.new( instance_id: resp.data.db_snapshot.db_instance_identifier, snapshot_id: resp.data.db_snapshot.db_snapshot_identifier, data: resp.data.db_snapshot, client: @client ) end
[ "def", "create_snapshot", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "db_instance_identifier", ":", "@id", ")", "resp", "=", "@client", ".", "create_db_snapshot", "(", "options", ")", "DBSnapshot", ".", "new", "(", "i...
@example Request syntax with placeholder values dbsnapshot = db_instance.create_snapshot({ db_snapshot_identifier: "String", # required tags: [ { key: "String", value: "String", }, ], }) @param [Hash] options ({}) @option options [required, String] :db_snapshot_identifier The identifier for the DB snapshot. Constraints: * Can't be null, empty, or blank * Must contain from 1 to 255 letters, numbers, or hyphens * First character must be a letter * Can't end with a hyphen or contain two consecutive hyphens Example: `my-snapshot-id` @option options [Array<Types::Tag>] :tags A list of tags. For more information, see [Tagging Amazon RDS Resources][1] in the *Amazon RDS User Guide.* [1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html @return [DBSnapshot]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_instance.rb#L1765-L1774
train
Create a snapshot of this database
[ 30522, 13366, 3443, 1035, 20057, 12326, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 16962, 1035, 6013, 1035, 8909, 4765, 18095, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 16962, 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...
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_image_store_root_content
def get_image_store_root_content(timeout:60, custom_headers:nil) response = get_image_store_root_content_async(timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_image_store_root_content(timeout:60, custom_headers:nil) response = get_image_store_root_content_async(timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_image_store_root_content", "(", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_image_store_root_content_async", "(", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ...
Gets the content information at the root of the image store. Returns the information about the image store content at the root of the image store. @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 [ImageStoreContent] operation results.
[ "Gets", "the", "content", "information", "at", "the", "root", "of", "the", "image", "store", "." ]
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#L19516-L19519
train
Gets the root content of the image store.
[ 30522, 13366, 2131, 1035, 3746, 1035, 3573, 1035, 7117, 1035, 4180, 1006, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 30524, 1012, 3643, 999, 3433, 1012, 2303, 4983, 3433, 1012, 9152, 2140, 1029, 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_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/rules.rb
Azure::ServiceBus::Mgmt::V2017_04_01.Rules.list_by_subscriptions_with_http_info
def list_by_subscriptions_with_http_info(resource_group_name, namespace_name, topic_name, subscription_name, skip:nil, top:nil, custom_headers:nil) list_by_subscriptions_async(resource_group_name, namespace_name, topic_name, subscription_name, skip:skip, top:top, custom_headers:custom_headers).value! end
ruby
def list_by_subscriptions_with_http_info(resource_group_name, namespace_name, topic_name, subscription_name, skip:nil, top:nil, custom_headers:nil) list_by_subscriptions_async(resource_group_name, namespace_name, topic_name, subscription_name, skip:skip, top:top, custom_headers:custom_headers).value! end
[ "def", "list_by_subscriptions_with_http_info", "(", "resource_group_name", ",", "namespace_name", ",", "topic_name", ",", "subscription_name", ",", "skip", ":", "nil", ",", "top", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_by_subscriptions_async", "(", ...
List all the rules within given topic-subscription @param resource_group_name [String] Name of the Resource group within the Azure subscription. @param namespace_name [String] The namespace name @param topic_name [String] The topic name. @param subscription_name [String] The subscription name. @param skip [Integer] Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @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.
[ "List", "all", "the", "rules", "within", "given", "topic", "-", "subscription" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/rules.rb#L67-L69
train
Gets the list of all the documents in a subscription.
[ 30522, 13366, 2862, 1035, 2011, 1035, 15002, 2015, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3415, 15327, 1035, 2171, 1010, 8476, 1035, 2171, 1010, 15002, 1035, 2171, 1010, 13558, 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...
hashicorp/vagrant
lib/vagrant/environment.rb
Vagrant.Environment.setup_home_path
def setup_home_path @logger.info("Home path: #{@home_path}") # Setup the list of child directories that need to be created if they # don't already exist. dirs = [ @home_path, @home_path.join("rgloader"), @boxes_path, @data_dir, @gems_path, @tmp_path, @machine_index_dir, ] # Go through each required directory, creating it if it doesn't exist dirs.each do |dir| next if File.directory?(dir) begin @logger.info("Creating: #{dir}") FileUtils.mkdir_p(dir) rescue Errno::EACCES raise Errors::HomeDirectoryNotAccessible, home_path: @home_path.to_s end end # Attempt to write into the home directory to verify we can begin # Append a random suffix to avoid race conditions if Vagrant # is running in parallel with other Vagrant processes. suffix = (0...32).map { (65 + rand(26)).chr }.join path = @home_path.join("perm_test_#{suffix}") path.open("w") do |f| f.write("hello") end path.unlink rescue Errno::EACCES raise Errors::HomeDirectoryNotAccessible, home_path: @home_path.to_s end # Create the version file that we use to track the structure of # the home directory. If we have an old version, we need to explicitly # upgrade it. Otherwise, we just mark that its the current version. version_file = @home_path.join("setup_version") if version_file.file? version = version_file.read.chomp if version > CURRENT_SETUP_VERSION raise Errors::HomeDirectoryLaterVersion end case version when CURRENT_SETUP_VERSION # We're already good, at the latest version. when "1.1" # We need to update our directory structure upgrade_home_path_v1_1 # Delete the version file so we put our latest version in version_file.delete else raise Errors::HomeDirectoryUnknownVersion, path: @home_path.to_s, version: version end end if !version_file.file? @logger.debug( "Creating home directory version file: #{CURRENT_SETUP_VERSION}") version_file.open("w") do |f| f.write(CURRENT_SETUP_VERSION) end end # Create the rgloader/loader file so we can use encoded files. loader_file = @home_path.join("rgloader", "loader.rb") if !loader_file.file? source_loader = Vagrant.source_root.join("templates/rgloader.rb") FileUtils.cp(source_loader.to_s, loader_file.to_s) end end
ruby
def setup_home_path @logger.info("Home path: #{@home_path}") # Setup the list of child directories that need to be created if they # don't already exist. dirs = [ @home_path, @home_path.join("rgloader"), @boxes_path, @data_dir, @gems_path, @tmp_path, @machine_index_dir, ] # Go through each required directory, creating it if it doesn't exist dirs.each do |dir| next if File.directory?(dir) begin @logger.info("Creating: #{dir}") FileUtils.mkdir_p(dir) rescue Errno::EACCES raise Errors::HomeDirectoryNotAccessible, home_path: @home_path.to_s end end # Attempt to write into the home directory to verify we can begin # Append a random suffix to avoid race conditions if Vagrant # is running in parallel with other Vagrant processes. suffix = (0...32).map { (65 + rand(26)).chr }.join path = @home_path.join("perm_test_#{suffix}") path.open("w") do |f| f.write("hello") end path.unlink rescue Errno::EACCES raise Errors::HomeDirectoryNotAccessible, home_path: @home_path.to_s end # Create the version file that we use to track the structure of # the home directory. If we have an old version, we need to explicitly # upgrade it. Otherwise, we just mark that its the current version. version_file = @home_path.join("setup_version") if version_file.file? version = version_file.read.chomp if version > CURRENT_SETUP_VERSION raise Errors::HomeDirectoryLaterVersion end case version when CURRENT_SETUP_VERSION # We're already good, at the latest version. when "1.1" # We need to update our directory structure upgrade_home_path_v1_1 # Delete the version file so we put our latest version in version_file.delete else raise Errors::HomeDirectoryUnknownVersion, path: @home_path.to_s, version: version end end if !version_file.file? @logger.debug( "Creating home directory version file: #{CURRENT_SETUP_VERSION}") version_file.open("w") do |f| f.write(CURRENT_SETUP_VERSION) end end # Create the rgloader/loader file so we can use encoded files. loader_file = @home_path.join("rgloader", "loader.rb") if !loader_file.file? source_loader = Vagrant.source_root.join("templates/rgloader.rb") FileUtils.cp(source_loader.to_s, loader_file.to_s) end end
[ "def", "setup_home_path", "@logger", ".", "info", "(", "\"Home path: #{@home_path}\"", ")", "# Setup the list of child directories that need to be created if they", "# don't already exist.", "dirs", "=", "[", "@home_path", ",", "@home_path", ".", "join", "(", "\"rgloader\"", ...
--------------------------------------------------------------- Load Methods --------------------------------------------------------------- This sets the `@home_path` variable properly. @return [Pathname]
[ "---------------------------------------------------------------", "Load", "Methods", "---------------------------------------------------------------", "This", "sets", "the", "@home_path", "variable", "properly", "." ]
c22a145c59790c098f95d50141d9afb48e1ef55f
https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/environment.rb#L804-L885
train
Setup the home directory for the current version of the project.
[ 30522, 13366, 16437, 1035, 2188, 1035, 4130, 1030, 8833, 4590, 1012, 18558, 1006, 1000, 2188, 4130, 1024, 1001, 1063, 1030, 2188, 1035, 4130, 1065, 1000, 1007, 1001, 16437, 1996, 2862, 1997, 2775, 2472, 3111, 2008, 2342, 2000, 2022, 2580, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/2017-10-01/generated/azure_mgmt_redis/redis.rb
Azure::Redis::Mgmt::V2017_10_01.Redis.create_async
def create_async(resource_group_name, name, parameters, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Redis::Mgmt::V2017_10_01::Models::RedisResource.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_async(resource_group_name, name, parameters, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Redis::Mgmt::V2017_10_01::Models::RedisResource.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_async", "(", "resource_group_name", ",", "name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_create_async", "(", "resource_group_name", ",", "name", ",", "parameters", ",", "custom_headers", ":cu...
@param resource_group_name [String] The name of the resource group. @param name [String] The name of the Redis cache. @param parameters [RedisCreateParameters] Parameters supplied to the Create Redis operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", ".", "@param", "name", "[", "String", "]", "The", "name", "of", "the", "Redis", "cache", ".", "@param", "parameters", "[", "RedisCreateParameters", "]", "Pa...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-10-01/generated/azure_mgmt_redis/redis.rb#L242-L258
train
Creates a new Redis cluster.
[ 30522, 13366, 3443, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, 1035, 3443, 1035, 2004, 6038, 2278, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb
Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10.ReplicationNetworkMappings.begin_create_with_http_info
def begin_create_with_http_info(fabric_name, network_name, network_mapping_name, input, custom_headers:nil) begin_create_async(fabric_name, network_name, network_mapping_name, input, custom_headers:custom_headers).value! end
ruby
def begin_create_with_http_info(fabric_name, network_name, network_mapping_name, input, custom_headers:nil) begin_create_async(fabric_name, network_name, network_mapping_name, input, custom_headers:custom_headers).value! end
[ "def", "begin_create_with_http_info", "(", "fabric_name", ",", "network_name", ",", "network_mapping_name", ",", "input", ",", "custom_headers", ":", "nil", ")", "begin_create_async", "(", "fabric_name", ",", "network_name", ",", "network_mapping_name", ",", "input", ...
Creates network mapping. The operation to create an ASR network mapping. @param fabric_name [String] Primary fabric name. @param network_name [String] Primary network name. @param network_mapping_name [String] Network mapping name. @param input [CreateNetworkMappingInput] Create network mapping input. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Creates", "network", "mapping", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb#L491-L493
train
Creates a network mapping in the specified fabric.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 8313, 1035, 2171, 1010, 2897, 1035, 2171, 1010, 2897, 1035, 12375, 1035, 2171, 1010, 7953, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, 1035, 3443, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_delete
def begin_delete(resource_group_name, circuit_name, custom_headers:nil) response = begin_delete_async(resource_group_name, circuit_name, custom_headers:custom_headers).value! nil end
ruby
def begin_delete(resource_group_name, circuit_name, custom_headers:nil) response = begin_delete_async(resource_group_name, circuit_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_delete", "(", "resource_group_name", ",", "circuit_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_delete_async", "(", "resource_group_name", ",", "circuit_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil",...
Deletes 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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "the", "specified", "express", "route", "circuit", "." ]
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#L756-L759
train
Deletes the specified ExpressRouteCircuit.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4984, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kpumuk/meta-tags
lib/meta_tags/meta_tags_collection.rb
MetaTags.MetaTagsCollection.append_noarchive_attribute
def append_noarchive_attribute(noindex) noarchive_name, noarchive_value = extract_noindex_attribute :noarchive if noarchive_value if noindex[noarchive_name].blank? noindex[noarchive_name] = noarchive_value else noindex[noarchive_name] += ", #{noarchive_value}" end end noindex end
ruby
def append_noarchive_attribute(noindex) noarchive_name, noarchive_value = extract_noindex_attribute :noarchive if noarchive_value if noindex[noarchive_name].blank? noindex[noarchive_name] = noarchive_value else noindex[noarchive_name] += ", #{noarchive_value}" end end noindex end
[ "def", "append_noarchive_attribute", "(", "noindex", ")", "noarchive_name", ",", "noarchive_value", "=", "extract_noindex_attribute", ":noarchive", "if", "noarchive_value", "if", "noindex", "[", "noarchive_name", "]", ".", "blank?", "noindex", "[", "noarchive_name", "]"...
Append noarchive attribute if it present. @param [Hash<String, String>] noindex noindex attributes. @return [Hash<String, String>] modified noindex attributes.
[ "Append", "noarchive", "attribute", "if", "it", "present", "." ]
03585f95edf96cd17024c5c155ce46ec8bc47232
https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/meta_tags_collection.rb#L211-L221
train
Append noarchive attribute to noindex
[ 30522, 13366, 10439, 10497, 1035, 2053, 2906, 5428, 3726, 1035, 17961, 1006, 2053, 22254, 10288, 1007, 2053, 2906, 5428, 3726, 1035, 2171, 1010, 2053, 2906, 5428, 3726, 1035, 3643, 1027, 14817, 1035, 2053, 22254, 10288, 1035, 17961, 1024, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
randym/axlsx
lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb
Axlsx.ConditionalFormattingRule.to_xml_string
def to_xml_string(str = '') str << '<cfRule ' serialized_attributes str str << '>' str << ('<formula>' << [*self.formula].join('</formula><formula>') << '</formula>') if @formula @color_scale.to_xml_string(str) if @color_scale && @type == :colorScale @data_bar.to_xml_string(str) if @data_bar && @type == :dataBar @icon_set.to_xml_string(str) if @icon_set && @type == :iconSet str << '</cfRule>' end
ruby
def to_xml_string(str = '') str << '<cfRule ' serialized_attributes str str << '>' str << ('<formula>' << [*self.formula].join('</formula><formula>') << '</formula>') if @formula @color_scale.to_xml_string(str) if @color_scale && @type == :colorScale @data_bar.to_xml_string(str) if @data_bar && @type == :dataBar @icon_set.to_xml_string(str) if @icon_set && @type == :iconSet str << '</cfRule>' end
[ "def", "to_xml_string", "(", "str", "=", "''", ")", "str", "<<", "'<cfRule '", "serialized_attributes", "str", "str", "<<", "'>'", "str", "<<", "(", "'<formula>'", "<<", "[", "self", ".", "formula", "]", ".", "join", "(", "'</formula><formula>'", ")", "<<"...
Serializes the conditional formatting rule @param [String] str @return [String]
[ "Serializes", "the", "conditional", "formatting", "rule" ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb#L209-L218
train
Serialize the rule to XML string
[ 30522, 13366, 2000, 1035, 20950, 1035, 5164, 1006, 2358, 2099, 1027, 1005, 1005, 1007, 2358, 2099, 1026, 1026, 1005, 1026, 12935, 6820, 2571, 1005, 27289, 1035, 12332, 2358, 2099, 2358, 2099, 1026, 1026, 1005, 1028, 1005, 2358, 2099, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/storage_accounts.rb
Azure::Storage::Mgmt::V2018_11_01.StorageAccounts.begin_create_with_http_info
def begin_create_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil) begin_create_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil) begin_create_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_with_http_info", "(", "resource_group_name", ",", "account_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_async", "(", "resource_group_name", ",", "account_name", ",", "parameters", ",", "custom_headers", ":custom_head...
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. @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 parameters [StorageAccountCreateParameters] The parameters to provide for the created 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.
[ "Asynchronously", "creates", "a", "new", "storage", "account", "with", "the", "specified", "parameters", ".", "If", "an", "account", "is", "already", "created", "and", "a", "subsequent", "create", "request", "is", "issued", "with", "different", "properties", "th...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb#L1404-L1406
train
Creates a new centralized product.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, 1035, 3443, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb
Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainerMappings.list_by_replication_protection_containers_as_lazy
def list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers:nil) response = list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers:nil) response = list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_replication_protection_containers_as_lazy", "(", "fabric_name", ",", "protection_container_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_replication_protection_containers_async", "(", "fabric_name", ",", "protection_container_name", ",",...
Gets the list of protection container mappings for a protection container. Lists the protection container mappings for a protection container. @param fabric_name [String] Fabric name. @param protection_container_name [String] Protection container name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ProtectionContainerMappingCollection] which provide lazy access to pages of the response.
[ "Gets", "the", "list", "of", "protection", "container", "mappings", "for", "a", "protection", "container", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb#L1140-L1149
train
Gets the list of all the containers in a service fabric.
[ 30522, 13366, 2862, 1035, 2011, 1035, 21647, 1035, 3860, 1035, 16143, 1035, 2004, 1035, 13971, 1006, 8313, 1035, 2171, 1010, 3860, 1035, 11661, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
castwide/solargraph
lib/solargraph/api_map.rb
Solargraph.ApiMap.get_methods
def get_methods fqns, scope: :instance, visibility: [:public], deep: true cached = cache.get_methods(fqns, scope, visibility, deep) return cached.clone unless cached.nil? result = [] skip = [] if fqns == '' # @todo Implement domains # domains.each do |domain| # type = ComplexType.parse(domain).first # result.concat inner_get_methods(type.name, type.scope, [:public], deep, skip) # end result.concat inner_get_methods(fqns, :class, visibility, deep, skip) result.concat inner_get_methods(fqns, :instance, visibility, deep, skip) result.concat inner_get_methods('Kernel', :instance, visibility, deep, skip) else result.concat inner_get_methods(fqns, scope, visibility, deep, skip) end # live = live_map.get_methods(fqns, '', scope.to_s, visibility.include?(:private)) # unless live.empty? # exist = result.map(&:name) # result.concat live.reject{|p| exist.include?(p.name)} # end resolved = resolve_method_aliases(result) cache.set_methods(fqns, scope, visibility, deep, resolved) resolved end
ruby
def get_methods fqns, scope: :instance, visibility: [:public], deep: true cached = cache.get_methods(fqns, scope, visibility, deep) return cached.clone unless cached.nil? result = [] skip = [] if fqns == '' # @todo Implement domains # domains.each do |domain| # type = ComplexType.parse(domain).first # result.concat inner_get_methods(type.name, type.scope, [:public], deep, skip) # end result.concat inner_get_methods(fqns, :class, visibility, deep, skip) result.concat inner_get_methods(fqns, :instance, visibility, deep, skip) result.concat inner_get_methods('Kernel', :instance, visibility, deep, skip) else result.concat inner_get_methods(fqns, scope, visibility, deep, skip) end # live = live_map.get_methods(fqns, '', scope.to_s, visibility.include?(:private)) # unless live.empty? # exist = result.map(&:name) # result.concat live.reject{|p| exist.include?(p.name)} # end resolved = resolve_method_aliases(result) cache.set_methods(fqns, scope, visibility, deep, resolved) resolved end
[ "def", "get_methods", "fqns", ",", "scope", ":", ":instance", ",", "visibility", ":", "[", ":public", "]", ",", "deep", ":", "true", "cached", "=", "cache", ".", "get_methods", "(", "fqns", ",", "scope", ",", "visibility", ",", "deep", ")", "return", "...
Get an array of methods available in a particular context. @param fqns [String] The fully qualified namespace to search for methods @param scope [Symbol] :class or :instance @param visibility [Array<Symbol>] :public, :protected, and/or :private @param deep [Boolean] True to include superclasses, mixins, etc. @return [Array<Solargraph::Pin::Base>]
[ "Get", "an", "array", "of", "methods", "available", "in", "a", "particular", "context", "." ]
47badb5d151aca775ccbe6c470236089eae7839d
https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/api_map.rb#L278-L303
train
Get all methods in the given fqns.
[ 30522, 13366, 2131, 1035, 4725, 1042, 4160, 3619, 1010, 9531, 1024, 1024, 6013, 1010, 16476, 1024, 1031, 1024, 2270, 1033, 1010, 2784, 1024, 2995, 17053, 2094, 1027, 17053, 1012, 2131, 1035, 4725, 1006, 1042, 4160, 3619, 1010, 9531, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb
Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "parameters", ",", "cu...
Create or update a VM scale set. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set to create or update. @param parameters [VirtualMachineScaleSet] The scale set object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Create", "or", "update", "a", "VM", "scale", "set", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1267-L1269
train
Creates or updates a virtual machine scale set.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 30524, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2004, 6038, 2278, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb
Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.add_storage_account
def add_storage_account(resource_group_name, account_name, storage_account_name, parameters, custom_headers:nil) response = add_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers:custom_headers).value! nil end
ruby
def add_storage_account(resource_group_name, account_name, storage_account_name, parameters, custom_headers:nil) response = add_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers:custom_headers).value! nil end
[ "def", "add_storage_account", "(", "resource_group_name", ",", "account_name", ",", "storage_account_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "add_storage_account_async", "(", "resource_group_name", ",", "account_name", ",", "st...
Updates the specified Data Lake Analytics account to add an Azure Storage account. @param resource_group_name [String] The name of the Azure resource group that contains the Data Lake Analytics account. @param account_name [String] The name of the Data Lake Analytics account to which to add the Azure Storage account. @param storage_account_name [String] The name of the Azure Storage account to add @param parameters [AddStorageAccountParameters] The parameters containing the access key and optional suffix for the Azure Storage Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Updates", "the", "specified", "Data", "Lake", "Analytics", "account", "to", "add", "an", "Azure", "Storage", "account", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb#L353-L356
train
Adds a storage account to the specified Data Lake Store account.
[ 30522, 13366, 5587, 1035, 5527, 1035, 4070, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 5527, 1035, 4070, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 5587, 1035, 5527, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb
Azure::KeyVault::V2016_10_01.KeyVaultClient.delete_sas_definition
def delete_sas_definition(vault_base_url, storage_account_name, sas_definition_name, custom_headers:nil) response = delete_sas_definition_async(vault_base_url, storage_account_name, sas_definition_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def delete_sas_definition(vault_base_url, storage_account_name, sas_definition_name, custom_headers:nil) response = delete_sas_definition_async(vault_base_url, storage_account_name, sas_definition_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "delete_sas_definition", "(", "vault_base_url", ",", "storage_account_name", ",", "sas_definition_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_sas_definition_async", "(", "vault_base_url", ",", "storage_account_name", ",", "sas_definition_n...
Deletes a SAS definition from a specified storage account. This operation requires the storage/deletesas permission. @param vault_base_url [String] The vault name, for example https://myvault.vault.azure.net. @param storage_account_name [String] The name of the storage account. @param sas_definition_name [String] The name of the SAS definition. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [SasDefinitionBundle] operation results.
[ "Deletes", "a", "SAS", "definition", "from", "a", "specified", "storage", "account", ".", "This", "operation", "requires", "the", "storage", "/", "deletesas", "permission", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L7779-L7782
train
Deletes the specified SAS definition.
[ 30522, 13366, 3972, 12870, 1035, 21871, 1035, 6210, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 5527, 1035, 4070, 1035, 2171, 1010, 21871, 1035, 6210, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_person.rb
Azure::CognitiveServices::Face::V1_0.LargePersonGroupPerson.delete
def delete(large_person_group_id, person_id, custom_headers:nil) response = delete_async(large_person_group_id, person_id, custom_headers:custom_headers).value! nil end
ruby
def delete(large_person_group_id, person_id, custom_headers:nil) response = delete_async(large_person_group_id, person_id, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "large_person_group_id", ",", "person_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "large_person_group_id", ",", "person_id", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", "end" ]
Delete an existing person from a large person group. All stored person data, and face features in the person entry will be deleted. @param large_person_group_id [String] Id referencing a particular large person group. @param person_id Id referencing a particular person. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Delete", "an", "existing", "person", "from", "a", "large", "person", "group", ".", "All", "stored", "person", "data", "and", "face", "features", "in", "the", "person", "entry", "will", "be", "deleted", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_person.rb#L276-L279
train
Deletes a person from a large person group.
[ 30522, 13366, 3972, 12870, 1006, 2312, 1035, 2711, 1035, 2177, 1035, 8909, 1010, 2711, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 2312, 1035, 2711, 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...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_regex_entity_role
def delete_regex_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil) response = delete_regex_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def delete_regex_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil) response = delete_regex_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "delete_regex_entity_role", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "role_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_regex_entity_role_async", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "role_id", ",...
Delete a role for a given regular expression in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param entity_id The entity ID. @param role_id The entity role Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [OperationStatus] operation results.
[ "Delete", "a", "role", "for", "a", "given", "regular", "expression", "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#L9932-L9935
train
Deletes a regex entity role.
[ 30522, 13366, 3972, 12870, 1035, 19723, 10288, 1035, 9178, 1035, 2535, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 1035, 8909, 1010, 2535, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_recovery_services_backup/lib/2017-07-01/generated/azure_mgmt_recovery_services_backup/protection_intent_operations.rb
Azure::RecoveryServicesBackup::Mgmt::V2017_07_01.ProtectionIntentOperations.create_or_update_with_http_info
def create_or_update_with_http_info(vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers:nil) create_or_update_async(vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers:custom_headers).value! end
ruby
def create_or_update_with_http_info(vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers:nil) create_or_update_async(vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers:custom_headers).value! end
[ "def", "create_or_update_with_http_info", "(", "vault_name", ",", "resource_group_name", ",", "fabric_name", ",", "intent_object_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "create_or_update_async", "(", "vault_name", ",", "resource_group_name", ",",...
Create Intent for Enabling backup of an item. This is a synchronous operation. @param vault_name [String] The name of the recovery services vault. @param resource_group_name [String] The name of the resource group where the recovery services vault is present. @param fabric_name [String] Fabric name associated with the backup item. @param intent_object_name [String] Intent object name. @param parameters [ProtectionIntentResource] resource backed up item @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Create", "Intent", "for", "Enabling", "backup", "of", "an", "item", ".", "This", "is", "a", "synchronous", "operation", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2017-07-01/generated/azure_mgmt_recovery_services_backup/protection_intent_operations.rb#L174-L176
train
Creates or updates an intent object in the specified vault.
[ 30522, 13366, 3443, 30524, 2171, 1010, 8313, 1035, 2171, 1010, 7848, 1035, 4874, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3443, 1035, 2030, 1035, 10651, 1035, 2004, 6038, 2278, 1006, 11632, 1035, 2171,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb
Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.delete
def delete(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) response = delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) response = delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "server_name", ",", "disaster_recovery_configuration_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "server_name", ",", "disaster_recovery_configuration_name"...
Deletes a disaster recovery configuration. @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 disaster_recovery_configuration_name [String] The name of the disaster recovery configuration to be deleted. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "a", "disaster", "recovery", "configuration", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L137-L140
train
Deletes a disaster recovery configuration.
[ 30522, 13366, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7071, 1035, 7233, 1035, 9563, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
plaid/plaid-ruby
lib/plaid/products/transactions.rb
Plaid.Transactions.get
def get(access_token, start_date, end_date, account_ids: nil, count: nil, offset: nil, options: nil) options_payload = {} options_payload[:account_ids] = account_ids unless account_ids.nil? options_payload[:count] = count unless count.nil? options_payload[:offset] = offset unless offset.nil? options_payload.merge!(options) unless options.nil? post_with_auth 'transactions/get', GetResponse, access_token: access_token, start_date: Plaid.convert_to_date_string(start_date), end_date: Plaid.convert_to_date_string(end_date), options: options_payload end
ruby
def get(access_token, start_date, end_date, account_ids: nil, count: nil, offset: nil, options: nil) options_payload = {} options_payload[:account_ids] = account_ids unless account_ids.nil? options_payload[:count] = count unless count.nil? options_payload[:offset] = offset unless offset.nil? options_payload.merge!(options) unless options.nil? post_with_auth 'transactions/get', GetResponse, access_token: access_token, start_date: Plaid.convert_to_date_string(start_date), end_date: Plaid.convert_to_date_string(end_date), options: options_payload end
[ "def", "get", "(", "access_token", ",", "start_date", ",", "end_date", ",", "account_ids", ":", "nil", ",", "count", ":", "nil", ",", "offset", ":", "nil", ",", "options", ":", "nil", ")", "options_payload", "=", "{", "}", "options_payload", "[", ":accou...
Public: Get information about transactions Does a POST /transactions/get call which gives you high level account data along with transactions from all accounts contained in the access_token's item. access_token - access_token who's item to fetch transactions for. start_date - Start of query for transactions. end_date - End of query for transactions. account_ids - Specific account ids to fetch balances for (optional). count - Amount of transactions to pull (optional). offset - Offset to start pulling transactions (optional). options - Additional options to merge into API request. Returns GetResponse.
[ "Public", ":", "Get", "information", "about", "transactions" ]
ce3da1c5559c739de88c5f59e54eef875f296673
https://github.com/plaid/plaid-ruby/blob/ce3da1c5559c739de88c5f59e54eef875f296673/lib/plaid/products/transactions.rb#L21-L36
train
Get transactions
[ 30522, 13366, 2131, 1006, 3229, 1035, 19204, 1010, 2707, 1035, 3058, 1010, 2203, 1035, 3058, 1010, 4070, 1035, 8909, 2015, 1024, 9152, 2140, 1010, 4175, 1024, 9152, 2140, 1010, 16396, 1024, 9152, 2140, 1010, 7047, 1024, 9152, 2140, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jeremytregunna/ruby-trello
lib/trello/card.rb
Trello.Card.update_fields
def update_fields(fields) attributes[:id] = fields[SYMBOL_TO_STRING[:id]] || attributes[:id] attributes[:short_id] = fields[SYMBOL_TO_STRING[:short_id]] || attributes[:short_id] attributes[:name] = fields[SYMBOL_TO_STRING[:name]] || fields[:name] || attributes[:name] attributes[:desc] = fields[SYMBOL_TO_STRING[:desc]] || fields[:desc] || attributes[:desc] attributes[:due] = Time.iso8601(fields[SYMBOL_TO_STRING[:due]]) rescue nil if fields.has_key?(SYMBOL_TO_STRING[:due]) attributes[:due] = fields[:due] if fields.has_key?(:due) attributes[:due_complete] = fields[SYMBOL_TO_STRING[:due_complete]] if fields.has_key?(SYMBOL_TO_STRING[:due_complete]) attributes[:due_complete] ||= false attributes[:closed] = fields[SYMBOL_TO_STRING[:closed]] if fields.has_key?(SYMBOL_TO_STRING[:closed]) attributes[:url] = fields[SYMBOL_TO_STRING[:url]] || attributes[:url] attributes[:short_url] = fields[SYMBOL_TO_STRING[:short_url]] || attributes[:short_url] attributes[:board_id] = fields[SYMBOL_TO_STRING[:board_id]] || attributes[:board_id] attributes[:member_ids] = fields[SYMBOL_TO_STRING[:member_ids]] || fields[:member_ids] || attributes[:member_ids] attributes[:list_id] = fields[SYMBOL_TO_STRING[:list_id]] || fields[:list_id] || attributes[:list_id] attributes[:pos] = fields[SYMBOL_TO_STRING[:pos]] || fields[:pos] || attributes[:pos] attributes[:labels] = (fields[SYMBOL_TO_STRING[:labels]] || []).map { |lbl| Trello::Label.new(lbl) }.presence || attributes[:labels].presence || [] attributes[:card_labels] = fields[SYMBOL_TO_STRING[:card_labels]] || fields[:card_labels] || attributes[:card_labels] attributes[:last_activity_date] = Time.iso8601(fields[SYMBOL_TO_STRING[:last_activity_date]]) rescue nil if fields.has_key?(SYMBOL_TO_STRING[:last_activity_date]) attributes[:cover_image_id] = fields[SYMBOL_TO_STRING[:cover_image_id]] || attributes[:cover_image_id] attributes[:badges] = fields[SYMBOL_TO_STRING[:badges]] || attributes[:badges] attributes[:card_members] = fields[SYMBOL_TO_STRING[:card_members]] || attributes[:card_members] attributes[:source_card_id] = fields[SYMBOL_TO_STRING[:source_card_id]] || fields[:source_card_id] || attributes[:source_card_id] attributes[:source_card_properties] = fields[SYMBOL_TO_STRING[:source_card_properties]] || fields[:source_card_properties] || attributes[:source_card_properties] self end
ruby
def update_fields(fields) attributes[:id] = fields[SYMBOL_TO_STRING[:id]] || attributes[:id] attributes[:short_id] = fields[SYMBOL_TO_STRING[:short_id]] || attributes[:short_id] attributes[:name] = fields[SYMBOL_TO_STRING[:name]] || fields[:name] || attributes[:name] attributes[:desc] = fields[SYMBOL_TO_STRING[:desc]] || fields[:desc] || attributes[:desc] attributes[:due] = Time.iso8601(fields[SYMBOL_TO_STRING[:due]]) rescue nil if fields.has_key?(SYMBOL_TO_STRING[:due]) attributes[:due] = fields[:due] if fields.has_key?(:due) attributes[:due_complete] = fields[SYMBOL_TO_STRING[:due_complete]] if fields.has_key?(SYMBOL_TO_STRING[:due_complete]) attributes[:due_complete] ||= false attributes[:closed] = fields[SYMBOL_TO_STRING[:closed]] if fields.has_key?(SYMBOL_TO_STRING[:closed]) attributes[:url] = fields[SYMBOL_TO_STRING[:url]] || attributes[:url] attributes[:short_url] = fields[SYMBOL_TO_STRING[:short_url]] || attributes[:short_url] attributes[:board_id] = fields[SYMBOL_TO_STRING[:board_id]] || attributes[:board_id] attributes[:member_ids] = fields[SYMBOL_TO_STRING[:member_ids]] || fields[:member_ids] || attributes[:member_ids] attributes[:list_id] = fields[SYMBOL_TO_STRING[:list_id]] || fields[:list_id] || attributes[:list_id] attributes[:pos] = fields[SYMBOL_TO_STRING[:pos]] || fields[:pos] || attributes[:pos] attributes[:labels] = (fields[SYMBOL_TO_STRING[:labels]] || []).map { |lbl| Trello::Label.new(lbl) }.presence || attributes[:labels].presence || [] attributes[:card_labels] = fields[SYMBOL_TO_STRING[:card_labels]] || fields[:card_labels] || attributes[:card_labels] attributes[:last_activity_date] = Time.iso8601(fields[SYMBOL_TO_STRING[:last_activity_date]]) rescue nil if fields.has_key?(SYMBOL_TO_STRING[:last_activity_date]) attributes[:cover_image_id] = fields[SYMBOL_TO_STRING[:cover_image_id]] || attributes[:cover_image_id] attributes[:badges] = fields[SYMBOL_TO_STRING[:badges]] || attributes[:badges] attributes[:card_members] = fields[SYMBOL_TO_STRING[:card_members]] || attributes[:card_members] attributes[:source_card_id] = fields[SYMBOL_TO_STRING[:source_card_id]] || fields[:source_card_id] || attributes[:source_card_id] attributes[:source_card_properties] = fields[SYMBOL_TO_STRING[:source_card_properties]] || fields[:source_card_properties] || attributes[:source_card_properties] self end
[ "def", "update_fields", "(", "fields", ")", "attributes", "[", ":id", "]", "=", "fields", "[", "SYMBOL_TO_STRING", "[", ":id", "]", "]", "||", "attributes", "[", ":id", "]", "attributes", "[", ":short_id", "]", "=", "fields", "[", "SYMBOL_TO_STRING", "[", ...
Update the fields of a card. Supply a hash of string keyed data retrieved from the Trello API representing a card. Note that this this method does not save anything new to the Trello API, it just assigns the input attributes to your local object. If you use this method to assign attributes, call `save` or `update!` afterwards if you want to persist your changes to Trello. @param [Hash] fields @option fields [String] :id @option fields [String] :short_id @option fields [String] :name The new name of the card. @option fields [String] :desc A string with a length from 0 to 16384. @option fields [Date] :due A date, or `nil`. @option fields [Boolean] :due_complete @option fields [Boolean] :closed @option fields [String] :url @option fields [String] :short_url @option fields [String] :board_id @option fields [String] :member_ids A comma-separated list of objectIds (24-character hex strings). @option fields [String] :pos A position. `"top"`, `"bottom"`, or a positive number. Defaults to `"bottom"`. @option fields [Array] :labels An Array of Trello::Label objects derived from the JSON response @option fields [String] :card_labels A comma-separated list of objectIds (24-character hex strings). @option fields [Object] :cover_image_id @option fields [Object] :badges @option fields [Object] :card_members @option fields [String] :source_card_id @option fields [Array] :source_card_properties @return [Trello::Card] self
[ "Update", "the", "fields", "of", "a", "card", "." ]
ad79c9d8152ad5395b3b61c43170908f1912bfb2
https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/card.rb#L171-L196
train
Update the attributes of a record
[ 30522, 13366, 10651, 1035, 4249, 1006, 4249, 1007, 12332, 1031, 1024, 8909, 1033, 1027, 4249, 1031, 6454, 1035, 2000, 1035, 5164, 1031, 1024, 8909, 1033, 1033, 1064, 1064, 12332, 1031, 1024, 8909, 1033, 12332, 1031, 1024, 2460, 1035, 8909, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.CloudAppliances.list_supported_configurations
def list_supported_configurations(resource_group_name, manager_name, custom_headers:nil) response = list_supported_configurations_async(resource_group_name, manager_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_supported_configurations(resource_group_name, manager_name, custom_headers:nil) response = list_supported_configurations_async(resource_group_name, manager_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_supported_configurations", "(", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_supported_configurations_async", "(", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":custom_headers", ...
Lists supported cloud appliance models and supported configurations. @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 [CloudApplianceConfigurationList] operation results.
[ "Lists", "supported", "cloud", "appliance", "models", "and", "supported", "configurations", "." ]
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/cloud_appliances.rb#L34-L37
train
Gets the list of supported configurations for the manager.
[ 30522, 13366, 2862, 1035, 3569, 1035, 22354, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 3569, 1035, 22354, 1035, 2004, 6038, 2278, 1006, 7692, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/github
lib/github_api/client/git_data/references.rb
Github.Client::GitData::References.update
def update(*args) arguments(args, required: [:user, :repo, :ref]) do permit VALID_REF_PARAM_NAMES assert_required %w[ sha ] end patch_request("/repos/#{arguments.user}/#{arguments.repo}/git/refs/#{arguments.ref}", arguments.params) end
ruby
def update(*args) arguments(args, required: [:user, :repo, :ref]) do permit VALID_REF_PARAM_NAMES assert_required %w[ sha ] end patch_request("/repos/#{arguments.user}/#{arguments.repo}/git/refs/#{arguments.ref}", arguments.params) end
[ "def", "update", "(", "*", "args", ")", "arguments", "(", "args", ",", "required", ":", "[", ":user", ",", ":repo", ",", ":ref", "]", ")", "do", "permit", "VALID_REF_PARAM_NAMES", "assert_required", "%w[", "sha", "]", "end", "patch_request", "(", "\"/repos...
Update a reference @param [Hash] params @input params [String] :sha The SHA1 value to set this reference to @input params [Boolean] :force Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to false will make sure you’re not overwriting work. Default: false @example github = Github.new github.git_data.references.update 'user-name', 'repo-name', 'heads/master', sha: "827efc6d56897b048c772eb4087f854f46256132", force: true @api public
[ "Update", "a", "reference" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/git_data/references.rb#L113-L120
train
Update a reference
[ 30522, 13366, 10651, 1006, 1008, 12098, 5620, 1007, 9918, 1006, 12098, 5620, 1010, 3223, 1024, 1031, 1024, 5310, 1010, 1024, 16360, 2080, 1010, 1024, 25416, 1033, 1007, 2079, 9146, 9398, 1035, 25416, 1035, 11498, 2213, 1035, 3415, 20865, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_closed_list_entity_roles_with_http_info
def list_closed_list_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil) list_closed_list_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value! end
ruby
def list_closed_list_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil) list_closed_list_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value! end
[ "def", "list_closed_list_entity_roles_with_http_info", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "custom_headers", ":", "nil", ")", "list_closed_list_entity_roles_async", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "custom_headers", ":custom_he...
Get all roles for a list entity in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param entity_id entity Id @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Get", "all", "roles", "for", "a", "list", "entity", "in", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L6594-L6596
train
Gets the roles of the entity.
[ 30522, 13366, 2862, 1035, 2701, 1035, 2862, 1035, 9178, 1035, 4395, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2862, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_formatter.rb
Phonelib.PhoneFormatter.national
def national(formatted = true) return @national_number unless valid? format_match, format_string = formatting_data if format_match out = format_string.gsub(/\$\d/) { |el| format_match[el[1].to_i] } formatted ? out : out.gsub(/[^0-9]/, '') else @national_number end end
ruby
def national(formatted = true) return @national_number unless valid? format_match, format_string = formatting_data if format_match out = format_string.gsub(/\$\d/) { |el| format_match[el[1].to_i] } formatted ? out : out.gsub(/[^0-9]/, '') else @national_number end end
[ "def", "national", "(", "formatted", "=", "true", ")", "return", "@national_number", "unless", "valid?", "format_match", ",", "format_string", "=", "formatting_data", "if", "format_match", "out", "=", "format_string", ".", "gsub", "(", "/", "\\$", "\\d", "/", ...
Returns formatted national number @param formatted [Boolean] whether to return numbers only or formatted @return [String] formatted national number
[ "Returns", "formatted", "national", "number" ]
aa0023eab7c896b71275bf342bc7f49735cbdbbf
https://github.com/daddyz/phonelib/blob/aa0023eab7c896b71275bf342bc7f49735cbdbbf/lib/phonelib/phone_formatter.rb#L7-L17
train
Returns the national number for this language
[ 30522, 13366, 2120, 1006, 4289, 3064, 1027, 2995, 1007, 2709, 1030, 2120, 1035, 2193, 4983, 9398, 1029, 4289, 1035, 2674, 1010, 4289, 1035, 5164, 1027, 4289, 3436, 1035, 2951, 2065, 4289, 1035, 2674, 2041, 1027, 4289, 1035, 5164, 1012, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
heroku/legacy-cli
lib/heroku/command/buildpacks.rb
Heroku::Command.Buildpacks.index
def index validate_arguments! app_buildpacks = api.get_app_buildpacks_v3(app)[:body] if app_buildpacks.nil? or app_buildpacks.empty? display("#{app} has no Buildpack URL set.") else styled_header("#{app} Buildpack URL#{app_buildpacks.size > 1 ? 's' : ''}") display_buildpacks(app_buildpacks.map{|bp| bp["buildpack"]["url"]}, "") end end
ruby
def index validate_arguments! app_buildpacks = api.get_app_buildpacks_v3(app)[:body] if app_buildpacks.nil? or app_buildpacks.empty? display("#{app} has no Buildpack URL set.") else styled_header("#{app} Buildpack URL#{app_buildpacks.size > 1 ? 's' : ''}") display_buildpacks(app_buildpacks.map{|bp| bp["buildpack"]["url"]}, "") end end
[ "def", "index", "validate_arguments!", "app_buildpacks", "=", "api", ".", "get_app_buildpacks_v3", "(", "app", ")", "[", ":body", "]", "if", "app_buildpacks", ".", "nil?", "or", "app_buildpacks", ".", "empty?", "display", "(", "\"#{app} has no Buildpack URL set.\"", ...
buildpacks display the buildpack_url(s) for an app Examples: $ heroku buildpacks https://github.com/heroku/heroku-buildpack-ruby
[ "buildpacks" ]
6f18521a258394bfb79e6b36f7160ad8559a8e16
https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/buildpacks.rb#L19-L30
train
Returns the index of the buildpacks for the current app.
[ 30522, 13366, 5950, 9398, 3686, 1035, 9918, 999, 10439, 1035, 3857, 23947, 2015, 1027, 17928, 1012, 2131, 1035, 10439, 1035, 3857, 23947, 2015, 1035, 1058, 2509, 1006, 10439, 1007, 1031, 1024, 2303, 1033, 2065, 10439, 1035, 3857, 23947, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hashicorp/vagrant
lib/vagrant/box_metadata.rb
Vagrant.BoxMetadata.version
def version(version, **opts) requirements = version.split(",").map do |v| Gem::Requirement.new(v.strip) end providers = nil providers = Array(opts[:provider]).map(&:to_sym) if opts[:provider] @version_map.keys.sort.reverse.each do |v| next if !requirements.all? { |r| r.satisfied_by?(v) } version = Version.new(@version_map[v]) next if (providers & version.providers).empty? if providers return version end nil end
ruby
def version(version, **opts) requirements = version.split(",").map do |v| Gem::Requirement.new(v.strip) end providers = nil providers = Array(opts[:provider]).map(&:to_sym) if opts[:provider] @version_map.keys.sort.reverse.each do |v| next if !requirements.all? { |r| r.satisfied_by?(v) } version = Version.new(@version_map[v]) next if (providers & version.providers).empty? if providers return version end nil end
[ "def", "version", "(", "version", ",", "**", "opts", ")", "requirements", "=", "version", ".", "split", "(", "\",\"", ")", ".", "map", "do", "|", "v", "|", "Gem", "::", "Requirement", ".", "new", "(", "v", ".", "strip", ")", "end", "providers", "="...
Loads the metadata associated with the box from the given IO. @param [IO] io An IO object to read the metadata from. Returns data about a single version that is included in this metadata. @param [String] version The version to return, this can also be a constraint. @return [Version] The matching version or nil if a matching version was not found.
[ "Loads", "the", "metadata", "associated", "with", "the", "box", "from", "the", "given", "IO", "." ]
c22a145c59790c098f95d50141d9afb48e1ef55f
https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/box_metadata.rb#L51-L67
train
Returns the version object for the given version.
[ 30522, 13366, 2544, 1006, 2544, 1010, 1008, 1008, 23569, 2015, 1007, 5918, 1027, 2544, 1012, 3975, 1006, 1000, 1010, 1000, 1007, 1012, 4949, 2079, 1064, 1058, 1064, 17070, 1024, 1024, 9095, 1012, 2047, 1006, 1058, 1012, 6167, 1007, 2203, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb
Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_multi_role_metrics_with_http_info
def list_multi_role_metrics_with_http_info(resource_group_name, name, start_time:nil, end_time:nil, time_grain:nil, details:nil, filter:nil, custom_headers:nil) list_multi_role_metrics_async(resource_group_name, name, start_time:start_time, end_time:end_time, time_grain:time_grain, details:details, filter:filter, custom_headers:custom_headers).value! end
ruby
def list_multi_role_metrics_with_http_info(resource_group_name, name, start_time:nil, end_time:nil, time_grain:nil, details:nil, filter:nil, custom_headers:nil) list_multi_role_metrics_async(resource_group_name, name, start_time:start_time, end_time:end_time, time_grain:time_grain, details:details, filter:filter, custom_headers:custom_headers).value! end
[ "def", "list_multi_role_metrics_with_http_info", "(", "resource_group_name", ",", "name", ",", "start_time", ":", "nil", ",", "end_time", ":", "nil", ",", "time_grain", ":", "nil", ",", "details", ":", "nil", ",", "filter", ":", "nil", ",", "custom_headers", "...
Get metrics for a multi-role pool of an App Service Environment. Get metrics for a multi-role pool of an App Service Environment. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param start_time [String] Beginning time of the metrics query. @param end_time [String] End time of the metrics query. @param time_grain [String] Time granularity of the metrics query. @param details [Boolean] Specify <code>true</code> to include instance details. The default is <code>false</code>. @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 [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Get", "metrics", "for", "a", "multi", "-", "role", "pool", "of", "an", "App", "Service", "Environment", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L2058-L2060
train
Gets metrics for a multi - role group.
[ 30522, 13366, 2862, 1035, 4800, 1035, 2535, 1035, 12046, 2015, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 2707, 1035, 2051, 1024, 9152, 2140, 1010, 2203, 1035, 2051, 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...
projectcypress/health-data-standards
lib/hqmf-model/document.rb
HQMF.Document.attributes_for_code
def attributes_for_code(code, code_system) @attributes.find_all { |e| e.send(:code) == code && e.send(:code_obj).send(:system) == code_system } end
ruby
def attributes_for_code(code, code_system) @attributes.find_all { |e| e.send(:code) == code && e.send(:code_obj).send(:system) == code_system } end
[ "def", "attributes_for_code", "(", "code", ",", "code_system", ")", "@attributes", ".", "find_all", "{", "|", "e", "|", "e", ".", "send", "(", ":code", ")", "==", "code", "&&", "e", ".", "send", "(", ":code_obj", ")", ".", "send", "(", ":system", ")"...
Get specific attributes by code. @param [String] code the attribute code @param [String] code_system the attribute code system @return [Array#Attribute] the matching attributes, raises an Exception if not found
[ "Get", "specific", "attributes", "by", "code", "." ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-model/document.rb#L183-L185
train
Returns the attributes for the given code and code_system
[ 30522, 13366, 12332, 1035, 2005, 30524, 4604, 1006, 1024, 3642, 1007, 1027, 1027, 3642, 1004, 1004, 1041, 1012, 4604, 1006, 1024, 3642, 1035, 27885, 3501, 1007, 1012, 4604, 1006, 1024, 2291, 1007, 1027, 1027, 3642, 1035, 2291, 1065, 2203, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2016-09-01/generated/azure_mgmt_web/app_service_environments.rb
Azure::Web::Mgmt::V2016_09_01.AppServiceEnvironments.create_or_update_multi_role_pool_async
def create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) # Send request promise = begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_09_01::Models::WorkerPoolResource.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_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) # Send request promise = begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2016_09_01::Models::WorkerPoolResource.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_multi_role_pool_async", "(", "resource_group_name", ",", "name", ",", "multi_role_pool_envelope", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_create_or_update_multi_role_pool_async", "(", "resource_group_name", ",", ...
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "Name", "of", "the", "resource", "group", "to", "which", "the", "resource", "belongs", ".", "@param", "name", "[", "String", "]", "Name", "of", "the", "App", "Service", "Environment", ".", "@param", "multi...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2016-09-01/generated/azure_mgmt_web/app_service_environments.rb#L1453-L1469
train
Creates or updates a multi - role pool.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 4800, 1035, 2535, 1035, 4770, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 4800, 1035, 2535, 1035, 4770, 1035, 11255, 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...
meew0/discordrb
lib/discordrb/cache.rb
Discordrb.Cache.ensure_user
def ensure_user(data) if @users.include?(data['id'].to_i) @users[data['id'].to_i] else @users[data['id'].to_i] = User.new(data, self) end end
ruby
def ensure_user(data) if @users.include?(data['id'].to_i) @users[data['id'].to_i] else @users[data['id'].to_i] = User.new(data, self) end end
[ "def", "ensure_user", "(", "data", ")", "if", "@users", ".", "include?", "(", "data", "[", "'id'", "]", ".", "to_i", ")", "@users", "[", "data", "[", "'id'", "]", ".", "to_i", "]", "else", "@users", "[", "data", "[", "'id'", "]", ".", "to_i", "]"...
Ensures a given user object is cached and if not, cache it from the given data hash. @param data [Hash] A data hash representing a user. @return [User] the user represented by the data hash.
[ "Ensures", "a", "given", "user", "object", "is", "cached", "and", "if", "not", "cache", "it", "from", "the", "given", "data", "hash", "." ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/cache.rb#L149-L155
train
Ensure that the user with the given data is valid
[ 30522, 13366, 5676, 1035, 5310, 1006, 2951, 1007, 2065, 1030, 5198, 1012, 2421, 1029, 1006, 2951, 1031, 1005, 8909, 1005, 1033, 1012, 2000, 1035, 1045, 1007, 1030, 5198, 1031, 2951, 1031, 1005, 8909, 1005, 1033, 1012, 2000, 1035, 1045, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb
Azure::Logic::Mgmt::V2016_06_01.Workflows.list_callback_url_with_http_info
def list_callback_url_with_http_info(resource_group_name, workflow_name, list_callback_url, custom_headers:nil) list_callback_url_async(resource_group_name, workflow_name, list_callback_url, custom_headers:custom_headers).value! end
ruby
def list_callback_url_with_http_info(resource_group_name, workflow_name, list_callback_url, custom_headers:nil) list_callback_url_async(resource_group_name, workflow_name, list_callback_url, custom_headers:custom_headers).value! end
[ "def", "list_callback_url_with_http_info", "(", "resource_group_name", ",", "workflow_name", ",", "list_callback_url", ",", "custom_headers", ":", "nil", ")", "list_callback_url_async", "(", "resource_group_name", ",", "workflow_name", ",", "list_callback_url", ",", "custom...
Get the workflow callback Url. @param resource_group_name [String] The resource group name. @param workflow_name [String] The workflow name. @param list_callback_url [GetCallbackUrlParameters] Which callback url to list. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Get", "the", "workflow", "callback", "Url", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L890-L892
train
Gets the callback URL for the workflow.
[ 30522, 13366, 2862, 1035, 2655, 5963, 1035, 24471, 2140, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2147, 12314, 1035, 2171, 1010, 2862, 1035, 2655, 5963, 1035, 24471, 2140, 1010, 7661, 1035, 20346, 2015,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb
Azure::SQL::Mgmt::V2015_05_01_preview.FailoverGroups.begin_failover
def begin_failover(resource_group_name, server_name, failover_group_name, custom_headers:nil) response = begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_failover(resource_group_name, server_name, failover_group_name, custom_headers:nil) response = begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_failover", "(", "resource_group_name", ",", "server_name", ",", "failover_group_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_failover_async", "(", "resource_group_name", ",", "server_name", ",", "failover_group_name", ",", "custom...
Fails over from the current primary server to this server. @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 containing the failover group. @param failover_group_name [String] The name of the failover group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [FailoverGroup] operation results.
[ "Fails", "over", "from", "the", "current", "primary", "server", "to", "this", "server", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb#L834-L837
train
Gets the next chunk of a failover group.
[ 30522, 13366, 4088, 1035, 8246, 7840, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 8246, 7840, 1035, 2177, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 8246, 7840, 1035, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
actionpack/lib/action_controller/metal/rendering.rb
ActionController.Rendering.render_to_string
def render_to_string(*) result = super if result.respond_to?(:each) string = +"" result.each { |r| string << r } string else result end end
ruby
def render_to_string(*) result = super if result.respond_to?(:each) string = +"" result.each { |r| string << r } string else result end end
[ "def", "render_to_string", "(", "*", ")", "result", "=", "super", "if", "result", ".", "respond_to?", "(", ":each", ")", "string", "=", "+", "\"\"", "result", ".", "each", "{", "|", "r", "|", "string", "<<", "r", "}", "string", "else", "result", "end...
Overwrite render_to_string because body can now be set to a Rack body.
[ "Overwrite", "render_to_string", "because", "body", "can", "now", "be", "set", "to", "a", "Rack", "body", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_controller/metal/rendering.rb#L40-L49
train
Returns the string representation of the page.
[ 30522, 13366, 17552, 1035, 2000, 1035, 5164, 1006, 1008, 1007, 2765, 1027, 3565, 2065, 2765, 1012, 6869, 1035, 2000, 1029, 1006, 1024, 2169, 1007, 5164, 1027, 1009, 1000, 1000, 2765, 1012, 2169, 1063, 1064, 1054, 1064, 5164, 1026, 1026, 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_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/kpi.rb
Azure::CustomerInsights::Mgmt::V2017_01_01.Kpi.get_with_http_info
def get_with_http_info(resource_group_name, hub_name, kpi_name, custom_headers:nil) get_async(resource_group_name, hub_name, kpi_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, hub_name, kpi_name, custom_headers:nil) get_async(resource_group_name, hub_name, kpi_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "hub_name", ",", "kpi_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "hub_name", ",", "kpi_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!"...
Gets a KPI in the hub. @param resource_group_name [String] The name of the resource group. @param hub_name [String] The name of the hub. @param kpi_name [String] The name of the KPI. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "a", "KPI", "in", "the", "hub", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/kpi.rb#L102-L104
train
Gets the specified KPI.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9594, 1035, 2171, 1010, 1047, 8197, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 2004, 6038, 2278, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face_list_operations.rb
Azure::CognitiveServices::Face::V1_0.FaceListOperations.delete_face
def delete_face(face_list_id, persisted_face_id, custom_headers:nil) response = delete_face_async(face_list_id, persisted_face_id, custom_headers:custom_headers).value! nil end
ruby
def delete_face(face_list_id, persisted_face_id, custom_headers:nil) response = delete_face_async(face_list_id, persisted_face_id, custom_headers:custom_headers).value! nil end
[ "def", "delete_face", "(", "face_list_id", ",", "persisted_face_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_face_async", "(", "face_list_id", ",", "persisted_face_id", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", "en...
Delete an existing face from a face list (given by a persistedFaceId and a faceListId). Persisted image related to the face will also be deleted. @param face_list_id [String] Id referencing a particular face list. @param persisted_face_id Id referencing a particular persistedFaceId of an existing face. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Delete", "an", "existing", "face", "from", "a", "face", "list", "(", "given", "by", "a", "persistedFaceId", "and", "a", "faceListId", ")", ".", "Persisted", "image", "related", "to", "the", "face", "will", "also", "be", "deleted", "." ]
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#L622-L625
train
Deletes a persisted face from the face list.
[ 30522, 13366, 3972, 12870, 1035, 2227, 1006, 2227, 1035, 2862, 1035, 8909, 1010, 19035, 1035, 2227, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2227, 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
management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb
Azure::ApiManagement::Mgmt::V2016_10_10.GroupUsers.list_by_groups_as_lazy
def list_by_groups_as_lazy(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) response = list_by_groups_async(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_groups_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_groups_as_lazy(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil) response = list_by_groups_async(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_groups_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_groups_as_lazy", "(", "resource_group_name", ",", "service_name", ",", "group_id", ",", "filter", ":", "nil", ",", "top", ":", "nil", ",", "skip", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_groups_async", "(",...
Lists a collection of the members of the group, specified by its identifier. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param group_id [String] Group identifier. Must be unique in the current API Management service instance. @param filter [String] | Field | Supported operators | Supported functions | |------------------|------------------------|-----------------------------------| | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | state | eq | N/A | | registrationDate | ge, le, eq, ne, gt, lt | N/A | | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [UserCollection] which provide lazy access to pages of the response.
[ "Lists", "a", "collection", "of", "the", "members", "of", "the", "group", "specified", "by", "its", "identifier", "." ]
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/group_users.rb#L537-L546
train
Gets the list of all the image objects in a group.
[ 30522, 13366, 2862, 1035, 2011, 1035, 2967, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 2177, 1035, 8909, 1010, 11307, 1024, 9152, 2140, 1010, 2327, 1024, 9152, 2140, 1010, 13558, 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...