cwielenb/CNCF-Dataset huggingface dataset:
Project: StarRocks (App Definition and Development / Database)
File: array_filter.md

displayed_sidebar: "English" Returns values from an array that matches the given filter. This function comes in the following two forms. The lambda adoption allows for more flexible array filtering. For more information about lambda functions, see . This function is supported from v2.5. ```Haskell array_filter(array, array<bool>) arrayfilter(lambdafunction, arr1,arr2...) ``` `array_filter(array, array<bool>)` Returns values from an array that matches `array<bool>`. `arrayfilter(lambdafunction, arr1,arr2...)` Returns values from an array that matches the lambda function. `array`: the array to filter values from. `array<bool>`: the expression used to filter values. `lambda_function`: the lambda function used to filter values. The two input parameters of `array_filter(array, array<bool>)` must be ARRAY and the filter expression can evaluate to `array<bool>`. The lambda function in `arrayfilter(lambdafunction, arr1,arr2...)` follows the usage notes in . If the input array is null, null is returned. If the filter array is null, an empty array is returned. Examples without using lambda functions ```Plain -- All the elements in the array match the filter. select array_filter([1,2,3],[1,1,1]); ++ | array_filter([1, 2, 3], [1, 1, 1]) | ++ | [1,2,3] | ++ 1 row in set (0.01 sec) -- The filter is null and an empty array is returned. select array_filter([1,2,3],null); +-+ | array_filter([1, 2, 3], NULL) | +-+ | [] | +-+ 1 row in set (0.01 sec) -- The input array is null, null is returned. select array_filter(null,[1]); +-+ | array_filter(NULL, [1]) | +-+ | NULL | +-+ -- Both the input array and filter are null. Null is returned. select array_filter(null,null); +--+ | array_filter(NULL, NULL) | +--+ | NULL | +--+ 1 row in set (0.01 sec) -- The filter contains a null element and an empty array is returned. select array_filter([1,2,3],[null]); ++ | array_filter([1, 2, 3], [NULL]) | ++ | [] | ++ 1 row in set (0.01 sec) -- The filter contains two null elements and an empty array is returned. select array_filter([1,2,3],[null,null]); ++ | array_filter([1, 2, 3], [NULL, NULL]) | ++ | [] | ++ 1 row in set (0.00 sec) -- Only one element matches the filter. select array_filter([1,2,3],[null,1,0]); ++ | array_filter([1, 2, 3], [NULL, 1, 0]) | ++ | [2] | ++ 1 row in set (0.00 sec) ``` Examples using lambda functions ```Plain -- Return the elements in x that are less than the elements in y. select array_filter((x,y) -> x < y, [1,2,null], [4,5,6]); +--+ | array_filter((x, y) -> x < y, [1, 2, NULL], [4, 5, 6]) | +--+ | [1,2] | +--+ ```
Project: ClickHouse (App Definition and Development / Database)
File: null.md

slug: /en/sql-reference/table-functions/null sidebar_position: 140 sidebar_label: null function title: 'null' Creates a temporary table of the specified structure with the table engine. According to the `Null`-engine properties, the table data is ignored and the table itself is immediately dropped right after the query execution. The function is used for the convenience of test writing and demonstrations. Syntax ``` sql null('structure') ``` Parameter `structure` A list of columns and column types. . Returned value A temporary `Null`-engine table with the specified structure. Example Query with the `null` function: ``` sql INSERT INTO function null('x UInt64') SELECT * FROM numbers_mt(1000000000); ``` can replace three queries: ```sql CREATE TABLE t (x UInt64) ENGINE = Null; INSERT INTO t SELECT * FROM numbers_mt(1000000000); DROP TABLE IF EXISTS t; ``` See also:
Project: KICS (Provisioning / Security & Compliance)
File: fc5109bf-01fd-49fb-8bde-4492b543c34a.md

