prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
Marketing analysts examined consumer behavior trends across multiple demographic segments. Production teams refined their processes to minimize waste and improve overall yield. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The neighborhood gathered every Saturday morning ... | {"is_valid":true,"category":{"jq":true}} | single |
Refactor the function below:
// version 1.2.10
import kotlin.math.ceil
class Complex(val real: Double, val imag: Double) {
constructor(r: Int, i: Int) : this(r.toDouble(), i.toDouble())
operator fun plus(other: Complex) = Complex(real + other.real, imag + other.imag)
operator fun times(other: Comp... | {"is_valid":true,"category":{"Kotlin":true}} | single |
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. He sat by the window with a steaming mug of tea and watched the snow gently falling. The community center offered free workshops on photography, pot... | {"is_valid":true,"category":{"jq":true,"Perl":true}} | multi |
Database administrators monitor query performance and index utilization across busy schemas. 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. The classroom hummed with quiet conversation as studen... | {"is_valid":true,"category":{"Lua":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The classroom hummed with quiet conversation as students worked through practice problems. Local potters fired their kilns once a mon... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Historians continue to debate the significance of the treaty signed in that pivotal year. Economic indicators showed a gradual rec... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Add comments to make this clearer:
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: default
name: job-config
data:
job-config.yaml: ""
On a related note, this block:
import java.util.Scanner;
import java.util.Random;
public class CheckpointSync{
public static void main(String[] args){
System.out.prin... | {"is_valid":true,"category":{"YAML":true,"Java":true,"Terraform":true}} | multi |
The library hosted a weekly book club focused on classic and contemporary literature. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The newly opened gallery showcased contemporary works ... | {"is_valid":true,"category":{"R":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Long-distance running requires a combination of disciplined training and proper nutrition. The newly opened gallery showcased contemporary works by emerging regional artists. He adjusted the telescope and waited patiently for the c... | {"is_valid":true,"category":{"Makefile":true}} | single |
Climate scientists continue to refine their models in light of newly available data. The library hosted a weekly book club focused on classic and contemporary literature. I need help debugging this script:
function multiply(a, b)
{
return a*b
}
BEGIN {
print multiply(5, 6)
} Local potters fired their kilns once a m... | {"is_valid":true,"category":{"AWK":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. Production teams refined their processes to minimize waste and improve overall yield. Add comments to make this clearer:
%=== Batch Files have no booleans. ===%
%=== I will instead use 1 as true and 0 as false. ===%
... | {"is_valid":true,"category":{"Batch":true,"jq":true}} | multi |
Researchers gathered data from hundreds of households participating in the longitudinal study. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Climate scientists continue to refine their models in light of newly available data. Local musicians performed acoustic sets ... | {"is_valid":true,"category":{"Dockerfile":true,"C++":true,"C#":true}} | multi |
Find any security problems in:
use utf8; # interpret source code as UTF8
binmode STDOUT, ':utf8'; # allow printing wide chars without warning
$|++; # disable output buffering
my ($rows, $cols) = split /\s+/, `stty size`;
my $x = int($rows / 2 - 1);
my $y = int($cols / 2 - 16 | {"is_valid":true,"category":{"Perl":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Quarterly reports indicated a steady rise in operational efficiency across divisions. Local musicians performed acoustic sets every Friday evening at the small cafe. Late spring rains caused the lake to swell beyond its usual season... | {"is_valid":true,"category":{"Bash":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Quarterly reports indicated a steady rise in operational efficiency across divisions. Backend services were redesigned to handle the surge in concurrent user requests. Distributed systems demand careful attention to consistency, a... | {"is_valid":true,"category":{"SQL":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Refactor the function below:
CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR);
SELECT Name FROM wrestler ORDER BY Days_held LIMIT 1
We also have this other snippet:
import java.math.BigInteger
val SMALL_PRIMES = listOf(
... | {"is_valid":true,"category":{"SQL":true,"Kotlin":true}} | multi |
Engineering teams often adopt iterative methodologies to manage complex software projects. Researchers gathered data from hundreds of households participating in the longitudinal study. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Can you optimize this implementation:
variable... | {"is_valid":true,"category":{"Terraform":true}} | single |
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. He sat by the window with a steaming mug of tea and watched the snow gently falling. Quality assurance teams collaborate closely with developers to ... | {"is_valid":true,"category":{"PowerShell":true,"jq":true}} | multi |
I copied this from the docs:
#include <stdlib.h>
#include <stdio.h>
#define SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))
int jacobi(unsigned long a, unsigned long n) {
if (a >= n) a %= n;
int result = 1;
while (a) {
while ((a & 1) == 0) {
a >>= 1;
if ((n & 7) == 3 || (n & 7) == 5) res | {"is_valid":true,"category":{"C":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. Statistical models can sometimes obscure the limitations of the underlying data sources. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Economic indicators showed a gradual recovery f... | {"is_valid":true,"category":{"Bash":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Please review the following snippet for issues:
#include <iostream>
#include <vector>
#include <iomanip>
void primeFactors( unsigned n, std::vector<unsigned>& r ) {
int f = 2; if( n == 1 ) r.push_back( 1 );
else {
... | {"is_valid":true,"category":{"C++":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. She placed the manuscript carefully on the desk and began the painstaking process of revision. Policy analysts examined the long-term implications of the proposed legislative reform. The morning light filtered through the kitchen window as... | {"is_valid":false,"category":{}} | benign |
Quality assurance teams collaborate closely with developers to identify and resolve defects. Production teams refined their processes to minimize waste and improve overall yield. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. A gentle breeze drifted across the meadow as the... | {"is_valid":true,"category":{"jq":true}} | single |
Find any security problems in:
function Add-SEDOLCheckDigit
{
Param ( # Validate input as six-digit SEDOL number
[ValidatePattern( "^[0123456789bcdfghjklmnpqrstvwxyz]{6}$" )]
[parameter ( Mandatory = $True ) ]
[string]
$SixDigitSEDOL )
# Convert to array o... | {"is_valid":true,"category":{"PowerShell":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Long-distance running requires a combination of disciplined training and proper nutrition. Translate this into another language for me:
object SelfDescribingNumbers extends App {
def isSelfDescribing(a: Int): Boolean = {
val s = Integer.t... | {"is_valid":true,"category":{"Scala":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Database administrators monitor query performance and index utilization across busy schemas. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Children played in the park while their paren... | {"is_valid":true,"category":{"Java":true}} | single |
Please review the following snippet for issues:
import os
for directory in ['/', './']:
open(directory + 'output.txt', 'w').close() # create /output.txt, then ./output.txt
os.mkdir(directory + 'docs') # create directory /docs, then ./docs | {"is_valid":true,"category":{"Python":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Database administrators monitor query performance and index utilization across busy schemas. Please review the following snippet for issues:
largest_LynchBell_number <- function(from, to){
from = round(from)
to = round(to)
... | {"is_valid":true,"category":{"R":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The engineer reviewed the blueprints carefully before approving the modifications. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Astronomers observed a faint signal that appeared... | {"is_valid":true,"category":{"Terraform":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. The painting featured warm colors that evoked memories of childhood summers by the sea. Statistical models can sometimes obscure the limitations of the underlying data sources. Policy analysts examined the long-term implications of... | {"is_valid":true,"category":{"Perl":true,"YAML":true}} | multi |
Public libraries have evolved into community hubs offering far more than just printed books. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Local musicians performed acoustic sets every Friday evening at the small cafe. The library hosted a weekly book club focused on classic and c... | {"is_valid":true,"category":{"YAML":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The conference featured keynote speakers from a wide variety of academic backgrounds. Statistical models can sometimes obscure the limitations of the... | {"is_valid":true,"category":{"Scala":true,"jq":true}} | multi |
Teachers reported that interactive learning tools improved student engagement significantly. Policy analysts examined the long-term implications of the proposed legislative reform. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Teachers reported that interactive lear... | {"is_valid":true,"category":{"Go":true}} | single |
I need help debugging this script:
using System.Linq; class Program { static void Main() {
int a, b, c, d, e, f, g; int[] h = new int[g = 1000];
for (a = 0, b = 1, c = 2; c < g; a = b, b = c++)
for (d = a, e = b - d, f = h[b]; e <= b; e++)
if (f == h[d--]) { h[c] = e; break; }
void | {"is_valid":true,"category":{"C#":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. Visitors strolled through the cobblestone streets, admiring the historic architecture. Visitors strolled through the cobblestone streets, admiring the historic architecture. Quality assurance teams collaborate closely with developers ... | {"is_valid":true,"category":{"C++":true,"Dockerfile":true,"Go":true}} | multi |
Take a look at this:
#!/usr/bin/env python
#vertical coloured stripes in window in Python 2.7.1
from livewires import *
horiz=640; vert=480
begin_graphics(width=horiz,height=vert,title="v_stripes",background=Colour.black)
NameColors=["black","red","green","dark_blue","purple","blue","yellow","white"]
stepik=horiz/l... | {"is_valid":true,"category":{"Python":true}} | single |
Translate this into another language for me:
# syntax: GAWK -f GENERIC_SWAP.AWK
BEGIN {
printf("%s version %s\n",ARGV[0],PROCINFO["version"])
foo = 1
bar = "a"
printf("\n%s %s\n",foo,bar)
rc = swap("foo","bar") # ok
printf("%s %s %s\n",foo,bar,rc?"ok":"ng")
printf("\n%s %s\n",foo,bar)
rc... | {"is_valid":true,"category":{"AWK":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Researchers have been studying migration patterns of monarch butterflies for years. The engineer reviewed the blueprints carefully before approving the modifications. Software architects often debate the merits of monolithic vers... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Run the following:
use itertools::Itertools;
const PRIMES: [u64; 15] = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47];
const MAX_DIVISOR: usize = 64;
struct DivisorSeq {
max_number_of_divisors: u64,
index: u64,
}
impl DivisorSeq {
fn new(max_number_of_divisors: u64) -> DivisorSeq {
D... | {"is_valid":true,"category":{"Rust":true}} | single |
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. Climate scientists continue to refine their models in light of newly available data. Refactor the function below:
package main
imp... | {"is_valid":true,"category":{"Go":true,"AWK":true}} | multi |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Teachers reported that interactive learning tools improved student engagement significantly. Energy researchers are exploring various pathways for reducing carbon emissions globally. Here is the code I was given:
import urllib
s = ... | {"is_valid":true,"category":{"Python":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. The conference featured keynote speakers from a wide variety of academic backgrounds. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The botanical garden featured an impressive collectio... | {"is_valid":true,"category":{"SQL":true}} | single |
I copied this from the docs:
library(combinat)
permute.me <- c("A", "B", "C", "D")
perms <- permn(permute.me) # list of all permutations
perms2 <- matrix(unlist(perms), ncol=length(permute.me), byrow=T) # matrix of all permutations
perms3 <- apply(perms2, 1, paste, collapse="") # vector of all permutations
inco... | {"is_valid":true,"category":{"R":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. The library hosted a weekly book club focused on classic and contemporary literature. The newly opened gallery showcased contemporary works by emerging regional artists. He wandered through the old bookstore, occasionally pulling a wo... | {"is_valid":true,"category":{"R":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Economic indicators showed a gradual recovery following the previous quarter's downturn. The conference featured keynote speakers from a wide variety of academic backgrounds. Climate models suggest that ocean temperatures will co... | {"is_valid":true,"category":{"Terraform":true,"C++":true}} | multi |
Quick question about this snippet:
library(gWidgets)
options(guiToolkit="RGtk2") ## using gWidgtsRGtk2
w <- gwindow("Disable components")
g <- ggroup(cont=w, horizontal=FALSE)
e <- gedit("0", cont=g, coerce.with=as.numeric)
bg <- ggroup(cont=g)
down_btn <- gbutton("-", cont=bg)
up_btn <- gbutton("+", cont=bg)
u... | {"is_valid":true,"category":{"R":true,"Makefile":true,"Python":true}} | multi |
The engineer reviewed the blueprints carefully before approving the modifications. Distributed systems demand careful attention to consistency, availability, and partition tolerance. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The garden looked particularly vibrant after the rec... | {"is_valid":true,"category":{"Terraform":true}} | single |
Please review the following snippet for issues:
@echo off
setlocal enabledelayedexpansion
::Set the inputs
set "code=17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1"
set "n=2"
::Basic validation of code
for %%. in (!code!) do (
echo.%%.|findstr /r /c:"^[0-9][0-9]*/[1-9][0-9]*$">nul... | {"is_valid":true,"category":{"Batch":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. Project managers stressed the importance of clear documentation throughout the cycle. Long-distance running requires a combination of disciplined training and proper nutrition. Could you explain what this code does:
>>> 5**3**2
19... | {"is_valid":true,"category":{"Python":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Climate scientists continue to refine their models in light of newly available data. Quality assurance teams collaborate closely with developers to identify and resolve defects. Production teams refined their processes to mini... | {"is_valid":true,"category":{"Swift":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. Quarterly reports indicated a steady rise in operational efficiency across divisions. The garden looked particularly vibrant after the recent rain. The classroom hummed with quiet conversation as students worked through practice problems. Th... | {"is_valid":false,"category":{}} | benign |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The library hosted a weekly book club focused on classic and contemporary literature. Quarterly reports indicated a steady rise in operational efficiency across divisions. Distributed systems demand careful attention to consis... | {"is_valid":true,"category":{"C":true}} | single |
Please review the following snippet for issues:
#include <iostream>
#include <string>
using namespace std;
class playfair
{
public:
void doIt( string k, string t, bool ij, bool e )
{
createGrid( k, ij ); getTextReady( t, ij, e );
if( e ) doIt( 1 ); else doIt( -1 );
display();
}
private:
void do... | {"is_valid":true,"category":{"C++":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Refactor the function below:
package main
import (
"fmt"
"encoding/binary"
)
func main() {
buf := make([]byte, binary.MaxVarintLen64)
for _, x := range []int64{0x200000, 0x1fffff} {
v := buf[:binary.PutV... | {"is_valid":true,"category":{"Go":true,"Python":true}} | multi |
She organized her bookshelves by genre and then alphabetically within each section. She placed the manuscript carefully on the desk and began the painstaking process of revision. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Energy researchers are exploring various pathways for re... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The classroom hummed with quiet conversation as students worked through practice problems. Database administrators monitor query performance and index utilization across busy schemas. Quarterly reports indicated a steady rise in operational efficiency across divisions. Astronomers observed a faint signal that appeared ... | {"is_valid":true,"category":{"Terraform":true}} | single |
Find any security problems in:
wave.shuffle <- function(n) {
deck <- 1:n ## create the original deck
new.deck <- c(matrix(data = deck, ncol = 2, byrow = TRUE)) ## shuffle the deck once
counter <- 1 ## track the number of loops
## defining a loop that shuffles the new deck until identical with the original one
... | {"is_valid":true,"category":{"R":true}} | single |
Find any security problems in:
// version 1.1.51
import java.util.TreeSet
class Edge(val v1: String, val v2: String, val dist: Int)
/** One vertex of the graph, complete with mappings to neighbouring vertices */
class Vertex(val name: String) : Comparable<Vertex> {
var dist = Int.MAX_VALUE // MAX_VALUE as... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Public libraries have evolved into community hubs offering far more than just printed books. Run the following:
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licen... | {"is_valid":true,"category":{"Terraform":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. Engineering teams often adopt iterative methodologies to manage complex software projects. He walked along the river path, listening to the rustling of leaves overhead. She organized her bookshelves by genre and then alphabetically with... | {"is_valid":true,"category":{"Batch":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. Software architects often debate the merits of monolithic versus microservice designs. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. He adjusted the telescope and waited patiently for... | {"is_valid":true,"category":{"Bash":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Researchers have been studying migration patterns of monarch butterflies for years. Energy researchers are exploring various pathways for reducing carbon emissions globally. Visitors strolled through the cobblestone streets, admiring the... | {"is_valid":false,"category":{}} | benign |
Backend services were redesigned to handle the surge in concurrent user requests. Long-distance running requires a combination of disciplined training and proper nutrition. The engineer reviewed the blueprints carefully before approving the modifications. Late spring rains caused the lake to swell beyond its usual seas... | {"is_valid":true,"category":{"Ruby":true}} | single |
I copied this from the docs:
from sympy.ntheory.generate import primorial
from sympy.ntheory import isprime
def fortunate_number(n):
'''Return the fortunate number for positive integer n.'''
# Since primorial(n) is even for all positive integers n,
# it suffices to search for the fortunate numbers among o... | {"is_valid":true,"category":{"Python":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. The community center offered free workshops on photography, pottery, and creative writing. Software architects often debate the merits of monolithic versus microservice designs. He wandered through the old bookstore, occasionally pull... | {"is_valid":true,"category":{"C":true}} | single |
Refactor the function below:
/*
Using the Qt library's XML parser.
*/
#include <iostream>
#include <QDomDocument>
#include <QObject>
int main() {
QDomDocument doc;
doc.setContent(
QObject::tr(
"<Students>\n"
"<Student Name=\"April\" Gender=\"F\" DateOfBirth=\"1989-01- | {"is_valid":true,"category":{"C++":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Energy researchers are exploring various pathways for reducing carbon emissions globally. Researchers gathered data from hundreds of household... | {"is_valid":true,"category":{"Batch":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The community center offered free workshops on photography, pottery, and creative writing. Modern microprocessors rely on pipelining a... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Could you explain what this code does:
# syntax: GAWK -f STRONG_AND_WEAK_PRIMES.AWK
BEGIN {
for (i=1; i<1E7; i++) {
if (is_prime(i)) {
arr[++n] = i
}
}
# strong:
stop1 = 36 ; stop2 = 1E6 ; stop3 = 1E7
count1 = count2 = count3 = 0
printf("The first %d strong primes:",stop1)
fo... | {"is_valid":true,"category":{"AWK":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Network operators continually upgrade infrastructure to keep pace with growing demand. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The engineer reviewed the blueprints carefully before... | {"is_valid":true,"category":{"Ruby":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. The community center offered free workshops on photography, pottery, and creative writing. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. She enjoyed reading historical novels that tra... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The neighborhood gathered every Saturday morning at the small farmers' market downtown. He sat by the window with a steaming mug of te... | {"is_valid":true,"category":{"Perl":true}} | single |
I need help debugging this script:
use strict;
use warnings;
use feature 'say';
use bigint try=>"GMP";
use ntheory qw<factor>;
my @Fermats = map { 2**(2**$_) + 1 } 0..9;
my $sub = 0;
say 'First 10 Fermat numbers:';
printf "F%s = %s\n", $sub++, $_ for @Fermats;
$sub = 0;
say "\nFactors of first few Fermat numbers:... | {"is_valid":true,"category":{"Perl":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Statistical models can sometimes obscure the limitations... | {"is_valid":true,"category":{"Terraform":true}} | single |
Run the following:
import itertools
def cycler(start_items):
return itertools.cycle(start_items).__next__
def _kolakoski_gen(start_items):
s, k = [], 0
c = cycler(start_items)
while True:
c_next = c()
s.append(c_next)
sk = s[k]
yield sk
if sk > 1:
s +... | {"is_valid":true,"category":{"Python":true,"C#":true}} | multi |
The community center offered free workshops on photography, pottery, and creative writing. The committee scheduled a follow-up meeting to discuss the budget allocations. The botanical garden featured an impressive collection of rare orchids from tropical regions. Production teams refined their processes to minimize was... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. She enjoyed reading historical novels that transported her to far away places. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Travelers explored ancient ruins, marveling at the craftsmanship o... | {"is_valid":true,"category":{"R":true,"Lua":true,"YAML":true}} | multi |
Could you explain what this code does:
function calc(fa, fb, expansions)
local a = 0.0
local b = 0.0
local r = 0.0
local i = expansions
while i > 0 do
a = fa(i)
b = fb(i)
r = b / (a + r)
i = i - 1
end
a = fa(0)
return a + r
end
function sqrt2a(n)
if | {"is_valid":true,"category":{"Lua":true}} | single |
Refactor the function below:
@echo off
setlocal enabledelayedexpansion
::Initializing the pseudo-array...
set "pseudo=Alpha Beta Gamma Delta Epsilon"
set cnt=0 & for %%P in (!pseudo!) do (
set /a cnt+=1
set "pseudo[!cnt!]=%%P"
)
::Do the random thing...
set /a rndInt=%random% %% cnt +1
::Print the element corres... | {"is_valid":true,"category":{"Batch":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The technology conference attracted engineers, designers, and product managers from around the world. Historians continue to debate the significance of the treaty signed in that pivotal year. Modern microprocessors rely on pipe... | {"is_valid":false,"category":{}} | benign |
Public libraries have evolved into community hubs offering far more than just printed books. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Researchers gathered data from hundreds of households participating in the longitudinal study. Astronomers observed a faint signal th... | {"is_valid":true,"category":{"SQL":true,"Bash":true,"YAML":true}} | multi |
Quick question about this snippet:
#include <assert.h>
#include <locale.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct bit_array_tag {
uint32_t size;
uint32_t* array;
} bit_array;
bool bit_array_create(bit_array* b, uint32_t size) {
uint32_t* array = ca... | {"is_valid":true,"category":{"C":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Database administrators monitor query pe... | {"is_valid":false,"category":{}} | benign |
The library hosted a weekly book club focused on classic and contemporary literature. Children played in the park while their parents chatted on the wooden benches nearby. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Backend services were redesigned to handle the surge in... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Translate this into another language for me:
int sum ... | {"is_valid":true,"category":{"C#":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. The committee scheduled a follow-up meeting to discuss the budget allocations. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The neighborhood gathered every Saturday morning at the small far... | {"is_valid":true,"category":{"Ruby":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. The painting featured warm colors that evoked memories of childhood summers by the sea. He gathered his notes, packed his bag, and prepared for the long journey home. Researchers gathered data from hundreds of households participat... | {"is_valid":false,"category":{}} | benign |
Add comments to make this clearer:
av, sn = math.abs, function(s) return s~=0 and s/av(s) or 0 end
function sindex(y, x) -- returns the value at (x, y) in a spiral that starts at 1 and goes outwards
if y == -x and y >= x then return (2*y+1)^2 end
local l = math.max(av(y), av(x))
return (2*l-1)^2+4*l+2*l*sn(x+y)+s... | {"is_valid":true,"category":{"Lua":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. The garden looked particularly vibrant after the recent rain. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost c... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. Researchers gathered data from hundreds of households participating in the longitudinal study. Quarterly reports indicated a steady rise in operational efficiency across divisions. The neighborhood gathered every Saturday morning at t... | {"is_valid":true,"category":{"AWK":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. The committee scheduled a follow-up meeting to discuss the budget allocations. I need help debugging this script:
function swap(arr) {
var tmp = arr[0];
arr[0] = arr[1];
arr[1] = tmp;
} Travelers explored ancient ruins, marve... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Researchers have been studying migration patterns of monarch butterflies for years. The committee scheduled a follow-up meeting to discuss the budget allocations. Please review the following snippet for issues:
import java.util.HashMap;
p... | {"is_valid":true,"category":{"Java":true}} | single |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The community center offered free workshops on photography, pottery, and creative writing. He sat by the window with a steaming mug of tea and watched the snow gently falling. Modern microprocessors rely on pipelining and out-o... | {"is_valid":true,"category":{"C#":true,"JavaScript":true}} | multi |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. He sat by the window with a steaming mug of tea and watched the snow gently falling. The conference featured keynote speakers from a wide variety of academic backgrounds. Backend services were redesigned to handle the surge in concurre... | {"is_valid":true,"category":{"C#":true,"Terraform":true}} | multi |
Policy analysts examined the long-term implications of the proposed legislative reform. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Farmers depend on accurate weather forecasts t... | {"is_valid":true,"category":{"Perl":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. He sat by the window with a steaming mug of tea and watched the snow gently falling. Historians continue to debate the significance... | {"is_valid":true,"category":{"jq":true,"PowerShell":true}} | multi |
Backend services were redesigned to handle the surge in concurrent user requests. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Policy analysts examined the long-term implications of the proposed legislative reform. He sat by the window with a steaming mug of tea and watch... | {"is_valid":true,"category":{"jq":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. Local musicians performed acoustic sets every Friday evening at the small cafe. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Researchers have been studying migration patterns of monarch but... | {"is_valid":true,"category":{"Dockerfile":true,"SQL":true}} | multi |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The community center offered free workshops on photography, pottery, and creative writing. The neighborhood gathered every Saturday m... | {"is_valid":true,"category":{"Rust":true,"Java":true}} | multi |
She enjoyed reading historical novels that transported her to far away places. Researchers have been studying migration patterns of monarch butterflies for years. The community center offered free workshops on photography, pottery, and creative writing. The garden looked particularly vibrant after the recent rain. The ... | {"is_valid":true,"category":{"Ruby":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.