prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
Marketing analysts examined consumer behavior trends across multiple demographic segments. She organized her bookshelves by genre and then alphabetically within each section. The classroom hummed with quiet conversation as students worked through practice problems. Engineering teams often adopt iterative methodologies ... | {"is_valid":true,"category":{"C#":true}} | single |
Add comments to make this clearer:
prisoners = [*1..100]
N = 10_000
generate_rooms = ->{ [nil]+[*1..100].shuffle }
res = N.times.count do
rooms = generate_rooms[]
prisoners.all? {|pr| rooms[1,100].sample(50).include?(pr)}
end
puts "Random strategy : %11.4f %%" % (res.fdiv(N) * 100)
res = N.times.count do
room... | {"is_valid":true,"category":{"Ruby":true}} | single |
What does this output:
function New-MadLibs
{
[CmdletBinding(DefaultParameterSetName='None')]
[OutputType([string])]
Param
(
[Parameter(Mandatory=$false)]
[AllowEmptyString()]
[string]
$Name = "",
[Parameter(Mandatory=$false, ParameterSetName='Male')]
[s... | {"is_valid":true,"category":{"PowerShell":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Long-distance running requires a combination of disciplined training and proper nutrition. She enjoyed reading historical novels that transported her to far away places. He adjusted the telescope and waited patiently for the clouds ... | {"is_valid":true,"category":{"R":true}} | single |
Quick question about this snippet:
# NMake Makefile to build Introspection Files for GtkSourceView
!include detectenv-msvc.mak
APIVERSION = 4
CHECK_PACKAGE = gtk+-3.0
built_install_girs = GtkSource-$(APIVERSION).gir
built_install_typelibs = GtkSource-$(APIVERSION).typelib
!include introspection-msvc.mak
!if | {"is_valid":true,"category":{"Makefile":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. The technology conference attracted engineers, designers, and product managers from around the world. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The community center offered fr... | {"is_valid":true,"category":{"C++":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. Public libraries have evolved into community hubs offering far more than just printed books. Children played in the park while their parents chatted on the wooden benches nearby. Backend services were redesigned to handle the... | {"is_valid":true,"category":{"R":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Here is the code I was given:
from decimal import Decimal
import math
def h(n):
'Simple, reduced precision calculation'
return math.factorial(n) / (2 * math.log(2) ** (n + 1))
def h2(n):
'Extended precision Hickerson function... | {"is_valid":true,"category":{"Python":true,"Scala":true}} | multi |
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. Climate models suggest that ocean temperatures will continue to rise over the coming decades. She placed the manuscript carefully on the desk and be... | {"is_valid":true,"category":{"Dockerfile":true,"Bash":true}} | multi |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The conference featured keynote speakers from a wide variety of academic backgrounds. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Modern microprocessors rely on pipelining and out-of-orde... | {"is_valid":false,"category":{}} | benign |
He gathered his notes, packed his bag, and prepared for the long journey home. Refactor the function below:
eval_with_x() {
set -- "`x=$2; eval "$1"`" "`x=$3; eval "$1"`"
expr "$2" - "$1"
}
eval_with_x '
# compute 2 ** $x
p=1
while test $x -gt 0; do
p=`expr $p \* 2`
x=`expr $x - 1`
done
echo $p
' 3 5
# Pri... | {"is_valid":true,"category":{"Bash":true}} | single |
I copied this from the docs:
function agm ([Double]$a, [Double]$g) {
[Double]$eps = 1E-15
[Double]$a1 = [Double]$g1 = 0
while([Math]::Abs($a - $g) -gt $eps) {
$a1, $g1 = $a, $g
$a = ($a1 + $g1)/2
$g = [Math]::Sqrt($a1*$g1)
}
[pscustomobject]@{
a = "$a" | {"is_valid":true,"category":{"PowerShell":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. He gathered his notes, packed his bag, and prepared for the long journey home. Researchers have been studying migration patterns of monarch ... | {"is_valid":true,"category":{"R":true}} | single |
I copied this from the docs:
package main
import (
"bytes"
"encoding/binary"
"fmt"
)
// declarations for word size of data
type word int32
const wordLen = 4
const highBit = -1 << 31
var data = []word{170, 45, 75, -90, -802, 24, 2, 66}
func main() {
buf := bytes.NewBuffer(nil)
ds := make([][]... | {"is_valid":true,"category":{"Go":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The garden looked particularly vibrant after t... | {"is_valid":true,"category":{"C":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Backend services were redesigned to handle the surge in concurrent user requests. Astronomers observed a faint signal that appe... | {"is_valid":true,"category":{"Go":true}} | single |
Find any security problems in:
function fact([BigInt]$n){
if($n -ge ([BigInt]::Zero)) {
$fact = [BigInt]::One
([BigInt]::One)..$n | foreach{
$fact = [BigInt]::Multiply($fact, $_)
}
$fact
} else {
Write-Error "$n is lower than 0"
}
}
"$((Measure-Command {... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Translate this into another language for me:
import Darwin
// apply pixel of color at x,y with an OVER blend to the bitmap
public func pixel(color: Color, x: Int, y: Int) {
let idx = x + y * self.width
if idx >= 0 && idx < self.bitmap.count {
self.bitmap[idx] = self.blendColors(bot: self.bitmap[idx], to... | {"is_valid":true,"category":{"Swift":true,"Terraform":true}} | multi |
Statistical models can sometimes obscure the limitations of the underlying data sources. Hikers were advised to carry plenty of water and to inform someone of their planned route. Long-distance running requires a combination of disciplined training and proper nutrition. Take a look at this:
# syntax: GAWK -f CATALAN_NU... | {"is_valid":true,"category":{"AWK":true}} | single |
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. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The library hosted a weekly book club focused o... | {"is_valid":false,"category":{}} | benign |
Quick question about this snippet:
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: monitoring
name: grafana-deployment
spec:
selector:
matchLabels:
app: grafana-deployment
template:
metadata:
labels:
app: grafana-deployment
spec:
securityContext:
runAsUser... | {"is_valid":true,"category":{"YAML":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. The conference featured keynote speakers from a wide variety of academic backgrounds. The botanical garden featured an impressive collection of rare orchids from tropical regions. He adjusted the telescope and waited patiently for the... | {"is_valid":true,"category":{"C++":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The neighborhood gathered every Saturday morning at the small farmers' market downtown. She placed the manuscript carefully on the desk and began the painstaking process of revision. Could you explain what this code does:
import Fou... | {"is_valid":true,"category":{"Swift":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. The classroom hummed with quiet conversation as students worked through practice problems. Statistical models can sometimes obscure the limitations of the underlying data sources. Policy analysts examined the long-term implicatio... | {"is_valid":true,"category":{"Bash":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Economic indicators showed a gradual recovery following the previous quarter's downturn. Long-distance running requires a combination of disciplined... | {"is_valid":true,"category":{"AWK":true,"Java":true}} | multi |
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. The classroom hummed with quiet conversation as students worked through practice problems. Network operators continually upgrade i... | {"is_valid":false,"category":{}} | benign |
Translate this into another language for me:
(function () {
// Proper divisors
function properDivisors(n) {
if (n < 2) return [];
else {
var rRoot = Math.sqrt(n),
intRoot = Math.floor(rRoot),
lows = range(1, intRoot).filter(function (x) {
... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Take a look at this:
LOCAL_PATH:= $(call my-dir)
#--------------------------------------------------------
# libvrcubeworld.so
#--------------------------------------------------------
include $(CLEAR_VARS)
PROJECT_FILES := $(wildcard $(LOCAL_PATH)/../../../Src/*.cpp)
PROJECT_FILES += $(wildcard $(LOCAL_PATH)/../../.... | {"is_valid":true,"category":{"Makefile":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Database administrators monitor query performan... | {"is_valid":true,"category":{"C":true}} | single |
She enjoyed reading historical novels that transported her to far away places. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. I copied this from the docs:
# Example values:
# $re : -0.8
# $im : 0.156
{}
| range(-100; 101; 10) as $v
| (( range (-280; 281; 10) as $h
| .x =... | {"is_valid":true,"category":{"jq":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. The garden looked particularly vibrant after the recent rain. 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 proposed legislative refor... | {"is_valid":false,"category":{}} | benign |
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. 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 ru... | {"is_valid":true,"category":{"Makefile":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. I copied this from the docs:
puts 'Enter width and height: '
w=gets.to_i
arr = Array.new(gets.to_i){Array.new(w)}
arr[1][3] = 5
p arr[1][3] | {"is_valid":true,"category":{"Ruby":true}} | single |
Quick question about this snippet:
-- Return a copy of table t in which each string is reversed
function reverseEach (t)
local rev = {}
for k, v in pairs(t) do rev[k] = v:reverse() end
return rev
end
-- Return a reversed copy of table t
function tabReverse (t)
local revTab = {}
for i, v in ipairs(... | {"is_valid":true,"category":{"Lua":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. Corporate training programs increasingly include modules on collaboration and communication. The morning light filtered through the kitchen window as the coffee brewed. Energy researchers are exploring various pathways for redu... | {"is_valid":true,"category":{"AWK":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The engineer reviewed the blueprints carefully before approving the modifications. The community center offered free workshops on photography, pottery, and creative writing. Astronomers observed a faint signal that appeared to ... | {"is_valid":true,"category":{"Go":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Project managers stressed the importance of clear documentation throughout the cycle. The garden looked particularly vibrant after the recent rain. The painting featured warm colors that evoked memories of childhood summers by the se... | {"is_valid":true,"category":{"jq":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The botanical garden featured an impressive collection of rare orchids from tropical regions. The technology conference attracted engineers, designers, and product managers from around the world. Farmers depend on accurate weat... | {"is_valid":true,"category":{"AWK":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Add comments to make this clearer:
using System;
using System.Linq;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
Console.WriteLine("First 25 ludic numbers:");
Cons... | {"is_valid":true,"category":{"C#":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Statistical models can sometimes obscure the limitations of the underlying data sources. Researchers gathered data from hundreds of households participating in the longitudinal study. Climate models suggest that ocean temperatures... | {"is_valid":true,"category":{"Python":true}} | single |
I need help debugging this script:
#!/bin/bash
RESPONSES=("It is certain" "It is decidedly so" "Without a doubt"
"Yes definitely" "You may rely on it" "As I see it yes"
"Most likely" "Outlook good" "Signs point to yes" "Yes"
"Reply hazy try again" "Ask again later"
"Be | {"is_valid":true,"category":{"Bash":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Climate scientists continue to refine their models in light of newly available data. Children played in the park while their parents chatted ... | {"is_valid":true,"category":{"Go":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. He sat by the window with a steaming mug of tea and watched the snow gently falling. What does this output:
let gifts = [ "partridge in a pear tree", "Two turtle doves",
"Three French hens", "Four calling ... | {"is_valid":true,"category":{"Swift":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Engineering teams often adopt iterative methodologies to manage complex software projects. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Nutritionists generally recommend a balanced diet rich in... | {"is_valid":true,"category":{"AWK":true,"SQL":true}} | multi |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Network operators continually upgrade infrastructure to keep pace with growing demand. Climate scientists continue to refine their models in light of newly available data. Quarterly reports indicated a steady rise in operational eff... | {"is_valid":true,"category":{"Ruby":true}} | single |
Translate this into another language for me:
import java.util.*;
public class Sokoban {
String destBoard, currBoard;
int playerX, playerY, nCols;
Sokoban(String[] board) {
nCols = board[0].length();
StringBuilder destBuf = new StringBuilder();
StringBuilder currBuf = new StringBu... | {"is_valid":true,"category":{"Java":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. 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. Software architects often debate the merits of mon... | {"is_valid":false,"category":{}} | benign |
Refactor the function below:
def floyd_warshall(n, edge)
dist = Array.new(n){|i| Array.new(n){|j| i==j ? 0 : Float::INFINITY}}
nxt = Array.new(n){Array.new(n)}
edge.each do |u,v,w|
dist[u-1][v-1] = w
nxt[u-1][v-1] = v-1
end
n.times do |k|
n.times do |i|
n.times do |j|
if dist[i][j]... | {"is_valid":true,"category":{"Ruby":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Refactor the function below:
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
for /l %%i in (1,1,5) do (
SET line=
for /l %%j in (1,1,%%i) do (
SET line=!line!*
)
ECHO !line!
)
ENDLOCAL
Alongside it, this:
function find... | {"is_valid":true,"category":{"Batch":true,"Lua":true,"PowerShell":true}} | multi |
Marketing analysts examined consumer behavior trends across multiple demographic segments. She enjoyed reading historical novels that transported her to far away places. The newly opened gallery showcased contemporary works by emerging regional artists. Software architects often debate the merits of monolithic versus m... | {"is_valid":true,"category":{"Lua":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. 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. She placed the manuscript carefully on the desk... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Find any security problems in:
import org.apache.commons.math3.fraction.BigFraction;
public class BernoulliNumbers {
public static void main(String[] args) {
for (int n = 0; n <= 60; n++) {
BigFraction b = bernouilli(n);
if (!b.equals(BigFraction.ZERO))
System.out... | {"is_valid":true,"category":{"Java":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The morning light filtered through the kitchen w... | {"is_valid":true,"category":{"Makefile":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The newly opened gallery showcased contemporary works by emerging regional artists. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The library hosted a weekly book club focused on classic ... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Translate this into another language for me:
def compress(tc:String) = {
//initial dictionary
val startDict = (1 to 255).map(a=>(""+a.toChar,a)).toMap
val (fullDict, result, remain) = tc.foldLeft ((startDict, List[Int](), "")) {
case ((dict,res,leftOver),nextChar) =>
if (dict.contains(leftOve... | {"is_valid":true,"category":{"Scala":true}} | single |
Here is the code I was given:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Project managers stressed the importance of clear documentation throughout the cycle. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The classroom hummed with quiet conversation as students worked th... | {"is_valid":true,"category":{"Rust":true}} | single |
I copied this from the docs:
FROM registry.centos.org/centos:latest
# add our user and group first to make sure their IDs get assigned consistently
RUN groupadd -r sentry && useradd -r -m -g sentry sentry
RUN yum update -y && yum install epel-release -y && yum clean all
RUN yum install -y \
gcc \
git... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Quarterly reports indicated a steady rise in operatio... | {"is_valid":true,"category":{"Terraform":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 (... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Network operators continually upgrade infrastructure to keep pace with growing demand. Teachers reported that interactive learning tools improved... | {"is_valid":true,"category":{"jq":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. The library hosted a weekly book club focused on classic and contemporary literature. Take a look at this:
object Dijkstra {
type Path[Key] = (Double, List[Key])
def Dijkstra[Key](lookup: Map[Key, List[(Double, Key)]], fring... | {"is_valid":true,"category":{"Scala":true,"AWK":true}} | multi |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Researchers have been studying migration patterns of monarch butterflies for years. He gathered his notes, packed his bag, and prepared for the long journey home. Energy researchers are exploring various pathways for reducing c... | {"is_valid":true,"category":{"Python":true}} | single |
Quick question about this snippet:
# "ported" by Adam Miller <maxamillion@fedoraproject.org> from
# https://github.com/fedora-cloud/Fedora-Dockerfiles
#
# Originally written for Fedora-Dockerfiles by
# scollier <scollier@redhat.com>
FROM centos:centos7
MAINTAINER The CentOS Project <cloud-ops@centos.org>
RUN yum... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Climate scientists continue to refine their models in ligh... | {"is_valid":true,"category":{"Kotlin":true}} | single |
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. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The neighborhood gathered every Saturday morning at t... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Please review the following snippet for issues:
# An empty object:
{}
# Its type:
{} | type
# "object"
# An object literal:
{"a": 97, "b" : 98}
# Programmatic object construction:
reduce ("a", "b", "c", "d") as $c ({}; . + { ($c) : ($c... | {"is_valid":true,"category":{"jq":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Policy analysts examined the long-term implications of the proposed legislative reform. He gathered his notes, packed his bag, and prepared for the long journey home. The committee scheduled a follow-up meeting to discuss the budget allocat... | {"is_valid":false,"category":{}} | benign |
I need help debugging this script:
#include "boost/filesystem.hpp"
#include "boost/regex.hpp"
#include <iostream>
using namespace boost::filesystem;
int main()
{
path current_dir(".");
// list all files starting with a
boost::regex pattern("a.*");
for (directory_iterator iter(current_dir), end; | {"is_valid":true,"category":{"C++":true}} | single |
I need help debugging this script:
#!/bin/bash
main() {
printf $'Penney\'s Game\n\n'
printf 'Flipping to see who goes first ... '
if [[ $(flip) == H ]]; then
printf 'I do.\n'
p2=$(choose_sequence)
printf 'I choose: %s\n' "$p2"
else
printf 'You do.\n'
fi
while true; do
read -p 'E | {"is_valid":true,"category":{"Bash":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. What does this output:
def mc_rank(iterable, start=1):
"""Modified competition ranking"""
lastresult, fifo = None, []
for n, item in enumerate(iterable, start-1):
if item[0] == lastresult:
fifo += [item]
... | {"is_valid":true,"category":{"Python":true}} | single |
Here is the code I was given:
def generate_statistics(n)
sum = sum2 = 0.0
hist = Array.new(10, 0)
n.times do
r = rand
sum += r
sum2 += r**2
hist[(10*r).to_i] += 1
end
mean = sum / n
stddev = Math::sqrt((sum2 / n) - mean**2)
puts "size: #{n}"
puts "mean: #{mean}"
puts "stddev: #{std... | {"is_valid":true,"category":{"Ruby":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. Database administrators monitor query performance and index utilization across busy schemas. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. He walked along the river path, listening... | {"is_valid":true,"category":{"Rust":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. Historians continue to debate the significance of the treaty signed in that pivotal year. Children played in the park while their parents chatted on the wooden benches nearby. The bakery on the corner was famous for its sourdough lo... | {"is_valid":true,"category":{"YAML":true}} | single |
Please review the following snippet for issues:
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
public class UPC {
private static final int SEVEN = 7;
private static final Map... | {"is_valid":true,"category":{"Java":true,"JavaScript":true}} | multi |
Teachers reported that interactive learning tools improved student engagement significantly. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The painting featured warm colors that evoked memorie... | {"is_valid":true,"category":{"Scala":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. She enjoyed reading historical novels that transported her to far away places. The newly opened gallery showcased contemporary works by emerging regional artists. Network operators continually upgrade infrastructure to keep pac... | {"is_valid":true,"category":{"SQL":true,"PowerShell":true}} | multi |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Statistical models can sometimes obscure the limitation... | {"is_valid":false,"category":{}} | benign |
I need help debugging this script:
package main
import "fmt"
type Delegator struct {
delegate interface{} // the delegate may be any type
}
// interface that represents anything that supports thing()
type Thingable interface {
thing() string
}
func (self Delegator) operation() string {
if v, ok := sel... | {"is_valid":true,"category":{"Go":true}} | single |
Could you explain what this code does:
def setup(ruleset)
ruleset.each_line.inject([]) do |rules, line|
if line =~ /^\s*#/
rules
elsif line =~ /^(.+)\s+->\s+(\.?)(.*)$/
rules << [$1, $3, $2 != ""]
else
raise "Syntax error: #{line}"
end
end
end
def morcov(ruleset, input_data)
ru... | {"is_valid":true,"category":{"Ruby":true}} | single |
Run the following:
selfdescribing() {
local n=$1
local count=()
local i
for ((i=0; i<${#n}; i++)); do
((count[${n:i:1}]++))
done
for ((i=0; i<${#n}; i++)); do
(( ${n:i:1} == ${count[i]:-0} )) || return 1
done
return 0
}
for n in 0 1 10 11 1210 2020 21200 3211000 4210100... | {"is_valid":true,"category":{"Bash":true,"C":true,"YAML":true}} | multi |
Run the following:
function range-extraction($arr) {
if($arr.Count -gt 2) {
$a, $b, $c, $arr = $arr
$d = $e = $c
if((($a + 1) -eq $b) -and (($b + 1) -eq $c)) {
$test = $true
while($arr -and $test) {
$d = $e
$e, $arr = $arr
... | {"is_valid":true,"category":{"PowerShell":true,"SQL":true,"JavaScript":true}} | multi |
The morning light filtered through the kitchen window as the coffee brewed. Refactor the function below:
for %%f in (file.txt) do echo.%%~tf Database administrators monitor query performance and index utilization across busy schemas. | {"is_valid":true,"category":{"Batch":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Quick question about this snippet:
Bitmap.cubicbezier = function(self, x1, y1, x2, y2, x3, y3, x4, y4, nseg)
nseg = nseg or 10
local prevx, prevy, currx, curry
for i = 0, nseg do
local t = i / nseg
local a, b, c, d = ... | {"is_valid":true,"category":{"Lua":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Project managers stressed the importance of clear documentation throughout the cycle. Project managers stressed the importance of clear documentation throughout the cycle. Energy researchers are exploring various pathways for redu... | {"is_valid":false,"category":{}} | benign |
Quality assurance teams collaborate closely with developers to identify and resolve defects. Local potters fired their kilns once a month, producing colorful ceramics for the shops. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The neighborhood gathered every Saturday mor... | {"is_valid":false,"category":{}} | benign |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Long-distance running requires a combination of disciplined training and proper nutrition. Climate scientists continue to refine their models in light of newly available data. Hikers were advised to carry plenty of water and to inform some... | {"is_valid":true,"category":{"Scala":true,"JavaScript":true}} | multi |
The library hosted a weekly book club focused on classic and contemporary literature. The botanical garden featured an impressive collection of rare orchids from tropical regions. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Farmers depend on accurate weather forecasts to... | {"is_valid":true,"category":{"Kotlin":true,"Swift":true}} | multi |
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. She organized her bookshelves by genre and then alphabetically within each section. He gathered his notes, packed his bag, and prepared for... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Public libraries have evolved into community hubs offerin... | {"is_valid":false,"category":{}} | benign |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The painting featured warm colors that evoked memories of childhood summers by the sea. The morning light filtered through the kitchen window as the coffee brewed. Local potters fired their kilns once a month, producing colorfu... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Translate this into another language for me:
fn main() {
let strings = vec![
String::from("1001110011"),
String::from("1110111011"),
String::from("0010010010"),
String::from("1010101010"),
String::from("1111111111"),
String::from("0100101101"),
String::from("0... | {"is_valid":true,"category":{"Rust":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. Project managers stressed the importance of clear documentation throughout the cycle. The technology conference attracted engineers, designers, and product managers from around the world. The chef prepared a simple meal of roasted veg... | {"is_valid":true,"category":{"Makefile":true}} | single |
What does this output:
counting_sort <- function(arr, minval, maxval) {
r <- arr
z <- 1
for(i in minval:maxval) {
cnt = sum(arr == i)
while(cnt > 0) {
r[z] = i
z <- z + 1
cnt <- cnt - 1
}
}
r
}
# 140+1 instead of 140, since random numbers generated
# by runif a | {"is_valid":true,"category":{"R":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Project managers stressed the importance of clear documentation throughout the cycle. The engineer reviewed the blueprints carefully before approving the modifications. Marketing analysts examined consumer behavior trends across mul... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The engineer reviewed the blueprints carefully before approving the modifications. Engineering teams often adopt iterative methodolog... | {"is_valid":true,"category":{"R":true,"Go":true,"Rust":true}} | multi |
Database administrators monitor query performance and index utilization across busy schemas. 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 nearby. Statistical models can sometimes obscure the limitations... | {"is_valid":true,"category":{"Makefile":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. Project managers stressed the importance of clear documentation throughout the cycle. Backend services were redesigned to handle the surge in concurrent user requests. Historians continue to debate the significance of the tre... | {"is_valid":true,"category":{"Python":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The garden looked particularly vibrant after the recent rain. Policy analysts examined the long-term implications of the proposed legislative ref... | {"is_valid":false,"category":{}} | benign |
Researchers gathered data from hundreds of households participating in the longitudinal study. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The bakery on the corner was famous for i... | {"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.