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
Azure/azure-sdk-for-ruby
management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb
Azure::MachineLearningServices::Mgmt::V2018_03_01_preview.Workspaces.create_or_update
def create_or_update(resource_group_name, workspace_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(resource_group_name, workspace_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "resource_group_name", ",", "workspace_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_group_name", ",", "workspace_name", ",", "parameters", ",", "custom_headers...
Creates or updates a workspace with the specified parameters. @param resource_group_name [String] Name of the resource group in which workspace is located. @param workspace_name [String] Name of Azure Machine Learning workspace. @param parameters [Workspace] The parameters for creating or updating a machine learning workspace. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Workspace] operation results.
[ "Creates", "or", "updates", "a", "workspace", "with", "the", "specified", "parameters", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb#L133-L136
train
Creates or updates a managed cluster.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2573, 15327, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 2030, 1035, 10651, 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...
aws/aws-sdk-ruby
gems/aws-sdk-iam/lib/aws-sdk-iam/mfa_device.rb
Aws::IAM.MfaDevice.disassociate
def disassociate(options = {}) options = options.merge( user_name: @user_name, serial_number: @serial_number ) resp = @client.deactivate_mfa_device(options) resp.data end
ruby
def disassociate(options = {}) options = options.merge( user_name: @user_name, serial_number: @serial_number ) resp = @client.deactivate_mfa_device(options) resp.data end
[ "def", "disassociate", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "user_name", ":", "@user_name", ",", "serial_number", ":", "@serial_number", ")", "resp", "=", "@client", ".", "deactivate_mfa_device", "(", "options", "...
@example Request syntax with placeholder values mfa_device.disassociate() @param [Hash] options ({}) @return [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/mfa_device.rb#L226-L233
train
Disassociates the device from the MFA.
[ 30522, 13366, 4487, 20939, 6499, 7405, 2618, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 5310, 1035, 2171, 1024, 1030, 5310, 1035, 2171, 1010, 7642, 1035, 2193, 1024, 1030, 7642, 1035, 2193, 1007, 24501, 2361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/labs.rb
Azure::Labservices::Mgmt::V2018_10_15.Labs.update_with_http_info
def update_with_http_info(resource_group_name, lab_account_name, lab_name, lab, custom_headers:nil) update_async(resource_group_name, lab_account_name, lab_name, lab, custom_headers:custom_headers).value! end
ruby
def update_with_http_info(resource_group_name, lab_account_name, lab_name, lab, custom_headers:nil) update_async(resource_group_name, lab_account_name, lab_name, lab, custom_headers:custom_headers).value! end
[ "def", "update_with_http_info", "(", "resource_group_name", ",", "lab_account_name", ",", "lab_name", ",", "lab", ",", "custom_headers", ":", "nil", ")", "update_async", "(", "resource_group_name", ",", "lab_account_name", ",", "lab_name", ",", "lab", ",", "custom_h...
Modify properties of labs. @param resource_group_name [String] The name of the resource group. @param lab_account_name [String] The name of the lab Account. @param lab_name [String] The name of the lab. @param lab [LabFragment] Represents a lab. @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.
[ "Modify", "properties", "of", "labs", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/labs.rb#L425-L427
train
Updates a lab s index.
[ 30522, 13366, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 6845, 1035, 4070, 1035, 2171, 1010, 6845, 1035, 2171, 1010, 6845, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10651, 1035, 2004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_networks.rb
Azure::Network::Mgmt::V2018_07_01.VirtualNetworks.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, virtual_network_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, virtual_network_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "virtual_network_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "virtual_network_name", ",", "parameters", ",",...
Creates or updates a virtual network in the specified resource group. @param resource_group_name [String] The name of the resource group. @param virtual_network_name [String] The name of the virtual network. @param parameters [VirtualNetwork] Parameters supplied to the create or update virtual network 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", "virtual", "network", "in", "the", "specified", "resource", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_networks.rb#L718-L720
train
Creates or updates a virtual network.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb
Azure::Storage::Mgmt::V2018_11_01.StorageAccounts.failover_async
def failover_async(resource_group_name, account_name, custom_headers:nil) # Send request promise = begin_failover_async(resource_group_name, account_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end
ruby
def failover_async(resource_group_name, account_name, custom_headers:nil) # Send request promise = begin_failover_async(resource_group_name, account_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end
[ "def", "failover_async", "(", "resource_group_name", ",", "account_name", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_failover_async", "(", "resource_group_name", ",", "account_name", ",", "custom_headers", ":custom_headers", ")", "p...
@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 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", "within", "the", "user", "s", "subscription", ".", "The", "name", "is", "case", "insensitive", ".", "@param", "account_name", "[", "String", "]", "The", "na...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb#L1248-L1262
train
Gets the resource group failover policy.
[ 30522, 13366, 8246, 7840, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, 1035, 8246, 7840, 1035, 2004, 6038, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/express_route_connections.rb
Azure::Network::Mgmt::V2018_08_01.ExpressRouteConnections.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, express_route_gateway_name, connection_name, put_express_route_connection_parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, express_route_gateway_name, connection_name, put_express_route_connection_parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, express_route_gateway_name, connection_name, put_express_route_connection_parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, express_route_gateway_name, connection_name, put_express_route_connection_parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "express_route_gateway_name", ",", "connection_name", ",", "put_express_route_connection_parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name",...
Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. @param resource_group_name [String] The name of the resource group. @param express_route_gateway_name [String] The name of the ExpressRoute gateway. @param connection_name [String] The name of the connection subresource. @param put_express_route_connection_parameters [ExpressRouteConnection] Parameters required in an ExpressRouteConnection PUT 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", "a", "connection", "between", "an", "ExpressRoute", "gateway", "and", "an", "ExpressRoute", "circuit", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/express_route_connections.rb#L346-L348
train
Creates or updates an express route gateway connection.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4671, 1035, 2799, 1035, 11909, 1035, 2171, 1010, 4434, 1035, 2171, 1010, 2404, 1035, 4671, 1035, 2799, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb
Aws::EC2.Resource.dhcp_options_sets
def dhcp_options_sets(options = {}) batches = Enumerator.new do |y| batch = [] resp = @client.describe_dhcp_options(options) resp.data.dhcp_options.each do |d| batch << DhcpOptions.new( id: d.dhcp_options_id, data: d, client: @client ) end y.yield(batch) end DhcpOptions::Collection.new(batches) end
ruby
def dhcp_options_sets(options = {}) batches = Enumerator.new do |y| batch = [] resp = @client.describe_dhcp_options(options) resp.data.dhcp_options.each do |d| batch << DhcpOptions.new( id: d.dhcp_options_id, data: d, client: @client ) end y.yield(batch) end DhcpOptions::Collection.new(batches) end
[ "def", "dhcp_options_sets", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "batch", "=", "[", "]", "resp", "=", "@client", ".", "describe_dhcp_options", "(", "options", ")", "resp", ".", "data", ".", ...
@example Request syntax with placeholder values dhcp_options_sets = ec2.dhcp_options_sets({ dhcp_options_ids: ["String"], filters: [ { name: "String", values: ["String"], }, ], dry_run: false, }) @param [Hash] options ({}) @option options [Array<String>] :dhcp_options_ids The IDs of one or more DHCP options sets. Default: Describes all your DHCP options sets. @option options [Array<Types::Filter>] :filters One or more filters. * `dhcp-options-id` - The ID of a DHCP options set. * `key` - The key for one of the options (for example, `domain-name`). * `value` - The value for one of the options. * `owner-id` - The ID of the AWS account that owns the DHCP options set. * `tag`\:&lt;key&gt; - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key `Owner` and the value `TeamA`, specify `tag:Owner` for the filter name and `TeamA` for the filter value. * `tag-key` - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @return [DhcpOptions::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/resource.rb#L1327-L1341
train
Returns a list of dhcp options sets
[ 30522, 13366, 28144, 21906, 1035, 7047, 1035, 4520, 1006, 7047, 1027, 1063, 1065, 30524, 7396, 1012, 6235, 1035, 28144, 21906, 1035, 7047, 1006, 7047, 1007, 24501, 2361, 1012, 2951, 1012, 28144, 21906, 1035, 7047, 1012, 2169, 2079, 1064, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mojombo/chronic
lib/chronic/handlers.rb
Chronic.Handlers.handle_sm_sd
def handle_sm_sd(tokens, options) month = tokens[0].get_tag(ScalarMonth).type day = tokens[1].get_tag(ScalarDay).type year = self.now.year time_tokens = tokens.last(tokens.size - 2) return if month_overflow?(year, month, day) begin day_start = Chronic.time_class.local(year, month, day) if options[:context] == :future && day_start < now day_start = Chronic.time_class.local(year + 1, month, day) elsif options[:context] == :past && day_start > now day_start = Chronic.time_class.local(year - 1, month, day) end day_or_time(day_start, time_tokens, options) rescue ArgumentError nil end end
ruby
def handle_sm_sd(tokens, options) month = tokens[0].get_tag(ScalarMonth).type day = tokens[1].get_tag(ScalarDay).type year = self.now.year time_tokens = tokens.last(tokens.size - 2) return if month_overflow?(year, month, day) begin day_start = Chronic.time_class.local(year, month, day) if options[:context] == :future && day_start < now day_start = Chronic.time_class.local(year + 1, month, day) elsif options[:context] == :past && day_start > now day_start = Chronic.time_class.local(year - 1, month, day) end day_or_time(day_start, time_tokens, options) rescue ArgumentError nil end end
[ "def", "handle_sm_sd", "(", "tokens", ",", "options", ")", "month", "=", "tokens", "[", "0", "]", ".", "get_tag", "(", "ScalarMonth", ")", ".", "type", "day", "=", "tokens", "[", "1", "]", ".", "get_tag", "(", "ScalarDay", ")", ".", "type", "year", ...
Handle scalar-month/scalar-day
[ "Handle", "scalar", "-", "month", "/", "scalar", "-", "day" ]
2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c
https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L245-L266
train
Handle the SMA
[ 30522, 13366, 5047, 1035, 15488, 1035, 17371, 1006, 19204, 2015, 1010, 7047, 1007, 3204, 1027, 19204, 2015, 1031, 1014, 1033, 1012, 2131, 1035, 6415, 1006, 26743, 10867, 12162, 2232, 1007, 1012, 2828, 2154, 1027, 19204, 2015, 1031, 1015, 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...
boazsegev/combine_pdf
lib/combine_pdf/page_methods.rb
CombinePDF.Page_Methods.resize
def resize(new_size = nil, conserve_aspect_ratio = true) return page_size unless new_size c_mediabox = mediabox c_cropbox = cropbox c_size = c_cropbox || c_mediabox x_ratio = 1.0 * (new_size[2] - new_size[0]) / (c_size[2]) #-c_size[0]) y_ratio = 1.0 * (new_size[3] - new_size[1]) / (c_size[3]) #-c_size[1]) x_move = new_size[0] - c_size[0] y_move = new_size[1] - c_size[1] # puts "ctm will be: #{x_ratio.round(4)} 0 0 #{y_ratio.round(4)} #{x_move} #{y_move}" self[:MediaBox] = [(c_mediabox[0] + x_move), (c_mediabox[1] + y_move), ((c_mediabox[2] * x_ratio) + x_move), ((c_mediabox[3] * y_ratio) + y_move)] self[:CropBox] = [(c_cropbox[0] + x_move), (c_cropbox[1] + y_move), ((c_cropbox[2] * x_ratio) + x_move), ((c_cropbox[3] * y_ratio) + y_move)] if c_cropbox x_ratio = y_ratio = [x_ratio, y_ratio].min if conserve_aspect_ratio # insert the rotation stream into the current content stream # insert_content "q\n#{x_ratio.round(4).to_s} 0 0 #{y_ratio.round(4).to_s} 0 0 cm\n1 0 0 1 #{x_move} #{y_move} cm\n", 0 insert_content "q\n#{x_ratio.round(4)} 0 0 #{y_ratio.round(4)} #{x_move} #{y_move} cm\n", 0 # close the rotation stream insert_content CONTENT_CONTAINER_END # disconnect the content stream, so that future inserts aren't rotated @contents = false # init_contents # always return self, for chaining. self end
ruby
def resize(new_size = nil, conserve_aspect_ratio = true) return page_size unless new_size c_mediabox = mediabox c_cropbox = cropbox c_size = c_cropbox || c_mediabox x_ratio = 1.0 * (new_size[2] - new_size[0]) / (c_size[2]) #-c_size[0]) y_ratio = 1.0 * (new_size[3] - new_size[1]) / (c_size[3]) #-c_size[1]) x_move = new_size[0] - c_size[0] y_move = new_size[1] - c_size[1] # puts "ctm will be: #{x_ratio.round(4)} 0 0 #{y_ratio.round(4)} #{x_move} #{y_move}" self[:MediaBox] = [(c_mediabox[0] + x_move), (c_mediabox[1] + y_move), ((c_mediabox[2] * x_ratio) + x_move), ((c_mediabox[3] * y_ratio) + y_move)] self[:CropBox] = [(c_cropbox[0] + x_move), (c_cropbox[1] + y_move), ((c_cropbox[2] * x_ratio) + x_move), ((c_cropbox[3] * y_ratio) + y_move)] if c_cropbox x_ratio = y_ratio = [x_ratio, y_ratio].min if conserve_aspect_ratio # insert the rotation stream into the current content stream # insert_content "q\n#{x_ratio.round(4).to_s} 0 0 #{y_ratio.round(4).to_s} 0 0 cm\n1 0 0 1 #{x_move} #{y_move} cm\n", 0 insert_content "q\n#{x_ratio.round(4)} 0 0 #{y_ratio.round(4)} #{x_move} #{y_move} cm\n", 0 # close the rotation stream insert_content CONTENT_CONTAINER_END # disconnect the content stream, so that future inserts aren't rotated @contents = false # init_contents # always return self, for chaining. self end
[ "def", "resize", "(", "new_size", "=", "nil", ",", "conserve_aspect_ratio", "=", "true", ")", "return", "page_size", "unless", "new_size", "c_mediabox", "=", "mediabox", "c_cropbox", "=", "cropbox", "c_size", "=", "c_cropbox", "||", "c_mediabox", "x_ratio", "=",...
resizes the page relative to it's current viewport (either the cropbox or the mediabox), setting the new viewport to the requested size. accepts: new_size:: an Array with four elements: [X0, Y0, X_max, Y_max]. For example, A4: `[0, 0, 595, 842]`. It is important that the first two numbers are 0 unless a special effect is attempted. If the first two numbers change, the final result might not be the size requested, but the nearest possible transformation (calling the method again will allow a better resizing). conserve_aspect_ratio:: whether to keep the current content in the same aspect ratio or to allow streaching. Defaults to true - so that although the content is resized, it might not fill the new size completely.
[ "resizes", "the", "page", "relative", "to", "it", "s", "current", "viewport", "(", "either", "the", "cropbox", "or", "the", "mediabox", ")", "setting", "the", "new", "viewport", "to", "the", "requested", "size", "." ]
09054051019c069f551f3e60be789577c0f93900
https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/page_methods.rb#L438-L461
train
Resize the page to the new size.
[ 30522, 13366, 24501, 4697, 1006, 2047, 1035, 2946, 1027, 9152, 2140, 1010, 27749, 1035, 7814, 1035, 6463, 1027, 2995, 1007, 2709, 3931, 1035, 2946, 4983, 2047, 1035, 2946, 1039, 1035, 2865, 8758, 1027, 2865, 8758, 1039, 1035, 10416, 8758, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_backup_short_term_retention_policies.rb
Azure::SQL::Mgmt::V2017_03_01_preview.ManagedBackupShortTermRetentionPolicies.list_by_database_with_http_info
def list_by_database_with_http_info(resource_group_name, managed_instance_name, database_name, custom_headers:nil) list_by_database_async(resource_group_name, managed_instance_name, database_name, custom_headers:custom_headers).value! end
ruby
def list_by_database_with_http_info(resource_group_name, managed_instance_name, database_name, custom_headers:nil) list_by_database_async(resource_group_name, managed_instance_name, database_name, custom_headers:custom_headers).value! end
[ "def", "list_by_database_with_http_info", "(", "resource_group_name", ",", "managed_instance_name", ",", "database_name", ",", "custom_headers", ":", "nil", ")", "list_by_database_async", "(", "resource_group_name", ",", "managed_instance_name", ",", "database_name", ",", "...
Gets a managed database's short term retention policy list. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managed_instance_name [String] The name of the managed instance. @param database_name [String] The name of the database. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "a", "managed", "database", "s", "short", "term", "retention", "policy", "list", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_backup_short_term_retention_policies.rb#L265-L267
train
Gets the list of managed databases.
[ 30522, 13366, 2862, 1035, 2011, 1035, 7809, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3266, 1035, 6013, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2862, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_entities_with_http_info
def list_entities_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil) list_entities_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value! end
ruby
def list_entities_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil) list_entities_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value! end
[ "def", "list_entities_with_http_info", "(", "app_id", ",", "version_id", ",", "skip", ":", "0", ",", "take", ":", "100", ",", "custom_headers", ":", "nil", ")", "list_entities_async", "(", "app_id", ",", "version_id", ",", "skip", ":", "skip", ",", "take", ...
Gets information about all the simple entity models in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param skip [Integer] The number of entries to skip. Default value is 0. @param take [Integer] The number of entries to return. Maximum page size is 500. Default is 100. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "information", "about", "all", "the", "simple", "entity", "models", "in", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L401-L403
train
Gets the list of entities in a version of the application.
[ 30522, 13366, 2862, 1035, 11422, 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, 9152, 2140, 1007, 2862, 1035, 11422...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
teamcapybara/capybara
lib/capybara/session.rb
Capybara.Session.window_opened_by
def window_opened_by(**options) old_handles = driver.window_handles yield synchronize_windows(options) do opened_handles = (driver.window_handles - old_handles) if opened_handles.size != 1 raise Capybara::WindowError, 'block passed to #window_opened_by '\ "opened #{opened_handles.size} windows instead of 1" end Window.new(self, opened_handles.first) end end
ruby
def window_opened_by(**options) old_handles = driver.window_handles yield synchronize_windows(options) do opened_handles = (driver.window_handles - old_handles) if opened_handles.size != 1 raise Capybara::WindowError, 'block passed to #window_opened_by '\ "opened #{opened_handles.size} windows instead of 1" end Window.new(self, opened_handles.first) end end
[ "def", "window_opened_by", "(", "**", "options", ")", "old_handles", "=", "driver", ".", "window_handles", "yield", "synchronize_windows", "(", "options", ")", "do", "opened_handles", "=", "(", "driver", ".", "window_handles", "-", "old_handles", ")", "if", "ope...
Get the window that has been opened by the passed block. It will wait for it to be opened (in the same way as other Capybara methods wait). It's better to use this method than `windows.last` {https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html#h_note_10 as order of windows isn't defined in some drivers} @overload window_opened_by(**options, &block) @param options [Hash] @option options [Numeric] :wait (Capybara.default_max_wait_time) maximum wait time @return [Capybara::Window] the window that has been opened within a block @raise [Capybara::WindowError] if block passed to window hasn't opened window or opened more than one window
[ "Get", "the", "window", "that", "has", "been", "opened", "by", "the", "passed", "block", ".", "It", "will", "wait", "for", "it", "to", "be", "opened", "(", "in", "the", "same", "way", "as", "other", "Capybara", "methods", "wait", ")", ".", "It", "s",...
3819078c820c5cd3be6f0bc9e8b1b0cc1190bc41
https://github.com/teamcapybara/capybara/blob/3819078c820c5cd3be6f0bc9e8b1b0cc1190bc41/lib/capybara/session.rb#L556-L568
train
Returns the window that was opened by the given block.
[ 30522, 13366, 3332, 1035, 2441, 1035, 2011, 1006, 1008, 1008, 7047, 1007, 2214, 1035, 16024, 1027, 4062, 1012, 3332, 1035, 16024, 10750, 26351, 8093, 10698, 4371, 1035, 3645, 1006, 7047, 1007, 2079, 2441, 1035, 16024, 1027, 1006, 4062, 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...
plataformatec/simple_form
lib/simple_form/form_builder.rb
SimpleForm.FormBuilder.association
def association(association, options = {}, &block) options = options.dup return simple_fields_for(*[association, options.delete(:collection), options].compact, &block) if block_given? raise ArgumentError, "Association cannot be used in forms not associated with an object" unless @object reflection = find_association_reflection(association) raise "Association #{association.inspect} not found" unless reflection options[:as] ||= :select options[:collection] ||= fetch_association_collection(reflection, options) attribute = build_association_attribute(reflection, association, options) input(attribute, options.merge(reflection: reflection)) end
ruby
def association(association, options = {}, &block) options = options.dup return simple_fields_for(*[association, options.delete(:collection), options].compact, &block) if block_given? raise ArgumentError, "Association cannot be used in forms not associated with an object" unless @object reflection = find_association_reflection(association) raise "Association #{association.inspect} not found" unless reflection options[:as] ||= :select options[:collection] ||= fetch_association_collection(reflection, options) attribute = build_association_attribute(reflection, association, options) input(attribute, options.merge(reflection: reflection)) end
[ "def", "association", "(", "association", ",", "options", "=", "{", "}", ",", "&", "block", ")", "options", "=", "options", ".", "dup", "return", "simple_fields_for", "(", "[", "association", ",", "options", ".", "delete", "(", ":collection", ")", ",", "...
Helper for dealing with association selects/radios, generating the collection automatically. It's just a wrapper to input, so all options supported in input are also supported by association. Some extra options can also be given: == Examples simple_form_for @user do |f| f.association :company # Company.all end f.association :company, collection: Company.all(order: 'name') # Same as using :order option, but overriding collection == Block When a block is given, association simple behaves as a proxy to simple_fields_for: f.association :company do |c| c.input :name c.input :type end From the options above, only :collection can also be supplied. Please note that the association helper is currently only tested with Active Record. Depending on the ORM you are using your mileage may vary.
[ "Helper", "for", "dealing", "with", "association", "selects", "/", "radios", "generating", "the", "collection", "automatically", ".", "It", "s", "just", "a", "wrapper", "to", "input", "so", "all", "options", "supported", "in", "input", "are", "also", "supporte...
4dd9261ebb392e46a9beeefe8d83081e7c6e56b5
https://github.com/plataformatec/simple_form/blob/4dd9261ebb392e46a9beeefe8d83081e7c6e56b5/lib/simple_form/form_builder.rb#L206-L223
train
Returns a new object with the given association.
[ 30522, 13366, 2523, 1006, 2523, 1010, 7047, 1027, 1063, 1065, 1010, 1004, 3796, 1007, 7047, 1027, 7047, 1012, 4241, 2361, 2709, 3722, 1035, 4249, 1035, 2005, 1006, 1008, 1031, 2523, 1010, 7047, 1012, 3972, 12870, 1006, 1024, 3074, 1007, 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_batch/lib/2015-12-01/generated/azure_mgmt_batch/application_package_operations.rb
Azure::Batch::Mgmt::V2015_12_01.ApplicationPackageOperations.activate
def activate(resource_group_name, account_name, application_id, version, parameters, custom_headers:nil) response = activate_async(resource_group_name, account_name, application_id, version, parameters, custom_headers:custom_headers).value! nil end
ruby
def activate(resource_group_name, account_name, application_id, version, parameters, custom_headers:nil) response = activate_async(resource_group_name, account_name, application_id, version, parameters, custom_headers:custom_headers).value! nil end
[ "def", "activate", "(", "resource_group_name", ",", "account_name", ",", "application_id", ",", "version", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "activate_async", "(", "resource_group_name", ",", "account_name", ",", "applicatio...
Activates the specified application package. @param resource_group_name [String] The name of the resource group that contains the Batch account. @param account_name [String] The name of the Batch account. @param application_id [String] The ID of the application. @param version [String] The version of the application to activate. @param parameters [ActivateApplicationPackageParameters] The parameters for the request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Activates", "the", "specified", "application", "package", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2015-12-01/generated/azure_mgmt_batch/application_package_operations.rb#L38-L41
train
Activate an application.
[ 30522, 13366, 20544, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 4646, 1035, 8909, 1010, 2544, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 20544, 1035, 2004, 6038, 2278, 1006, 7692, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/managed_clusters.rb
Azure::ContainerService::Mgmt::V2019_02_01.ManagedClusters.reset_aadprofile_async
def reset_aadprofile_async(resource_group_name, resource_name, parameters, custom_headers:nil) # Send request promise = begin_reset_aadprofile_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def reset_aadprofile_async(resource_group_name, resource_name, parameters, custom_headers:nil) # Send request promise = begin_reset_aadprofile_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "reset_aadprofile_async", "(", "resource_group_name", ",", "resource_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_reset_aadprofile_async", "(", "resource_group_name", ",", "resource_name", ",", "paramete...
@param resource_group_name [String] The name of the resource group. @param resource_name [String] The name of the managed cluster resource. @param parameters [ManagedClusterAADProfile] Parameters supplied to the Reset AAD Profile operation for a Managed Cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", ".", "@param", "resource_name", "[", "String", "]", "The", "name", "of", "the", "managed", "cluster", "resource", ".", "@param", "parameters", "[", "ManagedCl...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/managed_clusters.rb#L941-L955
train
Resets an Azure Advisor Profile.
[ 30522, 13366, 25141, 1035, 9779, 18927, 3217, 8873, 2571, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb
Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.get_at_management_group
def get_at_management_group(management_group_id, remediation_name, custom_headers:nil) response = get_at_management_group_async(management_group_id, remediation_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_at_management_group(management_group_id, remediation_name, custom_headers:nil) response = get_at_management_group_async(management_group_id, remediation_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_at_management_group", "(", "management_group_id", ",", "remediation_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_at_management_group_async", "(", "management_group_id", ",", "remediation_name", ",", "custom_headers", ":custom_headers", ")...
Gets an existing remediation at management group scope. @param management_group_id [String] Management group ID. @param remediation_name [String] The name of the remediation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Remediation] operation results.
[ "Gets", "an", "existing", "remediation", "at", "management", "group", "scope", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L437-L440
train
Gets the specified remediation at management group scope.
[ 30522, 13366, 2131, 1035, 2012, 1035, 2968, 1035, 2177, 1006, 2968, 1035, 2177, 1035, 8909, 1010, 2128, 16969, 3508, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 2012, 1035, 2968, 1035, 2177, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/environments.rb
Azure::Labservices::Mgmt::V2018_10_15.Environments.begin_delete_with_http_info
def begin_delete_with_http_info(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, custom_headers:nil) begin_delete_async(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, custom_headers:custom_headers).value! end
ruby
def begin_delete_with_http_info(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, custom_headers:nil) begin_delete_async(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, custom_headers:custom_headers).value! end
[ "def", "begin_delete_with_http_info", "(", "resource_group_name", ",", "lab_account_name", ",", "lab_name", ",", "environment_setting_name", ",", "environment_name", ",", "custom_headers", ":", "nil", ")", "begin_delete_async", "(", "resource_group_name", ",", "lab_account_...
Delete environment. This operation can take a while to complete @param resource_group_name [String] The name of the resource group. @param lab_account_name [String] The name of the lab Account. @param lab_name [String] The name of the lab. @param environment_setting_name [String] The name of the environment Setting. @param environment_name [String] The name of the environment. @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", "environment", ".", "This", "operation", "can", "take", "a", "while", "to", "complete" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/environments.rb#L801-L803
train
Deletes an existing environment.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 6845, 1035, 4070, 1035, 2171, 1010, 6845, 1035, 2171, 1010, 4044, 1035, 4292, 1035, 2171, 1010, 4044, 1035, 2171, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.begin_get_network_configuration_diagnostic
def begin_get_network_configuration_diagnostic(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_get_network_configuration_diagnostic(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_get_network_configuration_diagnostic", "(", "resource_group_name", ",", "network_watcher_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_get_network_configuration_diagnostic_async", "(", "resource_group_name", ",", "networ...
Get network configuration diagnostic. @param resource_group_name [String] The name of the resource group. @param network_watcher_name [String] The name of the network watcher. @param parameters [NetworkConfigurationDiagnosticParameters] Parameters to get network configuration diagnostic. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [NetworkConfigurationDiagnosticResponse] operation results.
[ "Get", "network", "configuration", "diagnostic", "." ]
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#L2497-L2500
train
Gets the network configuration diagnostic.
[ 30522, 13366, 4088, 1035, 2131, 1035, 2897, 1035, 9563, 1035, 16474, 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, 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...
huginn/huginn
app/concerns/liquid_interpolatable.rb
LiquidInterpolatable.Filters.to_uri
def to_uri(uri, base_uri = nil) case base_uri when nil, '' Utils.normalize_uri(uri.to_s) else Utils.normalize_uri(base_uri) + Utils.normalize_uri(uri.to_s) end rescue URI::Error nil end
ruby
def to_uri(uri, base_uri = nil) case base_uri when nil, '' Utils.normalize_uri(uri.to_s) else Utils.normalize_uri(base_uri) + Utils.normalize_uri(uri.to_s) end rescue URI::Error nil end
[ "def", "to_uri", "(", "uri", ",", "base_uri", "=", "nil", ")", "case", "base_uri", "when", "nil", ",", "''", "Utils", ".", "normalize_uri", "(", "uri", ".", "to_s", ")", "else", "Utils", ".", "normalize_uri", "(", "base_uri", ")", "+", "Utils", ".", ...
Parse an input into a URI object, optionally resolving it against a base URI if given. A URI object will have the following properties: scheme, userinfo, host, port, registry, path, opaque, query, and fragment.
[ "Parse", "an", "input", "into", "a", "URI", "object", "optionally", "resolving", "it", "against", "a", "base", "URI", "if", "given", "." ]
01e18fef7b6bd827a5d48a89391e460b5fb1bee3
https://github.com/huginn/huginn/blob/01e18fef7b6bd827a5d48a89391e460b5fb1bee3/app/concerns/liquid_interpolatable.rb#L142-L151
train
Returns the URI of the given URI.
[ 30522, 13366, 2000, 1035, 24471, 2072, 1006, 24471, 2072, 1010, 2918, 1035, 24471, 2072, 1027, 9152, 2140, 1007, 2553, 2918, 1035, 24471, 2072, 30524, 1035, 24471, 2072, 1006, 24471, 2072, 1012, 2000, 1035, 1055, 1007, 2203, 5343, 24471, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
cheezy/page-object
lib/page-object/accessors.rb
PageObject.Accessors.h4
def h4(name, identifier={:index => 0}, &block) standard_methods(name, identifier, 'h4_for', &block) define_method(name) do return platform.h4_text_for identifier.clone unless block_given? self.send("#{name}_element").text end end
ruby
def h4(name, identifier={:index => 0}, &block) standard_methods(name, identifier, 'h4_for', &block) define_method(name) do return platform.h4_text_for identifier.clone unless block_given? self.send("#{name}_element").text end end
[ "def", "h4", "(", "name", ",", "identifier", "=", "{", ":index", "=>", "0", "}", ",", "&", "block", ")", "standard_methods", "(", "name", ",", "identifier", ",", "'h4_for'", ",", "block", ")", "define_method", "(", "name", ")", "do", "return", "platfor...
adds three methods - one to retrieve the text of a h4 element, another to return a h4 element, and another to check for it's existence. @example h4(:title, :id => 'title') # will generate 'title', 'title_element', and 'title?' methods @param [Symbol] the name used for the generated methods @param [Hash] identifier how we find a H4. @param optional block to be invoked when element method is called
[ "adds", "three", "methods", "-", "one", "to", "retrieve", "the", "text", "of", "a", "h4", "element", "another", "to", "return", "a", "h4", "element", "and", "another", "to", "check", "for", "it", "s", "existence", "." ]
850d775bf63768fbb1551a34480195785fe8e193
https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L722-L728
train
Creates a new H4 element.
[ 30522, 13366, 1044, 2549, 1006, 2171, 1010, 8909, 4765, 18095, 1027, 1063, 1024, 5950, 1027, 1028, 1014, 1065, 1010, 1004, 3796, 1007, 3115, 1035, 4725, 1006, 2171, 1010, 8909, 4765, 18095, 1010, 1005, 1044, 2549, 1035, 2005, 1005, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/overcommit
lib/overcommit/hook_context/pre_commit.rb
Overcommit::HookContext.PreCommit.restore_modified_times
def restore_modified_times @modified_times.each do |file, time| next if Overcommit::Utils.broken_symlink?(file) next unless File.exist?(file) File.utime(time, time, file) end end
ruby
def restore_modified_times @modified_times.each do |file, time| next if Overcommit::Utils.broken_symlink?(file) next unless File.exist?(file) File.utime(time, time, file) end end
[ "def", "restore_modified_times", "@modified_times", ".", "each", "do", "|", "file", ",", "time", "|", "next", "if", "Overcommit", "::", "Utils", ".", "broken_symlink?", "(", "file", ")", "next", "unless", "File", ".", "exist?", "(", "file", ")", "File", "....
Restores the file modification times for all modified files to make it appear like they never changed.
[ "Restores", "the", "file", "modification", "times", "for", "all", "modified", "files", "to", "make", "it", "appear", "like", "they", "never", "changed", "." ]
35d60adb41da942178b789560968e3ad030b0ac7
https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/hook_context/pre_commit.rb#L202-L208
train
Restore the modified times of the file.
[ 30522, 13366, 9239, 1035, 6310, 1035, 2335, 1030, 6310, 1035, 2335, 1012, 2169, 2079, 1064, 5371, 1010, 2051, 1064, 2279, 2065, 2058, 9006, 22930, 1024, 1024, 21183, 12146, 1012, 3714, 1035, 25353, 19968, 19839, 1029, 1006, 5371, 1007, 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...
appium/ruby_lib
lib/appium_lib/common/helper.rb
Appium.Common.xml_keys
def xml_keys(target) lazy_load_strings @lazy_load_strings.select { |key, _value| key.downcase.include? target.downcase } end
ruby
def xml_keys(target) lazy_load_strings @lazy_load_strings.select { |key, _value| key.downcase.include? target.downcase } end
[ "def", "xml_keys", "(", "target", ")", "lazy_load_strings", "@lazy_load_strings", ".", "select", "{", "|", "key", ",", "_value", "|", "key", ".", "downcase", ".", "include?", "target", ".", "downcase", "}", "end" ]
Search strings.xml's values for target. @param target [String] the target to search for in strings.xml values @return [Array]
[ "Search", "strings", ".", "xml", "s", "values", "for", "target", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/common/helper.rb#L183-L186
train
Returns the keys of the strings that are in the target XML file.
[ 30522, 13366, 20950, 1035, 6309, 1006, 4539, 1007, 13971, 1035, 7170, 1035, 7817, 1030, 13971, 1035, 7170, 1035, 7817, 1012, 7276, 1063, 1064, 3145, 1010, 1035, 3643, 1064, 3145, 1012, 2091, 18382, 1012, 2421, 1029, 4539, 1012, 2091, 18382,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ankane/ahoy_email
lib/ahoy_email/processor.rb
AhoyEmail.Processor.trackable?
def trackable?(uri) uri && uri.absolute? && %w(http https).include?(uri.scheme) end
ruby
def trackable?(uri) uri && uri.absolute? && %w(http https).include?(uri.scheme) end
[ "def", "trackable?", "(", "uri", ")", "uri", "&&", "uri", ".", "absolute?", "&&", "%w(", "http", "https", ")", ".", "include?", "(", "uri", ".", "scheme", ")", "end" ]
Filter trackable URIs, i.e. absolute one with http
[ "Filter", "trackable", "URIs", "i", ".", "e", ".", "absolute", "one", "with", "http" ]
6f2777080365f4f515f7ad9c74f5dbbd348ce948
https://github.com/ankane/ahoy_email/blob/6f2777080365f4f515f7ad9c74f5dbbd348ce948/lib/ahoy_email/processor.rb#L141-L143
train
Returns true if the URI is trackable
[ 30522, 13366, 2650, 3085, 1029, 1006, 24471, 2072, 1007, 24471, 2072, 1004, 1004, 24471, 2072, 1012, 7619, 1029, 1004, 1004, 1003, 1059, 1006, 8299, 16770, 1007, 1012, 2421, 1029, 1006, 24471, 2072, 1012, 5679, 1007, 2203, 102, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/rails
activesupport/lib/active_support/message_verifier.rb
ActiveSupport.MessageVerifier.generate
def generate(value, expires_at: nil, expires_in: nil, purpose: nil) data = encode(Messages::Metadata.wrap(@serializer.dump(value), expires_at: expires_at, expires_in: expires_in, purpose: purpose)) "#{data}--#{generate_digest(data)}" end
ruby
def generate(value, expires_at: nil, expires_in: nil, purpose: nil) data = encode(Messages::Metadata.wrap(@serializer.dump(value), expires_at: expires_at, expires_in: expires_in, purpose: purpose)) "#{data}--#{generate_digest(data)}" end
[ "def", "generate", "(", "value", ",", "expires_at", ":", "nil", ",", "expires_in", ":", "nil", ",", "purpose", ":", "nil", ")", "data", "=", "encode", "(", "Messages", "::", "Metadata", ".", "wrap", "(", "@serializer", ".", "dump", "(", "value", ")", ...
Generates a signed message for the provided value. The message is signed with the +MessageVerifier+'s secret. Without knowing the secret, the original value cannot be extracted from the message. verifier = ActiveSupport::MessageVerifier.new 's3Krit' verifier.generate 'a private message' # => "BAhJIhRwcml2YXRlLW1lc3NhZ2UGOgZFVA==--e2d724331ebdee96a10fb99b089508d1c72bd772"
[ "Generates", "a", "signed", "message", "for", "the", "provided", "value", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/message_verifier.rb#L186-L189
train
Generate a unique identifier for the given value.
[ 30522, 13366, 9699, 1006, 3643, 1010, 4654, 20781, 2015, 1035, 2012, 1024, 9152, 2140, 1010, 4654, 20781, 2015, 1035, 1999, 1024, 9152, 2140, 1010, 3800, 1024, 9152, 2140, 1007, 2951, 1027, 4372, 16044, 1006, 7696, 1024, 1024, 27425, 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_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb
Azure::ApiManagement::Mgmt::V2016_07_07.GroupUsers.list_by_group_next
def list_by_group_next(next_page_link, custom_headers:nil) response = list_by_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_group_next(next_page_link, custom_headers:nil) response = list_by_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_group_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_group_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response",...
Lists a collection of the members of the group, specified by its identifier. @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 [UserCollection] operation results.
[ "Lists", "a", "collection", "of", "the", "members", "of", "the", "group", "specified", "by", "its", "identifier", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb#L428-L431
train
Gets the list of the elastic network interfaces.
[ 30522, 13366, 2862, 1035, 2011, 1035, 2177, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 2177, 1035, 2279, 1035, 2004, 6038, 2278, 1006, 2279, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
opal/opal
lib/opal/compiler.rb
Opal.Compiler.error
def error(msg, line = nil) error = ::Opal::SyntaxError.new(msg) error.location = Opal::OpalBacktraceLocation.new(file, line) raise error end
ruby
def error(msg, line = nil) error = ::Opal::SyntaxError.new(msg) error.location = Opal::OpalBacktraceLocation.new(file, line) raise error end
[ "def", "error", "(", "msg", ",", "line", "=", "nil", ")", "error", "=", "::", "Opal", "::", "SyntaxError", ".", "new", "(", "msg", ")", "error", ".", "location", "=", "Opal", "::", "OpalBacktraceLocation", ".", "new", "(", "file", ",", "line", ")", ...
This is called when a parsing/processing error occurs. This method simply appends the filename and curent line number onto the message and raises it.
[ "This", "is", "called", "when", "a", "parsing", "/", "processing", "error", "occurs", ".", "This", "method", "simply", "appends", "the", "filename", "and", "curent", "line", "number", "onto", "the", "message", "and", "raises", "it", "." ]
41aedc0fd62aab00d3c117ba0caf00206bedd981
https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/lib/opal/compiler.rb#L225-L229
train
Raise an error
[ 30522, 13366, 7561, 1006, 5796, 2290, 1010, 2240, 1027, 9152, 2140, 1007, 7561, 1027, 1024, 1024, 6728, 2389, 1024, 1024, 20231, 2121, 29165, 1012, 2047, 1006, 5796, 2290, 1007, 7561, 1012, 3295, 1027, 6728, 2389, 1024, 1024, 6728, 2389, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/drawing/vml_shape.rb
Axlsx.VmlShape.to_xml_string
def to_xml_string(str ='') str << <<SHAME_ON_YOU <v:shape id="#{@id}" type="#_x0000_t202" fillcolor="#ffffa1 [80]" o:insetmode="auto" style="visibility:#{@visible ? 'visible' : 'hidden'}"> <v:fill color2="#ffffa1 [80]"/> <v:shadow on="t" obscured="t"/> <v:path o:connecttype="none"/> <v:textbox style='mso-fit-text-with-word-wrap:t'> <div style='text-align:left'></div> </v:textbox> <x:ClientData ObjectType="Note"> <x:MoveWithCells/> <x:SizeWithCells/> <x:Anchor>#{left_column}, #{left_offset}, #{top_row}, #{top_offset}, #{right_column}, #{right_offset}, #{bottom_row}, #{bottom_offset}</x:Anchor> <x:AutoFill>False</x:AutoFill> <x:Row>#{row}</x:Row> <x:Column>#{column}</x:Column> #{@visible ? '<x:Visible/>' : ''} </x:ClientData> </v:shape> SHAME_ON_YOU end
ruby
def to_xml_string(str ='') str << <<SHAME_ON_YOU <v:shape id="#{@id}" type="#_x0000_t202" fillcolor="#ffffa1 [80]" o:insetmode="auto" style="visibility:#{@visible ? 'visible' : 'hidden'}"> <v:fill color2="#ffffa1 [80]"/> <v:shadow on="t" obscured="t"/> <v:path o:connecttype="none"/> <v:textbox style='mso-fit-text-with-word-wrap:t'> <div style='text-align:left'></div> </v:textbox> <x:ClientData ObjectType="Note"> <x:MoveWithCells/> <x:SizeWithCells/> <x:Anchor>#{left_column}, #{left_offset}, #{top_row}, #{top_offset}, #{right_column}, #{right_offset}, #{bottom_row}, #{bottom_offset}</x:Anchor> <x:AutoFill>False</x:AutoFill> <x:Row>#{row}</x:Row> <x:Column>#{column}</x:Column> #{@visible ? '<x:Visible/>' : ''} </x:ClientData> </v:shape> SHAME_ON_YOU end
[ "def", "to_xml_string", "(", "str", "=", "''", ")", "str", "<<", "<<SHAME_ON_YOU", "#{", "@id", "}", "#{", "@visible", "?", "'visible'", ":", "'hidden'", "}", "#{", "left_column", "}", "#{", "left_offset", "}", "#{", "top_row", "}", "#{", "top_offset", "...
serialize the shape to a string @param [String] str @return [String]
[ "serialize", "the", "shape", "to", "a", "string" ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/vml_shape.rb#L40-L64
train
Returns a string representation of the object.
[ 30522, 13366, 2000, 1035, 20950, 1035, 5164, 1006, 2358, 2099, 1027, 1005, 1005, 1007, 2358, 2099, 1026, 1026, 1026, 1026, 9467, 1035, 2006, 1035, 2017, 1026, 1058, 1024, 4338, 8909, 1027, 1000, 1001, 1063, 1030, 8909, 1065, 1000, 2828, 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_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb
Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainers.switch_protection
def switch_protection(fabric_name, protection_container_name, switch_input, custom_headers:nil) response = switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def switch_protection(fabric_name, protection_container_name, switch_input, custom_headers:nil) response = switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "switch_protection", "(", "fabric_name", ",", "protection_container_name", ",", "switch_input", ",", "custom_headers", ":", "nil", ")", "response", "=", "switch_protection_async", "(", "fabric_name", ",", "protection_container_name", ",", "switch_input", ",", "cu...
Switches protection from one container to another or one replication provider to another. Operation to switch protection from one container to another or one replication provider to another. @param fabric_name [String] Unique fabric name. @param protection_container_name [String] Protection container name. @param switch_input [SwitchProtectionInput] Switch protection input. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ProtectionContainer] operation results.
[ "Switches", "protection", "from", "one", "container", "to", "another", "or", "one", "replication", "provider", "to", "another", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb#L376-L379
train
Switch protection of a protection container.
[ 30522, 13366, 6942, 1035, 3860, 1006, 8313, 1035, 2171, 1010, 3860, 1035, 11661, 1035, 2171, 1010, 6942, 1035, 7953, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 6942, 1035, 3860, 1035, 2004, 6038, 2278, 1006, 8313, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/examples.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Examples.delete_with_http_info
def delete_with_http_info(app_id, version_id, example_id, custom_headers:nil) delete_async(app_id, version_id, example_id, custom_headers:custom_headers).value! end
ruby
def delete_with_http_info(app_id, version_id, example_id, custom_headers:nil) delete_async(app_id, version_id, example_id, custom_headers:custom_headers).value! end
[ "def", "delete_with_http_info", "(", "app_id", ",", "version_id", ",", "example_id", ",", "custom_headers", ":", "nil", ")", "delete_async", "(", "app_id", ",", "version_id", ",", "example_id", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "end" ]
Deletes the labeled example utterances with the specified ID from a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param example_id [Integer] The example 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.
[ "Deletes", "the", "labeled", "example", "utterances", "with", "the", "specified", "ID", "from", "a", "version", "of", "the", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/examples.rb#L441-L443
train
Deletes an example from the application version.
[ 30522, 13366, 3972, 12870, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 2742, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 10439...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_instance/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb
Azure::ContainerInstance::Mgmt::V2018_06_01.ContainerGroups.stop
def stop(resource_group_name, container_group_name, custom_headers:nil) response = stop_async(resource_group_name, container_group_name, custom_headers:custom_headers).value! nil end
ruby
def stop(resource_group_name, container_group_name, custom_headers:nil) response = stop_async(resource_group_name, container_group_name, custom_headers:custom_headers).value! nil end
[ "def", "stop", "(", "resource_group_name", ",", "container_group_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "stop_async", "(", "resource_group_name", ",", "container_group_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil",...
Stops all containers in a container group. Stops all containers in a contaienr group. Compute resources will be deallocated and billing will stop. @param resource_group_name [String] The name of the resource group. @param container_group_name [String] The name of the container group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Stops", "all", "containers", "in", "a", "container", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_instance/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb#L653-L656
train
Stops the specified container group.
[ 30522, 13366, 2644, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11661, 1035, 2177, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 30524, 7661, 1035, 20346, 2015, 1024, 7661, 1035, 20346, 2015, 1007, 1012, 3643,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
httprb/http
lib/http/headers.rb
HTTP.Headers.get
def get(name) name = normalize_header name.to_s @pile.select { |k, _| k == name }.map { |_, v| v } end
ruby
def get(name) name = normalize_header name.to_s @pile.select { |k, _| k == name }.map { |_, v| v } end
[ "def", "get", "(", "name", ")", "name", "=", "normalize_header", "name", ".", "to_s", "@pile", ".", "select", "{", "|", "k", ",", "_", "|", "k", "==", "name", "}", ".", "map", "{", "|", "_", ",", "v", "|", "v", "}", "end" ]
Returns list of header values if any. @return [Array<String>]
[ "Returns", "list", "of", "header", "values", "if", "any", "." ]
f37a10ea4fab3ee411907ea2e4251ddf0ca33a93
https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/headers.rb#L59-L62
train
Get the header by name
[ 30522, 13366, 2131, 1006, 2171, 1007, 2171, 1027, 3671, 4697, 1035, 20346, 2171, 1012, 2000, 1035, 1055, 1030, 8632, 1012, 7276, 1063, 1064, 1047, 1010, 1035, 1064, 1047, 1027, 1027, 2171, 1065, 1012, 4949, 1063, 1064, 1035, 1010, 1058, 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_cognitiveservices_customvisionprediction/lib/3.0/generated/azure_cognitiveservices_customvisionprediction/customvisionprediction_client.rb
Azure::CognitiveServices::Customvisionprediction::V3_0.CustomvisionpredictionClient.classify_image_url_with_no_store_with_http_info
def classify_image_url_with_no_store_with_http_info(project_id, published_name, image_url, application:nil, custom_headers:nil) classify_image_url_with_no_store_async(project_id, published_name, image_url, application:application, custom_headers:custom_headers).value! end
ruby
def classify_image_url_with_no_store_with_http_info(project_id, published_name, image_url, application:nil, custom_headers:nil) classify_image_url_with_no_store_async(project_id, published_name, image_url, application:application, custom_headers:custom_headers).value! end
[ "def", "classify_image_url_with_no_store_with_http_info", "(", "project_id", ",", "published_name", ",", "image_url", ",", "application", ":", "nil", ",", "custom_headers", ":", "nil", ")", "classify_image_url_with_no_store_async", "(", "project_id", ",", "published_name", ...
Classify an image url without saving the result. @param project_id The project id. @param published_name [String] Specifies the name of the model to evaluate against. @param image_url [ImageUrl] An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated. @param application [String] Optional. Specifies the name of application using the endpoint. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Classify", "an", "image", "url", "without", "saving", "the", "result", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisionprediction/lib/3.0/generated/azure_cognitiveservices_customvisionprediction/customvisionprediction_client.rb#L382-L384
train
Classifies the image url with the specified name.
[ 30522, 13366, 26268, 1035, 3746, 1035, 24471, 2140, 1035, 2007, 1035, 2053, 1035, 3573, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2622, 1035, 8909, 1010, 2405, 1035, 2171, 1010, 3746, 1035, 24471, 2140, 1010, 4646, 1024, 9152, 2140, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-rds/lib/aws-sdk-rds/db_security_group.rb
Aws::RDS.DBSecurityGroup.delete
def delete(options = {}) options = options.merge(db_security_group_name: @name) resp = @client.delete_db_security_group(options) resp.data end
ruby
def delete(options = {}) options = options.merge(db_security_group_name: @name) resp = @client.delete_db_security_group(options) resp.data end
[ "def", "delete", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "db_security_group_name", ":", "@name", ")", "resp", "=", "@client", ".", "delete_db_security_group", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values db_security_group.delete() @param [Hash] options ({}) @return [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_security_group.rb#L277-L281
train
Delete the security group
[ 30522, 13366, 3972, 12870, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 16962, 1035, 3036, 1035, 2177, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3972, 12870, 1035, 16962, 1035, 3036...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.list_by_namespace_as_lazy
def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:nil) response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_namespace_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:nil) response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_namespace_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_namespace_as_lazy", "(", "resource_group_name", ",", "namespace_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_namespace_async", "(", "resource_group_name", ",", "namespace_name", ",", "custom_headers", ":custom_headers", ")", "."...
Lists the HybridConnection within the namespace. @param resource_group_name [String] Name of the Resource group within the Azure subscription. @param namespace_name [String] The Namespace Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [HybridConnectionListResult] which provide lazy access to pages of the response.
[ "Lists", "the", "HybridConnection", "within", "the", "namespace", "." ]
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#L1611-L1620
train
Gets the list of all the managed managed
[ 30522, 13366, 2862, 1035, 2011, 1035, 3415, 15327, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3415, 15327, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 3415, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_grid/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb
Azure::EventGrid::Mgmt::V2017_06_15_preview.EventSubscriptions.create
def create(scope, event_subscription_name, event_subscription_info, custom_headers:nil) response = create_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create(scope, event_subscription_name, event_subscription_info, custom_headers:nil) response = create_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create", "(", "scope", ",", "event_subscription_name", ",", "event_subscription_info", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_async", "(", "scope", ",", "event_subscription_name", ",", "event_subscription_info", ",", "custom_headers", ...
Create an event subscription Asynchronously creates a new event subscription to the specified scope. Existing event subscriptions cannot be updated with this API and should instead use the Update event subscription API. @param scope [String] The scope of the resource to which the event subscription needs to be created. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic. @param event_subscription_name [String] Name of the event subscription to be created. Event subscription names must be between 3 and 64 characters in length and use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EventSubscription] operation results.
[ "Create", "an", "event", "subscription" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb#L177-L180
train
Creates an event subscription.
[ 30522, 13366, 3443, 1006, 9531, 1010, 2724, 1035, 15002, 1035, 2171, 1010, 2724, 1035, 15002, 1035, 18558, 1010, 7661, 1035, 20346, 30524, 1007, 1012, 3643, 999, 3433, 1012, 2303, 4983, 3433, 1012, 9152, 2140, 1029, 2203, 102, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
heroku/legacy-cli
lib/heroku/command/domains.rb
Heroku::Command.Domains.remove
def remove unless domain = shift_argument error("Usage: heroku domains:remove DOMAIN\nMust specify DOMAIN to remove.") end validate_arguments! action("Removing #{domain} from #{app}") do api.delete_domain(app, domain) end end
ruby
def remove unless domain = shift_argument error("Usage: heroku domains:remove DOMAIN\nMust specify DOMAIN to remove.") end validate_arguments! action("Removing #{domain} from #{app}") do api.delete_domain(app, domain) end end
[ "def", "remove", "unless", "domain", "=", "shift_argument", "error", "(", "\"Usage: heroku domains:remove DOMAIN\\nMust specify DOMAIN to remove.\"", ")", "end", "validate_arguments!", "action", "(", "\"Removing #{domain} from #{app}\"", ")", "do", "api", ".", "delete_domain", ...
domains:remove DOMAIN remove a custom domain from an app Examples: $ heroku domains:remove example.com Removing example.com from example... done
[ "domains", ":", "remove", "DOMAIN" ]
6f18521a258394bfb79e6b36f7160ad8559a8e16
https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/domains.rb#L82-L90
train
Remove a domain from the app
[ 30522, 13366, 6366, 4983, 5884, 1027, 5670, 1035, 6685, 7561, 1006, 1000, 8192, 1024, 5394, 5283, 13100, 1024, 6366, 5884, 1032, 13221, 19966, 20648, 5884, 2000, 6366, 1012, 1000, 1007, 2203, 9398, 3686, 1035, 9918, 999, 2895, 1006, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
CocoaPods/Xcodeproj
lib/xcodeproj/config.rb
Xcodeproj.Config.save_as
def save_as(pathname, prefix = nil) if File.exist?(pathname) return if Config.new(pathname) == self end pathname.open('w') { |file| file << to_s(prefix) } end
ruby
def save_as(pathname, prefix = nil) if File.exist?(pathname) return if Config.new(pathname) == self end pathname.open('w') { |file| file << to_s(prefix) } end
[ "def", "save_as", "(", "pathname", ",", "prefix", "=", "nil", ")", "if", "File", ".", "exist?", "(", "pathname", ")", "return", "if", "Config", ".", "new", "(", "pathname", ")", "==", "self", "end", "pathname", ".", "open", "(", "'w'", ")", "{", "|...
Writes the serialized representation of the internal data to the given path. @param [Pathname] pathname The file where the data should be written to. @return [void]
[ "Writes", "the", "serialized", "representation", "of", "the", "internal", "data", "to", "the", "given", "path", "." ]
3be1684437a6f8e69c7836ad4c85a2b78663272f
https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/config.rb#L104-L110
train
Save the current configuration to a file
[ 30522, 13366, 3828, 1035, 2004, 1006, 4130, 18442, 1010, 17576, 1027, 9152, 2140, 1007, 2065, 5371, 1012, 4839, 1029, 1006, 4130, 18442, 1007, 2709, 2065, 9530, 8873, 2290, 1012, 2047, 1006, 4130, 18442, 1007, 1027, 1027, 2969, 2203, 4130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
lostisland/faraday
lib/faraday/connection.rb
Faraday.Connection.initialize_proxy
def initialize_proxy(url, options) @manual_proxy = !!options.proxy @proxy = if options.proxy ProxyOptions.from(options.proxy) else proxy_from_env(url) end @temp_proxy = @proxy end
ruby
def initialize_proxy(url, options) @manual_proxy = !!options.proxy @proxy = if options.proxy ProxyOptions.from(options.proxy) else proxy_from_env(url) end @temp_proxy = @proxy end
[ "def", "initialize_proxy", "(", "url", ",", "options", ")", "@manual_proxy", "=", "!", "!", "options", ".", "proxy", "@proxy", "=", "if", "options", ".", "proxy", "ProxyOptions", ".", "from", "(", "options", ".", "proxy", ")", "else", "proxy_from_env", "("...
Initializes a new Faraday::Connection. @param url [URI, String] URI or String base URL to use as a prefix for all requests (optional). @param options [Hash, Faraday::ConnectionOptions] @option options [URI, String] :url ('http:/') URI or String base URL @option options [Hash<String => String>] :params URI query unencoded key/value pairs. @option options [Hash<String => String>] :headers Hash of unencoded HTTP header key/value pairs. @option options [Hash] :request Hash of request options. @option options [Hash] :ssl Hash of SSL options. @option options [Hash, URI, String] :proxy proxy options, either as a URL or as a Hash @option options [URI, String] :proxy[:uri] @option options [String] :proxy[:user] @option options [String] :proxy[:password] @yield [self] after all setup has been done
[ "Initializes", "a", "new", "Faraday", "::", "Connection", "." ]
3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70
https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/connection.rb#L94-L103
train
Initialize the proxy object
[ 30522, 13366, 3988, 4697, 1035, 24540, 1006, 24471, 2140, 1010, 7047, 1007, 1030, 6410, 1035, 24540, 1027, 999, 999, 7047, 1012, 24540, 1030, 24540, 1027, 2065, 7047, 1012, 24540, 24540, 7361, 9285, 1012, 2013, 1006, 7047, 1012, 24540, 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_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/global_users.rb
Azure::Labservices::Mgmt::V2018_10_15.GlobalUsers.begin_stop_environment
def begin_stop_environment(user_name, environment_operations_payload, custom_headers:nil) response = begin_stop_environment_async(user_name, environment_operations_payload, custom_headers:custom_headers).value! nil end
ruby
def begin_stop_environment(user_name, environment_operations_payload, custom_headers:nil) response = begin_stop_environment_async(user_name, environment_operations_payload, custom_headers:custom_headers).value! nil end
[ "def", "begin_stop_environment", "(", "user_name", ",", "environment_operations_payload", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_stop_environment_async", "(", "user_name", ",", "environment_operations_payload", ",", "custom_headers", ":custom_headers"...
Stops an environment by stopping all resources inside the environment This operation can take a while to complete @param user_name [String] The name of the user. @param environment_operations_payload [EnvironmentOperationsPayload] Represents payload for any Environment operations like get, start, stop, connect @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Stops", "an", "environment", "by", "stopping", "all", "resources", "inside", "the", "environment", "This", "operation", "can", "take", "a", "while", "to", "complete" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/global_users.rb#L1046-L1049
train
Stops the environment.
[ 30522, 13366, 4088, 1035, 2644, 1035, 4044, 1006, 5310, 1035, 2171, 1010, 4044, 1035, 3136, 1035, 18093, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 2644, 1035, 4044, 1035, 2004, 6038, 2278, 1006, 5310, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.scan_for_updates_async
def scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers:nil) # Send request promise = begin_scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers:nil) # Send request promise = begin_scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "scan_for_updates_async", "(", "device_name", ",", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_scan_for_updates_async", "(", "device_name", ",", "resource_group_name", ",", "manager_na...
@param device_name [String] The device name @param resource_group_name [String] The resource group name @param manager_name [String] The manager name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "device_name", "[", "String", "]", "The", "device", "name", "@param", "resource_group_name", "[", "String", "]", "The", "resource", "group", "name", "@param", "manager_name", "[", "String", "]", "The", "manager", "name", "@param", "custom_headers", "["...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L926-L940
train
Scans for updates on the device.
[ 30522, 13366, 13594, 1035, 2005, 1035, 14409, 1035, 2004, 6038, 2278, 1006, 5080, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 30524, 1035, 2171, 1010, 7661, 1035, 20346, 2015,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2016-12-01/generated/azure_mgmt_network/virtual_network_gateways.rb
Azure::Network::Mgmt::V2016_12_01.VirtualNetworkGateways.begin_reset
def begin_reset(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil) response = begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_reset(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil) response = begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_reset", "(", "resource_group_name", ",", "virtual_network_gateway_name", ",", "gateway_vip", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_reset_async", "(", "resource_group_name", ",", "virtual_network_gateway_name", ",", "ga...
Resets the primary of the virtual network gateway in the specified resource group. @param resource_group_name [String] The name of the resource group. @param virtual_network_gateway_name [String] The name of the virtual network gateway. @param gateway_vip [String] Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [VirtualNetworkGateway] operation results.
[ "Resets", "the", "primary", "of", "the", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2016-12-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L818-L821
train
Resets a virtual network gateway.
[ 30522, 13366, 4088, 1035, 25141, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 30524, 7484, 1035, 2897, 1035, 11909, 1035, 2171, 1010, 11909, 1035, 21722, 1024, 11909, 1035, 21722, 1010, 7661, 1035, 20346, 2015, 1024, 7661, 1035, 20346, 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.get_custom_entity_role_with_http_info
def get_custom_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil) get_custom_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value! end
ruby
def get_custom_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil) get_custom_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value! end
[ "def", "get_custom_entity_role_with_http_info", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "role_id", ",", "custom_headers", ":", "nil", ")", "get_custom_entity_role_async", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "role_id", ",", "cust...
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 [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "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#L10984-L10986
train
Gets the entity role.
[ 30522, 13366, 2131, 1035, 7661, 1035, 9178, 1035, 2535, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 30524, 2278, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 1035, 8909, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
stevegraham/slanger
lib/slanger/channel.rb
Slanger.Channel.dispatch
def dispatch(message, channel) push(Oj.dump(message, mode: :compat)) unless channel =~ /\Aslanger:/ perform_client_webhook!(message) end
ruby
def dispatch(message, channel) push(Oj.dump(message, mode: :compat)) unless channel =~ /\Aslanger:/ perform_client_webhook!(message) end
[ "def", "dispatch", "(", "message", ",", "channel", ")", "push", "(", "Oj", ".", "dump", "(", "message", ",", "mode", ":", ":compat", ")", ")", "unless", "channel", "=~", "/", "\\A", "/", "perform_client_webhook!", "(", "message", ")", "end" ]
Send an event received from Redis to the EventMachine channel which will send it to subscribed clients.
[ "Send", "an", "event", "received", "from", "Redis", "to", "the", "EventMachine", "channel", "which", "will", "send", "it", "to", "subscribed", "clients", "." ]
f26f80c675dc4d853bce401743779a6959981af1
https://github.com/stevegraham/slanger/blob/f26f80c675dc4d853bce401743779a6959981af1/lib/slanger/channel.rb#L84-L88
train
Dispatches a message to the client
[ 30522, 13366, 18365, 1006, 4471, 1010, 3149, 1007, 5245, 1006, 1051, 3501, 1012, 15653, 1006, 4471, 1010, 5549, 1024, 1024, 4012, 4502, 2102, 1007, 1007, 4983, 3149, 1027, 1066, 1013, 1032, 2004, 25023, 2121, 1024, 1013, 4685, 1035, 7396, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb
Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_get_vmsecurity_rules
def begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_get_vmsecurity_rules", "(", "resource_group_name", ",", "network_watcher_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_get_vmsecurity_rules_async", "(", "resource_group_name", ",", "network_watcher_name", ",", "param...
Gets the configured and effective security group rules on the specified VM. @param resource_group_name [String] The name of the resource group. @param network_watcher_name [String] The name of the network watcher. @param parameters [SecurityGroupViewParameters] Parameters that define the VM to check security groups for. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [SecurityGroupViewResult] operation results.
[ "Gets", "the", "configured", "and", "effective", "security", "group", "rules", "on", "the", "specified", "VM", "." ]
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#L1518-L1521
train
Gets the security rules for a virtual machine.
[ 30522, 13366, 4088, 1035, 2131, 1035, 1058, 5244, 8586, 25137, 1035, 3513, 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, 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...
fluent/fluentd
lib/fluent/supervisor.rb
Fluent.Supervisor.dry_run
def dry_run begin Fluent::Engine.dry_run_mode = true change_privilege init_engine run_configure rescue Fluent::ConfigError => e $log.error "config error", file: @config_path, error: e $log.debug_backtrace exit!(1) ensure Fluent::Engine.dry_run_mode = false end end
ruby
def dry_run begin Fluent::Engine.dry_run_mode = true change_privilege init_engine run_configure rescue Fluent::ConfigError => e $log.error "config error", file: @config_path, error: e $log.debug_backtrace exit!(1) ensure Fluent::Engine.dry_run_mode = false end end
[ "def", "dry_run", "begin", "Fluent", "::", "Engine", ".", "dry_run_mode", "=", "true", "change_privilege", "init_engine", "run_configure", "rescue", "Fluent", "::", "ConfigError", "=>", "e", "$log", ".", "error", "\"config error\"", ",", "file", ":", "@config_path...
Set Engine's dry_run_mode true to override all target_id of worker sections
[ "Set", "Engine", "s", "dry_run_mode", "true", "to", "override", "all", "target_id", "of", "worker", "sections" ]
add2af9a5b7f74fc36957b8e6138b3c5a2871a92
https://github.com/fluent/fluentd/blob/add2af9a5b7f74fc36957b8e6138b3c5a2871a92/lib/fluent/supervisor.rb#L574-L587
train
run the autodetect process
[ 30522, 13366, 4318, 1035, 2448, 4088, 19376, 1024, 1024, 3194, 1012, 4318, 1035, 2448, 1035, 5549, 1027, 2995, 2689, 1035, 14293, 1999, 4183, 1035, 3194, 2448, 1035, 9530, 8873, 27390, 2063, 5343, 19376, 1024, 1024, 9530, 8873, 4590, 29165,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb
Azure::SQL::Mgmt::V2017_03_01_preview.JobTargetExecutions.list_by_step_as_lazy
def list_by_step_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min:nil, create_time_max:nil, end_time_min:nil, end_time_max:nil, is_active:nil, skip:nil, top:nil, custom_headers:nil) response = list_by_step_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min:create_time_min, create_time_max:create_time_max, end_time_min:end_time_min, end_time_max:end_time_max, is_active:is_active, skip:skip, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_step_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_step_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min:nil, create_time_max:nil, end_time_min:nil, end_time_max:nil, is_active:nil, skip:nil, top:nil, custom_headers:nil) response = list_by_step_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min:create_time_min, create_time_max:create_time_max, end_time_min:end_time_min, end_time_max:end_time_max, is_active:is_active, skip:skip, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_step_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_step_as_lazy", "(", "resource_group_name", ",", "server_name", ",", "job_agent_name", ",", "job_name", ",", "job_execution_id", ",", "step_name", ",", "create_time_min", ":", "nil", ",", "create_time_max", ":", "nil", ",", "end_time_min", ":", "nil",...
Lists the target executions of a job step execution. @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 job_agent_name [String] The name of the job agent. @param job_name [String] The name of the job to get. @param job_execution_id The id of the job execution @param step_name [String] The name of the step. @param create_time_min [DateTime] If specified, only job executions created at or after the specified time are included. @param create_time_max [DateTime] If specified, only job executions created before the specified time are included. @param end_time_min [DateTime] If specified, only job executions completed at or after the specified time are included. @param end_time_max [DateTime] If specified, only job executions completed before the specified time are included. @param is_active [Boolean] If specified, only active or only completed job executions are included. @param skip [Integer] The number of elements in the collection to skip. @param top [Integer] The number of elements to return from the collection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [JobExecutionListResult] which provide lazy access to pages of the response.
[ "Lists", "the", "target", "executions", "of", "a", "job", "step", "execution", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb#L685-L694
train
Gets the list of all the automation artifacts in a job execution.
[ 30522, 13366, 2862, 1035, 2011, 1035, 3357, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 3105, 1035, 4005, 1035, 2171, 1010, 3105, 1035, 2171, 1010, 3105, 1035, 7781, 1035, 8909, 1010, 3357, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
castwide/solargraph
lib/solargraph/workspace.rb
Solargraph.Workspace.would_merge?
def would_merge? filename return true if directory == '*' || source_hash.include?(filename) @config = Solargraph::Workspace::Config.new(directory) config.calculated.include?(filename) end
ruby
def would_merge? filename return true if directory == '*' || source_hash.include?(filename) @config = Solargraph::Workspace::Config.new(directory) config.calculated.include?(filename) end
[ "def", "would_merge?", "filename", "return", "true", "if", "directory", "==", "'*'", "||", "source_hash", ".", "include?", "(", "filename", ")", "@config", "=", "Solargraph", "::", "Workspace", "::", "Config", ".", "new", "(", "directory", ")", "config", "."...
Determine whether a file would be merged into the workspace. @param filename [String] @return [Boolean]
[ "Determine", "whether", "a", "file", "would", "be", "merged", "into", "the", "workspace", "." ]
47badb5d151aca775ccbe6c470236089eae7839d
https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/workspace.rb#L45-L49
train
Returns true if the file would merge.
[ 30522, 13366, 2052, 1035, 13590, 1029, 5371, 18442, 2709, 2995, 2065, 14176, 1027, 1027, 1005, 1008, 1005, 1064, 1064, 3120, 1035, 23325, 1012, 2421, 1029, 1006, 5371, 18442, 1007, 1030, 9530, 8873, 2290, 1027, 5943, 14413, 1024, 1024, 2573...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
lostisland/faraday
lib/faraday/encoders/nested_params_encoder.rb
Faraday.DecodeMethods.decode
def decode(query) return nil if query.nil? params = {} query.split('&').each do |pair| next if pair.empty? key, value = pair.split('=', 2) key = unescape(key) value = unescape(value.tr('+', ' ')) if value decode_pair(key, value, params) end dehash(params, 0) end
ruby
def decode(query) return nil if query.nil? params = {} query.split('&').each do |pair| next if pair.empty? key, value = pair.split('=', 2) key = unescape(key) value = unescape(value.tr('+', ' ')) if value decode_pair(key, value, params) end dehash(params, 0) end
[ "def", "decode", "(", "query", ")", "return", "nil", "if", "query", ".", "nil?", "params", "=", "{", "}", "query", ".", "split", "(", "'&'", ")", ".", "each", "do", "|", "pair", "|", "next", "if", "pair", ".", "empty?", "key", ",", "value", "=", ...
@param query [nil, String] @return [Array<Array, String>] the decoded params @raise [TypeError] if the nesting is incorrect
[ "@param", "query", "[", "nil", "String", "]" ]
3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70
https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/encoders/nested_params_encoder.rb#L81-L95
train
Decode a query string into a hash of the result
[ 30522, 13366, 21933, 3207, 1006, 23032, 1007, 2709, 9152, 2140, 2065, 23032, 1012, 9152, 2140, 1029, 11498, 5244, 1027, 1063, 1065, 23032, 1012, 3975, 1006, 1005, 1004, 1005, 1007, 1012, 2169, 2079, 1064, 3940, 1064, 2279, 2065, 3940, 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...
rails/rails
activemodel/lib/active_model/attribute_methods.rb
ActiveModel.AttributeMethods.method_missing
def method_missing(method, *args, &block) if respond_to_without_attributes?(method, true) super else match = matched_attribute_method(method.to_s) match ? attribute_missing(match, *args, &block) : super end end
ruby
def method_missing(method, *args, &block) if respond_to_without_attributes?(method, true) super else match = matched_attribute_method(method.to_s) match ? attribute_missing(match, *args, &block) : super end end
[ "def", "method_missing", "(", "method", ",", "*", "args", ",", "&", "block", ")", "if", "respond_to_without_attributes?", "(", "method", ",", "true", ")", "super", "else", "match", "=", "matched_attribute_method", "(", "method", ".", "to_s", ")", "match", "?...
Allows access to the object attributes, which are held in the hash returned by <tt>attributes</tt>, as though they were first-class methods. So a +Person+ class with a +name+ attribute can for example use <tt>Person#name</tt> and <tt>Person#name=</tt> and never directly use the attributes hash -- except for multiple assignments with <tt>ActiveRecord::Base#attributes=</tt>. It's also possible to instantiate related objects, so a <tt>Client</tt> class belonging to the +clients+ table with a +master_id+ foreign key can instantiate master through <tt>Client#master</tt>.
[ "Allows", "access", "to", "the", "object", "attributes", "which", "are", "held", "in", "the", "hash", "returned", "by", "<tt", ">", "attributes<", "/", "tt", ">", "as", "though", "they", "were", "first", "-", "class", "methods", ".", "So", "a", "+", "P...
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activemodel/lib/active_model/attribute_methods.rb#L426-L433
train
Returns the result of calling the method.
[ 30522, 13366, 4118, 1035, 4394, 1006, 4118, 1010, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2065, 6869, 1035, 2000, 1035, 2302, 1035, 12332, 1029, 1006, 4118, 1010, 2995, 1007, 3565, 2842, 2674, 1027, 10349, 1035, 17961, 1035, 4118, 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_authorization/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb
Azure::Authorization::Mgmt::V2018_09_01_preview.RoleAssignments.list_for_scope
def list_for_scope(scope, filter:nil, custom_headers:nil) first_page = list_for_scope_as_lazy(scope, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_for_scope(scope, filter:nil, custom_headers:nil) first_page = list_for_scope_as_lazy(scope, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_for_scope", "(", "scope", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_for_scope_as_lazy", "(", "scope", ",", "filter", ":", "filter", ",", "custom_headers", ":custom_headers", ")", "first_page", ".", ...
Gets role assignments for a scope. @param scope [String] The scope of the role assignments. @param filter [String] The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<RoleAssignment>] operation results.
[ "Gets", "role", "assignments", "for", "a", "scope", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb#L948-L951
train
Gets all the items in a given scope.
[ 30522, 13366, 2862, 1035, 2005, 1035, 9531, 1006, 9531, 1010, 11307, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 2005, 1035, 9531, 1035, 2004, 1035, 13971, 1006, 9531, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb
Azure::Network::Mgmt::V2019_02_01.P2sVpnServerConfigurations.delete
def delete(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, custom_headers:nil) response = delete_async(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, custom_headers:nil) response = delete_async(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "virtual_wan_name", ",", "p2svpn_server_configuration_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "virtual_wan_name", ",", "p2svpn_server_configuration_nam...
Deletes a P2SVpnServerConfiguration. @param resource_group_name [String] The resource group name of the P2SVpnServerConfiguration. @param virtual_wan_name [String] The name of the VirtualWan. @param p2svpn_server_configuration_name [String] The name of the P2SVpnServerConfiguration. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "a", "P2SVpnServerConfiguration", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb#L190-L193
train
Deletes a P2S server configuration.
[ 30522, 13366, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 14071, 1035, 2171, 1010, 1052, 2475, 2015, 2615, 2361, 2078, 1035, 8241, 1035, 9563, 1035, 2171, 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...
googleapis/google-cloud-ruby
google-cloud-resource_manager/lib/google-cloud-resource_manager.rb
Google.Cloud.resource_manager
def resource_manager scope: nil, retries: nil, timeout: nil Google::Cloud.resource_manager @keyfile, scope: scope, retries: (retries || @retries), timeout: (timeout || @timeout) end
ruby
def resource_manager scope: nil, retries: nil, timeout: nil Google::Cloud.resource_manager @keyfile, scope: scope, retries: (retries || @retries), timeout: (timeout || @timeout) end
[ "def", "resource_manager", "scope", ":", "nil", ",", "retries", ":", "nil", ",", "timeout", ":", "nil", "Google", "::", "Cloud", ".", "resource_manager", "@keyfile", ",", "scope", ":", "scope", ",", "retries", ":", "(", "retries", "||", "@retries", ")", ...
Creates a new object for connecting to the Resource Manager service. Each call creates a new connection. For more information on connecting to Google Cloud see the {file:AUTHENTICATION.md Authentication Guide}. @param [String, Array<String>] scope The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. See [Using OAuth 2.0 to Access Google APIs](https://developers.google.com/identity/protocols/OAuth2). The default scope is: * `https://www.googleapis.com/auth/cloud-platform` @param [Integer] retries Number of times to retry requests on server error. The default value is `3`. Optional. @param [Integer] timeout Default timeout to use in requests. Optional. @return [Google::Cloud::ResourceManager::Manager] @example require "google/cloud" gcloud = Google::Cloud.new resource_manager = gcloud.resource_manager resource_manager.projects.each do |project| puts projects.project_id end @example The default scope can be overridden with the `scope` option: require "google/cloud" gcloud = Google::Cloud.new readonly_scope = \ "https://www.googleapis.com/auth/cloudresourcemanager.readonly" resource_manager = gcloud.resource_manager scope: readonly_scope
[ "Creates", "a", "new", "object", "for", "connecting", "to", "the", "Resource", "Manager", "service", ".", "Each", "call", "creates", "a", "new", "connection", "." ]
846c1a57250ac860ef4de1b54853a480ab2ff702
https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb#L67-L71
train
Returns the resource manager for this instance.
[ 30522, 13366, 7692, 1035, 3208, 9531, 1024, 9152, 2140, 1010, 2128, 21011, 1024, 9152, 2140, 1010, 2051, 5833, 1024, 9152, 2140, 8224, 1024, 1024, 6112, 1012, 7692, 1035, 3208, 1030, 3145, 8873, 2571, 1010, 9531, 1024, 9531, 1010, 2128, 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_container_registry/lib/2016-06-27-preview/generated/azure_mgmt_container_registry/registries.rb
Azure::ContainerRegistry::Mgmt::V2016_06_27_preview.Registries.update
def update(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil) response = update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil) response = update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update", "(", "resource_group_name", ",", "registry_name", ",", "registry_update_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_async", "(", "resource_group_name", ",", "registry_name", ",", "registry_update_parameters", ",", "cust...
Updates a container registry with the specified parameters. @param resource_group_name [String] The name of the resource group to which the container registry belongs. @param registry_name [String] The name of the container registry. @param registry_update_parameters [RegistryUpdateParameters] The parameters for updating a container registry. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Registry] operation results.
[ "Updates", "a", "container", "registry", "with", "the", "specified", "parameters", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2016-06-27-preview/generated/azure_mgmt_container_registry/registries.rb#L429-L432
train
Updates a container registry.
[ 30522, 13366, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 15584, 1035, 10651, 1035, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 217...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/content_photo.rb
Pwb.ContentPhoto.optimized_image_url
def optimized_image_url unless image.url.present? # if this method is called too soon after an image is # uploaded, might need to reload the record to # have the url available reload end if Rails.application.config.use_cloudinary options = {height: 800, crop: "scale", quality: "auto"} image_url = Cloudinary::Utils.cloudinary_url image, options else image_url = image.url end image_url end
ruby
def optimized_image_url unless image.url.present? # if this method is called too soon after an image is # uploaded, might need to reload the record to # have the url available reload end if Rails.application.config.use_cloudinary options = {height: 800, crop: "scale", quality: "auto"} image_url = Cloudinary::Utils.cloudinary_url image, options else image_url = image.url end image_url end
[ "def", "optimized_image_url", "unless", "image", ".", "url", ".", "present?", "# if this method is called too soon after an image is", "# uploaded, might need to reload the record to", "# have the url available", "reload", "end", "if", "Rails", ".", "application", ".", "config", ...
I use block_key col to indicate if there is a fragment block associated with this photo validates_processing_of :image validate :image_size_validation
[ "I", "use", "block_key", "col", "to", "indicate", "if", "there", "is", "a", "fragment", "block", "associated", "with", "this", "photo", "validates_processing_of", ":", "image", "validate", ":", "image_size_validation" ]
fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21
https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/models/pwb/content_photo.rb#L11-L25
train
Returns the url of the optimized image
[ 30522, 13366, 23569, 27605, 5422, 1035, 3746, 1035, 24471, 2140, 4983, 3746, 1012, 24471, 2140, 1012, 2556, 1029, 1001, 2065, 2023, 4118, 2003, 2170, 2205, 2574, 2044, 2019, 3746, 2003, 1001, 21345, 1010, 2453, 2342, 2000, 2128, 11066, 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...
deivid-rodriguez/byebug
lib/byebug/subcommands.rb
Byebug.Subcommands.execute
def execute subcmd_name = @match[1] return puts(help) unless subcmd_name subcmd = subcommand_list.match(subcmd_name) raise CommandNotFound.new(subcmd_name, self.class) unless subcmd subcmd.new(processor, arguments).execute end
ruby
def execute subcmd_name = @match[1] return puts(help) unless subcmd_name subcmd = subcommand_list.match(subcmd_name) raise CommandNotFound.new(subcmd_name, self.class) unless subcmd subcmd.new(processor, arguments).execute end
[ "def", "execute", "subcmd_name", "=", "@match", "[", "1", "]", "return", "puts", "(", "help", ")", "unless", "subcmd_name", "subcmd", "=", "subcommand_list", ".", "match", "(", "subcmd_name", ")", "raise", "CommandNotFound", ".", "new", "(", "subcmd_name", "...
Delegates to subcommands or prints help if no subcommand specified.
[ "Delegates", "to", "subcommands", "or", "prints", "help", "if", "no", "subcommand", "specified", "." ]
bf41a63858a648baa7fb621600d6451786d1572a
https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/subcommands.rb#L23-L31
train
Execute the command
[ 30522, 13366, 15389, 4942, 27487, 2094, 1035, 2171, 1027, 1030, 2674, 1031, 1015, 1033, 2709, 8509, 1006, 2393, 1007, 4983, 4942, 27487, 2094, 1035, 2171, 4942, 27487, 2094, 1027, 4942, 9006, 2386, 2094, 1035, 2862, 1012, 2674, 1006, 4942, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rocketjob/symmetric-encryption
lib/symmetric_encryption/reader.rb
SymmetricEncryption.Reader.gets
def gets(sep_string, length = nil) return read(length) if sep_string.nil? # Read more data until we get the sep_string while (index = @read_buffer.index(sep_string)).nil? && !@ios.eof? break if length && @read_buffer.length >= length read_block end index ||= -1 data = @read_buffer.slice!(0..index) @pos += data.length return nil if data.empty? && eof? data end
ruby
def gets(sep_string, length = nil) return read(length) if sep_string.nil? # Read more data until we get the sep_string while (index = @read_buffer.index(sep_string)).nil? && !@ios.eof? break if length && @read_buffer.length >= length read_block end index ||= -1 data = @read_buffer.slice!(0..index) @pos += data.length return nil if data.empty? && eof? data end
[ "def", "gets", "(", "sep_string", ",", "length", "=", "nil", ")", "return", "read", "(", "length", ")", "if", "sep_string", ".", "nil?", "# Read more data until we get the sep_string", "while", "(", "index", "=", "@read_buffer", ".", "index", "(", "sep_string", ...
Reads a single decrypted line from the file up to and including the optional sep_string. A sep_string of nil reads the entire contents of the file Returns nil on eof The stream must be opened for reading or an IOError will be raised.
[ "Reads", "a", "single", "decrypted", "line", "from", "the", "file", "up", "to", "and", "including", "the", "optional", "sep_string", ".", "A", "sep_string", "of", "nil", "reads", "the", "entire", "contents", "of", "the", "file", "Returns", "nil", "on", "eo...
064ba8d57ffac44a3ed80f5e76fa1a54d660ff98
https://github.com/rocketjob/symmetric-encryption/blob/064ba8d57ffac44a3ed80f5e76fa1a54d660ff98/lib/symmetric_encryption/reader.rb#L219-L234
train
Reads the next chunk of the file.
[ 30522, 13366, 4152, 1006, 19802, 1035, 5164, 1010, 3091, 1027, 9152, 2140, 1007, 2709, 3191, 1006, 3091, 1007, 2065, 19802, 1035, 5164, 1012, 9152, 2140, 1029, 1001, 3191, 2062, 2951, 2127, 2057, 2131, 1996, 19802, 1035, 5164, 2096, 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_network/lib/2018-07-01/generated/azure_mgmt_network/route_filter_rules.rb
Azure::Network::Mgmt::V2018_07_01.RouteFilterRules.begin_update
def begin_update(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:nil) response = begin_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_update(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:nil) response = begin_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_update", "(", "resource_group_name", ",", "route_filter_name", ",", "rule_name", ",", "route_filter_rule_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_update_async", "(", "resource_group_name", ",", "route_filter_name", ",", ...
Updates a route in the specified route filter. @param resource_group_name [String] The name of the resource group. @param route_filter_name [String] The name of the route filter. @param rule_name [String] The name of the route filter rule. @param route_filter_rule_parameters [PatchRouteFilterRule] Parameters supplied to the update route filter rule operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [RouteFilterRule] operation results.
[ "Updates", "a", "route", "in", "the", "specified", "route", "filter", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filter_rules.rb#L566-L569
train
Updates a route filter rule.
[ 30522, 13366, 4088, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2799, 1035, 11307, 1035, 2171, 1010, 3627, 1035, 2171, 1010, 2799, 1035, 11307, 1035, 3627, 1035, 11709, 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...
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.list_with_http_info
def list_with_http_info(type:nil, apply_scope:nil, custom_headers:nil) list_async(type:type, apply_scope:apply_scope, custom_headers:custom_headers).value! end
ruby
def list_with_http_info(type:nil, apply_scope:nil, custom_headers:nil) list_async(type:type, apply_scope:apply_scope, custom_headers:custom_headers).value! end
[ "def", "list_with_http_info", "(", "type", ":", "nil", ",", "apply_scope", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_async", "(", "type", ":", "type", ",", "apply_scope", ":apply_scope", ",", "custom_headers", ":custom_headers", ")", ".", "valu...
List all accessible snapshots with related information, including snapshots that were taken by the user, or snapshots to be applied to the user (subscription id was included in the applyScope in Snapshot - Take). @param type [SnapshotObjectType] User specified object type as a search filter. Possible values include: 'FaceList', 'LargeFaceList', 'LargePersonGroup', 'PersonGroup' @param apply_scope User specified snapshot apply scopes as a search filter. ApplyScope is an array of the target Azure subscription ids for the snapshot, specified by the user who created the snapshot by Snapshot - Take. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "List", "all", "accessible", "snapshots", "with", "related", "information", "including", "snapshots", "that", "were", "taken", "by", "the", "user", "or", "snapshots", "to", "be", "applied", "to", "the", "user", "(", "subscription", "id", "was", "included", "in...
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#L284-L286
train
Gets a list of all the segmentation elements.
[ 30522, 13366, 2862, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2828, 1024, 9152, 2140, 1010, 6611, 1035, 9531, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2862, 1035, 2004, 6038, 2278, 1006, 2828, 1024, 2828, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/body.rb
Mail.Body.extract_parts
def extract_parts parts_regex = / (?: # non-capturing group \A | # start of string OR \r\n # line break ) ( --#{Regexp.escape(boundary || "")} # boundary delimiter (?:--)? # with non-capturing optional closing ) (?=\s*$) # lookahead matching zero or more spaces followed by line-ending /x parts = raw_source.split(parts_regex).each_slice(2).to_a parts.each_with_index { |(part, _), index| parts.delete_at(index) if index > 0 && Utilities.blank?(part) } if parts.size > 1 final_separator = parts[-2][1] parts << [""] if final_separator != "--#{boundary}--" end parts.map(&:first) end
ruby
def extract_parts parts_regex = / (?: # non-capturing group \A | # start of string OR \r\n # line break ) ( --#{Regexp.escape(boundary || "")} # boundary delimiter (?:--)? # with non-capturing optional closing ) (?=\s*$) # lookahead matching zero or more spaces followed by line-ending /x parts = raw_source.split(parts_regex).each_slice(2).to_a parts.each_with_index { |(part, _), index| parts.delete_at(index) if index > 0 && Utilities.blank?(part) } if parts.size > 1 final_separator = parts[-2][1] parts << [""] if final_separator != "--#{boundary}--" end parts.map(&:first) end
[ "def", "extract_parts", "parts_regex", "=", "/", "\\A", "\\r", "\\n", "#{", "Regexp", ".", "escape", "(", "boundary", "||", "\"\"", ")", "}", "\\s", "/x", "parts", "=", "raw_source", ".", "split", "(", "parts_regex", ")", ".", "each_slice", "(", "2", "...
split parts by boundary, ignore first part if empty, append final part when closing boundary was missing
[ "split", "parts", "by", "boundary", "ignore", "first", "part", "if", "empty", "append", "final", "part", "when", "closing", "boundary", "was", "missing" ]
fb53fb369eb2bf0494ac70675970c90cdcc3f495
https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/body.rb#L266-L286
train
Extract the parts of the source from the source.
[ 30522, 13366, 14817, 1035, 3033, 3033, 1035, 19723, 10288, 1027, 1013, 1006, 1029, 1024, 1001, 2512, 1011, 11847, 2177, 1032, 1037, 1064, 1001, 2707, 1997, 5164, 2030, 1032, 1054, 1032, 1050, 1001, 2240, 3338, 1007, 1006, 1011, 1011, 1001, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_netapp/lib/2017-08-15-preview/generated/azure_mgmt_netapp/snapshots.rb
Azure::NetApp::Mgmt::V2017_08_15_preview.Snapshots.create_async
def create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil) # Send request promise = begin_create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::NetApp::Mgmt::V2017_08_15_preview::Models::Snapshot.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(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil) # Send request promise = begin_create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::NetApp::Mgmt::V2017_08_15_preview::Models::Snapshot.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", "(", "body", ",", "resource_group_name", ",", "account_name", ",", "pool_name", ",", "volume_name", ",", "snapshot_name", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_create_async", "(", "body", ",", "reso...
@param body [Snapshot] Snapshot object supplied in the body of the operation. @param resource_group_name [String] The name of the resource group. @param account_name [String] The name of the NetApp account @param pool_name [String] The name of the capacity pool @param volume_name [String] The name of the volume @param snapshot_name [String] The name of the mount target @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", "body", "[", "Snapshot", "]", "Snapshot", "object", "supplied", "in", "the", "body", "of", "the", "operation", ".", "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", ".", "@param", "account_name", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_netapp/lib/2017-08-15-preview/generated/azure_mgmt_netapp/snapshots.rb#L266-L282
train
Creates a snapshot of a volume.
[ 30522, 13366, 3443, 1035, 2004, 6038, 2278, 1006, 2303, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 4770, 1035, 2171, 1010, 3872, 1035, 2171, 1010, 20057, 12326, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.backup_partition_with_http_info
def backup_partition_with_http_info(partition_id, backup_partition_description:nil, backup_timeout:10, timeout:60, custom_headers:nil) backup_partition_async(partition_id, backup_partition_description:backup_partition_description, backup_timeout:backup_timeout, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def backup_partition_with_http_info(partition_id, backup_partition_description:nil, backup_timeout:10, timeout:60, custom_headers:nil) backup_partition_async(partition_id, backup_partition_description:backup_partition_description, backup_timeout:backup_timeout, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "backup_partition_with_http_info", "(", "partition_id", ",", "backup_partition_description", ":", "nil", ",", "backup_timeout", ":", "10", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "backup_partition_async", "(", "partition_id", ",", "...
Triggers backup of the partition's state. Creates a backup of the stateful persisted partition's state. In case the partition is already being periodically backed up, then by default the new backup is created at the same backup storage. One can also override the same by specifying the backup storage details as part of the request body. Once the backup is initiated, its progress can be tracked using the GetBackupProgress operation. In case, the operation times out, specify a greater backup timeout value in the query parameter. @param partition_id The identity of the partition. @param backup_partition_description [BackupPartitionDescription] Describes the parameters to backup the partition now. If not present, backup operation uses default parameters from the backup policy current associated with this partition. @param backup_timeout [Integer] Specifies the maximum amount of time, in minutes, to wait for the backup operation to complete. Post that, the operation completes with timeout error. However, in certain corner cases it could be that though the operation returns back timeout, the backup actually goes through. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. The default value for the same is 10 minutes. @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.
[ "Triggers", "backup", "of", "the", "partition", "s", "state", "." ]
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#L25471-L25473
train
Backup the specified partition.
[ 30522, 13366, 10200, 1035, 13571, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 13571, 1035, 8909, 1010, 10200, 1035, 13571, 1035, 6412, 1024, 9152, 2140, 1010, 10200, 1035, 2051, 5833, 1024, 2184, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/sprockets/cache.rb
Sprockets.Cache.fetch
def fetch(key) start = Time.now.to_f expanded_key = expand_key(key) value = @fetch_cache.get(expanded_key) if value.nil? value = @cache_wrapper.get(expanded_key) if value.nil? value = yield @cache_wrapper.set(expanded_key, value) @logger.debug do ms = "(#{((Time.now.to_f - start) * 1000).to_i}ms)" "Sprockets Cache miss #{peek_key(key)} #{ms}" end end @fetch_cache.set(expanded_key, value) end value end
ruby
def fetch(key) start = Time.now.to_f expanded_key = expand_key(key) value = @fetch_cache.get(expanded_key) if value.nil? value = @cache_wrapper.get(expanded_key) if value.nil? value = yield @cache_wrapper.set(expanded_key, value) @logger.debug do ms = "(#{((Time.now.to_f - start) * 1000).to_i}ms)" "Sprockets Cache miss #{peek_key(key)} #{ms}" end end @fetch_cache.set(expanded_key, value) end value end
[ "def", "fetch", "(", "key", ")", "start", "=", "Time", ".", "now", ".", "to_f", "expanded_key", "=", "expand_key", "(", "key", ")", "value", "=", "@fetch_cache", ".", "get", "(", "expanded_key", ")", "if", "value", ".", "nil?", "value", "=", "@cache_wr...
Internal: Wrap a backend cache store. Always assign a backend cache store instance to Environment#cache= and use Environment#cache to retreive a wrapped interface. cache - A compatible backend cache store instance. Public: Prefer API to retrieve and set values in the cache store. key - JSON serializable key block - Must return a consistent JSON serializable object for the given key. Examples cache.fetch("foo") { "bar" } Returns a JSON serializable object.
[ "Internal", ":", "Wrap", "a", "backend", "cache", "store", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/cache.rb#L85-L102
train
Fetch the value for the given key from the cache.
[ 30522, 13366, 18584, 1006, 3145, 1007, 2707, 1027, 2051, 1012, 2085, 1012, 2000, 1035, 1042, 4423, 1035, 3145, 1027, 7818, 1035, 3145, 1006, 3145, 1007, 3643, 1027, 1030, 18584, 1035, 17053, 1012, 2131, 1006, 4423, 1035, 3145, 1007, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/indexer.rb
Sunspot.Indexer.add
def add(model) documents = Util.Array(model).map { |m| prepare_full_update(m) } add_batch_documents(documents) end
ruby
def add(model) documents = Util.Array(model).map { |m| prepare_full_update(m) } add_batch_documents(documents) end
[ "def", "add", "(", "model", ")", "documents", "=", "Util", ".", "Array", "(", "model", ")", ".", "map", "{", "|", "m", "|", "prepare_full_update", "(", "m", ")", "}", "add_batch_documents", "(", "documents", ")", "end" ]
:nodoc: Construct a representation of the model for indexing and send it to the connection for indexing ==== Parameters model<Object>:: the model to index
[ ":", "nodoc", ":" ]
31dd76cd7a14a4ef7bd541de97483d8cd72ff685
https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/indexer.rb#L24-L27
train
Add a model to the batch
[ 30522, 13366, 5587, 1006, 2944, 1007, 5491, 1027, 21183, 4014, 1012, 9140, 1006, 2944, 1007, 1012, 4949, 1063, 1064, 1049, 1064, 7374, 1035, 2440, 1035, 10651, 1006, 1049, 1007, 1065, 5587, 1035, 14108, 1035, 5491, 1006, 5491, 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...
randym/axlsx
lib/axlsx/drawing/bar_3D_chart.rb
Axlsx.Bar3DChart.to_xml_string
def to_xml_string(str = '') super(str) do str << '<c:bar3DChart>' str << ('<c:barDir val="' << bar_dir.to_s << '"/>') str << ('<c:grouping val="' << grouping.to_s << '"/>') str << ('<c:varyColors val="' << vary_colors.to_s << '"/>') @series.each { |ser| ser.to_xml_string(str) } @d_lbls.to_xml_string(str) if @d_lbls str << ('<c:gapWidth val="' << @gap_width.to_s << '"/>') unless @gap_width.nil? str << ('<c:gapDepth val="' << @gap_depth.to_s << '"/>') unless @gap_depth.nil? str << ('<c:shape val="' << @shape.to_s << '"/>') unless @shape.nil? axes.to_xml_string(str, :ids => true) str << '</c:bar3DChart>' axes.to_xml_string(str) end end
ruby
def to_xml_string(str = '') super(str) do str << '<c:bar3DChart>' str << ('<c:barDir val="' << bar_dir.to_s << '"/>') str << ('<c:grouping val="' << grouping.to_s << '"/>') str << ('<c:varyColors val="' << vary_colors.to_s << '"/>') @series.each { |ser| ser.to_xml_string(str) } @d_lbls.to_xml_string(str) if @d_lbls str << ('<c:gapWidth val="' << @gap_width.to_s << '"/>') unless @gap_width.nil? str << ('<c:gapDepth val="' << @gap_depth.to_s << '"/>') unless @gap_depth.nil? str << ('<c:shape val="' << @shape.to_s << '"/>') unless @shape.nil? axes.to_xml_string(str, :ids => true) str << '</c:bar3DChart>' axes.to_xml_string(str) end end
[ "def", "to_xml_string", "(", "str", "=", "''", ")", "super", "(", "str", ")", "do", "str", "<<", "'<c:bar3DChart>'", "str", "<<", "(", "'<c:barDir val=\"'", "<<", "bar_dir", ".", "to_s", "<<", "'\"/>'", ")", "str", "<<", "(", "'<c:grouping val=\"'", "<<", ...
Serializes the object @param [String] str @return [String]
[ "Serializes", "the", "object" ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/bar_3D_chart.rb#L127-L142
train
Convert the chart to XML string.
[ 30522, 13366, 2000, 1035, 20950, 1035, 5164, 1006, 2358, 2099, 1027, 1005, 1005, 1007, 3565, 1006, 2358, 2099, 1007, 2079, 2358, 2099, 1026, 1026, 1005, 1026, 1039, 1024, 3347, 29097, 7507, 5339, 1028, 1005, 2358, 2099, 1026, 1026, 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...
piotrmurach/github
lib/github_api/client/repos/releases/assets.rb
Github.Client::Repos::Releases::Assets.infer_media
def infer_media(filepath) require 'mime/types' types = MIME::Types.type_for(filepath) types.empty? ? 'application/octet-stream' : types.first rescue LoadError raise Github::Error::UnknownMedia.new(filepath) end
ruby
def infer_media(filepath) require 'mime/types' types = MIME::Types.type_for(filepath) types.empty? ? 'application/octet-stream' : types.first rescue LoadError raise Github::Error::UnknownMedia.new(filepath) end
[ "def", "infer_media", "(", "filepath", ")", "require", "'mime/types'", "types", "=", "MIME", "::", "Types", ".", "type_for", "(", "filepath", ")", "types", ".", "empty?", "?", "'application/octet-stream'", ":", "types", ".", "first", "rescue", "LoadError", "ra...
Infer media type of the asset
[ "Infer", "media", "type", "of", "the", "asset" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos/releases/assets.rb#L88-L94
train
Returns the media type of the file
[ 30522, 13366, 1999, 7512, 1035, 2865, 1006, 5371, 15069, 1007, 5478, 1005, 2771, 4168, 1013, 4127, 1005, 4127, 1027, 2771, 4168, 1024, 1024, 4127, 1012, 2828, 1035, 2005, 1006, 5371, 15069, 1007, 4127, 1012, 4064, 1029, 1029, 1005, 4646, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_instance/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb
Azure::ContainerInstance::Mgmt::V2018_02_01_preview.ContainerGroups.begin_create_or_update
def begin_create_or_update(resource_group_name, container_group_name, container_group, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_create_or_update(resource_group_name, container_group_name, container_group, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_create_or_update", "(", "resource_group_name", ",", "container_group_name", ",", "container_group", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_create_or_update_async", "(", "resource_group_name", ",", "container_group_name", ",", "containe...
Create or update container groups. Create or update container groups with specified configurations. @param resource_group_name [String] The name of the resource group. @param container_group_name [String] The name of the container group. @param container_group [ContainerGroup] The properties of the container group to be created or updated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ContainerGroup] operation results.
[ "Create", "or", "update", "container", "groups", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_instance/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb#L614-L617
train
Creates or updates a container group.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11661, 1035, 2177, 1035, 2171, 1010, 11661, 1035, 2177, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3443, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
projectcypress/health-data-standards
lib/hqmf-parser/2.0/data_criteria.rb
HQMF2.DataCriteria.extract_description
def extract_description if @variable encoded_name = attr_val('./cda:localVariableName/@value') encoded_name = DataCriteriaMethods.extract_description_for_variable(encoded_name) if encoded_name return encoded_name if encoded_name.present? attr_val("./#{CRITERIA_GLOB}/cda:id/@extension") else attr_val("./#{CRITERIA_GLOB}/cda:text/@value") || attr_val("./#{CRITERIA_GLOB}/cda:title/@value") || attr_val("./#{CRITERIA_GLOB}/cda:id/@extension") end end
ruby
def extract_description if @variable encoded_name = attr_val('./cda:localVariableName/@value') encoded_name = DataCriteriaMethods.extract_description_for_variable(encoded_name) if encoded_name return encoded_name if encoded_name.present? attr_val("./#{CRITERIA_GLOB}/cda:id/@extension") else attr_val("./#{CRITERIA_GLOB}/cda:text/@value") || attr_val("./#{CRITERIA_GLOB}/cda:title/@value") || attr_val("./#{CRITERIA_GLOB}/cda:id/@extension") end end
[ "def", "extract_description", "if", "@variable", "encoded_name", "=", "attr_val", "(", "'./cda:localVariableName/@value'", ")", "encoded_name", "=", "DataCriteriaMethods", ".", "extract_description_for_variable", "(", "encoded_name", ")", "if", "encoded_name", "return", "en...
Extract the description (with some special handling if this is a variable). The MAT has added an encoded form of the variable name in the localVariableName field which is used if available. If not, fall back to the extension.
[ "Extract", "the", "description", "(", "with", "some", "special", "handling", "if", "this", "is", "a", "variable", ")", ".", "The", "MAT", "has", "added", "an", "encoded", "form", "of", "the", "variable", "name", "in", "the", "localVariableName", "field", "...
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria.rb#L206-L217
train
Extract the description of the object
[ 30522, 13366, 14817, 1035, 6412, 2065, 1030, 8023, 12359, 1035, 2171, 1027, 2012, 16344, 1035, 11748, 1006, 1005, 1012, 1013, 3729, 2050, 1024, 2334, 10755, 19210, 18442, 1013, 1030, 3643, 1005, 1007, 12359, 1035, 2171, 1027, 2951, 26775, 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_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_group
def create_or_update_at_resource_group(resource_group_name, remediation_name, parameters, custom_headers:nil) response = create_or_update_at_resource_group_async(resource_group_name, remediation_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update_at_resource_group(resource_group_name, remediation_name, parameters, custom_headers:nil) response = create_or_update_at_resource_group_async(resource_group_name, remediation_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update_at_resource_group", "(", "resource_group_name", ",", "remediation_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_at_resource_group_async", "(", "resource_group_name", ",", "remediation_name", ",", ...
Creates or updates a remediation at resource group scope. @param resource_group_name [String] Resource group name. @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", "group", "scope", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L1475-L1478
train
Creates or updates a remediation at resource group scope.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2012, 1035, 7692, 1035, 2177, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2128, 16969, 3508, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_signalr/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb
Azure::Signalr::Mgmt::V2018_03_01_preview.SignalR.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, resource_name, parameters:nil, custom_headers:nil) begin_create_or_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, resource_name, parameters:nil, custom_headers:nil) begin_create_or_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "resource_name", ",", "parameters", ":", "nil", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "resource_name", ",", "parameters", ":...
Create a new SignalR service and update an exiting SignalR service. @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 resource_name [String] The name of the SignalR resource. @param parameters [SignalRCreateParameters] Parameters for the create or update 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.
[ "Create", "a", "new", "SignalR", "service", "and", "update", "an", "exiting", "SignalR", "service", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_signalr/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb#L839-L841
train
Creates or updates a virtual network specification.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 11709, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/protection_policies.rb
Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.ProtectionPolicies.create_or_update_with_http_info
def create_or_update_with_http_info(vault_name, resource_group_name, policy_name, resource_protection_policy, custom_headers:nil) create_or_update_async(vault_name, resource_group_name, policy_name, resource_protection_policy, custom_headers:custom_headers).value! end
ruby
def create_or_update_with_http_info(vault_name, resource_group_name, policy_name, resource_protection_policy, custom_headers:nil) create_or_update_async(vault_name, resource_group_name, policy_name, resource_protection_policy, custom_headers:custom_headers).value! end
[ "def", "create_or_update_with_http_info", "(", "vault_name", ",", "resource_group_name", ",", "policy_name", ",", "resource_protection_policy", ",", "custom_headers", ":", "nil", ")", "create_or_update_async", "(", "vault_name", ",", "resource_group_name", ",", "policy_name...
Creates or modifies a backup policy. This is an asynchronous operation. Use the GetPolicyOperationResult API to Get the operation status. @param vault_name [String] The name of the Recovery Services vault. @param resource_group_name [String] The name of the resource group associated with the Recovery Services vault. @param policy_name [String] The backup policy to be created. @param resource_protection_policy [ProtectionPolicyResource] The resource backup policy. @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", "modifies", "a", "backup", "policy", ".", "This", "is", "an", "asynchronous", "operation", ".", "Use", "the", "GetPolicyOperationResult", "API", "to", "Get", "the", "operation", "status", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/protection_policies.rb#L171-L173
train
Creates or updates a protection policy in the specified vault.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 11632, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3343, 1035, 2171, 1010, 7692, 1035, 3860, 1035, 3343, 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...
strongself/Generamba
lib/generamba/template/helpers/catalog_template_search_helper.rb
Generamba.CatalogTemplateSearchHelper.search_templates_in_a_catalog
def search_templates_in_a_catalog(catalog_path, search_term) template_names = [] catalog_path.children.select { |child| File.directory?(child) && child.split.last.to_s[0] != '.' }.map { |template_path| template_path.split.last.to_s }.select { |template_name| template_name.include?(search_term) }.each { |template_name| template_names.push(template_name) } return template_names end
ruby
def search_templates_in_a_catalog(catalog_path, search_term) template_names = [] catalog_path.children.select { |child| File.directory?(child) && child.split.last.to_s[0] != '.' }.map { |template_path| template_path.split.last.to_s }.select { |template_name| template_name.include?(search_term) }.each { |template_name| template_names.push(template_name) } return template_names end
[ "def", "search_templates_in_a_catalog", "(", "catalog_path", ",", "search_term", ")", "template_names", "=", "[", "]", "catalog_path", ".", "children", ".", "select", "{", "|", "child", "|", "File", ".", "directory?", "(", "child", ")", "&&", "child", ".", "...
Finds out all of the templates located in a catalog @param catalog_path [Pathname] The path to a template catalog @return [Array] An array with template names
[ "Finds", "out", "all", "of", "the", "templates", "located", "in", "a", "catalog" ]
9ef343805f3a66f58bc36e120e822d5436a4da97
https://github.com/strongself/Generamba/blob/9ef343805f3a66f58bc36e120e822d5436a4da97/lib/generamba/template/helpers/catalog_template_search_helper.rb#L11-L25
train
Search for a template in a catalog
[ 30522, 13366, 3945, 1035, 23561, 2015, 1035, 1999, 1035, 1037, 1035, 12105, 1006, 12105, 1035, 4130, 1010, 3945, 1035, 2744, 1007, 23561, 1035, 3415, 1027, 1031, 1033, 12105, 1035, 4130, 1012, 2336, 1012, 7276, 1063, 1064, 2775, 1064, 5371,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_deployed_service_package_health
def get_deployed_service_package_health(node_name, application_id, service_package_name, events_health_state_filter:0, timeout:60, custom_headers:nil) response = get_deployed_service_package_health_async(node_name, application_id, service_package_name, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_deployed_service_package_health(node_name, application_id, service_package_name, events_health_state_filter:0, timeout:60, custom_headers:nil) response = get_deployed_service_package_health_async(node_name, application_id, service_package_name, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_deployed_service_package_health", "(", "node_name", ",", "application_id", ",", "service_package_name", ",", "events_health_state_filter", ":", "0", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_deployed_service_pac...
Gets the information about health of an service package for a specific application deployed for a Service Fabric node and application. Gets the information about health of service package for a specific application deployed on a Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. @param service_package_name [String] The name of the service package. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [DeployedServicePackageHealth] operation results.
[ "Gets", "the", "information", "about", "health", "of", "an", "service", "package", "for", "a", "specific", "application", "deployed", "for", "a", "Service", "Fabric", "node", "and", "application", "." ]
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#L16311-L16314
train
Gets the health of the service package deployed to a Service Fabric node.
[ 30522, 13366, 2131, 1035, 7333, 1035, 2326, 1035, 7427, 1035, 2740, 1006, 13045, 1035, 2171, 1010, 4646, 1035, 8909, 1010, 2326, 1035, 7427, 1035, 2171, 1010, 2824, 1035, 2740, 1035, 2110, 1035, 11307, 1024, 1014, 1010, 2051, 5833, 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...
jekyll/jekyll
lib/jekyll/filters.rb
Jekyll.Filters.parse_comparison
def parse_comparison(parser) left_operand = Liquid::Expression.parse(parser.expression) operator = parser.consume?(:comparison) # No comparison-operator detected. Initialize a Liquid::Condition using only left operand return Liquid::Condition.new(left_operand) unless operator # Parse what remained after extracting the left operand and the `:comparison` operator # and initialize a Liquid::Condition object using the operands and the comparison-operator Liquid::Condition.new(left_operand, operator, Liquid::Expression.parse(parser.expression)) end
ruby
def parse_comparison(parser) left_operand = Liquid::Expression.parse(parser.expression) operator = parser.consume?(:comparison) # No comparison-operator detected. Initialize a Liquid::Condition using only left operand return Liquid::Condition.new(left_operand) unless operator # Parse what remained after extracting the left operand and the `:comparison` operator # and initialize a Liquid::Condition object using the operands and the comparison-operator Liquid::Condition.new(left_operand, operator, Liquid::Expression.parse(parser.expression)) end
[ "def", "parse_comparison", "(", "parser", ")", "left_operand", "=", "Liquid", "::", "Expression", ".", "parse", "(", "parser", ".", "expression", ")", "operator", "=", "parser", ".", "consume?", "(", ":comparison", ")", "# No comparison-operator detected. Initialize...
Generates a Liquid::Condition object from a Liquid::Parser object based on whether the parsed expression involves a "comparison" operator (e.g. <, ==, >, !=, etc) - parser: an instance of Liquid::Parser Returns an instance of Liquid::Condition
[ "Generates", "a", "Liquid", "::", "Condition", "object", "from", "a", "Liquid", "::", "Parser", "object", "based", "on", "whether", "the", "parsed", "expression", "involves", "a", "comparison", "operator", "(", "e", ".", "g", ".", "<", "==", ">", "!", "=...
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/filters.rb#L422-L432
train
Parse a comparison - operator
[ 30522, 13366, 11968, 3366, 1035, 7831, 1006, 11968, 8043, 1007, 2187, 1035, 3850, 4859, 1027, 6381, 1024, 1024, 3670, 1012, 11968, 3366, 1006, 11968, 8043, 1012, 3670, 1007, 6872, 1027, 11968, 8043, 1012, 16678, 1029, 1006, 1024, 7831, 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...
ohler55/oj
lib/oj/easy_hash.rb
Oj.EasyHash.method_missing
def method_missing(m, *args, &block) if m.to_s.end_with?('=') raise ArgumentError.new("wrong number of arguments (#{args.size} for 1 with #{m}) to method #{m}") if args.nil? or 1 != args.length m = m[0..-2] return store(m.to_s, args[0]) if has_key?(m.to_s) return store(m.to_sym, args[0]) if has_key?(m.to_sym) return store(m, args[0]) else raise ArgumentError.new("wrong number of arguments (#{args.size} for 0 with #{m}) to method #{m}") unless args.nil? or args.empty? return fetch(m, nil) if has_key?(m) return fetch(m.to_s, nil) if has_key?(m.to_s) return fetch(m.to_sym, nil) if has_key?(m.to_sym) end raise NoMethodError.new("undefined method #{m}", m) end
ruby
def method_missing(m, *args, &block) if m.to_s.end_with?('=') raise ArgumentError.new("wrong number of arguments (#{args.size} for 1 with #{m}) to method #{m}") if args.nil? or 1 != args.length m = m[0..-2] return store(m.to_s, args[0]) if has_key?(m.to_s) return store(m.to_sym, args[0]) if has_key?(m.to_sym) return store(m, args[0]) else raise ArgumentError.new("wrong number of arguments (#{args.size} for 0 with #{m}) to method #{m}") unless args.nil? or args.empty? return fetch(m, nil) if has_key?(m) return fetch(m.to_s, nil) if has_key?(m.to_s) return fetch(m.to_sym, nil) if has_key?(m.to_sym) end raise NoMethodError.new("undefined method #{m}", m) end
[ "def", "method_missing", "(", "m", ",", "*", "args", ",", "&", "block", ")", "if", "m", ".", "to_s", ".", "end_with?", "(", "'='", ")", "raise", "ArgumentError", ".", "new", "(", "\"wrong number of arguments (#{args.size} for 1 with #{m}) to method #{m}\"", ")", ...
Handles requests for Hash values. Others cause an Exception to be raised. @param [Symbol|String] m method symbol @return [Boolean] the value of the specified instance variable. @raise [ArgumentError] if an argument is given. Zero arguments expected. @raise [NoMethodError] if the instance variable is not defined.
[ "Handles", "requests", "for", "Hash", "values", ".", "Others", "cause", "an", "Exception", "to", "be", "raised", "." ]
d11d2e5248293141f29dc2bb2419a26fab784d07
https://github.com/ohler55/oj/blob/d11d2e5248293141f29dc2bb2419a26fab784d07/lib/oj/easy_hash.rb#L35-L49
train
Returns the value of the given method.
[ 30522, 13366, 4118, 1035, 4394, 1006, 1049, 1010, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2065, 1049, 1012, 2000, 1035, 1055, 1012, 2203, 1035, 2007, 1029, 1006, 1005, 1027, 1005, 1007, 5333, 6685, 2121, 29165, 1012, 2047, 1006, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mikel/mail
lib/mail/header.rb
Mail.Header.[]=
def []=(name, value) name = name.to_s if name.include?(Constants::COLON) raise ArgumentError, "Header names may not contain a colon: #{name.inspect}" end name = Utilities.dasherize(name) # Assign nil to delete the field if value.nil? fields.delete_field name else fields.add_field Field.new(name.to_s, value, charset) # Update charset if specified in Content-Type if name == 'content-type' params = self[:content_type].parameters rescue nil @charset = params[:charset] if params && params[:charset] end end end
ruby
def []=(name, value) name = name.to_s if name.include?(Constants::COLON) raise ArgumentError, "Header names may not contain a colon: #{name.inspect}" end name = Utilities.dasherize(name) # Assign nil to delete the field if value.nil? fields.delete_field name else fields.add_field Field.new(name.to_s, value, charset) # Update charset if specified in Content-Type if name == 'content-type' params = self[:content_type].parameters rescue nil @charset = params[:charset] if params && params[:charset] end end end
[ "def", "[]=", "(", "name", ",", "value", ")", "name", "=", "name", ".", "to_s", "if", "name", ".", "include?", "(", "Constants", "::", "COLON", ")", "raise", "ArgumentError", ",", "\"Header names may not contain a colon: #{name.inspect}\"", "end", "name", "=", ...
Sets the FIRST matching field in the header to passed value, or deletes the FIRST field matched from the header if passed nil Example: h = Header.new h.fields = ['To: mikel@me.com', 'X-Mail-SPAM: 15', 'X-Mail-SPAM: 20'] h['To'] = 'bob@you.com' h['To'] #=> 'bob@you.com' h['X-Mail-SPAM'] = '10000' h['X-Mail-SPAM'] # => ['15', '20', '10000'] h['X-Mail-SPAM'] = nil h['X-Mail-SPAM'] # => nil
[ "Sets", "the", "FIRST", "matching", "field", "in", "the", "header", "to", "passed", "value", "or", "deletes", "the", "FIRST", "field", "matched", "from", "the", "header", "if", "passed", "nil" ]
fb53fb369eb2bf0494ac70675970c90cdcc3f495
https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/header.rb#L147-L167
train
Set a header field
[ 30522, 13366, 1031, 1033, 1027, 1006, 2171, 1010, 3643, 1007, 2171, 1027, 2171, 1012, 2000, 1035, 1055, 2065, 2171, 1012, 2421, 1029, 1006, 5377, 2015, 1024, 1024, 16844, 1007, 5333, 6685, 2121, 29165, 1010, 1000, 20346, 3415, 2089, 2025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongo-ruby-driver
lib/mongo/server.rb
Mongo.Server.disconnect!
def disconnect!(wait=false) begin # For backwards compatibility we disconnect/clear the pool rather # than close it here. pool.disconnect! rescue Error::PoolClosedError # If the pool was already closed, we don't need to do anything here. end monitor.stop!(wait) @connected = false true end
ruby
def disconnect!(wait=false) begin # For backwards compatibility we disconnect/clear the pool rather # than close it here. pool.disconnect! rescue Error::PoolClosedError # If the pool was already closed, we don't need to do anything here. end monitor.stop!(wait) @connected = false true end
[ "def", "disconnect!", "(", "wait", "=", "false", ")", "begin", "# For backwards compatibility we disconnect/clear the pool rather", "# than close it here.", "pool", ".", "disconnect!", "rescue", "Error", "::", "PoolClosedError", "# If the pool was already closed, we don't need to d...
Disconnect the server from the connection. @example Disconnect the server. server.disconnect! @param [ Boolean ] wait Whether to wait for background threads to finish running. @return [ true ] Always true with no exception. @since 2.0.0
[ "Disconnect", "the", "server", "from", "the", "connection", "." ]
dca26d0870cb3386fad9ccc1d17228097c1fe1c8
https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/server.rb#L183-L194
train
Disconnects the connection from the pool.
[ 30522, 13366, 12532, 10087, 6593, 999, 1006, 3524, 1027, 6270, 1007, 4088, 1001, 2005, 11043, 21778, 2057, 12532, 10087, 6593, 1013, 3154, 1996, 4770, 2738, 1001, 2084, 2485, 2009, 2182, 1012, 4770, 1012, 12532, 10087, 6593, 999, 5343, 7561...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
grpc/grpc
src/ruby/lib/grpc/generic/active_call.rb
GRPC.ActiveCall.each_remote_read_then_finish
def each_remote_read_then_finish return enum_for(:each_remote_read_then_finish) unless block_given? loop do resp = begin remote_read rescue GRPC::Core::CallError => e GRPC.logger.warn("In each_remote_read_then_finish: #{e}") nil end break if resp.nil? # the last response was received yield resp end receive_and_check_status ensure set_input_stream_done end
ruby
def each_remote_read_then_finish return enum_for(:each_remote_read_then_finish) unless block_given? loop do resp = begin remote_read rescue GRPC::Core::CallError => e GRPC.logger.warn("In each_remote_read_then_finish: #{e}") nil end break if resp.nil? # the last response was received yield resp end receive_and_check_status ensure set_input_stream_done end
[ "def", "each_remote_read_then_finish", "return", "enum_for", "(", ":each_remote_read_then_finish", ")", "unless", "block_given?", "loop", "do", "resp", "=", "begin", "remote_read", "rescue", "GRPC", "::", "Core", "::", "CallError", "=>", "e", "GRPC", ".", "logger", ...
each_remote_read_then_finish passes each response to the given block or returns an enumerator of the responses if no block is given. It is like each_remote_read, but it blocks on finishing on detecting the final message. == Enumerator == * #next blocks until the remote endpoint sends a READ or FINISHED * for each read, enumerator#next yields the response * on status * if it's is OK, enumerator#next raises StopException * if is not OK, enumerator#next raises RuntimeException == Block == * if provided it is executed for each response * the call blocks until no more responses are provided @return [Enumerator] if no block was given
[ "each_remote_read_then_finish", "passes", "each", "response", "to", "the", "given", "block", "or", "returns", "an", "enumerator", "of", "the", "responses", "if", "no", "block", "is", "given", "." ]
f3937f0e55227a4ef3a23f895d3b204a947610f8
https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/active_call.rb#L323-L341
train
This method is used to iterate over the remote streams and yield the response to the block.
[ 30522, 13366, 2169, 1035, 6556, 1035, 3191, 1035, 2059, 1035, 3926, 2709, 4372, 2819, 1035, 2005, 1006, 1024, 2169, 1035, 6556, 1035, 3191, 1035, 2059, 1035, 3926, 1007, 4983, 3796, 1035, 2445, 1029, 7077, 2079, 24501, 2361, 1027, 4088, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/thrift
lib/rb/lib/thrift/protocol/json_protocol.rb
Thrift.JsonProtocol.write_json_char
def write_json_char(ch) # This table describes the handling for the first 0x30 characters # 0 : escape using "\u00xx" notation # 1 : just output index # <other> : escape using "\<other>" notation kJSONCharTable = [ # 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0,'b','t','n', 0,'f','r', 0, 0, # 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # 1 1, 1,'"', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, # 2 ] ch_value = ch[0] if (ch_value.kind_of? String) ch_value = ch.bytes.first end if (ch_value >= 0x30) if (ch == @@kJSONBackslash) # Only special character >= 0x30 is '\' trans.write(@@kJSONBackslash) trans.write(@@kJSONBackslash) else trans.write(ch) end else outCh = kJSONCharTable[ch_value]; # Check if regular character, backslash escaped, or JSON escaped if outCh.kind_of? String trans.write(@@kJSONBackslash) trans.write(outCh) elsif outCh == 1 trans.write(ch) else write_json_escape_char(ch) end end end
ruby
def write_json_char(ch) # This table describes the handling for the first 0x30 characters # 0 : escape using "\u00xx" notation # 1 : just output index # <other> : escape using "\<other>" notation kJSONCharTable = [ # 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0,'b','t','n', 0,'f','r', 0, 0, # 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # 1 1, 1,'"', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, # 2 ] ch_value = ch[0] if (ch_value.kind_of? String) ch_value = ch.bytes.first end if (ch_value >= 0x30) if (ch == @@kJSONBackslash) # Only special character >= 0x30 is '\' trans.write(@@kJSONBackslash) trans.write(@@kJSONBackslash) else trans.write(ch) end else outCh = kJSONCharTable[ch_value]; # Check if regular character, backslash escaped, or JSON escaped if outCh.kind_of? String trans.write(@@kJSONBackslash) trans.write(outCh) elsif outCh == 1 trans.write(ch) else write_json_escape_char(ch) end end end
[ "def", "write_json_char", "(", "ch", ")", "# This table describes the handling for the first 0x30 characters", "# 0 : escape using \"\\u00xx\" notation", "# 1 : just output index", "# <other> : escape using \"\\<other>\" notation", "kJSONCharTable", "=", "[", "# 0 1 2 3 4 5 6 7 8 9 A B C D E...
Write the character ch as part of a JSON string, escaping as appropriate.
[ "Write", "the", "character", "ch", "as", "part", "of", "a", "JSON", "string", "escaping", "as", "appropriate", "." ]
27d8387c49a49fcf193893f834e9766ae0b051c1
https://github.com/apache/thrift/blob/27d8387c49a49fcf193893f834e9766ae0b051c1/lib/rb/lib/thrift/protocol/json_protocol.rb#L262-L297
train
Write a single character to the output stream
[ 30522, 13366, 4339, 1035, 1046, 3385, 1035, 25869, 1006, 10381, 1007, 1001, 2023, 2795, 5577, 1996, 8304, 2005, 1996, 2034, 1014, 2595, 14142, 3494, 1001, 1014, 1024, 4019, 2478, 1000, 1032, 1057, 8889, 20348, 1000, 14869, 1001, 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...
mojombo/chronic
lib/chronic/handlers.rb
Chronic.Handlers.handle_rqn_sy
def handle_rqn_sy(tokens, options) year = tokens[1].get_tag(ScalarYear).type quarter_tag = tokens[0].get_tag(RepeaterQuarterName) quarter_tag.start = Chronic.construct(year) quarter_tag.this(:none) end
ruby
def handle_rqn_sy(tokens, options) year = tokens[1].get_tag(ScalarYear).type quarter_tag = tokens[0].get_tag(RepeaterQuarterName) quarter_tag.start = Chronic.construct(year) quarter_tag.this(:none) end
[ "def", "handle_rqn_sy", "(", "tokens", ",", "options", ")", "year", "=", "tokens", "[", "1", "]", ".", "get_tag", "(", "ScalarYear", ")", ".", "type", "quarter_tag", "=", "tokens", "[", "0", "]", ".", "get_tag", "(", "RepeaterQuarterName", ")", "quarter_...
Handle repeater-quarter-name/scalar-year
[ "Handle", "repeater", "-", "quarter", "-", "name", "/", "scalar", "-", "year" ]
2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c
https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L119-L124
train
Handle the RQN sy token
[ 30522, 13366, 5047, 1035, 28134, 2078, 1035, 25353, 1006, 19204, 2015, 1010, 7047, 1007, 2095, 1027, 19204, 2015, 1031, 1015, 1033, 1012, 2131, 1035, 6415, 1006, 26743, 2854, 14644, 1007, 1012, 2828, 4284, 1035, 6415, 1027, 19204, 2015, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.create_regex_entity_role_with_http_info
def create_regex_entity_role_with_http_info(app_id, version_id, entity_id, entity_role_create_object, custom_headers:nil) create_regex_entity_role_async(app_id, version_id, entity_id, entity_role_create_object, custom_headers:custom_headers).value! end
ruby
def create_regex_entity_role_with_http_info(app_id, version_id, entity_id, entity_role_create_object, custom_headers:nil) create_regex_entity_role_async(app_id, version_id, entity_id, entity_role_create_object, custom_headers:custom_headers).value! end
[ "def", "create_regex_entity_role_with_http_info", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "entity_role_create_object", ",", "custom_headers", ":", "nil", ")", "create_regex_entity_role_async", "(", "app_id", ",", "version_id", ",", "entity_id", ",", "en...
Create a role for an regular expression entity in a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param entity_id The entity model ID. @param entity_role_create_object [EntityRoleCreateObject] An entity role object containing the name of role. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Create", "a", "role", "for", "an", "regular", "expression", "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#L6941-L6943
train
Creates an entity role for a given regex entity.
[ 30522, 13366, 3443, 1035, 19723, 10288, 1035, 9178, 1035, 2535, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 9178, 1035, 8909, 1010, 9178, 1035, 2535, 1035, 3443, 1035, 4874, 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...
drapergem/draper
lib/draper/finders.rb
Draper.Finders.method_missing
def method_missing(method, *args, &block) return super unless method =~ /^find_(all_|last_|or_(initialize_|create_))?by_/ result = object_class.send(method, *args, &block) options = args.extract_options! if method =~ /^find_all/ decorate_collection(result, options) else decorate(result, options) end end
ruby
def method_missing(method, *args, &block) return super unless method =~ /^find_(all_|last_|or_(initialize_|create_))?by_/ result = object_class.send(method, *args, &block) options = args.extract_options! if method =~ /^find_all/ decorate_collection(result, options) else decorate(result, options) end end
[ "def", "method_missing", "(", "method", ",", "*", "args", ",", "&", "block", ")", "return", "super", "unless", "method", "=~", "/", "/", "result", "=", "object_class", ".", "send", "(", "method", ",", "args", ",", "block", ")", "options", "=", "args", ...
Decorates dynamic finder methods (`find_all_by_` and friends).
[ "Decorates", "dynamic", "finder", "methods", "(", "find_all_by_", "and", "friends", ")", "." ]
d44c86f1e560afc0cf0dad4ae09bfaa3f10a1759
https://github.com/drapergem/draper/blob/d44c86f1e560afc0cf0dad4ae09bfaa3f10a1759/lib/draper/finders.rb#L23-L34
train
Find the object using the given method.
[ 30522, 13366, 4118, 1035, 4394, 1006, 4118, 1010, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2709, 3565, 4983, 4118, 1027, 1066, 1013, 1034, 2424, 1035, 1006, 2035, 1035, 1064, 2197, 1035, 1064, 2030, 1035, 1006, 3988, 4697, 1035, 1064, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_marketplace_ordering/lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb
Azure::MarketplaceOrdering::Mgmt::V2015_06_01.MarketplaceAgreements.get_agreement
def get_agreement(publisher_id, offer_id, plan_id, custom_headers:nil) response = get_agreement_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_agreement(publisher_id, offer_id, plan_id, custom_headers:nil) response = get_agreement_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_agreement", "(", "publisher_id", ",", "offer_id", ",", "plan_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_agreement_async", "(", "publisher_id", ",", "offer_id", ",", "plan_id", ",", "custom_headers", ":custom_headers", ")", ".", ...
Get marketplace agreement. @param publisher_id [String] Publisher identifier string of image being deployed. @param offer_id [String] Offer identifier string of image being deployed. @param plan_id [String] Plan identifier string of image being deployed. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [AgreementTerms] operation results.
[ "Get", "marketplace", "agreement", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_marketplace_ordering/lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb#L448-L451
train
Gets the agreement of the specified plan.
[ 30522, 13366, 2131, 1035, 3820, 1006, 6674, 1035, 8909, 1010, 3749, 1035, 8909, 1010, 2933, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 3820, 1035, 2004, 6038, 2278, 1006, 6674, 1035, 8909, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
troessner/reek
lib/reek/smell_configuration.rb
Reek.SmellConfiguration.value
def value(key, context) overrides_for(context).each { |conf| return conf[key] if conf.key?(key) } options.fetch(key) end
ruby
def value(key, context) overrides_for(context).each { |conf| return conf[key] if conf.key?(key) } options.fetch(key) end
[ "def", "value", "(", "key", ",", "context", ")", "overrides_for", "(", "context", ")", ".", "each", "{", "|", "conf", "|", "return", "conf", "[", "key", "]", "if", "conf", ".", "key?", "(", "key", ")", "}", "options", ".", "fetch", "(", "key", ")...
Retrieves the value, if any, for the given +key+ in the given +context+. Raises an error if neither the context nor this config have a value for the key.
[ "Retrieves", "the", "value", "if", "any", "for", "the", "given", "+", "key", "+", "in", "the", "given", "+", "context", "+", "." ]
8c6b5c0c6228a6981ab48543457889f9ea984054
https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/smell_configuration.rb#L37-L40
train
Returns the value for the given key in the context
[ 30522, 13366, 3643, 1006, 3145, 1010, 6123, 1007, 2058, 15637, 2015, 1035, 2005, 1006, 6123, 1007, 1012, 2169, 1063, 1064, 9530, 2546, 1064, 2709, 9530, 2546, 1031, 3145, 1033, 2065, 9530, 2546, 1012, 3145, 1029, 1006, 3145, 1007, 1065, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sporkmonger/addressable
lib/addressable/uri.rb
Addressable.URI.authority
def authority self.host && @authority ||= begin authority = String.new if self.userinfo != nil authority << "#{self.userinfo}@" end authority << self.host if self.port != nil authority << ":#{self.port}" end authority end end
ruby
def authority self.host && @authority ||= begin authority = String.new if self.userinfo != nil authority << "#{self.userinfo}@" end authority << self.host if self.port != nil authority << ":#{self.port}" end authority end end
[ "def", "authority", "self", ".", "host", "&&", "@authority", "||=", "begin", "authority", "=", "String", ".", "new", "if", "self", ".", "userinfo", "!=", "nil", "authority", "<<", "\"#{self.userinfo}@\"", "end", "authority", "<<", "self", ".", "host", "if", ...
The authority component for this URI. Combines the user, password, host, and port components. @return [String] The authority component.
[ "The", "authority", "component", "for", "this", "URI", ".", "Combines", "the", "user", "password", "host", "and", "port", "components", "." ]
5894c95a7768435cb46d1355954611dbd194832e
https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1203-L1215
train
Returns the authority of the URI.
[ 30522, 13366, 3691, 2969, 1012, 3677, 1004, 1004, 1030, 3691, 1064, 1064, 1027, 4088, 3691, 1027, 5164, 1012, 2047, 2065, 2969, 1012, 5310, 2378, 14876, 999, 1027, 9152, 2140, 3691, 1026, 1026, 1000, 1001, 1063, 2969, 1012, 5310, 2378, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb
Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationJobs.begin_resume
def begin_resume(job_name, resume_job_params, custom_headers:nil) response = begin_resume_async(job_name, resume_job_params, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_resume(job_name, resume_job_params, custom_headers:nil) response = begin_resume_async(job_name, resume_job_params, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_resume", "(", "job_name", ",", "resume_job_params", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_resume_async", "(", "job_name", ",", "resume_job_params", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".",...
Resumes the specified job. The operation to resume an Azure Site Recovery job @param job_name [String] Job identifier. @param resume_job_params [ResumeJobParams] Resume rob comments. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Job] operation results.
[ "Resumes", "the", "specified", "job", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb#L590-L593
train
Resumes a managed cluster job.
[ 30522, 13366, 4088, 1035, 13746, 1006, 3105, 1035, 2171, 1010, 13746, 1035, 3105, 1035, 11498, 5244, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 13746, 1035, 2004, 6038, 2278, 1006, 3105, 1035, 2171, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb
Azure::EventHub::Mgmt::V2017_04_01.ConsumerGroups.list_by_event_hub
def list_by_event_hub(resource_group_name, namespace_name, event_hub_name, skip:nil, top:nil, custom_headers:nil) first_page = list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, skip:skip, top:top, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_by_event_hub(resource_group_name, namespace_name, event_hub_name, skip:nil, top:nil, custom_headers:nil) first_page = list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, skip:skip, top:top, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_by_event_hub", "(", "resource_group_name", ",", "namespace_name", ",", "event_hub_name", ",", "skip", ":", "nil", ",", "top", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_by_event_hub_as_lazy", "(", "resource_group_name",...
Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. @param resource_group_name [String] Name of the resource group within the azure subscription. @param namespace_name [String] The Namespace name @param event_hub_name [String] The Event Hub name @param skip [Integer] Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<ConsumerGroup>] operation results.
[ "Gets", "all", "the", "consumer", "groups", "in", "a", "Namespace", ".", "An", "empty", "feed", "is", "returned", "if", "no", "consumer", "group", "exists", "in", "the", "Namespace", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb#L379-L382
train
Gets all the event hubs in a namespace.
[ 30522, 13366, 2862, 1035, 2011, 1035, 30524, 3415, 15327, 1035, 2171, 1010, 2724, 1035, 9594, 1035, 2171, 1010, 13558, 1024, 9152, 2140, 1010, 2327, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb
Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.begin_update_tags_with_http_info
def begin_update_tags_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) begin_update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_update_tags_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) begin_update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_update_tags_with_http_info", "(", "resource_group_name", ",", "virtual_network_gateway_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_update_tags_async", "(", "resource_group_name", ",", "virtual_network_gateway_name", ",", "parameters", ...
Updates a virtual network gateway tags. @param resource_group_name [String] The name of the resource group. @param virtual_network_gateway_name [String] The name of the virtual network gateway. @param parameters [TagsObject] Parameters supplied to update virtual network gateway tags. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Updates", "a", "virtual", "network", "gateway", "tags", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L1406-L1408
train
Updates a virtual network gateway tags.
[ 30522, 13366, 4088, 1035, 10651, 1035, 22073, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 11909, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb
Azure::ApiManagement::Mgmt::V2018_01_01.Subscription.create_or_update
def create_or_update(resource_group_name, service_name, sid, parameters, notify:nil, if_match:nil, custom_headers:nil) response = create_or_update_async(resource_group_name, service_name, sid, parameters, notify:notify, if_match:if_match, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(resource_group_name, service_name, sid, parameters, notify:nil, if_match:nil, custom_headers:nil) response = create_or_update_async(resource_group_name, service_name, sid, parameters, notify:notify, if_match:if_match, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "resource_group_name", ",", "service_name", ",", "sid", ",", "parameters", ",", "notify", ":", "nil", ",", "if_match", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_g...
Creates or updates the subscription of specified user to the specified product. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param sid [String] Subscription entity Identifier. The entity represents the association between a user and a product in API Management. @param parameters [SubscriptionCreateParameters] Create parameters. @param notify [Boolean] Notify change in Subscription State. - If false, do not send any email notification for change of state of subscription - If true, send email notification of change of state of subscription @param if_match [String] ETag of the Entity. Not required when creating an entity, but required when updating an entity. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [SubscriptionContract] operation results.
[ "Creates", "or", "updates", "the", "subscription", "of", "specified", "user", "to", "the", "specified", "product", "." ]
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/subscription.rb#L392-L395
train
Creates or updates a service or updates an existing service.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 15765, 1010, 11709, 1010, 2025, 8757, 1024, 9152, 2140, 1010, 2065, 1035, 2674, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb
Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.create_or_update_at_resource_level
def create_or_update_at_resource_level(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers:nil) response = create_or_update_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update_at_resource_level(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers:nil) response = create_or_update_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update_at_resource_level", "(", "resource_group_name", ",", "resource_provider_namespace", ",", "parent_resource_path", ",", "resource_type", ",", "resource_name", ",", "lock_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "...
Create or update a management lock at the resource level or any level below resource. @param resource_group_name [String] The name of the resource group. @param resource_provider_namespace [String] Resource identity. @param parent_resource_path [String] Resource identity. @param resource_type [String] Resource identity. @param resource_name [String] Resource identity. @param lock_name [String] The name of lock. @param parameters [ManagementLockObject] Create or update management lock parameters. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ManagementLockObject] operation results.
[ "Create", "or", "update", "a", "management", "lock", "at", "the", "resource", "level", "or", "any", "level", "below", "resource", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L336-L339
train
Creates or updates a resource at resource level.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2012, 30524, 1035, 4130, 1010, 7692, 1035, 2828, 1010, 7692, 1035, 2171, 1010, 5843, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 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_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_code_package_info_list
def get_deployed_code_package_info_list(node_name, application_id, service_manifest_name:nil, code_package_name:nil, timeout:60, custom_headers:nil) response = get_deployed_code_package_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, code_package_name:code_package_name, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_deployed_code_package_info_list(node_name, application_id, service_manifest_name:nil, code_package_name:nil, timeout:60, custom_headers:nil) response = get_deployed_code_package_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, code_package_name:code_package_name, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_deployed_code_package_info_list", "(", "node_name", ",", "application_id", ",", "service_manifest_name", ":", "nil", ",", "code_package_name", ":", "nil", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_deployed_c...
Gets the list of code packages deployed on a Service Fabric node. Gets the list of code packages deployed on a Service Fabric node for the given application. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @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 [Array] operation results.
[ "Gets", "the", "list", "of", "code", "packages", "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#L17092-L17095
train
Gets the list of code package deployments for a node.
[ 30522, 13366, 2131, 1035, 7333, 1035, 3642, 1035, 7427, 1035, 18558, 1035, 2862, 1006, 13045, 1035, 2171, 1010, 4646, 1035, 8909, 1010, 2326, 1035, 19676, 1035, 2171, 1024, 9152, 2140, 1010, 3642, 1035, 7427, 1035, 2171, 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...
decidim/decidim
decidim-core/app/services/decidim/home_activity_search.rb
Decidim.HomeActivitySearch.resource_types
def resource_types @resource_types ||= %w( Decidim::Accountability::Result Decidim::Blogs::Post Decidim::Comments::Comment Decidim::Consultations::Question Decidim::Debates::Debate Decidim::Meetings::Meeting Decidim::Proposals::Proposal Decidim::Surveys::Survey Decidim::Assembly Decidim::Consultation Decidim::Initiative Decidim::ParticipatoryProcess ).select do |klass| klass.safe_constantize.present? end end
ruby
def resource_types @resource_types ||= %w( Decidim::Accountability::Result Decidim::Blogs::Post Decidim::Comments::Comment Decidim::Consultations::Question Decidim::Debates::Debate Decidim::Meetings::Meeting Decidim::Proposals::Proposal Decidim::Surveys::Survey Decidim::Assembly Decidim::Consultation Decidim::Initiative Decidim::ParticipatoryProcess ).select do |klass| klass.safe_constantize.present? end end
[ "def", "resource_types", "@resource_types", "||=", "%w(", "Decidim::Accountability::Result", "Decidim::Blogs::Post", "Decidim::Comments::Comment", "Decidim::Consultations::Question", "Decidim::Debates::Debate", "Decidim::Meetings::Meeting", "Decidim::Proposals::Proposal", "Decidim::Surveys::...
All the resource types that are eligible to be included as an activity.
[ "All", "the", "resource", "types", "that", "are", "eligible", "to", "be", "included", "as", "an", "activity", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/services/decidim/home_activity_search.rb#L34-L51
train
Returns the resource types for the given object.
[ 30522, 13366, 7692, 1035, 4127, 1030, 7692, 1035, 4127, 1064, 1064, 1027, 1003, 1059, 1006, 11703, 28173, 2213, 1024, 1024, 17842, 1024, 1024, 2765, 11703, 28173, 2213, 1024, 1024, 23012, 1024, 1024, 2695, 11703, 28173, 2213, 1024, 1024, 79...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/has_window.rb
Watir.HasWindow.windows
def windows(*args) all = @driver.window_handles.map { |handle| Window.new(self, handle: handle) } if args.empty? all else filter_windows extract_selector(args), all end end
ruby
def windows(*args) all = @driver.window_handles.map { |handle| Window.new(self, handle: handle) } if args.empty? all else filter_windows extract_selector(args), all end end
[ "def", "windows", "(", "*", "args", ")", "all", "=", "@driver", ".", "window_handles", ".", "map", "{", "|", "handle", "|", "Window", ".", "new", "(", "self", ",", "handle", ":", "handle", ")", "}", "if", "args", ".", "empty?", "all", "else", "filt...
Returns browser windows array. @example browser.windows(title: 'closeable window') @return [Array<Window>]
[ "Returns", "browser", "windows", "array", "." ]
2d8db09811c6221ae401b85b2f61f5fa66e463a3
https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/has_window.rb#L12-L20
train
Returns a list of windows that match the given selector.
[ 30522, 13366, 3645, 1006, 1008, 12098, 5620, 1007, 2035, 1027, 1030, 4062, 1012, 3332, 1035, 16024, 1012, 4949, 1063, 1064, 5047, 1064, 3332, 1012, 2047, 1006, 2969, 1010, 5047, 1024, 5047, 1007, 1065, 2065, 12098, 5620, 1012, 4064, 1029, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb
Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.BuildTasks.get_with_http_info
def get_with_http_info(resource_group_name, registry_name, build_task_name, custom_headers:nil) get_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, registry_name, build_task_name, custom_headers:nil) get_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "registry_name", ",", "build_task_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "registry_name", ",", "build_task_name", ",", "custom_headers", ":custom_headers", ...
Get the properties of a specified build task. @param resource_group_name [String] The name of the resource group to which the container registry belongs. @param registry_name [String] The name of the container registry. @param build_task_name [String] The name of the container registry build task. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Get", "the", "properties", "of", "a", "specified", "build", "task", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb#L162-L164
train
Gets the specified build task s sequence number.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 3857, 1035, 4708, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
projectcypress/health-data-standards
lib/hqmf-parser/1.0/attribute.rb
HQMF1.Attribute.const_name
def const_name components = name.gsub(/\W/,' ').split.collect {|word| word.strip.upcase } components.join '_' end
ruby
def const_name components = name.gsub(/\W/,' ').split.collect {|word| word.strip.upcase } components.join '_' end
[ "def", "const_name", "components", "=", "name", ".", "gsub", "(", "/", "\\W", "/", ",", "' '", ")", ".", "split", ".", "collect", "{", "|", "word", "|", "word", ".", "strip", ".", "upcase", "}", "components", ".", "join", "'_'", "end" ]
Get a JS friendly constant name for this measure attribute
[ "Get", "a", "JS", "friendly", "constant", "name", "for", "this", "measure", "attribute" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/1.0/attribute.rb#L58-L61
train
Returns the name of the constant.
[ 30522, 13366, 9530, 3367, 1035, 2171, 6177, 1027, 2171, 1012, 28177, 12083, 1006, 1013, 1032, 1059, 1013, 1010, 1005, 1005, 1007, 1012, 3975, 1012, 8145, 1063, 1064, 2773, 1064, 2773, 1012, 6167, 1012, 2039, 18382, 1065, 6177, 1012, 3693, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/charge_request.rb
SquareConnect.ChargeRequest.card_nonce=
def card_nonce=(card_nonce) if !card_nonce.nil? && card_nonce.to_s.length > 192 fail ArgumentError, "invalid value for 'card_nonce', the character length must be smaller than or equal to 192." end @card_nonce = card_nonce end
ruby
def card_nonce=(card_nonce) if !card_nonce.nil? && card_nonce.to_s.length > 192 fail ArgumentError, "invalid value for 'card_nonce', the character length must be smaller than or equal to 192." end @card_nonce = card_nonce end
[ "def", "card_nonce", "=", "(", "card_nonce", ")", "if", "!", "card_nonce", ".", "nil?", "&&", "card_nonce", ".", "to_s", ".", "length", ">", "192", "fail", "ArgumentError", ",", "\"invalid value for 'card_nonce', the character length must be smaller than or equal to 192.\...
Custom attribute writer method with validation @param [Object] card_nonce Value to be assigned
[ "Custom", "attribute", "writer", "method", "with", "validation" ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/charge_request.rb#L240-L247
train
Set the card nonce
[ 30522, 13366, 4003, 1035, 2512, 3401, 1027, 1006, 4003, 1035, 2512, 3401, 1007, 2065, 999, 4003, 1035, 2512, 3401, 1012, 9152, 2140, 1029, 1004, 1004, 4003, 1035, 2512, 3401, 1012, 2000, 1035, 1055, 1012, 3091, 1028, 17613, 8246, 6685, 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...
mojombo/chronic
lib/chronic/handlers.rb
Chronic.Handlers.handle_r
def handle_r(tokens, options) dd_tokens = dealias_and_disambiguate_times(tokens, options) get_anchor(dd_tokens, options) end
ruby
def handle_r(tokens, options) dd_tokens = dealias_and_disambiguate_times(tokens, options) get_anchor(dd_tokens, options) end
[ "def", "handle_r", "(", "tokens", ",", "options", ")", "dd_tokens", "=", "dealias_and_disambiguate_times", "(", "tokens", ",", "options", ")", "get_anchor", "(", "dd_tokens", ",", "options", ")", "end" ]
anchors Handle repeaters
[ "anchors", "Handle", "repeaters" ]
2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c
https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L432-L435
train
Handle the R token
[ 30522, 13366, 5047, 1035, 1054, 1006, 19204, 2015, 1010, 7047, 1007, 20315, 1035, 19204, 2015, 1027, 3066, 7951, 1035, 1998, 1035, 4487, 21559, 5638, 19696, 2618, 1035, 2335, 1006, 19204, 2015, 1010, 7047, 1007, 2131, 1035, 8133, 1006, 2031...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
braintree/braintree_ruby
lib/braintree/add_on_gateway.rb
Braintree.AddOnGateway.all
def all response = @config.http.get("#{@config.base_merchant_path}/add_ons") attributes_collection = response[:add_ons] attributes_collection.map do |attributes| AddOn._new(attributes) end end
ruby
def all response = @config.http.get("#{@config.base_merchant_path}/add_ons") attributes_collection = response[:add_ons] attributes_collection.map do |attributes| AddOn._new(attributes) end end
[ "def", "all", "response", "=", "@config", ".", "http", ".", "get", "(", "\"#{@config.base_merchant_path}/add_ons\"", ")", "attributes_collection", "=", "response", "[", ":add_ons", "]", "attributes_collection", ".", "map", "do", "|", "attributes", "|", "AddOn", "....
:nodoc
[ ":", "nodoc" ]
6e56c7099ea55bcdc4073cbea60b2688cef69663
https://github.com/braintree/braintree_ruby/blob/6e56c7099ea55bcdc4073cbea60b2688cef69663/lib/braintree/add_on_gateway.rb#L9-L15
train
Returns an array of all the addons
[ 30522, 13366, 2035, 3433, 1027, 1030, 9530, 8873, 2290, 1012, 8299, 1012, 2131, 1006, 1000, 1001, 1063, 1030, 9530, 8873, 2290, 1012, 2918, 1035, 6432, 1035, 4130, 1065, 1013, 5587, 1035, 2006, 2015, 1000, 1007, 12332, 1035, 3074, 1027, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb
Azure::Compute::Mgmt::V2018_10_01.VirtualMachineScaleSetVMs.begin_run_command
def begin_run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) response = begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) response = begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_run_command", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "instance_id", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_run_command_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "insta...
Run command on a virtual machine in a VM scale set. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set. @param instance_id [String] The instance ID of the virtual machine. @param parameters [RunCommandInput] Parameters supplied to the Run command operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [RunCommandResult] operation results.
[ "Run", "command", "on", "a", "virtual", "machine", "in", "a", "VM", "scale", "set", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb#L1726-L1729
train
Runs a command on a virtual machine in a VM scale set.
[ 30522, 13366, 4088, 1035, 2448, 1035, 3094, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 6013, 1035, 8909, 1010, 11709, 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...
rails/rails
railties/lib/rails/application.rb
Rails.Application.encrypted
def encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY") ActiveSupport::EncryptedConfiguration.new( config_path: Rails.root.join(path), key_path: Rails.root.join(key_path), env_key: env_key, raise_if_missing_key: config.require_master_key ) end
ruby
def encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY") ActiveSupport::EncryptedConfiguration.new( config_path: Rails.root.join(path), key_path: Rails.root.join(key_path), env_key: env_key, raise_if_missing_key: config.require_master_key ) end
[ "def", "encrypted", "(", "path", ",", "key_path", ":", "\"config/master.key\"", ",", "env_key", ":", "\"RAILS_MASTER_KEY\"", ")", "ActiveSupport", "::", "EncryptedConfiguration", ".", "new", "(", "config_path", ":", "Rails", ".", "root", ".", "join", "(", "path"...
Shorthand to decrypt any encrypted configurations or files. For any file added with <tt>rails encrypted:edit</tt> call +read+ to decrypt the file with the master key. The master key is either stored in +config/master.key+ or <tt>ENV["RAILS_MASTER_KEY"]</tt>. Rails.application.encrypted("config/mystery_man.txt.enc").read # => "We've met before, haven't we?" It's also possible to interpret encrypted YAML files with +config+. Rails.application.encrypted("config/credentials.yml.enc").config # => { next_guys_line: "I don't think so. Where was it you think we met?" } Any top-level configs are also accessible directly on the return value: Rails.application.encrypted("config/credentials.yml.enc").next_guys_line # => "I don't think so. Where was it you think we met?" The files or configs can also be encrypted with a custom key. To decrypt with a key in the +ENV+, use: Rails.application.encrypted("config/special_tokens.yml.enc", env_key: "SPECIAL_TOKENS") Or to decrypt with a file, that should be version control ignored, relative to +Rails.root+: Rails.application.encrypted("config/special_tokens.yml.enc", key_path: "config/special_tokens.key")
[ "Shorthand", "to", "decrypt", "any", "encrypted", "configurations", "or", "files", "." ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/application.rb#L466-L473
train
Returns a new instance of the encrypted configuration.
[ 30522, 13366, 4372, 26775, 22571, 3064, 1006, 4130, 1010, 3145, 1035, 4130, 1024, 1000, 9530, 8873, 2290, 1013, 3040, 1012, 3145, 1000, 1010, 4372, 2615, 1035, 3145, 1024, 1000, 15168, 1035, 3040, 1035, 3145, 1000, 1007, 3161, 6342, 9397, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
3scale/3scale_toolbox
lib/3scale_toolbox/configuration.rb
ThreeScaleToolbox.Configuration.read
def read @store.transaction(true) do @store.roots.each_with_object({}) do |key, obj| obj[key] = @store[key] end end end
ruby
def read @store.transaction(true) do @store.roots.each_with_object({}) do |key, obj| obj[key] = @store[key] end end end
[ "def", "read", "@store", ".", "transaction", "(", "true", ")", "do", "@store", ".", "roots", ".", "each_with_object", "(", "{", "}", ")", "do", "|", "key", ",", "obj", "|", "obj", "[", "key", "]", "=", "@store", "[", "key", "]", "end", "end", "en...
returns copy of data stored
[ "returns", "copy", "of", "data", "stored" ]
aeb19add0ae2348788b0b21f641bf88bf7003ea3
https://github.com/3scale/3scale_toolbox/blob/aeb19add0ae2348788b0b21f641bf88bf7003ea3/lib/3scale_toolbox/configuration.rb#L27-L33
train
Read the root node from the store
[ 30522, 13366, 3191, 1030, 3573, 1012, 12598, 1006, 2995, 1007, 2079, 1030, 3573, 1012, 6147, 1012, 2169, 1035, 2007, 1035, 4874, 1006, 1063, 1065, 1007, 2079, 1064, 3145, 1010, 27885, 3501, 1064, 27885, 3501, 1031, 3145, 1033, 1027, 1030, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...