prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
Refactor the function below: CREATE TABLE film (title VARCHAR, replacement_cost INTEGER, LENGTH VARCHAR, rating VARCHAR); SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
{"is_valid":true,"category":{"SQL":true}}
single
Long-distance running requires a combination of disciplined training and proper nutrition. Run the following: use strict; use warnings;   use PDL; use PDL::LinearAlgebra qw(mqr);   my $a = pdl( [12, -51, 4], [ 6, 167, -68], [-4, 24, -41], [-1, 1, 0], [ 2, 0, 3] );   my ($q, $r) ...
{"is_valid":true,"category":{"Perl":true}}
single
The newly opened gallery showcased contemporary works by emerging regional artists. Climate scientists continue to refine their models in light of newly available data. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Long-distance running requires a combination of discipline...
{"is_valid":true,"category":{"R":true}}
single
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Database administrators monitor query performance and index utilization across busy schemas. Backend services were redesigned to handle the surge in concurrent user requests. Quick question about this snippet: CREATE TABLE campuses (cam...
{"is_valid":true,"category":{"SQL":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Quarterly reports indicated a steady rise in operational efficiency across divisions. He wandered through the old bookstore, occasionally p...
{"is_valid":true,"category":{"Bash":true}}
single
Visitors strolled through the cobblestone streets, admiring the historic architecture. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Visitors strolled through the cobblestone streets, admiring ...
{"is_valid":true,"category":{"Batch":true,"Terraform":true}}
multi
Public libraries have evolved into community hubs offering far more than just printed books. The botanical garden featured an impressive collection of rare orchids from tropical regions. Add comments to make this clearer: use feature 'say'; use ntheory qw/forsetproduct/;   # Deconvolution of N dimensional matrices sub ...
{"is_valid":true,"category":{"Perl":true,"Lua":true}}
multi
He sat by the window with a steaming mug of tea and watched the snow gently falling. What does this output: PLATCFLAGS = -mt -Kpic MORE_LDLIBS = -lmtmalloc -lnsl -lsocket -L/usr/sfw/lib -R/usr/sfw/lib CPREFLAGS = -I../include -I/usr/sfw/include SHEXT = so SHLIBNAME=libccn.$(SHEXT).1 SHLIBDEPS= SHARED_LD_FLAGS = -G -z a...
{"is_valid":true,"category":{"Makefile":true}}
single
Climate scientists continue to refine their models in light of newly available data. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The community center offered free workshops on p...
{"is_valid":false,"category":{}}
benign
Here is the code I was given: #include <iostream> #include <string> #include <windows.h> #include <mmsystem.h>   #pragma comment ( lib, "winmm.lib" ) using namespace std;   class recorder { public: void start() { paused = rec = false; action = "IDLE"; while( true ) { cout << endl << "==" << action << "=...
{"is_valid":true,"category":{"C++":true}}
single
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Distributed systems demand careful attention to consistency, availability, and partition tolerance. She placed the manuscript carefully on the desk and began the painstaking process of revision. Distributed systems demand care...
{"is_valid":true,"category":{"Python":true,"PowerShell":true}}
multi
Production teams refined their processes to minimize waste and improve overall yield. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Historians continue to debate the significance ...
{"is_valid":true,"category":{"Makefile":true}}
single
The painting featured warm colors that evoked memories of childhood summers by the sea. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Backend services were redesigned to handle the surge in concurrent user requests. The bakery on the corner was famous for its sourdough loa...
{"is_valid":true,"category":{"C++":true}}
single
What does this output: shopt -s expand_aliases alias bind_variables=' { local -ri goal_count=21 local -ri player_human=0 local -ri player_computer=1 local -i turn=1 local -i total_count=0 local -i input_number=0 local -i choose_turn=0 } ' whose_turn() { case $(( ( turn + choose_turn ) % 2 )) in ${pla...
{"is_valid":true,"category":{"Bash":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. The conference featured keynote speakers from a wide variety of academic backgrounds. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Energy researchers are exploring various pathways f...
{"is_valid":true,"category":{"Python":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The garden looked particularly vibrant after the recent rain. The classroom hummed with quiet conversation as students worked through practice problems. Travelers explored ancient ruins, marveling at the craftsmanship of long-l...
{"is_valid":true,"category":{"JavaScript":true}}
single
Database administrators monitor query performance and index utilization across busy schemas. 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 someone of their planned route. Modern microprocessors rely on pipelining and...
{"is_valid":true,"category":{"Kotlin":true}}
single
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. Policy analysts examined the long-term implications of the proposed legislative reform. Find any security problems in: echo -n "The qu...
{"is_valid":true,"category":{"Bash":true}}
single
Add comments to make this clearer: import java.util.Locale;   public class GaussianElimination { public static double solve(double[][] a, double[][] b) { if (a == null || b == null || a.length == 0 || b.length == 0) { throw new IllegalArgumentException("Invalid dimensions"); }   ...
{"is_valid":true,"category":{"Java":true}}
single
I copied this from the docs: package linenbr7;   import java.io.*;   public class LineNbr7 {   public static void main(String[] args) throws Exception { File f = new File(args[0]); if (!f.isFile() || !f.canRead()) throw new IOException("can't read " + args[0]);   BufferedReader b...
{"is_valid":true,"category":{"Java":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Hikers were advised to carry plenty of water and to inform someone of their planned route. Economic indicators showed a gradual r...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Please review the following snippet for issues: #include <stdio.h>   void insertion_sort(int*, const size_t);   void insertion_sort(int *a, const size_t n) { for(size_t i = 1; i < n; ++i) { int key = a[i]; size_t j = i; while( (j > 0) && (key < a[j - 1]) ) { a[j] = a[j - 1]; --j; } a[j] = key; } }   ...
{"is_valid":true,"category":{"C":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Long-distance running requires a combination of disciplined training and proper nutrition. Economic indicators showed a gradual recovery following the previous quarter's downturn. Run the following: public class Feigenbaum { ...
{"is_valid":true,"category":{"Java":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. 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. The neighborhood gathered every Saturday morning ...
{"is_valid":true,"category":{"Python":true,"Go":true,"C#":true}}
multi
Database administrators monitor query performance and index utilization across busy schemas. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Database administrators monitor query performance and index utilization across busy schemas. Quality assurance teams collaborate closely wi...
{"is_valid":false,"category":{}}
benign
She enjoyed reading historical novels that transported her to far away places. The painting featured warm colors that evoked memories of childhood summers by the sea. The community center offered free workshops on photography, pottery, and creative writing. I copied this from the docs: local function wrapEachItem(items...
{"is_valid":true,"category":{"Lua":true,"Python":true}}
multi
Add comments to make this clearer: #include <stdio.h> #include <stdlib.h> #include <string.h>   typedef struct object *BaseObj; typedef struct sclass *Class; typedef void (*CloneFctn)(BaseObj s, BaseObj clo); typedef const char * (*SpeakFctn)(BaseObj s); typedef void (*DestroyFctn)(BaseObj s);   typedef struct sclass {...
{"is_valid":true,"category":{"C":true,"Makefile":true,"YAML":true}}
multi
Quick question about this snippet: package main   import "fmt"   func isCusip(s string) bool { if len(s) != 9 { return false } sum := 0 for i := 0; i < 8; i++ { c := s[i] var v int switch { case c >= '0' && c <= '9': v = int(c) - 48 case c
{"is_valid":true,"category":{"Go":true}}
single
I copied this from the docs: import scala.io.Source   object parseCSV extends App {   val rawData = """|C1,C2,C3,C4,C5 |1,5,9,13,17 |2,6,10,14,18 |3,7,11,15,19 |20,21,22,23,24""".stripMargin   val data = Seq((Source.fromString(rawData).getLines()).map(_.split(",")).toS
{"is_valid":true,"category":{"Scala":true}}
single
Refactor the function below: #!perl use strict; use warnings;   # This code uses "Even's Speedup," as described on # the Wikipedia page about the Steinhaus–Johnson– # Trotter algorithm.   # Any resemblance between this code and the Python # code elsewhere on the page is purely a coincidence, # caused by them
{"is_valid":true,"category":{"Perl":true}}
single
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. What does this output: while(True): x = input("What is your age? ") print(x) He walked along the river path, listening to th...
{"is_valid":true,"category":{"Python":true}}
single
The engineer reviewed the blueprints carefully before approving the modifications. Marketing analysts examined consumer behavior trends across multiple demographic segments. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Economic indicators showed a gradual recovery following th...
{"is_valid":true,"category":{"C":true}}
single
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Add comments to make this clearer: function multiply(a, b) { return a*b; }
{"is_valid":true,"category":{"JavaScript":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. Researchers have been studying migration patterns of monarch butterflies for years. Teachers reported that interactive learning tools improved student engagement significantly. Database administrators monitor query performance and index utili...
{"is_valid":true,"category":{"jq":true,"C#":true}}
multi
He gathered his notes, packed his bag, and prepared for the long journey home. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Refactor the function below: -- Take decimal number, return binary string function dec2bin (n) local bin, bit = "" while n > 0 do bit = ...
{"is_valid":true,"category":{"Lua":true}}
single
Run the following: #!/usr/bin/awk -f BEGIN { FS="," print "<table>" }   { gsub(/</, "\\&lt;") gsub(/>/, "\\&gt;") gsub(/&/, "\\&gt;") print "\t<tr>" for(f = 1; f <= NF; f++) { if(NR == 1 && header) { printf "\t\t<th>...
{"is_valid":true,"category":{"AWK":true}}
single
Refactor the function below: import time   seconds = float(raw_input()) print "Sleeping..." time.sleep(seconds) # number is in seconds ... but accepts fractions print "Awake!"
{"is_valid":true,"category":{"Python":true}}
single
Please review the following snippet for issues: %=== 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...
{"is_valid":true,"category":{"Batch":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Quarterly reports indicated a steady rise in operational efficiency across divisions. Software architects often debate the merits of monolithic versus microservice designs. Quick question about this snippet: @echo off   :_main ...
{"is_valid":true,"category":{"Batch":true}}
single
Take a look at this: #include <chrono> #include <iostream> #include <format> #include <semaphore> #include <thread>   using namespace std::literals;   void Worker(std::counting_semaphore<>& semaphore, int id) { semaphore.acquire(); std::cout << std::format("Thread {} has a semaphore & is now working.\n", id); ...
{"is_valid":true,"category":{"C++":true,"Ruby":true,"Scala":true}}
multi
The conference featured keynote speakers from a wide variety of academic backgrounds. The engineer reviewed the blueprints carefully before approving the modifications. Add comments to make this clearer: // version 1.1.2   fun subleq(program: String) { val words = program.split(' ').map { it.toInt() }.toTypedArray(...
{"is_valid":true,"category":{"Kotlin":true,"YAML":true}}
multi
Can you optimize this implementation: caesar_cipher() {   # michaeltd 2019-11-30 # https://en.wikipedia.org/wiki/Caesar_cipher # E n ( x ) = ( x + n ) mod 26. # D n ( x ) = ( x − n ) mod 26.   local -a _ABC=( "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "...
{"is_valid":true,"category":{"Bash":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. She enjoyed reading historical novels that transported her to far away places. Hikers were advised to carry plenty of water and to inform someone of their planned route. He wandered through the old bookstore, occasionally pulling...
{"is_valid":true,"category":{"AWK":true,"Swift":true}}
multi
Quarterly reports indicated a steady rise in operational efficiency across divisions. Production teams refined their processes to minimize waste and improve overall yield. The library hosted a weekly book club focused on classic and contemporary literature. Energy researchers are exploring various pathways for reducing...
{"is_valid":true,"category":{"Makefile":true,"Perl":true}}
multi
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. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Marketing analysts examined consumer behavior trends a...
{"is_valid":false,"category":{}}
benign
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 morning light filtered through the kitchen window as the coffee brewed. Climate scientists continue to refine their models in light of ne...
{"is_valid":true,"category":{"SQL":true}}
single
Can you optimize this implementation: #include <stdio.h> #include <stdlib.h> #include <stdbool.h>   #include <sys/queue.h>   /* #include "fifolist.h" */   int main() { int i; FIFOList head;   TAILQ_INIT(&head);   /* insert 20 integer values */ for(i=0; i < 20; i++) { m_enqueue(i, &head); }   /* dequ
{"is_valid":true,"category":{"C":true}}
single
Production teams refined their processes to minimize waste and improve overall yield. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. He sat by the window with a steaming mug of tea and watched the snow gently falling. The newly opened gallery showcased contemporary works by...
{"is_valid":true,"category":{"Kotlin":true,"Bash":true}}
multi
He gathered his notes, packed his bag, and prepared for the long journey home. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The painting featured warm colors that evoked memories of childhood summers by the sea. The morning light filtered through the kitchen window as the co...
{"is_valid":true,"category":{"Scala":true}}
single
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Can you optimize this implementation: year = commandArgs(T) d = as.Date(paste0(year, "-01-01")) fridays = d + seq(by = 7, (5 - as.POSIXlt(d)$wday) %% 7, 364 + (months(d + 30 + 29) == "February")) message(paste(collapse ...
{"is_valid":true,"category":{"R":true,"Dockerfile":true}}
multi
Project managers stressed the importance of clear documentation throughout the cycle. She enjoyed reading historical novels that transported her to far away places. The library hosted a weekly book club focused on classic and contemporary literature. He wandered through the old bookstore, occasionally pulling a worn pa...
{"is_valid":true,"category":{"SQL":true,"AWK":true}}
multi
Hikers were advised to carry plenty of water and to inform someone of their planned route. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Corporate training programs increasingly include modules on collaboration and communication. Local musicians performed acoustic sets every ...
{"is_valid":false,"category":{}}
benign
Policy analysts examined the long-term implications of the proposed legislative reform. Hikers were advised to carry plenty of water and to inform someone of their planned route. Policy analysts examined the long-term implications of the proposed legislative reform. Researchers have been studying migration patterns of ...
{"is_valid":true,"category":{"C++":true}}
single
Please review the following snippet for issues: // 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]) { wh...
{"is_valid":true,"category":{"Kotlin":true}}
single
Teachers reported that interactive learning tools improved student engagement significantly. Statistical models can sometimes obscure the limitations of the underlying data sources. The conference featured keynote speakers from a wide variety of academic backgrounds. Climate scientists continue to refine their models i...
{"is_valid":true,"category":{"Scala":true,"JavaScript":true}}
multi
Could you explain what this code does: ############################################################################### # 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 copyr...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Can you optimize this implementation: fun jacobi(A: Int, N: Int): Int { assert(N > 0 && N and 1 == 1) var a = A % N var n = N var result = 1 while (a != 0) { var aMod4 = a and 3 while (aMod4 == 0) { // remove factors of four a = a shr 2 aMod4 = a and 3 ...
{"is_valid":true,"category":{"Kotlin":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. Network operators continually upgrade infrastructure to keep pace with growing demand. Project managers stressed the importance of clear documentation throughout the cycle. He gathered his notes, packed his bag, and prepared for ...
{"is_valid":true,"category":{"Scala":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Late spring rains caused the lake to swell beyo...
{"is_valid":true,"category":{"Rust":true}}
single
The morning light filtered through the kitchen window as the coffee brewed. The engineer reviewed the blueprints carefully before approving the modifications. Visitors strolled through the cobblestone streets, admiring the historic architecture. The engineer reviewed the blueprints carefully before approving the modifi...
{"is_valid":true,"category":{"Swift":true}}
single
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Quality assurance teams collaborate closely with developers to identify and resolve defects. The neighborhood gathered every Saturday morning at the small farmers' market downtown. The morning light filtered through the kitche...
{"is_valid":true,"category":{"Terraform":true,"AWK":true}}
multi
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Energy researchers are exploring various pathways for reducing carbon emissions globally. Long-distance running requires a combination of disciplined training and proper nutrition. Historians continue to debate the significance of the...
{"is_valid":true,"category":{"Ruby":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. Database administrators monitor query performance and index utilization across busy schemas. Researchers gathered data from hundreds of households partici...
{"is_valid":true,"category":{"AWK":true}}
single
Add comments to make this clearer: apiVersion: v1 kind: Pod metadata: name: readiness-pod labels: test: readiness namespace: default spec: containers: - name: readiness env: - name: APP_START_DELAY value: "60" image: kodekloud/webapp-delayed-start resources: {} ...
{"is_valid":true,"category":{"YAML":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Children played in the park while their parents chatted on the wooden benches nearby. Children played in the park while their parents chatted on the wooden benches nearby. Climate models suggest that ocean temperatures will continue ...
{"is_valid":true,"category":{"Dockerfile":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Could you explain what this code does: #Get modification time: modtime = File.mtime('filename')   #Set the access and modification times: File.utime(actime, mtime, 'path')   #Set just the modification time: File.utime(File.atim...
{"is_valid":true,"category":{"Ruby":true}}
single
Here is the code I was given: # syntax: GAWK -f ABUNDANT_ODD_NUMBERS.AWK # converted from C BEGIN { print(" index number sum") fmt = "%8s %10d %10d\n" n = 1 for (c=0; c<25; n+=2) { if (n < sum_proper_divisors(n)) { printf(fmt,++c,n,sum) } } for (; c<1000; n+=2) {...
{"is_valid":true,"category":{"AWK":true}}
single
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Network operators continually upgrade infrastructure to keep pace with growing demand.
{"is_valid":false,"category":{}}
benign
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Production teams refined their processes to minimize waste and improve overall yield. Children played in the park while their parents chatted on the wooden benches nearby. Backend services were redesigned to handle the surge in concurre...
{"is_valid":false,"category":{}}
benign
Children played in the park while their parents chatted on the wooden benches nearby. 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. Energy researchers are exploring various pathway...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Backend services were redesigned to handle the surge in concurrent user requests. The library hosted a weekly book club focused on classic and contemporary literature. Hikers were advised to carry plenty of water and to inform ...
{"is_valid":true,"category":{"Bash":true}}
single
The morning light filtered through the kitchen window as the coffee brewed. Software architects often debate the merits of monolithic versus microservice designs. Take a look at this: package main   import "fmt"   func main() { var s string var i int if _, err := fmt.Scan(&s, &i); err == nil && i == 75000 {...
{"is_valid":true,"category":{"Go":true,"Makefile":true}}
multi
I need help debugging this script: package jfkbits;   import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.io.StreamTokenizer; import java.io.StringReader; import java.util.Iterator;   public class LispTokenizer implements Iterator<Token> { // Instance variables have default...
{"is_valid":true,"category":{"Java":true}}
single
Could you explain what this code does: package main   import ( "encoding/xml" "fmt" "io" "net/http" "net/url" )   const language = "Go"   var baseQuery = "http://rosettacode.org/mw/api.php?action=query" + "&format=xml&list=categorymembers&cmlimit=100"   func req(u string, foundCm func(string))
{"is_valid":true,"category":{"Go":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Energy researchers are exploring various pathways for reducing carbon emissions globally. Long-distance running requires a combination of disciplined training a...
{"is_valid":true,"category":{"jq":true,"AWK":true}}
multi
Add comments to make this clearer: class Person { let name:String var candidateIndex = 0 var fiance:Person? var candidates = [Person]()   init(name:String) { self.name = name }   func rank(p:Person) -> Int { for (i, candidate) in enumerate(self.candidates) { if ca...
{"is_valid":true,"category":{"Swift":true}}
single
She organized her bookshelves by genre and then alphabetically within each section. Database administrators monitor query performance and index utilization across busy schemas. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Researchers have been studying migration patterns of mo...
{"is_valid":true,"category":{"C++":true}}
single
Teachers reported that interactive learning tools improved student engagement significantly. The morning light filtered through the kitchen window as the coffee brewed. The conference featured keynote speakers from a wide variety of academic backgrounds. Public libraries have evolved into community hubs offering far mo...
{"is_valid":false,"category":{}}
benign
Teachers reported that interactive learning tools improved student engagement significantly. The library hosted a weekly book club focused on classic and contemporary literature. Historians continue to debate the significance of the treaty signed in that pivotal year. Engineering teams often adopt iterative methodologi...
{"is_valid":true,"category":{"Ruby":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. Can you optimize this implementation: enum Color { case R, B } enum Tree<A> { case E indirect case T(Color, Tree<A>, A, Tree<A>) }   func balance<A>(input: (Color, Tree<A>, A, Tree<A>)) -> Tree<A> { switch input { case le...
{"is_valid":true,"category":{"Swift":true}}
single
The committee scheduled a follow-up meeting to discuss the budget allocations. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Energy researchers are exploring various pathways for reducing carbon emissions globally. Volunteers spent the weekend cleaning up the riverside tra...
{"is_valid":true,"category":{"Rust":true}}
single
Please review the following snippet for issues: #include <vector> #include <string> #include <iostream> #include <boost/tuple/tuple.hpp> #include <set>   int findBestPack( const std::vector<boost::tuple<std::string , int , int> > & , std::set<int> & , const int ) ;   int main( ) { std::vector<boost::tuple<st...
{"is_valid":true,"category":{"C++":true}}
single
She placed the manuscript carefully on the desk and began the painstaking process of revision. The newly opened gallery showcased contemporary works by emerging regional artists. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Public libraries have evolved into community hu...
{"is_valid":true,"category":{"Ruby":true}}
single
What does this output: #include <stdio.h> #include <stdlib.h>   void bead_sort(int *a, int len) { int i, j, max, sum; unsigned char *beads; # define BEAD(i, j) beads[i * max + j]   for (i = 1, max = a[0]; i < len; i++) if (a[i] > max) max = a[i];   beads = calloc(1, max * len);   /* mark the beads */ for (i = 0...
{"is_valid":true,"category":{"C":true}}
single
Here is the code I was given: pbenford <- function(d){ return(log10(1+(1/d))) }   get_lead_digit <- function(number){ return(as.numeric(substr(number,1,1))) }   fib_iter <- function(n){ first <- 1 second <- 0 for(i in 1:n){ sum <- first + second first <- second second <- sum } return(sum) }   ...
{"is_valid":true,"category":{"R":true}}
single
Corporate training programs increasingly include modules on collaboration and communication. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Take a look at this: use strict; use warnings; # Select one of these lines. Math::BigInt is in core, but quite slow. use Math::BigInt...
{"is_valid":true,"category":{"Perl":true}}
single
Local potters fired their kilns once a month, producing colorful ceramics for the shops. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Statistical models can sometimes obscure the limitation...
{"is_valid":true,"category":{"Dockerfile":true}}
single
I copied this from the docs: -- Data declarations local extentions = {"zip", "rar", "7z", "gz", "archive", "A##", "tar.bz2"} local testCases = { "MyData.a##", "MyData.tar.Gz", "MyData.gzip", "MyData.7z.backup", "MyData...", "MyData", "MyData_v1.0.tar.bz2", "MyData_v1.0.bz2" }   -- Return boolean of whet...
{"is_valid":true,"category":{"Lua":true}}
single
The committee scheduled a follow-up meeting to discuss the budget allocations. The morning light filtered through the kitchen window as the coffee brewed. The garden looked particularly vibrant after the recent rain. Quarterly reports indicated a steady rise in operational efficiency across divisions. The neighborhood ...
{"is_valid":true,"category":{"Ruby":true,"Lua":true}}
multi
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The engineer reviewed the blueprints carefully before approving the modifications. Quarterly reports indicated a steady rise in operational effici...
{"is_valid":true,"category":{"C#":true}}
single
Add comments to make this clearer: CREATE TABLE player (HS INTEGER, pID VARCHAR); CREATE TABLE tryout (pID VARCHAR, decision VARCHAR); SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'
{"is_valid":true,"category":{"SQL":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. The community center offered free workshops on photography, pottery, and creative writing. Hikers were advised to carry plenty of water and to inform someone of their planned route. Software architects often debate the merits of ...
{"is_valid":true,"category":{"R":true}}
single
Policy analysts examined the long-term implications of the proposed legislative reform. Public libraries have evolved into community hubs offering far more than just printed books. Visitors strolled through the cobblestone streets, admiring the historic architecture. Statistical models can sometimes obscure the limitat...
{"is_valid":false,"category":{}}
benign
Teachers reported that interactive learning tools improved student engagement significantly. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Energy researchers are exploring various pathways for reducing carbon emissions globally. Nutritionists generally recommend a balanced di...
{"is_valid":true,"category":{"YAML":true,"Perl":true}}
multi
Teachers reported that interactive learning tools improved student engagement significantly. Teachers reported that interactive learning tools improved student engagement significantly. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Quality assurance teams collaborate closely with deve...
{"is_valid":true,"category":{"Dockerfile":true}}
single
The library hosted a weekly book club focused on classic and contemporary literature. Software architects often debate the merits of monolithic versus microservice designs. The morning light filtered through the kitchen window as the coffee brewed. Long-distance running requires a combination of disciplined training an...
{"is_valid":true,"category":{"C#":true,"PowerShell":true,"R":true}}
multi
Refactor the function below: #include<stdio.h>   typedef struct{ int integer; float decimal; char letter; char string[100]; double bigDecimal; }Composite;   Composite example() { Composite C = {1, 2.3, 'a', "Hello World", 45.678}; return C; }     int main() { Composite C = example();   printf("Values from a fu...
{"is_valid":true,"category":{"C":true}}
single
Can you optimize this implementation: function DoublyLinkedList(value, next, prev) { this._value = value; this._next = next; this._prev = prev; } // from LinkedList, inherit: value(), next(), traverse(), print() DoublyLinkedList.prototype = new LinkedList();   DoublyLinkedList.prototype.prev = function() { ...
{"is_valid":true,"category":{"JavaScript":true,"C#":true}}
multi
Can you optimize this implementation: #-------------------------------------------------------------- # Route53 Hosted Zone #-------------------------------------------------------------- resource "aws_route53_zone" "hosted_zone" { name = "prod.internal" vpc_id = "${aws_vpc.database_setup.id}" tags { Name = "pr...
{"is_valid":true,"category":{"Terraform":true}}
single
Please review the following snippet for issues: # Copyright 2018 The Knative Authors # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
{"is_valid":true,"category":{"YAML":true}}
single