prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
Find any security problems in: // version 1.1.0   typealias Point = Pair<Double, Double>   data class Triangle(var p1: Point, var p2: Point, var p3: Point) { override fun toString() = "Triangle: $p1, $p2, $p3" }   fun det2D(t: Triangle): Double { val (p1, p2, p3) = t return p1.first * (p2.second - p3.secon...
{"is_valid":true,"category":{"Kotlin":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. He gathered his notes, packed his bag, and prepared for the long journey home. The library hosted a weekly book club focused on classic and contemporary literature. Quarterly reports indicated a steady rise in operational efficiency across d...
{"is_valid":true,"category":{"C#":true,"Perl":true}}
multi
She organized her bookshelves by genre and then alphabetically within each section. He walked along the river path, listening to the rustling of leaves overhead. Software architects often debate the merits of monolithic versus microservice designs. What does this output: # LZW compression/decompression for strings def ...
{"is_valid":true,"category":{"jq":true}}
single
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Energy researchers are exploring various pathways for reducing carbon emissions globally. Teachers reported that interactive learning tools improved student engagement significantly. Climate models suggest that ocean temperatu...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Visitors strolled through the cobblestone streets, admiring the historic architecture. Take a look at this: my ($a, $b) = (-5, 7); $ans = eval 'abs($a * $b)'; # => 35
{"is_valid":true,"category":{"Perl":true}}
single
Researchers gathered data from hundreds of households participating in the longitudinal study. Could you explain what this code does: //! Rust has a perfectly good Semaphore type already. It lacks count(), though, so we can't use it //! directly.   use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering::Se...
{"is_valid":true,"category":{"Rust":true,"Ruby":true}}
multi
I copied this from the docs: # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (th...
{"is_valid":true,"category":{"Dockerfile":true}}
single
She placed the manuscript carefully on the desk and began the painstaking process of revision. Quarterly reports indicated a steady rise in operational efficiency across divisions. Please review the following snippet for issues: public class RN {   enum Numeral { I(1), IV(4), V(5), IX(9), X(10), XL(40), L(5...
{"is_valid":true,"category":{"Java":true}}
single
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. Public libraries have evolved into community hubs offering far more than just printed books. Distributed systems demand careful attent...
{"is_valid":true,"category":{"Perl":true}}
single
I copied this from the docs: function det2D(p1,p2,p3) return p1.x * (p2.y - p3.y) + p2.x * (p3.y - p1.y) + p3.x * (p1.y - p2.y) end   function checkTriWinding(p1,p2,p3,allowReversed) local detTri = det2D(p1,p2,p3) if detTri < 0.0 then if allowReversed then local t = p3 ...
{"is_valid":true,"category":{"Lua":true,"R":true}}
multi
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Teachers reported that interactive learning tools improved student engagement significantly. Can you optimize this implementation: x=("1 2" "3 4") y=(5 6) sum=( "${x[@]}" "${y[@]}" )   for i in "${sum[@]}" ; do echo "$i" ; done 1 ...
{"is_valid":true,"category":{"Bash":true}}
single
The morning light filtered through the kitchen window as the coffee brewed. Researchers gathered data from hundreds of households participating in the longitudinal study. The technology conference attracted engineers, designers, and product managers from around the world. Historians continue to debate the significance ...
{"is_valid":true,"category":{"Perl":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Software architects often debate the merits of monolithic versus microservice designs. The committee scheduled a follow-up meeting to discuss the bud...
{"is_valid":true,"category":{"SQL":true}}
single
Here is the code I was given: import java.io.IOException; public class Interpreter { public final static int MEMORY_SIZE = 65536; private final char[] memory = new char[MEMORY_SIZE]; private int dp; private int ip; private int border; private void reset() { for (int i = 0; i < MEMOR...
{"is_valid":true,"category":{"Java":true,"C++":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. Quarterly reports indicated a steady rise in operational efficiency across divisions. Climate models suggest that ocean temperatures will continue to rise ...
{"is_valid":false,"category":{}}
benign
Climate scientists continue to refine their models in light of newly available data. Production teams refined their processes to minimize waste and improve overall yield. Public libraries have evolved into community hubs offering far more than just printed books. Climate models suggest that ocean temperatures will cont...
{"is_valid":true,"category":{"Lua":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Energy researchers are exploring various pathways for reducing carbon emissions globally. She drafted a detailed agenda for the upcoming retr...
{"is_valid":false,"category":{}}
benign
Public libraries have evolved into community hubs offering far more than just printed books. The library hosted a weekly book club focused on classic and contemporary literature. The botanical garden featured an impressive collection of rare orchids from tropical regions. Project managers stressed the importance of cle...
{"is_valid":true,"category":{"Python":true}}
single
Run the following: void Line( float x1, float y1, float x2, float y2, const Color& color ) { // Bresenham's line algorithm const bool steep = (fabs(y2 - y1) > fabs(x2 - x1)); if(steep) { std::swap(x1, y1); std::swap(x2, y2); }   if(x1 > x2) { std::swap(x1, x2); std::swap(y1, y2); }...
{"is_valid":true,"category":{"C++":true,"Perl":true}}
multi
Public libraries have evolved into community hubs offering far more than just printed books. Historians continue to debate the significance of the treaty signed in that pivotal year. Network operators continually upgrade infrastructure to keep pace with growing demand. Local potters fired their kilns once a month, prod...
{"is_valid":true,"category":{"Bash":true}}
single
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. 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. Late spring rains caused the lake to swell beyond its usual ...
{"is_valid":true,"category":{"SQL":true,"Lua":true,"jq":true}}
multi
Take a look at this: # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Lic...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. Refactor the function below: resource "aws_dynamodb_table" "matcher_graph_table" { name = "works-graph" read_capacity = 1 write_capacity = 1 hash_key = "id" attribute { name = "id" type = "S" ...
{"is_valid":true,"category":{"Terraform":true,"JavaScript":true}}
multi
Could you explain what this code does: lpeg = require 'lpeg' -- see http://www.inf.puc-rio.br/~roberto/lpeg/   imports = 'P R S C V match' for w in imports:gmatch('%a+') do _G[w] = lpeg[w] end -- make e.g. 'lpeg.P' function available as 'P'   function tosymbol(s) return s end function tolist(x, ...) return {...} end -...
{"is_valid":true,"category":{"Lua":true}}
single
Database administrators monitor query performance and index utilization across busy schemas. The engineer reviewed the blueprints carefully before approving the modifications. Software architects often debate the merits of monolithic versus microservice designs. She organized her bookshelves by genre and then alphabeti...
{"is_valid":true,"category":{"Kotlin":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The morning light filtered through the kitchen window as the coffee brewed. Refactor the function below: (function() { var orig= docume...
{"is_valid":true,"category":{"JavaScript":true}}
single
The conference featured keynote speakers from a wide variety of academic backgrounds. Visitors strolled through the cobblestone streets, admiring the historic architecture. Project managers stressed the importance of clear documentation throughout the cycle. Corporate training programs increasingly include modules on c...
{"is_valid":false,"category":{}}
benign
Find any security problems in: #include <windows.h> #include <string> using namespace std;   class myBitmap { public: myBitmap() : pen( NULL ) {} ~myBitmap() { DeleteObject( pen ); DeleteDC( hdc ); DeleteObject( bmp ); }   bool create( int w, int h ) { BI
{"is_valid":true,"category":{"C++":true}}
single
The botanical garden featured an impressive collection of rare orchids from tropical regions. Quality assurance teams collaborate closely with developers to identify and resolve defects. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Network operators continually upgrade i...
{"is_valid":true,"category":{"jq":true}}
single
Refactor the function below: math.randomseed( os.time() )   -- Fisher-Yates shuffle from http://santos.nfshost.com/shuffling.html function shuffle(t) for i = 1, #t - 1 do local r = math.random(i, #t) t[i], t[r] = t[r], t[i] end end   -- builds a width-by-height grid of trues function initialize_grid(w, h) ...
{"is_valid":true,"category":{"Lua":true}}
single
Can you optimize this implementation: # Find Mian-Chowla numbers: an # where: ai = 1, # and: an = smallest integer such that ai + aj is unique # for all i, j in 1 .. n && i <= j # BEGIN \ {   FALSE = 0; TRUE = 1;
{"is_valid":true,"category":{"AWK":true}}
single
Run the following: import java.awt.Color import math.{floor => ipart, round, abs}   case class Point(x: Double, y: Double) {def swap = Point(y, x)}   def plotter(bm: RgbBitmap, c: Color)(x: Double, y: Double, v: Double) = { val X = round(x).toInt val Y = round(y).toInt val V = v.toFloat //
{"is_valid":true,"category":{"Scala":true}}
single
The botanical garden featured an impressive collection of rare orchids from tropical regions. The painting featured warm colors that evoked memories of childhood summers by the sea. She enjoyed reading historical novels that transported her to far away places. She placed the manuscript carefully on the desk and began t...
{"is_valid":true,"category":{"Java":true,"Go":true}}
multi
Refactor the function below: /** * Copyright Google LLC 2021 * Google Confidential, Pre-GA Offering for Google Cloud Platform * (see https://cloud.google.com/terms/service-terms) */ resource "google_artifact_registry_repository" "artifact-registry" { provider = google-beta location = var.regi
{"is_valid":true,"category":{"Terraform":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. The morning light filtered through the kitchen window as the coffee brewed. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Economic indicators showed a gradual recovery following the previous quar...
{"is_valid":true,"category":{"Kotlin":true}}
single
Backend services were redesigned to handle the surge in concurrent user requests. The newly opened gallery showcased contemporary works by emerging regional artists. The morning light filtered through the kitchen window as the coffee brewed. Translate this into another language for me: // version 1.0.6   fun main(args:...
{"is_valid":true,"category":{"Kotlin":true}}
single
Engineering teams often adopt iterative methodologies to manage complex software projects. Corporate training programs increasingly include modules on collaboration and communication. Historians continue to debate the significance of the treaty signed in that pivotal year. Engineering teams often adopt iterative method...
{"is_valid":false,"category":{}}
benign
Here is the code I was given: class Example(private var name: String) { override def toString = s"Hello, I am $name" }   object BreakPrivacy extends App { val field = classOf[Example].getDeclaredField("name") field.setAccessible(true)   val foo = new Example("Erik") println(field.get(foo)) field.s
{"is_valid":true,"category":{"Scala":true}}
single
Translate this into another language for me: package expand   // Expander is anything that can be expanded into a slice of strings. type Expander interface { Expand() []string }   // Text is a trivial Expander that expands to a slice with just itself. type Text string   func (t Text) Expand() []string { return []strin...
{"is_valid":true,"category":{"Go":true}}
single
Quarterly reports indicated a steady rise in operational efficiency across divisions. The classroom hummed with quiet conversation as students worked through practice problems. Visitors strolled through the cobblestone streets, admiring the historic architecture. Late spring rains caused the lake to swell beyond its us...
{"is_valid":true,"category":{"Dockerfile":true,"Java":true}}
multi
Translate this into another language for me: def bubbleSort[T](arr: Array[T])(implicit o: Ordering[T]) { import o._ val consecutiveIndices = (arr.indices, arr.indices drop 1).zipped var hasChanged = true do { hasChanged = false consecutiveIndices foreach { (i1, i2) => if (arr(i1) > arr(i2)) { ...
{"is_valid":true,"category":{"Scala":true,"Swift":true}}
multi
Backend services were redesigned to handle the surge in concurrent user requests. What does this output: while read -t 0.01; do true done Late spring rains caused the lake to swell beyond its usual seasonal boundaries.
{"is_valid":true,"category":{"Bash":true}}
single
The engineer reviewed the blueprints carefully before approving the modifications. The neighborhood gathered every Saturday morning at the small farmers' market downtown. I copied this from the docs: CREATE TABLE Flight (departure_date VARCHAR, arrival_date VARCHAR, origin VARCHAR, destination VARCHAR); SELECT departur...
{"is_valid":true,"category":{"SQL":true,"YAML":true}}
multi
The community center offered free workshops on photography, pottery, and creative writing. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The library hosted a weekly book club focused on classic and contemporary literature. The bakery on the corner was famous for its sourdo...
{"is_valid":false,"category":{}}
benign
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Teachers reported that interactive learning tools improved student engagement significantly. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Late spring rains caused the lake to swell beyond its u...
{"is_valid":true,"category":{"JavaScript":true,"jq":true}}
multi
She organized her bookshelves by genre and then alphabetically within each section. Quick question about this snippet: public static int[] sort(int[] old) { // Loop for every bit in the integers for (int shift = Integer.SIZE - 1; shift > -1; shift--) { // The array to put the partially sorted array into...
{"is_valid":true,"category":{"Java":true}}
single
She placed the manuscript carefully on the desk and began the painstaking process of revision. Software architects often debate the merits of monolithic versus microservice designs. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Marketing analysts examined consumer b...
{"is_valid":true,"category":{"Makefile":true,"jq":true}}
multi
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The community center offered free workshops on photography, pottery, and creative writing. He gathered his notes, packed his bag, and prepa...
{"is_valid":true,"category":{"Ruby":true}}
single
Could you explain what this code does: --- apiVersion: v1 kind: ConfigMap metadata: namespace: default name: job-config data: job-config.yaml: ""
{"is_valid":true,"category":{"YAML":true}}
single
She enjoyed reading historical novels that transported her to far away places. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Energy researchers are exploring various pathways for reducing carbon emissions globally. Visitors strolled through the cobblestone streets, admiring the his...
{"is_valid":true,"category":{"YAML":true}}
single
The engineer reviewed the blueprints carefully before approving the modifications. Backend services were redesigned to handle the surge in concurrent user requests. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. A gentle breeze drifted across the meadow as the sun began to...
{"is_valid":true,"category":{"AWK":true}}
single
Take a look at this: mem <- c(15, 17, -1, 17, -1, -1, 16, 1, -1, 16, 3, -1, 15, 15, 0, 0, -1, 72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33, 10, 0)   getFromMemory <- function(addr) { mem[[addr + 1]] } # because first element in mem is mem[[1]] setMemory <- functio...
{"is_valid":true,"category":{"R":true}}
single
The engineer reviewed the blueprints carefully before approving the modifications. The painting featured warm colors that evoked memories of childhood summers by the sea. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Farmers depend on accurate weather forecasts to plan their plant...
{"is_valid":true,"category":{"Batch":true}}
single
Local musicians performed acoustic sets every Friday evening at the small cafe. Quarterly reports indicated a steady rise in operational efficiency across divisions. Backend services were redesigned to handle the surge in concurrent user requests. The committee scheduled a follow-up meeting to discuss the budget alloca...
{"is_valid":true,"category":{"Swift":true}}
single
Translate this into another language for me: package main   import ( "fmt" "math/rand" "strconv" "strings" "time" )   var grid [8][8]byte   func abs(i int) int { if i >= 0 { return i } else { return -i } }   func createFen() string { placeKings() placePieces("PPPP...
{"is_valid":true,"category":{"Go":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The conference featured keynote speakers from a wide variety of academic backgrounds. Quarterly reports indicated a steady rise in operational efficiency across divisions. He walked along the river path, listening to the rustli...
{"is_valid":true,"category":{"C":true,"Ruby":true}}
multi
He walked along the river path, listening to the rustling of leaves overhead. The morning light filtered through the kitchen window as the coffee brewed. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Statistical models can sometimes obscure the limitations of the underlyi...
{"is_valid":true,"category":{"Makefile":true}}
single
Climate scientists continue to refine their models in light of newly available data. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Quick question about this snippet: // version 1.1.2   imp...
{"is_valid":true,"category":{"Kotlin":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. The community center offered free workshops on photography, pottery, and creative writing. The committee scheduled a follow-up meeting to discuss the budget allocations. The classroom hummed with quiet conversation as ...
{"is_valid":true,"category":{"Swift":true,"Perl":true,"C++":true}}
multi
Database administrators monitor query performance and index utilization across busy schemas. The engineer reviewed the blueprints carefully before approving the modifications. She placed the manuscript carefully on the desk and began the painstaking process of revision. Hikers were advised to carry plenty of water and ...
{"is_valid":true,"category":{"Perl":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. Researchers gathered data from hundreds of households participating in the longitudinal study.
{"is_valid":false,"category":{}}
benign
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Researchers have been studying migration patterns of monarch butterflies for years. Public libraries have evolved into community hub...
{"is_valid":true,"category":{"Terraform":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. Production teams refined their processes to minimize waste and improve overall yield. Here is the code I was given: import java.awt.*; import java.awt.geom.Path2D; import javax.swing.*;   public class PythagorasTree ex...
{"is_valid":true,"category":{"Java":true,"SQL":true}}
multi
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Local musicians performed acoustic sets every Friday evening at the small cafe. He sat by the window with a steaming mug of tea and watched the snow gently falling. Network operators continually upgrade infrastructure to keep p...
{"is_valid":false,"category":{}}
benign
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. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Researchers have been studying migration ...
{"is_valid":true,"category":{"Swift":true}}
single
Quick question about this snippet: function BinarySearch-Iterative ([int[]]$Array, [int]$Value) { [int]$low = 0 [int]$high = $Array.Count - 1   while ($low -le $high) { [int]$mid = ($low + $high) / 2   if ($Array[$mid] -gt $Value) { $high = $mid - 1 }
{"is_valid":true,"category":{"PowerShell":true}}
single
Corporate training programs increasingly include modules on collaboration and communication. Researchers gathered data from hundreds of households participating in the longitudinal study. Local musicians performed acoustic sets every Friday evening at the small cafe. Backend services were redesigned to handle the surge...
{"is_valid":false,"category":{}}
benign
Run the following: # Input: an array of strings. # Output: an object with the strings as keys, the values of which are the corresponding frequencies. def counter: reduce .[] as $item ( {}; .[$item] += 1 ) ;   # entropy in bits of the input string def entropy: (explode | map( [.] | implode ) | counter | [ .[] | ...
{"is_valid":true,"category":{"jq":true}}
single
I copied this from the docs: extern crate rand; // 0.5.5 use rand::Rng; use std::iter::repeat;   #[derive(Debug, Eq, PartialEq, Clone)] enum Colour { Black, Red, } use Colour::*;   fn main() { let mut rng = rand::thread_rng();   //Create our deck. let mut deck: Vec<_> = repeat(Black).take(26) ...
{"is_valid":true,"category":{"Rust":true,"AWK":true,"Java":true}}
multi
What does this output: J2justifier = {Left: :ljust, Right: :rjust, Center: :center}   =begin Justify columns of textual tabular input where the record separator is the newline and the field separator is a 'dollar' character. justification can be Symbol; (:Left, :Right, or :Center).   Return the justifi
{"is_valid":true,"category":{"Ruby":true}}
single
Take a look at this: fn main() { println!( "Lowercase letters: {}", (b'a'..=b'z').map(|c| c as char).collect::<String>() ); println!( "Uppercase letters: {}", (b'A'..=b'Z').map(|c| c as char).collect::<String>() ); }
{"is_valid":true,"category":{"Rust":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. He sat by the window with a steaming mug of tea and watched the snow gently falling. Here is the code I was given: def lpad($len): tostr...
{"is_valid":true,"category":{"jq":true}}
single
Translate this into another language for me: package main   import "fmt"   var tr = []int{85, 88, 75, 66, 25, 29, 83, 39, 97} var ct = []int{68, 41, 10, 49, 16, 65, 32, 92, 28, 98}   func main() { // collect all results in a single list all := make([]int, len(tr)+len(ct)) copy(all, tr) copy(all[len(tr):...
{"is_valid":true,"category":{"Go":true}}
single
He sat by the window with a steaming mug of tea and watched the snow gently falling. Researchers gathered data from hundreds of households participating in the longitudinal study. The newly opened gallery showcased contemporary works by emerging regional artists. Local potters fired their kilns once a month, producing ...
{"is_valid":false,"category":{}}
benign
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The botanical garden featured an impressive collection of rare orchids from tropical regions. Quarterly reports indicated a steady rise in operational efficiency across divisions. Public libraries have evolved into community hubs of...
{"is_valid":true,"category":{"Bash":true}}
single
He sat by the window with a steaming mug of tea and watched the snow gently falling. Refactor the function below: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := internetmaprenderer LOCAL_CFLAGS := -Wall LOCAL_SRC_FILES := jniapi.cpp renderer.cpp common/OpenGL.cpp common/DisplayLines.cpp comm...
{"is_valid":true,"category":{"Makefile":true,"Rust":true}}
multi
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Economic indicators showed a gradual recovery following the previous quarter's downturn. Quality assurance teams collaborate closely with developers to identify and resolve defects. The classroom hummed with quiet conversation...
{"is_valid":true,"category":{"C":true}}
single
The painting featured warm colors that evoked memories of childhood summers by the sea. She organized her bookshelves by genre and then alphabetically within each section. Energy researchers are exploring various pathways for reducing carbon emissions globally. Engineering teams often adopt iterative methodologies to m...
{"is_valid":true,"category":{"Makefile":true,"Batch":true}}
multi
The library hosted a weekly book club focused on classic and contemporary literature. She enjoyed reading historical novels that transported her to far away places. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Local musicians performed acoustic sets every Friday evening at the...
{"is_valid":true,"category":{"Scala":true,"AWK":true}}
multi
Long-distance running requires a combination of disciplined training and proper nutrition. Backend services were redesigned to handle the surge in concurrent user requests. Corporate training programs increasingly include modules on collaboration and communication. Researchers have been studying migration patterns of m...
{"is_valid":true,"category":{"Makefile":true,"PowerShell":true}}
multi
She placed the manuscript carefully on the desk and began the painstaking process of revision. Researchers gathered data from hundreds of households participating in the longitudinal study. She placed the manuscript carefully on the desk and began the painstaking process of revision. She enjoyed reading historical nove...
{"is_valid":true,"category":{"Swift":true}}
single
Here is the code I was given: object NQueens {   private implicit class RichPair[T]( pair: (T,T))( implicit num: Numeric[T] ) { import num._   def safe(x: T, y: T): Boolean = pair._1 - pair._2 != abs(x - y) }   def solve(n: Int): Iterator[Seq[Int]] = { (0 to n-1) .permutations ...
{"is_valid":true,"category":{"Scala":true,"SQL":true,"Rust":true}}
multi
I need help debugging this script: # Input: a positive integer # Output: the "middle-square" def middle_square: (tostring|length) as $len | (. * .) | tostring | (3*length/4|ceil) as $n | .[ -$n : $len-$n] | if length == 0 then 0 else tonumber end;   # Input: a positive integer # Output: middle_square, appli...
{"is_valid":true,"category":{"jq":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Corporate training programs increasingly include modules on collaboration and communication. Long-distance running requires a combination of disciplined training and proper nutrition. The garden looked particularly vibrant after the ...
{"is_valid":true,"category":{"Bash":true}}
single
The painting featured warm colors that evoked memories of childhood summers by the sea. I need help debugging this script: function isPalindrome(str) { return str === str.split("").reverse().join(""); }   console.log(isPalindrome("ingirumimusnocteetconsumimurigni")); Energy researchers are exploring various pathways ...
{"is_valid":true,"category":{"JavaScript":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. Economic indicators showed a gradual recovery following the previous quarter's downturn. He walked along the river path, listening to the rus...
{"is_valid":false,"category":{}}
benign
Project managers stressed the importance of clear documentation throughout the cycle. The garden looked particularly vibrant after the recent rain. Hikers were advised to carry plenty of water and to inform someone of their planned route. Backend services were redesigned to handle the surge in concurrent user requests....
{"is_valid":true,"category":{"Perl":true,"C#":true}}
multi
Could you explain what this code does: import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FileWriter;   public class FixCodeTags { public static void main(String[] args) { String sourcefile=args[0]; String convertedfile=args[1]; convert(sourcefile,convertedfile); }
{"is_valid":true,"category":{"Java":true}}
single
I need help debugging this script: import random   # Copied from https://rosettacode.org/wiki/Miller-Rabin_primality_test#Python def is_Prime(n): """ Miller-Rabin primality test.   A return value of False means n is certainly not prime. A return value of True means n is very likely a prime. """ ...
{"is_valid":true,"category":{"Python":true,"JavaScript":true}}
multi
The morning light filtered through the kitchen window as the coffee brewed. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. He gathered his notes, packed his bag, and prepared for the long j...
{"is_valid":false,"category":{}}
benign
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. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The newly opened gallery showcased cont...
{"is_valid":true,"category":{"Terraform":true}}
single
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Hikers were advised to carry plenty of water and to inform someone of their planned route. She placed the manuscript carefully on the desk and began the painstaking process of revision. The committee scheduled a follow-up meeting to discus...
{"is_valid":true,"category":{"R":true}}
single
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Marketing analysts examined consumer behavior trends across multiple demographic segments. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Climate scientists continue to refine their mod...
{"is_valid":true,"category":{"Swift":true}}
single
The conference featured keynote speakers from a wide variety of academic backgrounds. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Researchers gathered data from hundreds of households participating in the longitudinal study. Children played in the park while their parent...
{"is_valid":false,"category":{}}
benign
The newly opened gallery showcased contemporary works by emerging regional artists. 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. The technology conference attracted engineers, designe...
{"is_valid":true,"category":{"Bash":true,"Dockerfile":true,"Rust":true}}
multi
Network operators continually upgrade infrastructure to keep pace with growing demand. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Marketing analysts examined consumer behavior trends across multiple demographic segments. The neighborhood gathered every Saturday morning at the small...
{"is_valid":true,"category":{"jq":true}}
single
Add comments to make this clearer: # Build James # # VERSION 1.0 FROM eclipse-temurin:11-jdk-focal # Install git RUN apt-get update RUN apt-get install -y git wget unzip # Install Maven WORKDIR /root RUN wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz RUN tar -xvf apache-...
{"is_valid":true,"category":{"Dockerfile":true}}
single
I copied this from the docs: /** * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
{"is_valid":true,"category":{"Terraform":true}}
single
Run the following: // version 1.0.6   const val SOLAR_DIAMETER = 864938   enum class Planet { MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO } // Yeah, Pluto!   class Star(val name: String) { fun showDiameter() { println("The diameter of the $name is ${"%,d".format(SOLAR_DIAMETER)} mil...
{"is_valid":true,"category":{"Kotlin":true,"C":true,"Swift":true}}
multi
Can you optimize this implementation: #!/usr/bin/perl use warnings; use strict;   use Tk; use List::Util qw(shuffle);     sub altitude { sqrt(3/4) * shift; }     sub polygon_coordinates { my ($x, $y, $size) = @_; my $alt = altitude($size); return ($x - $size, $y, $x - ($size / 2), $y -...
{"is_valid":true,"category":{"Perl":true}}
single