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_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb
Azure::SQL::Mgmt::V2017_03_01_preview.LongTermRetentionBackups.list_by_database_with_http_info
def list_by_database_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil) list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value! end
ruby
def list_by_database_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil) list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value! end
[ "def", "list_by_database_with_http_info", "(", "location_name", ",", "long_term_retention_server_name", ",", "long_term_retention_database_name", ",", "only_latest_per_database", ":", "nil", ",", "database_state", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_by...
Lists all long term retention backups for a database. @param location_name [String] The location of the database @param long_term_retention_server_name [String] The name of the server @param long_term_retention_database_name [String] The name of the database @param only_latest_per_database [Boolean] Whether or not to only get the latest backup for each database. @param database_state [LongTermRetentionDatabaseState] Whether to query against just live databases, just deleted databases, or all databases. Possible values include: 'All', 'Live', '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.
[ "Lists", "all", "long", "term", "retention", "backups", "for", "a", "database", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb#L206-L208
train
Gets the list of documents in a database.
[ 30522, 13366, 2862, 1035, 2011, 1035, 7809, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 3295, 1035, 2171, 1010, 2146, 1035, 2744, 1035, 20125, 1035, 8241, 1035, 2171, 1010, 2146, 1035, 2744, 1035, 20125, 1035, 7809, 1035, 2171, 1010, 2069, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sumoheavy/jira-ruby
lib/jira/base.rb
JIRA.Base.save
def save(attrs, path = url) begin save_status = save!(attrs, path) rescue JIRA::HTTPError => exception begin set_attrs_from_response(exception.response) # Merge error status generated by JIRA REST API rescue JSON::ParserError => parse_exception set_attrs('exception' => { 'class' => exception.response.class.name, 'code' => exception.response.code, 'message' => exception.response.message }) end # raise exception save_status = false end save_status end
ruby
def save(attrs, path = url) begin save_status = save!(attrs, path) rescue JIRA::HTTPError => exception begin set_attrs_from_response(exception.response) # Merge error status generated by JIRA REST API rescue JSON::ParserError => parse_exception set_attrs('exception' => { 'class' => exception.response.class.name, 'code' => exception.response.code, 'message' => exception.response.message }) end # raise exception save_status = false end save_status end
[ "def", "save", "(", "attrs", ",", "path", "=", "url", ")", "begin", "save_status", "=", "save!", "(", "attrs", ",", "path", ")", "rescue", "JIRA", "::", "HTTPError", "=>", "exception", "begin", "set_attrs_from_response", "(", "exception", ".", "response", ...
Saves the specified resource attributes by sending either a POST or PUT request to JIRA, depending on resource.new_record? Accepts an attributes hash of the values to be saved. Will return false if the request fails.
[ "Saves", "the", "specified", "resource", "attributes", "by", "sending", "either", "a", "POST", "or", "PUT", "request", "to", "JIRA", "depending", "on", "resource", ".", "new_record?" ]
25e896f227ab81c528e9678708cb546d2f62f018
https://github.com/sumoheavy/jira-ruby/blob/25e896f227ab81c528e9678708cb546d2f62f018/lib/jira/base.rb#L359-L376
train
Save the attributes to the specified path.
[ 30522, 13366, 3828, 1006, 2012, 16344, 2015, 1010, 4130, 1027, 24471, 2140, 1007, 4088, 3828, 1035, 3570, 1027, 3828, 999, 1006, 2012, 16344, 2015, 1010, 4130, 1007, 5343, 10147, 2527, 1024, 1024, 8299, 2121, 29165, 1027, 1028, 6453, 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...
mojombo/chronic
lib/chronic/handlers.rb
Chronic.Handlers.handle_o_r_s_r
def handle_o_r_s_r(tokens, options) outer_span = get_anchor([tokens[3]], options) handle_orr(tokens[0..1], outer_span, options) end
ruby
def handle_o_r_s_r(tokens, options) outer_span = get_anchor([tokens[3]], options) handle_orr(tokens[0..1], outer_span, options) end
[ "def", "handle_o_r_s_r", "(", "tokens", ",", "options", ")", "outer_span", "=", "get_anchor", "(", "[", "tokens", "[", "3", "]", "]", ",", "options", ")", "handle_orr", "(", "tokens", "[", "0", "..", "1", "]", ",", "outer_span", ",", "options", ")", ...
Handle ordinal/repeater/separator/repeater
[ "Handle", "ordinal", "/", "repeater", "/", "separator", "/", "repeater" ]
2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c
https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L507-L510
train
Handle the ORR and S_R tokens
[ 30522, 13366, 5047, 1035, 1051, 1035, 1054, 1035, 1055, 1035, 1054, 1006, 19204, 2015, 1010, 7047, 1007, 6058, 1035, 8487, 1027, 2131, 1035, 8133, 1006, 1031, 19204, 2015, 1031, 1017, 1033, 1033, 1010, 7047, 1007, 5047, 1035, 26914, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/node_reports.rb
Azure::Automation::Mgmt::V2015_10_31.NodeReports.list_by_node_with_http_info
def list_by_node_with_http_info(resource_group_name, automation_account_name, node_id, filter:nil, custom_headers:nil) list_by_node_async(resource_group_name, automation_account_name, node_id, filter:filter, custom_headers:custom_headers).value! end
ruby
def list_by_node_with_http_info(resource_group_name, automation_account_name, node_id, filter:nil, custom_headers:nil) list_by_node_async(resource_group_name, automation_account_name, node_id, filter:filter, custom_headers:custom_headers).value! end
[ "def", "list_by_node_with_http_info", "(", "resource_group_name", ",", "automation_account_name", ",", "node_id", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_by_node_async", "(", "resource_group_name", ",", "automation_account_name", ",", "n...
Retrieve the Dsc node report list by node id. @param resource_group_name [String] Name of an Azure Resource group. @param automation_account_name [String] The name of the automation account. @param node_id [String] The parameters supplied to the list operation. @param filter [String] The filter to apply on the operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Retrieve", "the", "Dsc", "node", "report", "list", "by", "node", "id", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/node_reports.rb#L53-L55
train
Gets the list of nodes under the specified automation account.
[ 30522, 13366, 2862, 1035, 2011, 1035, 13045, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 19309, 1035, 4070, 1035, 2171, 1010, 13045, 1035, 8909, 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...
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.begin_create_or_update
def begin_create_or_update(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_create_or_update(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_create_or_update", "(", "resource_group_name", ",", "gallery_name", ",", "gallery_image_name", ",", "gallery_image", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_create_or_update_async", "(", "resource_group_name", ",", "gallery_name", ","...
Create or update a gallery Image Definition. @param resource_group_name [String] The name of the resource group. @param gallery_name [String] The name of the Shared Image Gallery in which the Image Definition is to be created. @param gallery_image_name [String] The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. @param gallery_image [GalleryImage] Parameters supplied to the create or update gallery image operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [GalleryImage] operation results.
[ "Create", "or", "update", "a", "gallery", "Image", "Definition", "." ]
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#L338-L341
train
Creates or updates a gallery image.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3916, 1035, 2171, 1010, 3916, 1035, 3746, 1035, 2171, 1010, 3916, 1035, 3746, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb
Aws::EC2.Resource.create_volume
def create_volume(options = {}) resp = @client.create_volume(options) Volume.new( id: resp.data.volume_id, data: resp.data, client: @client ) end
ruby
def create_volume(options = {}) resp = @client.create_volume(options) Volume.new( id: resp.data.volume_id, data: resp.data, client: @client ) end
[ "def", "create_volume", "(", "options", "=", "{", "}", ")", "resp", "=", "@client", ".", "create_volume", "(", "options", ")", "Volume", ".", "new", "(", "id", ":", "resp", ".", "data", ".", "volume_id", ",", "data", ":", "resp", ".", "data", ",", ...
@example Request syntax with placeholder values volume = ec2.create_volume({ availability_zone: "String", # required encrypted: false, iops: 1, kms_key_id: "String", size: 1, snapshot_id: "String", volume_type: "standard", # accepts standard, io1, gp2, sc1, st1 dry_run: false, tag_specifications: [ { resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, elastic-ip, fleet, fpga-image, host-reservation, image, instance, internet-gateway, launch-template, natgateway, network-acl, network-interface, reserved-instances, route-table, security-group, snapshot, spot-instances-request, subnet, transit-gateway, transit-gateway-attachment, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway tags: [ { key: "String", value: "String", }, ], }, ], }) @param [Hash] options ({}) @option options [required, String] :availability_zone The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you. @option options [Boolean] :encrypted Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see [Amazon EBS Encryption][1] in the *Amazon Elastic Compute Cloud User Guide*. [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html @option options [Integer] :iops The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 50 IOPS/GiB. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on [Nitro-based instances][1]. Other instance families guarantee performance up to 32,000 IOPS. For more information, see [Amazon EBS Volume Types][2] in the *Amazon Elastic Compute Cloud User Guide*. This parameter is valid only for Provisioned IOPS SSD (io1) volumes. [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances [2]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html @option options [String] :kms_key_id An identifier for the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. If a `KmsKeyId` is specified, the `Encrypted` flag must also be set. The CMK identifier may be provided in any of the following formats: * Key ID * Key alias. The alias ARN contains the `arn:aws:kms` namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the `alias` namespace, and then the CMK alias. For example, arn:aws:kms:*us-east-1*\:*012345678910*\:alias/*ExampleAlias*. * ARN using key ID. The ID ARN contains the `arn:aws:kms` namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the `key` namespace, and then the CMK ID. For example, arn:aws:kms:*us-east-1*\:*012345678910*\:key/*abcd1234-a123-456a-a12b-a123b4cd56ef*. * ARN using key alias. The alias ARN contains the `arn:aws:kms` namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the `alias` namespace, and then the CMK alias. For example, arn:aws:kms:*us-east-1*\:*012345678910*\:alias/*ExampleAlias*. AWS parses `KmsKeyId` asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. The action will eventually fail. @option options [Integer] :size The size of the volume, in GiBs. Constraints: 1-16,384 for `gp2`, 4-16,384 for `io1`, 500-16,384 for `st1`, 500-16,384 for `sc1`, and 1-1,024 for `standard`. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size. Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size. <note markdown="1"> At least one of Size or SnapshotId are required. </note> @option options [String] :snapshot_id The snapshot from which to create the volume. <note markdown="1"> At least one of Size or SnapshotId are required. </note> @option options [String] :volume_type The volume type. This can be `gp2` for General Purpose SSD, `io1` for Provisioned IOPS SSD, `st1` for Throughput Optimized HDD, `sc1` for Cold HDD, or `standard` for Magnetic volumes. Defaults: If no volume type is specified, the default is `standard` in us-east-1, eu-west-1, eu-central-1, us-west-2, us-west-1, sa-east-1, ap-northeast-1, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-south-1, us-gov-west-1, and cn-north-1. In all other Regions, EBS defaults to `gp2`. @option options [Boolean] :dry_run Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. @option options [Array<Types::TagSpecification>] :tag_specifications The tags to apply to the volume during creation. @return [Volume]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L961-L968
train
Create a new volume
[ 30522, 13366, 3443, 1035, 3872, 1006, 7047, 1027, 1063, 1065, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 3872, 1006, 7047, 1007, 3872, 1012, 2047, 1006, 8909, 1024, 24501, 2361, 1012, 2951, 1012, 3872, 1035, 8909, 1010, 2951, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.add_intent_with_http_info
def add_intent_with_http_info(app_id, version_id, intent_create_object, custom_headers:nil) add_intent_async(app_id, version_id, intent_create_object, custom_headers:custom_headers).value! end
ruby
def add_intent_with_http_info(app_id, version_id, intent_create_object, custom_headers:nil) add_intent_async(app_id, version_id, intent_create_object, custom_headers:custom_headers).value! end
[ "def", "add_intent_with_http_info", "(", "app_id", ",", "version_id", ",", "intent_create_object", ",", "custom_headers", ":", "nil", ")", "add_intent_async", "(", "app_id", ",", "version_id", ",", "intent_create_object", ",", "custom_headers", ":custom_headers", ")", ...
Adds an intent to a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param intent_create_object [ModelCreateObject] A model object containing the name of the new intent. @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.
[ "Adds", "an", "intent", "to", "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#L53-L55
train
Adds an intent to a version of the application.
[ 30522, 13366, 5587, 1035, 7848, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 7848, 1035, 3443, 1035, 4874, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 5587, 1035, 7848, 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...
plataformatec/simple_form
lib/simple_form/form_builder.rb
SimpleForm.FormBuilder.default_input_type
def default_input_type(attribute_name, column, options) return options[:as].to_sym if options[:as] custom_type = find_custom_type(attribute_name.to_s) and return custom_type return :select if options[:collection] input_type = column.try(:type) case input_type when :timestamp :datetime when :string, :citext, nil case attribute_name.to_s when /(?:\b|\W|_)password(?:\b|\W|_)/ then :password when /(?:\b|\W|_)time_zone(?:\b|\W|_)/ then :time_zone when /(?:\b|\W|_)country(?:\b|\W|_)/ then :country when /(?:\b|\W|_)email(?:\b|\W|_)/ then :email when /(?:\b|\W|_)phone(?:\b|\W|_)/ then :tel when /(?:\b|\W|_)url(?:\b|\W|_)/ then :url else file_method?(attribute_name) ? :file : (input_type || :string) end else input_type end end
ruby
def default_input_type(attribute_name, column, options) return options[:as].to_sym if options[:as] custom_type = find_custom_type(attribute_name.to_s) and return custom_type return :select if options[:collection] input_type = column.try(:type) case input_type when :timestamp :datetime when :string, :citext, nil case attribute_name.to_s when /(?:\b|\W|_)password(?:\b|\W|_)/ then :password when /(?:\b|\W|_)time_zone(?:\b|\W|_)/ then :time_zone when /(?:\b|\W|_)country(?:\b|\W|_)/ then :country when /(?:\b|\W|_)email(?:\b|\W|_)/ then :email when /(?:\b|\W|_)phone(?:\b|\W|_)/ then :tel when /(?:\b|\W|_)url(?:\b|\W|_)/ then :url else file_method?(attribute_name) ? :file : (input_type || :string) end else input_type end end
[ "def", "default_input_type", "(", "attribute_name", ",", "column", ",", "options", ")", "return", "options", "[", ":as", "]", ".", "to_sym", "if", "options", "[", ":as", "]", "custom_type", "=", "find_custom_type", "(", "attribute_name", ".", "to_s", ")", "a...
Attempt to guess the better input type given the defined options. By default always fallback to the user :as option, or to a :select when a collection is given.
[ "Attempt", "to", "guess", "the", "better", "input", "type", "given", "the", "defined", "options", ".", "By", "default", "always", "fallback", "to", "the", "user", ":", "as", "option", "or", "to", "a", ":", "select", "when", "a", "collection", "is", "give...
4dd9261ebb392e46a9beeefe8d83081e7c6e56b5
https://github.com/plataformatec/simple_form/blob/4dd9261ebb392e46a9beeefe8d83081e7c6e56b5/lib/simple_form/form_builder.rb#L544-L567
train
Returns the default input type for the given attribute.
[ 30522, 13366, 12398, 1035, 7953, 1035, 2828, 1006, 17961, 1035, 2171, 1010, 5930, 1010, 7047, 1007, 2709, 7047, 1031, 1024, 2004, 1033, 1012, 2000, 1035, 25353, 2213, 2065, 7047, 1031, 1024, 2004, 1033, 7661, 1035, 2828, 1027, 2424, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_resources_management/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb
Azure::ResourcesManagement::Mgmt::V2018_01_01_preview.ManagementGroups.begin_create_or_update
def begin_create_or_update(group_id, cache_control:'no-cache', custom_headers:nil) response = begin_create_or_update_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_create_or_update(group_id, cache_control:'no-cache', custom_headers:nil) response = begin_create_or_update_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_create_or_update", "(", "group_id", ",", "cache_control", ":", "'no-cache'", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_create_or_update_async", "(", "group_id", ",", "cache_control", ":cache_control", ",", "custom_headers", ":custom_h...
Create or update a management group. If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated. @param group_id [String] Management Group ID. @param cache_control [String] Indicates that the request shouldn't utilize any caches. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Object] operation results.
[ "Create", "or", "update", "a", "management", "group", ".", "If", "a", "management", "group", "is", "already", "created", "and", "a", "subsequent", "create", "request", "is", "issued", "with", "different", "properties", "the", "management", "group", "properties",...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources_management/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb#L462-L465
train
Creates or updates a group.
[ 30522, 13366, 4088, 1035, 3443, 1035, 2030, 1035, 10651, 1006, 2177, 1035, 8909, 1010, 17053, 1035, 2491, 1024, 1005, 2053, 1011, 17053, 1005, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, 1035, 3443, 1035, 2030, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
decidim/decidim
decidim-core/app/helpers/decidim/decidim_form_helper.rb
Decidim.DecidimFormHelper.decidim_form_for
def decidim_form_for(record, options = {}, &block) options[:data] ||= {} options[:data].update(abide: true, "live-validate" => true, "validate-on-blur" => true) options[:html] ||= {} options[:html].update(novalidate: true) output = "" output += base_error_messages(record).to_s output += form_for(record, options, &block).to_s output.html_safe end
ruby
def decidim_form_for(record, options = {}, &block) options[:data] ||= {} options[:data].update(abide: true, "live-validate" => true, "validate-on-blur" => true) options[:html] ||= {} options[:html].update(novalidate: true) output = "" output += base_error_messages(record).to_s output += form_for(record, options, &block).to_s output.html_safe end
[ "def", "decidim_form_for", "(", "record", ",", "options", "=", "{", "}", ",", "&", "block", ")", "options", "[", ":data", "]", "||=", "{", "}", "options", "[", ":data", "]", ".", "update", "(", "abide", ":", "true", ",", "\"live-validate\"", "=>", "t...
A custom form for that injects client side validations with Abide. record - The object to build the form for. options - A Hash of options to pass to the form builder. &block - The block to execute as content of the form. Returns a String.
[ "A", "custom", "form", "for", "that", "injects", "client", "side", "validations", "with", "Abide", "." ]
6e2b14e559a63088669904e3c5c49a5180700cf7
https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/decidim_form_helper.rb#L13-L25
train
Returns the form for the given record.
[ 30522, 13366, 11703, 28173, 2213, 1035, 2433, 1035, 2005, 1006, 2501, 1010, 7047, 1027, 1063, 1065, 1010, 1004, 3796, 1007, 7047, 1031, 1024, 2951, 1033, 1064, 1064, 1027, 1063, 1065, 7047, 1031, 1024, 2951, 1033, 1012, 10651, 1006, 11113, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-admin
lib/jekyll-admin/urlable.rb
JekyllAdmin.URLable.http_url
def http_url return if is_a?(Jekyll::Collection) || is_a?(JekyllAdmin::DataFile) return if is_a?(Jekyll::Document) && !collection.write? @http_url ||= Addressable::URI.new( :scheme => scheme, :host => host, :port => port, :path => path_with_base(JekyllAdmin.site.config["baseurl"], url) ).normalize.to_s end
ruby
def http_url return if is_a?(Jekyll::Collection) || is_a?(JekyllAdmin::DataFile) return if is_a?(Jekyll::Document) && !collection.write? @http_url ||= Addressable::URI.new( :scheme => scheme, :host => host, :port => port, :path => path_with_base(JekyllAdmin.site.config["baseurl"], url) ).normalize.to_s end
[ "def", "http_url", "return", "if", "is_a?", "(", "Jekyll", "::", "Collection", ")", "||", "is_a?", "(", "JekyllAdmin", "::", "DataFile", ")", "return", "if", "is_a?", "(", "Jekyll", "::", "Document", ")", "&&", "!", "collection", ".", "write?", "@http_url"...
Absolute URL to the HTTP(S) rendered/served representation of this resource
[ "Absolute", "URL", "to", "the", "HTTP", "(", "S", ")", "rendered", "/", "served", "representation", "of", "this", "resource" ]
bc053b3b93faba679e8666091c42c47970e3bb5e
https://github.com/jekyll/jekyll-admin/blob/bc053b3b93faba679e8666091c42c47970e3bb5e/lib/jekyll-admin/urlable.rb#L7-L14
train
Returns the HTTP URL for the current request.
[ 30522, 13366, 8299, 1035, 24471, 2140, 2709, 2065, 2003, 1035, 1037, 1029, 1006, 15333, 4801, 3363, 1024, 1024, 3074, 1007, 1064, 1064, 2003, 1035, 1037, 1029, 1006, 15333, 4801, 4571, 22117, 2378, 1024, 1024, 2951, 8873, 2571, 1007, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
puppetlabs/puppet
lib/puppet/util/rdoc/generators/puppet_generator.rb
Generators.PuppetGenerator.gen_sub_directories
def gen_sub_directories super File.makedirs(MODULE_DIR) File.makedirs(NODE_DIR) File.makedirs(PLUGIN_DIR) rescue $stderr.puts $ERROR_INFO.message exit 1 end
ruby
def gen_sub_directories super File.makedirs(MODULE_DIR) File.makedirs(NODE_DIR) File.makedirs(PLUGIN_DIR) rescue $stderr.puts $ERROR_INFO.message exit 1 end
[ "def", "gen_sub_directories", "super", "File", ".", "makedirs", "(", "MODULE_DIR", ")", "File", ".", "makedirs", "(", "NODE_DIR", ")", "File", ".", "makedirs", "(", "PLUGIN_DIR", ")", "rescue", "$stderr", ".", "puts", "$ERROR_INFO", ".", "message", "exit", "...
generate all the subdirectories, modules, classes and files
[ "generate", "all", "the", "subdirectories", "modules", "classes", "and", "files" ]
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/rdoc/generators/puppet_generator.rb#L195-L203
train
Create the directories for the current project.
[ 30522, 13366, 8991, 1035, 4942, 1035, 2472, 3111, 3565, 5371, 1012, 2191, 4305, 2869, 1006, 11336, 1035, 16101, 1007, 5371, 1012, 2191, 4305, 2869, 30524, 2099, 1012, 8509, 1002, 7561, 1035, 18558, 1012, 4471, 6164, 1015, 2203, 102, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/haml-lint
lib/haml_lint/options.rb
HamlLint.Options.parse
def parse(args) @options = {} OptionParser.new do |parser| parser.banner = "Usage: #{APP_NAME} [options] [file1, file2, ...]" add_linter_options parser add_report_options parser add_file_options parser add_logger_options parser add_info_options parser end.parse!(args) # Any remaining arguments are assumed to be files @options[:files] = args.empty? ? ['.'] : args @options rescue OptionParser::InvalidOption => e raise Exceptions::InvalidCLIOption, e.message, e.backtrace end
ruby
def parse(args) @options = {} OptionParser.new do |parser| parser.banner = "Usage: #{APP_NAME} [options] [file1, file2, ...]" add_linter_options parser add_report_options parser add_file_options parser add_logger_options parser add_info_options parser end.parse!(args) # Any remaining arguments are assumed to be files @options[:files] = args.empty? ? ['.'] : args @options rescue OptionParser::InvalidOption => e raise Exceptions::InvalidCLIOption, e.message, e.backtrace end
[ "def", "parse", "(", "args", ")", "@options", "=", "{", "}", "OptionParser", ".", "new", "do", "|", "parser", "|", "parser", ".", "banner", "=", "\"Usage: #{APP_NAME} [options] [file1, file2, ...]\"", "add_linter_options", "parser", "add_report_options", "parser", "...
Parses command line options into an options hash. @param args [Array<String>] arguments passed via the command line @return [Hash] parsed options
[ "Parses", "command", "line", "options", "into", "an", "options", "hash", "." ]
024c773667e54cf88db938c2b368977005d70ee8
https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/options.rb#L12-L31
train
Parse command line arguments
[ 30522, 13366, 11968, 3366, 1006, 12098, 5620, 1007, 1030, 7047, 1027, 1063, 1065, 5724, 19362, 8043, 1012, 2047, 2079, 1064, 11968, 8043, 1064, 11968, 8043, 1012, 9484, 1027, 1000, 8192, 1024, 1001, 1063, 10439, 1035, 2171, 1065, 1031, 7047...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sds/haml-lint
lib/haml_lint/linter/rubocop.rb
HamlLint.Linter::RuboCop.extract_lints_from_offenses
def extract_lints_from_offenses(offenses, source_map) dummy_node = Struct.new(:line) offenses.reject { |offense| Array(config['ignored_cops']).include?(offense.cop_name) } .each do |offense| record_lint(dummy_node.new(source_map[offense.line]), offense.message, offense.severity.name) end end
ruby
def extract_lints_from_offenses(offenses, source_map) dummy_node = Struct.new(:line) offenses.reject { |offense| Array(config['ignored_cops']).include?(offense.cop_name) } .each do |offense| record_lint(dummy_node.new(source_map[offense.line]), offense.message, offense.severity.name) end end
[ "def", "extract_lints_from_offenses", "(", "offenses", ",", "source_map", ")", "dummy_node", "=", "Struct", ".", "new", "(", ":line", ")", "offenses", ".", "reject", "{", "|", "offense", "|", "Array", "(", "config", "[", "'ignored_cops'", "]", ")", ".", "i...
Aggregates RuboCop offenses and converts them to {HamlLint::Lint}s suitable for reporting. @param offenses [Array<RuboCop::Cop::Offense>] @param source_map [Hash]
[ "Aggregates", "RuboCop", "offenses", "and", "converts", "them", "to", "{", "HamlLint", "::", "Lint", "}", "s", "suitable", "for", "reporting", "." ]
024c773667e54cf88db938c2b368977005d70ee8
https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/linter/rubocop.rb#L68-L76
train
Extract lints from offenses
[ 30522, 13366, 14817, 1035, 11409, 3215, 1035, 2013, 1035, 25173, 1006, 25173, 1010, 3120, 1035, 4949, 1007, 24369, 1035, 13045, 1027, 2358, 6820, 6593, 1012, 2047, 1006, 1024, 2240, 1007, 25173, 1012, 15454, 1063, 1064, 10048, 1064, 9140, 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_network/lib/2018-07-01/generated/azure_mgmt_network/route_filters.rb
Azure::Network::Mgmt::V2018_07_01.RouteFilters.create_or_update
def create_or_update(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update", "(", "resource_group_name", ",", "route_filter_name", ",", "route_filter_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_async", "(", "resource_group_name", ",", "route_filter_name", ",", "route_filter_param...
Creates or updates a route filter in a specified resource group. @param resource_group_name [String] The name of the resource group. @param route_filter_name [String] The name of the route filter. @param route_filter_parameters [RouteFilter] Parameters supplied to the create or update route filter operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [RouteFilter] operation results.
[ "Creates", "or", "updates", "a", "route", "filter", "in", "a", "specified", "resource", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filters.rb#L172-L175
train
Creates or updates a route filter.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2799, 1035, 11307, 1035, 2171, 1010, 2799, 1035, 11307, 1035, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 2030,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb
Azure::Scheduler::Mgmt::V2016_03_01.Jobs.list_job_history_with_http_info
def list_job_history_with_http_info(resource_group_name, job_collection_name, job_name, top:nil, skip:nil, filter:nil, custom_headers:nil) list_job_history_async(resource_group_name, job_collection_name, job_name, top:top, skip:skip, filter:filter, custom_headers:custom_headers).value! end
ruby
def list_job_history_with_http_info(resource_group_name, job_collection_name, job_name, top:nil, skip:nil, filter:nil, custom_headers:nil) list_job_history_async(resource_group_name, job_collection_name, job_name, top:top, skip:skip, filter:filter, custom_headers:custom_headers).value! end
[ "def", "list_job_history_with_http_info", "(", "resource_group_name", ",", "job_collection_name", ",", "job_name", ",", "top", ":", "nil", ",", "skip", ":", "nil", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_job_history_async", "(", ...
Lists job history. @param resource_group_name [String] The resource group name. @param job_collection_name [String] The job collection name. @param job_name [String] The job name. @param top [Integer] the number of job history to request, in the of range of [1..100]. @param skip [Integer] The (0-based) index of the job history list from which to begin requesting entries. @param filter [String] The filter to apply on the job state. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Lists", "job", "history", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/jobs.rb#L660-L662
train
Gets the job history for a job.
[ 30522, 13366, 2862, 1035, 3105, 1035, 2381, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3105, 1035, 3074, 1035, 2171, 1010, 3105, 1035, 2171, 1010, 2327, 1024, 9152, 2140, 1010, 13558, 1024, 9152, 2140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/transformers.rb
Sprockets.Transformers.expand_transform_accepts
def expand_transform_accepts(parsed_accepts) accepts = [] parsed_accepts.each do |(type, q)| accepts.push([type, q]) config[:inverted_transformers][type].each do |subtype| accepts.push([subtype, q * 0.8]) end end accepts end
ruby
def expand_transform_accepts(parsed_accepts) accepts = [] parsed_accepts.each do |(type, q)| accepts.push([type, q]) config[:inverted_transformers][type].each do |subtype| accepts.push([subtype, q * 0.8]) end end accepts end
[ "def", "expand_transform_accepts", "(", "parsed_accepts", ")", "accepts", "=", "[", "]", "parsed_accepts", ".", "each", "do", "|", "(", "type", ",", "q", ")", "|", "accepts", ".", "push", "(", "[", "type", ",", "q", "]", ")", "config", "[", ":inverted_...
Internal: Expand accept type list to include possible transformed types. parsed_accepts - Array of accept q values Examples expand_transform_accepts([['application/javascript', 1.0]]) # => [['application/javascript', 1.0], ['text/coffeescript', 0.8]] Returns an expanded Array of q values.
[ "Internal", ":", "Expand", "accept", "type", "list", "to", "include", "possible", "transformed", "types", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/transformers.rb#L97-L106
train
Expand the accept list
[ 30522, 13366, 7818, 1035, 10938, 1035, 13385, 1006, 11968, 6924, 1035, 13385, 1007, 13385, 1027, 1031, 1033, 11968, 6924, 1035, 13385, 1012, 2169, 2079, 1064, 1006, 2828, 1010, 1053, 1007, 1064, 13385, 1012, 5245, 1006, 1031, 2828, 1010, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.update_iap_family!
def update_iap_family!(app_id: nil, family_id: nil, data: nil) with_tunes_retry do r = request(:put) do |req| req.url("ra/apps/#{app_id}/iaps/family/#{family_id}/") req.body = data.to_json req.headers['Content-Type'] = 'application/json' end handle_itc_response(r.body) end end
ruby
def update_iap_family!(app_id: nil, family_id: nil, data: nil) with_tunes_retry do r = request(:put) do |req| req.url("ra/apps/#{app_id}/iaps/family/#{family_id}/") req.body = data.to_json req.headers['Content-Type'] = 'application/json' end handle_itc_response(r.body) end end
[ "def", "update_iap_family!", "(", "app_id", ":", "nil", ",", "family_id", ":", "nil", ",", "data", ":", "nil", ")", "with_tunes_retry", "do", "r", "=", "request", "(", ":put", ")", "do", "|", "req", "|", "req", ".", "url", "(", "\"ra/apps/#{app_id}/iaps/...
updates an In-App-Purchases-Family
[ "updates", "an", "In", "-", "App", "-", "Purchases", "-", "Family" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L1227-L1236
train
Update an existing IAP family
[ 30522, 13366, 10651, 1035, 24264, 2361, 1035, 2155, 999, 1006, 10439, 1035, 8909, 1024, 9152, 2140, 1010, 2155, 1035, 8909, 1024, 9152, 2140, 1010, 2951, 1024, 9152, 2140, 1007, 2007, 1035, 13281, 1035, 2128, 11129, 2079, 1054, 1027, 5227, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
randym/axlsx
lib/axlsx/workbook/worksheet/worksheet.rb
Axlsx.Worksheet.[]
def [](cell_def) return rows[cell_def] if cell_def.is_a?(Integer) parts = cell_def.split(':').map{ |part| name_to_cell part } if parts.size == 1 parts.first else range(*parts) end end
ruby
def [](cell_def) return rows[cell_def] if cell_def.is_a?(Integer) parts = cell_def.split(':').map{ |part| name_to_cell part } if parts.size == 1 parts.first else range(*parts) end end
[ "def", "[]", "(", "cell_def", ")", "return", "rows", "[", "cell_def", "]", "if", "cell_def", ".", "is_a?", "(", "Integer", ")", "parts", "=", "cell_def", ".", "split", "(", "':'", ")", ".", "map", "{", "|", "part", "|", "name_to_cell", "part", "}", ...
Returns the cell or cells defined using excel style A1:B3 references. @param [String|Integer] cell_def the string defining the cell or range of cells, or the rownumber @return [Cell, Array]
[ "Returns", "the", "cell", "or", "cells", "defined", "using", "excel", "style", "A1", ":", "B3", "references", "." ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/worksheet.rb#L589-L597
train
Get the index of a cell definition
[ 30522, 13366, 1031, 1033, 1006, 3526, 1035, 13366, 1007, 2709, 10281, 1031, 3526, 1035, 13366, 1033, 2065, 3526, 1035, 13366, 1012, 2003, 1035, 1037, 1029, 1006, 16109, 1007, 3033, 1027, 3526, 1035, 13366, 1012, 3975, 1006, 1005, 1024, 1005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-12-01/generated/azure_mgmt_network/p2s_vpn_gateways.rb
Azure::Network::Mgmt::V2018_12_01.P2sVpnGateways.delete
def delete(resource_group_name, gateway_name, custom_headers:nil) response = delete_async(resource_group_name, gateway_name, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, gateway_name, custom_headers:nil) response = delete_async(resource_group_name, gateway_name, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "gateway_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "gateway_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", "end" ]
Deletes a virtual wan p2s vpn gateway. @param resource_group_name [String] The resource group name of the P2SVpnGateway. @param gateway_name [String] The name of the gateway. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "a", "virtual", "wan", "p2s", "vpn", "gateway", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-12-01/generated/azure_mgmt_network/p2s_vpn_gateways.rb#L225-L228
train
Deletes a virtual network gateway.
[ 30522, 13366, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11909, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 11909,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb
Azure::Web::Mgmt::V2016_03_01.WebSiteManagementClient.list_skus
def list_skus(custom_headers:nil) response = list_skus_async(custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_skus(custom_headers:nil) response = list_skus_async(custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_skus", "(", "custom_headers", ":", "nil", ")", "response", "=", "list_skus_async", "(", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", ".", "nil?", "end" ]
List all SKUs. List all SKUs. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [SkuInfos] operation results.
[ "List", "all", "SKUs", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb#L1137-L1140
train
Gets the list of skus for the current environment.
[ 30522, 13366, 2862, 1035, 15315, 2271, 1006, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 15315, 2271, 1035, 2004, 6038, 2278, 1006, 7661, 1035, 20346, 2015, 1024, 7661, 1035, 20346, 2015, 1007, 1012, 3643, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongoid
lib/mongoid/serializable.rb
Mongoid.Serializable.field_names
def field_names(options) names = (as_attributes.keys + attribute_names).uniq.sort only = Array.wrap(options[:only]).map(&:to_s) except = Array.wrap(options[:except]).map(&:to_s) except |= ['_type'] unless Mongoid.include_type_for_serialization if !only.empty? names &= only elsif !except.empty? names -= except end names end
ruby
def field_names(options) names = (as_attributes.keys + attribute_names).uniq.sort only = Array.wrap(options[:only]).map(&:to_s) except = Array.wrap(options[:except]).map(&:to_s) except |= ['_type'] unless Mongoid.include_type_for_serialization if !only.empty? names &= only elsif !except.empty? names -= except end names end
[ "def", "field_names", "(", "options", ")", "names", "=", "(", "as_attributes", ".", "keys", "+", "attribute_names", ")", ".", "uniq", ".", "sort", "only", "=", "Array", ".", "wrap", "(", "options", "[", ":only", "]", ")", ".", "map", "(", ":to_s", ")...
Get the names of all fields that will be serialized. @api private @example Get all the field names. document.send(:field_names) @return [ Array<String> ] The names of the fields. @since 3.0.0
[ "Get", "the", "names", "of", "all", "fields", "that", "will", "be", "serialized", "." ]
56976e32610f4c2450882b0bfe14da099f0703f4
https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/serializable.rb#L69-L82
train
Returns the field names for this object.
[ 30522, 13366, 2492, 1035, 3415, 1006, 7047, 1007, 3415, 1027, 1006, 2004, 1035, 12332, 1012, 6309, 1009, 17961, 1035, 3415, 1007, 1012, 4895, 18515, 1012, 4066, 2069, 1027, 9140, 1012, 10236, 1006, 7047, 1031, 1024, 2069, 1033, 1007, 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...
DataDog/dogstatsd-ruby
lib/datadog/statsd.rb
Datadog.Statsd.gauge
def gauge(stat, value, opts=EMPTY_OPTIONS) opts = {:sample_rate => opts} if opts.is_a? Numeric send_stats stat, value, GAUGE_TYPE, opts end
ruby
def gauge(stat, value, opts=EMPTY_OPTIONS) opts = {:sample_rate => opts} if opts.is_a? Numeric send_stats stat, value, GAUGE_TYPE, opts end
[ "def", "gauge", "(", "stat", ",", "value", ",", "opts", "=", "EMPTY_OPTIONS", ")", "opts", "=", "{", ":sample_rate", "=>", "opts", "}", "if", "opts", ".", "is_a?", "Numeric", "send_stats", "stat", ",", "value", ",", "GAUGE_TYPE", ",", "opts", "end" ]
Sends an arbitary gauge value for the given stat to the statsd server. This is useful for recording things like available disk space, memory usage, and the like, which have different semantics than counters. @param [String] stat stat name. @param [Numeric] value gauge value. @param [Hash] opts the options to create the metric with @option opts [Numeric] :sample_rate sample rate, 1 for always @option opts [Array<String>] :tags An array of tags @example Report the current user count: $statsd.gauge('user.count', User.count)
[ "Sends", "an", "arbitary", "gauge", "value", "for", "the", "given", "stat", "to", "the", "statsd", "server", "." ]
0ea2a4d011958ad0d092654cae950e64b6475077
https://github.com/DataDog/dogstatsd-ruby/blob/0ea2a4d011958ad0d092654cae950e64b6475077/lib/datadog/statsd.rb#L294-L297
train
Send a gauge statistic
[ 30522, 13366, 7633, 1006, 28093, 1010, 3643, 1010, 23569, 2015, 1027, 4064, 1035, 7047, 1007, 23569, 2015, 1027, 1063, 1024, 7099, 1035, 3446, 1027, 1028, 23569, 2015, 1065, 2065, 23569, 2015, 1012, 2003, 1035, 1037, 1029, 16371, 25531, 460...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb
Azure::KeyVault::V2016_10_01.KeyVaultClient.restore_key
def restore_key(vault_base_url, key_bundle_backup, custom_headers:nil) response = restore_key_async(vault_base_url, key_bundle_backup, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def restore_key(vault_base_url, key_bundle_backup, custom_headers:nil) response = restore_key_async(vault_base_url, key_bundle_backup, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "restore_key", "(", "vault_base_url", ",", "key_bundle_backup", ",", "custom_headers", ":", "nil", ")", "response", "=", "restore_key_async", "(", "vault_base_url", ",", "key_bundle_backup", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "respons...
Restores a backed up key to a vault. Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier, attributes and access control policies. The RESTORE operation may be used to import a previously backed up key. Individual versions of a key cannot be restored. The key is restored in its entirety with the same key name as it had when it was backed up. If the key name is not available in the target Key Vault, the RESTORE operation will be rejected. While the key name is retained during restore, the final key identifier will change if the key is restored to a different vault. Restore will restore all versions and preserve version identifiers. The RESTORE operation is subject to security constraints: The target Key Vault must be owned by the same Microsoft Azure Subscription as the source Key Vault The user must have RESTORE permission in the target Key Vault. This operation requires the keys/restore permission. @param vault_base_url [String] The vault name, for example https://myvault.vault.azure.net. @param key_bundle_backup The backup blob associated with a key bundle. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [KeyBundle] operation results.
[ "Restores", "a", "backed", "up", "key", "to", "a", "vault", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L1183-L1186
train
Restores the key from the backup vault.
[ 30522, 13366, 9239, 1035, 3145, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 3145, 1035, 14012, 1035, 10200, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 9239, 1035, 3145, 1035, 2004, 6038, 2278, 1006, 11632, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb
Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.begin_failover_with_http_info
def begin_failover_with_http_info(source_device_name, parameters, resource_group_name, manager_name, custom_headers:nil) begin_failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value! end
ruby
def begin_failover_with_http_info(source_device_name, parameters, resource_group_name, manager_name, custom_headers:nil) begin_failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value! end
[ "def", "begin_failover_with_http_info", "(", "source_device_name", ",", "parameters", ",", "resource_group_name", ",", "manager_name", ",", "custom_headers", ":", "nil", ")", "begin_failover_async", "(", "source_device_name", ",", "parameters", ",", "resource_group_name", ...
Failovers a set of volume containers from a specified source device to a target device. @param source_device_name [String] The source device name on which failover is performed. @param parameters [FailoverRequest] FailoverRequest containing the source device and the list of volume containers to be failed over. @param resource_group_name [String] The resource group name @param manager_name [String] The manager name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Failovers", "a", "set", "of", "volume", "containers", "from", "a", "specified", "source", "device", "to", "a", "target", "device", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L1687-L1689
train
Gets the next chunk of the image from the source device.
[ 30522, 13366, 4088, 1035, 8246, 7840, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 3120, 1035, 5080, 1035, 2171, 1010, 11709, 1010, 7692, 1035, 2177, 1035, 2171, 1010, 3208, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kmuto/review
lib/review/latexutils.rb
ReVIEW.LaTeXUtils.unescape
def unescape(str) metachars_invert_re = Regexp.new(@metachars_invert.keys.collect { |key| Regexp.escape(key) }.join('|')) str.gsub(metachars_invert_re) { |s| @metachars_invert[s] or raise "unknown trans char: #{s}" } end
ruby
def unescape(str) metachars_invert_re = Regexp.new(@metachars_invert.keys.collect { |key| Regexp.escape(key) }.join('|')) str.gsub(metachars_invert_re) { |s| @metachars_invert[s] or raise "unknown trans char: #{s}" } end
[ "def", "unescape", "(", "str", ")", "metachars_invert_re", "=", "Regexp", ".", "new", "(", "@metachars_invert", ".", "keys", ".", "collect", "{", "|", "key", "|", "Regexp", ".", "escape", "(", "key", ")", "}", ".", "join", "(", "'|'", ")", ")", "str"...
backward compatibility
[ "backward", "compatibility" ]
77d1273e671663f05db2992281fd891b776badf0
https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/review/latexutils.rb#L73-L76
train
Unescapes the given string
[ 30522, 13366, 16655, 15782, 5051, 1006, 2358, 2099, 1007, 18804, 7507, 2869, 1035, 1999, 16874, 1035, 2128, 1027, 19723, 10288, 2361, 1012, 2047, 1006, 1030, 18804, 7507, 2869, 1035, 1999, 16874, 1012, 6309, 1012, 8145, 1063, 1064, 3145, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb
Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.publish_iteration_with_http_info
def publish_iteration_with_http_info(project_id, iteration_id, publish_name, prediction_id, custom_headers:nil) publish_iteration_async(project_id, iteration_id, publish_name, prediction_id, custom_headers:custom_headers).value! end
ruby
def publish_iteration_with_http_info(project_id, iteration_id, publish_name, prediction_id, custom_headers:nil) publish_iteration_async(project_id, iteration_id, publish_name, prediction_id, custom_headers:custom_headers).value! end
[ "def", "publish_iteration_with_http_info", "(", "project_id", ",", "iteration_id", ",", "publish_name", ",", "prediction_id", ",", "custom_headers", ":", "nil", ")", "publish_iteration_async", "(", "project_id", ",", "iteration_id", ",", "publish_name", ",", "prediction...
Publish a specific iteration. @param project_id The project id. @param iteration_id The iteration id. @param publish_name [String] The name to give the published iteration. @param prediction_id [String] The id of the prediction resource to publish to. @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.
[ "Publish", "a", "specific", "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#L3819-L3821
train
Publishes a single iteration of a given project.
[ 30522, 13366, 10172, 1035, 27758, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 2622, 1035, 8909, 1010, 27758, 1035, 8909, 1010, 10172, 1035, 2171, 1010, 17547, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10172, 1035, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mongodb/mongoid
lib/mongoid/changeable.rb
Mongoid.Changeable.setters
def setters mods = {} changes.each_pair do |name, changes| if changes old, new = changes field = fields[name] key = atomic_attribute_name(name) if field && field.resizable? field.add_atomic_changes(self, name, key, mods, new, old) else mods[key] = new unless atomic_unsets.include?(key) end end end mods end
ruby
def setters mods = {} changes.each_pair do |name, changes| if changes old, new = changes field = fields[name] key = atomic_attribute_name(name) if field && field.resizable? field.add_atomic_changes(self, name, key, mods, new, old) else mods[key] = new unless atomic_unsets.include?(key) end end end mods end
[ "def", "setters", "mods", "=", "{", "}", "changes", ".", "each_pair", "do", "|", "name", ",", "changes", "|", "if", "changes", "old", ",", "new", "=", "changes", "field", "=", "fields", "[", "name", "]", "key", "=", "atomic_attribute_name", "(", "name"...
Gets all the new values for each of the changed fields, to be passed to a MongoDB $set modifier. @example Get the setters for the atomic updates. person = Person.new(:title => "Sir") person.title = "Madam" person.setters # returns { "title" => "Madam" } @return [ Hash ] A +Hash+ of atomic setters. @since 2.0.0
[ "Gets", "all", "the", "new", "values", "for", "each", "of", "the", "changed", "fields", "to", "be", "passed", "to", "a", "MongoDB", "$set", "modifier", "." ]
56976e32610f4c2450882b0bfe14da099f0703f4
https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/changeable.rb#L140-L155
train
Set the atomic attributes of the object.
[ 30522, 13366, 2275, 7747, 16913, 2015, 1027, 1063, 1065, 3431, 1012, 2169, 1035, 3940, 2079, 1064, 2171, 1010, 3431, 1064, 2065, 3431, 2214, 1010, 2047, 1027, 3431, 2492, 1027, 4249, 1031, 2171, 1033, 3145, 1027, 9593, 1035, 17961, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb
Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_composite_entity
def add_composite_entity(app_id, version_id, composite_model_create_object, custom_headers:nil) response = add_composite_entity_async(app_id, version_id, composite_model_create_object, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def add_composite_entity(app_id, version_id, composite_model_create_object, custom_headers:nil) response = add_composite_entity_async(app_id, version_id, composite_model_create_object, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "add_composite_entity", "(", "app_id", ",", "version_id", ",", "composite_model_create_object", ",", "custom_headers", ":", "nil", ")", "response", "=", "add_composite_entity_async", "(", "app_id", ",", "version_id", ",", "composite_model_create_object", ",", "cu...
Adds a composite entity extractor to a version of the application. @param app_id The application ID. @param version_id [String] The version ID. @param composite_model_create_object [CompositeEntityModel] A model containing the name and children of the new entity extractor. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Uuid] operation results.
[ "Adds", "a", "composite", "entity", "extractor", "to", "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#L738-L741
train
Adds a composite entity to a version of the application.
[ 30522, 13366, 5587, 1035, 12490, 1035, 9178, 1006, 10439, 1035, 8909, 1010, 2544, 1035, 8909, 1010, 12490, 1035, 2944, 1035, 3443, 1035, 4874, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 5587, 1035, 12490, 1035, 9178,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.import_data_async
def import_data_async(resource_group_name, name, parameters, custom_headers:nil) # Send request promise = begin_import_data_async(resource_group_name, name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def import_data_async(resource_group_name, name, parameters, custom_headers:nil) # Send request promise = begin_import_data_async(resource_group_name, name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "import_data_async", "(", "resource_group_name", ",", "name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_import_data_async", "(", "resource_group_name", ",", "name", ",", "parameters", ",", "custom_header...
@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. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", ".", "@param", "name", "[", "String", "]", "The", "name", "of", "the", "Redis", "cache", ".", "@param", "parameters", "[", "ImportRDBParameters", "]", "Para...
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#L818-L832
train
Import data into a resource group.
[ 30522, 13366, 12324, 1035, 2951, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, 1035, 12324, 1035, 2951, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jekyll/jekyll
lib/jekyll/excerpt.rb
Jekyll.Excerpt.sanctify_liquid_tags
def sanctify_liquid_tags(head) modified = false tag_names = head.scan(LIQUID_TAG_REGEX) tag_names.flatten! tag_names.reverse_each do |tag_name| next unless liquid_block?(tag_name) next if head =~ endtag_regex_stash(tag_name) modified = true head << "\n{% end#{tag_name} %}" end print_build_warning if modified head end
ruby
def sanctify_liquid_tags(head) modified = false tag_names = head.scan(LIQUID_TAG_REGEX) tag_names.flatten! tag_names.reverse_each do |tag_name| next unless liquid_block?(tag_name) next if head =~ endtag_regex_stash(tag_name) modified = true head << "\n{% end#{tag_name} %}" end print_build_warning if modified head end
[ "def", "sanctify_liquid_tags", "(", "head", ")", "modified", "=", "false", "tag_names", "=", "head", ".", "scan", "(", "LIQUID_TAG_REGEX", ")", "tag_names", ".", "flatten!", "tag_names", ".", "reverse_each", "do", "|", "tag_name", "|", "next", "unless", "liqui...
append appropriate closing tag(s) (for each Liquid block), to the `head` if the partitioning resulted in leaving the closing tag somewhere in the `tail` partition.
[ "append", "appropriate", "closing", "tag", "(", "s", ")", "(", "for", "each", "Liquid", "block", ")", "to", "the", "head", "if", "the", "partitioning", "resulted", "in", "leaving", "the", "closing", "tag", "somewhere", "in", "the", "tail", "partition", "."...
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/excerpt.rb#L152-L166
train
sanctify liquid tags
[ 30522, 13366, 2624, 6593, 8757, 1035, 6381, 1035, 22073, 1006, 2132, 1007, 6310, 1027, 6270, 6415, 1035, 3415, 1027, 2132, 1012, 13594, 1006, 6381, 1035, 6415, 1035, 19723, 10288, 1007, 6415, 1035, 3415, 1012, 4257, 6528, 999, 6415, 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_transactions_api.rb
SquareConnect.V1TransactionsApi.retrieve_order
def retrieve_order(location_id, order_id, opts = {}) data, _status_code, _headers = retrieve_order_with_http_info(location_id, order_id, opts) return data end
ruby
def retrieve_order(location_id, order_id, opts = {}) data, _status_code, _headers = retrieve_order_with_http_info(location_id, order_id, opts) return data end
[ "def", "retrieve_order", "(", "location_id", ",", "order_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_order_with_http_info", "(", "location_id", ",", "order_id", ",", "opts", ")", "return", "data", "end" ]
RetrieveOrder Provides comprehensive information for a single online store order, including the order's history. @param location_id The ID of the order&#39;s associated location. @param order_id The order&#39;s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint @param [Hash] opts the optional parameters @return [V1Order]
[ "RetrieveOrder", "Provides", "comprehensive", "information", "for", "a", "single", "online", "store", "order", "including", "the", "order", "s", "history", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_transactions_api.rb#L494-L497
train
Retrieve an order Returns an order object
[ 30522, 13366, 12850, 1035, 2344, 1006, 3295, 1035, 8909, 1010, 2344, 1035, 8909, 1010, 23569, 2015, 1027, 1063, 1065, 1007, 2951, 1010, 1035, 3570, 1035, 3642, 1010, 1035, 20346, 2015, 1027, 12850, 1035, 2344, 1035, 2007, 1035, 8299, 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.failover_allow_data_loss_async
def failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) # Send request promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil) # Send request promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "failover_allow_data_loss_async", "(", "resource_group_name", ",", "server_name", ",", "disaster_recovery_configuration_name", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_failover_allow_data_loss_async", "(", "resource_group_name", ",...
@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 failover forcefully. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "The", "name", "of", "the", "resource", "group", "that", "contains", "the", "resource", ".", "You", "can", "obtain", "this", "value", "from", "the", "Azure", "Resource", "Manager", "API", "or", "the", "por...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L403-L417
train
Allow data loss of a server to be lost.
[ 30522, 13366, 8246, 7840, 1035, 3499, 1035, 2951, 1035, 3279, 1035, 2004, 6038, 2278, 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, 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...
appium/ruby_lib
lib/appium_lib/android/common/helper.rb
Appium.Android.page
def page(opts = {}) class_name = opts.is_a?(Hash) ? opts.fetch(:class, nil) : opts puts get_android_inspect class_name nil end
ruby
def page(opts = {}) class_name = opts.is_a?(Hash) ? opts.fetch(:class, nil) : opts puts get_android_inspect class_name nil end
[ "def", "page", "(", "opts", "=", "{", "}", ")", "class_name", "=", "opts", ".", "is_a?", "(", "Hash", ")", "?", "opts", ".", "fetch", "(", ":class", ",", "nil", ")", ":", "opts", "puts", "get_android_inspect", "class_name", "nil", "end" ]
Intended for use with console. Inspects and prints the current page. Will return XHTML for Web contexts because of a quirk with Nokogiri. @option class [Symbol] the class name to filter on. case insensitive include match. if nil (default) then all classes will be inspected @return [void]
[ "Intended", "for", "use", "with", "console", ".", "Inspects", "and", "prints", "the", "current", "page", ".", "Will", "return", "XHTML", "for", "Web", "contexts", "because", "of", "a", "quirk", "with", "Nokogiri", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/common/helper.rb#L121-L125
train
Returns the page object
[ 30522, 13366, 3931, 1006, 23569, 2015, 1027, 1063, 1065, 1007, 2465, 1035, 2171, 1027, 23569, 2015, 1012, 2003, 1035, 1037, 1029, 1006, 23325, 1007, 1029, 23569, 2015, 1012, 18584, 1006, 1024, 2465, 1010, 9152, 2140, 1007, 1024, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_monitor/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rule_incidents.rb
Azure::Monitor::Mgmt::V2016_03_01.AlertRuleIncidents.get_with_http_info
def get_with_http_info(resource_group_name, rule_name, incident_name, custom_headers:nil) get_async(resource_group_name, rule_name, incident_name, custom_headers:custom_headers).value! end
ruby
def get_with_http_info(resource_group_name, rule_name, incident_name, custom_headers:nil) get_async(resource_group_name, rule_name, incident_name, custom_headers:custom_headers).value! end
[ "def", "get_with_http_info", "(", "resource_group_name", ",", "rule_name", ",", "incident_name", ",", "custom_headers", ":", "nil", ")", "get_async", "(", "resource_group_name", ",", "rule_name", ",", "incident_name", ",", "custom_headers", ":custom_headers", ")", "."...
Gets an incident associated to an alert rule @param resource_group_name [String] The name of the resource group. @param rule_name [String] The name of the rule. @param incident_name [String] The name of the incident to retrieve. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "an", "incident", "associated", "to", "an", "alert", "rule" ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_monitor/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rule_incidents.rb#L51-L53
train
Gets the specified rule incident.
[ 30522, 13366, 2131, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 3627, 1035, 2171, 1010, 5043, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 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...
rocketjob/symmetric-encryption
lib/symmetric_encryption/header.rb
SymmetricEncryption.Header.parse
def parse(buffer, offset = 0) return 0 if buffer.nil? || (buffer == '') || (buffer.length <= MAGIC_HEADER_SIZE + 2) # Symmetric Encryption Header # # Consists of: # 4 Bytes: Magic Header Prefix: @Enc # 1 Byte: The version of the cipher used to encrypt the header. # 1 Byte: Flags: # Bit 1: Whether the data is compressed # Bit 2: Whether the IV is included # Bit 3: Whether the Key is included # Bit 4: Whether the Cipher Name is included # Bit 5: Future use # Bit 6: Future use # Bit 7: Future use # Bit 8: Future use # 2 Bytes: IV Length (little endian), if included. # IV in binary form. # 2 Bytes: Key Length (little endian), if included. # Key in binary form # 2 Bytes: Cipher Name Length (little endian), if included. # Cipher name it UTF8 text buffer.force_encoding(SymmetricEncryption::BINARY_ENCODING) header = buffer.byteslice(offset, MAGIC_HEADER_SIZE) return 0 unless header == MAGIC_HEADER offset += MAGIC_HEADER_SIZE # Remove header and extract flags self.version = buffer.getbyte(offset) offset += 1 unless cipher raise( SymmetricEncryption::CipherError, "Cipher with version:#{version.inspect} not found in any of the configured SymmetricEncryption ciphers" ) end flags = buffer.getbyte(offset) offset += 1 self.compress = (flags & FLAG_COMPRESSED) != 0 if (flags & FLAG_IV) != 0 self.iv, offset = read_string(buffer, offset) else self.iv = nil end if (flags & FLAG_KEY) != 0 encrypted_key, offset = read_string(buffer, offset) self.key = cipher.binary_decrypt(encrypted_key) else self.key = nil end if (flags & FLAG_CIPHER_NAME) != 0 self.cipher_name, offset = read_string(buffer, offset) else self.cipher_name = nil end if (flags & FLAG_AUTH_TAG) != 0 self.auth_tag, offset = read_string(buffer, offset) else self.auth_tag = nil end offset end
ruby
def parse(buffer, offset = 0) return 0 if buffer.nil? || (buffer == '') || (buffer.length <= MAGIC_HEADER_SIZE + 2) # Symmetric Encryption Header # # Consists of: # 4 Bytes: Magic Header Prefix: @Enc # 1 Byte: The version of the cipher used to encrypt the header. # 1 Byte: Flags: # Bit 1: Whether the data is compressed # Bit 2: Whether the IV is included # Bit 3: Whether the Key is included # Bit 4: Whether the Cipher Name is included # Bit 5: Future use # Bit 6: Future use # Bit 7: Future use # Bit 8: Future use # 2 Bytes: IV Length (little endian), if included. # IV in binary form. # 2 Bytes: Key Length (little endian), if included. # Key in binary form # 2 Bytes: Cipher Name Length (little endian), if included. # Cipher name it UTF8 text buffer.force_encoding(SymmetricEncryption::BINARY_ENCODING) header = buffer.byteslice(offset, MAGIC_HEADER_SIZE) return 0 unless header == MAGIC_HEADER offset += MAGIC_HEADER_SIZE # Remove header and extract flags self.version = buffer.getbyte(offset) offset += 1 unless cipher raise( SymmetricEncryption::CipherError, "Cipher with version:#{version.inspect} not found in any of the configured SymmetricEncryption ciphers" ) end flags = buffer.getbyte(offset) offset += 1 self.compress = (flags & FLAG_COMPRESSED) != 0 if (flags & FLAG_IV) != 0 self.iv, offset = read_string(buffer, offset) else self.iv = nil end if (flags & FLAG_KEY) != 0 encrypted_key, offset = read_string(buffer, offset) self.key = cipher.binary_decrypt(encrypted_key) else self.key = nil end if (flags & FLAG_CIPHER_NAME) != 0 self.cipher_name, offset = read_string(buffer, offset) else self.cipher_name = nil end if (flags & FLAG_AUTH_TAG) != 0 self.auth_tag, offset = read_string(buffer, offset) else self.auth_tag = nil end offset end
[ "def", "parse", "(", "buffer", ",", "offset", "=", "0", ")", "return", "0", "if", "buffer", ".", "nil?", "||", "(", "buffer", "==", "''", ")", "||", "(", "buffer", ".", "length", "<=", "MAGIC_HEADER_SIZE", "+", "2", ")", "# Symmetric Encryption Header", ...
Returns [Integer] the offset within the buffer of the data after the header has been read. Returns 0 if no header is present
[ "Returns", "[", "Integer", "]", "the", "offset", "within", "the", "buffer", "of", "the", "data", "after", "the", "header", "has", "been", "read", "." ]
064ba8d57ffac44a3ed80f5e76fa1a54d660ff98
https://github.com/rocketjob/symmetric-encryption/blob/064ba8d57ffac44a3ed80f5e76fa1a54d660ff98/lib/symmetric_encryption/header.rb#L124-L196
train
Parse the Symmetric Encryption header
[ 30522, 13366, 11968, 3366, 1006, 17698, 1010, 16396, 1027, 1014, 1007, 2709, 1014, 2065, 17698, 1012, 9152, 2140, 1029, 1064, 1064, 1006, 17698, 1027, 1027, 1005, 1005, 1007, 1064, 1064, 1006, 17698, 1012, 3091, 1026, 1027, 3894, 1035, 2034...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
seejohnrun/ice_cube
lib/ice_cube/schedule.rb
IceCube.Schedule.occurring_at?
def occurring_at?(time) time = TimeUtil.match_zone(time, start_time) or raise ArgumentError, "Time required, got #{time.inspect}" if duration > 0 return false if exception_time?(time) occurs_between?(time - duration + 1, time) else occurs_at?(time) end end
ruby
def occurring_at?(time) time = TimeUtil.match_zone(time, start_time) or raise ArgumentError, "Time required, got #{time.inspect}" if duration > 0 return false if exception_time?(time) occurs_between?(time - duration + 1, time) else occurs_at?(time) end end
[ "def", "occurring_at?", "(", "time", ")", "time", "=", "TimeUtil", ".", "match_zone", "(", "time", ",", "start_time", ")", "or", "raise", "ArgumentError", ",", "\"Time required, got #{time.inspect}\"", "if", "duration", ">", "0", "return", "false", "if", "except...
Determine if the schedule is occurring at a given time
[ "Determine", "if", "the", "schedule", "is", "occurring", "at", "a", "given", "time" ]
fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd
https://github.com/seejohnrun/ice_cube/blob/fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd/lib/ice_cube/schedule.rb#L243-L251
train
Returns true if the exception occurs within the specified time.
[ 30522, 13366, 10066, 1035, 2012, 1029, 1006, 2051, 1007, 2051, 1027, 2051, 21823, 2140, 1012, 2674, 1035, 4224, 1006, 2051, 1010, 2707, 1035, 2051, 1007, 2030, 5333, 6685, 2121, 29165, 1010, 1000, 2051, 3223, 1010, 2288, 1001, 1063, 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...
tongueroo/jets
lib/jets/aws_info.rb
Jets.AwsInfo.account
def account return '123456789' if test? # ensure region set, required for sts.get_caller_identity.account to work ENV['AWS_REGION'] ||= region begin sts.get_caller_identity.account rescue Aws::Errors::MissingCredentialsError puts "INFO: You're missing AWS credentials. Only local services are currently available" end end
ruby
def account return '123456789' if test? # ensure region set, required for sts.get_caller_identity.account to work ENV['AWS_REGION'] ||= region begin sts.get_caller_identity.account rescue Aws::Errors::MissingCredentialsError puts "INFO: You're missing AWS credentials. Only local services are currently available" end end
[ "def", "account", "return", "'123456789'", "if", "test?", "# ensure region set, required for sts.get_caller_identity.account to work", "ENV", "[", "'AWS_REGION'", "]", "||=", "region", "begin", "sts", ".", "get_caller_identity", ".", "account", "rescue", "Aws", "::", "Err...
aws sts get-caller-identity
[ "aws", "sts", "get", "-", "caller", "-", "identity" ]
46943a519224067e58aa3e2d5656e3ca083150f9
https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/aws_info.rb#L50-L59
train
account
[ 30522, 13366, 4070, 2709, 1005, 13138, 19961, 2575, 2581, 2620, 2683, 1005, 2065, 3231, 1029, 1001, 5676, 2555, 2275, 1010, 3223, 2005, 8541, 1012, 2131, 1035, 20587, 1035, 4767, 1012, 4070, 2000, 2147, 4372, 2615, 1031, 1005, 22091, 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...
samvera/hyrax
app/controllers/concerns/hyrax/embargoes_controller_behavior.rb
Hyrax.EmbargoesControllerBehavior.destroy
def destroy Hyrax::Actors::EmbargoActor.new(curation_concern).destroy flash[:notice] = curation_concern.embargo_history.last if curation_concern.work? && curation_concern.file_sets.present? redirect_to confirm_permission_path else redirect_to edit_embargo_path end end
ruby
def destroy Hyrax::Actors::EmbargoActor.new(curation_concern).destroy flash[:notice] = curation_concern.embargo_history.last if curation_concern.work? && curation_concern.file_sets.present? redirect_to confirm_permission_path else redirect_to edit_embargo_path end end
[ "def", "destroy", "Hyrax", "::", "Actors", "::", "EmbargoActor", ".", "new", "(", "curation_concern", ")", ".", "destroy", "flash", "[", ":notice", "]", "=", "curation_concern", ".", "embargo_history", ".", "last", "if", "curation_concern", ".", "work?", "&&",...
Removes a single embargo
[ "Removes", "a", "single", "embargo" ]
e2b4f56e829a53b1f11296324736e9d5b8c9ee5f
https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb#L15-L23
train
destroy_seq_index
[ 30522, 13366, 6033, 1044, 19563, 2595, 1024, 1024, 5889, 1024, 1024, 7861, 8237, 3995, 18908, 2953, 1012, 2047, 1006, 12731, 8156, 1035, 5142, 1007, 1012, 6033, 5956, 1031, 1024, 5060, 1033, 1027, 12731, 8156, 1035, 5142, 1012, 7861, 8237, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/replications.rb
Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Replications.update
def update(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:nil) response = update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def update(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:nil) response = update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "update", "(", "resource_group_name", ",", "registry_name", ",", "replication_name", ",", "replication_update_parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "update_async", "(", "resource_group_name", ",", "registry_name", ",", "replication...
Updates a replication 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 replication_name [String] The name of the replication. @param replication_update_parameters [ReplicationUpdateParameters] The parameters for updating a replication. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Replication] operation results.
[ "Updates", "a", "replication", "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/replications.rb#L233-L236
train
Updates a replication.
[ 30522, 13366, 10651, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 21647, 1035, 2171, 1010, 21647, 1035, 10651, 1035, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 10651, 1035, 2004, 6038, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/table.rb
Watir.Table.hashes
def hashes all_rows = rows.locate header_row = all_rows.first || raise(Error, 'no rows in table') all_rows.entries[1..-1].map do |row| cell_size_check(header_row, row) Hash[headers(header_row).map(&:text).zip(row.cells.map(&:text))] end end
ruby
def hashes all_rows = rows.locate header_row = all_rows.first || raise(Error, 'no rows in table') all_rows.entries[1..-1].map do |row| cell_size_check(header_row, row) Hash[headers(header_row).map(&:text).zip(row.cells.map(&:text))] end end
[ "def", "hashes", "all_rows", "=", "rows", ".", "locate", "header_row", "=", "all_rows", ".", "first", "||", "raise", "(", "Error", ",", "'no rows in table'", ")", "all_rows", ".", "entries", "[", "1", "..", "-", "1", "]", ".", "map", "do", "|", "row", ...
Represents table rows as hashes @return [Array<Hash>]
[ "Represents", "table", "rows", "as", "hashes" ]
2d8db09811c6221ae401b85b2f61f5fa66e463a3
https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/table.rb#L28-L36
train
Returns a hash of the header and cells of the table.
[ 30522, 13366, 23325, 2229, 2035, 1035, 10281, 1027, 10281, 1012, 12453, 20346, 1035, 5216, 1027, 2035, 1035, 10281, 1012, 2034, 1064, 1064, 5333, 1006, 7561, 1010, 1005, 2053, 10281, 1999, 2795, 1005, 1007, 2035, 1035, 10281, 1012, 10445, 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_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb
Azure::ContainerRegistry::Mgmt::V2018_09_01.Runs.cancel
def cancel(resource_group_name, registry_name, run_id, custom_headers:nil) response = cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! nil end
ruby
def cancel(resource_group_name, registry_name, run_id, custom_headers:nil) response = cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! nil end
[ "def", "cancel", "(", "resource_group_name", ",", "registry_name", ",", "run_id", ",", "custom_headers", ":", "nil", ")", "response", "=", "cancel_async", "(", "resource_group_name", ",", "registry_name", ",", "run_id", ",", "custom_headers", ":custom_headers", ")",...
Cancel an existing run. @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 run_id [String] The run ID. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Cancel", "an", "existing", "run", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb#L402-L405
train
Cancels a run.
[ 30522, 13366, 17542, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 15584, 1035, 2171, 1010, 2448, 1035, 8909, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 17542, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rmagick/rmagick
lib/rmagick_internal.rb
Magick.ImageList.method_missing
def method_missing(meth_id, *args, &block) if @scene @images[@scene].send(meth_id, *args, &block) else super end rescue NoMethodError Kernel.raise NoMethodError, "undefined method `#{meth_id.id2name}' for #{self.class}" rescue Exception $ERROR_POSITION.delete_if { |s| /:in `send'$/.match(s) || /:in `method_missing'$/.match(s) } Kernel.raise end
ruby
def method_missing(meth_id, *args, &block) if @scene @images[@scene].send(meth_id, *args, &block) else super end rescue NoMethodError Kernel.raise NoMethodError, "undefined method `#{meth_id.id2name}' for #{self.class}" rescue Exception $ERROR_POSITION.delete_if { |s| /:in `send'$/.match(s) || /:in `method_missing'$/.match(s) } Kernel.raise end
[ "def", "method_missing", "(", "meth_id", ",", "*", "args", ",", "&", "block", ")", "if", "@scene", "@images", "[", "@scene", "]", ".", "send", "(", "meth_id", ",", "args", ",", "block", ")", "else", "super", "end", "rescue", "NoMethodError", "Kernel", ...
The ImageList class supports the Magick::Image class methods by simply sending the method to the current image. If the method isn't explicitly supported, send it to the current image in the array. If there are no images, send it up the line. Catch a NameError and emit a useful message.
[ "The", "ImageList", "class", "supports", "the", "Magick", "::", "Image", "class", "methods", "by", "simply", "sending", "the", "method", "to", "the", "current", "image", ".", "If", "the", "method", "isn", "t", "explicitly", "supported", "send", "it", "to", ...
ef6688ed9d76bf123c2ea1a483eff8635051adb7
https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L1603-L1614
train
This method is called by the object s methods.
[ 30522, 13366, 4118, 1035, 4394, 1006, 2777, 2232, 1035, 8909, 1010, 1008, 12098, 5620, 1010, 1004, 3796, 1007, 2065, 1030, 3496, 1030, 4871, 1031, 1030, 3496, 1033, 1012, 4604, 1006, 2777, 2232, 1035, 8909, 1010, 1008, 12098, 5620, 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_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb
Azure::SQL::Mgmt::V2014_04_01.Databases.list_by_server_with_http_info
def list_by_server_with_http_info(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil) list_by_server_async(resource_group_name, server_name, expand:expand, filter:filter, custom_headers:custom_headers).value! end
ruby
def list_by_server_with_http_info(resource_group_name, server_name, expand:nil, filter:nil, custom_headers:nil) list_by_server_async(resource_group_name, server_name, expand:expand, filter:filter, custom_headers:custom_headers).value! end
[ "def", "list_by_server_with_http_info", "(", "resource_group_name", ",", "server_name", ",", "expand", ":", "nil", ",", "filter", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_by_server_async", "(", "resource_group_name", ",", "server_name", ",", "expand...
Returns a list of databases in a 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. @param expand [String] A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption. @param filter [String] An OData filter expression that describes a subset of databases to return. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Returns", "a", "list", "of", "databases", "in", "a", "server", "." ]
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#L462-L464
train
Gets the list of all the segmentation elements in a server.
[ 30522, 13366, 2862, 1035, 2011, 1035, 8241, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 8241, 1035, 2171, 1010, 7818, 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...
rails/sprockets
lib/sprockets/resolve.rb
Sprockets.Resolve.resolve_under_paths
def resolve_under_paths(paths, logical_name, accepts) deps = Set.new return nil, nil, deps if accepts.empty? # TODO: Allow new path resolves to be registered @resolvers ||= [ method(:resolve_main_under_path), method(:resolve_alts_under_path), method(:resolve_index_under_path) ] mime_exts = config[:mime_exts] paths.each do |load_path| candidates = [] @resolvers.each do |fn| result = fn.call(load_path, logical_name, mime_exts) candidates.concat(result[0]) deps.merge(result[1]) end candidate = HTTPUtils.find_best_q_match(accepts, candidates) do |c, matcher| match_mime_type?(c[:type] || "application/octet-stream", matcher) end return candidate[:filename], candidate[:type], deps, candidate[:index_alias] if candidate end return nil, nil, deps end
ruby
def resolve_under_paths(paths, logical_name, accepts) deps = Set.new return nil, nil, deps if accepts.empty? # TODO: Allow new path resolves to be registered @resolvers ||= [ method(:resolve_main_under_path), method(:resolve_alts_under_path), method(:resolve_index_under_path) ] mime_exts = config[:mime_exts] paths.each do |load_path| candidates = [] @resolvers.each do |fn| result = fn.call(load_path, logical_name, mime_exts) candidates.concat(result[0]) deps.merge(result[1]) end candidate = HTTPUtils.find_best_q_match(accepts, candidates) do |c, matcher| match_mime_type?(c[:type] || "application/octet-stream", matcher) end return candidate[:filename], candidate[:type], deps, candidate[:index_alias] if candidate end return nil, nil, deps end
[ "def", "resolve_under_paths", "(", "paths", ",", "logical_name", ",", "accepts", ")", "deps", "=", "Set", ".", "new", "return", "nil", ",", "nil", ",", "deps", "if", "accepts", ".", "empty?", "# TODO: Allow new path resolves to be registered", "@resolvers", "||=",...
Internal: Finds a file in a set of given paths paths - Array of Strings. logical_name - String. A filename without extension e.g. "application" or "coffee/foo" accepts - Array of array containing mime/version pairs e.g. [["application/javascript", 1.0]] Finds a file with the same name as `logical_name` or "index" inside of the `logical_name` directory that matches a valid mime-type/version from `accepts`. Returns Array. Filename, type, dependencies, and index_alias
[ "Internal", ":", "Finds", "a", "file", "in", "a", "set", "of", "given", "paths" ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/resolve.rb#L176-L203
train
Resolve all paths under the given logical name
[ 30522, 13366, 10663, 1035, 2104, 1035, 10425, 1006, 10425, 1010, 11177, 1035, 2171, 1010, 13385, 1007, 2139, 4523, 1027, 2275, 1012, 2047, 2709, 9152, 2140, 1010, 9152, 2140, 1010, 2139, 4523, 2065, 13385, 1012, 4064, 1029, 1001, 28681, 208...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
petergoldstein/dalli
lib/dalli/client.rb
Dalli.Client.incr
def incr(key, amt=1, ttl=nil, default=nil) raise ArgumentError, "Positive values only: #{amt}" if amt < 0 perform(:incr, key, amt.to_i, ttl_or_default(ttl), default) end
ruby
def incr(key, amt=1, ttl=nil, default=nil) raise ArgumentError, "Positive values only: #{amt}" if amt < 0 perform(:incr, key, amt.to_i, ttl_or_default(ttl), default) end
[ "def", "incr", "(", "key", ",", "amt", "=", "1", ",", "ttl", "=", "nil", ",", "default", "=", "nil", ")", "raise", "ArgumentError", ",", "\"Positive values only: #{amt}\"", "if", "amt", "<", "0", "perform", "(", ":incr", ",", "key", ",", "amt", ".", ...
Incr adds the given amount to the counter on the memcached server. Amt must be a positive integer value. If default is nil, the counter must already exist or the operation will fail and will return nil. Otherwise this method will return the new value for the counter. Note that the ttl will only apply if the counter does not already exist. To increase an existing counter and update its TTL, use #cas.
[ "Incr", "adds", "the", "given", "amount", "to", "the", "counter", "on", "the", "memcached", "server", ".", "Amt", "must", "be", "a", "positive", "integer", "value", "." ]
5755dbfd06e333a8239f976d4b10492b4555b726
https://github.com/petergoldstein/dalli/blob/5755dbfd06e333a8239f976d4b10492b4555b726/lib/dalli/client.rb#L183-L186
train
Increments the value of a key in the cache.
[ 30522, 13366, 4297, 2099, 1006, 3145, 1010, 2572, 2102, 1027, 1015, 1010, 23746, 2140, 1027, 9152, 2140, 1010, 12398, 1027, 9152, 2140, 1007, 5333, 6685, 2121, 29165, 1010, 1000, 3893, 5300, 2069, 1024, 1001, 1063, 2572, 2102, 1065, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.delete_image_store_content_with_http_info
def delete_image_store_content_with_http_info(content_path, timeout:60, custom_headers:nil) delete_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def delete_image_store_content_with_http_info(content_path, timeout:60, custom_headers:nil) delete_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "delete_image_store_content_with_http_info", "(", "content_path", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "delete_image_store_content_async", "(", "content_path", ",", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers", ...
Deletes existing image store content. Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. @param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Deletes", "existing", "image", "store", "content", "." ]
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#L19436-L19438
train
Delete the content of an image store.
[ 30522, 13366, 3972, 12870, 1035, 3746, 1035, 3573, 1035, 4180, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 4180, 1035, 4130, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3972, 12870, 1035, 3746, 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_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb
Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.create_regional_properties
def create_regional_properties(resource_group_name, web_service_name, region, custom_headers:nil) response = create_regional_properties_async(resource_group_name, web_service_name, region, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_regional_properties(resource_group_name, web_service_name, region, custom_headers:nil) response = create_regional_properties_async(resource_group_name, web_service_name, region, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_regional_properties", "(", "resource_group_name", ",", "web_service_name", ",", "region", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_regional_properties_async", "(", "resource_group_name", ",", "web_service_name", ",", "region", ",", ...
Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. @param resource_group_name [String] Name of the resource group in which the web service is located. @param web_service_name [String] The name of the web service. @param region [String] The region for which encrypted credential parameters are created. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [AsyncOperationStatus] operation results.
[ "Creates", "an", "encrypted", "credentials", "parameter", "blob", "for", "the", "specified", "region", ".", "To", "get", "the", "web", "service", "from", "a", "region", "other", "than", "the", "region", "in", "which", "it", "has", "been", "created", "you", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L298-L301
train
Creates a regional specification.
[ 30522, 13366, 3443, 1035, 3164, 1035, 5144, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4773, 1035, 2326, 1035, 2171, 1010, 2555, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, 3164, 1035, 5144, 1035, 2004, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb
Aws::AutoScaling.AutoScalingGroup.detach_instances
def detach_instances(options = {}) batch = [] options = options.merge(auto_scaling_group_name: @name) resp = @client.detach_instances(options) resp.data.activities.each do |a| batch << Activity.new( id: a.activity_id, data: a, client: @client ) end Activity::Collection.new([batch], size: batch.size) end
ruby
def detach_instances(options = {}) batch = [] options = options.merge(auto_scaling_group_name: @name) resp = @client.detach_instances(options) resp.data.activities.each do |a| batch << Activity.new( id: a.activity_id, data: a, client: @client ) end Activity::Collection.new([batch], size: batch.size) end
[ "def", "detach_instances", "(", "options", "=", "{", "}", ")", "batch", "=", "[", "]", "options", "=", "options", ".", "merge", "(", "auto_scaling_group_name", ":", "@name", ")", "resp", "=", "@client", ".", "detach_instances", "(", "options", ")", "resp",...
@example Request syntax with placeholder values activity = auto_scaling_group.detach_instances({ instance_ids: ["XmlStringMaxLen19"], should_decrement_desired_capacity: false, # required }) @param [Hash] options ({}) @option options [Array<String>] :instance_ids The IDs of the instances. You can specify up to 20 instances. @option options [required, Boolean] :should_decrement_desired_capacity Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached. @return [Activity::Collection]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L420-L432
train
Detaches all instances from the Auto Scaling group.
[ 30522, 13366, 20010, 6776, 1035, 12107, 1006, 7047, 1027, 1063, 1065, 1007, 14108, 1027, 1031, 1033, 7047, 1027, 7047, 1012, 13590, 1006, 8285, 1035, 25169, 1035, 2177, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 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...
GeorgeKaraszi/ActiveRecordExtended
lib/active_record_extended/utilities.rb
ActiveRecordExtended.Utilities.wrap_with_array
def wrap_with_array(arel_or_rel_query, alias_name) query = Arel::Nodes::Array.new(to_sql_array(arel_or_rel_query)) nested_alias_escape(query, alias_name) end
ruby
def wrap_with_array(arel_or_rel_query, alias_name) query = Arel::Nodes::Array.new(to_sql_array(arel_or_rel_query)) nested_alias_escape(query, alias_name) end
[ "def", "wrap_with_array", "(", "arel_or_rel_query", ",", "alias_name", ")", "query", "=", "Arel", "::", "Nodes", "::", "Array", ".", "new", "(", "to_sql_array", "(", "arel_or_rel_query", ")", ")", "nested_alias_escape", "(", "query", ",", "alias_name", ")", "e...
Wraps subquery into an Aliased ARRAY Ex: `SELECT * FROM users` => (ARRAY(SELECT * FROM users)) AS "members"
[ "Wraps", "subquery", "into", "an", "Aliased", "ARRAY", "Ex", ":", "SELECT", "*", "FROM", "users", "=", ">", "(", "ARRAY", "(", "SELECT", "*", "FROM", "users", "))", "AS", "members" ]
aca74eebb64b9957a2c8765bef6e43c7d5736fd8
https://github.com/GeorgeKaraszi/ActiveRecordExtended/blob/aca74eebb64b9957a2c8765bef6e43c7d5736fd8/lib/active_record_extended/utilities.rb#L38-L41
train
wrap the query in an array
[ 30522, 13366, 10236, 1035, 2007, 1035, 9140, 1006, 2024, 2140, 1035, 2030, 1035, 2128, 2140, 1035, 23032, 1010, 14593, 1035, 2171, 1007, 23032, 1027, 2024, 2140, 1024, 1024, 14164, 1024, 1024, 9140, 1012, 2047, 1006, 2000, 1035, 29296, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
meew0/discordrb
lib/discordrb/gateway.rb
Discordrb.Gateway.send_identify
def send_identify(token, properties, compress, large_threshold, shard_key = nil) data = { # Don't send a v anymore as it's entirely determined by the URL now token: token, properties: properties, compress: compress, large_threshold: large_threshold } # Don't include the shard key at all if it is nil as Discord checks for its mere existence data[:shard] = shard_key if shard_key send_packet(Opcodes::IDENTIFY, data) end
ruby
def send_identify(token, properties, compress, large_threshold, shard_key = nil) data = { # Don't send a v anymore as it's entirely determined by the URL now token: token, properties: properties, compress: compress, large_threshold: large_threshold } # Don't include the shard key at all if it is nil as Discord checks for its mere existence data[:shard] = shard_key if shard_key send_packet(Opcodes::IDENTIFY, data) end
[ "def", "send_identify", "(", "token", ",", "properties", ",", "compress", ",", "large_threshold", ",", "shard_key", "=", "nil", ")", "data", "=", "{", "# Don't send a v anymore as it's entirely determined by the URL now", "token", ":", "token", ",", "properties", ":",...
Sends an identify packet (op 2). This starts a new session on the current connection and tells Discord who we are. This can only be done once a connection. @param token [String] The token with which to authorise the session. If it belongs to a bot account, it must be prefixed with "Bot ". @param properties [Hash<Symbol => String>] A list of properties for Discord to use in analytics. The following keys are recognised: - "$os" (recommended value: the operating system the bot is running on) - "$browser" (recommended value: library name) - "$device" (recommended value: library name) - "$referrer" (recommended value: empty) - "$referring_domain" (recommended value: empty) @param compress [true, false] Whether certain large packets should be compressed using zlib. @param large_threshold [Integer] The member threshold after which a server counts as large and will have to have its member list chunked. @param shard_key [Array(Integer, Integer), nil] The shard key to use for sharding, represented as [shard_id, num_shards], or nil if the bot should not be sharded.
[ "Sends", "an", "identify", "packet", "(", "op", "2", ")", ".", "This", "starts", "a", "new", "session", "on", "the", "current", "connection", "and", "tells", "Discord", "who", "we", "are", ".", "This", "can", "only", "be", "done", "once", "a", "connect...
764298a1ff0be69a1853b510d736f21c2b91a2fe
https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/gateway.rb#L296-L309
train
Send an identify packet to Discord
[ 30522, 13366, 4604, 1035, 6709, 1006, 19204, 1010, 5144, 1010, 4012, 20110, 1010, 2312, 1035, 11207, 1010, 21146, 4103, 1035, 3145, 1027, 9152, 2140, 1007, 2951, 1027, 1063, 1001, 2123, 1005, 1056, 4604, 1037, 1058, 4902, 2004, 2009, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/params_hash.rb
Github.ParamsHash.options
def options opts = fetch('options', {}) headers = fetch('headers', {}) if value = accept headers[:accept] = value end opts[:raw] = key?('raw') ? self['raw'] : false opts[:headers] = headers unless headers.empty? opts end
ruby
def options opts = fetch('options', {}) headers = fetch('headers', {}) if value = accept headers[:accept] = value end opts[:raw] = key?('raw') ? self['raw'] : false opts[:headers] = headers unless headers.empty? opts end
[ "def", "options", "opts", "=", "fetch", "(", "'options'", ",", "{", "}", ")", "headers", "=", "fetch", "(", "'headers'", ",", "{", "}", ")", "if", "value", "=", "accept", "headers", "[", ":accept", "]", "=", "value", "end", "opts", "[", ":raw", "]"...
Configuration options from request @return [Hash] @api public
[ "Configuration", "options", "from", "request" ]
8702452c66bea33c9388550aed9e9974f76aaef1
https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/params_hash.rb#L71-L80
train
Returns the options array for this request.
[ 30522, 13366, 7047, 23569, 2015, 1027, 18584, 1006, 1005, 7047, 1005, 1010, 1063, 1065, 1007, 20346, 2015, 1027, 18584, 1006, 1005, 20346, 2015, 1005, 1010, 1063, 1065, 1007, 2065, 3643, 1027, 5138, 20346, 2015, 1031, 1024, 5138, 1033, 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...
mongodb/mongo-ruby-driver
lib/mongo/cluster.rb
Mongo.Cluster.update_cluster_time
def update_cluster_time(result) if cluster_time_doc = result.cluster_time @cluster_time_lock.synchronize do if @cluster_time.nil? @cluster_time = cluster_time_doc elsif cluster_time_doc[CLUSTER_TIME] > @cluster_time[CLUSTER_TIME] @cluster_time = cluster_time_doc end end end end
ruby
def update_cluster_time(result) if cluster_time_doc = result.cluster_time @cluster_time_lock.synchronize do if @cluster_time.nil? @cluster_time = cluster_time_doc elsif cluster_time_doc[CLUSTER_TIME] > @cluster_time[CLUSTER_TIME] @cluster_time = cluster_time_doc end end end end
[ "def", "update_cluster_time", "(", "result", ")", "if", "cluster_time_doc", "=", "result", ".", "cluster_time", "@cluster_time_lock", ".", "synchronize", "do", "if", "@cluster_time", ".", "nil?", "@cluster_time", "=", "cluster_time_doc", "elsif", "cluster_time_doc", "...
Update the max cluster time seen in a response. @example Update the cluster time. cluster.update_cluster_time(result) @param [ Operation::Result ] result The operation result containing the cluster time. @return [ Object ] The cluster time. @since 2.5.0
[ "Update", "the", "max", "cluster", "time", "seen", "in", "a", "response", "." ]
dca26d0870cb3386fad9ccc1d17228097c1fe1c8
https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/cluster.rb#L559-L569
train
Update the cluster time of the result
[ 30522, 13366, 10651, 1035, 9324, 1035, 2051, 1006, 2765, 1007, 2065, 9324, 1035, 2051, 1035, 9986, 1027, 2765, 1012, 9324, 1035, 2051, 1030, 9324, 1035, 2051, 1035, 5843, 1012, 26351, 8093, 10698, 4371, 2079, 2065, 1030, 9324, 1035, 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...
tongueroo/ufo
lib/ufo/template_scope.rb
Ufo.TemplateScope.substitute_variables!
def substitute_variables!(properties) # transform values and substitute for special values # https://stackoverflow.com/questions/34595142/process-nested-hash-to-convert-all-values-to-strings # # Examples: # "{stack_name}.stag.boltops.com." => development-demo-web.stag.boltops.com. # "{stack_name}.stag.boltops.com." => dev-demo-web-2.stag.boltops.com. properties.deep_merge(properties) do |_,_,v| if v.is_a?(String) v.sub!('{stack_name}', @stack_name) # unsure why need shebang, but it works else v end end properties end
ruby
def substitute_variables!(properties) # transform values and substitute for special values # https://stackoverflow.com/questions/34595142/process-nested-hash-to-convert-all-values-to-strings # # Examples: # "{stack_name}.stag.boltops.com." => development-demo-web.stag.boltops.com. # "{stack_name}.stag.boltops.com." => dev-demo-web-2.stag.boltops.com. properties.deep_merge(properties) do |_,_,v| if v.is_a?(String) v.sub!('{stack_name}', @stack_name) # unsure why need shebang, but it works else v end end properties end
[ "def", "substitute_variables!", "(", "properties", ")", "# transform values and substitute for special values", "# https://stackoverflow.com/questions/34595142/process-nested-hash-to-convert-all-values-to-strings", "#", "# Examples:", "# \"{stack_name}.stag.boltops.com.\" => development-demo-web...
Substitute special variables that cannot be baked into the template because they are dynamically assigned. Only one special variable: {stack_name}
[ "Substitute", "special", "variables", "that", "cannot", "be", "baked", "into", "the", "template", "because", "they", "are", "dynamically", "assigned", ".", "Only", "one", "special", "variable", ":" ]
16ac3dad28edcab2693c0e7d89a1971aca65b8f9
https://github.com/tongueroo/ufo/blob/16ac3dad28edcab2693c0e7d89a1971aca65b8f9/lib/ufo/template_scope.rb#L88-L103
train
substitute variables in the properties hash
[ 30522, 13366, 7681, 1035, 10857, 999, 1006, 5144, 1007, 1001, 10938, 5300, 1998, 7681, 2005, 2569, 5300, 1001, 16770, 1024, 1013, 1013, 9991, 7840, 12314, 1012, 4012, 1013, 3980, 1013, 23785, 2683, 22203, 20958, 1013, 2832, 1011, 9089, 2098...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/rake
lib/rake/thread_pool.rb
Rake.ThreadPool.join
def join @threads_mon.synchronize do begin stat :joining @join_cond.wait unless @threads.empty? stat :joined rescue Exception => e stat :joined $stderr.puts e $stderr.print "Queue contains #{@queue.size} items. " + "Thread pool contains #{@threads.count} threads\n" $stderr.print "Current Thread #{Thread.current} status = " + "#{Thread.current.status}\n" $stderr.puts e.backtrace.join("\n") @threads.each do |t| $stderr.print "Thread #{t} status = #{t.status}\n" $stderr.puts t.backtrace.join("\n") end raise e end end end
ruby
def join @threads_mon.synchronize do begin stat :joining @join_cond.wait unless @threads.empty? stat :joined rescue Exception => e stat :joined $stderr.puts e $stderr.print "Queue contains #{@queue.size} items. " + "Thread pool contains #{@threads.count} threads\n" $stderr.print "Current Thread #{Thread.current} status = " + "#{Thread.current.status}\n" $stderr.puts e.backtrace.join("\n") @threads.each do |t| $stderr.print "Thread #{t} status = #{t.status}\n" $stderr.puts t.backtrace.join("\n") end raise e end end end
[ "def", "join", "@threads_mon", ".", "synchronize", "do", "begin", "stat", ":joining", "@join_cond", ".", "wait", "unless", "@threads", ".", "empty?", "stat", ":joined", "rescue", "Exception", "=>", "e", "stat", ":joined", "$stderr", ".", "puts", "e", "$stderr"...
Waits until the queue of futures is empty and all threads have exited.
[ "Waits", "until", "the", "queue", "of", "futures", "is", "empty", "and", "all", "threads", "have", "exited", "." ]
1c22b490ee6cb8bd614fa8d0d6145f671466206b
https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/thread_pool.rb#L44-L65
train
Join the queue and threads
[ 30522, 13366, 3693, 1030, 16457, 1035, 12256, 1012, 26351, 8093, 10698, 4371, 2079, 4088, 28093, 1024, 5241, 1030, 3693, 1035, 9530, 2094, 1012, 3524, 4983, 1030, 16457, 1012, 4064, 1029, 28093, 1024, 2587, 5343, 6453, 1027, 1028, 1041, 280...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.execute_site_analysis
def execute_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def execute_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "execute_site_analysis", "(", "resource_group_name", ",", "site_name", ",", "diagnostic_category", ",", "analysis_name", ",", "start_time", ":", "nil", ",", "end_time", ":", "nil", ",", "time_grain", ":", "nil", ",", "custom_headers", ":", "nil", ")", "re...
Execute Analysis Execute Analysis @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] Category Name @param analysis_name [String] Analysis Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [DiagnosticAnalysis] operation results.
[ "Execute", "Analysis" ]
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#L918-L921
train
Executes analysis on a site.
[ 30522, 13366, 15389, 1035, 2609, 1035, 4106, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2609, 1035, 2171, 1010, 16474, 1035, 4696, 1010, 4106, 1035, 2171, 1010, 2707, 1035, 2051, 1024, 9152, 2140, 30524, 4696, 1010, 4106, 1035, 2171, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_upgrade_with_http_info
def get_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil) get_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def get_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil) get_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "get_application_upgrade_with_http_info", "(", "application_id", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "get_application_upgrade_async", "(", "application_id", ",", "timeout", ":", "timeout", ",", "custom_headers", ":custom_headers", "...
Gets details for the latest upgrade performed on this application. Returns information about the state of the latest application upgrade along with details to aid debugging application health issues. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param 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", "details", "for", "the", "latest", "upgrade", "performed", "on", "this", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L7883-L7885
train
Gets the version of the specified application.
[ 30522, 13366, 2131, 1035, 4646, 1035, 12200, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 4646, 1035, 8909, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2131, 1035, 4646, 1035, 12200, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb
Azure::Compute::Mgmt::V2018_04_01.Snapshots.delete
def delete(resource_group_name, snapshot_name, custom_headers:nil) response = delete_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value! nil end
ruby
def delete(resource_group_name, snapshot_name, custom_headers:nil) response = delete_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value! nil end
[ "def", "delete", "(", "resource_group_name", ",", "snapshot_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_async", "(", "resource_group_name", ",", "snapshot_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", "end" ]
Deletes a snapshot. @param resource_group_name [String] The name of the resource group. @param snapshot_name [String] The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Deletes", "a", "snapshot", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb#L232-L235
train
Deletes a snapshot.
[ 30522, 13366, 3972, 12870, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 20057, 12326, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb
Azure::KeyVault::V2016_10_01.KeyVaultClient.update_certificate_policy_with_http_info
def update_certificate_policy_with_http_info(vault_base_url, certificate_name, certificate_policy, custom_headers:nil) update_certificate_policy_async(vault_base_url, certificate_name, certificate_policy, custom_headers:custom_headers).value! end
ruby
def update_certificate_policy_with_http_info(vault_base_url, certificate_name, certificate_policy, custom_headers:nil) update_certificate_policy_async(vault_base_url, certificate_name, certificate_policy, custom_headers:custom_headers).value! end
[ "def", "update_certificate_policy_with_http_info", "(", "vault_base_url", ",", "certificate_name", ",", "certificate_policy", ",", "custom_headers", ":", "nil", ")", "update_certificate_policy_async", "(", "vault_base_url", ",", "certificate_name", ",", "certificate_policy", ...
Updates the policy for a certificate. Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update permission. @param vault_base_url [String] The vault name, for example https://myvault.vault.azure.net. @param certificate_name [String] The name of the certificate in the given vault. @param certificate_policy [CertificatePolicy] The policy for the certificate. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Updates", "the", "policy", "for", "a", "certificate", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L5701-L5703
train
Updates the policy of a specified certificate.
[ 30522, 13366, 10651, 1035, 8196, 1035, 3343, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 11632, 1035, 2918, 1035, 24471, 2140, 1010, 8196, 1035, 2171, 1010, 8196, 1035, 3343, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10651, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/sprockets/source_map_utils.rb
Sprockets.SourceMapUtils.vlq_decode
def vlq_decode(str) result = [] chars = str.split('') while chars.any? vlq = 0 shift = 0 continuation = true while continuation char = chars.shift raise ArgumentError unless char digit = BASE64_VALUES[char] continuation = false if (digit & VLQ_CONTINUATION_BIT) == 0 digit &= VLQ_BASE_MASK vlq += digit << shift shift += VLQ_BASE_SHIFT end result << (vlq & 1 == 1 ? -(vlq >> 1) : vlq >> 1) end result end
ruby
def vlq_decode(str) result = [] chars = str.split('') while chars.any? vlq = 0 shift = 0 continuation = true while continuation char = chars.shift raise ArgumentError unless char digit = BASE64_VALUES[char] continuation = false if (digit & VLQ_CONTINUATION_BIT) == 0 digit &= VLQ_BASE_MASK vlq += digit << shift shift += VLQ_BASE_SHIFT end result << (vlq & 1 == 1 ? -(vlq >> 1) : vlq >> 1) end result end
[ "def", "vlq_decode", "(", "str", ")", "result", "=", "[", "]", "chars", "=", "str", ".", "split", "(", "''", ")", "while", "chars", ".", "any?", "vlq", "=", "0", "shift", "=", "0", "continuation", "=", "true", "while", "continuation", "char", "=", ...
Public: Decode a VLQ string. str - VLQ encoded String Returns an Array of Integers.
[ "Public", ":", "Decode", "a", "VLQ", "string", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/source_map_utils.rb#L429-L448
train
Decode a VLQ string
[ 30522, 13366, 1058, 2140, 4160, 1035, 21933, 3207, 1006, 2358, 2099, 1007, 2765, 1027, 1031, 1033, 25869, 2015, 1027, 2358, 2099, 1012, 3975, 1006, 1005, 1005, 1007, 2096, 25869, 2015, 1012, 2151, 1029, 1058, 2140, 4160, 1027, 1014, 5670, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
puppetlabs/puppet
lib/puppet/type.rb
Puppet.Type.set_sensitive_parameters
def set_sensitive_parameters(sensitive_parameters) sensitive_parameters.each do |name| p = parameter(name) if p.is_a?(Puppet::Property) p.sensitive = true elsif p.is_a?(Puppet::Parameter) warning(_("Unable to mark '%{name}' as sensitive: %{name} is a parameter and not a property, and cannot be automatically redacted.") % { name: name }) elsif self.class.attrclass(name) warning(_("Unable to mark '%{name}' as sensitive: the property itself was not assigned a value.") % { name: name }) else err(_("Unable to mark '%{name}' as sensitive: the property itself is not defined on %{type}.") % { name: name, type: type }) end end parameters.each do |name, param| next if param.sensitive if param.is_a?(Puppet::Parameter) param.sensitive = param.is_sensitive if param.respond_to?(:is_sensitive) end end end
ruby
def set_sensitive_parameters(sensitive_parameters) sensitive_parameters.each do |name| p = parameter(name) if p.is_a?(Puppet::Property) p.sensitive = true elsif p.is_a?(Puppet::Parameter) warning(_("Unable to mark '%{name}' as sensitive: %{name} is a parameter and not a property, and cannot be automatically redacted.") % { name: name }) elsif self.class.attrclass(name) warning(_("Unable to mark '%{name}' as sensitive: the property itself was not assigned a value.") % { name: name }) else err(_("Unable to mark '%{name}' as sensitive: the property itself is not defined on %{type}.") % { name: name, type: type }) end end parameters.each do |name, param| next if param.sensitive if param.is_a?(Puppet::Parameter) param.sensitive = param.is_sensitive if param.respond_to?(:is_sensitive) end end end
[ "def", "set_sensitive_parameters", "(", "sensitive_parameters", ")", "sensitive_parameters", ".", "each", "do", "|", "name", "|", "p", "=", "parameter", "(", "name", ")", "if", "p", ".", "is_a?", "(", "Puppet", "::", "Property", ")", "p", ".", "sensitive", ...
Mark parameters associated with this type as sensitive, based on the associated resource. Currently, only instances of `Puppet::Property` can be easily marked for sensitive data handling and information redaction is limited to redacting events generated while synchronizing properties. While support for redaction will be broadened in the future we can't automatically deduce how to redact arbitrary parameters, so if a parameter is marked for redaction the best we can do is warn that we can't handle treating that parameter as sensitive and move on. In some unusual cases a given parameter will be marked as sensitive but that sensitive context needs to be transferred to another parameter. In this case resource types may need to override this method in order to copy the sensitive context from one parameter to another (and in the process force the early generation of a parameter that might otherwise be lazily generated.) See `Puppet::Type.type(:file)#set_sensitive_parameters` for an example of this. @note This method visibility is protected since it should only be called by #initialize, but is marked as public as subclasses may need to override this method. @api public @param sensitive_parameters [Array<Symbol>] A list of parameters to mark as sensitive. @return [void]
[ "Mark", "parameters", "associated", "with", "this", "type", "as", "sensitive", "based", "on", "the", "associated", "resource", "." ]
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/type.rb#L2439-L2460
train
Sets the sensitive parameters for this object.
[ 30522, 13366, 2275, 1035, 7591, 1035, 11709, 1006, 7591, 1035, 11709, 1007, 7591, 1035, 11709, 1012, 2169, 2079, 1064, 2171, 1064, 1052, 1027, 16381, 1006, 2171, 1007, 2065, 1052, 1012, 2003, 1035, 1037, 1029, 1006, 13997, 1024, 1024, 3200,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb
Azure::EventHub::Mgmt::V2018_01_01_preview.Clusters.patch_async
def patch_async(resource_group_name, cluster_name, parameters, custom_headers:nil) # Send request promise = begin_patch_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::Cluster.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
ruby
def patch_async(resource_group_name, cluster_name, parameters, custom_headers:nil) # Send request promise = begin_patch_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::Cluster.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
[ "def", "patch_async", "(", "resource_group_name", ",", "cluster_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "# Send request", "promise", "=", "begin_patch_async", "(", "resource_group_name", ",", "cluster_name", ",", "parameters", ",", "custom_he...
@param resource_group_name [String] Name of the resource group within the Azure subscription. @param cluster_name [String] The name of the Event Hubs Cluster. @param parameters [Cluster] The properties of the Event Hubs Cluster which should be updated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Concurrent::Promise] promise which provides async access to http response.
[ "@param", "resource_group_name", "[", "String", "]", "Name", "of", "the", "resource", "group", "within", "the", "Azure", "subscription", ".", "@param", "cluster_name", "[", "String", "]", "The", "name", "of", "the", "Event", "Hubs", "Cluster", ".", "@param", ...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb#L379-L395
train
Patch a cluster.
[ 30522, 13366, 8983, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 9324, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 1001, 4604, 5227, 4872, 1027, 4088, 1035, 8983, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb
Azure::SQL::Mgmt::V2015_05_01_preview.SyncGroups.list_hub_schemas_next
def list_hub_schemas_next(next_page_link, custom_headers:nil) response = list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_hub_schemas_next(next_page_link, custom_headers:nil) response = list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_hub_schemas_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_hub_schemas_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "resp...
Gets a collection of hub database schemas. @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 [SyncFullSchemaPropertiesListResult] operation results.
[ "Gets", "a", "collection", "of", "hub", "database", "schemas", "." ]
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_groups.rb#L1512-L1515
train
Gets the hub schemas for the hub.
[ 30522, 13366, 2862, 1035, 9594, 1035, 8040, 28433, 2015, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 9594, 1035, 8040, 28433, 2015, 1035, 2279, 1035, 2004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb
Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_get_vmsecurity_rules
def begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "begin_get_vmsecurity_rules", "(", "resource_group_name", ",", "network_watcher_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "begin_get_vmsecurity_rules_async", "(", "resource_group_name", ",", "network_watcher_name", ",", "param...
Gets the configured and effective security group rules on the specified VM. @param resource_group_name [String] The name of the resource group. @param network_watcher_name [String] The name of the network watcher. @param parameters [SecurityGroupViewParameters] Parameters that define the VM to check security groups for. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [SecurityGroupViewResult] operation results.
[ "Gets", "the", "configured", "and", "effective", "security", "group", "rules", "on", "the", "specified", "VM", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L1518-L1521
train
Gets the security rules for a virtual machine.
[ 30522, 13366, 4088, 1035, 2131, 1035, 1058, 5244, 8586, 25137, 1035, 3513, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 2897, 1035, 3422, 2121, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 4088, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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.power_off
def power_off(resource_group_name, vm_name, custom_headers:nil) response = power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def power_off(resource_group_name, vm_name, custom_headers:nil) response = power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "power_off", "(", "resource_group_name", ",", "vm_name", ",", "custom_headers", ":", "nil", ")", "response", "=", "power_off_async", "(", "resource_group_name", ",", "vm_name", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "...
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. @param resource_group_name [String] The name of the resource group. @param vm_name [String] The name of the virtual machine. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [OperationStatusResponse] operation results.
[ "The", "operation", "to", "power", "off", "(", "stop", ")", "a", "virtual", "machine", ".", "The", "virtual", "machine", "can", "be", "restarted", "with", "the", "same", "provisioned", "resources", ".", "You", "are", "still", "charged", "for", "this", "vir...
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#L821-L824
train
Power off the virtual machine.
[ 30522, 13366, 2373, 1035, 2125, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 1058, 2213, 1035, 2171, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2373, 1035, 2125, 1035, 2004, 6038, 2278, 1006, 7692, 1035, 2177, 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...
Azure/azure-sdk-for-ruby
data/azure_graph_rbac/lib/1.6/generated/azure_graph_rbac/groups.rb
Azure::GraphRbac::V1_6.Groups.is_member_of
def is_member_of(parameters, custom_headers:nil) response = is_member_of_async(parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def is_member_of(parameters, custom_headers:nil) response = is_member_of_async(parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "is_member_of", "(", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "is_member_of_async", "(", "parameters", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unless", "response", ".", "nil?", ...
Checks whether the specified user, group, contact, or service principal is a direct or transitive member of the specified group. @param parameters [CheckGroupMembershipParameters] The check group membership parameters. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [CheckGroupMembershipResult] operation results.
[ "Checks", "whether", "the", "specified", "user", "group", "contact", "or", "service", "principal", "is", "a", "direct", "or", "transitive", "member", "of", "the", "specified", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_graph_rbac/lib/1.6/generated/azure_graph_rbac/groups.rb#L35-L38
train
Returns the number of documents that are members of the specified resource group.
[ 30522, 13366, 2003, 1035, 2266, 1035, 1997, 1006, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2003, 1035, 2266, 1035, 1997, 1035, 2004, 6038, 2278, 1006, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 7661, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
braintree/braintree_ruby
lib/braintree/credit_card.rb
Braintree.CreditCard.update
def update(attributes) warn "[DEPRECATED] update as an instance method is deprecated. Please use CreditCard.update" result = @gateway.credit_card.update(token, attributes) if result.success? copy_instance_variables_from_object result.credit_card end result end
ruby
def update(attributes) warn "[DEPRECATED] update as an instance method is deprecated. Please use CreditCard.update" result = @gateway.credit_card.update(token, attributes) if result.success? copy_instance_variables_from_object result.credit_card end result end
[ "def", "update", "(", "attributes", ")", "warn", "\"[DEPRECATED] update as an instance method is deprecated. Please use CreditCard.update\"", "result", "=", "@gateway", ".", "credit_card", ".", "update", "(", "token", ",", "attributes", ")", "if", "result", ".", "success?...
Deprecated. Use Braintree::CreditCard.update
[ "Deprecated", ".", "Use", "Braintree", "::", "CreditCard", ".", "update" ]
6e56c7099ea55bcdc4073cbea60b2688cef69663
https://github.com/braintree/braintree_ruby/blob/6e56c7099ea55bcdc4073cbea60b2688cef69663/lib/braintree/credit_card.rb#L218-L225
train
Update an existing CreditCard
[ 30522, 13366, 10651, 1006, 12332, 1007, 11582, 1000, 1031, 2139, 28139, 12921, 1033, 10651, 2004, 2019, 6013, 4118, 2003, 2139, 28139, 12921, 1012, 3531, 2224, 4923, 11522, 1012, 10651, 1000, 2765, 1027, 1030, 11909, 1012, 4923, 1035, 4003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/dhcp_options.rb
Aws::EC2.DhcpOptions.delete
def delete(options = {}) options = options.merge(dhcp_options_id: @id) resp = @client.delete_dhcp_options(options) resp.data end
ruby
def delete(options = {}) options = options.merge(dhcp_options_id: @id) resp = @client.delete_dhcp_options(options) resp.data end
[ "def", "delete", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "dhcp_options_id", ":", "@id", ")", "resp", "=", "@client", ".", "delete_dhcp_options", "(", "options", ")", "resp", ".", "data", "end" ]
@example Request syntax with placeholder values dhcp_options.delete({ 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/dhcp_options.rb#L254-L258
train
Delete a DHCP options
[ 30522, 13366, 3972, 12870, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 28144, 21906, 1035, 7047, 1035, 8909, 1024, 1030, 8909, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3972, 12870, 1035, 28144, 21906, 1035, 70...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/manifest.rb
Sprockets.Manifest.clean
def clean(count = 2, age = 3600) asset_versions = files.group_by { |_, attrs| attrs['logical_path'] } asset_versions.each do |logical_path, versions| current = assets[logical_path] versions.reject { |path, _| path == current }.sort_by { |_, attrs| # Sort by timestamp Time.parse(attrs['mtime']) }.reverse.each_with_index.drop_while { |(_, attrs), index| _age = [0, Time.now - Time.parse(attrs['mtime'])].max # Keep if under age or within the count limit _age < age || index < count }.each { |(path, _), _| # Remove old assets remove(path) } end end
ruby
def clean(count = 2, age = 3600) asset_versions = files.group_by { |_, attrs| attrs['logical_path'] } asset_versions.each do |logical_path, versions| current = assets[logical_path] versions.reject { |path, _| path == current }.sort_by { |_, attrs| # Sort by timestamp Time.parse(attrs['mtime']) }.reverse.each_with_index.drop_while { |(_, attrs), index| _age = [0, Time.now - Time.parse(attrs['mtime'])].max # Keep if under age or within the count limit _age < age || index < count }.each { |(path, _), _| # Remove old assets remove(path) } end end
[ "def", "clean", "(", "count", "=", "2", ",", "age", "=", "3600", ")", "asset_versions", "=", "files", ".", "group_by", "{", "|", "_", ",", "attrs", "|", "attrs", "[", "'logical_path'", "]", "}", "asset_versions", ".", "each", "do", "|", "logical_path",...
Cleanup old assets in the compile directory. By default it will keep the latest version, 2 backups and any created within the past hour. Examples To force only 1 backup to be kept, set count=1 and age=0. To only keep files created within the last 10 minutes, set count=0 and age=600.
[ "Cleanup", "old", "assets", "in", "the", "compile", "directory", ".", "By", "default", "it", "will", "keep", "the", "latest", "version", "2", "backups", "and", "any", "created", "within", "the", "past", "hour", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/manifest.rb#L245-L265
train
Clean up the assets
[ 30522, 13366, 4550, 1006, 4175, 1027, 1016, 1010, 2287, 1027, 9475, 2692, 1007, 11412, 1035, 4617, 1027, 6764, 1012, 2177, 1035, 2011, 1063, 1064, 1035, 1010, 2012, 16344, 2015, 1064, 2012, 16344, 2015, 1031, 1005, 11177, 1035, 4130, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
plataformatec/responders
lib/action_controller/responder.rb
ActionController.Responder.navigation_behavior
def navigation_behavior(error) if get? raise error elsif has_errors? && default_action render rendering_options else redirect_to navigation_location end end
ruby
def navigation_behavior(error) if get? raise error elsif has_errors? && default_action render rendering_options else redirect_to navigation_location end end
[ "def", "navigation_behavior", "(", "error", ")", "if", "get?", "raise", "error", "elsif", "has_errors?", "&&", "default_action", "render", "rendering_options", "else", "redirect_to", "navigation_location", "end", "end" ]
This is the common behavior for formats associated with browsing, like :html, :iphone and so forth.
[ "This", "is", "the", "common", "behavior", "for", "formats", "associated", "with", "browsing", "like", ":", "html", ":", "iphone", "and", "so", "forth", "." ]
a1a2706091d4ffcbbe387407ddfc5671a59ad842
https://github.com/plataformatec/responders/blob/a1a2706091d4ffcbbe387407ddfc5671a59ad842/lib/action_controller/responder.rb#L199-L207
train
This method is called when a user has requested a page to be redirected to.
[ 30522, 13366, 9163, 1035, 5248, 1006, 7561, 1007, 2065, 2131, 1029, 5333, 7561, 3449, 5332, 2546, 2038, 1035, 10697, 1029, 1004, 1004, 12398, 1035, 2895, 17552, 14259, 1035, 7047, 2842, 2417, 7442, 6593, 1035, 2000, 9163, 1035, 3295, 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_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/storage_accounts.rb
Azure::DataLakeAnalytics::Mgmt::V2016_11_01.StorageAccounts.list_by_account_as_lazy
def list_by_account_as_lazy(resource_group_name, account_name, filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil) response = list_by_account_async(resource_group_name, account_name, filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_account_next_async(next_page_link, custom_headers:custom_headers) end page end end
ruby
def list_by_account_as_lazy(resource_group_name, account_name, filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil) response = list_by_account_async(resource_group_name, account_name, filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_account_next_async(next_page_link, custom_headers:custom_headers) end page end end
[ "def", "list_by_account_as_lazy", "(", "resource_group_name", ",", "account_name", ",", "filter", ":", "nil", ",", "top", ":", "nil", ",", "skip", ":", "nil", ",", "select", ":", "nil", ",", "orderby", ":", "nil", ",", "count", ":", "nil", ",", "custom_h...
Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resource_group_name [String] The name of the Azure resource group. @param account_name [String] The name of the Data Lake Analytics account. @param filter [String] The OData filter. Optional. @param top [Integer] The number of items to return. Optional. @param skip [Integer] The number of items to skip over before returning elements. Optional. @param select [String] OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. @param orderby [String] OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. @param count [Boolean] The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [StorageAccountInformationListResult] which provide lazy access to pages of the response.
[ "Gets", "the", "first", "page", "of", "Azure", "Storage", "accounts", "if", "any", "linked", "to", "the", "specified", "Data", "Lake", "Analytics", "account", ".", "The", "response", "includes", "a", "link", "to", "the", "next", "page", "if", "any", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/storage_accounts.rb#L1197-L1206
train
Gets a list of all the image objects in an App Service Environment.
[ 30522, 13366, 2862, 1035, 2011, 1035, 4070, 1035, 2004, 1035, 13971, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 11307, 1024, 9152, 2140, 1010, 2327, 1024, 9152, 2140, 1010, 13558, 1024, 9152, 2140, 1010, 7276, 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...
samvera/hyrax
app/models/concerns/hyrax/collection_behavior.rb
Hyrax.CollectionBehavior.add_member_objects
def add_member_objects(new_member_ids) Array(new_member_ids).collect do |member_id| member = ActiveFedora::Base.find(member_id) message = Hyrax::MultipleMembershipChecker.new(item: member).check(collection_ids: id, include_current_members: true) if message member.errors.add(:collections, message) else member.member_of_collections << self member.save! end member end end
ruby
def add_member_objects(new_member_ids) Array(new_member_ids).collect do |member_id| member = ActiveFedora::Base.find(member_id) message = Hyrax::MultipleMembershipChecker.new(item: member).check(collection_ids: id, include_current_members: true) if message member.errors.add(:collections, message) else member.member_of_collections << self member.save! end member end end
[ "def", "add_member_objects", "(", "new_member_ids", ")", "Array", "(", "new_member_ids", ")", ".", "collect", "do", "|", "member_id", "|", "member", "=", "ActiveFedora", "::", "Base", ".", "find", "(", "member_id", ")", "message", "=", "Hyrax", "::", "Multip...
Add member objects by adding this collection to the objects' member_of_collection association. @param [Enumerable<String>] the ids of the new child collections and works collection ids Valkyrie Version: Wings::CollectionBehavior#add_collections_and_works aliased to #add_member_objects lib/wings/models/concerns/collection_behavior.rb
[ "Add", "member", "objects", "by", "adding", "this", "collection", "to", "the", "objects", "member_of_collection", "association", "." ]
e2b4f56e829a53b1f11296324736e9d5b8c9ee5f
https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/models/concerns/hyrax/collection_behavior.rb#L64-L76
train
Add a list of member objects to the collection
[ 30522, 13366, 5587, 1035, 2266, 1035, 5200, 1006, 2047, 1035, 2266, 1035, 8909, 2015, 1007, 9140, 1006, 2047, 1035, 2266, 1035, 8909, 2015, 1007, 1012, 8145, 2079, 1064, 2266, 1035, 8909, 1064, 2266, 1027, 3161, 25031, 6525, 1024, 1024, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb
Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_web_worker_usages_next
def list_web_worker_usages_next(next_page_link, custom_headers:nil) response = list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def list_web_worker_usages_next(next_page_link, custom_headers:nil) response = list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "list_web_worker_usages_next", "(", "next_page_link", ",", "custom_headers", ":", "nil", ")", "response", "=", "list_web_worker_usages_next_async", "(", "next_page_link", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "response", ".", "body", "unle...
Get usage metrics for a worker pool of an App Service Environment. Get usage metrics for a worker pool of an App Service Environment. @param 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 [UsageCollection] operation results.
[ "Get", "usage", "metrics", "for", "a", "worker", "pool", "of", "an", "App", "Service", "Environment", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L7042-L7045
train
Gets the list of web worker usages for a given App Service Environment.
[ 30522, 13366, 2862, 1035, 4773, 1035, 7309, 1035, 8192, 2015, 1035, 2279, 1006, 2279, 1035, 3931, 1035, 4957, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2862, 1035, 4773, 1035, 7309, 1035, 8192, 2015, 1035, 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...
puppetlabs/puppet
lib/puppet/module_tool/contents_description.rb
Puppet::ModuleTool.ContentsDescription.provider_doc
def provider_doc(type) providers = [] type.providers.sort.each do |prov| providers.push(:name => prov, :doc => type.provider(prov).doc) end providers end
ruby
def provider_doc(type) providers = [] type.providers.sort.each do |prov| providers.push(:name => prov, :doc => type.provider(prov).doc) end providers end
[ "def", "provider_doc", "(", "type", ")", "providers", "=", "[", "]", "type", ".", "providers", ".", "sort", ".", "each", "do", "|", "prov", "|", "providers", ".", "push", "(", ":name", "=>", "prov", ",", ":doc", "=>", "type", ".", "provider", "(", ...
Return an array of hashes representing this +type+'s providers, each containing :name and :doc.
[ "Return", "an", "array", "of", "hashes", "representing", "this", "+", "type", "+", "s", "providers", "each", "containing", ":", "name", "and", ":", "doc", "." ]
4baeed97cbb7571ddc6635f0a24debe2e8b22cd3
https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/module_tool/contents_description.rb#L78-L86
train
Returns the doc of the provider doc for a given type
[ 30522, 13366, 10802, 1035, 9986, 1006, 2828, 1007, 11670, 1027, 1031, 1033, 2828, 1012, 11670, 1012, 4066, 1012, 2169, 2079, 1064, 4013, 2615, 1064, 11670, 1012, 5245, 1006, 1024, 2171, 1027, 1028, 4013, 2615, 1010, 1024, 9986, 1027, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.delete_image_tags
def delete_image_tags(project_id, image_ids, tag_ids, custom_headers:nil) response = delete_image_tags_async(project_id, image_ids, tag_ids, custom_headers:custom_headers).value! nil end
ruby
def delete_image_tags(project_id, image_ids, tag_ids, custom_headers:nil) response = delete_image_tags_async(project_id, image_ids, tag_ids, custom_headers:custom_headers).value! nil end
[ "def", "delete_image_tags", "(", "project_id", ",", "image_ids", ",", "tag_ids", ",", "custom_headers", ":", "nil", ")", "response", "=", "delete_image_tags_async", "(", "project_id", ",", "image_ids", ",", "tag_ids", ",", "custom_headers", ":custom_headers", ")", ...
Remove a set of tags from a set of images. @param project_id The project id. @param image_ids Image ids. Limited to 64 images. @param tag_ids Tags to be deleted from the specified images. Limited to 20 tags. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Remove", "a", "set", "of", "tags", "from", "a", "set", "of", "images", "." ]
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#L647-L650
train
Deletes the tags from an image.
[ 30522, 13366, 3972, 12870, 1035, 3746, 1035, 22073, 1006, 2622, 1035, 8909, 1010, 3746, 1035, 8909, 2015, 1010, 6415, 1035, 8909, 2015, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3972, 12870, 1035, 3746, 1035, 22073,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb
Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.batch_read_file
def batch_read_file(url, mode, custom_headers:nil) response = batch_read_file_async(url, mode, custom_headers:custom_headers).value! nil end
ruby
def batch_read_file(url, mode, custom_headers:nil) response = batch_read_file_async(url, mode, custom_headers:custom_headers).value! nil end
[ "def", "batch_read_file", "(", "url", ",", "mode", ",", "custom_headers", ":", "nil", ")", "response", "=", "batch_read_file_async", "(", "url", ",", "mode", ",", "custom_headers", ":custom_headers", ")", ".", "value!", "nil", "end" ]
Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read File interface, the response contains a field called "Operation-Location". The "Operation-Location" field contains the URL that you must use for your "Read Operation Result" operation to access OCR results.​ @param mode [TextRecognitionMode] Type of text to recognize. Possible values include: 'Handwritten', 'Printed' @param url [String] Publicly reachable URL of an image. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "Use", "this", "interface", "to", "get", "the", "result", "of", "a", "Read", "operation", "employing", "the", "state", "-", "of", "-", "the", "-", "art", "Optical", "Character", "Recognition", "(", "OCR", ")", "algorithms", "optimized", "for", "text", "-",...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L1590-L1593
train
Read a file.
[ 30522, 13366, 14108, 1035, 3191, 1035, 5371, 1006, 24471, 2140, 1010, 5549, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 14108, 1035, 3191, 1035, 5371, 1035, 2004, 6038, 2278, 1006, 24471, 2140, 1010, 5549, 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...
Azure/azure-sdk-for-ruby
management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb
Azure::PolicyInsights::Mgmt::V2018_07_01_preview.PolicyTrackedResources.list_query_results_for_resource_group
def list_query_results_for_resource_group(resource_group_name, query_options:nil, custom_headers:nil) first_page = list_query_results_for_resource_group_as_lazy(resource_group_name, query_options:query_options, custom_headers:custom_headers) first_page.get_all_items end
ruby
def list_query_results_for_resource_group(resource_group_name, query_options:nil, custom_headers:nil) first_page = list_query_results_for_resource_group_as_lazy(resource_group_name, query_options:query_options, custom_headers:custom_headers) first_page.get_all_items end
[ "def", "list_query_results_for_resource_group", "(", "resource_group_name", ",", "query_options", ":", "nil", ",", "custom_headers", ":", "nil", ")", "first_page", "=", "list_query_results_for_resource_group_as_lazy", "(", "resource_group_name", ",", "query_options", ":query_...
Queries policy tracked resources under the resource group. @param resource_group_name [String] Resource group name. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array<PolicyTrackedResource>] operation results.
[ "Queries", "policy", "tracked", "resources", "under", "the", "resource", "group", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb#L230-L233
train
Gets all the available advisor terms.
[ 30522, 13366, 2862, 1035, 23032, 1035, 3463, 1035, 2005, 1035, 7692, 1035, 2177, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 23032, 1035, 7047, 1024, 9152, 2140, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 2034, 1035, 3931, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hashicorp/vault-ruby
lib/vault/persistent.rb
Vault.PersistentHTTP.idempotent?
def idempotent? req case req when Net::HTTP::Delete, Net::HTTP::Get, Net::HTTP::Head, Net::HTTP::Options, Net::HTTP::Put, Net::HTTP::Trace then true end end
ruby
def idempotent? req case req when Net::HTTP::Delete, Net::HTTP::Get, Net::HTTP::Head, Net::HTTP::Options, Net::HTTP::Put, Net::HTTP::Trace then true end end
[ "def", "idempotent?", "req", "case", "req", "when", "Net", "::", "HTTP", "::", "Delete", ",", "Net", "::", "HTTP", "::", "Get", ",", "Net", "::", "HTTP", "::", "Head", ",", "Net", "::", "HTTP", "::", "Options", ",", "Net", "::", "HTTP", "::", "Put"...
Is +req+ idempotent according to RFC 2616?
[ "Is", "+", "req", "+", "idempotent", "according", "to", "RFC", "2616?" ]
02f0532a802ba1a2a0d8703a4585dab76eb9d864
https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/persistent.rb#L729-L735
train
Returns true if the request is idempotent.
[ 30522, 13366, 8909, 6633, 11008, 4765, 1029, 2128, 4160, 2553, 2128, 4160, 2043, 5658, 1024, 1024, 8299, 1024, 1024, 3972, 12870, 1010, 5658, 1024, 1024, 8299, 1024, 1024, 2131, 1010, 5658, 1024, 1024, 8299, 1024, 1024, 2132, 1010, 5658, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
toptal/chewy
lib/chewy/query.rb
Chewy.Query.explain
def explain(value = nil) chain { criteria.update_request_options explain: (value.nil? ? true : value) } end
ruby
def explain(value = nil) chain { criteria.update_request_options explain: (value.nil? ? true : value) } end
[ "def", "explain", "(", "value", "=", "nil", ")", "chain", "{", "criteria", ".", "update_request_options", "explain", ":", "(", "value", ".", "nil?", "?", "true", ":", "value", ")", "}", "end" ]
Comparation with other query or collection If other is collection - search request is executed and result is used for comparation @example UsersIndex.filter(term: {name: 'Johny'}) == UsersIndex.filter(term: {name: 'Johny'}) # => true UsersIndex.filter(term: {name: 'Johny'}) == UsersIndex.filter(term: {name: 'Johny'}).to_a # => true UsersIndex.filter(term: {name: 'Johny'}) == UsersIndex.filter(term: {name: 'Winnie'}) # => false Adds `explain` parameter to search request. @example UsersIndex.filter(term: {name: 'Johny'}).explain UsersIndex.filter(term: {name: 'Johny'}).explain(true) UsersIndex.filter(term: {name: 'Johny'}).explain(false) Calling explain without any arguments sets explanation flag to true. With `explain: true`, every result object has `_explanation` method @example UsersIndex::User.filter(term: {name: 'Johny'}).explain.first._explanation # => {...}
[ "Comparation", "with", "other", "query", "or", "collection", "If", "other", "is", "collection", "-", "search", "request", "is", "executed", "and", "result", "is", "used", "for", "comparation" ]
cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b
https://github.com/toptal/chewy/blob/cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b/lib/chewy/query.rb#L75-L77
train
Returns the current request options for the current request
[ 30522, 13366, 4863, 1006, 3643, 1027, 9152, 2140, 1007, 4677, 1063, 9181, 1012, 10651, 1035, 5227, 1035, 7047, 4863, 1024, 1006, 3643, 1012, 9152, 2140, 1029, 1029, 2995, 1024, 3643, 1007, 1065, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/stylesheet/styles.rb
Axlsx.Styles.to_xml_string
def to_xml_string(str = '') str << ('<styleSheet xmlns="' << XML_NS << '">') [:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key| self.instance_values[key.to_s].to_xml_string(str) unless self.instance_values[key.to_s].nil? end str << '</styleSheet>' end
ruby
def to_xml_string(str = '') str << ('<styleSheet xmlns="' << XML_NS << '">') [:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key| self.instance_values[key.to_s].to_xml_string(str) unless self.instance_values[key.to_s].nil? end str << '</styleSheet>' end
[ "def", "to_xml_string", "(", "str", "=", "''", ")", "str", "<<", "(", "'<styleSheet xmlns=\"'", "<<", "XML_NS", "<<", "'\">'", ")", "[", ":numFmts", ",", ":fonts", ",", ":fills", ",", ":borders", ",", ":cellStyleXfs", ",", ":cellXfs", ",", ":cellStyles", "...
Serializes the object @param [String] str @return [String]
[ "Serializes", "the", "object" ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/stylesheet/styles.rb#L364-L370
train
Returns the XML string for this stylesheet.
[ 30522, 13366, 2000, 1035, 20950, 1035, 5164, 1006, 2358, 2099, 1027, 1005, 1005, 1007, 2358, 2099, 1026, 1026, 1006, 30524, 2595, 10343, 1010, 1024, 3526, 2595, 10343, 1010, 1024, 4442, 27983, 2015, 1010, 1024, 1040, 2595, 10343, 1010, 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...
randym/axlsx
lib/axlsx/workbook/worksheet/worksheet_drawing.rb
Axlsx.WorksheetDrawing.add_chart
def add_chart(chart_type, options) @drawing ||= Drawing.new worksheet drawing.add_chart(chart_type, options) end
ruby
def add_chart(chart_type, options) @drawing ||= Drawing.new worksheet drawing.add_chart(chart_type, options) end
[ "def", "add_chart", "(", "chart_type", ",", "options", ")", "@drawing", "||=", "Drawing", ".", "new", "worksheet", "drawing", ".", "add_chart", "(", "chart_type", ",", "options", ")", "end" ]
adds a chart to the drawing object @param [Class] chart_type The type of chart to add @param [Hash] options Options to pass on to the drawing and chart @see Worksheet#add_chart
[ "adds", "a", "chart", "to", "the", "drawing", "object" ]
c593a08b2a929dac7aa8dc418b55e26b4c49dc34
https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/worksheet_drawing.rb#L25-L28
train
Add a chart to the chart chart_type is a chart type.
[ 30522, 13366, 5587, 1035, 3673, 1006, 3673, 1035, 2828, 1010, 7047, 1007, 1030, 5059, 1064, 1064, 1027, 5059, 1012, 2047, 2573, 21030, 2102, 5059, 1012, 5587, 1035, 3673, 1006, 3673, 1035, 2828, 1010, 7047, 1007, 2203, 102, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_deployed_application_info_list
def get_deployed_application_info_list(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil) response = get_deployed_application_info_list_async(node_name, timeout:timeout, include_health_state:include_health_state, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def get_deployed_application_info_list(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil) response = get_deployed_application_info_list_async(node_name, timeout:timeout, include_health_state:include_health_state, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "get_deployed_application_info_list", "(", "node_name", ",", "timeout", ":", "60", ",", "include_health_state", ":", "false", ",", "continuation_token", ":", "nil", ",", "max_results", ":", "0", ",", "custom_headers", ":", "nil", ")", "response", "=", "ge...
Gets the list of applications deployed on a Service Fabric node. Gets the list of applications deployed on a Service Fabric node. The results do not include information about deployed system applications unless explicitly queried for by ID. Results encompass deployed applications in active, activating, and downloading states. This query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster. @param node_name [String] The name of the node. @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 include_health_state [Boolean] Include the health state of an entity. If this parameter is false or not specified, then the health state returned is "Unknown". When set to true, the query goes in parallel to the node and the health system service before the results are merged. As a result, the query is more expensive and may take a longer time. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PagedDeployedApplicationInfoList] operation results.
[ "Gets", "the", "list", "of", "applications", "deployed", "on", "a", "Service", "Fabric", "node", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L8401-L8404
train
Gets the list of applications deployed to a node.
[ 30522, 13366, 2131, 1035, 7333, 1035, 4646, 1035, 18558, 1035, 2862, 1006, 13045, 1035, 2171, 1010, 2051, 5833, 1024, 3438, 1010, 2421, 1035, 2740, 1035, 2110, 1024, 6270, 1010, 13633, 1035, 19204, 1024, 9152, 2140, 1010, 4098, 1035, 3463, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aws/aws-sdk-ruby
gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb
Aws::IAM.User.create_login_profile
def create_login_profile(options = {}) options = options.merge(user_name: @name) resp = @client.create_login_profile(options) LoginProfile.new( user_name: resp.data.login_profile.user_name, data: resp.data.login_profile, client: @client ) end
ruby
def create_login_profile(options = {}) options = options.merge(user_name: @name) resp = @client.create_login_profile(options) LoginProfile.new( user_name: resp.data.login_profile.user_name, data: resp.data.login_profile, client: @client ) end
[ "def", "create_login_profile", "(", "options", "=", "{", "}", ")", "options", "=", "options", ".", "merge", "(", "user_name", ":", "@name", ")", "resp", "=", "@client", ".", "create_login_profile", "(", "options", ")", "LoginProfile", ".", "new", "(", "use...
@example Request syntax with placeholder values loginprofile = user.create_login_profile({ password: "passwordType", # required password_reset_required: false, }) @param [Hash] options ({}) @option options [required, String] :password The new password for the user. The [regex pattern][1] that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (\\u0020) through the end of the ASCII character range (\\u00FF). You can also include the tab (\\u0009), line feed (\\u000A), and carriage return (\\u000D) characters. Any of these characters are valid in a password. However, many tools, such as the AWS Management Console, might restrict the ability to type certain characters because they have special meaning within that tool. [1]: http://wikipedia.org/wiki/regex @option options [Boolean] :password_reset_required Specifies whether the user is required to set a new password on next sign-in. @return [LoginProfile]
[ "@example", "Request", "syntax", "with", "placeholder", "values" ]
e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d
https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb#L447-L455
train
Creates a login profile
[ 30522, 13366, 3443, 1035, 8833, 2378, 1035, 6337, 1006, 7047, 1027, 1063, 1065, 1007, 7047, 1027, 7047, 1012, 13590, 1006, 5310, 1035, 2171, 1024, 1030, 2171, 1007, 24501, 2361, 1027, 1030, 7396, 1012, 3443, 1035, 8833, 2378, 1035, 6337, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
abonas/kubeclient
lib/kubeclient/common.rb
Kubeclient.ClientMixin.define_entity_methods
def define_entity_methods @entities.values.each do |entity| # get all entities of a type e.g. get_nodes, get_pods, etc. define_singleton_method("get_#{entity.method_names[1]}") do |options = {}| get_entities(entity.entity_type, entity.resource_name, options) end # watch all entities of a type e.g. watch_nodes, watch_pods, etc. define_singleton_method("watch_#{entity.method_names[1]}") do |options = {}| # This method used to take resource_version as a param, so # this conversion is to keep backwards compatibility options = { resource_version: options } unless options.is_a?(Hash) watch_entities(entity.resource_name, options) end # get a single entity of a specific type by name define_singleton_method("get_#{entity.method_names[0]}") \ do |name, namespace = nil, opts = {}| get_entity(entity.resource_name, name, namespace, opts) end define_singleton_method("delete_#{entity.method_names[0]}") \ do |name, namespace = nil, opts = {}| delete_entity(entity.resource_name, name, namespace, opts) end define_singleton_method("create_#{entity.method_names[0]}") do |entity_config| create_entity(entity.entity_type, entity.resource_name, entity_config) end define_singleton_method("update_#{entity.method_names[0]}") do |entity_config| update_entity(entity.resource_name, entity_config) end define_singleton_method("patch_#{entity.method_names[0]}") \ do |name, patch, namespace = nil| patch_entity(entity.resource_name, name, patch, 'strategic-merge-patch', namespace) end define_singleton_method("json_patch_#{entity.method_names[0]}") \ do |name, patch, namespace = nil| patch_entity(entity.resource_name, name, patch, 'json-patch', namespace) end define_singleton_method("merge_patch_#{entity.method_names[0]}") \ do |name, patch, namespace = nil| patch_entity(entity.resource_name, name, patch, 'merge-patch', namespace) end end end
ruby
def define_entity_methods @entities.values.each do |entity| # get all entities of a type e.g. get_nodes, get_pods, etc. define_singleton_method("get_#{entity.method_names[1]}") do |options = {}| get_entities(entity.entity_type, entity.resource_name, options) end # watch all entities of a type e.g. watch_nodes, watch_pods, etc. define_singleton_method("watch_#{entity.method_names[1]}") do |options = {}| # This method used to take resource_version as a param, so # this conversion is to keep backwards compatibility options = { resource_version: options } unless options.is_a?(Hash) watch_entities(entity.resource_name, options) end # get a single entity of a specific type by name define_singleton_method("get_#{entity.method_names[0]}") \ do |name, namespace = nil, opts = {}| get_entity(entity.resource_name, name, namespace, opts) end define_singleton_method("delete_#{entity.method_names[0]}") \ do |name, namespace = nil, opts = {}| delete_entity(entity.resource_name, name, namespace, opts) end define_singleton_method("create_#{entity.method_names[0]}") do |entity_config| create_entity(entity.entity_type, entity.resource_name, entity_config) end define_singleton_method("update_#{entity.method_names[0]}") do |entity_config| update_entity(entity.resource_name, entity_config) end define_singleton_method("patch_#{entity.method_names[0]}") \ do |name, patch, namespace = nil| patch_entity(entity.resource_name, name, patch, 'strategic-merge-patch', namespace) end define_singleton_method("json_patch_#{entity.method_names[0]}") \ do |name, patch, namespace = nil| patch_entity(entity.resource_name, name, patch, 'json-patch', namespace) end define_singleton_method("merge_patch_#{entity.method_names[0]}") \ do |name, patch, namespace = nil| patch_entity(entity.resource_name, name, patch, 'merge-patch', namespace) end end end
[ "def", "define_entity_methods", "@entities", ".", "values", ".", "each", "do", "|", "entity", "|", "# get all entities of a type e.g. get_nodes, get_pods, etc.", "define_singleton_method", "(", "\"get_#{entity.method_names[1]}\"", ")", "do", "|", "options", "=", "{", "}", ...
rubocop:disable Metrics/BlockLength
[ "rubocop", ":", "disable", "Metrics", "/", "BlockLength" ]
3630f6c82532fba04f3e1a62d6b99c6cf2910451
https://github.com/abonas/kubeclient/blob/3630f6c82532fba04f3e1a62d6b99c6cf2910451/lib/kubeclient/common.rb#L207-L257
train
Define all the methods that are defined in the class
[ 30522, 13366, 9375, 1035, 9178, 1035, 4725, 1030, 11422, 1012, 5300, 1012, 2169, 2079, 1064, 9178, 1064, 1001, 2131, 2035, 11422, 1997, 1037, 2828, 1041, 1012, 1043, 1012, 2131, 1035, 14164, 1010, 2131, 1035, 26723, 1010, 4385, 1012, 9375, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rails/sprockets
lib/sprockets/utils.rb
Sprockets.Utils.module_include
def module_include(base, mod) old_methods = {} mod.instance_methods.each do |sym| old_methods[sym] = base.instance_method(sym) if base.method_defined?(sym) end mod.instance_methods.each do |sym| method = mod.instance_method(sym) base.send(:define_method, sym, method) end yield ensure mod.instance_methods.each do |sym| base.send(:undef_method, sym) if base.method_defined?(sym) end old_methods.each do |sym, method| base.send(:define_method, sym, method) end end
ruby
def module_include(base, mod) old_methods = {} mod.instance_methods.each do |sym| old_methods[sym] = base.instance_method(sym) if base.method_defined?(sym) end mod.instance_methods.each do |sym| method = mod.instance_method(sym) base.send(:define_method, sym, method) end yield ensure mod.instance_methods.each do |sym| base.send(:undef_method, sym) if base.method_defined?(sym) end old_methods.each do |sym, method| base.send(:define_method, sym, method) end end
[ "def", "module_include", "(", "base", ",", "mod", ")", "old_methods", "=", "{", "}", "mod", ".", "instance_methods", ".", "each", "do", "|", "sym", "|", "old_methods", "[", "sym", "]", "=", "base", ".", "instance_method", "(", "sym", ")", "if", "base",...
Internal: Inject into target module for the duration of the block. mod - Module Returns result of block.
[ "Internal", ":", "Inject", "into", "target", "module", "for", "the", "duration", "of", "the", "block", "." ]
9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd
https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/utils.rb#L126-L146
train
Include the given module in the given base class.
[ 30522, 13366, 11336, 1035, 2421, 1006, 2918, 1010, 16913, 1007, 2214, 1035, 4725, 1027, 1063, 1065, 16913, 1012, 6013, 1035, 4725, 1012, 2169, 2079, 1064, 25353, 2213, 1064, 2214, 1035, 4725, 1031, 25353, 2213, 1033, 1027, 2918, 1012, 6013,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
intridea/hashie
lib/hashie/mash.rb
Hashie.Mash.initializing_reader
def initializing_reader(key) ck = convert_key(key) regular_writer(ck, self.class.new) unless key?(ck) regular_reader(ck) end
ruby
def initializing_reader(key) ck = convert_key(key) regular_writer(ck, self.class.new) unless key?(ck) regular_reader(ck) end
[ "def", "initializing_reader", "(", "key", ")", "ck", "=", "convert_key", "(", "key", ")", "regular_writer", "(", "ck", ",", "self", ".", "class", ".", "new", ")", "unless", "key?", "(", "ck", ")", "regular_reader", "(", "ck", ")", "end" ]
This is the bang method reader, it will return a new Mash if there isn't a value already assigned to the key requested.
[ "This", "is", "the", "bang", "method", "reader", "it", "will", "return", "a", "new", "Mash", "if", "there", "isn", "t", "a", "value", "already", "assigned", "to", "the", "key", "requested", "." ]
da9fd39a0e551e09c1441cb7453c969a4afbfd7f
https://github.com/intridea/hashie/blob/da9fd39a0e551e09c1441cb7453c969a4afbfd7f/lib/hashie/mash.rb#L166-L170
train
Initialize the reader for the given key.
[ 30522, 13366, 3988, 6026, 1035, 8068, 1006, 3145, 1007, 23616, 1027, 10463, 1035, 3145, 1006, 3145, 1007, 3180, 1035, 3213, 1006, 23616, 1010, 2969, 1012, 2465, 1012, 2047, 1007, 4983, 3145, 1029, 1006, 23616, 1007, 3180, 1035, 8068, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
cloudfoundry/bosh
src/bosh-director/lib/bosh/director/dns/powerdns.rb
Bosh::Director.PowerDns.update_ptr_record
def update_ptr_record(record_name, ip_address) reverse_domain = reverse_domain(ip_address) reverse_host = reverse_host(ip_address) rdomain = Models::Dns::Domain.safe_find_or_create(name: reverse_domain, type: 'NATIVE') Models::Dns::Record.find_or_create( domain: rdomain, name: reverse_domain, type: 'SOA', content: SOA, ttl: TTL_4H ) Models::Dns::Record.find_or_create( domain: rdomain, name: reverse_domain, type: 'NS', ttl: TTL_4H, content: "ns.#{@domain_name}" ) record = Models::Dns::Record.find_or_create(content: record_name, type: 'PTR') record.update( domain: rdomain, name: reverse_host, content: record_name, type: 'PTR', ttl: TTL_5M, change_date: Time.now.to_i ) end
ruby
def update_ptr_record(record_name, ip_address) reverse_domain = reverse_domain(ip_address) reverse_host = reverse_host(ip_address) rdomain = Models::Dns::Domain.safe_find_or_create(name: reverse_domain, type: 'NATIVE') Models::Dns::Record.find_or_create( domain: rdomain, name: reverse_domain, type: 'SOA', content: SOA, ttl: TTL_4H ) Models::Dns::Record.find_or_create( domain: rdomain, name: reverse_domain, type: 'NS', ttl: TTL_4H, content: "ns.#{@domain_name}" ) record = Models::Dns::Record.find_or_create(content: record_name, type: 'PTR') record.update( domain: rdomain, name: reverse_host, content: record_name, type: 'PTR', ttl: TTL_5M, change_date: Time.now.to_i ) end
[ "def", "update_ptr_record", "(", "record_name", ",", "ip_address", ")", "reverse_domain", "=", "reverse_domain", "(", "ip_address", ")", "reverse_host", "=", "reverse_host", "(", "ip_address", ")", "rdomain", "=", "Models", "::", "Dns", "::", "Domain", ".", "saf...
create/update DNS PTR records (for reverse lookups)
[ "create", "/", "update", "DNS", "PTR", "records", "(", "for", "reverse", "lookups", ")" ]
2eaa7100879ddd20cd909cd698514746195e28b7
https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/dns/powerdns.rb#L77-L106
train
Update a record in the ptr record table
[ 30522, 13366, 10651, 1035, 13866, 2099, 1035, 2501, 1006, 2501, 1035, 2171, 1010, 12997, 1035, 4769, 1007, 7901, 1035, 5884, 1027, 7901, 1035, 5884, 1006, 12997, 1035, 4769, 1007, 7901, 1035, 3677, 1027, 7901, 1035, 3677, 1006, 12997, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_datalake_store/lib/2015-10-01-preview/generated/azure_mgmt_datalake_store/account.rb
Azure::DataLakeStore::Mgmt::V2015_10_01_preview.Account.create_or_update_firewall_rule
def create_or_update_firewall_rule(resource_group_name, account_name, name, parameters, custom_headers:nil) response = create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def create_or_update_firewall_rule(resource_group_name, account_name, name, parameters, custom_headers:nil) response = create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "create_or_update_firewall_rule", "(", "resource_group_name", ",", "account_name", ",", "name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "create_or_update_firewall_rule_async", "(", "resource_group_name", ",", "account_name", ",",...
Creates or updates the specified firewall rule. @param resource_group_name [String] The name of the Azure resource group that contains the Data Lake Store account. @param account_name [String] The name of the Data Lake Store account to which to add the firewall rule. @param name [String] The name of the firewall rule to create or update. @param parameters [FirewallRule] Parameters supplied to create the create firewall rule. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [FirewallRule] operation results.
[ "Creates", "or", "updates", "the", "specified", "firewall", "rule", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_store/lib/2015-10-01-preview/generated/azure_mgmt_datalake_store/account.rb#L336-L339
train
Creates or updates a firewall rule.
[ 30522, 13366, 3443, 1035, 2030, 1035, 10651, 1035, 2543, 9628, 1035, 3627, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 3443, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
appsignal/rdkafka-ruby
lib/rdkafka/config.rb
Rdkafka.Config.consumer
def consumer opaque = Opaque.new config = native_config(opaque) if @consumer_rebalance_listener opaque.consumer_rebalance_listener = @consumer_rebalance_listener Rdkafka::Bindings.rd_kafka_conf_set_rebalance_cb(config, Rdkafka::Bindings::RebalanceCallback) end kafka = native_kafka(config, :rd_kafka_consumer) # Redirect the main queue to the consumer Rdkafka::Bindings.rd_kafka_poll_set_consumer(kafka) # Return consumer with Kafka client Rdkafka::Consumer.new(kafka) end
ruby
def consumer opaque = Opaque.new config = native_config(opaque) if @consumer_rebalance_listener opaque.consumer_rebalance_listener = @consumer_rebalance_listener Rdkafka::Bindings.rd_kafka_conf_set_rebalance_cb(config, Rdkafka::Bindings::RebalanceCallback) end kafka = native_kafka(config, :rd_kafka_consumer) # Redirect the main queue to the consumer Rdkafka::Bindings.rd_kafka_poll_set_consumer(kafka) # Return consumer with Kafka client Rdkafka::Consumer.new(kafka) end
[ "def", "consumer", "opaque", "=", "Opaque", ".", "new", "config", "=", "native_config", "(", "opaque", ")", "if", "@consumer_rebalance_listener", "opaque", ".", "consumer_rebalance_listener", "=", "@consumer_rebalance_listener", "Rdkafka", "::", "Bindings", ".", "rd_k...
Create a consumer with this configuration. @raise [ConfigError] When the configuration contains invalid options @raise [ClientCreationError] When the native client cannot be created @return [Consumer] The created consumer
[ "Create", "a", "consumer", "with", "this", "configuration", "." ]
87b3e0ddae5ea576847cb67228fcea06ec2a24d6
https://github.com/appsignal/rdkafka-ruby/blob/87b3e0ddae5ea576847cb67228fcea06ec2a24d6/lib/rdkafka/config.rb#L110-L126
train
Return the consumer
[ 30522, 13366, 7325, 28670, 1027, 28670, 1012, 2047, 9530, 8873, 2290, 1027, 3128, 1035, 9530, 8873, 2290, 1006, 28670, 1007, 2065, 1030, 7325, 1035, 2128, 26657, 1035, 19373, 28670, 1012, 7325, 1035, 2128, 26657, 1035, 19373, 1027, 1030, 73...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
googleapis/google-cloud-ruby
google-cloud-firestore/lib/google-cloud-firestore.rb
Google.Cloud.firestore
def firestore scope: nil, timeout: nil, client_config: nil Google::Cloud.firestore @project, @keyfile, scope: scope, timeout: (timeout || @timeout), client_config: client_config end
ruby
def firestore scope: nil, timeout: nil, client_config: nil Google::Cloud.firestore @project, @keyfile, scope: scope, timeout: (timeout || @timeout), client_config: client_config end
[ "def", "firestore", "scope", ":", "nil", ",", "timeout", ":", "nil", ",", "client_config", ":", "nil", "Google", "::", "Cloud", ".", "firestore", "@project", ",", "@keyfile", ",", "scope", ":", "scope", ",", "timeout", ":", "(", "timeout", "||", "@timeou...
Creates a new object for connecting to the Firestore service. Each call creates a new connection. For more information on connecting to Google Cloud see the {file:AUTHENTICATION.md Authentication Guide}. @param [String, Array<String>] scope The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. See [Using OAuth 2.0 to Access Google APIs](https://developers.google.com/identity/protocols/OAuth2). The default scope is: * `https://www.googleapis.com/auth/datastore` @param [Integer] timeout Default timeout to use in requests. Optional. @param [Hash] client_config A hash of values to override the default behavior of the API client. Optional. @return [Google::Cloud::Firestore::Client] @example require "google/cloud" gcloud = Google::Cloud.new firestore = gcloud.firestore @example The default scope can be overridden with the `scope` option: require "google/cloud" gcloud = Google::Cloud.new platform_scope = "https://www.googleapis.com/auth/cloud-platform" firestore = gcloud.firestore scope: platform_scope
[ "Creates", "a", "new", "object", "for", "connecting", "to", "the", "Firestore", "service", ".", "Each", "call", "creates", "a", "new", "connection", "." ]
846c1a57250ac860ef4de1b54853a480ab2ff702
https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-firestore/lib/google-cloud-firestore.rb#L63-L67
train
Create a new Firestore instance.
[ 30522, 13366, 8769, 19277, 9531, 1024, 9152, 2140, 1010, 2051, 5833, 1024, 9152, 2140, 1010, 7396, 1035, 9530, 8873, 2290, 1024, 9152, 2140, 8224, 1024, 1024, 6112, 1012, 8769, 19277, 1030, 2622, 1010, 1030, 3145, 8873, 2571, 1010, 9531, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
petergoldstein/dalli
lib/dalli/client.rb
Dalli.Client.get_multi_yielder
def get_multi_yielder(keys) perform do return {} if keys.empty? ring.lock do begin groups = groups_for_keys(keys) if unfound_keys = groups.delete(nil) Dalli.logger.debug { "unable to get keys for #{unfound_keys.length} keys because no matching server was found" } end make_multi_get_requests(groups) servers = groups.keys return if servers.empty? servers = perform_multi_response_start(servers) start = Time.now while true # remove any dead servers servers.delete_if { |s| s.sock.nil? } break if servers.empty? # calculate remaining timeout elapsed = Time.now - start timeout = servers.first.options[:socket_timeout] time_left = (elapsed > timeout) ? 0 : timeout - elapsed sockets = servers.map(&:sock) readable, _ = IO.select(sockets, nil, nil, time_left) if readable.nil? # no response within timeout; abort pending connections servers.each do |server| Dalli.logger.debug { "memcached at #{server.name} did not response within timeout" } server.multi_response_abort end break else readable.each do |sock| server = sock.server begin server.multi_response_nonblock.each_pair do |key, value_list| yield key_without_namespace(key), value_list end if server.multi_response_completed? servers.delete(server) end rescue NetworkError servers.delete(server) end end end end end end end end
ruby
def get_multi_yielder(keys) perform do return {} if keys.empty? ring.lock do begin groups = groups_for_keys(keys) if unfound_keys = groups.delete(nil) Dalli.logger.debug { "unable to get keys for #{unfound_keys.length} keys because no matching server was found" } end make_multi_get_requests(groups) servers = groups.keys return if servers.empty? servers = perform_multi_response_start(servers) start = Time.now while true # remove any dead servers servers.delete_if { |s| s.sock.nil? } break if servers.empty? # calculate remaining timeout elapsed = Time.now - start timeout = servers.first.options[:socket_timeout] time_left = (elapsed > timeout) ? 0 : timeout - elapsed sockets = servers.map(&:sock) readable, _ = IO.select(sockets, nil, nil, time_left) if readable.nil? # no response within timeout; abort pending connections servers.each do |server| Dalli.logger.debug { "memcached at #{server.name} did not response within timeout" } server.multi_response_abort end break else readable.each do |sock| server = sock.server begin server.multi_response_nonblock.each_pair do |key, value_list| yield key_without_namespace(key), value_list end if server.multi_response_completed? servers.delete(server) end rescue NetworkError servers.delete(server) end end end end end end end end
[ "def", "get_multi_yielder", "(", "keys", ")", "perform", "do", "return", "{", "}", "if", "keys", ".", "empty?", "ring", ".", "lock", "do", "begin", "groups", "=", "groups_for_keys", "(", "keys", ")", "if", "unfound_keys", "=", "groups", ".", "delete", "(...
Yields, one at a time, keys and their values+attributes.
[ "Yields", "one", "at", "a", "time", "keys", "and", "their", "values", "+", "attributes", "." ]
5755dbfd06e333a8239f976d4b10492b4555b726
https://github.com/petergoldstein/dalli/blob/5755dbfd06e333a8239f976d4b10492b4555b726/lib/dalli/client.rb#L415-L473
train
yields a block of keys from the multi_get_requests method
[ 30522, 13366, 2131, 1035, 4800, 1035, 10750, 2121, 1006, 6309, 1007, 4685, 2079, 2709, 1063, 1065, 2065, 6309, 1012, 4064, 1029, 3614, 1012, 5843, 2079, 4088, 2967, 1027, 2967, 1035, 2005, 1035, 6309, 1006, 6309, 1007, 2065, 4895, 14876, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octokit/octokit.rb
lib/octokit/client.rb
Octokit.Client.inspect
def inspect inspected = super # mask password inspected.gsub! @password, '*******' if @password inspected.gsub! @management_console_password, '*******' if @management_console_password inspected.gsub! @bearer_token, '********' if @bearer_token # Only show last 4 of token, secret inspected.gsub! @access_token, "#{'*'*36}#{@access_token[36..-1]}" if @access_token inspected.gsub! @client_secret, "#{'*'*36}#{@client_secret[36..-1]}" if @client_secret inspected end
ruby
def inspect inspected = super # mask password inspected.gsub! @password, '*******' if @password inspected.gsub! @management_console_password, '*******' if @management_console_password inspected.gsub! @bearer_token, '********' if @bearer_token # Only show last 4 of token, secret inspected.gsub! @access_token, "#{'*'*36}#{@access_token[36..-1]}" if @access_token inspected.gsub! @client_secret, "#{'*'*36}#{@client_secret[36..-1]}" if @client_secret inspected end
[ "def", "inspect", "inspected", "=", "super", "# mask password", "inspected", ".", "gsub!", "@password", ",", "'*******'", "if", "@password", "inspected", ".", "gsub!", "@management_console_password", ",", "'*******'", "if", "@management_console_password", "inspected", "...
Text representation of the client, masking tokens and passwords @return [String]
[ "Text", "representation", "of", "the", "client", "masking", "tokens", "and", "passwords" ]
ddf750601529a6a7da5fe5293d10031709b8605d
https://github.com/octokit/octokit.rb/blob/ddf750601529a6a7da5fe5293d10031709b8605d/lib/octokit/client.rb#L134-L146
train
Returns the string representation of the object in the correct order.
[ 30522, 13366, 22459, 20456, 1027, 3565, 1001, 7308, 20786, 20456, 1012, 28177, 12083, 999, 1030, 20786, 1010, 1005, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1005, 2065, 1030, 20786, 20456, 1012, 28177, 12083, 999, 1030, 2968, 1035, 10122, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_dns/lib/2017-09-01/generated/azure_mgmt_dns/record_sets.rb
Azure::Dns::Mgmt::V2017_09_01.RecordSets.list_by_dns_zone_with_http_info
def list_by_dns_zone_with_http_info(resource_group_name, zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil) list_by_dns_zone_async(resource_group_name, zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value! end
ruby
def list_by_dns_zone_with_http_info(resource_group_name, zone_name, top:nil, recordsetnamesuffix:nil, custom_headers:nil) list_by_dns_zone_async(resource_group_name, zone_name, top:top, recordsetnamesuffix:recordsetnamesuffix, custom_headers:custom_headers).value! end
[ "def", "list_by_dns_zone_with_http_info", "(", "resource_group_name", ",", "zone_name", ",", "top", ":", "nil", ",", "recordsetnamesuffix", ":", "nil", ",", "custom_headers", ":", "nil", ")", "list_by_dns_zone_async", "(", "resource_group_name", ",", "zone_name", ",",...
Lists all record sets in a DNS zone. @param resource_group_name [String] The name of the resource group. The name is case insensitive. @param zone_name [String] The name of the DNS zone (without a terminating dot). @param top [Integer] The maximum number of record sets to return. If not specified, returns up to 100 record sets. @param recordsetnamesuffix [String] The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .<recordSetNameSuffix> @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.
[ "Lists", "all", "record", "sets", "in", "a", "DNS", "zone", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_dns/lib/2017-09-01/generated/azure_mgmt_dns/record_sets.rb#L750-L752
train
Gets the list of records in a DNS zone.
[ 30522, 13366, 2862, 1035, 2011, 1035, 1040, 3619, 1035, 4224, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4224, 1035, 2171, 1010, 2327, 1024, 9152, 2140, 1010, 2636, 3388, 18442, 6342, 26989, 2595, 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/2015-12-01/generated/azure_mgmt_batch/application_operations.rb
Azure::Batch::Mgmt::V2015_12_01.ApplicationOperations.update_with_http_info
def update_with_http_info(resource_group_name, account_name, application_id, parameters, custom_headers:nil) update_async(resource_group_name, account_name, application_id, parameters, custom_headers:custom_headers).value! end
ruby
def update_with_http_info(resource_group_name, account_name, application_id, parameters, custom_headers:nil) update_async(resource_group_name, account_name, application_id, parameters, custom_headers:custom_headers).value! end
[ "def", "update_with_http_info", "(", "resource_group_name", ",", "account_name", ",", "application_id", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "update_async", "(", "resource_group_name", ",", "account_name", ",", "application_id", ",", "parameters", ...
Updates settings for the specified application. @param resource_group_name [String] The name of the resource group that contains the Batch account. @param account_name [String] The name of the Batch account. @param application_id [String] The ID of the application. @param parameters [UpdateApplicationParameters] The parameters for the request. @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", "settings", "for", "the", "specified", "application", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2015-12-01/generated/azure_mgmt_batch/application_operations.rb#L364-L366
train
Updates an existing App Service Environment.
[ 30522, 13366, 10651, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 4070, 1035, 2171, 1010, 4646, 1035, 8909, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 10651, 1035, 2004, 6038, 2278,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb
Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_node_info_list_with_http_info
def get_node_info_list_with_http_info(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil) get_node_info_list_async(continuation_token:continuation_token, node_status_filter:node_status_filter, timeout:timeout, custom_headers:custom_headers).value! end
ruby
def get_node_info_list_with_http_info(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil) get_node_info_list_async(continuation_token:continuation_token, node_status_filter:node_status_filter, timeout:timeout, custom_headers:custom_headers).value! end
[ "def", "get_node_info_list_with_http_info", "(", "continuation_token", ":", "nil", ",", "node_status_filter", ":", "nil", ",", "timeout", ":", "60", ",", "custom_headers", ":", "nil", ")", "get_node_info_list_async", "(", "continuation_token", ":continuation_token", ","...
Gets the list of nodes in the Service Fabric cluster. Gets the list of nodes in the Service Fabric cluster. The response includes the name, status, id, health, uptime, and other details about the node. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param node_status_filter [NodeStatusFilter] Allows filtering the nodes based on the NodeStatus. Only the nodes that are matching the specified filter value will be returned. The filter value can be one of the following. Possible values include: 'default', 'all', 'up', 'down', 'enabling', 'disabling', 'disabled', 'unknown', 'removed' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.
[ "Gets", "the", "list", "of", "nodes", "in", "the", "Service", "Fabric", "cluster", "." ]
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L3263-L3265
train
Gets the node info list.
[ 30522, 13366, 2131, 1035, 13045, 1035, 18558, 1035, 2862, 1035, 2007, 1035, 8299, 1035, 18558, 1006, 13633, 1035, 19204, 1024, 9152, 2140, 1010, 13045, 1035, 3570, 1035, 11307, 1024, 9152, 2140, 1010, 2051, 5833, 1024, 3438, 1010, 7661, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb
Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGatewayConnections.set_shared_key
def set_shared_key(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil) response = set_shared_key_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
ruby
def set_shared_key(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil) response = set_shared_key_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
[ "def", "set_shared_key", "(", "resource_group_name", ",", "virtual_network_gateway_connection_name", ",", "parameters", ",", "custom_headers", ":", "nil", ")", "response", "=", "set_shared_key_async", "(", "resource_group_name", ",", "virtual_network_gateway_connection_name", ...
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. @param resource_group_name [String] The name of the resource group. @param virtual_network_gateway_connection_name [String] The virtual network gateway connection name. @param parameters [ConnectionSharedKey] Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ConnectionSharedKey] operation results.
[ "The", "Put", "VirtualNetworkGatewayConnectionSharedKey", "operation", "sets", "the", "virtual", "network", "gateway", "connection", "shared", "key", "for", "passed", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "through"...
78eedacf8f8cbd65c2d8a2af421405eaa4373d8e
https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb#L272-L275
train
Sets the virtual network gateway connection shared key.
[ 30522, 13366, 2275, 1035, 4207, 1035, 3145, 1006, 7692, 1035, 2177, 1035, 2171, 1010, 7484, 1035, 2897, 1035, 11909, 1035, 4434, 1035, 2171, 1010, 11709, 1010, 7661, 1035, 20346, 2015, 1024, 9152, 2140, 1007, 3433, 1027, 2275, 1035, 4207, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
projectcypress/health-data-standards
lib/hqmf-parser/2.0/data_criteria_helpers/dc_definition_from_template_or_type_extract.rb
HQMF2.DataCriteriaTypeAndDefinitionExtraction.handle_specific_variable_ref
def handle_specific_variable_ref(reference_criteria) # if there are no referenced children, then it's a variable representing # a single data criteria, so just reference it if reference_criteria.children_criteria.empty? @children_criteria = [reference_criteria.id] # otherwise pull all the data criteria info from the reference else @field_values = reference_criteria.field_values @temporal_references = reference_criteria.temporal_references @subset_operators = reference_criteria.subset_operators @derivation_operator = reference_criteria.derivation_operator @definition = reference_criteria.definition @description = reference_criteria.description @status = reference_criteria.status @children_criteria = reference_criteria.children_criteria end end
ruby
def handle_specific_variable_ref(reference_criteria) # if there are no referenced children, then it's a variable representing # a single data criteria, so just reference it if reference_criteria.children_criteria.empty? @children_criteria = [reference_criteria.id] # otherwise pull all the data criteria info from the reference else @field_values = reference_criteria.field_values @temporal_references = reference_criteria.temporal_references @subset_operators = reference_criteria.subset_operators @derivation_operator = reference_criteria.derivation_operator @definition = reference_criteria.definition @description = reference_criteria.description @status = reference_criteria.status @children_criteria = reference_criteria.children_criteria end end
[ "def", "handle_specific_variable_ref", "(", "reference_criteria", ")", "# if there are no referenced children, then it's a variable representing", "# a single data criteria, so just reference it", "if", "reference_criteria", ".", "children_criteria", ".", "empty?", "@children_criteria", ...
Apply additional information to a specific occurrence's elements from the criteria it references.
[ "Apply", "additional", "information", "to", "a", "specific", "occurrence", "s", "elements", "from", "the", "criteria", "it", "references", "." ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria_helpers/dc_definition_from_template_or_type_extract.rb#L90-L106
train
handle a specific variable reference
[ 30522, 13366, 5047, 1035, 3563, 1035, 8023, 1035, 25416, 1006, 4431, 1035, 9181, 1007, 1001, 2065, 2045, 2024, 2053, 14964, 2336, 1010, 2059, 2009, 1005, 1055, 1037, 8023, 5052, 30524, 5300, 1027, 4431, 1035, 9181, 1012, 2492, 1035, 5300, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
gjtorikian/html-proofer
lib/html-proofer/runner.rb
HTMLProofer.Runner.check_files
def check_files @external_urls = {} process_files.each do |item| @external_urls.merge!(item[:external_urls]) @failures.concat(item[:failures]) end # TODO: lazy. if we're checking only external links, # we'll just trash all the failed tests. really, we should # just not run those other checks at all. if @options[:external_only] @failures = [] validate_urls elsif !@options[:disable_external] validate_urls end end
ruby
def check_files @external_urls = {} process_files.each do |item| @external_urls.merge!(item[:external_urls]) @failures.concat(item[:failures]) end # TODO: lazy. if we're checking only external links, # we'll just trash all the failed tests. really, we should # just not run those other checks at all. if @options[:external_only] @failures = [] validate_urls elsif !@options[:disable_external] validate_urls end end
[ "def", "check_files", "@external_urls", "=", "{", "}", "process_files", ".", "each", "do", "|", "item", "|", "@external_urls", ".", "merge!", "(", "item", "[", ":external_urls", "]", ")", "@failures", ".", "concat", "(", "item", "[", ":failures", "]", ")",...
Collects any external URLs found in a directory of files. Also collectes every failed test from process_files. Sends the external URLs to Typhoeus for batch processing.
[ "Collects", "any", "external", "URLs", "found", "in", "a", "directory", "of", "files", ".", "Also", "collectes", "every", "failed", "test", "from", "process_files", ".", "Sends", "the", "external", "URLs", "to", "Typhoeus", "for", "batch", "processing", "." ]
d00955d3b125b9a1649d056bb347ec30e935d847
https://github.com/gjtorikian/html-proofer/blob/d00955d3b125b9a1649d056bb347ec30e935d847/lib/html-proofer/runner.rb#L65-L82
train
Check the files in the archive.
[ 30522, 13366, 4638, 1035, 6764, 1030, 6327, 1035, 24471, 4877, 1027, 1063, 1065, 2832, 1035, 6764, 1012, 2169, 2079, 1064, 8875, 1064, 1030, 6327, 1035, 24471, 4877, 1012, 13590, 999, 1006, 8875, 1031, 1024, 6327, 1035, 24471, 4877, 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...
mojombo/chronic
lib/chronic/handlers.rb
Chronic.Handlers.handle_rqn_sy
def handle_rqn_sy(tokens, options) year = tokens[1].get_tag(ScalarYear).type quarter_tag = tokens[0].get_tag(RepeaterQuarterName) quarter_tag.start = Chronic.construct(year) quarter_tag.this(:none) end
ruby
def handle_rqn_sy(tokens, options) year = tokens[1].get_tag(ScalarYear).type quarter_tag = tokens[0].get_tag(RepeaterQuarterName) quarter_tag.start = Chronic.construct(year) quarter_tag.this(:none) end
[ "def", "handle_rqn_sy", "(", "tokens", ",", "options", ")", "year", "=", "tokens", "[", "1", "]", ".", "get_tag", "(", "ScalarYear", ")", ".", "type", "quarter_tag", "=", "tokens", "[", "0", "]", ".", "get_tag", "(", "RepeaterQuarterName", ")", "quarter_...
Handle repeater-quarter-name/scalar-year
[ "Handle", "repeater", "-", "quarter", "-", "name", "/", "scalar", "-", "year" ]
2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c
https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L119-L124
train
Handle the RQN sy token
[ 30522, 13366, 5047, 1035, 28134, 2078, 1035, 25353, 1006, 19204, 2015, 1010, 7047, 1007, 2095, 1027, 19204, 2015, 1031, 1015, 1033, 1012, 2131, 1035, 6415, 1006, 26743, 2854, 14644, 1007, 1012, 2828, 4284, 1035, 6415, 1027, 19204, 2015, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hexorx/countries
lib/countries/country.rb
ISO3166.Country.local_names
def local_names ISO3166.configuration.locales = (ISO3166.configuration.locales + languages.map(&:to_sym)).uniq reload @local_names ||= languages.map { |language| translations[language] } end
ruby
def local_names ISO3166.configuration.locales = (ISO3166.configuration.locales + languages.map(&:to_sym)).uniq reload @local_names ||= languages.map { |language| translations[language] } end
[ "def", "local_names", "ISO3166", ".", "configuration", ".", "locales", "=", "(", "ISO3166", ".", "configuration", ".", "locales", "+", "languages", ".", "map", "(", ":to_sym", ")", ")", ".", "uniq", "reload", "@local_names", "||=", "languages", ".", "map", ...
TODO: Looping through locale langs could be be very slow across multiple countries
[ "TODO", ":", "Looping", "through", "locale", "langs", "could", "be", "be", "very", "slow", "across", "multiple", "countries" ]
105973bd905133130bde4d95406c6e710cae3d69
https://github.com/hexorx/countries/blob/105973bd905133130bde4d95406c6e710cae3d69/lib/countries/country.rb#L93-L98
train
Returns the local names of the language.
[ 30522, 13366, 2334, 1035, 3415, 11163, 21486, 28756, 1012, 9563, 1012, 2334, 2229, 1027, 1006, 11163, 21486, 28756, 1012, 9563, 1012, 2334, 2229, 1009, 4155, 1012, 4949, 1006, 1004, 1024, 2000, 1035, 25353, 2213, 1007, 1007, 1012, 4895, 185...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...