prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
Add comments to make this clearer: // [dependencies] // svg = "0.8.0"   use svg::node::element::path::Data; use svg::node::element::Path;   struct HilbertCurve { current_x: f64, current_y: f64, current_angle: i32, line_length: f64, }   impl HilbertCurve { fn new(x: f64, y: f64, length: f64, angle: i...
{"is_valid":true,"category":{"Rust":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Project managers stressed the importance of clear documentation throughout the cycle. Backend services were redesigned to handle the surge in concurrent us...
{"is_valid":true,"category":{"Lua":true}}
single
Quick question about this snippet: def bitwise(a, b) form = "%1$7s:%2$6d  %2$016b" puts form % ["a", a] puts form % ["b", b] puts form % ["a and b", a & b] puts form % ["a or b ", a | b] puts form % ["a xor b", a ^ b] puts form % ["not a ", ~a] puts form % ["a << b ", a << b] # left shift puts form ...
{"is_valid":true,"category":{"Ruby":true}}
single
She organized her bookshelves by genre and then alphabetically within each section. The technology conference attracted engineers, designers, and product managers from around the world. Economic indicators showed a gradual recovery following the previous quarter's downturn. Project managers stressed the importance of c...
{"is_valid":true,"category":{"Python":true}}
single
Refactor the function below: package main   import "fmt"   func lcs(a, b string) (output string) { lengths := make([]int, len(a)*len(b)) greatestLength := 0 for i, x := range a { for j, y := range b { if x == y { if i == 0 || j == 0 { lengths[i*len(b)+...
{"is_valid":true,"category":{"Go":true,"Terraform":true}}
multi
Translate this into another language for me: const starttxt = """   ATTENTION ALL WUMPUS LOVERS!!! THERE ARE NOW TWO ADDITIONS TO THE WUMPUS FAMILY OF PROGRAMS.   WUMP2: SOME DIFFERENT CAVE ARRANGEMENTS WUMP3: DIFFERENT HAZARDS   """   const helptxt = """ WELCOME TO 'HUNT THE WUMPUS' ...
{"is_valid":true,"category":{"Java":true}}
single
The conference featured keynote speakers from a wide variety of academic backgrounds. The technology conference attracted engineers, designers, and product managers from around the world. Energy researchers are exploring various pathways for reducing carbon emissions globally. Policy analysts examined the long-term imp...
{"is_valid":true,"category":{"Go":true,"C":true}}
multi
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Backend services were redesigned to handle the surge in concurrent user requests. He walked along the river path, listening to the rustling of leaves overhead. The engineer reviewed the blueprints carefully before approving the mod...
{"is_valid":true,"category":{"R":true,"Rust":true,"Lua":true}}
multi
I copied this from the docs: #include <ctime> #include <iostream> using namespace std;   int identity(int x) { return x; } int sum(int num) { for (int i = 0; i < 1000000; i++) num += i; return num; }   double time_it(int (*action)(int), int arg) { clock_t start_time = clock(); action(arg); cloc
{"is_valid":true,"category":{"C++":true}}
single
She enjoyed reading historical novels that transported her to far away places. Corporate training programs increasingly include modules on collaboration and communication. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The conference featured keynote speakers from a wide v...
{"is_valid":true,"category":{"Ruby":true}}
single
Historians continue to debate the significance of the treaty signed in that pivotal year. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Nutritionists generally recommend a balanced di...
{"is_valid":true,"category":{"Perl":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. Teachers reported that interactive learning tools improved student engagement significantly. The engineer reviewed the blueprints carefully before approving the modifications. She placed the manuscript carefully on the desk and b...
{"is_valid":true,"category":{"Swift":true,"Makefile":true}}
multi
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Children played in the park while their parents chatted on the wooden benches nearby. Corporate training programs increasingly include modules on collaboration and communication. Software architects often debate the merits of ...
{"is_valid":true,"category":{"Rust":true}}
single
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Researchers gathered data from hundreds of households participating in the longitudinal study. The technology conference attracted enginee...
{"is_valid":true,"category":{"Terraform":true,"Bash":true}}
multi
Take a look at this: # vim: filetype=dockerfile ARG FLAVOR=${TARGETARCH} ARG ROCMVERSION=6.3.3 ARG JETPACK5VERSION=r35.4.1 ARG JETPACK6VERSION=r36.4.0 ARG CMAKEVERSION=3.31.2 # CUDA v11 requires gcc v10. v10.3 has regressions, so the rockylinux 8.5 AppStream has the latest compatible version FROM --platform=linux/a...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. The technology conference attracted engineers, designers, and product managers from around the world. Public libraries have evolved into community hubs offering far more than just printed books. The painting featured warm colors that...
{"is_valid":true,"category":{"Go":true}}
single
Quick question about this snippet: #!/usr/bin/awk -f # Moving average over the first column of a data file BEGIN { P = 5; }   { x = $1; i = NR % P; MA += (x - Z[i]) / P; Z[i] = x; print MA; }
{"is_valid":true,"category":{"AWK":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Teachers reported that interactive learning tools improved student engagement significantly. Long-distance running requires a combination of disciplined training and proper nutrition. Long-distance running requires a combination of dis...
{"is_valid":true,"category":{"C#":true}}
single
Add comments to make this clearer: // Returns a vector containing the number of ways each possible sum of face // values can occur. fn get_totals(dice: usize, faces: usize) -> Vec<f64> { let mut result = vec![1.0; faces + 1]; for d in 2..=dice { let mut tmp = vec![0.0; d * faces + 1]; for i in d...
{"is_valid":true,"category":{"Rust":true}}
single
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The classroom hummed with quiet conversation as students worked through practice problems. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Corporate training programs increasingly incl...
{"is_valid":false,"category":{}}
benign
Translate this into another language for me: multiplier <- function(n1,n2) { (function(m){n1*n2*m}) } x = 2.0 xi = 0.5 y = 4.0 yi = 0.25 z = x + y zi = 1.0 / ( x + y ) num = c(x,y,z) inv = c(xi,yi,zi)   multiplier(num,inv)(0.5)   Output [1] 0.5 0.5 0.5
{"is_valid":true,"category":{"R":true}}
single
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Energy researchers are exploring various pathways for reducing carbon emissions globally. Historians continue to debate the signific...
{"is_valid":true,"category":{"C++":true,"YAML":true}}
multi
Add comments to make this clearer: f <- function(x) x^3 -3*x^2 + 2*x   findroots <- function(f, begin, end, tol = 1e-20, step = 0.001) { se <- ifelse(sign(f(begin))==0, 1, sign(f(begin))) x <- begin while ( x <= end ) { v <- f(x) if ( abs(v) < tol ) { print(sprintf("root at %f", x)) } else
{"is_valid":true,"category":{"R":true}}
single
Engineering teams often adopt iterative methodologies to manage complex software projects. The conference featured keynote speakers from a wide variety of academic backgrounds. Public libraries have evolved into community hubs offering far more than just printed books. The classroom hummed with quiet conversation as st...
{"is_valid":true,"category":{"JavaScript":true}}
single
Project managers stressed the importance of clear documentation throughout the cycle. 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 engineer reviewed the blueprints carefully before approving the modifica...
{"is_valid":false,"category":{}}
benign
Can you optimize this implementation: resource "aws_s3_bucket" "droplets-s3" { bucket = "${var.env}-cf-droplets" acl = "private" force_destroy = "true" } resource "aws_s3_bucket" "buildpacks-s3" { bucket = "${var.env}-cf-buildpacks" acl = "private" force_destroy = "true" } resource "aws_s3_buc...
{"is_valid":true,"category":{"Terraform":true}}
single
Quick question about this snippet: BEGIN { DEBUG = 0 n = 2^64 nn = sprintf("%.0f", n) printf "2^64 * 2^64 = %.0f\n", multiply(nn, nn) printf "2^64 * 2^64 = %.0f\n", n*n exit }   function multiply(x, y, len_x,len_y,ax,ay,j,m,c,i,k,d,v,res,mul,result) { len_x = split_reverse(x, ax) len...
{"is_valid":true,"category":{"AWK":true}}
single
Add comments to make this clearer: // Merge Sort in Swift 4.2 // Source: https://github.com/raywenderlich/swift-algorithm-club/tree/master/Merge%20Sort // NOTE: by use of generics you can make it sort arrays of any type that conforms to // Comparable protocol, however this is not always optimal   import Foundatio...
{"is_valid":true,"category":{"Swift":true}}
single
The garden looked particularly vibrant after the recent rain. Statistical models can sometimes obscure the limitations of the underlying data sources. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Economic indicators showed a gradual recovery following the previous ...
{"is_valid":true,"category":{"jq":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. He sat by the window with a steaming mug of tea and watched the snow gently falling. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Local potters fired their kilns once a month, producing c...
{"is_valid":true,"category":{"Ruby":true}}
single
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Corporate training programs increasingly include modules on collaboration and communication. The garden looked particularly vibrant after the recent rain. The engineer reviewed the blueprints carefully before approving the modificatio...
{"is_valid":false,"category":{}}
benign
Here is the code I was given: from functools import reduce from operator import mul from decimal import *   getcontext().prec = MAX_PREC   def expand(num): suffixes = [ # (name, min_abbreviation_length, base, exponent) ('greatgross', 7, 12, 3), ('gross', 2, 12, 2), ('dozens', 3, ...
{"is_valid":true,"category":{"Python":true}}
single
Children played in the park while their parents chatted on the wooden benches nearby. Project managers stressed the importance of clear documentation throughout the cycle. Researchers gathered data from hundreds of households participating in the longitudinal study. Translate this into another language for me: module "...
{"is_valid":true,"category":{"Terraform":true}}
single
Translate this into another language for me: --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: minio-config-claim labels: app: minio spec: accessModes: - ReadWriteOnce volumeName: "minio-config-volume" resources: requests: storage: 1Gi Plus, for comparison, the equivalent here:...
{"is_valid":true,"category":{"YAML":true,"Terraform":true,"Go":true}}
multi
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Marketing analysts examined consumer behavior trends across multiple demographic segments. Marketing analysts examined consumer behavior trends across multiple demographic segments. Travelers explored ancient ruins, marveling a...
{"is_valid":true,"category":{"Ruby":true,"Batch":true}}
multi
Translate this into another language for me: def bitwise(a: Int, b: Int) { println("a and b: " + (a & b)) println("a or b: " + (a | b)) println("a xor b: " + (a ^ b)) println("not a: " + (~a)) println("a << b: " + (a << b)) // left shift println("a >> b: " + (a >> b)) // arithmetic right shift println("a ...
{"is_valid":true,"category":{"Scala":true,"PowerShell":true}}
multi
He gathered his notes, packed his bag, and prepared for the long journey home. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Could you explain what this code does: # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTIC...
{"is_valid":true,"category":{"Dockerfile":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. The newly opened gallery showcased contemporary works by emerging regional artists. Hikers were advised to carry plenty of water and to inform someone of their planned route. She drafted a detailed agenda for the upcom...
{"is_valid":true,"category":{"Scala":true}}
single
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Researchers gathered data from hundreds of households participating in the longitudinal study. The technology conference attracted engine...
{"is_valid":true,"category":{"SQL":true}}
single
The committee scheduled a follow-up meeting to discuss the budget allocations. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Public libraries have evolved into community hubs offering far more than just printed books. Travelers explored ancient ruins, marveling at the craftsman...
{"is_valid":true,"category":{"Batch":true}}
single
The garden looked particularly vibrant after the recent rain. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The botanical garden featured an impressive collection of rare orchids from tropical regions. Quality assurance teams collaborate closely with developers to identify...
{"is_valid":false,"category":{}}
benign
Here is the code I was given: # Output: first $n Padovans def padovanRecur($n): [range(0;$n) | 1] as $p | if $n < 3 then $p else reduce range(3;$n) as $i ($p; .[$i] = .[$i-2] + .[$i-3]) end;   # Output: first $n Padovans def padovanFloor($n): { p: 1.324717957244746025960908854, s: 1.045356793252532962...
{"is_valid":true,"category":{"jq":true}}
single
The classroom hummed with quiet conversation as students worked through practice problems. Researchers gathered data from hundreds of households participating in the longitudinal study. Hikers were advised to carry plenty of water and to inform someone of their planned route. Long-distance running requires a combinatio...
{"is_valid":true,"category":{"Python":true}}
single
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Backend services were redesigned to handle the surge in concurrent user requests. Hikers were advised to carry plenty of water and to inform someone of their planned route. Hikers were advised to carry plenty of water and to inform some...
{"is_valid":true,"category":{"Scala":true}}
single
I copied this from the docs: package main   import ( "bytes" "fmt" )   // Strings in Go allow arbitrary bytes. They are implemented basically as // immutable byte slices and syntactic sugar. This program shows functions // required by the task on byte slices, thus it mostly highlights what // happens behind t...
{"is_valid":true,"category":{"Go":true}}
single
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Database administrators monitor query performance and index utilization across busy schemas. Researchers gathered data from hundreds of households participating in the longitudinal study. A gentle breeze drifted across the meadow as t...
{"is_valid":false,"category":{}}
benign
Public libraries have evolved into community hubs offering far more than just printed books. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Researchers gathered data from hundreds of households participating in the longitudinal study. The botanical garden featured an impres...
{"is_valid":false,"category":{}}
benign
Add comments to make this clearer: /* This file defines: - Required Terraform version - Required provider versions - Storage backend details - GCP project configuration */ terraform { required_version = ">= 0.12.8" backend "gcs" { bucket = "k8s-infra-dev-cluster-turnup-terraform-state" prefix = "k8s-servi...
{"is_valid":true,"category":{"Terraform":true}}
single
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Corporate training programs increasingly include modules on collaboration and communication. Database administrators monitor query perfor...
{"is_valid":true,"category":{"Swift":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. She enjoyed reading historical novels that transported her to far away places. Distributed systems demand careful attention to consistency, a...
{"is_valid":true,"category":{"C++":true,"Terraform":true}}
multi
Here is the code I was given: class Mastermind { constructor() { this.colorsCnt; this.rptColors; this.codeLen; this.guessCnt; this.guesses; this.code; this.selected; this.game_over; this.clear = (el) => { while (el.hasChildNodes()) { el.removeChild(el.firstChild); ...
{"is_valid":true,"category":{"JavaScript":true}}
single
Can you optimize this implementation: #include <stdio.h> #include <stdlib.h> #include <string.h>   char * string_repeat( int n, const char * s ) { size_t slen = strlen(s); char * dest = malloc(n*slen+1);   int i; char * p; for ( i=0, p = dest; i < n; ++i, p += slen ) { memcpy(p, s, slen); } *p = '\0';
{"is_valid":true,"category":{"C":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. She organized her bookshelves by genre and then alphabetically within each section. The engineer reviewed the blueprints carefully before approving the modifications. The classroom hummed with quiet conversation as students wor...
{"is_valid":true,"category":{"Python":true}}
single
Refactor the function below: import Foundation   typealias SodukuPuzzle = [[Int]]   class Soduku { let mBoardSize:Int! let mBoxSize:Int! var mBoard:SodukuPuzzle! var mRowSubset:[[Bool]]! var mColSubset:[[Bool]]! var mBoxSubset:[[Bool]]!   init(board:SodukuPuzzle) { mBoard = board ...
{"is_valid":true,"category":{"Swift":true,"Ruby":true,"Makefile":true}}
multi
Long-distance running requires a combination of disciplined training and proper nutrition. Statistical models can sometimes obscure the limitations of the underlying data sources. Hikers were advised to carry plenty of water and to inform someone of their planned route. Please review the following snippet for issues: #...
{"is_valid":true,"category":{"AWK":true,"Kotlin":true}}
multi
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Climate scientists continue to refine their models in light of newly available data. Climate scientists continue to refine their models in light of newly available data. The engineer reviewed the blueprints carefully before approvin...
{"is_valid":false,"category":{}}
benign
Researchers gathered data from hundreds of households participating in the longitudinal study. Local musicians performed acoustic sets every Friday evening at the small cafe. Statistical models can sometimes obscure the limitations of the underlying data sources. Local potters fired their kilns once a month, producing ...
{"is_valid":true,"category":{"YAML":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. Researchers gathered data from hundreds of households participating in the longitudinal study. Researchers gathered data from hundreds of households participating in the longitudinal study. Farmers depend on accurate weather forec...
{"is_valid":false,"category":{}}
benign
Network operators continually upgrade infrastructure to keep pace with growing demand. I copied this from the docs: function Remove-Character { [CmdletBinding(DefaultParameterSetName="Control and Extended")] [OutputType([string])] Param ( [Parameter(Mandatory=$true, ValueFromP...
{"is_valid":true,"category":{"PowerShell":true,"SQL":true}}
multi
Refactor the function below: use num::integer::gcd;   fn main() { // Compute the totient of the first 25 natural integers println!("N\t phi(n)\t Prime"); for n in 1..26 { let phi_n = phi(n); println!("{}\t {}\t {:?}", n, phi_n, phi_n == n - 1); }   // Compute the number of
{"is_valid":true,"category":{"Rust":true}}
single
What does this output: const logic = { rock: { w: 'scissor', l: 'paper'}, paper: {w:'rock', l:'scissor'}, scissor: {w:'paper', l:'rock'}, }   class Player { constructor(name){ this.name = name; } setChoice(choice){ this.choice = choice; } challengeOther(PlayerTwo){ ...
{"is_valid":true,"category":{"JavaScript":true,"Terraform":true}}
multi
I copied this from the docs: fn is_prime(n: u32) -> bool { if n < 2 { return false; } if n % 2 == 0 { return n == 2; } if n % 3 == 0 { return n == 3; } let mut p = 5; while p * p <= n { if n % p == 0 { return false; } p += 2; ...
{"is_valid":true,"category":{"Rust":true,"Lua":true}}
multi
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Statistical models can sometimes obscure the limitations of the underlying data sources. Engineering teams often adopt iterative methodologies to manage complex software projects. Economic indicators showed a gradual recovery f...
{"is_valid":true,"category":{"Python":true}}
single
The garden looked particularly vibrant after the recent rain. Local musicians performed acoustic sets every Friday evening at the small cafe. Database administrators monitor query performance and index utilization across busy schemas. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. L...
{"is_valid":true,"category":{"Ruby":true,"jq":true}}
multi
Quarterly reports indicated a steady rise in operational efficiency across divisions. Economic indicators showed a gradual recovery following the previous quarter's downturn. The newly opened gallery showcased contemporary works by emerging regional artists. The library hosted a weekly book club focused on classic and ...
{"is_valid":true,"category":{"JavaScript":true}}
single
Local potters fired their kilns once a month, producing colorful ceramics for the shops. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Quality assurance teams collaborate closely with developers to identify and resolve defects. The morning light filtered through the kitche...
{"is_valid":true,"category":{"Perl":true}}
single
Climate scientists continue to refine their models in light of newly available data. I need help debugging this script: var container = {myString: "Hello"}; var containerCopy = container; // Now both identifiers refer to the same object   containerCopy.myString = "Goodbye"; // container.myString will also return "Goodb...
{"is_valid":true,"category":{"JavaScript":true,"C":true}}
multi
Refactor the function below: import java.util.ArrayList;   import com.google.common.base.Joiner; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists;   public class FindMissingPermutation { public static void main(String[] args) { Joiner joiner = Joiner.on("").skipNulls(); Immutab...
{"is_valid":true,"category":{"Java":true}}
single
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Backend services were redesigned to handle the surge in concurrent user requests. Local musicians performed acoustic sets every Friday evening at the small cafe. Backend services were redesigned to handle the surge in concurre...
{"is_valid":true,"category":{"Go":true,"R":true}}
multi
The botanical garden featured an impressive collection of rare orchids from tropical regions. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Farmers depend on accurate weather forec...
{"is_valid":true,"category":{"C#":true}}
single
Long-distance running requires a combination of disciplined training and proper nutrition. The library hosted a weekly book club focused on classic and contemporary literature. Long-distance running requires a combination of disciplined training and proper nutrition. Historians continue to debate the significance of th...
{"is_valid":true,"category":{"AWK":true,"YAML":true}}
multi
I copied this from the docs: func maxSubseq(sequence: [Int]) -> (Int, Int, Int) { var maxSum = 0, thisSum = 0, i = 0 var start = 0, end = -1 for (j, seq) in sequence.enumerated() { thisSum += seq if thisSum < 0 { i = j + 1 thisSum = 0 } else if (thi
{"is_valid":true,"category":{"Swift":true}}
single
The library hosted a weekly book club focused on classic and contemporary literature. Researchers have been studying migration patterns of monarch butterflies for years. What does this output: CREATE TABLE pilot (Name VARCHAR); SELECT Name FROM pilot ORDER BY Name Marketing analysts examined consumer behavior trends ac...
{"is_valid":true,"category":{"SQL":true}}
single
Translate this into another language for me: # # 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, ...
{"is_valid":true,"category":{"Dockerfile":true,"JavaScript":true}}
multi
Run the following: #include <iterator> #include <utility> #include <algorithm> #include <list> #include <iostream>   // helper struct template<typename T> struct referring { referring(T const& t): value(t) {} template<typename Iter> bool operator()(std::pair<Iter, int> const& p) const { return *p.first == ...
{"is_valid":true,"category":{"C++":true}}
single
Corporate training programs increasingly include modules on collaboration and communication. Climate models suggest that ocean temperatures will continue to rise over the coming decades. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Could you explain what this code does: d...
{"is_valid":true,"category":{"jq":true}}
single
Teachers reported that interactive learning tools improved student engagement significantly. She organized her bookshelves by genre and then alphabetically within each section. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Project managers stressed the importance of clear docum...
{"is_valid":true,"category":{"Lua":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. Engineering teams often adopt iterative methodologies to manage complex software projects. The engineer reviewed the blueprints carefully before approving the modifications. He adjusted the telescope and waited patiently for the ...
{"is_valid":true,"category":{"jq":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. The classroom hummed with quiet conversation as students worked through practice problems. Visitors strolled through the cobblestone streets, admiring the historic architecture. She enjoyed reading historical novels that transpor...
{"is_valid":true,"category":{"Makefile":true}}
single
Can you optimize this implementation: using System; using System.Collections.Generic; using System.Linq;   class ReturnMultipleValues { static void Main() { var values = new[] { 4, 51, 1, -3, 3, 6, 8, 26, 2, 4 }; int max, min; MinMaxNum(values, out max, out min);   Console.Writ
{"is_valid":true,"category":{"C#":true}}
single
Quality assurance teams collaborate closely with developers to identify and resolve defects. Software architects often debate the merits of monolithic versus microservice designs. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. A gentle breeze drifted across the meadow as th...
{"is_valid":true,"category":{"JavaScript":true}}
single
Historians continue to debate the significance of the treaty signed in that pivotal year. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The community center offered free wo...
{"is_valid":false,"category":{}}
benign
Take a look at this: import java.net.{URLDecoder, URLEncoder} import scala.compat.Platform.currentTime   object UrlCoded extends App { val original = """http://foo bar/""" val encoded: String = URLEncoder.encode(original, "UTF-8")   assert(encoded == "http%3A%2F%2Ffoo+bar%2F", s"Original: $orig
{"is_valid":true,"category":{"Scala":true}}
single
Take a look at this: import Foundation   // extend any Indexed collection to be able to shuffle (see http://stackoverflow.com/questions/24026510/how-do-i-shuffle-an-array-in-swift) extension CollectionType where Index == Int { /// Return a copy of `self` with its elements shuffled func shuffle() -> [Generator.E...
{"is_valid":true,"category":{"Swift":true}}
single
The classroom hummed with quiet conversation as students worked through practice problems. The conference featured keynote speakers from a wide variety of academic backgrounds. Network operators continually upgrade infrastructure to keep pace with growing demand. She drafted a detailed agenda for the upcoming retreat a...
{"is_valid":true,"category":{"Makefile":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. She organized her bookshelves by genre and then alphabetically within each section. The technology conference attracted engineers, des...
{"is_valid":true,"category":{"Rust":true}}
single
Please review the following snippet for issues: (() => { 'use strict';   const main = () => bagPatterns(5) .join('\n');   // BAG PATTERNS ---------------------------------------   // bagPatterns :: Int -> [String] const bagPatterns = n => nub(map( composeList([ ...
{"is_valid":true,"category":{"JavaScript":true}}
single
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Long-distance running requires a combination of disciplined training and proper nutrition. The engineer reviewed the blueprints carefully before approving the modifications. She drafted a detailed agenda for the upcoming...
{"is_valid":true,"category":{"Lua":true,"jq":true}}
multi
Translate this into another language for me: xor() { typeset -i a=$1 b=$2 printf '%d\n' $(( (a || b) && ! (a && b) )) }   half_adder() { typeset -i a=$1 b=$2 printf '%d %d\n' $(xor $a $b) $(( a && b )) }   full_adder() { typeset -i a=$1 b=$2 c=$3 typeset -i ha0_s ha0_c ha1_s ha1_c read ha0_s ha0_c < <(h...
{"is_valid":true,"category":{"Bash":true}}
single
Please review the following snippet for issues: # Copyright 2021 The Kubernetes Authors All rights reserved. # # 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/lice...
{"is_valid":true,"category":{"YAML":true}}
single
Researchers gathered data from hundreds of households participating in the longitudinal study. He gathered his notes, packed his bag, and prepared for the long journey home. Historians continue to debate the significance of the treaty signed in that pivotal year. Engineering teams often adopt iterative methodologies to...
{"is_valid":true,"category":{"JavaScript":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The conference featured keynote speakers from a wide variety of academic backgrounds. Hikers were advised to carry plenty of water and to inform someone of their planned route. Historians continue to debate the significance of ...
{"is_valid":true,"category":{"Ruby":true,"R":true,"Makefile":true}}
multi
Energy researchers are exploring various pathways for reducing carbon emissions globally. She enjoyed reading historical novels that transported her to far away places. Run the following: public class App { private static final int WIDTH = 81; private static final int HEIGHT = 5;   private static char[][] l...
{"is_valid":true,"category":{"Java":true}}
single
Researchers gathered data from hundreds of households participating in the longitudinal study. Climate scientists continue to refine their models in light of newly available data. Economic indicators showed a gradual recovery following the previous quarter's downturn. The morning light filtered through the kitchen wind...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Add comments to make this clearer: function temp($k){ try{ $c = $k - 273.15 $r = $k / 5 * 9 $f = $r - 459.67 } catch { Write-host "Input error." return }   Write-host "" Write-host " TEMP (Kelvin)  : " $k Write-host " TEMP (Celsius)  : " $c Wr...
{"is_valid":true,"category":{"PowerShell":true}}
single
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.
{"is_valid":false,"category":{}}
benign
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Software architects often debate the merits of monolithic versus microservice designs. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The conference featured keynote speaker...
{"is_valid":true,"category":{"Ruby":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Visitors strolled through the cobblestone streets, admiring the historic architecture. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The botanical garden featured an impressive collection of rare orchids...
{"is_valid":true,"category":{"Rust":true}}
single
Translate this into another language for me: CREATE TABLE Rooms (roomName VARCHAR, bedType VARCHAR, decor VARCHAR); SELECT roomName, bedType FROM Rooms WHERE decor = "traditional"
{"is_valid":true,"category":{"SQL":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. Project managers stressed the importance of clear documentation throughout the cycle. Researchers gathered data from hundreds of households participating in the longitudinal study. Backend services were redesigned to handle the sur...
{"is_valid":true,"category":{"AWK":true}}
single