cwielenb/CNCF-Dataset huggingface dataset:
Project: Plural (App Definition and Development / Application Definition & Image Build)
File: CONTRIBUTING.md

From opening a bug report to creating a pull request: every contribution is appreciated and welcome. Plural's server side is written in elixir, and exposes a graphql api. The frontend is in react, all code lives in this single repo and common development tasks can be done using the Makefile at the root of the repo. To begin developing the web app, install & , then run: ```sh make web-install make web ``` In chrome, you may get a warning saying "Your connection is not private". To resolve it, enable the `chrome://flags/#allow-insecure-localhost` flag and restart your browser. To make changes to the server codebase, you'll want to on your machine. For mac desktops, we do this via , which can be done simply at the root of the repo like so: ```sh asdf plugin add erlang asdf plugin add elixir asdf install ``` asdf can be finnicky when instlalling erlang with mac, in which case you can reshim it like so from homebrew: ```sh brew install erlang@24 cp -r /opt/homebrew/opt/erlang@24/lib/erlang ~/.asdf/installs/erlang/24.3.4.13 asdf reshim erlang 24.3.4.13 ``` <!-- > Remove this line if irrelevant in the future </!--> In case you're running into this error: `configure: error: cannot find required auxiliary files: install-sh config.guess config.sub` you may consider this then re-run `asdf install`. All server dependencies are managed via : ```sh docker compose up ``` Initializing the db can be done with: ```sh make core-setup ``` Tests can be run via `mix`, like so: ```sh make testup mix test ``` Working on the emails can be done with: ```sh cd apps/email && iex -S mix phx.server ``` Then sending a text email can be done with: ```sh Email.Helper.confirm_email("foo@plural.sh") ``` Your email will show up at http://localhost:4002/sent_emails <img src="www/public/architecture.png"></img> The Plural server codebase uses an elixir umbrella application to organize itself, and splits into three main deployments: api - hosting the main graphql api worker - background workers, for things like upgrade delivery and artifact scanning rtc - for all websocket facing communication These apps will all depend on core, where most Plural business logic should live, and their releases are configured under `/rel`. We use elixir's bamboo framework for templating and delivering emails, one benefit of which is it creates a local server to view in-progress emails. You can get this set up by doing: ```bash make core-migrate # ensure your dev db is set up cd apps/email && iex -S mix phx.server ``` You should be able to view your emails at http://localhost:4002/sent_emails You'll need to send an email to see them, which you can use the iex repl to do for you. To actually write an email, you'll want to modify the templates in `apps/email/lib/emailweb/templates/email` and the layout is in `apps/email/lib/emailweb/templates/layout/email.html.eex` See docs on our for how to add applications to the marketplace.
Project: CockroachDB (App Definition and Development / Database)
File: 20151207_grpc.md

