prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Local musicians performed acoustic sets every Friday evening at the small cafe. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The newly opened gallery showcased contemporary works by emer... | {"is_valid":false,"category":{}} | benign |
The committee scheduled a follow-up meeting to discuss the budget allocations. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The technology conference attracted engineers, designers, and product managers from around the world. She enjoyed reading historical novels that transp... | {"is_valid":false,"category":{}} | benign |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Run the following:
@echo off
if %1@==@ (
if exist notes.txt more notes.txt
goto :eof
)
echo %date% %time%:>>notes.txt
echo %*>>notes.txt Economic indicators showed a gradual recovery following the previous quarter's do... | {"is_valid":true,"category":{"Batch":true}} | single |
Translate this into another language for me:
[range(-2; 2; 1)] #=> [-2,-1,0,1]
[range(-2; 2; 0)] #=> []
[range(-2; 2; -1)] #=> []
[range(-2; 2; 10)] # [-2]
[range(2; -2; 1)] #=> []
[range(2; 2; 1)] #=> []
[range(2; 2; 0)] #=> []
[range(0; 0; -1)] #=> [] | {"is_valid":true,"category":{"jq":true}} | single |
Add comments to make this clearer:
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 = | {"is_valid":true,"category":{"Swift":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. Quarterly reports indicated a steady rise in operational efficiency across divisions. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The engineer reviewed the blueprints carefully before appr... | {"is_valid":true,"category":{"Go":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. 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. Economic indicators showed a gradual recovery following the previo... | {"is_valid":true,"category":{"AWK":true,"Kotlin":true}} | multi |
I need help debugging this script:
#include <iomanip>
#include <iostream>
#include <tuple>
std::tuple<uint64_t, uint64_t> solvePell(int n) {
int x = (int)sqrt(n);
if (x * x == n) {
// n is a perfect square - no solution other than 1,0
return std::make_pair(1, 0);
}
// there are non... | {"is_valid":true,"category":{"C++":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Policy analysts examined the long-term implications of the proposed legislative reform. The committee scheduled a follow-up meeting to discuss the budget allocations. The botanical garden featured an impressive collection of rare orc... | {"is_valid":true,"category":{"Swift":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. She enjoyed reading historical novels that transported her to far away places. Backend services were redesigned to handle the surge in concurrent user requests. He gathered his notes, packed his bag, and prepared for the long journey ... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Quick question about this snippet:
local request = require('http.request')
local headers, stream = request.new_from_uri("https://sourceforge.net/"):go()
local body = stream:get_body_as_string()
local status = headers:get(':status')
io.write(string.format('Status: %d\nBody: %s\n', status, body) | {"is_valid":true,"category":{"Lua":true}} | single |
Could you explain what this code does:
## HF#1 Random Hex color
randHclr <- function() {
m=255;r=g=b=0;
r <- sample(0:m, 1, replace=TRUE);
g <- sample(0:m, 1, replace=TRUE);
b <- sample(0:m, 1, replace=TRUE);
return(rgb(r,g,b,maxColorValue=m));
}
## HF#2 Metrics: Euclidean, Manhattan and Minkovski
Metric <- f... | {"is_valid":true,"category":{"R":true}} | single |
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. Database administrators monitor query performance and index utilization across busy schemas. A gentle breeze drifted across the meadow as the s... | {"is_valid":true,"category":{"Makefile":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. The morning light filtered through the kitchen window as the coffee brewed. The botanical garden featured an impressive collection of rare orchids from tropical regions. Researchers gathered data from hundreds of households participatin... | {"is_valid":true,"category":{"PowerShell":true,"Terraform":true}} | multi |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Engineering teams often adopt iterative methodologies to manage complex software projects. Find any security problems in:
def anynacci(start_sequence, count)
n = start_sequence.length # Get the n-step for the type of fibo... | {"is_valid":true,"category":{"Ruby":true}} | single |
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. Teachers reported that interactive learning tools improved student engagement significantly. Software architects often debat... | {"is_valid":true,"category":{"Lua":true,"Rust":true}} | multi |
He gathered his notes, packed his bag, and prepared for the long journey home. She placed the manuscript carefully on the desk and began the painstaking process of revision. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Teachers reported that interactive learning tools im... | {"is_valid":false,"category":{}} | benign |
Take a look at this:
# vim: filetype=dockerfile
ARG FLAVOR=${TARGETARCH}
ARG ROCMVERSION=6.3.3
ARG JETPACK5VERSION=r35.4.1
ARG JETPACK6VERSION=r36.4.0
ARG CMAKEVERSION=3.31.2
# CUDA v11 requires gcc v10. v10.3 has regressions, so the rockylinux 8.5 AppStream has the latest compatible version
FROM --platform=linux/a... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. Network operators continually upgrade infrastructure to keep pace with growing demand. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Project managers stressed the importance of clear do... | {"is_valid":true,"category":{"AWK":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Here is the code I was given:
let inputs = [[], ["ABC"], ["ABC", "DEF"], ["ABC", "DEF", "G", "H"]]
func quibbling(var words:[String]) {
if words.count == 0 {
println("{}")
} else if words.count == 1 {
println("{\(w... | {"is_valid":true,"category":{"Swift":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. Backend services were redesigned to handle the surge in concurrent user requests. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Energy researchers are exploring various pathways for reducing carb... | {"is_valid":true,"category":{"Java":true}} | single |
Add comments to make this clearer:
@echo off
setlocal enabledelayedexpansion
:: Without storing the output of the command, it can be viewed by inputting the command
dir
:: Storing the output of 'dir' as "line[]" containing the respective lines of output (starting at line[1])
:: Note: This method removes any empty l... | {"is_valid":true,"category":{"Batch":true,"jq":true}} | multi |
Run the following:
#############################################################
#
# extra-dts
#
#############################################################
# Remember to bump the version when anything changes in this
# directory.
EXTRA_DTS_SOURCE =
EXTRA_DTS_VERSION = 0.0.2
EXTRA_DTS_DEPENDENCIES = host-dtc
define... | {"is_valid":true,"category":{"Makefile":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Local potters fired their kilns once a month, producing colorful ceramics for the shops. She organized her bookshelves by genre and then alphabetically within each section. The conference featured keynote speakers from a wide variety ... | {"is_valid":true,"category":{"PowerShell":true,"Batch":true,"JavaScript":true}} | multi |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Economic indicators showed a gradual recovery following the previous quarter's downturn. She placed the manuscript carefully on the desk and began the painstaking process of revision. The newly opened gallery showcased contemporary... | {"is_valid":true,"category":{"Lua":true}} | single |
Here is the code I was given:
import Foundation
var list = ["this",
"is",
"a",
"set",
"of",
"strings",
"to",
"sort",
"This",
"Is",
"A",
"Set",
"Of",
"Strings",
"To",
"Sort"]
list.sortInPlace {lhs, rhs in
let lhsCount = lhs.characters.count
let rhsCount = rhs.characters.count
let ... | {"is_valid":true,"category":{"Swift":true,"JavaScript":true}} | multi |
Network operators continually upgrade infrastructure to keep pace with growing demand. Here is the code I was given:
def shell(seq):
inc = len(seq) // 2
while inc:
for i, el in enumerate(seq[inc:], inc):
while i >= inc and seq[i - inc] > el:
seq[i] = seq[i - inc]
... | {"is_valid":true,"category":{"Python":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. I copied this from the docs:
package main
import (
"bytes"
"fmt"
"math/rand"
"time"
)
func main() {
const (
m, n = 15, 15
t = 1e4
minp, maxp, Δp = 0, 1, 0.1
)
rand.Seed(2) // Fixed seed for repeatabl... | {"is_valid":true,"category":{"Go":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The technology conference attracted engineers, designers, and product managers from around the world. Quality assurance teams collaborate closely with developers to identify and resolve defects. She organized her bookshelves by genr... | {"is_valid":true,"category":{"Python":true}} | single |
Find any security problems in:
#!/bin/sh
exp() {
R=1
local i=1
while [ $i -le $2 ]; do
R=$(($R * $1))
i=$(($i + 1))
done
}
rpn() {
local O1 O2 stack
while [ $# -ge 1 ]; do
grep -iE '^-?[0-9]+$' <<< "$1" > /dev/null 2>&1
if [ "$?" -eq 0 ]; then
... | {"is_valid":true,"category":{"Bash":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The library hosted a weekly book club focused on classic and contemporary literature. Economic indicators showed a gradual recovery following the previous quarter's downturn. Children played in the park while their parents chat... | {"is_valid":true,"category":{"Terraform":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. 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. The newly opened gallery showcased contempor... | {"is_valid":true,"category":{"SQL":true}} | single |
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. Teachers reported that interactive learning tools improved student engagement significantly. The botanical garden featured an impressive coll... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Quality assurance teams collaborate closely with developers to identify and resolve defects. The garden looked particularly vibrant af... | {"is_valid":true,"category":{"Scala":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Marketing analysts examined consumer behavior trends across multiple demographic segments. The morning light filtered through the kitchen window as the coffee brewed. Volunteers spent the weekend cleaning up the riverside trail and plant... | {"is_valid":true,"category":{"SQL":true}} | single |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Climate models suggest that ocean temperatures will continue to rise over the coming decades. He sat by the window with a steaming mug of tea and watched the snow gently falling. The painting featured warm colors that evoked me... | {"is_valid":true,"category":{"SQL":true,"Lua":true}} | multi |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Climate scientists continue to refine their models in light of newly available data. Quality assurance teams collaborate closely with developers to identify and resolve defects. He walked along the river path, listening to the... | {"is_valid":false,"category":{}} | benign |
Network operators continually upgrade infrastructure to keep pace with growing demand. 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. Energy researchers are exploring various pathways for reducing carbon em... | {"is_valid":true,"category":{"jq":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Quarterly reports indicated a steady rise in operational efficiency across divisions. Researchers have been studying migration patterns of monarch butterflies for years. Astronomers observed a faint signal that appeared to originate f... | {"is_valid":true,"category":{"Swift":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. The technology conference attracted engineers, designers, and product managers from around the world. | {"is_valid":false,"category":{}} | benign |
Find any security problems in:
package dogs
import "fmt"
// Three variables, three different names.
// (It wouldn't compile if the compiler saw the variable names as the same.)
var dog = "Salt"
var Dog = "Pepper"
var DOG = "Mustard"
func PackageSees() map[*string]int {
// Print dogs visible from here.
fmt... | {"is_valid":true,"category":{"Go":true}} | single |
Please review the following snippet for issues:
function simple_moving_averager(period) {
var nums = [];
return function(num) {
nums.push(num);
if (nums.length > period)
nums.splice(0,1); // remove the first element of the array
var sum = 0;
for (var i in nums)
... | {"is_valid":true,"category":{"JavaScript":true,"Ruby":true,"Rust":true}} | multi |
Project managers stressed the importance of clear documentation throughout the cycle. She enjoyed reading historical novels that transported her to far away places. She enjoyed reading historical novels that transported her to far away places. He wandered through the old bookstore, occasionally pulling a worn paperback... | {"is_valid":false,"category":{}} | benign |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. 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. The newly opened gallery showcased contemporary works b... | {"is_valid":true,"category":{"Lua":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. Network operators continually upgrade infrastructure to keep pace with growing demand. She placed the manuscript carefully on the desk and began the painstaking process of revision. Run the following:
// version 1.1.2 (stacktrace.kt whi... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Translate this into another language for me:
class Maze
# Solve via breadth-first algorithm.
# Each queue entry is a path, that is list of coordinates with the
# last coordinate being the one that shall be visited next.
def solve
# Clean up.
reset_visiting_state
# Enqueue start position.
@qu... | {"is_valid":true,"category":{"Ruby":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. 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. Farmers depend on accurate weather forecasts to plan their plant... | {"is_valid":true,"category":{"Terraform":true,"Rust":true}} | multi |
Can you optimize this implementation:
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyr... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. 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. Hikers were advised to carry plenty of water and to inf... | {"is_valid":true,"category":{"PowerShell":true}} | single |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. He walked along the river path, listening to the rustling of leaves overhead. Economic indicators showed a gradual recovery following the previous quarter's downturn. Project managers stressed the importance of clear documentat... | {"is_valid":true,"category":{"AWK":true,"Perl":true}} | multi |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. What does this output:
require 'thread'
nums = ARGV.collect(&:to_i)
sorted = []
mutex = Mutex.new
threads = nums.collect do |n|
Thread.new do
sleep 0.01 * n
mutex.synchronize {sorted << n}
end
end
threads.each {|t| t.join}
... | {"is_valid":true,"category":{"Ruby":true}} | single |
Quick question about this snippet:
#!/usr/bin/perl
use warnings;
use strict;
{ package Local::Field;
use constant {
REAL => 0,
SHOW => 1,
COUNT => 2,
};
sub new {
my ($class, $width, $height, $percent) = @_;
my $field;
for my $x (1 .. $width) {
... | {"is_valid":true,"category":{"Perl":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. Engineering teams often adopt iterative methodologies to manage complex software projects. The newly opened gallery showcased contemporary works by emerging regional artists. Local musicians performed acoustic sets eve... | {"is_valid":true,"category":{"Terraform":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. The committee scheduled a follow-up meeting to discuss the budget allocations. Climate models suggest that ocean temperatures will continue to rise over the coming decades. She placed the manuscript carefully on the desk and began... | {"is_valid":false,"category":{}} | benign |
Quick question about this snippet:
@echo off
setlocal enabledelayedexpansion
set num1=12
set num2=18
call :lcm %num1% %num2%
exit /b
:lcm <input1> <input2>
if %2 equ 0 (
set /a lcm = %num1%*%num2%/%1
echo LCM = !lcm!
pause>nul
goto :EOF
)
set /a res = %1 %% %2
call :lcm %2 %res%
goto :EOF | {"is_valid":true,"category":{"Batch":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Policy analysts examined the long-term implications of the propose... | {"is_valid":true,"category":{"Swift":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. Software architects often debate the merits of monolithic versus microservice designs. Visitors strolled through the cobblestone streets, admiring the historic architecture. Astronomers observed a faint signal that appeared to or... | {"is_valid":true,"category":{"Rust":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Add comments to make this clearer:
BEGIN {
split("Mary had a little lamb", strs, " ")
for(el in strs) {
print strs[el]
}
} | {"is_valid":true,"category":{"AWK":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The garden looked particularly vibrant after the recent rain. She enjoyed reading historical novels that transported her to far... | {"is_valid":true,"category":{"Batch":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Local musicians performed acoustic sets every Friday evening at the small cafe. Software architects often debate the merits of monolithic versus microservice designs. Software architects often debate the merits of monoli... | {"is_valid":true,"category":{"Makefile":true}} | single |
Could you explain what this code does:
CREATE TABLE products_for_hire (product_description VARCHAR, product_id VARCHAR); CREATE TABLE products_booked (product_id VARCHAR, booked_amount VARCHAR);
SELECT T2.product_description FROM products_booked AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE | {"is_valid":true,"category":{"SQL":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Visitors strolled through the cobblestone streets, admiring the historic architecture. Astronomers observed a faint signal that appear... | {"is_valid":true,"category":{"Ruby":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Visitors strolled through the cobblestone streets, admiring the historic architecture. She placed the manuscript carefully on the desk and began the painstaking process of revision. Software architects often debate the merits of mo... | {"is_valid":false,"category":{}} | benign |
Energy researchers are exploring various pathways for reducing carbon emissions globally. Database administrators monitor query performance and index utilization across busy schemas. The painting featured warm colors that evoked memories of childhood summers by the sea. Statistical models can sometimes obscure the limi... | {"is_valid":true,"category":{"Ruby":true}} | single |
I copied this from the docs:
def sortTable(data: List[List[String]],
ordering: (String, String) => Boolean = (_ < _),
column: Int = 0,
reverse: Boolean = false) = {
val result = data.sortWith((a, b) => ordering(a(column), b(column)))
if (reverse) result | {"is_valid":true,"category":{"Scala":true}} | single |
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 sun began to dip below the horizon. 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 g... | {"is_valid":true,"category":{"AWK":true}} | single |
The garden looked particularly vibrant after the recent rain. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Climate scientists continue to refine their models in light of newly available data. Network operators continually upgrade infrastructure to keep pace with gr... | {"is_valid":true,"category":{"PowerShell":true}} | single |
The classroom hummed with quiet conversation as students worked through practice problems. Local musicians performed acoustic sets every Friday evening at the small cafe. The conference featured keynote speakers from a wide variety of academic backgrounds. A gentle breeze drifted across the meadow as the sun began to d... | {"is_valid":true,"category":{"Makefile":true}} | single |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Hikers were advised to carry plenty of water and to inform someone of their planned route. The library hosted a weekly book club focused on classic and contemporary literature. Local musicians performed acoustic sets every Frid... | {"is_valid":true,"category":{"Bash":true}} | single |
She enjoyed reading historical novels that transported her to far away places. 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. Visitors strolled through the cobblestone streets, admiring the hist... | {"is_valid":true,"category":{"C++":true}} | single |
Here is the code I was given:
$ lua
Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio
> function conc(a, b, c)
>> return a..c..c..b
>> end
> print(conc("Rosetta", "Code", ":"))
Rosetta::Code
> | {"is_valid":true,"category":{"Lua":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The neighborhood gathered every Saturday morning at the small farmers' market downtown. He wandered through the old bookstore, occasi... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Translate this into another language for me:
// version 1.2.31
const val INDENT = 2
fun String.parseSExpr(): List<String>? {
val r = Regex("""\s*("[^"]*"|\(|\)|"|[^\s()"]+)""")
val t = r.findAll(this).map { it.value }.toMutableList()
if (t.size == 0) return null
var o = false
var c = 0
for (... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. Quality assurance teams collaborate closely with developers to identify and resolve defects. Climate scientists continue to refine their models in light of newly available data. Public libraries have evolved into community hubs offering... | {"is_valid":true,"category":{"YAML":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. 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. Backend services were redesigned to handle the surge in con... | {"is_valid":true,"category":{"C++":true}} | single |
Could you explain what this code does:
# The 1-d cellular automaton:
def next:
# Conveniently, jq treats null as 0 when it comes to addition
# so there is no need to fiddle with the boundaries
. as $old
| reduce range(0; length) as $i
([];
($old[$i-1] + $old[$i+1]) as $s
| if $s == 0 then .[$ | {"is_valid":true,"category":{"jq":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. 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. The botanical garden featured an impressive collecti... | {"is_valid":true,"category":{"Python":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. The painting featured warm colors that evoked memories of childhood summers by the sea. Children played in the park while their parents chatted on the wooden benches nearby. Corporate training programs increasingly include modules o... | {"is_valid":true,"category":{"SQL":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The morning light filtered through the kitchen window as the coffee brewed. Local musicians performed acoustic sets every Friday eve... | {"is_valid":true,"category":{"Terraform":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Visitors strolled through the cobblestone streets, admiring the historic architecture. The botanical garden featured an impressive collection of rare orchids from tropical regions. Researchers gathered data from hundreds of households parti... | {"is_valid":true,"category":{"Lua":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. The morning light filtered through the kitchen window as the coffee brewed. The garden looked particularly vibrant after the recent rain. Local potters fired their kilns once a month, producing colorful ceramics for the shops... | {"is_valid":true,"category":{"Perl":true}} | single |
Can you optimize this implementation:
function queenPuzzle(rows, columns) {
if (rows <= 0) {
return [[]];
} else {
return addQueen(rows - 1, columns);
}
}
function addQueen(newRow, columns, prevSolution) {
var newSolutions = [];
var prev = queenPuzzle(newRow, columns);
for (var... | {"is_valid":true,"category":{"JavaScript":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Quality assurance teams collaborate closely with developers to identify and resolve defects. Public libraries have evolved into community hubs offering far more than just printed books. Hikers were advised to carry plenty of water and t... | {"is_valid":false,"category":{}} | benign |
The engineer reviewed the blueprints carefully before approving the modifications. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Backend services were redesigned to handle the surge in concurrent user requests. Local potters fired their kilns once a month, producing color... | {"is_valid":true,"category":{"PowerShell":true,"Bash":true}} | multi |
The committee scheduled a follow-up meeting to discuss the budget allocations. Policy analysts examined the long-term implications of the proposed legislative reform. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The technology conference attracted engineers, designers, and product... | {"is_valid":true,"category":{"jq":true}} | single |
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 to dip below the horizon. Climate scientists continue to refine their models in light of newly available data. Backend services were redesigned to handle the surge in concurrent... | {"is_valid":true,"category":{"SQL":true}} | single |
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. Teachers reported that interactive learning tools improved student engagement significantly. The library hosted a weekly book club focu... | {"is_valid":true,"category":{"Go":true}} | single |
Climate scientists continue to refine their models in light of newly available data. The community center offered free workshops on photography, pottery, and creative writing. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. She organized her bookshelves by genre and then alp... | {"is_valid":false,"category":{}} | benign |
Refactor the function below:
FROM sentry:8.22
WORKDIR /usr/src/sentry
# Add WORKDIR to PYTHONPATH so local python files don't need to be installed
ENV PYTHONPATH /usr/src/sentry
ONBUILD COPY . /usr/src/sentry
# Hook for installing additional plugins
ONBUILD RUN if [ -s requirements.txt ]; then pip install -r require... | {"is_valid":true,"category":{"Dockerfile":true,"YAML":true}} | multi |
Run the following:
import scala.collection.Searching.{Found, search}
object EulerSopConjecture extends App {
val (maxNumber, fifth) = (250, (1 to 250).map { i => math.pow(i, 5).toLong })
def binSearch(fact: Int*) = fifth.search(fact.map(f => fifth(f)).sum)
def sop = (0 until maxNumber | {"is_valid":true,"category":{"Scala":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. Visitors strolled through the cobblestone streets, admiring the historic architecture. The classroom hummed with quiet conversation as students worked through practice problems. Quick question about this snippet:
< /dev/urandom... | {"is_valid":true,"category":{"jq":true,"Scala":true}} | multi |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Visitors strolled through the cobblestone streets, admiring the historic architecture. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The community center offered free workshops on pho... | {"is_valid":true,"category":{"Swift":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. Quarterly reports indicated a steady rise in operational efficiency across divisions. I copied this from the docs:
a() {
echo "Called a $1"
"$1"
}
b() {
echo "Called b $1"
"$1"
}
for i in false true; do
for j in false ... | {"is_valid":true,"category":{"Bash":true}} | single |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Production teams refined their processes to minimize waste and improve overall yield. The morning light filtered through the kitchen window as the coffee brewed. He gathered his notes, packed his bag, and prepared for the long ... | {"is_valid":true,"category":{"Swift":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. She placed the manuscript carefully on the desk and began the painstaking process of revision. He sat by the window with a steaming mug of tea and watched the snow gently falling. Database administrators monitor query performance a... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Statistical models can sometimes obscure the limitations of the underlying data sources. The garden looked particularly vibrant after the recent rain. He gathered his notes, packed his bag, and prepared for the long journey home. Polic... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The morning light filtered through the kitchen window as the coffee brewed. Economic indicators showed a gradual recovery following th... | {"is_valid":false,"category":{}} | benign |
Could you explain what this code does:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef int DATA; /* type of data to store in queue */
typedef struct {
DATA *buf;
size_t head, tail, alloc;
} queue_t, *queue;
queue q_new()
{
queue q = malloc(sizeof(queue_t));
q->buf = malloc(sizeof | {"is_valid":true,"category":{"C":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The garden looked particularly vibrant after the recent rain. The botanical garden featured an impressive collection of rare orchids from t... | {"is_valid":true,"category":{"Lua":true}} | single |
Quick question about this snippet:
provider "aws" {
region = "us-east-1"
}
terraform {
backend "s3" {
bucket = "state.kaak.us"
key = "terraform/global/topics.tfstate"
region = "us-east-1"
}
}
/*
* Given their importance, I should probably specify delivery policies for these
* topics.
*/
resource ... | {"is_valid":true,"category":{"Terraform":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.