prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
The morning light filtered through the kitchen window as the coffee brewed. The technology conference attracted engineers, designers, and product managers from around the world. Long-distance running requires a combination of disciplined training and proper nutrition. Late spring rains caused the lake to swell beyond i... | {"is_valid":true,"category":{"jq":true,"JavaScript":true}} | multi |
Researchers gathered data from hundreds of households participating in the longitudinal study. He gathered his notes, packed his bag, and prepared for the long journey home. I copied this from the docs:
Function Calculate-SHA1( $String ){
$Enc = [system.Text.Encoding]::UTF8
$Data = $enc.GetBytes($String)
... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Researchers gathered data from hundreds of households participating in the longitudinal study. Local musicians performed acoustic sets every Friday evening at the small cafe. Marketing analysts examined consumer behavior trends ac... | {"is_valid":true,"category":{"Scala":true}} | single |
Translate this into another language for me:
#include <array>
#include <iostream>
#include <vector>
constexpr int MAX = 12;
static std::vector<char> sp;
static std::array<int, MAX> count;
static int pos = 0;
int factSum(int n) {
int s = 0;
int x = 0;
int f = 1;
while (x < n) {
f *= ++x;
... | {"is_valid":true,"category":{"C++":true,"jq":true,"Kotlin":true}} | multi |
Take a look at this:
package main
import "fmt"
const (
empty = iota
black
white
)
const (
bqueen = 'B'
wqueen = 'W'
bbullet = '•'
wbullet = '◦'
)
type position struct{ i, j int }
func iabs(i int) int {
if i < 0 {
return -i
}
return i
}
fun | {"is_valid":true,"category":{"Go":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Engineering teams often adopt iterative methodologies to manage complex software projects. The neighborhood gathered every Saturday mo... | {"is_valid":true,"category":{"Makefile":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Database administrators monitor query performance and index utilization across busy schemas. The library hosted a weekly book club focused on... | {"is_valid":true,"category":{"AWK":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. She enjoyed reading historical novels that transported her to far away places. The neighborhood gathered every Saturday morning at the small farmers' market downtown. She placed the manuscript carefully on the desk and began the ... | {"is_valid":true,"category":{"Swift":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Climate scientists continue to refine their models in light of newly available data. The conference featured keynote speakers from a ... | {"is_valid":false,"category":{}} | benign |
Translate this into another language for me:
package main
import (
"fmt"
"strconv"
)
func kaprekar(n uint64, base uint64) (bool, int) {
order := 0
if n == 1 {
return true, -1
}
nn, power := n*n, uint64(1)
for power <= nn {
power *= base
order++
}
power... | {"is_valid":true,"category":{"Go":true}} | single |
Please review the following snippet for issues:
# input should be an array of the lengths of the sides
def hero:
(add/2) as $s
| ($s*($s - .[0])*($s - .[1])*($s - .[2])) as $a2
| if $a2 > 0 then ($a2 | sqrt) else 0 end;
def is_heronian:
hero as $h
| $h > 0 and ($h|floor) == $h;
def gcd3(x; y; z):
# subf... | {"is_valid":true,"category":{"jq":true,"Kotlin":true,"Ruby":true}} | multi |
Translate this into another language for me:
// rustc 1.26.0 or later
use std::ops::Add;
fn foo<Num>(n: Num) -> impl FnMut(Num) -> Num
where Num: Add<Output=Num> + Copy + 'static {
let mut acc = n;
move |i: Num| {
acc = acc + i;
acc
}
}
fn main() {
let mut x = foo(1.);
... | {"is_valid":true,"category":{"Rust":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Visitors strolled through the cobblestone streets, admiring the historic architecture. Economic indicators showed a gradual recovery ... | {"is_valid":true,"category":{"Dockerfile":true,"R":true}} | multi |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Public libraries have evolved into community hubs of... | {"is_valid":true,"category":{"SQL":true}} | single |
I need help debugging this script:
use std::fmt::{Display, Error, Formatter};
use std::ops::{Add, Mul, Neg};
#[derive(Clone,Copy,Debug)]
struct Quaternion {
a: f64,
b: f64,
c: f64,
d: f64
}
impl Quaternion {
pub fn new(a: f64, b: f64, c: f64, d: f64) -> Quaternion {
Quaternion {
... | {"is_valid":true,"category":{"Rust":true}} | single |
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. Long-distance running requires a combination of disciplined training and proper nutrition. Can you optimize this implementation:
CREATE TAB... | {"is_valid":true,"category":{"SQL":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Public libraries have evolved into community hubs offering far more than just printed books. Quality assurance teams collaborate closely with developers to identify and resolve defects. Local potters fired their kilns once a mo... | {"is_valid":true,"category":{"Bash":true,"C++":true}} | multi |
She placed the manuscript carefully on the desk and began the painstaking process of revision. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Take a look at this:
(function () {
'use strict';
function a(bool) {
console.log('a -->', bool);
return ... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Here is the code I was given:
#include <stdio.h>
#include <stdlib.h>
#define N 100000
int main()
{
int i, flip, *q = (int*)malloc(sizeof(int) * N) - 1;
q[1] = q[2] = 1;
for (i = 3; i <= N; i++)
q[i] = q[i - q[i - 1]] + q[i - q[i - 2]];
for (i = 1; i <= 10; i++)
printf("%d%c", q[i], i == 10 ? ' | {"is_valid":true,"category":{"C":true}} | single |
Quick question about this snippet:
provider "aws" {
region = "us-east-1"
}
terraform {
backend "s3" {
bucket = "state.kaak.us"
key = "terraform/global/topics.tfstate"
region = "us-east-1"
}
}
/*
* Given their importance, I should probably specify delivery policies for these
* topics.
*/
resource ... | {"is_valid":true,"category":{"Terraform":true,"C":true}} | multi |
What does this output:
# syntax: GAWK -f FASTA_FORMAT.AWK filename
# stop processing each file when an error is encountered
{ if (FNR == 1) {
header_found = 0
if ($0 !~ /^[;>]/) {
error("record is not valid")
nextfile
}
}
if ($0 ~ /^;/) { next } # comment begins with a ";"
... | {"is_valid":true,"category":{"AWK":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. Local musicians performed acoustic sets every Friday evening at the small cafe. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Corporate training programs increasingly include modules on colla... | {"is_valid":true,"category":{"YAML":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Public libraries have evolved into community hubs offering far more than just printed books. The garden looked particularly vibrant after the recent rain. Historians continue to debate the significance of the treaty signed in that piv... | {"is_valid":true,"category":{"YAML":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. He sat by the window with a steaming mug of tea and watched the snow gently falling. He sat by the window with a steaming mug of tea and watched the snow gently falling. The technology conference attracted engineers, designers, and pr... | {"is_valid":true,"category":{"Rust":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. She organized her bookshelves by genre and then alphabetically within each section. She enjoyed reading historical novels that transported her to far away places. She organized her bookshelves by genre and then alphabetically within each s... | {"is_valid":true,"category":{"C#":true,"Batch":true,"Swift":true}} | multi |
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 chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Travelers explored ancient ruins, marveling at the craft... | {"is_valid":true,"category":{"AWK":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. Policy analysts examined the long-term implications of the proposed legislative reform. Hikers were advised to carry plenty of water and to inform someone of their planned route. Historians continue to debate the significance of the t... | {"is_valid":false,"category":{}} | benign |
Please review the following snippet for issues:
import scala.annotation.tailrec
object UnboundedKnapsack extends App {
private val (maxWeight, maxVolume) = (BigDecimal(25.0), BigDecimal(0.25))
private val items = Seq(Item("panacea", 3000, 0.3, 0.025), Item("ichor", 1800, 0.2, 0.015), Item("gold", 2500, 2.0, 0.002... | {"is_valid":true,"category":{"Scala":true}} | single |
I need help debugging this script:
function Spiral-Matrix ( [int]$N )
{
# Initialize variables
$X = 0
$Y = -1
$i = 0
$Sign = 1
# Intialize array
$A = New-Object 'int[,]' $N, $N
# Set top row
1..$N | ForEach { $Y += $Sign; $A[$X,$Y] = ++$i }
# For each remaining | {"is_valid":true,"category":{"PowerShell":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. The morning light filtered through the kitchen window as the coffee brewed. Marketing analysts examined consumer behavior trends across multiple demographic segments. The botanical garden featured an impressive collection of ra... | {"is_valid":true,"category":{"Makefile":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Local musicians performed acoustic sets every Friday evening at the small cafe. Researchers gathered data from hundreds of households participating in the longitudinal study. The morning light filtered through the kitchen window as th... | {"is_valid":true,"category":{"Kotlin":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. Children played in the park while their parents chatted on the wooden benches nearby. Children played in the park while their parents chatted... | {"is_valid":true,"category":{"Batch":true,"Perl":true}} | multi |
The botanical garden featured an impressive collection of rare orchids from tropical regions. I need help debugging this script:
# This Terraform plan is responsible for the Code Valet control plane
#
# As described (loosely) in the README, the control plane is where the bits
# which are actually servicing codevalet.io... | {"is_valid":true,"category":{"Terraform":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. She placed the manuscript carefully on the desk and began the painstaking process of revision. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The conference featured keynote speakers from a wide v... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. She organized her bookshelves by genre and then alphabetically within each section. Please review the following snippet for issues:
class Card
# class constants
SUITS = %i[ Clubs Hearts Spades Diamonds ]
PIPS = %i[ 2 3 4 5 6 7 8 ... | {"is_valid":true,"category":{"Ruby":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Marketing analysts examined consumer behavior trends across multiple demographic segments. Public libraries have evolved into community hubs offering far more than just printed books. The conference featured keynote spea... | {"is_valid":true,"category":{"Swift":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Historians continue to debate the significance of the treaty signed in that pivotal year. The morning light filtered through the kitchen window as the c... | {"is_valid":false,"category":{}} | benign |
Database administrators monitor query performance and index utilization across busy schemas. He walked along the river path, listening to the rustling of leaves overhead. The committee scheduled a follow-up meeting to discuss the budget allocations. The chef prepared a simple meal of roasted vegetables, fresh bread, an... | {"is_valid":true,"category":{"Rust":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. 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. Economic indicators showed a gradual recovery following the previou... | {"is_valid":true,"category":{"Terraform":true,"Kotlin":true}} | multi |
Public libraries have evolved into community hubs offering far more than just printed books. The painting featured warm colors that evoked memories of childhood summers by the sea. Add comments to make this clearer:
#FROM arm32v7/alpine:3.9
FROM balenalib/armv7hf-alpine-python:latest-3.9
# Set ENV_VAR for Greengrass R... | {"is_valid":true,"category":{"Dockerfile":true,"AWK":true}} | multi |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Engineering teams often adopt iterative methodol... | {"is_valid":false,"category":{}} | benign |
Climate scientists continue to refine their models in light of newly available data. Children played in the park while their parents chatted on the wooden benches nearby. Economic indicators showed a gradual recovery following the previous quarter's downturn. The morning light filtered through the kitchen window as the... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Take a look at this:
CREATE TABLE staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (job_title_code VARCHAR, staff_id VARCHAR, date_assigned_to VARCHAR);
SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id OR... | {"is_valid":true,"category":{"SQL":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. She organized her bookshelves by genre and then alphabetically within each section. Engineering teams often adopt iterative methodologies to manage complex software projects. Network operators continually upgrade infrastructure t... | {"is_valid":true,"category":{"Batch":true}} | single |
Take a look at this:
import java.awt.image.*;
import java.io.File;
import java.io.IOException;
import javax.imageio.*;
public class ImageConvolution
{
public static class ArrayData
{
public final int[] dataArray;
public final int width;
public final int height;
public ArrayData(int width, int he... | {"is_valid":true,"category":{"Java":true}} | single |
I copied this from the docs:
use strict;
use warnings;
my %dict;
open my $handle, '<', 'unixdict.txt';
while (my $word = <$handle>) {
chomp($word);
my $len = length $word;
if (exists $dict{$len}) {
push @{ $dict{ $len } }, $word;
} else {
my @words = ( $word );
$dict{$len} = ... | {"is_valid":true,"category":{"Perl":true}} | single |
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. Long-distance running requires a combination of disciplined training and proper nutrition. The bakery on the corner was famous for its... | {"is_valid":true,"category":{"Makefile":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Run the following:
struct Foo;
impl Foo {
// implementation of an instance method for struct Foo
// returning the answer to life
fn get_the_answer_to_life(&self) -> i32 {
42
}
// implementation of a stat... | {"is_valid":true,"category":{"Rust":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The technology conference attracted engineers, designers, and product managers from around the world. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Volunteers spent the weekend cleaning up the rive... | {"is_valid":true,"category":{"JavaScript":true,"SQL":true,"Lua":true}} | multi |
Add comments to make this clearer:
#include <stdio.h>
#include <float.h>
double pow_ (double x, int e) {
int i;
double r = 1;
for (i = 0; i < e; i++) {
r *= x;
}
return r;
}
double root (int n, double x) {
double d, r = 1;
if (!x) {
return 0;
}
if (n < 1 || (x < 0... | {"is_valid":true,"category":{"C":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. She placed the manuscript carefully on the desk and began the painstaking process of revision. Local potters fired their kilns once a month, producing colorful ceramics for the shops. She organized her bookshelves by genre and th... | {"is_valid":true,"category":{"Batch":true}} | single |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Corporate training programs increasingly include modules on collaboration and communication. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Visitors strolled through the cobblestone stre... | {"is_valid":true,"category":{"JavaScript":true}} | single |
I copied this from the docs:
@echo off
:: {CTRL + C} to exit the batch file
:: Send incrementing decimal values to the :to_Oct function
set loop=0
:loop1
call:to_Oct %loop%
set /a loop+=1
goto loop1
:: Convert the decimal values parsed [%1] to octal and output them on a new line
:to_Oct
set todivide=%1
set "fulloct="... | {"is_valid":true,"category":{"Batch":true}} | single |
Can you optimize this implementation:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Versio... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. Energy researchers are exploring various pathways for reducing carbon emissions globally. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Farmers depend on accurate weather ... | {"is_valid":true,"category":{"Dockerfile":true,"Terraform":true}} | multi |
Long-distance running requires a combination of disciplined training and proper nutrition. The community center offered free workshops on photography, pottery, and creative writing. Project managers stressed the importance of clear documentation throughout the cycle. The community center offered free workshops on photo... | {"is_valid":true,"category":{"Kotlin":true,"Rust":true}} | multi |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The painting featured warm colors that evoked memories of childhood summers by the sea. Find any security problems in:
require 'continuation' unless defined? Continuation
if a = callcc { |c| [c, 1] }
c, i = a
c[nil] if i > 100... | {"is_valid":true,"category":{"Ruby":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Can you optimize this implementation:
#!/bin/ksh
# This should work on any clone of Bourne Shell, ksh is the fastest.
value=$1; [ -z "$v... | {"is_valid":true,"category":{"Bash":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. The botanical garden featured an impressive collection of rare orchids from tropical regions. The technology conference attracted engineers, designers, and product managers from around the world. He walked along the river path, listening to t... | {"is_valid":true,"category":{"YAML":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Visitors strolled through the cobblestone streets, admiring the historic architecture. Refactor the function below:
BEGIN {
for (l = 0; l <= 2147483647; l++) {
printf("%o\n", l);
}
}
On a related note, this block:
import java.net.U... | {"is_valid":true,"category":{"AWK":true,"Java":true}} | multi |
Energy researchers are exploring various pathways for reducing carbon emissions globally. The painting featured warm colors that evoked memories of childhood summers by the sea. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The botanical garden featured an impressive collection o... | {"is_valid":true,"category":{"YAML":true,"Go":true,"C":true}} | multi |
Could you explain what this code does:
# 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, Versi... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. Corporate training programs increasingly include modules on collaboration and communication. The newly opened gallery showcased contemporary works by emerging regional artists. Researchers gathered data from hundreds of household... | {"is_valid":true,"category":{"Rust":true,"R":true}} | multi |
Database administrators monitor query performance and index utilization across busy schemas. Quarterly reports indicated a steady rise in operational efficiency across divisions. Climate scientists continue to refine their models in light of newly available data. The neighborhood gathered every Saturday morning at the ... | {"is_valid":true,"category":{"Batch":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. Researchers gathered data from hundreds of households participating in the longitudinal study. Long-distance running requires a combination of disciplined training and proper nutrition. Software architects often debate the merits of mon... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Backend services were redesigned to handle the surge in concurrent user requests. Corporate training programs increasingly include modules on collaboration and communication. He sat by the window with a steaming mug of tea and watche... | {"is_valid":true,"category":{"SQL":true,"Terraform":true}} | multi |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Researchers gathered data from hundreds of households participating in the longitudinal study. Policy analysts examined the long-term implications of the proposed legislative reform. Quarterly reports indicated a steady rise in... | {"is_valid":true,"category":{"Kotlin":true,"C#":true}} | multi |
Policy analysts examined the long-term implications of the proposed legislative reform. Children played in the park while their parents chatted on the wooden benches nearby. I need help debugging this script:
def stripchars(string; banish):
(string | explode) - (banish | explode) | implode;
On a related note, this b... | {"is_valid":true,"category":{"jq":true,"PowerShell":true}} | multi |
She enjoyed reading historical novels that transported her to far away places. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Children played in the park while their parents chatted on t... | {"is_valid":true,"category":{"JavaScript":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. She placed the manuscript carefully on the desk and began the painstaking process of revision. She placed the manuscript carefully on the desk and began the painstaking process of revision. The morning light filtered through the kitchen ... | {"is_valid":true,"category":{"C++":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. I copied this from the docs:
> strings <- c("152", "-3.1415926", "Foo123")
> suppressWarnings(!is.na(as.numeric(strings)))
[1] TRUE TRUE FALSE The painting featured warm colors that evoked memories of childhood summers by the s... | {"is_valid":true,"category":{"R":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Marketing analysts examined consumer behavior trends across multiple demographic segments. Statistical models can sometimes obscure the limitat... | {"is_valid":true,"category":{"Swift":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Refactor the function below:
abstract class X {
type A
var B: A
val C: A
def D(a: A): A
}
trait Y {
val x: X
} | {"is_valid":true,"category":{"Scala":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. Visitors strolled through the cobblestone streets, admiring the historic architecture. She enjoyed reading historical novels that transported her to far away places. Hikers were advised to carry plenty of water and to inform so... | {"is_valid":true,"category":{"Lua":true,"jq":true}} | multi |
Engineering teams often adopt iterative methodologies to manage complex software projects. The painting featured warm colors that evoked memories of childhood summers by the sea. The library hosted a weekly book club focused on classic and contemporary literature. Visitors strolled through the cobblestone streets, admi... | {"is_valid":false,"category":{}} | benign |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. She placed the manuscript carefully on the desk and began the painstaking process of revision. Could you explain what this code does:
// version 1.1.3
import java.awt.BorderLayout
import java.awt.Color
import java.awt.Dimension
impor... | {"is_valid":true,"category":{"Kotlin":true,"Perl":true}} | multi |
Translate this into another language for me:
#include <stdio.h>
void table(const char *title, const char *mode)
{
int f, b;
printf("\n\033[1m%s\033[m\n bg\t fg\n", title);
for (b = 40; b <= 107; b++) {
if (b == 48) b = 100;
printf("%3d\t\033[%s%dm", b, mode, b);
for (f = 30; f <= 97; f++) {
if (f == 38) f... | {"is_valid":true,"category":{"C":true,"Ruby":true}} | multi |
I need help debugging this script:
use strict;
use warnings;
package Automaton {
sub new {
my $class = shift;
my $rule = [ reverse split //, sprintf "%08b", shift ];
return bless { rule => $rule, cells => [ @_ ] }, $class;
}
sub next {
my $this = shift;
my @previous = @{$this->{cells}};
$this->{cell... | {"is_valid":true,"category":{"Perl":true,"Makefile":true,"Terraform":true}} | multi |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Travelers explored ancient ruins, marveling at the... | {"is_valid":true,"category":{"Rust":true,"Perl":true,"jq":true}} | multi |
The library hosted a weekly book club focused on classic and contemporary literature. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Policy analysts examined the long-term implications ... | {"is_valid":true,"category":{"Terraform":true}} | single |
Take a look at this:
import BigInt
func integerSquareRoot<T: BinaryInteger>(_ num: T) -> T {
var x: T = num
var q: T = 1
while q <= x {
q <<= 2
}
var r: T = 0
while q > 1 {
q >>= 2
let t: T = x - r - q
r >>= 1
if t >= 0 {
x | {"is_valid":true,"category":{"Swift":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Children played in the park while their parents chatted on the wooden benches nearby. Researchers gathered data from hundreds of households participating in the longitudinal study. The community center offered free workshops on ph... | {"is_valid":true,"category":{"YAML":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. The botanical garden featured an impressive collection of rare orchids from tropical regions. Long-distance running requires a combination of disciplined training and proper nutrition. The botanical garden featured an impressive coll... | {"is_valid":true,"category":{"Makefile":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Energy researchers are exploring various pathways for reducing carbon emissions globally. Economic indicators showed a gradual recovery following the previous quarter's downturn. Hikers were advised to carry plenty of water and to inf... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. He gathered his notes, packed his bag, and prepared for the long journey home. Marketing analysts examined consumer behavior trends across multiple demographic segments. Quick question about this snippet:
fn is_self_desc(xx: u64) -> ... | {"is_valid":true,"category":{"Rust":true,"Scala":true}} | multi |
I need help debugging this script:
# emit a stream of gapful numbers greater than or equal to $start,
# which is assumed to be an integer
def gapful($start):
range($start; infinite)
| . as $i
| tostring as $s
| (($s[:1] + $s[-1:]) | tonumber) as $x
| select($i % $x == 0);
"First 30 gapful nu | {"is_valid":true,"category":{"jq":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. I copied this from the docs:
@echo off
setlocal enabledelayedexpansion
echo.
::Task #1
call :hailstone 111
echo Task #1: (Start:!sav!)
echo !seq!
echo.
echo Sequence has !cnt! elements.
echo.
::Task #2
call :hailstone 27
echo Tas... | {"is_valid":true,"category":{"Batch":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. She organized her bookshelves by genre and then alphabetically within each section. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Production teams refined their processes to mini... | {"is_valid":false,"category":{}} | benign |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Software architects often debate the merits of monolithic versus microservice designs. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Long-distance running requires a combination of ... | {"is_valid":true,"category":{"C":true,"Ruby":true,"Bash":true}} | multi |
The classroom hummed with quiet conversation as students worked through practice problems. Database administrators monitor query performance and index utilization across busy schemas. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Policy analysts examined the long-term implicati... | {"is_valid":true,"category":{"C++":true,"Makefile":true}} | multi |
Quick question about this snippet:
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 o... | {"is_valid":true,"category":{"R":true,"C":true}} | multi |
Here is the code I was given:
#!/usr/bin/perl
use strict ;
use warnings ;
sub longestCommonSubstr {
my $first = shift ;
my $second = shift ;
my %firstsubs = findSubstrings ( $first );
my %secondsubs = findSubstrings ( $second ) ;
my @commonsubs ;
foreach my $subst ( keys %firstsubs ) {
if ( ex... | {"is_valid":true,"category":{"Perl":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. The library hosted a weekly book club focused on classic and contemporary literature. Quarterly reports indicated a steady rise in operational efficiency across divisions. Statistical models can sometimes obscure the limitations of ... | {"is_valid":true,"category":{"Go":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. Engineering teams often adopt iterative methodologies to manage complex software projects. Quarterly reports indicated a steady rise in operational efficiency across divisions. The library hosted a weekly book club foc... | {"is_valid":true,"category":{"AWK":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Please review the following snippet for issues:
# 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
# regardin... | {"is_valid":true,"category":{"Dockerfile":true,"Terraform":true}} | multi |
She enjoyed reading historical novels that transported her to far away places. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Take a look at this:
#include <stdio.h>
#include <ctype.h>
int can_make_words(char **b, char *word)
{
int i, ret = 0, c = toupper(*word);
#define SWAP(... | {"is_valid":true,"category":{"C":true,"jq":true}} | multi |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Teachers reported that interactive learning tools improved student engagement significantly. Please review the following snippet for issues:
#include <stdio.h>
#include <math.h>
int main(int argc, char **argv) {
float x[4] = ... | {"is_valid":true,"category":{"C":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. Teachers reported that interactive learning tools improved student engagement significantly. Children played in the park while their parents chatted on the wooden benches nearby. The conference featured keynote speakers from a wide vari... | {"is_valid":true,"category":{"C":true}} | single |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Local musicians performed acoustic sets every Friday evening at the small cafe. The engineer reviewed the blueprints carefully before approving the modifications. Children played in the park while their parents chatted on the w... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Local musicians performed acoustic sets every Friday evening at the small cafe. He wandered through the old bookstore, occasionally pulling a worn paperback f... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.