Feature Name: grpc Status: completed Start Date: 2015-12-07 RFC PR: Cockroach Issue: , , Replace the custom protocol in `cockroach/rpc/codec` with GRPC. This will affect both internal communication and potential client-facing APIs (assuming we offer other public APIs besides `pgwire`). GRPC was previously discussed in #2381 for client-facing APIs; this RFC extends the proposal to internal RPCs as well. The primary motivation is to minimize the impact that raft snapshots have on other RPCs (#3013). Our RPC codec transmits each request as a single chunk on the network, which can block other requests for a significant period of time (leading to more severe consequences if raft heartbeats or range lease operations are blocked for too long). Since GRPC is based on HTTP/2, it has built-in support for multiplexing large messages. Secondary benefits of GRPC include support for bidirectional streaming channels, which are a good fit for raft and gossip messages that do not fit the "one request, one response" pattern, and may be useful for future distributed SQL workloads. There are also benefits to adopting a more widely-used protocol instead of our current custom one. Remove all use of `cockroach/rpc/codec` and `net/rpc`, replacing them with GRPC. `cockroach/rpc` be removed, or may become a thin wrapper around GRPC. In either case, interfaces will need to be extended to allow streaming; it probably makes more sense to pass GRPC objects around everywhere than to attempt to cover them with our own abstraction. GRPC is currently slower than our RPC codec ([benchmark results]( https://github.com/cockroachdb/rpc-bench)). It the Go implementation of GRPC has not yet seen significant performance work. It should be possible to improve performance, but GRPC is more complex and it may be difficult to match the performance of our custom codec. Investigation so far indicates that the performance difference is primarily due to the fact that GRPC performs two `Write` syscalls per server response (one for the headers and one for the body) while our own codec does one. GRPC also spends a bit more time in garbage collection than we do. The `grpc-go` server does not currently support serving other HTTP requests on the same port as GRPC (grpc/grpc-go#75). We would need to either fix this upstream or listen on two ports (or hack around it: an HTTP handshake with an `Upgrade` header like our current RPC codec is possible, but would make us incompatible with standard GRPC). We could improve the streaming/multiplexing capabilities of our own RPC codec, or work around the problem by manually splitting messages at a higher level (#3421 contains the beginning of this work). Using protobufs over plain HTTP/2 is in some ways simpler than using GRPC (in that it removes a layer), and gives us some of the key benefits including better multiplexing for snapshots. This is likely to have similar performance to GRPC. For internal use GRPC should be better than plain HTTP, but for external APIs plain HTTP will be easier to use from languages where no high-quality GRPC implementation exists.
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-ref-syntax-ddl-drop-database.md

layout: global title: DROP DATABASE displayTitle: DROP DATABASE 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. Drop a database and delete the directory associated with the database from the file system. An exception will be thrown if the database does not exist in the system. ```sql DROP { DATABASE | SCHEMA } [ IF EXISTS ] dbname [ RESTRICT | CASCADE ] ``` DATABASE `|` SCHEMA* `DATABASE` and `SCHEMA` mean the same thing, either of them can be used. IF EXISTS* If specified, no exception is thrown when the database does not exist. RESTRICT* If specified, will restrict dropping a non-empty database and is enabled by default. CASCADE* If specified, will drop all the associated tables and functions. ```sql -- Create `inventory_db` Database CREATE DATABASE inventory_db COMMENT 'This database is used to maintain Inventory'; -- Drop the database and it's tables DROP DATABASE inventory_db CASCADE; -- Drop the database using IF EXISTS DROP DATABASE IF EXISTS inventory_db CASCADE; ```
Project: Meshery (Provisioning / Automation & Configuration)
File: sharing-a-design.md

layout: default title: Sharing a Design abstract: Sharing a design lets you make your content visible to any anonymous visitor of meshery.io/catalog and any Meshery Cloud user. permalink: extensions/sharing-a-design language: en display-title: "false" list: include type: extensions category: meshmap Sharing a design lets you make your content visible to any anonymous visitor of meshery.io/catalog and any Meshery Cloud user. Anyone with the link can view the design. You can share your design with your friends and teams using Extensions. Let's discuss the process below. Step 1: Access the Extensions UI Note: To share a design you must be the author of the design. Step 2: Navigate to the Designs Tab and Select your Design Once you have accessed the Extension's UI, navigate to the Designs tab. In this tab you can see all your designs with their "<b>Name</b>" and "<b>Date Modified</b>". From the designs table, you can click or drag and drop your design onto the canvas. <a href="{{ site.baseurl }}/assets/img/meshmap/design.png"><img style="border-radius: 0.5%;" alt="Import-Application" style="width:800px;height:auto;" src="{{ site.baseurl }}/assets/img/meshmap/design.png" /></a> Step 3: Select Share actions on the design To select actions, hover over your design in the table and choose <b>share</b>. <a href="{{ site.baseurl }}/assets/img/meshmap/action-publish.png"><img style="border-radius: 0.5%;" alt="Import-Application" style="width:800px;height:auto;" src="{{ site.baseurl }}/assets/img/meshmap/action-share.png" /></a> Step 4: Add email to share with and select access Add email address and choose access type. Access type can be Public or Private, and hit Done. <a href="{{ site.baseurl }}/assets/img/meshmap/share-modal.png"><img style="border-radius: 0.5%;" alt="Import-Application" style="width:800px;height:auto;" src="{{ site.baseurl }}/assets/img/meshmap/share-modal.png" /></a> <iframe class="container" width="560" height="460" src="https://www.youtube.com/embed/Tew2BET6d_U?rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> <div class="alert alert-dark" role="alert"> <h4 class="alert-heading">Discussion Forum</h4> Not finding what you're looking for? Ask on the <a href="http://discuss.meshery.io">Discussion Forum</a>. </div>
Project: Beam (App Definition and Development / Streaming & Messaging)
File: 08_io_csv.md

