prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
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. Find any security problems in:
constraints = [
->(st) { st.size == 12 },
->(st) { st.last(6).count(true) == 3 },
->(st) { st.each_slice(2).map(&:las... | {"is_valid":true,"category":{"Ruby":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Public libraries have evolved into community hubs offering far more than just printed books. Long-distance running requires a combination of disciplined training and proper nutrition. Travelers explored ancient ruins, marveling at the ... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. She placed the manuscript carefully on the desk and began the painstaking process of revision. She enjoyed reading historical novels that t... | {"is_valid":true,"category":{"Perl":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. The garden looked particularly vibrant after the recent rain. She enjoyed reading historical novels that transported her to far away places. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Marke... | {"is_valid":false,"category":{}} | benign |
Teachers reported that interactive learning tools improved student engagement significantly. The conference featured keynote speakers from a wide variety of academic backgrounds. The morning light filtered through the kitchen window as the coffee brewed. Project managers stressed the importance of clear documentation t... | {"is_valid":false,"category":{}} | benign |
I copied this from the docs:
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 StringBuilder | {"is_valid":true,"category":{"Java":true}} | single |
Can you optimize this implementation:
terraform {
backend "azurerm" {
storage_account_name = "__terraformstorageaccount__"
container_name = "__terraformcontainer__"
key = "terraform.tfstate"
access_key = "__storagekey__"
}
}
provider "azurerm" {
}
resource "azur... | {"is_valid":true,"category":{"Terraform":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. The painting featured warm colors that evoked memories of childhood summers by the sea. Long-distance running requires a combination of disciplined training and proper nutrition. Researchers have been studying migration patterns of mona... | {"is_valid":true,"category":{"Java":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. 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. Marketing analysts examined consumer behavior trends acro... | {"is_valid":true,"category":{"Swift":true}} | single |
Climate scientists continue to refine their models in light of newly available data. 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. Production teams refined their processes to minimize waste and i... | {"is_valid":true,"category":{"C":true}} | single |
Translate this into another language for me:
#!/usr/bin/perl
use strict; # https://rosettacode.org/wiki/Long_literals,_with_continuations
use warnings;
my $longliteral = join ' ', split ' ', <<END;
hydrogen helium lithium beryllium boron carbon nitrogen oxygen fluorine
neon sodium magnesium aluminum silicon phospho... | {"is_valid":true,"category":{"Perl":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Can you optimize this implementation:
function haversine() {
var radians = Array.prototype.map.call(arguments, function(deg) { return deg/180.0 * Math.PI; });
var lat1 = radians[0], lon1 = radians[1], lat2 = radia... | {"is_valid":true,"category":{"JavaScript":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Climate scientists continue to refine their models in light of newly available data. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Marketing analysts examined consumer behavior trends across multiple... | {"is_valid":true,"category":{"Bash":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Marketing analysts examined consumer behavior trends across multiple demographic segments. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. He sat by the window with a steaming mug of tea ... | {"is_valid":true,"category":{"SQL":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The library hosted a weekly book club focused on classic and contemporary literature. Climate models suggest that ocean temperatures will co... | {"is_valid":true,"category":{"Go":true}} | single |
Find any security problems in:
namespace Vlq
{
using System;
using System.Collections.Generic;
using System.Linq;
public static class VarLenQuantity
{
public static ulong ToVlq(ulong integer)
{
var array = new byte[8];
var buffer = ToVlqCollection(integer)
.SkipWhile(b => b == 0)... | {"is_valid":true,"category":{"C#":true}} | single |
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. Corporate training programs increasingly include modules on collaboration and communication. Volunteers spent the weekend cleaning up the riverside trail and planting... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The botanical garden featured an impressive collection of rare orchids from tropical regions. He wandered through the old bookstore, occasionally pu... | {"is_valid":true,"category":{"Ruby":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Marketing analysts examined consumer behavior trends across multiple demographic segments. The garden looked particularly vibrant after the recent rain. The botanical garden featured an impressive collection of rare orchids fr... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Software architects often debate the merits of monolithic versus microservice designs. I copied this from the docs:
use strict;
use warnings;
sub sleeping_beauty {
my($trials) = @_;
my($gotheadsonwaking,$wakenings);
$wakenings+... | {"is_valid":true,"category":{"Perl":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. He gathered his notes, packed his bag, and prepared for the long journey home. Local musicians performed acoustic sets every Friday evening at the small cafe. The garden looked particularly vibrant after the recent rain. Astronomer... | {"is_valid":true,"category":{"C":true,"PowerShell":true}} | multi |
Engineering teams often adopt iterative methodologies to manage complex software projects. 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. Volunteers spent the weekend cleaning up the riverside trai... | {"is_valid":true,"category":{"Bash":true}} | single |
Climate scientists continue to refine their models in light of newly available data. 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. Distributed systems demand careful attention to consistency, av... | {"is_valid":false,"category":{}} | benign |
Project managers stressed the importance of clear documentation throughout the cycle. The committee scheduled a follow-up meeting to discuss the budget allocations. Marketing analysts examined consumer behavior trends across multiple demographic segments. The morning light filtered through the kitchen window as the cof... | {"is_valid":true,"category":{"Go":true}} | single |
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. The morning light filtered through the kitchen window as the coffee brewed. Climate models suggest that ocean temperatures will continue to ri... | {"is_valid":true,"category":{"Bash":true,"PowerShell":true}} | multi |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. 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. Children played in the park while their parents ... | {"is_valid":true,"category":{"Scala":true,"jq":true,"Kotlin":true}} | multi |
Run the following:
CFLAGS = -fPIC -g -Wall -Werror -D_GNU_SOURCE
SRCS =
CXX_SRCS = src/Posix.cpp
ifeq ($(SUPPORT_GLIB),yes)
CXX_SRCS += src/Glib.cpp
endif
CPPFLAGS += -I$(SRCDIR)/toolbox/include
CPPFLAGS += -I$(CURDIR)/../heap/include
CPPFLAGS += -I$(CURDIR)/../probe/include
ifeq ($(SUPPORT_GLIB | {"is_valid":true,"category":{"Makefile":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. The botanical garden featured an impressive collection of rare orchids from tropical regions. Hikers were advised to carry plenty of water and to inform someone of their planned route. The technology conference attracted engineers, de... | {"is_valid":true,"category":{"Swift":true}} | single |
Please review the following snippet for issues:
library(RDCOMClient)
send.mail <- function(to, title, body) {
olMailItem <- 0
ol <- COMCreate("Outlook.Application")
msg <- ol$CreateItem(olMailItem)
msg[["To"]] <- to
msg[["Subject"]] <- title
msg[["Body"]] <- body
msg$Send()
ol$Quit()
}
send.mail("so... | {"is_valid":true,"category":{"R":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Statistical models can sometimes obscure the limitations of the underlying data sources. Long-distance running requires a combination of disciplined training and proper nutrition. Run the following:
object sets {
val set1 = Set(1,2,3... | {"is_valid":true,"category":{"Scala":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Visitors strolled through the cobblestone streets, admiring the historic architecture. Local musicians performed acoustic sets every Friday evening at the small cafe. Production teams refined their processes to minimize waste and improve ... | {"is_valid":true,"category":{"Batch":true}} | single |
Find any security problems in:
variable "gcloud_credentials" {
default = ".gcp/tf-dns-editor.json"
}
variable "gcloud_project" {
default = "henrik-jonsson"
}
variable "gcloud_region" {
default = "europe-west1"
}
variable "hkjnweb_ip" {
default = "163.172.173.208"
}
variable "mon_ip" {
default = " | {"is_valid":true,"category":{"Terraform":true}} | single |
Can you optimize this implementation:
#include <algorithm>
#include <iostream>
/* AVL node */
template <class T>
class AVLnode {
public:
T key;
int balance;
AVLnode *left, *right, *parent;
AVLnode(T k, AVLnode *p) : key(k), balance(0), parent(p),
left(NULL), right(NULL) {}
... | {"is_valid":true,"category":{"C":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. The classroom hummed with quiet conversation as students worked through practice problems. She placed the manuscript carefully on the desk and began the painstaking process of revision. Teachers reported that interactive learning tool... | {"is_valid":false,"category":{}} | benign |
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. I copied this from the docs:
CREATE TABLE product (pages_per_minute_color INTEGER);
SELECT AVG(pages_per_minute_color) FROM product Climate scient... | {"is_valid":true,"category":{"SQL":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Local potters fired their kilns once a month, produc... | {"is_valid":false,"category":{}} | benign |
Database administrators monitor query performance and index utilization across busy schemas. Translate this into another language for me:
FROM steeve/cross-compiler:base
MAINTAINER Steeve Morin "steeve.morin@gmail.com"
ENV CROSS_TRIPLE x86_64-linux-gnu
ENV CROSS_ROOT /usr/${CROSS_TRIPLE}
ENV PATH ${PATH}:${CROSS_ROOT}... | {"is_valid":true,"category":{"Dockerfile":true,"Go":true}} | multi |
She organized her bookshelves by genre and then alphabetically within each section. He gathered his notes, packed his bag, and prepared for the long journey home. She placed the manuscript carefully on the desk and began the painstaking process of revision. Volunteers spent the weekend cleaning up the riverside trail a... | {"is_valid":true,"category":{"SQL":true}} | single |
Add comments to make this clearer:
local primes = {3, 5}
local cutOff = 200
local bigUn = 100000
local chunks = 50
local little = math.floor(bigUn / chunks)
local tn = " cuban prime"
print(string.format("The first %d%ss", cutOff, tn))
local showEach = true
local c = 0
local u = 0
local v = 1
for i=1,10000000000000 do
... | {"is_valid":true,"category":{"Lua":true,"Kotlin":true,"PowerShell":true}} | multi |
What does this output:
sub R {
my ($n, $p) = @_;
my $r = join '',
map { rand() < $p ? 1 : 0 } 1 .. $n;
0+ $r =~ s/1+//g;
}
use constant t => 100;
printf "t= %d\n", t;
for my $p (qw(.1 .3 .5 .7 .9)) {
printf "p= %f, K(p)= %f\n", $p, $p*(1-$p);
for my $n (qw(10 100 1000)) {
my $r; $r... | {"is_valid":true,"category":{"Perl":true,"Java":true}} | multi |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Network operators continually upgrade infrastructure to keep pace with growing demand. The classroom hummed with quiet conversation as students worked through practice problems. Hikers were advised to carry plenty of water and... | {"is_valid":true,"category":{"Batch":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. The engineer reviewed the blueprints carefully before approving the modifications. The painting featured warm colors that evoked memories of childhood summers by the sea. He wandered through the old bookstore, occasionally pulling a w... | {"is_valid":true,"category":{"Bash":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Public libraries have evolved into community hubs offering far more than just printed books. Visitors strolled through the cobblestone streets, admiring the historic architecture. Production teams refined their processes to minimize ... | {"is_valid":true,"category":{"JavaScript":true,"C#":true}} | multi |
What does this output:
/*
* RosettaCode: Substring, C89
*
* In this task display a substring: starting from n characters in and of m
* length; starting from n characters in, up to the end of the string; whole
* string minus last character; starting from a known character within the
* string and of m length; start... | {"is_valid":true,"category":{"C":true}} | single |
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. Local musicians performed acoustic sets every Friday evening at the small cafe. Farmers depend on accurate weather forecasts to plan ... | {"is_valid":true,"category":{"Kotlin":true,"Ruby":true}} | multi |
Find any security problems in:
[xml]$xml = @'
<Students>
<Student Name="April" Gender="F" DateOfBirth="1989-01-02" />
<Student Name="Bob" Gender="M" DateOfBirth="1990-03-04" />
<Student Name="Chad" Gender="M" DateOfBirth="1991-05-06" />
<Student Name="Dave" Gender="M" DateOfBirth="1992-07-08">
<Pet Type=... | {"is_valid":true,"category":{"PowerShell":true,"Java":true,"AWK":true}} | multi |
Translate this into another language for me:
#include <stdio.h>
unsigned chowla(const unsigned n) {
unsigned sum = 0;
for (unsigned i = 2, j; i * i <= n; i ++) if (n % i == 0) sum += i + (i == (j = n / i) ? 0 : j);
return sum;
}
int main(int argc, char const *argv[]) {
unsigned a;
for (unsigned n = 1; n <... | {"is_valid":true,"category":{"C":true,"Terraform":true}} | multi |
Add comments to make this clearer:
### BASE_IMAGE #################################################################
BASE_IMAGE_NAME ?= debian
BASE_IMAGE_TAG ?= $(BASE_IMAGE_OS_VERSION)-slim
BASE_IMAGE_OS_NAME ?= Debian
BASE_IMAGE_OS_URL ?= https://debian.org
### BUILD ##############################################... | {"is_valid":true,"category":{"Makefile":true,"Terraform":true,"YAML":true}} | multi |
Marketing analysts examined consumer behavior trends across multiple demographic segments. 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 engineer reviewed the blueprints carefully bef... | {"is_valid":true,"category":{"C#":true}} | single |
Take a look at this:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/instance: flux-system
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 0.27.3
name: crd-controller-flux-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Clust... | {"is_valid":true,"category":{"YAML":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Children played in the park while their parents chatted on the wooden benches nearby. Astronomers observed a faint signal that appeared to originat... | {"is_valid":true,"category":{"Java":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Project managers stressed the importance of clear documentation throughout the cycle. Quick question about this snippet:
local socket = require "socket"
local headers = "HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\nContent-... | {"is_valid":true,"category":{"Lua":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Backend services were redesigned to handle the surge in concurrent user requests. She enjoyed reading historical novels that transported her to far away places. Historians continue to debate the significance of the treaty signed in that piv... | {"is_valid":true,"category":{"Bash":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Project managers stressed the importance of clear documentation throughout the cycle. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Nutritionists generally recommend a balanced diet ric... | {"is_valid":true,"category":{"Perl":true}} | single |
Climate scientists continue to refine their models in light of newly available data. Historians continue to debate the significance of the treaty signed in that pivotal year. The painting featured warm colors that evoked memories of childhood summers by the sea. The community center offered free workshops on photograph... | {"is_valid":true,"category":{"Ruby":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. What does this output:
import re
txt = """
Hi there, how are you today? I'd like to present to you the washing machine 9001.
You have been nominated to win one of these! Just make sure you don't break it"""
def haspunctotype(s... | {"is_valid":true,"category":{"Python":true}} | single |
Climate scientists continue to refine their models in light of newly available data. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. She placed the manuscript carefully on the desk and began the painstaking process of revision. Local potters fired their kilns once a month, producing... | {"is_valid":true,"category":{"Lua":true,"SQL":true,"Ruby":true}} | multi |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Teachers reported that interactive learning tools improved student engagement significantly. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Researchers have been studying migra... | {"is_valid":true,"category":{"C#":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Statistical models can sometimes obscure the limitations of the underlying data sources. Teachers reported that interactive learning tools i... | {"is_valid":true,"category":{"Terraform":true,"Rust":true}} | multi |
The engineer reviewed the blueprints carefully before approving the modifications. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The painting featured warm colors that evoked memories ... | {"is_valid":false,"category":{}} | benign |
He gathered his notes, packed his bag, and prepared for the long journey home. Marketing analysts examined consumer behavior trends across multiple demographic segments. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The engineer reviewed the blueprints carefully before ap... | {"is_valid":true,"category":{"Makefile":true,"PowerShell":true}} | multi |
Translate this into another language for me:
import java.io.*;
import java.util.*;
public class JaroWinkler {
public static void main(String[] args) {
try {
List<String> words = loadDictionary("linuxwords.txt");
String[] strings = {
"accomodate", "definately", "gove... | {"is_valid":true,"category":{"Java":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. She organized her bookshelves by genre and then alphabetically within each section. Quick question about this snippet:
function median (numlist)
if type(numlist) ~= 'table' then return numlist end
table.sort(numlist)
if #n... | {"is_valid":true,"category":{"Lua":true}} | single |
Add comments to make this clearer:
// version 1.1.2
fun isPrime(n: Int) : Boolean {
if (n < 2) return false
if (n % 2 == 0) return n == 2
if (n % 3 == 0) return n == 3
var d = 5
while (d * d <= n) {
if (n % d == 0) return false
d += 2
if (n % d == 0) return false
d ... | {"is_valid":true,"category":{"Kotlin":true,"Batch":true}} | multi |
The newly opened gallery showcased contemporary works by emerging regional artists. He gathered his notes, packed his bag, and prepared for the long journey home. I need help debugging this script:
let nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print(nums.reduce(0, +))
print(nums.reduce(1, *))
print(nums.reduce("", { $0 ... | {"is_valid":true,"category":{"Swift":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Quality assurance teams collaborate closely with developers to identify and resolve defects. Visitors strolled through the cobblestone streets, ... | {"is_valid":true,"category":{"C":true,"Dockerfile":true}} | multi |
What does this output:
_ALLMODULES = $(sort $(USEMODULE) $(USEPKG))
# Define MODULE_MODULE_NAME preprocessor macros for all modules.
# Note: Some modules may be using the 'IS_USED' macro, defined in
# kernel_defines.h, please refer to its documentation if you change the way
# module macros are defined.
ED = $(addprefi... | {"is_valid":true,"category":{"Makefile":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. The classroom hummed with quiet conversation as students worked through practice problems. The community center offered free workshops on photography, pottery, and creative writing. She enjoyed reading historical novels that transpo... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Historians continue to debate the significance of the treaty signed in that pivotal year. Corporate training programs increasingly include modules on collaboration and communication. She placed the manuscript carefully on the desk and began... | {"is_valid":true,"category":{"Java":true,"C#":true}} | multi |
Local musicians performed acoustic sets every Friday evening at the small cafe. 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. He wandered through the old bookstore, occasionally pulling a worn... | {"is_valid":true,"category":{"Batch":true}} | single |
I copied this from the docs:
import Foundation
func generateRandomNumArray(numDigits: Int = 4) -> [Int] {
guard numDigits > 0 else {
return []
}
let needed = min(9, numDigits)
var nums = Set<Int>()
repeat {
nums.insert(.random(in: 1...9))
} while nums.count != needed
return Arr | {"is_valid":true,"category":{"Swift":true}} | single |
Public libraries have evolved into community hubs offering far more than just printed books. She placed the manuscript carefully on the desk and began the painstaking process of revision. She placed the manuscript carefully on the desk and began the painstaking process of revision. Climate models suggest that ocean tem... | {"is_valid":true,"category":{"Perl":true,"Rust":true}} | multi |
Please review the following snippet for issues:
class ZhangSuen
NEIGHBOUR8 = [[-1,0],[-1,1],[0,1],[1,1],[1,0],[1,-1],[0,-1],[-1,-1]] # 8 neighbors
CIRCULARS = NEIGHBOUR8 + [NEIGHBOUR8.first] # P2, ... P9, P2
def initialize(str, black="#")
s1 = str.each_line.map{|line| line.chomp.each_ch... | {"is_valid":true,"category":{"Ruby":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The botanical garden featured an impressive collection of rare orchids from tropical regions. Quarterly reports indicated a steady rise in operational efficienc... | {"is_valid":true,"category":{"PowerShell":true,"Makefile":true}} | multi |
I copied this from the docs:
#!/bin/bash
is_leap_year () # Define function named is_leap_year
{
declare -i year=$1 # declare integer variable "year" and set it to function parm 1
echo -n "$year ($2)-> " # print the year passed in, but do not go to the next line
if (( $year % 4 == 0 )) # if year not divida... | {"is_valid":true,"category":{"Bash":true}} | single |
Here is the code I was given:
data "aws_ecs_cluster" "cluster" {
cluster_name = "${var.cluster_name}"
}
module "service" {
source = "git::https://github.com/wellcometrust/terraform.git//ecs/modules/service/prebuilt/sqs_scaling?ref=scale-down-on-messages-deleted"
service_name = "${var.service_name}"
task... | {"is_valid":true,"category":{"Terraform":true}} | single |
Please review the following snippet for issues:
// ------------------------------------- Cross-browser Compatibility -------------------------------------
/* Compatibility code to reduce an array
* Source: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/Reduce
*/
if (!Array.prototype.redu... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. 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. He adjusted the telescope and waited patiently for th... | {"is_valid":true,"category":{"Batch":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. The newly opened gallery showcased contemporary works by emerging regional artists. Project managers stressed the importance of clear documentation throughout the cycle. The newly opened gallery showcased contemporary works by emerging r... | {"is_valid":true,"category":{"Scala":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Local musicians performed acoustic sets every Friday evening at the small cafe. She enjoyed reading historical novels that transported her to far away places. The engineer reviewed the blueprints carefully before approving the ... | {"is_valid":true,"category":{"Java":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. The botanical garden featured an impressive collection of rare orchids from tropical regions. Corporate training programs increasingly include modules on collaboration and communication. The conference featured keynote speake... | {"is_valid":true,"category":{"Python":true,"Makefile":true}} | multi |
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. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The chef prepared a simple meal of roasted vegetables, fresh bread, a... | {"is_valid":false,"category":{}} | benign |
Researchers gathered data from hundreds of households participating in the longitudinal study. Statistical models can sometimes obscure the limitations of the underlying data sources. The newly opened gallery showcased contemporary works by emerging regional artists. Production teams refined their processes to minimize... | {"is_valid":true,"category":{"jq":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The committee scheduled a follow-up meeting to discuss the budget allocations. Production teams refined their processes to minimize waste and i... | {"is_valid":true,"category":{"Perl":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. She enjoyed reading historical novels that transported her to far away places. The committee scheduled a follow-up meeting to discuss the budget allocations. He adjusted the telescope and waited patiently for the clouds to cle... | {"is_valid":true,"category":{"Makefile":true}} | single |
Here is the code I was given:
#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() - begin_; ... | {"is_valid":true,"category":{"C++":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Climate scientists continue to refine their models in light of newly available data. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. He gathered his notes, packed his bag, and prepa... | {"is_valid":true,"category":{"Bash":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Find any security problems in:
function Test-LuhnNumber
{
<#
.SYNOPSIS
Tests validity of credit card numbers.
.DESCRIPTION
Tests validity of credit card numbers using the Luhn test.
.PARAMETER Number
... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. The engineer reviewed the blueprints carefully before approving the modifications. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The newly opened gallery showcased contemporary works by emerging r... | {"is_valid":true,"category":{"Makefile":true}} | single |
Could you explain what this code does:
import java.util.stream.Stream;
public class ReduceTask {
public static void main(String[] args) {
System.out.println(Stream.of(1, 2, 3, 4, 5).mapToInt(i -> i).sum());
System.out.println(Stream.of(1, 2, 3, 4, 5).reduce(1, (a, b) -> a * b));
}
} | {"is_valid":true,"category":{"Java":true}} | single |
I copied this from the docs:
variable "subscription_id" {}
variable "client_id" {}
variable "client_secret" {}
variable "tenant_id" {}
variable "prefix" {}
variable "location" {
type = "string"
default = "East US"
}
# Port used for Puppet agents to connect to a Puppet master
variable "puppet_mast | {"is_valid":true,"category":{"Terraform":true}} | single |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. He walked along the river path, listening to the rustling of leaves overhead. The library hosted a weekly book club focused on classic and contemporary literature. Public libraries have evolved into community hubs offering far ... | {"is_valid":false,"category":{}} | benign |
The conference featured keynote speakers from a wide variety of academic backgrounds. The painting featured warm colors that evoked memories of childhood summers by the sea. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The library hosted a weekly book club focused on classic and cont... | {"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. Travelers explored ancient ruins, marveling at the... | {"is_valid":false,"category":{}} | benign |
The newly opened gallery showcased contemporary works by emerging regional artists. Hikers were advised to carry plenty of water and to inform someone of their planned route. Network operators continually upgrade infrastructure to keep pace with growing demand. Quarterly reports indicated a steady rise in operational e... | {"is_valid":true,"category":{"SQL":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. Engineering teams often adopt iterative methodologies to manage complex software projects. Researchers gathered data from hundreds of households participating in the longitudinal study. Late spring rains caused the lake to sw... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. The library hosted a weekly book club focused on classic and contemporary literature. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Visitors strolled through the cobblestone streets, a... | {"is_valid":true,"category":{"Lua":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Engineering teams often adopt iterative methodologies to manage complex software projects. Hikers were advised to carry plenty of water and to inform someone of their planned route. The painting featured warm colors that evoke... | {"is_valid":true,"category":{"C":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. Quick question about this snippet:
#
# This terraform plan defines the resources necessary to host accounts.jenkins.io files
#
resource "azurerm_resource_group" "accountapp" {
name = "${var.prefix}accountapp"
location... | {"is_valid":true,"category":{"Terraform":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Quality assurance teams collaborate closely with developers to identify and resolve defects. Backend services were redesigned to handle the surge... | {"is_valid":true,"category":{"Swift":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.