title: Variable Without Type hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: fc5109bf-01fd-49fb-8bde-4492b543c34a Query name: Variable Without Type Platform: Terraform Severity: <span style="color:#5bc0de">Info</span> Category: Best Practices URL: All variables should contain a valid type.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" variable "cluster_name" { default = "example" description = "test" } resource "awsekscluster" "positive1" { dependson = [awscloudwatchloggroup.example] name = var.cluster_name } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="3" variable "cluster_name" { default = "example" type = " " description = "test" } resource "awsekscluster" "positive1" { dependson = [awscloudwatchloggroup.example] name = var.cluster_name } ``` ```tf title="Positive test num. 3 - tf file" hl_lines="3" variable "cluster_name" { default = "example" type = "" description = "test" } resource "awsekscluster" "positive1" { dependson = [awscloudwatchloggroup.example] name = var.cluster_name } ``` ```tf title="Negative test num. 1 - tf file" variable "cluster_name" { default = "example" description = "cluster name" type = string } resource "awsekscluster" "negative1" { dependson = [awscloudwatchloggroup.example] enabledclusterlog_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"] name = var.cluster_name } ```
Project: StarRocks (App Definition and Development / Database)
File: md5sum.md

displayed_sidebar: "English" Calculates the 128-bit checksum of multiple strings. The checksum is represented by a 32-character hexadecimal string. If only one string is passed in, the result is the same as that of . Compared to md5(), md5sum() accepts more parameters and therefore, is more efficient in calculating the checksum of multiple files. ```Haskell md5sum(expr,...); ``` `expr`: the string to calculate. It must be of the VARCHAR type. Returns a checksum of the VARCHAR type. ```Plain Text mysql> select md5sum("starrocks"); +-+ | md5sum('starrocks') | +-+ | f75523a916caf65f1ad487a9f8017f75 | +-+ 1 row in set (0.01 sec) mysql> select md5sum("starrocks","star"); +-+ | md5sum('starrocks', 'star') | +-+ | 7af4bfe35b8df2786ad133c57cb2aed8 | +-+ 1 row in set (0.01 sec) mysql> select md5sum(null); +-+ | md5sum(NULL) | +-+ | d41d8cd98f00b204e9800998ecf8427e | +-+ 1 row in set (0.01 sec) ```
Project: kaniko (App Definition and Development / Application Definition & Image Build)
File: CHANGES.md

provide unmarshal options for streams () () bump protobuf dep to v1.33 () () v2/callctx:* fix SetHeader race by cloning header map () () add XGoogFieldMaskHeader constant () () v2/callctx:* add new callctx package () () v2:* add BuildHeaders and InsertMetadataIntoOutgoingContext to header () () v2:* add GoVersion package variable () () v2:* handle space in non-devel go version () () update dependencies () () v2:* drop cloud lro test dep () (), refs apierror:* add method to return HTTP status code conditionally () (), refs add ref to usage with clients () (), refs v2:* add WithTimeout option () () v2/apierror:* return Unknown GRPCStatus when err source is HTTP () (), refs update google.golang.org/api to latest () () v2/apierror:* add apierror.FromWrappingError () () v2:* copy DetermineContentType functionality () () v2:* resolve bad genproto pseudoversion in go.mod () () add ExtractProtoMessage to apierror () () v2:* add OnHTTPCodes CallOption () () v2/apierror:* use errors.As in FromError () () v2:* bump release-please processing () ()
Project: FOSSA (Provisioning / Security & Compliance)
File: delete-release.md

`fossa release-group delete-release` allows you to delete a FOSSA release group release. Argument | Required | Description -|-|-- `--title` / `-t ` | Yes | The name of your FOSSA release group. `--release` / `-r` | Yes | The name of the release within your FOSSA release group. NOTE: `fossa release-group delete-release` does not use `.fossa.yml` configurations. ```bash fossa release-group delete-release --title example-title -release example-release ```
Project: Meshery (Provisioning / Automation & Configuration)
File: kiali-operator.md

layout: integration title: Kiali Operator subtitle: Collaborative and visual infrastructure as code for Kiali Operator image: /assets/img/integrations/kiali-operator/icons/color/kiali-operator-color.svg permalink: extensibility/integrations/kiali-operator docURL: https://docs.meshery.io/extensibility/integrations/kiali-operator description: integrations-category: Observability and Analysis integrations-subcategory: Monitoring registrant: Artifact Hub components: name: kiali colorIcon: assets/img/integrations/kiali-operator/components/kiali/icons/color/kiali-color.svg whiteIcon: assets/img/integrations/kiali-operator/components/kiali/icons/white/kiali-white.svg description: featureList: [ "Drag-n-drop cloud native infrastructure designer to configure, model, and deploy your workloads.", "Invite anyone to review and make changes to your private designs.", "Ongoing synchronization of Kubernetes configuration and changes across any number of clusters." ] howItWorks: "Collaborative Infrastructure as Code" howItWorksDetails: "Collaboratively manage infrastructure with your coworkers synchronously sharing the same designs." language: en list: include type: extensibility category: integrations
Project: FOSSA (Provisioning / Security & Compliance)
File: list-targets.md

The list targets command lists all valid analysis targets in a directory. This output can be useful to understand what is going to be analyzed when `fossa analyze` is run. `list-targets` can be also be used with to limit what is ultimately analyzed. Example output ```bash $ fossa list-targets [ INFO] Found target: cabal@./ [ INFO] Found target: cocoapods@project/mobile/ [ INFO] Found target: setuptools@scripts/python/ [ INFO] Found target: yarn@./ ``` This output tells us that when `fossa analyze` is run, we will be analyzing `cabal`, `cocoapods`, `pipenv`, and `yarn` projects. This can be useful to determine if there are targets you expect or don't expect to see. The list-targets command supports the following formats (via `fossa list-targets --format=<OPTION>`): `legacy` (this is the default format, as shown above in the command output section) `text` (renders valid analysis targets per line, in the format of and ) `ndjson` (renders valid analysis targets in JSON format separated by line breaks) Analysis target configuration through the fossa configuration file allows users to manually determine what they would like to analyze. Looking at the example above, if we know that the dependencies for the `setuptools@scripts/python/` target are not part of the production release, we can exclude it from the analysis. Example exclusion format: ```yaml exclude: type: setuptools path: scripts/python ``` Adding this section to your configuration file at the root of your project will ensure that when `fossa analyze` is run, the `setuptools` target is skipped. In some scenarios, you may want to set up automation for projects that have been discovered. For example, you might want the process to fail if the project of interest isn't discovered by `fossa` before running `fossa analyze`. First, execute `fossa list-targets --format=text` to see what `fossa` currently discovers: ```text yarn@javascript/with-v2-yarn-workspaces/ yarn@javascript/with-v1-yarn/ npm@javascript/with-package-json/ npm@javascript/with-npm-package-lock/ npm@javascript/with-npm-lockfile-v3/ pnpm@javascript/pnpm/ ``` From here, we assert that `fossa` finds the npm project at the directory `javascript/with-npm-package-lock/` before running `fossa analyze` using the following in CI: ```bash if fossa list-targets --format=text | grep -q 'npm@javascript/with-npm-package-lock/' ; then fossa analyze && fossa test else exit 1 fi ```
Project: KICS (Provisioning / Security & Compliance)
File: 75be209d-1948-41f6-a8c8-e22dd0121134.md

title: ECR Repository Is Publicly Accessible hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 75be209d-1948-41f6-a8c8-e22dd0121134 Query name: ECR Repository Is Publicly Accessible Platform: CloudFormation Severity: <span style="color:#ff0000">Critical</span> Category: Access Control URL: Amazon ECR image repositories shouldn't have public access<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="6" Resources: MyRepository3: Type: AWS::ECR::Repository Properties: RepositoryName: "test-repository" RepositoryPolicyText: Version: "2012-10-17" Statement: Sid: AllowPushPull Effect: Allow Principal: "*" Action: "ecr:GetDownloadUrlForLayer" "ecr:BatchGetImage" "ecr:BatchCheckLayerAvailability" "ecr:PutImage" "ecr:InitiateLayerUpload" "ecr:UploadLayerPart" "ecr:CompleteLayerUpload" ``` ```json title="Positive test num. 2 - json file" hl_lines="7" { "Resources": { "MyRepository4": { "Type": "AWS::ECR::Repository", "Properties": { "RepositoryName": "test-repository", "RepositoryPolicyText": { "Version": "2008-10-17", "Statement": [ { "Sid": "AllowPushPull", "Effect": "Allow", "Principal": "*", "Action": [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability", "ecr:PutImage", "ecr:InitiateLayerUpload", "ecr:UploadLayerPart", "ecr:CompleteLayerUpload" ] } ] } } } } } ``` ```yaml title="Negative test num. 1 - yaml file" Resources: MyRepository1: Type: AWS::ECR::Repository Properties: RepositoryName: "test-repository" RepositoryPolicyText: Version: "2012-10-17" Statement: Sid: AllowPushPull Effect: Allow Principal: AWS: "arn:aws:iam::123456789012:user/Bob" "arn:aws:iam::123456789012:user/Alice" Action: "ecr:GetDownloadUrlForLayer" "ecr:BatchGetImage" "ecr:BatchCheckLayerAvailability" "ecr:PutImage" "ecr:InitiateLayerUpload" "ecr:UploadLayerPart" "ecr:CompleteLayerUpload" ``` ```json title="Negative test num. 2 - json file" { "Resources": { "MyRepository2": { "Type": "AWS::ECR::Repository", "Properties": { "RepositoryName": "test-repository", "RepositoryPolicyText": { "Version": "2008-10-17", "Statement": [ { "Sid": "AllowPushPull", "Effect": "Allow", "Principal": { "AWS": [ "arn:aws:iam::123456789012:user/Bob", "arn:aws:iam::123456789012:user/Alice" ] }, "Action": [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability", "ecr:PutImage", "ecr:InitiateLayerUpload", "ecr:UploadLayerPart", "ecr:CompleteLayerUpload" ] } ] } } } } } ```
Project: Chef Infra (Provisioning / Automation & Configuration)
File: DESIGN_PROPOSAL.md