Prompt: Write a sample Java code snippet that writes data in CSV format using Apache Beam. Response: Your Apache Beam pipeline can write data to CSV files using the CsvIO connector. Here is an example of how to achieve this: ```java import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.io.csv.CsvIO; 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.schemas.JavaFieldSchema; import org.apache.beam.sdk.schemas.annotations.DefaultSchema; import org.apache.beam.sdk.transforms.Create; import org.apache.beam.sdk.values.PCollection; import org.apache.commons.csv.CSVFormat; import java.io.Serializable; import java.util.Arrays; import java.util.List; public class WriteCsvFile { // ExampleRecord is a POJO that represents the data to be written to the CSV file @DefaultSchema(JavaFieldSchema.class) public static class ExampleRecord implements Serializable { public int id; public String month; public String amount; public ExampleRecord() { } public ExampleRecord(int id, String month, String amount) { this.id = id; this.month = month; this.amount = amount; } } public interface WriteCsvFileOptions extends PipelineOptions { @Description("A file path to write CSV files to") @Validation.Required String getFilePath(); void setFilePath(String filePath); } public static void main(String[] args) { WriteCsvFileOptions options = PipelineOptionsFactory.fromArgs(args) .withValidation().as(WriteCsvFileOptions.class); Pipeline p = Pipeline.create(options); List<ExampleRecord> rows = Arrays.asList( new ExampleRecord(1, "January", "$1000"), new ExampleRecord(2, "February", "$2000"), new ExampleRecord(3, "March", "$3000")); CSVFormat csvFormat = CSVFormat.DEFAULT.withHeaderComments("CSV file created by Apache Beam") .withCommentMarker('#'); p.apply("Create collection", Create.of(rows)) .apply( "Write to CSV file", CsvIO.<ExampleRecord>write() .to(options.getFilePath()) .withNumShards(1)); p.run(); } } ```
Project: StarRocks (App Definition and Development / Database)
File: ALTER_STORAGE_VOLUME.md

displayed_sidebar: "English" Alters the credential properties, comment, or status (`enabled`) of a storage volume. For more about the properties of a storage volume, see . This feature is supported from v3.1. CAUTION Only users with the ALTER privilege on a specific storage volume can perform this operation. The `TYPE`, `LOCATIONS`, and other path-related properties of an existing storage volume cannot be altered. You can only alter its credential-related properties. If you changed the path-related configuration items, the databases and tables you created before the change become read-only, and you cannot load data into them. When `enabled` is `false`, the corresponding storage volume cannot be referenced. ```SQL ALTER STORAGE VOLUME [ IF EXISTS ] <storagevolumename> { COMMENT '<comment_string>' | SET ("key" = "value"[,...]) } ``` | Parameter | Description | | - | - | | storagevolumename | The name of the storage volume to alter. | | COMMENT | The comment on the storage volume. | For detailed information on the properties that can be altered or added, see . Example 1: Disable the storage volume `mys3volume`. ```Plain MySQL > ALTER STORAGE VOLUME mys3volume -> SET ("enabled" = "false"); Query OK, 0 rows affected (0.01 sec) ``` Example 2: Alter the credential information of the storage volume `mys3volume`. ```Plain MySQL > ALTER STORAGE VOLUME mys3volume -> SET ( -> "aws.s3.useinstanceprofile" = "true" -> ); Query OK, 0 rows affected (0.00 sec) ```
Project: ArangoDB (App Definition and Development / Database)
File: implicit_inplace_value_error_constructor.md

