repo
stringclasses
235 values
path
stringlengths
11
168
func_name
stringlengths
12
143
original_string
stringlengths
83
6.91k
language
stringclasses
1 value
code
stringlengths
83
6.91k
code_tokens
listlengths
15
1.01k
docstring
stringlengths
5
25.7k
docstring_tokens
listlengths
1
427
sha
stringclasses
235 values
url
stringlengths
99
268
partition
stringclasses
1 value
summary
stringlengths
7
202
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
Azure/azure-sdk-for-ruby
management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb
Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.list_keys_next
def list_keys_next(next_page_link, custom_headers:nil) response = list_keys_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_keys_next(next_page_link, custom_headers:nil) response = list_keys_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_keys_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_keys_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", ".", ...
Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. @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 [SharedAccessSignatureAuthorizationRuleListResult] operation results.
[ "Get", "the", "security", "metadata", "for", "an", "IoT", "hub", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/", "iot", "-", "hub", "/", "iot", "-", "hub", "-", "devguide", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L2801-L2804
train
Gets the key list of the specified key.
[ 30522, 13366, 2862, 1035, 6309, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 6309, 1035, 2279, 1035, 2004, 6038, 2278, 1006, 2279, 1035, 3931, 1035, 4957, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
square/connect-ruby-sdk
lib/square_connect/api/customers_api.rb
SquareConnect.CustomersApi.create_customer
def create_customer(body, opts = {}) data, _status_code, _headers = create_customer_with_http_info(body, opts) return data end
ruby
def create_customer(body, opts = {}) data, _status_code, _headers = create_customer_with_http_info(body, opts) return data end
[ "def", "create_customer", "(", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_customer_with_http_info", "(", "body", ",", "opts", ")", "return", "data", "end" ]
CreateCustomer Creates a new customer for a business, which can have associated cards on file. You must provide __at least one__ of the following values in your request to this endpoint: - `given_name` - `family_name` - `company_name` - `email_address` - `phone_number` @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [CreateCustomerResponse]
[ "CreateCustomer", "Creates", "a", "new", "customer", "for", "a", "business", "which", "can", "have", "associated", "cards", "on", "file", ".", "You", "must", "provide", "__at", "least", "one__", "of", "the", "following", "values", "in", "your", "request", "t...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L25-L28
train
Creates a customer
[ 30522, 13366, 3443, 1035, 8013, 1006, 2303, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 3443, 1035, 8013, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2303, 1010, 23569, 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...
minimagick/minimagick
lib/mini_magick/image.rb
MiniMagick.Image.write
def write(output_to) case output_to when String, Pathname if layer? MiniMagick::Tool::Convert.new do |builder| builder << path builder << output_to end else FileUtils.copy_file path, output_to unless path == output_to.to_s end else IO.copy_stream File.open(path, "rb"), output_to end end
ruby
def write(output_to) case output_to when String, Pathname if layer? MiniMagick::Tool::Convert.new do |builder| builder << path builder << output_to end else FileUtils.copy_file path, output_to unless path == output_to.to_s end else IO.copy_stream File.open(path, "rb"), output_to end end
[ "def", "write", "(", "output_to", ")", "case", "output_to", "when", "String", ",", "Pathname", "if", "layer?", "MiniMagick", "::", "Tool", "::", "Convert", ".", "new", "do", "|", "builder", "|", "builder", "<<", "path", "builder", "<<", "output_to", "end",...
Writes the temporary file out to either a file location (by passing in a String) or by passing in a Stream that you can #write(chunk) to repeatedly @param output_to [String, Pathname, #read] Some kind of stream object that needs to be read or a file path as a String
[ "Writes", "the", "temporary", "file", "out", "to", "either", "a", "file", "location", "(", "by", "passing", "in", "a", "String", ")", "or", "by", "passing", "in", "a", "Stream", "that", "you", "can", "#write", "(", "chunk", ")", "to", "repeatedly" ]
d484786f35e91f107836d3c86aca61d50a35820b
https://github.com/minimagick/minimagick/blob/d484786f35e91f107836d3c86aca61d50a35820b/lib/mini_magick/image.rb#L472-L486
train
Write the file to the output_to file.
[ 30522, 13366, 4339, 1006, 6434, 1035, 2000, 1007, 2553, 6434, 1035, 2000, 2043, 5164, 1010, 4130, 18442, 2065, 6741, 1029, 7163, 2863, 12863, 2243, 1024, 1024, 6994, 1024, 1024, 10463, 1012, 2047, 2079, 1064, 12508, 1064, 12508, 1026, 1026,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
decidim/decidim
decidim-core/lib/decidim/component_manifest.rb
Decidim.ComponentManifest.on
def on(event_name, &block) hooks[event_name.to_sym] ||= [] hooks[event_name.to_sym] << block end
ruby
def on(event_name, &block) hooks[event_name.to_sym] ||= [] hooks[event_name.to_sym] << block end
[ "def", "on", "(", "event_name", ",", "&", "block", ")", "hooks", "[", "event_name", ".", "to_sym", "]", "||=", "[", "]", "hooks", "[", "event_name", ".", "to_sym", "]", "<<", "block", "end" ]
Public: Registers a hook to this manifest. Hooks get fired when some lifecycle events happen, like the creation of a component or its destruction. event_name - A String or Symbol with the event name. &block - The block to run when the hook gets triggered. Returns nothing.
[ "Public", ":", "Registers", "a", "hook", "to", "this", "manifest", ".", "Hooks", "get", "fired", "when", "some", "lifecycle", "events", "happen", "like", "the", "creation", "of", "a", "component", "or", "its", "destruction", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/component_manifest.rb#L71-L74
train
Adds a block to be called when an event is triggered.
[ 30522, 13366, 2006, 1006, 2724, 1035, 2171, 1010, 1004, 3796, 1007, 18008, 1031, 2724, 1035, 2171, 1012, 2000, 1035, 25353, 2213, 1033, 1064, 1064, 1027, 1031, 1033, 18008, 1031, 2724, 1035, 2171, 1012, 2000, 1035, 25353, 2213, 1033, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
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_partition_restart_progress
def get_partition_restart_progress(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) response = get_partition_restart_progress_async(service_id, partition_id, operation_id, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_partition_restart_progress(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) response = get_partition_restart_progress_async(service_id, partition_id, operation_id, timeout:timeout, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_partition_restart_progress", "(", "service_id", ",", "partition_id", ",", "operation_id", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_partition_restart_progress_async", "(", "service_id", ",", "partition_id", ",...
Gets the progress of a PartitionRestart operation started using StartPartitionRestart. Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided OperationId. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @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 [PartitionRestartProgress] operation results.
[ "Gets", "the", "progress", "of", "a", "PartitionRestart", "operation", "started", "using", "StartPartitionRestart", "." ]
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#L21467-L21470
train
Gets the restart progress of the specified partition.
[ 30522, 13366, 2131, 1035, 13571, 1035, 23818, 1035, 5082, 1006, 2326, 1035, 8909, 1010, 13571, 1035, 8909, 1010, 3169, 1035, 8909, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb
Azure::Compute::Mgmt::V2017_12_01.VirtualMachineScaleSetVMs.get_instance_view_with_http_info
def get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end
ruby
def get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end
[ "def", "get_instance_view_with_http_info", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "instance_id", ",", "custom_headers", ":", "nil", ")", "get_instance_view_async", "(", "resource_group_name", ",", "vm_scale_set_name", ",", "instance_id", ",", "custom_hea...
Gets the status of a virtual machine from a VM scale set. @param resource_group_name [String] The name of the resource group. @param vm_scale_set_name [String] The name of the VM scale set. @param instance_id [String] The instance ID of the virtual machine. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "the", "status", "of", "a", "virtual", "machine", "from", "a", "VM", "scale", "set", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb#L378-L380
train
Gets the details of the virtual machine in a VM scale set.
[ 30522, 13366, 2131, 1035, 6013, 1035, 3193, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 4094, 1035, 2275, 1035, 2171, 1010, 6013, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb
Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.export_iteration_with_http_info
def export_iteration_with_http_info(project_id, iteration_id, platform, flavor:nil, custom_headers:nil) export_iteration_async(project_id, iteration_id, platform, flavor:flavor, custom_headers:custom_headers).value! end
ruby
def export_iteration_with_http_info(project_id, iteration_id, platform, flavor:nil, custom_headers:nil) export_iteration_async(project_id, iteration_id, platform, flavor:flavor, custom_headers:custom_headers).value! end
[ "def", "export_iteration_with_http_info", "(", "project_id", ",", "iteration_id", ",", "platform", ",", "flavor", ":", "nil", ",", "custom_headers", ":", "nil", ")", "export_iteration_async", "(", "project_id", ",", "iteration_id", ",", "platform", ",", "flavor", ...
Export a trained iteration. @param project_id The project id. @param iteration_id The iteration id. @param platform [Enum] The target platform. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK' @param flavor [Enum] The flavor of the target platform. Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM' @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.
[ "Export", "a", "trained", "iteration", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L4124-L4126
train
Export the iteration.
[ 30522, 13366, 9167, 1035, 27758, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2622, 1035, 8909, 1010, 27758, 1035, 8909, 1010, 4132, 1010, 14894, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 9167, 1035, 27758, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb
Azure::StorageSync::Mgmt::V2018_07_01.ServerEndpoints.begin_update
def begin_update(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters:nil, custom_headers:nil) response = begin_update_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_update(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters:nil, custom_headers:nil) response = begin_update_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_update", "(", "resource_group_name", ",", "storage_sync_service_name", ",", "sync_group_name", ",", "server_endpoint_name", ",", "parameters", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_update_async", "(", "resource_group_n...
Patch a given ServerEndpoint. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param storage_sync_service_name [String] Name of Storage Sync Service resource. @param sync_group_name [String] Name of Sync Group resource. @param server_endpoint_name [String] Name of Server Endpoint object. @param parameters [ServerEndpointUpdateParameters] Any of the properties applicable in PUT request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ServerEndpoint] operation results.
[ "Patch", "a", "given", "ServerEndpoint", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb#L585-L588
train
Updates a server endpoint in a sync group.
[ 30522, 13366, 4088, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 5527, 1035, 26351, 1035, 2326, 1035, 2171, 1010, 26351, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2203, 8400, 1035, 2171, 1010, 11709, 1024, 9152, 2140, 1010, 7661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ruby-git/ruby-git
lib/git/base.rb
Git.Base.with_index
def with_index(new_index) # :yields: new_index old_index = @index set_index(new_index, false) return_value = yield @index set_index(old_index) return_value end
ruby
def with_index(new_index) # :yields: new_index old_index = @index set_index(new_index, false) return_value = yield @index set_index(old_index) return_value end
[ "def", "with_index", "(", "new_index", ")", "# :yields: new_index", "old_index", "=", "@index", "set_index", "(", "new_index", ",", "false", ")", "return_value", "=", "yield", "@index", "set_index", "(", "old_index", ")", "return_value", "end" ]
LOWER LEVEL INDEX OPERATIONS
[ "LOWER", "LEVEL", "INDEX", "OPERATIONS" ]
9bd4407c56068e1604f14a1b6c0c5a84868e6378
https://github.com/ruby-git/ruby-git/blob/9bd4407c56068e1604f14a1b6c0c5a84868e6378/lib/git/base.rb#L456-L462
train
Sets the index of the object to the given new_index.
[ 30522, 13366, 2007, 1035, 5950, 1006, 2047, 1035, 5950, 1007, 1001, 1024, 16189, 1024, 2047, 1035, 5950, 2214, 1035, 5950, 1027, 1030, 5950, 2275, 1035, 5950, 1006, 2047, 1035, 5950, 1010, 6270, 1007, 2709, 1035, 3643, 1027, 10750, 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...
danger/danger
lib/danger/plugin_support/plugin_file_resolver.rb
Danger.PluginFileResolver.resolve
def resolve if !refs.nil? and refs.select { |ref| File.file? ref }.any? paths = refs.select { |ref| File.file? ref }.map { |path| File.expand_path(path) } elsif refs and refs.kind_of? Array paths, gems = GemsResolver.new(refs).call else paths = Dir.glob(File.join(".", "lib/**/*.rb")).map { |path| File.expand_path(path) } end { paths: paths, gems: gems || [] } end
ruby
def resolve if !refs.nil? and refs.select { |ref| File.file? ref }.any? paths = refs.select { |ref| File.file? ref }.map { |path| File.expand_path(path) } elsif refs and refs.kind_of? Array paths, gems = GemsResolver.new(refs).call else paths = Dir.glob(File.join(".", "lib/**/*.rb")).map { |path| File.expand_path(path) } end { paths: paths, gems: gems || [] } end
[ "def", "resolve", "if", "!", "refs", ".", "nil?", "and", "refs", ".", "select", "{", "|", "ref", "|", "File", ".", "file?", "ref", "}", ".", "any?", "paths", "=", "refs", ".", "select", "{", "|", "ref", "|", "File", ".", "file?", "ref", "}", "....
Takes an array of files, gems or nothing, then resolves them into paths that should be sent into the documentation parser When given existing paths, map to absolute & existing paths When given a list of gems, resolve for list of gems When empty, imply you want to test the current lib folder as a plugin
[ "Takes", "an", "array", "of", "files", "gems", "or", "nothing", "then", "resolves", "them", "into", "paths", "that", "should", "be", "sent", "into", "the", "documentation", "parser", "When", "given", "existing", "paths", "map", "to", "absolute", "&", "existi...
0d6d09f2d949c287fe75202d947374042b0679f4
https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/plugin_support/plugin_file_resolver.rb#L14-L24
train
Returns a new object with the paths and gems
[ 30522, 13366, 10663, 2065, 999, 25416, 2015, 1012, 9152, 2140, 1029, 1998, 25416, 2015, 1012, 7276, 1063, 1064, 25416, 1064, 5371, 1012, 5371, 1029, 25416, 1065, 1012, 2151, 1029, 10425, 1027, 25416, 2015, 1012, 7276, 1063, 1064, 25416, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/controllers/pwb/api/v1/agency_controller.rb
Pwb.Api::V1::AgencyController.update_master_address
def update_master_address @agency = Agency.last if @agency.primary_address @agency.primary_address.update(address_params) @agency.primary_address.save! else primary_address = Address.create(address_params) @agency.primary_address_id = primary_address.id @agency.save! # @agency.primary_address = Address.create(address_params) end render json: @agency.primary_address end
ruby
def update_master_address @agency = Agency.last if @agency.primary_address @agency.primary_address.update(address_params) @agency.primary_address.save! else primary_address = Address.create(address_params) @agency.primary_address_id = primary_address.id @agency.save! # @agency.primary_address = Address.create(address_params) end render json: @agency.primary_address end
[ "def", "update_master_address", "@agency", "=", "Agency", ".", "last", "if", "@agency", ".", "primary_address", "@agency", ".", "primary_address", ".", "update", "(", "address_params", ")", "@agency", ".", "primary_address", ".", "save!", "else", "primary_address", ...
def update_legacy @agency = Agency.last @agency.style_variables = params[:style_variables] @agency.social_media = params[:social_media] # ActionController::Base.helpers.sanitize_css # TODO - allow raw_css after sanitizing with above # @agency.raw_css = params[:raw_css] if params[:site_template_id].present? # TODO - verify site_template exists @agency.site_template_id = params[:site_template_id] end # TODO - rename supported_languages client side @agency.supported_locales = params[:supported_languages] @agency.save! return render json: { "success": true }, status: :ok, head: :no_content end
[ "def", "update_legacy" ]
fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21
https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/controllers/pwb/api/v1/agency_controller.rb#L76-L88
train
update the master address in the agency
[ 30522, 13366, 10651, 1035, 3040, 1035, 4769, 1030, 4034, 1027, 4034, 1012, 2197, 2065, 1030, 4034, 1012, 3078, 1035, 4769, 1030, 4034, 1012, 3078, 1035, 4769, 1012, 10651, 1006, 4769, 1035, 11498, 5244, 1007, 1030, 4034, 1012, 3078, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.put_into_frame
def put_into_frame # We have to rotate the screenshot, since the offset information is for portrait # only. Instead of doing the calculations ourselves, it's much easier to let # imagemagick do the hard lifting for landscape screenshots rotation = self.rotation_for_device_orientation frame.rotate(-rotation) @image.rotate(-rotation) # Debug Mode: Add filename to frame if self.debug_mode filename = File.basename(@frame_path, ".*") filename.sub!('Apple', '') # remove 'Apple' width = screenshot.size[0] font_size = width / 20 # magic number that works well offset_top = offset['offset'].split("+")[2].to_f annotate_offset = "+0+#{offset_top}" # magic number that works semi well frame.combine_options do |c| c.gravity('North') c.undercolor('#00000080') c.fill('white') c.pointsize(font_size) c.annotate(annotate_offset.to_s, filename.to_s) end end @image = frame.composite(image, "png") do |c| c.compose("DstOver") c.geometry(offset['offset']) end # Revert the rotation from above frame.rotate(rotation) @image.rotate(rotation) end
ruby
def put_into_frame # We have to rotate the screenshot, since the offset information is for portrait # only. Instead of doing the calculations ourselves, it's much easier to let # imagemagick do the hard lifting for landscape screenshots rotation = self.rotation_for_device_orientation frame.rotate(-rotation) @image.rotate(-rotation) # Debug Mode: Add filename to frame if self.debug_mode filename = File.basename(@frame_path, ".*") filename.sub!('Apple', '') # remove 'Apple' width = screenshot.size[0] font_size = width / 20 # magic number that works well offset_top = offset['offset'].split("+")[2].to_f annotate_offset = "+0+#{offset_top}" # magic number that works semi well frame.combine_options do |c| c.gravity('North') c.undercolor('#00000080') c.fill('white') c.pointsize(font_size) c.annotate(annotate_offset.to_s, filename.to_s) end end @image = frame.composite(image, "png") do |c| c.compose("DstOver") c.geometry(offset['offset']) end # Revert the rotation from above frame.rotate(rotation) @image.rotate(rotation) end
[ "def", "put_into_frame", "# We have to rotate the screenshot, since the offset information is for portrait", "# only. Instead of doing the calculations ourselves, it's much easier to let", "# imagemagick do the hard lifting for landscape screenshots", "rotation", "=", "self", ".", "rotation_for_de...
puts the screenshot into the frame
[ "puts", "the", "screenshot", "into", "the", "frame" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L83-L119
train
This method is used to put the image into the frame
[ 30522, 13366, 2404, 1035, 2046, 1035, 4853, 1001, 2057, 2031, 2000, 24357, 1996, 12117, 12326, 1010, 2144, 1996, 16396, 2592, 2003, 2005, 6533, 1001, 2069, 1012, 2612, 1997, 2725, 1996, 16268, 9731, 1010, 2009, 1005, 1055, 2172, 6082, 2000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sunspot/sunspot
sunspot/lib/sunspot/session.rb
Sunspot.Session.connection
def connection @connection ||= self.class.connection_class.connect( url: config.solr.url, read_timeout: config.solr.read_timeout, open_timeout: config.solr.open_timeout, proxy: config.solr.proxy, update_format: config.solr.update_format || :xml ) end
ruby
def connection @connection ||= self.class.connection_class.connect( url: config.solr.url, read_timeout: config.solr.read_timeout, open_timeout: config.solr.open_timeout, proxy: config.solr.proxy, update_format: config.solr.update_format || :xml ) end
[ "def", "connection", "@connection", "||=", "self", ".", "class", ".", "connection_class", ".", "connect", "(", "url", ":", "config", ".", "solr", ".", "url", ",", "read_timeout", ":", "config", ".", "solr", ".", "read_timeout", ",", "open_timeout", ":", "c...
Retrieve the Solr connection for this session, creating one if it does not already exist. ==== Returns RSolr::Connection::Base:: The connection for this session
[ "Retrieve", "the", "Solr", "connection", "for", "this", "session", "creating", "one", "if", "it", "does", "not", "already", "exist", "." ]
31dd76cd7a14a4ef7bd541de97483d8cd72ff685
https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/session.rb#L256-L264
train
Connect to the connection
[ 30522, 13366, 4434, 1030, 4434, 1064, 1064, 1027, 2969, 1012, 2465, 1012, 4434, 1035, 2465, 1012, 7532, 1006, 24471, 2140, 1024, 9530, 8873, 2290, 1012, 14017, 2099, 1012, 24471, 2140, 1010, 3191, 1035, 2051, 5833, 1024, 9530, 8873, 2290, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/scss-lint
lib/scss_lint/utils.rb
SCSSLint.Utils.same_position?
def same_position?(pos1, pos2) return unless pos1 && pos2 pos1.line == pos2.line && pos1.offset == pos2.offset end
ruby
def same_position?(pos1, pos2) return unless pos1 && pos2 pos1.line == pos2.line && pos1.offset == pos2.offset end
[ "def", "same_position?", "(", "pos1", ",", "pos2", ")", "return", "unless", "pos1", "&&", "pos2", "pos1", ".", "line", "==", "pos2", ".", "line", "&&", "pos1", ".", "offset", "==", "pos2", ".", "offset", "end" ]
Sass doesn't define an equality operator for Sass::Source::Position objects, so we define a helper for our own use.
[ "Sass", "doesn", "t", "define", "an", "equality", "operator", "for", "Sass", "::", "Source", "::", "Position", "objects", "so", "we", "define", "a", "helper", "for", "our", "own", "use", "." ]
e99afe4ede041a431a06e585c12ce82f6ad50116
https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/utils.rb#L116-L119
train
Returns true if the positions are the same as the positions in the file.
[ 30522, 13366, 2168, 1035, 2597, 1029, 1006, 13433, 2015, 2487, 1010, 13433, 2015, 2475, 1007, 2709, 4983, 13433, 2015, 2487, 1004, 1004, 13433, 2015, 2475, 13433, 2015, 2487, 1012, 2240, 1027, 1027, 13433, 2015, 2475, 1012, 2240, 1004, 1004...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
castwide/solargraph
lib/solargraph/library.rb
Solargraph.Library.merge
def merge source result = nil mutex.synchronize do result = workspace.merge(source) @synchronized = !result if synchronized? end result end
ruby
def merge source result = nil mutex.synchronize do result = workspace.merge(source) @synchronized = !result if synchronized? end result end
[ "def", "merge", "source", "result", "=", "nil", "mutex", ".", "synchronize", "do", "result", "=", "workspace", ".", "merge", "(", "source", ")", "@synchronized", "=", "!", "result", "if", "synchronized?", "end", "result", "end" ]
Try to merge a source into the library's workspace. If the workspace is not configured to include the source, it gets ignored. @param source [Source] @return [Boolean] True if the source was merged into the workspace.
[ "Try", "to", "merge", "a", "source", "into", "the", "library", "s", "workspace", ".", "If", "the", "workspace", "is", "not", "configured", "to", "include", "the", "source", "it", "gets", "ignored", "." ]
47badb5d151aca775ccbe6c470236089eae7839d
https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/library.rb#L378-L385
train
Merge the two objects into the current one.
[ 30522, 13366, 13590, 3120, 2765, 1027, 9152, 2140, 20101, 2595, 1012, 26351, 8093, 10698, 4371, 2079, 2765, 1027, 2573, 15327, 1012, 13590, 1006, 3120, 1007, 1030, 25549, 1027, 999, 2765, 2065, 25549, 1029, 2203, 30524, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/sprockets/resolve.rb
Sprockets.Resolve.resolve_relative_path
def resolve_relative_path(paths, path, dirname, accept) filename = File.expand_path(path, dirname) load_path, _ = PathUtils.paths_split(paths, dirname) if load_path && logical_path = PathUtils.split_subpath(load_path, filename) resolve_logical_path([load_path], logical_path, accept) else return nil, nil, nil, Set.new end end
ruby
def resolve_relative_path(paths, path, dirname, accept) filename = File.expand_path(path, dirname) load_path, _ = PathUtils.paths_split(paths, dirname) if load_path && logical_path = PathUtils.split_subpath(load_path, filename) resolve_logical_path([load_path], logical_path, accept) else return nil, nil, nil, Set.new end end
[ "def", "resolve_relative_path", "(", "paths", ",", "path", ",", "dirname", ",", "accept", ")", "filename", "=", "File", ".", "expand_path", "(", "path", ",", "dirname", ")", "load_path", ",", "_", "=", "PathUtils", ".", "paths_split", "(", "paths", ",", ...
Internal: Finds a relative file in a set of given paths paths - Array of Strings. path - String. A relative filename with or without extension e.g. "./jquery" or "../foo.js" dirname - String. Base path where we start looking for the given file. accept - String. A Quality value incoded set of mime types that we are looking for. Can be nil. e.g. "application/javascript" or "text/css, */*" Returns Array. Filename, type, path_pipeline, deps, index_alias
[ "Internal", ":", "Finds", "a", "relative", "file", "in", "a", "set", "of", "given", "paths" ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/resolve.rb#L120-L128
train
Resolve the relative path to a directory
[ 30522, 13366, 10663, 1035, 5816, 1035, 4130, 1006, 10425, 1010, 4130, 1010, 16101, 18442, 1010, 5138, 1007, 5371, 18442, 1027, 5371, 1012, 7818, 1035, 4130, 1006, 4130, 1010, 16101, 18442, 1007, 30524, 1035, 4130, 1010, 5371, 18442, 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...
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.send_shared_login_request
def send_shared_login_request(user, password) # Check if we have a cached/valid session # # Background: # December 4th 2017 Apple introduced a rate limit - which is of course fine by itself - # but unfortunately also rate limits successful logins. If you call multiple tools in a # lane (e.g. call match 5 times), this would lock you out of the account for a while. # By loading existing sessions and checking if they're valid, we're sending less login requests. # More context on why this change was necessary https://github.com/fastlane/fastlane/pull/11108 # # If there was a successful manual login before, we have a session on disk if load_session_from_file # Check if the session is still valid here begin # We use the olympus session to determine if the old session is still valid # As this will raise an exception if the old session has expired # If the old session is still valid, we don't have to do anything else in this method # that's why we return true return true if fetch_olympus_session rescue # If the `fetch_olympus_session` method raises an exception # we'll land here, and therefore continue doing a full login process # This happens if the session we loaded from the cache isn't valid any more # which is common, as the session automatically invalidates after x hours (we don't know x) # In this case we don't actually care about the exact exception, and why it was failing # because either way, we'll have to do a fresh login, where we do the actual error handling puts("Available session is not valid any more. Continuing with normal login.") end end # # The user can pass the session via environment variable (Mainly used in CI environments) if load_session_from_env # see above begin # see above return true if fetch_olympus_session rescue puts("Session loaded from environment variable is not valid. Continuing with normal login.") # see above end end # # After this point, we sure have no valid session any more and have to create a new one # data = { accountName: user, password: password, rememberMe: true } begin # The below workaround is only needed for 2 step verified machines # Due to escaping of cookie values we have a little workaround here # By default the cookie jar would generate the following header # DES5c148...=HSARM.......xaA/O69Ws/CHfQ==SRVT # However we need the following # DES5c148...="HSARM.......xaA/O69Ws/CHfQ==SRVT" # There is no way to get the cookie jar value with " around the value # so we manually modify the cookie (only this one) to be properly escaped # Afterwards we pass this value manually as a header # It's not enough to just modify @cookie, it needs to be done after self.cookie # as a string operation important_cookie = @cookie.store.entries.find { |a| a.name.include?("DES") } if important_cookie modified_cookie = self.cookie # returns a string of all cookies unescaped_important_cookie = "#{important_cookie.name}=#{important_cookie.value}" escaped_important_cookie = "#{important_cookie.name}=\"#{important_cookie.value}\"" modified_cookie.gsub!(unescaped_important_cookie, escaped_important_cookie) end response = request(:post) do |req| req.url("https://idmsa.apple.com/appleauth/auth/signin") req.body = data.to_json req.headers['Content-Type'] = 'application/json' req.headers['X-Requested-With'] = 'XMLHttpRequest' req.headers['X-Apple-Widget-Key'] = self.itc_service_key req.headers['Accept'] = 'application/json, text/javascript' req.headers["Cookie"] = modified_cookie if modified_cookie end rescue UnauthorizedAccessError raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username." end # Now we know if the login is successful or if we need to do 2 factor case response.status when 403 raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username." when 200 fetch_olympus_session return response when 409 # 2 step/factor is enabled for this account, first handle that handle_two_step_or_factor(response) # and then get the olympus session fetch_olympus_session return true else if (response.body || "").include?('invalid="true"') # User Credentials are wrong raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username." elsif response.status == 412 && AUTH_TYPES.include?(response.body["authType"]) # Need to acknowledge Apple ID and Privacy statement - https://github.com/fastlane/fastlane/issues/12577 # Looking for status of 412 might be enough but might be safer to keep looking only at what is being reported raise AppleIDAndPrivacyAcknowledgementNeeded.new, "Need to acknowledge to Apple's Apple ID and Privacy statement. Please manually log into https://appleid.apple.com (or https://appstoreconnect.apple.com) to acknowledge the statement." elsif (response['Set-Cookie'] || "").include?("itctx") raise "Looks like your Apple ID is not enabled for App Store Connect, make sure to be able to login online" else info = [response.body, response['Set-Cookie']] raise Tunes::Error.new, info.join("\n") end end end
ruby
def send_shared_login_request(user, password) # Check if we have a cached/valid session # # Background: # December 4th 2017 Apple introduced a rate limit - which is of course fine by itself - # but unfortunately also rate limits successful logins. If you call multiple tools in a # lane (e.g. call match 5 times), this would lock you out of the account for a while. # By loading existing sessions and checking if they're valid, we're sending less login requests. # More context on why this change was necessary https://github.com/fastlane/fastlane/pull/11108 # # If there was a successful manual login before, we have a session on disk if load_session_from_file # Check if the session is still valid here begin # We use the olympus session to determine if the old session is still valid # As this will raise an exception if the old session has expired # If the old session is still valid, we don't have to do anything else in this method # that's why we return true return true if fetch_olympus_session rescue # If the `fetch_olympus_session` method raises an exception # we'll land here, and therefore continue doing a full login process # This happens if the session we loaded from the cache isn't valid any more # which is common, as the session automatically invalidates after x hours (we don't know x) # In this case we don't actually care about the exact exception, and why it was failing # because either way, we'll have to do a fresh login, where we do the actual error handling puts("Available session is not valid any more. Continuing with normal login.") end end # # The user can pass the session via environment variable (Mainly used in CI environments) if load_session_from_env # see above begin # see above return true if fetch_olympus_session rescue puts("Session loaded from environment variable is not valid. Continuing with normal login.") # see above end end # # After this point, we sure have no valid session any more and have to create a new one # data = { accountName: user, password: password, rememberMe: true } begin # The below workaround is only needed for 2 step verified machines # Due to escaping of cookie values we have a little workaround here # By default the cookie jar would generate the following header # DES5c148...=HSARM.......xaA/O69Ws/CHfQ==SRVT # However we need the following # DES5c148...="HSARM.......xaA/O69Ws/CHfQ==SRVT" # There is no way to get the cookie jar value with " around the value # so we manually modify the cookie (only this one) to be properly escaped # Afterwards we pass this value manually as a header # It's not enough to just modify @cookie, it needs to be done after self.cookie # as a string operation important_cookie = @cookie.store.entries.find { |a| a.name.include?("DES") } if important_cookie modified_cookie = self.cookie # returns a string of all cookies unescaped_important_cookie = "#{important_cookie.name}=#{important_cookie.value}" escaped_important_cookie = "#{important_cookie.name}=\"#{important_cookie.value}\"" modified_cookie.gsub!(unescaped_important_cookie, escaped_important_cookie) end response = request(:post) do |req| req.url("https://idmsa.apple.com/appleauth/auth/signin") req.body = data.to_json req.headers['Content-Type'] = 'application/json' req.headers['X-Requested-With'] = 'XMLHttpRequest' req.headers['X-Apple-Widget-Key'] = self.itc_service_key req.headers['Accept'] = 'application/json, text/javascript' req.headers["Cookie"] = modified_cookie if modified_cookie end rescue UnauthorizedAccessError raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username." end # Now we know if the login is successful or if we need to do 2 factor case response.status when 403 raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username." when 200 fetch_olympus_session return response when 409 # 2 step/factor is enabled for this account, first handle that handle_two_step_or_factor(response) # and then get the olympus session fetch_olympus_session return true else if (response.body || "").include?('invalid="true"') # User Credentials are wrong raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username." elsif response.status == 412 && AUTH_TYPES.include?(response.body["authType"]) # Need to acknowledge Apple ID and Privacy statement - https://github.com/fastlane/fastlane/issues/12577 # Looking for status of 412 might be enough but might be safer to keep looking only at what is being reported raise AppleIDAndPrivacyAcknowledgementNeeded.new, "Need to acknowledge to Apple's Apple ID and Privacy statement. Please manually log into https://appleid.apple.com (or https://appstoreconnect.apple.com) to acknowledge the statement." elsif (response['Set-Cookie'] || "").include?("itctx") raise "Looks like your Apple ID is not enabled for App Store Connect, make sure to be able to login online" else info = [response.body, response['Set-Cookie']] raise Tunes::Error.new, info.join("\n") end end end
[ "def", "send_shared_login_request", "(", "user", ",", "password", ")", "# Check if we have a cached/valid session", "#", "# Background:", "# December 4th 2017 Apple introduced a rate limit - which is of course fine by itself -", "# but unfortunately also rate limits successful logins. If you c...
This method is used for both the Apple Dev Portal and App Store Connect This will also handle 2 step verification and 2 factor authentication It is called in `send_login_request` of sub classes (which the method `login`, above, transferred over to via `do_login`)
[ "This", "method", "is", "used", "for", "both", "the", "Apple", "Dev", "Portal", "and", "App", "Store", "Connect", "This", "will", "also", "handle", "2", "step", "verification", "and", "2", "factor", "authentication" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L400-L513
train
This method is used to send a shared login request to the server.
[ 30522, 13366, 4604, 1035, 4207, 1035, 8833, 2378, 1035, 30524, 2285, 4343, 2418, 6207, 3107, 1037, 3446, 5787, 1011, 2029, 2003, 1997, 2607, 2986, 2011, 2993, 1011, 1001, 2021, 6854, 2036, 3446, 6537, 3144, 8833, 7076, 1012, 2065, 2017, 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-10-01/generated/azure_mgmt_network/connection_monitors.rb
Azure::Network::Mgmt::V2018_10_01.ConnectionMonitors.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "network_watcher_name", ",", "connection_monitor_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "network_watcher_...
Create or update a connection monitor. @param resource_group_name [String] The name of the resource group containing Network Watcher. @param network_watcher_name [String] The name of the Network Watcher resource. @param connection_monitor_name [String] The name of the connection monitor. @param parameters [ConnectionMonitor] Parameters that define the operation to create a connection monitor. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Create", "or", "update", "a", "connection", "monitor", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb#L493-L495
train
Creates or updates a connection monitor.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 3422, 2121, 1035, 2171, 1010, 4434, 1035, 8080, 1035, 2171, 1010, 11709, 1010, 7661, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ruby-protobuf/protobuf
lib/protobuf/enum.rb
Protobuf.Enum.try
def try(*args, &block) case when args.empty? && block_given? yield self when respond_to?(args.first) __send__(*args, &block) else @tag.try(*args, &block) end end
ruby
def try(*args, &block) case when args.empty? && block_given? yield self when respond_to?(args.first) __send__(*args, &block) else @tag.try(*args, &block) end end
[ "def", "try", "(", "*", "args", ",", "&", "block", ")", "case", "when", "args", ".", "empty?", "&&", "block_given?", "yield", "self", "when", "respond_to?", "(", "args", ".", "first", ")", "__send__", "(", "args", ",", "block", ")", "else", "@tag", "...
Re-implement `try` in order to fix the problem where the underlying fixnum doesn't respond to all methods (e.g. name or tag). If we respond to the first argument, `__send__` the args. Otherwise, delegate the `try` call to the underlying vlaue fixnum.
[ "Re", "-", "implement", "try", "in", "order", "to", "fix", "the", "problem", "where", "the", "underlying", "fixnum", "doesn", "t", "respond", "to", "all", "methods", "(", "e", ".", "g", ".", "name", "or", "tag", ")", ".", "If", "we", "respond", "to",...
a2e0cbb783d49d37648c07d795dc4f7eb8d14eb1
https://github.com/ruby-protobuf/protobuf/blob/a2e0cbb783d49d37648c07d795dc4f7eb8d14eb1/lib/protobuf/enum.rb#L345-L354
train
Try to find a tag in the current object.
[ 30522, 13366, 3046, 1006, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2553, 2043, 12098, 5620, 1012, 4064, 1029, 1004, 1004, 3796, 1035, 2445, 1029, 10750, 2969, 2043, 6869, 1035, 2000, 1029, 1006, 12098, 5620, 1012, 2034, 1007, 1035, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb
Azure::SQL::Mgmt::V2015_05_01_preview.SyncAgents.list_linked_databases
def list_linked_databases(resource_group_name, server_name, sync_agent_name, custom_headers:nil) first_page = list_linked_databases_as_lazy(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_linked_databases(resource_group_name, server_name, sync_agent_name, custom_headers:nil) first_page = list_linked_databases_as_lazy(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_linked_databases", "(", "resource_group_name", ",", "server_name", ",", "sync_agent_name", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_linked_databases_as_lazy", "(", "resource_group_name", ",", "server_name", ",", "sync_agent_name", ",",...
Lists databases linked to a sync agent. @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 on which the sync agent is hosted. @param sync_agent_name [String] The name of the sync agent. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<SyncAgentLinkedDatabase>] operation results.
[ "Lists", "databases", "linked", "to", "a", "sync", "agent", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb#L450-L453
train
Gets all the linked databases in a sync agent.
[ 30522, 13366, 2862, 1035, 5799, 1035, 17881, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 26351, 1035, 4005, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, 2862, 1035, 5799, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-06-01/generated/azure_mgmt_compute/gallery_images.rb
Azure::Compute::Mgmt::V2018_06_01.GalleryImages.list_by_gallery_next
def list_by_gallery_next(next_page_link, custom_headers:nil) response = list_by_gallery_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_gallery_next(next_page_link, custom_headers:nil) response = list_by_gallery_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_gallery_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_gallery_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "respon...
List gallery Image Definitions in a gallery. @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 [GalleryImageList] operation results.
[ "List", "gallery", "Image", "Definitions", "in", "a", "gallery", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-06-01/generated/azure_mgmt_compute/gallery_images.rb#L564-L567
train
Gets the list of a single product of a given gallery.
[ 30522, 13366, 2862, 1035, 2011, 1035, 3916, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 3916, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb
Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_analyses_slot_as_lazy
def list_site_analyses_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) response = list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_site_analyses_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) response = list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_site_analyses_slot_as_lazy", "(", "resource_group_name", ",", "site_name", ",", "diagnostic_category", ",", "slot", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_site_analyses_slot_async", "(", "resource_group_name", ",", "site_name", ",", ...
Get Site Analyses Get Site Analyses @param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [DiagnosticAnalysisCollection] which provide lazy access to pages of the response.
[ "Get", "Site", "Analyses" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L3778-L3787
train
Gets all the analyses for a site.
[ 30522, 13366, 2862, 1035, 2609, 1035, 16478, 1035, 10453, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2609, 1035, 2171, 1010, 16474, 1035, 4696, 1010, 10453, 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...
aws/aws-sdk-ruby
gems/aws-sdk-sqs/lib/aws-sdk-sqs/queue.rb
Aws::SQS.Queue.delete_messages
def delete_messages(options = {}) options = options.merge(queue_url: @url) resp = @client.delete_message_batch(options) resp.data end
ruby
def delete_messages(options = {}) options = options.merge(queue_url: @url) resp = @client.delete_message_batch(options) resp.data end
[ "def", "delete_messages", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "queue_url", ":", "@url", ")", "resp", "=", "@client", ".", "delete_message_batch", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values queue.delete_messages({ entries: [ # required { id: "String", # required receipt_handle: "String", # required }, ], }) @param [Hash] options ({}) @option options [required, Array<Types::DeleteMessageBatchRequestEntry>] :entries A list of receipt handles for the messages to be deleted. @return [Types::DeleteMessageBatchResult]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sqs/lib/aws-sdk-sqs/queue.rb#L174-L178
train
Delete all messages in the queue
[ 30522, 13366, 3972, 12870, 1035, 7696, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 24240, 1035, 24471, 2140, 1024, 1030, 24471, 2140, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3972, 12870, 1035, 4471, 1035, 141...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tongueroo/jets
lib/jets/resource/lambda/function.rb
Jets::Resource::Lambda.Function.lookup_class_properties
def lookup_class_properties(klass) all_classes = [] while klass != Object all_classes << klass klass = klass.superclass end class_properties = {} # Go back down class heirachry top to down all_classes.reverse.each do |k| class_properties.merge!(k.class_properties) end class_properties end
ruby
def lookup_class_properties(klass) all_classes = [] while klass != Object all_classes << klass klass = klass.superclass end class_properties = {} # Go back down class heirachry top to down all_classes.reverse.each do |k| class_properties.merge!(k.class_properties) end class_properties end
[ "def", "lookup_class_properties", "(", "klass", ")", "all_classes", "=", "[", "]", "while", "klass", "!=", "Object", "all_classes", "<<", "klass", "klass", "=", "klass", ".", "superclass", "end", "class_properties", "=", "{", "}", "# Go back down class heirachry t...
Accounts for inherited class_properties
[ "Accounts", "for", "inherited", "class_properties" ]
46943a519224067e58aa3e2d5656e3ca083150f9
https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/resource/lambda/function.rb#L85-L97
train
Returns the class properties for the given class.
[ 30522, 13366, 2298, 6279, 1035, 2465, 1035, 5144, 1006, 1047, 27102, 1007, 2035, 1035, 4280, 1027, 1031, 1033, 2096, 1047, 27102, 999, 1027, 4874, 2035, 1035, 4280, 1026, 1026, 1047, 27102, 1047, 27102, 1027, 1047, 27102, 1012, 3565, 26266,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ruby-git/ruby-git
lib/git/lib.rb
Git.Lib.show
def show(objectish=nil, path=nil) arr_opts = [] arr_opts << (path ? "#{objectish}:#{path}" : objectish) command('show', arr_opts.compact) end
ruby
def show(objectish=nil, path=nil) arr_opts = [] arr_opts << (path ? "#{objectish}:#{path}" : objectish) command('show', arr_opts.compact) end
[ "def", "show", "(", "objectish", "=", "nil", ",", "path", "=", "nil", ")", "arr_opts", "=", "[", "]", "arr_opts", "<<", "(", "path", "?", "\"#{objectish}:#{path}\"", ":", "objectish", ")", "command", "(", "'show'", ",", "arr_opts", ".", "compact", ")", ...
Shows objects @param [String|NilClass] objectish the target object reference (nil == HEAD) @param [String|NilClass] path the path of the file to be shown @return [String] the object information
[ "Shows", "objects" ]
9bd4407c56068e1604f14a1b6c0c5a84868e6378
https://github.com/ruby-git/ruby-git/blob/9bd4407c56068e1604f14a1b6c0c5a84868e6378/lib/git/lib.rb#L493-L499
train
Show the object of the object
[ 30522, 30524, 9152, 2140, 1007, 12098, 2099, 1035, 23569, 2015, 1027, 1031, 1033, 12098, 2099, 1035, 23569, 2015, 1026, 1026, 1006, 4130, 1029, 1000, 1001, 1063, 4874, 4509, 1065, 1024, 1001, 1063, 4130, 1065, 1000, 1024, 4874, 4509, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb
Azure::Compute::Mgmt::V2018_04_01.VirtualMachineExtensions.begin_delete_with_http_info
def begin_delete_with_http_info(resource_group_name, vm_name, vm_extension_name, custom_headers:nil) begin_delete_async(resource_group_name, vm_name, vm_extension_name, custom_headers:custom_headers).value! end
ruby
def begin_delete_with_http_info(resource_group_name, vm_name, vm_extension_name, custom_headers:nil) begin_delete_async(resource_group_name, vm_name, vm_extension_name, custom_headers:custom_headers).value! end
[ "def", "begin_delete_with_http_info", "(", "resource_group_name", ",", "vm_name", ",", "vm_extension_name", ",", "custom_headers", ":", "nil", ")", "begin_delete_async", "(", "resource_group_name", ",", "vm_name", ",", "vm_extension_name", ",", "custom_headers", ":custom_...
The operation to delete the extension. @param resource_group_name [String] The name of the resource group. @param vm_name [String] The name of the virtual machine where the extension should be deleted. @param vm_extension_name [String] The name of the virtual machine extension. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "The", "operation", "to", "delete", "the", "extension", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb#L630-L632
train
Deletes the specified extension from the virtual machine.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 2171, 1010, 1058, 2213, 1035, 5331, 1035, 2171, 1010, 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...
rails/rails
activerecord/lib/active_record/autosave_association.rb
ActiveRecord.AutosaveAssociation.nested_records_changed_for_autosave?
def nested_records_changed_for_autosave? @_nested_records_changed_for_autosave_already_called ||= false return false if @_nested_records_changed_for_autosave_already_called begin @_nested_records_changed_for_autosave_already_called = true self.class._reflections.values.any? do |reflection| if reflection.options[:autosave] association = association_instance_get(reflection.name) association && Array.wrap(association.target).any?(&:changed_for_autosave?) end end ensure @_nested_records_changed_for_autosave_already_called = false end end
ruby
def nested_records_changed_for_autosave? @_nested_records_changed_for_autosave_already_called ||= false return false if @_nested_records_changed_for_autosave_already_called begin @_nested_records_changed_for_autosave_already_called = true self.class._reflections.values.any? do |reflection| if reflection.options[:autosave] association = association_instance_get(reflection.name) association && Array.wrap(association.target).any?(&:changed_for_autosave?) end end ensure @_nested_records_changed_for_autosave_already_called = false end end
[ "def", "nested_records_changed_for_autosave?", "@_nested_records_changed_for_autosave_already_called", "||=", "false", "return", "false", "if", "@_nested_records_changed_for_autosave_already_called", "begin", "@_nested_records_changed_for_autosave_already_called", "=", "true", "self", "....
go through nested autosave associations that are loaded in memory (without loading any new ones), and return true if is changed for autosave
[ "go", "through", "nested", "autosave", "associations", "that", "are", "loaded", "in", "memory", "(", "without", "loading", "any", "new", "ones", ")", "and", "return", "true", "if", "is", "changed", "for", "autosave" ]
85a8bc644be69908f05740a5886ec19cd3679df5
https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/autosave_association.rb#L286-L300
train
Returns true if any nested records have changed for autosave
[ 30522, 13366, 9089, 2098, 1035, 2636, 1035, 2904, 1035, 2005, 1035, 8285, 3736, 3726, 1029, 1030, 1035, 9089, 2098, 1035, 2636, 1035, 2904, 1035, 2005, 1035, 8285, 3736, 3726, 1035, 2525, 1035, 2170, 1064, 1064, 1027, 6270, 2709, 6270, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_reservations/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb
Azure::Reservations::Mgmt::V2018_06_01_preview.ReservationsManagementClient.get_catalog
def get_catalog(subscription_id, reserved_resource_type, location:nil, custom_headers:nil) response = get_catalog_async(subscription_id, reserved_resource_type, location:location, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_catalog(subscription_id, reserved_resource_type, location:nil, custom_headers:nil) response = get_catalog_async(subscription_id, reserved_resource_type, location:location, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_catalog", "(", "subscription_id", ",", "reserved_resource_type", ",", "location", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "get_catalog_async", "(", "subscription_id", ",", "reserved_resource_type", ",", "location", ":", "loca...
Get the regions and skus that are available for RI purchase for the specified Azure subscription. @param subscription_id [String] Id of the subscription @param reserved_resource_type [String] The type of the resource for which the skus should be provided. @param location [String] Filters the skus based on the location specified in this parameter. This can be an azure region or global @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.
[ "Get", "the", "regions", "and", "skus", "that", "are", "available", "for", "RI", "purchase", "for", "the", "specified", "Azure", "subscription", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_reservations/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb#L139-L142
train
Gets the catalog for a resource.
[ 30522, 13366, 2131, 1035, 12105, 1006, 15002, 1035, 8909, 1010, 9235, 1035, 7692, 1035, 2828, 1010, 3295, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2131, 1035, 12105, 1035, 2004, 6038, 2278, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/plugin_manager.rb
Jekyll.PluginManager.require_gems
def require_gems Jekyll::External.require_with_graceful_fail( site.gems.select { |plugin| plugin_allowed?(plugin) } ) end
ruby
def require_gems Jekyll::External.require_with_graceful_fail( site.gems.select { |plugin| plugin_allowed?(plugin) } ) end
[ "def", "require_gems", "Jekyll", "::", "External", ".", "require_with_graceful_fail", "(", "site", ".", "gems", ".", "select", "{", "|", "plugin", "|", "plugin_allowed?", "(", "plugin", ")", "}", ")", "end" ]
Require each of the gem plugins specified. Returns nothing.
[ "Require", "each", "of", "the", "gem", "plugins", "specified", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/plugin_manager.rb#L29-L33
train
Require all the Gem files
[ 30522, 13366, 5478, 1035, 20296, 15333, 4801, 3363, 1024, 1024, 6327, 1012, 5478, 1035, 2007, 1035, 19415, 1035, 8246, 1006, 2609, 1012, 20296, 1012, 7276, 1063, 1064, 13354, 2378, 1064, 13354, 2378, 1035, 3039, 1029, 1006, 13354, 2378, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb
Aws::RDS.Resource.event_category_maps
def event_category_maps(options = {}) batches = Enumerator.new do |y| batch = [] resp = @client.describe_event_categories(options) resp.data.event_categories_map_list.each do |e| batch << EventCategoryMap.new( source_type: e.source_type, data: e, client: @client ) end y.yield(batch) end EventCategoryMap::Collection.new(batches) end
ruby
def event_category_maps(options = {}) batches = Enumerator.new do |y| batch = [] resp = @client.describe_event_categories(options) resp.data.event_categories_map_list.each do |e| batch << EventCategoryMap.new( source_type: e.source_type, data: e, client: @client ) end y.yield(batch) end EventCategoryMap::Collection.new(batches) end
[ "def", "event_category_maps", "(", "options", "=", "{", "}", ")", "batches", "=", "Enumerator", ".", "new", "do", "|", "y", "|", "batch", "=", "[", "]", "resp", "=", "@client", ".", "describe_event_categories", "(", "options", ")", "resp", ".", "data", ...
@example Request syntax with placeholder values event_category_maps = rds.event_category_maps({ source_type: "String", filters: [ { name: "String", # required values: ["String"], # required }, ], }) @param [Hash] options ({}) @option options [String] :source_type The type of source that is generating the events. Valid values: db-instance \| db-parameter-group \| db-security-group \| db-snapshot @option options [Array<Types::Filter>] :filters This parameter is not currently supported. @return [EventCategoryMap::Collection]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb#L2179-L2193
train
Returns an Enumerator of all event category maps
[ 30522, 13366, 2724, 1035, 4696, 1035, 7341, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 2229, 1027, 4372, 17897, 16259, 1012, 2047, 2079, 1064, 1061, 1064, 14108, 1027, 1031, 1033, 24501, 2361, 1027, 1030, 7396, 1012, 6235, 1035, 2724, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb
Azure::MediaServices::Mgmt::V2018_07_01.StreamingEndpoints.start
def start(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! nil end
ruby
def start(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! nil end
[ "def", "start", "(", "resource_group_name", ",", "account_name", ",", "streaming_endpoint_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "start_async", "(", "resource_group_name", ",", "account_name", ",", "streaming_endpoint_name", ",", "custom_headers...
Start StreamingEndpoint Starts an existing StreamingEndpoint. @param resource_group_name [String] The name of the resource group within the Azure subscription. @param account_name [String] The Media Services account name. @param streaming_endpoint_name [String] The name of the StreamingEndpoint. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Start", "StreamingEndpoint" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb#L397-L400
train
Starts a streaming endpoint.
[ 30522, 13366, 2707, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 11058, 1035, 2203, 8400, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2707, 1035, 2004, 6038, 2278, 1006, 7692, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb
Azure::CDN::Mgmt::V2017_04_02.Origins.list_by_endpoint_next
def list_by_endpoint_next(next_page_link, custom_headers:nil) response = list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_endpoint_next(next_page_link, custom_headers:nil) response = list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_endpoint_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_endpoint_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "resp...
Lists all of the existing origins within an endpoint. @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 [OriginListResult] operation results.
[ "Lists", "all", "of", "the", "existing", "origins", "within", "an", "endpoint", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb#L451-L454
train
Gets the list of all the available service endpoints.
[ 30522, 13366, 2862, 1035, 2011, 1035, 2203, 30524, 1035, 2279, 1035, 2004, 6038, 2278, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 7661, 1035, 20346, 2015, 1007, 1012, 3643, 999, 3433, 1012, 2303, 4983, 3433, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb
Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_get_next_hop
def begin_get_next_hop(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_get_next_hop(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_get_next_hop", "(", "resource_group_name", ",", "network_watcher_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_get_next_hop_async", "(", "resource_group_name", ",", "network_watcher_name", ",", "parameters", ",", ...
Gets the next hop from 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 [NextHopParameters] Parameters that define the source and destination endpoint. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [NextHopResult] operation results.
[ "Gets", "the", "next", "hop", "from", "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#L1402-L1405
train
Gets the next hop for a specified resource group.
[ 30522, 13366, 4088, 1035, 2131, 1035, 2279, 1035, 6154, 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, 2131, 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...
CocoaPods/Xcodeproj
lib/xcodeproj/workspace.rb
Xcodeproj.Workspace.load_schemes_from_project
def load_schemes_from_project(project_full_path) schemes = Xcodeproj::Project.schemes project_full_path schemes.each do |scheme_name| @schemes[scheme_name] = project_full_path end end
ruby
def load_schemes_from_project(project_full_path) schemes = Xcodeproj::Project.schemes project_full_path schemes.each do |scheme_name| @schemes[scheme_name] = project_full_path end end
[ "def", "load_schemes_from_project", "(", "project_full_path", ")", "schemes", "=", "Xcodeproj", "::", "Project", ".", "schemes", "project_full_path", "schemes", ".", "each", "do", "|", "scheme_name", "|", "@schemes", "[", "scheme_name", "]", "=", "project_full_path"...
Load all schemes from project @param [String] project_full_path project full path @return [void]
[ "Load", "all", "schemes", "from", "project" ]
3be1684437a6f8e69c7836ad4c85a2b78663272f
https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/workspace.rb#L224-L229
train
Loads the schemes from the project
[ 30522, 13366, 7170, 1035, 11683, 1035, 2013, 1035, 2622, 1006, 2622, 1035, 2440, 1035, 4130, 1007, 11683, 1027, 1060, 16044, 21572, 3501, 1024, 1024, 2622, 1012, 11683, 2622, 1035, 2440, 1035, 4130, 11683, 1012, 2169, 2079, 1064, 5679, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_cdn/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb
Azure::CDN::Mgmt::V2016_10_02.Profiles.begin_create
def begin_create(resource_group_name, profile_name, profile, custom_headers:nil) response = begin_create_async(resource_group_name, profile_name, profile, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_create(resource_group_name, profile_name, profile, custom_headers:nil) response = begin_create_async(resource_group_name, profile_name, profile, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_create", "(", "resource_group_name", ",", "profile_name", ",", "profile", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_create_async", "(", "resource_group_name", ",", "profile_name", ",", "profile", ",", "custom_headers", ":custom_head...
Creates a new CDN profile with a profile name under the specified subscription and resource group. @param resource_group_name [String] Name of the Resource group within the Azure subscription. @param profile_name [String] Name of the CDN profile which is unique within the resource group. @param profile [Profile] Profile properties needed to create a new profile. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Profile] operation results.
[ "Creates", "a", "new", "CDN", "profile", "with", "a", "profile", "name", "under", "the", "specified", "subscription", "and", "resource", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb#L784-L787
train
Creates a new Advisor.
[ 30522, 13366, 4088, 1035, 3443, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 6337, 1035, 2171, 1010, 6337, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3443, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 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...
square/connect-ruby-sdk
lib/square_connect/api/v1_employees_api.rb
SquareConnect.V1EmployeesApi.retrieve_employee
def retrieve_employee(employee_id, opts = {}) data, _status_code, _headers = retrieve_employee_with_http_info(employee_id, opts) return data end
ruby
def retrieve_employee(employee_id, opts = {}) data, _status_code, _headers = retrieve_employee_with_http_info(employee_id, opts) return data end
[ "def", "retrieve_employee", "(", "employee_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_employee_with_http_info", "(", "employee_id", ",", "opts", ")", "return", "data", "end" ]
RetrieveEmployee Provides the details for a single employee. @param employee_id The employee&#39;s ID. @param [Hash] opts the optional parameters @return [V1Employee]
[ "RetrieveEmployee", "Provides", "the", "details", "for", "a", "single", "employee", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L660-L663
train
Retrieve a specific employee
[ 30522, 13366, 12850, 1035, 7904, 1006, 7904, 1035, 8909, 1010, 23569, 2015, 1027, 30524, 7904, 1035, 8909, 1010, 23569, 2015, 1007, 2709, 2951, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_reservations/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb
Azure::Reservations::Mgmt::V2017_11_01.Reservation.split_async
def split_async(reservation_order_id, body, custom_headers:nil) # Send request promise = begin_split_async(reservation_order_id, body, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'ReservationResponseElementType', type: { name: 'Composite', class_name: 'ReservationResponse' } } } } 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 split_async(reservation_order_id, body, custom_headers:nil) # Send request promise = begin_split_async(reservation_order_id, body, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'ReservationResponseElementType', type: { name: 'Composite', class_name: 'ReservationResponse' } } } } 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", "split_async", "(", "reservation_order_id", ",", "body", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_split_async", "(", "reservation_order_id", ",", "body", ",", "custom_headers", ":custom_headers", ")", "promise", "=", "p...
@param reservation_order_id [String] Order Id of the reservation @param body [SplitRequest] Information needed to Split a reservation item @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", "reservation_order_id", "[", "String", "]", "Order", "Id", "of", "the", "reservation" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_reservations/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb#L54-L86
train
Splits the reservation order in multiple orders.
[ 30522, 13366, 3975, 1035, 2004, 6038, 2278, 1006, 11079, 1035, 2344, 1035, 8909, 1010, 2303, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, 1035, 3975, 1035, 2004, 6038, 2278, 1006, 11079, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb
Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.list_event_hub_consumer_groups_with_http_info
def list_event_hub_consumer_groups_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:nil) list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:custom_headers).value! end
ruby
def list_event_hub_consumer_groups_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:nil) list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:custom_headers).value! end
[ "def", "list_event_hub_consumer_groups_with_http_info", "(", "resource_group_name", ",", "resource_name", ",", "event_hub_endpoint_name", ",", "custom_headers", ":", "nil", ")", "list_event_hub_consumer_groups_async", "(", "resource_group_name", ",", "resource_name", ",", "even...
Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. @param resource_group_name [String] The name of the resource group that contains the IoT hub. @param resource_name [String] The name of the IoT hub. @param event_hub_endpoint_name [String] The name of the Event Hub-compatible 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.
[ "Get", "a", "list", "of", "the", "consumer", "groups", "in", "the", "Event", "Hub", "-", "compatible", "device", "-", "to", "-", "cloud", "endpoint", "in", "an", "IoT", "hub", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L658-L660
train
Gets the consumer groups associated with an event hub endpoint.
[ 30522, 13366, 2862, 1035, 2724, 1035, 9594, 1035, 7325, 1035, 2967, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 2724, 1035, 9594, 1035, 2203, 8400, 1035, 2171, 1010, 7661, 1035, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
troessner/reek
lib/reek/smell_configuration.rb
Reek.Overrides.for_context
def for_context(context) contexts = hash.keys.select { |ckey| context.matches?([ckey]) } contexts.map { |exc| hash[exc] } end
ruby
def for_context(context) contexts = hash.keys.select { |ckey| context.matches?([ckey]) } contexts.map { |exc| hash[exc] } end
[ "def", "for_context", "(", "context", ")", "contexts", "=", "hash", ".", "keys", ".", "select", "{", "|", "ckey", "|", "context", ".", "matches?", "(", "[", "ckey", "]", ")", "}", "contexts", ".", "map", "{", "|", "exc", "|", "hash", "[", "exc", ...
Find any overrides that match the supplied context
[ "Find", "any", "overrides", "that", "match", "the", "supplied", "context" ]
8c6b5c0c6228a6981ab48543457889f9ea984054
https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/smell_configuration.rb#L56-L59
train
Returns the array of terms that match the given context.
[ 30522, 13366, 2005, 1035, 6123, 1006, 6123, 1007, 18046, 1027, 23325, 1012, 6309, 1012, 7276, 1063, 1064, 23616, 3240, 1064, 6123, 1012, 3503, 1029, 1006, 1031, 23616, 3240, 1033, 1007, 1065, 18046, 1012, 4949, 1063, 1064, 4654, 2278, 1064,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
puppetlabs/bolt
lib/bolt/executor.rb
Bolt.Executor.transport
def transport(transport) impl = @transports[transport || 'ssh'] raise(Bolt::UnknownTransportError, transport) unless impl # If there was an error creating the transport, ensure it gets thrown impl.no_error! impl.value end
ruby
def transport(transport) impl = @transports[transport || 'ssh'] raise(Bolt::UnknownTransportError, transport) unless impl # If there was an error creating the transport, ensure it gets thrown impl.no_error! impl.value end
[ "def", "transport", "(", "transport", ")", "impl", "=", "@transports", "[", "transport", "||", "'ssh'", "]", "raise", "(", "Bolt", "::", "UnknownTransportError", ",", "transport", ")", "unless", "impl", "# If there was an error creating the transport, ensure it gets thr...
FIXME: There must be a better way https://makandracards.com/makandra/36011-ruby-do-not-mix-optional-and-keyword-arguments
[ "FIXME", ":", "There", "must", "be", "a", "better", "way", "https", ":", "//", "makandracards", ".", "com", "/", "makandra", "/", "36011", "-", "ruby", "-", "do", "-", "not", "-", "mix", "-", "optional", "-", "and", "-", "keyword", "-", "arguments" ]
50689a33699939d262ea7c822a4b24fd8c4f8d8a
https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/bolt/executor.rb#L56-L62
train
Creates a new connection to the specified transport.
[ 30522, 13366, 3665, 1006, 3665, 1007, 17727, 2140, 1027, 1030, 19003, 1031, 3665, 1064, 1064, 1005, 7020, 2232, 1005, 1033, 5333, 1006, 10053, 1024, 1024, 4242, 6494, 3619, 6442, 2121, 29165, 1010, 3665, 1007, 4983, 17727, 2140, 1001, 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...
watir/watir
lib/watir/wait.rb
Watir.Waitable.wait_until
def wait_until(depr_timeout = nil, depr_message = nil, timeout: nil, message: nil, interval: nil, **opt, &blk) if depr_message || depr_timeout Watir.logger.deprecate 'Using arguments for #wait_until', 'keywords', ids: [:timeout_arguments] timeout = depr_timeout message = depr_message end message ||= proc { |obj| "waiting for true condition on #{obj.inspect}" } # TODO: Consider throwing argument error for mixing block & options proc = create_proc(opt, &blk) Wait.until(timeout: timeout, message: message, interval: interval, object: self, &proc) self end
ruby
def wait_until(depr_timeout = nil, depr_message = nil, timeout: nil, message: nil, interval: nil, **opt, &blk) if depr_message || depr_timeout Watir.logger.deprecate 'Using arguments for #wait_until', 'keywords', ids: [:timeout_arguments] timeout = depr_timeout message = depr_message end message ||= proc { |obj| "waiting for true condition on #{obj.inspect}" } # TODO: Consider throwing argument error for mixing block & options proc = create_proc(opt, &blk) Wait.until(timeout: timeout, message: message, interval: interval, object: self, &proc) self end
[ "def", "wait_until", "(", "depr_timeout", "=", "nil", ",", "depr_message", "=", "nil", ",", "timeout", ":", "nil", ",", "message", ":", "nil", ",", "interval", ":", "nil", ",", "**", "opt", ",", "&", "blk", ")", "if", "depr_message", "||", "depr_timeou...
Waits until the condition is true. @example browser.wait_until(timeout: 2) do |browser| browser.windows.size == 1 end @example browser.text_field(name: "new_user_first_name").wait_until(&:present?).click browser.text_field(name: "new_user_first_name").wait_until(message: 'foo') { |field| field.present? } browser.text_field(name: "new_user_first_name").wait_until(timeout: 60, &:present?) browser.text_field(name: "new_user_first_name").wait_until(timeout: 60, name: 'new_user_first_name') @param [Integer] timeout seconds to wait before timing out @param [String] message error message for when times out
[ "Waits", "until", "the", "condition", "is", "true", "." ]
2d8db09811c6221ae401b85b2f61f5fa66e463a3
https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/wait.rb#L114-L128
train
Wait until the object is true.
[ 30522, 13366, 3524, 1035, 2127, 1006, 2139, 18098, 1035, 2051, 5833, 1027, 9152, 2140, 1010, 2139, 18098, 1035, 4471, 1027, 9152, 2140, 1010, 2051, 5833, 1024, 9152, 2140, 1010, 4471, 1024, 9152, 2140, 1010, 13483, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb
Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Webhooks.create
def create(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers:nil) response = create_async(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers:nil) response = create_async(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create", "(", "resource_group_name", ",", "registry_name", ",", "webhook_name", ",", "webhook_create_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_async", "(", "resource_group_name", ",", "registry_name", ",", "webhook_name", ",...
Creates a webhook for 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 webhook_name [String] The name of the webhook. @param webhook_create_parameters [WebhookCreateParameters] The parameters for creating a webhook. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Webhook] operation results.
[ "Creates", "a", "webhook", "for", "a", "container", "registry", "with", "the", "specified", "parameters", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb#L143-L146
train
Creates a webhook in a container registry.
[ 30522, 13366, 3443, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 4773, 6806, 6559, 1035, 2171, 1010, 4773, 6806, 6559, 1035, 3443, 1035, 11709, 30524, 1035, 20346, 2015, 1007, 1012, 3643, 999, 3433, 1012, 2303, 4983, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/configuration.rb
Jekyll.Configuration.read_config_file
def read_config_file(file) file = File.expand_path(file) next_config = safe_load_file(file) check_config_is_hash!(next_config, file) Jekyll.logger.info "Configuration file:", file next_config rescue SystemCallError if @default_config_file ||= nil Jekyll.logger.warn "Configuration file:", "none" {} else Jekyll.logger.error "Fatal:", "The configuration file '#{file}' could not be found." raise LoadError, "The Configuration file '#{file}' could not be found." end end
ruby
def read_config_file(file) file = File.expand_path(file) next_config = safe_load_file(file) check_config_is_hash!(next_config, file) Jekyll.logger.info "Configuration file:", file next_config rescue SystemCallError if @default_config_file ||= nil Jekyll.logger.warn "Configuration file:", "none" {} else Jekyll.logger.error "Fatal:", "The configuration file '#{file}' could not be found." raise LoadError, "The Configuration file '#{file}' could not be found." end end
[ "def", "read_config_file", "(", "file", ")", "file", "=", "File", ".", "expand_path", "(", "file", ")", "next_config", "=", "safe_load_file", "(", "file", ")", "check_config_is_hash!", "(", "next_config", ",", "file", ")", "Jekyll", ".", "logger", ".", "info...
Public: Read configuration and return merged Hash file - the path to the YAML file to be read in Returns this configuration, overridden by the values in the file
[ "Public", ":", "Read", "configuration", "and", "return", "merged", "Hash" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/configuration.rb#L169-L184
train
Reads the configuration file and returns the array of the array of the array of the array of the array of the array of the array of the array of the array of arrays.
[ 30522, 13366, 3191, 1035, 9530, 8873, 2290, 1035, 5371, 1006, 5371, 1007, 5371, 1027, 5371, 1012, 7818, 1035, 4130, 1006, 5371, 1007, 2279, 1035, 9530, 8873, 2290, 1027, 3647, 1035, 7170, 1035, 5371, 1006, 5371, 1007, 4638, 1035, 9530, 88...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_composite_entities_with_http_info
def list_composite_entities_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil) list_composite_entities_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value! end
ruby
def list_composite_entities_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil) list_composite_entities_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value! end
[ "def", "list_composite_entities_with_http_info", "(", "app_id", ",", "version_id", ",", "skip", ":", "0", ",", "take", ":", "100", ",", "custom_headers", ":", "nil", ")", "list_composite_entities_async", "(", "app_id", ",", "version_id", ",", "skip", ":", "skip"...
Gets information about all the composite 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", "composite", "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#L871-L873
train
Gets the composite entities of the application.
[ 30522, 13366, 2862, 1035, 12490, 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...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.update
def update(resource_group_name, service_name, sid, parameters, if_match, notify:nil, custom_headers:nil) response = update_async(resource_group_name, service_name, sid, parameters, if_match, notify:notify, custom_headers:custom_headers).value! nil end
ruby
def update(resource_group_name, service_name, sid, parameters, if_match, notify:nil, custom_headers:nil) response = update_async(resource_group_name, service_name, sid, parameters, if_match, notify:notify, custom_headers:custom_headers).value! nil end
[ "def", "update", "(", "resource_group_name", ",", "service_name", ",", "sid", ",", "parameters", ",", "if_match", ",", "notify", ":", "nil", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_async", "(", "resource_group_name", ",", "service_name",...
Updates the details of a subscription specified by its identifier. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param sid [String] Subscription entity Identifier. The entity represents the association between a user and a product in API Management. @param parameters [SubscriptionUpdateParameters] Update parameters. @param if_match [String] ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @param 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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Updates", "the", "details", "of", "a", "subscription", "specified", "by", "its", "identifier", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb#L538-L541
train
Updates a service s index.
[ 30522, 13366, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 15765, 1010, 11709, 1010, 2065, 1035, 2674, 1010, 2025, 8757, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_update_with_http_info
def begin_update_with_http_info(resource_group_name, resource_name, parameters:nil, custom_headers:nil) begin_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! end
ruby
def begin_update_with_http_info(resource_group_name, resource_name, parameters:nil, custom_headers:nil) begin_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! end
[ "def", "begin_update_with_http_info", "(", "resource_group_name", ",", "resource_name", ",", "parameters", ":", "nil", ",", "custom_headers", ":", "nil", ")", "begin_update_async", "(", "resource_group_name", ",", "resource_name", ",", "parameters", ":", "parameters", ...
Operation to 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 [SignalRUpdateParameters] Parameters for the 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.
[ "Operation", "to", "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#L1037-L1039
train
Updates a resource group s index.
[ 30522, 13366, 4088, 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, 30524, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
grpc/grpc
src/ruby/lib/grpc/generic/active_call.rb
GRPC.ActiveCall.bidi_streamer
def bidi_streamer(requests, metadata: {}, &blk) raise_error_if_already_executed # Metadata might have already been sent if this is an operation view begin send_initial_metadata(metadata) rescue GRPC::Core::CallError => e batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil) set_input_stream_done set_output_stream_done attach_status_results_and_complete_call(batch_result) raise e rescue => e set_input_stream_done set_output_stream_done raise e end bd = BidiCall.new(@call, @marshal, @unmarshal, metadata_received: @metadata_received) bd.run_on_client(requests, proc { set_input_stream_done }, proc { set_output_stream_done }, &blk) end
ruby
def bidi_streamer(requests, metadata: {}, &blk) raise_error_if_already_executed # Metadata might have already been sent if this is an operation view begin send_initial_metadata(metadata) rescue GRPC::Core::CallError => e batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil) set_input_stream_done set_output_stream_done attach_status_results_and_complete_call(batch_result) raise e rescue => e set_input_stream_done set_output_stream_done raise e end bd = BidiCall.new(@call, @marshal, @unmarshal, metadata_received: @metadata_received) bd.run_on_client(requests, proc { set_input_stream_done }, proc { set_output_stream_done }, &blk) end
[ "def", "bidi_streamer", "(", "requests", ",", "metadata", ":", "{", "}", ",", "&", "blk", ")", "raise_error_if_already_executed", "# Metadata might have already been sent if this is an operation view", "begin", "send_initial_metadata", "(", "metadata", ")", "rescue", "GRPC"...
bidi_streamer sends a stream of requests to the GRPC server, and yields a stream of responses. This method takes an Enumerable of requests, and returns and enumerable of responses. == requests == requests provides an 'iterable' of Requests. I.e. it follows Ruby's #each enumeration protocol. In the simplest case, requests will be an array of marshallable objects; in typical case it will be an Enumerable that allows dynamic construction of the marshallable objects. == responses == This is an enumerator of responses. I.e, its #next method blocks waiting for the next response. Also, if at any point the block needs to consume all the remaining responses, this can be done using #each or #collect. Calling #each or #collect should only be done if the_call#writes_done has been called, otherwise the block will loop forever. @param requests [Object] an Enumerable of requests to send @param metadata [Hash] metadata to be sent to the server. If a value is a list, multiple metadata for its key are sent @return [Enumerator, nil] a response Enumerator
[ "bidi_streamer", "sends", "a", "stream", "of", "requests", "to", "the", "GRPC", "server", "and", "yields", "a", "stream", "of", "responses", "." ]
f3937f0e55227a4ef3a23f895d3b204a947610f8
https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/active_call.rb#L494-L520
train
Creates a new BidiStreamer.
[ 30522, 13366, 7226, 2072, 1035, 5460, 2121, 1006, 11186, 1010, 27425, 1024, 1063, 1065, 1010, 1004, 1038, 13687, 1007, 5333, 1035, 7561, 1035, 2065, 1035, 2525, 1035, 6472, 1001, 27425, 2453, 2031, 2525, 2042, 2741, 2065, 2023, 2003, 2019, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb
Azure::Hdinsight::Mgmt::V2015_03_01_preview.ScriptActions.delete_with_http_info
def delete_with_http_info(resource_group_name, cluster_name, script_name, custom_headers:nil) delete_async(resource_group_name, cluster_name, script_name, custom_headers:custom_headers).value! end
ruby
def delete_with_http_info(resource_group_name, cluster_name, script_name, custom_headers:nil) delete_async(resource_group_name, cluster_name, script_name, custom_headers:custom_headers).value! end
[ "def", "delete_with_http_info", "(", "resource_group_name", ",", "cluster_name", ",", "script_name", ",", "custom_headers", ":", "nil", ")", "delete_async", "(", "resource_group_name", ",", "cluster_name", ",", "script_name", ",", "custom_headers", ":custom_headers", ")...
Deletes a specified persisted script action of the cluster. @param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param script_name [String] The name of the script. @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", "a", "specified", "persisted", "script", "action", "of", "the", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb#L50-L52
train
Deletes the specified script from the specified cluster.
[ 30522, 13366, 3972, 12870, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9324, 1035, 2171, 1010, 5896, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3972, 12870, 1035, 2004, 6038, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
commander-rb/commander
lib/commander/user_interaction.rb
Commander.UI.replace_tokens
def replace_tokens(str, hash) #:nodoc: hash.inject(str) do |string, (key, value)| string.gsub ":#{key}", value.to_s end end
ruby
def replace_tokens(str, hash) #:nodoc: hash.inject(str) do |string, (key, value)| string.gsub ":#{key}", value.to_s end end
[ "def", "replace_tokens", "(", "str", ",", "hash", ")", "#:nodoc:", "hash", ".", "inject", "(", "str", ")", "do", "|", "string", ",", "(", "key", ",", "value", ")", "|", "string", ".", "gsub", "\":#{key}\"", ",", "value", ".", "to_s", "end", "end" ]
Substitute _hash_'s keys with their associated values in _str_.
[ "Substitute", "_hash_", "s", "keys", "with", "their", "associated", "values", "in", "_str_", "." ]
332047c14948225462fe60042eed23adfb996d68
https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/user_interaction.rb#L371-L375
train
Replace tokens in a string with their tokens.
[ 30522, 13366, 5672, 1035, 19204, 2015, 1006, 2358, 2099, 1010, 23325, 1007, 1001, 1024, 7293, 10085, 1024, 23325, 1012, 1999, 20614, 1006, 2358, 2099, 1007, 2079, 1064, 5164, 1010, 1006, 3145, 1010, 3643, 1007, 1064, 5164, 1012, 28177, 1208...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_cognitive_services/lib/2017-04-18/generated/azure_mgmt_cognitive_services/check_sku_availability.rb
Azure::CognitiveServices::Mgmt::V2017_04_18.CheckSkuAvailability.list
def list(location, skus, kind, type, custom_headers:nil) response = list_async(location, skus, kind, type, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list(location, skus, kind, type, custom_headers:nil) response = list_async(location, skus, kind, type, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list", "(", "location", ",", "skus", ",", "kind", ",", "type", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_async", "(", "location", ",", "skus", ",", "kind", ",", "type", ",", "custom_headers", ":custom_headers", ")", ".", "val...
Check available SKUs. @param location [String] Resource location. @param skus [Array<String>] The SKU of the resource. @param kind [String] The Kind of the resource. @param type [String] The Type of the resource. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [CheckSkuAvailabilityResultList] operation results.
[ "Check", "available", "SKUs", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cognitive_services/lib/2017-04-18/generated/azure_mgmt_cognitive_services/check_sku_availability.rb#L36-L39
train
Gets the list of the available image types.
[ 30522, 13366, 2862, 1006, 3295, 1010, 15315, 2271, 1010, 2785, 1010, 2828, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2004, 6038, 2278, 1006, 3295, 1010, 15315, 2271, 1010, 2785, 1010, 2828, 1010, 7661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rmagick/rmagick
ext/RMagick/extconf.rb
RMagick.Extconf.set_archflags_for_osx
def set_archflags_for_osx archflags = [] fullpath = `which convert` fileinfo = `file #{fullpath}` # default ARCHFLAGS archs = $ARCH_FLAG.scan(/-arch\s+(\S+)/).flatten archs.each do |arch| archflags << "-arch #{arch}" if fileinfo.include?(arch) end $ARCH_FLAG = archflags.join(' ') unless archflags.empty? end
ruby
def set_archflags_for_osx archflags = [] fullpath = `which convert` fileinfo = `file #{fullpath}` # default ARCHFLAGS archs = $ARCH_FLAG.scan(/-arch\s+(\S+)/).flatten archs.each do |arch| archflags << "-arch #{arch}" if fileinfo.include?(arch) end $ARCH_FLAG = archflags.join(' ') unless archflags.empty? end
[ "def", "set_archflags_for_osx", "archflags", "=", "[", "]", "fullpath", "=", "`", "`", "fileinfo", "=", "`", "#{", "fullpath", "}", "`", "# default ARCHFLAGS", "archs", "=", "$ARCH_FLAG", ".", "scan", "(", "/", "\\s", "\\S", "/", ")", ".", "flatten", "ar...
issue #169 set ARCHFLAGS appropriately for OSX
[ "issue", "#169", "set", "ARCHFLAGS", "appropriately", "for", "OSX" ]
ef6688ed9d76bf123c2ea1a483eff8635051adb7
https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/ext/RMagick/extconf.rb#L232-L245
train
set archflags for osx
[ 30522, 13366, 2275, 1035, 7905, 10258, 26454, 1035, 2005, 1035, 9808, 2595, 7905, 10258, 26454, 1027, 1031, 1033, 2440, 15069, 1027, 1036, 2029, 10463, 1036, 5371, 2378, 14876, 1027, 1036, 5371, 1001, 1063, 2440, 15069, 1065, 1036, 1001, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
meew0/discordrb
lib/discordrb/bot.rb
Discordrb.Bot.delete_channel
def delete_channel(data) channel = Channel.new(data, self) server = channel.server # Handle normal and private channels separately if server @channels.delete(channel.id) server.delete_channel(channel.id) elsif channel.pm? @pm_channels.delete(channel.recipient.id) elsif channel.group? @channels.delete(channel.id) end end
ruby
def delete_channel(data) channel = Channel.new(data, self) server = channel.server # Handle normal and private channels separately if server @channels.delete(channel.id) server.delete_channel(channel.id) elsif channel.pm? @pm_channels.delete(channel.recipient.id) elsif channel.group? @channels.delete(channel.id) end end
[ "def", "delete_channel", "(", "data", ")", "channel", "=", "Channel", ".", "new", "(", "data", ",", "self", ")", "server", "=", "channel", ".", "server", "# Handle normal and private channels separately", "if", "server", "@channels", ".", "delete", "(", "channel...
Internal handler for CHANNEL_DELETE
[ "Internal", "handler", "for", "CHANNEL_DELETE" ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L828-L841
train
Delete a channel from the server
[ 30522, 13366, 3972, 12870, 1035, 3149, 1006, 2951, 1007, 3149, 1027, 3149, 1012, 2047, 1006, 2951, 1010, 2969, 1007, 8241, 1027, 3149, 1012, 8241, 1001, 5047, 3671, 1998, 2797, 6833, 10329, 2065, 8241, 1030, 6833, 1012, 3972, 12870, 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/public_ipaddresses.rb
Azure::Network::Mgmt::V2018_07_01.PublicIPAddresses.delete
def delete(resource_group_name, public_ip_address_name, custom_headers:nil) response = delete_async(resource_group_name, public_ip_address_name, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, public_ip_address_name, custom_headers:nil) response = delete_async(resource_group_name, public_ip_address_name, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "public_ip_address_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "public_ip_address_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", ...
Deletes the specified public IP address. @param resource_group_name [String] The name of the resource group. @param public_ip_address_name [String] The name of the subnet. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "the", "specified", "public", "IP", "address", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/public_ipaddresses.rb#L32-L35
train
Deletes an existing public IP address.
[ 30522, 13366, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2270, 1035, 12997, 1035, 4769, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb
Azure::Redis::Mgmt::V2017_02_01.Redis.begin_import_data
def begin_import_data(resource_group_name, name, parameters, custom_headers:nil) response = begin_import_data_async(resource_group_name, name, parameters, custom_headers:custom_headers).value! nil end
ruby
def begin_import_data(resource_group_name, name, parameters, custom_headers:nil) response = begin_import_data_async(resource_group_name, name, parameters, custom_headers:custom_headers).value! nil end
[ "def", "begin_import_data", "(", "resource_group_name", ",", "name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_import_data_async", "(", "resource_group_name", ",", "name", ",", "parameters", ",", "custom_headers", ":custom_head...
Import data into Redis cache. @param resource_group_name [String] The name of the resource group. @param name [String] The name of the Redis cache. @param parameters [ImportRDBParameters] Parameters for Redis import operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Import", "data", "into", "Redis", "cache", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb#L1087-L1090
train
Import a collection of data into a Data Lake Store.
[ 30522, 13366, 4088, 1035, 12324, 1035, 2951, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 12324, 1035, 2951, 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...
ankane/searchkick
lib/searchkick/query.rb
Searchkick.Query.coordinate_array
def coordinate_array(value) if value.is_a?(Hash) [value[:lon], value[:lat]] elsif value.is_a?(Array) and !value[0].is_a?(Numeric) value.map { |a| coordinate_array(a) } else value end end
ruby
def coordinate_array(value) if value.is_a?(Hash) [value[:lon], value[:lat]] elsif value.is_a?(Array) and !value[0].is_a?(Numeric) value.map { |a| coordinate_array(a) } else value end end
[ "def", "coordinate_array", "(", "value", ")", "if", "value", ".", "is_a?", "(", "Hash", ")", "[", "value", "[", ":lon", "]", ",", "value", "[", ":lat", "]", "]", "elsif", "value", ".", "is_a?", "(", "Array", ")", "and", "!", "value", "[", "0", "]...
Recursively descend through nesting of arrays until we reach either a lat/lon object or an array of numbers, eventually returning the same structure with all values transformed to [lon, lat].
[ "Recursively", "descend", "through", "nesting", "of", "arrays", "until", "we", "reach", "either", "a", "lat", "/", "lon", "object", "or", "an", "array", "of", "numbers", "eventually", "returning", "the", "same", "structure", "with", "all", "values", "transform...
33ee919b56a5204d9e5c519f87e1681216be7699
https://github.com/ankane/searchkick/blob/33ee919b56a5204d9e5c519f87e1681216be7699/lib/searchkick/query.rb#L1019-L1027
train
Returns an array of coordinates for the given value.
[ 30522, 13366, 13530, 1035, 9140, 1006, 3643, 1007, 2065, 3643, 1012, 2003, 1035, 1037, 1029, 1006, 23325, 1007, 1031, 3643, 1031, 1024, 8840, 2078, 1033, 1010, 3643, 1031, 1024, 2474, 2102, 1033, 1033, 3449, 5332, 2546, 3643, 1012, 2003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Katello/katello
app/controllers/katello/application_controller.rb
Katello.ApplicationController.render_bad_parameters
def render_bad_parameters(*args) default_message = if request.xhr? _('Invalid parameters sent in the request for this operation. Please contact a system administrator.') else _('Invalid parameters sent. You may have mistyped the address. If you continue having trouble with this, please contact an Administrator.') end exception = args.find { |o| o.is_a? Exception } message = args.find { |o| o.is_a? String } || exception.try(:message) || default_message status = if exception && exception.respond_to?(:status_code) exception.status_code else 400 end if exception log_exception exception else Rails.logger.warn message end respond_to do |format| format.html do render :template => 'common/400', :layout => !request.xhr?, :status => status, :locals => {:message => message} end format.atom { head exception.status_code } format.xml { head exception.status_code } format.json { head exception.status_code } end User.current = nil end
ruby
def render_bad_parameters(*args) default_message = if request.xhr? _('Invalid parameters sent in the request for this operation. Please contact a system administrator.') else _('Invalid parameters sent. You may have mistyped the address. If you continue having trouble with this, please contact an Administrator.') end exception = args.find { |o| o.is_a? Exception } message = args.find { |o| o.is_a? String } || exception.try(:message) || default_message status = if exception && exception.respond_to?(:status_code) exception.status_code else 400 end if exception log_exception exception else Rails.logger.warn message end respond_to do |format| format.html do render :template => 'common/400', :layout => !request.xhr?, :status => status, :locals => {:message => message} end format.atom { head exception.status_code } format.xml { head exception.status_code } format.json { head exception.status_code } end User.current = nil end
[ "def", "render_bad_parameters", "(", "*", "args", ")", "default_message", "=", "if", "request", ".", "xhr?", "_", "(", "'Invalid parameters sent in the request for this operation. Please contact a system administrator.'", ")", "else", "_", "(", "'Invalid parameters sent. You ma...
render bad params to user @overload render_bad_parameters() render bad_parameters with `default_message` and status `400` @overload render_bad_parameters(message) render bad_parameters with `message` and status `400` @param [String] message @overload render_bad_parameters(error) render bad_parameters with `error.message` and `error.status_code` if present @param [Exception] error @overload render_bad_parameters(error, message) add `message` to overload `exception.message` @param [String] message @param [Exception] error
[ "render", "bad", "params", "to", "user" ]
a1c9280067607999cae43bab89b53ba870856b76
https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/controllers/katello/application_controller.rb#L100-L132
train
Renders a 400 response with the given exception.
[ 30522, 13366, 17552, 1035, 2919, 1035, 11709, 1006, 1008, 12098, 5620, 1007, 12398, 1035, 4471, 1027, 2065, 5227, 1012, 1060, 8093, 1029, 1035, 1006, 1005, 19528, 11709, 2741, 1999, 1996, 5227, 2005, 2023, 3169, 1012, 3531, 3967, 1037, 2291...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/reserved_db_instances_offering.rb
Aws::RDS.ReservedDBInstancesOffering.purchase
def purchase(options = {}) options = options.merge(reserved_db_instances_offering_id: @id) resp = @client.purchase_reserved_db_instances_offering(options) ReservedDBInstance.new( id: resp.data.reserved_db_instance.reserved_db_instance_id, data: resp.data.reserved_db_instance, client: @client ) end
ruby
def purchase(options = {}) options = options.merge(reserved_db_instances_offering_id: @id) resp = @client.purchase_reserved_db_instances_offering(options) ReservedDBInstance.new( id: resp.data.reserved_db_instance.reserved_db_instance_id, data: resp.data.reserved_db_instance, client: @client ) end
[ "def", "purchase", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "reserved_db_instances_offering_id", ":", "@id", ")", "resp", "=", "@client", ".", "purchase_reserved_db_instances_offering", "(", "options", ")", "ReservedDBInsta...
@!group Actions @example Request syntax with placeholder values reserveddbinstance = reserved_db_instances_offering.purchase({ reserved_db_instance_id: "String", db_instance_count: 1, tags: [ { key: "String", value: "String", }, ], }) @param [Hash] options ({}) @option options [String] :reserved_db_instance_id Customer-specified identifier to track this reservation. Example: myreservationID @option options [Integer] :db_instance_count The number of instances to reserve. Default: `1` @option options [Array<Types::Tag>] :tags A list of tags. For more information, see [Tagging Amazon RDS Resources][1] in the *Amazon RDS User Guide.* [1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html @return [ReservedDBInstance]
[ "@!group", "Actions", "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/reserved_db_instances_offering.rb#L249-L257
train
purchase a reserved DB Instance
[ 30522, 13366, 5309, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 9235, 1035, 16962, 1035, 12107, 1035, 5378, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 5309, 1035, 9235, 1035, 16962,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
meew0/discordrb
lib/discordrb/data/channel.rb
Discordrb.Channel.send_temporary_message
def send_temporary_message(content, timeout, tts = false, embed = nil) @bot.send_temporary_message(@id, content, timeout, tts, embed) end
ruby
def send_temporary_message(content, timeout, tts = false, embed = nil) @bot.send_temporary_message(@id, content, timeout, tts, embed) end
[ "def", "send_temporary_message", "(", "content", ",", "timeout", ",", "tts", "=", "false", ",", "embed", "=", "nil", ")", "@bot", ".", "send_temporary_message", "(", "@id", ",", "content", ",", "timeout", ",", "tts", ",", "embed", ")", "end" ]
Sends a temporary message to this channel. @param content [String] The content to send. Should not be longer than 2000 characters or it will result in an error. @param timeout [Float] The amount of time in seconds after which the message sent will be deleted. @param tts [true, false] Whether or not this message should be sent using Discord text-to-speech. @param embed [Hash, Discordrb::Webhooks::Embed, nil] The rich embed to append to this message.
[ "Sends", "a", "temporary", "message", "to", "this", "channel", "." ]
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/channel.rb#L352-L354
train
Send a temporary message to the bot.
[ 30522, 13366, 4604, 1035, 5741, 1035, 4471, 1006, 4180, 1010, 2051, 5833, 1010, 23746, 2015, 1027, 6270, 1010, 7861, 8270, 1027, 9152, 2140, 1007, 1030, 28516, 1012, 4604, 1035, 5741, 1035, 4471, 1006, 1030, 8909, 1010, 4180, 1010, 2051, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
piotrmurach/github
lib/github_api/client/search.rb
Github.Client::Search.repos
def repos(*args) params = arguments(args, required: [:q]).params params['q'] ||= arguments.q get_request('/search/repositories', arguments.params) end
ruby
def repos(*args) params = arguments(args, required: [:q]).params params['q'] ||= arguments.q get_request('/search/repositories', arguments.params) end
[ "def", "repos", "(", "*", "args", ")", "params", "=", "arguments", "(", "args", ",", "required", ":", "[", ":q", "]", ")", ".", "params", "params", "[", "'q'", "]", "||=", "arguments", ".", "q", "get_request", "(", "'/search/repositories'", ",", "argum...
Search repositories Find repositories via various criteria. (This method returns up to 100 results per page.) @param [Hash] params @option params [String] :q The search keywords, as well as any qualifiers. @option params [String] :sort The sort field. One of stars, forks, or updated. Default: results are sorted by best match. @option params [String] :order The sort order if sort parameter is provided. One of asc or desc. Default: desc @example github = Github.new github.search.repos 'query' @example github.search.repos q: 'query' @api public
[ "Search", "repositories" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/search.rb#L72-L77
train
Get a list of repos
[ 30522, 13366, 16360, 2891, 1006, 1008, 12098, 5620, 1007, 11498, 5244, 1027, 9918, 1006, 12098, 5620, 1010, 3223, 1024, 1031, 1024, 1053, 1033, 1007, 1012, 11498, 5244, 11498, 5244, 1031, 1005, 1053, 1005, 1033, 1064, 1064, 1027, 9918, 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...
libgit2/rugged
lib/rugged/index.rb
Rugged.Index.diff
def diff(*args) options = args.last.is_a?(Hash) ? args.pop : {} other = args.shift case other when nil diff_index_to_workdir options when ::Rugged::Commit diff_tree_to_index other.tree, options when ::Rugged::Tree diff_tree_to_index other, options else raise TypeError, "A Rugged::Commit or Rugged::Tree instance is required" end end
ruby
def diff(*args) options = args.last.is_a?(Hash) ? args.pop : {} other = args.shift case other when nil diff_index_to_workdir options when ::Rugged::Commit diff_tree_to_index other.tree, options when ::Rugged::Tree diff_tree_to_index other, options else raise TypeError, "A Rugged::Commit or Rugged::Tree instance is required" end end
[ "def", "diff", "(", "*", "args", ")", "options", "=", "args", ".", "last", ".", "is_a?", "(", "Hash", ")", "?", "args", ".", "pop", ":", "{", "}", "other", "=", "args", ".", "shift", "case", "other", "when", "nil", "diff_index_to_workdir", "options",...
call-seq: index.diff([options]) -> diff index.diff(diffable[, options]) -> diff The first form returns a diff between the index and the current working directory. The second form returns a diff between the index and the given diffable object. +diffable+ can either be a +Rugged::Commit+ or a +Rugged::Tree+. The index will be used as the "old file" side of the diff, while the working directory or the +diffable+ will be used for the "new file" side. The following options can be passed in the +options+ Hash: :paths :: An array of paths / fnmatch patterns to constrain the diff to a specific set of files. Also see +:disable_pathspec_match+. :max_size :: An integer specifying the maximum byte size of a file before a it will be treated as binary. The default value is 512MB. :context_lines :: The number of unchanged lines that define the boundary of a hunk (and to display before and after the actual changes). The default is 3. :interhunk_lines :: The maximum number of unchanged lines between hunk boundaries before the hunks will be merged into a one. The default is 0. :reverse :: If true, the sides of the diff will be reversed. :force_text :: If true, all files will be treated as text, disabling binary attributes & detection. :ignore_whitespace :: If true, all whitespace will be ignored. :ignore_whitespace_change :: If true, changes in amount of whitespace will be ignored. :ignore_whitespace_eol :: If true, whitespace at end of line will be ignored. :ignore_submodules :: if true, submodules will be excluded from the diff completely. :patience :: If true, the "patience diff" algorithm will be used (currenlty unimplemented). :include_ignored :: If true, ignored files will be included in the diff. :include_untracked :: If true, untracked files will be included in the diff. :include_unmodified :: If true, unmodified files will be included in the diff. :recurse_untracked_dirs :: Even if +:include_untracked+ is true, untracked directories will only be marked with a single entry in the diff. If this flag is set to true, all files under ignored directories will be included in the diff, too. :disable_pathspec_match :: If true, the given +:paths+ will be applied as exact matches, instead of as fnmatch patterns. :deltas_are_icase :: If true, filename comparisons will be made with case-insensitivity. :include_untracked_content :: if true, untracked content will be contained in the the diff patch text. :skip_binary_check :: If true, diff deltas will be generated without spending time on binary detection. This is useful to improve performance in cases where the actual file content difference is not needed. :include_typechange :: If true, type changes for files will not be interpreted as deletion of the "old file" and addition of the "new file", but will generate typechange records. :include_typechange_trees :: Even if +:include_typechange+ is true, blob -> tree changes will still usually be handled as a deletion of the blob. If this flag is set to true, blob -> tree changes will be marked as typechanges. :ignore_filemode :: If true, file mode changes will be ignored. :recurse_ignored_dirs :: Even if +:include_ignored+ is true, ignored directories will only be marked with a single entry in the diff. If this flag is set to true, all files under ignored directories will be included in the diff, too.
[ "call", "-", "seq", ":", "index", ".", "diff", "(", "[", "options", "]", ")", "-", ">", "diff", "index", ".", "diff", "(", "diffable", "[", "options", "]", ")", "-", ">", "diff" ]
33873e5df2bd38501814182ff79609ed4bd88012
https://github.com/libgit2/rugged/blob/33873e5df2bd38501814182ff79609ed4bd88012/lib/rugged/index.rb#L109-L123
train
diff_index_to_workdir diff_tree_to_index diff_index_to_index diff_index_to_index
[ 30522, 13366, 4487, 4246, 1006, 1008, 12098, 5620, 1007, 7047, 1027, 12098, 5620, 1012, 2197, 1012, 2003, 1035, 1037, 1029, 1006, 23325, 1007, 1029, 12098, 5620, 1012, 3769, 1024, 1063, 1065, 2060, 1027, 12098, 5620, 1012, 5670, 2553, 2060,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/network_interfaces.rb
Azure::Network::Mgmt::V2016_12_01.NetworkInterfaces.begin_list_effective_network_security_groups
def begin_list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers:nil) response = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers:nil) response = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_list_effective_network_security_groups", "(", "resource_group_name", ",", "network_interface_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_list_effective_network_security_groups_async", "(", "resource_group_name", ",", "network_interface_name"...
Gets all network security groups applied to a network interface. @param resource_group_name [String] The name of the resource group. @param network_interface_name [String] The name of the network interface. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [EffectiveNetworkSecurityGroupListResult] operation results.
[ "Gets", "all", "network", "security", "groups", "applied", "to", "a", "network", "interface", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2016-12-01/generated/azure_mgmt_network/network_interfaces.rb#L1061-L1064
train
Gets the effective network security groups.
[ 30522, 13366, 4088, 1035, 2862, 1035, 4621, 1035, 2897, 1035, 3036, 1035, 2967, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 8278, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 2862, 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_signalr/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb
Azure::Signalr::Mgmt::V2018_03_01_preview.SignalR.begin_delete
def begin_delete(resource_group_name, resource_name, custom_headers:nil) response = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value! nil end
ruby
def begin_delete(resource_group_name, resource_name, custom_headers:nil) response = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value! nil end
[ "def", "begin_delete", "(", "resource_group_name", ",", "resource_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_delete_async", "(", "resource_group_name", ",", "resource_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil...
Operation to delete a 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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Operation", "to", "delete", "a", "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#L928-L931
train
Deletes a managed network interface.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7692, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
brunofacca/active-record-query-trace
lib/active_record_query_trace.rb
ActiveRecordQueryTrace.CustomLogSubscriber.display_backtrace?
def display_backtrace?(payload) ActiveRecordQueryTrace.enabled \ && !transaction_begin_or_commit_query?(payload) \ && !schema_query?(payload) \ && !(ActiveRecordQueryTrace.ignore_cached_queries && payload[:cached]) \ && !(ActiveRecordQueryTrace.suppress_logging_of_db_reads && db_read_query?(payload)) \ && display_backtrace_for_query_type?(payload) end
ruby
def display_backtrace?(payload) ActiveRecordQueryTrace.enabled \ && !transaction_begin_or_commit_query?(payload) \ && !schema_query?(payload) \ && !(ActiveRecordQueryTrace.ignore_cached_queries && payload[:cached]) \ && !(ActiveRecordQueryTrace.suppress_logging_of_db_reads && db_read_query?(payload)) \ && display_backtrace_for_query_type?(payload) end
[ "def", "display_backtrace?", "(", "payload", ")", "ActiveRecordQueryTrace", ".", "enabled", "&&", "!", "transaction_begin_or_commit_query?", "(", "payload", ")", "&&", "!", "schema_query?", "(", "payload", ")", "&&", "!", "(", "ActiveRecordQueryTrace", ".", "ignore_...
rubocop:disable Metrics/CyclomaticComplexity rubocop:disable Metrics/PerceivedComplexity TODO: refactor and remove rubocop:disable comments.
[ "rubocop", ":", "disable", "Metrics", "/", "CyclomaticComplexity", "rubocop", ":", "disable", "Metrics", "/", "PerceivedComplexity", "TODO", ":", "refactor", "and", "remove", "rubocop", ":", "disable", "comments", "." ]
9584d5d49cfc2170271f75bbf2773b46145e1be4
https://github.com/brunofacca/active-record-query-trace/blob/9584d5d49cfc2170271f75bbf2773b46145e1be4/lib/active_record_query_trace.rb#L67-L74
train
Returns true if the backtrace should be displayed for the query type.
[ 30522, 13366, 4653, 1035, 2067, 6494, 3401, 1029, 1006, 18093, 1007, 3161, 2890, 27108, 2094, 4226, 2854, 6494, 3401, 1012, 9124, 1032, 1004, 1004, 999, 12598, 1035, 4088, 1035, 2030, 1035, 10797, 1035, 23032, 1029, 1006, 18093, 1007, 1032,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
resque/resque
lib/resque/worker.rb
Resque.Worker.reserve
def reserve queues.each do |queue| log_with_severity :debug, "Checking #{queue}" if job = Resque.reserve(queue) log_with_severity :debug, "Found job on #{queue}" return job end end nil rescue Exception => e log_with_severity :error, "Error reserving job: #{e.inspect}" log_with_severity :error, e.backtrace.join("\n") raise e end
ruby
def reserve queues.each do |queue| log_with_severity :debug, "Checking #{queue}" if job = Resque.reserve(queue) log_with_severity :debug, "Found job on #{queue}" return job end end nil rescue Exception => e log_with_severity :error, "Error reserving job: #{e.inspect}" log_with_severity :error, e.backtrace.join("\n") raise e end
[ "def", "reserve", "queues", ".", "each", "do", "|", "queue", "|", "log_with_severity", ":debug", ",", "\"Checking #{queue}\"", "if", "job", "=", "Resque", ".", "reserve", "(", "queue", ")", "log_with_severity", ":debug", ",", "\"Found job on #{queue}\"", "return",...
Attempts to grab a job off one of the provided queues. Returns nil if no job can be found.
[ "Attempts", "to", "grab", "a", "job", "off", "one", "of", "the", "provided", "queues", ".", "Returns", "nil", "if", "no", "job", "can", "be", "found", "." ]
adb633a0f6b98b1eb5a5a85bb36ebac9309978fd
https://github.com/resque/resque/blob/adb633a0f6b98b1eb5a5a85bb36ebac9309978fd/lib/resque/worker.rb#L320-L334
train
Reserves all jobs on the queues
[ 30522, 13366, 3914, 24240, 2015, 1012, 2169, 2079, 1064, 24240, 1064, 8833, 1035, 2007, 1035, 18976, 1024, 2139, 8569, 2290, 1010, 1000, 9361, 1001, 1063, 24240, 1065, 1000, 2065, 3105, 1027, 24501, 4226, 1012, 3914, 1006, 24240, 1007, 8833...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongo-ruby-driver
lib/mongo/collection.rb
Mongo.Collection.watch
def watch(pipeline = [], options = {}) View::ChangeStream.new(View.new(self, {}, options), pipeline, nil, options) end
ruby
def watch(pipeline = [], options = {}) View::ChangeStream.new(View.new(self, {}, options), pipeline, nil, options) end
[ "def", "watch", "(", "pipeline", "=", "[", "]", ",", "options", "=", "{", "}", ")", "View", "::", "ChangeStream", ".", "new", "(", "View", ".", "new", "(", "self", ",", "{", "}", ",", "options", ")", ",", "pipeline", ",", "nil", ",", "options", ...
As of version 3.6 of the MongoDB server, a ``$changeStream`` pipeline stage is supported in the aggregation framework. This stage allows users to request that notifications are sent for all changes to a particular collection. @example Get change notifications for a given collection. collection.watch([{ '$match' => { operationType: { '$in' => ['insert', 'replace'] } } }]) @param [ Array<Hash> ] pipeline Optional additional filter operators. @param [ Hash ] options The change stream options. @option options [ String ] :full_document Allowed values: ‘default’, ‘updateLookup’. Defaults to ‘default’. When set to ‘updateLookup’, the change notification for partial updates will include both a delta describing the changes to the document, as well as a copy of the entire document that was changed from some time after the change occurred. @option options [ BSON::Document, Hash ] :resume_after Specifies the logical starting point for the new change stream. @option options [ Integer ] :max_await_time_ms The maximum amount of time for the server to wait on new documents to satisfy a change stream query. @option options [ Integer ] :batch_size The number of documents to return per batch. @option options [ BSON::Document, Hash ] :collation The collation to use. @option options [ Session ] :session The session to use. @option options [ BSON::Timestamp ] :start_at_operation_time Only return changes that occurred at or after the specified timestamp. Any command run against the server will return a cluster time that can be used here. Only recognized by server versions 4.0+. @note A change stream only allows 'majority' read concern. @note This helper method is preferable to running a raw aggregation with a $changeStream stage, for the purpose of supporting resumability. @return [ ChangeStream ] The change stream object. @since 2.5.0
[ "As", "of", "version", "3", ".", "6", "of", "the", "MongoDB", "server", "a", "$changeStream", "pipeline", "stage", "is", "supported", "in", "the", "aggregation", "framework", ".", "This", "stage", "allows", "users", "to", "request", "that", "notifications", ...
dca26d0870cb3386fad9ccc1d17228097c1fe1c8
https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/collection.rb#L337-L339
train
Create a new watch stream
[ 30522, 13366, 3422, 1006, 13117, 1027, 1031, 1033, 1010, 7047, 1027, 1063, 1065, 1007, 3193, 1024, 1024, 3431, 25379, 1012, 2047, 1006, 3193, 1012, 2047, 1006, 2969, 1010, 1063, 1065, 1010, 7047, 1007, 1010, 13117, 1010, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb
Azure::Logic::Mgmt::V2016_06_01.Workflows.create_or_update
def create_or_update(resource_group_name, workflow_name, workflow, custom_headers:nil) response = create_or_update_async(resource_group_name, workflow_name, workflow, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(resource_group_name, workflow_name, workflow, custom_headers:nil) response = create_or_update_async(resource_group_name, workflow_name, workflow, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "resource_group_name", ",", "workflow_name", ",", "workflow", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_group_name", ",", "workflow_name", ",", "workflow", ",", "custom_headers", "...
Creates or updates a workflow. @param resource_group_name [String] The resource group name. @param workflow_name [String] The workflow name. @param workflow [Workflow] The workflow. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Workflow] operation results.
[ "Creates", "or", "updates", "a", "workflow", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L317-L320
train
Creates or updates a workflow.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2147, 12314, 1035, 2171, 1010, 2147, 12314, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 2030, 1035, 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...
jekyll/jekyll-redirect-from
lib/jekyll-redirect-from/redirect_page.rb
JekyllRedirectFrom.RedirectPage.set_paths
def set_paths(from, to) @context ||= context from = ensure_leading_slash(from) data.merge!( "permalink" => from, "redirect" => { "from" => from, "to" => to =~ %r!^https?://! ? to : absolute_url(to), } ) end
ruby
def set_paths(from, to) @context ||= context from = ensure_leading_slash(from) data.merge!( "permalink" => from, "redirect" => { "from" => from, "to" => to =~ %r!^https?://! ? to : absolute_url(to), } ) end
[ "def", "set_paths", "(", "from", ",", "to", ")", "@context", "||=", "context", "from", "=", "ensure_leading_slash", "(", "from", ")", "data", ".", "merge!", "(", "\"permalink\"", "=>", "from", ",", "\"redirect\"", "=>", "{", "\"from\"", "=>", "from", ",", ...
Helper function to set the appropriate path metadata from - the relative path to the redirect page to - the relative path or absolute URL to the redirect target
[ "Helper", "function", "to", "set", "the", "appropriate", "path", "metadata" ]
21d18e0751df69a0d1a6951cb3462c77f291201b
https://github.com/jekyll/jekyll-redirect-from/blob/21d18e0751df69a0d1a6951cb3462c77f291201b/lib/jekyll-redirect-from/redirect_page.rb#L45-L55
train
Set the paths for the page
[ 30522, 13366, 2275, 1035, 10425, 1006, 2013, 1010, 2000, 1007, 1030, 6123, 1064, 1064, 1027, 6123, 2013, 1027, 5676, 1035, 2877, 1035, 18296, 1006, 2013, 1007, 2951, 1012, 13590, 999, 1006, 1000, 2566, 9067, 19839, 1000, 1027, 1028, 2013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jeremytregunna/ruby-trello
lib/trello/item_state.rb
Trello.CheckItemState.update_fields
def update_fields(fields) attributes[:id] = fields['id'] || attributes[:id] attributes[:state] = fields['state'] || attributes[:state] attributes[:item_id] = fields['idCheckItem'] || attributes[:item_id] self end
ruby
def update_fields(fields) attributes[:id] = fields['id'] || attributes[:id] attributes[:state] = fields['state'] || attributes[:state] attributes[:item_id] = fields['idCheckItem'] || attributes[:item_id] self end
[ "def", "update_fields", "(", "fields", ")", "attributes", "[", ":id", "]", "=", "fields", "[", "'id'", "]", "||", "attributes", "[", ":id", "]", "attributes", "[", ":state", "]", "=", "fields", "[", "'state'", "]", "||", "attributes", "[", ":state", "]...
Update the fields of an item state. Supply a hash of string keyed data retrieved from the Trello API representing an item state.
[ "Update", "the", "fields", "of", "an", "item", "state", "." ]
ad79c9d8152ad5395b3b61c43170908f1912bfb2
https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/item_state.rb#L18-L23
train
Update the fields of the object
[ 30522, 13366, 10651, 1035, 4249, 1006, 4249, 1007, 12332, 1031, 1024, 8909, 1033, 1027, 4249, 1031, 1005, 8909, 1005, 1033, 1064, 1064, 12332, 1031, 1024, 8909, 1033, 12332, 1031, 1024, 2110, 1033, 1027, 4249, 1031, 1005, 2110, 1005, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb
Azure::SQL::Mgmt::V2015_05_01_preview.FailoverGroups.begin_failover_with_http_info
def begin_failover_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers:nil) begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! end
ruby
def begin_failover_with_http_info(resource_group_name, server_name, failover_group_name, custom_headers:nil) begin_failover_async(resource_group_name, server_name, failover_group_name, custom_headers:custom_headers).value! end
[ "def", "begin_failover_with_http_info", "(", "resource_group_name", ",", "server_name", ",", "failover_group_name", ",", "custom_headers", ":", "nil", ")", "begin_failover_async", "(", "resource_group_name", ",", "server_name", ",", "failover_group_name", ",", "custom_heade...
Fails over from the current primary server to this server. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server containing the failover group. @param failover_group_name [String] The name of the failover group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Fails", "over", "from", "the", "current", "primary", "server", "to", "this", "server", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb#L853-L855
train
Gets the next chunk of the image in a failover group.
[ 30522, 13366, 4088, 1035, 8246, 7840, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 8246, 7840, 1035, 2177, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 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_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/kpi.rb
Azure::CustomerInsights::Mgmt::V2017_01_01.Kpi.list_by_hub_next
def list_by_hub_next(next_page_link, custom_headers:nil) response = list_by_hub_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_by_hub_next(next_page_link, custom_headers:nil) response = list_by_hub_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_by_hub_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_by_hub_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", "...
Gets all the KPIs in the specified hub. @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 [KpiListResult] operation results.
[ "Gets", "all", "the", "KPIs", "in", "the", "specified", "hub", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/kpi.rb#L596-L599
train
Gets the list of the available virtual network endpoints in a hub.
[ 30522, 13366, 2862, 1035, 2011, 1035, 9594, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 2011, 1035, 9594, 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...
mongodb/mongo-ruby-driver
spec/support/monitoring_ext.rb
Mongo.Monitoring.present_subscribers
def present_subscribers subs = {} subscribers.each do |k, v| unless v.empty? subs[k] = v end end subs end
ruby
def present_subscribers subs = {} subscribers.each do |k, v| unless v.empty? subs[k] = v end end subs end
[ "def", "present_subscribers", "subs", "=", "{", "}", "subscribers", ".", "each", "do", "|", "k", ",", "v", "|", "unless", "v", ".", "empty?", "subs", "[", "k", "]", "=", "v", "end", "end", "subs", "end" ]
#subscribers writes to the subscribers even when reading them, confusing the tests. This method returns only events with populated subscribers.
[ "#subscribers", "writes", "to", "the", "subscribers", "even", "when", "reading", "them", "confusing", "the", "tests", ".", "This", "method", "returns", "only", "events", "with", "populated", "subscribers", "." ]
dca26d0870cb3386fad9ccc1d17228097c1fe1c8
https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/spec/support/monitoring_ext.rb#L6-L14
train
Returns the unique ID of the subscribers
[ 30522, 13366, 2556, 1035, 17073, 4942, 2015, 1027, 1063, 1065, 17073, 1012, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.read_json_numeric_chars
def read_json_numeric_chars str = "" while (true) ch = @reader.peek if (!is_json_numeric(ch)) break; end ch = @reader.read str += ch end return str end
ruby
def read_json_numeric_chars str = "" while (true) ch = @reader.peek if (!is_json_numeric(ch)) break; end ch = @reader.read str += ch end return str end
[ "def", "read_json_numeric_chars", "str", "=", "\"\"", "while", "(", "true", ")", "ch", "=", "@reader", ".", "peek", "if", "(", "!", "is_json_numeric", "(", "ch", ")", ")", "break", ";", "end", "ch", "=", "@reader", ".", "read", "str", "+=", "ch", "en...
Reads a sequence of characters, stopping at the first one that is not a valid JSON numeric character.
[ "Reads", "a", "sequence", "of", "characters", "stopping", "at", "the", "first", "one", "that", "is", "not", "a", "valid", "JSON", "numeric", "character", "." ]
27d8387c49a49fcf193893f834e9766ae0b051c1
https://github.com/apache/thrift/blob/27d8387c49a49fcf193893f834e9766ae0b051c1/lib/rb/lib/thrift/protocol/json_protocol.rb#L563-L574
train
Read a JSON string of numeric characters
[ 30522, 13366, 3191, 1035, 1046, 3385, 1035, 16371, 25531, 1035, 25869, 2015, 2358, 2099, 1027, 1000, 1000, 2096, 1006, 2995, 1007, 10381, 1027, 1030, 8068, 1012, 19043, 2065, 1006, 999, 2003, 1035, 1046, 3385, 1035, 16371, 25531, 1006, 1038...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
build_tools/changelog.rb
BuildTools.Changelog.add_entry
def add_entry(options) add_unreleased_changes_section unless read.lines.to_a[0].strip == 'Unreleased Changes' lines = read.lines.to_a lines = lines[0..2] + Entry.new(options).lines + lines[3..-1] write(lines.join) end
ruby
def add_entry(options) add_unreleased_changes_section unless read.lines.to_a[0].strip == 'Unreleased Changes' lines = read.lines.to_a lines = lines[0..2] + Entry.new(options).lines + lines[3..-1] write(lines.join) end
[ "def", "add_entry", "(", "options", ")", "add_unreleased_changes_section", "unless", "read", ".", "lines", ".", "to_a", "[", "0", "]", ".", "strip", "==", "'Unreleased Changes'", "lines", "=", "read", ".", "lines", ".", "to_a", "lines", "=", "lines", "[", ...
@option options [required, Symbol] :type Must be one of the following: * :feature * :issue @option options [required, String<markdown>] :text A description of the change. This should be formatted as markdown. @option options [optional, Integer] :issue A related GitHub issue number. @option options [optional, Integer] :pull A related GitHub pull request number.
[ "@option", "options", "[", "required", "Symbol", "]", ":", "type", "Must", "be", "one", "of", "the", "following", ":" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/build_tools/changelog.rb#L51-L56
train
Add an entry to the archive
[ 30522, 13366, 5587, 1035, 4443, 1006, 7047, 1007, 5587, 1035, 13270, 1035, 3431, 1035, 2930, 4983, 3191, 1012, 3210, 1012, 2000, 1035, 1037, 1031, 1014, 1033, 1012, 30524, 1012, 1011, 1015, 1033, 4339, 1006, 3210, 1012, 3693, 1007, 2203, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb
Azure::Web::Mgmt::V2018_02_01.Recommendations.list_history_for_web_app
def list_history_for_web_app(resource_group_name, site_name, expired_only:nil, filter:nil, custom_headers:nil) first_page = list_history_for_web_app_as_lazy(resource_group_name, site_name, expired_only:expired_only, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_history_for_web_app(resource_group_name, site_name, expired_only:nil, filter:nil, custom_headers:nil) first_page = list_history_for_web_app_as_lazy(resource_group_name, site_name, expired_only:expired_only, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_history_for_web_app", "(", "resource_group_name", ",", "site_name", ",", "expired_only", ":", "nil", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_history_for_web_app_as_lazy", "(", "resource_group_name", ",",...
Get past recommendations for an app, optionally specified by the time range. Get past recommendations for an app, optionally specified by the time range. @param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Name of the app. @param expired_only [Boolean] Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. @param filter [String] Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<Recommendation>] operation results.
[ "Get", "past", "recommendations", "for", "an", "app", "optionally", "specified", "by", "the", "time", "range", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb#L324-L327
train
Gets the history for the specified App Service Environment.
[ 30522, 13366, 2862, 1035, 2381, 1035, 2005, 1035, 4773, 1035, 10439, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2609, 1035, 2171, 1010, 13735, 1035, 2069, 1024, 9152, 2140, 1010, 11307, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb
Azure::Batch::Mgmt::V2017_09_01.PoolOperations.disable_auto_scale
def disable_auto_scale(resource_group_name, account_name, pool_name, custom_headers:nil) response = disable_auto_scale_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def disable_auto_scale(resource_group_name, account_name, pool_name, custom_headers:nil) response = disable_auto_scale_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "disable_auto_scale", "(", "resource_group_name", ",", "account_name", ",", "pool_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "disable_auto_scale_async", "(", "resource_group_name", ",", "account_name", ",", "pool_name", ",", "custom_headers",...
Disables automatic scaling for a pool. @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 pool_name [String] The pool name. This must be unique within the account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Pool] operation results.
[ "Disables", "automatic", "scaling", "for", "a", "pool", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb#L539-L542
train
Disables auto scale of the specified pool.
[ 30522, 13366, 4487, 19150, 1035, 8285, 1035, 4094, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 4770, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4487, 19150, 1035, 8285, 1035, 4094, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/services/pwb/page_part_manager.rb
Pwb.PagePartManager.seed_fragment_photo
def seed_fragment_photo(block_label, photo_file) # content_key = self.slug + "_" + page_part_key # get in content model associated with page and fragment # join_model = page_contents.find_or_create_by(page_part_key: page_part_key) # page_fragment_content = join_model.create_content(page_part_key: page_part_key) # join_model.save! # page_fragment_content = contents.find_or_create_by(page_part_key: page_part_key) page_fragment_content = find_or_create_content photo = page_fragment_content.content_photos.find_by_block_key(block_label) if photo.present? return photo else photo = page_fragment_content.content_photos.create(block_key: block_label) end if ENV["RAILS_ENV"] == "test" # don't create photos for tests return nil end begin # if photo_file.is_a?(String) # photo.image = photo_file photo.image = Pwb::Engine.root.join(photo_file).open photo.save! print "#{slug}--#{page_part_key} image created: #{photo.optimized_image_url}\n" # reload the record to ensure that url is available photo.reload print "#{slug}--#{page_part_key} image created: #{photo.optimized_image_url}(after reload..)" rescue Exception => e # log exception to console print e end photo end
ruby
def seed_fragment_photo(block_label, photo_file) # content_key = self.slug + "_" + page_part_key # get in content model associated with page and fragment # join_model = page_contents.find_or_create_by(page_part_key: page_part_key) # page_fragment_content = join_model.create_content(page_part_key: page_part_key) # join_model.save! # page_fragment_content = contents.find_or_create_by(page_part_key: page_part_key) page_fragment_content = find_or_create_content photo = page_fragment_content.content_photos.find_by_block_key(block_label) if photo.present? return photo else photo = page_fragment_content.content_photos.create(block_key: block_label) end if ENV["RAILS_ENV"] == "test" # don't create photos for tests return nil end begin # if photo_file.is_a?(String) # photo.image = photo_file photo.image = Pwb::Engine.root.join(photo_file).open photo.save! print "#{slug}--#{page_part_key} image created: #{photo.optimized_image_url}\n" # reload the record to ensure that url is available photo.reload print "#{slug}--#{page_part_key} image created: #{photo.optimized_image_url}(after reload..)" rescue Exception => e # log exception to console print e end photo end
[ "def", "seed_fragment_photo", "(", "block_label", ",", "photo_file", ")", "# content_key = self.slug + \"_\" + page_part_key", "# get in content model associated with page and fragment", "# join_model = page_contents.find_or_create_by(page_part_key: page_part_key)", "# page_fragment_content = jo...
when seeding I only need to ensure that a photo exists for the fragment so will return existing photo if it can be found
[ "when", "seeding", "I", "only", "need", "to", "ensure", "that", "a", "photo", "exists", "for", "the", "fragment", "so", "will", "return", "existing", "photo", "if", "it", "can", "be", "found" ]
fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21
https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/services/pwb/page_part_manager.rb#L187-L223
train
seed a photo for a fragment
[ 30522, 13366, 6534, 1035, 15778, 1035, 6302, 1006, 3796, 1035, 3830, 1010, 6302, 1035, 5371, 1007, 1001, 4180, 1035, 3145, 1027, 2969, 1012, 23667, 1009, 1000, 1035, 1000, 1009, 3931, 1035, 2112, 1035, 3145, 1001, 2131, 1999, 4180, 2944, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
watir/watir
lib/watir/elements/element.rb
Watir.Element.attribute_values
def attribute_values result = element_call { execute_js(:attributeValues, @element) } result.keys.each do |key| next unless key == key[/[a-zA-Z\-]*/] result[key.tr('-', '_').to_sym] = result.delete(key) end result end
ruby
def attribute_values result = element_call { execute_js(:attributeValues, @element) } result.keys.each do |key| next unless key == key[/[a-zA-Z\-]*/] result[key.tr('-', '_').to_sym] = result.delete(key) end result end
[ "def", "attribute_values", "result", "=", "element_call", "{", "execute_js", "(", ":attributeValues", ",", "@element", ")", "}", "result", ".", "keys", ".", "each", "do", "|", "key", "|", "next", "unless", "key", "==", "key", "[", "/", "\\-", "/", "]", ...
Returns all attribute values. Attributes with special characters are returned as String, rest are returned as a Symbol. @return [Hash] @example browser.pre(id: 'rspec').attribute_values #=> {class:'ruby', id: 'rspec' }
[ "Returns", "all", "attribute", "values", ".", "Attributes", "with", "special", "characters", "are", "returned", "as", "String", "rest", "are", "returned", "as", "a", "Symbol", "." ]
2d8db09811c6221ae401b85b2f61f5fa66e463a3
https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/element.rb#L302-L310
train
Returns the array of the attribute values for this element.
[ 30522, 13366, 17961, 1035, 5300, 2765, 1027, 5783, 1035, 2655, 1063, 15389, 1035, 1046, 2015, 1006, 1024, 17961, 10175, 15808, 1010, 1030, 5783, 1007, 1065, 2765, 1012, 6309, 1012, 2169, 2079, 1064, 3145, 1064, 2279, 4983, 3145, 1027, 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...
hashicorp/vagrant
lib/vagrant/machine_index.rb
Vagrant.MachineIndex.delete
def delete(entry) return true if !entry.id @lock.synchronize do with_index_lock do return true if !@machines[entry.id] # If we don't have the lock, then we need to acquire it. if !@machine_locks[entry.id] raise "Unlocked delete on machine: #{entry.id}" end # Reload so we have the latest data, then delete and save unlocked_reload @machines.delete(entry.id) unlocked_save # Release access on this machine unlocked_release(entry.id) end end true end
ruby
def delete(entry) return true if !entry.id @lock.synchronize do with_index_lock do return true if !@machines[entry.id] # If we don't have the lock, then we need to acquire it. if !@machine_locks[entry.id] raise "Unlocked delete on machine: #{entry.id}" end # Reload so we have the latest data, then delete and save unlocked_reload @machines.delete(entry.id) unlocked_save # Release access on this machine unlocked_release(entry.id) end end true end
[ "def", "delete", "(", "entry", ")", "return", "true", "if", "!", "entry", ".", "id", "@lock", ".", "synchronize", "do", "with_index_lock", "do", "return", "true", "if", "!", "@machines", "[", "entry", ".", "id", "]", "# If we don't have the lock, then we need ...
Initializes a MachineIndex at the given file location. @param [Pathname] data_dir Path to the directory where data for the index can be stored. This folder should exist and must be writable. Deletes a machine by UUID. The machine being deleted with this UUID must either be locked by this index or must be unlocked. @param [Entry] entry The entry to delete. @return [Boolean] true if delete is successful
[ "Initializes", "a", "MachineIndex", "at", "the", "given", "file", "location", "." ]
c22a145c59790c098f95d50141d9afb48e1ef55f
https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/machine_index.rb#L64-L87
train
Delete a machine from the index
[ 30522, 13366, 3972, 12870, 1006, 4443, 1007, 2709, 2995, 2065, 999, 4443, 1012, 8909, 1030, 5843, 1012, 26351, 8093, 10698, 4371, 2079, 2007, 1035, 5950, 1035, 5843, 2079, 2709, 2995, 2065, 999, 1030, 6681, 1031, 4443, 1012, 8909, 1033, 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...
algolia/algoliasearch-rails
lib/algoliasearch-rails.rb
AlgoliaSearch.ClassMethods.algolia_reindex
def algolia_reindex(batch_size = AlgoliaSearch::IndexSettings::DEFAULT_BATCH_SIZE, synchronous = false) return if algolia_without_auto_index_scope algolia_configurations.each do |options, settings| next if algolia_indexing_disabled?(options) next if options[:slave] || options[:replica] # fetch the master settings master_index = algolia_ensure_init(options, settings) master_settings = master_index.get_settings rescue {} # if master doesn't exist yet master_settings.merge!(JSON.parse(settings.to_settings.to_json)) # convert symbols to strings # remove the replicas of the temporary index master_settings.delete :slaves master_settings.delete 'slaves' master_settings.delete :replicas master_settings.delete 'replicas' # init temporary index index_name = algolia_index_name(options) tmp_options = options.merge({ :index_name => "#{index_name}.tmp" }) tmp_options.delete(:per_environment) # already included in the temporary index_name tmp_settings = settings.dup tmp_index = algolia_ensure_init(tmp_options, tmp_settings, master_settings) algolia_find_in_batches(batch_size) do |group| if algolia_conditional_index?(tmp_options) # select only indexable objects group = group.select { |o| algolia_indexable?(o, tmp_options) } end objects = group.map { |o| tmp_settings.get_attributes(o).merge 'objectID' => algolia_object_id_of(o, tmp_options) } tmp_index.save_objects(objects) end move_task = SafeIndex.move_index(tmp_index.name, index_name) master_index.wait_task(move_task["taskID"]) if synchronous || options[:synchronous] end nil end
ruby
def algolia_reindex(batch_size = AlgoliaSearch::IndexSettings::DEFAULT_BATCH_SIZE, synchronous = false) return if algolia_without_auto_index_scope algolia_configurations.each do |options, settings| next if algolia_indexing_disabled?(options) next if options[:slave] || options[:replica] # fetch the master settings master_index = algolia_ensure_init(options, settings) master_settings = master_index.get_settings rescue {} # if master doesn't exist yet master_settings.merge!(JSON.parse(settings.to_settings.to_json)) # convert symbols to strings # remove the replicas of the temporary index master_settings.delete :slaves master_settings.delete 'slaves' master_settings.delete :replicas master_settings.delete 'replicas' # init temporary index index_name = algolia_index_name(options) tmp_options = options.merge({ :index_name => "#{index_name}.tmp" }) tmp_options.delete(:per_environment) # already included in the temporary index_name tmp_settings = settings.dup tmp_index = algolia_ensure_init(tmp_options, tmp_settings, master_settings) algolia_find_in_batches(batch_size) do |group| if algolia_conditional_index?(tmp_options) # select only indexable objects group = group.select { |o| algolia_indexable?(o, tmp_options) } end objects = group.map { |o| tmp_settings.get_attributes(o).merge 'objectID' => algolia_object_id_of(o, tmp_options) } tmp_index.save_objects(objects) end move_task = SafeIndex.move_index(tmp_index.name, index_name) master_index.wait_task(move_task["taskID"]) if synchronous || options[:synchronous] end nil end
[ "def", "algolia_reindex", "(", "batch_size", "=", "AlgoliaSearch", "::", "IndexSettings", "::", "DEFAULT_BATCH_SIZE", ",", "synchronous", "=", "false", ")", "return", "if", "algolia_without_auto_index_scope", "algolia_configurations", ".", "each", "do", "|", "options", ...
reindex whole database using a extra temporary index + move operation
[ "reindex", "whole", "database", "using", "a", "extra", "temporary", "index", "+", "move", "operation" ]
360e47d733476e6611d9874cf89e57942b7f2939
https://github.com/algolia/algoliasearch-rails/blob/360e47d733476e6611d9874cf89e57942b7f2939/lib/algoliasearch-rails.rb#L540-L577
train
reindex the index
[ 30522, 13366, 2632, 24141, 2401, 1035, 27788, 3207, 2595, 1006, 14108, 1035, 2946, 1027, 2632, 24141, 7951, 14644, 2818, 1024, 1024, 5950, 21678, 8613, 1024, 1024, 12398, 1035, 14108, 1035, 2946, 1010, 26351, 8093, 17175, 2271, 1027, 6270, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ruby2d/ruby2d
lib/ruby2d/window.rb
Ruby2D.Window.add
def add(o) case o when nil raise Error, "Cannot add '#{o.class}' to window!" when Array o.each { |x| add_object(x) } else add_object(o) end end
ruby
def add(o) case o when nil raise Error, "Cannot add '#{o.class}' to window!" when Array o.each { |x| add_object(x) } else add_object(o) end end
[ "def", "add", "(", "o", ")", "case", "o", "when", "nil", "raise", "Error", ",", "\"Cannot add '#{o.class}' to window!\"", "when", "Array", "o", ".", "each", "{", "|", "x", "|", "add_object", "(", "x", ")", "}", "else", "add_object", "(", "o", ")", "end...
Add an object to the window
[ "Add", "an", "object", "to", "the", "window" ]
43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4
https://github.com/ruby2d/ruby2d/blob/43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4/lib/ruby2d/window.rb#L218-L227
train
Add an object to the window.
[ 30522, 13366, 5587, 1006, 1051, 1007, 2553, 1051, 2043, 9152, 2140, 5333, 7561, 1010, 1000, 3685, 5587, 1005, 1001, 1063, 1051, 1012, 2465, 1065, 1005, 2000, 3332, 999, 1000, 2043, 9140, 1051, 1012, 2169, 1063, 1064, 1060, 1064, 5587, 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...
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.build_trains
def build_trains(app_id, testing_type, tries = 5, platform: nil) raise "app_id is required" unless app_id url = "ra/apps/#{app_id}/trains/?testingType=#{testing_type}" url += "&platform=#{platform}" unless platform.nil? r = request(:get, url) return parse_response(r, 'data') rescue Spaceship::Client::UnexpectedResponse => ex # Build trains fail randomly very often # we need to catch those errors and retry # https://github.com/fastlane/fastlane/issues/6419 retry_error_messages = [ "ITC.response.error.OPERATION_FAILED", "Internal Server Error", "Service Unavailable" ].freeze if retry_error_messages.any? { |message| ex.to_s.include?(message) } tries -= 1 if tries > 0 logger.warn("Received temporary server error from App Store Connect. Retrying the request...") sleep(3) unless Object.const_defined?("SpecHelper") retry end end raise Spaceship::Client::UnexpectedResponse, "Temporary App Store Connect error: #{ex}" end
ruby
def build_trains(app_id, testing_type, tries = 5, platform: nil) raise "app_id is required" unless app_id url = "ra/apps/#{app_id}/trains/?testingType=#{testing_type}" url += "&platform=#{platform}" unless platform.nil? r = request(:get, url) return parse_response(r, 'data') rescue Spaceship::Client::UnexpectedResponse => ex # Build trains fail randomly very often # we need to catch those errors and retry # https://github.com/fastlane/fastlane/issues/6419 retry_error_messages = [ "ITC.response.error.OPERATION_FAILED", "Internal Server Error", "Service Unavailable" ].freeze if retry_error_messages.any? { |message| ex.to_s.include?(message) } tries -= 1 if tries > 0 logger.warn("Received temporary server error from App Store Connect. Retrying the request...") sleep(3) unless Object.const_defined?("SpecHelper") retry end end raise Spaceship::Client::UnexpectedResponse, "Temporary App Store Connect error: #{ex}" end
[ "def", "build_trains", "(", "app_id", ",", "testing_type", ",", "tries", "=", "5", ",", "platform", ":", "nil", ")", "raise", "\"app_id is required\"", "unless", "app_id", "url", "=", "\"ra/apps/#{app_id}/trains/?testingType=#{testing_type}\"", "url", "+=", "\"&platfo...
@!group Build Trains rubocop:disable Metrics/BlockNesting @param (testing_type) internal or external
[ "@!group", "Build", "Trains" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L906-L932
train
Build trains for an app
[ 30522, 13366, 3857, 1035, 4499, 1006, 10439, 1035, 8909, 1010, 5604, 1035, 2828, 1010, 5363, 1027, 1019, 1010, 4132, 1024, 9152, 2140, 1007, 5333, 1000, 10439, 1035, 8909, 2003, 3223, 1000, 4983, 10439, 1035, 8909, 24471, 2140, 1027, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/vpn_gateways.rb
Azure::Network::Mgmt::V2018_07_01.VpnGateways.create_or_update
def create_or_update(resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "resource_group_name", ",", "gateway_name", ",", "vpn_gateway_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_group_name", ",", "gateway_name", ",", "vpn_gateway_parameters", ",...
Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. @param resource_group_name [String] The resource group name of the VpnGateway. @param gateway_name [String] The name of the gateway. @param vpn_gateway_parameters [VpnGateway] Parameters supplied to create or Update a virtual wan vpn gateway. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [VpnGateway] operation results.
[ "Creates", "a", "virtual", "wan", "vpn", "gateway", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "gateway", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/vpn_gateways.rb#L133-L136
train
Creates or updates a virtual wan vpn gateway.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11909, 1035, 2171, 1010, 21210, 2078, 1035, 11909, 1035, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 2030, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_variation
def update_variation(location_id, item_id, variation_id, body, opts = {}) data, _status_code, _headers = update_variation_with_http_info(location_id, item_id, variation_id, body, opts) return data end
ruby
def update_variation(location_id, item_id, variation_id, body, opts = {}) data, _status_code, _headers = update_variation_with_http_info(location_id, item_id, variation_id, body, opts) return data end
[ "def", "update_variation", "(", "location_id", ",", "item_id", ",", "variation_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_variation_with_http_info", "(", "location_id", ",", "item_id", ",", "va...
UpdateVariation Modifies the details of an existing item variation. @param location_id The ID of the item&#39;s associated location. @param item_id The ID of the item to modify. @param variation_id The ID of the variation to modify. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [V1Variation]
[ "UpdateVariation", "Modifies", "the", "details", "of", "an", "existing", "item", "variation", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2388-L2391
train
Update a variation
[ 30522, 13366, 10651, 1035, 8386, 1006, 3295, 1035, 8909, 1010, 8875, 1035, 8909, 1010, 8386, 1035, 8909, 1010, 2303, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 10651, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb
Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.begin_delete_with_http_info
def begin_delete_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! end
ruby
def begin_delete_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) begin_delete_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value! end
[ "def", "begin_delete_with_http_info", "(", "resource_group_name", ",", "server_name", ",", "disaster_recovery_configuration_name", ",", "custom_headers", ":", "nil", ")", "begin_delete_async", "(", "resource_group_name", ",", "server_name", ",", "disaster_recovery_configuration...
Deletes a disaster recovery configuration. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server. @param disaster_recovery_configuration_name [String] The name of the disaster recovery configuration to be deleted. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Deletes", "a", "disaster", "recovery", "configuration", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L451-L453
train
Deletes a disaster recovery configuration.
[ 30522, 13366, 4088, 1035, 3972, 12870, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7071, 1035, 7233, 1035, 9563, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 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...
daddyz/phonelib
lib/phonelib/phone.rb
Phonelib.Phone.valid_for_country?
def valid_for_country?(country) country = country.to_s.upcase tdata = analyze(sanitized, passed_country(country)) tdata.find do |iso2, data| country == iso2 && data[:valid].any? end.is_a? Array end
ruby
def valid_for_country?(country) country = country.to_s.upcase tdata = analyze(sanitized, passed_country(country)) tdata.find do |iso2, data| country == iso2 && data[:valid].any? end.is_a? Array end
[ "def", "valid_for_country?", "(", "country", ")", "country", "=", "country", ".", "to_s", ".", "upcase", "tdata", "=", "analyze", "(", "sanitized", ",", "passed_country", "(", "country", ")", ")", "tdata", ".", "find", "do", "|", "iso2", ",", "data", "|"...
Returns whether a current parsed phone number is valid for specified country @param country [String|Symbol] ISO code of country (2 letters) like 'US', 'us' or :us for United States @return [Boolean] parsed phone number is valid
[ "Returns", "whether", "a", "current", "parsed", "phone", "number", "is", "valid", "for", "specified", "country" ]
aa0023eab7c896b71275bf342bc7f49735cbdbbf
https://github.com/daddyz/phonelib/blob/aa0023eab7c896b71275bf342bc7f49735cbdbbf/lib/phonelib/phone.rb#L157-L163
train
Returns true if the given country is valid for this country.
[ 30522, 13366, 9398, 1035, 2005, 1035, 2406, 1029, 1006, 2406, 1007, 2406, 1027, 2406, 1012, 2000, 1035, 1055, 1012, 2039, 18382, 14595, 6790, 1027, 17908, 1006, 2624, 25090, 5422, 1010, 2979, 1035, 2406, 1006, 2406, 1007, 1007, 14595, 6790,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb
Azure::SQL::Mgmt::V2014_04_01.Databases.list_metrics
def list_metrics(resource_group_name, server_name, database_name, filter, custom_headers:nil) response = list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_metrics(resource_group_name, server_name, database_name, filter, custom_headers:nil) response = list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_metrics", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "filter", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_metrics_async", "(", "resource_group_name", ",", "server_name", ",", "database_name", ",", "fil...
Returns database metrics. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param server_name [String] The name of the server. @param database_name [String] The name of the database. @param filter [String] An OData filter expression that describes a subset of metrics to return. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MetricListResult] operation results.
[ "Returns", "database", "metrics", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb#L1134-L1137
train
Gets metrics for a given database.
[ 30522, 13366, 2862, 1035, 12046, 2015, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7809, 1035, 2171, 1010, 11307, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 12046, 2015, 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...
randym/axlsx
lib/axlsx/workbook/worksheet/worksheet.rb
Axlsx.Worksheet.add_data_validation
def add_data_validation(cells, data_validation) dv = DataValidation.new(data_validation) dv.sqref = cells data_validations << dv end
ruby
def add_data_validation(cells, data_validation) dv = DataValidation.new(data_validation) dv.sqref = cells data_validations << dv end
[ "def", "add_data_validation", "(", "cells", ",", "data_validation", ")", "dv", "=", "DataValidation", ".", "new", "(", "data_validation", ")", "dv", ".", "sqref", "=", "cells", "data_validations", "<<", "dv", "end" ]
Add data validation to this worksheet. @param [String] cells The cells the validation will apply to. @param [hash] data_validation options defining the validation to apply. @see examples/data_validation.rb for an example
[ "Add", "data", "validation", "to", "this", "worksheet", "." ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/worksheet.rb#L431-L435
train
Adds a data validation to the data_validations list
[ 30522, 13366, 5587, 1035, 2951, 1035, 27354, 1006, 4442, 1010, 2951, 1035, 27354, 1007, 1040, 2615, 1027, 2951, 10175, 8524, 3508, 1012, 2047, 1006, 2951, 1035, 27354, 1007, 1040, 2615, 1012, 5490, 2890, 2546, 1027, 4442, 2951, 1035, 27354,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb
Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachines.begin_create_or_update_with_http_info
def begin_create_or_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value! end
ruby
def begin_create_or_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value! end
[ "def", "begin_create_or_update_with_http_info", "(", "resource_group_name", ",", "vm_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "begin_create_or_update_async", "(", "resource_group_name", ",", "vm_name", ",", "parameters", ",", "custom_headers", ":c...
The operation to create or update a virtual machine. @param resource_group_name [String] The name of the resource group. @param vm_name [String] The name of the virtual machine. @param parameters [VirtualMachine] Parameters supplied to the Create Virtual Machine operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "The", "operation", "to", "create", "or", "update", "a", "virtual", "machine", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb#L1117-L1119
train
Creates or updates a virtual machine.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/live_events.rb
Azure::MediaServices::Mgmt::V2018_07_01.LiveEvents.begin_start_with_http_info
def begin_start_with_http_info(resource_group_name, account_name, live_event_name, custom_headers:nil) begin_start_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value! end
ruby
def begin_start_with_http_info(resource_group_name, account_name, live_event_name, custom_headers:nil) begin_start_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value! end
[ "def", "begin_start_with_http_info", "(", "resource_group_name", ",", "account_name", ",", "live_event_name", ",", "custom_headers", ":", "nil", ")", "begin_start_async", "(", "resource_group_name", ",", "account_name", ",", "live_event_name", ",", "custom_headers", ":cus...
Start Live Event Starts an existing Live Event. @param resource_group_name [String] The name of the resource group within the Azure subscription. @param account_name [String] The Media Services account name. @param live_event_name [String] The name of the Live Event. @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.
[ "Start", "Live", "Event" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/live_events.rb#L900-L902
train
Starts a live event.
[ 30522, 13366, 4088, 1035, 2707, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 2444, 1035, 2724, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 4088, 1035, 2707, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/encoding_utils.rb
Sprockets.EncodingUtils.scan_css_charset
def scan_css_charset(str) buf = [] i = 0 str.each_byte.each do |byte| # Halt on line breaks break if byte == 0x0A || byte == 0x0D # Only ascii bytes next unless 0x0 < byte && byte <= 0xFF if i < CHARSET_SIZE elsif i == CHARSET_SIZE if buf == CHARSET_START buf = [] else break end elsif byte == 0x22 return buf.pack('C*') end buf << byte i += 1 end nil end
ruby
def scan_css_charset(str) buf = [] i = 0 str.each_byte.each do |byte| # Halt on line breaks break if byte == 0x0A || byte == 0x0D # Only ascii bytes next unless 0x0 < byte && byte <= 0xFF if i < CHARSET_SIZE elsif i == CHARSET_SIZE if buf == CHARSET_START buf = [] else break end elsif byte == 0x22 return buf.pack('C*') end buf << byte i += 1 end nil end
[ "def", "scan_css_charset", "(", "str", ")", "buf", "=", "[", "]", "i", "=", "0", "str", ".", "each_byte", ".", "each", "do", "|", "byte", "|", "# Halt on line breaks", "break", "if", "byte", "==", "0x0A", "||", "byte", "==", "0x0D", "# Only ascii bytes",...
Internal: Scan binary CSS string for @charset encoding name. str - ASCII-8BIT encoded String Returns encoding String name or nil.
[ "Internal", ":", "Scan", "binary", "CSS", "string", "for", "@charset", "encoding", "name", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/encoding_utils.rb#L208-L235
train
Scan CSS charset
[ 30522, 13366, 13594, 1035, 20116, 2015, 1035, 25869, 13462, 1006, 2358, 2099, 1007, 20934, 2546, 1027, 1031, 1033, 1045, 1027, 1014, 2358, 2099, 1012, 2169, 1035, 24880, 1012, 2169, 2079, 1064, 24880, 1064, 1001, 9190, 2006, 2240, 7807, 333...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-12-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb
Azure::RecoveryServicesBackup::Mgmt::V2016_12_01.ProtectionContainers.inquire_with_http_info
def inquire_with_http_info(vault_name, resource_group_name, fabric_name, container_name, filter:nil, custom_headers:nil) inquire_async(vault_name, resource_group_name, fabric_name, container_name, filter:filter, custom_headers:custom_headers).value! end
ruby
def inquire_with_http_info(vault_name, resource_group_name, fabric_name, container_name, filter:nil, custom_headers:nil) inquire_async(vault_name, resource_group_name, fabric_name, container_name, filter:filter, custom_headers:custom_headers).value! end
[ "def", "inquire_with_http_info", "(", "vault_name", ",", "resource_group_name", ",", "fabric_name", ",", "container_name", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "inquire_async", "(", "vault_name", ",", "resource_group_name", ",", "fabric...
Inquires all the protectable item in the given container that can be protected. Inquires all the protectable items that are protectable under the given container. @param vault_name [String] The name of the recovery services vault. @param resource_group_name [String] The name of the resource group where the recovery services vault is present. @param fabric_name [String] Fabric Name associated with the container. @param container_name [String] Name of the container in which inquiry needs to be triggered. @param filter [String] OData filter options. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Inquires", "all", "the", "protectable", "item", "in", "the", "given", "container", "that", "can", "be", "protected", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb#L406-L408
train
Inquire a container from the specified vault.
[ 30522, 13366, 1999, 15549, 2890, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 11632, 1035, 2171, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 8313, 1035, 2171, 1010, 11661, 1035, 2171, 1010, 11307, 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...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb
Aws::EC2.Instance.reset_kernel
def reset_kernel(options = {}) options = options.merge( instance_id: @id, attribute: "kernel" ) resp = @client.reset_instance_attribute(options) resp.data end
ruby
def reset_kernel(options = {}) options = options.merge( instance_id: @id, attribute: "kernel" ) resp = @client.reset_instance_attribute(options) resp.data end
[ "def", "reset_kernel", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "instance_id", ":", "@id", ",", "attribute", ":", "\"kernel\"", ")", "resp", "=", "@client", ".", "reset_instance_attribute", "(", "options", ")", "res...
@example Request syntax with placeholder values instance.reset_kernel({ dry_run: false, }) @param [Hash] options ({}) @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 [EmptyStructure]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb#L1074-L1081
train
Reset the kernel of the instance.
[ 30522, 13366, 25141, 1035, 16293, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 6013, 1035, 8909, 1024, 1030, 8909, 1010, 17961, 1024, 1000, 16293, 1000, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 25141, 1035, 601...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_managed_applications/lib/2018-06-01/generated/azure_mgmt_managed_applications/applications.rb
Azure::ManagedApplications::Mgmt::V2018_06_01.Applications.update_by_id_with_http_info
def update_by_id_with_http_info(application_id, parameters:nil, custom_headers:nil) update_by_id_async(application_id, parameters:parameters, custom_headers:custom_headers).value! end
ruby
def update_by_id_with_http_info(application_id, parameters:nil, custom_headers:nil) update_by_id_async(application_id, parameters:parameters, custom_headers:custom_headers).value! end
[ "def", "update_by_id_with_http_info", "(", "application_id", ",", "parameters", ":", "nil", ",", "custom_headers", ":", "nil", ")", "update_by_id_async", "(", "application_id", ",", "parameters", ":", "parameters", ",", "custom_headers", ":custom_headers", ")", ".", ...
Updates an existing managed application. The only value that can be updated via PATCH currently is the tags. @param application_id [String] The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} @param parameters [Application] Parameters supplied to update an existing managed application. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Updates", "an", "existing", "managed", "application", ".", "The", "only", "value", "that", "can", "be", "updated", "via", "PATCH", "currently", "is", "the", "tags", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_managed_applications/lib/2018-06-01/generated/azure_mgmt_managed_applications/applications.rb#L729-L731
train
Updates an existing App Service Environment.
[ 30522, 13366, 10651, 1035, 2011, 1035, 8909, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 4646, 1035, 8909, 1010, 11709, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10651, 1035, 2011, 1035, 8909, 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...
sensu/sensu
lib/sensu/utilities.rb
Sensu.Utilities.redact_sensitive
def redact_sensitive(obj, keys=nil) keys ||= %w[ password passwd pass api_key api_token access_key secret_key private_key secret routing_key access_token_read access_token_write access_token_path webhook_url nickserv_password channel_password community keystore_password truststore_password proxy_password access_key_id secret_access_key ] obj = obj.dup if obj.is_a?(Hash) obj.each do |key, value| if keys.include?(key.to_s) obj[key] = "REDACTED" elsif value.is_a?(Hash) || value.is_a?(Array) obj[key] = redact_sensitive(value, keys) end end elsif obj.is_a?(Array) obj.map! do |item| if item.is_a?(Hash) || item.is_a?(Array) redact_sensitive(item, keys) else item end end end obj end
ruby
def redact_sensitive(obj, keys=nil) keys ||= %w[ password passwd pass api_key api_token access_key secret_key private_key secret routing_key access_token_read access_token_write access_token_path webhook_url nickserv_password channel_password community keystore_password truststore_password proxy_password access_key_id secret_access_key ] obj = obj.dup if obj.is_a?(Hash) obj.each do |key, value| if keys.include?(key.to_s) obj[key] = "REDACTED" elsif value.is_a?(Hash) || value.is_a?(Array) obj[key] = redact_sensitive(value, keys) end end elsif obj.is_a?(Array) obj.map! do |item| if item.is_a?(Hash) || item.is_a?(Array) redact_sensitive(item, keys) else item end end end obj end
[ "def", "redact_sensitive", "(", "obj", ",", "keys", "=", "nil", ")", "keys", "||=", "%w[", "password", "passwd", "pass", "api_key", "api_token", "access_key", "secret_key", "private_key", "secret", "routing_key", "access_token_read", "access_token_write", "access_toke...
Remove sensitive information from a hash (eg. passwords). By default, hash values will be redacted for the following keys: password, passwd, pass, api_key, api_token, access_key, secret_key, private_key, secret @param obj [Object] to redact sensitive value from. @param keys [Array] that indicate sensitive values. @return [Hash] hash with redacted sensitive values.
[ "Remove", "sensitive", "information", "from", "a", "hash", "(", "eg", ".", "passwords", ")", ".", "By", "default", "hash", "values", "will", "be", "redacted", "for", "the", "following", "keys", ":", "password", "passwd", "pass", "api_key", "api_token", "acce...
51319e4b58c8d9986f101ad71ff729aa3e51e951
https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/utilities.rb#L125-L159
train
Redact sensitive keys
[ 30522, 13366, 2417, 18908, 1035, 7591, 1006, 27885, 3501, 1010, 6309, 1027, 9152, 2140, 1007, 6309, 1064, 1064, 1027, 1003, 1059, 1031, 20786, 3413, 21724, 3413, 17928, 1035, 3145, 17928, 1035, 19204, 3229, 1035, 3145, 3595, 1035, 3145, 279...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/backend.rb
Azure::ApiManagement::Mgmt::V2018_01_01.Backend.reconnect_with_http_info
def reconnect_with_http_info(resource_group_name, service_name, backendid, parameters:nil, custom_headers:nil) reconnect_async(resource_group_name, service_name, backendid, parameters:parameters, custom_headers:custom_headers).value! end
ruby
def reconnect_with_http_info(resource_group_name, service_name, backendid, parameters:nil, custom_headers:nil) reconnect_async(resource_group_name, service_name, backendid, parameters:parameters, custom_headers:custom_headers).value! end
[ "def", "reconnect_with_http_info", "(", "resource_group_name", ",", "service_name", ",", "backendid", ",", "parameters", ":", "nil", ",", "custom_headers", ":", "nil", ")", "reconnect_async", "(", "resource_group_name", ",", "service_name", ",", "backendid", ",", "p...
Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param backendid [String] Identifier of the Backend entity. Must be unique in the current API Management service instance. @param parameters [BackendReconnectContract] Reconnect request parameters. @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.
[ "Notifies", "the", "APIM", "proxy", "to", "create", "a", "new", "connection", "to", "the", "backend", "after", "the", "specified", "timeout", ".", "If", "no", "timeout", "was", "specified", "timeout", "of", "2", "minutes", "is", "used", "." ]
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/backend.rb#L736-L738
train
Reconnects the specified virtual network connection to the specified backend.
[ 30522, 13366, 28667, 18256, 6593, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2326, 1035, 2171, 1010, 2067, 10497, 3593, 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...
appium/ruby_lib
lib/appium_lib/android/element/text.rb
Appium.Android.text
def text(value) return ele_index TEXT_VIEW, value if value.is_a? Numeric complex_find_contains TEXT_VIEW, value end
ruby
def text(value) return ele_index TEXT_VIEW, value if value.is_a? Numeric complex_find_contains TEXT_VIEW, value end
[ "def", "text", "(", "value", ")", "return", "ele_index", "TEXT_VIEW", ",", "value", "if", "value", ".", "is_a?", "Numeric", "complex_find_contains", "TEXT_VIEW", ",", "value", "end" ]
Find the first TextView that contains value or by index. @param value [String, Integer] the value to find. If int then the TextView at that index is returned. @return [TextView]
[ "Find", "the", "first", "TextView", "that", "contains", "value", "or", "by", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/element/text.rb#L25-L29
train
Find the text of the element with the given value.
[ 30522, 13366, 3793, 1006, 3643, 1007, 2709, 3449, 2063, 1035, 5950, 3793, 1035, 3193, 1010, 3643, 2065, 3643, 1012, 2003, 1035, 1037, 1029, 16371, 25531, 3375, 1035, 2424, 1035, 3397, 3793, 1035, 3193, 1010, 3643, 2203, 102, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb
Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.add_storage_account_with_http_info
def add_storage_account_with_http_info(resource_group_name, account_name, storage_account_name, parameters, custom_headers:nil) add_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers:custom_headers).value! end
ruby
def add_storage_account_with_http_info(resource_group_name, account_name, storage_account_name, parameters, custom_headers:nil) add_storage_account_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers:custom_headers).value! end
[ "def", "add_storage_account_with_http_info", "(", "resource_group_name", ",", "account_name", ",", "storage_account_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "add_storage_account_async", "(", "resource_group_name", ",", "account_name", ",", "storage_...
Updates the specified Data Lake Analytics account to add an Azure Storage account. @param resource_group_name [String] The name of the Azure resource group that contains the Data Lake Analytics account. @param account_name [String] The name of the Data Lake Analytics account to which to add the Azure Storage account. @param storage_account_name [String] The name of the Azure Storage account to add @param parameters [AddStorageAccountParameters] The parameters containing the access key and optional suffix for the Azure Storage Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Updates", "the", "specified", "Data", "Lake", "Analytics", "account", "to", "add", "an", "Azure", "Storage", "account", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb#L375-L377
train
Adds a storage account to the specified Data Lake Store account.
[ 30522, 13366, 5587, 1035, 5527, 1035, 4070, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 5527, 1035, 4070, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.cancel_at_management_group
def cancel_at_management_group(management_group_id, remediation_name, custom_headers:nil) response = cancel_at_management_group_async(management_group_id, remediation_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def cancel_at_management_group(management_group_id, remediation_name, custom_headers:nil) response = cancel_at_management_group_async(management_group_id, remediation_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "cancel_at_management_group", "(", "management_group_id", ",", "remediation_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "cancel_at_management_group_async", "(", "management_group_id", ",", "remediation_name", ",", "custom_headers", ":custom_headers"...
Cancels a 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.
[ "Cancels", "a", "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#L133-L136
train
Cancels a remediation at management group scope.
[ 30522, 13366, 17542, 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, 17542, 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
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.start_chaos
def start_chaos(chaos_parameters, timeout:60, custom_headers:nil) response = start_chaos_async(chaos_parameters, timeout:timeout, custom_headers:custom_headers).value! nil end
ruby
def start_chaos(chaos_parameters, timeout:60, custom_headers:nil) response = start_chaos_async(chaos_parameters, timeout:timeout, custom_headers:custom_headers).value! nil end
[ "def", "start_chaos", "(", "chaos_parameters", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "response", "=", "start_chaos_async", "(", "chaos_parameters", ",", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers", ")", ".", "...
Starts Chaos in the cluster. If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos parameters. If Chaos is already running when this call is made, the call fails with the error code FABRIC_E_CHAOS_ALREADY_RUNNING. Please refer to the article [Induce controlled Chaos in Service Fabric clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) for more details. @param chaos_parameters [ChaosParameters] Describes all the parameters to configure a Chaos run. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Starts", "Chaos", "in", "the", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L18534-L18537
train
Starts a Chaos operation.
[ 30522, 13366, 2707, 1035, 8488, 1006, 8488, 1035, 11709, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2707, 1035, 8488, 1035, 2004, 6038, 2278, 1006, 8488, 1035, 11709, 1010, 2051, 5833, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
github/licensed
lib/licensed/dependency_record.rb
Licensed.DependencyRecord.content
def content return if licenses.nil? || licenses.empty? licenses.map do |license| if license.is_a?(String) license elsif license.respond_to?(:[]) license["text"] end end.join end
ruby
def content return if licenses.nil? || licenses.empty? licenses.map do |license| if license.is_a?(String) license elsif license.respond_to?(:[]) license["text"] end end.join end
[ "def", "content", "return", "if", "licenses", ".", "nil?", "||", "licenses", ".", "empty?", "licenses", ".", "map", "do", "|", "license", "|", "if", "license", ".", "is_a?", "(", "String", ")", "license", "elsif", "license", ".", "respond_to?", "(", ":[]...
Returns the content used to compare two licenses using normalization from `Licensee::CotentHelper`
[ "Returns", "the", "content", "used", "to", "compare", "two", "licenses", "using", "normalization", "from", "Licensee", "::", "CotentHelper" ]
afba288df344e001d43e94ad9217635a011b79c2
https://github.com/github/licensed/blob/afba288df344e001d43e94ad9217635a011b79c2/lib/licensed/dependency_record.rb#L59-L68
train
Returns a string containing the content of the licenses
[ 30522, 13366, 4180, 2709, 2065, 15943, 1012, 9152, 2140, 1029, 1064, 1064, 15943, 1012, 4064, 1029, 15943, 1012, 4949, 2079, 1064, 6105, 1064, 2065, 6105, 1012, 2003, 1035, 1037, 1029, 1006, 5164, 1007, 6105, 3449, 5332, 2546, 6105, 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...