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
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.update_service
def update_service(service_id, service_update_description, timeout:60, custom_headers:nil) response = update_service_async(service_id, service_update_description, timeout:timeout, custom_headers:custom_headers).value! nil end
ruby
def update_service(service_id, service_update_description, timeout:60, custom_headers:nil) response = update_service_async(service_id, service_update_description, timeout:timeout, custom_headers:custom_headers).value! nil end
[ "def", "update_service", "(", "service_id", ",", "service_update_description", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_service_async", "(", "service_id", ",", "service_update_description", ",", "timeout", ":", "tim...
Updates a Service Fabric service using the specified update description. This API allows updating properties of a running Service Fabric service. The set of properties that can be updated are a subset of the properties that were specified at the time of creating the service. The current set of properties can be ob...
[ "Updates", "a", "Service", "Fabric", "service", "using", "the", "specified", "update", "description", "." ]
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#L10548-L10551
train
Updates a service.
[ 30522, 13366, 10651, 1035, 2326, 1006, 2326, 1035, 8909, 1010, 2326, 1035, 10651, 1035, 6412, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, 2326, 1035, 2004, 6038, 2278, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activesupport/lib/active_support/time_with_zone.rb
ActiveSupport.TimeWithZone.to_s
def to_s(format = :default) if format == :db utc.to_s(format) elsif formatter = ::Time::DATE_FORMATS[format] formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter) else "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking...
ruby
def to_s(format = :default) if format == :db utc.to_s(format) elsif formatter = ::Time::DATE_FORMATS[format] formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter) else "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking...
[ "def", "to_s", "(", "format", "=", ":default", ")", "if", "format", "==", ":db", "utc", ".", "to_s", "(", "format", ")", "elsif", "formatter", "=", "::", "Time", "::", "DATE_FORMATS", "[", "format", "]", "formatter", ".", "respond_to?", "(", ":call", "...
Returns a string of the object's date and time. Accepts an optional <tt>format</tt>: * <tt>:default</tt> - default value, mimics Ruby Time#to_s format. * <tt>:db</tt> - format outputs time in UTC :db time. See Time#to_formatted_s(:db). * Any key in <tt>Time::DATE_FORMATS</tt> can be used. See active_support/core_ex...
[ "Returns", "a", "string", "of", "the", "object", "s", "date", "and", "time", ".", "Accepts", "an", "optional", "<tt", ">", "format<", "/", "tt", ">", ":", "*", "<tt", ">", ":", "default<", "/", "tt", ">", "-", "default", "value", "mimics", "Ruby", ...
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/time_with_zone.rb#L206-L214
train
Returns the string representation of the time in the given format.
[ 30522, 13366, 2000, 1035, 1055, 1006, 4289, 1027, 1024, 12398, 1007, 2065, 4289, 1027, 1027, 1024, 16962, 11396, 1012, 2000, 1035, 1055, 1006, 4289, 1007, 3449, 5332, 2546, 4289, 3334, 1027, 1024, 1024, 2051, 1024, 1024, 3058, 1035, 11630, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/sprockets/source_map_utils.rb
Sprockets.SourceMapUtils.concat_source_maps
def concat_source_maps(a, b) return a || b unless a && b a = make_index_map(a) b = make_index_map(b) offset = 0 if a["sections"].count != 0 && !a["sections"].last["map"]["mappings"].empty? last_line_count = a["sections"].last["map"].delete("x_sprockets_linecount") offset +...
ruby
def concat_source_maps(a, b) return a || b unless a && b a = make_index_map(a) b = make_index_map(b) offset = 0 if a["sections"].count != 0 && !a["sections"].last["map"]["mappings"].empty? last_line_count = a["sections"].last["map"].delete("x_sprockets_linecount") offset +...
[ "def", "concat_source_maps", "(", "a", ",", "b", ")", "return", "a", "||", "b", "unless", "a", "&&", "b", "a", "=", "make_index_map", "(", "a", ")", "b", "=", "make_index_map", "(", "b", ")", "offset", "=", "0", "if", "a", "[", "\"sections\"", "]",...
Public: Concatenate two source maps. For an example, if two js scripts are concatenated, the individual source maps for those files can be concatenated to map back to the originals. Examples script3 = "#{script1}#{script2}" map3 = concat_source_maps(map1, map2) a - Source map hash b - Source map h...
[ "Public", ":", "Concatenate", "two", "source", "maps", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/source_map_utils.rb#L73-L98
train
Concat two source maps together.
[ 30522, 13366, 9530, 11266, 1035, 3120, 1035, 7341, 1006, 1037, 1010, 1038, 1007, 2709, 1037, 1064, 1064, 1038, 4983, 1037, 1004, 1004, 1038, 1037, 1027, 2191, 1035, 5950, 30524, 1035, 4949, 1006, 1038, 1007, 16396, 1027, 1014, 2065, 1037, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-12-01/generated/azure_mgmt_network/virtual_network_peerings.rb
Azure::Network::Mgmt::V2018_12_01.VirtualNetworkPeerings.create_or_update
def create_or_update(resource_group_name, virtual_network_name, virtual_network_peering_name, virtual_network_peering_parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, virtual_network_name, virtual_network_peering_name, virtual_network_peering_parameters, custom_headers:custom...
ruby
def create_or_update(resource_group_name, virtual_network_name, virtual_network_peering_name, virtual_network_peering_parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, virtual_network_name, virtual_network_peering_name, virtual_network_peering_parameters, custom_headers:custom...
[ "def", "create_or_update", "(", "resource_group_name", ",", "virtual_network_name", ",", "virtual_network_peering_name", ",", "virtual_network_peering_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_group_name", "...
Creates or updates a peering in the specified virtual network. @param resource_group_name [String] The name of the resource group. @param virtual_network_name [String] The name of the virtual network. @param virtual_network_peering_name [String] The name of the peering. @param virtual_network_peering_parameters [V...
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "virtual", "network", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-12-01/generated/azure_mgmt_network/virtual_network_peerings.rb#L178-L181
train
Creates or updates a virtual network.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 16740, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 16740, 1035, 11709, 1010, 7661, 1035, 20346,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aasm/aasm
lib/aasm/aasm.rb
AASM.ClassMethods.aasm
def aasm(*args, &block) if args[0].is_a?(Symbol) || args[0].is_a?(String) # using custom name state_machine_name = args[0].to_sym options = args[1] || {} else # using the default state_machine_name state_machine_name = :default options = args[0] || {} en...
ruby
def aasm(*args, &block) if args[0].is_a?(Symbol) || args[0].is_a?(String) # using custom name state_machine_name = args[0].to_sym options = args[1] || {} else # using the default state_machine_name state_machine_name = :default options = args[0] || {} en...
[ "def", "aasm", "(", "*", "args", ",", "&", "block", ")", "if", "args", "[", "0", "]", ".", "is_a?", "(", "Symbol", ")", "||", "args", "[", "0", "]", ".", "is_a?", "(", "String", ")", "# using custom name", "state_machine_name", "=", "args", "[", "0...
this is the entry point for all state and event definitions
[ "this", "is", "the", "entry", "point", "for", "all", "state", "and", "event", "definitions" ]
6a1000b489c6b2e205a7b142478a4b4e207c3dbd
https://github.com/aasm/aasm/blob/6a1000b489c6b2e205a7b142478a4b4e207c3dbd/lib/aasm/aasm.rb#L28-L64
train
Creates a new instance of the AASM class.
[ 30522, 13366, 9779, 6491, 1006, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2065, 12098, 5620, 1031, 1014, 1033, 1012, 2003, 1035, 1037, 1029, 1006, 6454, 1007, 1064, 1064, 12098, 5620, 1031, 1014, 1033, 1012, 2003, 1035, 1037, 1029, 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...
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.resize_frame!
def resize_frame! screenshot_width = self.screenshot.portrait? ? screenshot.size[0] : screenshot.size[1] multiplicator = (screenshot_width.to_f / offset['width'].to_f) # by how much do we have to change this? new_frame_width = multiplicator * frame.width # the new width for the frame frame.resi...
ruby
def resize_frame! screenshot_width = self.screenshot.portrait? ? screenshot.size[0] : screenshot.size[1] multiplicator = (screenshot_width.to_f / offset['width'].to_f) # by how much do we have to change this? new_frame_width = multiplicator * frame.width # the new width for the frame frame.resi...
[ "def", "resize_frame!", "screenshot_width", "=", "self", ".", "screenshot", ".", "portrait?", "?", "screenshot", ".", "size", "[", "0", "]", ":", "screenshot", ".", "size", "[", "1", "]", "multiplicator", "=", "(", "screenshot_width", ".", "to_f", "/", "of...
Resize the frame as it's too low quality by default
[ "Resize", "the", "frame", "as", "it", "s", "too", "low", "quality", "by", "default" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L273-L280
train
Resize the frame to the new width
[ 30522, 13366, 24501, 4697, 1035, 4853, 999, 12117, 12326, 1035, 9381, 1027, 2969, 1012, 12117, 12326, 1012, 6533, 1029, 1029, 12117, 12326, 1012, 2946, 1031, 1014, 1033, 1024, 12117, 12326, 1012, 2946, 1031, 1015, 1033, 4800, 24759, 5555, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_dns/lib/2017-09-01/generated/azure_mgmt_dns/record_sets.rb
Azure::Dns::Mgmt::V2017_09_01.RecordSets.list_by_dns_zone_as_lazy
def list_by_dns_zone_as_lazy(resource_group_name, zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil) response = list_by_dns_zone_async(resource_group_name, zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value! unless response.nil? page = res...
ruby
def list_by_dns_zone_as_lazy(resource_group_name, zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil) response = list_by_dns_zone_async(resource_group_name, zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value! unless response.nil? page = res...
[ "def", "list_by_dns_zone_as_lazy", "(", "resource_group_name", ",", "zone_name", ",", "top", ":", "nil", ",", "recordsetnamesuffix", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_dns_zone_async", "(", "resource_group_name", ",", "zone...
Lists all record sets in a DNS zone. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param zone_name [String] The name of the DNS zone (without a terminating dot). @param top [Integer] The maximum number of record sets to return. If not specified, returns up to ...
[ "Lists", "all", "record", "sets", "in", "a", "DNS", "zone", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_dns/lib/2017-09-01/generated/azure_mgmt_dns/record_sets.rb#L1058-L1067
train
Gets a list of all the records in a DNS zone.
[ 30522, 13366, 2862, 1035, 2011, 1035, 1040, 3619, 1035, 4224, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4224, 1035, 2171, 1010, 2327, 1024, 9152, 2140, 1010, 2636, 3388, 18442, 6342, 26989, 2595, 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...
Katello/katello
app/helpers/katello/application_helper.rb
Katello.ApplicationHelper.sort
def sort(field, options = {}, html_options = {}) unless options[:as] id = field.to_s.downcase == "id" options[:as] = id ? field.to_s.upcase : field.to_s.humanize end ascend = "#{field}|ASC" descend = "#{field}|DESC" ascending = params[:order] == ascend ne...
ruby
def sort(field, options = {}, html_options = {}) unless options[:as] id = field.to_s.downcase == "id" options[:as] = id ? field.to_s.upcase : field.to_s.humanize end ascend = "#{field}|ASC" descend = "#{field}|DESC" ascending = params[:order] == ascend ne...
[ "def", "sort", "(", "field", ",", "options", "=", "{", "}", ",", "html_options", "=", "{", "}", ")", "unless", "options", "[", ":as", "]", "id", "=", "field", ".", "to_s", ".", "downcase", "==", "\"id\"", "options", "[", ":as", "]", "=", "id", "?...
These 2 methods copied from scoped_search {https://github.com/wvanbergen/scoped_search} which Katello used to use but no longer uses. Creates a link that alternates between ascending and descending. @example sort @search, :by => :login sort @search, :by => :created_at, :as => "Created" @param [Hash] option...
[ "These", "2", "methods", "copied", "from", "scoped_search", "{", "https", ":", "//", "github", ".", "com", "/", "wvanbergen", "/", "scoped_search", "}", "which", "Katello", "used", "to", "use", "but", "no", "longer", "uses", "." ]
a1c9280067607999cae43bab89b53ba870856b76
https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/helpers/katello/application_helper.rb#L27-L57
train
Sort the results by a given field
[ 30522, 13366, 4066, 1006, 2492, 1010, 7047, 1027, 1063, 1065, 1010, 16129, 1035, 7047, 1027, 1063, 1065, 1007, 4983, 7047, 1031, 1024, 2004, 1033, 8909, 1027, 2492, 1012, 2000, 1035, 1055, 1012, 2091, 18382, 1027, 1027, 1000, 8909, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activesupport/lib/active_support/hash_with_indifferent_access.rb
ActiveSupport.HashWithIndifferentAccess.update
def update(other_hash) if other_hash.is_a? HashWithIndifferentAccess super(other_hash) else other_hash.to_hash.each_pair do |key, value| if block_given? && key?(key) value = yield(convert_key(key), self[key], value) end regular_writer(convert_key(key...
ruby
def update(other_hash) if other_hash.is_a? HashWithIndifferentAccess super(other_hash) else other_hash.to_hash.each_pair do |key, value| if block_given? && key?(key) value = yield(convert_key(key), self[key], value) end regular_writer(convert_key(key...
[ "def", "update", "(", "other_hash", ")", "if", "other_hash", ".", "is_a?", "HashWithIndifferentAccess", "super", "(", "other_hash", ")", "else", "other_hash", ".", "to_hash", ".", "each_pair", "do", "|", "key", ",", "value", "|", "if", "block_given?", "&&", ...
Updates the receiver in-place, merging in the hash passed as argument: hash_1 = ActiveSupport::HashWithIndifferentAccess.new hash_1[:key] = 'value' hash_2 = ActiveSupport::HashWithIndifferentAccess.new hash_2[:key] = 'New Value!' hash_1.update(hash_2) # => {"key"=>"New Value!"} The argument can be e...
[ "Updates", "the", "receiver", "in", "-", "place", "merging", "in", "the", "hash", "passed", "as", "argument", ":" ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/hash_with_indifferent_access.rb#L124-L136
train
Update the HashWithIndifferentAccess object with the other HashWithIndifferentAccess object.
[ 30522, 13366, 10651, 1006, 2060, 1035, 23325, 1007, 2065, 2060, 1035, 23325, 1012, 2003, 1035, 1037, 1029, 23325, 24415, 22254, 13355, 7869, 12380, 9468, 7971, 3565, 1006, 2060, 1035, 23325, 1007, 2842, 2060, 1035, 23325, 1012, 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...
hashicorp/vault-ruby
lib/vault/api/approle.rb
Vault.AppRole.set_role
def set_role(name, options = {}) headers = extract_headers!(options) client.post("/v1/auth/approle/role/#{encode_path(name)}", JSON.fast_generate(options), headers) return true end
ruby
def set_role(name, options = {}) headers = extract_headers!(options) client.post("/v1/auth/approle/role/#{encode_path(name)}", JSON.fast_generate(options), headers) return true end
[ "def", "set_role", "(", "name", ",", "options", "=", "{", "}", ")", "headers", "=", "extract_headers!", "(", "options", ")", "client", ".", "post", "(", "\"/v1/auth/approle/role/#{encode_path(name)}\"", ",", "JSON", ".", "fast_generate", "(", "options", ")", "...
Creates a new AppRole or update an existing AppRole with the given name and attributes. @example Vault.approle.set_role("testrole", { secret_id_ttl: "10m", token_ttl: "20m", policies: "default", period: 3600, }) #=> true @param [String] name The name of the AppRole @pa...
[ "Creates", "a", "new", "AppRole", "or", "update", "an", "existing", "AppRole", "with", "the", "given", "name", "and", "attributes", "." ]
02f0532a802ba1a2a0d8703a4585dab76eb9d864
https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/approle.rb#L59-L63
train
Set the role of an approval
[ 30522, 13366, 2275, 1035, 2535, 1006, 2171, 1010, 7047, 1027, 1063, 1065, 1007, 20346, 2015, 1027, 14817, 1035, 20346, 2015, 999, 1006, 7047, 1007, 7396, 1012, 2695, 1006, 1000, 1013, 1058, 2487, 1013, 8740, 2705, 1013, 10439, 13153, 2063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/sprockets/utils.rb
Sprockets.Utils.concat_javascript_sources
def concat_javascript_sources(buf, source) return buf if source.bytesize <= 0 buf << source # If the source contains non-ASCII characters, indexing on it becomes O(N). # This will lead to O(N^2) performance in string_end_with_semicolon?, so we should use 32 bit encoding to make sure indexing st...
ruby
def concat_javascript_sources(buf, source) return buf if source.bytesize <= 0 buf << source # If the source contains non-ASCII characters, indexing on it becomes O(N). # This will lead to O(N^2) performance in string_end_with_semicolon?, so we should use 32 bit encoding to make sure indexing st...
[ "def", "concat_javascript_sources", "(", "buf", ",", "source", ")", "return", "buf", "if", "source", ".", "bytesize", "<=", "0", "buf", "<<", "source", "# If the source contains non-ASCII characters, indexing on it becomes O(N).", "# This will lead to O(N^2) performance in stri...
Internal: Accumulate asset source to buffer and append a trailing semicolon if necessary. buf - String buffer to append to source - String source to append Returns buf String.
[ "Internal", ":", "Accumulate", "asset", "source", "to", "buffer", "and", "append", "a", "trailing", "semicolon", "if", "necessary", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/utils.rb#L100-L119
train
Concatenates the given JavaScript source into the buffer.
[ 30522, 13366, 9530, 11266, 1035, 9262, 22483, 1035, 4216, 1006, 20934, 2546, 1010, 3120, 1007, 2709, 20934, 2546, 2065, 3120, 1012, 27507, 4697, 1026, 1027, 1014, 20934, 2546, 1026, 1026, 3120, 1001, 2065, 1996, 3120, 3397, 2512, 1011, 2004...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
activeadmin/activeadmin
lib/active_admin/resource_dsl.rb
ActiveAdmin.ResourceDSL.csv
def csv(options = {}, &block) options[:resource] = config config.csv_builder = CSVBuilder.new(options, &block) end
ruby
def csv(options = {}, &block) options[:resource] = config config.csv_builder = CSVBuilder.new(options, &block) end
[ "def", "csv", "(", "options", "=", "{", "}", ",", "&", "block", ")", "options", "[", ":resource", "]", "=", "config", "config", ".", "csv_builder", "=", "CSVBuilder", ".", "new", "(", "options", ",", "block", ")", "end" ]
Configure the CSV format For example: csv do column :name column("Author") { |post| post.author.full_name } end csv col_sep: ";", force_quotes: true do column :name end
[ "Configure", "the", "CSV", "format" ]
0759c8dcf97865748c9344459162ac3c7e65a6cd
https://github.com/activeadmin/activeadmin/blob/0759c8dcf97865748c9344459162ac3c7e65a6cd/lib/active_admin/resource_dsl.rb#L110-L114
train
Create a CSV file
[ 30522, 13366, 20116, 2615, 1006, 7047, 1027, 1063, 1065, 1010, 1004, 3796, 1007, 7047, 1031, 1024, 7692, 1033, 1027, 9530, 8873, 2290, 9530, 8873, 2290, 1012, 20116, 2615, 1035, 12508, 1027, 20116, 26493, 19231, 4063, 1012, 2047, 1006, 7047...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/identity_provider.rb
Azure::ApiManagement::Mgmt::V2018_01_01.IdentityProvider.get_with_http_info
def get_with_http_info(resource_group_name, service_name, identity_provider_name, custom_headers:nil) get_async(resource_group_name, service_name, identity_provider_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, service_name, identity_provider_name, custom_headers:nil) get_async(resource_group_name, service_name, identity_provider_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "service_name", ",", "identity_provider_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "service_name", ",", "identity_provider_name", ",", "custom_headers", ":custo...
Gets the configuration details of the identity Provider configured in specified service instance. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param identity_provider_name [IdentityProviderType] Identity Provider Type ide...
[ "Gets", "the", "configuration", "details", "of", "the", "identity", "Provider", "configured", "in", "specified", "service", "instance", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/identity_provider.rb#L252-L254
train
Gets the identity specification of the specified identity provider.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 4767, 1035, 10802, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
zendesk/ruby-kafka
lib/kafka/offset_manager.rb
Kafka.OffsetManager.next_offset_for
def next_offset_for(topic, partition) offset = @processed_offsets.fetch(topic, {}).fetch(partition) { committed_offset_for(topic, partition) } # A negative offset means that no offset has been committed, so we need to # resolve the default offset for the topic. if offset < 0 ...
ruby
def next_offset_for(topic, partition) offset = @processed_offsets.fetch(topic, {}).fetch(partition) { committed_offset_for(topic, partition) } # A negative offset means that no offset has been committed, so we need to # resolve the default offset for the topic. if offset < 0 ...
[ "def", "next_offset_for", "(", "topic", ",", "partition", ")", "offset", "=", "@processed_offsets", ".", "fetch", "(", "topic", ",", "{", "}", ")", ".", "fetch", "(", "partition", ")", "{", "committed_offset_for", "(", "topic", ",", "partition", ")", "}", ...
Return the next offset that should be fetched for the specified partition. @param topic [String] the name of the topic. @param partition [Integer] the partition number. @return [Integer] the next offset that should be fetched.
[ "Return", "the", "next", "offset", "that", "should", "be", "fetched", "for", "the", "specified", "partition", "." ]
2a73471b6a607a52dc85c79301ba522acb4566b5
https://github.com/zendesk/ruby-kafka/blob/2a73471b6a607a52dc85c79301ba522acb4566b5/lib/kafka/offset_manager.rb#L95-L108
train
Returns the next offset for the topic and partition
[ 30522, 13366, 2279, 1035, 16396, 1035, 2005, 1006, 8476, 1010, 13571, 1007, 16396, 1027, 1030, 13995, 1035, 16396, 2015, 1012, 18584, 1006, 8476, 1010, 1063, 1065, 1007, 1012, 18584, 1006, 13571, 1007, 1063, 5462, 1035, 16396, 1035, 2005, 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...
backup/backup
vagrant/spec/support/tar_file.rb
BackupSpec.TarFile.extracted_files
def extracted_files @extracted_files ||= begin base_path = File.dirname(path) filename = File.basename(path) Dir.chdir(base_path) do %x[#{ utility(:tar) } -xf #{ filename } 2>/dev/null] end Hash[ contents.keys.map {|manifest_path| path = File...
ruby
def extracted_files @extracted_files ||= begin base_path = File.dirname(path) filename = File.basename(path) Dir.chdir(base_path) do %x[#{ utility(:tar) } -xf #{ filename } 2>/dev/null] end Hash[ contents.keys.map {|manifest_path| path = File...
[ "def", "extracted_files", "@extracted_files", "||=", "begin", "base_path", "=", "File", ".", "dirname", "(", "path", ")", "filename", "=", "File", ".", "basename", "(", "path", ")", "Dir", ".", "chdir", "(", "base_path", ")", "do", "%x[", "#{", "utility", ...
Return a Hash with the paths from #contents mapped to either another TarFile object (for tar files) or the full path to the extracted file.
[ "Return", "a", "Hash", "with", "the", "paths", "from", "#contents", "mapped", "to", "either", "another", "TarFile", "object", "(", "for", "tar", "files", ")", "or", "the", "full", "path", "to", "the", "extracted", "file", "." ]
64370f925e859f858766b674717a3dbee0de7a26
https://github.com/backup/backup/blob/64370f925e859f858766b674717a3dbee0de7a26/vagrant/spec/support/tar_file.rb#L44-L62
train
Returns the extracted files
[ 30522, 13366, 15901, 1035, 6764, 1030, 15901, 1035, 6764, 1064, 1064, 1027, 4088, 2918, 1035, 4130, 1027, 5371, 1012, 16101, 18442, 1006, 4130, 1007, 5371, 18442, 1027, 5371, 1012, 2918, 18442, 1006, 4130, 1007, 16101, 1012, 10381, 4305, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_monitor/lib/2017-11-01-preview/generated/azure_mgmt_monitor/metric_baseline.rb
Azure::Monitor::Mgmt::V2017_11_01_preview.MetricBaseline.calculate_baseline
def calculate_baseline(resource_uri, time_series_information, custom_headers:nil) response = calculate_baseline_async(resource_uri, time_series_information, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def calculate_baseline(resource_uri, time_series_information, custom_headers:nil) response = calculate_baseline_async(resource_uri, time_series_information, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "calculate_baseline", "(", "resource_uri", ",", "time_series_information", ",", "custom_headers", ":", "nil", ")", "response", "=", "calculate_baseline_async", "(", "resource_uri", ",", "time_series_information", ",", "custom_headers", ":custom_headers", ")", ".", ...
**Lists the baseline values for a resource**. @param resource_uri [String] The identifier of the resource. It has the following structure: subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. For example: subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/re...
[ "**", "Lists", "the", "baseline", "values", "for", "a", "resource", "**", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_monitor/lib/2017-11-01-preview/generated/azure_mgmt_monitor/metric_baseline.rb#L176-L179
train
Calculate the baseline of the resource.
[ 30522, 13366, 18422, 1035, 26163, 1006, 7692, 1035, 24471, 2072, 1010, 2051, 1035, 2186, 1035, 2592, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 30524, 1012, 3643, 999, 3433, 1012, 2303, 4983, 3433, 1012, 9152, 2140, 1029, 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...
anycable/anycable
lib/anycable/config.rb
AnyCable.Config.to_redis_params
def to_redis_params { url: redis_url }.tap do |params| next if redis_sentinels.nil? raise ArgumentError, "redis_sentinels must be an array; got #{redis_sentinels}" unless redis_sentinels.is_a?(Array) next if redis_sentinels.empty? params[:sentinels] = redis_sentinels.m...
ruby
def to_redis_params { url: redis_url }.tap do |params| next if redis_sentinels.nil? raise ArgumentError, "redis_sentinels must be an array; got #{redis_sentinels}" unless redis_sentinels.is_a?(Array) next if redis_sentinels.empty? params[:sentinels] = redis_sentinels.m...
[ "def", "to_redis_params", "{", "url", ":", "redis_url", "}", ".", "tap", "do", "|", "params", "|", "next", "if", "redis_sentinels", ".", "nil?", "raise", "ArgumentError", ",", "\"redis_sentinels must be an array; got #{redis_sentinels}\"", "unless", "redis_sentinels", ...
Build Redis parameters
[ "Build", "Redis", "parameters" ]
d7515e8e034d42e86ebeb09786a92aad2a11b25f
https://github.com/anycable/anycable/blob/d7515e8e034d42e86ebeb09786a92aad2a11b25f/lib/anycable/config.rb#L73-L84
train
Returns a hash of the parameters to be sent in the Redis connection.
[ 30522, 13366, 2000, 1035, 2417, 2483, 1035, 11498, 5244, 1063, 24471, 2140, 1024, 2417, 2483, 1035, 24471, 2140, 1065, 1012, 11112, 2079, 1064, 11498, 5244, 1064, 2279, 2065, 2417, 2483, 1035, 16074, 2015, 1012, 9152, 2140, 1029, 5333, 6685...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
puppetlabs/puppet
lib/puppet/pops/loaders.rb
Puppet::Pops.Loaders.load_main_manifest
def load_main_manifest parser = Parser::EvaluatingParser.singleton parsed_code = Puppet[:code] program = if parsed_code != "" parser.parse_string(parsed_code, 'unknown-source-location') else file = @environment.manifest # if the manifest file is a reference to a directory, parse and c...
ruby
def load_main_manifest parser = Parser::EvaluatingParser.singleton parsed_code = Puppet[:code] program = if parsed_code != "" parser.parse_string(parsed_code, 'unknown-source-location') else file = @environment.manifest # if the manifest file is a reference to a directory, parse and c...
[ "def", "load_main_manifest", "parser", "=", "Parser", "::", "EvaluatingParser", ".", "singleton", "parsed_code", "=", "Puppet", "[", ":code", "]", "program", "=", "if", "parsed_code", "!=", "\"\"", "parser", ".", "parse_string", "(", "parsed_code", ",", "'unknow...
Load the main manifest for the given environment There are two sources that can be used for the initial parse: 1. The value of `Puppet[:code]`: Puppet can take a string from its settings and parse that as a manifest. This is used by various Puppet applications to read in a manifest and pass it to the ...
[ "Load", "the", "main", "manifest", "for", "the", "given", "environment" ]
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/pops/loaders.rb#L272-L302
train
Load the main manifest of the environment
[ 30522, 13366, 7170, 1035, 2364, 1035, 19676, 11968, 8043, 1027, 11968, 8043, 1024, 1024, 23208, 19362, 8043, 1012, 28159, 11968, 6924, 1035, 3642, 1027, 13997, 1031, 1024, 3642, 1033, 2565, 1027, 2065, 11968, 6924, 1035, 3642, 999, 1027, 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...
sporkmonger/addressable
lib/addressable/uri.rb
Addressable.URI.userinfo=
def userinfo=(new_userinfo) if new_userinfo && !new_userinfo.respond_to?(:to_str) raise TypeError, "Can't convert #{new_userinfo.class} into String." end new_user, new_password = if new_userinfo [ new_userinfo.to_str.strip[/^(.*):/, 1], new_userinfo.to_str.strip[/:(...
ruby
def userinfo=(new_userinfo) if new_userinfo && !new_userinfo.respond_to?(:to_str) raise TypeError, "Can't convert #{new_userinfo.class} into String." end new_user, new_password = if new_userinfo [ new_userinfo.to_str.strip[/^(.*):/, 1], new_userinfo.to_str.strip[/:(...
[ "def", "userinfo", "=", "(", "new_userinfo", ")", "if", "new_userinfo", "&&", "!", "new_userinfo", ".", "respond_to?", "(", ":to_str", ")", "raise", "TypeError", ",", "\"Can't convert #{new_userinfo.class} into String.\"", "end", "new_user", ",", "new_password", "=", ...
Sets the userinfo component for this URI. @param [String, #to_str] new_userinfo The new userinfo component.
[ "Sets", "the", "userinfo", "component", "for", "this", "URI", "." ]
5894c95a7768435cb46d1355954611dbd194832e
https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1060-L1083
train
Sets the user and password for this URI.
[ 30522, 13366, 5310, 2378, 14876, 1027, 1006, 2047, 1035, 5310, 2378, 14876, 1007, 2065, 2047, 1035, 5310, 2378, 14876, 1004, 1004, 999, 2047, 1035, 5310, 2378, 14876, 1012, 6869, 1035, 2000, 1029, 1006, 1024, 2000, 1035, 2358, 2099, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adimichele/hubspot-ruby
lib/hubspot/blog.rb
Hubspot.Blog.posts
def posts(params = {}) default_params = { content_group_id: self["id"], order_by: '-created', created__gt: Time.now - 2.month, state: 'PUBLISHED' } raise Hubspot::InvalidParams.new('params must be passed as a hash') unless params.is_a?(Hash) params = default_param...
ruby
def posts(params = {}) default_params = { content_group_id: self["id"], order_by: '-created', created__gt: Time.now - 2.month, state: 'PUBLISHED' } raise Hubspot::InvalidParams.new('params must be passed as a hash') unless params.is_a?(Hash) params = default_param...
[ "def", "posts", "(", "params", "=", "{", "}", ")", "default_params", "=", "{", "content_group_id", ":", "self", "[", "\"id\"", "]", ",", "order_by", ":", "'-created'", ",", "created__gt", ":", "Time", ".", "now", "-", "2", ".", "month", ",", "state", ...
Returns the posts for this blog instance. defaults to returning the last 2 months worth of published blog posts in date descending order (i.e. most recent first) {https://developers.hubspot.com/docs/methods/blogv2/get_blog_posts} @return [Hubspot::BlogPost]
[ "Returns", "the", "posts", "for", "this", "blog", "instance", ".", "defaults", "to", "returning", "the", "last", "2", "months", "worth", "of", "published", "blog", "posts", "in", "date", "descending", "order", "(", "i", ".", "e", ".", "most", "recent", "...
8eb0a64dd0c14c79e631e81bfdc169583e775a46
https://github.com/adimichele/hubspot-ruby/blob/8eb0a64dd0c14c79e631e81bfdc169583e775a46/lib/hubspot/blog.rb#L45-L60
train
Get the posts for this content group
[ 30522, 13366, 8466, 1006, 11498, 5244, 1027, 1063, 1065, 1007, 12398, 1035, 11498, 5244, 1027, 1063, 4180, 1035, 2177, 1035, 8909, 1024, 2969, 1031, 1000, 8909, 1000, 1033, 1010, 2344, 1035, 2011, 1024, 1005, 1011, 2580, 1005, 1010, 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
data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb
Azure::CognitiveServices::VideoSearch::V1_0.VideosOperations.search
def search(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, count:nil, freshness:nil, id:nil, length:nil, market:nil, offset:nil, pricing:nil, resolution:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil) response...
ruby
def search(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, count:nil, freshness:nil, id:nil, length:nil, market:nil, offset:nil, pricing:nil, resolution:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil) response...
[ "def", "search", "(", "query", ",", "accept_language", ":", "nil", ",", "user_agent", ":", "nil", ",", "client_id", ":", "nil", ",", "client_ip", ":", "nil", ",", "location", ":", "nil", ",", "country_code", ":", "nil", ",", "count", ":", "nil", ",", ...
The Video Search API lets you send a search query to Bing and get back a list of videos that are relevant to the search query. This section provides technical details about the query parameters and headers that you use to request videos and the JSON response objects that contain them. For examples that show how to ...
[ "The", "Video", "Search", "API", "lets", "you", "send", "a", "search", "query", "to", "Bing", "and", "get", "back", "a", "list", "of", "videos", "that", "are", "relevant", "to", "the", "search", "query", ".", "This", "section", "provides", "technical", "...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb#L282-L285
train
Search for a given search term.
[ 30522, 13366, 3945, 1006, 23032, 1010, 5138, 1035, 2653, 1024, 9152, 2140, 1010, 5310, 1035, 4005, 1024, 9152, 2140, 1010, 7396, 1035, 8909, 1024, 9152, 2140, 1010, 7396, 1035, 12997, 1024, 9152, 2140, 1010, 3295, 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...
jekyll/jekyll
lib/jekyll/utils.rb
Jekyll.Utils.slugify
def slugify(string, mode: nil, cased: false) mode ||= "default" return nil if string.nil? unless SLUGIFY_MODES.include?(mode) return cased ? string : string.downcase end # Drop accent marks from latin characters. Everything else turns to ? if mode == "latin" I18n.co...
ruby
def slugify(string, mode: nil, cased: false) mode ||= "default" return nil if string.nil? unless SLUGIFY_MODES.include?(mode) return cased ? string : string.downcase end # Drop accent marks from latin characters. Everything else turns to ? if mode == "latin" I18n.co...
[ "def", "slugify", "(", "string", ",", "mode", ":", "nil", ",", "cased", ":", "false", ")", "mode", "||=", "\"default\"", "return", "nil", "if", "string", ".", "nil?", "unless", "SLUGIFY_MODES", ".", "include?", "(", "mode", ")", "return", "cased", "?", ...
rubocop: enable PredicateName Slugify a filename or title. string - the filename or title to slugify mode - how string is slugified cased - whether to replace all uppercase letters with their lowercase counterparts When mode is "none", return the given string. When mode is "raw", return the given string, wit...
[ "rubocop", ":", "enable", "PredicateName", "Slugify", "a", "filename", "or", "title", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/utils.rb#L198-L220
train
Returns a slug for the given string.
[ 30522, 13366, 23667, 8757, 1006, 5164, 1010, 5549, 1024, 9152, 2140, 1010, 2553, 2094, 1024, 6270, 1007, 5549, 1064, 1064, 1027, 1000, 12398, 1000, 2709, 9152, 2140, 2065, 5164, 1012, 9152, 2140, 1029, 4983, 23667, 8757, 1035, 11583, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/renderer.rb
Jekyll.Renderer.render_document
def render_document info = { :registers => { :site => site, :page => payload["page"] }, :strict_filters => liquid_options["strict_filters"], :strict_variables => liquid_options["strict_variables"], } output = document.content if document.render_with_liquid? ...
ruby
def render_document info = { :registers => { :site => site, :page => payload["page"] }, :strict_filters => liquid_options["strict_filters"], :strict_variables => liquid_options["strict_variables"], } output = document.content if document.render_with_liquid? ...
[ "def", "render_document", "info", "=", "{", ":registers", "=>", "{", ":site", "=>", "site", ",", ":page", "=>", "payload", "[", "\"page\"", "]", "}", ",", ":strict_filters", "=>", "liquid_options", "[", "\"strict_filters\"", "]", ",", ":strict_variables", "=>"...
Render the document. Returns String rendered document output rubocop: disable AbcSize
[ "Render", "the", "document", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/renderer.rb#L70-L93
train
Render the document
[ 30522, 13366, 17552, 1035, 6254, 18558, 1027, 1063, 1024, 18687, 1027, 1028, 1063, 1024, 2609, 1027, 1028, 2609, 1010, 1024, 3931, 1027, 1028, 18093, 1031, 1000, 3931, 1000, 1033, 1065, 1010, 1024, 9384, 1035, 17736, 1027, 1028, 6381, 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_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.failover
def failover(source_device_name, parameters, resource_group_name, manager_name, custom_headers:nil) response = failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value! nil end
ruby
def failover(source_device_name, parameters, resource_group_name, manager_name, custom_headers:nil) response = failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value! nil end
[ "def", "failover", "(", "source_device_name", ",", "parameters", ",", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "failover_async", "(", "source_device_name", ",", "parameters", ",", "resource_group_name", ",", ...
Failovers a set of volume containers from a specified source device to a target device. @param source_device_name [String] The source device name on which failover is performed. @param parameters [FailoverRequest] FailoverRequest containing the source device and the list of volume containers to be failed over. @...
[ "Failovers", "a", "set", "of", "volume", "containers", "from", "a", "specified", "source", "device", "to", "a", "target", "device", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L1053-L1056
train
Failover the source device to the current primary container.
[ 30522, 13366, 8246, 7840, 1006, 3120, 1035, 5080, 1035, 2171, 1010, 11709, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 8246, 7840, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tongueroo/ufo
lib/ufo/tasks/register.rb
Ufo.Tasks::Register.register
def register data = JSON.parse(IO.read(@template_definition_path)) data = rubyize_format(data) message = "#{data[:family]} task definition registered." if @options[:noop] message = "NOOP: #{message}" else register_task_definition(data) end unless @options[:mut...
ruby
def register data = JSON.parse(IO.read(@template_definition_path)) data = rubyize_format(data) message = "#{data[:family]} task definition registered." if @options[:noop] message = "NOOP: #{message}" else register_task_definition(data) end unless @options[:mut...
[ "def", "register", "data", "=", "JSON", ".", "parse", "(", "IO", ".", "read", "(", "@template_definition_path", ")", ")", "data", "=", "rubyize_format", "(", "data", ")", "message", "=", "\"#{data[:family]} task definition registered.\"", "if", "@options", "[", ...
aws ecs register-task-definition --cli-input-json file://.ufo/output/demo-web-prod.json
[ "aws", "ecs", "register", "-", "task", "-", "definition", "--", "cli", "-", "input", "-", "json", "file", ":", "//", ".", "ufo", "/", "output", "/", "demo", "-", "web", "-", "prod", ".", "json" ]
16ac3dad28edcab2693c0e7d89a1971aca65b8f9
https://github.com/tongueroo/ufo/blob/16ac3dad28edcab2693c0e7d89a1971aca65b8f9/lib/ufo/tasks/register.rb#L24-L41
train
Register a task definition
[ 30522, 13366, 4236, 2951, 1027, 1046, 3385, 1012, 11968, 3366, 1006, 22834, 1012, 3191, 1006, 1030, 23561, 1035, 6210, 1035, 4130, 1007, 1007, 2951, 1027, 10090, 4697, 1035, 4289, 1006, 2951, 1007, 4471, 1027, 1000, 1001, 1063, 2951, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb
Azure::SQL::Mgmt::V2017_03_01_preview.LongTermRetentionBackups.list_by_server_as_lazy
def list_by_server_as_lazy(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil) response = list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_...
ruby
def list_by_server_as_lazy(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil) response = list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_...
[ "def", "list_by_server_as_lazy", "(", "location_name", ",", "long_term_retention_server_name", ",", "only_latest_per_database", ":", "nil", ",", "database_state", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_server_async", "(", "location...
Lists the long term retention backups for a given server. @param location_name [String] The location of the database @param long_term_retention_server_name [String] The name of the server @param only_latest_per_database [Boolean] Whether or not to only get the latest backup for each database. @param database_stat...
[ "Lists", "the", "long", "term", "retention", "backups", "for", "a", "given", "server", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb#L913-L922
train
Gets the list of long term retention policies for a server.
[ 30522, 13366, 2862, 1035, 2011, 1035, 8241, 1035, 2004, 1035, 13971, 1006, 3295, 1035, 2171, 1010, 2146, 1035, 2744, 1035, 20125, 1035, 8241, 1035, 2171, 1010, 2069, 1035, 6745, 1035, 2566, 1035, 7809, 1024, 9152, 2140, 1010, 7809, 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_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb
Azure::PolicyInsights::Mgmt::V2018_07_01_preview.PolicyTrackedResources.list_query_results_for_resource
def list_query_results_for_resource(resource_id, query_options:nil, custom_headers:nil) first_page = list_query_results_for_resource_as_lazy(resource_id, query_options:query_options, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_query_results_for_resource(resource_id, query_options:nil, custom_headers:nil) first_page = list_query_results_for_resource_as_lazy(resource_id, query_options:query_options, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_query_results_for_resource", "(", "resource_id", ",", "query_options", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_query_results_for_resource_as_lazy", "(", "resource_id", ",", "query_options", ":query_options", ",", "custom_h...
Queries policy tracked resources under the resource. @param resource_id [String] Resource ID. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<PolicyTrackedRes...
[ "Queries", "policy", "tracked", "resources", "under", "the", "resource", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb#L330-L333
train
Gets all the items in a resource.
[ 30522, 13366, 2862, 1035, 23032, 1035, 3463, 1035, 2005, 1035, 7692, 1006, 7692, 1035, 8909, 1010, 23032, 1035, 7047, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 23032, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/sprockets/http_utils.rb
Sprockets.HTTPUtils.match_mime_type?
def match_mime_type?(value, matcher) v1, v2 = value.split('/'.freeze, 2) m1, m2 = matcher.split('/'.freeze, 2) (m1 == '*'.freeze || v1 == m1) && (m2.nil? || m2 == '*'.freeze || m2 == v2) end
ruby
def match_mime_type?(value, matcher) v1, v2 = value.split('/'.freeze, 2) m1, m2 = matcher.split('/'.freeze, 2) (m1 == '*'.freeze || v1 == m1) && (m2.nil? || m2 == '*'.freeze || m2 == v2) end
[ "def", "match_mime_type?", "(", "value", ",", "matcher", ")", "v1", ",", "v2", "=", "value", ".", "split", "(", "'/'", ".", "freeze", ",", "2", ")", "m1", ",", "m2", "=", "matcher", ".", "split", "(", "'/'", ".", "freeze", ",", "2", ")", "(", "...
Public: Test mime type against mime range. match_mime_type?('text/html', 'text/*') => true match_mime_type?('text/plain', '*') => true match_mime_type?('text/html', 'application/json') => false Returns true if the given value is a mime match for the given mime match specification, false otherwise.
[ "Public", ":", "Test", "mime", "type", "against", "mime", "range", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/http_utils.rb#L16-L20
train
Returns true if the value matches the matcher
[ 30522, 13366, 2674, 1035, 2771, 4168, 1035, 2828, 1029, 1006, 3643, 1010, 2674, 2121, 1007, 1058, 2487, 1010, 1058, 2475, 1027, 3643, 1012, 3975, 1006, 1005, 1013, 1005, 1012, 13184, 1010, 1016, 1007, 23290, 1010, 25525, 1027, 2674, 2121, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/scss-lint
lib/scss_lint/linter.rb
SCSSLint.Linter.run
def run(engine, config) @lints = [] @config = config @engine = engine @comment_processor = ControlCommentProcessor.new(self) visit(engine.tree) @lints = @comment_processor.filter_lints(@lints) end
ruby
def run(engine, config) @lints = [] @config = config @engine = engine @comment_processor = ControlCommentProcessor.new(self) visit(engine.tree) @lints = @comment_processor.filter_lints(@lints) end
[ "def", "run", "(", "engine", ",", "config", ")", "@lints", "=", "[", "]", "@config", "=", "config", "@engine", "=", "engine", "@comment_processor", "=", "ControlCommentProcessor", ".", "new", "(", "self", ")", "visit", "(", "engine", ".", "tree", ")", "@...
Create a linter. Run this linter against a parsed document with the given configuration, returning the lints that were found. @param engine [Engine] @param config [Config] @return [Array<Lint>]
[ "Create", "a", "linter", ".", "Run", "this", "linter", "against", "a", "parsed", "document", "with", "the", "given", "configuration", "returning", "the", "lints", "that", "were", "found", "." ]
e99afe4ede041a431a06e585c12ce82f6ad50116
https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter.rb#L36-L43
train
Run the linters
[ 30522, 13366, 2448, 1006, 3194, 1010, 9530, 8873, 2290, 1007, 1030, 11409, 3215, 1027, 1031, 1033, 1030, 9530, 8873, 2290, 1027, 9530, 8873, 2290, 1030, 3194, 1027, 3194, 1030, 7615, 1035, 13151, 1027, 2491, 9006, 3672, 21572, 9623, 21748, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.label_for
def label_for(attribute) if object.class.respond_to?(:human_attribute_name) object.class.human_attribute_name(attribute) else attribute.to_s.humanize end end
ruby
def label_for(attribute) if object.class.respond_to?(:human_attribute_name) object.class.human_attribute_name(attribute) else attribute.to_s.humanize end end
[ "def", "label_for", "(", "attribute", ")", "if", "object", ".", "class", ".", "respond_to?", "(", ":human_attribute_name", ")", "object", ".", "class", ".", "human_attribute_name", "(", "attribute", ")", "else", "attribute", ".", "to_s", ".", "humanize", "end"...
Public: Returns the translated name for the given attribute. attribute - The String name of the attribute to return the name.
[ "Public", ":", "Returns", "the", "translated", "name", "for", "the", "given", "attribute", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L397-L403
train
Returns the label for the given attribute
[ 30522, 13366, 3830, 1035, 2005, 1006, 17961, 1007, 2065, 4874, 1012, 2465, 1012, 6869, 1035, 2000, 1029, 1006, 1024, 2529, 1035, 17961, 1035, 2171, 1007, 4874, 1012, 2465, 1012, 2529, 1035, 17961, 1035, 2171, 1006, 17961, 1007, 2842, 17961,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ai/autoprefixer-rails
lib/autoprefixer-rails/processor.rb
AutoprefixerRails.Processor.read_js
def read_js @@js ||= begin root = Pathname(File.dirname(__FILE__)) path = root.join("../../vendor/autoprefixer.js") path.read end end
ruby
def read_js @@js ||= begin root = Pathname(File.dirname(__FILE__)) path = root.join("../../vendor/autoprefixer.js") path.read end end
[ "def", "read_js", "@@js", "||=", "begin", "root", "=", "Pathname", "(", "File", ".", "dirname", "(", "__FILE__", ")", ")", "path", "=", "root", ".", "join", "(", "\"../../vendor/autoprefixer.js\"", ")", "path", ".", "read", "end", "end" ]
Cache autoprefixer.js content
[ "Cache", "autoprefixer", ".", "js", "content" ]
22543372b33c688c409b46adfef4d1763041961f
https://github.com/ai/autoprefixer-rails/blob/22543372b33c688c409b46adfef4d1763041961f/lib/autoprefixer-rails/processor.rb#L165-L171
train
Reads the JS file for the autoprefixer. js file.
[ 30522, 13366, 3191, 1035, 1046, 2015, 1030, 1030, 1046, 2015, 1064, 1064, 1027, 4088, 7117, 1027, 4130, 18442, 1006, 5371, 1012, 16101, 18442, 1006, 1035, 1035, 5371, 1035, 1035, 1007, 1007, 4130, 1027, 7117, 1012, 3693, 1006, 1000, 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...
rocketjob/symmetric-encryption
lib/symmetric_encryption/header.rb
SymmetricEncryption.Header.parse!
def parse!(buffer) offset = parse(buffer) return if offset.zero? buffer.slice!(0..offset - 1) buffer end
ruby
def parse!(buffer) offset = parse(buffer) return if offset.zero? buffer.slice!(0..offset - 1) buffer end
[ "def", "parse!", "(", "buffer", ")", "offset", "=", "parse", "(", "buffer", ")", "return", "if", "offset", ".", "zero?", "buffer", ".", "slice!", "(", "0", "..", "offset", "-", "1", ")", "buffer", "end" ]
Returns [String] the encrypted data without header Returns nil if no header is present The supplied buffer will be updated directly and its header will be stripped if present. Parameters buffer String to extract the header from
[ "Returns", "[", "String", "]", "the", "encrypted", "data", "without", "header", "Returns", "nil", "if", "no", "header", "is", "present" ]
064ba8d57ffac44a3ed80f5e76fa1a54d660ff98
https://github.com/rocketjob/symmetric-encryption/blob/064ba8d57ffac44a3ed80f5e76fa1a54d660ff98/lib/symmetric_encryption/header.rb#L113-L119
train
Parse the buffer and return the resulting array.
[ 30522, 13366, 11968, 3366, 999, 1006, 17698, 1007, 16396, 1027, 11968, 3366, 1006, 17698, 1007, 2709, 2065, 16396, 1012, 5717, 1029, 17698, 1012, 14704, 999, 1006, 1014, 1012, 1012, 16396, 1011, 1015, 1007, 17698, 2203, 102, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
samvera/hyrax
app/controllers/hyrax/file_sets_controller.rb
Hyrax.FileSetsController.destroy
def destroy parent = curation_concern.parent actor.destroy redirect_to [main_app, parent], notice: 'The file has been deleted.' end
ruby
def destroy parent = curation_concern.parent actor.destroy redirect_to [main_app, parent], notice: 'The file has been deleted.' end
[ "def", "destroy", "parent", "=", "curation_concern", ".", "parent", "actor", ".", "destroy", "redirect_to", "[", "main_app", ",", "parent", "]", ",", "notice", ":", "'The file has been deleted.'", "end" ]
DELETE /concern/file_sets/:id
[ "DELETE", "/", "concern", "/", "file_sets", "/", ":", "id" ]
e2b4f56e829a53b1f11296324736e9d5b8c9ee5f
https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/hyrax/file_sets_controller.rb#L48-L52
train
destroy the file
[ 30522, 13366, 6033, 6687, 1027, 12731, 8156, 1035, 5142, 1012, 6687, 3364, 1012, 6033, 2417, 7442, 6593, 1035, 2000, 1031, 2364, 1035, 10439, 1010, 6687, 1033, 1010, 5060, 1024, 1005, 1996, 5371, 2038, 2042, 17159, 1012, 1005, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb
Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachines.get_extensions_with_http_info
def get_extensions_with_http_info(resource_group_name, vm_name, expand:nil, custom_headers:nil) get_extensions_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value! end
ruby
def get_extensions_with_http_info(resource_group_name, vm_name, expand:nil, custom_headers:nil) get_extensions_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value! end
[ "def", "get_extensions_with_http_info", "(", "resource_group_name", ",", "vm_name", ",", "expand", ":", "nil", ",", "custom_headers", ":", "nil", ")", "get_extensions_async", "(", "resource_group_name", ",", "vm_name", ",", "expand", ":", "expand", ",", "custom_head...
The operation to get all extensions of a Virtual Machine. @param resource_group_name [String] The name of the resource group. @param vm_name [String] The name of the virtual machine containing the extension. @param expand [String] The expand expression to apply on the operation. @param custom_headers [Hash{String...
[ "The", "operation", "to", "get", "all", "extensions", "of", "a", "Virtual", "Machine", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb#L53-L55
train
Gets the extensions of the virtual machine.
[ 30522, 13366, 2131, 1035, 14305, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 2171, 1010, 7818, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 14305, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
plataformatec/simple_form
lib/simple_form/form_builder.rb
SimpleForm.FormBuilder.error
def error(attribute_name, options = {}) options = options.dup options[:error_html] = options.except(:error_tag, :error_prefix, :error_method) column = find_attribute_column(attribute_name) input_type = default_input_type(attribute_name, column, options) wrapper.find(:error). ...
ruby
def error(attribute_name, options = {}) options = options.dup options[:error_html] = options.except(:error_tag, :error_prefix, :error_method) column = find_attribute_column(attribute_name) input_type = default_input_type(attribute_name, column, options) wrapper.find(:error). ...
[ "def", "error", "(", "attribute_name", ",", "options", "=", "{", "}", ")", "options", "=", "options", ".", "dup", "options", "[", ":error_html", "]", "=", "options", ".", "except", "(", ":error_tag", ",", ":error_prefix", ",", ":error_method", ")", "column...
Creates an error tag based on the given attribute, only when the attribute contains errors. All the given options are sent as :error_html. == Examples f.error :name f.error :name, id: "cool_error"
[ "Creates", "an", "error", "tag", "based", "on", "the", "given", "attribute", "only", "when", "the", "attribute", "contains", "errors", ".", "All", "the", "given", "options", "are", "sent", "as", ":", "error_html", "." ]
4dd9261ebb392e46a9beeefe8d83081e7c6e56b5
https://github.com/plataformatec/simple_form/blob/4dd9261ebb392e46a9beeefe8d83081e7c6e56b5/lib/simple_form/form_builder.rb#L255-L263
train
Render an error field
[ 30522, 13366, 7561, 1006, 17961, 1035, 2171, 1010, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 4241, 2361, 7047, 1031, 1024, 7561, 1035, 16129, 1033, 1027, 7047, 1012, 3272, 1006, 1024, 7561, 1035, 6415, 1010, 1024, 7561, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
httprb/http
lib/http/redirector.rb
HTTP.Redirector.redirect_to
def redirect_to(uri) raise StateError, "no Location header in redirect" unless uri verb = @request.verb code = @response.status.code if UNSAFE_VERBS.include?(verb) && STRICT_SENSITIVE_CODES.include?(code) raise StateError, "can't follow #{@response.status} redirect" if @strict ...
ruby
def redirect_to(uri) raise StateError, "no Location header in redirect" unless uri verb = @request.verb code = @response.status.code if UNSAFE_VERBS.include?(verb) && STRICT_SENSITIVE_CODES.include?(code) raise StateError, "can't follow #{@response.status} redirect" if @strict ...
[ "def", "redirect_to", "(", "uri", ")", "raise", "StateError", ",", "\"no Location header in redirect\"", "unless", "uri", "verb", "=", "@request", ".", "verb", "code", "=", "@response", ".", "status", ".", "code", "if", "UNSAFE_VERBS", ".", "include?", "(", "v...
Redirect policy for follow @return [Request]
[ "Redirect", "policy", "for", "follow" ]
f37a10ea4fab3ee411907ea2e4251ddf0ca33a93
https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/redirector.rb#L84-L98
train
redirect to URI
[ 30522, 13366, 2417, 7442, 6593, 1035, 2000, 1006, 24471, 2072, 1007, 5333, 2110, 2121, 29165, 1010, 1000, 2053, 3295, 20346, 1999, 2417, 7442, 6593, 1000, 4983, 24471, 2072, 12034, 1027, 1030, 5227, 1012, 12034, 3642, 1027, 1030, 3433, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-rds/lib/aws-sdk-rds/db_instance.rb
Aws::RDS.DBInstance.promote
def promote(options = {}) options = options.merge(db_instance_identifier: @id) resp = @client.promote_read_replica(options) DBInstance.new( id: resp.data.db_instance.db_instance_identifier, data: resp.data.db_instance, client: @client ) end
ruby
def promote(options = {}) options = options.merge(db_instance_identifier: @id) resp = @client.promote_read_replica(options) DBInstance.new( id: resp.data.db_instance.db_instance_identifier, data: resp.data.db_instance, client: @client ) end
[ "def", "promote", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "db_instance_identifier", ":", "@id", ")", "resp", "=", "@client", ".", "promote_read_replica", "(", "options", ")", "DBInstance", ".", "new", "(", "id", ...
@example Request syntax with placeholder values dbinstance = db_instance.promote({ backup_retention_period: 1, preferred_backup_window: "String", }) @param [Hash] options ({}) @option options [Integer] :backup_retention_period The number of days to retain automated backups. Setting this parameter ...
[ "@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#L2463-L2471
train
Promote a read replica to a read replica.
[ 30522, 13366, 5326, 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, 5326, 1035, 3191, 1035, 15059, 1006, 7047,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
runtime/ms_rest_azure/lib/ms_rest_azure/polling_state.rb
MsRestAzure.PollingState.update_response
def update_response(response) @response = response unless response.nil? @azure_async_operation_header_link = response.headers['Azure-AsyncOperation'] unless response.headers['Azure-AsyncOperation'].nil? @location_header_link = response.headers['Location'] unless response.headers['Location']...
ruby
def update_response(response) @response = response unless response.nil? @azure_async_operation_header_link = response.headers['Azure-AsyncOperation'] unless response.headers['Azure-AsyncOperation'].nil? @location_header_link = response.headers['Location'] unless response.headers['Location']...
[ "def", "update_response", "(", "response", ")", "@response", "=", "response", "unless", "response", ".", "nil?", "@azure_async_operation_header_link", "=", "response", ".", "headers", "[", "'Azure-AsyncOperation'", "]", "unless", "response", ".", "headers", "[", "'A...
Updates the polling state from the fields of given response object. @param response [Net::HTTPResponse] the HTTP response.
[ "Updates", "the", "polling", "state", "from", "the", "fields", "of", "given", "response", "object", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/runtime/ms_rest_azure/lib/ms_rest_azure/polling_state.rb#L87-L94
train
Update the response object
[ 30522, 13366, 10651, 1035, 3433, 1006, 3433, 1007, 1030, 3433, 1027, 3433, 4983, 3433, 1012, 9152, 2140, 1029, 1030, 24296, 1035, 2004, 6038, 2278, 1035, 3169, 1035, 20346, 1035, 4957, 1027, 3433, 1012, 20346, 2015, 1031, 1005, 24296, 30524...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/haml-lint
lib/haml_lint/reporter/disabled_config_reporter.rb
HamlLint.Reporter::DisabledConfigReporter.finished_file
def finished_file(file, lints) super if lints.any? lints.each do |lint| linters_with_lints[lint.linter.name] |= [lint.filename] linters_lint_count[lint.linter.name] += 1 end end end
ruby
def finished_file(file, lints) super if lints.any? lints.each do |lint| linters_with_lints[lint.linter.name] |= [lint.filename] linters_lint_count[lint.linter.name] += 1 end end end
[ "def", "finished_file", "(", "file", ",", "lints", ")", "super", "if", "lints", ".", "any?", "lints", ".", "each", "do", "|", "lint", "|", "linters_with_lints", "[", "lint", ".", "linter", ".", "name", "]", "|=", "[", "lint", ".", "filename", "]", "l...
Prints the standard progress report marks and tracks files with lint. @param file [String] @param lints [Array<HamlLint::Lint>] @return [void]
[ "Prints", "the", "standard", "progress", "report", "marks", "and", "tracks", "files", "with", "lint", "." ]
024c773667e54cf88db938c2b368977005d70ee8
https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/reporter/disabled_config_reporter.rb#L71-L80
train
Returns the number of lines that have been processed.
[ 30522, 13366, 2736, 1035, 5371, 1006, 5371, 1010, 11409, 3215, 1007, 3565, 2065, 11409, 3215, 1012, 2151, 1029, 11409, 3215, 1012, 2169, 2079, 1064, 11409, 2102, 1064, 11409, 7747, 1035, 2007, 1035, 11409, 3215, 1031, 11409, 2102, 1012, 114...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_closed_list
def update_closed_list(app_id, version_id, cl_entity_id, closed_list_model_update_object, custom_headers:nil) response = update_closed_list_async(app_id, version_id, cl_entity_id, closed_list_model_update_object, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update_closed_list(app_id, version_id, cl_entity_id, closed_list_model_update_object, custom_headers:nil) response = update_closed_list_async(app_id, version_id, cl_entity_id, closed_list_model_update_object, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update_closed_list", "(", "app_id", ",", "version_id", ",", "cl_entity_id", ",", "closed_list_model_update_object", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_closed_list_async", "(", "app_id", ",", "version_id", ",", "cl_entity_id", ",",...
Updates the list entity in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param cl_entity_id The list model ID. @param closed_list_model_update_object [ClosedListModelUpdateObject] The new list entity name and words list. @param custom_headers [Hash{St...
[ "Updates", "the", "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#L3129-L3132
train
Updates the entity Id of a closed list in a version of the application.
[ 30522, 13366, 10651, 1035, 2701, 1035, 2862, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 18856, 1035, 9178, 1035, 8909, 1010, 2701, 1035, 2862, 1035, 2944, 1035, 10651, 1035, 4874, 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...
square/connect-ruby-sdk
lib/square_connect/api_client.rb
SquareConnect.ApiClient.select_header_content_type
def select_header_content_type(content_types) # use application/json by default return 'application/json' if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } return json_content_type...
ruby
def select_header_content_type(content_types) # use application/json by default return 'application/json' if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } return json_content_type...
[ "def", "select_header_content_type", "(", "content_types", ")", "# use application/json by default", "return", "'application/json'", "if", "content_types", ".", "nil?", "||", "content_types", ".", "empty?", "# use JSON when present, otherwise use the first one", "json_content_type"...
Return Content-Type header based on an array of content types provided. @param [Array] content_types array for Content-Type @return [String] the Content-Type header (e.g. application/json)
[ "Return", "Content", "-", "Type", "header", "based", "on", "an", "array", "of", "content", "types", "provided", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api_client.rb#L332-L338
train
select the header content type
[ 30522, 13366, 7276, 1035, 20346, 1035, 4180, 1035, 2828, 1006, 4180, 1035, 4127, 1007, 1001, 2224, 4646, 1013, 1046, 3385, 2011, 12398, 2709, 1005, 4646, 1013, 1046, 3385, 1005, 2065, 4180, 1035, 4127, 1012, 9152, 2140, 1029, 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...
puppetlabs/puppet
lib/puppet/pops/evaluator/runtime3_converter.rb
Puppet::Pops::Evaluator.Runtime3Converter.catalog_type_to_split_type_title
def catalog_type_to_split_type_title(catalog_type) split_type = catalog_type.is_a?(Puppet::Pops::Types::PTypeType) ? catalog_type.type : catalog_type case split_type when Puppet::Pops::Types::PClassType class_name = split_type.class_name ['class', class_name.nil? ? nil : class_name.sub(/^:...
ruby
def catalog_type_to_split_type_title(catalog_type) split_type = catalog_type.is_a?(Puppet::Pops::Types::PTypeType) ? catalog_type.type : catalog_type case split_type when Puppet::Pops::Types::PClassType class_name = split_type.class_name ['class', class_name.nil? ? nil : class_name.sub(/^:...
[ "def", "catalog_type_to_split_type_title", "(", "catalog_type", ")", "split_type", "=", "catalog_type", ".", "is_a?", "(", "Puppet", "::", "Pops", "::", "Types", "::", "PTypeType", ")", "?", "catalog_type", ".", "type", ":", "catalog_type", "case", "split_type", ...
Produces an array with [type, title] from a PCatalogEntryType This method is used to produce the arguments for creation of reference resource instances (used when 3x is operating on a resource). Ensures that resources are *not* absolute.
[ "Produces", "an", "array", "with", "[", "type", "title", "]", "from", "a", "PCatalogEntryType", "This", "method", "is", "used", "to", "produce", "the", "arguments", "for", "creation", "of", "reference", "resource", "instances", "(", "used", "when", "3x", "is...
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/pops/evaluator/runtime3_converter.rb#L132-L153
train
Returns the split type title
[ 30522, 13366, 12105, 1035, 2828, 1035, 2000, 1035, 3975, 1035, 2828, 1035, 2516, 1006, 12105, 1035, 2828, 1007, 3975, 1035, 2828, 1027, 12105, 1035, 2828, 1012, 2003, 1035, 1037, 1029, 1006, 13997, 1024, 1024, 16949, 1024, 1024, 4127, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb
Azure::Web::Mgmt::V2018_02_01.Recommendations.list_history_for_web_app_with_http_info
def list_history_for_web_app_with_http_info(resource_group_name, site_name, expired_only:nil, filter:nil, custom_headers:nil) list_history_for_web_app_async(resource_group_name, site_name, expired_only:expired_only, filter:filter, custom_headers:custom_headers).value! end
ruby
def list_history_for_web_app_with_http_info(resource_group_name, site_name, expired_only:nil, filter:nil, custom_headers:nil) list_history_for_web_app_async(resource_group_name, site_name, expired_only:expired_only, filter:filter, custom_headers:custom_headers).value! end
[ "def", "list_history_for_web_app_with_http_info", "(", "resource_group_name", ",", "site_name", ",", "expired_only", ":", "nil", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_history_for_web_app_async", "(", "resource_group_name", ",", "site_n...
Get past recommendations for an app, optionally specified by the time range. Get past recommendations for an app, optionally specified by the time range. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Name of the app. @param expired_only [B...
[ "Get", "past", "recommendations", "for", "an", "app", "optionally", "specified", "by", "the", "time", "range", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb#L349-L351
train
Gets the history for the specified App Service Environment.
[ 30522, 13366, 2862, 1035, 2381, 1035, 2005, 1035, 4773, 1035, 10439, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2609, 1035, 2171, 1010, 13735, 1035, 2069, 1024, 9152, 2140, 1010, 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...
ruby/psych
lib/psych/tree_builder.rb
Psych.TreeBuilder.end_document
def end_document implicit_end = !streaming? @last.implicit_end = implicit_end n = pop set_end_location(n) n end
ruby
def end_document implicit_end = !streaming? @last.implicit_end = implicit_end n = pop set_end_location(n) n end
[ "def", "end_document", "implicit_end", "=", "!", "streaming?", "@last", ".", "implicit_end", "=", "implicit_end", "n", "=", "pop", "set_end_location", "(", "n", ")", "n", "end" ]
Handles end_document events with +version+, +tag_directives+, and +implicit+ styling. See Psych::Handler#start_document
[ "Handles", "end_document", "events", "with", "+", "version", "+", "+", "tag_directives", "+", "and", "+", "implicit", "+", "styling", "." ]
f3a37e6bc1c2a98bfc9fafc389ea05622c744af9
https://github.com/ruby/psych/blob/f3a37e6bc1c2a98bfc9fafc389ea05622c744af9/lib/psych/tree_builder.rb#L77-L82
train
End a document.
[ 30522, 13366, 2203, 1035, 6254, 24655, 1035, 2203, 1027, 999, 11058, 1029, 1030, 2197, 1012, 24655, 1035, 2203, 1027, 24655, 1035, 2203, 1050, 1027, 3769, 2275, 1035, 2203, 1035, 3295, 1006, 1050, 1007, 1050, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
actionview/lib/action_view/lookup_context.rb
ActionView.LookupContext.formats=
def formats=(values) if values values = values.dup values.concat(default_formats) if values.delete "*/*" values.uniq! invalid_values = (values - Template::Types.symbols) unless invalid_values.empty? raise ArgumentError, "Invalid formats: #{invalid_values.map(&:in...
ruby
def formats=(values) if values values = values.dup values.concat(default_formats) if values.delete "*/*" values.uniq! invalid_values = (values - Template::Types.symbols) unless invalid_values.empty? raise ArgumentError, "Invalid formats: #{invalid_values.map(&:in...
[ "def", "formats", "=", "(", "values", ")", "if", "values", "values", "=", "values", ".", "dup", "values", ".", "concat", "(", "default_formats", ")", "if", "values", ".", "delete", "\"*/*\"", "values", ".", "uniq!", "invalid_values", "=", "(", "values", ...
Override formats= to expand ["*/*"] values and automatically add :html as fallback to :js.
[ "Override", "formats", "=", "to", "expand", "[", "*", "/", "*", "]", "values", "and", "automatically", "add", ":", "html", "as", "fallback", "to", ":", "js", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/lookup_context.rb#L280-L297
train
Returns the formats for this template.
[ 30522, 13366, 11630, 1027, 1006, 5300, 1007, 2065, 5300, 5300, 1027, 5300, 1012, 4241, 2361, 5300, 1012, 9530, 11266, 1006, 12398, 1035, 11630, 1007, 2065, 5300, 1012, 3972, 12870, 1000, 1008, 1013, 1008, 1000, 5300, 1012, 4895, 18515, 999,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
gocardless/business
lib/business/calendar.rb
Business.Calendar.business_days_between
def business_days_between(date1, date2) date1, date2 = date1.to_date, date2.to_date # To optimise this method we split the range into full weeks and a # remaining period. # # We then calculate business days in the full weeks period by # multiplying number of weeks by number of worki...
ruby
def business_days_between(date1, date2) date1, date2 = date1.to_date, date2.to_date # To optimise this method we split the range into full weeks and a # remaining period. # # We then calculate business days in the full weeks period by # multiplying number of weeks by number of worki...
[ "def", "business_days_between", "(", "date1", ",", "date2", ")", "date1", ",", "date2", "=", "date1", ".", "to_date", ",", "date2", ".", "to_date", "# To optimise this method we split the range into full weeks and a", "# remaining period.", "#", "# We then calculate busines...
Count the number of business days between two dates. This method counts from start of date1 to start of date2. So, business_days_between(mon, weds) = 2 (assuming no holidays)
[ "Count", "the", "number", "of", "business", "days", "between", "two", "dates", ".", "This", "method", "counts", "from", "start", "of", "date1", "to", "start", "of", "date2", ".", "So", "business_days_between", "(", "mon", "weds", ")", "=", "2", "(", "ass...
62a2a09008095403bafa78033a8be1afe6debbf6
https://github.com/gocardless/business/blob/62a2a09008095403bafa78033a8be1afe6debbf6/lib/business/calendar.rb#L130-L160
train
Calculate the number of business days between two dates
[ 30522, 13366, 2449, 1035, 2420, 1035, 2090, 1006, 3058, 2487, 1010, 3058, 2475, 1007, 3058, 2487, 1010, 3058, 2475, 1027, 3058, 2487, 1012, 2000, 1035, 3058, 1010, 3058, 2475, 1012, 2000, 1035, 3058, 1001, 2000, 23569, 27605, 3366, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.active_machines
def active_machines # We have no active machines if we have no data path return [] if !@local_data_path machine_folder = @local_data_path.join("machines") # If the machine folder is not a directory then we just return # an empty array since no active machines exist. return [] if !m...
ruby
def active_machines # We have no active machines if we have no data path return [] if !@local_data_path machine_folder = @local_data_path.join("machines") # If the machine folder is not a directory then we just return # an empty array since no active machines exist. return [] if !m...
[ "def", "active_machines", "# We have no active machines if we have no data path", "return", "[", "]", "if", "!", "@local_data_path", "machine_folder", "=", "@local_data_path", ".", "join", "(", "\"machines\"", ")", "# If the machine folder is not a directory then we just return", ...
Returns a list of machines that this environment is currently managing that physically have been created. An "active" machine is a machine that Vagrant manages that has been created. The machine itself may be in any state such as running, suspended, etc. but if a machine is "active" then it exists. Note that the...
[ "Returns", "a", "list", "of", "machines", "that", "this", "environment", "is", "currently", "managing", "that", "physically", "have", "been", "created", "." ]
c22a145c59790c098f95d50141d9afb48e1ef55f
https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/environment.rb#L233-L265
train
Returns an array of the active machines
[ 30522, 13366, 3161, 1035, 6681, 1001, 2057, 2031, 2053, 3161, 6681, 2065, 2057, 2031, 2053, 2951, 4130, 2709, 1031, 1033, 2065, 999, 1030, 2334, 1035, 2951, 1035, 4130, 3698, 1035, 19622, 1027, 1030, 2334, 1035, 2951, 1035, 4130, 1012, 36...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_data_lake_store_account
def add_data_lake_store_account(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers:nil) response = add_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers:custom_headers).value! nil end
ruby
def add_data_lake_store_account(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers:nil) response = add_data_lake_store_account_async(resource_group_name, account_name, data_lake_store_account_name, parameters, custom_headers:custom_headers).value! nil end
[ "def", "add_data_lake_store_account", "(", "resource_group_name", ",", "account_name", ",", "data_lake_store_account_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "add_data_lake_store_account_async", "(", "resource_group_name", ",", "acc...
Updates the specified Data Lake Analytics account to include the additional Data Lake Store 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 ...
[ "Updates", "the", "specified", "Data", "Lake", "Analytics", "account", "to", "include", "the", "additional", "Data", "Lake", "Store", "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#L1010-L1013
train
Adds the specified Data Lake Store account to the specified Data Lake Store account.
[ 30522, 13366, 5587, 1035, 2951, 1035, 2697, 1035, 3573, 1035, 4070, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 2951, 1035, 2697, 1035, 3573, 1035, 4070, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb
Azure::EventGrid::Mgmt::V2018_01_01.EventSubscriptions.list_global_by_subscription
def list_global_by_subscription(custom_headers:nil) response = list_global_by_subscription_async(custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_global_by_subscription(custom_headers:nil) response = list_global_by_subscription_async(custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_global_by_subscription", "(", "custom_headers", ":", "nil", ")", "response", "=", "list_global_by_subscription_async", "(", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", ".", "nil?", "end" ]
Get an aggregated list of all global event subscriptions under an Azure subscription List all aggregated global event subscriptions under a specific Azure subscription @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EventSubscriptionsList...
[ "Get", "an", "aggregated", "list", "of", "all", "global", "event", "subscriptions", "under", "an", "Azure", "subscription" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb#L485-L488
train
Gets all the global information about the resource groups.
[ 30522, 13366, 2862, 1035, 3795, 1035, 2011, 1035, 15002, 1006, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 3795, 1035, 2011, 1035, 15002, 1035, 2004, 6038, 2278, 1006, 7661, 1035, 20346, 2015, 1024, 7661, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/accounts.rb
Azure::DataLakeAnalytics::Mgmt::V2016_11_01.Accounts.list
def list(filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil) first_page = list_as_lazy(filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list(filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil) first_page = list_as_lazy(filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list", "(", "filter", ":", "nil", ",", "top", ":", "nil", ",", "skip", ":", "nil", ",", "select", ":", "nil", ",", "orderby", ":", "nil", ",", "count", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_as_lazy", "...
Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. @param filter [String] OData filter. Optional. @param top [Integer] The number of items to return. Optional. @param skip [Integer] The number of items to skip over before ret...
[ "Gets", "the", "first", "page", "of", "Data", "Lake", "Analytics", "accounts", "if", "any", "within", "the", "current", "subscription", ".", "This", "includes", "a", "link", "to", "the", "next", "page", "if", "any", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/accounts.rb#L47-L50
train
Gets all the items in a product.
[ 30522, 13366, 2862, 1006, 11307, 1024, 9152, 2140, 1010, 2327, 1024, 9152, 2140, 1010, 13558, 1024, 9152, 2140, 1010, 7276, 1024, 9152, 2140, 1010, 2344, 3762, 1024, 9152, 2140, 1010, 4175, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
oauth-xx/oauth2
lib/oauth2/access_token.rb
OAuth2.AccessToken.refresh
def refresh(params = {}, access_token_opts = {}, access_token_class = self.class) raise('A refresh_token is not available') unless refresh_token params[:grant_type] = 'refresh_token' params[:refresh_token] = refresh_token new_token = @client.get_token(params, access_token_opts, access_token_clas...
ruby
def refresh(params = {}, access_token_opts = {}, access_token_class = self.class) raise('A refresh_token is not available') unless refresh_token params[:grant_type] = 'refresh_token' params[:refresh_token] = refresh_token new_token = @client.get_token(params, access_token_opts, access_token_clas...
[ "def", "refresh", "(", "params", "=", "{", "}", ",", "access_token_opts", "=", "{", "}", ",", "access_token_class", "=", "self", ".", "class", ")", "raise", "(", "'A refresh_token is not available'", ")", "unless", "refresh_token", "params", "[", ":grant_type", ...
Refreshes the current Access Token @return [AccessToken] a new AccessToken @note options should be carried over to the new AccessToken
[ "Refreshes", "the", "current", "Access", "Token" ]
f08ff9da169136ab133aa2faab0d74a4407deffb
https://github.com/oauth-xx/oauth2/blob/f08ff9da169136ab133aa2faab0d74a4407deffb/lib/oauth2/access_token.rb#L85-L93
train
Refresh a token
[ 30522, 13366, 25416, 21898, 1006, 11498, 5244, 1027, 1063, 1065, 1010, 3229, 1035, 19204, 1035, 23569, 2015, 1027, 1063, 1065, 1010, 3229, 1035, 19204, 1035, 2465, 1027, 2969, 1012, 2465, 1007, 5333, 1006, 1005, 1037, 25416, 21898, 1035, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_certificate_with_http_info
def get_certificate_with_http_info(vault_base_url, certificate_name, certificate_version, custom_headers:nil) get_certificate_async(vault_base_url, certificate_name, certificate_version, custom_headers:custom_headers).value! end
ruby
def get_certificate_with_http_info(vault_base_url, certificate_name, certificate_version, custom_headers:nil) get_certificate_async(vault_base_url, certificate_name, certificate_version, custom_headers:custom_headers).value! end
[ "def", "get_certificate_with_http_info", "(", "vault_base_url", ",", "certificate_name", ",", "certificate_version", ",", "custom_headers", ":", "nil", ")", "get_certificate_async", "(", "vault_base_url", ",", "certificate_name", ",", "certificate_version", ",", "custom_hea...
Gets information about a certificate. Gets information about a specific certificate. This operation requires the certificates/get permission. @param vault_base_url [String] The vault name, for example https://myvault.vault.azure.net. @param certificate_name [String] The name of the certificate in the given vaul...
[ "Gets", "information", "about", "a", "certificate", "." ]
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#L5964-L5966
train
Gets the certificate.
[ 30522, 13366, 2131, 1035, 8196, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 8196, 1035, 2171, 1010, 8196, 1035, 2544, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 8196, 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...
gollum/gollum
lib/gollum/app.rb
Precious.App.wiki_page
def wiki_page(name, path = nil, version = nil, exact = true) wiki = wiki_new path = name if path.nil? name = extract_name(name) || wiki.index_page path = extract_path(path) path = '/' if exact && path.nil? OpenStruct.new(:wiki => wiki, :page => wiki.paged(name, path, exact, version)...
ruby
def wiki_page(name, path = nil, version = nil, exact = true) wiki = wiki_new path = name if path.nil? name = extract_name(name) || wiki.index_page path = extract_path(path) path = '/' if exact && path.nil? OpenStruct.new(:wiki => wiki, :page => wiki.paged(name, path, exact, version)...
[ "def", "wiki_page", "(", "name", ",", "path", "=", "nil", ",", "version", "=", "nil", ",", "exact", "=", "true", ")", "wiki", "=", "wiki_new", "path", "=", "name", "if", "path", ".", "nil?", "name", "=", "extract_name", "(", "name", ")", "||", "wik...
path is set to name if path is nil. if path is 'a/b' and a and b are dirs, then path must have a trailing slash 'a/b/' or extract_path will trim path to 'a' name, path, version
[ "path", "is", "set", "to", "name", "if", "path", "is", "nil", ".", "if", "path", "is", "a", "/", "b", "and", "a", "and", "b", "are", "dirs", "then", "path", "must", "have", "a", "trailing", "slash", "a", "/", "b", "/", "or", "extract_path", "will...
f44367c31baac5c154888a9e09b2833fa62e1c61
https://github.com/gollum/gollum/blob/f44367c31baac5c154888a9e09b2833fa62e1c61/lib/gollum/app.rb#L118-L127
train
Returns a new page object for the given name
[ 30522, 13366, 15536, 3211, 1035, 3931, 1006, 2171, 1010, 4130, 1027, 9152, 2140, 1010, 2544, 1027, 9152, 2140, 1010, 6635, 1027, 2995, 1007, 15536, 3211, 1027, 15536, 3211, 1035, 2047, 4130, 1027, 2171, 2065, 4130, 1012, 9152, 2140, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb
Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.get_certificate
def get_certificate(resource_group_name, certificate_order_name, name, custom_headers:nil) response = get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_certificate(resource_group_name, certificate_order_name, name, custom_headers:nil) response = get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_certificate", "(", "resource_group_name", ",", "certificate_order_name", ",", "name", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_certificate_async", "(", "resource_group_name", ",", "certificate_order_name", ",", "name", ",", "custom_heade...
Get the certificate associated with a certificate order. Get the certificate associated with a certificate order. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param certificate_order_name [String] Name of the certificate order. @param name [String] Name of the ce...
[ "Get", "the", "certificate", "associated", "with", "a", "certificate", "order", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb#L803-L806
train
Gets the certificate for the specified certificate order.
[ 30522, 13366, 2131, 1035, 8196, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8196, 1035, 2344, 1035, 2171, 1010, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 8196, 1035, 2004, 6038, 2278, 1006, 7692, 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...
puppetlabs/bolt
lib/plan_executor/executor.rb
PlanExecutor.Executor.log_action
def log_action(description, targets) # When running a plan, info messages like starting a task are promoted to notice. log_method = @plan_logging ? :notice : :info target_str = if targets.length > 5 "#{targets.count} targets" else targets.ma...
ruby
def log_action(description, targets) # When running a plan, info messages like starting a task are promoted to notice. log_method = @plan_logging ? :notice : :info target_str = if targets.length > 5 "#{targets.count} targets" else targets.ma...
[ "def", "log_action", "(", "description", ",", "targets", ")", "# When running a plan, info messages like starting a task are promoted to notice.", "log_method", "=", "@plan_logging", "?", ":notice", ":", ":info", "target_str", "=", "if", "targets", ".", "length", ">", "5"...
BOLT-1098
[ "BOLT", "-", "1098" ]
50689a33699939d262ea7c822a4b24fd8c4f8d8a
https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/plan_executor/executor.rb#L41-L62
train
Log the action
[ 30522, 13366, 8833, 1035, 2895, 1006, 6412, 1010, 7889, 1007, 1001, 2043, 2770, 1037, 2933, 1010, 18558, 7696, 2066, 3225, 1037, 4708, 2024, 3755, 2000, 5060, 1012, 8833, 1035, 4118, 1027, 1030, 2933, 1035, 15899, 1029, 1024, 5060, 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...
vcr/vcr
lib/vcr/configuration.rb
VCR.Configuration.define_cassette_placeholder
def define_cassette_placeholder(placeholder, tag = nil, &block) before_record(tag) do |interaction| orig_text = call_block(block, interaction) log "before_record: replacing #{orig_text.inspect} with #{placeholder.inspect}" interaction.filter!(orig_text, placeholder) end before...
ruby
def define_cassette_placeholder(placeholder, tag = nil, &block) before_record(tag) do |interaction| orig_text = call_block(block, interaction) log "before_record: replacing #{orig_text.inspect} with #{placeholder.inspect}" interaction.filter!(orig_text, placeholder) end before...
[ "def", "define_cassette_placeholder", "(", "placeholder", ",", "tag", "=", "nil", ",", "&", "block", ")", "before_record", "(", "tag", ")", "do", "|", "interaction", "|", "orig_text", "=", "call_block", "(", "block", ",", "interaction", ")", "log", "\"before...
Sets up a {#before_record} and a {#before_playback} hook that will insert a placeholder string in the cassette in place of another string. You can use this as a generic way to interpolate a variable into the cassette for a unique string. It's particularly useful for unique sensitive strings like API keys and passwo...
[ "Sets", "up", "a", "{", "#before_record", "}", "and", "a", "{", "#before_playback", "}", "hook", "that", "will", "insert", "a", "placeholder", "string", "in", "the", "cassette", "in", "place", "of", "another", "string", ".", "You", "can", "use", "this", ...
945ca793a4b25c7ffc406b9fd7da1e94cbbb8141
https://github.com/vcr/vcr/blob/945ca793a4b25c7ffc406b9fd7da1e94cbbb8141/lib/vcr/configuration.rb#L225-L237
train
Define a placeholder for a given interaction.
[ 30522, 13366, 9375, 1035, 13903, 1035, 2173, 14528, 1006, 2173, 14528, 1010, 6415, 1027, 9152, 2140, 1010, 1004, 3796, 1007, 2077, 1035, 2501, 1006, 6415, 1007, 2079, 1064, 8290, 1064, 2030, 8004, 1035, 3793, 1027, 2655, 1035, 3796, 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_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.DeviceSettings.begin_update_network_settings_with_http_info
def begin_update_network_settings_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers:nil) begin_update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value! end
ruby
def begin_update_network_settings_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers:nil) begin_update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value! end
[ "def", "begin_update_network_settings_with_http_info", "(", "device_name", ",", "parameters", ",", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":", "nil", ")", "begin_update_network_settings_async", "(", "device_name", ",", "parameters", ",", "resourc...
Updates the network settings on the specified device. @param device_name [String] The device name @param parameters [NetworkSettingsPatch] The network settings to be updated. @param resource_group_name [String] The resource group name @param manager_name [String] The manager name @param custom_headers [Hash{Strin...
[ "Updates", "the", "network", "settings", "on", "the", "specified", "device", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb#L780-L782
train
Updates network settings of the specified device.
[ 30522, 13366, 4088, 1035, 10651, 1035, 2897, 1035, 10906, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 5080, 1035, 2171, 1010, 11709, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb
Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachineScaleSets.begin_deallocate_with_http_info
def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end
ruby
def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end
[ "def", "begin_deallocate_with_http_info", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vm_instance_ids", ":", "nil", ",", "custom_headers", ":", "nil", ")", "begin_deallocate_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vm_instance_ids"...
Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [St...
[ "Deallocates", "specific", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "Shuts", "down", "the", "virtual", "machines", "and", "releases", "the", "compute", "resources", ".", "You", "are", "not", "billed", "for", "the", "compute", "resources", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1175-L1177
train
Deallocate virtual machines from a VM scale set.
[ 30522, 13366, 4088, 1035, 3066, 4135, 16280, 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, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
chaps-io/public_activity
lib/public_activity/common.rb
PublicActivity.Common.prepare_parameters
def prepare_parameters(options) params = {} params.merge!(self.class.activity_params_global) params.merge!(self.activity_params) if self.activity_params params.merge!([options.delete(:parameters), options.delete(:params), {}].compact.first) params.each { |k, v| params[k] = PublicActivity.r...
ruby
def prepare_parameters(options) params = {} params.merge!(self.class.activity_params_global) params.merge!(self.activity_params) if self.activity_params params.merge!([options.delete(:parameters), options.delete(:params), {}].compact.first) params.each { |k, v| params[k] = PublicActivity.r...
[ "def", "prepare_parameters", "(", "options", ")", "params", "=", "{", "}", "params", ".", "merge!", "(", "self", ".", "class", ".", "activity_params_global", ")", "params", ".", "merge!", "(", "self", ".", "activity_params", ")", "if", "self", ".", "activi...
Prepares i18n parameters that will be serialized into the Activity#parameters column @private
[ "Prepares", "i18n", "parameters", "that", "will", "be", "serialized", "into", "the", "Activity#parameters", "column" ]
e4357cd14db67299e0cbbd656300f51b7069ea9b
https://github.com/chaps-io/public_activity/blob/e4357cd14db67299e0cbbd656300f51b7069ea9b/lib/public_activity/common.rb#L319-L325
train
Prepare parameters for the activity
[ 30522, 13366, 7374, 1035, 11709, 1006, 7047, 1007, 11498, 5244, 1027, 1063, 1065, 11498, 5244, 1012, 13590, 999, 1006, 2969, 1012, 2465, 1012, 4023, 1035, 11498, 5244, 1035, 3795, 1007, 11498, 5244, 1012, 13590, 999, 1006, 2969, 1012, 4023,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
danger/danger
lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb
Danger.DangerfileMessagingPlugin.violation_report
def violation_report { errors: @errors.clone.freeze, warnings: @warnings.clone.freeze, messages: @messages.clone.freeze } end
ruby
def violation_report { errors: @errors.clone.freeze, warnings: @warnings.clone.freeze, messages: @messages.clone.freeze } end
[ "def", "violation_report", "{", "errors", ":", "@errors", ".", "clone", ".", "freeze", ",", "warnings", ":", "@warnings", ".", "clone", ".", "freeze", ",", "messages", ":", "@messages", ".", "clone", ".", "freeze", "}", "end" ]
@!group Reporting A list of all violations passed to Danger, we don't anticipate users of Danger needing to use this. @visibility hidden @return [Hash]
[ "@!group", "Reporting", "A", "list", "of", "all", "violations", "passed", "to", "Danger", "we", "don", "t", "anticipate", "users", "of", "Danger", "needing", "to", "use", "this", "." ]
0d6d09f2d949c287fe75202d947374042b0679f4
https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb#L204-L210
train
Report the violation report for the current object.
[ 30522, 13366, 11371, 1035, 3189, 1063, 10697, 1024, 1030, 10697, 1012, 17598, 1012, 13184, 1010, 16234, 1024, 1030, 16234, 1012, 17598, 1012, 13184, 1010, 7696, 1024, 1030, 7696, 1012, 17598, 1012, 13184, 1065, 2203, 102, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_secret
def delete_secret(vault_base_url, secret_name, custom_headers:nil) response = delete_secret_async(vault_base_url, secret_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def delete_secret(vault_base_url, secret_name, custom_headers:nil) response = delete_secret_async(vault_base_url, secret_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "delete_secret", "(", "vault_base_url", ",", "secret_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_secret_async", "(", "vault_base_url", ",", "secret_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", "....
Deletes a secret from a specified key vault. The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret. This operation requires the secrets/delete permission. @param vault_base_url [String] The vault name, for example https://myvault.vault...
[ "Deletes", "a", "secret", "from", "a", "specified", "key", "vault", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L2798-L2801
train
Deletes the specified secret.
[ 30522, 13366, 3972, 12870, 1035, 3595, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 3595, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 3595, 1035, 2004, 6038, 2278, 1006, 11632, 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_mixedreality/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb
Azure::MixedReality::Mgmt::V2019_02_28_preview.SpatialAnchorsAccounts.delete
def delete(resource_group_name, spatial_anchors_account_name, custom_headers:nil) response = delete_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, spatial_anchors_account_name, custom_headers:nil) response = delete_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "spatial_anchors_account_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "spatial_anchors_account_name", ",", "custom_headers", ":custom_headers", ")", ".", ...
Delete a Spatial Anchors Account. @param resource_group_name [String] Name of an Azure resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Delete", "a", "Spatial", "Anchors", "Account", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_mixedreality/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb#L209-L212
train
Deletes a spatial anchor.
[ 30522, 13366, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 13589, 1035, 24674, 1035, 4070, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 30524, 1035, 20346, 2015, 1024, 7661, 1035, 203...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
plataformatec/simple_form
lib/simple_form/form_builder.rb
SimpleForm.FormBuilder.input
def input(attribute_name, options = {}, &block) options = @defaults.deep_dup.deep_merge(options) if @defaults input = find_input(attribute_name, options, &block) wrapper = find_wrapper(input.input_type, options) wrapper.render input end
ruby
def input(attribute_name, options = {}, &block) options = @defaults.deep_dup.deep_merge(options) if @defaults input = find_input(attribute_name, options, &block) wrapper = find_wrapper(input.input_type, options) wrapper.render input end
[ "def", "input", "(", "attribute_name", ",", "options", "=", "{", "}", ",", "&", "block", ")", "options", "=", "@defaults", ".", "deep_dup", ".", "deep_merge", "(", "options", ")", "if", "@defaults", "input", "=", "find_input", "(", "attribute_name", ",", ...
Basic input helper, combines all components in the stack to generate input html based on options the user define and some guesses through database column information. By default a call to input will generate label + input + hint (when defined) + errors (when exists), and all can be configured inside a wrapper html....
[ "Basic", "input", "helper", "combines", "all", "components", "in", "the", "stack", "to", "generate", "input", "html", "based", "on", "options", "the", "user", "define", "and", "some", "guesses", "through", "database", "column", "information", ".", "By", "defau...
4dd9261ebb392e46a9beeefe8d83081e7c6e56b5
https://github.com/plataformatec/simple_form/blob/4dd9261ebb392e46a9beeefe8d83081e7c6e56b5/lib/simple_form/form_builder.rb#L117-L124
train
Returns the input object for the given attribute name.
[ 30522, 13366, 7953, 1006, 17961, 1035, 2171, 1010, 7047, 1027, 1063, 1065, 1010, 1004, 3796, 1007, 7047, 1027, 1030, 12398, 2015, 1012, 2784, 1035, 4241, 2361, 1012, 2784, 1035, 13590, 1006, 7047, 1007, 2065, 1030, 12398, 2015, 7953, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb
Azure::EventHub::Mgmt::V2017_04_01.ConsumerGroups.list_by_event_hub_next
def list_by_event_hub_next(next_page_link, custom_headers:nil) response = list_by_event_hub_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_event_hub_next(next_page_link, custom_headers:nil) response = list_by_event_hub_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_event_hub_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_event_hub_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "re...
Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. @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 HT...
[ "Gets", "all", "the", "consumer", "groups", "in", "a", "Namespace", ".", "An", "empty", "feed", "is", "returned", "if", "no", "consumer", "group", "exists", "in", "the", "Namespace", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb#L500-L503
train
Gets the list of all the available Azure Central Hubs.
[ 30522, 13366, 2862, 1035, 2011, 1035, 2724, 1035, 9594, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 2724, 1035, 9594, 1035, 2279, 1035, 2004, 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...
phusion/passenger
src/ruby_supportlib/phusion_passenger/message_channel.rb
PhusionPassenger.MessageChannel.recv_io
def recv_io(klass = IO, negotiate = true) write("pass IO") if negotiate io = @io.recv_io(klass) write("got IO") if negotiate return io end
ruby
def recv_io(klass = IO, negotiate = true) write("pass IO") if negotiate io = @io.recv_io(klass) write("got IO") if negotiate return io end
[ "def", "recv_io", "(", "klass", "=", "IO", ",", "negotiate", "=", "true", ")", "write", "(", "\"pass IO\"", ")", "if", "negotiate", "io", "=", "@io", ".", "recv_io", "(", "klass", ")", "write", "(", "\"got IO\"", ")", "if", "negotiate", "return", "io",...
Receive an IO object (a file descriptor) from the channel. The other side must have sent an IO object by calling send_io(). Note that this only works on Unix sockets. Might raise SystemCallError, IOError or SocketError when something goes wrong.
[ "Receive", "an", "IO", "object", "(", "a", "file", "descriptor", ")", "from", "the", "channel", ".", "The", "other", "side", "must", "have", "sent", "an", "IO", "object", "by", "calling", "send_io", "()", ".", "Note", "that", "this", "only", "works", "...
970964b53e0ba86959acdf40f06c99b0c4a128ca
https://github.com/phusion/passenger/blob/970964b53e0ba86959acdf40f06c99b0c4a128ca/src/ruby_supportlib/phusion_passenger/message_channel.rb#L259-L264
train
recv_io returns an IO object
[ 30522, 13366, 28667, 2615, 1035, 22834, 1006, 1047, 27102, 1027, 22834, 1010, 13676, 1027, 2995, 1007, 4339, 1006, 1000, 3413, 22834, 1000, 1007, 2065, 13676, 22834, 1027, 1030, 22834, 1012, 28667, 2615, 1035, 22834, 1006, 1047, 27102, 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...
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.update_availability!
def update_availability!(app_id, availability) r = request(:get, "ra/apps/#{app_id}/pricing/intervals") data = parse_response(r, 'data') data["countriesChanged"] = true data["countries"] = availability.territories.map { |territory| { 'code' => territory.code } } data["theWorld"] = availab...
ruby
def update_availability!(app_id, availability) r = request(:get, "ra/apps/#{app_id}/pricing/intervals") data = parse_response(r, 'data') data["countriesChanged"] = true data["countries"] = availability.territories.map { |territory| { 'code' => territory.code } } data["theWorld"] = availab...
[ "def", "update_availability!", "(", "app_id", ",", "availability", ")", "r", "=", "request", "(", ":get", ",", "\"ra/apps/#{app_id}/pricing/intervals\"", ")", "data", "=", "parse_response", "(", "r", ",", "'data'", ")", "data", "[", "\"countriesChanged\"", "]", ...
@!group Availability Updates the availability @note Although this information is publicly available, the current spaceship implementation requires you to have a logged in client to access it @param app_id (String): The id of your app @param availability (Availability): The availability update @return [Spaceship...
[ "@!group", "Availability" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L700-L731
train
Updates the availability of an app
[ 30522, 13366, 10651, 1035, 11343, 999, 1006, 10439, 1035, 8909, 1010, 11343, 1007, 1054, 1027, 5227, 1006, 1024, 2131, 1010, 1000, 10958, 1013, 18726, 1013, 1001, 1063, 10439, 1035, 8909, 1065, 1013, 20874, 1013, 14025, 1000, 1007, 2951, 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...
piotrmurach/github
lib/github_api/client/activity/events.rb
Github.Client::Activity::Events.received
def received(*args) arguments(args, required: [:user]) params = arguments.params public_events = if params['public'] params.delete('public') '/public' end response = get_request("/users/#{arguments.user}/received_events#{public_events}", params) return response unle...
ruby
def received(*args) arguments(args, required: [:user]) params = arguments.params public_events = if params['public'] params.delete('public') '/public' end response = get_request("/users/#{arguments.user}/received_events#{public_events}", params) return response unle...
[ "def", "received", "(", "*", "args", ")", "arguments", "(", "args", ",", "required", ":", "[", ":user", "]", ")", "params", "=", "arguments", ".", "params", "public_events", "=", "if", "params", "[", "'public'", "]", "params", ".", "delete", "(", "'pub...
List all events that a user has received @see https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received These are events that you’ve received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you’ll only see publi...
[ "List", "all", "events", "that", "a", "user", "has", "received" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/activity/events.rb#L150-L162
train
Get received events
[ 30522, 13366, 2363, 1006, 1008, 12098, 5620, 1007, 9918, 1006, 12098, 5620, 1010, 3223, 1024, 1031, 1024, 5310, 1033, 1007, 11498, 5244, 1027, 9918, 1012, 11498, 5244, 2270, 1035, 2824, 1027, 2065, 11498, 5244, 1031, 1005, 2270, 1005, 1033,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rollbar/rollbar-gem
lib/rollbar/notifier.rb
Rollbar.Notifier.log
def log(level, *args) return 'disabled' unless enabled? message, exception, extra, context = extract_arguments(args) use_exception_level_filters = use_exception_level_filters?(extra) return 'ignored' if ignored?(exception, use_exception_level_filters) begin status = call_before_...
ruby
def log(level, *args) return 'disabled' unless enabled? message, exception, extra, context = extract_arguments(args) use_exception_level_filters = use_exception_level_filters?(extra) return 'ignored' if ignored?(exception, use_exception_level_filters) begin status = call_before_...
[ "def", "log", "(", "level", ",", "*", "args", ")", "return", "'disabled'", "unless", "enabled?", "message", ",", "exception", ",", "extra", ",", "context", "=", "extract_arguments", "(", "args", ")", "use_exception_level_filters", "=", "use_exception_level_filters...
Sends a report to Rollbar. Accepts any number of arguments. The last String argument will become the message or description of the report. The last Exception argument will become the associated exception for the report. The last hash argument will be used as the extra data for the report. If the extra hash conta...
[ "Sends", "a", "report", "to", "Rollbar", "." ]
83ef1acca2b0b1d1b74ff8ef29435ca82e8ca1d6
https://github.com/rollbar/rollbar-gem/blob/83ef1acca2b0b1d1b74ff8ef29435ca82e8ca1d6/lib/rollbar/notifier.rb#L129-L157
train
Log a message and exception
[ 30522, 13366, 8833, 1006, 2504, 1010, 1008, 30524, 6453, 1035, 2504, 1035, 17736, 1029, 1006, 4469, 1007, 2709, 1005, 6439, 1005, 2065, 6439, 1029, 1006, 6453, 1010, 2224, 1035, 6453, 1035, 2504, 1035, 17736, 1007, 4088, 3570, 1027, 2655, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/source.rb
Solargraph.Source.foldable_comment_block_ranges
def foldable_comment_block_ranges return [] unless synchronized? result = [] grouped = [] # @param cmnt [Parser::Source::Comment] @comments.each do |cmnt| if cmnt.document? result.push Range.from_expr(cmnt.loc.expression) elsif code.lines[cmnt.loc.expression.line]...
ruby
def foldable_comment_block_ranges return [] unless synchronized? result = [] grouped = [] # @param cmnt [Parser::Source::Comment] @comments.each do |cmnt| if cmnt.document? result.push Range.from_expr(cmnt.loc.expression) elsif code.lines[cmnt.loc.expression.line]...
[ "def", "foldable_comment_block_ranges", "return", "[", "]", "unless", "synchronized?", "result", "=", "[", "]", "grouped", "=", "[", "]", "# @param cmnt [Parser::Source::Comment]", "@comments", ".", "each", "do", "|", "cmnt", "|", "if", "cmnt", ".", "document?", ...
Get an array of foldable comment block ranges. Blocks are excluded if they are less than 3 lines long. @return [Array<Range>]
[ "Get", "an", "array", "of", "foldable", "comment", "block", "ranges", ".", "Blocks", "are", "excluded", "if", "they", "are", "less", "than", "3", "lines", "long", "." ]
47badb5d151aca775ccbe6c470236089eae7839d
https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/source.rb#L370-L394
train
Get the foldable comment block ranges
[ 30522, 13366, 10671, 3085, 1035, 7615, 1035, 3796, 1035, 8483, 2709, 1031, 1033, 4983, 25549, 1029, 2765, 1027, 1031, 1033, 15131, 1027, 1031, 1033, 1001, 1030, 11498, 2213, 4642, 3372, 1031, 11968, 8043, 1024, 1024, 3120, 1024, 1024, 7615,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb
Azure::Automation::Mgmt::V2015_10_31.DscCompilationJobOperations.create
def create(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers:nil) response = create_async(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers:nil) response = create_async(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create", "(", "resource_group_name", ",", "automation_account_name", ",", "compilation_job_id", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_async", "(", "resource_group_name", ",", "automation_account_name", ",", "compilat...
Creates the Dsc compilation job of the configuration. @param resource_group_name [String] Name of an Azure Resource group. @param automation_account_name [String] The name of the automation account. @param compilation_job_id The the DSC configuration Id. @param parameters [DscCompilationJobCreateParameters] The pa...
[ "Creates", "the", "Dsc", "compilation", "job", "of", "the", "configuration", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb#L37-L40
train
Creates a new Dsc compilation job.
[ 30522, 13366, 3443, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 19309, 1035, 4070, 1035, 2171, 1010, 6268, 1035, 3105, 1035, 8909, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 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...
castwide/solargraph
lib/solargraph/api_map.rb
Solargraph.ApiMap.get_namespace_type
def get_namespace_type fqns return nil if fqns.nil? pin = store.get_path_pins(fqns).first return nil if pin.nil? pin.type end
ruby
def get_namespace_type fqns return nil if fqns.nil? pin = store.get_path_pins(fqns).first return nil if pin.nil? pin.type end
[ "def", "get_namespace_type", "fqns", "return", "nil", "if", "fqns", ".", "nil?", "pin", "=", "store", ".", "get_path_pins", "(", "fqns", ")", ".", "first", "return", "nil", "if", "pin", ".", "nil?", "pin", ".", "type", "end" ]
Get the namespace's type (Class or Module). @param fqns [String] A fully qualified namespace @return [Symbol] :class, :module, or nil
[ "Get", "the", "namespace", "s", "type", "(", "Class", "or", "Module", ")", "." ]
47badb5d151aca775ccbe6c470236089eae7839d
https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/api_map.rb#L609-L614
train
Get the type of the namespace
[ 30522, 13366, 2131, 1035, 3415, 15327, 1035, 2828, 1042, 4160, 3619, 2709, 9152, 2140, 2065, 1042, 4160, 3619, 1012, 9152, 2140, 1029, 9231, 1027, 3573, 1012, 2131, 1035, 4130, 1035, 16300, 1006, 1042, 4160, 3619, 1007, 1012, 2034, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb
Azure::SQL::Mgmt::V2017_10_01_preview.DatabaseVulnerabilityAssessmentScans.export_with_http_info
def export_with_http_info(resource_group_name, server_name, database_name, scan_id, custom_headers:nil) export_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value! end
ruby
def export_with_http_info(resource_group_name, server_name, database_name, scan_id, custom_headers:nil) export_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value! end
[ "def", "export_with_http_info", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "scan_id", ",", "custom_headers", ":", "nil", ")", "export_async", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "scan_id", ",", "...
Convert an existing scan result to a human readable format. If already exists nothing happens @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 serv...
[ "Convert", "an", "existing", "scan", "result", "to", "a", "human", "readable", "format", ".", "If", "already", "exists", "nothing", "happens" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb#L323-L325
train
Export a database scan.
[ 30522, 13366, 9167, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 13594, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 9167, 1035, 2004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_services_event_list_with_http_info
def get_services_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) get_services_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_...
ruby
def get_services_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) get_services_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_...
[ "def", "get_services_event_list_with_http_info", "(", "start_time_utc", ",", "end_time_utc", ",", "timeout", ":", "60", ",", "events_types_filter", ":", "nil", ",", "exclude_analysis_events", ":", "nil", ",", "skip_correlation_lookup", ":", "nil", ",", "custom_headers",...
Gets all Services-related events. The response is list of ServiceEvent objects. @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 timeou...
[ "Gets", "all", "Services", "-", "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#L28404-L28406
train
Gets the services event list.
[ 30522, 13366, 2131, 1035, 2578, 1035, 2724, 1035, 2862, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2707, 1035, 2051, 1035, 11396, 1010, 2203, 1035, 2051, 1035, 11396, 1010, 2051, 5833, 1024, 3438, 1010, 2824, 1035, 4127, 1035, 11307, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hashicorp/vault-ruby
lib/vault/api/auth_token.rb
Vault.AuthToken.lookup_accessor
def lookup_accessor(accessor, options = {}) headers = extract_headers!(options) json = client.post("/v1/auth/token/lookup-accessor", JSON.fast_generate( accessor: accessor, ), headers) return Secret.decode(json) end
ruby
def lookup_accessor(accessor, options = {}) headers = extract_headers!(options) json = client.post("/v1/auth/token/lookup-accessor", JSON.fast_generate( accessor: accessor, ), headers) return Secret.decode(json) end
[ "def", "lookup_accessor", "(", "accessor", ",", "options", "=", "{", "}", ")", "headers", "=", "extract_headers!", "(", "options", ")", "json", "=", "client", ".", "post", "(", "\"/v1/auth/token/lookup-accessor\"", ",", "JSON", ".", "fast_generate", "(", "acce...
Lookup information about the given token accessor. @example Vault.auth_token.lookup_accessor("acbd-...") #=> #<Vault::Secret lease_id=""> @param [String] accessor @param [Hash] options
[ "Lookup", "information", "about", "the", "given", "token", "accessor", "." ]
02f0532a802ba1a2a0d8703a4585dab76eb9d864
https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/auth_token.rb#L126-L132
train
Lookup an accessor
[ 30522, 13366, 2298, 6279, 1035, 3229, 2953, 1006, 3229, 2953, 1010, 7047, 1027, 1063, 1065, 1007, 20346, 2015, 1027, 14817, 1035, 20346, 2015, 999, 1006, 7047, 1007, 1046, 3385, 1027, 7396, 1012, 2695, 1006, 1000, 1013, 1058, 2487, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
deivid-rodriguez/byebug
lib/byebug/interface.rb
Byebug.Interface.split_commands
def split_commands(cmd_line) return [""] if cmd_line.empty? cmd_line.split(/;/).each_with_object([]) do |v, m| if m.empty? || m.last[-1] != '\\' m << v.strip next end m.last[-1, 1] = "" m.last << ";" << v end end
ruby
def split_commands(cmd_line) return [""] if cmd_line.empty? cmd_line.split(/;/).each_with_object([]) do |v, m| if m.empty? || m.last[-1] != '\\' m << v.strip next end m.last[-1, 1] = "" m.last << ";" << v end end
[ "def", "split_commands", "(", "cmd_line", ")", "return", "[", "\"\"", "]", "if", "cmd_line", ".", "empty?", "cmd_line", ".", "split", "(", "/", "/", ")", ".", "each_with_object", "(", "[", "]", ")", "do", "|", "v", ",", "m", "|", "if", "m", ".", ...
Splits a command line of the form "cmd1 ; cmd2 ; ... ; cmdN" into an array of commands: [cmd1, cmd2, ..., cmdN]
[ "Splits", "a", "command", "line", "of", "the", "form", "cmd1", ";", "cmd2", ";", "...", ";", "cmdN", "into", "an", "array", "of", "commands", ":", "[", "cmd1", "cmd2", "...", "cmdN", "]" ]
bf41a63858a648baa7fb621600d6451786d1572a
https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/interface.rb#L128-L140
train
Split the command line into a list of words
[ 30522, 13366, 3975, 1035, 10954, 1006, 4642, 2094, 1035, 2240, 1007, 2709, 1031, 1000, 1000, 1033, 2065, 4642, 2094, 1035, 2240, 1012, 4064, 1029, 4642, 2094, 1035, 2240, 1012, 30524, 2079, 1064, 1058, 1010, 1049, 1064, 2065, 1049, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb
Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.create_regional_properties_async
def create_regional_properties_async(resource_group_name, web_service_name, region, custom_headers:nil) # Send request promise = begin_create_regional_properties_async(resource_group_name, web_service_name, region, custom_headers:custom_headers) promise = promise.then do |response| # Defining...
ruby
def create_regional_properties_async(resource_group_name, web_service_name, region, custom_headers:nil) # Send request promise = begin_create_regional_properties_async(resource_group_name, web_service_name, region, custom_headers:custom_headers) promise = promise.then do |response| # Defining...
[ "def", "create_regional_properties_async", "(", "resource_group_name", ",", "web_service_name", ",", "region", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_create_regional_properties_async", "(", "resource_group_name", ",", "web_service_nam...
@param resource_group_name [String] Name of the resource group in which the web service is located. @param web_service_name [String] The name of the web service. @param region [String] The region for which encrypted credential parameters are created. @param custom_headers [Hash{String => String}] A hash of custom ...
[ "@param", "resource_group_name", "[", "String", "]", "Name", "of", "the", "resource", "group", "in", "which", "the", "web", "service", "is", "located", ".", "@param", "web_service_name", "[", "String", "]", "The", "name", "of", "the", "web", "service", ".", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L315-L331
train
Creates a regional properties for the specified web service.
[ 30522, 13366, 3443, 1035, 3164, 1035, 5144, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4773, 1035, 2326, 1035, 2171, 1010, 2555, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb
Azure::StreamAnalytics::Mgmt::V2016_03_01.Outputs.list_by_streaming_job
def list_by_streaming_job(resource_group_name, job_name, select:nil, custom_headers:nil) first_page = list_by_streaming_job_as_lazy(resource_group_name, job_name, select:select, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_by_streaming_job(resource_group_name, job_name, select:nil, custom_headers:nil) first_page = list_by_streaming_job_as_lazy(resource_group_name, job_name, select:select, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_by_streaming_job", "(", "resource_group_name", ",", "job_name", ",", "select", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_by_streaming_job_as_lazy", "(", "resource_group_name", ",", "job_name", ",", "select", ":", "sele...
Lists all of the outputs under the specified streaming job. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param select [String] The...
[ "Lists", "all", "of", "the", "outputs", "under", "the", "specified", "streaming", "job", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb#L523-L526
train
Gets all the image documents in a streaming job.
[ 30522, 13366, 2862, 1035, 2011, 1035, 11058, 1035, 3105, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3105, 1035, 2171, 1010, 7276, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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_secret_versions_with_http_info
def get_secret_versions_with_http_info(vault_base_url, secret_name, maxresults:nil, custom_headers:nil) get_secret_versions_async(vault_base_url, secret_name, maxresults:maxresults, custom_headers:custom_headers).value! end
ruby
def get_secret_versions_with_http_info(vault_base_url, secret_name, maxresults:nil, custom_headers:nil) get_secret_versions_async(vault_base_url, secret_name, maxresults:maxresults, custom_headers:custom_headers).value! end
[ "def", "get_secret_versions_with_http_info", "(", "vault_base_url", ",", "secret_name", ",", "maxresults", ":", "nil", ",", "custom_headers", ":", "nil", ")", "get_secret_versions_async", "(", "vault_base_url", ",", "secret_name", ",", "maxresults", ":", "maxresults", ...
List all versions of the specified secret. The full secret identifier and attributes are provided in the response. No values are returned for the secrets. This operations requires the secrets/list permission. @param vault_base_url [String] The vault name, for example https://myvault.vault.azure.net. @param secr...
[ "List", "all", "versions", "of", "the", "specified", "secret", "." ]
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#L3292-L3294
train
Gets the versions of the specified secret.
[ 30522, 13366, 2131, 1035, 3595, 1035, 4617, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 3595, 1035, 2171, 1010, 4098, 6072, 11314, 2015, 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...
fastlane/fastlane
supply/lib/supply/uploader.rb
Supply.Uploader.upload_obbs
def upload_obbs(apk_path, apk_version_code) expansion_paths = find_obbs(apk_path) ['main', 'patch'].each do |type| if expansion_paths[type] upload_obb(expansion_paths[type], type, apk_version_code) end end end
ruby
def upload_obbs(apk_path, apk_version_code) expansion_paths = find_obbs(apk_path) ['main', 'patch'].each do |type| if expansion_paths[type] upload_obb(expansion_paths[type], type, apk_version_code) end end end
[ "def", "upload_obbs", "(", "apk_path", ",", "apk_version_code", ")", "expansion_paths", "=", "find_obbs", "(", "apk_path", ")", "[", "'main'", ",", "'patch'", "]", ".", "each", "do", "|", "type", "|", "if", "expansion_paths", "[", "type", "]", "upload_obb", ...
searches for obbs in the directory where the apk is located and upload at most one main and one patch file. Do nothing if it finds more than one of either of them.
[ "searches", "for", "obbs", "in", "the", "directory", "where", "the", "apk", "is", "located", "and", "upload", "at", "most", "one", "main", "and", "one", "patch", "file", ".", "Do", "nothing", "if", "it", "finds", "more", "than", "one", "of", "either", ...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/uploader.rb#L294-L301
train
Upload the obbs to the given apk_path
[ 30522, 13366, 2039, 11066, 1035, 27885, 5910, 1006, 9706, 2243, 1035, 4130, 1010, 9706, 2243, 1035, 2544, 1035, 3642, 1007, 4935, 1035, 10425, 1027, 2424, 1035, 27885, 5910, 1006, 9706, 2243, 1035, 4130, 1007, 1031, 1005, 2364, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_instance/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb
Azure::ContainerInstance::Mgmt::V2018_06_01.ContainerGroups.begin_restart
def begin_restart(resource_group_name, container_group_name, custom_headers:nil) response = begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value! nil end
ruby
def begin_restart(resource_group_name, container_group_name, custom_headers:nil) response = begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_restart", "(", "resource_group_name", ",", "container_group_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_restart_async", "(", "resource_group_name", ",", "container_group_name", ",", "custom_headers", ":custom_headers", ")", ".", ...
Restarts all containers in a container group. Restarts all containers in a contaienr group in place. If container image has updates, new image will be downloaded. @param resource_group_name [String] The name of the resource group. @param container_group_name [String] The name of the container group. @param custo...
[ "Restarts", "all", "containers", "in", "a", "container", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_instance/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb#L865-L868
train
Restarts the specified container group.
[ 30522, 13366, 4088, 1035, 23818, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11661, 1035, 2177, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 23818, 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...
cloudfoundry/bosh
src/bosh-director/lib/bosh/director/agent_client.rb
Bosh::Director.AgentClient.format_exception
def format_exception(exception) return exception.to_s unless exception.is_a?(Hash) msg = exception['message'].to_s if exception['backtrace'] msg += "\n" msg += Array(exception['backtrace']).join("\n") end if exception['blobstore_id'] blob = download_and_delete_bl...
ruby
def format_exception(exception) return exception.to_s unless exception.is_a?(Hash) msg = exception['message'].to_s if exception['backtrace'] msg += "\n" msg += Array(exception['backtrace']).join("\n") end if exception['blobstore_id'] blob = download_and_delete_bl...
[ "def", "format_exception", "(", "exception", ")", "return", "exception", ".", "to_s", "unless", "exception", ".", "is_a?", "(", "Hash", ")", "msg", "=", "exception", "[", "'message'", "]", ".", "to_s", "if", "exception", "[", "'backtrace'", "]", "msg", "+=...
Returns formatted exception information @param [Hash|#to_s] exception Serialized exception @return [String]
[ "Returns", "formatted", "exception", "information" ]
2eaa7100879ddd20cd909cd698514746195e28b7
https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/agent_client.rb#L287-L304
train
Format an exception
[ 30522, 13366, 4289, 1035, 6453, 1006, 6453, 1007, 2709, 6453, 1012, 2000, 1035, 1055, 4983, 6453, 1012, 2003, 1035, 1037, 1029, 1006, 23325, 1007, 5796, 2290, 1027, 6453, 1031, 1005, 4471, 1005, 1033, 1012, 2000, 1035, 1055, 2065, 6453, 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...
aws/aws-sdk-ruby
gems/aws-sdk-rds/lib/aws-sdk-rds/db_security_group.rb
Aws::RDS.DBSecurityGroup.revoke_ingress
def revoke_ingress(options = {}) options = options.merge(db_security_group_name: @name) resp = @client.revoke_db_security_group_ingress(options) DBSecurityGroup.new( name: resp.data.db_security_group.db_security_group_name, data: resp.data.db_security_group, client: @client ...
ruby
def revoke_ingress(options = {}) options = options.merge(db_security_group_name: @name) resp = @client.revoke_db_security_group_ingress(options) DBSecurityGroup.new( name: resp.data.db_security_group.db_security_group_name, data: resp.data.db_security_group, client: @client ...
[ "def", "revoke_ingress", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "db_security_group_name", ":", "@name", ")", "resp", "=", "@client", ".", "revoke_db_security_group_ingress", "(", "options", ")", "DBSecurityGroup", ".", ...
@example Request syntax with placeholder values dbsecuritygroup = db_security_group.revoke_ingress({ cidrip: "String", ec2_security_group_name: "String", ec2_security_group_id: "String", ec2_security_group_owner_id: "String", }) @param [Hash] options ({}) @option options [String] :cidrip ...
[ "@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_security_group.rb#L314-L322
train
Revoke an ingress for this security group
[ 30522, 13366, 7065, 11045, 1035, 13749, 8303, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 16962, 1035, 3036, 1035, 2177, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 7065, 11045, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/versions.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Versions.update
def update(app_id, version_id, version_update_object, custom_headers:nil) response = update_async(app_id, version_id, version_update_object, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update(app_id, version_id, version_update_object, custom_headers:nil) response = update_async(app_id, version_id, version_update_object, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update", "(", "app_id", ",", "version_id", ",", "version_update_object", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_async", "(", "app_id", ",", "version_id", ",", "version_update_object", ",", "custom_headers", ":custom_headers", ")", ...
Updates the name or description of the application version. @param app_id The application ID. @param version_id [String] The version ID. @param version_update_object [TaskUpdateObject] A model containing Name and Description of the application. @param custom_headers [Hash{String => String}] A hash of custom heade...
[ "Updates", "the", "name", "or", "description", "of", "the", "application", "version", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/versions.rb#L358-L361
train
Updates the specified version of the application.
[ 30522, 13366, 10651, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 2544, 1035, 10651, 1035, 4874, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, 2004, 6038, 2278, 1006, 10439, 1035, 8909, 1010, 2544...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getsentry/raven-ruby
lib/raven/integrations/sidekiq.rb
Raven.SidekiqErrorHandler.filter_context
def filter_context(context) case context when Array context.map { |arg| filter_context(arg) } when Hash Hash[context.map { |key, value| filter_context_hash(key, value) }] else format_globalid(context) end end
ruby
def filter_context(context) case context when Array context.map { |arg| filter_context(arg) } when Hash Hash[context.map { |key, value| filter_context_hash(key, value) }] else format_globalid(context) end end
[ "def", "filter_context", "(", "context", ")", "case", "context", "when", "Array", "context", ".", "map", "{", "|", "arg", "|", "filter_context", "(", "arg", ")", "}", "when", "Hash", "Hash", "[", "context", ".", "map", "{", "|", "key", ",", "value", ...
Once an ActiveJob is queued, ActiveRecord references get serialized into some internal reserved keys, such as _aj_globalid. The problem is, if this job in turn gets queued back into ActiveJob with these magic reserved keys, ActiveJob will throw up and error. We want to capture these and mutate the keys so we can s...
[ "Once", "an", "ActiveJob", "is", "queued", "ActiveRecord", "references", "get", "serialized", "into", "some", "internal", "reserved", "keys", "such", "as", "_aj_globalid", "." ]
729c22f9284939695f14822683bff1a0b72502bd
https://github.com/getsentry/raven-ruby/blob/729c22f9284939695f14822683bff1a0b72502bd/lib/raven/integrations/sidekiq.rb#L39-L48
train
Returns the unique context for the given context.
[ 30522, 13366, 11307, 1035, 6123, 1006, 6123, 1007, 2553, 6123, 2043, 9140, 6123, 1012, 4949, 1063, 1064, 12098, 2290, 1064, 11307, 1035, 6123, 1006, 12098, 2290, 1007, 1065, 2043, 23325, 23325, 1031, 6123, 1012, 4949, 1063, 1064, 3145, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb
Azure::ServiceBus::Mgmt::V2017_04_01.DisasterRecoveryConfigs.check_name_availability_method_with_http_info
def check_name_availability_method_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) check_name_availability_method_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! end
ruby
def check_name_availability_method_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) check_name_availability_method_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! end
[ "def", "check_name_availability_method_with_http_info", "(", "resource_group_name", ",", "namespace_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "check_name_availability_method_async", "(", "resource_group_name", ",", "namespace_name", ",", "parameters", ...
Check the give namespace name availability. @param resource_group_name [String] Name of the Resource group within the Azure subscription. @param namespace_name [String] The namespace name @param parameters [CheckNameAvailability] Parameters to check availability of the given namespace name @param custom_headers ...
[ "Check", "the", "give", "namespace", "name", "availability", "." ]
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/disaster_recovery_configs.rb#L55-L57
train
Check name availability of the specified namespace.
[ 30522, 13366, 4638, 1035, 2171, 1035, 11343, 1035, 4118, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3415, 15327, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4638, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
troessner/reek
lib/reek/context_builder.rb
Reek.ContextBuilder.process_casgn
def process_casgn(exp, parent) if exp.defines_module? process_module(exp, parent) else process(exp) end end
ruby
def process_casgn(exp, parent) if exp.defines_module? process_module(exp, parent) else process(exp) end end
[ "def", "process_casgn", "(", "exp", ",", "parent", ")", "if", "exp", ".", "defines_module?", "process_module", "(", "exp", ",", "parent", ")", "else", "process", "(", "exp", ")", "end", "end" ]
Handles `casgn` ("class assign") nodes. An input example that would trigger this method would be: Foo = Class.new Bar
[ "Handles", "casgn", "(", "class", "assign", ")", "nodes", "." ]
8c6b5c0c6228a6981ab48543457889f9ea984054
https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/context_builder.rb#L107-L113
train
Process the CASGN
[ 30522, 13366, 2832, 1035, 25222, 16206, 1006, 4654, 2361, 1010, 6687, 1007, 2065, 4654, 2361, 1012, 11859, 1035, 11336, 1029, 2832, 1035, 11336, 1006, 4654, 2361, 1010, 6687, 1007, 2842, 2832, 1006, 4654, 2361, 1007, 2203, 2203, 102, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/environments.rb
Azure::Labservices::Mgmt::V2018_10_15.Environments.begin_stop
def begin_stop(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, custom_headers:nil) response = begin_stop_async(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, custom_headers:custom_headers).value! nil end
ruby
def begin_stop(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, custom_headers:nil) response = begin_stop_async(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_stop", "(", "resource_group_name", ",", "lab_account_name", ",", "lab_name", ",", "environment_setting_name", ",", "environment_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_stop_async", "(", "resource_group_name", ",", "lab_accoun...
Stops an environment by stopping all resources inside the environment This operation can take a while to complete @param resource_group_name [String] The name of the resource group. @param lab_account_name [String] The name of the lab Account. @param lab_name [String] The name of the lab. @param environment_setti...
[ "Stops", "an", "environment", "by", "stopping", "all", "resources", "inside", "the", "environment", "This", "operation", "can", "take", "a", "while", "to", "complete" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/environments.rb#L1083-L1086
train
Stops the environment.
[ 30522, 13366, 4088, 1035, 2644, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 6845, 1035, 4070, 1035, 2171, 1010, 6845, 1035, 2171, 1010, 4044, 1035, 4292, 1035, 2171, 1010, 4044, 1035, 2171, 1010, 7661, 1035, 20346, 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...
floere/phony
lib/phony/country_codes.rb
Phony.CountryCodes.plausible?
def plausible? number, hints = {} normalized = clean number # False if it fails the basic check. # return false unless (4..16) === normalized.size country, cc, rest = partial_split normalized # Country code plausible? # cc_needed = hints[:cc] return false if cc_n...
ruby
def plausible? number, hints = {} normalized = clean number # False if it fails the basic check. # return false unless (4..16) === normalized.size country, cc, rest = partial_split normalized # Country code plausible? # cc_needed = hints[:cc] return false if cc_n...
[ "def", "plausible?", "number", ",", "hints", "=", "{", "}", "normalized", "=", "clean", "number", "# False if it fails the basic check.", "#", "return", "false", "unless", "(", "4", "..", "16", ")", "===", "normalized", ".", "size", "country", ",", "cc", ","...
Is this number plausible?
[ "Is", "this", "number", "plausible?" ]
9ca50743499cf478a25fdb927bcdacd29d2c90c7
https://github.com/floere/phony/blob/9ca50743499cf478a25fdb927bcdacd29d2c90c7/lib/phony/country_codes.rb#L95-L114
train
Returns true if the number is plausible.
[ 30522, 13366, 24286, 1029, 2193, 1010, 20385, 1027, 1063, 1065, 3671, 3550, 1027, 4550, 2193, 1001, 6270, 2065, 2009, 11896, 1996, 3937, 4638, 1012, 1001, 2709, 6270, 4983, 1006, 1018, 1012, 1012, 2385, 1007, 1027, 1027, 1027, 3671, 3550, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/users.rb
Github.Client::Users.get
def get(*args) params = arguments(args).params if user_name = params.delete('user') get_request("/users/#{user_name}", params) else get_request("/user", params) end end
ruby
def get(*args) params = arguments(args).params if user_name = params.delete('user') get_request("/users/#{user_name}", params) else get_request("/user", params) end end
[ "def", "get", "(", "*", "args", ")", "params", "=", "arguments", "(", "args", ")", ".", "params", "if", "user_name", "=", "params", ".", "delete", "(", "'user'", ")", "get_request", "(", "\"/users/#{user_name}\"", ",", "params", ")", "else", "get_request",...
Get a single unauthenticated user @example github = Github.new github.users.get user: 'user-name' Get the authenticated user @example github = Github.new oauth_token: '...' github.users.get @api public
[ "Get", "a", "single", "unauthenticated", "user" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/users.rb#L68-L76
train
Get a user s information
[ 30522, 13366, 2131, 1006, 1008, 12098, 5620, 1007, 11498, 5244, 1027, 9918, 1006, 12098, 5620, 1007, 1012, 11498, 5244, 2065, 5310, 1035, 2171, 1027, 11498, 5244, 1012, 3972, 12870, 1006, 1005, 5310, 1005, 1007, 2131, 1035, 5227, 1006, 1000...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
thoughtbot/clearance
lib/clearance/authorization.rb
Clearance.Authorization.deny_access
def deny_access(flash_message = nil) respond_to do |format| format.any(:js, :json, :xml) { head :unauthorized } format.any { redirect_request(flash_message) } end end
ruby
def deny_access(flash_message = nil) respond_to do |format| format.any(:js, :json, :xml) { head :unauthorized } format.any { redirect_request(flash_message) } end end
[ "def", "deny_access", "(", "flash_message", "=", "nil", ")", "respond_to", "do", "|", "format", "|", "format", ".", "any", "(", ":js", ",", ":json", ",", ":xml", ")", "{", "head", ":unauthorized", "}", "format", ".", "any", "{", "redirect_request", "(", ...
Responds to unauthorized requests in a manner fitting the request format. `js`, `json`, and `xml` requests will receive a 401 with no body. All other formats will be redirected appropriately and can optionally have the flash message set. When redirecting, the originally requested url will be stored in the session...
[ "Responds", "to", "unauthorized", "requests", "in", "a", "manner", "fitting", "the", "request", "format", ".", "js", "json", "and", "xml", "requests", "will", "receive", "a", "401", "with", "no", "body", ".", "All", "other", "formats", "will", "be", "redir...
1623cdeb648f33a55f0eb7be17e8f19a4291e1f2
https://github.com/thoughtbot/clearance/blob/1623cdeb648f33a55f0eb7be17e8f19a4291e1f2/lib/clearance/authorization.rb#L43-L48
train
Deny access to the current page
[ 30522, 13366, 9772, 1035, 3229, 1006, 5956, 1035, 4471, 1027, 9152, 2140, 1007, 6869, 1035, 2000, 2079, 1064, 4289, 1064, 4289, 1012, 2151, 1006, 1024, 1046, 2015, 1010, 1024, 1046, 3385, 1010, 1024, 20950, 1007, 1063, 2132, 1024, 24641, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_cluster_health
def get_cluster_health(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, timeout:60, custom_headers:nil) response = get_cluster_health_async(nodes_health_state_filter:nodes_health_stat...
ruby
def get_cluster_health(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, timeout:60, custom_headers:nil) response = get_cluster_health_async(nodes_health_state_filter:nodes_health_stat...
[ "def", "get_cluster_health", "(", "nodes_health_state_filter", ":", "0", ",", "applications_health_state_filter", ":", "0", ",", "events_health_state_filter", ":", "0", ",", "exclude_health_statistics", ":", "false", ",", "include_system_application_health_statistics", ":", ...
Gets the health of a Service Fabric cluster. Gets the health of a Service Fabric cluster. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nod...
[ "Gets", "the", "health", "of", "a", "Service", "Fabric", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L347-L350
train
Gets cluster health of the specified App Service Environment.
[ 30522, 13366, 2131, 1035, 9324, 1035, 2740, 1006, 14164, 1035, 2740, 1035, 2110, 1035, 11307, 1024, 1014, 1010, 5097, 1035, 2740, 1035, 2110, 1035, 11307, 1024, 1014, 1010, 2824, 1035, 2740, 1035, 2110, 1035, 11307, 1024, 1014, 1010, 23329,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
square/connect-ruby-sdk
lib/square_connect/models/shift_sort.rb
SquareConnect.ShiftSort.field=
def field=(field) validator = EnumAttributeValidator.new('String', ["START_AT", "END_AT", "CREATED_AT", "UPDATED_AT"]) unless validator.valid?(field) fail ArgumentError, "invalid value for 'field', must be one of #{validator.allowable_values}." end @field = field end
ruby
def field=(field) validator = EnumAttributeValidator.new('String', ["START_AT", "END_AT", "CREATED_AT", "UPDATED_AT"]) unless validator.valid?(field) fail ArgumentError, "invalid value for 'field', must be one of #{validator.allowable_values}." end @field = field end
[ "def", "field", "=", "(", "field", ")", "validator", "=", "EnumAttributeValidator", ".", "new", "(", "'String'", ",", "[", "\"START_AT\"", ",", "\"END_AT\"", ",", "\"CREATED_AT\"", ",", "\"UPDATED_AT\"", "]", ")", "unless", "validator", ".", "valid?", "(", "...
Custom attribute writer method checking allowed values (enum). @param [Object] field Object to be assigned
[ "Custom", "attribute", "writer", "method", "checking", "allowed", "values", "(", "enum", ")", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/shift_sort.rb#L96-L102
train
Set the field of the record.
[ 30522, 13366, 2492, 1027, 1006, 2492, 1007, 9398, 8844, 1027, 4372, 12248, 4779, 3089, 8569, 2618, 10175, 8524, 4263, 1012, 2047, 1006, 1005, 5164, 1005, 1010, 1031, 1000, 2707, 1035, 2012, 1000, 1010, 1000, 2203, 1035, 2012, 1000, 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...
magnusvk/counter_culture
lib/counter_culture/counter.rb
CounterCulture.Counter.foreign_key_value
def foreign_key_value(obj, relation, was = false) relation = relation.is_a?(Enumerable) ? relation.dup : [relation] first_relation = relation.first if was first = relation.shift foreign_key_value = attribute_was(obj, relation_foreign_key(first)) klass = relation_klass(first, so...
ruby
def foreign_key_value(obj, relation, was = false) relation = relation.is_a?(Enumerable) ? relation.dup : [relation] first_relation = relation.first if was first = relation.shift foreign_key_value = attribute_was(obj, relation_foreign_key(first)) klass = relation_klass(first, so...
[ "def", "foreign_key_value", "(", "obj", ",", "relation", ",", "was", "=", "false", ")", "relation", "=", "relation", ".", "is_a?", "(", "Enumerable", ")", "?", "relation", ".", "dup", ":", "[", "relation", "]", "first_relation", "=", "relation", ".", "fi...
gets the value of the foreign key on the given relation relation: a symbol or array of symbols; specifies the relation that has the counter cache column was: whether to get the current or past value from ActiveRecord; pass true to get the past value, false or nothing to get the current value
[ "gets", "the", "value", "of", "the", "foreign", "key", "on", "the", "given", "relation" ]
6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba
https://github.com/magnusvk/counter_culture/blob/6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba/lib/counter_culture/counter.rb#L133-L152
train
Returns the value of the foreign key of the given object.
[ 30522, 13366, 3097, 1035, 3145, 1035, 3643, 1006, 27885, 3501, 1010, 7189, 1010, 2001, 1027, 6270, 1007, 7189, 1027, 7189, 1012, 2003, 1035, 1037, 1029, 1006, 4372, 17897, 16670, 1007, 1029, 7189, 1012, 4241, 2361, 1024, 1031, 7189, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activesupport/lib/active_support/dependencies.rb
ActiveSupport.Dependencies.to_constant_name
def to_constant_name(desc) #:nodoc: case desc when String then desc.sub(/^::/, "") when Symbol then desc.to_s when Module desc.name || raise(ArgumentError, "Anonymous modules have no name to be referenced by") else raise TypeError, "Not a valid constant descriptor: #{desc...
ruby
def to_constant_name(desc) #:nodoc: case desc when String then desc.sub(/^::/, "") when Symbol then desc.to_s when Module desc.name || raise(ArgumentError, "Anonymous modules have no name to be referenced by") else raise TypeError, "Not a valid constant descriptor: #{desc...
[ "def", "to_constant_name", "(", "desc", ")", "#:nodoc:", "case", "desc", "when", "String", "then", "desc", ".", "sub", "(", "/", "/", ",", "\"\"", ")", "when", "Symbol", "then", "desc", ".", "to_s", "when", "Module", "desc", ".", "name", "||", "raise",...
Convert the provided const desc to a qualified constant name (as a string). A module, class, symbol, or string may be provided.
[ "Convert", "the", "provided", "const", "desc", "to", "a", "qualified", "constant", "name", "(", "as", "a", "string", ")", ".", "A", "module", "class", "symbol", "or", "string", "may", "be", "provided", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/dependencies.rb#L693-L702
train
Returns the constant name for the given descriptor.
[ 30522, 13366, 2000, 1035, 5377, 1035, 2171, 1006, 4078, 2278, 1007, 1001, 1024, 7293, 10085, 1024, 2553, 4078, 2278, 2043, 5164, 2059, 4078, 2278, 1012, 4942, 1006, 1013, 1034, 1024, 1024, 1013, 1010, 1000, 1000, 1007, 2043, 6454, 2059, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
lostisland/faraday
lib/faraday/options.rb
Faraday.Options.fetch
def fetch(key, *args) unless symbolized_key_set.include?(key.to_sym) key_setter = "#{key}=" if !args.empty? send(key_setter, args.first) elsif block_given? send(key_setter, Proc.new.call(key)) else raise self.class.fetch_error_class, "key not found: #{...
ruby
def fetch(key, *args) unless symbolized_key_set.include?(key.to_sym) key_setter = "#{key}=" if !args.empty? send(key_setter, args.first) elsif block_given? send(key_setter, Proc.new.call(key)) else raise self.class.fetch_error_class, "key not found: #{...
[ "def", "fetch", "(", "key", ",", "*", "args", ")", "unless", "symbolized_key_set", ".", "include?", "(", "key", ".", "to_sym", ")", "key_setter", "=", "\"#{key}=\"", "if", "!", "args", ".", "empty?", "send", "(", "key_setter", ",", "args", ".", "first", ...
Public
[ "Public" ]
3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70
https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/options.rb#L76-L88
train
Fetch the value of the key
[ 30522, 13366, 18584, 1006, 3145, 1010, 1008, 12098, 5620, 1007, 4983, 6454, 3550, 1035, 3145, 1035, 2275, 1012, 2421, 1029, 1006, 3145, 1012, 2000, 1035, 25353, 2213, 1007, 3145, 1035, 2275, 3334, 1027, 1000, 1001, 1063, 3145, 1065, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb
Azure::StorageSync::Mgmt::V2018_07_01.CloudEndpoints.begin_post_backup
def begin_post_backup(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil) response = begin_post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value! ...
ruby
def begin_post_backup(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil) response = begin_post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value! ...
[ "def", "begin_post_backup", "(", "resource_group_name", ",", "storage_sync_service_name", ",", "sync_group_name", ",", "cloud_endpoint_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "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] Na...
[ "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#L989-L992
train
Creates a new backup of the specified cloud endpoint.
[ 30522, 13366, 4088, 1035, 2695, 1035, 10200, 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, 2171, 1010, 11709, 1010, 7661, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb
Azure::Network::Mgmt::V2019_02_01.ApplicationGateways.begin_delete
def begin_delete(resource_group_name, application_gateway_name, custom_headers:nil) response = begin_delete_async(resource_group_name, application_gateway_name, custom_headers:custom_headers).value! nil end
ruby
def begin_delete(resource_group_name, application_gateway_name, custom_headers:nil) response = begin_delete_async(resource_group_name, application_gateway_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_delete", "(", "resource_group_name", ",", "application_gateway_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_delete_async", "(", "resource_group_name", ",", "application_gateway_name", ",", "custom_headers", ":custom_headers", ")", "...
Deletes the specified application gateway. @param resource_group_name [String] The name of the resource group. @param application_gateway_name [String] The name of the application gateway. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "the", "specified", "application", "gateway", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb#L1238-L1241
train
Deletes the specified application gateway.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4646, 1035, 11909, 30524, 1035, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4646, 1035, 11909, 1035, 2171, 1010, 7661, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
decidim/decidim
decidim-core/lib/decidim/form_builder.rb
Decidim.FormBuilder.areas_select
def areas_select(name, collection, options = {}) selectables = if collection.first.is_a?(Decidim::Area) assemblies = collection .map { |a| [a.name[I18n.locale.to_s], a.id] } .sort_by { |arr| arr[0] } ...
ruby
def areas_select(name, collection, options = {}) selectables = if collection.first.is_a?(Decidim::Area) assemblies = collection .map { |a| [a.name[I18n.locale.to_s], a.id] } .sort_by { |arr| arr[0] } ...
[ "def", "areas_select", "(", "name", ",", "collection", ",", "options", "=", "{", "}", ")", "selectables", "=", "if", "collection", ".", "first", ".", "is_a?", "(", "Decidim", "::", "Area", ")", "assemblies", "=", "collection", ".", "map", "{", "|", "a"...
Public: Generates a select field for areas. name - The name of the field (usually area_id) collection - A collection of areas or area_types. If it's areas, we sort the selectable options alphabetically. Returns a String.
[ "Public", ":", "Generates", "a", "select", "field", "for", "areas", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L212-L234
train
Select a collection of areas
[ 30522, 13366, 2752, 1035, 7276, 1006, 2171, 1010, 3074, 1010, 7047, 1027, 1063, 1065, 1007, 7276, 3085, 2015, 1027, 2065, 3074, 1012, 2034, 1012, 2003, 1035, 1037, 1029, 1006, 11703, 28173, 2213, 1024, 1024, 2181, 1007, 17720, 1027, 3074, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/spring
lib/spring/json.rb
Spring.OkJson.decode
def decode(s) ts = lex(s) v, ts = textparse(ts) if ts.length > 0 raise Error, 'trailing garbage' end v end
ruby
def decode(s) ts = lex(s) v, ts = textparse(ts) if ts.length > 0 raise Error, 'trailing garbage' end v end
[ "def", "decode", "(", "s", ")", "ts", "=", "lex", "(", "s", ")", "v", ",", "ts", "=", "textparse", "(", "ts", ")", "if", "ts", ".", "length", ">", "0", "raise", "Error", ",", "'trailing garbage'", "end", "v", "end" ]
Decodes a json document in string s and returns the corresponding ruby value. String s must be valid UTF-8. If you have a string in some other encoding, convert it first. String values in the resulting structure will be UTF-8.
[ "Decodes", "a", "json", "document", "in", "string", "s", "and", "returns", "the", "corresponding", "ruby", "value", ".", "String", "s", "must", "be", "valid", "UTF", "-", "8", ".", "If", "you", "have", "a", "string", "in", "some", "other", "encoding", ...
e7a36afa436fcc59b6945f68dbc08f1076e65585
https://github.com/rails/spring/blob/e7a36afa436fcc59b6945f68dbc08f1076e65585/lib/spring/json.rb#L68-L75
train
Decode a string into a sequence of words.
[ 30522, 13366, 21933, 3207, 1006, 1055, 1007, 24529, 1027, 17244, 1006, 1055, 1007, 1058, 1010, 24529, 1027, 3793, 19362, 3366, 1006, 24529, 1007, 2065, 24529, 1012, 3091, 1028, 1014, 5333, 7561, 1010, 1005, 12542, 13044, 1005, 2203, 1058, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
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.update_backup_policy
def update_backup_policy(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil) response = update_backup_policy_async(backup_policy_description, backup_policy_name, timeout:timeout, custom_headers:custom_headers).value! nil end
ruby
def update_backup_policy(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil) response = update_backup_policy_async(backup_policy_description, backup_policy_name, timeout:timeout, custom_headers:custom_headers).value! nil end
[ "def", "update_backup_policy", "(", "backup_policy_description", ",", "backup_policy_name", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_backup_policy_async", "(", "backup_policy_description", ",", "backup_policy_name", ",", ...
Updates the backup policy. Updates the backup policy identified by {backupPolicyName} @param backup_policy_description [BackupPolicyDescription] Describes the backup policy. @param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation ...
[ "Updates", "the", "backup", "policy", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L22839-L22842
train
Updates the backup policy.
[ 30522, 13366, 10651, 1035, 10200, 1035, 3343, 1006, 10200, 1035, 3343, 1035, 6412, 1010, 10200, 1035, 3343, 1035, 2171, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, 10200, 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...