prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
Translate this into another language for me: [datetime]$start = Get-Date   [int]$count = 3   [timespan[]]$times = for ($i = 0; $i -lt $count; $i++) { Measure-Command {0..999999 | Out-Null} }   [datetime]$end = Get-Date   $rate = [PSCustomObject]@{ StartTime = $start EndTime = $end Duration ...
{"is_valid":true,"category":{"PowerShell":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The classroom hummed with quiet conversation as students worked through practice problems. Can you optimize this implementation: trait Camera {} trait MobilePhone {} trait CameraPhone: Camera + MobilePhone {} Alongside it, thi...
{"is_valid":true,"category":{"Rust":true,"Ruby":true}}
multi
Software architects often debate the merits of monolithic versus microservice designs. Take a look at this: sub perf { my $n = shift; my $sum = 0; foreach my $i (1..$n-1) { if ($n % $i == 0) { $sum += $i; } } return $sum == $n; } Engineering teams often adopt iterative me...
{"is_valid":true,"category":{"Perl":true}}
single
Translate this into another language for me: var beer = 99; while (beer > 0) { var verse = [ beer + " bottles of beer on the wall,", beer + " bottles of beer!", "Take one down, pass it around", (beer - 1) + " bottles of beer on the wall!" ].join("\n");   console.log(verse);   beer--; }
{"is_valid":true,"category":{"JavaScript":true}}
single
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. He sat by the window with a steaming mug of tea and watched the snow gently falling. He sat by the window with a steaming mug of tea and watched the sn...
{"is_valid":true,"category":{"Lua":true}}
single
Find any security problems in: def jacobi(a, n) raise ArgumentError.new "n must b positive and odd" if n < 1 || n.even? res = 1 until (a %= n) == 0 while a.even? a >>= 1 res = -res if [3, 5].include? n % 8 end a, n = n, a res = -res if [a % 4, n % 4] == [3, 3] end n == 1 ? res : 0 ...
{"is_valid":true,"category":{"Ruby":true}}
single
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. Researchers have been studying migration patterns of monarch butterflies for years. The bakery on the corner was famous for its sourdo...
{"is_valid":true,"category":{"Swift":true}}
single
Quality assurance teams collaborate closely with developers to identify and resolve defects. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Public libraries have evolved into community hubs offerin...
{"is_valid":true,"category":{"Rust":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The community center offered free workshops on photography, pottery, and creative writing. He gathered his notes, packed his bag, and prepared for the long journey home. Project managers stressed the importance of clear documen...
{"is_valid":true,"category":{"Terraform":true}}
single
Visitors strolled through the cobblestone streets, admiring the historic architecture. The morning light filtered through the kitchen window as the coffee brewed. Quick question about this snippet: function map(f, a, ...) if a then return f(a), map(f, ...) end end function incr(k) return function(a) return k > a and a ...
{"is_valid":true,"category":{"Lua":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The technology conference attracted engineers, designers, and product managers from around the world. Network operators continually upgrade i...
{"is_valid":true,"category":{"C":true}}
single
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The morning light filtered through the kitchen window as the coffee brewed. Quality assurance teams collaborate closely with de...
{"is_valid":true,"category":{"R":true}}
single
Backend services were redesigned to handle the surge in concurrent user requests. Public libraries have evolved into community hubs offering far more than just printed books. Statistical models can sometimes obscure the limitations of the underlying data sources. The engineer reviewed the blueprints carefully before ap...
{"is_valid":true,"category":{"SQL":true}}
single
What does this output: #!/bin/python from __future__ import print_function   class Node(object): def __init__(self): self.edges = {} # edges (or forward links) self.link = None # suffix link (backward links) self.len = 0 # the length of the node   class Eertree(object): def __init__(self): self.nodes = [] #...
{"is_valid":true,"category":{"Python":true}}
single
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The morning light filtered through the kitchen window as the coffee brewed. Corporate training programs increasingly include module...
{"is_valid":true,"category":{"Java":true}}
single
She placed the manuscript carefully on the desk and began the painstaking process of revision. Can you optimize this implementation: @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION   for /l %%i in (1,1,5) do ( SET line= for /l %%j in (1,1,%%i) do ( SET line=!line!* ) ECHO !line! )   ENDLOCAL Public li...
{"is_valid":true,"category":{"Batch":true}}
single
Refactor the function below: // This version is based on the Go version on Rosettacode   #[derive(PartialEq, Debug, Copy, Clone)] enum Month { May, June, July, August, }   #[derive(PartialEq, Debug, Copy, Clone)] struct Birthday { month: Month, day: u8, }   impl Birthday { fn month_unique_in...
{"is_valid":true,"category":{"Rust":true}}
single
Production teams refined their processes to minimize waste and improve overall yield. Researchers have been studying migration patterns of monarch butterflies for years. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The bakery on the corner was famous for its sourdough loaves and s...
{"is_valid":true,"category":{"Scala":true}}
single
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Statistical models can sometimes obscure the limita...
{"is_valid":true,"category":{"jq":true}}
single
Engineering teams often adopt iterative methodologies to manage complex software projects. The morning light filtered through the kitchen window as the coffee brewed. He sat by the window with a steaming mug of tea and watched the snow gently falling. Teachers reported that interactive learning tools improved student e...
{"is_valid":true,"category":{"Rust":true}}
single
The newly opened gallery showcased contemporary works by emerging regional artists. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Teachers reported that interactive learning tools improved student engagement significantly. The neighborhood gathered every Saturday morning at the small ...
{"is_valid":true,"category":{"Bash":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. Production teams refined their processes to minimize waste and improve overall yield. Take a look at this: import org.apache.directory.api.ldap.model.exception.LdapException import org.apache.directory.ldap.client.api.LdapNetworkConnection im...
{"is_valid":true,"category":{"Kotlin":true,"YAML":true}}
multi
I copied this from the docs: package main   import ( "errors" "fmt" )   func TokenizeString(s string, sep, escape rune) (tokens []string, err error) { var runes []rune inEscape := false for _, r := range s { switch { case inEscape: inEscape = false fallthrough default: runes = append(rune
{"is_valid":true,"category":{"Go":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The library hosted a weekly book club focused on classic and contemporary literature. Farmers depend on accurate weather forecasts to plan the...
{"is_valid":true,"category":{"YAML":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, Vers
{"is_valid":true,"category":{"Dockerfile":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. Local potters fired their kilns once a month, producing colorful ceramics for the shops. I copied this from the docs: import java.util.LinkedList;   public class RPN{ public static void main(String[] args) { evalRPN("3 4 2 * 1...
{"is_valid":true,"category":{"Java":true}}
single
Run the following: # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/import/chips/p9/procedures/hwp/memory/p9_mss_scominit.mk $ # # OpenPOWER HostBoot Project # # Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # # Licensed under the Apach...
{"is_valid":true,"category":{"Makefile":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Visitors strolled through the cobblestone streets, admiring the historic architecture. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Policy analysts examined the long-term implications ...
{"is_valid":false,"category":{}}
benign
Here is the code I was given: package main   import "fmt"   var table = [10][10]byte{ {0, 3, 1, 7, 5, 9, 8, 6, 4, 2}, {7, 0, 9, 2, 1, 5, 4, 8, 6, 3}, {4, 2, 0, 6, 8, 7, 1, 3, 5, 9}, {1, 7, 5, 0, 9, 8, 3, 4, 2, 6}, {6, 1, 2, 3, 0, 4, 5, 9, 7, 8}, {3, 6, 7, 4, 2, 0, 9, 5, 8, 1}, {5,
{"is_valid":true,"category":{"Go":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Farmers depend on accurate weather forecasts to plan th...
{"is_valid":true,"category":{"Rust":true}}
single
Could you explain what this code does: local maxIterations = 250 local minX, maxX, minY, maxY = -2.5, 2.5, -2.5, 2.5 local miX, mxX, miY, mxY function remap( x, t1, t2, s1, s2 ) local f = ( x - t1 ) / ( t2 - t1 ) local g = f * ( s2 - s1 ) + s1 return g; end function drawMandelbrot() local pts, a, as, za...
{"is_valid":true,"category":{"Lua":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Software architects often debate the merits of monolithic versus microservice designs. Hikers were advised to carry plenty of water and to inform som...
{"is_valid":true,"category":{"Makefile":true,"Ruby":true}}
multi
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Researchers have been studying migration patterns of monarch butterflies for years. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Could you explain what this code does: using System; using...
{"is_valid":true,"category":{"C#":true}}
single
The conference featured keynote speakers from a wide variety of academic backgrounds. Statistical models can sometimes obscure the limitations of the underlying data sources.
{"is_valid":false,"category":{}}
benign
Quarterly reports indicated a steady rise in operational efficiency across divisions. The garden looked particularly vibrant after the recent rain. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. He sat by the window with a steaming mug of tea and watched the snow gently fa...
{"is_valid":true,"category":{"Rust":true}}
single
Project managers stressed the importance of clear documentation throughout the cycle. Researchers gathered data from hundreds of households participating in the longitudinal study. Production teams refined their processes to minimize waste and improve overall yield. Backend services were redesigned to handle the surge ...
{"is_valid":false,"category":{}}
benign
She organized her bookshelves by genre and then alphabetically within each section. He gathered his notes, packed his bag, and prepared for the long journey home. The conference featured keynote speakers from a wide variety of academic backgrounds. He wandered through the old bookstore, occasionally pulling a worn pape...
{"is_valid":true,"category":{"Rust":true,"Lua":true}}
multi
Production teams refined their processes to minimize waste and improve overall yield. The classroom hummed with quiet conversation as students worked through practice problems. Translate this into another language for me: import java.util.*;   public class Mode { public static <T> List<T> mode(List<? extends T> col...
{"is_valid":true,"category":{"Java":true}}
single
Project managers stressed the importance of clear documentation throughout the cycle. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Researchers gathered data from hundreds of households participating in the longitudinal study. Volunteers spent the weekend cleaning up the riverside...
{"is_valid":true,"category":{"R":true}}
single
Find any security problems in: resource "aws_network_interface" "master" { count = "${ var.master_node_count }" subnet_id = "${ var.subnet_private_id }" private_ips = [ "${ var.subnet_prefix }.${ count.index + 10 }" ] security_groups = [ "${ var.master_security }" ] source_dest_check = false } resource "aws_...
{"is_valid":true,"category":{"Terraform":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. Production teams refined their processes to minimize waste and improve overall yield. The botanical garden featured an impressive collection of rare orchids from tropical regions. She drafted a detailed agenda for the upcoming retr...
{"is_valid":false,"category":{}}
benign
The classroom hummed with quiet conversation as students worked through practice problems. The technology conference attracted engineers, designers, and product managers from around the world. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Quality assurance teams col...
{"is_valid":true,"category":{"Go":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Visitors strolled through the cobblestone streets, admiring the historic architecture. Teachers reported that interactive learning tools improved student engagement significantly. The botanical garden featured an impressive col...
{"is_valid":false,"category":{}}
benign
Run the following: use std::cmp::{max, min};   static TENS: [u64; 20] = [ 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 1000000000...
{"is_valid":true,"category":{"Rust":true}}
single
I need help debugging this script: class Node def initialize(length, edges = {}, suffix = 0) @length = length @edges = edges @suffix = suffix end   attr_reader :length attr_reader :edges attr_accessor :suffix end   EVEN_ROOT = 0 ODD_ROOT = 1   def eertree(s) tree = [ ...
{"is_valid":true,"category":{"Ruby":true}}
single
Translate this into another language for me: sub cholesky { my $matrix = shift; my $chol = [ map { [(0) x @$matrix ] } @$matrix ]; for my $row (0..@$matrix-1) { for my $col (0..$row) { my $x = $$matrix[$row][$col]; $x -= $$chol[$row][$_]*$$chol[$col][$_] for 0..$col; $$chol[$row][$col...
{"is_valid":true,"category":{"Perl":true}}
single
What does this output: def properDivisors(n: Int) = (1 to n/2).filter(i => n % i == 0) def classifier(i: Int) = properDivisors(i).sum compare i val groups = (1 to 20000).groupBy( classifier ) println("Deficient: " + groups(-1).length) println("Abundant: " + groups(1).length) println("Perfect: " + groups(0).length + " (...
{"is_valid":true,"category":{"Scala":true}}
single
Find any security problems in: tau <- function(t) { results <- integer(0) resultsCount <- 0 n <- 1 while(resultsCount != t) { condition <- function(n) (n %% length(c(Filter(function(x) n %% x == 0, seq_len(n %/% 2)), n))) == 0 if(condition(n)) { resultsCount <- resultsCount + 1 results...
{"is_valid":true,"category":{"R":true}}
single
Quarterly reports indicated a steady rise in operational efficiency across divisions. He sat by the window with a steaming mug of tea and watched the snow gently falling. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Children played in the park while their parents chatted on the ...
{"is_valid":true,"category":{"Terraform":true,"Makefile":true}}
multi
Engineering teams often adopt iterative methodologies to manage complex software projects. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Hikers were advised to carry plenty of wate...
{"is_valid":false,"category":{}}
benign
Corporate training programs increasingly include modules on collaboration and communication. Refactor the function below: def hailstone n seq = [n] until n == 1 n = (n.even?) ? (n / 2) : (3 * n + 1) seq << n end seq end   puts "for n = 27, show sequence length and first and last 4 elements" hs27 = hails...
{"is_valid":true,"category":{"Ruby":true}}
single
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. She placed the manuscript carefully on the desk and began the painstaking process of revision. Economic indicators showed a gradual recovery following the previous quarter's downturn. Climate models suggest that ocean temperatu...
{"is_valid":true,"category":{"Dockerfile":true,"jq":true,"Python":true}}
multi
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Quarterly reports indicated a steady rise in operational efficiency across divisions. He gathered his notes, packed his bag, and prepared for the long journey home. Software architects often debate the merits of monolithic versus mi...
{"is_valid":true,"category":{"Perl":true}}
single
She enjoyed reading historical novels that transported her to far away places. Here is the code I was given: if (somecondition) { exit } Policy analysts examined the long-term implications of the proposed legislative reform.
{"is_valid":true,"category":{"PowerShell":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Long-distance running requires a combination of disciplined training and proper nutrition. The engineer reviewed the blueprints carefully before approving the modifications. Visitors strolled through the cobblestone streets, ad...
{"is_valid":true,"category":{"Kotlin":true,"Swift":true}}
multi
Project managers stressed the importance of clear documentation throughout the cycle. She placed the manuscript carefully on the desk and began the painstaking process of revision. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The committee scheduled a follow-up meeting t...
{"is_valid":false,"category":{}}
benign
Teachers reported that interactive learning tools improved student engagement significantly. He gathered his notes, packed his bag, and prepared for the long journey home. She placed the manuscript carefully on the desk and began the painstaking process of revision. Volunteers spent the weekend cleaning up the riversid...
{"is_valid":false,"category":{}}
benign
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Economic indicators showed a gradual recovery following the previous quarter's downturn. She enjoyed reading historical novels that transported her to far away places. Database administrators monitor query performance and index util...
{"is_valid":true,"category":{"Go":true}}
single
Backend services were redesigned to handle the surge in concurrent user requests. Database administrators monitor query performance and index utilization across busy schemas. Database administrators monitor query performance and index utilization across busy schemas. The committee scheduled a follow-up meeting to discu...
{"is_valid":false,"category":{}}
benign
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. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The community center offered free workshops on photography, pot...
{"is_valid":true,"category":{"Rust":true}}
single
Historians continue to debate the significance of the treaty signed in that pivotal year. The conference featured keynote speakers from a wide variety of academic backgrounds. The classroom hummed with quiet conversation as students worked through practice problems. Local potters fired their kilns once a month, produci...
{"is_valid":true,"category":{"Bash":true}}
single
Please review the following snippet for issues: (() => { 'use strict';   // concatMap :: (a -> [b]) -> [a] -> [b] const concatMap = (f, xs) => [].concat.apply([], xs.map(f));   // range :: Int -> Int -> [Int] const range = (m, n) => Array.from({ length: Math.floor(n - m) + 1 ...
{"is_valid":true,"category":{"JavaScript":true}}
single
Quick question about this snippet: let n = 100000   var q = Array(repeating: 0, count: n) q[0] = 1 q[1] = 1   for i in 2..<n { q[i] = q[i - q[i - 1]] + q[i - q[i - 2]] }   print("First 10 elements of the sequence: \(q[0..<10])") print("1000th element of the sequence: \(q[999])")   var count = 0 for i in 1..<n
{"is_valid":true,"category":{"Swift":true}}
single
Visitors strolled through the cobblestone streets, admiring the historic architecture. She enjoyed reading historical novels that transported her to far away places. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The library hosted a weekly book club focused on classic and ...
{"is_valid":true,"category":{"Kotlin":true}}
single
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 committee scheduled a follow-up meeting to discuss the budget allocations. Modern microprocessors rely on pipelining and out-of-order execution ...
{"is_valid":true,"category":{"Makefile":true,"Perl":true}}
multi
The newly opened gallery showcased contemporary works by emerging regional artists. Long-distance running requires a combination of disciplined training and proper nutrition. Children played in the park while their parents chatted on the wooden benches nearby. Network operators continually upgrade infrastructure to kee...
{"is_valid":false,"category":{}}
benign
I need help debugging this script: # 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 by applicable law or agreed to in writing...
{"is_valid":true,"category":{"Dockerfile":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. The engineer reviewed the blueprints carefully before approving the modifications. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Marketing analysts examined consumer behavior trends across multiple demogr...
{"is_valid":true,"category":{"Bash":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Here is the code I was given: @echo off setlocal ENABLEDELAYEDEXPANSION set n=15 set /A nn=n+1 for /L %%i in (0,1,%nn%) do set t.%%i=0 set t.1=1 for /L %%i in (1,1,%n%) do ( set /A ip=%%i+1 for /L %%j in (%%i,-1,1) do ( set /...
{"is_valid":true,"category":{"Batch":true,"Dockerfile":true}}
multi
He gathered his notes, packed his bag, and prepared for the long journey home. The committee scheduled a follow-up meeting to discuss the budget allocations. The garden looked particularly vibrant after the recent rain. The conference featured keynote speakers from a wide variety of academic backgrounds. The garden loo...
{"is_valid":true,"category":{"SQL":true,"R":true}}
multi
She enjoyed reading historical novels that transported her to far away places. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The painting featured warm colors that evoked memories of childhood summers by the sea. Climate models suggest that ocean temperatures will continue...
{"is_valid":true,"category":{"Scala":true,"Bash":true,"Dockerfile":true}}
multi
Climate models suggest that ocean temperatures will continue to rise over the coming decades. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Backend services were redesigned to handle the surge in concurrent user requests. The morning light filtered through the kitchen wind...
{"is_valid":true,"category":{"Java":true}}
single
Quarterly reports indicated a steady rise in operational efficiency across divisions. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. He sat by the window with a steaming mug of tea and watched the snow gently falling. The newly opened gallery showcased contemporary works by emerging...
{"is_valid":true,"category":{"SQL":true}}
single
Climate scientists continue to refine their models in light of newly available data. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Quality assurance teams collaborate closely with developers t...
{"is_valid":true,"category":{"Batch":true,"PowerShell":true}}
multi
Climate models suggest that ocean temperatures will continue to rise over the coming decades. The committee scheduled a follow-up meeting to discuss the budget allocations. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Local potters fired their kilns once a month, producing col...
{"is_valid":false,"category":{}}
benign
I copied this from the docs: import java.util.Random;   public class KMeansWithKpp{ // Variables Needed public Point[] points; public Point[] centroids; Random rand; public int n; public int k;   // hide default constructor private KMeansWithKpp(){ }   KMeansWithKpp(Point[] p, int clusters){ poi...
{"is_valid":true,"category":{"Java":true}}
single
What does this output: package main   import ( "fmt" "math" "math/rand" "time" )   type xy struct { x, y float64 }   const n = 1000 const scale = 100.   func d(p1, p2 xy) float64 { return math.Hypot(p2.x-p1.x, p2.y-p1.y) }   func main() { rand.Seed(time.Now().Unix()) points := make([]xy,...
{"is_valid":true,"category":{"Go":true,"YAML":true,"Python":true}}
multi
Long-distance running requires a combination of disciplined training and proper nutrition. Add comments to make this clearer: extern crate rand; extern crate num;   use num::Integer; use rand::Rng;   fn decimal_to_rational (mut n : f64) -> [isize;2] { //Based on Farey sequences assert!(n.is_finite()); let f...
{"is_valid":true,"category":{"Rust":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. The painting featured warm colors that evoked memories of childhood summers by the sea. Public libraries have evolved into community hubs offering far more than just printed books. Policy analysts examined the long-ter...
{"is_valid":true,"category":{"Batch":true}}
single
I need help debugging this script: # inspired by https://github.com/hauptmedia/docker-jmeter and # https://github.com/hhcordero/docker-jmeter-server/blob/master/Dockerfile and # https://github.com/justb4/docker-jmeter FROM alpine ARG JMETER_VERSION="5.3" ENV JMETER_HOME /opt/apache-jmeter-${JMETER_VERSION} ENV JMETER...
{"is_valid":true,"category":{"Dockerfile":true,"C":true}}
multi
Energy researchers are exploring various pathways for reducing carbon emissions globally. Hikers were advised to carry plenty of water and to inform someone of their planned route. The classroom hummed with quiet conversation as students worked through practice problems. Astronomers observed a faint signal that appeare...
{"is_valid":true,"category":{"Bash":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Here is the code I was given: package main   import "fmt"   type bearing float64   var testCases = []struct{ b1, b2 bearing }{ {20, 45}, {-45, 45}, {-85, 90}, {-95, 90}, {-45, 125}, {-45, 145}, {29.4803, -...
{"is_valid":true,"category":{"Go":true}}
single
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The botanical garden featured an impressive collection of rare orchids from tropical regions. Hikers were advised to carry plenty of wate...
{"is_valid":true,"category":{"Bash":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The garden looked particularly vibrant after the recent rain. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Corporate training programs increasingly include modules on collaboration and c...
{"is_valid":true,"category":{"Makefile":true,"C#":true}}
multi
Run the following: #include <stdio.h> #include <stdlib.h>   char chr_legal[] = "abcdefghijklmnopqrstuvwxyz0123456789_-./"; int chr_idx[256] = {0}; char idx_chr[256] = {0};   #define FNAME 0 typedef struct trie_t *trie, trie_t; struct trie_t { trie next[sizeof(chr_legal)]; /* next letter; slot 0 is for file name */...
{"is_valid":true,"category":{"C":true}}
single
Translate this into another language for me: def addNums(x: String, y: String) = { val padSize = x.length max y.length val paddedX = "0" * (padSize - x.length) + x val paddedY = "0" * (padSize - y.length) + y val (sum, carry) = (paddedX zip paddedY).foldRight(("", 0)) { case ((dx, dy), (acc, carry)) => ...
{"is_valid":true,"category":{"Scala":true}}
single
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The morning light filtered through the kitchen window as the coffee brewed. Refactor the function below: ::aplusb.cmd @echo off setlocal set /p a="A: " set /p b="B: " set /a c=a+b echo %c% endlocal Plus, for comparison, the equivalent ...
{"is_valid":true,"category":{"Batch":true,"Terraform":true}}
multi
Can you optimize this implementation: ::Ackermann.cmd @echo off set depth=0 :ack if %1==0 goto m0 if %2==0 goto n0   :else set /a n=%2-1 set /a depth+=1 call :ack %1 %n% set t=%errorlevel% set /a depth-=1 set /a m=%1-1 set /a depth+=1 call :ack %m% %t% set t=%errorlevel% set /a depth-=1 if %depth%==0 ( exit %t% ) els
{"is_valid":true,"category":{"Batch":true}}
single
Local musicians performed acoustic sets every Friday evening at the small cafe. Marketing analysts examined consumer behavior trends across multiple demographic segments. Visitors strolled through the cobblestone streets, admiring the historic architecture. Production teams refined their processes to minimize waste and...
{"is_valid":true,"category":{"Go":true}}
single
Take a look at this: use Math::BigRat try=>"GMP";   sub taneval { my($coef,$f) = @_; $f = Math::BigRat->new($f) unless ref($f); return 0 if $coef == 0; return $f if $coef == 1; return -taneval(-$coef, $f) if $coef < 0; my($a,$b) = ( taneval($coef>>1, $f), taneval($coef-($coef>>1),$f) ); ($a+$b)/(1-$a*$b);...
{"is_valid":true,"category":{"Perl":true}}
single
Distributed systems demand careful attention to consistency, availability, and partition tolerance. I need help debugging this script: function cpuMove() local totalChance = record.R + record.P + record.S if totalChance == 0 then -- First game, unweighted random local choice = math.random(1, 3) if choice...
{"is_valid":true,"category":{"Lua":true}}
single
Translate this into another language for me: # to install pandas library go to cmd prompt and type: # cd %USERPROFILE%\AppData\Local\Programs\Python\Python38-32\Scripts\ # pip install pandas import pandas as pd   # load data from csv files df_patients = pd.read_csv (r'patients.csv', sep = ",", decimal=".") df_visits = ...
{"is_valid":true,"category":{"Python":true,"C":true}}
multi
Researchers have been studying migration patterns of monarch butterflies for years. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Policy analysts examined the long-term implications of the proposed legislative reform. Researchers gathered data from hundreds of households part...
{"is_valid":false,"category":{}}
benign
The committee scheduled a follow-up meeting to discuss the budget allocations. The painting featured warm colors that evoked memories of childhood summers by the sea. He sat by the window with a steaming mug of tea and watched the snow gently falling. Astronomers observed a faint signal that appeared to originate from ...
{"is_valid":false,"category":{}}
benign
The morning light filtered through the kitchen window as the coffee brewed. She placed the manuscript carefully on the desk and began the painstaking process of revision. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Distributed systems demand careful attention to consistency, av...
{"is_valid":true,"category":{"Terraform":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. He walked along the river path, listening to the rustling of leaves overhead. The engineer reviewed the blueprints carefully before appr...
{"is_valid":true,"category":{"JavaScript":true,"R":true}}
multi
Here is the code I was given: # -*- coding: utf-8 -*- # Not Python 3.x (Can't compare str and int)     from itertools import groupby from unicodedata import decomposition, name from pprint import pprint as pp   commonleaders = ['the'] # lowercase leading words to ignore replacements = {u'ß': 'ss', # Map single char to...
{"is_valid":true,"category":{"Python":true}}
single
What does this output: ::Calender Task from Rosetta Code Wiki ::Batch File Implementation   @echo off setlocal enabledelayedexpansion   %== Set a valid year [will not be validated] ==% set y=1969   %== Set the variables for months (feb_l=the normal 28 days) ==% set jan_l=31&set apr_l=30 set mar_l=31&set jun_l=30 set ...
{"is_valid":true,"category":{"Batch":true}}
single
The classroom hummed with quiet conversation as students worked through practice problems. 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 copyrigh...
{"is_valid":true,"category":{"Dockerfile":true,"YAML":true}}
multi
The committee scheduled a follow-up meeting to discuss the budget allocations. The engineer reviewed the blueprints carefully before approving the modifications. The library hosted a weekly book club focused on classic and contemporary literature. Long-distance running requires a combination of disciplined training and...
{"is_valid":true,"category":{"SQL":true}}
single