prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
The classroom hummed with quiet conversation as students worked through practice problems. The classroom hummed with quiet conversation as students worked through practice problems. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Farmers depend on accurate weather forecasts to pl...
{"is_valid":true,"category":{"Bash":true}}
single
Production teams refined their processes to minimize waste and improve overall yield. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Project managers stressed the importance of clear documentation throughout the cycle. He sat by the window with a steaming mug of tea and wa...
{"is_valid":true,"category":{"Kotlin":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Project managers stressed the importance of clear documentation throughout the cycle. What does this output: $wc = New-Object Net.WebClient $wc.DownloadString('http://www.rosettacode.org') On a related note, this block: package ...
{"is_valid":true,"category":{"PowerShell":true,"Go":true}}
multi
Researchers gathered data from hundreds of households participating in the longitudinal study. Here is the code I was given: for i in xrange(1, 101): if i % 15 == 0: print "FizzBuzz" elif i % 3 == 0: print "Fizz" elif i % 5 == 0: print "Buzz" else: print i The technology ...
{"is_valid":true,"category":{"Python":true}}
single
The committee scheduled a follow-up meeting to discuss the budget allocations. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Project managers stressed the importance of clear documentation throughout the cycle. The technology conference attracted engineers, designers, and produ...
{"is_valid":true,"category":{"Lua":true,"PowerShell":true}}
multi
He sat by the window with a steaming mug of tea and watched the snow gently falling. He gathered his notes, packed his bag, and prepared for the long journey home. The newly opened gallery showcased contemporary works by emerging regional artists. Children played in the park while their parents chatted on the wooden be...
{"is_valid":false,"category":{}}
benign
Public libraries have evolved into community hubs offering far more than just printed books. Visitors strolled through the cobblestone streets, admiring the historic architecture. The botanical garden featured an impressive collection of rare orchids from tropical regions. Volunteers spent the weekend cleaning up the r...
{"is_valid":false,"category":{}}
benign
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. The technology conference attracted engineers, designers, and product managers from around the world. The community center offered free worksh...
{"is_valid":true,"category":{"Lua":true,"Terraform":true,"Dockerfile":true}}
multi
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Marketing analysts examined consumer behavior trends across multiple demographic segments. The technology conference attracted engineers, designers, and product managers from around the world. Volunteers spent the weekend cleaning u...
{"is_valid":true,"category":{"Go":true}}
single
Run the following: # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.mk $ # # OpenPOWER HostBoot Project # # Contributors Listed Below - COPYRIGHT 2019 # [+] International Business Machines Corp. # # # Licensed unde...
{"is_valid":true,"category":{"Makefile":true}}
single
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Distributed systems demand careful attention to consistency, avai...
{"is_valid":true,"category":{"SQL":true}}
single
Database administrators monitor query performance and index utilization across busy schemas. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Please review the following snippet for issues: static int Fib(int n) { if (n < 0) throw new ArgumentException("Must be non negativ",...
{"is_valid":true,"category":{"C#":true,"Rust":true}}
multi
Children played in the park while their parents chatted on the wooden benches nearby. He walked along the river path, listening to the rustling of leaves overhead. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Visitors strolled through the cobblestone streets, admiring the histori...
{"is_valid":true,"category":{"C#":true}}
single
The garden looked particularly vibrant after the recent rain. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. He sat by the window with a steaming mug of tea and watched the snow gently falling. The morning light filtered through the kitchen window as the coffee brewed. Astronomers o...
{"is_valid":false,"category":{}}
benign
Add comments to make this clearer: guessANumberPlayer <- function(low, high) { boundryErrorCheck(low, high) repeat { guess <- floor(mean(c(low, high))) #Invalid inputs to this switch will simply cause the repeat loop to run again, breaking nothing. switch(guessResult(guess), l = low <- gues...
{"is_valid":true,"category":{"R":true}}
single
She organized her bookshelves by genre and then alphabetically within each section. Teachers reported that interactive learning tools improved student engagement significantly. Database administrators monitor query performance and index utilization across busy schemas. I need help debugging this script: using System; u...
{"is_valid":true,"category":{"C#":true,"Kotlin":true,"C":true}}
multi
The engineer reviewed the blueprints carefully before approving the modifications. Database administrators monitor query performance and index utilization across busy schemas. He walked along the river path, listening to the rustling of leaves overhead. Project managers stressed the importance of clear documentation th...
{"is_valid":true,"category":{"R":true,"SQL":true}}
multi
Quarterly reports indicated a steady rise in operational efficiency across divisions. Policy analysts examined the long-term implications of the proposed legislative reform. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Software architects often debate the merits of monol...
{"is_valid":true,"category":{"Batch":true}}
single
The classroom hummed with quiet conversation as students worked through practice problems. Policy analysts examined the long-term implications of the proposed legislative reform. Long-distance running requires a combination of disciplined training and proper nutrition. Software architects often debate the merits of mon...
{"is_valid":true,"category":{"Terraform":true}}
single
Engineering teams often adopt iterative methodologies to manage complex software projects. Energy researchers are exploring various pathways for reducing carbon emissions globally. I need help debugging this script: java.awt.Toolkit.getDefaultToolkit().beep() The chef prepared a simple meal of roasted vegetables, fresh...
{"is_valid":true,"category":{"Scala":true}}
single
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Can you optimize this implementation: # 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 c...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Please review the following snippet for issues: // It's worth noting here that this alarm can never be triggered by the statistic comparison. // AWS doesn't record a metric if the value is 0 // The alarm will be triggered when the metric is not emitted due to the breaching poicy on missing data resource "aws_cloudwatc...
{"is_valid":true,"category":{"Terraform":true}}
single
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Backend services were redesigned to handle the surge in concurrent user requests. Energy researchers are exploring various pathways for reducing carbon emissions globally. Nutritionists generally recommend a balanced diet rich ...
{"is_valid":true,"category":{"C++":true}}
single
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 bakery on the corner was famous for its sourdough loaves and seasonal pastries. Run the following: import Foundation   public str...
{"is_valid":true,"category":{"Swift":true,"Dockerfile":true}}
multi
The technology conference attracted engineers, designers, and product managers from around the world. Translate this into another language for me: FROM registry.redhat.io/rhel8/buildah:latest # For simplicity, /tmp/build contains the inputs we’ll be building when we # run this custom builder image. Normally the custom ...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Climate scientists continue to refine their models in light of newly available data. Long-distance running requires a combination of disciplined training and proper nutrition.
{"is_valid":false,"category":{}}
benign
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. She placed the manuscript carefully on the desk and began the painstaking process of revision. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The classroom hummed with quiet conversation as ...
{"is_valid":true,"category":{"Swift":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Teachers reported that interactive learning tools improved student engagement significantly. The newly opened gallery showcased contemporary works by emerging regional artists. Late spring rains caused the lake to swell beyond ...
{"is_valid":true,"category":{"Go":true,"R":true}}
multi
Engineering teams often adopt iterative methodologies to manage complex software projects. Climate scientists continue to refine their models in light of newly available data. Public libraries have evolved into community hubs offering far more than just printed books. She drafted a detailed agenda for the upcoming retr...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Add comments to make this clearer: class FlipBoard def initialize(size) raise ArgumentError.new("Invalid board size: #{size}") if size < 2   @size = size @board = Array.new(size**2, 0)   randomize_board loop do @target = generate_target break unless solved? end   # these are u...
{"is_valid":true,"category":{"Ruby":true}}
single
Researchers gathered data from hundreds of households participating in the longitudinal study. Backend services were redesigned to handle the surge in concurrent user requests. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Policy analysts examined the long-term implication...
{"is_valid":true,"category":{"Swift":true}}
single
Can you optimize this implementation: import java.awt.*; import javax.swing.*;   public class FibonacciWordFractal extends JPanel { String wordFractal;   FibonacciWordFractal(int n) { setPreferredSize(new Dimension(450, 620)); setBackground(Color.white); wordFractal = wordFractal(n); ...
{"is_valid":true,"category":{"Java":true,"AWK":true}}
multi
The engineer reviewed the blueprints carefully before approving the modifications. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. He wandered through the old bookstore, occasionall...
{"is_valid":true,"category":{"Python":true}}
single
Could you explain what this code does: #!/usr/bin/perl   use strict; # https://rosettacode.org/wiki/Verhoeff_algorithm use warnings;   my @inv = qw(0 4 3 2 1 5 6 7 8 9);   my @d = map [ split ], split /\n/, <<END; 0 1 2 3 4 5 6 7 8 9 1 2 3 4 0 6 7 8 9 5 2 3 4 0 1 7 8 9 5 6 3 4 0 1 2 8 9...
{"is_valid":true,"category":{"Perl":true}}
single
Can you optimize this implementation: # syntax: GAWK -f DRAW_A_CUBOID.AWK [-v x=?] [-v y=?] [-v z=?] # example: GAWK -f DRAW_A_CUBOID.AWK -v x=12 -v y=4 -v z=6 # converted from VBSCRIPT BEGIN { init_sides() draw_cuboid(2,3,4) draw_cuboid(1,1,1) draw_cuboid(6,2,1) exit (errors == 0) ? 0 : 1 } functio...
{"is_valid":true,"category":{"AWK":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. Researchers have been studying migration patterns of monarch butterflies for years. Volunteers spent the weekend cleaning up the riverside trail and planti...
{"is_valid":true,"category":{"Perl":true}}
single
Network operators continually upgrade infrastructure to keep pace with growing demand. Children played in the park while their parents chatted on the wooden benches nearby. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Late spring rains caused the lake to swell beyond its...
{"is_valid":true,"category":{"YAML":true}}
single
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.
{"is_valid":false,"category":{}}
benign
Translate this into another language for me: #[derive(Clone, Debug)] pub struct LineComposer<I> { words: I, width: usize, current: Option<String>, }   impl<I> LineComposer<I> { pub(crate) fn new<S>(words: I, width: usize) -> Self where I: Iterator<Item = S>, S: AsRef<str>, { ...
{"is_valid":true,"category":{"Rust":true}}
single
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Corporate training programs increasingly inc...
{"is_valid":true,"category":{"Bash":true}}
single
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Can you optimize this implementation: # syntax: GAWK -f TAU_FUNCTION.AWK BEGIN { print("The tau functions for the first 100 positive integers:") for (i=1; i<=100; i++) { printf("%2d ",count_divisors(i)) if ...
{"is_valid":true,"category":{"AWK":true}}
single
The newly opened gallery showcased contemporary works by emerging regional artists. Here is the code I was given: $seconds = <>; print "Sleeping...\n"; sleep $seconds; # number is in seconds print "Awake!\n";
{"is_valid":true,"category":{"Perl":true}}
single
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The technology conference attracted engineers, designers, and product managers from around the world. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The chef prepared a simple meal of roas...
{"is_valid":false,"category":{}}
benign
I need help debugging this script: package main   import ( "bufio" "bytes" "fmt" "log" "math/rand" "os" "time" )   func main() { rand.Seed(time.Now().UnixNano()) answers := [...]string{ "It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely", "You may rely on it", "As I see it, yes", ...
{"is_valid":true,"category":{"Go":true,"Lua":true,"Makefile":true}}
multi
The technology conference attracted engineers, designers, and product managers from around the world. Could you explain what this code does: var letters = [Character]()   for i in 97...122 { let char = Character(UnicodeScalar(i)) letters.append(char) } Economic indicators showed a gradual recovery following the...
{"is_valid":true,"category":{"Swift":true}}
single
Please review the following snippet for issues: #include <stdio.h> #include <stdlib.h> #include <gmp.h>   typedef unsigned long long int u64;   #define TRUE 1 #define FALSE 0   int primality_pretest(u64 k) { if (!(k % 3) || !(k % 5) || !(k % 7) || !(k % 11) || !(k % 13) || !(k % 17) || !(k % 19) || !(k % 23)) re...
{"is_valid":true,"category":{"C":true}}
single
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Network operators continually upgrade infrastructure to keep pace with growing demand. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The committee scheduled a follow-up meeting to...
{"is_valid":true,"category":{"Bash":true,"Ruby":true}}
multi
The botanical garden featured an impressive collection of rare orchids from tropical regions. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Project managers stressed the importance of clear documentation throughout the cycle. Local musicians performed acoustic sets every F...
{"is_valid":true,"category":{"Batch":true}}
single
The conference featured keynote speakers from a wide variety of academic backgrounds. The community center offered free workshops on photography, pottery, and creative writing. Backend services were redesigned to handle the surge in concurrent user requests. Farmers depend on accurate weather forecasts to plan their pl...
{"is_valid":true,"category":{"R":true}}
single
I need help debugging this script: #include <stdio.h> #include <stdlib.h>   typedef struct exception { int extype; char what[128]; } exception;   typedef struct exception_ctx { exception * exs; int size; int pos; } exception_ctx;   exception_ctx * Create_Ex_Ctx(int length) { ...
{"is_valid":true,"category":{"C":true}}
single
Refactor the function below: # # 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 # (t...
{"is_valid":true,"category":{"Dockerfile":true}}
single
He sat by the window with a steaming mug of tea and watched the snow gently falling. Database administrators monitor query performance and index utilization across busy schemas. Please review the following snippet for issues: package main   import "fmt"   var a = map[string]bool{"John": true, "Bob": true, "Mary": true,...
{"is_valid":true,"category":{"Go":true}}
single
I need help debugging this script: using System; using System.Linq; using System.Text; using System.Text.RegularExpressions;   namespace MadLibs_RosettaCode { class Program { static void Main(string[] args) { string madLibs = @"Write a program to create a Mad Libs like story. The program should read an arbitr...
{"is_valid":true,"category":{"C#":true}}
single
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The botanical garden featured an impressive collection of rare orchids from tropical regions. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Backend services were redesigned to handle the sur...
{"is_valid":true,"category":{"Kotlin":true}}
single
Quality assurance teams collaborate closely with developers to identify and resolve defects. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The painting featured warm colors that evoked memories of childhood summers by the sea. Quality assurance teams collaborate closely with develo...
{"is_valid":true,"category":{"Bash":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. 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. The library hosted a weekly book club focused on classic and conte...
{"is_valid":true,"category":{"Go":true}}
single
Here is the code I was given: # 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
Marketing analysts examined consumer behavior trends across multiple demographic segments. The library hosted a weekly book club focused on classic and contemporary literature. Quick question about this snippet: import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IO...
{"is_valid":true,"category":{"Java":true}}
single
Backend services were redesigned to handle the surge in concurrent user requests. Network operators continually upgrade infrastructure to keep pace with growing demand. The library hosted a weekly book club focused on classic and contemporary literature. He wandered through the old bookstore, occasionally pulling a wor...
{"is_valid":true,"category":{"Bash":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Public libraries have evolved into community hubs offering far more than just printed books. Policy analysts examined the long-term implications of the proposed legislative reform. Engineering teams often adopt iterative methodologies ...
{"is_valid":true,"category":{"C":true,"Rust":true}}
multi
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Local potters fired their kilns once a mon...
{"is_valid":true,"category":{"Scala":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. The committee scheduled a follow-up meeting to discuss the budget allocations. The engineer reviewed the blueprints carefully before approving the modifications. She organized her bookshelves by genre and then alphabetically within e...
{"is_valid":true,"category":{"jq":true}}
single
He sat by the window with a steaming mug of tea and watched the snow gently falling. Find any security problems in: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: app.kubernetes.io/component: metrics app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/managed-by...
{"is_valid":true,"category":{"YAML":true}}
single
What does this output: #include <stdio.h> #include <stdlib.h>   typedef struct exception { int extype; char what[128]; } exception;   typedef struct exception_ctx { exception * exs; int size; int pos; } exception_ctx;   exception_ctx * Create_Ex_Ctx(int length) { const in...
{"is_valid":true,"category":{"C":true}}
single
Could you explain what this code does: #include <iostream>   int main() { // a numeric literal with decimal point is a double auto double1 = 2.5;   // an 'f' of 'F' suffix means the literal is a flaot auto float1 = 2.5f;   // an 'l' or 'L' suffix means a long double auto longdouble1 = 2.5l;   // a number...
{"is_valid":true,"category":{"C++":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. Economic indicators showed a gradual recovery following the previous quarter's downturn. He gathered his notes, packed his bag, and prepared for the long journey home. Policy analysts examined the long-term implications of the pr...
{"is_valid":true,"category":{"PowerShell":true}}
single
Astronomers observed a faint signal that appeared to originate from a distant galaxy. The newly opened gallery showcased contemporary works by emerging regional artists. Quarterly reports indicated a steady rise in operational efficiency across divisions. The neighborhood gathered every Saturday morning at the small fa...
{"is_valid":true,"category":{"R":true}}
single
Run the following: >>> from proper_divisors import proper_divs >>> from collections import Counter >>> >>> rangemax = 20000 >>> >>> def pdsum(n): ... return sum(proper_divs(n)) ... >>> def classify(n, p): ... return 'perfect' if n == p else 'abundant' if p > n else 'deficient' ... >>> classes = Counter(clas...
{"is_valid":true,"category":{"Python":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Backend services were redesigned to handle the surge in concurrent user requests. Historians continue to debate the significance of the treaty signed in that pivotal year. The classroom hummed with quiet conversation as students worked...
{"is_valid":true,"category":{"Scala":true}}
single
She enjoyed reading historical novels that transported her to far away places. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Translate this into another language for me: #!/bin/sh accumulator() { # Define a global function named $1 # with a global variable named ${1}_sum. ev...
{"is_valid":true,"category":{"Bash":true,"PowerShell":true}}
multi
The library hosted a weekly book club focused on classic and contemporary literature. Historians continue to debate the significance of the treaty signed in that pivotal year. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Modern microprocessors rely on pipelining and out-of-order e...
{"is_valid":true,"category":{"Rust":true}}
single
The morning light filtered through the kitchen window as the coffee brewed. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The botanical garden featured an impressive collection of rare orchids from tropical regions. Teachers reported that interactive learning tools improved s...
{"is_valid":true,"category":{"YAML":true}}
single
Teachers reported that interactive learning tools improved student engagement significantly. 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. Production teams refined their processes to ...
{"is_valid":true,"category":{"Rust":true}}
single
Quick question about this snippet: USB_VID = 0x239A USB_PID = 0x80CA USB_PRODUCT = "Matrix Portal M4" USB_MANUFACTURER = "Adafruit Industries LLC" CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ # Include these
{"is_valid":true,"category":{"Makefile":true}}
single
Here is the code I was given: package utm.scala   import scala.annotation.tailrec import scala.language.implicitConversions   /** * Implementation of Universal Turing Machine in Scala that can simulate an arbitrary * Turing machine on arbitrary input * * @author Abdulla Abdurakhmanov (https://github.com/abdolen...
{"is_valid":true,"category":{"Scala":true}}
single
He sat by the window with a steaming mug of tea and watched the snow gently falling. Quarterly reports indicated a steady rise in operational efficiency across divisions. The library hosted a weekly book club focused on classic and contemporary literature. He walked along the river path, listening to the rustling of le...
{"is_valid":true,"category":{"Batch":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. Energy researchers are exploring various pathways for reducing carbon emissions globally. Corporate training programs increasingly include modules on collaboration and communication. Researchers gathered data from hund...
{"is_valid":true,"category":{"PowerShell":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. 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. She placed the manuscript carefully on the desk and be...
{"is_valid":true,"category":{"R":true}}
single
Refactor the function below: def arithmeticMean(n: Seq[Int]) = n.sum / n.size.toDouble def geometricMean(n: Seq[Int]) = math.pow(n.foldLeft(1.0)(_*_), 1.0 / n.size.toDouble) def harmonicMean(n: Seq[Int]) = n.size / n.map(1.0 / _).sum   var nums = 1 to 10 var a = arithmeticMean(nums) var g = geometricMean(
{"is_valid":true,"category":{"Scala":true}}
single
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. Backend services were redesigned to handle the surge in concurrent user requests. Astronomers observed a faint signal that appeared to or...
{"is_valid":true,"category":{"PowerShell":true}}
single
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. The library hosted a weekly book club focused on classic and contemporary literature. Please review the following snippet for issues: import ...
{"is_valid":true,"category":{"Swift":true}}
single
Backend services were redesigned to handle the surge in concurrent user requests. Project managers stressed the importance of clear documentation throughout the cycle. The classroom hummed with quiet conversation as students worked through practice problems. Add comments to make this clearer: # Item struct to represent...
{"is_valid":true,"category":{"Ruby":true}}
single
Can you optimize this implementation: use std::ops::{Index, IndexMut};   fn main() { let m = matrix( vec![ 2., -1., 5., 1., 3., 2., 2., -6., 1., 3., 3., -1., 5., -2., -3., 3., ], 4, ); let mm = m.solve(&vec![-3., -32., -47., 49.]); println!("{:?}", mm); }   #[derive(C...
{"is_valid":true,"category":{"Rust":true}}
single
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Please review the following snippet for issues: CREATE TABLE school (Denomination VARCHAR, Founded INTEGER); SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900 He adju...
{"is_valid":true,"category":{"SQL":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. He wandered through the old bookstore, occasionall...
{"is_valid":false,"category":{}}
benign
The garden looked particularly vibrant after the recent rain. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. 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. T...
{"is_valid":true,"category":{"PowerShell":true}}
single
Could you explain what this code does: using System; using System.Threading;   class Program { static void Main(string[] args) { int sleep = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Sleeping..."); Thread.Sleep(sleep); //milliseconds Console.WriteLine("Awake!");
{"is_valid":true,"category":{"C#":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. She enjoyed reading historical novels that transported her to far away places. Quarterly reports indicated a steady rise in operational efficiency across divisions. Policy analysts examined the long-term implications of the propose...
{"is_valid":true,"category":{"R":true}}
single
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Here is the code I was given: e <- simpleError("This is a simpleError")
{"is_valid":true,"category":{"R":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Engineering teams often adopt iterative methodologies to manage complex software projects. The newly opened gallery showcased contemporary wo...
{"is_valid":true,"category":{"C++":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Project managers stressed the importance of clear documentation throughout the cycle.
{"is_valid":false,"category":{}}
benign
Could you explain what this code does: using System; using System.Collections.Generic;   namespace BoxTheCompass { class Compass { string[] cp = new string[] {"North", "North by east", "North-northeast", "Northeast by north", "Northeast","Northeast by east", "East-northeast", "East by north", "Eas...
{"is_valid":true,"category":{"C#":true}}
single
Project managers stressed the importance of clear documentation throughout the cycle. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Production teams refined their processes to minimize waste and improve overall yield. Backend services were redesigned to handle the s...
{"is_valid":true,"category":{"Scala":true}}
single
Run the following: '''A131382'''   from itertools import count, islice     # a131382 :: [Int] def a131382(): '''An infinite series of the terms of A131382''' return ( elemIndex(x)( productDigitSums(x) ) for x in count(1) )     # productDigitSums :: Int -> [In
{"is_valid":true,"category":{"Python":true}}
single
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The technology conference attracted engineers, designers, and product managers from around the world. She enjoyed reading historical novels t...
{"is_valid":true,"category":{"YAML":true}}
single
Run the following: top = `{pwd} root = ${top}/root #arch = i486 arch = x86_64 libcroot = ${root}/opt/cross/${arch}-linux-musl/${arch}-linux-musl nprocs = 4 version = 0.0 mirror = http://dl.2f30.org/morpheus-pkgs/${arch}/${version} CC = ${arch}-linux-musl-gcc # these don't work for all packages yet... optldflags = -s -...
{"is_valid":true,"category":{"Makefile":true,"Swift":true,"Kotlin":true}}
multi
Hikers were advised to carry plenty of water and to inform someone of their planned route. She enjoyed reading historical novels that transported her to far away places. The morning light filtered through the kitchen window as the coffee brewed. The classroom hummed with quiet conversation as students worked through pr...
{"is_valid":true,"category":{"Ruby":true}}
single
I copied this from the docs: using System; using System.IO; using System.Linq; using System.Text;   class Program { static char Rot13(char c) { if ('a' <= c && c <= 'm' || 'A' <= c && c <= 'M') { return (char)(c + 13); } if ('n' <= c && c <= 'z' || 'N' <= c && c <= 'Z...
{"is_valid":true,"category":{"C#":true}}
single
Public libraries have evolved into community hubs offering far more than just printed books. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Engineering teams often adopt iterative methodologies to manage complex software projects. Engineering teams often adopt iterative methodol...
{"is_valid":false,"category":{}}
benign
Quick question about this snippet: use List::Util qw(sum); use constant pi => 3.14159265;   sub legendre_pair { my($n, $x) = @_; if ($n == 1) { return $x, 1 } my ($m1, $m2) = legendre_pair($n - 1, $x); my $u = 1 - 1 / $n; (1 + $u) * $x * $m1 - $u * $m2, $m1; }   sub legendre { my($n, $x) = @_; ...
{"is_valid":true,"category":{"Perl":true}}
single