name: Design Proposal about: I have a significant change I would like to propose and discuss before starting labels: "Status: Untriaged" A design proposal should be opened any time a change meets one of the following qualifications: Significantly changes the user experience of a project in a way that impacts users. Significantly changes the underlying architecture of the project in a way that impacts other developers. Changes the development or testing process of the project such as a change of CI systems or test frameworks. Allows all interested parties (including any community member) to discuss large impact changes to a project. Serves as a durable paper trail for discussions regarding project architecture. Forces design discussions to occur before PRs are created. Reduces PR refactoring and rejected PRs. <! Proposal description and rationale. --> <! As a <<user_profile>>, I want to <<functionality>>, so that <<benefit>>. --> <! A detailed description of the planned implementation. --> <! Which other tools will be impacted by this work? -->
Project: Chef InSpec (Provisioning / Security & Compliance)
File: gem.md

+++ title = "gem resource" draft = false gh_repo = "inspec" platform = "os" [menu] [menu.inspec] title = "gem" identifier = "inspec/resources/os/gem.md gem resource" parent = "inspec/resources/os" +++ Use the `gem` Chef InSpec audit resource to test if a global Gem package is installed. {{< readfile file="content/inspec/reusable/md/inspec_installation.md" >}} This resource first became available in v1.0.0 of InSpec. A `gem` resource block declares a package and (optionally) a package version: describe gem('gempackagename', 'gem_binary') do it { should be_installed } end where `('gempackagename')` must specify a Gem package, such as `'rubocop'` `('gem_binary')` can specify the path to a non-default gem binary, defaults to `'gem'` `be_installed` is a valid matcher for this resource The `version` property returns a string of the default version on the system: its('version') { should eq '0.33.0' } The `versions` property returns an array of strings of all the versions of the gem installed on the system: its('versions') { should include /0.33/ } The following examples show how to use this Chef InSpec audit resource. describe gem('rubocop') do it { should be_installed } its('version') { should eq '1.22.0' } end describe gem('rubocop') do it { should be_installed } its('versions') { should include /1.21.0/ } its('versions.count') { should_not be > 3 } end describe gem('rubocop') do it { shouldnot beinstalled } end describe gem('pry', '/opt/ruby-3.0.2/embedded/bin/gem') do it { should be_installed } end describe gem('chef-sugar', :chef) do it { should be_installed } end describe gem('knife-backup', :chef_server) do it { should be_installed } end The `version` property returns a string of the default version on the system: its('version') { should eq '1.22.0' } The `versions` property returns an array of strings of all the versions of the gem installed on the system: its('versions') { should include /1.22/ } {{< readfile file="content/inspec/reusable/md/inspecmatcherslink.md" >}} This resource has the following special matchers. The `be_installed` matcher tests if the named Gem package is installed: it { should be_installed }
Project: YugabyteDB (App Definition and Development / Database)
File: 16-grouping-sets.md

