prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
Production teams refined their processes to minimize waste and improve overall yield. Software architects often debate the merits of monolithic versus microservice designs. Quarterly reports indicated a steady rise in operational efficiency across divisions. Hikers were advised to carry plenty of water and to inform so... | {"is_valid":true,"category":{"Go":true}} | single |
Add comments to make this clearer:
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> def f(x): return abs(x) ** 0.5 + 5 * x**3
>>> print(', '.join('%s:%s' % (x, v if v<=400 else "TOO LARGE!")
for x,v | {"is_valid":true,"category":{"Python":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Teachers reported that interactive learning tools improved student engagement significantly. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The engineer reviewed the blueprints carefully before a... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. He sat by the window with a steaming mug of tea and watched the snow gently falling. Visitors strolled through the cobblestone streets, admiring the historic architecture. Statistical models can sometimes obscure the limitations of... | {"is_valid":true,"category":{"C#":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The bakery on the corner was famous for its sourdough l... | {"is_valid":true,"category":{"Swift":true,"Dockerfile":true}} | multi |
Here is the code I was given:
class Program
{
static void Main(string[] args)
{
// Create and fill a list of number 1 to 1000
List<double> myList = new List<double>();
for (double i = 1; i < 1001; i++)
{
myList.Add(i);
}
// Calculate the su | {"is_valid":true,"category":{"C#":true}} | single |
Refactor the function below:
import Darwin
func s_of_n_creator<T>(n: Int) -> T -> [T] {
var sample = [T]()
var i = 0
return {(item: T) in
i++
if (i <= n) {
sample.append(item)
} else if (Int(arc4random_uniform(UInt32(i))) < n) {
sample[Int(arc4random_uniform(UInt32(n)))] = item
}
... | {"is_valid":true,"category":{"Swift":true,"JavaScript":true,"C++":true}} | multi |
I need help debugging this script:
let ld10 = log(2.0) / log(10.0)
func p(L: Int, n: Int) -> Int {
var l = L
var digits = 1
while l >= 10 {
digits *= 10
l /= 10
}
var count = 0
var i = 0
while count < n {
let rhs = (Double(i) * ld10).truncatingRemainder(dividingBy: 1)
let e = exp(l... | {"is_valid":true,"category":{"Swift":true,"Kotlin":true}} | multi |
Take a look at this:
using System;
using System.Collections.Generic;
namespace RosettaSearchListofRecords
{
class Program
{
static void Main(string[] args)
{
var dataset = new List<Dictionary<string, object>>() {
new Dictionary<string, object> {{ "name" , "Lagos"}... | {"is_valid":true,"category":{"C#":true,"AWK":true}} | multi |
Teachers reported that interactive learning tools improved student engagement significantly. The committee scheduled a follow-up meeting to discuss the budget allocations. | {"is_valid":false,"category":{}} | benign |
Local musicians performed acoustic sets every Friday evening at the small cafe. The committee scheduled a follow-up meeting to discuss the budget allocations. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Project managers stressed the importance of clear documentation thro... | {"is_valid":false,"category":{}} | benign |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Policy analysts examined the long-term implications of the proposed legislative reform. He sat by the window with a steaming mug of t... | {"is_valid":true,"category":{"Rust":true,"Java":true}} | multi |
Add comments to make this clearer:
require 'prime'
def powerMod(b, p, m)
p.to_s(2).each_char.inject(1) do |result, bit|
result = (result * result) % m
bit=='1' ? (result * b) % m : result
end
end
def multOrder_(a, p, k)
pk = p ** k
t = (p - 1) * p ** (k - 1)
r = 1
for q, e in t.prime_divisi | {"is_valid":true,"category":{"Ruby":true}} | single |
I need help debugging this script:
#include <boost/date_time/gregorian/gregorian.hpp>
#include <iostream>
#include <cstdlib>
int main( int argc , char* argv[ ] ) {
using namespace boost::gregorian ;
greg_month months[ ] = { Jan , Feb , Mar , Apr , May , Jun , Jul ,
Aug , Sep , Oct , Nov , Dec } ;
gre... | {"is_valid":true,"category":{"C++":true}} | single |
Can you optimize this implementation:
var str="broood"
var number:[Int]=[1,17,15,0,0,5]
//function to encode the string
func encode(st:String)->[Int]
{
var array:[Character]=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
var num:[Int]=[]
var temp:Char | {"is_valid":true,"category":{"Swift":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. Engineering teams often adopt iterative methodologies to manage complex software projects. Quarterly reports indicated a steady rise in operational efficiency across divisions. Quarterly reports indicated a steady rise in operational ef... | {"is_valid":true,"category":{"Bash":true}} | single |
Could you explain what this code does:
# DO NOT EDIT FILES CALLED 'Dockerfile'; they are automatically
# generated. Edit 'Dockerfile.in' and generate the 'Dockerfile'
# with the 'rake' command.
# The suggested name for this image is: bioconductor/release_protcore.
FROM bioconductor/release_protmetcore2
MAINTAINER lg... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Can you optimize this implementation:
#include <iostream>
#include <vector>
#include <iterator>
class Hofstadter
{
public:
static int F(int n) {
if ( n == 0 ) return 1;
return n - M(F(n-1));
}
static int M(int n) {
if ( n == 0 ) return 0;
return n - F(M(n-1));
}
};
using namespace std;
int... | {"is_valid":true,"category":{"C++":true,"PowerShell":true,"AWK":true}} | multi |
Public libraries have evolved into community hubs offering far more than just printed books. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Long-distance running requires a combination of disciplined training and proper nutrition. The painting featured warm colors that evo... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Climate scientists continue to refine their models in light of newly available data. She enjoyed reading historical novels that transported her to far away places. The community center offered free workshops on photography, pottery, and creative writing. Climate scientists continue to refine their models in light of ne... | {"is_valid":true,"category":{"Batch":true,"C#":true}} | multi |
I need help debugging this script:
sub zip {
my @a = @{shift()};
my @b = @{shift()};
my @l;
push @l, shift @a, shift @b while @a and @b;
return @l;
}
sub uniq {
my %h;
grep {!$h{$_}++} @_;
}
my @data =
map {{ zip [qw(name id salary dept)], [split ','] }}
split "\n",
<<'E | {"is_valid":true,"category":{"Perl":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Take a look at this:
?RNG
help.search("Distribution", package="stats") | {"is_valid":true,"category":{"R":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. The botanical garden featured an impressive collection of rare orchids from tropical regions. Researchers gathered data from hundreds of households participating in the longitudinal study. He sat by the window with a steaming mug... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. The engineer reviewed the blueprints carefully before approving the modifications. | {"is_valid":false,"category":{}} | benign |
Translate this into another language for me:
package main
import (
"image"
"image/color"
"image/png"
"log"
"os"
"sync"
)
func main() {
const (
width, height = 800.0, 600.0
maxIter = 255
cX, cY = -0.7, 0.27015
fileName = "julia.png"
)
img := image.NewNRGBA(image.Rect(0, 0, width, h... | {"is_valid":true,"category":{"Go":true,"Terraform":true,"YAML":true}} | multi |
Run the following:
#include <iostream>
struct SpecialVariables
{
int i = 0;
SpecialVariables& operator++()
{
// 'this' is a special variable that is a pointer to the current
// class instance. It can optionally be used to refer to elements
// of the class. | {"is_valid":true,"category":{"C++":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. Energy researchers are exploring various pathways for reducing carbon emissions globally. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Quality assurance teams collaborate closely with deve... | {"is_valid":true,"category":{"Go":true,"C#":true}} | multi |
Historians continue to debate the significance of the treaty signed in that pivotal year. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Can you optimize this implementation:
def count(stream; cond):
reduce stream as $i (0; if $i|cond then .+1 else . end);
def Months: [... | {"is_valid":true,"category":{"jq":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Project managers stressed the importance of clear documentation throughout the cycle. Energy researchers are exploring various pathways for reducing carbon emissions globally. The bakery on the corner was famous for its sourdough loa... | {"is_valid":true,"category":{"Rust":true}} | single |
Quick question about this snippet:
import java.time.LocalTime
import scala.compat.Platform
trait MeanAnglesComputation {
import scala.math.{Pi, atan2, cos, sin}
def meanAngle(angles: List[Double], convFactor: Double = 180.0 / Pi) = {
val sums = angles.foldLeft((.0, .0))((r, c) => {
val rads = c / conv... | {"is_valid":true,"category":{"Scala":true,"C++":true}} | multi |
The painting featured warm colors that evoked memories of childhood summers by the sea. The committee scheduled a follow-up meeting to discuss the budget allocations. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The bakery on the corner was famous for its sourdough loaves... | {"is_valid":true,"category":{"jq":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Corporate training programs increasingly include modules on collaboration and communication. Climate scientists continue to refine their models in... | {"is_valid":false,"category":{}} | benign |
He sat by the window with a steaming mug of tea and watched the snow gently falling. He walked along the river path, listening to the rustling of leaves overhead. He walked along the river path, listening to the rustling of leaves overhead. He adjusted the telescope and waited patiently for the clouds to clear over the... | {"is_valid":true,"category":{"PowerShell":true,"Bash":true}} | multi |
I need help debugging this script:
import Foundation // for sqrt() and Date()
let max = 1_000_000
let maxroot = Int(sqrt(Double(max)))
let startingPoint = Date()
var isprime = [Bool](repeating: true, count: max+1 )
for i in 2...maxroot {
if isprime[i] {
for k in stride(from: max/i, through: i, by: -1) {... | {"is_valid":true,"category":{"Swift":true}} | single |
Please review the following snippet for issues:
package main
import (
"fmt"
"math"
)
type mwriter struct {
value float64
log string
}
func (m mwriter) bind(f func(v float64) mwriter) mwriter {
n := f(m.value)
n.log = m.log + n.log
return n
}
func unit(v float64, s string) mwriter {... | {"is_valid":true,"category":{"Go":true}} | single |
Please review the following snippet for issues:
import scala.collection.mutable.ListBuffer
object Abundant {
def divisors(n: Int): ListBuffer[Int] = {
val divs = new ListBuffer[Int]
divs.append(1)
val divs2 = new ListBuffer[Int]
var i = 2
while (i * i <= n) {
if (n % i == 0) {
... | {"is_valid":true,"category":{"Scala":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. He gathered his notes, packed his bag, and prepared for the long journey home. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The garden looked particularly vibrant after the recent rai... | {"is_valid":false,"category":{}} | benign |
Software architects often debate the merits of monolithic versus microservice designs. 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. She placed the manuscript carefully on the desk and be... | {"is_valid":true,"category":{"PowerShell":true,"AWK":true}} | multi |
Please review the following snippet for issues:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct rec_t rec_t;
struct rec_t {
int depth;
rec_t * p[10];
};
rec_t root = {0, {0}};
#define USE_POOL_ALLOC
#ifdef USE_POOL_ALLOC /* not all that big a deal */
rec_t *tail = 0, *head = 0;
#define... | {"is_valid":true,"category":{"C":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Economic indicators showed a gradual recovery following the previous quarter's downturn. Public libraries have evolved into community hubs o... | {"is_valid":false,"category":{}} | benign |
The library hosted a weekly book club focused on classic and contemporary literature. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Statistical models can sometimes obscure the limitations of the underlying data sources. The technology conference attracted engineers, desig... | {"is_valid":true,"category":{"Terraform":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. The newly opened gallery showcased contemporary works by emerging regional artists. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Quality assurance teams collaborate closely with developers to identi... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. Policy analysts examined the long-term implications of the proposed legislative reform. Statistical models can sometimes obscure the limitations of the underlying data sources. The garden looked particularly vibrant after the recent r... | {"is_valid":true,"category":{"YAML":true,"jq":true}} | multi |
I copied this from the docs:
[int]$count = 0
[int]$maxCount = 0
[datetime[]]$times = @()
$jobs = Get-Content -Path ".\mlijobs.txt" | ForEach-Object {
[string[]]$fields = $_.Split(" ",[StringSplitOptions]::RemoveEmptyEntries)
[datetime]$datetime = Get-Date $fields[3].Replace("_"," ")
[PSCustomObject]@{
... | {"is_valid":true,"category":{"PowerShell":true,"Java":true}} | multi |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. The botanical garden featured an impressive collection of rare orchids from tropical regions. The painting featured warm colors that evoked memories of childhood summers by the sea. Public libraries have evolved into community... | {"is_valid":true,"category":{"Terraform":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The engineer reviewed the blueprints carefully before approving the modifications. The morning light filtered through the kitchen window as ... | {"is_valid":true,"category":{"Ruby":true}} | single |
Please review the following snippet for issues:
# syntax: GAWK -f CATALAN_NUMBERS_PASCALS_TRIANGLE.AWK
# converted from C
BEGIN {
printf("1")
for (n=2; n<=15; n++) {
num = den = 1
for (k=2; k<=n; k++) {
num *= (n + k)
den *= k
catalan = num / den
}
printf(" %d",ca... | {"is_valid":true,"category":{"AWK":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Researchers have been studying migration patterns... | {"is_valid":false,"category":{}} | benign |
Translate this into another language for me:
apiVersion: batch/v1
kind: Job
metadata:
name: test-job2
spec:
template:
metadata:
name: test-job2
spec:
containers:
- name: test-container
image: gcr.io/google_containers/busybox
command: [ "/bin/sh", "-c", "sleep 20; env"]
... | {"is_valid":true,"category":{"YAML":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Quality assurance teams collaborate closely with developers to identify and resolve defects. Software architects often debate the merits of monolithic versus microservice designs. Local musicians performed acoustic sets every ... | {"is_valid":true,"category":{"PowerShell":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Researchers have been studying migration patterns of monarch butterflies for years. The morning light filtered through the kitchen window as the coffee brewed. Astronomers observed a faint signal that appeared to originate from... | {"is_valid":true,"category":{"Java":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. Production teams refined their processes to minimize waste and improve overall yield. The community center offered free workshops on photography, pottery, and creative writing. The chef prepared a simple meal of roasted veget... | {"is_valid":true,"category":{"AWK":true}} | single |
Take a look at this:
<html>
<head>
<script>
function clip (subjectPolygon, clipPolygon) {
var cp1, cp2, s, e;
var inside = function (p) {
return (cp2[0]-cp1[0])*(p[1]-cp1[1]) > (cp2[1]-cp1[1])*(p[0]-cp1[0]);
};
var intersection = function ()... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. She enjoyed reading historical novels that transported her to far away places. The engineer reviewed the blueprints carefully before approving the modifications. She organized her bookshelves by genre and then alphabetically within e... | {"is_valid":true,"category":{"R":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Researchers have been studying migration patterns of monar... | {"is_valid":true,"category":{"Swift":true,"SQL":true}} | multi |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Could you explain what this code does:
#include <iostream>
#include <string>
using namespace std;
int main() {
string dog = "Benjamin", Dog = "Samba", DOG = "Bernie";
cout << "The three dogs are named " << dog << "... | {"is_valid":true,"category":{"C++":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. 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. Late spring rains caused the lake to swell beyond its u... | {"is_valid":true,"category":{"C++":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Refactor the function below:
CREATE TABLE customer (cust_name VARCHAR, cust_id VARCHAR); CREATE TABLE loan (cust_id VARCHAR);
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAV... | {"is_valid":true,"category":{"SQL":true}} | single |
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 committee scheduled a follow-up meeting to discuss the budget allocations. The chef prepared a simple meal of roasted vegetables, fresh bread, and... | {"is_valid":true,"category":{"R":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Hikers were advised to carry plenty of water and to inform someone of their planned route. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Visitors strolled through the cobblestone stre... | {"is_valid":false,"category":{}} | benign |
Here is the code I was given:
using System;
namespace BullsnCows
{
class Program
{
static void Main(string[] args)
{
int[] nums = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
KnuthShuffle<int>(ref nums);
int[] chosenNum = new int[4];
Array.Copy(num... | {"is_valid":true,"category":{"C#":true}} | single |
Translate this into another language for me:
// version 1.1.4
data class DivMod(val quotient: Int, val remainder: Int)
fun egyptianDivide(dividend: Int, divisor: Int): DivMod {
require (dividend >= 0 && divisor > 0)
if (dividend < divisor) return DivMod(0, dividend)
val powersOfTwo = mutableListOf(1)
... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The painting featured warm colors that evoked memories of ch... | {"is_valid":true,"category":{"C":true}} | single |
Take a look at this:
# $FreeBSD$
PORTSDIR?= /usr/ports
BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk
# Needed to keep bsd.own.mk from reading in /etc/src.conf
# and setting MK_* variables when building ports.
_WITHOUT_SRCCONF=
# Enable CTF conversion on request.
.if defined(WITH_CTF)
.undef NO_CTF
.endif
.include <bsd.own... | {"is_valid":true,"category":{"Makefile":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. Economic indicators showed a gradual recovery following the previous quarter's downturn. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Local musicians performed acoustic sets every Friday eveni... | {"is_valid":false,"category":{}} | benign |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Marketing analysts examined consumer behavior trends across multiple demographic segments. She enjoyed reading historical novels that transporte... | {"is_valid":true,"category":{"Lua":true,"C":true}} | multi |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Local musicians performed acoustic sets every Friday evening at the small cafe. Software architects often debate the merits of monolithic versus microservice designs. Climate models suggest that ocean temperatures will continu... | {"is_valid":true,"category":{"C":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Energy researchers are exploring various pathways for reducing carbon emissions globally. She organized her bookshelves by genre and then alphabetically within each section. The morning light filtered through the kitchen window... | {"is_valid":false,"category":{}} | benign |
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. I copied this from the docs:
val keys = List(1, 2, 3)
val values = Array("A", "B", "C") // Array mixed with List
val map = keys.zip(values).t... | {"is_valid":true,"category":{"Scala":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. She enjoyed reading historical novels that transported her to far away places. The botanical garden featured an impressive collection of rare orchids from ... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Engineering teams often adopt iterative methodologies to manage complex software projects. Teachers reported that interactive learning tools i... | {"is_valid":true,"category":{"Lua":true}} | single |
Find any security problems in:
(() => {
"use strict";
// ------------ ORDER DISJOINT LIST ITEMS ------------
// disjointOrder :: [String] -> [String] -> [String]
const disjointOrder = ms =>
ns => zipWith(
a => b => [...a, b]
)(
segments(ms)(ns)
)(
... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Here is the code I was given:
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/... | {"is_valid":true,"category":{"Makefile":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Hikers were advised to carry plenty of water and to inform someone of their planned route. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. He gathered his notes, packed his bag, and prepar... | {"is_valid":true,"category":{"Scala":true,"Go":true,"PowerShell":true}} | multi |
Economic indicators showed a gradual recovery following the previous quarter's downturn. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Public libraries have evolved into community hubs offering far more than just printed books. Astronomers observed a faint signal that appeared ... | {"is_valid":false,"category":{}} | benign |
Take a look at this:
# Emit . and stop as soon as "condition" is true.
def until(condition; next):
def u: if condition then . else (next|u) end;
u;
def url_decode:
# The helper function converts the input string written in the given
# "base" to an integer
def to_i(base):
explode
| reverse
| map(... | {"is_valid":true,"category":{"jq":true}} | single |
The classroom hummed with quiet conversation as students worked through practice problems. Marketing analysts examined consumer behavior trends across multiple demographic segments. Hikers were advised to carry plenty of water and to inform someone of their planned route. Add comments to make this clearer:
apiVersion: ... | {"is_valid":true,"category":{"YAML":true,"C++":true}} | multi |
Energy researchers are exploring various pathways for reducing carbon emissions globally. I need help debugging this script:
extern crate num;
use num::integer::gcd; | {"is_valid":true,"category":{"Rust":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. 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. She placed the manuscript carefully on the desk and began the p... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Here is the code I was given:
COLORS=(red white blue)
# to go from name to number, we make variables out of the color names
# (e.g. the variable "$red" has value "1").
for (( i=0; i<${#COLORS[@]}; ++i )); do
eval ${COLORS[i]}=$i
done
# Make a random list
function random_balls {
local -i n="$1"
local -i i
l... | {"is_valid":true,"category":{"Bash":true,"Lua":true}} | multi |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Quick question about this snippet:
function hamming() {
var queues = {2: [], 3: [], 5: []};
var base;
var next_ham = 1;
while (true) {
yield next_ham;
for (base in queues) {queues[base].push(n... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Translate this into another language for me:
function eval(a,b,c,x)
return a + (b + c * x) * x
end
function regression(xa,ya)
local n = #xa
local xm = 0.0
local ym = 0.0
local x2m = 0.0
local x3m = 0.0
local x4m = 0.0
local xym = 0.0
local x2ym = 0.0
for i=1,n do
xm... | {"is_valid":true,"category":{"Lua":true}} | single |
Can you optimize this implementation:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Narcissist {
private static final String SOURCE = "import java.io.BufferedReader;%nimport java.io.IOException;%nimport java.io.InputStreamReader;%n%npublic class Narcis | {"is_valid":true,"category":{"Java":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Quality assurance teams collaborate closely with developers to identify and resolve defects. She placed the manuscript carefully on the desk and b... | {"is_valid":true,"category":{"Bash":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Quality assurance teams collaborate closely with developers to identify and resolve defects. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Distributed systems demand careful attention to ... | {"is_valid":true,"category":{"Kotlin":true,"jq":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. Economic indicators showed a gradual recovery following the previous quarter's downturn. Production teams refined their processes to minimize... | {"is_valid":true,"category":{"jq":true}} | single |
The garden looked particularly vibrant after the recent rain. Long-distance running requires a combination of disciplined training and proper nutrition. Network operators continually upgrade infrastructure to keep pace with growing demand. Nutritionists generally recommend a balanced diet rich in whole grains and fresh... | {"is_valid":true,"category":{"Perl":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. He sat by the window with a steaming mug of tea and watched the snow gently falling. The morning light filtered through the kitchen window as the coffee brewed. Historians continue to debate the significance of the treaty signe... | {"is_valid":true,"category":{"Python":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. She organized her bookshelves by genre and then alphabetically within each section. I need help debugging this script:
727 == 0b1011010111 # => true,... | {"is_valid":true,"category":{"Ruby":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Database administrators monitor query performance and index utilization across busy schemas. Backend services were redesigned to handle the surge in concurrent user requests. Climate models suggest that ocean temperatures will co... | {"is_valid":false,"category":{}} | benign |
She enjoyed reading historical novels that transported her to far away places. Run the following:
n <- 100000
u <- sqrt(-2*log(runif(n)))
v <- 2*pi*runif(n)
x <- u*cos(v)
y <- v*sin(v)
hist(x) | {"is_valid":true,"category":{"R":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Marketing analysts examined consumer behavior trends across multiple demographic segments. Here is the code I was given:
:: This line is only required t... | {"is_valid":true,"category":{"Batch":true}} | single |
Translate this into another language for me:
def checkdigit:
[[0, 3, 1, 7, 5, 9, 8, 6, 4, 2],
[7, 0, 9, 2, 1, 5, 4, 8, 6, 3],
[4, 2, 0, 6, 8, 7, 1, 3, 5, 9],
[1, 7, 5, 0, 9, 8, 3, 4, 2, 6],
[6, 1, 2, 3, 0, 4, 5, 9, 7, 8],
[3, 6, 7, 4, 2, 0, 9, 5, 8, 1],
[5, 8, 6, 9... | {"is_valid":true,"category":{"jq":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. Statistical models can sometimes obscure the limitations of the underlying data sources. Marketing analysts examined consumer behavior trends across multiple demographic segments. Network operators continually upgrade infrastru... | {"is_valid":false,"category":{}} | benign |
I copied this from the docs:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (t... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Here is the code I was given:
$extra = "little"
"Mary had a {0} lamb." -f $extra | {"is_valid":true,"category":{"PowerShell":true}} | single |
Here is the code I was given:
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Public libraries have evolved into community hubs offering far more than just printed books. 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 garden looked particularly vibrant aft... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. Database administrators monitor query performance and index utilization across busy schemas. The committee scheduled a follow-up meeting to discuss the budget allocations. Energy researchers are exploring various pathways for reducing... | {"is_valid":true,"category":{"Ruby":true}} | single |
I copied this from the docs:
(() => {
'use strict';
// EGYPTIAN DIVISION --------------------------------
// eqyptianQuotRem :: Int -> Int -> (Int, Int)
const eqyptianQuotRem = (m, n) => {
const expansion = ([i, x]) =>
x > m ? (
Nothing()
) | {"is_valid":true,"category":{"JavaScript":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.