cwielenb/CNCF-Dataset huggingface dataset:
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_storage_bucket_object.md

+++ title = "googlestoragebucket_object resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googlestoragebucket_object" identifier = "inspec/resources/gcp/googlestoragebucketobject.md googlestoragebucketobject resource" parent = "inspec/resources/gcp" +++ A `googlestoragebucket_object` is used to test a Google BucketObject resource ``` describe googlestoragebucket_object(bucket: 'bucket-with-object', object: 'image1') do it { should exist } its('size.to_i') { should be > 0 } its('time_created') { should be > Time.now - 606024*10 } its('time_updated') { should be > Time.now - 606024*10 } end describe googlestoragebucket_object(bucket: 'bucket-with-object', object: "nonexistent") do it { should_not exist } end ``` describe googlestoragebucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do it { should exist } end describe googlestoragebucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do its('size') { should be > 0 } end describe googlestoragebucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do its('content_type') { should eq "text/plain; charset=utf-8" } end describe googlestoragebucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do its('timecreateddate') { should be > Time.now - 36560602410 } end describe googlestoragebucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do its('time_updated') { should be > Time.now - 36560602410 } end Properties that can be accessed from the `googlestoragebucket_object` resource: `bucket` : The name of the bucket. `object` : The name of the object. `content_type` : The Content-Type of the object data. See https://developer.mozilla.org/en-US/docs/Web/HTTP/BasicsofHTTP/MIMEtypes/CompletelistofMIME_types for more information on possible Content-Types `crc32c` : CRC32c checksum. `etag` : The object entity tag. `generation` : The content generation of this object. Used for object versioning. `id` : The ID of the object, including the bucket name, object name, and generation number. `md5_hash` : MD5 hash of the data; encoded using base64. `media_link` : Media download link. `metageneration` : The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. `name` : The name of the object. `size` : Content-Length of the data in bytes. `storage_class` : Storage class of the object. `time_created` : The time this object was created. `time_deleted` : The time this object was deleted. Returned if and only if this version of the object is no longer a live version, but remains in the bucket as a noncurrent version. `timestorageclass_updated` : The time at which the object's storage class was last changed. `time_updated` : The modification time of the object metadata. Ensure the is enabled for the current project.
Project: Kraken (Provisioning / Container Registry)
File: STYLEGUIDE.md

This project adheres to the official Go style guidelines: https://github.com/golang/go/wiki/CodeReviewComments Some things we are very picky about: Please read: https://talks.golang.org/2014/names.slide#1 All comments, regardless of location, must have proper grammar, including proper capitalization and punctuation. ```go // this is a bad comment with bad grammar // This is a good comment with good grammar. ``` Avoid comments that state the obvious or repeat code logic. Comments can easily get out of sync with the code and can mislead rather than help. All lines of code should be kept under 100 characters. Comments should be kept under 80 characters. Long function signatures should be broken up like so: ```go func Foo( bar int, baz bool, blah []int) (string, error) { ... } ``` And callsites: ```go // If it fits on a 2nd line: x, err := Foo( 1, false, []int{1, 2, 3}) // If it doesn't: y, err := Foo( 1, false, []int{1, 2, 3, ...}) ``` Be conservative with adding blank lines between blocks of code. Avoid cluttering vertical screen space with blank lines when the code reads just fine without them. Bad: ```go func (s *State) DeletePending(peerID core.PeerID, h core.InfoHash) { k := connKey{peerID, h} if !s.pending[k] { return } delete(s.pending, k) s.capacity[k.infoHash]++ s.log("peer", peerID, "hash", h).Infof( "Deleted pending conn, capacity now at %d", s.capacity[k.infoHash]) } ``` Good: ```go func (s *State) DeletePending(peerID core.PeerID, h core.InfoHash) { k := connKey{peerID, h} if !s.pending[k] { return } delete(s.pending, k) s.capacity[k.infoHash]++ s.log("peer", peerID, "hash", h).Infof( "Deleted pending conn, capacity now at %d", s.capacity[k.infoHash]) } ```
Project: TDengine (App Definition and Development / Database)
File: 17-json.md