+++ title = "`basic_result(A1 &&, A2 &&, Args ...)`" description = "Implicit inplace value or error constructor. Available if `predicate::enableinplacevalueerrorconstructor<A1, A2, Args ...>` is true. Constexpr, triviality and noexcept propagating." categories = ["constructors", "implicit-constructors", "inplace-constructors"] weight = 440 +++ Implicit inplace value or error constructor. Delegates to an appropriate explicit inplace constructor depending on input. Requires: predicate::enableinplacevalueerrorconstructor<A1, A2, Args ...>` is true. Complexity: Same as for the `valuetype` or `errortype` constructor which accepts `A1, A2, Args ...`. Constexpr, triviality and noexcept of underlying operations is propagated. Guarantees: If an exception is thrown during the operation, the state of the Args is left indeterminate.
Project: KICS (Provisioning / Security & Compliance)
File: d991e4ae-42ab-429b-ab43-d5e5fa9ca633.md

title: EC2 Not EBS Optimized hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: d991e4ae-42ab-429b-ab43-d5e5fa9ca633 Query name: EC2 Not EBS Optimized Platform: Pulumi Severity: <span style="color:#5bc0de">Info</span> Category: Best Practices URL: It's considered a best practice for an EC2 instance to use an EBS optimized instance. This provides the best performance for your EBS volumes by minimizing contention between Amazon EBS I/O and other traffic from your instance<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="10 18" name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: aws:ec2:Instance properties: instanceType: t2.micro monitoring: true ebsOptimized: false name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: aws:ec2:Instance properties: instanceType: t2.micro monitoring: true ``` ```yaml title="Negative test num. 1 - yaml file" name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: aws:ec2:Instance properties: instanceType: t2.micro monitoring: true ebsOptimized: true name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: aws:ec2:Instance properties: instanceType: t3.nano monitoring: true ```
Project: YugabyteDB (App Definition and Development / Database)
File: yba_universe_delete.md

