prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
She enjoyed reading historical novels that transported her to far away places. Find any security problems in:
@echo off
set dog=Benjamin
set Dog=Samba
set DOG=Bernie
echo There is just one dog named %dog%.
pause>nul | {"is_valid":true,"category":{"Batch":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. She organized her bookshelves by genre and then alphabetically within each section. Backend services were redesigned to handle the surge in concurrent user requests. Network operators continually upgrade infrastructure to keep pace with... | {"is_valid":true,"category":{"SQL":true}} | single |
Please review the following snippet for issues:
t1 = Time.now
catch :done do
Signal.trap('INT') do
Signal.trap('INT', 'DEFAULT') # reset to default
throw :done
end
n = 0
loop do
sleep(0.5)
n += 1
puts n
end
end
tdelt = Time.now - t1
puts 'Program has run for %5.3f seconds.' % tdelt | {"is_valid":true,"category":{"Ruby":true}} | single |
Translate this into another language for me:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kafkatopicchannels.messaging.optum.dev
labels:
knative.dev/crd-install: "true"
messaging.knative.dev/subscribable: "true"
duck.knative.dev/addressable: "true"
spec:
group: me... | {"is_valid":true,"category":{"YAML":true,"SQL":true}} | multi |
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 library hosted a weekly book club focused on classic and contemporary literature. The painting featured warm colors that evoked memories of c... | {"is_valid":true,"category":{"Makefile":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Network operators continually upgrade infrastructure to keep pace with growing demand. Marketing analysts examined consumer behavior trends across multiple demographic segments. The garden looked particularly vibrant after the recent rain. Nu... | {"is_valid":true,"category":{"PowerShell":true}} | single |
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. The morning light filtered through the kitchen window as the coffee brewed. Take a look at this:
#include <iostream>
class Acc
{
public:
Acc(int ini... | {"is_valid":true,"category":{"C++":true}} | single |
I copied this from the docs:
use std::collections::HashSet;
use std::fs::File;
use std::io::{self, BufRead};
use std::iter::FromIterator;
fn semordnilap(filename: &str) -> std::io::Result<()> {
let file = File::open(filename)?;
let mut seen = HashSet::new();
let mut count = 0;
for line in io::BufReade... | {"is_valid":true,"category":{"Rust":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. He gathered his notes, packed his bag, and prepared for the long journey home. Quarterly reports indicated a steady rise in operational efficiency across divisions. She placed the manuscript carefully on the desk and began the... | {"is_valid":true,"category":{"Perl":true}} | single |
I copied this from the docs:
object CantorSetQD extends App {
val (width, height) = (81, 5)
val lines = Seq.fill[Array[Char]](height)(Array.fill[Char](width)('*'))
def cantor(start: Int, len: Int, index: Int) {
val seg = len / 3
println(start, len, index)
if (seg != 0) {
for ( | {"is_valid":true,"category":{"Scala":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Backend services were redesigned to handle the surg... | {"is_valid":true,"category":{"YAML":true,"JavaScript":true}} | multi |
Here is the code I was given:
# syntax: GAWK -f PYTHAGOREAN_TRIPLES.AWK
# converted from Go
BEGIN {
printf("%5s %11s %11s %11s %s\n","limit","limit","triples","primitives","seconds")
for (max_peri=10; max_peri<=1E9; max_peri*=10) {
t = systime()
prim = 0
total = 0
new_tri(3,4,5)
pr... | {"is_valid":true,"category":{"AWK":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. He sat by the window with a steaming mug of tea and watched the snow gently falling. Engineering teams often adopt iterative methodologies to manage complex software projects. He sat by the window with a steaming mug of tea and w... | {"is_valid":true,"category":{"jq":true}} | single |
Here is the code I was given:
def is_palindrome(s):
'''
>>> is_palindrome('')
True
>>> is_palindrome('a')
True
>>> is_palindrome('aa')
True
>>> is_palindrome('baa')
False
>>> is_palindrome('baab')
True
>>> is_palindrome('ba_ab')... | {"is_valid":true,"category":{"Python":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Project managers stressed the importance of clear documentation throughout the cycle. Production teams refined their processes to minimize wa... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. The morning light filtered through the kitchen window as the coffee brewed. Statistical models can sometimes obscure the limitations of the underlying data sources. The conference featured keynote speakers from a wide variety of acad... | {"is_valid":true,"category":{"C++":true}} | single |
Translate this into another language for me:
# ===============================================================
# This is where all of the top-level, project-specific
# information is supplied.
# ===============================================================
HIDE_SYMS = 1
VISIBILITY_HIDDEN = $(if $(HIDE_SYMS),... | {"is_valid":true,"category":{"Makefile":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. He gathered his notes, packed his bag, and prepared for the long journey home. Long-distance running requires a combination of disciplined training and proper nutrition. The classroom hummed with quiet conversation as students work... | {"is_valid":true,"category":{"SQL":true,"Batch":true}} | multi |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Researchers gathered data from hundreds of households participating in the longitudinal study. Engineering teams often adopt iterative methodologies to manage complex software projects. Researchers have been studying migration pat... | {"is_valid":true,"category":{"Java":true,"JavaScript":true,"R":true}} | multi |
Please review the following snippet for issues:
typealias NodePtr<T> = UnsafeMutablePointer<Node<T>>
class Node<T> {
var value: T
fileprivate var prev: NodePtr<T>?
fileprivate var next: NodePtr<T>?
init(value: T, prev: NodePtr<T>? = nil, next: NodePtr<T>? = nil) {
self.value = value
self.prev = prev... | {"is_valid":true,"category":{"Swift":true,"AWK":true}} | multi |
Quick question about this snippet:
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class Bins {
public static <T extends Comparable<? super T>> int[] bins(
List<? extends T> limits, Iterable<? extends T> data) {
int[] result = new int[limits.size() + 1];
... | {"is_valid":true,"category":{"Java":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. He walked along the river path, listening to the rustling of leaves overhead. Long-distance running requires a combination of discipl... | {"is_valid":true,"category":{"Perl":true,"C":true}} | multi |
I need help debugging this script:
#include <iostream>
#include <vector>
#include <algorithm>
#include <stdexcept>
#include <memory>
#include <sys/time.h>
using std::cout;
using std::endl;
class StopTimer
{
public:
StopTimer(): begin_(getUsec()) {}
unsigned long long getTime() const { return getUsec() - beg... | {"is_valid":true,"category":{"C++":true}} | single |
I need help debugging this script:
import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JFrame;
public class ColorFrame extends JFrame {
public ColorFrame(int width, int height) {
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setSize(width, height);
this.setVisible(true);
}
@Override
... | {"is_valid":true,"category":{"Java":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. Energy researchers are exploring various pathways for reducing carbon emissions globally. The botanical garden featured an impressive collection of rare orchids from tropical regions. The morning light filtered through the kitc... | {"is_valid":true,"category":{"R":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. Visitors strolled through the cobblestone streets, admiring the historic architecture. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Backend services were redesigned to handle the surge in... | {"is_valid":true,"category":{"Makefile":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Here is the code I was given:
CREATE TABLE invoices (billing_state VARCHAR, billing_country VARCHAR);
SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1 Children play... | {"is_valid":true,"category":{"SQL":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Translate this into another language for me:
template <typename T>
struct Node
{
Node* next;
Node* prev;
T data;
}; He walked along the river path, listening to the rustling of leaves overhead. The painting feature... | {"is_valid":true,"category":{"C++":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. I copied this from the docs:
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const vector<string> MONTHS = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
... | {"is_valid":true,"category":{"C++":true,"C#":true}} | multi |
The painting featured warm colors that evoked memories of childhood summers by the sea. Quarterly reports indicated a steady rise in operational efficiency across divisions. The garden looked particularly vibrant after the recent rain. Project managers stressed the importance of clear documentation throughout the cycle... | {"is_valid":true,"category":{"C":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Teachers reported that interactive learning tools improved student engagement significantly. Climate scientists continue to refine their models in light of newly available data. Marketing analysts examined consumer behavior trend... | {"is_valid":true,"category":{"YAML":true}} | single |
Translate this into another language for me:
# syntax: GAWK -f DINESMANS_MULTIPLE-DWELLING_PROBLEM.AWK
BEGIN {
for (Baker=1; Baker<=5; Baker++) {
for (Cooper=1; Cooper<=5; Cooper++) {
for (Fletcher=1; Fletcher<=5; Fletcher++) {
for (Miller=1; Miller<=5; Miller++) {
for (Smith=1; ... | {"is_valid":true,"category":{"AWK":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. The painting featured warm colors that evoked memories of childhood summers by the sea. Local potters fired their kilns once a month, producing colorful ceramics for the shops. She placed the manuscript carefully on the desk and began the pai... | {"is_valid":true,"category":{"Scala":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Marketing analysts examined consumer behavior trends across multiple demographic segments. Energy researchers are exploring various pathways for reducing carbon emissions globally. Marketing analysts examined consumer behavior ... | {"is_valid":true,"category":{"Rust":true,"C++":true,"Perl":true}} | multi |
Energy researchers are exploring various pathways for reducing carbon emissions globally. The morning light filtered through the kitchen window as the coffee brewed. Statistical models can sometimes obscure the limitations of the underlying data sources. He wandered through the old bookstore, occasionally pulling a wor... | {"is_valid":false,"category":{}} | benign |
Find any security problems in:
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/part-of: kube-prometheus
app.kubernetes.io/version: 0.53.1
name: prometheus-operator
namespace: monitoring
spec:
clu... | {"is_valid":true,"category":{"YAML":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Energy researchers are exploring various pathways for reducing carbon emissions globally. Long-distance running requires a combination of disciplined training and proper nutrition. Visitors strolled through the cobblestone streets, admiring the... | {"is_valid":true,"category":{"C":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. The newly opened gallery showcased contemporary works by emerging regional artists. Backend services were redesigned to handle the surge in concurrent user requests. Here is the code I was given:
CREATE TABLE Engineer_Visits (f... | {"is_valid":true,"category":{"SQL":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. 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. He walked along the river path, listening to the rustling of le... | {"is_valid":false,"category":{}} | benign |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The morning light filtered through the kitchen... | {"is_valid":true,"category":{"R":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Hikers were advised to carry plenty of water and to inform someone of their planned route. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Children played in the park while their parents chatt... | {"is_valid":true,"category":{"SQL":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Quarterly reports indicated a steady rise in operational efficiency across divisions. Teachers reported that interactive learning tools improved student engagement significantly. He walked along the river path, listening to the... | {"is_valid":true,"category":{"C":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Could you explain what this code does:
library(httpuv)
runServer("0.0.0.0", 5000,
list(
call = function(req) {
list(status = 200L, headers = list('Content-Type' = 'text/html'), body = "Hello world!")
}
)
) Corpora... | {"is_valid":true,"category":{"R":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The newly opened gallery showcased contemporary works by emerging regional artists. Long-distance running requires a combination of disciplined training and p... | {"is_valid":true,"category":{"JavaScript":true,"Batch":true,"Go":true}} | multi |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Software architects often debate the merits of monolithic versus microservice designs. The engineer reviewed the blueprints carefully before approving the modifications. The engineer reviewed the blueprints carefully before approvi... | {"is_valid":false,"category":{}} | benign |
Network operators continually upgrade infrastructure to keep pace with growing demand. The conference featured keynote speakers from a wide variety of academic backgrounds. Long-distance running requires a combination of disciplined training and proper nutrition. Public libraries have evolved into community hubs offeri... | {"is_valid":true,"category":{"R":true}} | single |
Add comments to make this clearer:
require 'gmp'
def smooth_generator(ar)
return to_enum(__method__, ar) unless block_given?
next_smooth = 1
queues = ar.map{|num| [num, []] }
loop do
yield next_smooth
queues.each {|m, queue| queue << next_smooth * m}
next_smooth = queues.collect{|m, queue| queue.... | {"is_valid":true,"category":{"Ruby":true,"Dockerfile":true}} | multi |
Network operators continually upgrade infrastructure to keep pace with growing demand. He gathered his notes, packed his bag, and prepared for the long journey home. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The bakery on the corner was famous for its sourdough loaves... | {"is_valid":true,"category":{"Java":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. She enjoyed reading historical novels that transported her to far away places. Please review the following snippet for issues:
"use strict"
const _ = require('lodash');
const WIDTH_ARGUMENT_POSITION = 2;
const HEIGHT_ARGUMENT_... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Please review the following snippet for issues:
<!-- VoronoiD.html -->
<html>
<head><title>Voronoi diagram</title>
<script>
// HF#1 Like in PARI/GP: return random number 0..max-1
function randgp(max) {return Math.floor(Math.random()*max)}
// HF#2 Random hex color
function randhclr() {
return "#"+
("00"+randgp(256).... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Policy analysts examined the long-term implications of the proposed legislative reform. I copied this from the docs:
import org.apache.di... | {"is_valid":true,"category":{"Kotlin":true,"PowerShell":true,"JavaScript":true}} | multi |
Add comments to make this clearer:
# Use the Longest Common Subsequence algorithm
def shortest_common_supersequence(a, b):
lcs = longest_common_subsequence(a, b)
scs = ""
# Consume lcs
while len(lcs) > 0:
if a[0]==lcs[0] and b[0]==lcs[0]:
# Part of the LCS, so consume from all strings
... | {"is_valid":true,"category":{"Python":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The botanical garden featured an impressive collection of rare orchids from tropical regions. Production teams refined their processes to minimi... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Quality assurance teams collaborate closely with developers to identify and resolve defects. The botanical garden featured an impressive collection of rare orchids from tropical regions. Modern microprocessors rely on pipelining and o... | {"is_valid":true,"category":{"Swift":true}} | single |
Climate scientists continue to refine their models in light of newly available data. 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. The morning light filtered through the kitche... | {"is_valid":true,"category":{"Lua":true}} | single |
Here is the code I was given:
@echo off
:: Pick 2 random, non-zero, 2-digit numbers to send to :_main
set /a param1=%random% %% 98 + 1
set /a param2=%random% %% 98 + 1
call:_main %param1% %param2%
pause>nul
exit /b
:: This is the main function that outputs the answer in the form of "%1 * %2 = %answer%"
:_main
setlocal... | {"is_valid":true,"category":{"Batch":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. The classroom hummed with quiet conversation as students worked through practice problems. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Researchers gathered data from hundreds of househol... | {"is_valid":false,"category":{}} | benign |
Children played in the park while their parents chatted on the wooden benches nearby. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Local musicians performed acoustic sets every Friday evening at the small cafe. The chef prepared a simple meal of roasted vegetables, fresh bread, an... | {"is_valid":false,"category":{}} | benign |
Please review the following snippet for issues:
# Copyright 2017 The Kubernetes Authors All rights reserved.
#
# 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/lice... | {"is_valid":true,"category":{"YAML":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. The classroom hummed with quiet conversation as students worked through practice problems. 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":{"YAML":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Astronomers observed a faint signal that appeared to originate from a distant galaxy. He walked along the river path, listening to the rustling of leav... | {"is_valid":true,"category":{"Rust":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Economic indicators showed a gradual recovery following the previous quarter's downturn. Software architects often debate the merits... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Please review the following snippet for issues:
use std::thread;
use std::sync::{Mutex, Arc};
struct Philosopher {
name: String,
left: usize,
right: usize,
}
impl Philosopher {
fn new(name: &str, left: usize, right: usize) -> Philosopher {
Philosopher {
name: name.to_string(),
... | {"is_valid":true,"category":{"Rust":true}} | single |
Public libraries have evolved into community hubs offering far more than just printed books. Network operators continually upgrade infrastructure to keep pace with growing demand. What does this output:
$string = "a!===b=!=c"
$separators = [regex]"(==|!=|=)"
$matchInfo = $separators.Matches($string) |
Select-Obje... | {"is_valid":true,"category":{"PowerShell":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Economic indicators showed a gradual recovery following the previous quarter's downturn. Can you optimize this implementation:
using System;
using ... | {"is_valid":true,"category":{"C#":true,"Go":true,"Rust":true}} | multi |
Can you optimize this implementation:
function pop-count($n) {
(([Convert]::ToString($n, 2)).toCharArray() | where {$_ -eq '1'}).count
}
function isPrime ($n) {
if ($n -eq 1) {$false}
elseif ($n -eq 2) {$true}
elseif ($n -eq 3) {$true}
else{
$m = [Math]::Floor([Math]::Sqrt($n))
(... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. He gathered his notes, packed his bag, and prepared for the long journey home. Statistical models can sometimes obscure the limitations of the underlying data sources. Researchers have been studying migration patterns of monarc... | {"is_valid":true,"category":{"Rust":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. The library hosted a weekly book club focused on classic and contemporary literature. Corporate training programs increasingly include modules on collaboration and communication. Travelers explored ancient ruins, marveling at the crafts... | {"is_valid":false,"category":{}} | benign |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Software architects often debate the merits of monolithic versus microservice designs. Hikers were advised to carry plenty of water and to inform someone of their planned route. The botanical garden featured an impressive collecti... | {"is_valid":true,"category":{"Ruby":true}} | single |
I copied this from the docs:
using System.Xml;
using System.Xml.Serialization;
[XmlRoot("root")]
public class ExampleXML
{
[XmlElement("element")]
public string element = "Some text here";
static void Main(string[] args)
{
var xmlnamespace = new XmlSerializerNamespaces();
xmlnamespace.Ad... | {"is_valid":true,"category":{"C#":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. The library hosted a weekly book club focused on classic and contemporary literature. Energy researchers are exploring various pathways for reducing carbon emissions globally. She placed the manuscript carefully on the desk and began... | {"is_valid":true,"category":{"Lua":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. Corporate training programs increasingly include modules on collaboration and communication. Production teams refined their processes to minimize waste and improve overall yield. Teachers reported that interactive learning tools ... | {"is_valid":true,"category":{"Batch":true,"Rust":true}} | multi |
Quick question about this snippet:
import java.util.Arrays;
public class Chaocipher {
private enum Mode {
ENCRYPT,
DECRYPT
}
private static final String L_ALPHABET = "HXUCZVAMDSLKPEFJRIGTWOBNYQ";
private static final String R_ALPHABET = "PTLNBQDEOYSFAVZKGJRIHWXUMC";
private sta... | {"is_valid":true,"category":{"Java":true}} | single |
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. Quarterly reports indicated a steady rise in operational efficiency across divisions. He wandered through the old bookstore, occasionally pulling a wo... | {"is_valid":true,"category":{"Perl":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. The garden looked particularly vibrant after the recent rain. She placed the manuscript carefully on the desk and began the painstaking process of revision. Astronomers observed a faint signal that appeared to originate from a distant... | {"is_valid":false,"category":{}} | benign |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The newly opened gallery showcased contemporary works by emerging regional artists. Climate scientists continue to refine their models in light of newly available data. Historians continue to debate the significance of the trea... | {"is_valid":true,"category":{"Swift":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Translate this into another language for me:
#!/bin/bash
function mode {
declare -A map
max=0
for x in "$@"; do
tmp=$((${map[$x]} + 1))
map[$x]=$tmp
((tmp > max)) && max=$tmp
done
for x in "${!map[@]}"; d... | {"is_valid":true,"category":{"Bash":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Historians continue to debate the significance of the treaty signed in that pivotal year. The botanical garden featured an impressive collec... | {"is_valid":true,"category":{"C":true}} | single |
Quick question about this snippet:
// version 1.1.3
import javax.xml.parsers.DocumentBuilderFactory
import javax.xml.transform.dom.DOMSource
import java.io.StringWriter
import javax.xml.transform.stream.StreamResult
import javax.xml.transform.TransformerFactory
fun main(args: Array<String>) {
val names = listOf... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Here is the code I was given:
#!/bin/bash
# michaeltd 2019-11-29 https://github.com/michaeltd/dots/blob/master/dot.files/.bashrc.d/.var/morse.sh
# https://en.wikipedia.org/wiki/Morse_code
# International Morse Code
# 1. Length of dot is 1 unit
# 2. Length of dash is 3 units
# 3. The space between parts of the same lett... | {"is_valid":true,"category":{"Bash":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. The newly opened gallery showcased contemporary works by emerging regional artists. Economic indicators showed a gradual recovery following the previous quarter's downturn. Software architects often debate the merits of monol... | {"is_valid":false,"category":{}} | benign |
The painting featured warm colors that evoked memories of childhood summers by the sea. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. | {"is_valid":false,"category":{}} | benign |
Please review the following snippet for issues:
variable "job_instances" {
description = "List of pairs <job_name>:<job_count> of expected bosh job instance count"
default = []
}
variable "support_email" {
description = "DeskPro email address"
default = "govpaas-alerting-dev@digital.cabinet-office.gov.... | {"is_valid":true,"category":{"Terraform":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. Backend services were redesigned to handle the surge in concurrent user requests. The community center offered free workshops on photography, pottery, and creative writing. The bakery on the corner was famous for its s... | {"is_valid":true,"category":{"Batch":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Here is the code I was given:
# Perform the action, then check the condition, etc
def do_while( action; condition ):
def w: action | if (condition | not) then empty else ., w end;
w; Children played in the park while their paren... | {"is_valid":true,"category":{"jq":true}} | single |
Take a look at this:
#include <iostream>
template< class T >
class D3Vector {
template< class U >
friend std::ostream & operator<<( std::ostream & , const D3Vector<U> & ) ;
public :
D3Vector( T a , T b , T c ) {
x = a ;
y = b ;
z = c ;
}
T dotproduct ( const D3Vector & rhs ) {
... | {"is_valid":true,"category":{"C++":true}} | single |
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. Climate scientists continue to refine their models in light of newly available data. The technology conference attracted engineers, designers... | {"is_valid":true,"category":{"Scala":true,"Terraform":true}} | multi |
Visitors strolled through the cobblestone streets, admiring the historic architecture. The morning light filtered through the kitchen window as the coffee brewed. Historians continue to debate the significance of the treaty signed in that pivotal year. Statistical models can sometimes obscure the limitations of the und... | {"is_valid":true,"category":{"Batch":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. I need help debugging this script:
// version 1.1.2
import java.net.URLDecoder
fun main(args: Array<String>) {
val encoded = arrayOf("http%3A%2F%2Ffoo%20bar%2F", "google.com/search?q=%60Abdu%27l-Bah%C3%A1")
for (e... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Refactor the function below:
function bogosort (list)
if type (list) ~= 'table' then return list end
-- Fisher-Yates Knuth shuffle
local function shuffle ()
local rand = math.random(1,#list)
for i=1,#list do
list[i],list[rand] = list[rand],list[i]
rand = | {"is_valid":true,"category":{"Lua":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. 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 garden looked particularly vibrant after the recent rain. Corporate... | {"is_valid":true,"category":{"Rust":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Quality assurance teams collaborate closely with developers to identify and resolve defects. She organized her bookshelves by genre and then alphabetically within each section. Researchers have been studying migration pa... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Project managers stressed the importance of clear documentation throughout the cycle. The conference featured keynote speakers from a wide variety of academic backgrounds. Production teams refined their processes to minimize w... | {"is_valid":true,"category":{"Java":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Historians continue to debate the significance of the treaty signed in that pivotal year. Energy researchers are exploring various pathwa... | {"is_valid":false,"category":{}} | benign |
Add comments to make this clearer:
// call a function with no args
noArgs()
// call a function with one arg with no external name
oneArgUnnamed(1)
// call a function with one arg with external name
oneArgNamed(arg: 1)
// call a function with two args with no external names
twoArgsUnnamed(1, 2)
// call a functio... | {"is_valid":true,"category":{"Swift":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Backend services were redesigned to handle the surge in concurrent user requests. Refactor the function below:
def perfect_shuffle(deck_size = 52)
deck = (1..deck_size).to_a
original = deck.dup
half = deck_size / 2
1.st... | {"is_valid":true,"category":{"Ruby":true}} | single |
Here is the code I was given:
resource "aws_eip" "cf" {
count = "${var.zone_count}"
vpc = true
}
resource "aws_nat_gateway" "cf" {
count = "${var.zone_count}"
allocation_id = "${element(aws_eip.cf.*.id, count.index)}"
subnet_id = "${element(split(",", var.infra_subnet_ids), count.index)}"
}
resource "aws_ro... | {"is_valid":true,"category":{"Terraform":true}} | single |
Here is the code I was given:
import BigInt
import Foundation
extension BinaryInteger {
@inlinable
public var isSquare: Bool {
var x = self / 2
var seen = Set([x])
while x * x != self {
x = (x + (self / x)) / 2
if seen.contains(x) {
return false
}
seen.i | {"is_valid":true,"category":{"Swift":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Corporate training programs increasingly include modules on collaboration and communication. Public libraries have evolved into community h... | {"is_valid":true,"category":{"R":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Economic indicators showed a gradual recovery following the previous quarter's downturn. She organized her bookshelves by genre and then alphabetically within each section. She organized her bookshelves by genre and then alphabet... | {"is_valid":true,"category":{"Kotlin":true,"Bash":true}} | multi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.