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
puppetlabs/puppet
lib/puppet/network/resolver.rb
Puppet::Network.Resolver.each_srv_record
def each_srv_record(domain, service_name = :puppet, &block) if (domain.nil? or domain.empty?) Puppet.debug "Domain not known; skipping SRV lookup" return end Puppet.debug "Searching for SRV records for domain: #{domain}" case service_name when :puppet then service = '_x-puppet' when :file then service = '_x-puppet-fileserver' else service = "_x-puppet-#{service_name.to_s}" end record_name = "#{service}._tcp.#{domain}" if @record_cache.has_key?(service_name) && !expired?(service_name) records = @record_cache[service_name].records Puppet.debug "Using cached record for #{record_name}" else records = @resolver.getresources(record_name, Resolv::DNS::Resource::IN::SRV) if records.size > 0 @record_cache[service_name] = CacheEntry.new(records) end Puppet.debug "Found #{records.size} SRV records for: #{record_name}" end if records.size == 0 && service_name != :puppet # Try the generic :puppet service if no SRV records were found # for the specific service. each_srv_record(domain, :puppet, &block) else each_priority(records) do |recs| while next_rr = recs.delete(find_weighted_server(recs)) Puppet.debug "Yielding next server of #{next_rr.target.to_s}:#{next_rr.port}" yield next_rr.target.to_s, next_rr.port end end end end
ruby
def each_srv_record(domain, service_name = :puppet, &block) if (domain.nil? or domain.empty?) Puppet.debug "Domain not known; skipping SRV lookup" return end Puppet.debug "Searching for SRV records for domain: #{domain}" case service_name when :puppet then service = '_x-puppet' when :file then service = '_x-puppet-fileserver' else service = "_x-puppet-#{service_name.to_s}" end record_name = "#{service}._tcp.#{domain}" if @record_cache.has_key?(service_name) && !expired?(service_name) records = @record_cache[service_name].records Puppet.debug "Using cached record for #{record_name}" else records = @resolver.getresources(record_name, Resolv::DNS::Resource::IN::SRV) if records.size > 0 @record_cache[service_name] = CacheEntry.new(records) end Puppet.debug "Found #{records.size} SRV records for: #{record_name}" end if records.size == 0 && service_name != :puppet # Try the generic :puppet service if no SRV records were found # for the specific service. each_srv_record(domain, :puppet, &block) else each_priority(records) do |recs| while next_rr = recs.delete(find_weighted_server(recs)) Puppet.debug "Yielding next server of #{next_rr.target.to_s}:#{next_rr.port}" yield next_rr.target.to_s, next_rr.port end end end end
[ "def", "each_srv_record", "(", "domain", ",", "service_name", "=", ":puppet", ",", "&", "block", ")", "if", "(", "domain", ".", "nil?", "or", "domain", ".", "empty?", ")", "Puppet", ".", "debug", "\"Domain not known; skipping SRV lookup\"", "return", "end", "P...
Iterate through the list of records for this service and yield each server and port pair. Records are only fetched via DNS query the first time and cached for the duration of their service's TTL thereafter. @param [String] domain the domain to search for @param [Symbol] service_name the key of the service we are querying @yields [String, Integer] server and port of selected record
[ "Iterate", "through", "the", "list", "of", "records", "for", "this", "service", "and", "yield", "each", "server", "and", "port", "pair", ".", "Records", "are", "only", "fetched", "via", "DNS", "query", "the", "first", "time", "and", "cached", "for", "the",...
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/resolver.rb#L42-L80
train
This method is used to iterate over all the SRV records for a domain.
[ 30522, 13366, 2169, 1035, 5034, 2615, 1035, 2501, 1006, 5884, 1010, 2326, 1035, 2171, 1027, 1024, 13997, 1010, 1004, 3796, 1007, 2065, 1006, 5884, 1012, 9152, 2140, 1029, 2030, 5884, 1012, 4064, 1029, 1007, 13997, 1012, 2139, 8569, 2290, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.create_hierarchical_entity_role_with_http_info
def create_hierarchical_entity_role_with_http_info(app_id, version_id, h_entity_id, entity_role_create_object, custom_headers:nil) create_hierarchical_entity_role_async(app_id, version_id, h_entity_id, entity_role_create_object, custom_headers:custom_headers).value! end
ruby
def create_hierarchical_entity_role_with_http_info(app_id, version_id, h_entity_id, entity_role_create_object, custom_headers:nil) create_hierarchical_entity_role_async(app_id, version_id, h_entity_id, entity_role_create_object, custom_headers:custom_headers).value! end
[ "def", "create_hierarchical_entity_role_with_http_info", "(", "app_id", ",", "version_id", ",", "h_entity_id", ",", "entity_role_create_object", ",", "custom_headers", ":", "nil", ")", "create_hierarchical_entity_role_async", "(", "app_id", ",", "version_id", ",", "h_entity...
Create a role for an hierarchical entity in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param h_entity_id The hierarchical entity extractor ID. @param entity_role_create_object [EntityRoleCreateObject] An entity role object containing the name of role. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Create", "a", "role", "for", "an", "hierarchical", "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#L7623-L7625
train
Creates an entity role for a given Hierarchical entity.
[ 30522, 13366, 3443, 1035, 25835, 1035, 9178, 1035, 2535, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 1044, 1035, 9178, 1035, 8909, 1010, 9178, 1035, 2535, 1035, 3443, 1035, 4874, 1010, 7661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
chef/ohai
lib/ohai/provides_map.rb
Ohai.ProvidesMap.find_providers_for
def find_providers_for(attributes) plugins = [] attributes.each do |attribute| attrs = select_subtree(@map, attribute) raise Ohai::Exceptions::AttributeNotFound, "No such attribute: \'#{attribute}\'" unless attrs raise Ohai::Exceptions::ProviderNotFound, "Cannot find plugin providing attribute: \'#{attribute}\'" unless attrs[:_plugins] plugins += attrs[:_plugins] end plugins.uniq end
ruby
def find_providers_for(attributes) plugins = [] attributes.each do |attribute| attrs = select_subtree(@map, attribute) raise Ohai::Exceptions::AttributeNotFound, "No such attribute: \'#{attribute}\'" unless attrs raise Ohai::Exceptions::ProviderNotFound, "Cannot find plugin providing attribute: \'#{attribute}\'" unless attrs[:_plugins] plugins += attrs[:_plugins] end plugins.uniq end
[ "def", "find_providers_for", "(", "attributes", ")", "plugins", "=", "[", "]", "attributes", ".", "each", "do", "|", "attribute", "|", "attrs", "=", "select_subtree", "(", "@map", ",", "attribute", ")", "raise", "Ohai", "::", "Exceptions", "::", "AttributeNo...
gather plugins providing exactly the attributes listed
[ "gather", "plugins", "providing", "exactly", "the", "attributes", "listed" ]
8d66449940f04237586b2f928231c6b26e2cc19a
https://github.com/chef/ohai/blob/8d66449940f04237586b2f928231c6b26e2cc19a/lib/ohai/provides_map.rb#L52-L61
train
Find all plugins that are available for the given attributes.
[ 30522, 13366, 2424, 1035, 11670, 1035, 2005, 1006, 12332, 1007, 13354, 7076, 1027, 1031, 1033, 12332, 1012, 2169, 2079, 1064, 17961, 1064, 2012, 16344, 2015, 1027, 7276, 1035, 4942, 13334, 1006, 1030, 4949, 1010, 17961, 1007, 5333, 2821, 48...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_subnet_group.rb
Aws::RDS.DBSubnetGroup.delete
def delete(options = {}) options = options.merge(db_subnet_group_name: @name) resp = @client.delete_db_subnet_group(options) resp.data end
ruby
def delete(options = {}) options = options.merge(db_subnet_group_name: @name) resp = @client.delete_db_subnet_group(options) resp.data end
[ "def", "delete", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "db_subnet_group_name", ":", "@name", ")", "resp", "=", "@client", ".", "delete_db_subnet_group", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values db_subnet_group.delete() @param [Hash] options ({}) @return [EmptyStructure]
[ "@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_subnet_group.rb#L236-L240
train
Delete a DB subnet group
[ 30522, 13366, 3972, 12870, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 16962, 1035, 4942, 7159, 1035, 2177, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3972, 12870, 1035, 16962, 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...
splitrb/split
lib/split/trial.rb
Split.Trial.choose!
def choose!(context = nil) @user.cleanup_old_experiments! # Only run the process once return alternative if @alternative_choosen if override_is_alternative? self.alternative = @options[:override] if should_store_alternative? && !@user[@experiment.key] self.alternative.increment_participation end elsif @options[:disabled] || Split.configuration.disabled? self.alternative = @experiment.control elsif @experiment.has_winner? self.alternative = @experiment.winner else cleanup_old_versions if exclude_user? self.alternative = @experiment.control else self.alternative = @user[@experiment.key] if alternative.nil? self.alternative = @experiment.next_alternative # Increment the number of participants since we are actually choosing a new alternative self.alternative.increment_participation run_callback context, Split.configuration.on_trial_choose end end end @user[@experiment.key] = alternative.name if !@experiment.has_winner? && should_store_alternative? @alternative_choosen = true run_callback context, Split.configuration.on_trial unless @options[:disabled] || Split.configuration.disabled? alternative end
ruby
def choose!(context = nil) @user.cleanup_old_experiments! # Only run the process once return alternative if @alternative_choosen if override_is_alternative? self.alternative = @options[:override] if should_store_alternative? && !@user[@experiment.key] self.alternative.increment_participation end elsif @options[:disabled] || Split.configuration.disabled? self.alternative = @experiment.control elsif @experiment.has_winner? self.alternative = @experiment.winner else cleanup_old_versions if exclude_user? self.alternative = @experiment.control else self.alternative = @user[@experiment.key] if alternative.nil? self.alternative = @experiment.next_alternative # Increment the number of participants since we are actually choosing a new alternative self.alternative.increment_participation run_callback context, Split.configuration.on_trial_choose end end end @user[@experiment.key] = alternative.name if !@experiment.has_winner? && should_store_alternative? @alternative_choosen = true run_callback context, Split.configuration.on_trial unless @options[:disabled] || Split.configuration.disabled? alternative end
[ "def", "choose!", "(", "context", "=", "nil", ")", "@user", ".", "cleanup_old_experiments!", "# Only run the process once", "return", "alternative", "if", "@alternative_choosen", "if", "override_is_alternative?", "self", ".", "alternative", "=", "@options", "[", ":overr...
Choose an alternative, add a participant, and save the alternative choice on the user. This method is guaranteed to only run once, and will skip the alternative choosing process if run a second time.
[ "Choose", "an", "alternative", "add", "a", "participant", "and", "save", "the", "alternative", "choice", "on", "the", "user", ".", "This", "method", "is", "guaranteed", "to", "only", "run", "once", "and", "will", "skip", "the", "alternative", "choosing", "pr...
02f3f14f99288c3395910999cdb657f2ec5a06cd
https://github.com/splitrb/split/blob/02f3f14f99288c3395910999cdb657f2ec5a06cd/lib/split/trial.rb#L51-L87
train
Choose a alternative from the user
[ 30522, 13366, 5454, 999, 1006, 6123, 1027, 9152, 2140, 1007, 1030, 5310, 1012, 27686, 1035, 2214, 1035, 7885, 999, 1001, 2069, 2448, 1996, 2832, 2320, 2709, 4522, 2065, 1030, 4522, 1035, 5454, 2078, 2065, 2058, 15637, 1035, 2003, 1035, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/snapshot_operations.rb
Azure::CognitiveServices::Face::V1_0.SnapshotOperations.update
def update(snapshot_id, apply_scope:nil, user_data:nil, custom_headers:nil) response = update_async(snapshot_id, apply_scope:apply_scope, user_data:user_data, custom_headers:custom_headers).value! nil end
ruby
def update(snapshot_id, apply_scope:nil, user_data:nil, custom_headers:nil) response = update_async(snapshot_id, apply_scope:apply_scope, user_data:user_data, custom_headers:custom_headers).value! nil end
[ "def", "update", "(", "snapshot_id", ",", "apply_scope", ":", "nil", ",", "user_data", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_async", "(", "snapshot_id", ",", "apply_scope", ":apply_scope", ",", "user_data", ":user_data", ...
Update the information of a snapshot. Only the source subscription who took the snapshot can update the snapshot. @param snapshot_id Id referencing a particular snapshot. @param apply_scope Array of the target Face subscription ids for the snapshot, specified by the user who created the snapshot when calling Snapshot - Take. For each snapshot, only subscriptions included in the applyScope of Snapshot - Take can apply it. @param user_data [String] User specified data about the snapshot for any purpose. Length should not exceed 16KB. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Update", "the", "information", "of", "a", "snapshot", ".", "Only", "the", "source", "subscription", "who", "took", "the", "snapshot", "can", "update", "the", "snapshot", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/snapshot_operations.rb#L478-L481
train
Updates a snapshot.
[ 30522, 13366, 10651, 1006, 20057, 12326, 1035, 8909, 1010, 6611, 1035, 9531, 1024, 9152, 2140, 1010, 5310, 1035, 2951, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, 2004, 6038, 2278, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
samvera/hyrax
app/controllers/hyrax/users_controller.rb
Hyrax.UsersController.search
def search(query) clause = query.blank? ? nil : "%" + query.downcase + "%" base = ::User.where(*base_query) base = base.where("#{Hydra.config.user_key_field} like lower(?) OR display_name like lower(?)", clause, clause) if clause.present? base.registered .where("#{Hydra.config.user_key_field} not in (?)", [::User.batch_user_key, ::User.audit_user_key]) .references(:trophies) .order(sort_value) .page(params[:page]).per(10) end
ruby
def search(query) clause = query.blank? ? nil : "%" + query.downcase + "%" base = ::User.where(*base_query) base = base.where("#{Hydra.config.user_key_field} like lower(?) OR display_name like lower(?)", clause, clause) if clause.present? base.registered .where("#{Hydra.config.user_key_field} not in (?)", [::User.batch_user_key, ::User.audit_user_key]) .references(:trophies) .order(sort_value) .page(params[:page]).per(10) end
[ "def", "search", "(", "query", ")", "clause", "=", "query", ".", "blank?", "?", "nil", ":", "\"%\"", "+", "query", ".", "downcase", "+", "\"%\"", "base", "=", "::", "User", ".", "where", "(", "base_query", ")", "base", "=", "base", ".", "where", "(...
TODO: this should move to a service. Returns a list of users excluding the system users and guest_users @param query [String] the query string
[ "TODO", ":", "this", "should", "move", "to", "a", "service", ".", "Returns", "a", "list", "of", "users", "excluding", "the", "system", "users", "and", "guest_users" ]
e2b4f56e829a53b1f11296324736e9d5b8c9ee5f
https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/hyrax/users_controller.rb#L25-L35
train
Search for users
[ 30522, 13366, 3945, 1006, 23032, 1007, 11075, 1027, 23032, 1012, 8744, 1029, 1029, 9152, 2140, 1024, 1000, 1003, 1000, 1009, 23032, 1012, 2091, 18382, 1009, 1000, 1003, 1000, 2918, 1027, 1024, 1024, 5310, 1012, 2073, 1006, 1008, 2918, 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...
spohlenz/tinymce-rails
lib/tinymce/rails/helper.rb
TinyMCE::Rails.Helper.tinymce_configuration
def tinymce_configuration(config=:default, options={}) options, config = config, :default if config.is_a?(Hash) options.stringify_keys! base_configuration = TinyMCE::Rails.configuration if base_configuration.is_a?(MultipleConfiguration) base_configuration = base_configuration.fetch(config) end base_configuration.merge(options) end
ruby
def tinymce_configuration(config=:default, options={}) options, config = config, :default if config.is_a?(Hash) options.stringify_keys! base_configuration = TinyMCE::Rails.configuration if base_configuration.is_a?(MultipleConfiguration) base_configuration = base_configuration.fetch(config) end base_configuration.merge(options) end
[ "def", "tinymce_configuration", "(", "config", "=", ":default", ",", "options", "=", "{", "}", ")", "options", ",", "config", "=", "config", ",", ":default", "if", "config", ".", "is_a?", "(", "Hash", ")", "options", ".", "stringify_keys!", "base_configurati...
Returns the TinyMCE configuration object. It should be converted to JavaScript (via #to_javascript) for use within JavaScript.
[ "Returns", "the", "TinyMCE", "configuration", "object", ".", "It", "should", "be", "converted", "to", "JavaScript", "(", "via", "#to_javascript", ")", "for", "use", "within", "JavaScript", "." ]
6f94b295f030939c8b3c7739f13812e42e6d920a
https://github.com/spohlenz/tinymce-rails/blob/6f94b295f030939c8b3c7739f13812e42e6d920a/lib/tinymce/rails/helper.rb#L52-L63
train
Returns the configuration for the current application.
[ 30522, 13366, 4714, 12458, 2063, 1035, 9563, 1006, 9530, 8873, 2290, 1027, 1024, 12398, 1010, 7047, 1027, 1063, 1065, 1007, 7047, 1010, 9530, 8873, 2290, 1027, 9530, 8873, 2290, 1010, 1024, 12398, 2065, 9530, 8873, 2290, 1012, 2003, 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...
rmosolgo/graphql-ruby
lib/graphql/schema.rb
GraphQL.Schema.check_resolved_type
def check_resolved_type(type, object, ctx = :__undefined__) if ctx == :__undefined__ # Old method signature ctx = object object = type type = nil end if object.is_a?(GraphQL::Schema::Object) object = object.object end if type.respond_to?(:graphql_definition) type = type.graphql_definition end # Prefer a type-local function; fall back to the schema-level function type_proc = type && type.resolve_type_proc type_result = if type_proc type_proc.call(object, ctx) else yield(type, object, ctx) end if type_result.nil? nil else after_lazy(type_result) do |resolved_type_result| if resolved_type_result.respond_to?(:graphql_definition) resolved_type_result = resolved_type_result.graphql_definition end if !resolved_type_result.is_a?(GraphQL::BaseType) type_str = "#{resolved_type_result} (#{resolved_type_result.class.name})" raise "resolve_type(#{object}) returned #{type_str}, but it should return a GraphQL type" else resolved_type_result end end end end
ruby
def check_resolved_type(type, object, ctx = :__undefined__) if ctx == :__undefined__ # Old method signature ctx = object object = type type = nil end if object.is_a?(GraphQL::Schema::Object) object = object.object end if type.respond_to?(:graphql_definition) type = type.graphql_definition end # Prefer a type-local function; fall back to the schema-level function type_proc = type && type.resolve_type_proc type_result = if type_proc type_proc.call(object, ctx) else yield(type, object, ctx) end if type_result.nil? nil else after_lazy(type_result) do |resolved_type_result| if resolved_type_result.respond_to?(:graphql_definition) resolved_type_result = resolved_type_result.graphql_definition end if !resolved_type_result.is_a?(GraphQL::BaseType) type_str = "#{resolved_type_result} (#{resolved_type_result.class.name})" raise "resolve_type(#{object}) returned #{type_str}, but it should return a GraphQL type" else resolved_type_result end end end end
[ "def", "check_resolved_type", "(", "type", ",", "object", ",", "ctx", "=", ":__undefined__", ")", "if", "ctx", "==", ":__undefined__", "# Old method signature", "ctx", "=", "object", "object", "=", "type", "type", "=", "nil", "end", "if", "object", ".", "is_...
This is a compatibility hack so that instance-level and class-level methods can get correctness checks without calling one another @api private
[ "This", "is", "a", "compatibility", "hack", "so", "that", "instance", "-", "level", "and", "class", "-", "level", "methods", "can", "get", "correctness", "checks", "without", "calling", "one", "another" ]
d5be13a816f220b9efbabeaa69a3e56fedf311f5
https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/schema.rb#L488-L527
train
Check that the given object is a GraphQL type.
[ 30522, 13366, 4638, 1035, 10395, 1035, 2828, 1006, 2828, 1010, 4874, 1010, 14931, 2595, 1027, 1024, 1035, 1035, 6151, 28344, 1035, 1035, 1007, 2065, 14931, 2595, 1027, 1027, 1024, 1035, 1035, 6151, 28344, 1035, 1035, 1001, 2214, 4118, 8085,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongoid
lib/mongoid/criteria.rb
Mongoid.Criteria.merge!
def merge!(other) criteria = other.to_criteria selector.merge!(criteria.selector) options.merge!(criteria.options) self.documents = criteria.documents.dup unless criteria.documents.empty? self.scoping_options = criteria.scoping_options self.inclusions = (inclusions + criteria.inclusions).uniq self end
ruby
def merge!(other) criteria = other.to_criteria selector.merge!(criteria.selector) options.merge!(criteria.options) self.documents = criteria.documents.dup unless criteria.documents.empty? self.scoping_options = criteria.scoping_options self.inclusions = (inclusions + criteria.inclusions).uniq self end
[ "def", "merge!", "(", "other", ")", "criteria", "=", "other", ".", "to_criteria", "selector", ".", "merge!", "(", "criteria", ".", "selector", ")", "options", ".", "merge!", "(", "criteria", ".", "options", ")", "self", ".", "documents", "=", "criteria", ...
Merge the other criteria into this one. @example Merge another criteria into this criteria. criteria.merge(Person.where(name: "bob")) @param [ Criteria ] other The criteria to merge in. @return [ Criteria ] The merged criteria. @since 3.0.0
[ "Merge", "the", "other", "criteria", "into", "this", "one", "." ]
56976e32610f4c2450882b0bfe14da099f0703f4
https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/criteria.rb#L242-L250
train
Merge two criteria together.
[ 30522, 13366, 13590, 999, 1006, 2060, 1007, 9181, 1027, 2060, 1012, 2000, 1035, 9181, 27000, 1012, 13590, 999, 1006, 9181, 1012, 27000, 1007, 7047, 1012, 13590, 999, 1006, 9181, 1012, 7047, 1007, 2969, 1012, 5491, 1027, 9181, 1012, 5491, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb
Azure::StorageSync::Mgmt::V2018_07_01.ServerEndpoints.begin_recall_action
def begin_recall_action(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters, custom_headers:nil) response = begin_recall_action_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters, custom_headers:custom_headers).value! nil end
ruby
def begin_recall_action(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters, custom_headers:nil) response = begin_recall_action_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters, custom_headers:custom_headers).value! nil end
[ "def", "begin_recall_action", "(", "resource_group_name", ",", "storage_sync_service_name", ",", "sync_group_name", ",", "server_endpoint_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_recall_action_async", "(", "resource_group_nam...
Recall a server endpoint. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param storage_sync_service_name [String] Name of Storage Sync Service resource. @param sync_group_name [String] Name of Sync Group resource. @param server_endpoint_name [String] Name of Server Endpoint object. @param parameters [RecallActionParameters] Body of Recall Action object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Recall", "a", "server", "endpoint", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb#L807-L810
train
Recall the specified server endpoint.
[ 30522, 13366, 4088, 1035, 9131, 1035, 2895, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 5527, 1035, 26351, 1035, 2326, 1035, 2171, 1010, 26351, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2203, 8400, 1035, 2171, 1010, 11709, 1010, 7661, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb
Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_hosting_environment_detector_responses_as_lazy
def list_hosting_environment_detector_responses_as_lazy(resource_group_name, name, custom_headers:nil) response = list_hosting_environment_detector_responses_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_hosting_environment_detector_responses_as_lazy(resource_group_name, name, custom_headers:nil) response = list_hosting_environment_detector_responses_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_hosting_environment_detector_responses_as_lazy", "(", "resource_group_name", ",", "name", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_hosting_environment_detector_responses_async", "(", "resource_group_name", ",", "name", ",", "custom_headers", ...
List Hosting Environment Detector Responses List Hosting Environment Detector Responses @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [DetectorResponseCollection] which provide lazy access to pages of the response.
[ "List", "Hosting", "Environment", "Detector", "Responses" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L3570-L3579
train
Gets the list of all the detectors for a specified App Service Environment.
[ 30522, 13366, 2862, 1035, 9936, 1035, 4044, 1035, 19034, 1035, 10960, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 9936, 1035, 4044, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.scheme=
def scheme=(new_scheme) if new_scheme && !new_scheme.respond_to?(:to_str) raise TypeError, "Can't convert #{new_scheme.class} into String." elsif new_scheme new_scheme = new_scheme.to_str end if new_scheme && new_scheme !~ /\A[a-z][a-z0-9\.\+\-]*\z/i raise InvalidURIError, "Invalid scheme format: #{new_scheme}" end @scheme = new_scheme @scheme = nil if @scheme.to_s.strip.empty? # Reset dependent values remove_instance_variable(:@normalized_scheme) if defined?(@normalized_scheme) remove_composite_values # Ensure we haven't created an invalid URI validate() end
ruby
def scheme=(new_scheme) if new_scheme && !new_scheme.respond_to?(:to_str) raise TypeError, "Can't convert #{new_scheme.class} into String." elsif new_scheme new_scheme = new_scheme.to_str end if new_scheme && new_scheme !~ /\A[a-z][a-z0-9\.\+\-]*\z/i raise InvalidURIError, "Invalid scheme format: #{new_scheme}" end @scheme = new_scheme @scheme = nil if @scheme.to_s.strip.empty? # Reset dependent values remove_instance_variable(:@normalized_scheme) if defined?(@normalized_scheme) remove_composite_values # Ensure we haven't created an invalid URI validate() end
[ "def", "scheme", "=", "(", "new_scheme", ")", "if", "new_scheme", "&&", "!", "new_scheme", ".", "respond_to?", "(", ":to_str", ")", "raise", "TypeError", ",", "\"Can't convert #{new_scheme.class} into String.\"", "elsif", "new_scheme", "new_scheme", "=", "new_scheme",...
Sets the scheme component for this URI. @param [String, #to_str] new_scheme The new scheme component.
[ "Sets", "the", "scheme", "component", "for", "this", "URI", "." ]
5894c95a7768435cb46d1355954611dbd194832e
https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L876-L894
train
Sets the scheme of this URI.
[ 30522, 13366, 5679, 1027, 1006, 2047, 1035, 5679, 1007, 2065, 2047, 1035, 5679, 1004, 1004, 999, 2047, 1035, 5679, 1012, 6869, 1035, 2000, 1029, 1006, 1024, 2000, 1035, 2358, 2099, 1007, 5333, 2828, 2121, 29165, 1010, 1000, 2064, 1005, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb
Azure::AnalysisServices::Mgmt::V2017_08_01_beta.Servers.list_operation_results
def list_operation_results(location, operation_id, custom_headers:nil) response = list_operation_results_async(location, operation_id, custom_headers:custom_headers).value! nil end
ruby
def list_operation_results(location, operation_id, custom_headers:nil) response = list_operation_results_async(location, operation_id, custom_headers:custom_headers).value! nil end
[ "def", "list_operation_results", "(", "location", ",", "operation_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_operation_results_async", "(", "location", ",", "operation_id", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", ...
List the result of the specified operation. @param location [String] The region name which the operation will lookup into. @param operation_id [String] The target operation Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "List", "the", "result", "of", "the", "specified", "operation", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb#L1057-L1060
train
Gets the list of the results of the operation.
[ 30522, 13366, 2862, 1035, 3169, 1035, 3463, 1006, 3295, 1010, 3169, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 3169, 1035, 3463, 1035, 2004, 6038, 2278, 1006, 3295, 1010, 3169, 1035, 8909, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb
Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachineScaleSets.begin_power_off_with_http_info
def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end
ruby
def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end
[ "def", "begin_power_off_with_http_info", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vm_instance_ids", ":", "nil", ",", "custom_headers", ":", "nil", ")", "begin_power_off_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vm_instance_ids", ...
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set. @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of virtual machine instance IDs from the VM scale set. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Power", "off", "(", "stop", ")", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "Note", "that", "resources", "are", "still", "attached", "and", "you", "are", "getting", "charged", "for", "the", "resources", ".", "Inste...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1392-L1394
train
Power off the virtual machines in a VM scale set.
[ 30522, 13366, 4088, 1035, 2373, 1035, 2125, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 1058, 2213, 1035, 6013, 1035, 8909, 2015, 1024, 9152, 2140, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
CocoaPods/Xcodeproj
spec/spec_helper/project_helper.rb
SpecHelper.ProjectHelper.load_settings
def load_settings(path, type) # Load fixture base_path = Pathname(fixture_path("CommonBuildSettings/configs/#{path}")) config_fixture = base_path + "#{path}_#{type}.xcconfig" config = Xcodeproj::Config.new(config_fixture) settings = config.to_hash # Filter exclusions settings = apply_exclusions(settings, EXCLUDED_KEYS) project_defaults_by_config = Xcodeproj::Constants::PROJECT_DEFAULT_BUILD_SETTINGS project_defaults = project_defaults_by_config[:all] project_defaults.merge(project_defaults_by_config[type]) unless type == :base settings = apply_exclusions(settings, project_defaults) settings end
ruby
def load_settings(path, type) # Load fixture base_path = Pathname(fixture_path("CommonBuildSettings/configs/#{path}")) config_fixture = base_path + "#{path}_#{type}.xcconfig" config = Xcodeproj::Config.new(config_fixture) settings = config.to_hash # Filter exclusions settings = apply_exclusions(settings, EXCLUDED_KEYS) project_defaults_by_config = Xcodeproj::Constants::PROJECT_DEFAULT_BUILD_SETTINGS project_defaults = project_defaults_by_config[:all] project_defaults.merge(project_defaults_by_config[type]) unless type == :base settings = apply_exclusions(settings, project_defaults) settings end
[ "def", "load_settings", "(", "path", ",", "type", ")", "# Load fixture", "base_path", "=", "Pathname", "(", "fixture_path", "(", "\"CommonBuildSettings/configs/#{path}\"", ")", ")", "config_fixture", "=", "base_path", "+", "\"#{path}_#{type}.xcconfig\"", "config", "=", ...
Load settings from fixtures @param [String] path the directory, where the fixture set is located. @param [Symbol] type the type, where the specific @param [Hash{String => String}] the build settings
[ "Load", "settings", "from", "fixtures" ]
3be1684437a6f8e69c7836ad4c85a2b78663272f
https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/spec/spec_helper/project_helper.rb#L81-L96
train
Load the settings from a file
[ 30522, 13366, 7170, 1035, 10906, 1006, 4130, 1010, 2828, 1007, 1001, 7170, 15083, 2918, 1035, 4130, 1027, 4130, 18442, 1006, 15083, 1035, 4130, 1006, 1000, 2691, 8569, 4014, 5104, 18319, 3070, 2015, 1013, 9530, 8873, 5620, 1013, 1001, 1063,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_name_info_with_http_info
def get_application_name_info_with_http_info(service_id, timeout:60, custom_headers:nil) get_application_name_info_async(service_id, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def get_application_name_info_with_http_info(service_id, timeout:60, custom_headers:nil) get_application_name_info_async(service_id, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "get_application_name_info_with_http_info", "(", "service_id", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "get_application_name_info_async", "(", "service_id", ",", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers", ")", ...
Gets the name of the Service Fabric application for a service. Gets the name of the application for the specified service. A 404 FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID does not exist. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "the", "name", "of", "the", "Service", "Fabric", "application", "for", "a", "service", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L10017-L10019
train
Gets the application name info for the specified service.
[ 30522, 13366, 2131, 1035, 4646, 1035, 2171, 1035, 18558, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2326, 1035, 8909, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 4646, 1035, 2171, 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_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb
Azure::Logic::Mgmt::V2016_06_01.Agreements.get_with_http_info
def get_with_http_info(resource_group_name, integration_account_name, agreement_name, custom_headers:nil) get_async(resource_group_name, integration_account_name, agreement_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, integration_account_name, agreement_name, custom_headers:nil) get_async(resource_group_name, integration_account_name, agreement_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "integration_account_name", ",", "agreement_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "integration_account_name", ",", "agreement_name", ",", "custom_headers", ...
Gets an integration account agreement. @param resource_group_name [String] The resource group name. @param integration_account_name [String] The integration account name. @param agreement_name [String] The integration account agreement name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "an", "integration", "account", "agreement", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb#L152-L154
train
Gets the specified integration account agreement.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8346, 1035, 4070, 1035, 2171, 1010, 3820, 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...
hashicorp/vault-ruby
lib/vault/api/logical.rb
Vault.Logical.unwrap
def unwrap(wrapper) client.with_token(wrapper) do |client| json = client.get("/v1/cubbyhole/response") secret = Secret.decode(json) # If there is nothing in the cubbyhole, return early. if secret.nil? || secret.data.nil? || secret.data[:response].nil? return nil end # Extract the response and parse it into a new secret. json = JSON.parse(secret.data[:response], symbolize_names: true) secret = Secret.decode(json) return secret end rescue HTTPError => e return nil if e.code == 404 raise end
ruby
def unwrap(wrapper) client.with_token(wrapper) do |client| json = client.get("/v1/cubbyhole/response") secret = Secret.decode(json) # If there is nothing in the cubbyhole, return early. if secret.nil? || secret.data.nil? || secret.data[:response].nil? return nil end # Extract the response and parse it into a new secret. json = JSON.parse(secret.data[:response], symbolize_names: true) secret = Secret.decode(json) return secret end rescue HTTPError => e return nil if e.code == 404 raise end
[ "def", "unwrap", "(", "wrapper", ")", "client", ".", "with_token", "(", "wrapper", ")", "do", "|", "client", "|", "json", "=", "client", ".", "get", "(", "\"/v1/cubbyhole/response\"", ")", "secret", "=", "Secret", ".", "decode", "(", "json", ")", "# If t...
Unwrap the data stored against the given token. If the secret does not exist, `nil` will be returned. @example Vault.logical.unwrap("f363dba8-25a7-08c5-430c-00b2367124e6") #=> #<Vault::Secret lease_id=""> @param [String] wrapper the token to use when unwrapping the value @return [Secret, nil]
[ "Unwrap", "the", "data", "stored", "against", "the", "given", "token", ".", "If", "the", "secret", "does", "not", "exist", "nil", "will", "be", "returned", "." ]
02f0532a802ba1a2a0d8703a4585dab76eb9d864
https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/logical.rb#L101-L119
train
Unwrap the cubbyhole response
[ 30522, 13366, 4895, 13088, 9331, 1006, 10236, 4842, 1007, 7396, 1012, 2007, 1035, 19204, 1006, 10236, 4842, 1007, 2079, 1064, 7396, 1064, 1046, 3385, 1027, 7396, 1012, 2131, 1006, 1000, 1013, 1058, 2487, 1013, 21987, 3762, 11484, 1013, 3433...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.start
def start(resource_group_name, application_gateway_name, custom_headers:nil) response = start_async(resource_group_name, application_gateway_name, custom_headers:custom_headers).value! nil end
ruby
def start(resource_group_name, application_gateway_name, custom_headers:nil) response = start_async(resource_group_name, application_gateway_name, custom_headers:custom_headers).value! nil end
[ "def", "start", "(", "resource_group_name", ",", "application_gateway_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "start_async", "(", "resource_group_name", ",", "application_gateway_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!"...
Starts 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.
[ "Starts", "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#L426-L429
train
Starts an application gateway in a resource group.
[ 30522, 13366, 2707, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4646, 1035, 11909, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2707, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4646, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
palkan/logidze
lib/logidze/history.rb
Logidze.History.changes_to
def changes_to(time: nil, version: nil, data: {}, from: 0) raise ArgumentError, "Time or version must be specified" if time.nil? && version.nil? filter = time.nil? ? method(:version_filter) : method(:time_filter) versions.each_with_object(data.dup) do |v, acc| next if v.version < from break acc if filter.call(v, version, time) acc.merge!(v.changes) end end
ruby
def changes_to(time: nil, version: nil, data: {}, from: 0) raise ArgumentError, "Time or version must be specified" if time.nil? && version.nil? filter = time.nil? ? method(:version_filter) : method(:time_filter) versions.each_with_object(data.dup) do |v, acc| next if v.version < from break acc if filter.call(v, version, time) acc.merge!(v.changes) end end
[ "def", "changes_to", "(", "time", ":", "nil", ",", "version", ":", "nil", ",", "data", ":", "{", "}", ",", "from", ":", "0", ")", "raise", "ArgumentError", ",", "\"Time or version must be specified\"", "if", "time", ".", "nil?", "&&", "version", ".", "ni...
Return diff from the initial state to specified time or version. Optional `data` paramater can be used as initial diff state.
[ "Return", "diff", "from", "the", "initial", "state", "to", "specified", "time", "or", "version", ".", "Optional", "data", "paramater", "can", "be", "used", "as", "initial", "diff", "state", "." ]
ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8
https://github.com/palkan/logidze/blob/ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8/lib/logidze/history.rb#L60-L70
train
Returns the changes to the given time version and data
[ 30522, 13366, 3431, 1035, 2000, 1006, 2051, 1024, 9152, 2140, 1010, 2544, 1024, 9152, 2140, 1010, 2951, 1024, 1063, 1065, 1010, 2013, 1024, 1014, 1007, 5333, 6685, 2121, 29165, 1010, 1000, 2051, 2030, 2544, 2442, 2022, 9675, 1000, 2065, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb
Azure::ApiManagement::Mgmt::V2018_01_01.OpenIdConnectProvider.delete_with_http_info
def delete_with_http_info(resource_group_name, service_name, opid, if_match, custom_headers:nil) delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value! end
ruby
def delete_with_http_info(resource_group_name, service_name, opid, if_match, custom_headers:nil) delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value! end
[ "def", "delete_with_http_info", "(", "resource_group_name", ",", "service_name", ",", "opid", ",", "if_match", ",", "custom_headers", ":", "nil", ")", "delete_async", "(", "resource_group_name", ",", "service_name", ",", "opid", ",", "if_match", ",", "custom_headers...
Deletes specific OpenID Connect Provider of the API Management service instance. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param opid [String] Identifier of the OpenID Connect Provider. @param if_match [String] ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Deletes", "specific", "OpenID", "Connect", "Provider", "of", "the", "API", "Management", "service", "instance", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb#L617-L619
train
Deletes an existing Advisor Specifier.
[ 30522, 13366, 3972, 12870, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 6728, 3593, 1010, 2065, 1035, 2674, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3972, 12870, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/packet_captures.rb
Azure::Network::Mgmt::V2018_10_01.PacketCaptures.begin_get_status_with_http_info
def begin_get_status_with_http_info(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:nil) begin_get_status_async(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:custom_headers).value! end
ruby
def begin_get_status_with_http_info(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:nil) begin_get_status_async(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:custom_headers).value! end
[ "def", "begin_get_status_with_http_info", "(", "resource_group_name", ",", "network_watcher_name", ",", "packet_capture_name", ",", "custom_headers", ":", "nil", ")", "begin_get_status_async", "(", "resource_group_name", ",", "network_watcher_name", ",", "packet_capture_name", ...
Query the status of a running packet capture session. @param resource_group_name [String] The name of the resource group. @param network_watcher_name [String] The name of the Network Watcher resource. @param packet_capture_name [String] The name given to the packet capture session. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Query", "the", "status", "of", "a", "running", "packet", "capture", "session", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/packet_captures.rb#L702-L704
train
Gets the status of a specified packet capture.
[ 30522, 13366, 4088, 1035, 2131, 1035, 3570, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 3422, 2121, 1035, 2171, 1010, 14771, 1035, 5425, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
plataformatec/responders
lib/action_controller/respond_with.rb
ActionController.RespondWith.verify_requested_format!
def verify_requested_format! mimes = collect_mimes_from_class_level collector = ActionController::MimeResponds::Collector.new(mimes, request.variant) unless collector.negotiate_format(request) raise ActionController::UnknownFormat end end
ruby
def verify_requested_format! mimes = collect_mimes_from_class_level collector = ActionController::MimeResponds::Collector.new(mimes, request.variant) unless collector.negotiate_format(request) raise ActionController::UnknownFormat end end
[ "def", "verify_requested_format!", "mimes", "=", "collect_mimes_from_class_level", "collector", "=", "ActionController", "::", "MimeResponds", "::", "Collector", ".", "new", "(", "mimes", ",", "request", ".", "variant", ")", "unless", "collector", ".", "negotiate_form...
Before action callback that can be used to prevent requests that do not match the mime types defined through <tt>respond_to</tt> from being executed. class PeopleController < ApplicationController respond_to :html, :xml, :json before_action :verify_requested_format! end
[ "Before", "action", "callback", "that", "can", "be", "used", "to", "prevent", "requests", "that", "do", "not", "match", "the", "mime", "types", "defined", "through", "<tt", ">", "respond_to<", "/", "tt", ">", "from", "being", "executed", "." ]
a1a2706091d4ffcbbe387407ddfc5671a59ad842
https://github.com/plataformatec/responders/blob/a1a2706091d4ffcbbe387407ddfc5671a59ad842/lib/action_controller/respond_with.rb#L227-L234
train
Verify the requested format is correct
[ 30522, 13366, 20410, 1035, 7303, 1035, 4289, 999, 2771, 7834, 1027, 8145, 1035, 2771, 7834, 1035, 2013, 1035, 2465, 1035, 2504, 10018, 1027, 2895, 8663, 13181, 10820, 1024, 1024, 2771, 13759, 13102, 15422, 2015, 1024, 1024, 10018, 1012, 204...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_pattern_any_entity_roles_with_http_info
def list_pattern_any_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil) list_pattern_any_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value! end
ruby
def list_pattern_any_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil) list_pattern_any_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value! end
[ "def", "list_pattern_any_entity_roles_with_http_info", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "custom_headers", ":", "nil", ")", "list_pattern_any_entity_roles_async", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "custom_headers", ":custom_he...
Get all roles for a Pattern.any entity in a version of the application @param app_id The application ID. @param version_id [String] The version ID. @param entity_id entity Id @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Get", "all", "roles", "for", "a", "Pattern", ".", "any", "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#L7281-L7283
train
Gets the roles of the specified entity in a version of the application.
[ 30522, 13366, 2862, 1035, 5418, 1035, 2151, 1035, 9178, 1035, 4395, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2862, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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_for_topic_type
def list_global_by_subscription_for_topic_type(topic_type_name, custom_headers:nil) response = list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_global_by_subscription_for_topic_type(topic_type_name, custom_headers:nil) response = list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_global_by_subscription_for_topic_type", "(", "topic_type_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_global_by_subscription_for_topic_type_async", "(", "topic_type_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "res...
List all global event subscriptions for a topic type List all global event subscriptions under an Azure subscription for a topic type. @param topic_type_name [String] Name of the topic type @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EventSubscriptionsListResult] operation results.
[ "List", "all", "global", "event", "subscriptions", "for", "a", "topic", "type" ]
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#L581-L584
train
Gets all the global policy rules for a topic type.
[ 30522, 13366, 2862, 1035, 3795, 1035, 2011, 1035, 15002, 1035, 2005, 1035, 8476, 1035, 2828, 1006, 8476, 1035, 2828, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 3795, 1035, 2011, 1035, 15002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb
Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.BuildTasks.list_source_repository_properties_with_http_info
def list_source_repository_properties_with_http_info(resource_group_name, registry_name, build_task_name, custom_headers:nil) list_source_repository_properties_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value! end
ruby
def list_source_repository_properties_with_http_info(resource_group_name, registry_name, build_task_name, custom_headers:nil) list_source_repository_properties_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value! end
[ "def", "list_source_repository_properties_with_http_info", "(", "resource_group_name", ",", "registry_name", ",", "build_task_name", ",", "custom_headers", ":", "nil", ")", "list_source_repository_properties_async", "(", "resource_group_name", ",", "registry_name", ",", "build_...
Get the source control properties for a build task. @param resource_group_name [String] The name of the resource group to which the container registry belongs. @param registry_name [String] The name of the container registry. @param build_task_name [String] The name of the container registry build task. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Get", "the", "source", "control", "properties", "for", "a", "build", "task", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb#L418-L420
train
Gets the properties of the source repository.
[ 30522, 13366, 2862, 1035, 3120, 1035, 22409, 1035, 5144, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 3857, 1035, 4708, 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...
fastlane/fastlane
gym/lib/gym/runner.rb
Gym.Runner.move_app_thinning
def move_app_thinning if File.exist?(PackageCommandGenerator.app_thinning_path) FileUtils.mv(PackageCommandGenerator.app_thinning_path, File.expand_path(Gym.config[:output_directory]), force: true) app_thinning_path = File.join(File.expand_path(Gym.config[:output_directory]), File.basename(PackageCommandGenerator.app_thinning_path)) UI.success("Successfully exported the app-thinning.plist file:") UI.message(app_thinning_path) app_thinning_path end end
ruby
def move_app_thinning if File.exist?(PackageCommandGenerator.app_thinning_path) FileUtils.mv(PackageCommandGenerator.app_thinning_path, File.expand_path(Gym.config[:output_directory]), force: true) app_thinning_path = File.join(File.expand_path(Gym.config[:output_directory]), File.basename(PackageCommandGenerator.app_thinning_path)) UI.success("Successfully exported the app-thinning.plist file:") UI.message(app_thinning_path) app_thinning_path end end
[ "def", "move_app_thinning", "if", "File", ".", "exist?", "(", "PackageCommandGenerator", ".", "app_thinning_path", ")", "FileUtils", ".", "mv", "(", "PackageCommandGenerator", ".", "app_thinning_path", ",", "File", ".", "expand_path", "(", "Gym", ".", "config", "[...
Move the app-thinning.plist file into the output directory
[ "Move", "the", "app", "-", "thinning", ".", "plist", "file", "into", "the", "output", "directory" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/gym/lib/gym/runner.rb#L225-L234
train
Move the app - thinning. plist file to the output directory
[ 30522, 13366, 2693, 1035, 10439, 1035, 4857, 5582, 2065, 5371, 1012, 4839, 1029, 1006, 7427, 9006, 2386, 11818, 3678, 8844, 1012, 10439, 1035, 4857, 5582, 1035, 4130, 1007, 5371, 21823, 4877, 1012, 19842, 1006, 7427, 9006, 2386, 11818, 3678...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fastlane/fastlane
deliver/lib/deliver/upload_metadata.rb
Deliver.UploadMetadata.load_from_filesystem
def load_from_filesystem(options) return if options[:skip_metadata] # Load localised data ignore_validation = options[:ignore_language_directory_validation] Loader.language_folders(options[:metadata_path], ignore_validation).each do |lang_folder| language = File.basename(lang_folder) (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key| path = File.join(lang_folder, "#{key}.txt") next unless File.exist?(path) UI.message("Loading '#{path}'...") options[key] ||= {} options[key][language] ||= File.read(path) end end # Load non localised data (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES).each do |key| path = File.join(options[:metadata_path], "#{key}.txt") next unless File.exist?(path) UI.message("Loading '#{path}'...") options[key] ||= File.read(path) end # Load trade representative contact information options[:trade_representative_contact_information] ||= {} TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES.values.each do |option_name| path = File.join(options[:metadata_path], TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR, "#{option_name}.txt") next unless File.exist?(path) next if options[:trade_representative_contact_information][option_name].to_s.length > 0 UI.message("Loading '#{path}'...") options[:trade_representative_contact_information][option_name] ||= File.read(path) end # Load review information options[:app_review_information] ||= {} REVIEW_INFORMATION_VALUES.values.each do |option_name| path = File.join(options[:metadata_path], REVIEW_INFORMATION_DIR, "#{option_name}.txt") next unless File.exist?(path) next if options[:app_review_information][option_name].to_s.length > 0 UI.message("Loading '#{path}'...") options[:app_review_information][option_name] ||= File.read(path) end end
ruby
def load_from_filesystem(options) return if options[:skip_metadata] # Load localised data ignore_validation = options[:ignore_language_directory_validation] Loader.language_folders(options[:metadata_path], ignore_validation).each do |lang_folder| language = File.basename(lang_folder) (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key| path = File.join(lang_folder, "#{key}.txt") next unless File.exist?(path) UI.message("Loading '#{path}'...") options[key] ||= {} options[key][language] ||= File.read(path) end end # Load non localised data (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES).each do |key| path = File.join(options[:metadata_path], "#{key}.txt") next unless File.exist?(path) UI.message("Loading '#{path}'...") options[key] ||= File.read(path) end # Load trade representative contact information options[:trade_representative_contact_information] ||= {} TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES.values.each do |option_name| path = File.join(options[:metadata_path], TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR, "#{option_name}.txt") next unless File.exist?(path) next if options[:trade_representative_contact_information][option_name].to_s.length > 0 UI.message("Loading '#{path}'...") options[:trade_representative_contact_information][option_name] ||= File.read(path) end # Load review information options[:app_review_information] ||= {} REVIEW_INFORMATION_VALUES.values.each do |option_name| path = File.join(options[:metadata_path], REVIEW_INFORMATION_DIR, "#{option_name}.txt") next unless File.exist?(path) next if options[:app_review_information][option_name].to_s.length > 0 UI.message("Loading '#{path}'...") options[:app_review_information][option_name] ||= File.read(path) end end
[ "def", "load_from_filesystem", "(", "options", ")", "return", "if", "options", "[", ":skip_metadata", "]", "# Load localised data", "ignore_validation", "=", "options", "[", ":ignore_language_directory_validation", "]", "Loader", ".", "language_folders", "(", "options", ...
Loads the metadata files and stores them into the options object
[ "Loads", "the", "metadata", "files", "and", "stores", "them", "into", "the", "options", "object" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/upload_metadata.rb#L284-L331
train
Load metadata from the filesystem
[ 30522, 13366, 7170, 1035, 2013, 1035, 6764, 27268, 6633, 1006, 7047, 1007, 2709, 2065, 7047, 1031, 1024, 13558, 1035, 27425, 1033, 1001, 7170, 2334, 5084, 2951, 8568, 1035, 27354, 1027, 7047, 1031, 1024, 8568, 1035, 2653, 1035, 14176, 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...
jeremytregunna/ruby-trello
lib/trello/card.rb
Trello.Card.move_to_list
def move_to_list(list) list_number = list.is_a?(String) ? list : list.id unless list_id == list_number client.put("/cards/#{id}/idList", { value: list_number }) end end
ruby
def move_to_list(list) list_number = list.is_a?(String) ? list : list.id unless list_id == list_number client.put("/cards/#{id}/idList", { value: list_number }) end end
[ "def", "move_to_list", "(", "list", ")", "list_number", "=", "list", ".", "is_a?", "(", "String", ")", "?", "list", ":", "list", ".", "id", "unless", "list_id", "==", "list_number", "client", ".", "put", "(", "\"/cards/#{id}/idList\"", ",", "{", "value", ...
Move this card to the given list
[ "Move", "this", "card", "to", "the", "given", "list" ]
ad79c9d8152ad5395b3b61c43170908f1912bfb2
https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/card.rb#L338-L345
train
Move the list to the next list
[ 30522, 13366, 2693, 1035, 2000, 1035, 2862, 1006, 2862, 1007, 2862, 1035, 2193, 1027, 2862, 1012, 2003, 1035, 1037, 1029, 1006, 5164, 1007, 1029, 2862, 1024, 2862, 1012, 8909, 4983, 2862, 1035, 8909, 1027, 1027, 2862, 1035, 2193, 7396, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-sns/lib/aws-sdk-sns/topic.rb
Aws::SNS.Topic.confirm_subscription
def confirm_subscription(options = {}) options = options.merge(topic_arn: @arn) resp = @client.confirm_subscription(options) Subscription.new( arn: resp.data.subscription_arn, client: @client ) end
ruby
def confirm_subscription(options = {}) options = options.merge(topic_arn: @arn) resp = @client.confirm_subscription(options) Subscription.new( arn: resp.data.subscription_arn, client: @client ) end
[ "def", "confirm_subscription", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "topic_arn", ":", "@arn", ")", "resp", "=", "@client", ".", "confirm_subscription", "(", "options", ")", "Subscription", ".", "new", "(", "arn"...
@example Request syntax with placeholder values subscription = topic.confirm_subscription({ token: "token", # required authenticate_on_unsubscribe: "authenticateOnUnsubscribe", }) @param [Hash] options ({}) @option options [required, String] :token Short-lived token sent to an endpoint during the `Subscribe` action. @option options [String] :authenticate_on_unsubscribe Disallows unauthenticated unsubscribes of the subscription. If the value of this parameter is `true` and the request has an AWS signature, then only the topic owner and the subscription owner can unsubscribe the endpoint. The unsubscribe action requires AWS authentication. @return [Subscription]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/topic.rb#L143-L150
train
confirm subscription
[ 30522, 13366, 12210, 1035, 15002, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 8476, 1035, 12098, 2078, 1024, 1030, 12098, 2078, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 12210, 1035, 15002, 1006, 7047, 1007, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/response/follow_redirects.rb
Github.Response::FollowRedirects.safe_escape
def safe_escape(uri) uri = uri.split('#')[0] # we want to remove the fragment if present uri.to_s.gsub(URI_UNSAFE) { |match| '%' + match.unpack('H2' * match.bytesize).join('%').upcase } end
ruby
def safe_escape(uri) uri = uri.split('#')[0] # we want to remove the fragment if present uri.to_s.gsub(URI_UNSAFE) { |match| '%' + match.unpack('H2' * match.bytesize).join('%').upcase } end
[ "def", "safe_escape", "(", "uri", ")", "uri", "=", "uri", ".", "split", "(", "'#'", ")", "[", "0", "]", "# we want to remove the fragment if present", "uri", ".", "to_s", ".", "gsub", "(", "URI_UNSAFE", ")", "{", "|", "match", "|", "'%'", "+", "match", ...
Internal: escapes unsafe characters from an URL which might be a path component only or a fully qualified URI so that it can be joined onto an URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not risk double-escaping.
[ "Internal", ":", "escapes", "unsafe", "characters", "from", "an", "URL", "which", "might", "be", "a", "path", "component", "only", "or", "a", "fully", "qualified", "URI", "so", "that", "it", "can", "be", "joined", "onto", "an", "URI", ":", "HTTP", "using...
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/response/follow_redirects.rb#L133-L138
train
escape the URI
[ 30522, 13366, 3647, 1035, 4019, 1006, 24471, 2072, 1007, 24471, 2072, 1027, 24471, 2072, 1012, 3975, 1006, 1005, 1001, 1005, 1007, 1031, 1014, 1033, 1001, 2057, 2215, 2000, 6366, 1996, 15778, 2065, 2556, 24471, 2072, 1012, 2000, 1035, 1055,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
JsonApiClient/json_api_client
lib/json_api_client/resource.rb
JsonApiClient.Resource.as_json_api
def as_json_api(*) attributes.slice(self.class.primary_key, :type).tap do |h| relationships_for_serialization.tap do |r| h[:relationships] = self.class.key_formatter.format_keys(r) unless r.empty? end h[:attributes] = self.class.key_formatter.format_keys(attributes_for_serialization) end end
ruby
def as_json_api(*) attributes.slice(self.class.primary_key, :type).tap do |h| relationships_for_serialization.tap do |r| h[:relationships] = self.class.key_formatter.format_keys(r) unless r.empty? end h[:attributes] = self.class.key_formatter.format_keys(attributes_for_serialization) end end
[ "def", "as_json_api", "(", "*", ")", "attributes", ".", "slice", "(", "self", ".", "class", ".", "primary_key", ",", ":type", ")", ".", "tap", "do", "|", "h", "|", "relationships_for_serialization", ".", "tap", "do", "|", "r", "|", "h", "[", ":relation...
When we represent this resource for serialization (create/update), we do so with this implementation @return [Hash] Representation of this object as JSONAPI object
[ "When", "we", "represent", "this", "resource", "for", "serialization", "(", "create", "/", "update", ")", "we", "do", "so", "with", "this", "implementation" ]
e4b763f5579c4fae4b03dcc935b20627f5c14eaa
https://github.com/JsonApiClient/json_api_client/blob/e4b763f5579c4fae4b03dcc935b20627f5c14eaa/lib/json_api_client/resource.rb#L404-L411
train
Returns a hash of the attributes for the object.
[ 30522, 13366, 2004, 1035, 1046, 3385, 1035, 17928, 1006, 1008, 1007, 12332, 1012, 14704, 1006, 2969, 1012, 2465, 1012, 3078, 1035, 3145, 1010, 1024, 2828, 1007, 1012, 11112, 2079, 1064, 1044, 1064, 6550, 1035, 2005, 1035, 7642, 3989, 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-sns/lib/aws-sdk-sns/topic.rb
Aws::SNS.Topic.set_attributes
def set_attributes(options = {}) options = options.merge(topic_arn: @arn) resp = @client.set_topic_attributes(options) resp.data end
ruby
def set_attributes(options = {}) options = options.merge(topic_arn: @arn) resp = @client.set_topic_attributes(options) resp.data end
[ "def", "set_attributes", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "topic_arn", ":", "@arn", ")", "resp", "=", "@client", ".", "set_topic_attributes", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values topic.set_attributes({ attribute_name: "attributeName", # required attribute_value: "attributeValue", }) @param [Hash] options ({}) @option options [required, String] :attribute_name A map of attributes with their corresponding values. The following lists the names, descriptions, and values of the special request parameters that the `SetTopicAttributes` action uses: * `DeliveryPolicy` – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints. * `DisplayName` – The display name to use for a topic with SMS subscriptions. * `Policy` – The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic. The following attribute applies only to [server-side-encryption][1]\: * `KmsMasterKeyId` - The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see [Key Terms][2]. For more examples, see [KeyId][3] in the *AWS Key Management Service API Reference*. ^ [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters @option options [String] :attribute_value The new value for the attribute. @return [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/topic.rb#L344-L348
train
Set the attributes of the topic
[ 30522, 13366, 2275, 1035, 12332, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 8476, 1035, 12098, 2078, 1024, 1030, 12098, 2078, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 2275, 1035, 8476, 1035, 12332, 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
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.recover_partition
def recover_partition(partition_id, timeout:60, custom_headers:nil) response = recover_partition_async(partition_id, timeout:timeout, custom_headers:custom_headers).value! nil end
ruby
def recover_partition(partition_id, timeout:60, custom_headers:nil) response = recover_partition_async(partition_id, timeout:timeout, custom_headers:custom_headers).value! nil end
[ "def", "recover_partition", "(", "partition_id", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "recover_partition_async", "(", "partition_id", ",", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers", ")", ".",...
Indicates to the Service Fabric cluster that it should attempt to recover a specific partition which is currently stuck in quorum loss. Indicates to the Service Fabric cluster that it should attempt to recover a specific partition which is currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss. @param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Indicates", "to", "the", "Service", "Fabric", "cluster", "that", "it", "should", "attempt", "to", "recover", "a", "specific", "partition", "which", "is", "currently", "stuck", "in", "quorum", "loss", "." ]
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#L13188-L13191
train
Recover the specified partition.
[ 30522, 13366, 8980, 1035, 13571, 1006, 13571, 1035, 8909, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 8980, 1035, 13571, 1035, 2004, 6038, 2278, 1006, 13571, 1035, 8909, 1010, 2051, 5833,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_info_list
def get_application_info_list(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) response = get_application_info_list_async(application_definition_kind_filter:application_definition_kind_filter, application_type_name:application_type_name, exclude_application_parameters:exclude_application_parameters, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_application_info_list(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) response = get_application_info_list_async(application_definition_kind_filter:application_definition_kind_filter, application_type_name:application_type_name, exclude_application_parameters:exclude_application_parameters, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_application_info_list", "(", "application_definition_kind_filter", ":", "0", ",", "application_type_name", ":", "nil", ",", "exclude_application_parameters", ":", "false", ",", "continuation_token", ":", "nil", ",", "max_results", ":", "0", ",", "timeout", ...
Gets the list of applications created in the Service Fabric cluster that match the specified filters. Gets the information about the applications that were created or in the process of being created in the Service Fabric cluster and match the specified filters. The response includes the name, type, status, parameters, and other details about the application. If the applications do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. Filters ApplicationTypeName and ApplicationDefinitionKindFilter cannot be specified at the same time. @param application_definition_kind_filter [Integer] Used to filter on ApplicationDefinitionKind which is the mechanism used to define a Service Fabric application. - Default - Default value, which performs the same function as selecting "All". The value is 0. - All - Filter that matches input with any ApplicationDefinitionKind value. The value is 65535. - ServiceFabricApplicationDescription - Filter that matches input with ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1. - Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value is 2. @param application_type_name [String] The application type name used to filter the applications to query for. This value should not contain the application type version. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PagedApplicationInfoList] operation results.
[ "Gets", "the", "list", "of", "applications", "created", "in", "the", "Service", "Fabric", "cluster", "that", "match", "the", "specified", "filters", "." ]
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#L6486-L6489
train
Gets the list of all the applications in a given App Service Environment.
[ 30522, 13366, 2131, 1035, 4646, 1035, 18558, 1035, 2862, 1006, 4646, 1035, 6210, 1035, 2785, 1035, 11307, 1024, 1014, 1010, 4646, 1035, 2828, 1035, 2171, 1024, 9152, 2140, 1010, 23329, 1035, 4646, 1035, 11709, 1024, 6270, 1010, 13633, 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...
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document.rb
HQMF2.Document.handle_specific_source_data_criteria_reference
def handle_specific_source_data_criteria_reference(criteria) original_sdc = find(@source_data_criteria, :id, criteria.source_data_criteria) updated_sdc = find(@source_data_criteria, :id, criteria.id) if !updated_sdc.nil? && !criteria.specific_occurrence.nil? && (original_sdc.nil? || original_sdc.specific_occurrence.nil?) criteria.instance_variable_set(:@source_data_criteria, criteria.id) end return if original_sdc.nil? if (criteria.specific_occurrence && !original_sdc.specific_occurrence) original_sdc.instance_variable_set(:@specific_occurrence, criteria.specific_occurrence) original_sdc.instance_variable_set(:@specific_occurrence_const, criteria.specific_occurrence_const) original_sdc.instance_variable_set(:@code_list_id, criteria.code_list_id) end end
ruby
def handle_specific_source_data_criteria_reference(criteria) original_sdc = find(@source_data_criteria, :id, criteria.source_data_criteria) updated_sdc = find(@source_data_criteria, :id, criteria.id) if !updated_sdc.nil? && !criteria.specific_occurrence.nil? && (original_sdc.nil? || original_sdc.specific_occurrence.nil?) criteria.instance_variable_set(:@source_data_criteria, criteria.id) end return if original_sdc.nil? if (criteria.specific_occurrence && !original_sdc.specific_occurrence) original_sdc.instance_variable_set(:@specific_occurrence, criteria.specific_occurrence) original_sdc.instance_variable_set(:@specific_occurrence_const, criteria.specific_occurrence_const) original_sdc.instance_variable_set(:@code_list_id, criteria.code_list_id) end end
[ "def", "handle_specific_source_data_criteria_reference", "(", "criteria", ")", "original_sdc", "=", "find", "(", "@source_data_criteria", ",", ":id", ",", "criteria", ".", "source_data_criteria", ")", "updated_sdc", "=", "find", "(", "@source_data_criteria", ",", ":id",...
For specific occurrence data criteria, make sure the source data criteria reference points to the correct source data criteria.
[ "For", "specific", "occurrence", "data", "criteria", "make", "sure", "the", "source", "data", "criteria", "reference", "points", "to", "the", "correct", "source", "data", "criteria", "." ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document.rb#L289-L301
train
handle specific source data criteria reference
[ 30522, 13366, 5047, 1035, 3563, 1035, 3120, 1035, 2951, 1035, 9181, 1035, 4431, 1006, 9181, 1007, 2434, 1035, 17371, 2278, 1027, 2424, 1006, 1030, 3120, 1035, 2951, 1035, 9181, 1010, 1024, 8909, 1010, 9181, 1012, 3120, 1035, 2951, 1035, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
projectcypress/health-data-standards
lib/hqmf-parser/2.0/data_criteria.rb
HQMF2.DataCriteria.retrieve_title_and_description_for_model
def retrieve_title_and_description_for_model # drop "* Value Set" from titles exact_desc = title.split(' ')[0...-3].join(' ') # don't drop anything for patient characterstic titles exact_desc = title if @definition.start_with?('patient_characteristic') && !title.end_with?('Value Set') # remove * Value Set from title title_match = title.match(/(.*) \w+ [Vv]alue [Ss]et/) @title = title_match[1] if title_match && title_match.length > 1 @description = "#{@description}: #{exact_desc}" end
ruby
def retrieve_title_and_description_for_model # drop "* Value Set" from titles exact_desc = title.split(' ')[0...-3].join(' ') # don't drop anything for patient characterstic titles exact_desc = title if @definition.start_with?('patient_characteristic') && !title.end_with?('Value Set') # remove * Value Set from title title_match = title.match(/(.*) \w+ [Vv]alue [Ss]et/) @title = title_match[1] if title_match && title_match.length > 1 @description = "#{@description}: #{exact_desc}" end
[ "def", "retrieve_title_and_description_for_model", "# drop \"* Value Set\" from titles", "exact_desc", "=", "title", ".", "split", "(", "' '", ")", "[", "0", "...", "-", "3", "]", ".", "join", "(", "' '", ")", "# don't drop anything for patient characterstic titles", "e...
Generate the title and description used when producing the model
[ "Generate", "the", "title", "and", "description", "used", "when", "producing", "the", "model" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria.rb#L267-L278
train
Retrieve the title and description for the model
[ 30522, 13366, 12850, 1035, 2516, 1035, 1998, 1035, 6412, 1035, 2005, 1035, 2944, 1001, 4530, 1000, 1008, 3643, 2275, 1000, 2013, 4486, 6635, 1035, 4078, 2278, 1027, 2516, 1012, 3975, 1006, 1005, 1005, 1007, 1031, 1014, 1012, 1012, 1012, 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...
castwide/solargraph
lib/solargraph/workspace.rb
Solargraph.Workspace.would_require?
def would_require? path require_paths.each do |rp| return true if File.exist?(File.join(rp, "#{path}.rb")) end false end
ruby
def would_require? path require_paths.each do |rp| return true if File.exist?(File.join(rp, "#{path}.rb")) end false end
[ "def", "would_require?", "path", "require_paths", ".", "each", "do", "|", "rp", "|", "return", "true", "if", "File", ".", "exist?", "(", "File", ".", "join", "(", "rp", ",", "\"#{path}.rb\"", ")", ")", "end", "false", "end" ]
True if the path resolves to a file in the workspace's require paths. @param path [String] @return [Boolean]
[ "True", "if", "the", "path", "resolves", "to", "a", "file", "in", "the", "workspace", "s", "require", "paths", "." ]
47badb5d151aca775ccbe6c470236089eae7839d
https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/workspace.rb#L97-L102
train
Returns true if the given path would require the given path.
[ 30522, 13366, 2052, 1035, 5478, 1029, 4130, 5478, 1035, 10425, 1012, 2169, 2079, 1064, 1054, 2361, 1064, 2709, 2995, 2065, 5371, 1012, 4839, 1029, 1006, 5371, 1012, 3693, 1006, 1054, 2361, 1010, 1000, 1001, 1063, 4130, 1065, 1012, 21144, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb
Azure::Scheduler::Mgmt::V2016_03_01.JobCollections.enable
def enable(resource_group_name, job_collection_name, custom_headers:nil) response = enable_async(resource_group_name, job_collection_name, custom_headers:custom_headers).value! nil end
ruby
def enable(resource_group_name, job_collection_name, custom_headers:nil) response = enable_async(resource_group_name, job_collection_name, custom_headers:custom_headers).value! nil end
[ "def", "enable", "(", "resource_group_name", ",", "job_collection_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "enable_async", "(", "resource_group_name", ",", "job_collection_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil...
Enables all of the jobs in the job collection. @param resource_group_name [String] The resource group name. @param job_collection_name [String] The job collection name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Enables", "all", "of", "the", "jobs", "in", "the", "job", "collection", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb#L556-L559
train
Enables the specified job collection.
[ 30522, 13366, 9585, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3105, 1035, 3074, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 9585, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3105, 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-s3/lib/aws-sdk-s3/resource.rb
Aws::S3.Resource.buckets
def buckets(options = {}) batches = Enumerator.new do |y| batch = [] resp = @client.list_buckets(options) resp.data.buckets.each do |b| batch << Bucket.new( name: b.name, data: b, client: @client ) end y.yield(batch) end Bucket::Collection.new(batches) end
ruby
def buckets(options = {}) batches = Enumerator.new do |y| batch = [] resp = @client.list_buckets(options) resp.data.buckets.each do |b| batch << Bucket.new( name: b.name, data: b, client: @client ) end y.yield(batch) end Bucket::Collection.new(batches) end
[ "def", "buckets", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "batch", "=", "[", "]", "resp", "=", "@client", ".", "list_buckets", "(", "options", ")", "resp", ".", "data", ".", "buckets", ".",...
@example Request syntax with placeholder values s3.buckets() @param [Hash] options ({}) @return [Bucket::Collection]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/resource.rb#L84-L98
train
List all buckets
[ 30522, 13366, 13610, 2015, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 2229, 1027, 4372, 17897, 16259, 1012, 2047, 2079, 1064, 1061, 1064, 14108, 1027, 1031, 1033, 24501, 2361, 1027, 1030, 7396, 1012, 2862, 1035, 13610, 2015, 1006, 7047, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
actionview/lib/action_view/renderer/streaming_template_renderer.rb
ActionView.StreamingTemplateRenderer.render_template
def render_template(view, template, layout_name = nil, locals = {}) #:nodoc: return [super.body] unless layout_name && template.supports_streaming? locals ||= {} layout = layout_name && find_layout(layout_name, locals.keys, [formats.first]) Body.new do |buffer| delayed_render(buffer, template, layout, view, locals) end end
ruby
def render_template(view, template, layout_name = nil, locals = {}) #:nodoc: return [super.body] unless layout_name && template.supports_streaming? locals ||= {} layout = layout_name && find_layout(layout_name, locals.keys, [formats.first]) Body.new do |buffer| delayed_render(buffer, template, layout, view, locals) end end
[ "def", "render_template", "(", "view", ",", "template", ",", "layout_name", "=", "nil", ",", "locals", "=", "{", "}", ")", "#:nodoc:", "return", "[", "super", ".", "body", "]", "unless", "layout_name", "&&", "template", ".", "supports_streaming?", "locals", ...
For streaming, instead of rendering a given a template, we return a Body object that responds to each. This object is initialized with a block that knows how to render the template.
[ "For", "streaming", "instead", "of", "rendering", "a", "given", "a", "template", "we", "return", "a", "Body", "object", "that", "responds", "to", "each", ".", "This", "object", "is", "initialized", "with", "a", "block", "that", "knows", "how", "to", "rende...
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/renderer/streaming_template_renderer.rb#L46-L55
train
Render a template.
[ 30522, 13366, 17552, 1035, 23561, 1006, 3193, 1010, 23561, 1010, 9621, 1035, 2171, 1027, 9152, 2140, 1010, 10575, 1027, 1063, 1065, 1007, 1001, 1024, 7293, 10085, 1024, 2709, 1031, 3565, 1012, 2303, 1033, 4983, 9621, 1035, 2171, 1004, 1004,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb
Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Webhooks.ping_with_http_info
def ping_with_http_info(resource_group_name, registry_name, webhook_name, custom_headers:nil) ping_async(resource_group_name, registry_name, webhook_name, custom_headers:custom_headers).value! end
ruby
def ping_with_http_info(resource_group_name, registry_name, webhook_name, custom_headers:nil) ping_async(resource_group_name, registry_name, webhook_name, custom_headers:custom_headers).value! end
[ "def", "ping_with_http_info", "(", "resource_group_name", ",", "registry_name", ",", "webhook_name", ",", "custom_headers", ":", "nil", ")", "ping_async", "(", "resource_group_name", ",", "registry_name", ",", "webhook_name", ",", "custom_headers", ":custom_headers", ")...
Triggers a ping event to be sent to the webhook. @param resource_group_name [String] The name of the resource group to which the container registry belongs. @param registry_name [String] The name of the container registry. @param webhook_name [String] The name of the webhook. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Triggers", "a", "ping", "event", "to", "be", "sent", "to", "the", "webhook", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb#L398-L400
train
Gets the list of all the webhook s artifacts in a resource group.
[ 30522, 13366, 17852, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 4773, 6806, 6559, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 17852, 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...
rails/sprockets
lib/sprockets/processing.rb
Sprockets.Processing.register_pipeline
def register_pipeline(name, proc = nil, &block) proc ||= block self.config = hash_reassoc(config, :pipeline_exts) do |pipeline_exts| pipeline_exts.merge(".#{name}".freeze => name.to_sym) end self.config = hash_reassoc(config, :pipelines) do |pipelines| pipelines.merge(name.to_sym => proc) end end
ruby
def register_pipeline(name, proc = nil, &block) proc ||= block self.config = hash_reassoc(config, :pipeline_exts) do |pipeline_exts| pipeline_exts.merge(".#{name}".freeze => name.to_sym) end self.config = hash_reassoc(config, :pipelines) do |pipelines| pipelines.merge(name.to_sym => proc) end end
[ "def", "register_pipeline", "(", "name", ",", "proc", "=", "nil", ",", "&", "block", ")", "proc", "||=", "block", "self", ".", "config", "=", "hash_reassoc", "(", "config", ",", ":pipeline_exts", ")", "do", "|", "pipeline_exts", "|", "pipeline_exts", ".", ...
Registers a pipeline that will be called by `call_processor` method.
[ "Registers", "a", "pipeline", "that", "will", "be", "called", "by", "call_processor", "method", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/processing.rb#L19-L29
train
Register a pipeline with the given name.
[ 30522, 13366, 4236, 1035, 13117, 1006, 2171, 1010, 4013, 2278, 1027, 9152, 2140, 1010, 1004, 3796, 1007, 4013, 2278, 1064, 1064, 1027, 3796, 2969, 1012, 9530, 8873, 2290, 1027, 23325, 1035, 2128, 12054, 10085, 1006, 9530, 8873, 2290, 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...
palkan/logidze
lib/logidze/model.rb
Logidze.Model.at!
def at!(ts = nil, time: nil, version: nil) Deprecations.show_ts_deprecation_for("#at!") if ts return at_version!(version) if version time ||= ts time = parse_time(time) return self if log_data.current_ts?(time) return false unless log_data.exists_ts?(time) version = log_data.find_by_time(time).version apply_diff(version, log_data.changes_to(version: version)) end
ruby
def at!(ts = nil, time: nil, version: nil) Deprecations.show_ts_deprecation_for("#at!") if ts return at_version!(version) if version time ||= ts time = parse_time(time) return self if log_data.current_ts?(time) return false unless log_data.exists_ts?(time) version = log_data.find_by_time(time).version apply_diff(version, log_data.changes_to(version: version)) end
[ "def", "at!", "(", "ts", "=", "nil", ",", "time", ":", "nil", ",", "version", ":", "nil", ")", "Deprecations", ".", "show_ts_deprecation_for", "(", "\"#at!\"", ")", "if", "ts", "return", "at_version!", "(", "version", ")", "if", "version", "time", "||=",...
rubocop: enable Metrics/MethodLength Revert record to the version at specified time (without saving to DB)
[ "rubocop", ":", "enable", "Metrics", "/", "MethodLength", "Revert", "record", "to", "the", "version", "at", "specified", "time", "(", "without", "saving", "to", "DB", ")" ]
ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8
https://github.com/palkan/logidze/blob/ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8/lib/logidze/model.rb#L94-L108
train
Returns the log at the given time or the current version.
[ 30522, 13366, 2012, 999, 1006, 24529, 1027, 9152, 2140, 1010, 2051, 1024, 9152, 2140, 1010, 2544, 1024, 9152, 2140, 1007, 2139, 28139, 10719, 2015, 1012, 2265, 1035, 24529, 1035, 2139, 28139, 10719, 1035, 2005, 1006, 1000, 1001, 2012, 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...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_image_store_content
def get_image_store_content(content_path, timeout:60, custom_headers:nil) response = get_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_image_store_content(content_path, timeout:60, custom_headers:nil) response = get_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_image_store_content", "(", "content_path", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_image_store_content_async", "(", "content_path", ",", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers", ...
Gets the image store content information. Returns the information about the image store content at the specified contentPath relative to the root of the image store. @param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ImageStoreContent] operation results.
[ "Gets", "the", "image", "store", "content", "information", "." ]
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#L19300-L19303
train
Gets the content of an image store.
[ 30522, 13366, 2131, 1035, 3746, 1035, 3573, 1035, 4180, 1006, 4180, 1035, 4130, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 3746, 1035, 3573, 1035, 4180, 1035, 2004, 6038, 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.recover_service_partitions
def recover_service_partitions(service_id, timeout:60, custom_headers:nil) response = recover_service_partitions_async(service_id, timeout:timeout, custom_headers:custom_headers).value! nil end
ruby
def recover_service_partitions(service_id, timeout:60, custom_headers:nil) response = recover_service_partitions_async(service_id, timeout:timeout, custom_headers:custom_headers).value! nil end
[ "def", "recover_service_partitions", "(", "service_id", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "recover_service_partitions_async", "(", "service_id", ",", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers",...
Indicates to the Service Fabric cluster that it should attempt to recover the specified service which is currently stuck in quorum loss. Indicates to the Service Fabric cluster that it should attempt to recover the specified service which is currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Indicates", "to", "the", "Service", "Fabric", "cluster", "that", "it", "should", "attempt", "to", "recover", "the", "specified", "service", "which", "is", "currently", "stuck", "in", "quorum", "loss", "." ]
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#L13302-L13305
train
Recover all partitions of a service.
[ 30522, 13366, 8980, 1035, 2326, 1035, 13571, 2015, 1006, 2326, 30524, 1035, 20346, 2015, 1024, 7661, 1035, 20346, 2015, 1007, 1012, 3643, 999, 9152, 2140, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/cache.rb
Sprockets.Cache.peek_key
def peek_key(key) case key when Integer key.to_s when String key[0, PEEK_SIZE].inspect when Array str = [] key.each { |k| str << peek_key(k) } str.join(':')[0, PEEK_SIZE] else peek_key(DigestUtils.pack_urlsafe_base64digest(DigestUtils.digest(key))) end end
ruby
def peek_key(key) case key when Integer key.to_s when String key[0, PEEK_SIZE].inspect when Array str = [] key.each { |k| str << peek_key(k) } str.join(':')[0, PEEK_SIZE] else peek_key(DigestUtils.pack_urlsafe_base64digest(DigestUtils.digest(key))) end end
[ "def", "peek_key", "(", "key", ")", "case", "key", "when", "Integer", "key", ".", "to_s", "when", "String", "key", "[", "0", ",", "PEEK_SIZE", "]", ".", "inspect", "when", "Array", "str", "=", "[", "]", "key", ".", "each", "{", "|", "k", "|", "st...
Internal: Show first 100 characters of cache key for logging purposes. Returns a String with a length less than 100 characters.
[ "Internal", ":", "Show", "first", "100", "characters", "of", "cache", "key", "for", "logging", "purposes", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/cache.rb#L181-L194
train
Get the next key from the cache
[ 30522, 13366, 19043, 1035, 3145, 1006, 3145, 1007, 2553, 3145, 2043, 16109, 3145, 1012, 2000, 1035, 1055, 2043, 5164, 3145, 1031, 1014, 1010, 19043, 1035, 2946, 1033, 1012, 22459, 2043, 9140, 2358, 2099, 1027, 1031, 1033, 3145, 1012, 2169, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/customers_api.rb
SquareConnect.CustomersApi.create_customer_card
def create_customer_card(customer_id, body, opts = {}) data, _status_code, _headers = create_customer_card_with_http_info(customer_id, body, opts) return data end
ruby
def create_customer_card(customer_id, body, opts = {}) data, _status_code, _headers = create_customer_card_with_http_info(customer_id, body, opts) return data end
[ "def", "create_customer_card", "(", "customer_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_customer_card_with_http_info", "(", "customer_id", ",", "body", ",", "opts", ")", "return", "data", "end...
CreateCustomerCard Adds a card on file to an existing customer. As with charges, calls to `CreateCustomerCard` are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call. Cards on file are automatically updated on a monthly basis to confirm they are still valid and can be charged. @param customer_id The ID of the customer to link the card on file to. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [CreateCustomerCardResponse]
[ "CreateCustomerCard", "Adds", "a", "card", "on", "file", "to", "an", "existing", "customer", ".", "As", "with", "charges", "calls", "to", "CreateCustomerCard", "are", "idempotent", ".", "Multiple", "calls", "with", "the", "same", "card", "nonce", "return", "th...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L81-L84
train
Creates a customer card
[ 30522, 13366, 3443, 1035, 8013, 1035, 4003, 1006, 8013, 1035, 8909, 1010, 2303, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 3443, 1035, 8013, 1035, 4003, 1035, 2007, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fastlane/fastlane
fastlane_core/lib/fastlane_core/project.rb
FastlaneCore.Project.select_scheme
def select_scheme(preferred_to_include: nil) if options[:scheme].to_s.length > 0 # Verify the scheme is available unless schemes.include?(options[:scheme].to_s) UI.error("Couldn't find specified scheme '#{options[:scheme]}'. Please make sure that the scheme is shared, see https://developer.apple.com/library/content/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/ConfigureBots.html#//apple_ref/doc/uid/TP40013292-CH9-SW3") options[:scheme] = nil end end return if options[:scheme].to_s.length > 0 if schemes.count == 1 options[:scheme] = schemes.last elsif schemes.count > 1 preferred = nil if preferred_to_include preferred = schemes.find_all { |a| a.downcase.include?(preferred_to_include.downcase) } end if preferred_to_include && preferred.count == 1 options[:scheme] = preferred.last elsif automated_scheme_selection? && schemes.include?(project_name) UI.important("Using scheme matching project name (#{project_name}).") options[:scheme] = project_name elsif Helper.ci? UI.error("Multiple schemes found but you haven't specified one.") UI.error("Since this is a CI, please pass one using the `scheme` option") show_scheme_shared_information UI.user_error!("Multiple schemes found") else puts("Select Scheme: ") options[:scheme] = choose(*schemes) end else show_scheme_shared_information UI.user_error!("No Schemes found") end end
ruby
def select_scheme(preferred_to_include: nil) if options[:scheme].to_s.length > 0 # Verify the scheme is available unless schemes.include?(options[:scheme].to_s) UI.error("Couldn't find specified scheme '#{options[:scheme]}'. Please make sure that the scheme is shared, see https://developer.apple.com/library/content/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/ConfigureBots.html#//apple_ref/doc/uid/TP40013292-CH9-SW3") options[:scheme] = nil end end return if options[:scheme].to_s.length > 0 if schemes.count == 1 options[:scheme] = schemes.last elsif schemes.count > 1 preferred = nil if preferred_to_include preferred = schemes.find_all { |a| a.downcase.include?(preferred_to_include.downcase) } end if preferred_to_include && preferred.count == 1 options[:scheme] = preferred.last elsif automated_scheme_selection? && schemes.include?(project_name) UI.important("Using scheme matching project name (#{project_name}).") options[:scheme] = project_name elsif Helper.ci? UI.error("Multiple schemes found but you haven't specified one.") UI.error("Since this is a CI, please pass one using the `scheme` option") show_scheme_shared_information UI.user_error!("Multiple schemes found") else puts("Select Scheme: ") options[:scheme] = choose(*schemes) end else show_scheme_shared_information UI.user_error!("No Schemes found") end end
[ "def", "select_scheme", "(", "preferred_to_include", ":", "nil", ")", "if", "options", "[", ":scheme", "]", ".", "to_s", ".", "length", ">", "0", "# Verify the scheme is available", "unless", "schemes", ".", "include?", "(", "options", "[", ":scheme", "]", "."...
Let the user select a scheme Use a scheme containing the preferred_to_include string when multiple schemes were found
[ "Let", "the", "user", "select", "a", "scheme", "Use", "a", "scheme", "containing", "the", "preferred_to_include", "string", "when", "multiple", "schemes", "were", "found" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/project.rb#L130-L168
train
Select a scheme based on the current scheme.
[ 30522, 13366, 7276, 1035, 5679, 1006, 6871, 1035, 2000, 1035, 2421, 1024, 9152, 2140, 1007, 2065, 7047, 1031, 1024, 5679, 1033, 1012, 2000, 1035, 1055, 1012, 3091, 1028, 1014, 1001, 20410, 1996, 5679, 2003, 2800, 4983, 11683, 1012, 2421, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_pattern_any_entity_model
def delete_pattern_any_entity_model(app_id, version_id, entity_id, custom_headers:nil) response = delete_pattern_any_entity_model_async(app_id, version_id, entity_id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def delete_pattern_any_entity_model(app_id, version_id, entity_id, custom_headers:nil) response = delete_pattern_any_entity_model_async(app_id, version_id, entity_id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "delete_pattern_any_entity_model", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_pattern_any_entity_model_async", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "custom_headers", "...
Deletes a Pattern.Any entity extractor from a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param entity_id The Pattern.Any entity extractor ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [OperationStatus] operation results.
[ "Deletes", "a", "Pattern", ".", "Any", "entity", "extractor", "from", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L8685-L8688
train
Deletes an entity model in a version of the application.
[ 30522, 13366, 3972, 12870, 1035, 5418, 1035, 2151, 1035, 9178, 1035, 2944, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 5418, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_acl.rb
Aws::EC2.NetworkAcl.replace_entry
def replace_entry(options = {}) options = options.merge(network_acl_id: @id) resp = @client.replace_network_acl_entry(options) resp.data end
ruby
def replace_entry(options = {}) options = options.merge(network_acl_id: @id) resp = @client.replace_network_acl_entry(options) resp.data end
[ "def", "replace_entry", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "network_acl_id", ":", "@id", ")", "resp", "=", "@client", ".", "replace_network_acl_entry", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values network_acl.replace_entry({ cidr_block: "String", dry_run: false, egress: false, # required icmp_type_code: { code: 1, type: 1, }, ipv_6_cidr_block: "String", port_range: { from: 1, to: 1, }, protocol: "String", # required rule_action: "allow", # required, accepts allow, deny rule_number: 1, # required }) @param [Hash] options ({}) @option options [String] :cidr_block The IPv4 network range to allow or deny, in CIDR notation (for example `172.16.0.0/24`). @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @option options [required, Boolean] :egress Indicates whether to replace the egress rule. Default: If no value is specified, we replace the ingress rule. @option options [Types::IcmpTypeCode] :icmp_type_code ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. @option options [String] :ipv_6_cidr_block The IPv6 network range to allow or deny, in CIDR notation (for example `2001:bd8:1234:1a00::/64`). @option options [Types::PortRange] :port_range TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP). @option options [required, String] :protocol The protocol number. A value of "-1" means all protocols. If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code. @option options [required, String] :rule_action Indicates whether to allow or deny the traffic that matches the rule. @option options [required, Integer] :rule_number The rule number of the entry to replace. @return [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_acl.rb#L424-L428
train
Replace an existing entry in the network acl
[ 30522, 13366, 5672, 1035, 4443, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 2897, 1035, 9353, 2140, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 5672, 1035, 2897, 1035, 9353, 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...
rmosolgo/graphql-ruby
lib/graphql/analysis/analyze_query.rb
GraphQL.Analysis.reduce_node
def reduce_node(irep_node, reducer_states) visit_analyzers(:enter, irep_node, reducer_states) irep_node.typed_children.each do |type_defn, children| children.each do |name, child_irep_node| reduce_node(child_irep_node, reducer_states) end end visit_analyzers(:leave, irep_node, reducer_states) end
ruby
def reduce_node(irep_node, reducer_states) visit_analyzers(:enter, irep_node, reducer_states) irep_node.typed_children.each do |type_defn, children| children.each do |name, child_irep_node| reduce_node(child_irep_node, reducer_states) end end visit_analyzers(:leave, irep_node, reducer_states) end
[ "def", "reduce_node", "(", "irep_node", ",", "reducer_states", ")", "visit_analyzers", "(", ":enter", ",", "irep_node", ",", "reducer_states", ")", "irep_node", ".", "typed_children", ".", "each", "do", "|", "type_defn", ",", "children", "|", "children", ".", ...
Enter the node, visit its children, then leave the node.
[ "Enter", "the", "node", "visit", "its", "children", "then", "leave", "the", "node", "." ]
d5be13a816f220b9efbabeaa69a3e56fedf311f5
https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/analysis/analyze_query.rb#L67-L77
train
Reduce the node with the children of the given irep node.
[ 30522, 13366, 5547, 1035, 13045, 1006, 20868, 13699, 1035, 13045, 1010, 5547, 2099, 1035, 2163, 1007, 3942, 1035, 17908, 2869, 1006, 1024, 4607, 1010, 20868, 13699, 1035, 13045, 1010, 5547, 2099, 1035, 2163, 1007, 20868, 13699, 1035, 13045, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.set_working_days
def set_working_days(working_days) @working_days = (working_days || default_working_days).map do |day| day.downcase.strip[0..2].tap do |normalised_day| raise "Invalid day #{day}" unless DAY_NAMES.include?(normalised_day) end end extra_working_dates_names = @extra_working_dates.map { |d| d.strftime("%a").downcase } return if (extra_working_dates_names & @working_days).none? raise ArgumentError, 'Extra working dates cannot be on working days' end
ruby
def set_working_days(working_days) @working_days = (working_days || default_working_days).map do |day| day.downcase.strip[0..2].tap do |normalised_day| raise "Invalid day #{day}" unless DAY_NAMES.include?(normalised_day) end end extra_working_dates_names = @extra_working_dates.map { |d| d.strftime("%a").downcase } return if (extra_working_dates_names & @working_days).none? raise ArgumentError, 'Extra working dates cannot be on working days' end
[ "def", "set_working_days", "(", "working_days", ")", "@working_days", "=", "(", "working_days", "||", "default_working_days", ")", ".", "map", "do", "|", "day", "|", "day", ".", "downcase", ".", "strip", "[", "0", "..", "2", "]", ".", "tap", "do", "|", ...
Internal method for assigning working days from a calendar config.
[ "Internal", "method", "for", "assigning", "working", "days", "from", "a", "calendar", "config", "." ]
62a2a09008095403bafa78033a8be1afe6debbf6
https://github.com/gocardless/business/blob/62a2a09008095403bafa78033a8be1afe6debbf6/lib/business/calendar.rb#L167-L176
train
Set the working days for this calendar
[ 30522, 13366, 2275, 1035, 2551, 1035, 2420, 1006, 2551, 1035, 2420, 1007, 1030, 2551, 1035, 2420, 1027, 1006, 2551, 1035, 2420, 1064, 1064, 12398, 1035, 2551, 1035, 2420, 1007, 1012, 4949, 2079, 1064, 2154, 1064, 2154, 1012, 2091, 18382, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb
Aws::EC2.Resource.classic_addresses
def classic_addresses(options = {}) batches = Enumerator.new do |y| batch = [] options = Aws::Util.deep_merge(options, filters: [{ name: "domain", values: ["standard"] }]) resp = @client.describe_addresses(options) resp.data.addresses.each do |a| batch << ClassicAddress.new( public_ip: a.public_ip, data: a, client: @client ) end y.yield(batch) end ClassicAddress::Collection.new(batches) end
ruby
def classic_addresses(options = {}) batches = Enumerator.new do |y| batch = [] options = Aws::Util.deep_merge(options, filters: [{ name: "domain", values: ["standard"] }]) resp = @client.describe_addresses(options) resp.data.addresses.each do |a| batch << ClassicAddress.new( public_ip: a.public_ip, data: a, client: @client ) end y.yield(batch) end ClassicAddress::Collection.new(batches) end
[ "def", "classic_addresses", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "batch", "=", "[", "]", "options", "=", "Aws", "::", "Util", ".", "deep_merge", "(", "options", ",", "filters", ":", "[", ...
@!group Associations @example Request syntax with placeholder values classic_addresses = ec2.classic_addresses({ filters: [ { name: "String", values: ["String"], }, ], public_ips: ["String"], allocation_ids: ["String"], dry_run: false, }) @param [Hash] options ({}) @option options [Array<Types::Filter>] :filters One or more filters. Filter names and values are case-sensitive. * `allocation-id` - \[EC2-VPC\] The allocation ID for the address. * `association-id` - \[EC2-VPC\] The association ID for the address. * `domain` - Indicates whether the address is for use in EC2-Classic (`standard`) or in a VPC (`vpc`). * `instance-id` - The ID of the instance the address is associated with, if any. * `network-interface-id` - \[EC2-VPC\] The ID of the network interface that the address is associated with, if any. * `network-interface-owner-id` - The AWS account ID of the owner. * `private-ip-address` - \[EC2-VPC\] The private IP address associated with the Elastic IP address. * `public-ip` - The Elastic IP address. * `tag`\:&lt;key&gt; - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key `Owner` and the value `TeamA`, specify `tag:Owner` for the filter name and `TeamA` for the filter value. * `tag-key` - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. @option options [Array<String>] :public_ips One or more Elastic IP addresses. Default: Describes all your Elastic IP addresses. @option options [Array<String>] :allocation_ids \[EC2-VPC\] Information about the allocation IDs. @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @return [ClassicAddress::Collection]
[ "@!group", "Associations", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L1254-L1272
train
Returns a collection of all the classic addresses
[ 30522, 13366, 4438, 1035, 11596, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 2229, 1027, 4372, 17897, 16259, 1012, 2047, 2079, 1064, 1061, 1064, 14108, 1027, 1031, 1033, 7047, 1027, 22091, 2015, 1024, 1024, 21183, 4014, 1012, 2784, 1035, 135...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb
Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.list_jobs_next
def list_jobs_next(next_page_link, custom_headers:nil) response = list_jobs_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_jobs_next(next_page_link, custom_headers:nil) response = list_jobs_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_jobs_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_jobs_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", ".", ...
Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. @param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [JobResponseListResult] operation results.
[ "Get", "a", "list", "of", "all", "the", "jobs", "in", "an", "IoT", "hub", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/", "iot", "-", "hub", "/", "iot", "-", "hub", "-", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L2607-L2610
train
Gets the list of jobs for a subscription.
[ 30522, 13366, 2862, 1035, 5841, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 5841, 1035, 2279, 1035, 2004, 6038, 2278, 1006, 2279, 1035, 3931, 1035, 4957, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb
Azure::OperationalInsights::Mgmt::V2015_03_20.Workspaces.update_search_results
def update_search_results(resource_group_name, workspace_name, id, custom_headers:nil) response = update_search_results_async(resource_group_name, workspace_name, id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update_search_results(resource_group_name, workspace_name, id, custom_headers:nil) response = update_search_results_async(resource_group_name, workspace_name, id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update_search_results", "(", "resource_group_name", ",", "workspace_name", ",", "id", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_search_results_async", "(", "resource_group_name", ",", "workspace_name", ",", "id", ",", "custom_headers", "...
Gets updated search results for a given search query. @param resource_group_name [String] The name of the resource group to get. The name is case insensitive. @param workspace_name [String] Log Analytics workspace name @param id [String] The id of the search that will have results updated. You can get the id from the response of the GetResults call. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [SearchResultsResponse] operation results.
[ "Gets", "updated", "search", "results", "for", "a", "given", "search", "query", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb#L291-L294
train
Updates the search results of a given workspace.
[ 30522, 13366, 10651, 1035, 3945, 1035, 3463, 30524, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, 3945, 1035, 3463, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2573, 15327, 1035, 2171, 1010, 8909, 1010, 7661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.paging
def paging page = 0 results = [] loop do page += 1 current = yield(page) results += current break if (current || []).count < page_size # no more results end return results end
ruby
def paging page = 0 results = [] loop do page += 1 current = yield(page) results += current break if (current || []).count < page_size # no more results end return results end
[ "def", "paging", "page", "=", "0", "results", "=", "[", "]", "loop", "do", "page", "+=", "1", "current", "=", "yield", "(", "page", ")", "results", "+=", "current", "break", "if", "(", "current", "||", "[", "]", ")", ".", "count", "<", "page_size",...
Handles the paging for you... for free Just pass a block and use the parameter as page number
[ "Handles", "the", "paging", "for", "you", "...", "for", "free", "Just", "pass", "a", "block", "and", "use", "the", "parameter", "as", "page", "number" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L312-L325
train
Yields the results of the block
[ 30522, 13366, 6643, 4726, 3931, 1027, 1014, 3463, 1027, 1031, 1033, 7077, 2079, 3931, 1009, 1027, 1015, 2783, 1027, 10750, 1006, 3931, 1007, 3463, 1009, 1027, 2783, 3338, 2065, 1006, 2783, 1064, 1064, 1031, 1033, 1007, 1012, 4175, 1026, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
strongself/Generamba
lib/generamba/template/processor/template_processor.rb
Generamba.TemplateProcessor.clear_installed_templates
def clear_installed_templates install_path = Pathname.new(TEMPLATES_FOLDER) FileUtils.rm_rf(Dir.glob(install_path)) end
ruby
def clear_installed_templates install_path = Pathname.new(TEMPLATES_FOLDER) FileUtils.rm_rf(Dir.glob(install_path)) end
[ "def", "clear_installed_templates", "install_path", "=", "Pathname", ".", "new", "(", "TEMPLATES_FOLDER", ")", "FileUtils", ".", "rm_rf", "(", "Dir", ".", "glob", "(", "install_path", ")", ")", "end" ]
Clears all of the currently installed templates
[ "Clears", "all", "of", "the", "currently", "installed", "templates" ]
9ef343805f3a66f58bc36e120e822d5436a4da97
https://github.com/strongself/Generamba/blob/9ef343805f3a66f58bc36e120e822d5436a4da97/lib/generamba/template/processor/template_processor.rb#L49-L52
train
Clear the installed templates and the generated template.
[ 30522, 13366, 3154, 1035, 5361, 1035, 23561, 2015, 16500, 1035, 4130, 1027, 4130, 30524, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hashicorp/vault-ruby
lib/vault/api/logical.rb
Vault.Logical.list
def list(path, options = {}) headers = extract_headers!(options) json = client.list("/v1/#{encode_path(path)}", {}, headers) json[:data][:keys] || [] rescue HTTPError => e return [] if e.code == 404 raise end
ruby
def list(path, options = {}) headers = extract_headers!(options) json = client.list("/v1/#{encode_path(path)}", {}, headers) json[:data][:keys] || [] rescue HTTPError => e return [] if e.code == 404 raise end
[ "def", "list", "(", "path", ",", "options", "=", "{", "}", ")", "headers", "=", "extract_headers!", "(", "options", ")", "json", "=", "client", ".", "list", "(", "\"/v1/#{encode_path(path)}\"", ",", "{", "}", ",", "headers", ")", "json", "[", ":data", ...
List the secrets at the given path, if the path supports listing. If the the path does not exist, an exception will be raised. @example Vault.logical.list("secret") #=> [#<Vault::Secret>, #<Vault::Secret>, ...] @param [String] path the path to list @return [Array<String>]
[ "List", "the", "secrets", "at", "the", "given", "path", "if", "the", "path", "supports", "listing", ".", "If", "the", "the", "path", "does", "not", "exist", "an", "exception", "will", "be", "raised", "." ]
02f0532a802ba1a2a0d8703a4585dab76eb9d864
https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/logical.rb#L26-L33
train
List the keys of a given path.
[ 30522, 13366, 2862, 1006, 4130, 1010, 7047, 1027, 1063, 1065, 1007, 20346, 2015, 1027, 14817, 1035, 20346, 2015, 999, 1006, 7047, 1007, 1046, 3385, 1027, 7396, 1012, 2862, 1006, 1000, 1013, 1058, 2487, 1013, 1001, 1063, 4372, 16044, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster.rb
Aws::RDS.DBCluster.failover
def failover(options = {}) options = options.merge(db_cluster_identifier: @id) resp = @client.failover_db_cluster(options) DBCluster.new( id: resp.data.db_cluster.db_cluster_identifier, data: resp.data.db_cluster, client: @client ) end
ruby
def failover(options = {}) options = options.merge(db_cluster_identifier: @id) resp = @client.failover_db_cluster(options) DBCluster.new( id: resp.data.db_cluster.db_cluster_identifier, data: resp.data.db_cluster, client: @client ) end
[ "def", "failover", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "db_cluster_identifier", ":", "@id", ")", "resp", "=", "@client", ".", "failover_db_cluster", "(", "options", ")", "DBCluster", ".", "new", "(", "id", ":...
@example Request syntax with placeholder values dbcluster = db_cluster.failover({ target_db_instance_identifier: "String", }) @param [Hash] options ({}) @option options [String] :target_db_instance_identifier The name of the instance to promote to the primary instance. You must specify the instance identifier for an Aurora Replica in the DB cluster. For example, `mydbcluster-replica1`. @return [DBCluster]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster.rb#L932-L940
train
failover the database cluster
[ 30522, 13366, 8246, 7840, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 16962, 1035, 9324, 1035, 8909, 4765, 18095, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 8246, 7840, 1035, 16962, 1035, 9324,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongo-ruby-driver
lib/mongo/session.rb
Mongo.Session.suppress_read_write_concern!
def suppress_read_write_concern!(command) command.tap do |c| next unless in_transaction? c.delete(:readConcern) unless starting_transaction? c.delete(:writeConcern) unless c[:commitTransaction] || c[:abortTransaction] end end
ruby
def suppress_read_write_concern!(command) command.tap do |c| next unless in_transaction? c.delete(:readConcern) unless starting_transaction? c.delete(:writeConcern) unless c[:commitTransaction] || c[:abortTransaction] end end
[ "def", "suppress_read_write_concern!", "(", "command", ")", "command", ".", "tap", "do", "|", "c", "|", "next", "unless", "in_transaction?", "c", ".", "delete", "(", ":readConcern", ")", "unless", "starting_transaction?", "c", ".", "delete", "(", ":writeConcern"...
Remove the read concern and/or write concern from the command if not applicable. @example session.suppress_read_write_concern!(cmd) @return [ Hash, BSON::Document ] The command document. @since 2.6.0 @api private
[ "Remove", "the", "read", "concern", "and", "/", "or", "write", "concern", "from", "the", "command", "if", "not", "applicable", "." ]
dca26d0870cb3386fad9ccc1d17228097c1fe1c8
https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/session.rb#L332-L339
train
Disallow read and write concern from the command.
[ 30522, 13366, 16081, 1035, 3191, 1035, 4339, 1035, 5142, 999, 1006, 3094, 1007, 3094, 1012, 11112, 2079, 1064, 1039, 1064, 2279, 4983, 1999, 1035, 12598, 1029, 1039, 1012, 3972, 12870, 1006, 1024, 3191, 8663, 17119, 2078, 1007, 4983, 3225, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
devise-security/devise-security
lib/devise-security/routes.rb
ActionDispatch::Routing.Mapper.devise_password_expired
def devise_password_expired(mapping, controllers) resource :password_expired, only: [:show, :update], path: mapping.path_names[:password_expired], controller: controllers[:password_expired] end
ruby
def devise_password_expired(mapping, controllers) resource :password_expired, only: [:show, :update], path: mapping.path_names[:password_expired], controller: controllers[:password_expired] end
[ "def", "devise_password_expired", "(", "mapping", ",", "controllers", ")", "resource", ":password_expired", ",", "only", ":", "[", ":show", ",", ":update", "]", ",", "path", ":", "mapping", ".", "path_names", "[", ":password_expired", "]", ",", "controller", "...
route for handle expired passwords
[ "route", "for", "handle", "expired", "passwords" ]
d0b44a7bb249f6763641f45d34dd52e7fda3fca2
https://github.com/devise-security/devise-security/blob/d0b44a7bb249f6763641f45d34dd52e7fda3fca2/lib/devise-security/routes.rb#L9-L11
train
This method is used to devise the password_expired resource
[ 30522, 13366, 14386, 3366, 1035, 20786, 1035, 13735, 1006, 12375, 1010, 21257, 1007, 7692, 1024, 20786, 1035, 13735, 1010, 2069, 1024, 1031, 1024, 2265, 1010, 1024, 10651, 1033, 1010, 4130, 1024, 12375, 1012, 4130, 1035, 3415, 1031, 1024, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb
Azure::SQL::Mgmt::V2014_04_01.ServerAzureADAdministrators.create_or_update_async
def create_or_update_async(resource_group_name, server_name, properties, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::ServerAzureADAdministrator.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def create_or_update_async(resource_group_name, server_name, properties, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::ServerAzureADAdministrator.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "create_or_update_async", "(", "resource_group_name", ",", "server_name", ",", "properties", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_create_or_update_async", "(", "resource_group_name", ",", "server_name", ",", "properties",...
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server. @param properties [ServerAzureADAdministrator] The required parameters for creating or updating an Active Directory Administrator. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", "that", "contains", "the", "resource", ".", "You", "can", "obtain", "this", "value", "from", "the", "Azure", "Resource", "Manager", "API", "or", "the", "por...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb#L60-L76
train
Creates or updates a server in the specified subscription.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 5144, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
square/connect-ruby-sdk
lib/square_connect/api/catalog_api.rb
SquareConnect.CatalogApi.search_catalog_objects
def search_catalog_objects(body, opts = {}) data, _status_code, _headers = search_catalog_objects_with_http_info(body, opts) return data end
ruby
def search_catalog_objects(body, opts = {}) data, _status_code, _headers = search_catalog_objects_with_http_info(body, opts) return data end
[ "def", "search_catalog_objects", "(", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "search_catalog_objects_with_http_info", "(", "body", ",", "opts", ")", "return", "data", "end" ]
SearchCatalogObjects Queries the targeted catalog using a variety of query types: [CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), [CatalogQueryExact](#type-catalogqueryexact), [CatalogQueryRange](#type-catalogqueryrange), [CatalogQueryText](#type-catalogquerytext), [CatalogQueryItemsForTax](#type-catalogqueryitemsfortax), and [CatalogQueryItemsForModifierList](#type-catalogqueryitemsformodifierlist). @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [SearchCatalogObjectsResponse]
[ "SearchCatalogObjects", "Queries", "the", "targeted", "catalog", "using", "a", "variety", "of", "query", "types", ":", "[", "CatalogQuerySortedAttribute", "]", "(", "#type", "-", "catalogquerysortedattribute", ")", "[", "CatalogQueryExact", "]", "(", "#type", "-", ...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/catalog_api.rb#L411-L414
train
SearchCatalogObjects Returns an array of objects that are in the catalog.
[ 30522, 13366, 3945, 1035, 12105, 1035, 5200, 1006, 2303, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 3945, 1035, 12105, 1035, 5200, 1035, 2007, 1035, 8299, 1035, 18558, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
cloudfoundry/bosh
src/bosh-director/lib/bosh/director/compiled_package_requirement.rb
Bosh::Director.CompiledPackageRequirement.dependency_spec
def dependency_spec spec = {} @dependencies.each do |dependency| unless dependency.compiled? raise DirectorError, 'Cannot generate package dependency spec ' \ "for '#{@package.name}', " \ "'#{dependency.package.name}' hasn't been compiled yet" end compiled_package = dependency.compiled_package spec[compiled_package.name] = { 'name' => compiled_package.name, 'version' => "#{compiled_package.version}.#{compiled_package.build}", 'sha1' => compiled_package.sha1, 'blobstore_id' => compiled_package.blobstore_id, } end spec end
ruby
def dependency_spec spec = {} @dependencies.each do |dependency| unless dependency.compiled? raise DirectorError, 'Cannot generate package dependency spec ' \ "for '#{@package.name}', " \ "'#{dependency.package.name}' hasn't been compiled yet" end compiled_package = dependency.compiled_package spec[compiled_package.name] = { 'name' => compiled_package.name, 'version' => "#{compiled_package.version}.#{compiled_package.build}", 'sha1' => compiled_package.sha1, 'blobstore_id' => compiled_package.blobstore_id, } end spec end
[ "def", "dependency_spec", "spec", "=", "{", "}", "@dependencies", ".", "each", "do", "|", "dependency", "|", "unless", "dependency", ".", "compiled?", "raise", "DirectorError", ",", "'Cannot generate package dependency spec '", "\"for '#{@package.name}', \"", "\"'#{depend...
This call only makes sense if all dependencies have already been compiled, otherwise it raises an exception @return [Hash] Hash representation of all package dependencies. Agent uses that to download package dependencies before compiling the package on a compilation VM.
[ "This", "call", "only", "makes", "sense", "if", "all", "dependencies", "have", "already", "been", "compiled", "otherwise", "it", "raises", "an", "exception" ]
2eaa7100879ddd20cd909cd698514746195e28b7
https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/compiled_package_requirement.rb#L107-L129
train
Generate the dependency spec for this package
[ 30522, 13366, 24394, 1035, 28699, 28699, 1027, 1063, 1065, 1030, 12530, 15266, 1012, 2169, 2079, 1064, 24394, 1064, 4983, 24394, 1012, 9227, 1029, 5333, 2472, 2121, 29165, 1010, 1005, 3685, 9699, 7427, 24394, 28699, 1005, 1032, 1000, 2005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb
Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "server_name", ",", "disaster_recovery_configuration_name", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "server_name", ",", "disaster_re...
Creates or updates a disaster recovery configuration. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server. @param disaster_recovery_configuration_name [String] The name of the disaster recovery configuration to be created/updated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Creates", "or", "updates", "a", "disaster", "recovery", "configuration", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L546-L548
train
Creates or updates a disaster recovery configuration.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7071, 1035, 7233, 1035, 9563, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb
Azure::CognitiveServices::ContentModerator::V1_0.ListManagementImage.add_image_with_http_info
def add_image_with_http_info(list_id, tag:nil, label:nil, custom_headers:nil) add_image_async(list_id, tag:tag, label:label, custom_headers:custom_headers).value! end
ruby
def add_image_with_http_info(list_id, tag:nil, label:nil, custom_headers:nil) add_image_async(list_id, tag:tag, label:label, custom_headers:custom_headers).value! end
[ "def", "add_image_with_http_info", "(", "list_id", ",", "tag", ":", "nil", ",", "label", ":", "nil", ",", "custom_headers", ":", "nil", ")", "add_image_async", "(", "list_id", ",", "tag", ":", "tag", ",", "label", ":", "label", ",", "custom_headers", ":cus...
Add an image to the list with list Id equal to list Id passed. @param list_id [String] List Id of the image list. @param tag [Integer] Tag for the image. @param label [String] The image label. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Add", "an", "image", "to", "the", "list", "with", "list", "Id", "equal", "to", "list", "Id", "passed", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb#L61-L63
train
Adds an image to a list.
[ 30522, 13366, 5587, 1035, 3746, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2862, 1035, 8909, 1010, 6415, 1024, 9152, 2140, 1010, 3830, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 5587, 1035, 3746, 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...
castwide/solargraph
lib/solargraph/source.rb
Solargraph.Source.associated_comments
def associated_comments @associated_comments ||= begin result = {} Parser::Source::Comment.associate_locations(node, comments).each_pair do |loc, all| block = all #.select{ |l| l.document? || code.lines[l.loc.line].strip.start_with?('#')} next if block.empty? result[loc.line] ||= [] result[loc.line].concat block end result end end
ruby
def associated_comments @associated_comments ||= begin result = {} Parser::Source::Comment.associate_locations(node, comments).each_pair do |loc, all| block = all #.select{ |l| l.document? || code.lines[l.loc.line].strip.start_with?('#')} next if block.empty? result[loc.line] ||= [] result[loc.line].concat block end result end end
[ "def", "associated_comments", "@associated_comments", "||=", "begin", "result", "=", "{", "}", "Parser", "::", "Source", "::", "Comment", ".", "associate_locations", "(", "node", ",", "comments", ")", ".", "each_pair", "do", "|", "loc", ",", "all", "|", "blo...
Get a hash of comments grouped by the line numbers of the associated code. @return [Hash{Integer => Array<Parser::Source::Comment>}]
[ "Get", "a", "hash", "of", "comments", "grouped", "by", "the", "line", "numbers", "of", "the", "associated", "code", "." ]
47badb5d151aca775ccbe6c470236089eae7839d
https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/source.rb#L289-L300
train
Returns the array of the associated comments for this node.
[ 30522, 13366, 3378, 1035, 7928, 1030, 3378, 1035, 7928, 1064, 1064, 1027, 4088, 2765, 1027, 1063, 1065, 11968, 8043, 1024, 1024, 3120, 1024, 1024, 7615, 1012, 5482, 1035, 5269, 1006, 13045, 1010, 7928, 1007, 1012, 2169, 1035, 3940, 2079, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
commander-rb/commander
lib/commander/user_interaction.rb
Commander.UI.ask_editor
def ask_editor(input = nil, preferred_editor = nil) editor = available_editor preferred_editor program = Commander::Runner.instance.program(:name).downcase rescue 'commander' tmpfile = Tempfile.new program begin tmpfile.write input if input tmpfile.close system("#{editor} #{tmpfile.path.shellescape}") ? IO.read(tmpfile.path) : nil ensure tmpfile.unlink end end
ruby
def ask_editor(input = nil, preferred_editor = nil) editor = available_editor preferred_editor program = Commander::Runner.instance.program(:name).downcase rescue 'commander' tmpfile = Tempfile.new program begin tmpfile.write input if input tmpfile.close system("#{editor} #{tmpfile.path.shellescape}") ? IO.read(tmpfile.path) : nil ensure tmpfile.unlink end end
[ "def", "ask_editor", "(", "input", "=", "nil", ",", "preferred_editor", "=", "nil", ")", "editor", "=", "available_editor", "preferred_editor", "program", "=", "Commander", "::", "Runner", ".", "instance", ".", "program", "(", ":name", ")", ".", "downcase", ...
Prompt an editor for input. Optionally supply initial _input_ which is written to the editor. _preferred_editor_ can be hinted. === Examples ask_editor # => prompts EDITOR with no input ask_editor('foo') # => prompts EDITOR with default text of 'foo' ask_editor('foo', 'mate -w') # => prompts TextMate with default text of 'foo'
[ "Prompt", "an", "editor", "for", "input", ".", "Optionally", "supply", "initial", "_input_", "which", "is", "written", "to", "the", "editor", "." ]
332047c14948225462fe60042eed23adfb996d68
https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/user_interaction.rb#L258-L269
train
Ask the editor to use
[ 30522, 13366, 3198, 1035, 3559, 1006, 7953, 1027, 9152, 2140, 1010, 6871, 1035, 3559, 1027, 9152, 2140, 1007, 3559, 1027, 2800, 1035, 3559, 6871, 1035, 3559, 2565, 1027, 3474, 1024, 1024, 5479, 1012, 6013, 1012, 2565, 1006, 1024, 2171, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/agent_pools.rb
Azure::ContainerService::Mgmt::V2019_02_01.AgentPools.delete
def delete(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil) response = delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil) response = delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "managed_cluster_name", ",", "agent_pool_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "managed_cluster_name", ",", "agent_pool_name", ",", "custom_heade...
Deletes an agent pool. Deletes the agent pool in the specified managed cluster. @param resource_group_name [String] The name of the resource group. @param managed_cluster_name [String] The name of the managed cluster resource. @param agent_pool_name [String] The name of the agent pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "an", "agent", "pool", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/agent_pools.rb#L299-L302
train
Deletes the specified managed cluster agent pool.
[ 30522, 13366, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3266, 1035, 9324, 1035, 2171, 1010, 4005, 1035, 4770, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb
Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_web_apps_as_lazy
def list_web_apps_as_lazy(resource_group_name, name, properties_to_include:nil, custom_headers:nil) response = list_web_apps_async(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_apps_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_web_apps_as_lazy(resource_group_name, name, properties_to_include:nil, custom_headers:nil) response = list_web_apps_async(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_apps_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_web_apps_as_lazy", "(", "resource_group_name", ",", "name", ",", "properties_to_include", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_web_apps_async", "(", "resource_group_name", ",", "name", ",", "properties_to_include", ":...
Get all apps in an App Service Environment. Get all apps in an App Service Environment. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param properties_to_include [String] Comma separated list of app properties to include. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [WebAppCollection] which provide lazy access to pages of the response.
[ "Get", "all", "apps", "in", "an", "App", "Service", "Environment", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L7772-L7781
train
Gets a list of all the apps in an App Service Environment.
[ 30522, 13366, 2862, 1035, 4773, 1035, 18726, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 5144, 1035, 2000, 1035, 2421, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/overcommit
lib/overcommit/cli.rb
Overcommit.CLI.print_installed_hooks
def print_installed_hooks config.all_hook_configs.each do |hook_type, hook_configs| print_hooks_for_hook_type(config, hook_configs, hook_type) end halt end
ruby
def print_installed_hooks config.all_hook_configs.each do |hook_type, hook_configs| print_hooks_for_hook_type(config, hook_configs, hook_type) end halt end
[ "def", "print_installed_hooks", "config", ".", "all_hook_configs", ".", "each", "do", "|", "hook_type", ",", "hook_configs", "|", "print_hooks_for_hook_type", "(", "config", ",", "hook_configs", ",", "hook_type", ")", "end", "halt", "end" ]
Prints the hooks available in the current repo and whether they're enabled/disabled.
[ "Prints", "the", "hooks", "available", "in", "the", "current", "repo", "and", "whether", "they", "re", "enabled", "/", "disabled", "." ]
35d60adb41da942178b789560968e3ad030b0ac7
https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/cli.rb#L156-L162
train
Print the installed hooks
[ 30522, 13366, 6140, 1035, 5361, 1035, 18008, 9530, 8873, 2290, 1012, 2035, 1035, 8103, 1035, 9530, 8873, 5620, 1012, 2169, 2079, 1064, 8103, 1035, 2828, 1010, 8103, 1035, 9530, 8873, 5620, 1064, 6140, 1035, 18008, 1035, 2005, 1035, 8103, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb
Azure::Logic::Mgmt::V2016_06_01.Agreements.create_or_update
def create_or_update(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:nil) response = create_or_update_async(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:nil) response = create_or_update_async(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "resource_group_name", ",", "integration_account_name", ",", "agreement_name", ",", "agreement", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_group_name", ",", "integration_account_name", ...
Creates or updates an integration account agreement. @param resource_group_name [String] The resource group name. @param integration_account_name [String] The integration account name. @param agreement_name [String] The integration account agreement name. @param agreement [IntegrationAccountAgreement] The integration account agreement. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [IntegrationAccountAgreement] operation results.
[ "Creates", "or", "updates", "an", "integration", "account", "agreement", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb#L234-L237
train
Creates or updates an integration account agreement.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8346, 1035, 4070, 1035, 2171, 1010, 3820, 1035, 2171, 1010, 3820, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 2030, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb
Azure::Compute::Mgmt::V2018_04_01.VirtualMachineExtensions.get_with_http_info
def get_with_http_info(resource_group_name, vm_name, vm_extension_name, expand:nil, custom_headers:nil) get_async(resource_group_name, vm_name, vm_extension_name, expand:expand, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, vm_name, vm_extension_name, expand:nil, custom_headers:nil) get_async(resource_group_name, vm_name, vm_extension_name, expand:expand, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "vm_name", ",", "vm_extension_name", ",", "expand", ":", "nil", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "vm_name", ",", "vm_extension_name", ",", "expand", ...
The operation to get the extension. @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 vm_extension_name [String] The name of the virtual machine extension. @param expand [String] The expand expression to apply on the operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "The", "operation", "to", "get", "the", "extension", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb#L197-L199
train
Gets the specified virtual machine extension.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 2171, 1010, 1058, 2213, 1035, 5331, 1035, 2171, 1010, 7818, 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
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.upload_large_icon
def upload_large_icon(app_version, upload_image) raise "app_version is required" unless app_version raise "upload_image is required" unless upload_image du_client.upload_large_icon(app_version, upload_image, content_provider_id, sso_token_for_image) end
ruby
def upload_large_icon(app_version, upload_image) raise "app_version is required" unless app_version raise "upload_image is required" unless upload_image du_client.upload_large_icon(app_version, upload_image, content_provider_id, sso_token_for_image) end
[ "def", "upload_large_icon", "(", "app_version", ",", "upload_image", ")", "raise", "\"app_version is required\"", "unless", "app_version", "raise", "\"upload_image is required\"", "unless", "upload_image", "du_client", ".", "upload_large_icon", "(", "app_version", ",", "upl...
@!group App Icons Uploads a large icon @param app_version (AppVersion): The version of your app @param upload_image (UploadFile): The icon to upload @return [JSON] the response
[ "@!group", "App", "Icons" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L776-L781
train
Upload a large icon to the app.
[ 30522, 13366, 2039, 11066, 1035, 2312, 1035, 12696, 1006, 10439, 1035, 2544, 1010, 2039, 11066, 1035, 3746, 1007, 5333, 1000, 10439, 1035, 2544, 2003, 3223, 1000, 4983, 10439, 1035, 2544, 5333, 1000, 2039, 11066, 1035, 3746, 2003, 3223, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activerecord/lib/active_record/attribute_methods.rb
ActiveRecord.AttributeMethods.attribute_present?
def attribute_present?(attribute) value = _read_attribute(attribute) !value.nil? && !(value.respond_to?(:empty?) && value.empty?) end
ruby
def attribute_present?(attribute) value = _read_attribute(attribute) !value.nil? && !(value.respond_to?(:empty?) && value.empty?) end
[ "def", "attribute_present?", "(", "attribute", ")", "value", "=", "_read_attribute", "(", "attribute", ")", "!", "value", ".", "nil?", "&&", "!", "(", "value", ".", "respond_to?", "(", ":empty?", ")", "&&", "value", ".", "empty?", ")", "end" ]
Returns +true+ if the specified +attribute+ has been set by the user or by a database load and is neither +nil+ nor <tt>empty?</tt> (the latter only applies to objects that respond to <tt>empty?</tt>, most notably Strings). Otherwise, +false+. Note that it always returns +true+ with boolean attributes. class Task < ActiveRecord::Base end task = Task.new(title: '', is_done: false) task.attribute_present?(:title) # => false task.attribute_present?(:is_done) # => true task.title = 'Buy milk' task.is_done = true task.attribute_present?(:title) # => true task.attribute_present?(:is_done) # => true
[ "Returns", "+", "true", "+", "if", "the", "specified", "+", "attribute", "+", "has", "been", "set", "by", "the", "user", "or", "by", "a", "database", "load", "and", "is", "neither", "+", "nil", "+", "nor", "<tt", ">", "empty?<", "/", "tt", ">", "("...
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/attribute_methods.rb#L351-L354
train
Returns true if the attribute is present in the current object.
[ 30522, 13366, 17961, 1035, 30524, 1007, 1004, 1004, 3643, 1012, 4064, 1029, 1007, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
commander-rb/commander
lib/commander/runner.rb
Commander.Runner.remove_global_options
def remove_global_options(options, args) # TODO: refactor with flipflop, please TJ ! have time to refactor me ! options.each do |option| switches = option[:switches].dup next if switches.empty? if (switch_has_arg = switches.any? { |s| s =~ /[ =]/ }) switches.map! { |s| s[0, s.index('=') || s.index(' ') || s.length] } end switches = expand_optionally_negative_switches(switches) past_switch, arg_removed = false, false args.delete_if do |arg| if switches.any? { |s| s[0, arg.length] == arg } arg_removed = !switch_has_arg past_switch = true elsif past_switch && !arg_removed && arg !~ /^-/ arg_removed = true else arg_removed = true false end end end end
ruby
def remove_global_options(options, args) # TODO: refactor with flipflop, please TJ ! have time to refactor me ! options.each do |option| switches = option[:switches].dup next if switches.empty? if (switch_has_arg = switches.any? { |s| s =~ /[ =]/ }) switches.map! { |s| s[0, s.index('=') || s.index(' ') || s.length] } end switches = expand_optionally_negative_switches(switches) past_switch, arg_removed = false, false args.delete_if do |arg| if switches.any? { |s| s[0, arg.length] == arg } arg_removed = !switch_has_arg past_switch = true elsif past_switch && !arg_removed && arg !~ /^-/ arg_removed = true else arg_removed = true false end end end end
[ "def", "remove_global_options", "(", "options", ",", "args", ")", "# TODO: refactor with flipflop, please TJ ! have time to refactor me !", "options", ".", "each", "do", "|", "option", "|", "switches", "=", "option", "[", ":switches", "]", ".", "dup", "next", "if", ...
Removes global _options_ from _args_. This prevents an invalid option error from occurring when options are parsed again for the command.
[ "Removes", "global", "_options_", "from", "_args_", ".", "This", "prevents", "an", "invalid", "option", "error", "from", "occurring", "when", "options", "are", "parsed", "again", "for", "the", "command", "." ]
332047c14948225462fe60042eed23adfb996d68
https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/runner.rb#L330-L355
train
Remove global options from the given list of options
[ 30522, 13366, 6366, 1035, 3795, 1035, 7047, 1006, 7047, 1010, 12098, 5620, 1007, 1001, 28681, 2080, 1024, 25416, 18908, 2953, 2007, 11238, 10258, 7361, 1010, 3531, 1056, 3501, 999, 2031, 2051, 2000, 25416, 18908, 2953, 2033, 999, 7047, 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_cluster_snapshot.rb
Aws::RDS.DBClusterSnapshot.restore
def restore(options = {}) options = options.merge(snapshot_identifier: @snapshot_id) resp = @client.restore_db_cluster_from_snapshot(options) DBCluster.new( id: resp.data.db_cluster.db_cluster_identifier, data: resp.data.db_cluster, client: @client ) end
ruby
def restore(options = {}) options = options.merge(snapshot_identifier: @snapshot_id) resp = @client.restore_db_cluster_from_snapshot(options) DBCluster.new( id: resp.data.db_cluster.db_cluster_identifier, data: resp.data.db_cluster, client: @client ) end
[ "def", "restore", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "snapshot_identifier", ":", "@snapshot_id", ")", "resp", "=", "@client", ".", "restore_db_cluster_from_snapshot", "(", "options", ")", "DBCluster", ".", "new", ...
@example Request syntax with placeholder values dbcluster = db_cluster_snapshot.restore({ availability_zones: ["String"], db_cluster_identifier: "String", # required engine: "String", # required engine_version: "String", port: 1, db_subnet_group_name: "String", database_name: "String", option_group_name: "String", vpc_security_group_ids: ["String"], tags: [ { key: "String", value: "String", }, ], kms_key_id: "String", enable_iam_database_authentication: false, backtrack_window: 1, enable_cloudwatch_logs_exports: ["String"], engine_mode: "String", scaling_configuration: { min_capacity: 1, max_capacity: 1, auto_pause: false, seconds_until_auto_pause: 1, timeout_action: "String", }, db_cluster_parameter_group_name: "String", deletion_protection: false, copy_tags_to_snapshot: false, }) @param [Hash] options ({}) @option options [Array<String>] :availability_zones Provides the list of Amazon EC2 Availability Zones that instances in the restored DB cluster can be created in. @option options [required, String] :db_cluster_identifier The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. This parameter isn't case-sensitive. Constraints: * Must contain from 1 to 63 letters, numbers, or hyphens * First character must be a letter * Can't end with a hyphen or contain two consecutive hyphens Example: `my-snapshot-id` @option options [required, String] :engine The database engine to use for the new DB cluster. Default: The same as source Constraint: Must be compatible with the engine of the source @option options [String] :engine_version The version of the database engine to use for the new DB cluster. @option options [Integer] :port The port number on which the new DB cluster accepts connections. Constraints: This value must be `1150-65535` Default: The same port as the original DB cluster. @option options [String] :db_subnet_group_name The name of the DB subnet group to use for the new DB cluster. Constraints: If supplied, must match the name of an existing DB subnet group. Example: `mySubnetgroup` @option options [String] :database_name The database name for the restored DB cluster. @option options [String] :option_group_name The name of the option group to use for the restored DB cluster. @option options [Array<String>] :vpc_security_group_ids A list of VPC security groups that the new DB cluster will belong to. @option options [Array<Types::Tag>] :tags The tags to be assigned to the restored DB cluster. @option options [String] :kms_key_id The AWS KMS key identifier to use when restoring an encrypted DB cluster from a DB snapshot or DB cluster snapshot. The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key. If you don't specify a value for the `KmsKeyId` parameter, then the following occurs: * If the DB snapshot or DB cluster snapshot in `SnapshotIdentifier` is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the DB snapshot or DB cluster snapshot. * If the DB snapshot or DB cluster snapshot in `SnapshotIdentifier` is not encrypted, then the restored DB cluster is not encrypted. @option options [Boolean] :enable_iam_database_authentication True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false. Default: `false` @option options [Integer] :backtrack_window The target backtrack window, in seconds. To disable backtracking, set this value to 0. Default: 0 Constraints: * If specified, this value must be set to a number from 0 to 259,200 (72 hours). ^ @option options [Array<String>] :enable_cloudwatch_logs_exports The list of logs that the restored DB cluster is to export to Amazon CloudWatch Logs. The values in the list depend on the DB engine being used. For more information, see [Publishing Database Logs to Amazon CloudWatch Logs ][1] in the *Amazon Aurora User Guide*. [1]: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch @option options [String] :engine_mode The DB engine mode of the DB cluster, either `provisioned`, `serverless`, or `parallelquery`. @option options [Types::ScalingConfiguration] :scaling_configuration For DB clusters in `serverless` DB engine mode, the scaling properties of the DB cluster. @option options [String] :db_cluster_parameter_group_name The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, the default DB cluster parameter group for the specified engine is used. Constraints: * If supplied, must match the name of an existing default DB cluster parameter group. * Must be 1 to 255 letters, numbers, or hyphens. * First character must be a letter. * Can't end with a hyphen or contain two consecutive hyphens. @option options [Boolean] :deletion_protection Indicates if the DB cluster should have deletion protection enabled. The database can't be deleted when this value is set to true. The default is false. @option options [Boolean] :copy_tags_to_snapshot True to copy all tags from the restored DB cluster to snapshots of the restored DB cluster, and otherwise false. The default is false. @return [DBCluster]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster_snapshot.rb#L608-L616
train
Restore the cluster from a snapshot
[ 30522, 13366, 9239, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 20057, 12326, 1035, 8909, 4765, 18095, 1024, 1030, 20057, 12326, 1035, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 9239, 1035, 16962, 1035, 93...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
randym/axlsx
lib/axlsx/workbook/worksheet/rich_text_run.rb
Axlsx.RichTextRun.string_width
def string_width(string, font_size) font_scale = font_size / 10.0 string.count(Worksheet::THIN_CHARS) * font_scale end
ruby
def string_width(string, font_size) font_scale = font_size / 10.0 string.count(Worksheet::THIN_CHARS) * font_scale end
[ "def", "string_width", "(", "string", ",", "font_size", ")", "font_scale", "=", "font_size", "/", "10.0", "string", ".", "count", "(", "Worksheet", "::", "THIN_CHARS", ")", "*", "font_scale", "end" ]
Returns the width of a string according to the current style This is still not perfect... - scaling is not linear as font sizes increase
[ "Returns", "the", "width", "of", "a", "string", "according", "to", "the", "current", "style", "This", "is", "still", "not", "perfect", "...", "-", "scaling", "is", "not", "linear", "as", "font", "sizes", "increase" ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/rich_text_run.rb#L216-L219
train
Returns the width of a string in the given font size
[ 30522, 13366, 5164, 1035, 9381, 1006, 5164, 1010, 15489, 1035, 2946, 1007, 15489, 1035, 4094, 1027, 15489, 1035, 2946, 1013, 2184, 1012, 1014, 5164, 1012, 4175, 1006, 2573, 21030, 2102, 1024, 1024, 4857, 1035, 25869, 2015, 1007, 1008, 15489...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Shopify/liquid
lib/liquid/context.rb
Liquid.Context.find_variable
def find_variable(key, raise_on_not_found: true) # This was changed from find() to find_index() because this is a very hot # path and find_index() is optimized in MRI to reduce object allocation index = @scopes.find_index { |s| s.key?(key) } scope = @scopes[index] if index variable = nil if scope.nil? @environments.each do |e| variable = lookup_and_evaluate(e, key, raise_on_not_found: raise_on_not_found) # When lookup returned a value OR there is no value but the lookup also did not raise # then it is the value we are looking for. if !variable.nil? || @strict_variables && raise_on_not_found scope = e break end end end scope ||= @environments.last || @scopes.last variable ||= lookup_and_evaluate(scope, key, raise_on_not_found: raise_on_not_found) variable = variable.to_liquid variable.context = self if variable.respond_to?(:context=) variable end
ruby
def find_variable(key, raise_on_not_found: true) # This was changed from find() to find_index() because this is a very hot # path and find_index() is optimized in MRI to reduce object allocation index = @scopes.find_index { |s| s.key?(key) } scope = @scopes[index] if index variable = nil if scope.nil? @environments.each do |e| variable = lookup_and_evaluate(e, key, raise_on_not_found: raise_on_not_found) # When lookup returned a value OR there is no value but the lookup also did not raise # then it is the value we are looking for. if !variable.nil? || @strict_variables && raise_on_not_found scope = e break end end end scope ||= @environments.last || @scopes.last variable ||= lookup_and_evaluate(scope, key, raise_on_not_found: raise_on_not_found) variable = variable.to_liquid variable.context = self if variable.respond_to?(:context=) variable end
[ "def", "find_variable", "(", "key", ",", "raise_on_not_found", ":", "true", ")", "# This was changed from find() to find_index() because this is a very hot", "# path and find_index() is optimized in MRI to reduce object allocation", "index", "=", "@scopes", ".", "find_index", "{", ...
Fetches an object starting at the local scope and then moving up the hierachy
[ "Fetches", "an", "object", "starting", "at", "the", "local", "scope", "and", "then", "moving", "up", "the", "hierachy" ]
b3b63a683f6daaea7e70f1602ee829abdf970ef3
https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/context.rb#L163-L190
train
Find a variable by its key
[ 30522, 13366, 2424, 1035, 8023, 1006, 3145, 1010, 5333, 1035, 2006, 1035, 2025, 1035, 2179, 1024, 2995, 1007, 1001, 2023, 2001, 2904, 2013, 2424, 1006, 1007, 2000, 2424, 1035, 5950, 1006, 1007, 2138, 2023, 2003, 1037, 2200, 2980, 1001, 41...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/downloads_controller.rb
Hyrax.DownloadsController.authorize_download!
def authorize_download! authorize! :download, params[asset_param_key] rescue CanCan::AccessDenied unauthorized_image = Rails.root.join("app", "assets", "images", "unauthorized.png") send_file unauthorized_image, status: :unauthorized end
ruby
def authorize_download! authorize! :download, params[asset_param_key] rescue CanCan::AccessDenied unauthorized_image = Rails.root.join("app", "assets", "images", "unauthorized.png") send_file unauthorized_image, status: :unauthorized end
[ "def", "authorize_download!", "authorize!", ":download", ",", "params", "[", "asset_param_key", "]", "rescue", "CanCan", "::", "AccessDenied", "unauthorized_image", "=", "Rails", ".", "root", ".", "join", "(", "\"app\"", ",", "\"assets\"", ",", "\"images\"", ",", ...
Customize the :read ability in your Ability class, or override this method. Hydra::Ability#download_permissions can't be used in this case because it assumes that files are in a LDP basic container, and thus, included in the asset's uri.
[ "Customize", "the", ":", "read", "ability", "in", "your", "Ability", "class", "or", "override", "this", "method", ".", "Hydra", "::", "Ability#download_permissions", "can", "t", "be", "used", "in", "this", "case", "because", "it", "assumes", "that", "files", ...
e2b4f56e829a53b1f11296324736e9d5b8c9ee5f
https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/hyrax/downloads_controller.rb#L42-L47
train
Authorize download of the image
[ 30522, 13366, 3166, 4697, 1035, 8816, 999, 3166, 4697, 999, 1024, 8816, 1010, 11498, 5244, 1031, 11412, 1035, 11498, 2213, 1035, 3145, 1033, 5343, 2064, 9336, 1024, 1024, 3229, 4181, 6340, 24641, 1035, 3746, 1027, 15168, 30524, 10439, 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...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_node_event_list_with_http_info
def get_node_event_list_with_http_info(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) get_node_event_list_async(node_name, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value! end
ruby
def get_node_event_list_with_http_info(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) get_node_event_list_async(node_name, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value! end
[ "def", "get_node_event_list_with_http_info", "(", "node_name", ",", "start_time_utc", ",", "end_time_utc", ",", "timeout", ":", "60", ",", "events_types_filter", ":", "nil", ",", "exclude_analysis_events", ":", "nil", ",", "skip_correlation_lookup", ":", "nil", ",", ...
Gets a Node-related events. The response is list of NodeEvent objects. @param node_name [String] The name of the node. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "a", "Node", "-", "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#L27563-L27565
train
Gets the node event list.
[ 30522, 13366, 2131, 1035, 13045, 1035, 2724, 1035, 2862, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 13045, 1035, 2171, 1010, 2707, 1035, 2051, 1035, 11396, 1010, 2203, 1035, 2051, 1035, 11396, 1010, 2051, 5833, 1024, 3438, 1010, 2824, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
meew0/discordrb
lib/discordrb/data/server.rb
Discordrb.Server.invites
def invites invites = JSON.parse(API::Server.invites(@bot.token, @id)) invites.map { |invite| Invite.new(invite, @bot) } end
ruby
def invites invites = JSON.parse(API::Server.invites(@bot.token, @id)) invites.map { |invite| Invite.new(invite, @bot) } end
[ "def", "invites", "invites", "=", "JSON", ".", "parse", "(", "API", "::", "Server", ".", "invites", "(", "@bot", ".", "token", ",", "@id", ")", ")", "invites", ".", "map", "{", "|", "invite", "|", "Invite", ".", "new", "(", "invite", ",", "@bot", ...
Requests a list of Invites to the server. @return [Array<Invite>] invites to the server.
[ "Requests", "a", "list", "of", "Invites", "to", "the", "server", "." ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/server.rb#L739-L742
train
Returns an array of Invite objects
[ 30522, 13366, 18675, 18675, 1027, 1046, 3385, 1012, 11968, 3366, 1006, 17928, 1024, 1024, 8241, 1012, 18675, 1006, 1030, 28516, 1012, 19204, 1010, 1030, 8909, 1007, 1007, 18675, 1012, 4949, 1063, 1064, 13260, 1064, 13260, 1012, 2047, 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...
sds/scss-lint
lib/scss_lint/linter/declaration_order.rb
SCSSLint.Linter::DeclarationOrder.check_children_order
def check_children_order(sorted_children, children) sorted_children.each_with_index do |sorted_item, index| next if sorted_item == children[index] add_lint(sorted_item.first.line, "Expected item on line #{sorted_item.first.line} to appear " \ "before line #{children[index].first.line}. #{MESSAGE}") break end end
ruby
def check_children_order(sorted_children, children) sorted_children.each_with_index do |sorted_item, index| next if sorted_item == children[index] add_lint(sorted_item.first.line, "Expected item on line #{sorted_item.first.line} to appear " \ "before line #{children[index].first.line}. #{MESSAGE}") break end end
[ "def", "check_children_order", "(", "sorted_children", ",", "children", ")", "sorted_children", ".", "each_with_index", "do", "|", "sorted_item", ",", "index", "|", "next", "if", "sorted_item", "==", "children", "[", "index", "]", "add_lint", "(", "sorted_item", ...
Find the child that is out of place
[ "Find", "the", "child", "that", "is", "out", "of", "place" ]
e99afe4ede041a431a06e585c12ce82f6ad50116
https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/declaration_order.rb#L52-L61
train
Check that the children are in the correct order
[ 30522, 13366, 4638, 1035, 2336, 1035, 2344, 1006, 19616, 1035, 2336, 1010, 2336, 1007, 19616, 1035, 2336, 1012, 2169, 1035, 2007, 1035, 5950, 2079, 1064, 19616, 1035, 8875, 1010, 5950, 1064, 2279, 2065, 19616, 1035, 8875, 1027, 1027, 2336, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/gallery_images.rb
Azure::Labservices::Mgmt::V2018_10_15.GalleryImages.create_or_update
def create_or_update(resource_group_name, lab_account_name, gallery_image_name, gallery_image, custom_headers:nil) response = create_or_update_async(resource_group_name, lab_account_name, gallery_image_name, gallery_image, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(resource_group_name, lab_account_name, gallery_image_name, gallery_image, custom_headers:nil) response = create_or_update_async(resource_group_name, lab_account_name, gallery_image_name, gallery_image, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "resource_group_name", ",", "lab_account_name", ",", "gallery_image_name", ",", "gallery_image", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_group_name", ",", "lab_account_name", ",", ...
Create or replace an existing Gallery Image. @param resource_group_name [String] The name of the resource group. @param lab_account_name [String] The name of the lab Account. @param gallery_image_name [String] The name of the gallery Image. @param gallery_image [GalleryImage] Represents an image from the Azure Marketplace @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [GalleryImage] operation results.
[ "Create", "or", "replace", "an", "existing", "Gallery", "Image", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/gallery_images.rb#L252-L255
train
Creates or updates a gallery image.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 6845, 1035, 4070, 1035, 2171, 1010, 3916, 1035, 3746, 1035, 2171, 1010, 3916, 1035, 3746, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
haml/haml
lib/haml/buffer.rb
Haml.Buffer.rstrip!
def rstrip! if capture_position.nil? buffer.rstrip! return end buffer << buffer.slice!(capture_position..-1).rstrip end
ruby
def rstrip! if capture_position.nil? buffer.rstrip! return end buffer << buffer.slice!(capture_position..-1).rstrip end
[ "def", "rstrip!", "if", "capture_position", ".", "nil?", "buffer", ".", "rstrip!", "return", "end", "buffer", "<<", "buffer", ".", "slice!", "(", "capture_position", "..", "-", "1", ")", ".", "rstrip", "end" ]
Remove the whitespace from the right side of the buffer string. Doesn't do anything if we're at the beginning of a capture_haml block.
[ "Remove", "the", "whitespace", "from", "the", "right", "side", "of", "the", "buffer", "string", ".", "Doesn", "t", "do", "anything", "if", "we", "re", "at", "the", "beginning", "of", "a", "capture_haml", "block", "." ]
9aa0fbe4a91b999978927be569d2ad0cd39076f1
https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/buffer.rb#L146-L153
train
Return the trailing whitespace of the buffer.
[ 30522, 13366, 12667, 24901, 999, 2065, 5425, 1035, 2597, 1012, 9152, 2140, 1029, 17698, 1012, 12667, 24901, 999, 2709, 2203, 17698, 1026, 1026, 17698, 1012, 14704, 999, 1006, 5425, 1035, 2597, 1012, 1012, 1011, 1015, 1007, 1012, 12667, 2490...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb
Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_web_worker_metrics_as_lazy
def list_web_worker_metrics_as_lazy(resource_group_name, name, worker_pool_name, details:nil, filter:nil, custom_headers:nil) response = list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details:details, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_worker_metrics_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_web_worker_metrics_as_lazy(resource_group_name, name, worker_pool_name, details:nil, filter:nil, custom_headers:nil) response = list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details:details, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_worker_metrics_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_web_worker_metrics_as_lazy", "(", "resource_group_name", ",", "name", ",", "worker_pool_name", ",", "details", ":", "nil", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_web_worker_metrics_async", "(", "resourc...
Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of worker pool @param details [Boolean] Specify <code>true</code> to include instance details. The default is <code>false</code>. @param filter [String] Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ResourceMetricCollection] which provide lazy access to pages of the response.
[ "Get", "metrics", "for", "a", "worker", "pool", "of", "a", "AppServiceEnvironment", "(", "App", "Service", "Environment", ")", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L7950-L7959
train
Gets metrics for a worker pool.
[ 30522, 13366, 2862, 1035, 4773, 1035, 7309, 1035, 12046, 2015, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 7309, 1035, 4770, 1035, 2171, 1010, 4751, 1024, 9152, 2140, 1010, 11307, 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...
watir/watir
lib/watir/navigation.rb
Watir.Navigation.goto
def goto(uri) uri = "http://#{uri}" unless uri =~ URI::DEFAULT_PARSER.make_regexp @driver.navigate.to uri @after_hooks.run uri end
ruby
def goto(uri) uri = "http://#{uri}" unless uri =~ URI::DEFAULT_PARSER.make_regexp @driver.navigate.to uri @after_hooks.run uri end
[ "def", "goto", "(", "uri", ")", "uri", "=", "\"http://#{uri}\"", "unless", "uri", "=~", "URI", "::", "DEFAULT_PARSER", ".", "make_regexp", "@driver", ".", "navigate", ".", "to", "uri", "@after_hooks", ".", "run", "uri", "end" ]
Goes to the given URL. @example browser.goto "watir.github.io" @param [String] uri The url. @return [String] The url you end up at.
[ "Goes", "to", "the", "given", "URL", "." ]
2d8db09811c6221ae401b85b2f61f5fa66e463a3
https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/navigation.rb#L13-L20
train
Goes to the specified URI.
[ 30522, 13366, 2288, 2080, 1006, 24471, 2072, 1007, 24471, 2072, 1027, 1000, 8299, 1024, 1013, 1013, 1001, 1063, 24471, 2072, 1065, 1000, 4983, 24471, 2072, 1027, 1066, 24471, 2072, 1024, 1024, 12398, 1035, 11968, 8043, 1012, 2191, 1035, 197...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
geokit/geokit
lib/geokit/bounds.rb
Geokit.Bounds.to_span
def to_span lat_span = @ne.lat - @sw.lat lng_span = crosses_meridian? ? 360 + @ne.lng - @sw.lng : @ne.lng - @sw.lng Geokit::LatLng.new(lat_span.abs, lng_span.abs) end
ruby
def to_span lat_span = @ne.lat - @sw.lat lng_span = crosses_meridian? ? 360 + @ne.lng - @sw.lng : @ne.lng - @sw.lng Geokit::LatLng.new(lat_span.abs, lng_span.abs) end
[ "def", "to_span", "lat_span", "=", "@ne", ".", "lat", "-", "@sw", ".", "lat", "lng_span", "=", "crosses_meridian?", "?", "360", "+", "@ne", ".", "lng", "-", "@sw", ".", "lng", ":", "@ne", ".", "lng", "-", "@sw", ".", "lng", "Geokit", "::", "LatLng"...
Returns true if the candidate object is logically equal. Logical equivalence is true if the lat and lng attributes are the same for both objects. Equivalent to Google Maps API's .toSpan() method on GLatLng's. Returns a LatLng object, whose coordinates represent the size of a rectangle defined by these bounds.
[ "Returns", "true", "if", "the", "candidate", "object", "is", "logically", "equal", ".", "Logical", "equivalence", "is", "true", "if", "the", "lat", "and", "lng", "attributes", "are", "the", "same", "for", "both", "objects", ".", "Equivalent", "to", "Google",...
b7c13376bd85bf14f9534228ea466d09ac0afbf4
https://github.com/geokit/geokit/blob/b7c13376bd85bf14f9534228ea466d09ac0afbf4/lib/geokit/bounds.rb#L60-L64
train
Returns a new array of the coordinates of the segment in the segment.
[ 30522, 13366, 2000, 1035, 8487, 2474, 2102, 1035, 8487, 1027, 1030, 11265, 1012, 2474, 2102, 1011, 1030, 25430, 1012, 2474, 2102, 1048, 3070, 1035, 8487, 1027, 7821, 1035, 17984, 1029, 1029, 9475, 1009, 1030, 11265, 1012, 1048, 3070, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb
Azure::CognitiveServices::ContentModerator::V1_0.Reviews.add_video_frame_stream_with_http_info
def add_video_frame_stream_with_http_info(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:nil, custom_headers:nil) add_video_frame_stream_async(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:timescale, custom_headers:custom_headers).value! end
ruby
def add_video_frame_stream_with_http_info(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:nil, custom_headers:nil) add_video_frame_stream_async(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:timescale, custom_headers:custom_headers).value! end
[ "def", "add_video_frame_stream_with_http_info", "(", "content_type", ",", "team_name", ",", "review_id", ",", "frame_image_zip", ",", "frame_metadata", ",", "timescale", ":", "nil", ",", "custom_headers", ":", "nil", ")", "add_video_frame_stream_async", "(", "content_ty...
Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. @param content_type [String] The content type. @param team_name [String] Your team name. @param review_id [String] Id of the review. @param frame_image_zip Zip file containing frame images. @param frame_metadata [String] Metadata of the frame. @param timescale [Integer] Timescale of the video . @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Use", "this", "method", "to", "add", "frames", "for", "a", "video", "review", ".", "Timescale", ":", "This", "parameter", "is", "a", "factor", "which", "is", "used", "to", "convert", "the", "timestamp", "on", "a", "frame", "into", "milliseconds", ".", "...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb#L1744-L1746
train
Adds a video frame stream to the review.
[ 30522, 13366, 5587, 1035, 2678, 1035, 4853, 1035, 5460, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 4180, 1035, 2828, 1010, 2136, 1035, 2171, 1010, 3319, 1035, 8909, 1010, 4853, 1035, 3746, 1035, 14101, 1010, 4853, 1035, 27425, 1010, 2335, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_management_group
def list_query_results_for_management_group(management_group_name, query_options:nil, custom_headers:nil) first_page = list_query_results_for_management_group_as_lazy(management_group_name, query_options:query_options, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_query_results_for_management_group(management_group_name, query_options:nil, custom_headers:nil) first_page = list_query_results_for_management_group_as_lazy(management_group_name, query_options:query_options, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_query_results_for_management_group", "(", "management_group_name", ",", "query_options", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_query_results_for_management_group_as_lazy", "(", "management_group_name", ",", "query_options", ...
Queries policy tracked resources under the management group. @param management_group_name [String] Management group name. @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<PolicyTrackedResource>] operation results.
[ "Queries", "policy", "tracked", "resources", "under", "the", "management", "group", "." ]
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#L34-L37
train
Gets all the available advisor terms.
[ 30522, 13366, 2862, 1035, 23032, 1035, 3463, 1035, 2005, 1035, 2968, 1035, 2177, 1006, 2968, 1035, 2177, 1035, 2171, 1010, 23032, 1035, 7047, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_grid/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb
Azure::EventGrid::Mgmt::V2019_02_01_preview.Topics.list_event_types_with_http_info
def list_event_types_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil) list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value! end
ruby
def list_event_types_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil) list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value! end
[ "def", "list_event_types_with_http_info", "(", "resource_group_name", ",", "provider_namespace", ",", "resource_type_name", ",", "resource_name", ",", "custom_headers", ":", "nil", ")", "list_event_types_async", "(", "resource_group_name", ",", "provider_namespace", ",", "r...
List topic event types List event types for a topic @param resource_group_name [String] The name of the resource group within the user's subscription. @param provider_namespace [String] Namespace of the provider of the topic @param resource_type_name [String] Name of the topic type @param resource_name [String] Name of the topic @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "List", "topic", "event", "types" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb#L715-L717
train
Gets the list of event types.
[ 30522, 13366, 2862, 1035, 2724, 1035, 4127, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 10802, 1035, 3415, 15327, 1010, 7692, 1035, 2828, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 7661, 1035, 20346, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
savonrb/savon
lib/savon/model.rb
Savon.Model.class_operation_module
def class_operation_module @class_operation_module ||= Module.new { def client(globals = {}) @client ||= Savon::Client.new(globals) rescue InitializationError raise_initialization_error! end def global(option, *value) client.globals[option] = value end def raise_initialization_error! raise InitializationError, "Expected the model to be initialized with either a WSDL document or the SOAP endpoint and target namespace options.\n" \ "Make sure to setup the model by calling the .client class method before calling the .global method.\n\n" \ "client(wsdl: '/Users/me/project/service.wsdl') # to use a local WSDL document\n" \ "client(wsdl: 'http://example.com?wsdl') # to use a remote WSDL document\n" \ "client(endpoint: 'http://example.com', namespace: 'http://v1.example.com') # if you don't have a WSDL document" end }.tap { |mod| extend(mod) } end
ruby
def class_operation_module @class_operation_module ||= Module.new { def client(globals = {}) @client ||= Savon::Client.new(globals) rescue InitializationError raise_initialization_error! end def global(option, *value) client.globals[option] = value end def raise_initialization_error! raise InitializationError, "Expected the model to be initialized with either a WSDL document or the SOAP endpoint and target namespace options.\n" \ "Make sure to setup the model by calling the .client class method before calling the .global method.\n\n" \ "client(wsdl: '/Users/me/project/service.wsdl') # to use a local WSDL document\n" \ "client(wsdl: 'http://example.com?wsdl') # to use a remote WSDL document\n" \ "client(endpoint: 'http://example.com', namespace: 'http://v1.example.com') # if you don't have a WSDL document" end }.tap { |mod| extend(mod) } end
[ "def", "class_operation_module", "@class_operation_module", "||=", "Module", ".", "new", "{", "def", "client", "(", "globals", "=", "{", "}", ")", "@client", "||=", "Savon", "::", "Client", ".", "new", "(", "globals", ")", "rescue", "InitializationError", "rai...
Class methods.
[ "Class", "methods", "." ]
0fa08fc30ecce2cd1109474bfcc14abf13a0c297
https://github.com/savonrb/savon/blob/0fa08fc30ecce2cd1109474bfcc14abf13a0c297/lib/savon/model.rb#L48-L71
train
Returns a module that can be used to create the class operation.
[ 30522, 13366, 2465, 1035, 3169, 1035, 11336, 1030, 2465, 1035, 3169, 1035, 11336, 1064, 1064, 1027, 11336, 1012, 2047, 1063, 13366, 7396, 1006, 3795, 2015, 1027, 1063, 1065, 1007, 1030, 7396, 1064, 1064, 1027, 7842, 17789, 1024, 1024, 7396,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb
Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.delete_at_resource_group
def delete_at_resource_group(resource_group_name, remediation_name, custom_headers:nil) response = delete_at_resource_group_async(resource_group_name, remediation_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def delete_at_resource_group(resource_group_name, remediation_name, custom_headers:nil) response = delete_at_resource_group_async(resource_group_name, remediation_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "delete_at_resource_group", "(", "resource_group_name", ",", "remediation_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_at_resource_group_async", "(", "resource_group_name", ",", "remediation_name", ",", "custom_headers", ":custom_headers", ...
Deletes an existing remediation at resource group scope. @param resource_group_name [String] Resource group name. @param remediation_name [String] The name of the remediation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Remediation] operation results.
[ "Deletes", "an", "existing", "remediation", "at", "resource", "group", "scope", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L1679-L1682
train
Deletes a remediation at resource group scope.
[ 30522, 13366, 3972, 12870, 1035, 2012, 1035, 7692, 1035, 2177, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2128, 16969, 3508, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2012, 1035, 7692, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/github
lib/github_api/client/authorizations.rb
Github.Client::Authorizations.update
def update(*args) raise_authentication_error unless authenticated? arguments(args, required: [:id]) patch_request("/authorizations/#{arguments.id}", arguments.params) end
ruby
def update(*args) raise_authentication_error unless authenticated? arguments(args, required: [:id]) patch_request("/authorizations/#{arguments.id}", arguments.params) end
[ "def", "update", "(", "*", "args", ")", "raise_authentication_error", "unless", "authenticated?", "arguments", "(", "args", ",", "required", ":", "[", ":id", "]", ")", "patch_request", "(", "\"/authorizations/#{arguments.id}\"", ",", "arguments", ".", "params", ")...
Update an existing authorization @see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization @param [Hash] inputs @option inputs [Array] :scopes Optional array - A list of scopes that this authorization is in. @option inputs [Array] :add_scopes Optional array - A list of scopes to add to this authorization. @option inputs [Array] :remove_scopes Optional array - A list of scopes to remove from this authorization. @option inputs [String] :note Optional string - A note to remind you what the OAuth token is for. @optoin inputs [String] :note_url Optional string - A URL to remind you what the OAuth token is for. @option params [String] :fingerprint A unique string to distinguish an authorization from others created for the same client ID and user. @example github = Github.new basic_auth: 'login:password' github.oauth.update "authorization-id", add_scopes: ["repo"] @api public
[ "Update", "an", "existing", "authorization" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/authorizations.rb#L110-L115
train
Update an existing authorization
[ 30522, 13366, 10651, 1006, 1008, 12098, 5620, 1007, 5333, 1035, 27280, 1035, 7561, 4983, 14469, 4383, 1029, 9918, 1006, 12098, 5620, 1010, 3223, 1024, 1031, 1024, 8909, 1033, 1007, 8983, 1035, 5227, 1006, 1000, 1013, 20104, 2015, 1013, 1001...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb
Azure::Links::Mgmt::V2016_09_01.ResourceLinks.list_at_source_scope_with_http_info
def list_at_source_scope_with_http_info(scope, filter:nil, custom_headers:nil) list_at_source_scope_async(scope, filter:filter, custom_headers:custom_headers).value! end
ruby
def list_at_source_scope_with_http_info(scope, filter:nil, custom_headers:nil) list_at_source_scope_async(scope, filter:filter, custom_headers:custom_headers).value! end
[ "def", "list_at_source_scope_with_http_info", "(", "scope", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_at_source_scope_async", "(", "scope", ",", "filter", ":", "filter", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "...
Gets a list of resource links at and below the specified source scope. @param scope [String] The fully qualified ID of the scope for getting the resource links. For example, to list resource links at and under a resource group, set the scope to /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. @param filter [String] The filter to apply when getting resource links. To get links only at the specified scope (not below the scope), use Filter.atScope(). @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "a", "list", "of", "resource", "links", "at", "and", "below", "the", "specified", "source", "scope", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb#L461-L463
train
Gets the list of the adults at source scope.
[ 30522, 13366, 2862, 1035, 2012, 1035, 3120, 1035, 9531, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 9531, 1010, 11307, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2862, 1035, 2012, 1035, 3120, 1035, 9531, 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_customvisionprediction/lib/3.0/generated/azure_cognitiveservices_customvisionprediction/customvisionprediction_client.rb
Azure::CognitiveServices::Customvisionprediction::V3_0.CustomvisionpredictionClient.classify_image_url_with_http_info
def classify_image_url_with_http_info(project_id, published_name, image_url, application:nil, custom_headers:nil) classify_image_url_async(project_id, published_name, image_url, application:application, custom_headers:custom_headers).value! end
ruby
def classify_image_url_with_http_info(project_id, published_name, image_url, application:nil, custom_headers:nil) classify_image_url_async(project_id, published_name, image_url, application:application, custom_headers:custom_headers).value! end
[ "def", "classify_image_url_with_http_info", "(", "project_id", ",", "published_name", ",", "image_url", ",", "application", ":", "nil", ",", "custom_headers", ":", "nil", ")", "classify_image_url_async", "(", "project_id", ",", "published_name", ",", "image_url", ",",...
Classify an image url and saves the result. @param project_id The project id. @param published_name [String] Specifies the name of the model to evaluate against. @param image_url [ImageUrl] An ImageUrl that contains the url of the image to be evaluated. @param application [String] Optional. Specifies the name of application using the endpoint. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Classify", "an", "image", "url", "and", "saves", "the", "result", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisionprediction/lib/3.0/generated/azure_cognitiveservices_customvisionprediction/customvisionprediction_client.rb#L149-L151
train
Classifies the image url.
[ 30522, 13366, 26268, 1035, 3746, 1035, 24471, 2140, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2622, 1035, 8909, 1010, 2405, 1035, 2171, 1010, 3746, 1035, 24471, 2140, 1010, 4646, 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...
resque/resque
lib/resque/job.rb
Resque.Job.perform
def perform job = payload_class job_args = args || [] job_was_performed = false begin # Execute before_perform hook. Abort the job gracefully if # Resque::DontPerform is raised. begin before_hooks.each do |hook| job.send(hook, *job_args) end rescue DontPerform return false end # Execute the job. Do it in an around_perform hook if available. if around_hooks.empty? job.perform(*job_args) job_was_performed = true else # We want to nest all around_perform plugins, with the last one # finally calling perform stack = around_hooks.reverse.inject(nil) do |last_hook, hook| if last_hook lambda do job.send(hook, *job_args) { last_hook.call } end else lambda do job.send(hook, *job_args) do result = job.perform(*job_args) job_was_performed = true result end end end end stack.call end # Execute after_perform hook after_hooks.each do |hook| job.send(hook, *job_args) end # Return true if the job was performed return job_was_performed # If an exception occurs during the job execution, look for an # on_failure hook then re-raise. rescue Object => e run_failure_hooks(e) raise e end end
ruby
def perform job = payload_class job_args = args || [] job_was_performed = false begin # Execute before_perform hook. Abort the job gracefully if # Resque::DontPerform is raised. begin before_hooks.each do |hook| job.send(hook, *job_args) end rescue DontPerform return false end # Execute the job. Do it in an around_perform hook if available. if around_hooks.empty? job.perform(*job_args) job_was_performed = true else # We want to nest all around_perform plugins, with the last one # finally calling perform stack = around_hooks.reverse.inject(nil) do |last_hook, hook| if last_hook lambda do job.send(hook, *job_args) { last_hook.call } end else lambda do job.send(hook, *job_args) do result = job.perform(*job_args) job_was_performed = true result end end end end stack.call end # Execute after_perform hook after_hooks.each do |hook| job.send(hook, *job_args) end # Return true if the job was performed return job_was_performed # If an exception occurs during the job execution, look for an # on_failure hook then re-raise. rescue Object => e run_failure_hooks(e) raise e end end
[ "def", "perform", "job", "=", "payload_class", "job_args", "=", "args", "||", "[", "]", "job_was_performed", "=", "false", "begin", "# Execute before_perform hook. Abort the job gracefully if", "# Resque::DontPerform is raised.", "begin", "before_hooks", ".", "each", "do", ...
Attempts to perform the work represented by this job instance. Calls #perform on the class given in the payload with the arguments given in the payload.
[ "Attempts", "to", "perform", "the", "work", "represented", "by", "this", "job", "instance", ".", "Calls", "#perform", "on", "the", "class", "given", "in", "the", "payload", "with", "the", "arguments", "given", "in", "the", "payload", "." ]
adb633a0f6b98b1eb5a5a85bb36ebac9309978fd
https://github.com/resque/resque/blob/adb633a0f6b98b1eb5a5a85bb36ebac9309978fd/lib/resque/job.rb#L150-L205
train
Perform a job
[ 30522, 13366, 4685, 3105, 1027, 18093, 1035, 2465, 3105, 1035, 12098, 5620, 1027, 12098, 5620, 1064, 1064, 1031, 1033, 3105, 1035, 2001, 1035, 2864, 1027, 6270, 4088, 1001, 15389, 2077, 1035, 4685, 8103, 1012, 11113, 11589, 1996, 3105, 2826...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
AaronLasseigne/active_interaction
lib/active_interaction/filters/record_filter.rb
ActiveInteraction.RecordFilter.cast
def cast(value, context, reconstantize: true, convert: true) @klass ||= klass if matches?(value) value elsif reconstantize @klass = klass public_send(__method__, value, context, reconstantize: false, convert: convert ) elsif !value.nil? && convert finder = options.fetch(:finder, :find) value = find(klass, value, finder) public_send(__method__, value, context, reconstantize: reconstantize, convert: false ) else super(value, context) end end
ruby
def cast(value, context, reconstantize: true, convert: true) @klass ||= klass if matches?(value) value elsif reconstantize @klass = klass public_send(__method__, value, context, reconstantize: false, convert: convert ) elsif !value.nil? && convert finder = options.fetch(:finder, :find) value = find(klass, value, finder) public_send(__method__, value, context, reconstantize: reconstantize, convert: false ) else super(value, context) end end
[ "def", "cast", "(", "value", ",", "context", ",", "reconstantize", ":", "true", ",", "convert", ":", "true", ")", "@klass", "||=", "klass", "if", "matches?", "(", "value", ")", "value", "elsif", "reconstantize", "@klass", "=", "klass", "public_send", "(", ...
rubocop:disable Metrics/MethodLength
[ "rubocop", ":", "disable", "Metrics", "/", "MethodLength" ]
fdc00a041e939ef48948baa2f7fd1ce2e4d66982
https://github.com/AaronLasseigne/active_interaction/blob/fdc00a041e939ef48948baa2f7fd1ce2e4d66982/lib/active_interaction/filters/record_filter.rb#L32-L53
train
Casts a value to a new object.
[ 30522, 30524, 3643, 3449, 5332, 2546, 28667, 5644, 5794, 3775, 4371, 1030, 1047, 27102, 1027, 1047, 27102, 2270, 1035, 4604, 1006, 1035, 1035, 4118, 1035, 1035, 1010, 3643, 1010, 6123, 1010, 28667, 5644, 5794, 3775, 4371, 1024, 6270, 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...