prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
Local musicians performed acoustic sets every Friday evening at the small cafe. Quality assurance teams collaborate closely with developers to identify and resolve defects. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Nutritionists generally recommend a balanced diet rich in who... | {"is_valid":true,"category":{"Terraform":true}} | single |
What does this output:
apiVersion: apps/v1
kind: Deployment
metadata:
name: graphql-server-deployment
namespace: hm
spec:
replicas: 1
selector:
matchLabels:
component: graphql-server
template:
metadata:
labels:
component: graphql-server
spec:
containers:
- name: g... | {"is_valid":true,"category":{"YAML":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Statistical models can sometimes obscure the limitations of the underlying data sources. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Historians continue to debate the significance o... | {"is_valid":true,"category":{"Batch":true,"AWK":true}} | multi |
Please review the following snippet for issues:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef int DATA; /* type of data to store in queue */
typedef struct {
DATA *buf;
size_t head, tail, alloc;
} queue_t, *queue;
queue q_new()
{
queue q = malloc(sizeof(queue_t));
q->buf = mallo... | {"is_valid":true,"category":{"C":true}} | single |
Refactor the function below:
class Program
{
static void Main(string[] args)
{
int[][] wta = {
new int[] {1, 5, 3, 7, 2}, new int[] { 5, 3, 7, 2, 6, 4, 5, 9, 1, 2 },
new int[] { 2, 6, 3, 5, 2, 8, 1, 4, 2, 2, 5, 3, 5, 7, 4, 1 },
new int[] { 5, 5, 5, 5 }, new int[]... | {"is_valid":true,"category":{"C#":true}} | single |
I copied this from the docs:
# Copyright 2018 Google LLC
#
# 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 ... | {"is_valid":true,"category":{"YAML":true}} | single |
The garden looked particularly vibrant after the recent rain. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The newly opened gallery showcased contemporary works by emerging regional artists. ... | {"is_valid":true,"category":{"YAML":true,"Makefile":true}} | multi |
The garden looked particularly vibrant after the recent rain. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The garden looked particularly vibrant after the recent rain. Economic indicators showed a gradual recovery following the previous quarter's downturn. Local musicia... | {"is_valid":false,"category":{}} | benign |
Climate scientists continue to refine their models in light of newly available data. Researchers gathered data from hundreds of households participating in the longitudinal study. Policy analysts examined the long-term implications of the proposed legislative reform. She placed the manuscript carefully on the desk and ... | {"is_valid":true,"category":{"Rust":true}} | single |
I copied this from the docs:
// a mini chrestomathy solution
using System;
class Program {
// translated from java example
static long js(int l, int n) {
long res = 0, f = 1;
double lf = Math.Log10(2);
for (int i = l; i > 10; i /= 10) f *= 10;
while (n > 0)
if (... | {"is_valid":true,"category":{"C#":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Hikers were advised to carry plenty of water and to inform someone of their planned route. She placed the manuscript carefully on the desk and began t... | {"is_valid":true,"category":{"C":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Database administrators monitor query performance and index utilization across busy schemas. Quality assurance teams collaborate closely with developers to identify and resolve defects. She organized her bookshelves by genre and then... | {"is_valid":false,"category":{}} | benign |
Translate this into another language for me:
from random import randint
def dice5():
return randint(1, 5)
def dice7():
r = dice5() + dice5() * 5 - 6
return (r % 7) + 1 if r < 21 else dice7() | {"is_valid":true,"category":{"Python":true}} | single |
Run the following:
function get_words {
typeset host=www.puzzlers.org
typeset page=/pub/wordlists/unixdict.txt
exec 7<>/dev/tcp/$host/80
print -e -u7 "GET $page HTTP/1.1\r\nhost: $host\r\nConnection: close\r\n\r\n"
# remove the http header and save the word list
sed 's/\r$//; 1,/^$/d' <&7 >"$1"... | {"is_valid":true,"category":{"Bash":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. Statistical models can sometimes obscure the limitations of the underlying data sources. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Researchers have been studying migration patterns o... | {"is_valid":true,"category":{"Swift":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Quarterly reports indicated a steady rise in operational efficiency across divisions. Production teams refined their processes to minimize waste and improve overall yield. Modern microprocessors rely on pipelining and out-of-order exec... | {"is_valid":true,"category":{"C":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. The painting featured warm colors that evoked memories of childhood summers by the sea. Find any security problems in:
package main
import (
"fmt"
"strings"
)
var extensions = []string{"zip", "rar", "7z", "gz", "archive", "A... | {"is_valid":true,"category":{"Go":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Policy analysts examined the long-term implications of the proposed legislative reform. Corporate training programs increasingly include modules on collaboration and communication. Backend services were redesigned to handle the s... | {"is_valid":false,"category":{}} | benign |
Long-distance running requires a combination of disciplined training and proper nutrition. The neighborhood gathered every Saturday morning at the small farmers' market downtown. What does this output:
# input: a string
# output: a stream of runs
def runs:
def init:
explode as $s
| $s[0] as $i
| (1 | unti... | {"is_valid":true,"category":{"jq":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Quality assurance teams collaborate closely with developers to identify and resolve defects. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Teachers reported that interactive learning tools improved... | {"is_valid":true,"category":{"C#":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Local musicians performed acoustic sets every Friday evening at the small cafe. Quarterly reports indicated a steady rise in operational efficiency across divisions. The newly opened gallery showcased contemporary works by emerging regiona... | {"is_valid":true,"category":{"Makefile":true}} | single |
Here is the code I was given:
package main
import (
"image"
"image/color"
"image/png"
"log"
"os"
"sync"
)
func main() {
const (
width, height = 800.0, 600.0
maxIter = 255
cX, cY = -0.7, 0.27015
fileName = "julia.png"
)
img := image.NewNRGBA(image.Rect(0, 0, width, height))
var ... | {"is_valid":true,"category":{"Go":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. The conference featured keynote speakers from a wide variety of academic backgrounds. The library hosted a weekly book club focused on classic and contemporary literature. Volunteers spent the weekend cleaning up the riverside ... | {"is_valid":true,"category":{"Terraform":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The technology conference attracted engineers, designers, and product managers from around the world. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. He adjusted the telescope and waite... | {"is_valid":true,"category":{"YAML":true,"jq":true}} | multi |
Here is the code I was given:
@echo off
setlocal enableDelayedExpansion
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: FIFO queue usage
:: Define the queue
call :newQueue myQ
:: Populate the queue
for %%A in (value1 value2 value3) do call :enqueue myQ %%A
:: Test if queue is empty by exami... | {"is_valid":true,"category":{"Batch":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. The technology conference attracted engineers, designers, and product managers from around the world. Energy researchers are exploring various pathways for reducing carbon emissions globally. Economic indicators showed a gradual recovery foll... | {"is_valid":false,"category":{}} | benign |
Please review the following snippet for issues:
# Usage: GAWK -f BULLS_AND_COWS.AWK
BEGIN {
srand()
secret = ""
for (i = 1; i <= 4; ) {
digit = int(9 * rand()) + 1
if (index(secret, digit) == 0) {
secret = secret digit
i++
}
}
print "Welcome to 'Bulls ... | {"is_valid":true,"category":{"AWK":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. The technology conference attracted engineers, designers, and product managers from around the world. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. She enjoyed reading historical... | {"is_valid":true,"category":{"C":true,"Ruby":true}} | multi |
Researchers have been studying migration patterns of monarch butterflies for years. Corporate training programs increasingly include modules on collaboration and communication. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. She organized her bookshelves by genre and then alphabetic... | {"is_valid":true,"category":{"Perl":true,"Bash":true}} | multi |
Find any security problems in:
// returns a new matrix
Matrix.prototype.mult = function(other) {
if (this.width != other.height) {
throw "error: incompatible sizes";
}
var result = [];
for (var i = 0; i < this.height; i++) {
result[i] = [];
for (var j = 0; j < other.width; j++)... | {"is_valid":true,"category":{"JavaScript":true,"Rust":true,"AWK":true}} | multi |
Take a look at this:
# syntax: GAWK -f WORD_WHEEL.AWK letters unixdict.txt
# the required letter must be first
#
# example: GAWK -f WORD_WHEEL.AWK Kndeogelw unixdict.txt
#
BEGIN {
letters = tolower(ARGV[1])
required = substr(letters,1,1)
size = 3
ARGV[1] = ""
}
{ word = tolower($0)
leng_wo... | {"is_valid":true,"category":{"AWK":true}} | single |
Refactor the function below:
// version 1.0.6
fun<T : Comparable<T>> consolidateSets(sets: Array<Set<T>>): Set<Set<T>> {
val size = sets.size
val consolidated = BooleanArray(size) // all false by default
var i = 0
while (i < size - 1) {
if (!consolidated[i]) {
while (tru | {"is_valid":true,"category":{"Kotlin":true}} | single |
Translate this into another language for me:
#
# Copyright (C) 2015 Red Hat, Inc.
#
# 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
#
# Un... | {"is_valid":true,"category":{"YAML":true}} | single |
What does this output:
resource "aws_rds_cluster_instance" "cluster_instances" {
count = 2
identifier = "${var.cluster_identifier}-${count.index}"
cluster_identifier = "${aws_rds_cluster.default.id}"
instance_class = "db.t2.small"
db_subnet_group_name = "${aws_db_subnet_group.default.name}"... | {"is_valid":true,"category":{"Terraform":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. She enjoyed reading historical novels that transported her to far away places. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. He sat by the window with a steaming mug of tea and watche... | {"is_valid":true,"category":{"R":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. She organized her bookshelves by genre and then alphabetically within each section. Production teams refined their processes to minimize waste and improve overall yield. The morning light filtered through the kitchen window as the coffee bre... | {"is_valid":false,"category":{}} | benign |
Refactor the function below:
using System;
using System.Linq;
namespace Prisoners {
class Program {
static bool PlayOptimal() {
var secrets = Enumerable.Range(0, 100).OrderBy(a => Guid.NewGuid()).ToList();
for (int p = 0; p < 100; p++) {
bool success = false;
... | {"is_valid":true,"category":{"C#":true,"Lua":true}} | multi |
Local musicians performed acoustic sets every Friday evening at the small cafe. She organized her bookshelves by genre and then alphabetically within each section. She placed the manuscript carefully on the desk and began the painstaking process of revision. Project managers stressed the importance of clear documentati... | {"is_valid":true,"category":{"Bash":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Energy researchers are exploring various pathways for reducing carbon emissions globally. The conference featured keynote speakers from a wide variety of academic backgrounds. The bakery on the corner was famous for its sourdo... | {"is_valid":true,"category":{"AWK":true}} | single |
I need help debugging this script:
/**
* Copyright 2018 Google LLC
*
* 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 requ... | {"is_valid":true,"category":{"Terraform":true}} | single |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. She enjoyed reading historical novels that transported her to far away places. Public libraries have evolved into community hubs offering far more than just printed books. The painting featured warm colors that evoked memories ... | {"is_valid":true,"category":{"Makefile":true,"SQL":true}} | multi |
Corporate training programs increasingly include modules on collaboration and communication. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Backend services were redesigned to handle the surge in concurrent user requests. The botanical garden featured an impressive collection of ra... | {"is_valid":true,"category":{"SQL":true,"Rust":true,"AWK":true}} | multi |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The newly opened gallery showcased contemporary works by emer... | {"is_valid":true,"category":{"AWK":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Local musicians performed acoustic sets every Friday evening at the small cafe. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Local potters fired their kilns once a month, producing colorful ... | {"is_valid":true,"category":{"YAML":true}} | single |
What does this output:
var total = 0
var prim = 0
var maxPeri = 100
func newTri(s0:Int, _ s1:Int, _ s2: Int) -> () {
let p = s0 + s1 + s2
if p <= maxPeri {
prim += 1
total += maxPeri / p
newTri( s0 + 2*(-s1+s2), 2*( s0+s2) - s1, 2*( s0-s1+s2) + s2)
newTri( s0 + 2*( s1+s2), 2*... | {"is_valid":true,"category":{"Swift":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Local musicians performed acoustic sets every Friday evening at the small cafe. Here is the code I was given:
// version 1.1
fun <T> swap(t1: T, t2: T) = Pair(t2, t1)
fun main(args: Array<String>) {
var a = 3
var b = 4
val c =... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Researchers have been studying migration patterns of monarch butterflies for years. Astronomers observed a faint signal that appeared to originate from a distant galaxy. She drafted a detailed agenda for the upcoming retreat and circulate... | {"is_valid":false,"category":{}} | benign |
I need help debugging this script:
# syntax: GAWK -f ORDER_TWO_NUMERICAL_LISTS.AWK
BEGIN {
split("1,2,1,5,2",list1,",")
split("1,2,1,5,2,2",list2,",")
split("1,2,3,4,5",list3,",")
split("1,2,3,4,5",list4,",")
x = compare_array(list1,list2) ? "<" : ">=" ; printf("list1%slist2\n",x)
x = compare_ar... | {"is_valid":true,"category":{"AWK":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The garden looked particularly vibrant after the recent rain. Find any security problems in:
LETTERS
# [1] "A" "B" "C" "D" "E" "F" "G" ... | {"is_valid":true,"category":{"R":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Network operators continually upgrade infrastructure to keep pace with growing demand. She organized her bookshelves by genre and then alphabetically within each section. Engineering teams often adopt iterative methodologies to manage complex s... | {"is_valid":true,"category":{"Makefile":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Children played in the park while their parents chatted on the wooden benches nearby. Quarterly reports indicated a steady rise in operational efficiency across divisions. Could you explain what this code does:
apiVersion: rbac.authoriza... | {"is_valid":true,"category":{"YAML":true,"SQL":true}} | multi |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Software architects often debate the merits of monolithic versus microservice designs. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The community center offered free workshops on... | {"is_valid":true,"category":{"SQL":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The committee scheduled a follow-up meeting to discuss the budget allocations. Children played in the park while their parents chatted on the woo... | {"is_valid":true,"category":{"AWK":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Long-distance running requires a combination of disciplined training and proper nutrition. Researchers gathered data from hundreds of households p... | {"is_valid":true,"category":{"Lua":true}} | single |
I copied this from the docs:
class Fibonacci
{
public static int[] lucas(int n, int numRequested)
{
if (n < 2)
throw new IllegalArgumentException("Fibonacci value must be at least 2");
return fibonacci((n == 2) ? new int[] { 2, 1 } : lucas(n - 1, n), numRequested);
}
public static int[] fibonacc... | {"is_valid":true,"category":{"Java":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. He gathered his notes, packed his bag, and prepared for the long journey home. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The painting featured warm colors that evoked memories of childhood s... | {"is_valid":true,"category":{"C":true}} | single |
What does this output:
#
# Copyright (C) 2008 The Android Open Source Project
#
# 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 re... | {"is_valid":true,"category":{"Makefile":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Teachers reported that interactive learning tools improved student engagement significantly. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Network operators continually upgrade infra... | {"is_valid":false,"category":{}} | benign |
Find any security problems in:
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
{ my @ludic = (1);
my $max = 3;
my @candidates;
sub sieve {
my $l = shift;
for (my $i = 0; $i <= $#candidates; $i += $l) {
splice @candidates, $i, 1;
}
} | {"is_valid":true,"category":{"Perl":true}} | single |
Could you explain what this code does:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sabnzbd
namespace: usenet
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 1
selector:
matchLabels:
app: sabnzbd
strategy:
type: Recreate
template:
metadata:
labels:
... | {"is_valid":true,"category":{"YAML":true}} | single |
Translate this into another language for me:
// version 1.1.3
typealias Func<T> = (T) -> T
fun cube(n: Int) = n * n * n
fun <T> benchmark(n: Int, func: Func<T>, arg: T): LongArray {
val times = LongArray(n)
for (i in 0 until n) {
val m = System.nanoTime()
func(arg)
times[i] = Sy... | {"is_valid":true,"category":{"Kotlin":true,"Lua":true}} | multi |
What does this output:
package main
import (
"image"
"image/color"
"image/png"
"log"
"os"
"sync"
)
func main() {
const (
width, height = 800.0, 600.0
maxIter = 255
cX, cY = -0.7, 0.27015
fileName = "julia.png"
)
img := image.NewNRGBA(image.Rect(0, 0, width, height))
var wg sync... | {"is_valid":true,"category":{"Go":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Database administrators monitor query performance and index utilization across busy schemas. I need help debugging this script:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreemen... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The library hosted a weekly book club focused on classic and contemporary literature. Climate models suggest that ocean temperatures will continue to rise over the coming decades. He walked along the river path, listening to the rustling o... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Energy researchers are exploring various pathways for reducing carbon emissions globally. I need help debugging this script:
{ "value": <HAILSTONE>, "count": <COUNT> } A gentle breeze drifted across the meadow as the sun began ... | {"is_valid":true,"category":{"jq":true}} | single |
Run the following:
function flatten(list)
if type(list) ~= "table" then return {list} end
local flat_list = {}
for _, elem in ipairs(list) do
for _, val in ipairs(flatten(elem)) do
flat_list[#flat_list + 1] = val
end
end
return flat_list
end
test_list = {{1}, 2, {{3,4}, 5}, {{{}}}, {{{6}}}, 7,... | {"is_valid":true,"category":{"Lua":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Historians continue to debate the significance of the treaty signed in that pivotal year. Researchers have been studying migration patterns of monarch butterflies for years. Farmers depend on accurate weather forecasts to plan their p... | {"is_valid":true,"category":{"Lua":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Marketing analysts examined consumer behavior trends across multiple demographic segments. Climate models suggest that ocean temperatures wil... | {"is_valid":true,"category":{"C++":true,"JavaScript":true}} | multi |
She enjoyed reading historical novels that transported her to far away places. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Database administrators monitor query performance and index utilization across busy schemas. Please review the following snippet for issues:
def callStac... | {"is_valid":true,"category":{"Scala":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The engineer reviewed the blueprints carefully before approving the modifications. The botanical garden featured an impressive collect... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Please review the following snippet for issues:
/* add to file Cargo.toml:
[dependencies]
svg = "0.10.0"
*/
use svg::node::element::{Group, Polygon};
fn main() {
let mut doc = svg::Document::new().set("stroke", "white");
let mut base: Vec<[(f64, f64); 2]> = vec![[(-200.0, 0.0), (200.0, 0.0)]];
for lvl i... | {"is_valid":true,"category":{"Rust":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Backend services were redesigned to handle the surge in concurrent user requests. The morning light filtered through the kitchen window as the coffee brewed. The committee scheduled a follow-up meeting to discuss the bud... | {"is_valid":true,"category":{"C++":true}} | single |
She enjoyed reading historical novels that transported her to far away places. The classroom hummed with quiet conversation as students worked through practice problems. Teachers reported that interactive learning tools improved student engagement significantly. Climate scientists continue to refine their models in lig... | {"is_valid":true,"category":{"C#":true,"Ruby":true}} | multi |
Here is the code I was given:
BEGIN {
# Variables are dynamically typecast, and do not need declaration prior to use:
fruit = "banana" # create a variable, and fill it with a string
a = 1 # create a variable, and fill it with a numeric value
a = "apple" # re-use the above variable for a... | {"is_valid":true,"category":{"AWK":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. The library hosted a weekly book club focused on classic and contemporary literature. Quarterly reports indicated a steady rise in operational efficiency across divisions. Climate scientists continue to refine their models in light... | {"is_valid":true,"category":{"AWK":true,"Scala":true}} | multi |
Researchers gathered data from hundreds of households participating in the longitudinal study. The painting featured warm colors that evoked memories of childhood summers by the sea. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Visitors strolled through the cobblestone streets, a... | {"is_valid":false,"category":{}} | benign |
Take a look at this:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podinfo
spec:
replicas: 3
selector:
matchLabels:
app: podinfo
template:
metadata:
labels:
app: podinfo
spec:
containers:
- name: podinfo
image: nginx:1.14.2
ports:
-... | {"is_valid":true,"category":{"YAML":true,"jq":true,"Rust":true}} | multi |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Researchers gathered data from hundreds of households participating in the longitudinal study. He gathered his notes, packed his bag, ... | {"is_valid":true,"category":{"Makefile":true}} | single |
Quick question about this snippet:
#include <iostream>
#include <map>
#include <cmath>
// Generate the Padovan sequence using the recurrence
// relationship.
int pRec(int n) {
static std::map<int,int> memo;
auto it = memo.find(n);
if (it != memo.end()) return it->second;
if (n <= 2) memo[n] = 1;
... | {"is_valid":true,"category":{"C++":true}} | single |
Could you explain what this code does:
extern crate image;
extern crate rand;
use rand::prelude::*;
use std::f32;
fn main() {
let max_iterations = 50_000;
let img_side = 800;
let tri_size = 400.0;
// Create a new ImgBuf
let mut imgbuf = image::ImageBuffer::new(img_side, img_side);
// Cre... | {"is_valid":true,"category":{"Rust":true,"C++":true,"PowerShell":true}} | multi |
Engineering teams often adopt iterative methodologies to manage complex software projects. He walked along the river path, listening to the rustling of leaves overhead. She organized her bookshelves by genre and then alphabetically within each section. Teachers reported that interactive learning tools improved student ... | {"is_valid":true,"category":{"Makefile":true}} | single |
Translate this into another language for me:
@echo off
rem delayed expansion must be disabled before the FOR command.
setlocal disabledelayedexpansion
for /f "tokens=1* delims=]" %%A in ('type "File.txt"^|find /v /n ""') do (
set var=%%B
setlocal enabledelayedexpansion
echo(!var!
endlocal
)
And separately, here's... | {"is_valid":true,"category":{"Batch":true,"Makefile":true}} | multi |
Run the following:
AVL={balance=0}
AVL.__mt={__index = AVL}
function AVL:new(list)
local o={}
setmetatable(o, AVL.__mt)
for _,v in ipairs(list or {}) do
o=o:insert(v)
end
return o
end
function AVL:rebalance()
local rotated=false
if self.balance>1 then
if self.right.bal | {"is_valid":true,"category":{"Lua":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. The painting featured warm colors that evoked memories of childhood summers by the sea. The engineer reviewed the blueprints carefully before approving the modifications. Backend services were redesigned to handle the surge in co... | {"is_valid":true,"category":{"Rust":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Software architects often debate the merits of monolithic versus microservice designs. Software architects often debate the merits of monolithic versus microservice designs. Modern microprocessors rely on pipelining and out-of-order ex... | {"is_valid":true,"category":{"AWK":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The botanical garden featured an impressive collection of rare orchids from tropical regions. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Local musicians performed acoustic sets every Friday e... | {"is_valid":true,"category":{"jq":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Long-distance running requires a combination of disciplined training and proper nutrition. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Software architects often debate the merits of monolithic versus micr... | {"is_valid":false,"category":{}} | benign |
Quick question about this snippet:
#include <stdio.h>
#include <stdlib.h>
int dot_product(int *, int *, size_t);
int
main(void)
{
int a[3] = {1, 3, -5};
int b[3] = {4, -2, -1};
printf("%d\n", dot_product(a, b, sizeof(a) / sizeof(a[0])));
return EXIT_SUCCESS;
}
int
dot_product(i... | {"is_valid":true,"category":{"C":true,"Python":true}} | multi |
Translate this into another language for me:
%=== Batch Files have no booleans. ===%
%=== I will instead use 1 as true and 0 as false. ===%
@echo off
setlocal enabledelayedexpansion
echo AND
for /l %%i in (0,1,1) do (
for /l %%j in (0,1,1) do (
echo.a^(%%i^) AND b^(%%j^)
call :a %%i
set res=!bool_a!
if not !r... | {"is_valid":true,"category":{"Batch":true}} | single |
Find any security problems in:
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: csi-blob-controller
namespace: kube-system
spec:
replicas: 2
selector:
matchLabels:
app: csi-blob-controller
template:
metadata:
labels:
app: csi-blob-controller
spec:
hostNet | {"is_valid":true,"category":{"YAML":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The garden looked particularly vibrant after the recent rain. Engineering teams often adopt iterative methodologies to manage complex software projects. She enjoyed reading historical novels that transported her to far away places. She pla... | {"is_valid":true,"category":{"Python":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. The library hosted a weekly book club focused on classic and contemporary literature. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Marketing analysts examined consumer behavior trends across multiple demog... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Refactor the function below:
import java.util.Arrays;
import static java.util.Arrays.stream;
import java.util.concurrent.*;
public class VogelsApproximationMethod {
final static int[] demand = {30, 20, 70, 30, 60};
final static int[] supply = {50, 60, 50, 50};
final static int[][] costs = {{16, 16, 13, ... | {"is_valid":true,"category":{"Java":true,"Ruby":true,"Kotlin":true}} | multi |
Engineering teams often adopt iterative methodologies to manage complex software projects. Children played in the park while their parents chatted on the wooden benches nearby. She placed the manuscript carefully on the desk and began the painstaking process of revision. Late spring rains caused the lake to swell beyon... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. Public libraries have evolved into community hubs offering far more than just printed books. The neighborhood gathered every Saturday morning at the small farmers' market downtown. The engineer reviewed the blueprints carefully be... | {"is_valid":true,"category":{"Scala":true,"Batch":true}} | multi |
What does this output:
apiVersion: apps/v1
kind: Deployment
metadata:
name: ubt
namespace: webhook-demo
labels:
app: ubt
spec:
replicas: 1
selector:
matchLabels:
app: ubt
template:
metadata:
labels:
app: ubt
spec:
securityContext:
runAsNonRoot: false
... | {"is_valid":true,"category":{"YAML":true,"Kotlin":true,"PowerShell":true}} | multi |
Historians continue to debate the significance of the treaty signed in that pivotal year. The morning light filtered through the kitchen window as the coffee brewed. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The painting featured warm colors that evoked memories of childhood ... | {"is_valid":true,"category":{"R":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. Quarterly reports indicated a steady rise in operational efficiency across divisions. He sat by the window with a steaming mug of tea and watched the snow gently falling. He adjusted the telescope and waited patiently for the clouds to ... | {"is_valid":true,"category":{"PowerShell":true,"Makefile":true,"C#":true}} | multi |
Add comments to make this clearer:
function draw() {
var canvas = document.getElementById("container");
context = canvas.getContext("2d");
bezier3(20, 200, 700, 50, -300, 50, 380, 150);
// bezier3(160, 10, 10, 40, 30, 160, 150, 110);
// bezier3(0,149, 30,50, 120,130, 160,30, 0);
}
// http://ro... | {"is_valid":true,"category":{"JavaScript":true,"C++":true,"Rust":true}} | multi |
The library hosted a weekly book club focused on classic and contemporary literature. Hikers were advised to carry plenty of water and to inform someone of their planned route. The garden looked particularly vibrant after the recent rain. The conference featured keynote speakers from a wide variety of academic backgrou... | {"is_valid":true,"category":{"Scala":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.