title: JSON Type sidebar_label: JSON Type description: This document describes the JSON data type in TDengine. Tag of type JSON ``` create stable s1 (ts timestamp, v1 int) tags (info json) create table s1_1 using s1 tags ('{"k1": "v1"}') ``` "->" Operator of JSON ``` select * from s1 where info->'k1' = 'v1' select info->'k1' from s1 ``` "contains" Operator of JSON ``` select * from s1 where info contains 'k2' select * from s1 where info contains 'k1' ``` When a JSON data type is used in `where`, `match/nmatch/between and/like/and/or/is null/is no null` can be used but `in` can't be used. ``` select from s1 where info->'k1' match 'v'; select * from s1 where info->'k1' like 'v%' and info contains 'k2'; select * from s1 where info is null; select * from s1 where info->'k1' is not null ``` A tag of JSON type can be used in `group by`, `order by`, `join`, `union all` and sub query; for example `group by json->'key'` `Distinct` can be used with a tag of type JSON ``` select distinct info->'k1' from s1 ``` Tag Operations The value of a JSON tag can be altered. Please note that the full JSON will be overridden when doing this. The name of a JSON tag can be altered. A tag of JSON type can't be added or removed. The column length of a JSON tag can't be changed. JSON type can only be used for a tag. There can be only one tag of JSON type, and it's exclusive to any other types of tags. The maximum length of keys in JSON is 256 bytes, and key must be printable ASCII characters. The maximum total length of a JSON is 4,096 bytes. JSON format: The input string for JSON can be empty, i.e. "", "\t", or NULL, but it can't be non-NULL string, bool or array. object can be {}, and the entire JSON is empty if so. Key can be "", and it's ignored if so. value can be int, double, string, bool or NULL, and it can't be an array. Nesting is not allowed which means that the value of a key can't be JSON. If one key occurs twice in JSON, only the first one is valid. Escape characters are not allowed in JSON. NULL is returned when querying a key that doesn't exist in JSON. If a tag of JSON is the result of inner query, it can't be parsed and queried in the outer query. For example, the SQL statements below are not supported. ``` select jtag->'key' from (select jtag from stable) ``` and ``` select jtag->'key' from (select jtag from stable) where jtag->'key'>0 ```
Project: TDengine (App Definition and Development / Database)
File: 01-tdengine.md

title: TDengine Release History and Download Links sidebar_label: TDengine description: This document provides download links for all released versions of TDengine 3.0. TDengine 3.x installation packages can be downloaded at the following links: For TDengine 2.x installation packages by version, please visit . import Release from "/components/ReleaseV3"; <Release type="tdengine" version="3.3.0.0" /> <Release type="tdengine" version="3.2.3.0" /> <Release type="tdengine" version="3.2.2.0" /> <Release type="tdengine" version="3.2.1.0" /> <Release type="tdengine" version="3.2.0.0" /> <Release type="tdengine" version="3.1.1.0" /> <Release type="tdengine" version="3.1.0.3" /> <Release type="tdengine" version="3.1.0.2" /> :::note IMPORTANT Once you upgrade to TDengine 3.1.0.0, you cannot roll back to any previous version of TDengine. Upgrading to 3.1.0.0 will alter your data such that it cannot be read by previous versions. You must remove all streams before upgrading to TDengine 3.1.0.0. If you upgrade a deployment that contains streams, the upgrade will fail and your deployment will become nonoperational. ::: <Release type="tdengine" version="3.1.0.0" /> <Release type="tdengine" version="3.0.7.1" /> <Release type="tdengine" version="3.0.7.0" /> <Release type="tdengine" version="3.0.6.0" /> <Release type="tdengine" version="3.0.5.1" /> <Release type="tdengine" version="3.0.5.0" /> <Release type="tdengine" version="3.0.4.2" /> <Release type="tdengine" version="3.0.4.1" /> <Release type="tdengine" version="3.0.4.0" /> <Release type="tdengine" version="3.0.3.2" /> <Release type="tdengine" version="3.0.3.1" /> <Release type="tdengine" version="3.0.3.1" /> <Release type="tdengine" version="3.0.3.0" /> <Release type="tdengine" version="3.0.2.6" /> <Release type="tdengine" version="3.0.2.5" /> <Release type="tdengine" version="3.0.2.4" /> <Release type="tdengine" version="3.0.2.3" /> <Release type="tdengine" version="3.0.2.2" /> <Release type="tdengine" version="3.0.2.1" /> <Release type="tdengine" version="3.0.2.0" /> <Release type="tdengine" version="3.0.1.8" /> <Release type="tdengine" version="3.0.1.7" /> <Release type="tdengine" version="3.0.1.6" /> <Release type="tdengine" version="3.0.1.5" /> <Release type="tdengine" version="3.0.1.4" /> <Release type="tdengine" version="3.0.1.3" /> <Release type="tdengine" version="3.0.1.2" /> <Release type="tdengine" version="3.0.1.1" /> <Release type="tdengine" version="3.0.1.0" />
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_backup_list.md

