prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
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. Here is the code I was given:
# handy constants with script-wide scope
[Single]$script:QUARTER_PI=0.7853982
[Single]$script:HALF_PI=1.57... | {"is_valid":true,"category":{"PowerShell":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Please review the following snippet for issues:
scala> 16
res10: Int = 16
scala> 020L
res11: Long = 16
scala> 0x10 : Byte
res12: Byte = 16
scala> 16 : Short
res13: Short = 16
scala> 020 : Int
res14: Int = 16
scala> 0x10 : Long
res15: Lo... | {"is_valid":true,"category":{"Scala":true}} | single |
Please review the following snippet for issues:
using System;
using System.IO;
namespace RosettaCode {
class Program {
static void Main() {
try {
File.Delete("input.txt");
Directory.Delete("docs");
File.Delete(@"\input.txt");
Dire... | {"is_valid":true,"category":{"C#":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Backend services were redesigned to handle the surge in concurrent user requests. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The newly opened gallery showcased contemporary works by... | {"is_valid":true,"category":{"R":true,"Scala":true}} | multi |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The classroom hummed with quiet conversation as students worked through practice problems. She organized her bookshelves by genre and then a... | {"is_valid":false,"category":{}} | benign |
Find any security problems in:
package main
import (
"fmt"
"log"
"math/big"
"sort"
"strings"
)
var testCases = []string{
"1.3.6.1.4.1.11.2.17.19.3.4.0.10",
"1.3.6.1.4.1.11.2.17.5.2.0.79",
"1.3.6.1.4.1.11.2.17.19.3.4.0.4",
"1.3.6.1.4.1.11150.3.4.0.1",
"1.3.6.1.4.1.11.2.17.19.3... | {"is_valid":true,"category":{"Go":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. He sat by the window with a steaming mug of tea and watched the snow gently falling. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Quick question about this snippet:
use strict;
use warnings;
use List::... | {"is_valid":true,"category":{"Perl":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Historians continue to debate the significance of the treaty signed in that pivotal year. Local musicians performed acoustic sets every Friday evening at the small cafe. Long-distance running requires a combination of disciplined... | {"is_valid":true,"category":{"Java":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Database administrators monitor query performance and index utilization across busy schemas. Here is the code I was given:
library(digest)
input <- "Rosetta Code"
cat(digest(input, algo = "sha1", serialize = FALSE), "\n") Voluntee... | {"is_valid":true,"category":{"R":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. He walked along the river path, listening to the rustling of leaves overhead. Engineering teams often adopt iterative methodologies to ma... | {"is_valid":true,"category":{"SQL":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Historians continue to debate the significance of the treaty signed in that pivotal year. A gentle breeze drifted across the meadow as the su... | {"is_valid":true,"category":{"jq":true}} | single |
Could you explain what this code does:
/**
* Optionally return the middle three digits of an integer.
*
* @example List(123,12345,-789,1234,12) flatMap (middleThree(_)), returns: List(123, 234, 789)
*/
def middleThree( s:Int ) : Option[Int] = s.abs.toString match {
case v if v.length % 2 == 0 => None // Midd... | {"is_valid":true,"category":{"Scala":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Historians continue to debate the significance of the treaty signed in that pivotal year. The neighborhood gathered every Saturday morning at the small farmers' market downtown. She drafted a detailed agenda for the upcoming retr... | {"is_valid":true,"category":{"C++":true,"Terraform":true,"SQL":true}} | multi |
The library hosted a weekly book club focused on classic and contemporary literature. Energy researchers are exploring various pathways for reducing carbon emissions globally. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. She organized her bookshelves by genre and then al... | {"is_valid":true,"category":{"Python":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Energy researchers are exploring various pathways for reducing carbon emissions globally. Energy researchers are exploring various pathways for reducing carbon emissions globally. The committee scheduled a follow-up meeting to ... | {"is_valid":true,"category":{"Makefile":true,"Scala":true}} | multi |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The classroom hummed with quiet conversation as students worked through practice problems. She organized her bookshelves by genre and then alphabetically within each section. The committee scheduled a follow-up meeting to discu... | {"is_valid":true,"category":{"Go":true}} | single |
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. Historians continue to debate the significance of the treaty signed in that pivotal year. He sat by the window with a steaming mug of tea an... | {"is_valid":true,"category":{"C#":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Quick question about this snippet:
use std::collections::LinkedList;
fn main() {
let mut list = LinkedList::new();
list.push_front(8);
} | {"is_valid":true,"category":{"Rust":true}} | single |
Run the following:
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | {"is_valid":true,"category":{"Makefile":true}} | single |
She enjoyed reading historical novels that transported her to far away places. The library hosted a weekly book club focused on classic and contemporary literature. Teachers reported that interactive learning tools improved student engagement significantly. She drafted a detailed agenda for the upcoming retreat and cir... | {"is_valid":true,"category":{"Swift":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. 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. Local potters fired their kilns once a m... | {"is_valid":true,"category":{"R":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Researchers gathered data from hundreds of households participating in the longitudinal study. Network operators continually upgrade infrastructure to keep pace with growing demand. The technology conference attracted engineers... | {"is_valid":true,"category":{"Java":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. Find any security problems in:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-pv-claim
labels:
app: mysql8
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi Climate models... | {"is_valid":true,"category":{"YAML":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. He walked along the river path, listening to the rustling of leaves overhead. The morning light filtered through the kitchen window as the co... | {"is_valid":false,"category":{}} | benign |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Translate this into another language for me:
class Node(object):
def __init__(self, data = None, prev = None, next = None):
self.prev = prev
self.next = next
self.data = data
def __str__(self):
... | {"is_valid":true,"category":{"Python":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. Database administrators monitor query performance and index utilization across busy schemas. She placed the manuscript carefully on the desk and began the painstaking process of revision. Software architects often debate the me... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Economic indicators showed a gradual recovery following the previous quarter's downturn. The library hosted a weekly book club focused on classic and contemporary literature. She placed the manuscript carefully on the desk and began ... | {"is_valid":true,"category":{"Bash":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Climate scientists continue to refine their models in lig... | {"is_valid":true,"category":{"Swift":true,"Kotlin":true}} | multi |
Refactor the function below:
use strict;
use warnings;
use feature 'say';
sub decode_UPC {
my($line) = @_;
my(%pattern_to_digit_1,%pattern_to_digit_2,@patterns1,@patterns2,@digits,$sum);
for my $p (' ## #', ' ## #', ' # ##', ' #### #', ' # ##', ' ## #', ' # ####', ' ### ##', ' ## ###', ' # #... | {"is_valid":true,"category":{"Perl":true,"Bash":true}} | multi |
Software architects often debate the merits of monolithic versus microservice designs. The morning light filtered through the kitchen window as the coffee brewed. Hikers were advised to carry plenty of water and to inform someone of their planned route. Production teams refined their processes to minimize waste and imp... | {"is_valid":true,"category":{"PowerShell":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. 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 the cycle. He adjusted the telescope and waited patiently for the clouds to... | {"is_valid":true,"category":{"SQL":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Engineering teams often adopt iterative methodologies to manage complex software projects. The morning light filtered through the kitchen window as the coffee brewed. Engineering teams often adopt iterative methodologies to ma... | {"is_valid":true,"category":{"SQL":true}} | single |
I need help debugging this script:
// version 1.1.2
// need to enable runtime assertions with JVM -ea option
import java.lang.management.ManagementFactory
import java.lang.management.ThreadMXBean
fun countTo(x: Int) {
println("Counting...");
(1..x).forEach {}
println("Done!")
}
fun main(args: Array<St... | {"is_valid":true,"category":{"Kotlin":true,"Go":true}} | multi |
Find any security problems in:
Function Get-Pi ( $Digits )
{
$Big = [bigint[]](0..10)
$ndigits = 0
$Output = ""
$q = $t = $k = $Big[1]
$r = $Big[0]
$l = $n = $Big[3]
# Calculate first digit
$nr = ( $Big[2] * $q + $r ) * $l
$nn = ( $q * ( $Big[7] * $k + $Big[2] ... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. Network operators continually upgrade infrastructure to keep pace with growing demand. The garden looked particularly vibrant after the recent rain. The painting featured warm colors that evoked memories of childhood summers by t... | {"is_valid":true,"category":{"R":true}} | single |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Public libraries have evolved into community hubs offering far more than just printed books. Energy researchers are exploring various ... | {"is_valid":true,"category":{"Kotlin":true}} | single |
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. Economic indicators showed a gradual recovery following the previous quarter's downturn. The neighborhood gathered every Saturday morning at the small farme... | {"is_valid":true,"category":{"Dockerfile":true,"Bash":true}} | multi |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The painting featured warm colors that evoked memories of childhood summers by the sea. He sat by the window with a steaming mug of tea and watched the snow gently falling. Policy analysts examined the long-term implications of the ... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. She enjoyed reading historical novels that transported her to far away places. Researchers gathered data from hundreds of households particip... | {"is_valid":true,"category":{"Go":true,"Terraform":true,"Kotlin":true}} | multi |
The technology conference attracted engineers, designers, and product managers from around the world. Researchers have been studying migration patterns of monarch butterflies for years. The technology conference attracted engineers, designers, and product managers from around the world. Software architects often debate... | {"is_valid":true,"category":{"C#":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. 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. She placed the manuscript carefully on the de... | {"is_valid":true,"category":{"Swift":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. Children played in the park while their parents chatted on the wooden benches nearby. Run the following:
import java.io.File;
import java.io.IOException;
public class CreateTempFile {
public static void main(String[] args) {
... | {"is_valid":true,"category":{"Java":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Production teams refined their processes to minimize waste and improve overall yield. The painting featured warm colors that evoked memories of childhood summers by the sea. Production teams refined their processes to minimize waste and impro... | {"is_valid":true,"category":{"Java":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. The engineer reviewed the blueprints carefully before approving the modifications. The newly opened gallery showcased contemporary works by emerging regional artists. The botanical garden featured an impressive collection of rare orchid... | {"is_valid":true,"category":{"Bash":true,"Terraform":true}} | multi |
Run the following:
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h> /* getaddrinfo, getnameinfo */
#include <stdio.h> /* fprintf, printf */
#include <stdlib.h> /* exit */
#include <string.h> /* memset */
int
main()
{
struct addrinfo hints, *res, *res0;
int error;
char host[NI_MAXHOST];
/*
... | {"is_valid":true,"category":{"C":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Project managers stressed the importance of clear documentation throughout the cycle. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Local potters fired their kilns once a month, producing colo... | {"is_valid":false,"category":{}} | benign |
The committee scheduled a follow-up meeting to discuss the budget allocations. She enjoyed reading historical novels that transported her to far away places. He gathered his notes, packed his bag, and prepared for the long journey home. Translate this into another language for me:
package main
import "fmt"
func mai... | {"is_valid":true,"category":{"Go":true,"SQL":true}} | multi |
The morning light filtered through the kitchen window as the coffee brewed. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. I need help debugging this script:
#include <stdio.h>
#include <gmp.h>
void jacobsthal(mpz_t r, unsigned long n) {
mpz_t s;
mpz_init(s);
... | {"is_valid":true,"category":{"C":true,"YAML":true}} | multi |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. 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. Teachers reported that interactive learning tools impr... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. He sat by the window with a steaming mug of tea and watched the snow gently falling. Network operators continually upgrade infrastructure to keep pace with growing demand. Marketing analysts examined consumer behavior trends across ... | {"is_valid":true,"category":{"C":true}} | single |
Add comments to make this clearer:
import turtle as tt
import inspect
stack = [] # Mark the current stacks in run.
def peano(iterations=1):
global stack
# The turtle Ivan:
ivan = tt.Turtle(shape = "classic", visible = True)
# The app window:
screen = tt.Screen()
screen.title("Desenhin do... | {"is_valid":true,"category":{"Python":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. Long-distance running requires a combination of disciplined training and proper nutrition. Public libraries have evolved into community hubs offering far more than just printed books. Astronomers observed a faint signal that appeared to orig... | {"is_valid":true,"category":{"R":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. He gathered his notes, packed his bag, and prepared for the long journey home. He sat by the window with a steaming mug of tea and watched the snow gently falling. He gathered his notes, packed his bag, and prepared for the lon... | {"is_valid":true,"category":{"Swift":true,"Scala":true}} | multi |
Project managers stressed the importance of clear documentation throughout the cycle. He walked along the river path, listening to the rustling of leaves overhead. Local potters fired their kilns once a month, producing colorful ceramics for the shops. He walked along the river path, listening to the rustling of leaves... | {"is_valid":true,"category":{"Rust":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. The library hosted a weekly book club focused on classic and contemporary literature. Researchers have been studying migration patterns of monarch butterflies for years. The engineer reviewed the blueprints carefully before appro... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Run the following:
# Top directory for building complete system, fall back to this directory
ROOTDIR ?= $(TOPDIR)
# Strip binaries unless user explicitly disables it
STRIPARGS ?= -s --strip-program=$(CROSS)strip -m 0755
# Some junk files we always want to be removed when doing a make clean.
JUNK = *~ *.bak ... | {"is_valid":true,"category":{"Makefile":true}} | single |
Refactor the function below:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: branchprotector
spec:
schedule: "54 11 * * *" # Run every day at 1154
concurrencyPolicy: Forbid
jobTemplate:
metadata:
labels:
app: branchprotector
spec:
template:
spec:
containers... | {"is_valid":true,"category":{"YAML":true}} | single |
Please review the following snippet for issues:
# syntax: GAWK -f TRUNCATABLE_PRIMES.AWK
BEGIN {
limit = 1000000
for (i=1; i<=limit; i++) {
if (is_prime(i)) {
prime_count++
arr[i] = ""
if (truncate_left(i) == 1) {
max_left = max(max_left,i)
}
if (truncate_... | {"is_valid":true,"category":{"AWK":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. The committee scheduled a follow-up meeting to discuss the budget allocations. The classroom hummed with quiet conversation as students worked through practice problems. Climate scientists continue to refine their models in light of n... | {"is_valid":true,"category":{"Ruby":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. What does this output:
apiVersion: apps/v1
kind: Deployment
metadata:
name: olm-operator
namespace: openshift-operator-lifecycle-ma... | {"is_valid":true,"category":{"YAML":true,"AWK":true}} | multi |
Long-distance running requires a combination of disciplined training and proper nutrition. Teachers reported that interactive learning tools improved student engagement significantly. He walked along the river path, listening to the rustling of leaves overhead. Quarterly reports indicated a steady rise in operational e... | {"is_valid":false,"category":{}} | benign |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Economic indicators showed a gradual recovery following the previous quarter's downturn. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Climate scientists continue to refine their models in... | {"is_valid":true,"category":{"Scala":true}} | single |
Translate this into another language for me:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
typedef struct { double x, y; } vec;
typedef struct { int n; vec* v; } polygon_t, *polygon;
#define BIN_V(op, xx, yy) vec v##op(vec a,vec b){vec c;c.x=xx;c.y=yy;return c;}
#define BIN_S(op, r) double v##op(vec a, v... | {"is_valid":true,"category":{"C":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. Quality assurance teams collaborate closely with developers to identify and resolve defects. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Energy researchers are exploring various path... | {"is_valid":true,"category":{"jq":true}} | single |
Can you optimize this implementation:
using System;
using System.Collections.Generic;
namespace SmithNumbers {
class Program {
static int SumDigits(int n) {
int sum = 0;
while (n > 0) {
n = Math.DivRem(n, 10, out int rem);
sum += rem;
}
... | {"is_valid":true,"category":{"C#":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. Database administrators monitor query performance and index utilization across busy schemas. Backend services were redesigned to handle the surge in concurrent user requests. The botanical garden featured an impressive collection... | {"is_valid":true,"category":{"C#":true,"Rust":true}} | multi |
Here is the code I was given:
library(combinat)
col <- factor(c("Red","Green","White","Yellow","Blue"))
own <- factor(c("English","Swedish","Danish","German","Norwegian"))
pet <- factor(c("Dog","Birds","Cats","Horse","Zebra"))
drink <- factor(c("Coffee","Tea","Milk","Beer","Water"))
smoke <- factor(c("PallMall", "Ble... | {"is_valid":true,"category":{"R":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. I copied this from the docs:
#include <iostream>
int main () {
std::cout << "Hello world!" << std::endl;
} | {"is_valid":true,"category":{"C++":true}} | single |
Climate scientists continue to refine their models in light of newly available data. Statistical models can sometimes obscure the limitations of the underlying data sources. Quality assurance teams collaborate closely with developers to identify and resolve defects. The library hosted a weekly book club focused on clas... | {"is_valid":true,"category":{"YAML":true}} | single |
Run the following:
#
# Variables for plugging in various environment specific settings
#
variable "env" {
type = "string"
default = "dev"
}
variable "dnsprefix" {
type = "string"
default = ""
}
variable "region" {
type = "string"
default = "West US"
}
#
# Variables which should be kept secr... | {"is_valid":true,"category":{"Terraform":true}} | single |
Take a look at this:
const N: usize = 41;
const K: usize = 3;
const M: usize = 3;
const POSITION: usize = 5;
fn main() {
let mut prisoners: Vec<usize> = Vec::new();
let mut executed: Vec<usize> = Vec::new();
for pos in 0..N {
prisoners.push(pos);
}
let mut to_kill: usize = 0;
let mut... | {"is_valid":true,"category":{"Rust":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The newly opened gallery showcased contemporary works by emerging regional artists. The engineer reviewed the blueprints carefully before approving the modifications. The engineer reviewed the blueprints carefully before approv... | {"is_valid":true,"category":{"Kotlin":true,"Terraform":true}} | multi |
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. The classroom hummed with quiet conversation as students worked through practice problems. She enjoyed reading historical novels that transported her to fa... | {"is_valid":false,"category":{}} | benign |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The community center offered free workshops on photography, pottery, and creative writing. Add comments to make this clearer:
function invmod {
typeset -i a=$1 n=$2
if (( n < 0 )); then (( n = -n )); fi
if (( a < 0 )); then ((... | {"is_valid":true,"category":{"Bash":true,"Dockerfile":true}} | multi |
Researchers have been studying migration patterns of monarch butterflies for years. Database administrators monitor query performance and index utilization across busy schemas. | {"is_valid":false,"category":{}} | benign |
He walked along the river path, listening to the rustling of leaves overhead. 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. Energy researchers are exploring various pathways for reducing carbon e... | {"is_valid":true,"category":{"Go":true}} | single |
I copied this from the docs:
USB_VID = 0x239A
USB_PID = 0x811E
USB_PRODUCT = "Feather ESP32-S3 TFT"
USB_MANUFACTURER = "Adafruit"
IDF_TARGET = esp32s3
# Make room for build
CIRCUITPY_ULAB = 0
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ
# The default queue depth of 16 overflows on release builds,
# | {"is_valid":true,"category":{"Makefile":true}} | single |
Refactor the function below:
apiVersion: apps/v1
kind: Deployment
metadata:
name: paymentservice
labels:
app: paymentservice
spec:
replicas: 3
selector:
matchLabels:
app: paymentservice
template:
metadata:
labels:
app: paymentservice
spec:
containers:
- name: se... | {"is_valid":true,"category":{"YAML":true,"Dockerfile":true,"Makefile":true}} | multi |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Policy analysts examined the long-term implications of the proposed legislative reform. Refactor the function below:
// version 1.0.6
fun main(args: Array<String>) {
/* read-only variables */
val i = 3 ... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Project managers stressed the importance of clear documentation throughout the cycle. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The chef prepared a simple meal of roasted vegetables,... | {"is_valid":true,"category":{"jq":true}} | single |
Here is the code I was given:
// Version 1.2.60
fun main(args: Array<String>) {
var n = 1
var count = 0
while (count < 30) {
val sq = n * n
val cr = Math.cbrt(sq.toDouble()).toInt()
if (cr * cr * cr != sq) {
count++
println(sq)
}
el | {"is_valid":true,"category":{"Kotlin":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Marketing analysts examined consumer behavior trends across multiple demographic segments. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The engineer reviewed the blueprints carefully bef... | {"is_valid":true,"category":{"R":true,"jq":true,"Python":true}} | multi |
Find any security problems in:
class MD5
{
private static final int INIT_A = 0x67452301;
private static final int INIT_B = (int)0xEFCDAB89L;
private static final int INIT_C = (int)0x98BADCFEL;
private static final int INIT_D = 0x10325476;
private static final int[] SHIFT_AMTS = {
7, 12, 17, 22,
5,... | {"is_valid":true,"category":{"Java":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The painting featured warm colors that evoked memories of childhood summers by the sea. Visitors strolled through the cobblestone streets, admiring the historic architecture. Local potters fired their kilns once a month, producing color... | {"is_valid":true,"category":{"Terraform":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. She enjoyed reading historical novels that transported her to far away places. Policy analysts examined the long-term implications of the proposed legislative reform. Backend services were redesigned to handle the surge in concurr... | {"is_valid":true,"category":{"Ruby":true,"jq":true}} | multi |
Add comments to make this clearer:
FROM debian:stretch
RUN apt-get update && \
apt-get install -y curl && \
rm -rf /var/run/apt/lists/*
# Install docker so we can test the unix socket
ENV DOCKER_VERSION 18.06.1
RUN curl -O "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}-c | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. 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. Climate models suggest that ocean tempera... | {"is_valid":true,"category":{"Batch":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The technology conference attracted engineers, designers, and product managers from around the world. The newly opened gallery showcase... | {"is_valid":true,"category":{"Dockerfile":true,"jq":true}} | multi |
Local musicians performed acoustic sets every Friday evening at the small cafe. The morning light filtered through the kitchen window as the coffee brewed. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Children played in the park while their parents chatted on the wooden benches n... | {"is_valid":true,"category":{"JavaScript":true,"Go":true}} | multi |
Run the following:
sub another {
# take a function and a value
my $func = shift;
my $val = shift;
# call the function with the value as argument
return $func->($val);
};
sub reverser {
return scalar reverse shift;
};
# pass named coderef
print another \&reverser, 'data';
# pass anonymous ... | {"is_valid":true,"category":{"Perl":true,"C++":true}} | multi |
Public libraries have evolved into community hubs offering far more than just printed books. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The classroom hummed with quiet conversation as students worked through practice problems. Astronomers observed a faint signal that appeared t... | {"is_valid":true,"category":{"R":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Network operators continually upgrade infrastructure to keep pace with growing demand. Researchers have been studying migration patterns of... | {"is_valid":true,"category":{"jq":true}} | single |
Add comments to make this clearer:
(() => {
"use strict";
// Arguments: predicate, maximum perimeter
// pythTripleCount :: ((Int, Int, Int) -> Bool) -> Int -> Int
const pythTripleCount = p =>
maxPerim => {
const
xs = enumFromTo(1)(
Math.floo | {"is_valid":true,"category":{"JavaScript":true}} | single |
What does this output:
# Floors are numbered 1 (ground) to 5 (top)
# Baker, Cooper, Fletcher, Miller, and Smith live on different floors:
$statement1 = '$baker -ne $cooper -and $baker -ne $fletcher -and $baker -ne $miller -and
$baker -ne $smith -and $cooper -ne $fletcher -and $cooper -ne $... | {"is_valid":true,"category":{"PowerShell":true,"JavaScript":true,"C":true}} | multi |
I need help debugging this script:
//String creation
var str='';
//or
str2=new String();
//String assignment
str="Hello";
//or
str2=', Hey there'; //can use " or '
str=str+str2;//concantenates
//string deletion
delete str2;//this will return true or false, true when it has been successfully deleted, it shouldn't/w... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Project managers stressed the importance of clear documentation throughout the cycle. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Software architects often debate the merits of monolithic ... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. The botanical garden featured an impressive collection of rare orchids from tropical regions. The garden looked particularly vibrant after the recent rain. Hikers were advised to carry plenty of water and to inform som... | {"is_valid":true,"category":{"AWK":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. 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. Long-distance running requires a combination of ... | {"is_valid":true,"category":{"Java":true,"AWK":true}} | multi |
Public libraries have evolved into community hubs offering far more than just printed books. Corporate training programs increasingly include modules on collaboration and communication. Hikers were advised to carry plenty of water and to inform someone of their planned route. The committee scheduled a follow-up meeting... | {"is_valid":true,"category":{"Go":true,"AWK":true}} | multi |
The technology conference attracted engineers, designers, and product managers from around the world. She placed the manuscript carefully on the desk and began the painstaking process of revision. Production teams refined their processes to minimize waste and improve overall yield. Statistical models can sometimes obsc... | {"is_valid":false,"category":{}} | benign |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.