prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
Add comments to make this clearer:
# syntax: GAWK -f ROMAN_NUMERALS_ENCODE.AWK
BEGIN {
leng = split("1990 2008 1666",arr," ")
for (i=1; i<=leng; i++) {
n = arr[i]
printf("%s = %s\n",n,dec2roman(n))
}
exit(0)
}
function dec2roman(number, v,w,x,y,roman1,roman10,roman100,roman1000) {
numbe... | {"is_valid":true,"category":{"AWK":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Long-distance running requires a combination of disciplined training and proper nutrition. Backend services were redesigned to handle the su... | {"is_valid":false,"category":{}} | benign |
I copied this from the docs:
// version 1.1.2
fun biased(n: Int) = Math.random() < 1.0 / n
fun unbiased(n: Int): Boolean {
var a: Boolean
var b: Boolean
do {
a = biased(n)
b = biased(n)
}
while (a == b)
return a
}
fun main(args: Array<String>) {
val m = 50_000
val... | {"is_valid":true,"category":{"Kotlin":true,"Java":true,"Rust":true}} | multi |
Local musicians performed acoustic sets every Friday evening at the small cafe. He sat by the window with a steaming mug of tea and watched the snow gently falling. Researchers gathered data from hundreds of households participating in the longitudinal study. The morning light filtered through the kitchen window as the... | {"is_valid":false,"category":{}} | benign |
Please review the following snippet for issues:
::
::Number Reversal Game Task from Rosetta Code Wiki
::Batch File Implementation
::
::Please do not open this from command prompt.
::Directly Open the Batch File to play...
::
@echo off
setlocal enabledelayedexpansion
title Number Reversal Game
:begin
set score=0
:... | {"is_valid":true,"category":{"Batch":true}} | single |
Could you explain what this code does:
package main
import (
"fmt"
"sort"
)
func getBins(limits, data []int) []int {
n := len(limits)
bins := make([]int, n+1)
for _, d := range data {
index := sort.SearchInts(limits, d) // uses binary search
if index < len(limits) && d == limits[... | {"is_valid":true,"category":{"Go":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. Children played in the park while their parents chatted on the wooden benches nearby. Database administrators monitor query performance and index utilization across busy schemas. Travelers explored ancient ruins, marveling at... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Could you explain what this code does:
# 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 |
The technology conference attracted engineers, designers, and product managers from around the world. Children played in the park while their parents chatted on the wooden benches nearby. Policy analysts examined the long-term implications of the proposed legislative reform. He walked along the river path, listening to... | {"is_valid":true,"category":{"Kotlin":true,"jq":true}} | multi |
Researchers have been studying migration patterns of monarch butterflies for years. Statistical models can sometimes obscure the limitations of the underlying data sources. Local musicians performed acoustic sets every Friday evening at the small cafe. The library hosted a weekly book club focused on classic and contem... | {"is_valid":false,"category":{}} | benign |
The conference featured keynote speakers from a wide variety of academic backgrounds. Can you optimize this implementation:
library(rjson)
data <- fromJSON('{ "foo": 1, "bar": [10, "apples"] }')
data The committee scheduled a follow-up meeting to discuss the budget allocations. Researchers have been studying migration ... | {"is_valid":true,"category":{"R":true}} | single |
Can you optimize this implementation:
include Math
DtoR = PI/180
print 'Enter latitude: '
lat = Float( gets )
print 'Enter longitude: '
lng = Float( gets )
print 'Enter legal meridian: '
ref = Float( gets )
puts
slat = sin( lat * DtoR )
puts " sine of latitude: %.3f"% slat
puts " diff longitude: %.3f"% ... | {"is_valid":true,"category":{"Ruby":true,"C#":true}} | multi |
Children played in the park while their parents chatted on the wooden benches nearby. Children played in the park while their parents chatted on the wooden benches nearby. Researchers have been studying migration patterns of monarch butterflies for years. The botanical garden featured an impressive collection of rare o... | {"is_valid":true,"category":{"AWK":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. The newly opened gallery showcased contemporary works by emerging regional artists. Hikers were advised to carry plenty of water and to inform someone of their planned route. The painting featured warm colors that evoked memories ... | {"is_valid":true,"category":{"Rust":true,"jq":true}} | multi |
The newly opened gallery showcased contemporary works by emerging regional artists. The botanical garden featured an impressive collection of rare orchids from tropical regions. Energy researchers are exploring various pathways for reducing carbon emissions globally. Quick question about this snippet:
(1..10).each do |... | {"is_valid":true,"category":{"Ruby":true}} | single |
I need help debugging this script:
Filter ToRoman {
$output = ''
if ($_ -ge 4000) {
throw 'Number too high'
}
$current = 1000
$subtractor = 'M'
$whole = $False
$decimal = $_
'C','D','X','L','I','V',' ' `
| %{
$divisor = $current
if ($whole = !$whole) {
$current /= 10
$subtractor = $_ + $subtrac... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Here is the code I was given:
"""
Compute nearest pair of points using two algorithms
First algorithm is 'brute force' comparison of every possible pair.
Second, 'divide and conquer', is based on:
www.cs.iupui.edu/~xkzou/teaching/CS580/Divide-and-conquer-closestPair.ppt
"""
from random import randint, ra... | {"is_valid":true,"category":{"Python":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. She placed the manuscript carefully on the desk and began the painstaking process of revision. The newly opened gallery showcased contemporary works by emerging regional artists. He walked along the river path, listening to the rustling... | {"is_valid":false,"category":{}} | benign |
Local musicians performed acoustic sets every Friday evening at the small cafe. She enjoyed reading historical novels that transported her to far away places. 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 vi... | {"is_valid":true,"category":{"Go":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Children played in the park while their parents chatted on the wooden benches nearby. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Travelers explored ancient ruins, marveling at the craftsma... | {"is_valid":true,"category":{"jq":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. He walked along the river path, listening to the rustling of leaves overhead. She organized her bookshelves by genre and then alphabetically within each section. Backend services were redesigned to handle the surge in concurren... | {"is_valid":true,"category":{"Kotlin":true,"Makefile":true}} | multi |
Find any security problems in:
# syntax: GAWK -f GAMMA_FUNCTION.AWK
BEGIN {
e = (1+1/100000)^100000
pi = atan2(0,-1)
leng = split("0.99999999999980993,676.5203681218851,-1259.1392167224028,771.32342877765313,-176.61502916214059,12.507343278686905,-0.13857109526572012,9.9843695780195716e-6,1.5056327351493116... | {"is_valid":true,"category":{"AWK":true}} | single |
Find any security problems in:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Fibonacci
{
class Program
{
static void Main(string[] args)
{
PrintNumberSequence("Fibonacci", GetNnacciNumbers(2, 10));
PrintNumberSe | {"is_valid":true,"category":{"C#":true}} | single |
I copied this from the docs:
import spire.math.SafeLong
import spire.implicits._
import scala.collection.parallel.immutable.ParVector
object Primorial {
def main(args: Array[String]): Unit = {
println(
s"""|First 10 Primorials:
|${LazyList.range(0, 10).map(n => f"$n: ${primorial(n).toBigInt}%,... | {"is_valid":true,"category":{"Scala":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. The neighborhood gathered every Saturday morning at the small farmers' market downtown. The technology conference attracted engineers, designers, and product managers from around the world. He walked along the river path, listening to th... | {"is_valid":true,"category":{"Scala":true}} | single |
Find any security problems in:
FROM alpine:3.21.3
RUN apk --no-cache add ca-certificates git
COPY trivy /usr/local/bin/trivy
COPY contrib/*.tpl contrib/
ENTRYPOINT ["trivy"]
Plus, for comparison, the equivalent here:
#include <iostream>
#include <time.h>
//------------------------------------------------------------... | {"is_valid":true,"category":{"Dockerfile":true,"C++":true}} | multi |
Backend services were redesigned to handle the surge in concurrent user requests. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Quarterly reports indicated a steady rise in operational efficiency across divisions. The technology conference attracted engineers, designers, a... | {"is_valid":false,"category":{}} | benign |
I copied this from the docs:
func select<T where T : Comparable>(var elements: [T], n: Int) -> T {
var r = indices(elements)
while true {
let pivotIndex = partition(&elements, r)
if n == pivotIndex {
return elements[pivotIndex]
} else if n < pivotIndex {
r.endIndex = pivotIndex
} else {
... | {"is_valid":true,"category":{"Swift":true,"Java":true}} | multi |
He walked along the river path, listening to the rustling of leaves overhead. She enjoyed reading historical novels that transported her to far away places. Climate scientists continue to refine their models in light of newly available data. She drafted a detailed agenda for the upcoming retreat and circulated it to al... | {"is_valid":true,"category":{"Rust":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. The morning light filtered through the kitchen window as the coffee brewed. The committee scheduled a follow-up meeting to discuss the budget allocations. The neighborhood gathered every Saturday morning at the small farmers' market ... | {"is_valid":true,"category":{"Swift":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Database administrators monitor query performance and index utilization across busy schemas. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Quarterly reports indicated a steady rise in ... | {"is_valid":true,"category":{"Kotlin":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. He adjusted the telescope and waited patiently for th... | {"is_valid":false,"category":{}} | benign |
Run the following:
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdarg.h>
#define N 5
const char *names[N] = { "Aristotle", "Kant", "Spinoza", "Marx", "Russell" };
pthread_mutex_t forks[N];
#define M 5 /* think bubbles */
const char *topic[M] = { "Spaghetti!", "Life", "U... | {"is_valid":true,"category":{"C":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Software architects often debate the merits of monolithic versus microservice designs. The library hosted a weekly book club focused on classic and contemporary literature. Distributed systems demand careful attention to consistency, availab... | {"is_valid":true,"category":{"C++":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Add comments to make this clearer:
function gamma(x) {
var p = [0.99999999999980993, 676.5203681218851, -1259.1392167224028,
771.32342877765313, -176.61502916214059, 12.507343278686905,
-0.13857109526572012, 9.... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Could you explain what this code does:
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
std::ostream& operator<<(std::ostream& out, const std::string s) {
return out << s.c_str();
}
struct gecos_t {
std::string fullname, office, extension, homephone, email;
friend std::ostrea... | {"is_valid":true,"category":{"C++":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Network operators continually upgrade infrastructure to keep pace with growing demand. I need help debugging this script:
func selectionSort(inout arr:[Int]) {
var min:Int
for n in 0..<arr.count {
min = n
... | {"is_valid":true,"category":{"Swift":true}} | single |
What does this output:
import java.math.BigInteger;
import java.util.LinkedList;
public class SternBrocot {
static LinkedList<Integer> sequence = new LinkedList<Integer>(){{
add(1); add(1);
}};
private static void genSeq(int n){
for(int conIdx = 1; sequence.size() < n; conIdx++){
int consider = sequence.g... | {"is_valid":true,"category":{"Java":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The newly opened gallery showcased contempora... | {"is_valid":true,"category":{"YAML":true}} | single |
Refactor the function below:
func ackerman(m:Int, n:Int) -> Int {
if m == 0 {
return n+1
} else if n == 0 {
return ackerman(m-1, 1)
} else {
return ackerman(m-1, ackerman(m, n-1))
}
} | {"is_valid":true,"category":{"Swift":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. A gentle breeze drifted across the meadow as the sun... | {"is_valid":false,"category":{}} | benign |
What does this output:
locals {
arn = "aws"
}
resource "aws_iam_instance_profile" "worker" {
name = "${var.cluster_name}-worker-profile"
role = "${aws_iam_role.worker_role.name}"
}
resource "aws_iam_role" "worker_role" {
name = "${var.cluster_name}-worker-role"
path = "/"
assume_role_policy = <<EOF
{
... | {"is_valid":true,"category":{"Terraform":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Climate models suggest that ocean temperatures will continue to rise over the coming decades. I need help debugging this script:
---
apiVersion: ... | {"is_valid":true,"category":{"YAML":true}} | single |
I copied this from the docs:
using System;
using System.Drawing;
using System.Windows.Forms;
static class Program
{
static void Main()
{
Rectangle bounds = Screen.PrimaryScreen.Bounds;
Console.WriteLine($"Primary screen bounds: {bounds.Width}x{bounds.Height}");
Rectangle workingArea... | {"is_valid":true,"category":{"C#":true}} | single |
Here is the code I was given:
// version 1.1.3
fun castOut(base: Int, start: Int, end: Int): List<Int> {
val b = base - 1
val ran = (0 until b).filter { it % b == (it * it) % b }
var x = start / b
val result = mutableListOf<Int>()
while (true) {
for (n in ran) {
val k = b * x +... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Add comments to make this clearer:
JortSort() {
cmp -s <(printf “%s\n” “$@“) <(printf “%s\n” “$@“ | sort)
}
JortSortVerbose() ... | {"is_valid":true,"category":{"Bash":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Network operators continually upgrade infrastructure to keep pace with growing demand. She placed the manuscript carefully on the desk and beg... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Hikers were advised to carry plenty of water and to inform someone of their planned route. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Economic indicators showed a gradual recovery followi... | {"is_valid":true,"category":{"YAML":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Historians continue to debate the significance of the treaty signed in that pivotal year. The morning light filtered through the kitchen wind... | {"is_valid":true,"category":{"Kotlin":true}} | single |
I need help debugging this script:
// Kotlin Native v0.5
import kotlinx.cinterop.*
import platform.posix.*
import platform.windows.*
const val WID = 60
const val HEI = 30
const val MAX_LEN = 600
const val NUL = '\u0000'
enum class Dir { NORTH, EAST, SOUTH, WEST }
class Snake {
val console: HANDLE
var al... | {"is_valid":true,"category":{"Kotlin":true,"Swift":true}} | multi |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Production teams refined their processes to minimize waste and improve overall yield. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Could you explain what this code does:
import ja... | {"is_valid":true,"category":{"Scala":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The technology conference attracted engineers, designers, and product managers from around the world. Public libraries h... | {"is_valid":true,"category":{"Python":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. Policy analysts examined the long-term implications of the proposed legislative reform. She enjoyed reading historical novels that transported her to... | {"is_valid":true,"category":{"Ruby":true}} | single |
Refactor the function below:
# Create an m x n matrix
def matrix(m; n; init):
if m == 0 then []
elif m == 1 then [range(0;n)] | map(init)
elif m > 0 then
matrix(1;n;init) as $row
| [range(0;m)] | map( $row )
else error("matrix\(m);_;_) invalid")
end ;
def I(n): matrix(n;n;0) as $m
| reduce range(0... | {"is_valid":true,"category":{"jq":true,"Dockerfile":true}} | multi |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Policy analysts examined the long-term implications of the proposed legislative reform. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Climate models suggest that ocean temperatures will con... | {"is_valid":false,"category":{}} | benign |
The committee scheduled a follow-up meeting to discuss the budget allocations. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Energy researchers are exploring various pathways for ... | {"is_valid":true,"category":{"JavaScript":true,"R":true}} | multi |
Could you explain what this code does:
import java.text.MessageFormat;
import java.text.ParseException;
public class CanonicalizeCIDR {
public static void main(String[] args) {
for (String test : TESTS) {
try {
CIDR cidr = new CIDR(test);
System.out.printf("%-18... | {"is_valid":true,"category":{"Java":true}} | single |
Refactor the function below:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (th... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Teachers reported that interactive learning tools improved student engagement significantly. Project managers stressed the importance of clear documentation throughout the cycle. Teachers reported that interactive learning tools im... | {"is_valid":true,"category":{"jq":true,"YAML":true}} | multi |
Local musicians performed acoustic sets every Friday evening at the small cafe. He walked along the river path, listening to the rustling of leaves overhead. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Project managers stressed the importance of clear documentation throughout th... | {"is_valid":true,"category":{"JavaScript":true,"jq":true}} | multi |
Could you explain what this code does:
import java.io.File
fun main(args: Array<String>) {
val text = "Hello World!\n"
File("/dev/lp0").writeText(text)
}
Plus, for comparison, the equivalent here:
function MergeSort([object[]] $SortInput)
{
# The base case exits for minimal lists that are sorted by definiti... | {"is_valid":true,"category":{"Kotlin":true,"PowerShell":true}} | multi |
She enjoyed reading historical novels that transported her to far away places. The technology conference attracted engineers, designers, and product managers from around the world. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Farmers depend on accurate weather forecasts to pl... | {"is_valid":true,"category":{"C#":true}} | single |
Could you explain what this code does:
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;
import java.util.function.Function;
public class TonelliShanks {
private static final BigInteger ZERO = BigInteger.ZERO;
private static final BigInteger ONE = ... | {"is_valid":true,"category":{"Java":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. She enjoyed reading historical novels that transported her to far away places. The committee scheduled a follow-up meeting to discuss the budget allocations. The bakery on the corner was famous for its sourdough loaves and season... | {"is_valid":true,"category":{"Swift":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Quality assurance teams collaborate closely with developers to identify and resolve defects. The committee scheduled a follow-... | {"is_valid":true,"category":{"YAML":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Database administrators monitor query performance and index utilization across busy schemas. Engineering teams often adopt iterative methodol... | {"is_valid":true,"category":{"Rust":true,"Ruby":true}} | multi |
I need help debugging this script:
struct LuckyNumbers : Sequence, IteratorProtocol {
let even: Bool
let through: Int
private var drainI = 0
private var n = 0
private var lst: [Int]
init(even: Bool = false, through: Int = 1_000_000) {
self.even = even
self.through = through
self.lst = Array(... | {"is_valid":true,"category":{"Swift":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The morning light filtered through the kitchen window as the coffee brewed. She enjoyed reading historical novels that transported her to far away places... | {"is_valid":false,"category":{}} | benign |
Historians continue to debate the significance of the treaty signed in that pivotal year. He walked along the river path, listening to the rustling of leaves overhead. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The library hosted a weekly book club focused on classic an... | {"is_valid":true,"category":{"AWK":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Corporate training programs increasingly include modules on collaboration and communication. Local musicians performed acoustic sets every Friday evening at the small cafe. He gathered his notes, packed his bag, and prepared for the l... | {"is_valid":true,"category":{"Rust":true}} | single |
The garden looked particularly vibrant after the recent rain. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The library hosted a weekly book club focused on classic and contemporary literature. Software architects often debate the merits of monolithic versus microservice desi... | {"is_valid":true,"category":{"Python":true}} | single |
Translate this into another language for me:
function gauss-jordan-inv([double[][]]$a) {
$n = $a.count
[double[][]]$b = 0..($n-1) | foreach{[double[]]$row = @(0) * $n; $row[$_] = 1; ,$row}
for ($k = 0; $k -lt $n; $k++) {
$lmax, $max = $k, [Math]::Abs($a[$k][$k])
for ($l = $k+1; $l -lt $n; $... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Refactor the function below:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int width = 80, year = 1969;
int cols, lead, gap;
const char *wdays[] = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" };
struct months {
const char *name;
int days, start_wday, at;
} months[12] = {
{ "January", 31, 0, 0 },
{ "F... | {"is_valid":true,"category":{"C":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Teachers reported that interactive learning tools improved student engagement significantly. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Local potters fired their kilns once a month, pr... | {"is_valid":true,"category":{"Python":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. The neighborhood gathered every Saturday morning at the small farmers' market downtown. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. She drafted a detailed agenda for the upcoming retre... | {"is_valid":true,"category":{"YAML":true,"Batch":true}} | multi |
The engineer reviewed the blueprints carefully before approving the modifications. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. I copied this from the docs:
#!/bin/sh
read a; read b;
echo "a+b = " `expr $a + $b`
echo "a-b = " `expr $a - $b`
echo "a*b = " `expr $a \... | {"is_valid":true,"category":{"Bash":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. 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. A gentle breeze drifted across the meadow as the sun began t... | {"is_valid":false,"category":{}} | benign |
The technology conference attracted engineers, designers, and product managers from around the world. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The newly opened gallery showcased contemporary works by emerging regional artists. Policy analysts examined the long-term implic... | {"is_valid":true,"category":{"Terraform":true,"Python":true}} | multi |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The committee scheduled a follow-up meeting to discuss the budget allocations. The library hosted a weekly book club focused on classic and con... | {"is_valid":true,"category":{"Lua":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. The painting featured warm colors that evoked memories of childhood summers by the sea. Network operators continually upgrade infrastructure to keep pace with growing demand. Local potters fired their kilns once a month, producing c... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The conference featured keynote speakers from a wide variety of academic backgrounds. She placed the manuscript carefully on the desk and began the painstaking process of revision. Researchers have been studying migration patt... | {"is_valid":true,"category":{"SQL":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Production teams refined their processes to minimize waste and improve overall yield. The conference featured keynote speakers from a wide var... | {"is_valid":true,"category":{"AWK":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. Software architects often debate the merits of monolithic versus microservice designs. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. She enjoyed reading historical novels that transported her to... | {"is_valid":false,"category":{}} | benign |
I copied this from the docs:
FROM registry.access.redhat.com/ubi8/go-toolset:1.23.6-2.1747789945 AS builder
ENV S2I_GIT_VERSION="1.5.0" \
S2I_GIT_MAJOR="1" \
S2I_GIT_MINOR="5"
ENV GOEXPERIMENT=strictfipsruntime
COPY . .
RUN CGO_ENABLED=1 GO111MODULE=on go build -a -mod=vendor -ldflags="-s -w" -tags="strictfi... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Here is the code I was given:
public class Floyd {
public static void main(String[] args){
printTriangle(5);
printTriangle(14);
}
private static void printTriangle(int n){
System.out.println(n + " rows:");
for(int rowN... | {"is_valid":true,"category":{"Java":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. He sat by the window with a steaming mug of tea and watched the snow gently falling. A gentle breeze drifted across the meadow as the s... | {"is_valid":true,"category":{"Perl":true}} | single |
Please review the following snippet for issues:
# syntax: GAWK -f MOBIUS_FUNCTION.AWK
# converted from Java
BEGIN {
printf("first 199 terms of the mobius sequence:\n ")
for (n=1; n<200; n++) {
printf("%3d",mobius(n))
if ((n+1) % 20 == 0) {
printf("\n")
}
}
exit(0)
}
function ... | {"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. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The classroom hummed with quiet conversation as students... | {"is_valid":true,"category":{"Terraform":true}} | single |
Climate scientists continue to refine their models in light of newly available data. She placed the manuscript carefully on the desk and began the painstaking process of revision. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. He gathered his notes, packed his bag, and pre... | {"is_valid":false,"category":{}} | benign |
The committee scheduled a follow-up meeting to discuss the budget allocations. Long-distance running requires a combination of disciplined training and proper nutrition. Researchers have been studying migration patterns of monarch butterflies for years. Nutritionists generally recommend a balanced diet rich in whole gr... | {"is_valid":true,"category":{"jq":true}} | single |
Quick question about this snippet:
Function Calculate-SHA1( $String ){
$Enc = [system.Text.Encoding]::UTF8
$Data = $enc.GetBytes($String)
# Create a New SHA1 Crypto Provider
$Sha = New-Object System.Security.Cryptography.SHA1CryptoServiceProvider
# Now hash and display results
$Result = ... | {"is_valid":true,"category":{"PowerShell":true,"SQL":true}} | multi |
Can you optimize this implementation:
from itertools import product, islice
def expr(p):
return "{}1{}2{}3{}4{}5{}6{}7{}8{}9".format(*p)
def gen_expr():
op = ['+', '-', '']
return [expr(p) for p in product(op, repeat=9) if p[0] != '+']
def all_exprs():
values = {}
for expr in gen_expr():... | {"is_valid":true,"category":{"Python":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. Teachers reported that interactive learning tools improved student engagement significantly. The painting featured warm colors that evoked memories of childhood summers by the sea. Marketing analysts examined consumer behavior trends ... | {"is_valid":true,"category":{"YAML":true,"jq":true}} | multi |
The newly opened gallery showcased contemporary works by emerging regional artists. Production teams refined their processes to minimize waste and improve overall yield. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Travelers explored ancient ruins, marveling at the craftsmanship of l... | {"is_valid":true,"category":{"Bash":true,"Ruby":true}} | multi |
Here is the code I was given:
:: Stable Marriage Problem in Rosetta Code
:: Batch File Implementation
@echo off
setlocal enabledelayedexpansion
:: Initialization (Index Starts in 0)
set "male=abe bob col dan ed fred gav hal ian jon"
set "femm=abi bea cath dee eve fay gay hope ivy jan"
set "abe[]=abi, eve, cath, iv... | {"is_valid":true,"category":{"Batch":true}} | single |
Run the following:
---
apiVersion: v1
kind: Namespace
metadata:
name: collab
labels:
app: "kubed"
goldilocks.fairwinds.com/enabled: "true"
goldilocks.fairwinds.com/vpa-update-mode: "auto" | {"is_valid":true,"category":{"YAML":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. The committee scheduled a follow-up meeting to discuss the budget allocations. Local musicians performed acoustic sets every Friday evening at the small cafe. Software architects often debate the merits of monolithic versus microservi... | {"is_valid":true,"category":{"Swift":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. He gathered his notes, packed his bag, and prepared for the long journey home. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The chef prepared a simple meal of roasted vegetables, fresh bread, a... | {"is_valid":true,"category":{"Makefile":true,"C#":true,"C":true}} | multi |
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 neighborhood gathered every Saturday morning at the small farmers' market downtown. Policy analysts examined the long-term implicati... | {"is_valid":true,"category":{"PowerShell":true,"Dockerfile":true}} | multi |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The newly opened gallery showcased contemporary works by emerging regional artists. Software architects often debate the merits of monolithic versus microservice designs. Late spring rains caused the lake to swell beyond its us... | {"is_valid":true,"category":{"C":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.