title: kbcli backup list List backups. ``` kbcli backup list [flags] ``` ``` kbcli backup list kbcli backup list --cluster mycluster ``` ``` --cluster string List backups in the specified cluster -h, --help help for list -o, --output format prints the output in the specified format. Allowed values: table, json, yaml, wide (default table) -l, --selector string Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints. --show-labels When printing, show all labels as the last column (default hide labels column) ``` ``` --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. --as-uid string UID to impersonate for the operation. --cache-dir string Default cache directory (default "$HOME/.kube/cache") --certificate-authority string Path to a cert file for the certificate authority --client-certificate string Path to a client certificate file for TLS --client-key string Path to a client key file for TLS --context string The name of the kubeconfig context to use --disable-compression If true, opt-out of response compression for all requests to the server --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure --kubeconfig string Path to the kubeconfig file to use for CLI requests. --match-server-version Require server version to match client version -n, --namespace string If present, the namespace scope for this CLI request --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") -s, --server string The address and port of the Kubernetes API server --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used --token string Bearer token for authentication to the API server --user string The name of the kubeconfig user to use ``` - Backup command.
Project: Kui (App Definition and Development / Application Definition & Image Build)
File: kui_shell_core.UsageError.md

/ / UsageError .UsageError `Error` `UsageError` `UsageErrorLike` new UsageError(`message`, `extra?`) | Name | Type | | :-- | :- | | `message` | `UsageLike` | | `extra?` | `UsageOptions` | Error.constructor code: `number` . formattedMessage: `Promise`<`HTMLElement`\> UsageErrorLike.formattedMessage message: `string` . Error.message node_modules/typescript/lib/lib.es5.d.ts:1023 name: `string` . Error.name node_modules/typescript/lib/lib.es5.d.ts:1022 raw: `UsageLike` UsageErrorLike.raw `Optional` stack: `string` . Error.stack node_modules/typescript/lib/lib.es5.d.ts:1024 `Static` stackTraceLimit: `number` Error.stackTraceLimit node_modules/@types/node/globals.d.ts:142 getUsageModel(): `Static` captureStackTrace(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object | Name | Type | | :- | : | | `targetObject` | `Object` | | `constructorOpt?` | `Function` | `void` Error.captureStackTrace node_modules/@types/node/globals.d.ts:133 `Static` getFormattedMessage(`err`): `Promise`<`HTMLElement`\> | Name | Type | | :- | : | | `err` | `UsageErrorLike` | `Promise`<`HTMLElement`\> `Static` isUsageError(`error`): error is UsageErrorLike | Name | Type | | : | :- | | `error` | `Entity`<`void`, , <`void`\>\> \| `UsageErrorLike` | error is UsageErrorLike `Static` `Optional` prepareStackTrace(`err`, `stackTraces`): `any` Optional override for formatting stack traces `see` https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces | Name | Type | | : | :-- | | `err` | `Error` | | `stackTraces` | `CallSite`[] | `any` Error.prepareStackTrace node_modules/@types/node/globals.d.ts:140
Project: YugabyteDB (App Definition and Development / Database)
File: create_group,role_option.grammar.md

```output.ebnf creategroup ::= CREATE GROUP rolename [ [ WITH ] role_option [ , ... ] ] role_option ::= SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | INHERIT | NOINHERIT | LOGIN | NOLOGIN | CONNECTION LIMIT connlimit | [ ENCRYPTED ] PASSWORD ' password ' | PASSWORD NULL | VALID UNTIL ' timestamp ' | IN ROLE role_name [ , ... ] | IN GROUP role_name [ , ... ] | ROLE role_name [ , ... ] | ADMIN role_name [ , ... ] | USER role_name [ , ... ] | SYSID uid ```
Project: KICS (Provisioning / Security & Compliance)
File: 0f0fb06b-0f2f-4374-8588-f2c7c348c7a0.md

title: CloudWatch Logging Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 0f0fb06b-0f2f-4374-8588-f2c7c348c7a0 Query name: CloudWatch Logging Disabled Platform: CloudFormation Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: Check if CloudWatch logging is disabled for Route53 hosted zones<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="6" AWSTemplateFormatVersion: "2010-09-09" Description: "Router53" Resources: HostedZone3: Type: AWS::Route53::HostedZone Properties: Name: "HostedZone" ``` ```json title="Positive test num. 2 - json file" hl_lines="7" { "AWSTemplateFormatVersion": "2010-09-09", "Description": "Router53", "Resources": { "HostedZone4": { "Type": "AWS::Route53::HostedZone", "Properties": { "Name": "HostedZone" } } } } ``` ```yaml title="Negative test num. 1 - yaml file" AWSTemplateFormatVersion: "2010-09-09" Description: "Router53" Resources: HostedZone: Type: AWS::Route53::HostedZone Properties: Name: "HostedZone" QueryLoggingConfig: CloudWatchLogsLogGroupArn: "SomeCloudWatchLogGroupArn" ``` ```json title="Negative test num. 2 - json file" { "Description": "Router53", "Resources": { "HostedZone2": { "Type": "AWS::Route53::HostedZone", "Properties": { "Name": "HostedZone", "QueryLoggingConfig": { "CloudWatchLogsLogGroupArn": "SomeCloudWatchLogGroupArn" } } } }, "AWSTemplateFormatVersion": "2010-09-09" } ```
Project: KICS (Provisioning / Security & Compliance)
File: 48f7e44d-d1d1-44c2-b336-9f11b65c4fb0.md

title: Cloud Storage Bucket Logging Not Enabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 48f7e44d-d1d1-44c2-b336-9f11b65c4fb0 Query name: Cloud Storage Bucket Logging Not Enabled Platform: Pulumi Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: Cloud storage bucket should have logging enabled<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="7" name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: gcp:storage:Bucket properties: location: US-CENTRAL1 ``` ```yaml title="Negative test num. 1 - yaml file" name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: gcp:storage:Bucket properties: location: US-CENTRAL1 logging: logObjectPrefix: someobjprefix ```
Project: EMQ Technologies (App Definition and Development / Streaming & Messaging)
File: feat-12396.en.md

Enhanced the `authentication/:id/import_users` interface for a more user-friendly user import feature: Add new parameter `?type=plain` to support importing users with plaintext passwords in addition to the current solution which only supports password hash. Support `content-type: application/json` to accept HTTP Body in JSON format in extension to the current solution which only supports `multipart/form-data` for csv format.
Project: YugabyteDB (App Definition and Development / Database)
File: yba_provider_kubernetes.md

Manage a YugabyteDB Anywhere K8s provider Manage a K8s provider in YugabyteDB Anywhere ``` yba provider kubernetes [flags] ``` ``` -n, --name string [Optional] The name of the provider for the action. Required for create, delete, describe, update. -h, --help help for kubernetes ``` ``` -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` - Manage YugabyteDB Anywhere providers - Create a Kubernetes YugabyteDB Anywhere provider - Delete a Kubernetes YugabyteDB Anywhere provider - Describe a Kubernetes YugabyteDB Anywhere provider - List Kubernetes YugabyteDB Anywhere providers - Update a Kubernetes YugabyteDB Anywhere provider
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_iam_service_account_keys.md

+++ title = "googleiamserviceaccountkeys resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googleiamserviceaccountkeys" identifier = "inspec/resources/gcp/googleiamserviceaccountkeys.md googleiamserviceaccountkeys resource" parent = "inspec/resources/gcp" +++ A `googleiamserviceaccountkeys` is used to test a Google ServiceAccountKey resource ```ruby describe googleiamserviceaccountkeys(project: 'chef-gcp-inspec', service_account: "display-name@project-id.iam.gserviceaccount.com") do its('count') { should be <= 1000 } end ``` Properties that can be accessed from the `googleiamserviceaccountkeys` resource: See the resource for more information. `key_names` : an array of `googleiamserviceaccountkey` name `privatekeytypes` : an array of `googleiamserviceaccountkey` privatekeytype `key_algorithms` : an array of `googleiamserviceaccountkey` key_algorithm `privatekeydata` : an array of `googleiamserviceaccountkey` privatekeydata `publickeydata` : an array of `googleiamserviceaccountkey` publickeydata `validaftertimes` : an array of `googleiamserviceaccountkey` validaftertime `validbeforetimes` : an array of `googleiamserviceaccountkey` validbeforetime `key_types` : an array of `googleiamserviceaccountkey` key_type `service_accounts` : an array of `googleiamserviceaccountkey` service_account `paths` : an array of `googleiamserviceaccountkey` path This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. Ensure the is enabled for the current project.
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-data-sources-binaryFile.md

layout: global title: Binary File Data Source displayTitle: Binary File Data Source license: | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Since Spark 3.0, Spark supports binary file data source, which reads binary files and converts each file into a single record that contains the raw content and metadata of the file. It produces a DataFrame with the following columns and possibly partition columns: `path`: StringType `modificationTime`: TimestampType `length`: LongType `content`: BinaryType To read whole binary files, you need to specify the data source `format` as `binaryFile`. To load files with paths matching a given glob pattern while keeping the behavior of partition discovery, you can use the general data source option `pathGlobFilter`. For example, the following code reads all PNG files from the input directory: <div class="codetabs"> <div data-lang="python" markdown="1"> {% highlight python %} spark.read.format("binaryFile").option("pathGlobFilter", "*.png").load("/path/to/data") {% endhighlight %} </div> <div data-lang="scala" markdown="1"> {% highlight scala %} spark.read.format("binaryFile").option("pathGlobFilter", "*.png").load("/path/to/data") {% endhighlight %} </div> <div data-lang="java" markdown="1"> {% highlight java %} spark.read().format("binaryFile").option("pathGlobFilter", "*.png").load("/path/to/data"); {% endhighlight %} </div> <div data-lang="r" markdown="1"> {% highlight r %} read.df("/path/to/data", source = "binaryFile", pathGlobFilter = "*.png") {% endhighlight %} </div> </div> Binary file data source does not support writing a DataFrame back to the original files.