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

title: REFRESH MATERIALIZED VIEW statement [YSQL] headerTitle: REFRESH MATERIALIZED VIEW linkTitle: REFRESH MATERIALIZED VIEW description: Use the REFRESH MATERIALIZED VIEW statement to refresh the contents of a materialized view. menu: v2.18: identifier: ddlrefreshmatview parent: statements type: docs Use the `REFRESH MATERIALIZED VIEW` statement to replace the contents of a materialized view. {{%ebnf%}} refresh_matview {{%/ebnf%}} Replace the contents of a materialized view named matview_name. If `WITH DATA` (default) is specified, the view's query is executed to obtain the new data and the materialized view's contents are updated. If `WITH NO DATA` is specified, the old contents of the materialized view are discarded and the materialized view is left in an unscannable state. This option may be faster in the cases where a small number of rows require updates. Without this option, a refresh that updates a large number of rows will tend to use fewer resources and complete quicker. This option is only permitted when there is at least one UNIQUE index on the materialized view, and when the materialized view is populated. `CONCURRENTLY` AND `WITH NO DATA` cannot be used together. Moreover, the `CONCURRENTLY` option can also not be used when there are rows where all the columns are null. In both scenarios, refreshing the materialized view will raise an error. Basic example. ```plpgsql yugabyte=# CREATE TABLE t1(a int4); yugabyte=# CREATE MATERIALIZED VIEW m1 AS SELECT * FROM t1; yugabyte=# INSERT INTO t1 VALUES (1); yugabyte=# SELECT * FROM m1; ``` ``` a (0 rows) ``` ```plpgsql yugabyte=# REFRESH MATERIALIZED VIEW m1; yugabyte=# SELECT * FROM m1; ``` ``` a 1 (1 row) ``` Materialized views must be refreshed manually using the `REFRESH` command. Automatic refreshes are not supported. It is currently not possible to refresh materialized views inside an explicit transaction. (See <https://github.com/yugabyte/yugabyte-db/issues/1404>)
Project: YugabyteDB (App Definition and Development / Database)
File: jsonb-each.md

title: jsonbeach() and jsoneach() [JSON] headerTitle: jsonbeach() and jsoneach() linkTitle: jsonb_each() description: Create a row set with columns "key" (as a SQL text) and "value" (as a SQL jsonb) from a JSON object. menu: v2.18: identifier: jsonb-each parent: json-functions-operators weight: 110 type: docs Purpose: Create a row set with columns "key" (as a SQL `text`) and "value" (as a SQL `jsonb`) from a JSON object. Signature For the `jsonb` variant: ``` input value: jsonb return value: SETOF (text, jsonb) ``` Use this `ysqlsh` script to create the required type "t" and then to execute the `ASSERT`. ```plpgsql create type t as (k text, v jsonb); do $body$ declare object constant jsonb := '{"a": 17, "b": "dog", "c": true, "d": {"a": 17, "b": "cat"}}'; kvpairs t[] := null; expectedkv_pairs constant t[] := array[ ('a', '17'::jsonb), ('b', '"dog"'::jsonb), ('c', 'true'::jsonb), ('d', '{"a": 17, "b": "cat"}'::jsonb) ]; kvpair t; n int := 0; begin for kvpair in ( select key, value from jsonb_each(object) ) loop n := n + 1; kvpairs[n] := kvpair; end loop; assert kvpairs = expectedkv_pairs, 'unexpected'; end; $body$; ```
Project: ShardingSphere (App Definition and Development / Database)
File: server-error-code.en.md

+++ title = "Server Error Code" weight = 2 chapter = true +++ Unique codes provided when server exception occur, which printed by Proxy backend or JDBC startup logs. | Error Code | Reason | |-|| | SPI-00001 | No implementation class load from SPI '%s' with type '%s'. | | DATA-SOURCE-00001 | Data source '%s' is unavailable. | | PROPS-00001 | Properties convert failed, details are: %s. | | PROXY-00001 | Load database server info failed. |
Project: Kubescape (Provisioning / Security & Compliance)
File: armo.md

<img src="armo-powered-by-kubescape-logo-grey.svg" width="25%" height="25%" align="right"> is an enterprise solution based on Kubescape. Its a multi-cloud and multi-cluster Kubernetes and CI/CD security platform behind a single pane of glass. ARMO Platform includes Kubernetes hardening and compliance assistance, misconfiguration scanning and remediation, prioritized container image vulnerability reporting, an RBAC investigator and more. Using ARMO Platform, you will save valuable time and make spot-on hardening decisions with contextual insights, based on the data from your scans and environment. Install Kubescape ``` curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/docs/providers/install.sh | /bin/bash ``` > Alternatively, you can Scan Kubescape with the `--server` flag ``` kubescape scan --server api.armosec.io ``` The scan results will be submitted to the ARMO Platform. Using the link printed at the end of the scan, sign up for the ARMO Platform for free and see your scan results. DevSecOps Dashboard: A single pane of glass for different security and DevOps stakeholders, providing each with the information they need, within the required context, and creating a common language between them. Enterprise Support: Additional support options including escalation options, response SLA, and a dedicated account manager. Premium Plugins: Plugins for collaboration tools such as Slack and Jira to enhance collaboration capabilities and provide more context to workflows. Multi-user and Multi-tenancy: Support for multiple users to access the same account and separate departments in an enterprise to use the same instance of ARMO Platform. Authentication & Security: Third-party authentication SSO using SAML or OIDC and user access and permission management. Data retention: Data retention capabilities to meet compliance and regulation policies. RBAC visualizer: an interactive tool for easy monitoring of Kubernetes access permissions. <img src="armo-platform-dashboard.png">
Project: KICS (Provisioning / Security & Compliance)
File: be2aa235-bd93-4b68-978a-1cc65d49082f.md

title: Role With Privilege Escalation By Actions 'cloudformation:CreateStack' And 'iam:PassRole' hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: be2aa235-bd93-4b68-978a-1cc65d49082f Query name: Role With Privilege Escalation By Actions 'cloudformation:CreateStack' And 'iam:PassRole' Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: Role with privilege escalation by actions 'cloudformation:CreateStack' and 'iam:PassRole' and Resource set to '*'. For more information see https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "awsiamrole" "cosmic" { name = "cosmic" } resource "awsiamrolepolicy" "testinline_policy" { name = "testinlinepolicy" role = awsiamrole.cosmic.name policy = jsonencode({ Version = "2012-10-17" Statement = [ { Action = [ "cloudformation:CreateStack", ] Effect = "Allow" Resource = "*" }, ] }) } resource "awsiampolicy_attachment" "test-attach" { name = "test-attachment" roles = [awsiamrole.cosmic.name] policyarn = awsiam_policy.policy.arn } resource "awsiampolicy" "policy" { name = "test-policy" description = "A test policy" policy = jsonencode({ Version = "2012-10-17" Statement = [ { Action = [ "iam:PassRole", ] Effect = "Allow" Resource = "*" }, ] }) } ``` ```tf title="Negative test num. 1 - tf file" resource "awsiamuser" "cosmic2" { name = "cosmic2" } resource "awsiamuserpolicy" "inlinepolicyruninstances2" { name = "inlinepolicyrun_instances" user = awsiamuser.cosmic2.name policy = jsonencode({ Version = "2012-10-17" Statement = [ { Action = [ "ec2:Describe*", ] Effect = "Allow" Resource = "*" }, ] }) } ```
Project: StarRocks (App Definition and Development / Database)
File: bitmap_union.md

displayed_sidebar: "English" Calculates the bitmap union of a set of values after grouping. Common usage scenarios include calculating PV and UV. ```Haskell BITMAP BITMAP_UNION(BITMAP value) ``` ```sql select pageid, bitmapunion(user_id) from table group by page_id; ``` Use this function with bitmap_count() to obtain the UV of a web page. ```sql select pageid, bitmapcount(bitmapunion(userid)) from table group by page_id; ``` If `user_id` is an integer, the above query statement is equivalent to the following: ```sql select pageid, count(distinct userid) from table group by page_id; ``` BITMAP_UNION, BITMAP
Project: StarRocks (App Definition and Development / Database)
File: character_sets.md

displayed_sidebar: "English" `character_sets` identifies the character sets available. The following fields are provided in `character_sets`: | Field | Description | | -- | | | CHARACTERSETNAME | The character set name. | | DEFAULTCOLLATENAME | The default collation for the character set. | | DESCRIPTION | A description of the character set. | | MAXLEN | The maximum number of bytes required to store one character. |
Project: Dapr (App Definition and Development / Application Definition & Image Build)
File: API-001-state-store-api-design.md

Accepted We reviewed storage API design for completeness and consistency. All requests/responses use a single parameter that represents the request/response object. This allows us to extend/update request/response object without changing the API. Add Delete() method Support bulk operations: BulkDelete() and BulkSet(). All operations in the bulk are expected to be completed within a single transaction scope. Support a generic BulkOperation() method, which is carried out as a single transaction. Transaction across multiple API requests is postponed to future versions. Actor state operations are moved to a new Actor interface. Please see . With these changes we should meet stateful actor requirements.
Project: Quay (Provisioning / Container Registry)
File: CONTRIBUTING.md

Quay is and accepts contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted. By contributing to this project you agree to the Developer Certificate of Origin . This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the file for details. The project currently uses a mailing list and IRC channel: Issues: Email: IRC: # IRC channel on libera.chat Please avoid emailing maintainers directly. They are very busy and read the mailing lists. Fork the repository on GitHub Read the for build and test instructions Play with the project, submit bugs, submit patches! This is a rough outline of what a contributor's workflow looks like: All changes require a referenced Create a topic branch from where you want to base your work (usually main). Make commits of logical units. Make sure your commit messages are in the proper format (see below). Push your changes to a topic branch in your fork of the repository. Make sure the tests pass, and add any new tests as appropriate. Submit a pull request to the original repository. Thanks for your contributions! Sometimes a change needs to be delivered in the next Quay z-stream. This is indicated by the "fixVersion" field in a JIRA ticket. If something you're working on has the "fixVersion" set to either `z-stream` or a specific version, such as `3.6.3`, it is the developer's responsibility to backport it. If you're not a project maintainer, make sure to notify one about the need for backporting. Commits that are not backported to a release branch (such as `redhat-3.6`) will not be part of the next release from that branch. To backport a change (after a PR is merged), simply invoke the cherry-pick bot by commenting the following in the PR: ``` /cherrypick redhat-3.6 ``` After a few seconds, the cherry-pick bot will create a PR against the specified branch and write a comment with a link to the new PR in the original PR. The new PR needs to be reviewed and merged as usual. We follow a rough convention for commit messages that is designed to answer two questions: what changed and why. The subject line should feature the what and the body of the commit should describe the why. ``` scripts: add the test-cluster command (PROJQUAY-1234) this uses tmux to setup a test cluster that you can easily kill and start for debugging. ``` The format can be described more formally as follows: ``` <subsystem>: <what changed> (PROJQUAY-####) <BLANK LINE> <why this change was made> ``` The first line is the subject and should be no longer than 70 characters, the second line is always blank, and other lines should be wrapped at 80 characters. This allows the message to be easier to read on GitHub as well as in various git tools.
Project: Topaz (Provisioning / Security & Compliance)
File: CONTRIBUTING.md

Welcome, and thank you for considering contributing to Topaz. We encourage you to help out by raising issues, improving documentation, fixing bugs, or adding new features If you're interested in contributing please start by reading this document. If you have any questions at all, or don't know where to start, please reach out to us on . Please also take a look at our , which details how contributors are expected to conduct themselves as part of the Topaz community. To contribute bug fixes or features to Topaz: Communicate your intent. Make your changes. Test your changes. Update documentation and examples where appropriate. Open a Pull Request (PR). Communicating your intent lets the Topaz maintainers know that you intend to contribute, and how. This sets you up for success - you can avoid duplicating effort that may already be underway, adding a feature that may be rejected, or heading down a path that you would be steered away from at review time. The best way to communicate your intent is via a detailed GitHub issue. Take a look first to see if there's already an issue relating to the thing you'd like to contribute. If there isn't, please raise a new one! Let us know what you'd like to work on, and why. The Topaz maintainers can't always triage new issues immediately, but we encourage you to bring them to our attention via .
Project: Beam (App Definition and Development / Streaming & Messaging)
File: runinference-pytorch.md

title: "RunInference with PyTorch" <!-- Licensed 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. --> <table> <tr> <td> <a> {{< button-pydoc path="apache_beam.ml.inference" class="RunInference" >}} </a> </td> </tr> </table> The following examples demonstrate how to create pipelines that use the Beam RunInference API and PyTorch. In this example, we create a pipeline that uses a PyTorch RunInference transform on unkeyed data. {{< highlight language="py" file="sdks/python/apache_beam/examples/snippets/transforms/elementwise/runinference.py" class="notebook-skip" >}} {{< codesample "sdks/python/apachebeam/examples/snippets/transforms/elementwise/runinference.py" torchunkeyedmodel_handler >}} {{</ highlight >}} {{< paragraph class="notebook-skip" >}} Output: {{< /paragraph >}} {{< highlight class="notebook-skip" >}} {{< codesample "sdks/python/apachebeam/examples/snippets/transforms/elementwise/runinferencetest.py" torchunkeyedmodelhandler >}} {{< /highlight >}} In this example, we create a pipeline that uses a PyTorch RunInference transform on keyed data. {{< highlight language="py" file="sdks/python/apache_beam/examples/snippets/transforms/elementwise/runinference.py" class="notebook-skip" >}} {{< codesample "sdks/python/apachebeam/examples/snippets/transforms/elementwise/runinference.py" torchkeyedmodel_handler >}} {{</ highlight >}} {{< paragraph class="notebook-skip" >}} Output: {{< /paragraph >}} {{< highlight class="notebook-skip" >}} {{< codesample "sdks/python/apachebeam/examples/snippets/transforms/elementwise/runinferencetest.py" torchkeyedmodelhandler >}} {{< /highlight >}}
Project: ClickHouse (App Definition and Development / Database)
File: v23.2.2.20-stable.md

sidebar_position: 1 sidebar_label: 2023 Backported in : Allow PREWHERE for Merge with different DEFAULT expression for column. (). Backported in : Allow IPv4 in range(). (). Backported in : Combined PREWHERE column accumulated from multiple PREWHERE in some cases didn't contain 0's from previous steps. The fix is to apply final filter if we know that it wasn't applied from more than 1 last step. (). Backported in : Fix error during server startup on old distros (e.g. Amazon Linux 2) and on ARM that glibc 2.28 symbols are not found. (). Backported in : Fixed a bug in automatic retries of `DROP TABLE` query with `ReplicatedMergeTree` tables and `Atomic` databases. In rare cases it could lead to `Can't get data for node /zkpath/logpointer` and `The specified key does not exist` errors if ZooKeeper session expired during DROP and a new replicated table with the same path in ZooKeeper was created in parallel. (). Backported in : Fix a bug in the `Map` data type. This closes . (). Backported in : Fix result of LIKE predicates which translate to substring searches and contain quoted non-LIKE metacharacters. (). More concise logging at trace level for PREWHERE steps (). Reduce updates of Mergeable Check ().
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_clusterdefinition.md

title: kbcli clusterdefinition ClusterDefinition command. ``` -h, --help help for clusterdefinition ``` ``` --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 --cluster string The name of the kubeconfig cluster to use --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 ``` - Describe ClusterDefinition. - List ClusterDefinitions. - List cluster definition components. - List cluster references declared in a cluster definition.
Project: Beam (App Definition and Development / Streaming & Messaging)
File: 02_io_pubsub.md

Prompt: Write a sample Java code snippet that writes data to a Google Pub/Sub topic using Apache Beam. Response: Your Apache Beam pipeline can write data to a Google Pub/Sub topic using the Apache Beam PubSubIO connector. Here is an example of how to use the PubSubIO connector to accomplish this: ```java package pubsub; import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.io.gcp.pubsub.PubsubIO; import org.apache.beam.sdk.options.Description; import org.apache.beam.sdk.options.PipelineOptions; import org.apache.beam.sdk.options.PipelineOptionsFactory; import org.apache.beam.sdk.transforms.Create; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util.List; // Pipeline to write data to a Google Pub/Sub topic public class WritePubSubTopic { private static final Logger LOG = LoggerFactory.getLogger(WritePubSubTopic.class); // Pipeline options to configure the pipeline public interface WritePubSubTopicOptions extends PipelineOptions { @Description("PubSub topic name to write to") String getTopicName(); void setTopicName(String value); } public static void main(String[] args) { // Parse the pipeline options from the command line WritePubSubTopicOptions options = PipelineOptionsFactory.fromArgs(args).withValidation().as(WritePubSubTopicOptions.class); // Create a pipeline Pipeline p = Pipeline.create(options); // Sample messages to write to the Pub/Sub topic final List<String> messages = Arrays.asList( "PubSub message 1", "PubSub message 2", "PubSub message 3" ); p // Create a list of messages to write to the Pub/Sub topic .apply(Create.of(messages)) // Write the messages to the Pub/Sub topic .apply(PubsubIO.writeStrings().to(options.getTopicName())); // Execute the pipeline p.run(); } } ``` This code snippet utilizes the pipeline options pattern to parse command-line arguments.
Project: KICS (Provisioning / Security & Compliance)
File: 6e0e2f68-3fd9-4cd8-a5e4-e2213ef0df97.md

title: Stack Retention Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 6e0e2f68-3fd9-4cd8-a5e4-e2213ef0df97 Query name: Stack Retention Disabled Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Backup URL: Make sure that retain_stack is enabled to keep the Stack and it's associated resources during resource destruction<br> ```tf title="Positive test num. 1 - tf file" hl_lines="8 5" resource "awscloudformationstacksetinstance" "positive1" { account_id = "123456789012" region = "us-east-1" stacksetname = awscloudformationstack_set.example.name retain_stack = false } resource "awscloudformationstacksetinstance" "positive2" { account_id = "123456789012" region = "us-east-1" stacksetname = awscloudformationstack_set.example.name } ``` ```tf title="Negative test num. 1 - tf file" resource "awscloudformationstacksetinstance" "negative1" { account_id = "123456789012" region = "us-east-1" stacksetname = awscloudformationstack_set.example.name retain_stack = true } ```
Project: MongoDB (App Definition and Development / Database)
File: RELEASE-PROCEDURE.md

c-ares release procedure - how to do a release ============================================== in the source code repo -- edit `RELEASE-NOTES` to be accurate edit `configure.ac`'s `CARESVERSIONINFO`, and `CMakeLists.txt`'s `CARESLIBVERSIONINFO` set to the same value to denote the current shared object versioning. make sure all relevant changes are committed on the master branch tag the git repo in this style: `git tag -a cares-1140` -a annotates the tag and we use underscores instead of dots in the version number. run "./maketgz 1.14.0" to build the release tarball. It is important that you run this on a machine with the correct set of autotools etc installed as this is what then will be shipped and used by most users on *nix like systems. push the git commits and the new tag gpg sign the tarball upload the resulting files to https://c-ares.org/download/ update `ares_version.h` for the next version in the c-ares-www repo edit `index.t` (version number and date), edit `changelog.t` (add the new release in there) commit all local changes tag the repo with the same tag as used for the source repo push the git commits and the new tag inform send an email to the c-ares mailing list. Insert the RELEASE-NOTES into the mail. celebrate suitable beverage intake is encouraged for the festivities