prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
Refactor the function below: use std::io::{self, Write}; use std::fs::{DirBuilder, File}; use std::path::Path; use std::{process,fmt};   const FILE_NAME: &'static str = "output.txt"; const DIR_NAME : &'static str = "docs";   fn main() { create(".").and(create("/")) .unwrap_or_else(|e| erro
{"is_valid":true,"category":{"Rust":true}}
single
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Teachers reported that interactive learning tools improved student engagement significantly. Climate scientists continue to refine their models in light of newly available data. The garden looked particularly vibrant after the ...
{"is_valid":false,"category":{}}
benign
I need help debugging this script: #include<stdlib.h> #include<string.h> #include<stdio.h>   char** components; int counter = 0;   typedef struct elem{ char data[10]; struct elem* left; struct elem* right; }node;   typedef node* tree;   int precedenceCheck(char oper1,char oper2){ return (oper1==oper2)? 0:(oper1=='^...
{"is_valid":true,"category":{"C":true}}
single
Find any security problems in: func openAuthenticationResponse(_password: String, operations: String) -> String? { var num1 = UInt32(0) var num2 = UInt32(0) var start = true let password = UInt32(_password)! for c in operations { if (c != "0") { if start { num2 = ...
{"is_valid":true,"category":{"Swift":true}}
single
The conference featured keynote speakers from a wide variety of academic backgrounds. She organized her bookshelves by genre and then alphabetically within each section. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Backend services were redesigned to handle the surge in ...
{"is_valid":false,"category":{}}
benign
Refactor the function below: let fib: Int -> Int = { func f(n: Int) -> Int { assert(n >= 0, "fib: no negative numbers") return n < 2 ? 1 : f(n-1) + f(n-2) } return f }()   print(fib(8))
{"is_valid":true,"category":{"Swift":true}}
single
Please review the following snippet for issues: @echo off   set "input=Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit am...
{"is_valid":true,"category":{"Batch":true}}
single
Public libraries have evolved into community hubs offering far more than just printed books. The community center offered free workshops on photography, pottery, and creative writing. I copied this from the docs: # # This is fake image used for testing STI. It tests scripts baked inside image. # FROM busybox RUN mkdir...
{"is_valid":true,"category":{"Dockerfile":true,"Makefile":true}}
multi
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Production teams refined their processes to minimize waste and improve overall yield. The botanical garden featured an impressive collectio...
{"is_valid":true,"category":{"Python":true}}
single
Children played in the park while their parents chatted on the wooden benches nearby. Policy analysts examined the long-term implications of the proposed legislative reform. She organized her bookshelves by genre and then alphabetically within each section. The botanical garden featured an impressive collection of rare...
{"is_valid":true,"category":{"Lua":true,"Swift":true}}
multi
Hikers were advised to carry plenty of water and to inform someone of their planned route. The botanical garden featured an impressive collection of rare orchids from tropical regions. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Climate models suggest that ocean temperatures...
{"is_valid":false,"category":{}}
benign
The botanical garden featured an impressive collection of rare orchids from tropical regions. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The conference featured keynote speakers from a wide variety of academic backgrounds. Quarterly reports indicated a steady rise in operat...
{"is_valid":true,"category":{"AWK":true}}
single
Take a look at this: class ListNode def insert_after(search_value, new_value) if search_value == value self.succ = self.class.new(new_value, succ) elsif self.succ.nil? raise StandardError, "value #{search_value} not found in list" else self.succ.insert_after(search_value, new_value) ...
{"is_valid":true,"category":{"Ruby":true,"AWK":true,"PowerShell":true}}
multi
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. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Hikers were advised to carry plenty of water and to inform some...
{"is_valid":true,"category":{"YAML":true,"Java":true}}
multi
Policy analysts examined the long-term implications of the proposed legislative reform. 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. Database administrators monitor query performance an...
{"is_valid":true,"category":{"Swift":true,"JavaScript":true}}
multi
What does this output: import java.awt.Color; import java.awt.Point; import java.awt.image.BufferedImage; import java.util.Deque; import java.util.LinkedList;   public class FloodFill { public void floodFill(BufferedImage image, Point node, Color targetColor, Color replacementColor) { int width =
{"is_valid":true,"category":{"Java":true}}
single
Policy analysts examined the long-term implications of the proposed legislative reform. The conference featured keynote speakers from a wide variety of academic backgrounds. Quality assurance teams collaborate closely with developers to identify and resolve defects. The garden looked particularly vibrant after the rece...
{"is_valid":true,"category":{"AWK":true}}
single
Run the following: # # Variables for plugging in various environment specific settings # variable "env" { type = "string" default = "dev" } variable "dnsprefix" { type = "string" default = "" } variable "region" { type = "string" default = "West US" } # # Variables which should be kept secr...
{"is_valid":true,"category":{"Terraform":true}}
single
Add comments to make this clearer: fn expand(cp: &str) -> String { let mut out = String::new(); for c in cp.chars() { out.push_str(match c { 'N' => "north", 'E' => "east", 'S' => "south", 'W' => "west", 'b' => " by ", _ => "-",
{"is_valid":true,"category":{"Rust":true}}
single
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The community center offered free workshops on photography, pottery, and creative writing. Quarterly reports indicated a steady rise in ope...
{"is_valid":true,"category":{"Terraform":true}}
single
Database administrators monitor query performance and index utilization across busy schemas. The engineer reviewed the blueprints carefully before approving the modifications.
{"is_valid":false,"category":{}}
benign
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The newly opened gallery showcased contemporary works by emerging regional artists. Quarterly reports indicated a steady rise i...
{"is_valid":true,"category":{"PowerShell":true,"Makefile":true}}
multi
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Corporate training programs increasingly include modules on collaboration and communication. Find any security problems in: function makeList (separator) local counter = 0 local function makeItem(item) counter = ...
{"is_valid":true,"category":{"Lua":true}}
single
Climate scientists continue to refine their models in light of newly available data. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Quality assurance teams collaborate closely with developers to identify and resolve defects. The classroom hummed with quiet conversation as students ...
{"is_valid":false,"category":{}}
benign
Local musicians performed acoustic sets every Friday evening at the small cafe. Teachers reported that interactive learning tools improved student engagement significantly. The garden looked particularly vibrant after the recent rain. Public libraries have evolved into community hubs offering far more than just printed...
{"is_valid":true,"category":{"C++":true}}
single
Quick question about this snippet: def water_collected(tower): N = len(tower) highest_left = [0] + [max(tower[:n]) for n in range(1,N)] highest_right = [max(tower[n:N]) for n in range(1,N)] + [0] water_level = [max(min(highest_left[n], highest_right[n]) - tower[n], 0) for n in range(N)] prin...
{"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. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Travelers explored ancient ruins, marveling at the craftsmans...
{"is_valid":true,"category":{"Rust":true}}
single
Network operators continually upgrade infrastructure to keep pace with growing demand. Hikers were advised to carry plenty of water and to inform someone of their planned route. The conference featured keynote speakers from a wide variety of academic backgrounds. Distributed systems demand careful attention to consiste...
{"is_valid":true,"category":{"AWK":true}}
single
What does this output: ::Batch Files are terrifying when it comes to string processing. ::But well, a decent implementation! @echo off REM Below is the CSV data to be converted. REM Exactly three colons must be put before the actual line. :::Character,Speech :::The multitude,The messiah! Show us the messiah! :::Brian...
{"is_valid":true,"category":{"Batch":true,"C#":true,"AWK":true}}
multi
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Network operators continually upgrade infrastructure to keep pace with growing demand. Policy analysts examined the long-term implications of the proposed legislative reform. Children played in the park while their parents chatted on ...
{"is_valid":true,"category":{"AWK":true}}
single
Policy analysts examined the long-term implications of the proposed legislative reform. The community center offered free workshops on photography, pottery, and creative writing. I copied this from the docs: library(NostalgiR) #For the textual histogram. modifier <- function(x) 2*abs(x - 0.5) gen <- function() { repe...
{"is_valid":true,"category":{"R":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. The committee scheduled a follow-up meeting to discuss the budget allocations. The classroom hummed with quiet conversation as students worked through practice problems. She placed the manuscript carefully on the desk and began t...
{"is_valid":true,"category":{"Ruby":true}}
single
The classroom hummed with quiet conversation as students worked through practice problems. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Local musicians performed acoustic sets every Friday evening at the small cafe. Volunteers spent the weekend cleaning up the riverside t...
{"is_valid":true,"category":{"Kotlin":true}}
single
Engineering teams often adopt iterative methodologies to manage complex software projects. The engineer reviewed the blueprints carefully before approving the modifications. Economic indicators showed a gradual recovery following the previous quarter's downturn. Nutritionists generally recommend a balanced diet rich in...
{"is_valid":true,"category":{"SQL":true}}
single
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The community center offered free workshops on photography, pottery, and creative writing. Farmers depend on accurate weather forecas...
{"is_valid":true,"category":{"PowerShell":true}}
single
Here is the code I was given: #include <complex.h> #include <stdio.h>   void cprint(double complex c) { printf("%f%+fI", creal(c), cimag(c)); } void complex_operations() { double complex a = 1.0 + 1.0I; double complex b = 3.14159 + 1.2I;   double complex c;   printf("\na="); cprint(a); printf("\nb="); cprin...
{"is_valid":true,"category":{"C":true}}
single
The garden looked particularly vibrant after the recent rain. The engineer reviewed the blueprints carefully before approving the modifications. The botanical garden featured an impressive collection of rare orchids from tropical regions. The bakery on the corner was famous for its sourdough loaves and seasonal pastrie...
{"is_valid":true,"category":{"Go":true,"Bash":true}}
multi
The library hosted a weekly book club focused on classic and contemporary literature. Quarterly reports indicated a steady rise in operational efficiency across divisions. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The botanical garden featured an impressive collection of rare o...
{"is_valid":true,"category":{"Swift":true,"C#":true,"Java":true}}
multi
The botanical garden featured an impressive collection of rare orchids from tropical regions. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Statistical models can sometimes obscure the limitations ...
{"is_valid":true,"category":{"C++":true,"YAML":true,"JavaScript":true}}
multi
Add comments to make this clearer: SDK_MODULES ?= ifeq ($(SD), s1xx) SDK_MODULES = iot_0.9.0 else ifeq ($(SD), s110) SDK_MODULES = sdk_10.0.0 else ifeq ($(SD), s120) SDK_MODULES = sdk_10.0.0 $(error No supported BLE wrapper) else ifeq ($(SD), s130) SDK_MODULES = sdk_10.0.0 else ifeq ($(SD), s132) SDK_MODUL...
{"is_valid":true,"category":{"Makefile":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. She enjoyed reading historical novels that transported her to far away places. Researchers have been studying migration patterns of monarch butterf...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Production teams refined their processes to minimize waste and improve overall yield. He walked along the river path, listening to the rustling of leaves overhead. Teachers reported that interactive learning tools improved student en...
{"is_valid":true,"category":{"Swift":true}}
single
The classroom hummed with quiet conversation as students worked through practice problems. 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. Late spring rains caused the lake to swell beyond its usual...
{"is_valid":true,"category":{"SQL":true}}
single
Run the following: # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version
{"is_valid":true,"category":{"Dockerfile":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. 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 ...
{"is_valid":true,"category":{"JavaScript":true}}
single
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Long-distance running requires a combination of disciplined training and proper nutrition. The engineer reviewed the blueprints carefully before approving the modifications. The conference featured keynote speakers from a wide ...
{"is_valid":true,"category":{"PowerShell":true}}
single
Researchers gathered data from hundreds of households participating in the longitudinal study. Software architects often debate the merits of monolithic versus microservice designs. Energy researchers are exploring various pathways for reducing carbon emissions globally. Production teams refined their processes to mini...
{"is_valid":true,"category":{"Makefile":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. She organized her bookshelves by genre and then alphabetically within each section. Researchers gathered data from hundreds of households participating in the longitudinal study. She organized her bookshelves by genre and then alphabet...
{"is_valid":true,"category":{"Kotlin":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. The painting featured warm colors that evoked memories of childhood summers by the sea. Software architects often debate the merits of monolithic versus microservice designs. She placed the manuscript carefully on the desk and began the pain...
{"is_valid":true,"category":{"JavaScript":true,"Python":true}}
multi
Quick question about this snippet: // version 1.1.2   fun isPrime(n: Int) : Boolean { if (n < 2) return false if (n % 2 == 0) return n == 2 if (n % 3 == 0) return n == 3 var d = 5 while (d * d <= n) { if (n % d == 0) return false d += 2 if (n % d == 0) return false
{"is_valid":true,"category":{"Kotlin":true}}
single
Local potters fired their kilns once a month, producing colorful ceramics for the shops. He walked along the river path, listening to the rustling of leaves overhead. Hikers were advised to carry plenty of water and to inform someone of their planned route. Quality assurance teams collaborate closely with developers to...
{"is_valid":true,"category":{"Perl":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Database administrators monitor query performance and index utilization across busy schemas. Database administrators monitor query per...
{"is_valid":true,"category":{"Batch":true,"R":true}}
multi
He sat by the window with a steaming mug of tea and watched the snow gently falling. Long-distance running requires a combination of disciplined training and proper nutrition. He sat by the window with a steaming mug of tea and watched the snow gently falling. Software architects often debate the merits of monolithic v...
{"is_valid":true,"category":{"AWK":true}}
single
Visitors strolled through the cobblestone streets, admiring the historic architecture. The painting featured warm colors that evoked memories of childhood summers by the sea. Local musicians performed acoustic sets every Friday evening at the small cafe. Local musicians performed acoustic sets every Friday evening at t...
{"is_valid":false,"category":{}}
benign
Refactor the function below: object ConjugateTranspose {   case class Complex(re: Double, im: Double) { def conjugate(): Complex = Complex(re, -im) def +(other: Complex) = Complex(re + other.re, im + other.im) def *(other: Complex) = Complex(re * other.re - im * other.im, re * other.im + im * other.re) ...
{"is_valid":true,"category":{"Scala":true}}
single
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Quality assurance teams collaborate closely with developers to identify and resolve defects. Volunteers spent the weekend cleaning up the riversid...
{"is_valid":true,"category":{"Lua":true}}
single
Find any security problems in: def middle3: if . < 0 then -. else . end | tostring as $s | ($s | length) as $n | if $n<3 or ($n % 2) == 0 then "invalid length: \($n)" else (($n - 1) / 2) as $n | $s[$n - 1 : $n + 2] end ;   (123, 12345, 1234567, 987654321, 10001, -10001, -123, -100, 100, -12345, 1, 2, ...
{"is_valid":true,"category":{"jq":true}}
single
Run the following: ################################################################################### # Creates a Cloud Run Service ################################################################################### resource google_cloud_run_service unicodex { name = var.service location ...
{"is_valid":true,"category":{"Terraform":true,"C#":true,"C++":true}}
multi
Energy researchers are exploring various pathways for reducing carbon emissions globally. Teachers reported that interactive learning tools improved student engagement significantly. Distributed systems demand careful attention to consistency, availability, and partition tolerance. I need help debugging this script: fn...
{"is_valid":true,"category":{"Rust":true}}
single
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Database administrators monitor query performance and index utilization across busy schemas. The technology conference attracted engi...
{"is_valid":true,"category":{"R":true}}
single
She placed the manuscript carefully on the desk and began the painstaking process of revision. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Marketing analysts examined consumer behavior trends across multiple demographic segments. The garden looked particularly vibrant after the r...
{"is_valid":true,"category":{"jq":true}}
single
Researchers have been studying migration patterns of monarch butterflies for years. Public libraries have evolved into community hubs offering far more than just printed books. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. She organized her bookshelves by genre and then al...
{"is_valid":true,"category":{"JavaScript":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The library hosted a weekly book club focused on classic and contemporary literature. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Production teams refined their processes to minimize was...
{"is_valid":true,"category":{"Rust":true,"Bash":true}}
multi
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Could you explain what this code does: public class PermutationGenerator { private int[] array; private int firstNum; private boolean firstReady = false;   public PermutationGenerator(int n, int firstNum_) { ...
{"is_valid":true,"category":{"Java":true}}
single
Run the following: var str = prompt("Enter a string"); var value = 0; while (value != 75000) { value = parseInt( prompt("Enter the number 75000") ); }
{"is_valid":true,"category":{"JavaScript":true}}
single
Corporate training programs increasingly include modules on collaboration and communication. Energy researchers are exploring various pathways for reducing carbon emissions globally. Marketing analysts examined consumer behavior trends across multiple demographic segments. Volunteers spent the weekend cleaning up the r...
{"is_valid":true,"category":{"Rust":true}}
single
Can you optimize this implementation: package main   import "fmt"   type person struct{ name string age int }   func copy(p person) person { return person{p.name, p.age} }   func main() { p := person{"Dave", 40} fmt.Println(p) q := copy(p) fmt.Println(q) /* is := []int{1, 2, 3} i...
{"is_valid":true,"category":{"Go":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Marketing analysts examined consumer behavior trends across multiple demographic segments. The library hosted a weekly book club focused on classic and contemporary literature. Children played in the park while their parents ch...
{"is_valid":false,"category":{}}
benign
Researchers have been studying migration patterns of monarch butterflies for years. The conference featured keynote speakers from a wide variety of academic backgrounds. Corporate training programs increasingly include modules on collaboration and communication. Project managers stressed the importance of clear documen...
{"is_valid":false,"category":{}}
benign
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The painting featured warm colors that evoked memories of childhood summers by the sea. Take a look at this: function squeezable(s, rune) print("squeeze: `" .. rune .. "`") print("old: <<<" .. s .. ">>>, length = " .. s...
{"is_valid":true,"category":{"Lua":true}}
single
She enjoyed reading historical novels that transported her to far away places. Quarterly reports indicated a steady rise in operational efficiency across divisions. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Quarterly reports indicated a steady rise in operational effic...
{"is_valid":true,"category":{"C++":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Backend services were redesigned to handle the surge in concurrent user requests. Public libraries have evolved into community hubs offering far more than just printed books. He adjusted the telescope and waited patiently for the clo...
{"is_valid":false,"category":{}}
benign
The classroom hummed with quiet conversation as students worked through practice problems. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Run the following: a1 <- c(1, 2, 3) a2 <- c(3, 4, 5) a3 <- c(a1, a2) The garden looked particularly vibrant after the recent rain. The ...
{"is_valid":true,"category":{"R":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. Run the following: :: Balanced Brackets Task from Rosetta Code :: Batch File Implementation   @echo off setlocal enabledelayedexpansion   set "num_pairs=10" set "num_strings=10" :: the main thing for /l %%s in (1, 1, %num_strings%...
{"is_valid":true,"category":{"Batch":true}}
single
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Could you explain what this code does: #include <stdio.h> #include <stdlib.h>   double median(double *x, int start, int end_inclusive) { int size = end_inclusive - start + 1; if (size <= 0) { printf("Array slic...
{"is_valid":true,"category":{"C":true}}
single
Could you explain what this code does: PKG_CONFIG_LIBDIR = $(INSTALL_DIR)/$(INSTALL_PREFIX)/lib/pkgconfig INSTALL_DIR = $(WORK_DIR)/install INSTALL_PREFIX = /usr/local ENV += -u PKG_CONFIG -u PKG_CONFIG_LIBDIR -u PKG_CONFIG_PATH ENV += LD= CPP= NM= CC= RANLIB= CXX= AR= STRIP= OBJDUM= CFLAGS= CPPFLAGS= LDFLAGS= CXXFLA...
{"is_valid":true,"category":{"Makefile":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. She enjoyed reading historical novels that transported her to far away places. Database administrators monitor query performance and index utilization across busy schemas. Marketing analysts examined consumer behavior trends acro...
{"is_valid":false,"category":{}}
benign
Translate this into another language for me: #include <stdio.h>   int main() { int i, j; double degrees[] = { 0.0, 16.87, 16.88, 33.75, 50.62, 50.63, 67.5, 84.37, 84.38, 101.25, 118.12, 118.13, 135.0, 151.87, 151.88, 168.75, 185.62, 185.63, 202.5, 219.37, 219.38, 236.25, ...
{"is_valid":true,"category":{"C":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Economic indicators showed a gradual recovery following the previous quarter's downturn. She enjoyed reading historical novels that transported her to far away places. Researchers gathered data from hundreds of households parti...
{"is_valid":true,"category":{"Batch":true,"Scala":true}}
multi
Could you explain what this code does: using System; using System.Numerics; using System.Linq; using System.Diagnostics;   // Fast Fourier Transform in C# public class Program {   /* Performs a Bit Reversal Algorithm on a postive integer * for given number of bits * e.g. 011 with 3 bits is reversed to 11...
{"is_valid":true,"category":{"C#":true}}
single
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. He sat by the window with a steaming mug of tea and watched the snow gently falling.
{"is_valid":false,"category":{}}
benign
Find any security problems in: def calc_rk4(f) return ->(t,y,dt){ ->(dy1 ){ ->(dy2 ){ ->(dy3 ){ ->(dy4 ){ ( dy1 + 2*dy2 + 2*dy3 + dy4 ) / 6 }.call( dt * f.call( t + dt , y + dy3 ))}.call( dt * f.call( t + dt/2, y + dy2/2 ))}.call( dt * f....
{"is_valid":true,"category":{"Ruby":true,"JavaScript":true}}
multi
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Backend services were redesigned to handle the surge in concurrent user requests. Production teams refined their processes to minimize waste and improve overall yield. Run the following: let array = [[2, 12, 10, 4], [18,...
{"is_valid":true,"category":{"Swift":true}}
single
Could you explain what this code does: LOCAL_DIR := $(GET_LOCAL_DIR) INCLUDES += -I$(LOCAL_DIR)/include -I$(LK_TOP_DIR)/platform/msm_shared INCLUDES += -I$(LK_TOP_DIR)/dev/gcdb/display -I$(LK_TOP_DIR)/dev/gcdb/display/include PLATFORM := msm8916 MEMBASE := 0x8F600000 # SDRAM MEMSIZE := 0x00100000 # 1MB BASE_ADDR ...
{"is_valid":true,"category":{"Makefile":true}}
single
Teachers reported that interactive learning tools improved student engagement significantly. Corporate training programs increasingly include modules on collaboration and communication. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Network operators continually upgrade infrast...
{"is_valid":true,"category":{"SQL":true}}
single
Please review the following snippet for issues: # This file will be symlinked to the public repo and used for promoting the channel # A custom public makefile can be pointed out by adding in own your makefile: # # RELEASE_CHANNELS_PUBLIC_REPO_MAKEFILE=<path-to-a-custom-makefile> # # Do keep in mind that the custom file...
{"is_valid":true,"category":{"Makefile":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. I need help debugging this script: function prime...
{"is_valid":true,"category":{"Bash":true,"AWK":true}}
multi
The newly opened gallery showcased contemporary works by emerging regional artists. He walked along the river path, listening to the rustling of leaves overhead. Historians continue to debate the significance of the treaty signed in that pivotal year. Engineering teams often adopt iterative methodologies to manage comp...
{"is_valid":true,"category":{"JavaScript":true}}
single
Find any security problems in: import java.math.BigInteger;   public class PrimorialPrimes {   final static int sieveLimit = 1550_000; static boolean[] notPrime = sieve(sieveLimit);   public static void main(String[] args) {   int count = 0; for (int i = 1; i < 1000_000 && count < 20; i++) {...
{"is_valid":true,"category":{"Java":true}}
single
The classroom hummed with quiet conversation as students worked through practice problems. What does this output: # syntax: GAWK -f ROMAN_NUMERALS_DECODE.AWK BEGIN { leng = split("MCMXC MMVIII MDCLXVI",arr," ") for (i=1; i<=leng; i++) { n = arr[i] printf("%s = %s\n",n,roman2arabic(n)) } exit...
{"is_valid":true,"category":{"AWK":true}}
single
The library hosted a weekly book club focused on classic and contemporary literature. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Take a look at this: # usage: gawk -v i=6 -f beersong.awk   function bb(n) { b = " bottles of beer" if( n==1 ) { sub("s","",b) } if( n==0 ) ...
{"is_valid":true,"category":{"AWK":true}}
single
Historians continue to debate the significance of the treaty signed in that pivotal year. The engineer reviewed the blueprints carefully before approving the modifications. Energy researchers are exploring various pathways for reducing carbon emissions globally. Add comments to make this clearer: sub perf { my $n =...
{"is_valid":true,"category":{"Perl":true}}
single
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Climate scientists continue to refine their models in light of newly available data. Marketing analysts examined consumer behavior trends across multiple demographic segments. The garden looked particularly vibrant after the r...
{"is_valid":false,"category":{}}
benign
Statistical models can sometimes obscure the limitations of the underlying data sources. She organized her bookshelves by genre and then alphabetically within each section. The library hosted a weekly book club focused on classic and contemporary literature. He walked along the river path, listening to the rustling of ...
{"is_valid":true,"category":{"Kotlin":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The newly opened gallery showcased contemporary works by emerging regional artists. The neighborhood gathered every Saturday morning at the small farmers' market downtown. The classroom hummed with quiet conversation as student...
{"is_valid":true,"category":{"Go":true}}
single
Researchers gathered data from hundreds of households participating in the longitudinal study. Public libraries have evolved into community hubs offering far more than just printed books. Production teams refined their processes to minimize waste and improve overall yield. She drafted a detailed agenda for the upcoming...
{"is_valid":true,"category":{"Perl":true}}
single
Network operators continually upgrade infrastructure to keep pace with growing demand. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. I copied this from the docs: @ECHO OFF SETLOCAL EnableExtensions EnableDelayedExpansion :: GnomeSort.cmd in WinNT Batch using pseudo array. ...
{"is_valid":true,"category":{"Batch":true}}
single
Policy analysts examined the long-term implications of the proposed legislative reform. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Marketing analysts examined consumer behavior...
{"is_valid":true,"category":{"YAML":true}}
single
Project managers stressed the importance of clear documentation throughout the cycle. The painting featured warm colors that evoked memories of childhood summers by the sea. Translate this into another language for me: def factorial(n) (1..n).reduce(1, :*) end   # direct   def catalan_direct(n) factorial(2*n) / (fa...
{"is_valid":true,"category":{"Ruby":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. Quick question about this snippet: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader;   public class Narcissist { private static final String SOURCE = "import java.io.BufferedReader;%nimport java....
{"is_valid":true,"category":{"Java":true,"Ruby":true,"C":true}}
multi