repo
stringclasses
237 values
path
stringlengths
11
168
func_name
stringlengths
10
147
original_string
stringlengths
79
124k
language
stringclasses
1 value
code
stringlengths
79
124k
code_tokens
listlengths
16
45.3k
docstring
stringlengths
4
23.5k
docstring_tokens
listlengths
1
452
sha
stringclasses
237 values
url
stringlengths
95
268
partition
stringclasses
1 value
summary
stringlengths
8
229
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
chef/ohai
lib/ohai/loader.rb
Ohai.Loader.load_additional
def load_additional(from) from = [ Ohai.config[:plugin_path], from].flatten plugin_files_by_dir(from).collect do |plugin_file| logger.trace "Loading additional plugin: #{plugin_file}" plugin = load_plugin_class(plugin_file) load_v7_plugin(plugin) end end
ruby
def load_additional(from) from = [ Ohai.config[:plugin_path], from].flatten plugin_files_by_dir(from).collect do |plugin_file| logger.trace "Loading additional plugin: #{plugin_file}" plugin = load_plugin_class(plugin_file) load_v7_plugin(plugin) end end
[ "def", "load_additional", "(", "from", ")", "from", "=", "[", "Ohai", ".", "config", "[", ":plugin_path", "]", ",", "from", "]", ".", "flatten", "plugin_files_by_dir", "(", "from", ")", ".", "collect", "do", "|", "plugin_file", "|", "logger", ".", "trace...
load additional plugins classes from a given directory @param from [String] path to a directory with additional plugins to load
[ "load", "additional", "plugins", "classes", "from", "a", "given", "directory" ]
8d66449940f04237586b2f928231c6b26e2cc19a
https://github.com/chef/ohai/blob/8d66449940f04237586b2f928231c6b26e2cc19a/lib/ohai/loader.rb#L70-L77
train
Loads additional plugins from a directory
[ 30522, 13366, 7170, 1035, 3176, 1006, 2013, 1007, 2013, 1027, 1031, 2821, 4886, 1012, 9530, 8873, 2290, 1031, 1024, 13354, 2378, 1035, 4130, 1033, 1010, 2013, 1033, 1012, 4257, 6528, 13354, 2378, 1035, 6764, 1035, 2011, 1035, 16101, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Features.list_application_version_pattern_features_with_http_info
def list_application_version_pattern_features_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil) list_application_version_pattern_features_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value! end
ruby
def list_application_version_pattern_features_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil) list_application_version_pattern_features_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value! end
[ "def", "list_application_version_pattern_features_with_http_info", "(", "app_id", ",", "version_id", ",", "skip", ":", "0", ",", "take", ":", "100", ",", "custom_headers", ":", "nil", ")", "list_application_version_pattern_features_async", "(", "app_id", ",", "version_i...
[DEPRECATED NOTICE: This operation will soon be removed] Gets all the pattern features. @param app_id The application ID. @param version_id [String] The version ID. @param skip [Integer] The number of entries to skip. Default value is 0. @param take [Integer] The number of entries to return. Maximum page size is 500. Default is 100. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "[", "DEPRECATED", "NOTICE", ":", "This", "operation", "will", "soon", "be", "removed", "]", "Gets", "all", "the", "pattern", "features", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb#L57-L59
train
Gets the list of pattern features for the application version.
[ 30522, 13366, 2862, 1035, 4646, 1035, 2544, 1035, 5418, 1035, 2838, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 13558, 1024, 1014, 1010, 2202, 1024, 2531, 1010, 7661, 1035, 20346, 2015, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb
Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.create_or_update_at_resource
def create_or_update_at_resource(resource_id, remediation_name, parameters, custom_headers:nil) response = create_or_update_at_resource_async(resource_id, remediation_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update_at_resource(resource_id, remediation_name, parameters, custom_headers:nil) response = create_or_update_at_resource_async(resource_id, remediation_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update_at_resource", "(", "resource_id", ",", "remediation_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_at_resource_async", "(", "resource_id", ",", "remediation_name", ",", "parameters", ",", "cu...
Creates or updates a remediation at resource scope. @param resource_id [String] Resource ID. @param remediation_name [String] The name of the remediation. @param parameters [Remediation] The remediation parameters. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Remediation] operation results.
[ "Creates", "or", "updates", "a", "remediation", "at", "resource", "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#L2061-L2064
train
Creates or updates a remediation at resource scope.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2012, 1035, 7692, 1006, 7692, 1035, 8909, 1010, 2128, 16969, 3508, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 2030, 1035, 30524,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
haml/haml
lib/haml/parser.rb
Haml.Parser.parse_static_hash
def parse_static_hash(text) attributes = {} return attributes if text.empty? text = text[1...-1] # strip brackets scanner = StringScanner.new(text) scanner.scan(/\s+/) until scanner.eos? return unless key = scanner.scan(LITERAL_VALUE_REGEX) return unless scanner.scan(/\s*=>\s*/) return unless value = scanner.scan(LITERAL_VALUE_REGEX) return unless scanner.scan(/\s*(?:,|$)\s*/) attributes[eval(key).to_s] = eval(value).to_s end attributes end
ruby
def parse_static_hash(text) attributes = {} return attributes if text.empty? text = text[1...-1] # strip brackets scanner = StringScanner.new(text) scanner.scan(/\s+/) until scanner.eos? return unless key = scanner.scan(LITERAL_VALUE_REGEX) return unless scanner.scan(/\s*=>\s*/) return unless value = scanner.scan(LITERAL_VALUE_REGEX) return unless scanner.scan(/\s*(?:,|$)\s*/) attributes[eval(key).to_s] = eval(value).to_s end attributes end
[ "def", "parse_static_hash", "(", "text", ")", "attributes", "=", "{", "}", "return", "attributes", "if", "text", ".", "empty?", "text", "=", "text", "[", "1", "...", "-", "1", "]", "# strip brackets", "scanner", "=", "StringScanner", ".", "new", "(", "te...
This method doesn't use Haml::AttributeParser because currently it depends on Ripper and Rubinius doesn't provide it. Ideally this logic should be placed in Haml::AttributeParser instead of here and this method should use it. @param [String] text - Hash literal or text inside old attributes @return [Hash,nil] - Return nil if text is not static Hash literal
[ "This", "method", "doesn", "t", "use", "Haml", "::", "AttributeParser", "because", "currently", "it", "depends", "on", "Ripper", "and", "Rubinius", "doesn", "t", "provide", "it", ".", "Ideally", "this", "logic", "should", "be", "placed", "in", "Haml", "::", ...
9aa0fbe4a91b999978927be569d2ad0cd39076f1
https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/parser.rb#L578-L593
train
Parse a static hash
[ 30522, 13366, 11968, 3366, 1035, 10763, 1035, 23325, 1006, 3793, 1007, 12332, 1027, 1063, 1065, 2709, 12332, 2065, 3793, 1012, 4064, 1029, 3793, 1027, 3793, 1031, 1015, 1012, 1012, 1012, 1011, 1015, 1033, 1001, 6167, 19719, 26221, 1027, 781...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.events
def events(options = {}) batches = Enumerator.new do |y| options = options.merge( source_type: "db-cluster", source_identifier: @id ) resp = @client.describe_events(options) resp.each_page do |page| batch = [] page.data.events.each do |e| batch << Event.new( source_id: e.source_identifier, date: e.date, data: e, client: @client ) end y.yield(batch) end end Event::Collection.new(batches) end
ruby
def events(options = {}) batches = Enumerator.new do |y| options = options.merge( source_type: "db-cluster", source_identifier: @id ) resp = @client.describe_events(options) resp.each_page do |page| batch = [] page.data.events.each do |e| batch << Event.new( source_id: e.source_identifier, date: e.date, data: e, client: @client ) end y.yield(batch) end end Event::Collection.new(batches) end
[ "def", "events", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "options", "=", "options", ".", "merge", "(", "source_type", ":", "\"db-cluster\"", ",", "source_identifier", ":", "@id", ")", "resp", "...
@!group Associations @example Request syntax with placeholder values events = db_cluster.events({ start_time: Time.now, end_time: Time.now, duration: 1, event_categories: ["String"], filters: [ { name: "String", # required values: ["String"], # required }, ], }) @param [Hash] options ({}) @option options [Time,DateTime,Date,Integer,String] :start_time The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the [ISO8601 Wikipedia page.][1] Example: 2009-07-08T18:00Z [1]: http://en.wikipedia.org/wiki/ISO_8601 @option options [Time,DateTime,Date,Integer,String] :end_time The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the [ISO8601 Wikipedia page.][1] Example: 2009-07-08T18:00Z [1]: http://en.wikipedia.org/wiki/ISO_8601 @option options [Integer] :duration The number of minutes to retrieve events for. Default: 60 @option options [Array<String>] :event_categories A list of event categories that trigger notifications for a event notification subscription. @option options [Array<Types::Filter>] :filters This parameter is not currently supported. @return [Event::Collection]
[ "@!group", "Associations", "@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#L1387-L1408
train
Returns an Enumerator of all events in the cluster
[ 30522, 13366, 2824, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 2229, 1027, 4372, 17897, 16259, 1012, 2047, 2079, 1064, 1061, 1064, 7047, 1027, 7047, 1012, 13590, 1006, 3120, 1035, 2828, 1024, 1000, 16962, 1011, 9324, 1000, 1010, 3120, 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_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/api_tag_description.rb
Azure::ApiManagement::Mgmt::V2019_01_01.ApiTagDescription.get_entity_tag_with_http_info
def get_entity_tag_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers:nil) get_entity_tag_async(resource_group_name, service_name, api_id, tag_id, custom_headers:custom_headers).value! end
ruby
def get_entity_tag_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers:nil) get_entity_tag_async(resource_group_name, service_name, api_id, tag_id, custom_headers:custom_headers).value! end
[ "def", "get_entity_tag_with_http_info", "(", "resource_group_name", ",", "service_name", ",", "api_id", ",", "tag_id", ",", "custom_headers", ":", "nil", ")", "get_entity_tag_async", "(", "resource_group_name", ",", "service_name", ",", "api_id", ",", "tag_id", ",", ...
Gets the entity state version of the tag specified by its identifier. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param api_id [String] API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @param tag_id [String] Tag identifier. Must be unique in the current API Management service instance. @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", "entity", "state", "version", "of", "the", "tag", "specified", "by", "its", "identifier", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/api_tag_description.rb#L198-L200
train
Gets the entity tag for the specified API.
[ 30522, 13366, 2131, 1035, 9178, 1035, 6415, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 17928, 1035, 8909, 1010, 6415, 1035, 8909, 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...
drapergem/draper
lib/draper/automatic_delegation.rb
Draper.AutomaticDelegation.method_missing
def method_missing(method, *args, &block) return super unless delegatable?(method) object.send(method, *args, &block) end
ruby
def method_missing(method, *args, &block) return super unless delegatable?(method) object.send(method, *args, &block) end
[ "def", "method_missing", "(", "method", ",", "*", "args", ",", "&", "block", ")", "return", "super", "unless", "delegatable?", "(", "method", ")", "object", ".", "send", "(", "method", ",", "args", ",", "block", ")", "end" ]
Delegates missing instance methods to the source object. Note: This will delegate `super` method calls to `object` as well. Calling `super` will first try to call the method on the parent decorator class. If no method exists on the parent class, it will then try to call the method on the `object`.
[ "Delegates", "missing", "instance", "methods", "to", "the", "source", "object", ".", "Note", ":", "This", "will", "delegate", "super", "method", "calls", "to", "object", "as", "well", ".", "Calling", "super", "will", "first", "try", "to", "call", "the", "m...
d44c86f1e560afc0cf0dad4ae09bfaa3f10a1759
https://github.com/drapergem/draper/blob/d44c86f1e560afc0cf0dad4ae09bfaa3f10a1759/lib/draper/automatic_delegation.rb#L9-L13
train
This method is called by the object s method_missing method.
[ 30522, 13366, 4118, 1035, 4394, 1006, 4118, 1010, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2709, 3565, 4983, 3972, 29107, 10880, 1029, 1006, 4118, 1007, 4874, 1012, 4604, 1006, 4118, 1010, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2203, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb
Azure::Network::Mgmt::V2018_10_01.VpnSites.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "vpn_site_name", ",", "vpn_site_parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "vpn_site_name", ",", "vpn_site_parameters", ...
Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. @param resource_group_name [String] The resource group name of the VpnSite. @param vpn_site_name [String] The name of the VpnSite being created or updated. @param vpn_site_parameters [VpnSite] Parameters supplied to create or update VpnSite. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Creates", "a", "VpnSite", "resource", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "VpnSite", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb#L454-L456
train
Creates or updates a VPN site.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 21210, 2078, 1035, 2609, 1035, 2171, 1010, 21210, 2078, 1035, 2609, 1035, 11709, 1010, 7661, 1035, 20346...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/tty-prompt
lib/tty/prompt.rb
TTY.Prompt.inspect
def inspect attributes = { input: input, output: output, prefix: prefix, active_color: active_color, error_color: error_color, enabled_color: enabled_color, help_color: help_color } "#<#{self.class}: #{attributes.each { |name, val| "@#{name}=#{val}" }}" end
ruby
def inspect attributes = { input: input, output: output, prefix: prefix, active_color: active_color, error_color: error_color, enabled_color: enabled_color, help_color: help_color } "#<#{self.class}: #{attributes.each { |name, val| "@#{name}=#{val}" }}" end
[ "def", "inspect", "attributes", "=", "{", "input", ":", "input", ",", "output", ":", "output", ",", "prefix", ":", "prefix", ",", "active_color", ":", "active_color", ",", "error_color", ":", "error_color", ",", "enabled_color", ":", "enabled_color", ",", "h...
Inspect class name and public attributes @return [String] @api public
[ "Inspect", "class", "name", "and", "public", "attributes", "@return", "[", "String", "]" ]
b1ff627afff98fa6477e5ef3ac4a718c52eff05a
https://github.com/piotrmurach/tty-prompt/blob/b1ff627afff98fa6477e5ef3ac4a718c52eff05a/lib/tty/prompt.rb#L565-L576
train
Inspect the object s attributes.
[ 30522, 13366, 22459, 12332, 1027, 1063, 7953, 1024, 7953, 1010, 6434, 1024, 6434, 1010, 17576, 1024, 17576, 1010, 3161, 1035, 3609, 1024, 3161, 1035, 3609, 1010, 7561, 1035, 3609, 1024, 7561, 1035, 3609, 1010, 9124, 1035, 3609, 1024, 9124, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb
Azure::Storage::Mgmt::V2018_07_01.BlobContainers.lock_immutability_policy_with_http_info
def lock_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers:nil) lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! end
ruby
def lock_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers:nil) lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! end
[ "def", "lock_immutability_policy_with_http_info", "(", "resource_group_name", ",", "account_name", ",", "container_name", ",", "if_match", ",", "custom_headers", ":", "nil", ")", "lock_immutability_policy_async", "(", "resource_group_name", ",", "account_name", ",", "contai...
Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. @param resource_group_name [String] The name of the resource group within the user's subscription. The name is case insensitive. @param account_name [String] The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. @param container_name [String] The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. @param if_match [String] The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Sets", "the", "ImmutabilityPolicy", "to", "Locked", "state", ".", "The", "only", "action", "allowed", "on", "a", "Locked", "policy", "is", "ExtendImmutabilityPolicy", "action", ".", "ETag", "in", "If", "-", "Match", "is", "required", "for", "this", "operation...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb#L1468-L1470
train
Locks the immutability policy of the specified container.
[ 30522, 13366, 5843, 1035, 10047, 28120, 8010, 1035, 3343, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 11661, 1035, 2171, 1010, 2065, 1035, 2674, 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_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.get_custom_entity_role
def get_custom_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil) response = get_custom_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_custom_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil) response = get_custom_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_custom_entity_role", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "role_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_custom_entity_role_async", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "role_id", ",", ...
Get one role for a given prebuilt 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 role_id entity role ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EntityRole] operation results.
[ "Get", "one", "role", "for", "a", "given", "prebuilt", "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#L10967-L10970
train
Gets the role for an entity in a version of the application.
[ 30522, 13366, 2131, 1035, 7661, 1035, 9178, 1035, 2535, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 1035, 8909, 1010, 2535, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 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...
seejohnrun/ice_cube
lib/ice_cube/schedule.rb
IceCube.Schedule.occurs_between?
def occurs_between?(begin_time, closing_time, options = {}) enumerate_occurrences(begin_time, closing_time, options).next true rescue StopIteration false end
ruby
def occurs_between?(begin_time, closing_time, options = {}) enumerate_occurrences(begin_time, closing_time, options).next true rescue StopIteration false end
[ "def", "occurs_between?", "(", "begin_time", ",", "closing_time", ",", "options", "=", "{", "}", ")", "enumerate_occurrences", "(", "begin_time", ",", "closing_time", ",", "options", ")", ".", "next", "true", "rescue", "StopIteration", "false", "end" ]
Return a boolean indicating if an occurrence falls between two times
[ "Return", "a", "boolean", "indicating", "if", "an", "occurrence", "falls", "between", "two", "times" ]
fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd
https://github.com/seejohnrun/ice_cube/blob/fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd/lib/ice_cube/schedule.rb#L218-L223
train
Returns true if the given time range occurs between the given time range.
[ 30522, 13366, 5158, 1035, 2090, 1029, 1006, 4088, 1035, 2051, 1010, 5494, 1035, 2051, 1010, 7047, 1027, 1063, 1065, 1007, 4372, 17897, 11657, 1035, 27247, 1006, 4088, 1035, 2051, 1010, 5494, 1035, 2051, 1010, 7047, 1007, 1012, 2279, 2995, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb
Azure::CDN::Mgmt::V2017_04_02.CustomDomains.begin_create
def begin_create(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:nil) response = begin_create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_create(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:nil) response = begin_create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_create", "(", "resource_group_name", ",", "profile_name", ",", "endpoint_name", ",", "custom_domain_name", ",", "custom_domain_properties", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_create_async", "(", "resource_group_name", ",", "pro...
Creates a new custom domain within an endpoint. @param resource_group_name [String] Name of the Resource group within the Azure subscription. @param profile_name [String] Name of the CDN profile which is unique within the resource group. @param endpoint_name [String] Name of the endpoint under the profile which is unique globally. @param custom_domain_name [String] Name of the custom domain within an endpoint. @param custom_domain_properties [CustomDomainParameters] Properties required to create a new custom domain. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [CustomDomain] operation results.
[ "Creates", "a", "new", "custom", "domain", "within", "an", "endpoint", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb#L609-L612
train
Creates a new domain in the specified subscription.
[ 30522, 13366, 4088, 1035, 3443, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 6337, 1035, 2171, 1010, 2203, 8400, 1035, 2171, 1010, 7661, 1035, 5884, 1035, 2171, 1010, 7661, 1035, 5884, 1035, 5144, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
puppetlabs/puppet
lib/puppet/environments.rb
Puppet::Environments.Cached.clear_all_expired
def clear_all_expired() t = Time.now return if t < @next_expiration && ! @cache.any? {|name, _| @cache_expiration_service.expired?(name.to_sym) } to_expire = @cache.select { |name, entry| entry.expires < t || @cache_expiration_service.expired?(name.to_sym) } to_expire.each do |name, entry| Puppet.debug {"Evicting cache entry for environment '#{name}'"} @cache_expiration_service.evicted(name) clear(name) @expirations.delete(entry.expires) Puppet.settings.clear_environment_settings(name) end @next_expiration = @expirations.first || END_OF_TIME end
ruby
def clear_all_expired() t = Time.now return if t < @next_expiration && ! @cache.any? {|name, _| @cache_expiration_service.expired?(name.to_sym) } to_expire = @cache.select { |name, entry| entry.expires < t || @cache_expiration_service.expired?(name.to_sym) } to_expire.each do |name, entry| Puppet.debug {"Evicting cache entry for environment '#{name}'"} @cache_expiration_service.evicted(name) clear(name) @expirations.delete(entry.expires) Puppet.settings.clear_environment_settings(name) end @next_expiration = @expirations.first || END_OF_TIME end
[ "def", "clear_all_expired", "(", ")", "t", "=", "Time", ".", "now", "return", "if", "t", "<", "@next_expiration", "&&", "!", "@cache", ".", "any?", "{", "|", "name", ",", "_", "|", "@cache_expiration_service", ".", "expired?", "(", "name", ".", "to_sym",...
Clears all environments that have expired, either by exceeding their time to live, or through an explicit eviction determined by the cache expiration service.
[ "Clears", "all", "environments", "that", "have", "expired", "either", "by", "exceeding", "their", "time", "to", "live", "or", "through", "an", "explicit", "eviction", "determined", "by", "the", "cache", "expiration", "service", "." ]
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/environments.rb#L396-L408
train
Clear all expired caches
[ 30522, 13366, 3154, 1035, 2035, 1035, 13735, 1006, 1007, 1056, 1027, 2051, 1012, 2085, 2709, 2065, 1056, 1026, 1030, 2279, 1035, 4654, 16781, 1004, 1004, 999, 1030, 17053, 1012, 2151, 1029, 1063, 1064, 2171, 1010, 1035, 1064, 1030, 17053, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user.rb
Azure::ApiManagement::Mgmt::V2018_01_01.User.get_entity_tag_with_http_info
def get_entity_tag_with_http_info(resource_group_name, service_name, uid, custom_headers:nil) get_entity_tag_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! end
ruby
def get_entity_tag_with_http_info(resource_group_name, service_name, uid, custom_headers:nil) get_entity_tag_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value! end
[ "def", "get_entity_tag_with_http_info", "(", "resource_group_name", ",", "service_name", ",", "uid", ",", "custom_headers", ":", "nil", ")", "get_entity_tag_async", "(", "resource_group_name", ",", "service_name", ",", "uid", ",", "custom_headers", ":custom_headers", ")...
Gets the entity state (Etag) version of the user specified by its identifier. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param uid [String] User identifier. Must be unique in the current API Management service instance. @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", "entity", "state", "(", "Etag", ")", "version", "of", "the", "user", "specified", "by", "its", "identifier", "." ]
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/user.rb#L301-L303
train
Gets the entity tag for the specified managed product.
[ 30522, 13366, 2131, 1035, 9178, 1035, 6415, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 21318, 2094, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 9178, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/site.rb
Jekyll.Site.post_attr_hash
def post_attr_hash(post_attr) # Build a hash map based on the specified post attribute ( post attr => # array of posts ) then sort each array in reverse order. @post_attr_hash[post_attr] ||= begin hash = Hash.new { |h, key| h[key] = [] } posts.docs.each do |p| p.data[post_attr]&.each { |t| hash[t] << p } end hash.each_value { |posts| posts.sort!.reverse! } hash end end
ruby
def post_attr_hash(post_attr) # Build a hash map based on the specified post attribute ( post attr => # array of posts ) then sort each array in reverse order. @post_attr_hash[post_attr] ||= begin hash = Hash.new { |h, key| h[key] = [] } posts.docs.each do |p| p.data[post_attr]&.each { |t| hash[t] << p } end hash.each_value { |posts| posts.sort!.reverse! } hash end end
[ "def", "post_attr_hash", "(", "post_attr", ")", "# Build a hash map based on the specified post attribute ( post attr =>", "# array of posts ) then sort each array in reverse order.", "@post_attr_hash", "[", "post_attr", "]", "||=", "begin", "hash", "=", "Hash", ".", "new", "{", ...
Construct a Hash of Posts indexed by the specified Post attribute. post_attr - The String name of the Post attribute. Examples post_attr_hash('categories') # => { 'tech' => [<Post A>, <Post B>], # 'ruby' => [<Post B>] } Returns the Hash: { attr => posts } where attr - One of the values for the requested attribute. posts - The Array of Posts with the given attr value.
[ "Construct", "a", "Hash", "of", "Posts", "indexed", "by", "the", "specified", "Post", "attribute", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/site.rb#L242-L253
train
Returns a hash map of post attributes to the post attributes.
[ 30522, 13366, 2695, 1035, 2012, 16344, 1035, 23325, 1006, 2695, 1035, 2012, 16344, 1007, 1001, 3857, 1037, 23325, 4949, 2241, 2006, 1996, 9675, 2695, 17961, 1006, 2695, 2012, 16344, 1027, 1028, 1001, 9140, 1997, 8466, 1007, 2059, 4066, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb
Azure::SQL::Mgmt::V2014_04_01.Databases.list_metric_definitions_with_http_info
def list_metric_definitions_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! end
ruby
def list_metric_definitions_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! end
[ "def", "list_metric_definitions_with_http_info", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "custom_headers", ":", "nil", ")", "list_metric_definitions_async", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "custom...
Returns database metric definitions. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server. @param database_name [String] The name of the database. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Returns", "database", "metric", "definitions", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb#L1259-L1261
train
Gets the metric definitions for the specified database.
[ 30522, 13366, 2862, 1035, 12046, 1035, 15182, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2862, 1035, 12046,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_notification.rb
Aws::S3.BucketNotification.put
def put(options = {}) options = options.merge(bucket: @bucket_name) resp = @client.put_bucket_notification_configuration(options) resp.data end
ruby
def put(options = {}) options = options.merge(bucket: @bucket_name) resp = @client.put_bucket_notification_configuration(options) resp.data end
[ "def", "put", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "bucket", ":", "@bucket_name", ")", "resp", "=", "@client", ".", "put_bucket_notification_configuration", "(", "options", ")", "resp", ".", "data", "end" ]
@!group Actions @example Request syntax with placeholder values bucket_notification.put({ notification_configuration: { # required topic_configurations: [ { id: "NotificationId", topic_arn: "TopicArn", # required events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed filter: { key: { filter_rules: [ { name: "prefix", # accepts prefix, suffix value: "FilterRuleValue", }, ], }, }, }, ], queue_configurations: [ { id: "NotificationId", queue_arn: "QueueArn", # required events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed filter: { key: { filter_rules: [ { name: "prefix", # accepts prefix, suffix value: "FilterRuleValue", }, ], }, }, }, ], lambda_function_configurations: [ { id: "NotificationId", lambda_function_arn: "LambdaFunctionArn", # required events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed filter: { key: { filter_rules: [ { name: "prefix", # accepts prefix, suffix value: "FilterRuleValue", }, ], }, }, }, ], }, }) @param [Hash] options ({}) @option options [required, Types::NotificationConfiguration] :notification_configuration A container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off for the bucket. @return [EmptyStructure]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_notification.rb#L246-L250
train
Put notification configuration
[ 30522, 13366, 2404, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 13610, 1024, 1030, 13610, 1035, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 2404, 1035, 13610, 1035, 26828, 1035, 9563, 1006, 7047, 1007, 2450...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
appium/ruby_lib
lib/appium_lib/ios/common/helper.rb
Appium.Ios.ele_by_json
def ele_by_json(opts) opts[:onlyFirst] = true result = _by_json(opts).first raise _no_such_element if result.nil? result end
ruby
def ele_by_json(opts) opts[:onlyFirst] = true result = _by_json(opts).first raise _no_such_element if result.nil? result end
[ "def", "ele_by_json", "(", "opts", ")", "opts", "[", ":onlyFirst", "]", "=", "true", "result", "=", "_by_json", "(", "opts", ")", ".", "first", "raise", "_no_such_element", "if", "result", ".", "nil?", "result", "end" ]
see eles_by_json
[ "see", "eles_by_json" ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/common/helper.rb#L511-L517
train
Returns the first element in the list
[ 30522, 13366, 3449, 2063, 1035, 2011, 1035, 1046, 3385, 1006, 23569, 2015, 1007, 23569, 2015, 1031, 1024, 2069, 8873, 12096, 1033, 1027, 2995, 2765, 1027, 1035, 2011, 1035, 1046, 3385, 1006, 23569, 2015, 1007, 30524, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
etewiah/property_web_builder
app/models/pwb/website.rb
Pwb.Website.logo_url
def logo_url logo_url = nil logo_content = Content.find_by_key("logo") if logo_content && !logo_content.content_photos.empty? logo_url = logo_content.content_photos.first.image_url end logo_url end
ruby
def logo_url logo_url = nil logo_content = Content.find_by_key("logo") if logo_content && !logo_content.content_photos.empty? logo_url = logo_content.content_photos.first.image_url end logo_url end
[ "def", "logo_url", "logo_url", "=", "nil", "logo_content", "=", "Content", ".", "find_by_key", "(", "\"logo\"", ")", "if", "logo_content", "&&", "!", "logo_content", ".", "content_photos", ".", "empty?", "logo_url", "=", "logo_content", ".", "content_photos", "....
def custom_css_file # used by css_controller to decide which file to compile # with user set variables. custom_css_file = "standard" # if self.site_template.present? && self.site_template.custom_css_file # custom_css_file = self.site_template.custom_css_file # end custom_css_file end
[ "def", "custom_css_file", "#", "used", "by", "css_controller", "to", "decide", "which", "file", "to", "compile", "#", "with", "user", "set", "variables", ".", "custom_css_file", "=", "standard", "#", "if", "self", ".", "site_template", ".", "present?", "&&", ...
fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21
https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/models/pwb/website.rb#L199-L206
train
Get the logo url
[ 30522, 13366, 8154, 1035, 24471, 2140, 8154, 1035, 24471, 2140, 1027, 9152, 2140, 8154, 1035, 4180, 1027, 4180, 1012, 2424, 1035, 30524, 1000, 8154, 1000, 1007, 2065, 8154, 1035, 4180, 1004, 1004, 999, 8154, 1035, 4180, 1012, 4180, 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_consumption/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb
Azure::Consumption::Mgmt::V2018_06_30.UsageDetails.list_by_department_as_lazy
def list_by_department_as_lazy(department_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil) response = list_by_department_async(department_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_department_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_department_as_lazy(department_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil) response = list_by_department_async(department_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_department_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_department_as_lazy", "(", "department_id", ",", "expand", ":", "nil", ",", "filter", ":", "nil", ",", "skiptoken", ":", "nil", ",", "top", ":", "nil", ",", "query_options", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "="...
Lists the usage details by departmentId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later. @param department_id [String] Department ID @param expand [String] May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. @param filter [String] May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). @param skiptoken [String] Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @param 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 [UsageDetailsListResult] which provide lazy access to pages of the response.
[ "Lists", "the", "usage", "details", "by", "departmentId", "for", "a", "scope", "by", "current", "billing", "period", ".", "Usage", "details", "are", "available", "via", "this", "API", "only", "for", "May", "1", "2014", "or", "later", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_consumption/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb#L2156-L2165
train
Gets the list of all the terms of the domain.
[ 30522, 13366, 2862, 1035, 2011, 1035, 2533, 1035, 2004, 1035, 13971, 1006, 2533, 1035, 8909, 1010, 7818, 1024, 9152, 2140, 1010, 11307, 1024, 9152, 2140, 1010, 13558, 18715, 2368, 1024, 9152, 2140, 1010, 2327, 1024, 9152, 2140, 1010, 23032,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb
Azure::KeyVault::V2016_10_01.KeyVaultClient.unwrap_key_with_http_info
def unwrap_key_with_http_info(vault_base_url, key_name, key_version, algorithm, value, custom_headers:nil) unwrap_key_async(vault_base_url, key_name, key_version, algorithm, value, custom_headers:custom_headers).value! end
ruby
def unwrap_key_with_http_info(vault_base_url, key_name, key_version, algorithm, value, custom_headers:nil) unwrap_key_async(vault_base_url, key_name, key_version, algorithm, value, custom_headers:custom_headers).value! end
[ "def", "unwrap_key_with_http_info", "(", "vault_base_url", ",", "key_name", ",", "key_version", ",", "algorithm", ",", "value", ",", "custom_headers", ":", "nil", ")", "unwrap_key_async", "(", "vault_base_url", ",", "key_name", ",", "key_version", ",", "algorithm", ...
Unwraps a symmetric key using the specified key that was initially used for wrapping that key. The UNWRAP operation supports decryption of a symmetric key using the target key encryption key. This operation is the reverse of the WRAP operation. The UNWRAP operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key. This operation requires the keys/unwrapKey permission. @param vault_base_url [String] The vault name, for example https://myvault.vault.azure.net. @param key_name [String] The name of the key. @param key_version [String] The version of the key. @param algorithm [JsonWebKeyEncryptionAlgorithm] algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' @param value @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.
[ "Unwraps", "a", "symmetric", "key", "using", "the", "specified", "key", "that", "was", "initially", "used", "for", "wrapping", "that", "key", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L2109-L2111
train
Unwrap a key.
[ 30522, 13366, 4895, 13088, 9331, 1035, 3145, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 3145, 1035, 2171, 1010, 3145, 1035, 2544, 1010, 9896, 1010, 3643, 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...
square/connect-ruby-sdk
lib/square_connect/models/v1_page.rb
SquareConnect.V1Page.page_index=
def page_index=(page_index) if !page_index.nil? && page_index > 6 fail ArgumentError, "invalid value for 'page_index', must be smaller than or equal to 6." end if !page_index.nil? && page_index < 0 fail ArgumentError, "invalid value for 'page_index', must be greater than or equal to 0." end @page_index = page_index end
ruby
def page_index=(page_index) if !page_index.nil? && page_index > 6 fail ArgumentError, "invalid value for 'page_index', must be smaller than or equal to 6." end if !page_index.nil? && page_index < 0 fail ArgumentError, "invalid value for 'page_index', must be greater than or equal to 0." end @page_index = page_index end
[ "def", "page_index", "=", "(", "page_index", ")", "if", "!", "page_index", ".", "nil?", "&&", "page_index", ">", "6", "fail", "ArgumentError", ",", "\"invalid value for 'page_index', must be smaller than or equal to 6.\"", "end", "if", "!", "page_index", ".", "nil?", ...
Custom attribute writer method with validation @param [Object] page_index Value to be assigned
[ "Custom", "attribute", "writer", "method", "with", "validation" ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/v1_page.rb#L101-L112
train
Sets the page_index of the page.
[ 30522, 13366, 3931, 1035, 5950, 1027, 1006, 3931, 1035, 5950, 30524, 9152, 2140, 1029, 1004, 1004, 3931, 1035, 5950, 1026, 1014, 8246, 6685, 2121, 29165, 1010, 1000, 19528, 3643, 2005, 1005, 3931, 1035, 5950, 1005, 1010, 2442, 2022, 3618, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/package.rb
Axlsx.Package.serialize
def serialize(output, confirm_valid=false) return false unless !confirm_valid || self.validate.empty? Relationship.clear_cached_instances Zip::OutputStream.open(output) do |zip| write_parts(zip) end true end
ruby
def serialize(output, confirm_valid=false) return false unless !confirm_valid || self.validate.empty? Relationship.clear_cached_instances Zip::OutputStream.open(output) do |zip| write_parts(zip) end true end
[ "def", "serialize", "(", "output", ",", "confirm_valid", "=", "false", ")", "return", "false", "unless", "!", "confirm_valid", "||", "self", ".", "validate", ".", "empty?", "Relationship", ".", "clear_cached_instances", "Zip", "::", "OutputStream", ".", "open", ...
Serialize your workbook to disk as an xlsx document. @param [String] output The name of the file you want to serialize your package to @param [Boolean] confirm_valid Validate the package prior to serialization. @return [Boolean] False if confirm_valid and validation errors exist. True if the package was serialized @note A tremendous amount of effort has gone into ensuring that you cannot create invalid xlsx documents. confirm_valid should be used in the rare case that you cannot open the serialized file. @see Package#validate @example # This is how easy it is to create a valid xlsx file. Of course you might want to add a sheet or two, and maybe some data, styles and charts. # Take a look at the README for an example of how to do it! #serialize to a file p = Axlsx::Package.new # ......add cool stuff to your workbook...... p.serialize("example.xlsx") # Serialize to a stream s = p.to_stream() File.open('example_streamed.xlsx', 'w') { |f| f.write(s.read) }
[ "Serialize", "your", "workbook", "to", "disk", "as", "an", "xlsx", "document", "." ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/package.rb#L101-L108
train
Serialize the object to a zip file
[ 30522, 13366, 7642, 4697, 1006, 6434, 1010, 12210, 1035, 9398, 1027, 6270, 1007, 2709, 6270, 4983, 999, 12210, 1035, 9398, 1064, 1064, 2969, 1012, 9398, 3686, 1012, 4064, 1029, 3276, 1012, 3154, 1035, 17053, 2094, 1035, 12107, 14101, 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...
mikel/mail
lib/mail/network/retriever_methods/pop3.rb
Mail.POP3.validate_options
def validate_options(options) options = options ? Hash[options] : {} options[:count] ||= 10 options[:order] ||= :asc options[:what] ||= :first options[:delete_after_find] ||= false options end
ruby
def validate_options(options) options = options ? Hash[options] : {} options[:count] ||= 10 options[:order] ||= :asc options[:what] ||= :first options[:delete_after_find] ||= false options end
[ "def", "validate_options", "(", "options", ")", "options", "=", "options", "?", "Hash", "[", "options", "]", ":", "{", "}", "options", "[", ":count", "]", "||=", "10", "options", "[", ":order", "]", "||=", ":asc", "options", "[", ":what", "]", "||=", ...
Set default options
[ "Set", "default", "options" ]
fb53fb369eb2bf0494ac70675970c90cdcc3f495
https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/network/retriever_methods/pop3.rb#L115-L122
train
Validate the options
[ 30522, 13366, 9398, 3686, 1035, 7047, 1006, 7047, 1007, 7047, 1027, 7047, 1029, 23325, 1031, 7047, 1033, 1024, 1063, 1065, 7047, 1031, 1024, 4175, 1033, 1064, 1064, 1027, 2184, 7047, 1031, 1024, 2344, 1033, 1064, 1064, 1027, 1024, 2004, 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...
fastlane/fastlane
supply/lib/supply/client.rb
Supply.Client.commit_current_edit!
def commit_current_edit! ensure_active_edit! call_google_api { client.commit_edit(current_package_name, current_edit.id) } self.current_edit = nil self.current_package_name = nil end
ruby
def commit_current_edit! ensure_active_edit! call_google_api { client.commit_edit(current_package_name, current_edit.id) } self.current_edit = nil self.current_package_name = nil end
[ "def", "commit_current_edit!", "ensure_active_edit!", "call_google_api", "{", "client", ".", "commit_edit", "(", "current_package_name", ",", "current_edit", ".", "id", ")", "}", "self", ".", "current_edit", "=", "nil", "self", ".", "current_package_name", "=", "nil...
Commits the current edit saving all pending changes on Google Play
[ "Commits", "the", "current", "edit", "saving", "all", "pending", "changes", "on", "Google", "Play" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L161-L168
train
Commit the current edit to Google API
[ 30522, 13366, 10797, 1035, 2783, 1035, 10086, 999, 5676, 1035, 3161, 1035, 10086, 999, 2655, 1035, 8224, 1035, 17928, 1063, 7396, 1012, 10797, 1035, 10086, 1006, 2783, 1035, 7427, 1035, 2171, 1010, 2783, 30524, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_deployed_service_replica_detail_info
def get_deployed_service_replica_detail_info(node_name, partition_id, replica_id, timeout:60, custom_headers:nil) response = get_deployed_service_replica_detail_info_async(node_name, partition_id, replica_id, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_deployed_service_replica_detail_info(node_name, partition_id, replica_id, timeout:60, custom_headers:nil) response = get_deployed_service_replica_detail_info_async(node_name, partition_id, replica_id, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_deployed_service_replica_detail_info", "(", "node_name", ",", "partition_id", ",", "replica_id", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_deployed_service_replica_detail_info_async", "(", "node_name", ",", "par...
Gets the details of replica deployed on a Service Fabric node. Gets the details of the replica deployed on a Service Fabric node. The information include service kind, service name, current service operation, current service operation start date time, partition ID, replica/instance ID, reported load, and other information. @param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @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 [DeployedServiceReplicaDetailInfo] operation results.
[ "Gets", "the", "details", "of", "replica", "deployed", "on", "a", "Service", "Fabric", "node", "." ]
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#L15481-L15484
train
Gets the details of the service replica.
[ 30522, 13366, 2131, 1035, 7333, 1035, 2326, 1035, 15059, 1035, 6987, 1035, 18558, 1006, 13045, 1035, 2171, 1010, 13571, 1035, 8909, 1010, 15059, 1035, 8909, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/network_interfaces.rb
Azure::Network::Mgmt::V2017_03_30.NetworkInterfaces.get_virtual_machine_scale_set_ip_configuration_with_http_info
def get_virtual_machine_scale_set_ip_configuration_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, expand:nil, custom_headers:nil) get_virtual_machine_scale_set_ip_configuration_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, expand:expand, custom_headers:custom_headers).value! end
ruby
def get_virtual_machine_scale_set_ip_configuration_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, expand:nil, custom_headers:nil) get_virtual_machine_scale_set_ip_configuration_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, expand:expand, custom_headers:custom_headers).value! end
[ "def", "get_virtual_machine_scale_set_ip_configuration_with_http_info", "(", "resource_group_name", ",", "virtual_machine_scale_set_name", ",", "virtualmachine_index", ",", "network_interface_name", ",", "ip_configuration_name", ",", "expand", ":", "nil", ",", "custom_headers", "...
Get the specified network interface ip configuration in a virtual machine scale set. @param resource_group_name [String] The name of the resource group. @param virtual_machine_scale_set_name [String] The name of the virtual machine scale set. @param virtualmachine_index [String] The virtual machine index. @param network_interface_name [String] The name of the network interface. @param ip_configuration_name [String] The name of the ip configuration. @param expand [String] Expands referenced resources. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Get", "the", "specified", "network", "interface", "ip", "configuration", "in", "a", "virtual", "machine", "scale", "set", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/network_interfaces.rb#L476-L478
train
Gets the specified network interface ip configuration.
[ 30522, 13366, 2131, 1035, 7484, 1035, 3698, 1035, 4094, 1035, 2275, 1035, 12997, 1035, 9563, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 3698, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 7484, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
github/linguist
samples/Ruby/sinatra.rb
Sinatra.Helpers.expires
def expires(amount, *values) values << {} unless values.last.kind_of?(Hash) if amount.is_a? Integer time = Time.now + amount.to_i max_age = amount else time = time_for amount max_age = time - Time.now end values.last.merge!(:max_age => max_age) cache_control(*values) response['Expires'] = time.httpdate end
ruby
def expires(amount, *values) values << {} unless values.last.kind_of?(Hash) if amount.is_a? Integer time = Time.now + amount.to_i max_age = amount else time = time_for amount max_age = time - Time.now end values.last.merge!(:max_age => max_age) cache_control(*values) response['Expires'] = time.httpdate end
[ "def", "expires", "(", "amount", ",", "*", "values", ")", "values", "<<", "{", "}", "unless", "values", ".", "last", ".", "kind_of?", "(", "Hash", ")", "if", "amount", ".", "is_a?", "Integer", "time", "=", "Time", ".", "now", "+", "amount", ".", "t...
Set the Expires header and Cache-Control/max-age directive. Amount can be an integer number of seconds in the future or a Time object indicating when the response should be considered "stale". The remaining "values" arguments are passed to the #cache_control helper: expires 500, :public, :must_revalidate => Cache-Control: public, must-revalidate, max-age=60 => Expires: Mon, 08 Jun 2009 08:50:17 GMT
[ "Set", "the", "Expires", "header", "and", "Cache", "-", "Control", "/", "max", "-", "age", "directive", ".", "Amount", "can", "be", "an", "integer", "number", "of", "seconds", "in", "the", "future", "or", "a", "Time", "object", "indicating", "when", "the...
9116c90fcbb82ac03b4b33c58cfbde1fcf745e99
https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/samples/Ruby/sinatra.rb#L387-L402
train
Set the expires header
[ 30522, 13366, 4654, 20781, 2015, 1006, 3815, 1010, 1008, 5300, 1007, 5300, 1026, 1026, 1063, 1065, 4983, 5300, 1012, 2197, 1012, 2785, 1035, 1997, 1029, 1006, 23325, 1007, 2065, 3815, 1012, 2003, 1035, 1037, 1029, 16109, 2051, 1027, 2051, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb
Aws::AutoScaling.AutoScalingGroup.attach_instances
def attach_instances(options = {}) options = options.merge(auto_scaling_group_name: @name) resp = @client.attach_instances(options) resp.data end
ruby
def attach_instances(options = {}) options = options.merge(auto_scaling_group_name: @name) resp = @client.attach_instances(options) resp.data end
[ "def", "attach_instances", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "auto_scaling_group_name", ":", "@name", ")", "resp", "=", "@client", ".", "attach_instances", "(", "options", ")", "resp", ".", "data", "end" ]
@!group Actions @example Request syntax with placeholder values auto_scaling_group.attach_instances({ instance_ids: ["XmlStringMaxLen19"], }) @param [Hash] options ({}) @option options [Array<String>] :instance_ids The IDs of the instances. You can specify up to 20 instances. @return [EmptyStructure]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L383-L387
train
Attaches the instances to this auto scaling group.
[ 30522, 13366, 22476, 1035, 12107, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 8285, 1035, 25169, 1035, 2177, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 22476, 1035, 12107, 1006, 704...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.cache_embed_data
def cache_embed_data data = JSON.parse(API::Server.embed(@bot.token, @id)) @embed_enabled = data['enabled'] @embed_channel_id = data['channel_id'] end
ruby
def cache_embed_data data = JSON.parse(API::Server.embed(@bot.token, @id)) @embed_enabled = data['enabled'] @embed_channel_id = data['channel_id'] end
[ "def", "cache_embed_data", "data", "=", "JSON", ".", "parse", "(", "API", "::", "Server", ".", "embed", "(", "@bot", ".", "token", ",", "@id", ")", ")", "@embed_enabled", "=", "data", "[", "'enabled'", "]", "@embed_channel_id", "=", "data", "[", "'channe...
Cache @embed @note For internal use only @!visibility private
[ "Cache" ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/server.rb#L173-L177
train
Cache the data for the embed.
[ 30522, 13366, 17053, 1035, 7861, 8270, 1035, 2951, 2951, 1027, 1046, 3385, 1012, 11968, 3366, 1006, 17928, 1024, 1024, 8241, 1012, 7861, 8270, 1006, 1030, 28516, 1012, 19204, 1010, 1030, 8909, 1007, 1007, 1030, 7861, 8270, 1035, 9124, 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...
typhoeus/typhoeus
lib/typhoeus/easy_factory.rb
Typhoeus.EasyFactory.get
def get begin easy.http_request( request.base_url.to_s, request.options.fetch(:method, :get), sanitize(request.options) ) rescue Ethon::Errors::InvalidOption => e help = provide_help(e.message.match(/:\s(\w+)/)[1]) raise $!, "#{$!}#{help}", $!.backtrace end set_callback easy end
ruby
def get begin easy.http_request( request.base_url.to_s, request.options.fetch(:method, :get), sanitize(request.options) ) rescue Ethon::Errors::InvalidOption => e help = provide_help(e.message.match(/:\s(\w+)/)[1]) raise $!, "#{$!}#{help}", $!.backtrace end set_callback easy end
[ "def", "get", "begin", "easy", ".", "http_request", "(", "request", ".", "base_url", ".", "to_s", ",", "request", ".", "options", ".", "fetch", "(", ":method", ",", ":get", ")", ",", "sanitize", "(", "request", ".", "options", ")", ")", "rescue", "Etho...
Fabricated easy. @example Prepared easy. easy_factory.get @return [ Ethon::Easy ] The easy.
[ "Fabricated", "easy", "." ]
d072aaf6edcf46d54d6a6bce45286629bf4e5af6
https://github.com/typhoeus/typhoeus/blob/d072aaf6edcf46d54d6a6bce45286629bf4e5af6/lib/typhoeus/easy_factory.rb#L79-L92
train
Get the next request ID
[ 30522, 13366, 2131, 4088, 3733, 1012, 8299, 1035, 5227, 1006, 5227, 1012, 2918, 1035, 24471, 2140, 1012, 2000, 1035, 1055, 1010, 5227, 1012, 7047, 1012, 18584, 1006, 1024, 4118, 1010, 1024, 2131, 1007, 1010, 2624, 25090, 4371, 1006, 5227, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
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_usages_as_lazy
def list_web_worker_usages_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:nil) response = list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_web_worker_usages_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:nil) response = list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_web_worker_usages_as_lazy", "(", "resource_group_name", ",", "name", ",", "worker_pool_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_web_worker_usages_async", "(", "resource_group_name", ",", "name", ",", "worker_pool_name", ",", "cu...
Get usage metrics for a worker pool of an App Service Environment. Get usage metrics for a worker pool of an App Service Environment. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [UsageCollection] which provide lazy access to pages of the response.
[ "Get", "usage", "metrics", "for", "a", "worker", "pool", "of", "an", "App", "Service", "Environment", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L8001-L8010
train
Gets all the worker pool usages for a worker pool.
[ 30522, 13366, 2862, 1035, 4773, 1035, 7309, 1035, 8192, 2015, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 7309, 1035, 4770, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
backup/backup
integration/support/example_helpers.rb
BackupSpec.ExampleHelpers.create_model
def create_model(trigger, text, config_file = nil) config_file ||= Backup::Config.config_file model_path = File.join(File.dirname(config_file), "models") model_file = File.join(model_path, trigger.to_s + ".rb") create_config(nil, config_file) unless File.exist?(config_file) indent = text.lines.first.match(/^ */)[0].length text = text.lines.map { |l| l[indent..-1] }.join config = <<-EOS.gsub(/^ /, "") # encoding: utf-8 #{text} EOS File.open(model_file, "w") { |f| f.write config } end
ruby
def create_model(trigger, text, config_file = nil) config_file ||= Backup::Config.config_file model_path = File.join(File.dirname(config_file), "models") model_file = File.join(model_path, trigger.to_s + ".rb") create_config(nil, config_file) unless File.exist?(config_file) indent = text.lines.first.match(/^ */)[0].length text = text.lines.map { |l| l[indent..-1] }.join config = <<-EOS.gsub(/^ /, "") # encoding: utf-8 #{text} EOS File.open(model_file, "w") { |f| f.write config } end
[ "def", "create_model", "(", "trigger", ",", "text", ",", "config_file", "=", "nil", ")", "config_file", "||=", "Backup", "::", "Config", ".", "config_file", "model_path", "=", "File", ".", "join", "(", "File", ".", "dirname", "(", "config_file", ")", ",", ...
Creates a model file. Pass +config_file+ if it won"t be at the default path +~/Backup/+. Creates the model as +/models/<trigger>.rb+, relative to the path of +config_file+. Note that the first line in +text+ will set the indent for the text being given and that indent will be removed from all lines in +text+
[ "Creates", "a", "model", "file", "." ]
64370f925e859f858766b674717a3dbee0de7a26
https://github.com/backup/backup/blob/64370f925e859f858766b674717a3dbee0de7a26/integration/support/example_helpers.rb#L71-L87
train
Create a new model
[ 30522, 13366, 3443, 1035, 2944, 1006, 9495, 1010, 3793, 1010, 9530, 8873, 2290, 1035, 5371, 1027, 9152, 2140, 1007, 9530, 8873, 2290, 1035, 5371, 1064, 1064, 1027, 10200, 1024, 1024, 9530, 8873, 2290, 1012, 9530, 8873, 2290, 1035, 5371, 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_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_hierarchical_entity_child
def update_hierarchical_entity_child(app_id, version_id, h_entity_id, h_child_id, hierarchical_child_model_update_object, custom_headers:nil) response = update_hierarchical_entity_child_async(app_id, version_id, h_entity_id, h_child_id, hierarchical_child_model_update_object, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update_hierarchical_entity_child(app_id, version_id, h_entity_id, h_child_id, hierarchical_child_model_update_object, custom_headers:nil) response = update_hierarchical_entity_child_async(app_id, version_id, h_entity_id, h_child_id, hierarchical_child_model_update_object, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update_hierarchical_entity_child", "(", "app_id", ",", "version_id", ",", "h_entity_id", ",", "h_child_id", ",", "hierarchical_child_model_update_object", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_hierarchical_entity_child_async", "(", "app_id...
Renames a single child in an existing hierarchical entity model 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 h_child_id The hierarchical entity extractor child ID. @param hierarchical_child_model_update_object [HierarchicalChildModelUpdateObject] Model object containing new name of the hierarchical entity child. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [OperationStatus] operation results.
[ "Renames", "a", "single", "child", "in", "an", "existing", "hierarchical", "entity", "model", "in", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L5092-L5095
train
Updates a hierarchical entity child.
[ 30522, 13366, 10651, 1035, 25835, 1035, 9178, 1035, 2775, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 1044, 1035, 9178, 1035, 8909, 1010, 1044, 1035, 2775, 1035, 8909, 1010, 25835, 1035, 2775, 1035, 2944, 1035, 10651, 1035, 4874,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sunspot/sunspot
sunspot/lib/sunspot/session.rb
Sunspot.Session.atomic_update
def atomic_update(clazz, updates = {}) @adds += updates.keys.length indexer.add_atomic_update(clazz, updates) end
ruby
def atomic_update(clazz, updates = {}) @adds += updates.keys.length indexer.add_atomic_update(clazz, updates) end
[ "def", "atomic_update", "(", "clazz", ",", "updates", "=", "{", "}", ")", "@adds", "+=", "updates", ".", "keys", ".", "length", "indexer", ".", "add_atomic_update", "(", "clazz", ",", "updates", ")", "end" ]
See Sunspot.atomic_update
[ "See", "Sunspot", ".", "atomic_update" ]
31dd76cd7a14a4ef7bd541de97483d8cd72ff685
https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/session.rb#L105-L108
train
Add a new atomic update to the index.
[ 30522, 13366, 9593, 1035, 10651, 1006, 18856, 10936, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/object_data_types.rb
Azure::Automation::Mgmt::V2015_10_31.ObjectDataTypes.list_fields_by_module_and_type
def list_fields_by_module_and_type(resource_group_name, automation_account_name, module_name, type_name, custom_headers:nil) response = list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_fields_by_module_and_type(resource_group_name, automation_account_name, module_name, type_name, custom_headers:nil) response = list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_fields_by_module_and_type", "(", "resource_group_name", ",", "automation_account_name", ",", "module_name", ",", "type_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_fields_by_module_and_type_async", "(", "resource_group_name", ",", "auto...
Retrieve a list of fields of a given type identified by module name. @param resource_group_name [String] Name of an Azure Resource group. @param automation_account_name [String] The name of the automation account. @param module_name [String] The name of module. @param type_name [String] The name of type. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [TypeFieldListResult] operation results.
[ "Retrieve", "a", "list", "of", "fields", "of", "a", "given", "type", "identified", "by", "module", "name", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/object_data_types.rb#L36-L39
train
Gets the list of fields of a module and type.
[ 30522, 13366, 2862, 1035, 4249, 1035, 2011, 1035, 11336, 1035, 1998, 1035, 2828, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 19309, 1035, 4070, 1035, 2171, 1010, 11336, 1035, 2171, 1010, 2828, 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...
aws/aws-sdk-ruby
gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/instance.rb
Aws::AutoScaling.Instance.attach
def attach(options = {}) options = Aws::Util.deep_merge(options, auto_scaling_group_name: @group_name, instance_ids: [@id] ) resp = @client.attach_instances(options) resp.data end
ruby
def attach(options = {}) options = Aws::Util.deep_merge(options, auto_scaling_group_name: @group_name, instance_ids: [@id] ) resp = @client.attach_instances(options) resp.data end
[ "def", "attach", "(", "options", "=", "{", "}", ")", "options", "=", "Aws", "::", "Util", ".", "deep_merge", "(", "options", ",", "auto_scaling_group_name", ":", "@group_name", ",", "instance_ids", ":", "[", "@id", "]", ")", "resp", "=", "@client", ".", ...
@!group Actions @example Request syntax with placeholder values instance.attach() @param [Hash] options ({}) @return [EmptyStructure]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/instance.rb#L221-L228
train
Attaches this instance to the Auto Scaling group.
[ 30522, 13366, 22476, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 22091, 2015, 1024, 1024, 21183, 4014, 1012, 2784, 1035, 13590, 1006, 7047, 1010, 8285, 1035, 25169, 1035, 2177, 1035, 2171, 1024, 1030, 2177, 1035, 2171, 1010, 6013, 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_face/lib/1.0/generated/azure_cognitiveservices_face/snapshot_operations.rb
Azure::CognitiveServices::Face::V1_0.SnapshotOperations.update_with_http_info
def update_with_http_info(snapshot_id, apply_scope:nil, user_data:nil, custom_headers:nil) update_async(snapshot_id, apply_scope:apply_scope, user_data:user_data, custom_headers:custom_headers).value! end
ruby
def update_with_http_info(snapshot_id, apply_scope:nil, user_data:nil, custom_headers:nil) update_async(snapshot_id, apply_scope:apply_scope, user_data:user_data, custom_headers:custom_headers).value! end
[ "def", "update_with_http_info", "(", "snapshot_id", ",", "apply_scope", ":", "nil", ",", "user_data", ":", "nil", ",", "custom_headers", ":", "nil", ")", "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. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "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#L499-L501
train
Updates a snapshot s segmentation.
[ 30522, 13366, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 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, 10651, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sumoheavy/jira-ruby
lib/jira/base.rb
JIRA.Base.method_missing
def method_missing(method_name, *_args) if attrs.key?(method_name.to_s) attrs[method_name.to_s] else super(method_name) end end
ruby
def method_missing(method_name, *_args) if attrs.key?(method_name.to_s) attrs[method_name.to_s] else super(method_name) end end
[ "def", "method_missing", "(", "method_name", ",", "*", "_args", ")", "if", "attrs", ".", "key?", "(", "method_name", ".", "to_s", ")", "attrs", "[", "method_name", ".", "to_s", "]", "else", "super", "(", "method_name", ")", "end", "end" ]
Overrides method_missing to check the attribute hash for resources matching method_name and proxies the call to the superclass if no match is found.
[ "Overrides", "method_missing", "to", "check", "the", "attribute", "hash", "for", "resources", "matching", "method_name", "and", "proxies", "the", "call", "to", "the", "superclass", "if", "no", "match", "is", "found", "." ]
25e896f227ab81c528e9678708cb546d2f62f018
https://github.com/sumoheavy/jira-ruby/blob/25e896f227ab81c528e9678708cb546d2f62f018/lib/jira/base.rb#L301-L307
train
This method is called by the class to call the method_missing method.
[ 30522, 13366, 4118, 1035, 4394, 1006, 4118, 1035, 2171, 1010, 1008, 1035, 12098, 5620, 1007, 2065, 2012, 16344, 2015, 1012, 3145, 1029, 1006, 4118, 1035, 2171, 1012, 2000, 1035, 1055, 1007, 2012, 16344, 2015, 1031, 4118, 1035, 2171, 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...
alexreisner/geocoder
lib/geocoder/calculations.rb
Geocoder.Calculations.geographic_center
def geographic_center(points) # convert objects to [lat,lon] arrays and convert degrees to radians coords = points.map{ |p| to_radians(extract_coordinates(p)) } # convert to Cartesian coordinates x = []; y = []; z = [] coords.each do |p| x << Math.cos(p[0]) * Math.cos(p[1]) y << Math.cos(p[0]) * Math.sin(p[1]) z << Math.sin(p[0]) end # compute average coordinate values xa, ya, za = [x,y,z].map do |c| c.inject(0){ |tot,i| tot += i } / c.size.to_f end # convert back to latitude/longitude lon = Math.atan2(ya, xa) hyp = Math.sqrt(xa**2 + ya**2) lat = Math.atan2(za, hyp) # return answer in degrees to_degrees [lat, lon] end
ruby
def geographic_center(points) # convert objects to [lat,lon] arrays and convert degrees to radians coords = points.map{ |p| to_radians(extract_coordinates(p)) } # convert to Cartesian coordinates x = []; y = []; z = [] coords.each do |p| x << Math.cos(p[0]) * Math.cos(p[1]) y << Math.cos(p[0]) * Math.sin(p[1]) z << Math.sin(p[0]) end # compute average coordinate values xa, ya, za = [x,y,z].map do |c| c.inject(0){ |tot,i| tot += i } / c.size.to_f end # convert back to latitude/longitude lon = Math.atan2(ya, xa) hyp = Math.sqrt(xa**2 + ya**2) lat = Math.atan2(za, hyp) # return answer in degrees to_degrees [lat, lon] end
[ "def", "geographic_center", "(", "points", ")", "# convert objects to [lat,lon] arrays and convert degrees to radians", "coords", "=", "points", ".", "map", "{", "|", "p", "|", "to_radians", "(", "extract_coordinates", "(", "p", ")", ")", "}", "# convert to Cartesian co...
Compute the geographic center (aka geographic midpoint, center of gravity) for an array of geocoded objects and/or [lat,lon] arrays (can be mixed). Any objects missing coordinates are ignored. Follows the procedure documented at http://www.geomidpoint.com/calculation.html.
[ "Compute", "the", "geographic", "center", "(", "aka", "geographic", "midpoint", "center", "of", "gravity", ")", "for", "an", "array", "of", "geocoded", "objects", "and", "/", "or", "[", "lat", "lon", "]", "arrays", "(", "can", "be", "mixed", ")", ".", ...
e087dc2759264ee6f307b926bb2de4ec2406859e
https://github.com/alexreisner/geocoder/blob/e087dc2759264ee6f307b926bb2de4ec2406859e/lib/geocoder/calculations.rb#L167-L192
train
returns the geographic center of the given array of points
[ 30522, 13366, 9183, 1035, 2415, 1006, 2685, 1007, 1001, 10463, 5200, 2000, 1031, 2474, 2102, 1010, 8840, 2078, 1033, 27448, 1998, 10463, 5445, 2000, 10958, 11692, 2015, 2522, 8551, 2015, 1027, 2685, 1012, 4949, 1063, 1064, 1052, 1064, 2000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
oauth-xx/oauth2
lib/oauth2/authenticator.rb
OAuth2.Authenticator.apply
def apply(params) case mode.to_sym when :basic_auth apply_basic_auth(params) when :request_body apply_params_auth(params) else raise NotImplementedError end end
ruby
def apply(params) case mode.to_sym when :basic_auth apply_basic_auth(params) when :request_body apply_params_auth(params) else raise NotImplementedError end end
[ "def", "apply", "(", "params", ")", "case", "mode", ".", "to_sym", "when", ":basic_auth", "apply_basic_auth", "(", "params", ")", "when", ":request_body", "apply_params_auth", "(", "params", ")", "else", "raise", "NotImplementedError", "end", "end" ]
Apply the request credentials used to authenticate to the Authorization Server Depending on configuration, this might be as request params or as an Authorization header. User-provided params and header take precedence. @param [Hash] params a Hash of params for the token endpoint @return [Hash] params amended with appropriate authentication details
[ "Apply", "the", "request", "credentials", "used", "to", "authenticate", "to", "the", "Authorization", "Server" ]
f08ff9da169136ab133aa2faab0d74a4407deffb
https://github.com/oauth-xx/oauth2/blob/f08ff9da169136ab133aa2faab0d74a4407deffb/lib/oauth2/authenticator.rb#L22-L31
train
Apply the request to the current request.
[ 30522, 13366, 6611, 1006, 11498, 5244, 1007, 2553, 5549, 1012, 2000, 1035, 25353, 2213, 2043, 1024, 3937, 1035, 8740, 2705, 6611, 1035, 3937, 1035, 8740, 2705, 1006, 11498, 5244, 1007, 2043, 1024, 5227, 1035, 2303, 6611, 1035, 11498, 5244, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb
Azure::Batch::Mgmt::V2017_09_01.CertificateOperations.list_by_batch_account_as_lazy
def list_by_batch_account_as_lazy(resource_group_name, account_name, maxresults:nil, select:nil, filter:nil, custom_headers:nil) response = list_by_batch_account_async(resource_group_name, account_name, maxresults:maxresults, select:select, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_batch_account_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_batch_account_as_lazy(resource_group_name, account_name, maxresults:nil, select:nil, filter:nil, custom_headers:nil) response = list_by_batch_account_async(resource_group_name, account_name, maxresults:maxresults, select:select, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_batch_account_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_batch_account_as_lazy", "(", "resource_group_name", ",", "account_name", ",", "maxresults", ":", "nil", ",", "select", ":", "nil", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_batch_account_async", "(...
Lists all of the certificates in the specified account. @param resource_group_name [String] The name of the resource group that contains the Batch account. @param account_name [String] The name of the Batch account. @param maxresults [Integer] The maximum number of items to return in the response. @param select [String] Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. @param filter [String] OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime", "name". @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ListCertificatesResult] which provide lazy access to pages of the response.
[ "Lists", "all", "of", "the", "certificates", "in", "the", "specified", "account", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb#L997-L1006
train
Gets the list of all the available Azure Cognitive Services accounts.
[ 30522, 13366, 2862, 1035, 2011, 1035, 14108, 1035, 4070, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 4098, 6072, 11314, 2015, 1024, 9152, 2140, 1010, 7276, 1024, 9152, 2140, 1010, 11307, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_relay/lib/2016-07-01/generated/azure_mgmt_relay/hybrid_connections.rb
Azure::Relay::Mgmt::V2016_07_01.HybridConnections.get_with_http_info
def get_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil) get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:nil) get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "namespace_name", ",", "hybrid_connection_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "namespace_name", ",", "hybrid_connection_name", ",", "custom_headers", ":c...
Returns the description for the specified HybridConnection. @param resource_group_name [String] Name of the Resource group within the Azure subscription. @param namespace_name [String] The Namespace Name @param hybrid_connection_name [String] The hybrid connection name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Returns", "the", "description", "for", "the", "specified", "HybridConnection", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_relay/lib/2016-07-01/generated/azure_mgmt_relay/hybrid_connections.rb#L366-L368
train
Gets the hybrid connection s properties.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3415, 15327, 1035, 2171, 1010, 8893, 1035, 4434, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 2004, 6038, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
forward3d/rbhive
lib/rbhive/t_c_l_i_connection.rb
RBHive.TCLIConnection.fetch_in_batch
def fetch_in_batch(query, batch_size = 1000, &block) raise "No block given for the batch fetch request!" unless block_given? # Execute the query and check the result exec_result = execute(query) raise_error_if_failed!(exec_result) # Get search operation handle to fetch the results op_handle = exec_result.operationHandle # Prepare fetch results request fetch_req = prepare_fetch_results(op_handle, :next, batch_size) # Now let's iterate over the results loop do rows = fetch_rows(op_handle, :next, batch_size) break if rows.empty? yield rows end end
ruby
def fetch_in_batch(query, batch_size = 1000, &block) raise "No block given for the batch fetch request!" unless block_given? # Execute the query and check the result exec_result = execute(query) raise_error_if_failed!(exec_result) # Get search operation handle to fetch the results op_handle = exec_result.operationHandle # Prepare fetch results request fetch_req = prepare_fetch_results(op_handle, :next, batch_size) # Now let's iterate over the results loop do rows = fetch_rows(op_handle, :next, batch_size) break if rows.empty? yield rows end end
[ "def", "fetch_in_batch", "(", "query", ",", "batch_size", "=", "1000", ",", "&", "block", ")", "raise", "\"No block given for the batch fetch request!\"", "unless", "block_given?", "# Execute the query and check the result", "exec_result", "=", "execute", "(", "query", ")...
Performs a query on the server, fetches the results in batches of *batch_size* rows and yields the result batches to a given block as arrays of rows.
[ "Performs", "a", "query", "on", "the", "server", "fetches", "the", "results", "in", "batches", "of", "*", "batch_size", "*", "rows", "and", "yields", "the", "result", "batches", "to", "a", "given", "block", "as", "arrays", "of", "rows", "." ]
a630b57332f2face03501da3ecad2905c78056fa
https://github.com/forward3d/rbhive/blob/a630b57332f2face03501da3ecad2905c78056fa/lib/rbhive/t_c_l_i_connection.rb#L333-L352
train
Fetch the results in a batch
[ 30522, 13366, 18584, 1035, 1999, 1035, 14108, 1006, 23032, 1010, 14108, 1035, 2946, 1027, 6694, 1010, 1004, 3796, 1007, 5333, 1000, 2053, 3796, 2445, 2005, 1996, 14108, 18584, 5227, 999, 1000, 4983, 3796, 1035, 2445, 1029, 1001, 15389, 1996...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tongueroo/jets
lib/jets/router.rb
Jets.Router.resources
def resources(name) get "#{name}", to: "#{name}#index" get "#{name}/new", to: "#{name}#new" unless api_mode? get "#{name}/:id", to: "#{name}#show" post "#{name}", to: "#{name}#create" get "#{name}/:id/edit", to: "#{name}#edit" unless api_mode? put "#{name}/:id", to: "#{name}#update" post "#{name}/:id", to: "#{name}#update" # for binary uploads patch "#{name}/:id", to: "#{name}#update" delete "#{name}/:id", to: "#{name}#delete" end
ruby
def resources(name) get "#{name}", to: "#{name}#index" get "#{name}/new", to: "#{name}#new" unless api_mode? get "#{name}/:id", to: "#{name}#show" post "#{name}", to: "#{name}#create" get "#{name}/:id/edit", to: "#{name}#edit" unless api_mode? put "#{name}/:id", to: "#{name}#update" post "#{name}/:id", to: "#{name}#update" # for binary uploads patch "#{name}/:id", to: "#{name}#update" delete "#{name}/:id", to: "#{name}#delete" end
[ "def", "resources", "(", "name", ")", "get", "\"#{name}\"", ",", "to", ":", "\"#{name}#index\"", "get", "\"#{name}/new\"", ",", "to", ":", "\"#{name}#new\"", "unless", "api_mode?", "get", "\"#{name}/:id\"", ",", "to", ":", "\"#{name}#show\"", "post", "\"#{name}\""...
resources macro expands to all the routes
[ "resources", "macro", "expands", "to", "all", "the", "routes" ]
46943a519224067e58aa3e2d5656e3ca083150f9
https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/router.rb#L60-L70
train
Get all the resources for a given name
[ 30522, 13366, 4219, 1006, 2171, 1007, 2131, 1000, 1001, 1063, 2171, 1065, 1000, 1010, 2000, 1024, 1000, 1001, 1063, 2171, 1065, 1001, 5950, 1000, 2131, 1000, 1001, 1063, 2171, 1065, 1013, 2047, 1000, 1010, 2000, 1024, 1000, 1001, 1063, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
danger/danger
lib/danger/ci_source/circle_api.rb
Danger.CircleAPI.fetch_pull_request_url
def fetch_pull_request_url(repo_slug, build_number, token) build_json = fetch_build(repo_slug, build_number, token) pull_requests = build_json[:pull_requests] return nil unless pull_requests.first pull_requests.first[:url] end
ruby
def fetch_pull_request_url(repo_slug, build_number, token) build_json = fetch_build(repo_slug, build_number, token) pull_requests = build_json[:pull_requests] return nil unless pull_requests.first pull_requests.first[:url] end
[ "def", "fetch_pull_request_url", "(", "repo_slug", ",", "build_number", ",", "token", ")", "build_json", "=", "fetch_build", "(", "repo_slug", ",", "build_number", ",", "token", ")", "pull_requests", "=", "build_json", "[", ":pull_requests", "]", "return", "nil", ...
Ask the API if the commit is inside a PR
[ "Ask", "the", "API", "if", "the", "commit", "is", "inside", "a", "PR" ]
0d6d09f2d949c287fe75202d947374042b0679f4
https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/ci_source/circle_api.rb#L35-L40
train
Fetch the pull request URL for a build
[ 30522, 13366, 18584, 1035, 4139, 1035, 5227, 1035, 24471, 2140, 1006, 16360, 2080, 1035, 23667, 1010, 3857, 1035, 2193, 1010, 19204, 1007, 3857, 1035, 1046, 3385, 1027, 18584, 1035, 3857, 1006, 16360, 2080, 1035, 23667, 1010, 3857, 1035, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mikel/mail
lib/mail/fields/common_address_field.rb
Mail.CommonAddressField.encoded_group_addresses
def encoded_group_addresses groups.map { |k,v| v.map { |a| a.encoded } }.flatten end
ruby
def encoded_group_addresses groups.map { |k,v| v.map { |a| a.encoded } }.flatten end
[ "def", "encoded_group_addresses", "groups", ".", "map", "{", "|", "k", ",", "v", "|", "v", ".", "map", "{", "|", "a", "|", "a", ".", "encoded", "}", "}", ".", "flatten", "end" ]
Returns a list of encoded group addresses
[ "Returns", "a", "list", "of", "encoded", "group", "addresses" ]
fb53fb369eb2bf0494ac70675970c90cdcc3f495
https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/fields/common_address_field.rb#L85-L87
train
Returns an array of encoded group addresses in the order they were added to the group.
[ 30522, 13366, 12359, 1035, 2177, 1035, 11596, 2967, 1012, 4949, 1063, 1064, 1047, 1010, 1058, 1064, 1058, 1012, 4949, 1063, 1064, 1037, 1064, 1037, 1012, 12359, 1065, 1065, 1012, 4257, 6528, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/github
lib/github_api/client/activity/events.rb
Github.Client::Activity::Events.received
def received(*args) arguments(args, required: [:user]) params = arguments.params public_events = if params['public'] params.delete('public') '/public' end response = get_request("/users/#{arguments.user}/received_events#{public_events}", params) return response unless block_given? response.each { |el| yield el } end
ruby
def received(*args) arguments(args, required: [:user]) params = arguments.params public_events = if params['public'] params.delete('public') '/public' end response = get_request("/users/#{arguments.user}/received_events#{public_events}", params) return response unless block_given? response.each { |el| yield el } end
[ "def", "received", "(", "*", "args", ")", "arguments", "(", "args", ",", "required", ":", "[", ":user", "]", ")", "params", "=", "arguments", ".", "params", "public_events", "=", "if", "params", "[", "'public'", "]", "params", ".", "delete", "(", "'pub...
List all events that a user has received @see https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received These are events that you’ve received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you’ll only see public events. @example github = Github.new github.activity.events.received 'user-name' github.activity.events.received 'user-name' { |event| ... } List all public events that a user has received @see https://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received @example github = Github.new github.activity.events.received 'user-name', public: true github.activity.events.received 'user-name', public: true { |event| ... } @api public
[ "List", "all", "events", "that", "a", "user", "has", "received" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/activity/events.rb#L150-L162
train
Get received events
[ 30522, 13366, 2363, 1006, 1008, 12098, 5620, 1007, 9918, 1006, 12098, 5620, 1010, 3223, 1024, 1031, 1024, 5310, 1033, 1007, 11498, 5244, 1027, 9918, 1012, 11498, 5244, 2270, 1035, 2824, 1027, 2065, 11498, 5244, 1031, 1005, 2270, 1005, 1033,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
watir/watir
lib/watir/elements/element.rb
Watir.Element.drag_and_drop_on
def drag_and_drop_on(other) assert_is_element other value = element_call(:wait_for_present) do driver.action .drag_and_drop(@element, other.wd) .perform end browser.after_hooks.run value end
ruby
def drag_and_drop_on(other) assert_is_element other value = element_call(:wait_for_present) do driver.action .drag_and_drop(@element, other.wd) .perform end browser.after_hooks.run value end
[ "def", "drag_and_drop_on", "(", "other", ")", "assert_is_element", "other", "value", "=", "element_call", "(", ":wait_for_present", ")", "do", "driver", ".", "action", ".", "drag_and_drop", "(", "@element", ",", "other", ".", "wd", ")", ".", "perform", "end", ...
Drag and drop this element on to another element instance. Note that browser support may vary. @example a = browser.div(id: "draggable") b = browser.div(id: "droppable") a.drag_and_drop_on b
[ "Drag", "and", "drop", "this", "element", "on", "to", "another", "element", "instance", ".", "Note", "that", "browser", "support", "may", "vary", "." ]
2d8db09811c6221ae401b85b2f61f5fa66e463a3
https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/element.rb#L233-L243
train
Drag and drop on the element
[ 30522, 13366, 8011, 1035, 1998, 1035, 4530, 1035, 2006, 1006, 2060, 1007, 20865, 1035, 2003, 1035, 5783, 2060, 3643, 1027, 5783, 1035, 2655, 1006, 1024, 3524, 1035, 2005, 1035, 2556, 1007, 2079, 4062, 1012, 2895, 1012, 8011, 1035, 1998, 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/bucket.rb
Aws::S3.Bucket.objects
def objects(options = {}) batches = Enumerator.new do |y| options = options.merge(bucket: @name) resp = @client.list_objects(options) resp.each_page do |page| batch = [] page.data.contents.each do |c| batch << ObjectSummary.new( bucket_name: @name, key: c.key, data: c, client: @client ) end y.yield(batch) end end ObjectSummary::Collection.new(batches) end
ruby
def objects(options = {}) batches = Enumerator.new do |y| options = options.merge(bucket: @name) resp = @client.list_objects(options) resp.each_page do |page| batch = [] page.data.contents.each do |c| batch << ObjectSummary.new( bucket_name: @name, key: c.key, data: c, client: @client ) end y.yield(batch) end end ObjectSummary::Collection.new(batches) end
[ "def", "objects", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "options", "=", "options", ".", "merge", "(", "bucket", ":", "@name", ")", "resp", "=", "@client", ".", "list_objects", "(", "options...
@example Request syntax with placeholder values objects = bucket.objects({ delimiter: "Delimiter", encoding_type: "url", # accepts url prefix: "Prefix", request_payer: "requester", # accepts requester }) @param [Hash] options ({}) @option options [String] :delimiter A delimiter is a character you use to group keys. @option options [String] :encoding_type Requests Amazon S3 to encode the object keys in the response and specifies the encoding method to use. An object key may contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. @option options [String] :prefix Limits the response to keys that begin with the specified prefix. @option options [String] :request_payer Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests. @return [ObjectSummary::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/bucket.rb#L612-L630
train
Returns an array of objects in the bucket.
[ 30522, 13366, 5200, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 2229, 1027, 4372, 17897, 16259, 1012, 2047, 2079, 1064, 1061, 1064, 7047, 1027, 7047, 1012, 13590, 1006, 13610, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic_logger.rb
Azure::ApiManagement::Mgmt::V2018_01_01.ApiDiagnosticLogger.create_or_update
def create_or_update(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers:nil) response = create_or_update_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers:nil) response = create_or_update_async(resource_group_name, service_name, api_id, diagnostic_id, loggerid, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "resource_group_name", ",", "service_name", ",", "api_id", ",", "diagnostic_id", ",", "loggerid", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_group_name", ",", "service_name", ",", ...
Attaches a logger to a diagnostic for an API. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param api_id [String] API identifier. Must be unique in the current API Management service instance. @param diagnostic_id [String] Diagnostic identifier. Must be unique in the current API Management service instance. @param loggerid [String] Logger identifier. Must be unique in the API Management service instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [LoggerContract] operation results.
[ "Attaches", "a", "logger", "to", "a", "diagnostic", "for", "an", "API", "." ]
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/api_diagnostic_logger.rb#L296-L299
train
Creates or updates a diagnostic logger.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 17928, 1035, 8909, 1010, 16474, 1035, 8909, 1010, 8833, 4590, 3593, 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...
refile/refile
lib/refile/rails/attachment_helper.rb
Refile.AttachmentHelper.attachment_image_tag
def attachment_image_tag(record, name, *args, fallback: nil, host: nil, prefix: nil, format: nil, **options) file = record && record.public_send(name) classes = ["attachment", (record.class.model_name.singular if record), name, *options[:class]] if file image_tag(attachment_url(record, name, *args, host: host, prefix: prefix, format: format), options.merge(class: classes)) elsif fallback classes << "fallback" image_tag(fallback, options.merge(class: classes)) end end
ruby
def attachment_image_tag(record, name, *args, fallback: nil, host: nil, prefix: nil, format: nil, **options) file = record && record.public_send(name) classes = ["attachment", (record.class.model_name.singular if record), name, *options[:class]] if file image_tag(attachment_url(record, name, *args, host: host, prefix: prefix, format: format), options.merge(class: classes)) elsif fallback classes << "fallback" image_tag(fallback, options.merge(class: classes)) end end
[ "def", "attachment_image_tag", "(", "record", ",", "name", ",", "*", "args", ",", "fallback", ":", "nil", ",", "host", ":", "nil", ",", "prefix", ":", "nil", ",", "format", ":", "nil", ",", "**", "options", ")", "file", "=", "record", "&&", "record",...
Generates an image tag for the given attachment, adding appropriate classes and optionally falling back to the given fallback image if there is no file attached. Returns `nil` if there is no file attached and no fallback specified. @param [String] fallback The path to an image asset to be used as a fallback @param [Hash] options Additional options for the image tag @see #attachment_url @return [ActiveSupport::SafeBuffer, nil] The generated image tag
[ "Generates", "an", "image", "tag", "for", "the", "given", "attachment", "adding", "appropriate", "classes", "and", "optionally", "falling", "back", "to", "the", "given", "fallback", "image", "if", "there", "is", "no", "file", "attached", "." ]
e910f5ca5a9060c307bd0a5e813f1fec73219ed5
https://github.com/refile/refile/blob/e910f5ca5a9060c307bd0a5e813f1fec73219ed5/lib/refile/rails/attachment_helper.rb#L51-L61
train
Returns an image tag for an attachment.
[ 30522, 13366, 14449, 1035, 3746, 1035, 6415, 1006, 2501, 1010, 2171, 1010, 1008, 12098, 5620, 1010, 2991, 5963, 1024, 9152, 2140, 1010, 3677, 1024, 9152, 2140, 1010, 17576, 1024, 9152, 2140, 1010, 4289, 1024, 9152, 2140, 1010, 1008, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb
Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.list_available_providers
def list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_available_providers", "(", "resource_group_name", ",", "network_watcher_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_available_providers_async", "(", "resource_group_name", ",", "network_watcher_name", ",", "parameter...
Lists all available internet service providers for a specified Azure region. @param resource_group_name [String] The name of the network watcher resource group. @param network_watcher_name [String] The name of the network watcher resource. @param parameters [AvailableProvidersListParameters] Parameters that scope the list of available providers. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [AvailableProvidersList] operation results.
[ "Lists", "all", "available", "internet", "service", "providers", "for", "a", "specified", "Azure", "region", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L1108-L1111
train
Gets the list of available network providers.
[ 30522, 13366, 2862, 1035, 2800, 1035, 11670, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 3422, 2121, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2800, 1035, 11670, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_registry/lib/2017-03-01/generated/azure_mgmt_container_registry/registries.rb
Azure::ContainerRegistry::Mgmt::V2017_03_01.Registries.create_async
def create_async(resource_group_name, registry_name, registry_create_parameters, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, registry_name, registry_create_parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ContainerRegistry::Mgmt::V2017_03_01::Models::Registry.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def create_async(resource_group_name, registry_name, registry_create_parameters, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, registry_name, registry_create_parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ContainerRegistry::Mgmt::V2017_03_01::Models::Registry.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "create_async", "(", "resource_group_name", ",", "registry_name", ",", "registry_create_parameters", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_create_async", "(", "resource_group_name", ",", "registry_name", ",", "registry_cre...
@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 registry_create_parameters [RegistryCreateParameters] The parameters for creating a container registry. @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", "to", "which", "the", "container", "registry", "belongs", ".", "@param", "registry_name", "[", "String", "]", "The", "name", "of", "the", "container", "regist...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-03-01/generated/azure_mgmt_container_registry/registries.rb#L257-L273
train
Creates a container registry.
[ 30522, 13366, 3443, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 15584, 1035, 3443, 1035, 11709, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb
Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_diagnostic_categories_slot_with_http_info
def list_site_diagnostic_categories_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil) list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value! end
ruby
def list_site_diagnostic_categories_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil) list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value! end
[ "def", "list_site_diagnostic_categories_slot_with_http_info", "(", "resource_group_name", ",", "site_name", ",", "slot", ",", "custom_headers", ":", "nil", ")", "list_site_diagnostic_categories_slot_async", "(", "resource_group_name", ",", "site_name", ",", "slot", ",", "cu...
Get Diagnostics Categories Get Diagnostics Categories @param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot 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.
[ "Get", "Diagnostics", "Categories" ]
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#L1627-L1629
train
Gets the diagnostic categories for a site.
[ 30522, 13366, 2862, 1035, 2609, 1035, 16474, 1035, 7236, 1035, 10453, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2609, 1035, 2171, 1010, 10453, 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...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb
Aws::EC2.Vpc.network_acls
def network_acls(options = {}) batches = Enumerator.new do |y| options = Aws::Util.deep_merge(options, filters: [{ name: "vpc-id", values: [@id] }]) resp = @client.describe_network_acls(options) resp.each_page do |page| batch = [] page.data.network_acls.each do |n| batch << NetworkAcl.new( id: n.network_acl_id, data: n, client: @client ) end y.yield(batch) end end NetworkAcl::Collection.new(batches) end
ruby
def network_acls(options = {}) batches = Enumerator.new do |y| options = Aws::Util.deep_merge(options, filters: [{ name: "vpc-id", values: [@id] }]) resp = @client.describe_network_acls(options) resp.each_page do |page| batch = [] page.data.network_acls.each do |n| batch << NetworkAcl.new( id: n.network_acl_id, data: n, client: @client ) end y.yield(batch) end end NetworkAcl::Collection.new(batches) end
[ "def", "network_acls", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "options", "=", "Aws", "::", "Util", ".", "deep_merge", "(", "options", ",", "filters", ":", "[", "{", "name", ":", "\"vpc-id\""...
@example Request syntax with placeholder values network_acls = vpc.network_acls({ filters: [ { name: "String", values: ["String"], }, ], dry_run: false, network_acl_ids: ["String"], }) @param [Hash] options ({}) @option options [Array<Types::Filter>] :filters One or more filters. * `association.association-id` - The ID of an association ID for the ACL. * `association.network-acl-id` - The ID of the network ACL involved in the association. * `association.subnet-id` - The ID of the subnet involved in the association. * `default` - Indicates whether the ACL is the default network ACL for the VPC. * `entry.cidr` - The IPv4 CIDR range specified in the entry. * `entry.icmp.code` - The ICMP code specified in the entry, if any. * `entry.icmp.type` - The ICMP type specified in the entry, if any. * `entry.ipv6-cidr` - The IPv6 CIDR range specified in the entry. * `entry.port-range.from` - The start of the port range specified in the entry. * `entry.port-range.to` - The end of the port range specified in the entry. * `entry.protocol` - The protocol specified in the entry (`tcp` \| `udp` \| `icmp` or a protocol number). * `entry.rule-action` - Allows or denies the matching traffic (`allow` \| `deny`). * `entry.rule-number` - The number of an entry (in other words, rule) in the set of ACL entries. * `network-acl-id` - The ID of the network ACL. * `owner-id` - The ID of the AWS account that owns the network ACL. * `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. * `vpc-id` - The ID of the VPC for the network ACL. @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @option options [Array<String>] :network_acl_ids One or more network ACL IDs. Default: Describes all your network ACLs. @return [NetworkAcl::Collection]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb#L1242-L1262
train
Returns a list of NetworkAcls
[ 30522, 13366, 2897, 1035, 9353, 4877, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 2229, 1027, 4372, 17897, 16259, 1012, 2047, 2079, 1064, 1061, 1064, 7047, 1027, 22091, 2015, 1024, 1024, 21183, 4014, 1012, 2784, 1035, 13590, 1006, 7047, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/jobs.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.Jobs.list_by_device_as_lazy
def list_by_device_as_lazy(device_name, resource_group_name, manager_name, filter:nil, custom_headers:nil) response = list_by_device_async(device_name, resource_group_name, manager_name, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_device_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_device_as_lazy(device_name, resource_group_name, manager_name, filter:nil, custom_headers:nil) response = list_by_device_async(device_name, resource_group_name, manager_name, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_device_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_device_as_lazy", "(", "device_name", ",", "resource_group_name", ",", "manager_name", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_device_async", "(", "device_name", ",", "resource_group_name", ",", "ma...
Gets all the jobs for specified device. With optional OData query parameters, a filtered set of jobs is returned. @param device_name [String] The device name @param resource_group_name [String] The resource group name @param manager_name [String] The manager name @param filter [String] OData Filter options @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [JobList] which provide lazy access to pages of the response.
[ "Gets", "all", "the", "jobs", "for", "specified", "device", ".", "With", "optional", "OData", "query", "parameters", "a", "filtered", "set", "of", "jobs", "is", "returned", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/jobs.rb#L660-L669
train
Gets the list of all the available Azure Central App Service Environment objects.
[ 30522, 13366, 2862, 1035, 2011, 1035, 5080, 1035, 2004, 1035, 13971, 1006, 5080, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 11307, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
chef/chef
lib/chef/shell/model_wrapper.rb
Shell.ModelWrapper.list_objects
def list_objects objects = @model_class.method(:list).arity == 0 ? @model_class.list : @model_class.list(true) objects.map { |obj| Array(obj).find { |o| o.kind_of?(@model_class) } } end
ruby
def list_objects objects = @model_class.method(:list).arity == 0 ? @model_class.list : @model_class.list(true) objects.map { |obj| Array(obj).find { |o| o.kind_of?(@model_class) } } end
[ "def", "list_objects", "objects", "=", "@model_class", ".", "method", "(", ":list", ")", ".", "arity", "==", "0", "?", "@model_class", ".", "list", ":", "@model_class", ".", "list", "(", "true", ")", "objects", ".", "map", "{", "|", "obj", "|", "Array"...
paper over inconsistencies in the model classes APIs, and return the objects the user wanted instead of the URI=>object stuff
[ "paper", "over", "inconsistencies", "in", "the", "model", "classes", "APIs", "and", "return", "the", "objects", "the", "user", "wanted", "instead", "of", "the", "URI", "=", ">", "object", "stuff" ]
61f69e18e69e0dca6e8cffdcd7451181d874cdb3
https://github.com/chef/chef/blob/61f69e18e69e0dca6e8cffdcd7451181d874cdb3/lib/chef/shell/model_wrapper.rb#L82-L85
train
Returns an array of objects that are in the correct order.
[ 30522, 13366, 2862, 1035, 5200, 5200, 1027, 1030, 2944, 1035, 2465, 1012, 4118, 1006, 1024, 2862, 1007, 1012, 10488, 3723, 1027, 1027, 1014, 1029, 1030, 2944, 1035, 2465, 1012, 2862, 1024, 1030, 2944, 1035, 2465, 1012, 2862, 1006, 2995, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
meew0/discordrb
lib/discordrb/voice/voice_bot.rb
Discordrb::Voice.VoiceBot.stop_playing
def stop_playing(wait_for_confirmation = false) @was_playing_before = @playing @speaking = false @playing = false sleep IDEAL_LENGTH / 1000.0 if @was_playing_before return unless wait_for_confirmation @has_stopped_playing = false sleep IDEAL_LENGTH / 1000.0 until @has_stopped_playing @has_stopped_playing = false end
ruby
def stop_playing(wait_for_confirmation = false) @was_playing_before = @playing @speaking = false @playing = false sleep IDEAL_LENGTH / 1000.0 if @was_playing_before return unless wait_for_confirmation @has_stopped_playing = false sleep IDEAL_LENGTH / 1000.0 until @has_stopped_playing @has_stopped_playing = false end
[ "def", "stop_playing", "(", "wait_for_confirmation", "=", "false", ")", "@was_playing_before", "=", "@playing", "@speaking", "=", "false", "@playing", "=", "false", "sleep", "IDEAL_LENGTH", "/", "1000.0", "if", "@was_playing_before", "return", "unless", "wait_for_conf...
Stops the current playback entirely. @param wait_for_confirmation [true, false] Whether the method should wait for confirmation from the playback method that the playback has actually stopped.
[ "Stops", "the", "current", "playback", "entirely", "." ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/voice/voice_bot.rb#L157-L168
train
Stops playing.
[ 30522, 13366, 2644, 1035, 2652, 1006, 3524, 1035, 2005, 1035, 13964, 1027, 6270, 1007, 1030, 2001, 1035, 2652, 1035, 2077, 1027, 1030, 2652, 1030, 4092, 1027, 6270, 1030, 2652, 1027, 6270, 3637, 7812, 1035, 3091, 1013, 6694, 1012, 1014, 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_compute/lib/2017-03-30/generated/azure_mgmt_compute/disks.rb
Azure::Compute::Mgmt::V2017_03_30.Disks.begin_delete
def begin_delete(resource_group_name, disk_name, custom_headers:nil) response = begin_delete_async(resource_group_name, disk_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_delete(resource_group_name, disk_name, custom_headers:nil) response = begin_delete_async(resource_group_name, disk_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_delete", "(", "resource_group_name", ",", "disk_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_delete_async", "(", "resource_group_name", ",", "disk_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ...
Deletes a disk. @param resource_group_name [String] The name of the resource group. @param disk_name [String] The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [OperationStatusResponse] operation results.
[ "Deletes", "a", "disk", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-03-30/generated/azure_mgmt_compute/disks.rb#L792-L795
train
Deletes a disk.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9785, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rmagick/rmagick
lib/rmagick_internal.rb
Magick.Draw.affine
def affine(sx, rx, ry, sy, tx, ty) primitive 'affine ' + format('%g,%g,%g,%g,%g,%g', sx, rx, ry, sy, tx, ty) end
ruby
def affine(sx, rx, ry, sy, tx, ty) primitive 'affine ' + format('%g,%g,%g,%g,%g,%g', sx, rx, ry, sy, tx, ty) end
[ "def", "affine", "(", "sx", ",", "rx", ",", "ry", ",", "sy", ",", "tx", ",", "ty", ")", "primitive", "'affine '", "+", "format", "(", "'%g,%g,%g,%g,%g,%g'", ",", "sx", ",", "rx", ",", "ry", ",", "sy", ",", "tx", ",", "ty", ")", "end" ]
Apply coordinate transformations to support scaling (s), rotation (r), and translation (t). Angles are specified in radians.
[ "Apply", "coordinate", "transformations", "to", "support", "scaling", "(", "s", ")", "rotation", "(", "r", ")", "and", "translation", "(", "t", ")", ".", "Angles", "are", "specified", "in", "radians", "." ]
ef6688ed9d76bf123c2ea1a483eff8635051adb7
https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L228-L230
train
Returns the affine primitive.
[ 30522, 13366, 21358, 23460, 1006, 1055, 2595, 1010, 1054, 2595, 1010, 29431, 1010, 25353, 1010, 19067, 1010, 5939, 1007, 10968, 1005, 21358, 23460, 1005, 1009, 4289, 1006, 1005, 1003, 1043, 1010, 1003, 1043, 1010, 1003, 1043, 1010, 1003, 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...
oauth-xx/oauth2
lib/oauth2/client.rb
OAuth2.Client.authorize_url
def authorize_url(params = {}) params = (params || {}).merge(redirection_params) connection.build_url(options[:authorize_url], params).to_s end
ruby
def authorize_url(params = {}) params = (params || {}).merge(redirection_params) connection.build_url(options[:authorize_url], params).to_s end
[ "def", "authorize_url", "(", "params", "=", "{", "}", ")", "params", "=", "(", "params", "||", "{", "}", ")", ".", "merge", "(", "redirection_params", ")", "connection", ".", "build_url", "(", "options", "[", ":authorize_url", "]", ",", "params", ")", ...
The authorize endpoint URL of the OAuth2 provider @param [Hash] params additional query parameters
[ "The", "authorize", "endpoint", "URL", "of", "the", "OAuth2", "provider" ]
f08ff9da169136ab133aa2faab0d74a4407deffb
https://github.com/oauth-xx/oauth2/blob/f08ff9da169136ab133aa2faab0d74a4407deffb/lib/oauth2/client.rb#L73-L76
train
Returns the authorize_url for the current user
[ 30522, 13366, 3166, 4697, 1035, 24471, 2140, 1006, 11498, 5244, 1027, 1063, 1065, 1007, 11498, 5244, 1027, 1006, 11498, 5244, 1064, 1064, 1063, 1065, 1007, 1012, 13590, 1006, 2417, 7442, 7542, 1035, 11498, 5244, 1007, 4434, 1012, 3857, 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...
puppetlabs/puppet
lib/puppet/util/windows/adsi.rb
Puppet::Util::Windows::ADSI.User.op_userflags
def op_userflags(*flags, &block) # Avoid an unnecessary set + commit operation. return if flags.empty? unrecognized_flags = flags.reject { |flag| ADS_USERFLAGS.keys.include?(flag) } unless unrecognized_flags.empty? raise ArgumentError, _("Unrecognized ADS UserFlags: %{unrecognized_flags}") % { unrecognized_flags: unrecognized_flags.join(', ') } end self['UserFlags'] = flags.inject(self['UserFlags'], &block) end
ruby
def op_userflags(*flags, &block) # Avoid an unnecessary set + commit operation. return if flags.empty? unrecognized_flags = flags.reject { |flag| ADS_USERFLAGS.keys.include?(flag) } unless unrecognized_flags.empty? raise ArgumentError, _("Unrecognized ADS UserFlags: %{unrecognized_flags}") % { unrecognized_flags: unrecognized_flags.join(', ') } end self['UserFlags'] = flags.inject(self['UserFlags'], &block) end
[ "def", "op_userflags", "(", "*", "flags", ",", "&", "block", ")", "# Avoid an unnecessary set + commit operation.", "return", "if", "flags", ".", "empty?", "unrecognized_flags", "=", "flags", ".", "reject", "{", "|", "flag", "|", "ADS_USERFLAGS", ".", "keys", "....
Common helper for set_userflags and unset_userflags. @api private
[ "Common", "helper", "for", "set_userflags", "and", "unset_userflags", "." ]
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/adsi.rb#L417-L427
train
Set the user flags for this ADS object.
[ 30522, 13366, 6728, 1035, 5310, 10258, 26454, 1006, 1008, 9245, 1010, 1004, 3796, 1007, 1001, 4468, 2019, 14203, 2275, 1009, 10797, 3169, 1012, 2709, 2065, 9245, 1012, 4064, 1029, 4895, 2890, 3597, 29076, 5422, 1035, 9245, 1027, 9245, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_grid/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb
Azure::EventGrid::Mgmt::V2017_06_15_preview.EventSubscriptions.begin_create_with_http_info
def begin_create_with_http_info(scope, event_subscription_name, event_subscription_info, custom_headers:nil) begin_create_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! end
ruby
def begin_create_with_http_info(scope, event_subscription_name, event_subscription_info, custom_headers:nil) begin_create_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! end
[ "def", "begin_create_with_http_info", "(", "scope", ",", "event_subscription_name", ",", "event_subscription_info", ",", "custom_headers", ":", "nil", ")", "begin_create_async", "(", "scope", ",", "event_subscription_name", ",", "event_subscription_info", ",", "custom_heade...
Create an event subscription Asynchronously creates a new event subscription to the specified scope. Existing event subscriptions cannot be updated with this API and should instead use the Update event subscription API. @param scope [String] The scope of the resource to which the event subscription needs to be created. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. @param event_subscription_name [String] Name of the event subscription to be created. Event subscription names must be between 3 and 64 characters in length and use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Create", "an", "event", "subscription" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb#L1463-L1465
train
Creates an event subscription.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 9531, 1010, 2724, 1035, 15002, 1035, 2171, 1010, 2724, 1035, 15002, 1035, 18558, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, 1035, 3443, 1035, 2004,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term.rb
Azure::CognitiveServices::ContentModerator::V1_0.ListManagementTerm.add_term
def add_term(list_id, term, language, custom_headers:nil) response = add_term_async(list_id, term, language, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def add_term(list_id, term, language, custom_headers:nil) response = add_term_async(list_id, term, language, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "add_term", "(", "list_id", ",", "term", ",", "language", ",", "custom_headers", ":", "nil", ")", "response", "=", "add_term_async", "(", "list_id", ",", "term", ",", "language", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ...
Add a term to the term list with list Id equal to list Id passed. @param list_id [String] List Id of the image list. @param term [String] Term to be deleted @param language [String] Language of the terms. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Object] operation results.
[ "Add", "a", "term", "to", "the", "term", "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_term.rb#L45-L48
train
Adds a term to a list.
[ 30522, 13366, 5587, 1035, 2744, 1006, 2862, 1035, 8909, 1010, 2744, 1010, 2653, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 5587, 1035, 2744, 1035, 2004, 6038, 2278, 1006, 2862, 1035, 8909, 1010, 2744, 1010, 2653, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.update_application_upgrade_with_http_info
def update_application_upgrade_with_http_info(application_id, application_upgrade_update_description, timeout:60, custom_headers:nil) update_application_upgrade_async(application_id, application_upgrade_update_description, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def update_application_upgrade_with_http_info(application_id, application_upgrade_update_description, timeout:60, custom_headers:nil) update_application_upgrade_async(application_id, application_upgrade_update_description, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "update_application_upgrade_with_http_info", "(", "application_id", ",", "application_upgrade_update_description", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "update_application_upgrade_async", "(", "application_id", ",", "application_upgrade_upda...
Updates an ongoing application upgrade in the Service Fabric cluster. Updates the parameters of an ongoing application upgrade from the ones specified at the time of starting the application upgrade. This may be required to mitigate stuck application upgrades due to incorrect parameters or issues in the application to make progress. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. @param application_upgrade_update_description [ApplicationUpgradeUpdateDescription] Parameters for updating an existing application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Updates", "an", "ongoing", "application", "upgrade", "in", "the", "Service", "Fabric", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L8017-L8019
train
Updates an existing application upgrade.
[ 30522, 13366, 10651, 1035, 4646, 1035, 12200, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 4646, 1035, 8909, 1010, 4646, 1035, 12200, 1035, 10651, 1035, 6412, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb
Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.perform_maintenance
def perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! nil end
ruby
def perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! nil end
[ "def", "perform_maintenance", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vm_instance_ids", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "perform_maintenance_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vm_i...
Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications @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.
[ "Perform", "maintenance", "on", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "Operation", "on", "instances", "which", "are", "not", "eligible", "for", "perform", "maintenance", "will", "be", "failed", ".", "Please", "refe...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L975-L978
train
Perform maintenance on a virtual machine.
[ 30522, 13366, 4685, 1035, 6032, 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, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_resources_management/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb
Azure::ResourcesManagement::Mgmt::V2017_11_01_preview.ManagementGroups.get
def get(group_id, expand:nil, recurse:nil, cache_control:'no-cache', custom_headers:nil) response = get_async(group_id, expand:expand, recurse:recurse, cache_control:cache_control, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get(group_id, expand:nil, recurse:nil, cache_control:'no-cache', custom_headers:nil) response = get_async(group_id, expand:expand, recurse:recurse, cache_control:cache_control, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get", "(", "group_id", ",", "expand", ":", "nil", ",", "recurse", ":", "nil", ",", "cache_control", ":", "'no-cache'", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_async", "(", "group_id", ",", "expand", ":", "expand", ",", "recu...
Get the details of the management group. @param group_id [String] Management Group ID. @param expand [Enum] The $expand=children query string parameter allows clients to request inclusion of children in the response payload. Possible values include: 'children' @param recurse [Boolean] The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload. @param cache_control [String] Indicates that the request shouldn't utilize any caches. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ManagementGroup] operation results.
[ "Get", "the", "details", "of", "the", "management", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources_management/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb#L155-L158
train
Gets the group s coverages.
[ 30522, 13366, 2131, 1006, 2177, 1035, 8909, 1010, 7818, 1024, 9152, 2140, 1010, 28667, 28393, 1024, 9152, 2140, 1010, 17053, 1035, 2491, 1024, 1005, 2053, 1011, 17053, 1005, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_4_0_36.ServiceFabricClientAPIs.disable_application_backup
def disable_application_backup(application_id, timeout:60, disable_backup_description:nil, custom_headers:nil) response = disable_application_backup_async(application_id, timeout:timeout, disable_backup_description:disable_backup_description, custom_headers:custom_headers).value! nil end
ruby
def disable_application_backup(application_id, timeout:60, disable_backup_description:nil, custom_headers:nil) response = disable_application_backup_async(application_id, timeout:timeout, disable_backup_description:disable_backup_description, custom_headers:custom_headers).value! nil end
[ "def", "disable_application_backup", "(", "application_id", ",", "timeout", ":", "60", ",", "disable_backup_description", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "disable_application_backup_async", "(", "application_id", ",", "timeout", ":...
Disables periodic backup of Service Fabric application. Disables periodic backup of Service Fabric application which was previously enabled. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. @param 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 disable_backup_description [DisableBackupDescription] Specifies the parameters to disable backup for any backup entity. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Disables", "periodic", "backup", "of", "Service", "Fabric", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/service_fabric_client_apis.rb#L23394-L23397
train
Disables backup of an application.
[ 30522, 13366, 4487, 19150, 1035, 4646, 1035, 10200, 1006, 4646, 1035, 8909, 1010, 2051, 5833, 1024, 3438, 1010, 4487, 19150, 1035, 10200, 1035, 6412, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4487,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kmuto/review
lib/epubmaker/producer.rb
EPUBMaker.Producer.import_imageinfo
def import_imageinfo(path, base = nil, allow_exts = nil) return nil unless File.exist?(path) allow_exts ||= @config['image_ext'] Dir.foreach(path) do |f| next if f.start_with?('.') if f =~ /\.(#{allow_exts.join('|')})\Z/i path.chop! if path =~ %r{/\Z} if base.nil? @contents.push(EPUBMaker::Content.new('file' => "#{path}/#{f}")) else @contents.push(EPUBMaker::Content.new('file' => "#{path.sub(base + '/', '')}/#{f}")) end end if FileTest.directory?("#{path}/#{f}") import_imageinfo("#{path}/#{f}", base) end end end
ruby
def import_imageinfo(path, base = nil, allow_exts = nil) return nil unless File.exist?(path) allow_exts ||= @config['image_ext'] Dir.foreach(path) do |f| next if f.start_with?('.') if f =~ /\.(#{allow_exts.join('|')})\Z/i path.chop! if path =~ %r{/\Z} if base.nil? @contents.push(EPUBMaker::Content.new('file' => "#{path}/#{f}")) else @contents.push(EPUBMaker::Content.new('file' => "#{path.sub(base + '/', '')}/#{f}")) end end if FileTest.directory?("#{path}/#{f}") import_imageinfo("#{path}/#{f}", base) end end end
[ "def", "import_imageinfo", "(", "path", ",", "base", "=", "nil", ",", "allow_exts", "=", "nil", ")", "return", "nil", "unless", "File", ".", "exist?", "(", "path", ")", "allow_exts", "||=", "@config", "[", "'image_ext'", "]", "Dir", ".", "foreach", "(", ...
Add informations of figure files in +path+ to contents array. +base+ defines a string to remove from path name.
[ "Add", "informations", "of", "figure", "files", "in", "+", "path", "+", "to", "contents", "array", ".", "+", "base", "+", "defines", "a", "string", "to", "remove", "from", "path", "name", "." ]
77d1273e671663f05db2992281fd891b776badf0
https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/epubmaker/producer.rb#L167-L184
train
Import imageinfo from a directory
[ 30522, 13366, 12324, 1035, 3746, 2378, 14876, 1006, 4130, 1010, 2918, 1027, 9152, 2140, 1010, 3499, 1035, 4654, 3215, 1027, 9152, 2140, 1007, 2709, 9152, 2140, 4983, 5371, 1012, 4839, 1029, 1006, 4130, 1007, 3499, 1035, 4654, 3215, 1064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb
Azure::ServiceFabric::Mgmt::V2017_07_01_preview.ClusterVersions.list_by_environment_with_http_info
def list_by_environment_with_http_info(location, environment, api_version, subscription_id, custom_headers:nil) list_by_environment_async(location, environment, api_version, subscription_id, custom_headers:custom_headers).value! end
ruby
def list_by_environment_with_http_info(location, environment, api_version, subscription_id, custom_headers:nil) list_by_environment_async(location, environment, api_version, subscription_id, custom_headers:custom_headers).value! end
[ "def", "list_by_environment_with_http_info", "(", "location", ",", "environment", ",", "api_version", ",", "subscription_id", ",", "custom_headers", ":", "nil", ")", "list_by_environment_async", "(", "location", ",", "environment", ",", "api_version", ",", "subscription...
List cluster code versions by environment List cluster code versions by environment @param location [String] The location for the cluster code versions, this is different from cluster location @param environment [Enum] Cluster operating system, the default means all. Possible values include: 'Windows', 'Linux' @param api_version [String] The version of the API. @param subscription_id [String] The customer subscription identifier @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "List", "cluster", "code", "versions", "by", "environment" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb#L396-L398
train
Gets the list of all the documents in an environment.
[ 30522, 13366, 2862, 1035, 2011, 1035, 4044, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 3295, 1010, 4044, 1010, 17928, 1035, 2544, 1010, 15002, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2862, 1035, 2011, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/api_operation.rb
Azure::ApiManagement::Mgmt::V2019_01_01.ApiOperation.list_by_api_next
def list_by_api_next(next_page_link, custom_headers:nil) response = list_by_api_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_api_next(next_page_link, custom_headers:nil) response = list_by_api_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_api_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_api_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", "...
Lists a collection of the operations for the specified API. @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 [OperationCollection] operation results.
[ "Lists", "a", "collection", "of", "the", "operations", "for", "the", "specified", "API", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/api_operation.rb#L804-L807
train
Gets the list of the elastic advisors.
[ 30522, 13366, 2862, 1035, 2011, 1035, 17928, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 17928, 1035, 2279, 1035, 2004, 6038, 2278, 1006, 2279, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/hutch
lib/hutch/worker.rb
Hutch.Worker.handle_message
def handle_message(consumer, delivery_info, properties, payload) serializer = consumer.get_serializer || Hutch::Config[:serializer] logger.debug { spec = serializer.binary? ? "#{payload.bytesize} bytes" : "#{payload}" "message(#{properties.message_id || '-'}): " + "routing key: #{delivery_info.routing_key}, " + "consumer: #{consumer}, " + "payload: #{spec}" } message = Message.new(delivery_info, properties, payload, serializer) consumer_instance = consumer.new.tap { |c| c.broker, c.delivery_info = @broker, delivery_info } with_tracing(consumer_instance).handle(message) @broker.ack(delivery_info.delivery_tag) rescue => ex acknowledge_error(delivery_info, properties, @broker, ex) handle_error(properties, payload, consumer, ex) end
ruby
def handle_message(consumer, delivery_info, properties, payload) serializer = consumer.get_serializer || Hutch::Config[:serializer] logger.debug { spec = serializer.binary? ? "#{payload.bytesize} bytes" : "#{payload}" "message(#{properties.message_id || '-'}): " + "routing key: #{delivery_info.routing_key}, " + "consumer: #{consumer}, " + "payload: #{spec}" } message = Message.new(delivery_info, properties, payload, serializer) consumer_instance = consumer.new.tap { |c| c.broker, c.delivery_info = @broker, delivery_info } with_tracing(consumer_instance).handle(message) @broker.ack(delivery_info.delivery_tag) rescue => ex acknowledge_error(delivery_info, properties, @broker, ex) handle_error(properties, payload, consumer, ex) end
[ "def", "handle_message", "(", "consumer", ",", "delivery_info", ",", "properties", ",", "payload", ")", "serializer", "=", "consumer", ".", "get_serializer", "||", "Hutch", "::", "Config", "[", ":serializer", "]", "logger", ".", "debug", "{", "spec", "=", "s...
Called internally when a new messages comes in from RabbitMQ. Responsible for wrapping up the message and passing it to the consumer.
[ "Called", "internally", "when", "a", "new", "messages", "comes", "in", "from", "RabbitMQ", ".", "Responsible", "for", "wrapping", "up", "the", "message", "and", "passing", "it", "to", "the", "consumer", "." ]
9314b3b8c84abeb78170730757f3eb8ccc4f54c5
https://github.com/gocardless/hutch/blob/9314b3b8c84abeb78170730757f3eb8ccc4f54c5/lib/hutch/worker.rb#L61-L78
train
Handles a message from a consumer
[ 30522, 13366, 5047, 1035, 4471, 1006, 7325, 1010, 6959, 1035, 18558, 1010, 5144, 1010, 18093, 1007, 7642, 17629, 1027, 7325, 1012, 2131, 1035, 7642, 17629, 1064, 1064, 12570, 2818, 1024, 1024, 9530, 8873, 2290, 1031, 1024, 7642, 17629, 1033...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongoid
lib/mongoid/attributes.rb
Mongoid.Attributes.remove_attribute
def remove_attribute(name) as_writable_attribute!(name) do |access| _assigning do attribute_will_change!(access) delayed_atomic_unsets[atomic_attribute_name(access)] = [] unless new_record? attributes.delete(access) end end end
ruby
def remove_attribute(name) as_writable_attribute!(name) do |access| _assigning do attribute_will_change!(access) delayed_atomic_unsets[atomic_attribute_name(access)] = [] unless new_record? attributes.delete(access) end end end
[ "def", "remove_attribute", "(", "name", ")", "as_writable_attribute!", "(", "name", ")", "do", "|", "access", "|", "_assigning", "do", "attribute_will_change!", "(", "access", ")", "delayed_atomic_unsets", "[", "atomic_attribute_name", "(", "access", ")", "]", "="...
Remove a value from the +Document+ attributes. If the value does not exist it will fail gracefully. @example Remove the attribute. person.remove_attribute(:title) @param [ String, Symbol ] name The name of the attribute to remove. @raise [ Errors::ReadonlyAttribute ] If the field cannot be removed due to being flagged as reaodnly. @since 1.0.0
[ "Remove", "a", "value", "from", "the", "+", "Document", "+", "attributes", ".", "If", "the", "value", "does", "not", "exist", "it", "will", "fail", "gracefully", "." ]
56976e32610f4c2450882b0bfe14da099f0703f4
https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/attributes.rb#L136-L144
train
Remove an attribute from the record.
[ 30522, 13366, 6366, 1035, 17961, 1006, 2171, 1007, 2004, 1035, 25697, 3085, 1035, 17961, 999, 1006, 2171, 1007, 2079, 1064, 3229, 1064, 1035, 23911, 2075, 2079, 17961, 1035, 2097, 1035, 2689, 999, 1006, 3229, 1007, 8394, 1035, 9593, 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_resources/lib/2016-02-01/generated/azure_mgmt_resources/resource_groups.rb
Azure::Resources::Mgmt::V2016_02_01.ResourceGroups.list_resources_with_http_info
def list_resources_with_http_info(resource_group_name, filter:nil, expand:nil, top:nil, custom_headers:nil) list_resources_async(resource_group_name, filter:filter, expand:expand, top:top, custom_headers:custom_headers).value! end
ruby
def list_resources_with_http_info(resource_group_name, filter:nil, expand:nil, top:nil, custom_headers:nil) list_resources_async(resource_group_name, filter:filter, expand:expand, top:top, custom_headers:custom_headers).value! end
[ "def", "list_resources_with_http_info", "(", "resource_group_name", ",", "filter", ":", "nil", ",", "expand", ":", "nil", ",", "top", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_resources_async", "(", "resource_group_name", ",", "filter", ":", "fil...
Get all of the resources under a subscription. @param resource_group_name [String] Query parameters. If null is passed returns all resource groups. @param filter [String] The filter to apply on the operation. @param expand [String] The $expand query parameter @param top [Integer] Query parameters. If null is passed returns all resource groups. @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", "of", "the", "resources", "under", "a", "subscription", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resource_groups.rb#L57-L59
train
Gets the list of all the resource groups that are associated with the specified Data Lake Store account.
[ 30522, 13366, 2862, 1035, 4219, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11307, 1024, 9152, 2140, 1010, 7818, 1024, 9152, 2140, 1010, 2327, 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...
twitter/secure_headers
lib/secure_headers/headers/content_security_policy.rb
SecureHeaders.ContentSecurityPolicy.minify_source_list
def minify_source_list(directive, source_list) source_list = source_list.compact if source_list.include?(STAR) keep_wildcard_sources(source_list) else source_list = populate_nonces(directive, source_list) source_list = reject_all_values_if_none(source_list) unless directive == REPORT_URI || @preserve_schemes source_list = strip_source_schemes(source_list) end dedup_source_list(source_list) end end
ruby
def minify_source_list(directive, source_list) source_list = source_list.compact if source_list.include?(STAR) keep_wildcard_sources(source_list) else source_list = populate_nonces(directive, source_list) source_list = reject_all_values_if_none(source_list) unless directive == REPORT_URI || @preserve_schemes source_list = strip_source_schemes(source_list) end dedup_source_list(source_list) end end
[ "def", "minify_source_list", "(", "directive", ",", "source_list", ")", "source_list", "=", "source_list", ".", "compact", "if", "source_list", ".", "include?", "(", "STAR", ")", "keep_wildcard_sources", "(", "source_list", ")", "else", "source_list", "=", "popula...
If a directive contains *, all other values are omitted. If a directive contains 'none' but has other values, 'none' is ommitted. Schemes are stripped (see http://www.w3.org/TR/CSP2/#match-source-expression)
[ "If", "a", "directive", "contains", "*", "all", "other", "values", "are", "omitted", ".", "If", "a", "directive", "contains", "none", "but", "has", "other", "values", "none", "is", "ommitted", ".", "Schemes", "are", "stripped", "(", "see", "http", ":", "...
543e6712aadae08f1653ed973e6b6204f7eac26a
https://github.com/twitter/secure_headers/blob/543e6712aadae08f1653ed973e6b6204f7eac26a/lib/secure_headers/headers/content_security_policy.rb#L116-L129
train
Minifies the source_list
[ 30522, 13366, 7163, 12031, 1035, 3120, 1035, 2862, 1006, 16449, 1010, 3120, 1035, 2862, 1007, 3120, 1035, 2862, 1027, 3120, 1035, 2862, 1012, 9233, 2065, 3120, 1035, 2862, 1012, 2421, 1029, 1006, 2732, 1007, 2562, 1035, 3748, 11522, 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/lib/fastlane/plugins/plugin_info_collector.rb
Fastlane.PluginInfoCollector.gem_name_taken?
def gem_name_taken?(name) require 'open-uri' require 'json' url = "https://rubygems.org/api/v1/gems/#{name}.json" response = JSON.parse(open(url).read) return !!response['version'] rescue false end
ruby
def gem_name_taken?(name) require 'open-uri' require 'json' url = "https://rubygems.org/api/v1/gems/#{name}.json" response = JSON.parse(open(url).read) return !!response['version'] rescue false end
[ "def", "gem_name_taken?", "(", "name", ")", "require", "'open-uri'", "require", "'json'", "url", "=", "\"https://rubygems.org/api/v1/gems/#{name}.json\"", "response", "=", "JSON", ".", "parse", "(", "open", "(", "url", ")", ".", "read", ")", "return", "!", "!", ...
Checks if the gem name is still free on RubyGems
[ "Checks", "if", "the", "gem", "name", "is", "still", "free", "on", "RubyGems" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_info_collector.rb#L67-L75
train
Check if the gem name is taken by the gem.
[ 30522, 30524, 5244, 1012, 8917, 1013, 17928, 1013, 1058, 2487, 1013, 20296, 1013, 1001, 1063, 2171, 1065, 1012, 1046, 3385, 1000, 3433, 1027, 1046, 3385, 1012, 11968, 3366, 1006, 2330, 1006, 24471, 2140, 1007, 1012, 3191, 1007, 2709, 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
management/azure_mgmt_logic/lib/2015-02-01-preview/generated/azure_mgmt_logic/workflow_access_keys.rb
Azure::Logic::Mgmt::V2015_02_01_preview.WorkflowAccessKeys.create_or_update_with_http_info
def create_or_update_with_http_info(resource_group_name, workflow_name, access_key_name, workflow_accesskey, custom_headers:nil) create_or_update_async(resource_group_name, workflow_name, access_key_name, workflow_accesskey, custom_headers:custom_headers).value! end
ruby
def create_or_update_with_http_info(resource_group_name, workflow_name, access_key_name, workflow_accesskey, custom_headers:nil) create_or_update_async(resource_group_name, workflow_name, access_key_name, workflow_accesskey, custom_headers:custom_headers).value! end
[ "def", "create_or_update_with_http_info", "(", "resource_group_name", ",", "workflow_name", ",", "access_key_name", ",", "workflow_accesskey", ",", "custom_headers", ":", "nil", ")", "create_or_update_async", "(", "resource_group_name", ",", "workflow_name", ",", "access_ke...
Creates or updates a workflow access key. @param resource_group_name [String] The resource group name. @param workflow_name [String] The workflow name. @param access_key_name [String] The workflow access key name. @param workflow_accesskey [WorkflowAccessKey] The workflow access key. @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", "workflow", "access", "key", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2015-02-01-preview/generated/azure_mgmt_logic/workflow_access_keys.rb#L244-L246
train
Creates or updates a workflow.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2147, 12314, 1035, 2171, 1010, 3229, 1035, 3145, 1035, 2171, 1010, 2147, 12314, 1035, 3229, 14839, 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_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb
Azure::OperationalInsights::Mgmt::V2015_03_20.Workspaces.get_search_results_async
def get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers:nil) # Send request promise = begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse.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 get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers:nil) # Send request promise = begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse.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", "get_search_results_async", "(", "resource_group_name", ",", "workspace_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_get_search_results_async", "(", "resource_group_name", ",", "workspace_name", ",", "pa...
@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 parameters [SearchParameters] The parameters required to execute a search query. @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", "to", "get", ".", "The", "name", "is", "case", "insensitive", ".", "@param", "workspace_name", "[", "String", "]", "Log", "Analytics", "workspace", "name", ...
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#L260-L276
train
Gets the search results for a workspace.
[ 30522, 13366, 2131, 1035, 3945, 1035, 3463, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2573, 15327, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hashicorp/vagrant
lib/vagrant/capability_host.rb
Vagrant.CapabilityHost.capability_module
def capability_module(cap_name) @cap_logger.debug("Searching for cap: #{cap_name}") @cap_host_chain.each do |host_name, host| @cap_logger.debug("Checking in: #{host_name}") caps = @cap_caps[host_name] if caps && caps.key?(cap_name) @cap_logger.debug("Found cap: #{cap_name} in #{host_name}") return caps[cap_name] end end nil end
ruby
def capability_module(cap_name) @cap_logger.debug("Searching for cap: #{cap_name}") @cap_host_chain.each do |host_name, host| @cap_logger.debug("Checking in: #{host_name}") caps = @cap_caps[host_name] if caps && caps.key?(cap_name) @cap_logger.debug("Found cap: #{cap_name} in #{host_name}") return caps[cap_name] end end nil end
[ "def", "capability_module", "(", "cap_name", ")", "@cap_logger", ".", "debug", "(", "\"Searching for cap: #{cap_name}\"", ")", "@cap_host_chain", ".", "each", "do", "|", "host_name", ",", "host", "|", "@cap_logger", ".", "debug", "(", "\"Checking in: #{host_name}\"", ...
Returns the registered module for a capability with the given name. @param [Symbol] cap_name @return [Module]
[ "Returns", "the", "registered", "module", "for", "a", "capability", "with", "the", "given", "name", "." ]
c22a145c59790c098f95d50141d9afb48e1ef55f
https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/capability_host.rb#L162-L175
train
Finds the capability module for the given capability name.
[ 30522, 13366, 10673, 1035, 11336, 1006, 6178, 1035, 2171, 1007, 1030, 6178, 1035, 8833, 4590, 1012, 2139, 8569, 2290, 1006, 1000, 6575, 2005, 6178, 1024, 1001, 1063, 6178, 1035, 2171, 1065, 1000, 1007, 1030, 6178, 1035, 3677, 1035, 4677, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tongueroo/ufo
lib/ufo/task.rb
Ufo.Task.recent_task_definition
def recent_task_definition arns = task_definition_arns(@task_definition) # "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:6", last_definition_arn = arns.first # puts "last_definition_arn #{last_definition_arn}" task_name = last_definition_arn.split("/").last resp = ecs.describe_task_definition(task_definition: task_name) resp.task_definition end
ruby
def recent_task_definition arns = task_definition_arns(@task_definition) # "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:6", last_definition_arn = arns.first # puts "last_definition_arn #{last_definition_arn}" task_name = last_definition_arn.split("/").last resp = ecs.describe_task_definition(task_definition: task_name) resp.task_definition end
[ "def", "recent_task_definition", "arns", "=", "task_definition_arns", "(", "@task_definition", ")", "# \"arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:6\",", "last_definition_arn", "=", "arns", ".", "first", "# puts \"last_definition_arn #{last_definition_arn}\"", "t...
Usually most recent task definition. If user has specified task_definition with specific version like demo-web:8 Then it'll be that exact task definnition.
[ "Usually", "most", "recent", "task", "definition", ".", "If", "user", "has", "specified", "task_definition", "with", "specific", "version", "like", "demo", "-", "web", ":", "8", "Then", "it", "ll", "be", "that", "exact", "task", "definnition", "." ]
16ac3dad28edcab2693c0e7d89a1971aca65b8f9
https://github.com/tongueroo/ufo/blob/16ac3dad28edcab2693c0e7d89a1971aca65b8f9/lib/ufo/task.rb#L183-L192
train
Returns the most recent task definition
[ 30522, 13366, 3522, 1035, 4708, 1035, 6210, 12098, 3619, 1027, 4708, 1035, 6210, 1035, 12098, 3619, 1006, 1030, 4708, 1035, 6210, 1007, 1001, 1000, 12098, 2078, 1024, 22091, 2015, 1024, 14925, 2015, 1024, 2149, 1011, 2264, 1011, 1015, 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...
grpc/grpc
src/ruby/lib/grpc/generic/rpc_server.rb
GRPC.RpcServer.transition_running_state
def transition_running_state(target_state) state_transitions = { not_started: :running, running: :stopping, stopping: :stopped } if state_transitions[@running_state] == target_state @running_state = target_state else fail "Bad server state transition: #{@running_state}->#{target_state}" end end
ruby
def transition_running_state(target_state) state_transitions = { not_started: :running, running: :stopping, stopping: :stopped } if state_transitions[@running_state] == target_state @running_state = target_state else fail "Bad server state transition: #{@running_state}->#{target_state}" end end
[ "def", "transition_running_state", "(", "target_state", ")", "state_transitions", "=", "{", "not_started", ":", ":running", ",", "running", ":", ":stopping", ",", "stopping", ":", ":stopped", "}", "if", "state_transitions", "[", "@running_state", "]", "==", "targe...
Can only be called while holding @run_mutex
[ "Can", "only", "be", "called", "while", "holding" ]
f3937f0e55227a4ef3a23f895d3b204a947610f8
https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/rpc_server.rb#L267-L278
train
Change the running state of the server to the specified state.
[ 30522, 13366, 6653, 1035, 2770, 1035, 2110, 1006, 4539, 1035, 2110, 1007, 2110, 1035, 22166, 1027, 1063, 2025, 1035, 2318, 1024, 1024, 2770, 1010, 2770, 1024, 1024, 7458, 1010, 7458, 1024, 1024, 3030, 1065, 2065, 2110, 1035, 22166, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb
Azure::Compute::Mgmt::V2019_03_01.VirtualMachineScaleSetExtensions.get_with_http_info
def get_with_http_info(resource_group_name, vm_scale_set_name, vmss_extension_name, expand:nil, custom_headers:nil) get_async(resource_group_name, vm_scale_set_name, vmss_extension_name, expand:expand, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, vm_scale_set_name, vmss_extension_name, expand:nil, custom_headers:nil) get_async(resource_group_name, vm_scale_set_name, vmss_extension_name, expand:expand, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vmss_extension_name", ",", "expand", ":", "nil", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "vmss_extension_name...
The operation to get the extension. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set containing the extension. @param vmss_extension_name [String] The name of the VM scale set 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/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb#L147-L149
train
Gets the specified virtual machine extension.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 30524, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 1058, 5244, 2015, 1035, 5331, 1035, 2171, 1010, 7818, 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...
rails/rails
actionview/lib/action_view/template.rb
ActionView.Template.render
def render(view, locals, buffer = ActionView::OutputBuffer.new, &block) instrument_render_template do compile!(view) view._run(method_name, self, locals, buffer, &block) end rescue => e handle_render_error(view, e) end
ruby
def render(view, locals, buffer = ActionView::OutputBuffer.new, &block) instrument_render_template do compile!(view) view._run(method_name, self, locals, buffer, &block) end rescue => e handle_render_error(view, e) end
[ "def", "render", "(", "view", ",", "locals", ",", "buffer", "=", "ActionView", "::", "OutputBuffer", ".", "new", ",", "&", "block", ")", "instrument_render_template", "do", "compile!", "(", "view", ")", "view", ".", "_run", "(", "method_name", ",", "self",...
Render a template. If the template was not compiled yet, it is done exactly before rendering. This method is instrumented as "!render_template.action_view". Notice that we use a bang in this instrumentation because you don't want to consume this in production. This is only slow if it's being listened to.
[ "Render", "a", "template", ".", "If", "the", "template", "was", "not", "compiled", "yet", "it", "is", "done", "exactly", "before", "rendering", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/template.rb#L182-L189
train
Render the view.
[ 30522, 13366, 17552, 1006, 3193, 1010, 10575, 1010, 17698, 1027, 2895, 8584, 1024, 1024, 6434, 8569, 12494, 1012, 2047, 1010, 1004, 3796, 1007, 6602, 1035, 17552, 1035, 23561, 2079, 4012, 22090, 999, 1006, 3193, 1007, 3193, 1012, 1035, 2448...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb
Azure::Scheduler::Mgmt::V2016_03_01.Jobs.list_job_history
def list_job_history(resource_group_name, job_collection_name, job_name, top:nil, skip:nil, filter:nil, custom_headers:nil) first_page = list_job_history_as_lazy(resource_group_name, job_collection_name, job_name, top:top, skip:skip, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_job_history(resource_group_name, job_collection_name, job_name, top:nil, skip:nil, filter:nil, custom_headers:nil) first_page = list_job_history_as_lazy(resource_group_name, job_collection_name, job_name, top:top, skip:skip, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_job_history", "(", "resource_group_name", ",", "job_collection_name", ",", "job_name", ",", "top", ":", "nil", ",", "skip", ":", "nil", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_job_history_as_lazy",...
Lists job history. @param resource_group_name [String] The resource group name. @param job_collection_name [String] The job collection name. @param job_name [String] The job name. @param top [Integer] the number of job history to request, in the of range of [1..100]. @param skip [Integer] The (0-based) index of the job history list from which to begin requesting entries. @param filter [String] The filter to apply on the job state. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<JobHistoryDefinition>] operation results.
[ "Lists", "job", "history", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb#L639-L642
train
Gets the job history of a job.
[ 30522, 13366, 2862, 1035, 3105, 1035, 2381, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3105, 1035, 3074, 1035, 2171, 1010, 3105, 1035, 2171, 1010, 2327, 1024, 9152, 2140, 1010, 13558, 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...
AaronLasseigne/active_interaction
lib/active_interaction/filter.rb
ActiveInteraction.Filter.cast
def cast(value, _interaction) case value when NilClass raise MissingValueError, name unless default? nil else raise InvalidValueError, "#{name}: #{describe(value)}" end end
ruby
def cast(value, _interaction) case value when NilClass raise MissingValueError, name unless default? nil else raise InvalidValueError, "#{name}: #{describe(value)}" end end
[ "def", "cast", "(", "value", ",", "_interaction", ")", "case", "value", "when", "NilClass", "raise", "MissingValueError", ",", "name", "unless", "default?", "nil", "else", "raise", "InvalidValueError", ",", "\"#{name}: #{describe(value)}\"", "end", "end" ]
@param value [Object] @param _interaction [Base, nil] @return [Object] @raise [MissingValueError] If the value is missing and there is no default. @raise [InvalidValueError] If the value is invalid. @private
[ "@param", "value", "[", "Object", "]", "@param", "_interaction", "[", "Base", "nil", "]" ]
fdc00a041e939ef48948baa2f7fd1ce2e4d66982
https://github.com/AaronLasseigne/active_interaction/blob/fdc00a041e939ef48948baa2f7fd1ce2e4d66982/lib/active_interaction/filter.rb#L175-L184
train
Casts a value to a valid type.
[ 30522, 13366, 3459, 1006, 3643, 1010, 1035, 8290, 1007, 2553, 3643, 2043, 9152, 15472, 27102, 5333, 4394, 10175, 5657, 2121, 29165, 1010, 2171, 4983, 12398, 1029, 9152, 2140, 2842, 5333, 19528, 10175, 5657, 2121, 29165, 1010, 1000, 1001, 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...
cucumber/aruba
lib/aruba/config_wrapper.rb
Aruba.ConfigWrapper.method_missing
def method_missing(name, *args, &block) event_bus.notify Events::ChangedConfiguration.new(changed: { name: name.to_s.gsub(/=$/, ''), value: args.first }) if name.to_s.end_with? '=' config.send(name, *args, &block) end
ruby
def method_missing(name, *args, &block) event_bus.notify Events::ChangedConfiguration.new(changed: { name: name.to_s.gsub(/=$/, ''), value: args.first }) if name.to_s.end_with? '=' config.send(name, *args, &block) end
[ "def", "method_missing", "(", "name", ",", "*", "args", ",", "&", "block", ")", "event_bus", ".", "notify", "Events", "::", "ChangedConfiguration", ".", "new", "(", "changed", ":", "{", "name", ":", "name", ".", "to_s", ".", "gsub", "(", "/", "/", ",...
Create proxy @param [Config] config An aruba config object. @param [#notify] event_bus The event queue which should be notified. Proxy all methods If one method ends with "=", e.g. ":option1=", then notify the event queue, that the user changes the value of "option1"
[ "Create", "proxy" ]
add17615322f575588aef1fccce875396cdf36e9
https://github.com/cucumber/aruba/blob/add17615322f575588aef1fccce875396cdf36e9/lib/aruba/config_wrapper.rb#L32-L36
train
Called by the configuration object.
[ 30522, 13366, 4118, 30524, 2025, 8757, 2824, 1024, 1024, 2904, 8663, 8873, 27390, 3370, 1012, 2047, 1006, 2904, 1024, 1063, 2171, 1024, 2171, 1012, 2000, 1035, 1055, 1012, 28177, 12083, 1006, 1013, 1027, 1002, 1013, 1010, 1005, 1005, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_custom_prebuilt_entity_roles_with_http_info
def list_custom_prebuilt_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil) list_custom_prebuilt_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value! end
ruby
def list_custom_prebuilt_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil) list_custom_prebuilt_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value! end
[ "def", "list_custom_prebuilt_entity_roles_with_http_info", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "custom_headers", ":", "nil", ")", "list_custom_prebuilt_entity_roles_async", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "custom_headers", ":c...
Get all roles for a prebuilt 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", "prebuilt", "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#L7735-L7737
train
Gets the roles of a prebuilt entity.
[ 30522, 13366, 2862, 1035, 7661, 1035, 3653, 8569, 4014, 2102, 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, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb
Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.delete_certificate_with_http_info
def delete_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers:nil) delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value! end
ruby
def delete_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers:nil) delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value! end
[ "def", "delete_certificate_with_http_info", "(", "resource_group_name", ",", "certificate_order_name", ",", "name", ",", "custom_headers", ":", "nil", ")", "delete_certificate_async", "(", "resource_group_name", ",", "certificate_order_name", ",", "name", ",", "custom_heade...
Delete the certificate associated with a certificate order. Delete the certificate associated with a certificate order. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param certificate_order_name [String] Name of the certificate order. @param name [String] Name of the certificate. @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.
[ "Delete", "the", "certificate", "associated", "with", "a", "certificate", "order", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb#L981-L983
train
Deletes the specified certificate order.
[ 30522, 13366, 3972, 12870, 1035, 8196, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8196, 1035, 2344, 1035, 2171, 1010, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3972, 12870, 1035, 8196, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sferik/t
lib/t/utils.rb
T.Utils.distance_of_time_in_words
def distance_of_time_in_words(from_time, to_time = Time.now) # rubocop:disable CyclomaticComplexity seconds = (to_time - from_time).abs minutes = seconds / 60 case minutes when 0...1 case seconds when 0...1 'a split second' when 1...2 'a second' when 2...60 format('%d seconds', seconds) end when 1...2 'a minute' when 2...60 format('%d minutes', minutes) when 60...120 'an hour' # 120 minutes up to 23.5 hours when 120...1410 format('%d hours', (minutes.to_f / 60.0).round) # 23.5 hours up to 48 hours when 1410...2880 'a day' # 48 hours up to 29.5 days when 2880...42_480 format('%d days', (minutes.to_f / 1440.0).round) # 29.5 days up to 60 days when 42_480...86_400 'a month' # 60 days up to 11.5 months when 86_400...503_700 format('%d months', (minutes.to_f / 43_800.0).round) # 11.5 months up to 2 years when 503_700...1_051_200 'a year' else format('%d years', (minutes.to_f / 525_600.0).round) end end
ruby
def distance_of_time_in_words(from_time, to_time = Time.now) # rubocop:disable CyclomaticComplexity seconds = (to_time - from_time).abs minutes = seconds / 60 case minutes when 0...1 case seconds when 0...1 'a split second' when 1...2 'a second' when 2...60 format('%d seconds', seconds) end when 1...2 'a minute' when 2...60 format('%d minutes', minutes) when 60...120 'an hour' # 120 minutes up to 23.5 hours when 120...1410 format('%d hours', (minutes.to_f / 60.0).round) # 23.5 hours up to 48 hours when 1410...2880 'a day' # 48 hours up to 29.5 days when 2880...42_480 format('%d days', (minutes.to_f / 1440.0).round) # 29.5 days up to 60 days when 42_480...86_400 'a month' # 60 days up to 11.5 months when 86_400...503_700 format('%d months', (minutes.to_f / 43_800.0).round) # 11.5 months up to 2 years when 503_700...1_051_200 'a year' else format('%d years', (minutes.to_f / 525_600.0).round) end end
[ "def", "distance_of_time_in_words", "(", "from_time", ",", "to_time", "=", "Time", ".", "now", ")", "# rubocop:disable CyclomaticComplexity", "seconds", "=", "(", "to_time", "-", "from_time", ")", ".", "abs", "minutes", "=", "seconds", "/", "60", "case", "minute...
https://github.com/rails/rails/blob/bd8a970/actionpack/lib/action_view/helpers/date_helper.rb
[ "https", ":", "//", "github", ".", "com", "/", "rails", "/", "rails", "/", "blob", "/", "bd8a970", "/", "actionpack", "/", "lib", "/", "action_view", "/", "helpers", "/", "date_helper", ".", "rb" ]
00389d05605bc25e41dc9b25033fe89ca746ee1a
https://github.com/sferik/t/blob/00389d05605bc25e41dc9b25033fe89ca746ee1a/lib/t/utils.rb#L6-L46
train
Returns the distance of the given time in words
[ 30522, 13366, 3292, 1035, 1997, 1035, 2051, 1035, 1999, 1035, 2616, 1006, 2013, 1035, 2051, 1010, 2000, 1035, 2051, 1027, 2051, 1012, 2085, 1007, 1001, 14548, 24163, 2361, 1024, 4487, 19150, 22330, 20464, 9626, 4588, 9006, 19386, 3012, 3823...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rmagick/rmagick
lib/rmagick_internal.rb
Magick.Image.color_fill_to_border
def color_fill_to_border(x, y, fill) color_flood_fill(border_color, fill, x, y, Magick::FillToBorderMethod) end
ruby
def color_fill_to_border(x, y, fill) color_flood_fill(border_color, fill, x, y, Magick::FillToBorderMethod) end
[ "def", "color_fill_to_border", "(", "x", ",", "y", ",", "fill", ")", "color_flood_fill", "(", "border_color", ",", "fill", ",", "x", ",", "y", ",", "Magick", "::", "FillToBorderMethod", ")", "end" ]
Set all pixels that are neighbors of x,y and are not the border color to the fill color
[ "Set", "all", "pixels", "that", "are", "neighbors", "of", "x", "y", "and", "are", "not", "the", "border", "color", "to", "the", "fill", "color" ]
ef6688ed9d76bf123c2ea1a483eff8635051adb7
https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L778-L780
train
Fill the border to the specified color
[ 30522, 13366, 3609, 1035, 6039, 1035, 2000, 1035, 3675, 1006, 1060, 1010, 1061, 1010, 6039, 1007, 3609, 1035, 7186, 1035, 6039, 1006, 3675, 1035, 3609, 1010, 6039, 1010, 1060, 1010, 1061, 1010, 3894, 2243, 1024, 1024, 6039, 3406, 12821, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/rake/sprocketstask.rb
Rake.SprocketsTask.with_logger
def with_logger if env = manifest.environment old_logger = env.logger env.logger = @logger end yield ensure env.logger = old_logger if env end
ruby
def with_logger if env = manifest.environment old_logger = env.logger env.logger = @logger end yield ensure env.logger = old_logger if env end
[ "def", "with_logger", "if", "env", "=", "manifest", ".", "environment", "old_logger", "=", "env", ".", "logger", "env", ".", "logger", "=", "@logger", "end", "yield", "ensure", "env", ".", "logger", "=", "old_logger", "if", "env", "end" ]
Sub out environment logger with our rake task logger that writes to stderr.
[ "Sub", "out", "environment", "logger", "with", "our", "rake", "task", "logger", "that", "writes", "to", "stderr", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/rake/sprocketstask.rb#L143-L151
train
Sets the logger for the current object.
[ 30522, 13366, 2007, 1035, 8833, 4590, 2065, 4372, 2615, 1027, 19676, 1012, 4044, 2214, 1035, 8833, 4590, 1027, 4372, 2615, 1012, 8833, 4590, 4372, 2615, 1012, 8833, 4590, 1027, 1030, 8833, 4590, 2203, 10750, 5676, 4372, 2615, 1012, 8833, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
deivid-rodriguez/byebug
lib/byebug/processors/command_processor.rb
Byebug.CommandProcessor.run_cmd
def run_cmd(input) safely do command = command_list.match(input) return command.new(self, input).execute if command puts safe_inspect(multiple_thread_eval(input)) end end
ruby
def run_cmd(input) safely do command = command_list.match(input) return command.new(self, input).execute if command puts safe_inspect(multiple_thread_eval(input)) end end
[ "def", "run_cmd", "(", "input", ")", "safely", "do", "command", "=", "command_list", ".", "match", "(", "input", ")", "return", "command", ".", "new", "(", "self", ",", "input", ")", ".", "execute", "if", "command", "puts", "safe_inspect", "(", "multiple...
Executes the received input Instantiates a command matching the input and runs it. If a matching command is not found, it evaluates the unknown input.
[ "Executes", "the", "received", "input" ]
bf41a63858a648baa7fb621600d6451786d1572a
https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/processors/command_processor.rb#L158-L165
train
Runs a command in the current thread
[ 30522, 13366, 2448, 1035, 4642, 2094, 1006, 7953, 1007, 9689, 2079, 3094, 1027, 3094, 1035, 2862, 1012, 2674, 1006, 7953, 1007, 2709, 3094, 1012, 2047, 1006, 2969, 1010, 7953, 1007, 1012, 15389, 2065, 3094, 8509, 3647, 1035, 22459, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/webhook_operations.rb
Azure::Automation::Mgmt::V2015_10_31.WebhookOperations.create_or_update_with_http_info
def create_or_update_with_http_info(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers:nil) create_or_update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers:custom_headers).value! end
ruby
def create_or_update_with_http_info(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers:nil) create_or_update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers:custom_headers).value! end
[ "def", "create_or_update_with_http_info", "(", "resource_group_name", ",", "automation_account_name", ",", "webhook_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "create_or_update_async", "(", "resource_group_name", ",", "automation_account_name", ",", "...
Create the webhook identified by webhook name. @param resource_group_name [String] Name of an Azure Resource group. @param automation_account_name [String] The name of the automation account. @param webhook_name [String] The webhook name. @param parameters [WebhookCreateOrUpdateParameters] The create or update parameters for 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.
[ "Create", "the", "webhook", "identified", "by", "webhook", "name", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/webhook_operations.rb#L344-L346
train
Creates or updates a webhook.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 19309, 1035, 4070, 1035, 2171, 1010, 4773, 6806, 6559, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/public_ipaddresses.rb
Azure::Network::Mgmt::V2018_07_01.PublicIPAddresses.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, public_ip_address_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, public_ip_address_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, public_ip_address_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, public_ip_address_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "public_ip_address_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "public_ip_address_name", ",", "parameters", ...
Creates or updates a static or dynamic public IP address. @param resource_group_name [String] The name of the resource group. @param public_ip_address_name [String] The name of the public IP address. @param parameters [PublicIPAddress] Parameters supplied to the create or update public IP address operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Creates", "or", "updates", "a", "static", "or", "dynamic", "public", "IP", "address", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/public_ipaddresses.rb#L531-L533
train
Creates or updates an existing public IP address.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2270, 1035, 12997, 1035, 4769, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_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...
gocardless/business
lib/business/calendar.rb
Business.Calendar.subtract_business_days
def subtract_business_days(date, delta) date = roll_backward(date) delta.times do begin date -= day_interval_for(date) end until business_day?(date) end date end
ruby
def subtract_business_days(date, delta) date = roll_backward(date) delta.times do begin date -= day_interval_for(date) end until business_day?(date) end date end
[ "def", "subtract_business_days", "(", "date", ",", "delta", ")", "date", "=", "roll_backward", "(", "date", ")", "delta", ".", "times", "do", "begin", "date", "-=", "day_interval_for", "(", "date", ")", "end", "until", "business_day?", "(", "date", ")", "e...
Subtract a number of business days to a date. If a non-business day is given, counting will start from the previous business day. So, friday - 1 = thursday monday - 1 = friday sunday - 1 = thursday
[ "Subtract", "a", "number", "of", "business", "days", "to", "a", "date", ".", "If", "a", "non", "-", "business", "day", "is", "given", "counting", "will", "start", "from", "the", "previous", "business", "day", ".", "So", "friday", "-", "1", "=", "thursd...
62a2a09008095403bafa78033a8be1afe6debbf6
https://github.com/gocardless/business/blob/62a2a09008095403bafa78033a8be1afe6debbf6/lib/business/calendar.rb#L117-L125
train
Subtract business days from a date
[ 30522, 13366, 4942, 6494, 6593, 1035, 2449, 1035, 2420, 1006, 3058, 1010, 7160, 1007, 3058, 1027, 4897, 1035, 8848, 1006, 3058, 1007, 7160, 1012, 2335, 2079, 4088, 3058, 1011, 1027, 2154, 1035, 13483, 1035, 2005, 1006, 3058, 1007, 2203, 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_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb
Azure::EventHub::Mgmt::V2018_01_01_preview.Namespaces.delete_ip_filter_rule_with_http_info
def delete_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil) delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value! end
ruby
def delete_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil) delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value! end
[ "def", "delete_ip_filter_rule_with_http_info", "(", "resource_group_name", ",", "namespace_name", ",", "ip_filter_rule_name", ",", "custom_headers", ":", "nil", ")", "delete_ip_filter_rule_async", "(", "resource_group_name", ",", "namespace_name", ",", "ip_filter_rule_name", ...
Deletes an IpFilterRule for a Namespace. @param resource_group_name [String] Name of the resource group within the Azure subscription. @param namespace_name [String] The Namespace name @param ip_filter_rule_name [String] The IP Filter Rule name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Deletes", "an", "IpFilterRule", "for", "a", "Namespace", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb#L767-L769
train
Deletes an existing ip filter rule.
[ 30522, 13366, 3972, 12870, 1035, 12997, 1035, 11307, 1035, 3627, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3415, 15327, 1035, 2171, 1010, 12997, 1035, 11307, 1035, 3627, 1035, 2171, 1010, 7661, 1035, 203...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tongueroo/jets
lib/jets/controller/middleware/local.rb
Jets::Controller::Middleware.Local.routes_table
def routes_table routes = Jets::Router.routes return "Your routes table is empty." if routes.empty? text = "Verb | Path | Controller#action\n" text << "--- | --- | ---\n" routes.each do |route| text << "#{route.method} | #{route.path} | #{route.to}\n" end html = Kramdown::Document.new(text).to_html puts html html end
ruby
def routes_table routes = Jets::Router.routes return "Your routes table is empty." if routes.empty? text = "Verb | Path | Controller#action\n" text << "--- | --- | ---\n" routes.each do |route| text << "#{route.method} | #{route.path} | #{route.to}\n" end html = Kramdown::Document.new(text).to_html puts html html end
[ "def", "routes_table", "routes", "=", "Jets", "::", "Router", ".", "routes", "return", "\"Your routes table is empty.\"", "if", "routes", ".", "empty?", "text", "=", "\"Verb | Path | Controller#action\\n\"", "text", "<<", "\"--- | --- | ---\\n\"", "routes", ".", "each",...
Show pretty route table for user to help with debugging in non-production mode
[ "Show", "pretty", "route", "table", "for", "user", "to", "help", "with", "debugging", "in", "non", "-", "production", "mode" ]
46943a519224067e58aa3e2d5656e3ca083150f9
https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/controller/middleware/local.rb#L105-L118
train
Generate a route table
[ 30522, 13366, 5847, 1035, 2795, 5847, 1027, 9924, 1024, 1024, 2799, 2099, 1012, 5847, 2709, 1000, 2115, 5847, 2795, 2003, 4064, 1012, 1000, 2065, 5847, 1012, 4064, 1029, 3793, 1027, 1000, 12034, 1064, 4130, 1064, 11486, 1001, 2895, 1032, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...