title: "GROUPING SETS" In this exercise we will query the suppliers table and group the number\of\people results into city, country and contact\title_ sets. ``` SELECT contact_title, count(contacttitle) AS numberof_people, city, country FROM suppliers GROUP BY GROUPING SETS (city, country, contact_title); ``` This query should return 60 rows
Project: Nocalhost (App Definition and Development / Application Definition & Image Build)
File: CONDUCT.md

Cobra will follow a steady release cadence. Non breaking changes will be released as minor versions quarterly. Patch bug releases are at the discretion of the maintainers. Users can expect security patch fixes to be released within relatively short order of a CVE becoming known. For more information on security patch fixes see the CVE section below. Releases will follow . Users tracking the Master branch should expect unpredictable breaking changes as the project continues to move forward. For stability, it is highly recommended to use a release. We will maintain two major releases in a moving window. The N-1 release will only receive bug fixes and security updates and will be dropped once N+1 is released. Deprecation of Go versions or dependent packages will only occur in major releases. To reduce the change of this taking users by surprise, any large deprecation will be preceded by an announcement in the and an Issue on Github. Maintainers will make every effort to release security patches in the case of a medium to high severity CVE directly impacting the library. The speed in which these patches reach a release is up to the discretion of the maintainers. A low severity CVE may be a lower priority than a high severity one. Cobra maintainers will use GitHub issues and the as the primary means of communication with the community. This is to foster open communication with all users and contributors. Breaking changes are generally allowed in the master branch, as this is the branch used to develop the next release of Cobra. There may be times, however, when master is closed for breaking changes. This is likely to happen as we near the release of a new version. Breaking changes are not allowed in release branches, as these represent minor versions that have already been released. These version have consumers who expect the APIs, behaviors, etc, to remain stable during the lifetime of the patch stream for the minor release. Examples of breaking changes include: Removing or renaming exported constant, variable, type, or function. Updating the version of critical libraries such as `spf13/pflag`, `spf13/viper` etc... Some version updates may be acceptable for picking up bug fixes, but maintainers must exercise caution when reviewing. There may, at times, need to be exceptions where breaking changes are allowed in release branches. These are at the discretion of the project's maintainers, and must be carefully considered before merging. Maintainers will ensure the Cobra test suite utilizes the current supported versions of Golang. Changes to this document and the contents therein are at the discretion of the maintainers. None of the contents of this document are legally binding in any way to the maintainers or the users.
Project: YDB (App Definition and Development / Database)
File: aggregate_by.md

