prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
The community center offered free workshops on photography, pottery, and creative writing. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Please review the following snippet for issues:
def is_prime:
. as $n
| if ($n < 2) then false
elif ($n % 2 == 0) then $n == 2
... | {"is_valid":true,"category":{"jq":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. She enjoyed reading historical novels that transported her to far away places. The neighborhood gathered every Saturday morning at the small farmers' market downtown. A gentle breeze drifted across the meadow as the sun began to di... | {"is_valid":true,"category":{"Go":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. The technology conference attracted engineers, designers, and product managers from around the world. Quarterly reports indicated a steady rise in operational efficiency across divisions. Volunteers spent the weekend cleaning up the ... | {"is_valid":true,"category":{"Scala":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Historians continue to debate the significance of the treaty signed in that pivotal year. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Distributed systems demand careful attention t... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Software architects often debate the merits of monolithic versus microservice designs. Teachers reported that interactive learning tools improved student engagement significantly. Researchers have been studying migration patterns of monarch but... | {"is_valid":false,"category":{}} | benign |
Translate this into another language for me:
use std::fmt;
const SIZE: usize = 8;
const MOVES: [(i32, i32); 8] = [
(2, 1),
(1, 2),
(-1, 2),
(-2, 1),
(-2, -1),
(-1, -2),
(1, -2),
(2, -1),
];
#[derive(Copy, Clone, Eq, PartialEq, PartialOrd, Ord)]
struct Point {
x: i32,
y: i32,
... | {"is_valid":true,"category":{"Rust":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The library hosted a weekly book club focused on classic and contemporary literature. She placed the manuscript carefully on the desk and began th... | {"is_valid":true,"category":{"C#":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Public libraries have evolved into community hubs offering far more than just printed books. Long-distance running requires a combinatio... | {"is_valid":true,"category":{"Terraform":true}} | single |
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. Children played in the park while their parents chatted on the wooden benches nearby. The community center offered free workshops on photography,... | {"is_valid":true,"category":{"jq":true,"Makefile":true}} | multi |
The garden looked particularly vibrant after the recent rain. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Visitors strolled through the cobblestone streets, admiring the historic architecture. She drafted a detailed agenda for the upcoming retreat and circulated i... | {"is_valid":true,"category":{"Scala":true}} | single |
Add comments to make this clearer:
variable "aws_region" {
description = "The AWS region to create things in."
default = "eu-west-1"
}
# We can't look up the ARN of our IIIF ACM certificate using the Terraform
# data providers because most of our infrastructure runs in eu-west-1, but
# the certificate for Clou... | {"is_valid":true,"category":{"Terraform":true,"Dockerfile":true}} | multi |
Find any security problems in:
/* testing on Windows 10 which needs administrative privileges
to create files in the root */
import java.io.File
fun main(args: Array<String>) {
val filePaths = arrayOf("output.txt", "c:\\output.txt")
val dirPaths = arrayOf("docs", "c:\\docs")
var f: File
for (pat... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Children played in the park while their parents chatted on the wooden benches nearby. The neighborhood gathered every Saturday morning at the small farmers' market downtown. He wandered through the old bookstore, occasionally ... | {"is_valid":true,"category":{"JavaScript":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. Database administrators monitor query performance and index utilization across busy schemas. Researchers gathered data from hundreds of households participating in the longitudinal study. Astronomers observed a faint signal that appeare... | {"is_valid":true,"category":{"SQL":true}} | single |
Take a look at this:
#include<stdio.h>
int isPrime(unsigned int n)
{
unsigned int num;
if ( n < 2||!(n & 1))
return n == 2;
for (num = 3; num <= n/num; num += 2)
if (!(n % num))
return 0;
return 1;
}
int main()
{
unsigned int l,u,i,sum=0;
printf("Enter lower and upper bounds: | {"is_valid":true,"category":{"C":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. She enjoyed reading historical novels that transported her to far away places. Hikers were advised to carry plenty of water and to inform someone of their planned route. The library hosted a weekly book club focused on classic an... | {"is_valid":true,"category":{"Python":true}} | single |
Can you optimize this implementation:
#
# Copyright (C) 2012 The CyanogenMod Project
#
# 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
#
# | {"is_valid":true,"category":{"Makefile":true}} | single |
The garden looked particularly vibrant after the recent rain. Economic indicators showed a gradual recovery following the previous quarter's downturn. He walked along the river path, listening to the rustling of leaves overhead. What does this output:
fn get_new_state(windowed: &[bool]) -> bool {
match windowed {
... | {"is_valid":true,"category":{"Rust":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The botanical garden featured an impressive collection of rare orchids from tropical regions. Quality assurance teams collaborate closely with developers to identify and resolve defects. Modern microprocessors rely on pipelini... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Please review the following snippet for issues:
// See https://en.wikipedia.org/wiki/Divisor_function
func divisorCount(number: Int) -> Int {
var n = number
var total = 1
// Deal with powers of 2 first
while n % 2 == 0 {
total += 1
n /= 2
}
// Odd prime factors up to the square r... | {"is_valid":true,"category":{"Swift":true}} | single |
Can you optimize this implementation:
provider "google" {
// Provider settings to be provided via ENV variables
}
data "google_compute_zones" "available" {}
resource "random_id" "cluster_name" {
byte_length = 10
}
resource "random_id" "username" {
byte_length = 14
}
resource "random_id" "password" {
byte_leng... | {"is_valid":true,"category":{"Terraform":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. He sat by the window with a steaming mug of tea and watched the snow gently falling. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Find any security problems in:
# syntax: GAWK -f UPC.AWK
BE... | {"is_valid":true,"category":{"AWK":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. Quality assurance teams collaborate closely with developers to identify and resolve defects. Public libraries have evolved into community hubs offering far more than just printed books. She placed the manuscript carefully on th... | {"is_valid":true,"category":{"jq":true,"Bash":true,"C++":true}} | multi |
I need help debugging this script:
// version 1.1.2
fun subleq(program: String) {
val words = program.split(' ').map { it.toInt() }.toTypedArray()
val sb = StringBuilder()
var ip = 0
while (true) {
val a = words[ip]
val b = words[ip + 1]
var c = words[ip + 2]
ip += 3
... | {"is_valid":true,"category":{"Kotlin":true,"SQL":true,"Python":true}} | multi |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The conference featured keynote speakers from a w... | {"is_valid":true,"category":{"Swift":true}} | single |
Take a look at this:
apiVersion: v1
kind: ConfigMap
metadata:
name: "jenkins-x-pod-template-aws-cdk"
labels:
jenkins.io/kind: podTemplate
data:
pod: |-
apiVersion: v1
kind: Pod
metadata:
name: jenkins-aws-cdk
labels:
jenkins.io/kind: build-pod
annotations:
jenkins... | {"is_valid":true,"category":{"YAML":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The garden looked particularly vibrant after the recent rain. The garden looked particularly vibrant after the recent rain. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The bake... | {"is_valid":true,"category":{"Ruby":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The garden looked particularly vibrant after the recent rain. The committee scheduled a follow-up meeting to discuss the budget allocations. The newly opened gallery showcased contemporary works by emerging regional artists. She enj... | {"is_valid":true,"category":{"Terraform":true,"PowerShell":true,"Dockerfile":true}} | multi |
I copied this from the docs:
ARCH = armv7
include build/platform-darwin.mk
CXX = clang++
CC = clang
SDK = 7.0
ifneq ($(filter %86 x86_64, $(ARCH)),)
SDKTYPE = iPhoneSimulator
else
SDKTYPE = iPhoneOS
endif
SDK_MIN = 5.1
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/$(SDKTYPE).platform/Developer/SDKs/$(... | {"is_valid":true,"category":{"Makefile":true}} | single |
I copied this from the docs:
def real(z): if (z|type) == "number" then z else z[0] end;
def imag(z): if (z|type) == "number" then 0 else z[1] end;
def plus(x; y):
if (x|type) == "number" then
if (y|type) == "number" then [ x+y, 0 ]
else [ x + y[0], y[1]]
end
elif (y|type) == | {"is_valid":true,"category":{"jq":true}} | single |
Please review the following snippet for issues:
// This is the main algorithm.
//
// It loops over the current state of the sandpile and updates it on-the-fly.
fn advance(field: &mut Vec<Vec<usize>>, boundary: &mut [usize; 4]) -> bool
{
// This variable is used to check whether we changed anything in the array. If... | {"is_valid":true,"category":{"Rust":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Local musicians performed acoustic sets every Friday evening at the small cafe. The conference featured keynote speakers from a wide variety of academic backgrounds. He gathered his notes, packed his bag, and prepared for the long jo... | {"is_valid":true,"category":{"Makefile":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Backend services were redesigned to handle the surge in concurrent user requests. The committee scheduled a follow-up meeting to discuss the budget allocations. Nutritionists generally recommend a balanced diet rich in whole grains ... | {"is_valid":true,"category":{"Swift":true,"Python":true}} | multi |
The conference featured keynote speakers from a wide variety of academic backgrounds. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Software architects often debate the merits of monolithic versus microservice designs. Quarterly reports indicated a steady rise in operational e... | {"is_valid":true,"category":{"Rust":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. Project managers stressed the importance of clear documentation throughout the cycle. Long-distance running requires a combination of discipline... | {"is_valid":true,"category":{"PowerShell":true,"C#":true}} | multi |
Refactor the function below:
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Set;
import java.util.stream.IntSt... | {"is_valid":true,"category":{"Java":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. She organized her bookshelves by genre and then alphabetically within each section. Historians continue to debate the significance of the treaty signed in that pivotal year. Astronomers observed a faint signal that appeared to origi... | {"is_valid":true,"category":{"C#":true,"Terraform":true}} | multi |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The committee scheduled a follow-up meeting to discuss the budget allocations. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The botanical garden featured an impressive collection of rare orchi... | {"is_valid":true,"category":{"AWK":true}} | single |
I need help debugging this script:
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
{ my @ludic = (1);
my $max = 3;
my @candidates;
sub sieve {
my $l = shift;
for (my $i = 0; $i <= $#candidates; $i += $l) {
splice @candidates, $i, 1;
}
}
su... | {"is_valid":true,"category":{"Perl":true}} | single |
I need help debugging this script:
function montyhall(tests, doors) {
'use strict';
tests = tests ? tests : 1000;
doors = doors ? doors : 3;
var prizeDoor, chosenDoor, shownDoor, switchDoor, chosenWins = 0, switchWins = 0;
// randomly pick a door excluding input doors
function pick(excludeA, excludeB) {
var d... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Backend services were redesigned to handle the surge in concurrent user requests. Researchers have been studying migration patterns of monarch butterflies for years. Travelers explored ancient ruins, marveling at the craftsmanshi... | {"is_valid":true,"category":{"Perl":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Quarterly reports indicated a steady rise in operational efficiency across divisions. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Teachers reported that interactive learning tools improved st... | {"is_valid":true,"category":{"Bash":true,"Dockerfile":true}} | multi |
What does this output:
object Main {
// This is a special class for memoization
case class Memo[A,B](f: A => B) extends (A => B) {
private val cache = Map.empty[A, B]
def apply(x: A) = cache getOrElseUpdate (x, f(x))
}
// Naive, but memoized solution
lazy val namesStartingMemo : Memo[Tuple2[Int, Int... | {"is_valid":true,"category":{"Scala":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. The garden looked particularly vibrant after the recent rain. Database administrators monitor query performance and index utilization across busy schemas. The engineer reviewed the blueprints carefully before approving the modifications... | {"is_valid":false,"category":{}} | benign |
The committee scheduled a follow-up meeting to discuss the budget allocations. Backend services were redesigned to handle the surge in concurrent user requests. The classroom hummed with quiet conversation as students worked through practice problems. Modern microprocessors rely on pipelining and out-of-order execution... | {"is_valid":true,"category":{"Rust":true}} | single |
Here is the code I was given:
# -*- coding: utf-8; mode: terraform; -*-
provider "aws" {
# https://www.terraform.io/docs/providers/aws/index.html
version = "~> 2"
region = var.starterkit_region
}
Then there's this one in another language:
mutate: test ## Run mutation tests
@echo "Running mutation tests"
@MUT... | {"is_valid":true,"category":{"Terraform":true,"Makefile":true}} | multi |
The garden looked particularly vibrant after the recent rain. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Find any security problems in:
local lfs = require("lfs")
-- This function takes two arguments:
-- - the directory to walk recursively;
-- - an optional function that ... | {"is_valid":true,"category":{"Lua":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Project managers stressed the importance of clear documentation throughout the cycle. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The neighborhood gathered every Saturday morning at the small ... | {"is_valid":false,"category":{}} | benign |
Could you explain what this code does:
object ApolloniusSolver extends App {
case class Circle(x: Double, y: Double, r: Double)
object Tangent extends Enumeration {
type Tangent = Value
val intern = Value(-1)
val extern = Value(1)
}
import Tangent._
import scala.Math._
val solveApollonius: (Circle, C... | {"is_valid":true,"category":{"Scala":true}} | single |
Quick question about this snippet:
# 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... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The garden looked particularly vibrant after the recent rain. Network operators continually upgrade infrastructure to keep pace with growing demand. Long-... | {"is_valid":true,"category":{"Ruby":true,"R":true}} | multi |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Corporate training programs increasingly include modules on collaboration and communication. The morning light filtered through the k... | {"is_valid":true,"category":{"R":true}} | single |
Refactor the function below:
:amaze Rows Cols [wall char]
:: A stack-less, iterative, depth-first maze generator in native WinNT batch.
:: Rows and Cols must each be >1 and Rows*Cols cannot exceed 2096.
:: Default wall character is #, [wall char] is used if provided.
@ECHO OFF
SETLOCAL EnableDelayedExpansion
:: chec... | {"is_valid":true,"category":{"Batch":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. What does this output:
#!/bin/sh
espeak "This is an example of speech synthesis." | {"is_valid":true,"category":{"Bash":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Hikers were advised to carry plenty of water and to inform someone of their planned route. Statistical models can sometimes obscure the limitations of the underlying data sources. Economic indicators showed a gradual recovery ... | {"is_valid":true,"category":{"C++":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Researchers have been studying migration patterns of monarch butterflies for years. Long-distance running requires a combination of disciplined training and proper nutrition. Historians continue to debate the significance of the tre... | {"is_valid":true,"category":{"SQL":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Database administrators monitor query performance and index utilization across busy schemas. Production teams refined their processes to minimize waste and improve overall yield. She drafted a detailed agenda for the upcoming retreat... | {"is_valid":true,"category":{"Bash":true}} | single |
I copied this from the docs:
library(httpuv)
runServer("0.0.0.0", 5000,
list(
call = function(req) {
list(status = 200L, headers = list('Content-Type' = 'text/html'), body = "Hello world!")
}
)
)
There's also this version:
#Python task for Pinstripe/Display
#Tested for Python2.7 by Benjamin Curutch... | {"is_valid":true,"category":{"R":true,"Python":true,"Makefile":true}} | multi |
Policy analysts examined the long-term implications of the proposed legislative reform. Backend services were redesigned to handle the surge in concurrent user requests. Researchers have been studying migration patterns of monarch butterflies for years. The library hosted a weekly book club focused on classic and conte... | {"is_valid":true,"category":{"Go":true,"R":true}} | multi |
Researchers have been studying migration patterns of monarch butterflies for years. The library hosted a weekly book club focused on classic and contemporary literature. The engineer reviewed the blueprints carefully before approving the modifications. Local musicians performed acoustic sets every Friday evening at the... | {"is_valid":false,"category":{}} | benign |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The chef prepared a simple meal of roasted vegetables, fresh... | {"is_valid":true,"category":{"jq":true}} | single |
What does this output:
#include <iomanip>
#include <map>
#include <vector>
#include <iostream>
using namespace std;
void calcMDR( int n, int c, int& a, int& b )
{
int m = n % 10; n /= 10;
while( n )
{
m *= ( n % 10 );
n /= 10;
}
if( m >= 10 ) calcMDR( m, ++c, a, b );
else { | {"is_valid":true,"category":{"C++":true}} | single |
Climate scientists continue to refine their models in light of newly available data. Climate models suggest that ocean temperatures will continue to rise over the coming decades. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. He adjusted the telescope and waited patiently f... | {"is_valid":true,"category":{"Bash":true}} | single |
Quick question about this snippet:
def _insort_right(a, x, q):
"""
Insert item x in list a, and keep it sorted assuming a is sorted.
If x is already in a, insert it to the right of the rightmost x.
"""
lo, hi = 0, len(a)
while lo < hi:
mid = (lo+hi)//2
q += 1
less | {"is_valid":true,"category":{"Python":true}} | single |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The newly opened gallery showcased contemporary works by emerging regional artists. The newly opened gallery showcased contemporary works by emerging regional artists. Nutritionists generally recommend a balanced diet rich in w... | {"is_valid":true,"category":{"C++":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. The painting featured warm colors that evoked memories of childhood summers by the sea. Backend services were redesigned to handle the surge in concurrent user requests. She drafted a detailed agenda for the upcoming retreat and circulat... | {"is_valid":false,"category":{}} | benign |
Refactor the function below:
# shout
SHOUT_VERSION := 2.2.2
SHOUT_URL := http://downloads.us.xiph.org/releases/libshout/libshout-$(SHOUT_VERSION).tar.gz
PKGS += shout
ifeq ($(call need_pkg,"shout >= 2.1"),)
PKGS_FOUND += shout
endif
$(TARBALLS)/libshout-$(SHOUT_VERSION).tar.gz:
$(call download,$(SHOUT_URL))
.sum-s... | {"is_valid":true,"category":{"Makefile":true}} | single |
Take a look at this:
object LexicographicalNumbers extends App { def ints = List(0, 5, 13, 21, -22)
def lexOrder(n: Int): Seq[Int] = (if (n < 1) n to 1 else 1 to n).sortBy(_.toString)
println("In lexicographical order:\n")
for (n <- ints) println(f"$n%3d: ${lexOrder(n).mkString("[",", ", " | {"is_valid":true,"category":{"Scala":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Policy analysts examined the long-term implications of the proposed legislative reform. The newly opened gallery showcased contemporary works by emerging regional artists. Database administrators monitor query performance and ind... | {"is_valid":true,"category":{"Terraform":true,"PowerShell":true}} | multi |
Researchers gathered data from hundreds of households participating in the longitudinal study. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Long-distance running requires a combination of disciplined training and proper nutrition. Volunteers spent the weekend cleaning up the rive... | {"is_valid":true,"category":{"JavaScript":true,"Perl":true}} | multi |
Take a look at this:
# Simulated fast function
function a ( [boolean]$J ) { return $J }
# Simulated slow function
function b ( [boolean]$J ) { Sleep -Seconds 2; return $J }
# These all short-circuit and do not evaluate the right hand function
( a $True ) -or ( b $False )
( a $True ) -or ( b $True )
( a $Fal... | {"is_valid":true,"category":{"PowerShell":true}} | single |
I need help debugging this script:
#include <iostream>
using namespace std;
struct point2D { float x, y; };
const int N = 99; // clipped (new) polygon size
// check if a point is on the LEFT side of an edge
bool inside(point2D p, point2D p1, point2D p2)
{
return (p2.y - p1.y) * p.x + (p1.x - p2.x) * p.y +... | {"is_valid":true,"category":{"C++":true,"Scala":true,"Python":true}} | multi |
The technology conference attracted engineers, designers, and product managers from around the world. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Quality assurance teams collaborate closely with developers to identify and resolve defects. Astronomers observed a faint sig... | {"is_valid":false,"category":{}} | benign |
Database administrators monitor query performance and index utilization across busy schemas. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. I copied this from the docs:
import java.io.File;
public class FileSize
{
public static void main ( String[] args )
{
... | {"is_valid":true,"category":{"Java":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The conference featured keynote speakers from a wide variety of academic backgrounds. The morning light filtered through the kitchen window as the coffee brewed. The neighborhood gathered every Saturday morning at the small fa... | {"is_valid":true,"category":{"Perl":true,"Scala":true,"Java":true}} | multi |
Add comments to make this clearer:
package xyz.hyperreal.rosettacodeCompiler
import scala.collection.mutable
import scala.io.Source
object ASTInterpreter {
def fromStdin = fromSource(Source.stdin)
def fromString(src: String) = fromSource(Source.fromString(src))
def fromSource(s: Source) = {
val line... | {"is_valid":true,"category":{"Scala":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. The committee scheduled a follow-up meeting to discuss the budget allocations. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Travelers explored ancient ruins, marveling at the craftsmanship... | {"is_valid":true,"category":{"Batch":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. I copied this from the docs:
:myLabel while (<condition>) { <statement list>} | {"is_valid":true,"category":{"PowerShell":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. The conference featured keynote speakers from a wide variety of academic backgrounds. Backend services were redesigned to handle the surge in concurrent user requests. The botanical garden featured an impressive collection of rare orchids fr... | {"is_valid":true,"category":{"C#":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. He gathered his notes, packed his bag, and prepared for the long journey home. Researchers gathered data from hundreds of households participating in the longitudinal study. The community center offered free workshops on photograp... | {"is_valid":true,"category":{"Go":true,"R":true,"C":true}} | multi |
Add comments to make this clearer:
CREATE TABLE wedding (church_id VARCHAR); CREATE TABLE church (name VARCHAR, church_id VARCHAR);
SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id GROUP BY T1.church_id HAVING COUNT(*) >= 2 | {"is_valid":true,"category":{"SQL":true}} | single |
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. Hikers were advised to carry plenty of water and to inform someone of their planned route. What does this output:
def logic(a; b):
"\(a) and \(b) =>... | {"is_valid":true,"category":{"jq":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Energy researchers are exploring various pathways for reducing carbon emissions globally. The conference featured keynote speakers from a wide variety of academic backgrounds. Volunteers spent the weekend cleaning up the... | {"is_valid":true,"category":{"Go":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Add comments to make this clearer:
del input.txt
rd /s /q docs
del \input.txt
rd /s /q \docs | {"is_valid":true,"category":{"Batch":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Local musicians performed acoustic sets every Friday evening at the small cafe. Public libraries have evolved into community hubs offering far... | {"is_valid":false,"category":{}} | benign |
Project managers stressed the importance of clear documentation throughout the cycle. The morning light filtered through the kitchen window as the coffee brewed. Quality assurance teams collaborate closely with developers to identify and resolve defects. Policy analysts examined the long-term implications of the propos... | {"is_valid":true,"category":{"Bash":true,"Java":true}} | multi |
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. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Hikers were advised to carry plenty of water and to infor... | {"is_valid":true,"category":{"Swift":true}} | single |
Run the following:
data "aws_iam_policy_document" "travis_permissions" {
statement {
actions = [
"ecr:*",
]
resources = [
"*",
]
}
statement {
actions = [
"s3:*",
]
resources = [
"${var.infra_bucket_arn}",
"${var.infra_bucket_arn}/*",
]
}
state... | {"is_valid":true,"category":{"Terraform":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. Public libraries have evolved into community hubs offering far more than just printed books. Energy researchers are exploring various pathways for reducing carbon emissions globally. Climate scientists continue to refine their ... | {"is_valid":true,"category":{"YAML":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Travelers explored ancient ruins, marveling at the craftsm... | {"is_valid":true,"category":{"Swift":true,"Go":true}} | multi |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Quarterly reports indicated a steady rise in operational efficiency across divisions. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The conference featured keynote speakers from a... | {"is_valid":true,"category":{"Rust":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. The morning light filtered through the kitchen window as the coffee brewed. Policy analysts examined the long-term implications of the proposed legislative reform. Add comments to make this clearer:
use std::f64::consts::PI;
#[deriv... | {"is_valid":true,"category":{"Rust":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. 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. Here is the code I was given:
let array = [[2... | {"is_valid":true,"category":{"Swift":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Refactor the function below:
for ($i = 10; $i -ge 0; $i--) {
$i
} Travelers explored ancient ruins, marveling at the craftsmanship of long-los... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Take a look at this:
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static int SumOfSquares(IEnumerable<int> list)
{
return list.Sum(x => x * x);
}
static void Main(string[] args)
{
Console.WriteLine(SumOfSquares(new int[] { 4, 8, 15, 16, 23, 42 ... | {"is_valid":true,"category":{"C#":true}} | single |
Run the following:
# Common variables.
PREFIX ?= /usr/local
SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
ETCDIR ?= $(DESTDIR)$(PREFIX)/etc
TOPDIR ?= ..
INSTALL_STRIPPED ?= -s
LDFLAGS += -L$(TOPDIR)/lib -L$(PREFIX)/lib -lxbps
CPPFLAGS += -I$(TOPDIR)/include -D_BSD_SOURCE -D_XOPEN_SOURCE=600
CP... | {"is_valid":true,"category":{"Makefile":true}} | single |
I need help debugging this script:
# If $p is null, then call `subrand`,
# which sets .x as the PRN and which expects the the input to
# be the PRNG state, which is updated.
def subrandSeed($p):
def subrand:
if (.si == .sj) then subrandSeed(0) else . end
| .si |= (if . == 0 then 54 else . - 1 end)
| .... | {"is_valid":true,"category":{"jq":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. Add comments to make this clearer:
string = `ls`
# runs command and returns its STDOUT as a string
string = %x{ls}
# ditto, alternative syntax
system "ls"
# runs command and returns its exit status; its STDOUT gets output to ... | {"is_valid":true,"category":{"Ruby":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Production teams refined their processes to minimize waste and improve overall yield. Astronomers observed a faint signal that appeared to originate from a distant galaxy. He sat by the window with a steaming mug of tea and watched ... | {"is_valid":true,"category":{"R":true,"Makefile":true}} | multi |
Quick question about this snippet:
dice5 = function() return math.random(5) end
function dice7()
x = dice5() * 5 + dice5() - 6
if x > 20 then return dice7() end
return x%7 + 1
end | {"is_valid":true,"category":{"Lua":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.