source stringclasses 6
values | conversations listlengths 2 2 |
|---|---|
glaive | [
{
"from": "human",
"value": "You are working on a project that involves managing files and directories in a CMake-based build system. You need to write a CMake script that removes a specific set of files and directories. The files and directories to be removed are:\n- \"CMakeFiles/hydrophone_streamer_pkg__r... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a simple Rust program to manage a library of books. The program should allow users to add new books, remove existing books, and display the list of all books in the library. To achieve this, you need to define a `Book` struct with fields for `title`,... |
glaive | [
{
"from": "human",
"value": "How can I create a web application with a REST API that performs basic CRUD operations using a SQL database?"
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to create a web application with a REST API that does basic CRUD operations using a SQL database. Let me ... |
codefeedback | [
{
"from": "human",
"value": "Create a function to return all the indices in a string where a given substring occurs, but the substring can overlap with itself. Additionally, the function should handle cases where the substring contains special characters or symbols. For example, given the string \"a@b$a%b^a... |
dolphin | [
{
"from": "human",
"value": "Please write the following solution using Groovy:\nAlice and Bob continue their games with piles of stones. There are several stones **arranged in a row**, and each stone has an associated value which is an integer given in the array `stoneValue`.\n\nAlice and Bob take turns, wi... |
evolcodegolf | [
{
"from": "human",
"value": "A Fibonacci Number is defined as an integer that is derived from the summation of its two preceding integers within the Fibonacci sequence. In a similar yet distinct manner, a Fibonacci Digit™ is an integer formed by the addition of the two preceding digits in a modified digit s... |
codefeedback | [
{
"from": "human",
"value": "Given two string parameters, s1 and s2, construct a function that returns the longest common subsequence between the two strings.\ns1 = \"Hello there!\"\ns2 = \"Hi there!\""
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to find the longest common subsequence (... |
sharegpt | [
{
"from": "human",
"value": "Your task is to scrutinize and modify as necessary, the function displayed below, focusing on its erroneous operations. This function has been crafted with the goal of obtaining the discounted price of an item. Make sure to take consideration and retain the primary purpose of th... |
sharegpt | [
{
"from": "human",
"value": "Engineer a computational subroutine that is capable of processing intricate syntactic composition, particularly an ordinary declarative sentence, as its parameter, and deconstruct it into an assiduously organized continuum of language constituents, often referred to as words.\n'... |
evolcodegolf | [
{
"from": "human",
"value": "Leonardo of Pisa, more popularly recognized as Fibonacci, lived approximately between 1175 and 1245. His name, derived from the Latin phrase \"filius Bonacci\" (meaning \"the son of Bonacci\"), was coined in the 18th century, as noted in various sources like Wikipedia. \n\nIn th... |
sharegpt | [
{
"from": "human",
"value": "Employ ridge regression methodology for feature isolation, utilizing the diabetes dataset furnished by the scikit-learn Python library."
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to tackle this problem where I have to use ridge regression for feature isolat... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a backup management system using Bash scripting. The system should handle the creation and retention of backups for a given set of files or directories. The backup retention policy should allow for the configuration of how many backups to retain ... |
evolcodegolf | [
{
"from": "human",
"value": "For the purposes of this question, a meandering curve is defined as one that progresses generally from left to right while executing n+1 turns at 90 degrees to the left, followed by n+1 turns to the right (where n>0). Notably, the meander itself will consist of n segments. These... |
evolcodegolf | [
{
"from": "human",
"value": "You hail from the whimsical realm of Fizzlepuff, a place known for its eccentric inhabitants and their dreams of mastering the art of competitive bubble-blowing. As the lone contestant representing your nation at the International Bubble Championship, the pressure is palpable. Y... |
evolcodegolf | [
{
"from": "human",
"value": "This intriguing challenge draws inspiration from a recent tweet regarding combinatorial optimization within geometric arrangements. \n\nConceptual Framework\nEnvision a circular configuration featuring n equidistant vertices along its boundary, with each vertex assigned a distin... |
dolphin | [
{
"from": "human",
"value": "Please focus on the algorithm of this problem and provide code in python:\nA **stepping number** is an integer such that all of its adjacent digits have an absolute difference of exactly `1`.\n\n* For example, `321` is a **stepping number** while `421` is not.\n\nGiven two int... |
glaive | [
{
"from": "human",
"value": "You are tasked with implementing a method in Smalltalk that processes a given array of strings and generates a report based on specific criteria. The method should take in an array of strings representing log lines and should extract relevant information to generate a report. Th... |
glaive | [
{
"from": "human",
"value": "How can I check if a given binary tree is balanced?"
},
{
"from": "gpt",
"value": "<think>\nOkay, so I need to figure out how to check if a binary tree is balanced. Hmm, let's start by recalling what a balanced tree is. From what I remember, a balanced binary tree is... |
glaive | [
{
"from": "human",
"value": "I'm trying to implement a Dockerfile to contain both my go binary and also chromedp. I manage to build the image and I can run the image and the go binary runs as expected, all but chromedp. I'm encountering the following error message: \"Error exec: 'google-chrome': executable ... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a function that validates and sanitizes the props of a custom link component in a React application. The custom link component accepts various props, including `external` and `rel`. The `external` prop indicates whether the link is an external li... |
glaive | [
{
"from": "human",
"value": "You are tasked with implementing a solution to address a security vulnerability in a Node.js package called \"tunnel-agent\". The vulnerability involves memory exposure and can be exploited by using a specific code snippet. The vulnerable code snippet is as follows:\n\n```js\nre... |
sharegpt | [
{
"from": "human",
"value": "According to the x86 assembly code snippet provided, the value `temp` is calculated as `AX / SRC`. If `temp` is greater than `FFH`, a divide error exception is raised. Otherwise, `AL` is assigned the value of `temp` and `AH` is assigned the remainder of the division operation. H... |
codefeedback | [
{
"from": "human",
"value": "You are tasked with implementing a custom type checking decorator in Python. The decorator should enforce type checking for the arguments and return value of a function based on specified type annotations. You are required to create a `typed` decorator that can be used to annota... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a Python function to parse and manipulate kernel version strings. The function should be able to extract and return the kernel version string and, optionally, split the version into its individual components.\n\nYou are provided with a code snipp... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a Perl module that handles the response for deleting a configuration set event destination in Amazon Simple Email Service (SES). The module should have a method that accepts the request ID and returns the response object.\n\nYour task is to write a P... |
glaive | [
{
"from": "human",
"value": "Can you provide a program that converts a given string to camelCase format in Python?"
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to write a Python program that converts a given string to camelCase. Let me think about what camelCase means. So camelCase is wh... |
glaive | [
{
"from": "human",
"value": "What is the solution to create a chart that displays the number of jobs in different states in the USA?"
},
{
"from": "gpt",
"value": "<think>\nOkay, the user wants to create a chart showing the number of jobs in different US states. Let me figure out how to approach... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a program to process a list of tags and their counts. Each tag is represented as a string, and its count is a non-negative integer. Your program should take the list of tags and counts as input and output the tags along with their counts in a spe... |
glaive | [
{
"from": "human",
"value": "I have the following pieces of code written in JavaScript and PHP. Can you help me identify and rectify any syntax, logical, or runtime errors in them?\n\nJavaScript:\n```js\nasync function addNumbers(a, b, c) {\n setTimeout(() => {\n return a + b + c\n }, 100)\n}\n```\n\nP... |
evolcodegolf | [
{
"from": "human",
"value": "This task is a code golf challenge, building upon a previously discussed problem in a forum. The objective is to receive a string of exactly 10 characters that signifies a base 36 numeral system and increment its value by one, returning the updated string. The valid characters i... |
evolcodegolf | [
{
"from": "human",
"value": "Design a method that takes a sequence of non-negative integers and a specified limit, producing a collection of overlapping-element-clusters (subarrays) such that each cluster has a sum that exceeds the given limit. The solution must also satisfy two further constraints:\n\n1. A... |
glaive | [
{
"from": "human",
"value": "Is there a way to obtain the width of the terminal in Go programming language?\n\nI attempted to use the termbox-go library from http://github.com/nsf/termbox-go with the following code snippet:\n\n```go\npackage main\n\nimport (\n \"fmt\"\n \"github.com/nsf/termbox-go\"\n... |
codefeedback | [
{
"from": "human",
"value": "Develop a C++ program to implement a selection sort algorithm. Additionally, your program should be able to handle exceptions such as invalid inputs and out-of-range errors. The program should also include a function to reverse the sorted array. Finally, write a separate functio... |
codefeedback | [
{
"from": "human",
"value": "Craft the succeeding coding instructions capable of taking an iterable list as input; maintaining the odd-indexed elements in its initial state, conducting an orderly arrangement for even-indexed components, and retaining their spot in the sequence. Moreover, be mindful that the... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a program to validate passwords based on a given policy. The input consists of a list of passwords and their corresponding policies. Each policy indicates the minimum and maximum occurrences of a specific character within the password. Your task is t... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a simple game using the Pygame library in Python. Your game will involve a player-controlled character navigating through a maze to reach a goal while avoiding obstacles. To start, you need to set up the game window, create the player character, desi... |
evolcodegolf | [
{
"from": "human",
"value": "Many individuals are likely familiar with the ASCII character set, correct? I trust that's the case. For as long as I can remember, I have relied on my go-to ASCII table reference website whenever I've required one. In this task, we will engage in some intriguing source code man... |
glaive | [
{
"from": "human",
"value": "I am working on a CUDA code where I often require utility functions to be called from both the device and host code. I declare these functions as __host__ __device__. However, I encounter an issue when the utility function is templated i.e., by a functor type. In such a scenario... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a Python program that utilizes the Streamlit library to build a web application for image processing. The program should allow users to upload an image, apply a specified image processing technique, and display the processed image on the web interfac... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating an Enemy AI component in Unity using C#. The AI should have the ability to:\n- Move towards the player when in range\n- Detect the player within its field of view\n- Attack the player when in range\n- Patrol between specified targets\n- Take damage a... |
evolcodegolf | [
{
"from": "human",
"value": "Consider the intricate sequence identified as A054261. The \\$n\\$th prime containment number is defined as the smallest integer that encompasses all of the first \\$n\\$ prime numbers as its substrings. For example, the integer \\$235\\$ qualifies as the lowest value that conta... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a Python function that generates temporary AWS credentials using the Security Token Service (STS) and the boto3 library. The function should take in an IAM role ARN, and return a dictionary containing the temporary access key, secret key, and session... |
magicoder | [
{
"from": "human",
"value": "You are working on a deep learning project and need to implement a neural network architecture using PyTorch. Your task is to create a class that defines the architecture for a specific type of neural network. The provided code snippet is a part of the class definition and shows... |
codefeedback | [
{
"from": "human",
"value": "You are tasked with creating a script to automate the setup of a development environment for a project. The script should perform several tasks, including installing necessary tools and fixing permissions. Your goal is to write a Bash script that accomplishes these tasks based o... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a function to compare two elements, `el1` and `el2`, and determine if they are equal. The elements can be of any data type, including strings, numbers, lists, tuples, sets, or dictionaries. However, the comparison should consider the following ru... |
evolcodegolf | [
{
"from": "human",
"value": "As programmers, we often find our skills showcased in rather straightforward ways, but today we aim to elevate that experience! In this engaging challenge, you will explore the intricacies of lexing and flexing hexaflexagons, a fascinating geometrical concept.\n\nAbout\nTo famil... |
evolcodegolf | [
{
"from": "human",
"value": "Consider \\$3\\$ binary strings of length \\$n\\$ chosen independently and uniformly at random. We are interested in computing the exact expected minimum Hamming distance between any pair, while ensuring that the output is simplified to its lowest terms. The Hamming distance bet... |
evolcodegolf | [
{
"from": "human",
"value": "Challenge:\nGiven a positive number \\$n\\$, derive a sequence where each term represents the decimal equivalent of binary numbers formed by shifting a single leading 1 across positions in the binary representation of \\$n\\$ and appending additional 1s in every subsequent term.... |
glaive | [
{
"from": "human",
"value": "You are tasked with implementing a Micronaut controller that communicates with a beacon service to query for genotype existence. The controller should be able to handle different scenarios such as verifying the existence of a genotype, checking for the non-existence of a genotyp... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a custom iterable class in Python. The class should allow iteration over its internal data and return both the value and the index of each element when iterated over. Additionally, the class should raise an IndexError if an attempt is made to acc... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a Python class that provides various string manipulation and mathematical operations. The class should have methods for extracting numbers from a string, extracting and converting float numbers, performing mathematical operations, converting curr... |
codefeedback | [
{
"from": "human",
"value": "What is the output of the following code?\n\ndef foo(n):\n for i in range(n):\n for j in range(n):\n print(i, j)\n\nfoo(3)\n\n#Answer options\na) Prints nothing\nb) Prints \"0 0, 0 1, 0 2, 1 0, 1 1, 1 2, 2 0, 2 1, 2 2\"\nc) Prints \"0 0, 0 1, 0 2, 1 0, 1 1, ... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a custom data structure in C# that extends the functionality of a generic list. The custom data structure, named `ApiTransactionalDataList`, should inherit from the `List<ApiTransactionalData>` class. Additionally, you need to add a method to the... |
dolphin | [
{
"from": "human",
"value": "port this code to Mojo:\n```cpp\n#include <unordered_map>\n#include <vector>\nusing namespace std;\n\nvector<int> distinctNumbersInSubarrays(vector<int>& nums, int k) {\n unordered_map<int, int> counts;\n vector<int> ans;\n for (int i = 0; i < nums.size(); i++) {\n ... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a program that simulates the flipping of a coin or the rolling of a die. You need to create a function that takes an optional parameter to determine the number of times the coin is flipped or the die is rolled. If the parameter is not provided, the f... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a bash script that will modify the PATH environment variable. The script should add the directories \"fake_bin\" and \"fake_msim/bin\" to the beginning of the PATH, and then execute the \"run_test.sh\" script. Your bash script should achieve this wit... |
glaive | [
{
"from": "human",
"value": "How can I create a Java web application to check the daily weather?"
},
{
"from": "gpt",
"value": "<think>\nOkay, the user wants to create a Java web application to check the daily weather. Let me break down how to approach this. First, I need to figure out the overa... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a Python function that retrieves a specific attribute from a given model object. The model object is obtained by calling the `get_model()` function, and it is guaranteed to have the attribute you need to retrieve. Your task is to complete the fun... |
evolcodegolf | [
{
"from": "human",
"value": "The following exercise draws from a lecture by Prof. Devadas at MIT titled \"You can read minds,\" with additional clarification provided in a linked video and supporting document. This fascinating trick, originating in the 1930s and referred to as the \"Five-Card Trick of Fitch... |
codefeedback | [
{
"from": "human",
"value": "You are tasked with designing a Python class that manages contract event loggers for Ethereum smart contracts. The class should handle the retrieval of new entries from logs for transfer and approval events. You are provided with a code snippet that initializes an empty list cal... |
codefeedback | [
{
"from": "human",
"value": "You are tasked with creating a program that manages a simple task list using Python. The program should allow users to add tasks, mark tasks as completed, view all tasks, and save the task list to a file using serialization. To achieve this, you need to implement a Task class wi... |
sharegpt | [
{
"from": "human",
"value": "I have a list in Python, which contains multiple dictionaries. Each dictionary has keys 'points' and 'gold' with their respective values. For instance, my list looks like this:\n\n```python\nexample_list = [\n {'points': 400, 'gold': 2480},\n {'points': 100, 'gold': 610},\... |
codefeedback | [
{
"from": "human",
"value": "Given the code below, where both static and dynamic dispatch is used:\n\n```cpp\n#include <iostream>\n\nclass Base {\npublic:\n void show() { std::cout << \"Base\\n\"; }\n};\n\nclass Derived : public Base {\npublic:\n void show() { std::cout << \"Derived\\n\"; }\n};\n\nint... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a plugin in the Fable framework that implements the IReplacePlugin interface. The plugin should have a method called TryReplace that takes two parameters: a compiler object of type ICompiler and an ApplyInfo object. The method should return a Fable.E... |
evolcodegolf | [
{
"from": "human",
"value": "The ASCII characters ranging from decimal code 33 to 126 are represented as follows:\n!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\n\nIt is important to note that in the majority of fonts, there exists a subset of 25 characters... |
codefeedback | [
{
"from": "human",
"value": "What are some efficient algorithms in Python for finding the intersection between two sets of geographic coordinates within a given radius?"
},
{
"from": "gpt",
"value": "<think>\nOkay, so I need to figure out efficient algorithms in Python for finding the intersecti... |
codefeedback | [
{
"from": "human",
"value": "You are working on a neuroimaging data analysis pipeline using the AFNI software suite. As part of the pipeline, you need to write a script to apply cluster results to each output file and then perform the same operation on NIfTI files with a liberal threshold.\n\nYou have a cod... |
sharegpt | [
{
"from": "human",
"value": "I have a list of numbers and I want to sort them in ascending order. How can I write a Python program to achieve this?"
},
{
"from": "gpt",
"value": "<think>\nOkay, so I need to write a Python program to sort a list of numbers in ascending order. Hmm, let's see. Firs... |
sharegpt | [
{
"from": "human",
"value": "Can you provide a React component that renders a drop-down list with all the US states?"
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to create a React component that displays a dropdown list of all US states. Let me start by figuring out the structure. First,... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a file upload feature for a web application using PHP. Your goal is to implement a method that processes the uploaded file and saves it to the server. The web application uses the CodeIgniter framework, and you need to write the method within a contr... |
glaive | [
{
"from": "human",
"value": "What are some classification models that can be used to classify whether a news article is real or fake?"
},
{
"from": "gpt",
"value": "<think>\nOkay, so I need to figure out classification models that can determine if a news article is real or fake. Let me start by ... |
magicoder | [
{
"from": "human",
"value": "You are given a code snippet that tests a function `part2` with different inputs and expected outputs. Your task is to implement the `part2` function based on the given inputs and expected outputs.\n\nThe `part2` function takes an `Input` object as input and returns an integer. ... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a Java class that handles the validation of HTTP responses using RestAssured library. Your task is to implement a method that takes a ResponseSpecification and returns a Function that can be used to validate a Response object.\n\nYour method should b... |
codefeedback | [
{
"from": "human",
"value": "Create a function in Python that takes as arguments two strings and returns a boolean indicating whether both strings are equal or not. The function should perform a case-sensitive comparison and consider whitespace characters. The strings must also not exceed a length of 100 ch... |
sharegpt | [
{
"from": "human",
"value": "Is there a way to obtain the optimized assembly output from GCC and Clang after link-time whole-program optimizations have been enabled? I have tried using the `-S` flag during the link step, but it didn't work as expected. I want to see the final compiler-generated optimized as... |
dolphin | [
{
"from": "human",
"value": "Please write the following solution using TypeScript:\nGiven the `head` of a singly linked list that is sorted in **non-decreasing** order using the **absolute values** of its nodes, return _the list sorted in **non-decreasing** order using the **actual values** of its nodes_.\n... |
magicoder | [
{
"from": "human",
"value": "You are given an array of integers `arr`. Your task is to write a function `lis_dp(arr)` to find the length of the longest increasing subsequence (LIS) in the given array using dynamic programming.\n\nA subsequence of an array is a sequence that can be derived from the array by ... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a simple error handling system for a UCS-2 encoding library in Rust. The provided code snippet includes the beginning of the error handling system, and your task is to extend it with additional error types and a function to handle errors.\n\nYour... |
evolcodegolf | [
{
"from": "human",
"value": "Craft a function or program that requires no input parameters and outputs or returns the string\n\nHello, Earth!\n\naccompanied by an optional newline at the end. However, there’s a distinctive constraint: the total length of your program must consist of an even number of charac... |
evolcodegolf | [
{
"from": "human",
"value": "This challenge serves as a reward for NinjaBearMonkey, who triumphed in my Block Building Bot Flocks! challenge with their impressive Black Knight submission. Congratulations to NinjaBearMonkey for this achievement!\n\nThe task at hand is straightforward yet allows for a variety... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a custom data structure in Java that represents a collection of retention times for chemical compounds. The retention time is a crucial parameter in chromatography and is typically represented as a numerical value. Your data structure should supp... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a Python class that manages optimization algorithms for a variety of mathematical optimization problems. The class should allow users to register new optimization algorithms and retrieve them by name. Additionally, the class should provide a meth... |
evolcodegolf | [
{
"from": "human",
"value": "In the year 1988, during the International Mathematical Olympiad (IMO), the final question presented was as follows:\n\nConsider two positive integers \\$a\\$ and \\$b\\$ such that the expression \\$ab + 1\\$ is a divisor of \\$a^2 + b^2\\$. Your task is to demonstrate that \\$\... |
glaive | [
{
"from": "human",
"value": "I am trying to create a new topic form for a forum application using Elm language. I have a model that includes a form with fields for title and content, as well as a loading indicator. I also have a validation function that ensures the title and content have a minimum length of... |
glaive | [
{
"from": "human",
"value": "You are tasked with implementing a CUDA kernel function that performs zeroization on a given input array based on a label data array. The goal is to set the elements of the input array to zero if the corresponding element in the label data array matches a specified mask value. T... |
evolcodegolf | [
{
"from": "human",
"value": "Explore the concept of rotational transformations in a hexagonal structure by engaging in the following challenge: Given a regular hexagon represented as a string and an integer n, determine the resultant configuration of the hexagon after executing a series of rotational moveme... |
codefeedback | [
{
"from": "human",
"value": "You are tasked with creating a simple logging utility for a multi-threaded application. The utility should allow different log levels to be set for different modules, and it should format log messages with timestamps. Your task is to implement the `Logger` struct and associated ... |
sharegpt | [
{
"from": "human",
"value": "How can I call \"printf\" directly in C without including stdio.h? I found an interesting tutorial on how to achieve this using assembly language. Here is my attempt:\n\n```c\nint main(){\n char ss[] = \"hello\";\n\n asm (\n \"pushl %ebp ;\"\n \"movl %esp, %e... |
glaive | [
{
"from": "human",
"value": "I am trying to delete a specific URL reservation in the HTTP namespace using the netsh command in Windows. However, I am encountering some issues and I'm not sure how to properly use the command. Can someone provide a step-by-step solution to delete the URL reservation for a spe... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a subroutine in Fortran that reads file names for a discrete particle model. The subroutine should take in several input arguments including the number of files, the name of the input file, an array of file names, and other parameters. The subroutine... |
glaive | [
{
"from": "human",
"value": ": \nYou are working with the Julia programming language and need to create a function that takes a DataFrame as input and converts it into a LaTeX table. The function should have the flexibility to output the table in different LaTeX environments, such as \"array\" or \"table\",... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a script to automate the process of uploading files to Dropbox using a custom uploader script. The script should create a specific subfolder in Dropbox and then upload files to that subfolder. You are given a code snippet that partially demonstrates ... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a Python function to interact with the Rundeck API for executing commands on specific nodes within a project. The function should take in the necessary parameters and make an HTTP POST request to the Rundeck server to execute the specified command on... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a script that sets up a project directory and compiles the necessary libraries and modules for simulation. The script should check for dependencies, compile libraries, and start the simulation if all modules have compiled successfully. Additionally, ... |
dolphin | [
{
"from": "human",
"value": "convert this code to TypeScript:\n```R\nevaluate <- function(expression) {\n calculate <- function(s, start, end, variables) {\n if (substr(s, start, start) == \"(\") {\n if (substr(s, start + 1, start + 4) == \"add\") {\n first <- start + 5\n second <- fi... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a Python class that extends a given StackBuilder class to create and manage AWS IAM (Identity and Access Management) resources using CloudFormation. The IAMBuilder class is responsible for constructing and updating IAM-related CloudFormation stac... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a function to parse a given set of native struct definitions and extract specific information from them. Each native struct definition is represented by the `NativeStruct` struct, which contains two fields:\n1. `expected_nominal_resource`: a bool... |
evolcodegolf | [
{
"from": "human",
"value": "The parameters concerning the continuous knapsack problem are outlined below. For each item indexed from 1 to n, we are presented with a corresponding positive weight and profit. Additionally, a positive capacity is specified, representing the maximum weight that can be carried.... |
codefeedback | [
{
"from": "human",
"value": "Create a visual dashboard in JavaScript that will display the top 5 most used words in a given array of sentences."
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to create a visual dashboard in JavaScript that shows the top 5 most used words from an array of se... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a simple message processing system using Kafka consumer in Python. Your goal is to create a program that consumes messages from a Kafka topic and prints them, ensuring that each message is printed only once and any new messages are printed as the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.