Applying an to all values of a column or expression. The `MULTIAGGREGATEBY` function requires that the value of a column or expression has a structure, tuple, or list, and applies the factory to each individual element, placing the result in a container of the same format. If different values of a column or expression contain lists of different length, the resulting list will have the smallest of the source lengths. Column, `DISTINCT` column or expression. Factory. Examples: ```yql $count_factory = AggregationFactory("COUNT"); SELECT AGGREGATEBY(DISTINCT column, $countfactory) as uniq_count FROM my_table; SELECT MULTIAGGREGATEBY(nums, AggregationFactory("count")) as count, MULTIAGGREGATEBY(nums, AggregationFactory("min")) as min, MULTIAGGREGATEBY(nums, AggregationFactory("max")) as max, MULTIAGGREGATEBY(nums, AggregationFactory("avg")) as avg, MULTIAGGREGATEBY(nums, AggregationFactory("percentile", 0.9)) as p90 FROM my_table; ```
Project: Open Policy Agent (OPA) (Provisioning / Security & Compliance)
File: torque.md

title: Torque labels: category: Environments as a Service layer: Infrastructure type: poweredbyopa software: terraform helm cloudformation kubernetes ansible aws gcp azure tutorials: https://docs.qtorque.io/governance/policies code: https://github.com/QualiTorque/opa inventors: quali blogs: https://www.quali.com/blog/enforcing-open-policy-agent-guardrails-across-your-cloud-configurations/ docs_features: cli-integration: note: | Torque policy evaluation is done using the OPA CLI. See an in the documentation. terraform: note: | Torque supports Terraform policy enforcement and defines some . Torque by Quali is a cloud-based platform that provides infrastructure automation and orchestration solutions for digital transformation and DevOps initiatives. Troque utilizes Open Policy Agent (OPA) to enforce policy-as-code, enabling users to define and automate their own security, compliance, and governance policies across their infrastructure.