prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
I copied this from the docs:
module "mirror" {
source = "../host"
base_configuration = var.base_configuration
name = "mirror"
use_os_released_updates = var.use_os_released_updates
additional_repos = var.additional_repos
additional_packages = var.additional_packages
swap... | {"is_valid":true,"category":{"Terraform":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 ... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. Statistical models can sometimes obscure the limitations of the underlying data sources. Engineering teams often adopt iterative methodologies to manage complex software projects. Quality assurance teams collaborate cl... | {"is_valid":true,"category":{"Bash":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Astronomers observed a faint signal that appeared to originate from a distant galaxy. I copied this from the docs:
use strict;
use warning... | {"is_valid":true,"category":{"Perl":true}} | single |
Here is the code I was given:
public static void Main()
{
var lookupTable = File.ReadLines("unixdict.txt").ToLookup(line => AnagramKey(line));
var query = from a in lookupTable
orderby a.Key.Length descending
let deranged = FindDeranged(a)
where deranged != null
select | {"is_valid":true,"category":{"C#":true}} | single |
Quick question about this snippet:
# 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... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. Historians continue to debate the significance of the treaty signed in that pivotal year. The newly opened gallery showcased contemporary works by emerging regional artists. The neighborhood gathered every Saturday morning at the smal... | {"is_valid":true,"category":{"Go":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Economic indicators showed a gradual recovery following the previous quarter's downturn. Distributed systems demand careful attention to consistency,... | {"is_valid":true,"category":{"Rust":true}} | single |
I copied this from the docs:
static void Main(string[] args)
{
int p;
p = 1;
Console.WriteLine("Ref Before: " + p);
Value(ref p);
Console.WriteLine("Ref After : " + p);
p = 1;
Console.WriteLine("Val Before: " + p);
Value(p);
Console.WriteLine("Val After : " + p);
Console.ReadLine();
}
private static v... | {"is_valid":true,"category":{"C#":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Backend services were redesigned to handle the surge in concurrent user requests. Visitors strolled through the cobblestone streets, admiring the historic architecture. Local potters fired their kilns once a month, producing colorful... | {"is_valid":true,"category":{"C++":true,"AWK":true}} | multi |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Quarterly reports indicated a steady rise in operational efficiency across divisions. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Network operators continually upgrade infrastructure t... | {"is_valid":true,"category":{"SQL":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Could you explain what this code does:
apiVersion: v1
kind: Service
metadata:
name: svc-lb
namespace: kube-lease
spec:
type: LoadBalancer
There's also this version:
PI = 3.141592653589793
TWO_PI = 6.283185307179586
def no... | {"is_valid":true,"category":{"YAML":true,"Python":true}} | multi |
The committee scheduled a follow-up meeting to discuss the budget allocations. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Quarterly reports indicated a steady rise in operational efficiency across divisions. Researchers have been studying migration patterns of monarch ... | {"is_valid":true,"category":{"C#":true,"Dockerfile":true}} | multi |
The garden looked particularly vibrant after the recent rain. Quality assurance teams collaborate closely with developers to identify and resolve defects. Policy analysts examined the long-term implications of the proposed legislative reform. Public libraries have evolved into community hubs offering far more than just... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. 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. The painting featured warm colors that evoked memories of ch... | {"is_valid":true,"category":{"Go":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Researchers have been studying migration patterns of monarch butterflies for years. Researchers gathered data from hundreds of households participating in the longitudinal study. Hikers were advised to carry plenty of water and to inform som... | {"is_valid":true,"category":{"Python":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. What does this output:
CREATE TABLE gas_station (station_id VARCHAR, LOCATION VARCHAR, manager_name VARCHAR, open_year VARCHAR);
SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year The library hosted... | {"is_valid":true,"category":{"SQL":true}} | single |
Find any security problems in:
#!/usr/bin/env bash
declare -i -a CRC32_LOOKUP_TABLE
__generate_crc_lookup_table() {
local -i -r LSB_CRC32_POLY=0xEDB88320 # The CRC32 polynomal LSB order
local -i index byte lsb
for index in {0..255}; do
((byte = 255 - index))
for _ in {0..7}; do # 8-bit lsb shift
(... | {"is_valid":true,"category":{"Bash":true}} | single |
Here is the code I was given:
package main
import (
"fmt"
"math/big"
)
func main() {
sequence()
bank()
rump()
}
func sequence() {
// exact computations using big.Rat
var v, v1 big.Rat
v1.SetInt64(2)
v.SetInt64(-4)
n := 2
c111 := big.NewRat(111, 1)
c1130 := big.NewRa... | {"is_valid":true,"category":{"Go":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. 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. Database administrators monitor query performan... | {"is_valid":true,"category":{"C#":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Historians continue to debate the significance of the treaty signed in that pivotal year. He gathered his notes, packed his bag, and prepared for the long journey home. The technology conference attracted engineers, designers, and... | {"is_valid":true,"category":{"Scala":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. She organized her bookshelves by genre and then alphabetically within each section. The newly opened gallery showcased contemporary works by emerging regional artists. She organized her bookshelves by genre and then alphabetically within ... | {"is_valid":true,"category":{"Java":true,"R":true}} | multi |
I need help debugging this script:
#include <string>
#include <boost/regex.hpp>
#include <iostream>
std::string csvToHTML( const std::string & ) ;
int main( ) {
std::string text = "Character,Speech\n"
"The multitude,The messiah! Show us the messiah!\n"
"Brians mother,<an | {"is_valid":true,"category":{"C++":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. 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. Engineering teams often adopt iterative methodologies to m... | {"is_valid":true,"category":{"C":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. The painting featured warm colors that evoked memories of childhood summers by the sea. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Add comments to make this clearer:
CREATE TABLE degrees (Id V... | {"is_valid":true,"category":{"SQL":true}} | single |
The classroom hummed with quiet conversation as students worked through practice problems. Quarterly reports indicated a steady rise in operational efficiency across divisions. | {"is_valid":false,"category":{}} | benign |
He walked along the river path, listening to the rustling of leaves overhead. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Energy researchers are exploring various pathways for reducing c... | {"is_valid":false,"category":{}} | benign |
Software architects often debate the merits of monolithic versus microservice designs. What does this output:
# syntax: GAWK -f ALIGN_COLUMNS.AWK ALIGN_COLUMNS.TXT
BEGIN {
colsep = " " # separator between columns
report("raw data")
}
{ printf("%s\n",$0)
arr[NR] = $0
n = split($0,tmp_arr,"$")
for (... | {"is_valid":true,"category":{"AWK":true}} | single |
Run the following:
function convexHull(points) {
points.sort(comparison);
var L = [];
for (var i = 0; i < points.length; i++) {
while (L.length >= 2 && cross(L[L.length - 2], L[L.length - 1], points[i]) <= 0) {
L.pop();
}
L.push(points[i]);
}
var U = [];
for (... | {"is_valid":true,"category":{"JavaScript":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The morning light filtered through the kitchen window as the coffee brewed. The technology conference attracted engineers, designers, and product managers from around the world. She placed the manuscript carefully on the desk ... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. She enjoyed reading historical novels that transported her to far away places. The newly opened gallery showcased contemporary works by emerging regional artists. Find any security problems in:
#include <stdlib.h>
#include <string.h>
... | {"is_valid":true,"category":{"C":true}} | single |
Public libraries have evolved into community hubs offering far more than just printed books. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Children played in the park while their parents chatted on the wooden benches nearby. Engineering teams often adopt iterative methodologies... | {"is_valid":false,"category":{}} | benign |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. 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. Local potters fired their kilns once a m... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. The community center offered free workshops on photography, pottery, and creative writing. Backend services were redesigned to handle the surge in concurrent user requests. Modern microprocessors rely on pipelining and out-of-ord... | {"is_valid":false,"category":{}} | benign |
Database administrators monitor query performance and index utilization across busy schemas. The garden looked particularly vibrant after the recent rain. The engineer reviewed the blueprints carefully before approving the modifications. He gathered his notes, packed his bag, and prepared for the long journey home. She... | {"is_valid":true,"category":{"Bash":true}} | single |
Refactor the function below:
package raster
// Line draws line by Bresenham's algorithm.
func (b *Bitmap) Line(x0, y0, x1, y1 int, p Pixel) {
// implemented straight from WP pseudocode
dx := x1 - x0
if dx < 0 {
dx = -dx
}
dy := y1 - y0
if dy < 0 {
dy = -dy
}
var sx, sy ... | {"is_valid":true,"category":{"Go":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. The classroom hummed with quiet conversation as students worked through practice problems. Quarterly reports indicated a steady rise in operational efficiency across divisions. Travelers explored ancient ruins, marveling at the c... | {"is_valid":true,"category":{"Python":true,"AWK":true}} | multi |
Climate scientists continue to refine their models in light of newly available data. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Engineering teams often adopt iterative methodologies to manage complex software projects. She organized her bookshelves by genre and then alphabetical... | {"is_valid":true,"category":{"Go":true,"Python":true,"PowerShell":true}} | multi |
Project managers stressed the importance of clear documentation throughout the cycle. Please review the following snippet for issues:
CREATE TABLE shop (Open_Date VARCHAR, Open_Year VARCHAR, Shop_Name VARCHAR);
SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = "Apple" Public libraries have evolved into community ... | {"is_valid":true,"category":{"SQL":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Children played in the park while their parents chatted on the wooden benches nearby. Researchers gathered data from hundreds of households participating i... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Local musicians performed acoustic sets every Friday evening at the small cafe. Children played in the park while their parents chatted on... | {"is_valid":true,"category":{"Makefile":true}} | single |
Here is the code I was given:
package main
import (
"container/heap"
"fmt"
"strings"
)
type CubeSum struct {
x, y uint16
value uint64
}
func (c *CubeSum) fixvalue() { c.value = cubes[c.x] + cubes[c.y] }
type CubeSumHeap []*CubeSum
func (h CubeSumHeap) Len() int { return len(h) }
fun | {"is_valid":true,"category":{"Go":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Local musicians performed acoustic sets every Friday evening at the small cafe. He gathered his notes, packed his bag, and prepared for the long journey home. Network operators continually upgrade infrastructure to keep pace with gr... | {"is_valid":true,"category":{"Batch":true,"C#":true}} | multi |
Long-distance running requires a combination of disciplined training and proper nutrition. 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. Farmers depend on accurate weather forecasts to ... | {"is_valid":true,"category":{"YAML":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Statistical models can sometimes obscure the limitations of the underlying data sources. The morning light filtered through the kitchen window as the coffee brewed. Statistical models can sometimes obscure the limitations of the un... | {"is_valid":true,"category":{"Bash":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. Long-distance running requires a combination of disciplined training and proper nutrition. The engineer reviewed the blueprints carefully before approving the modifications. The library hosted a weekly book club focused on clas... | {"is_valid":true,"category":{"R":true}} | single |
Refactor the function below:
#include <chrono>
#include <iostream>
#include <format>
#include <semaphore>
#include <thread>
using namespace std::literals;
void Worker(std::counting_semaphore<>& semaphore, int id)
{
semaphore.acquire();
std::cout << std::format("Thread {} has a semaphore & is now working.\n... | {"is_valid":true,"category":{"C++":true}} | single |
Add comments to make this clearer:
# 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... | {"is_valid":true,"category":{"Dockerfile":true,"C++":true}} | multi |
Software architects often debate the merits of monolithic versus microservice designs. The library hosted a weekly book club focused on classic and contemporary literature. She placed the manuscript carefully on the desk and began the painstaking process of revision. She organized her bookshelves by genre and then alph... | {"is_valid":true,"category":{"Swift":true,"R":true}} | multi |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Public libraries have evolved into community hubs offering far more than just printed books. Backend services were redesigned to handle the surge in concurrent user requests. Policy analysts examined the long-term implications ... | {"is_valid":true,"category":{"Makefile":true,"Python":true,"Dockerfile":true}} | multi |
Researchers have been studying migration patterns of monarch butterflies for years. Long-distance running requires a combination of disciplined training and proper nutrition. The garden looked particularly vibrant after the recent rain. Quarterly reports indicated a steady rise in operational efficiency across division... | {"is_valid":true,"category":{"Makefile":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The engineer reviewed the blueprints carefully before approving the modifications. Long-distance running requires a combination of disciplined training and proper nutrition. Network operators continually upgrade infrastructure to keep pace... | {"is_valid":true,"category":{"Dockerfile":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. Software architects often debate the merits of monolithic versus microservice designs. Energy researchers are exploring various pathways for reducing ca... | {"is_valid":true,"category":{"Makefile":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. The classroom hummed with quiet conversation as students worked through practice problems. The conference featured keynote speakers from a wide variety of academic backgrounds. Energy researchers are exploring various pathways for reducing ca... | {"is_valid":true,"category":{"Bash":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Researchers gathered data from hundreds of households participating in the longitudinal study. She enjoyed reading historical novels that transported her to far away places. Modern microprocessors rely on pipelining and out-of-order... | {"is_valid":true,"category":{"Rust":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Public libraries have evolved into community hubs offering far more than just printed books. Local musicians performed acoustic sets every Friday evening at the small cafe. Volunteers spent the weekend cleaning up the riverside trail and pla... | {"is_valid":true,"category":{"YAML":true}} | single |
I need help debugging this script:
#include <iostream>
#include <iterator>
#include <string>
#include <utility>
#include <vector>
namespace detail {
template <typename ForwardIterator>
class tokenizer
{
ForwardIterator _tbegin, _tend, _end;
public:
tokenizer(ForwardIterator begin, ForwardIterator end)
: _... | {"is_valid":true,"category":{"C++":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Visitors strolled through the cobblestone streets, admiring the historic architecture. | {"is_valid":false,"category":{}} | benign |
The classroom hummed with quiet conversation as students worked through practice problems. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The botanical garden featured an impressive collection ... | {"is_valid":true,"category":{"SQL":true,"Java":true}} | multi |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Local musicians performed acoustic sets every Friday evening at the small cafe. Take a look at this:
variable "project_name" {
default = "raiden_testnet"
}
variable "keypair_name" {
description = "AWS SSH key pair"
... | {"is_valid":true,"category":{"Terraform":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. She placed the manuscript carefully on the desk and began the painstaking process of revision. Travelers explored ancient ruins, marveling at ... | {"is_valid":true,"category":{"Lua":true,"Java":true}} | multi |
What does this output:
// version 1.1.2
class Node<T: Number>(var data: T, var next: Node<T>? = null) {
override fun toString(): String {
val sb = StringBuilder(this.data.toString())
var node = this.next
while (node != null) {
sb.append(" -> ", node.data.toString())
... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Find any security problems in:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace RosettaTicTacToe
{
class Program
{
/*================================================================
*Pieces (players and board)
*=============================== | {"is_valid":true,"category":{"C#":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. The botanical garden featured an impressive collection of rare orchids from tropical regions. Astronomers observed a faint signal that ap... | {"is_valid":true,"category":{"SQL":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. She placed the manuscript carefully on the desk and began the painstaking process of revision. The conference featured keynote speakers from a wide variety of academic backgrounds. She drafted a detailed agenda for the upcoming retrea... | {"is_valid":false,"category":{}} | benign |
Local musicians performed acoustic sets every Friday evening at the small cafe. 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. I need help debugging this script:
apiVersion: "v1"
kind: "PersistentVolume... | {"is_valid":true,"category":{"YAML":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Researchers have been studying migration patterns of monarch butterflies for years. Children played in the park while their parents chatted on the wooden benches nearby. Database administrators monitor query performance and index utilization ... | {"is_valid":true,"category":{"SQL":true}} | single |
I copied this from the docs:
import Foundation
extension Array where Element: Comparable {
@inlinable
public func longestIncreasingSubsequence() -> [Element] {
var startI = [Int](repeating: 0, count: count)
var endI = [Int](repeating: 0, count: count + 1)
var len = 0
for i in 0..<coun | {"is_valid":true,"category":{"Swift":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. I copied this from the docs:
permutation.test <- function(treatment, control) {
perms <- combinations(length(treatment)+length(control),
length(treatment),
c(treatment, control),
... | {"is_valid":true,"category":{"R":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. 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. Translate this into another language for me:
#inclu... | {"is_valid":true,"category":{"C":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. I need help debugging this script:
function Get-BalanceStatus ( $String )
{
$Open = 0
ForEach ( $Character in [char[]]$String )
{
switch ( $Character )
{
"[" { $Open++ }
... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Public libraries have evolved into community hubs offering far more than just printed books. Children played in the park while their parents chatted ... | {"is_valid":true,"category":{"Ruby":true,"Perl":true}} | multi |
Quick question about this snippet:
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
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. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The community center offered free workshops on phot... | {"is_valid":false,"category":{}} | benign |
She placed the manuscript carefully on the desk and began the painstaking process of revision. Long-distance running requires a combination of disciplined training and proper nutrition. Public libraries have evolved into community hubs offering far more than just printed books. Historians continue to debate the signifi... | {"is_valid":true,"category":{"C#":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Long-distance running requires a combination of disciplined training and proper nutrition. She drafted a detailed agenda for the upcom... | {"is_valid":true,"category":{"Rust":true}} | single |
Quick question about this snippet:
use List::Util qw(sum);
sub ishappy {
my $s = shift;
while ($s > 6 && $s != 89) {
$s = sum(map { $_*$_ } split(//,$s));
}
$s == 1;
}
my $n = 0;
print join(" ", map { 1 until ishappy(++$n); $n; } 1..8), "\n"; | {"is_valid":true,"category":{"Perl":true}} | single |
Refactor the function below:
local brd = { "HOL MES RT", "ABCDFGIJKN", "PQUVWXYZ./" }
local dicE, dicD, s1, s2 = {}, {}, 0, 0
function dec( txt )
local i, numb, s, t, c = 1, false
while( i < #txt ) do
c = txt:sub( i, i )
if not numb then
if tonumber( c ) == s1 then
... | {"is_valid":true,"category":{"Lua":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. The committee scheduled a follow-up meeting to discuss the budget allocations. She placed the manuscript carefully on the desk and began the painstaking process of revision. Long-distance running requires a combination of discipl... | {"is_valid":false,"category":{}} | benign |
Project managers stressed the importance of clear documentation throughout the cycle. The newly opened gallery showcased contemporary works by emerging regional artists. What does this output:
# "ported" by Adam Miller <maxamillion@fedoraproject.org> from
# https://github.com/fedora-cloud/Fedora-Dockerfiles
#
# Origi... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
I copied this from the docs:
#include <iostream>
#include <boost/filesystem.hpp>
using namespace boost::filesystem;
int main(int argc, char *argv[])
{
for (int i = 1; i < argc; ++i) {
path p(argv[i]);
if (exists(p) && is_directory(p))
std::cout << "'" << argv[i] << "' is" << (!is_e... | {"is_valid":true,"category":{"C++":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Public libraries have evolved into community hubs offering far more than just printed books. He gathered his notes, packed his bag, and pr... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Translate this into another language for me:
CREATE TABLE employee (emp_fname VARCHAR, emp_jobcode VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR);
SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CL... | {"is_valid":true,"category":{"SQL":true,"Terraform":true,"C++":true}} | multi |
I copied this from the docs:
def p1: "Traceback (most recent call last):";
def p2: "SystemError";
def sep: "----------------";
split("\n\n")[]
| index(p1) as $ix
| select( $ix and index(p2) )
| .[$ix:], sep | {"is_valid":true,"category":{"jq":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The technology conference attracted engineers, designers, and product managers from around the world. Public libraries have evolved into community ... | {"is_valid":true,"category":{"Terraform":true}} | single |
Can you optimize this implementation:
#!/bin/bash
MAX=1000
m[1]=1
for n in `seq 2 $MAX`
do
m[n]=1
for k in `seq 2 $n`
do
m[n]=$((m[n]-m[n/k]))
done
done
echo 'The first 99 Mertens numbers are:'
echo -n ' '
for n in `seq 1 99`
do
printf '%2d ' ${m[n]}
test $((n%10)) -eq 9 && echo | {"is_valid":true,"category":{"Bash":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Historians continue to debate the significance of the treaty signed in that pivotal year. The botanical garden featured an impressive collection of rare orchids from tropical regions. Energy researchers are exploring various pathways for red... | {"is_valid":true,"category":{"Bash":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. Researchers gathered data from hundreds of households participating in the longitudinal study. Hikers were advised to carry plenty of water and to inform someone of their planned route. Local musicians performed acoustic sets eve... | {"is_valid":true,"category":{"AWK":true,"Makefile":true}} | multi |
She enjoyed reading historical novels that transported her to far away places. Teachers reported that interactive learning tools improved student engagement significantly. Take a look at this:
# usage: awk -v list1="i ii iii" -v list2="1 2 3" -f hash2.awk
BEGIN {
if(!list1) list1="one two three"
if(!list2) list2=... | {"is_valid":true,"category":{"AWK":true}} | single |
What does this output:
// Iterative
func gcd(var a: Int, var b: Int) -> Int {
a = abs(a); b = abs(b)
if (b > a) { swap(&a, &b) }
while (b > 0) { (a, b) = (b, a % b) }
return a
}
// Recursive
func gcdr (var a: Int, var b: Int) -> Int {
a = abs(a); b = abs(b)
if (b > a) { swap(&a... | {"is_valid":true,"category":{"Swift":true}} | single |
Add comments to make this clearer:
// version 1.1.2
fun <T : Comparable<T>> isSorted(list: List<T>): Boolean {
val size = list.size
if (size < 2) return true
for (i in 1 until size) {
if (list[i] < list[i - 1]) return false
}
return true
}
fun <T : Comparable<T>> permute(input: List<T>):... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. Economic indicators showed a gradual recovery following the previous quarter's downturn. Network operators continually upgrade infrastructure to keep pace with growing demand. Marketing analysts examined consumer behavior trend... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Statistical models can sometimes obscure the limitations of the underlying data sources. Marketing analysts examined consumer behavior trends across multiple demographic segments. Distributed systems demand careful attention to... | {"is_valid":true,"category":{"Ruby":true,"Scala":true}} | multi |
I copied this from the docs:
// version 1.1.2
import java.math.BigDecimal
import java.math.MathContext
val mc = MathContext(256)
fun gcd(a: Long, b: Long): Long = if (b == 0L) a else gcd(b, a % b)
class Frac : Comparable<Frac> {
val num: Long
val denom: Long
companion object {
val ZERO = F... | {"is_valid":true,"category":{"Kotlin":true,"C#":true}} | multi |
Translate this into another language for me:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can o... | {"is_valid":true,"category":{"Makefile":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. 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. Long-distance running requires a combination of disciplined trainin... | {"is_valid":false,"category":{}} | benign |
Researchers gathered data from hundreds of households participating in the longitudinal study. 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. Visitors strolled through the cobblestone streets,... | {"is_valid":true,"category":{"Python":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Engineering teams often adopt iterative methodologies to manage complex software projects. The classroom hummed with quiet conversation as student... | {"is_valid":true,"category":{"YAML":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Climate scientists continue to refine their models in light of newly available data. Astronomers observed a faint signal that appeared to originate from a distant galaxy. She drafted a detailed agenda for the upcoming retreat and c... | {"is_valid":false,"category":{}} | benign |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. 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. The painting featured warm colors that evoked memori... | {"is_valid":true,"category":{"R":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.