Delete a YugabyteDB Anywhere universe Delete a universe in YugabyteDB Anywhere ``` yba universe delete [flags] ``` ``` -n, --name string [Required] The name of the universe to be deleted. -f, --force [Optional] Bypass the prompt for non-interactive usage. --force-delete [Optional] Force delete the universe despite errors. (default false) --delete-backups [Optional] Delete backups associated with name. (default false) --delete-certs [Optional] Delete certs associated with name. (default false) -h, --help help for delete ``` ``` -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 universes
Project: ShardingSphere (App Definition and Development / Database)
File: drop-default-sharding-strategy.en.md

+++ title = "DROP DEFAULT SHARDING STRATEGY" weight = 6 +++ The `DROP DEFAULT SHARDING STRATEGY` syntax is used to drop default sharding strategy for specified database. {{< tabs >}} {{% tab name="Grammar" %}} ```sql DropDefaultShardingStrategy ::= 'DROP' 'DEFAULT' 'SHARDING' ('TABLE' | 'DATABASE') 'STRATEGY' ifExists? ('FROM' databaseName)? ifExists ::= 'IF' 'EXISTS' databaseName ::= identifier ``` {{% /tab %}} {{% tab name="Railroad diagram" %}} <iframe frameborder="0" name="diagram" id="diagram" width="100%" height="100%"></iframe> {{% /tab %}} {{< /tabs >}} When `databaseName` is not specified, the default is the currently used `DATABASE`. If `DATABASE` is not used, `No database selected` will be prompted; `ifExists` clause is used for avoid `Default sharding strategy not exists` error. Drop default sharding table strategy for specified database ```sql DROP DEFAULT SHARDING TABLE STRATEGY FROM sharding_db; ``` Drop default sharding database strategy for current database ```sql DROP DEFAULT SHARDING DATABASE STRATEGY; ``` Drop default sharding table strategy with `ifExists` clause ```sql DROP DEFAULT SHARDING TABLE STRATEGY IF EXISTS; ``` Drop default sharding database strategy with `ifExists` clause ```sql DROP DEFAULT SHARDING DATABASE STRATEGY IF EXISTS; ``` `DROP`, `DEFAULT` , `SHARDING`, `TABLE`, `DATABASE` ,`STRATEGY`, `FROM`
Project: KICS (Provisioning / Security & Compliance)
File: 493d9591-6249-47bf-8dc0-5c10161cc558.md

title: Security Groups Without VPC Attached hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 493d9591-6249-47bf-8dc0-5c10161cc558 Query name: Security Groups Without VPC Attached Platform: CloudFormation Severity: <span style="color:#edd57e">Low</span> Category: Networking and Firewall URL: Security Groups must have a VPC.<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="16" Parameters: KeyName: Description: The EC2 Key Pair to allow SSH access to the instance Type: 'AWS::EC2::KeyPair::KeyName' Resources: Ec2Instance: Type: 'AWS::EC2::Instance' Properties: SecurityGroups: !Ref InstanceSecurityGroup MyExistingSecurityGroup KeyName: !Ref KeyName ImageId: ami-7a11e213 InstanceSecurityGroup: Type: 'AWS::EC2::SecurityGroup' Properties: GroupName: My Group Name GroupDescription: Enable SSH access via port 22 SecurityGroupIngress: IpProtocol: tcp FromPort: '22' ToPort: '22' CidrIp: 0.0.0.0/0 ``` ```json title="Positive test num. 2 - json file" hl_lines="22" { "Parameters": { "KeyName": { "Description": "The EC2 Key Pair to allow SSH access to the instance", "Type": "AWS::EC2::KeyPair::KeyName" } }, "Resources": { "Ec2Instance": { "Properties": { "SecurityGroups": [ "InstanceSecurityGroup", "MyExistingSecurityGroup" ], "KeyName": "KeyName", "ImageId": "ami-7a11e213" }, "Type": "AWS::EC2::Instance" }, "InstanceSecurityGroup": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "GroupName": "My Group Name", "GroupDescription": "Enable SSH access via port 22", "SecurityGroupIngress": [ { "IpProtocol": "tcp", "FromPort": "22", "ToPort": "22", "CidrIp": "0.0.0.0/0" } ] } } } } ``` ```yaml title="Negative test num. 1 - yaml file" Parameters: KeyName: Description: The EC2 Key Pair to allow SSH access to the instance Type: 'AWS::EC2::KeyPair::KeyName' Resources: Ec2Instance: Type: 'AWS::EC2::Instance' Properties: SecurityGroups: !Ref InstanceSecurityGroup MyExistingSecurityGroup KeyName: !Ref KeyName ImageId: ami-7a11e213 InstanceSecurityGroup: Type: 'AWS::EC2::SecurityGroup' Properties: GroupName: My Group Name GroupDescription: Enable SSH access via port 22 VpcId: Ref: myVPC SecurityGroupIngress: IpProtocol: tcp FromPort: '22' ToPort: '22' CidrIp: 0.0.0.0/0 ``` ```json title="Negative test num. 2 - json file" { "Resources": { "Ec2Instance": { "Type": "AWS::EC2::Instance", "Properties": { "SecurityGroups": [ "InstanceSecurityGroup", "MyExistingSecurityGroup" ], "KeyName": "KeyName", "ImageId": "ami-7a11e213" } }, "InstanceSecurityGroup": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "SecurityGroupIngress": [ { "IpProtocol": "tcp", "FromPort": "22", "ToPort": "22", "CidrIp": "0.0.0.0/0" } ], "GroupName": "My Group Name", "GroupDescription": "Enable SSH access via port 22", "VpcId": { "Ref": "myVPC" } } } }, "Parameters": { "KeyName": { "Description": "The EC2 Key Pair to allow SSH access to the instance", "Type": "AWS::EC2::KeyPair::KeyName" } } } ```