prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
Find any security problems in: package main   import "fmt"   func lcs(a, b string) (output string) { lengths := make([]int, len(a)*len(b)) greatestLength := 0 for i, x := range a { for j, y := range b { if x == y { if i == 0 || j == 0 { lengths[i*len(b...
{"is_valid":true,"category":{"Go":true}}
single
Can you optimize this implementation: find.needle <- function(haystack, needle="needle", return.last.index.too=FALSE) { indices <- which(haystack %in% needle) if(length(indices)==0) stop("no needles in the haystack") if(return.last.index.too) range(indices) else min(indices) }
{"is_valid":true,"category":{"R":true}}
single
Take a look at this: function filter(t, func) local ret = {} for i, v in ipairs(t) do ret[#ret+1] = func(v) and v or nil end return ret end   function even(a) return a % 2 == 0 end   print(unpack(filter({1, 2, 3, 4 ,5, 6, 7, 8, 9, 10}, even)))
{"is_valid":true,"category":{"Lua":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. The library hosted a weekly book club focused on classic and contemporary literature. He walked along the river path, listening to the rustling of leaves overhead. The engineer reviewed the blueprints carefully before approving t...
{"is_valid":true,"category":{"Python":true}}
single
Run the following: // version 1.1.2   import java.math.BigInteger import java.math.BigDecimal   fun Double.isLong(tolerance: Double = 0.0) = (this - Math.floor(this)) <= tolerance || (Math.ceil(this) - this) <= tolerance   fun BigDecimal.isBigInteger() = try { this.toBigIntegerExac
{"is_valid":true,"category":{"Kotlin":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. Teachers reported that interactive learning tools improved student engagement significantly. Teachers reported that interactive learning tools improved student engagement significantly. Quarterly reports indicated a steady rise in...
{"is_valid":true,"category":{"Perl":true}}
single
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Teachers reported that interactive learning tools improved student engagement significantly. Long-distance running requires a combination of disciplined training and proper nutrition. Teachers reported that interactive learning too...
{"is_valid":true,"category":{"Bash":true}}
single
What does this output: use strict; use warnings;   my %dict;   open my $handle, '<', 'unixdict.txt'; while (my $word = <$handle>) { chomp($word); my $len = length $word; if (exists $dict{$len}) { push @{ $dict{ $len } }, $word; } else { my @words = ( $word ); $dict{$len} = \@word...
{"is_valid":true,"category":{"Perl":true,"Terraform":true}}
multi
Please review the following snippet for issues: terraform { backend "azurerm" { storage_account_name = "__terraformstorageaccount__" container_name = "__terraformcontainer__" key = "terraform.tfstate" access_key = "__storagekey__" } } variable "product" { default ...
{"is_valid":true,"category":{"Terraform":true}}
single
The garden looked particularly vibrant after the recent rain. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The committee scheduled a follow-up meeting to discuss the budget allocations. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigret...
{"is_valid":false,"category":{}}
benign
Marketing analysts examined consumer behavior trends across multiple demographic segments. What does this output: using System;   class Program { static void Main(string[] args) { var s = "hello"; Console.Write(s); Console.WriteLine(" literal"); var s2 = s + " literal"; Conso...
{"is_valid":true,"category":{"C#":true,"C++":true,"Makefile":true}}
multi
Engineering teams often adopt iterative methodologies to manage complex software projects. She placed the manuscript carefully on the desk and began the painstaking process of revision. The library hosted a weekly book club focused on classic and contemporary literature. She enjoyed reading historical novels that trans...
{"is_valid":true,"category":{"jq":true,"YAML":true}}
multi
Hikers were advised to carry plenty of water and to inform someone of their planned route. Could you explain what this code does: jq --arg version $(jq --version) '$version' Software architects often debate the merits of monolithic versus microservice designs. Historians continue to debate the significance of the treat...
{"is_valid":true,"category":{"jq":true}}
single
The newly opened gallery showcased contemporary works by emerging regional artists. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Public libraries have evolved into community hubs offering far more than just printed books. Historians continue to debate the significance of ...
{"is_valid":true,"category":{"JavaScript":true}}
single
Take a look at this: # src/backend/nls.mk CATALOG_NAME = postgres AVAIL_LANGUAGES = de es fr ja pt_BR tr zh_CN zh_TW GETTEXT_FILES = + gettext-files GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) \ GUC_check_errmsg GUC_check_errdetail GUC_check_errhint \ write_stderr yyerror parser_yyerror GETTEX...
{"is_valid":true,"category":{"Makefile":true}}
single
The garden looked particularly vibrant after the recent rain. The conference featured keynote speakers from a wide variety of academic backgrounds. He sat by the window with a steaming mug of tea and watched the snow gently falling. The committee scheduled a follow-up meeting to discuss the budget allocations. The comm...
{"is_valid":true,"category":{"Ruby":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. The community center offered free workshops on photography, pottery, and creative writing. Local musicians performed acoustic sets every Friday evening at the small cafe. Project managers stressed the importance of clear documentation throug...
{"is_valid":true,"category":{"JavaScript":true,"Bash":true}}
multi
She enjoyed reading historical novels that transported her to far away places. Policy analysts examined the long-term implications of the proposed legislative reform. Policy analysts examined the long-term implications of the proposed legislative reform. The conference featured keynote speakers from a wide variety of a...
{"is_valid":true,"category":{"Swift":true}}
single
Find any security problems in: --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: labels: app: rbac-manager name: rbacdefinitions.rbacmanager.reactiveops.io spec: group: rbacmanager.reactiveops.io names: kind: RBACDefinition plural: rbacdefinitions singular: rbacdef...
{"is_valid":true,"category":{"YAML":true}}
single
What does this output: object PolynomialRegression extends App { private def xy = Seq(1, 6, 17, 34, 57, 86, 121, 162, 209, 262, 321).zipWithIndex.map(_.swap)   private def polyRegression(xy: Seq[(Int, Int)]): Unit = { val r = xy.indices   def average[U](ts: Iterable[U])(implicit num: Numeric[U]) = num.toDou...
{"is_valid":true,"category":{"Scala":true}}
single
Please review the following snippet for issues: function emit_table { nameref d=$1 typeset -i idx=0 echo "<table>" emit_row th "" "${d[idx++][@]}" for (( ; idx<${#d[@]}; idx++ )); do emit_row td $idx "${d[idx][@]}" done echo "</table>" }   function emit_row { typeset tag=$1; shif...
{"is_valid":true,"category":{"Bash":true}}
single
Take a look at this: #include <iostream> #include <numeric> #include <vector>   template <typename T> std::ostream &operator<<(std::ostream &os, const std::vector<T> &v) { auto it = v.cbegin(); auto end = v.cend();   os << '['; if (it != end) { os << *it; it = std::next(it); } wh...
{"is_valid":true,"category":{"C++":true}}
single
Add comments to make this clearer: FROM python:3.9.10-slim ARG AIM_VERSION RUN pip install Cython==3.0.10 RUN pip install aim==$AIM_VERSION WORKDIR /opt/aim RUN aim init ENTRYPOINT ["aim"] CMD ["up"]
{"is_valid":true,"category":{"Dockerfile":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. Researchers have been studying migration patterns of monarch butterflies for years. Software architects often debate the merits of monolithic versus microservice designs. Children played in the park while their parents chatted on...
{"is_valid":true,"category":{"Java":true}}
single
Engineering teams often adopt iterative methodologies to manage complex software projects. Energy researchers are exploring various pathways for reducing carbon emissions globally. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Late spring rains caused the lake to swell be...
{"is_valid":true,"category":{"R":true,"C++":true}}
multi
He sat by the window with a steaming mug of tea and watched the snow gently falling. 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. Researchers have been studying migration patterns of mon...
{"is_valid":true,"category":{"Lua":true}}
single
He sat by the window with a steaming mug of tea and watched the snow gently falling. Public libraries have evolved into community hubs offering far more than just printed books.
{"is_valid":false,"category":{}}
benign
Marketing analysts examined consumer behavior trends across multiple demographic segments. Researchers have been studying migration patterns of monarch butterflies for years. Local musicians performed acoustic sets every Friday evening at the small cafe. Energy researchers are exploring various pathways for reducing ca...
{"is_valid":true,"category":{"C#":true,"JavaScript":true}}
multi
Run the following: public class Assertions {   public static void main(String[] args) { int a = 13;   // ... some real code here ...   assert a == 42; // Throws an AssertionError when a is not 42.   assert a == 42 : "Error message"; // Throws an AssertionError when a ...
{"is_valid":true,"category":{"Java":true,"Lua":true}}
multi
Local musicians performed acoustic sets every Friday evening at the small cafe. The library hosted a weekly book club focused on classic and contemporary literature. Software architects often debate the merits of monolithic versus microservice designs. Distributed systems demand careful attention to consistency, availa...
{"is_valid":true,"category":{"Scala":true}}
single
I need help debugging this script: #include <curl/curl.h> #include <string.h> #include <stdio.h>   #define from "<sender@duniya.com>" #define to "<addressee@gmail.com>" #define cc "<info@example.org>"   static const char *payload_text[] = { "Date: Mon, 13 Jun 2018 11:30:00 +0100\r\n", "To: " to "\
{"is_valid":true,"category":{"C":true}}
single
He sat by the window with a steaming mug of tea and watched the snow gently falling. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Refactor the function below: function Get-Factorial ($x) { if ($x -eq 0) { return 1 } return $x * (Get-Factorial ($x - 1))...
{"is_valid":true,"category":{"PowerShell":true,"Bash":true}}
multi
Researchers gathered data from hundreds of households participating in the longitudinal study. Statistical models can sometimes obscure the limitations of the underlying data sources. Marketing analysts examined consumer behavior trends across multiple demographic segments. Add comments to make this clearer: # The tput...
{"is_valid":true,"category":{"Bash":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Run the following: #include <vector> #include <utility> #include <iostream> #include <boost/algorithm/string.hpp>   std::string create_xml( std::vector<std::string> & ,std::vector<std::string> & ) ;   int main( ) { std::vect...
{"is_valid":true,"category":{"C++":true,"Ruby":true,"Scala":true}}
multi
Public libraries have evolved into community hubs offering far more than just printed books. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The painting featured warm colors that ...
{"is_valid":true,"category":{"Terraform":true,"JavaScript":true}}
multi
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Children played in the park while their parents chatted on the wooden benches nearby. Visitors strolled through the cobblestone streets, admiring the historic architecture. Marketing analysts examined consumer behavior trends acro...
{"is_valid":true,"category":{"Go":true}}
single
Researchers have been studying migration patterns of monarch butterflies for years. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Network operators continually upgrade infrastructure to...
{"is_valid":true,"category":{"Scala":true}}
single
Network operators continually upgrade infrastructure to keep pace with growing demand. Find any security problems in: #include <algorithm> #include <iostream> #include <cmath> #include <set> #include <vector>   using namespace std;   bool find() { const auto MAX = 250; vector<double> pow5(MAX); for (auto i ...
{"is_valid":true,"category":{"C++":true}}
single
What does this output: package main   import "fmt"   type S struct { start, stop, incr int comment string }   var examples = []S{ {-2, 2, 1, "Normal"}, {-2, 2, 0, "Zero increment"}, {-2, 2, -1, "Increments away from stop value"}, {-2, 2, 10, "First increment is beyond stop value"}, ...
{"is_valid":true,"category":{"Go":true,"Dockerfile":true}}
multi
Historians continue to debate the significance of the treaty signed in that pivotal year. Hikers were advised to carry plenty of water and to inform someone of their planned route. Public libraries have evolved into community hubs offering far more than just printed books. The engineer reviewed the blueprints carefully...
{"is_valid":true,"category":{"jq":true}}
single
Historians continue to debate the significance of the treaty signed in that pivotal year. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Refactor the function below: # "ported" by Adam Miller <maxamillion@fedoraproject.org> from # https://github.com/fedora-cloud/Fedora-Dockerf...
{"is_valid":true,"category":{"Dockerfile":true}}
single
The garden looked particularly vibrant after the recent rain. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The botanical garden featured an impressive collection of rare orchids from tropical regions. She organized her bookshelves by genre and then alphabetically within e...
{"is_valid":true,"category":{"C":true}}
single
Researchers have been studying migration patterns of monarch butterflies for years. Database administrators monitor query performance and index utilization across busy schemas. Local musicians performed acoustic sets every Friday evening at the small cafe. Travelers explored ancient ruins, marveling at the craftsmanshi...
{"is_valid":true,"category":{"SQL":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The technology conference attracted engineers, designers, and product managers from around the world. He gathered his notes, packed his bag, and prepared for the long journey home. Children played in the park while their parents chatte...
{"is_valid":true,"category":{"Terraform":true}}
single
She organized her bookshelves by genre and then alphabetically within each section. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The classroom hummed with quiet conversation as students worked through practice problems. Hikers were advised to carry plenty of water and to ...
{"is_valid":true,"category":{"Ruby":true}}
single
Economic indicators showed a gradual recovery following the previous quarter's downturn. Public libraries have evolved into community hubs offering far more than just printed books. Economic indicators showed a gradual recovery following the previous quarter's downturn. She placed the manuscript carefully on the desk a...
{"is_valid":true,"category":{"Scala":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. Add comments to make this clearer: -- just executing the command os.execute("ls")   -- to execute and capture the output, use io.popen local f = io.popen("ls") -- store the output in a "file" print( f:read("*a") ) -- print out ...
{"is_valid":true,"category":{"Lua":true}}
single
Teachers reported that interactive learning tools improved student engagement significantly. The morning light filtered through the kitchen window as the coffee brewed. Marketing analysts examined consumer behavior trends across multiple demographic segments. The neighborhood gathered every Saturday morning at the smal...
{"is_valid":true,"category":{"AWK":true}}
single
Researchers have been studying migration patterns of monarch butterflies for years. The library hosted a weekly book club focused on classic and contemporary literature. Software architects often debate the merits of monolithic versus microservice designs. He adjusted the telescope and waited patiently for the clouds t...
{"is_valid":false,"category":{}}
benign
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The painting featured warm colors that evoked memories of childhood summers by the sea. Researchers gathered data from hundreds of households participating in the longitudinal study. Climate scientists continue to refine their ...
{"is_valid":true,"category":{"SQL":true}}
single
Astronomers observed a faint signal that appeared to originate from a distant galaxy. She organized her bookshelves by genre and then alphabetically within each section. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Engineering teams often adopt iterative methodologies to mana...
{"is_valid":true,"category":{"Scala":true}}
single
Visitors strolled through the cobblestone streets, admiring the historic architecture. He walked along the river path, listening to the rustling of leaves overhead. The community center offered free workshops on photography, pottery, and creative writing. Network operators continually upgrade infrastructure to keep pac...
{"is_valid":true,"category":{"Ruby":true}}
single
I copied this from the docs: package main   import "fmt"   func main() { s := []int{1, 2, 2, 3, 4, 4, 5}   // There is no output as 'prev' is created anew each time // around the loop and set implicitly to zero. for i := 0; i < len(s); i++ { curr := s[i] var prev int if i > 0 && ...
{"is_valid":true,"category":{"Go":true}}
single
Database administrators monitor query performance and index utilization across busy schemas. 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. The committee scheduled a follow-up meet...
{"is_valid":true,"category":{"Kotlin":true}}
single
The engineer reviewed the blueprints carefully before approving the modifications. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Researchers gathered data from hundreds of households participating in the longitudinal study. Energy researchers are exploring various pathway...
{"is_valid":true,"category":{"jq":true}}
single
The newly opened gallery showcased contemporary works by emerging regional artists. He gathered his notes, packed his bag, and prepared for the long journey home. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The technology conference attracted engineers, designers, and p...
{"is_valid":true,"category":{"Bash":true}}
single
Translate this into another language for me: Function Reverse-Words($lines) { $lines | foreach { $array = $PSItem.Split(' ') $array[($array.Count-1)..0] -join ' ' } }   $lines = "---------- Ice and Fire ------------", "", "fire, in end will world the say Some", "ice. in say Some", "desire of ...
{"is_valid":true,"category":{"PowerShell":true}}
single
What does this output: import math import random   def GammaInc_Q( a, x): a1 = a-1 a2 = a-2 def f0( t ): return t**a1*math.exp(-t)   def df0(t): return (a1-t)*t**a2*math.exp(-t)   y = a1 while f0(y)*(x-y) >2.0e-8 and y < x: y += .3 if y > x: y = x   h = 3.0e-4 n = int...
{"is_valid":true,"category":{"Python":true}}
single
Database administrators monitor query performance and index utilization across busy schemas. Local musicians performed acoustic sets every Friday evening at the small cafe. Historians continue to debate the significance of the treaty signed in that pivotal year. The newly opened gallery showcased contemporary works by ...
{"is_valid":false,"category":{}}
benign
I copied this from the docs: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;   namespace KolakoskiSequence { class Crutch { public readonly int len; public int[] s; public int i;   public Crutch(int len) { ...
{"is_valid":true,"category":{"C#":true}}
single
I need help debugging this script: const VECTORS: [(isize, isize); 4] = [(1, 0), (0, 1), (-1, 0), (0, -1)];   pub fn spiral_matrix(size: usize) -> Vec<Vec<u32>> { let mut matrix = vec![vec![0; size]; size]; let mut movement = VECTORS.iter().cycle(); let (mut x, mut y, mut n) = (-1, 0, 1..);   for (move_...
{"is_valid":true,"category":{"Rust":true}}
single
The committee scheduled a follow-up meeting to discuss the budget allocations. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. She enjoyed reading historical novels that transported her to far away places. The classroom hummed with quiet conversation as students worked throu...
{"is_valid":true,"category":{"Java":true}}
single
The garden looked particularly vibrant after the recent rain. Please review the following snippet for issues: package main   import "fmt"   func main() { fmt.Println("Police Sanitation Fire") fmt.Println("------ ---------- ----") count := 0 for i := 2; i < 7; i += 2 { for j := 1; j < 8; j++ ...
{"is_valid":true,"category":{"Go":true}}
single
Backend services were redesigned to handle the surge in concurrent user requests. Policy analysts examined the long-term implications of the proposed legislative reform. The garden looked particularly vibrant after the recent rain. The morning light filtered through the kitchen window as the coffee brewed. He sat by th...
{"is_valid":true,"category":{"Swift":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The painting featured warm colors that evoked memories...
{"is_valid":true,"category":{"Batch":true}}
single
Economic indicators showed a gradual recovery following the previous quarter's downturn. Translate this into another language for me: --- apiVersion: v1 kind: Service metadata: name: update-api spec: selector: app: rancher-saas-ops role: update-api ports: - name: hattp protocol: TCP port: 9000 ...
{"is_valid":true,"category":{"YAML":true,"Kotlin":true}}
multi
Run the following: (function () {   // n -> [[n]] function magic(n) { return n % 2 ? rotation( transposed( rotation( table(n) ) ) ) : null; }   // [[a]] -> [[a]] function rotation(lst) { return lst.map(function (row, i) { return rotated( row, ((r...
{"is_valid":true,"category":{"JavaScript":true}}
single
Can you optimize this implementation: #include <chrono> #include <iostream> #include <vector> #include <gmpxx.h>   using big_int = mpz_class;   big_int partitions(int n) { std::vector<big_int> p(n + 1); p[0] = 1; for (int i = 1; i <= n; ++i) { for (int k = 1;; ++k) { int j = (k * (3*k - ...
{"is_valid":true,"category":{"C++":true}}
single
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Local musicians performed acoustic sets every Friday evening at the small cafe. Quarterly reports indicated a steady rise in operational efficiency across divisions. I need help debugging this script: # generate octals as stri...
{"is_valid":true,"category":{"jq":true,"Lua":true}}
multi
The engineer reviewed the blueprints carefully before approving the modifications. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The morning light filtered through the kitchen window as the coffee brewed. The morning light filtered through the kitchen window as the coffee ...
{"is_valid":true,"category":{"AWK":true,"SQL":true}}
multi
Marketing analysts examined consumer behavior trends across multiple demographic segments. Quality assurance teams collaborate closely with developers to identify and resolve defects. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Run the following: x <- list(list(1), 2, li...
{"is_valid":true,"category":{"R":true}}
single
Corporate training programs increasingly include modules on collaboration and communication. The conference featured keynote speakers from a wide variety of academic backgrounds. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Climate scientists continue to refine their mod...
{"is_valid":true,"category":{"YAML":true}}
single
I copied this from the docs: ifndef FENCEAGENTSLIB ifdef TARGET SBINDIRT=$(TARGET) endif endif all: $(TARGET) include $(OBJDIR)/make/clean.mk include $(OBJDIR)/make/install.mk include $(OBJDIR)/make/uninstall.mk $(TARGET): ${FENCEPARSE} \ ${SRCDIR}/config/copyright.cf REDHAT_COPYRIGHT \ ${RELEASE_VERSION} \ $...
{"is_valid":true,"category":{"Makefile":true}}
single
Add comments to make this clearer: # Usage: GAWK -f ITERATED_DIGITS_SQUARING.AWK BEGIN { # Setup buffer for results up to 9*9*8 for (i = 1; i <= 648; i++) { k = i do { k = squaredigitsum(k) } while ((k != 1) && (k != 89)) if (k == 1) # This will give us 90 entries ...
{"is_valid":true,"category":{"AWK":true}}
single
Corporate training programs increasingly include modules on collaboration and communication. Find any security problems in: package main   import ( "bytes" "fmt" "math/rand" "time" )   func main() { const ( m, n = 15, 15 t = 1e4 minp, maxp, Δp = 0, 1, 0.1 )   rand.Seed(2) // Fixed se...
{"is_valid":true,"category":{"Go":true}}
single
Quick question about this snippet: extern crate rand;   use rand::Rng;   const POINTS_N: usize = 100;   fn generate_point<R: Rng>(rng: &mut R) -> (i32, i32) { loop { let x = rng.gen_range(-15, 16); // exclusive let y = rng.gen_range(-15, 16);   let r2 = x * x + y * y; if r2 >= 100 &&...
{"is_valid":true,"category":{"Rust":true,"C++":true}}
multi
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Quick question about this snippet: >>> for i in range(16): print('{0:b}'.format(i))   0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 Project managers stressed the importance of clear documentation throughout ...
{"is_valid":true,"category":{"Python":true}}
single
The garden looked particularly vibrant after the recent rain. 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. Visitors strolled through the cobblestone streets, admiring the historic archit...
{"is_valid":true,"category":{"Makefile":true}}
single
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. Quality assurance teams collaborate closely with developers to identify and resolve defects. Researchers have been studying migration patterns ...
{"is_valid":true,"category":{"C":true}}
single
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Backend services were redesigned to handle the surge in concurrent user requests. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Teachers reported that interactive learning ...
{"is_valid":true,"category":{"Batch":true}}
single
Climate scientists continue to refine their models in light of newly available data. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Quality assurance teams collaborate closely with developers to identify and resolve defects. The library hosted a weekly book club focu...
{"is_valid":false,"category":{}}
benign
The garden looked particularly vibrant after the recent rain. Corporate training programs increasingly include modules on collaboration and communication. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Engineering teams often adopt iterative methodologies to manage complex ...
{"is_valid":true,"category":{"PowerShell":true}}
single
The garden looked particularly vibrant after the recent rain. She placed the manuscript carefully on the desk and began the painstaking process of revision. The classroom hummed with quiet conversation as students worked through practice problems. Historians continue to debate the significance of the treaty signed in t...
{"is_valid":true,"category":{"Makefile":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. The committee scheduled a follow-up meeting to discuss the budget allocations. Can you optimize this implementation: sub pi { my $nthrows = shift; ...
{"is_valid":true,"category":{"Perl":true}}
single
Historians continue to debate the significance of the treaty signed in that pivotal year. Researchers have been studying migration patterns of monarch butterflies for years. Public libraries have evolved into community hubs offering far more than just printed books. The garden looked particularly vibrant after the rece...
{"is_valid":true,"category":{"YAML":true}}
single
Children played in the park while their parents chatted on the wooden benches nearby. 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. Children played in the park while their parent...
{"is_valid":true,"category":{"Lua":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The garden looked particularly vibrant after the recent r...
{"is_valid":false,"category":{}}
benign
Quick question about this snippet: #include <time.h> #include <iostream> #include <string>   using namespace std;   class penney { public: penney() { pW = cW = 0; } void gameLoop() { string a; while( true ) { playerChoice = computerChoice = ""; if( rand() % 2 ) { computer(); player()...
{"is_valid":true,"category":{"C++":true}}
single
Project managers stressed the importance of clear documentation throughout the cycle. Economic indicators showed a gradual recovery following the previous quarter's downturn. Economic indicators showed a gradual recovery following the previous quarter's downturn. She placed the manuscript carefully on the desk and bega...
{"is_valid":true,"category":{"C":true}}
single
Please review the following snippet for issues: # Kubernetes assets (kubeconfig, manifests) module "bootstrap" { source = "git::https://github.com/poseidon/terraform-render-bootstrap.git?ref=1ad53d3b1c1ad75a4ed27f124f772fc5dc025245" cluster_name = var.cluster_name api_servers = [format("%s.%s", var.cluster_name...
{"is_valid":true,"category":{"Terraform":true}}
single
Quick question about this snippet: :: Digital Root Task from Rosetta Code Wiki :: Batch File Implementation :: (Base 10)   @echo off setlocal enabledelayedexpansion :: THE MAIN THING for %%x in (9876543214 393900588225 1985989328582 34559) do call :droot %%x echo( pause exit /b :: /THE MAIN THING :: THE FUNCTION
{"is_valid":true,"category":{"Batch":true}}
single
Researchers have been studying migration patterns of monarch butterflies for years. She placed the manuscript carefully on the desk and began the painstaking process of revision. Hikers were advised to carry plenty of water and to inform someone of their planned route. Corporate training programs increasingly include m...
{"is_valid":true,"category":{"SQL":true}}
single
Here is the code I was given: // version 1.0.6   fun main(args: Array<String>) { val a1 = charArrayOf('a', 'b', 'c') val a2 = charArrayOf('A', 'B', 'C') val a3 = intArrayOf(1, 2, 3) for(i in 0 .. 2) println("${a1[i]}${a2[i]}${a3[i]}") println() // For arrays of different sizes we would need to ...
{"is_valid":true,"category":{"Kotlin":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The morning light filtered through the kitchen window...
{"is_valid":true,"category":{"R":true}}
single
The painting featured warm colors that evoked memories of childhood summers by the sea. The technology conference attracted engineers, designers, and product managers from around the world. Project managers stressed the importance of clear documentation throughout the cycle. Farmers depend on accurate weather forecasts...
{"is_valid":true,"category":{"PowerShell":true}}
single
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. Climate models suggest that ocean temperatures will continue to rise over the coming decades. She placed the manuscript carefully on the desk...
{"is_valid":true,"category":{"C++":true}}
single
Please review the following snippet for issues: val s = "World" // Immutables are recommended //> s  : String = World val f2 = () => ", " //Function assigned to variable //> f2  : () => String = <function0> val s1 = "Hello" + f2() + s //> s1  :...
{"is_valid":true,"category":{"Scala":true}}
single
Can you optimize this implementation: # # MIT License # # (C) Copyright 2022 Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, i...
{"is_valid":true,"category":{"YAML":true,"Kotlin":true}}
multi
She enjoyed reading historical novels that transported her to far away places. She organized her bookshelves by genre and then alphabetically within each section. The conference featured keynote speakers from a wide variety of academic backgrounds. Public libraries have evolved into community hubs offering far more tha...
{"is_valid":true,"category":{"Dockerfile":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. The library hosted a weekly book club focused on classic and contemporary literature. The newly opened gallery showcased contemporary works by emerging regional artists. Policy analysts examined the long-term implications of the proposed legi...
{"is_valid":true,"category":{"Python":true,"Bash":true}}
multi