instruction_seed stringlengths 29 40.5k | source stringclasses 6
values |
|---|---|
I'm trying to exclude the spark and test dependencies from my final assembly jar, but using the "provider" option doesn't seem to be working. Here's the code I've tried:
```
libraryDependencies ++= Seq("org.apache.spark" % "spark-core_2.11" % "2.0.1" % "provided")
```
I execute `sbt assembly`, but the dependencies ar... | glaive |
You have been tasked with creating a webpage header with a background that includes stars, twinkling effects, and moving clouds. The header should have a dark background color and a centered h2 element with white text. The stars should be a repeating background image, the twinkling effect should be achieved with a seco... | glaive |
You are tasked with creating a program to define a class for cluster auto-scaling policy arguments in the Pulumi AWS Native EMR module. The class should have the following properties:
- Constraints: A required input of type ClusterScalingConstraintsArgs
- Rules: A required input list of type ClusterScalingRuleArgs
Cre... | glaive |
How can I merge two linked lists in Rust? | glaive |
You are tasked with creating a shared buffer in OCaml using the `Io_page` module and sharing it with a specified domain ID using the `Os_xen.Xen.Export` and `Os_xen.Xs` modules. The shared buffer should be created with a given size, and the timestamp function should be used to populate the buffer with monotonic time va... | glaive |
You are tasked with creating a program that will generate a main options file for a game. The main options file should include various settings and configurations for the game, such as game speed, use of 3D textures, colors, and template images and icons. The program needs to ensure that the main options file is in the... | glaive |
How can I write a Ruby program to encode a string? | glaive |
I need to create a program that can store information about a medical professional, including their name, date of birth, parents' names, occupation, and date of death. The program should also be able to display this information in a formatted way when requested.
Can someone provide a Python solution for this problem? | glaive |
You are tasked with creating a function that makes a POST request to the Musiio API to search for a specific track using a provided API key and track ID. The function should take in the search text, page number, and number of items per page as parameters and return the response data from the API.
The function signatur... | glaive |
```
If I don't have the `dashboard_pane_counter` variable defined, how can I prevent this code from throwing an exception and make it evaluate to false instead?
``` | glaive |
You are tasked with creating a web page for retail sales. The page should include a form for searching, displaying a list of retail sales, and a dialog for entering retail sales details. The form should have fields for selecting a warehouse, entering a document number, and selecting a date range for the document. There... | glaive |
You are tasked with creating a Makefile to build, tag, test, and manage Docker images for a specific project. The Makefile should have targets to build Docker images, check the size of the images, tag the images, start Elasticsearch, test malware, test Elasticsearch, test Markdown, test the web service, and stop contai... | glaive |
How can I write a Python program that removes duplicates from a given list of numbers while ensuring the order of elements is preserved? | glaive |
How can I generate a random list of integers in Python, where each integer ranges from 0 to 10, and the list size is 10? | glaive |
You are tasked with creating a program to handle the data structure for a Phenopacket, which is used to describe phenotypic findings observed in an individual with potential genes of interest and/or diagnoses. The program should include the following elements:
- id: An arbitrary identifier specific to the phenopacket
... | glaive |
You are tasked with creating a web page using XSLT (Extensible Stylesheet Language Transformations) to transform XML data into HTML. The XML data represents an API reference for a cloud computing platform, and you need to display the request parameters and response tags in a well-structured HTML format. The request par... | glaive |
I am performing linear regression with multiple variables/features and trying to get the theta (coefficients) using the normal equation method, numpy's least-squares numpy.linalg.lstsq tool, and numpy's np.linalg.solve tool. I've applied regularization to account for the potential issue of matrix non-invertibility. How... | glaive |
I am trying to create a VRML_SIM R2021b utf8 file using the Thymio2SecondaryIndexedFaceSet PROTO, but I am having trouble with the IndexedFaceSet section. I need to define the coord and coordIndex fields correctly to represent the points and faces of the 3D object. Can someone provide a solution to properly define the ... | glaive |
You are tasked with creating a shader program in GLSL (OpenGL Shading Language) version 330 that takes in a color and a texture, and outputs the resulting color after applying the texture to it.
The input to the shader program includes:
- vec4 vColor: the color input
- vec2 UV: the UV coordinates for the texture sampl... | glaive |
I want to create a web page that displays product images in a specific format. I need to style the product images to have a width of 150px and a height of 100px, with the image covering the entire space without distortion. Additionally, I want to style the selection choices with a specific background color. Can someone... | glaive |
How can I enhance my existing JavaScript program to filter and select data from an array based on the given input? | glaive |
You are tasked with implementing a function that resolves DNS queries and handles potential errors. The function should take into account the possibility of encountering various types of errors, such as name errors and empty records. The goal is to return the appropriate response and status code based on the type of er... | glaive |
You are tasked with setting up a CMake build system for a project. The project requires the following configurations and settings to be applied:
1. Set the C++ standard to 11 and the C standard to 99.
2. Export the compile_commands.json file.
3. Install only what is explicitly specified and set the CMAKE_POSITION_INDE... | glaive |
I'm investigating a way to port a micro-service from Ruby to Rust. My framework of choice is Actix (but anyone else would work without issues). Now, I'm trying to understand how to create a POST method that receives two JSON inputs. These two JSON inputs have completely different structures, and each structure may cont... | glaive |
You are tasked with implementing a maximum likelihood estimation (MLE) for data generated by a classical linear regression model (CLRM) with normality. The goal is to write a program that generates random data, performs MLE, and outputs the true parameters, MLE estimates, and ordinary least squares (OLS) estimates. | glaive |
I am working on a project that involves managing different modules for particle systems in a game. I need to create a GMScript that will serve as a module for emitting particles. The script should have the ability to be compatible with other modules and should not be dependent on any other module. It should also have a... | glaive |
You are tasked with creating a function that takes a hexadecimal string representing a contract address and returns the Abstract Syntax Tree (AST) node for that contract. The function should be able to parse the hexadecimal string and generate the AST node based on the contract address provided.
Write a function named... | glaive |
You have been tasked with creating a function in Haskell that generates documentation from various input files and outputs them in different formats. The function should take in a file path and a list of output files, and then process each output file in parallel. Each output file consists of a source (either a file or... | glaive |
You are tasked with creating a program to calculate and visualize the probability of a quantum state. The program should include a function to calculate the probability amplitude and another function to compute the probability based on the amplitude. The program should then find the maximum probability and plot a 3D gr... | glaive |
You are tasked with implementing a function that checks if two elements of a module are equivalent modulo a submodule. The function should return true if the elements are equivalent and false otherwise. You are required to define the function and ensure it satisfies the following properties:
- Reflexivity: an element i... | glaive |
You are tasked with developing a program to manage the application process for a Collaborative Lesson Development Training pilot. The program should allow users to apply for the training by filling out a form and should display information about the training, including its trainers, topics, target audience, format, and... | glaive |
You are tasked with creating an autotuning policy for a copy operation in CUDA. The policy needs to be specialized based on the problem size genre, architecture genre, and pointer size genre. The autotuning policy should classify a given CUDA architecture into an architecture-family genre, classify the pointer type int... | glaive |
You are tasked with creating a signed adder function in VHDL. The function should take two input parameters, a1 and b1, which are both std_logic_vector, and return the sum of these two input vectors as a std_logic_vector. The function should be able to handle both positive and negative numbers. The function should foll... | glaive |
I am using Python and Plotly to generate an interactive HTML report. If I produce the plot using Plotly online and insert the URL into the HTML file, it works but refreshing the charts takes a long time. I am wondering if there is a way to produce the chart offline and have it embedded in the HTML report, to improve lo... | glaive |
You are tasked with creating an install script for a specific directory in a project. The script should set the install prefix, install configuration name, component getting installed, shared libraries permissions, check for crosscompiling, default install directory permissions, and include the install script for each ... | glaive |
You are tasked with creating a CMake file that sets the include file search paths for a specific target. The target includes various directories containing header files necessary for compilation. Your task is to create a CMakeLists.txt file that sets the include file search paths for the target. | glaive |
How can I create a Node.js program that generates random numbers within a specified range? | glaive |
You are tasked with creating a ScalaJS project with the following dependencies:
1. "com.olvind" %%% "scalablytyped-runtime" % "2.4.0"
2. "me.shadaj" %%% "slinky-web" % "0.6.6"
3. "org.scalablytyped.slinky" %%% "std" % "4.1-233b27"
Additionally, you need to set the scalaVersion to "2.13.3", enable the ScalaJSPlugin, an... | glaive |
You are tasked with implementing a warp-level GEMM (General Matrix Multiply) using the CUDA programming language and the CUTLASS library. Your objective is to create a program that performs matrix multiplication using the Volta Tensor Core on an NVIDIA GPU.
The specific problem involves implementing a warp-level GEMM ... | glaive |
Can you give an example of how to design a class in Java that represents employee details? | glaive |
You are tasked with creating a class that represents an 'image built' event in a container execution model. The class should provide a human-readable representation of itself when converted to a string.
Write a class called ImageBuiltEvent that takes a Container and a DockerImage as parameters in its constructor. The ... | glaive |
You need to write a shell script that decrypts encrypted certificates using openssl. The script should create a folder called "certs" if it doesn't exist, decrypt the encrypted .enc files, and output the decrypted files into the "certs" folder. The script should use the openssl aes-256-cbc command to decrypt the files ... | glaive |
You are tasked with implementing the solution for the Advent of Code - Day 2 challenge. The challenge consists of two parts, each requiring a separate solution. Part One requires you to write a function `part1` that takes no parameters and returns an integer. Part Two requires you to write a function `part2` that also ... | glaive |
You are tasked with creating a Fixed Deposit Product using the FixedDepositProductApi. The mandatory fields for creating a Fixed Deposit Product include name, shortName, description, currencyCode, digitsAfterDecimal, inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearTyp... | glaive |
Why does my CUDA code execute much faster in the NVIDIA Visual Profiler compared to the command line? The same piece of code that takes over a minute to run on the command line completes within seconds in the NVIDIA Visual Profiler. I've noticed that the calculated output on both the command line and Visual Profiler is... | glaive |
You are tasked with creating a C++ ROS package called "tf_broadcast" that will broadcast a transform between two coordinate frames. The package should have a version "0.1.0" and be maintained by "gld <guolindong@gmail.com>". The package should be built and executed with dependencies on "roscpp", "rospy", "std_msgs", "r... | glaive |
You are tasked with creating a module for a software application that will allow users to customize various settings and categories. Each setting item can have specific data types, values, UI types, and conditions for activation. Additionally, settings can be platform-specific and have various flags such as devModeOnly... | glaive |
You are tasked with writing a PowerShell script to validate the structure of an HTML file using Pester. The script should read the content of an HTML file and verify that it contains an opening and a closing html tag with a header, body, and footer.
Your task is to write a PowerShell script that reads the content of a... | glaive |
You are tasked with implementing a function `f` in Scheme that takes a non-negative integer `num` as input and returns the result of the following recursive equation:
f(num) = num if num < 3
f(num) = f(num - 1) + 2 * f(num - 2) + 3 * f(num - 3) if num >= 3
Your task is to implement the function `f` using an iterative ... | glaive |
You are tasked with creating a LaTeX document using the IEEEtran class for a conference submission. Your document should include a bibliography with the IEEEtran style, and it should also have specific formatting and packages included. Additionally, you need to define new commands for special characters and create a co... | glaive |
I am trying to automate the process of downloading and moving JAR files from a remote Maven repository to a local directory using a bash script. However, I am encountering some issues and would like to seek help in resolving them. Can someone please guide me on how to achieve this automation process using the given cod... | glaive |
I am trying to create a Dart extension for handling mouse events in my web application. I want to define an extension that provides methods for constructing and accessing properties of a MouseEvent object. The extension should include methods for getting the screenX, screenY, clientX, clientY, ctrlKey, shiftKey, altKey... | glaive |
I am trying to write a bash script that will wait until a specific URL is reachable before continuing with further execution. I want to check the status code of the URL and continue waiting until I receive a successful response (status code 200). If the URL is not reachable, I want to retry after a certain interval. Ca... | glaive |
I am trying to create a module in a hardware description language (HDL) that contains three registers (rg1, rg2, rg3) and four rules (set_r3, set_r1, set_r2, done). The rules are expected to schedule in the order they are elaborated, and the 'done' rule should only execute when the reset signal is not asserted. Can you... | glaive |
You are tasked with creating an XSLT transformation for a form builder export schema. The transformation should take the input XML file and generate a new XML file with specific attributes and elements based on the input data.
The input XML file contains form-related metadata, header instructions, module details, and ... | glaive |
I am trying to use the mvstexturing library in my C++ project, but I am having trouble with the configuration. I want to check if the mvstexturing library is found and set a flag based on its availability. Can someone provide a solution to properly configure and check for the mvstexturing library in a CMake project? | glaive |
You are tasked with creating an image upload form in Tcl that attaches an image to an object_id passed in. If no object_id is provided, the current package_id should be used. Additionally, the form should only be displayed if the user has write permission. The form should allow the user to choose an existing image or u... | glaive |
You are tasked with contributing a new feature to the Nilearn project, which focuses on developing open and powerful statistical analysis of brain volumes. Your task is to create a new fetcher for a dataset in the `nilearn.datasets` package. The goal is to provide functions to download neuroimaging datasets required to... | glaive |
You are working with a dataset that includes regression weights and RDMs (representational dissimilarity matrices) for two waves of sessions (Proactive and Baseline). Your task is to calculate group-level statistics and contrasts between the two waves. The dataset includes information on different brain regions (ROIs),... | glaive |
You are working on a C++ project and need to set up the dependencies, preprocessor definitions, include file search paths, and linked info files for your target. You also need to define the Fortran module output directory. Write the code to accomplish these tasks using the given CMAKE variables. | glaive |
You are tasked with creating a module in Rust that will handle complex numbers. The module should include functions for adding, subtracting, multiplying, and dividing complex numbers. Additionally, it should have a function to calculate the absolute value of a complex number.
Create a struct for complex numbers with t... | glaive |
I am trying to write a function in R that takes in several file paths and a threshold value, and outputs a table of hits based on some filtering criteria. The function should read in two tab-delimited files, filter them based on a given e-value threshold, and then find hits that are present in both files. The hits shou... | glaive |
I am trying to create a public chat application using Java and I want to specify the maximum heap size to be 1GB. I have a PublicChat.jar file and I need to run it on port 8080. Can someone guide me on how to achieve this using the java command? | glaive |
You are tasked with creating a Java class that represents the result of starting a project version in a computer vision application. The class should have a method to set the current running status of the model, a method to get the current running status of the model, and a method to return a string representation of t... | glaive |
I am trying to create a testing suite for an Angular service called HeaderFooterService. However, when I run the test, it fails with the error "Cannot read property 'configureTestingModule' of undefined". I have already imported 'inject' and 'TestBed' from '@angular/core/testing', and I have also imported the HeaderFoo... | glaive |
:
You are tasked with creating a file browser component in a React application using the Chonky library. The file browser should display a list of documents and directories, allowing users to navigate through the directory structure and open documents.
You need to implement the following features:
1. Display the root ... | glaive |
You are tasked with implementing a function that will take a string and a size as input and return a "puffed out" string. The "puffed out" string should be the original string followed by null characters (\u{0}) to fill the remaining space up to the specified size. For example, if the original string is "hello" and the... | glaive |
How can I modify the code to output a float in Python instead of an integer? | glaive |
You are tasked with creating a login form using Laravel framework. The form should include input fields for email and password, along with a checkbox for "Remember Me" and a "Login" button. Additionally, the form should have a link for "Forgot Your Password?" if the route supports it. Your task is to write the code for... | glaive |
I am working on a project that involves encoding and decoding data using a specific algorithm. I need to implement a function that takes a string as input and encodes it using a custom encryption method. The output should be a string of encrypted data. Can someone provide a solution for this in Python? | glaive |
You are tasked with implementing a simulation model called ClaDS2 with delayed parameters. The program should include necessary libraries and define specific data types and constants. The model involves setting parameters for a tree simulation and running a subsampling process. Your task is to write the complete progra... | glaive |
You are working with the Zig programming language and need to implement a function that loads and processes a module from a given set of expressions. The module is represented by the IR (Intermediate Representation) structure and consists of various components such as function types, functions, data, memory, and export... | glaive |
You are tasked with implementing a benchmark for floating point operations using Fourier transforms in Haskell. The benchmark should include functions to calculate the Fourier transform of a given input, as well as to perform other related operations such as distance calculations and wave generation. The benchmark shou... | glaive |
You are tasked with creating a synchronized variable in a multithreaded environment using the given framework in Isabelle. Your goal is to implement the `Synchronized` structure to create a synchronized variable with the following operations:
1. Create a synchronized variable: `var name x` - This function should creat... | glaive |
You are required to implement a quaternion class in CUDA for use in GPU programming. A quaternion is a complex number with a real part and three imaginary parts. It is often used for representing rotations in 3D space and is also used in computer graphics and computer vision.
Your task is to create a CUDA-compatible q... | glaive |
You are tasked with creating a CMake install script for a specific directory. The script needs to set the install prefix, install configuration name, and the component getting installed. Additionally, the script needs to install shared libraries without execute permission, determine if the installation is the result of... | glaive |
You are tasked with implementing the interface and module for the 'P1 Core' for the DARPA SSITH project using Bluespec System Verilog (BSV).
The P1 Core contains the following components:
- Piccolo CPU, including Near_Mem (ICache and DCache), Near_Mem_IO (Timer, Software-interrupt, and other mem-mapped-locations), Ext... | glaive |
You are tasked with creating a CMakeLists.txt file for a new software project called "Zorba XQuery Processor". This file should define the packaging options for the project, including component names, descriptions, install types, and version numbers. Your task is to create the CMakeLists.txt file with the appropriate s... | glaive |
I am trying to implement a program that processes messages to count the number of zeros in them. I have a GPU and CPU implementation, and I need to write the code for the GPU implementation. The program should use CUDA and C++ to count the number of zeros in each message and then output the total number of zeros in all... | glaive |
You are tasked with implementing a CUDA kernel to compute the color gradient for a given registration estimation and correspondence set. The kernel should compute the pointwise color gradient for each correspondence in the set.
The input to the kernel includes a `RegistrationCudaDevice` object representing the registr... | glaive |
What is the code to generate a random forest model from an example dataset using the sklearn library? | glaive |
You are developing a Julia package for XPA configuration methods and miscellaneous methods. You need to implement the `getconfig` and `setconfig!` methods to retrieve and set the values associated with configuration parameters.
Implement the `getconfig` method to retrieve the value associated with configuration parame... | glaive |
You are working on a project where you need to implement a function to colorize strings that represent colors in Emacs Lisp. The function should fontify the string like "#aabbcc" or "blue" with the respective color.
Write a function called `colorize-string` that takes a string as an argument and fontifies it with the ... | glaive |
You are tasked with creating a bash function that adds a new directory to be tested. The function should take a single argument, which is the full path to a directory containing scripts of functions that need to be tested. If the directory does not exist, an error message should be displayed. Otherwise, the directory s... | glaive |
You are tasked with writing a function that compares two matrices by computing the absolute difference between their elements and then returning the sum of the absolute differences. Both matrices are assumed to have only a single column.
Your function should take the following parameters:
- `info`: Matrix information ... | glaive |
You are tasked with creating a shader program that applies a specific type of texture filtering called non-uniform texture taps to an input texture. The non-uniform texture taps are defined by an array of vec2 values, and the filtering operation involves sampling the input texture at specific offsets based on these tap... | glaive |
I need to securely send data from my iPhone application to my webserver and vice versa. I'm planning to use an encryption algorithm that requires a key known by both the server and the user for decryption. However, I'm concerned about the safety of placing the encryption methods and the "secret" key in the source code ... | glaive |
You are tasked with implementing a function to determine if a given point lies on the surface of a 3D structure. The structure is defined by a set of vertices and faces. The function should take the number of vertices, an array of the surface vertices, the order of the vertices, the test point, the surface area, a tole... | glaive |
I need to create a verification message template in my application. The template should include options for default email, email message, email message by link, email subject, email subject by link, and SMS message. All of these options should be optional, and I need to be able to customize each one with a string value... | glaive |
I am trying to create a program that takes in an array of real numbers and transforms them into a simplex of the same size. The input array will always have a length of 3.
Can someone please provide a solution for transforming the input array into a simplex using the same framework and technology as the given code sni... | glaive |
You are tasked with implementing a fully-connected AXI4-Lite crossbar module using Verilog. The crossbar module should have the following parameters:
- Number of Slave Ports (Cfg.NoSlvPorts)
- Number of Master Ports (Cfg.NoMstPorts)
- Number of Address Rules (Cfg.NoAddrRules)
- AXI Address Width (Cfg.AxiAddrWidth)
- AX... | glaive |
You are tasked with creating an XSLT stylesheet to transform XML data into an HTML table based on a given XML structure. The input XML will contain sparql query results, and you need to write an XSLT stylesheet that can transform the XML data into a table format.
The input XML structure will contain <sparql:head> and ... | glaive |
I am currently working with Python dictionaries and I have a dictionary named `connectionDetails`. I am trying to refactor some code to make it more elegant and "pythonic". Currently, I am using an if-else statement to check if the "host" key is in the dictionary and then assigning the value to a variable. If the "host... | glaive |
You are tasked with creating a Python program that deletes a report from a specific profile. The program should take in two arguments: the profile ID and the report ID. The program should authenticate and construct a service using OAuth2 credentials. It should then construct a request to delete the report using the giv... | glaive |
You are tasked with creating a program that utilizes the HighstockSeriesArea component to stack the data in a specific way. The program should take the component and set the stacking attribute to a specific value, then generate the JavaScript content for the component. After this process, the program should assert that... | glaive |
I need to implement a VHDL component for a simple multiplier. The component must take in a 32-bit input and produce a 48-bit output. The component should be named "demo_sg_mult_gen_v12_0_i0".
Can someone provide the VHDL code for the component declaration and instantiation template for this multiplier? | glaive |
You are tasked with creating a Ruby script that monitors a user's mail spool for new emails and displays a pop-up notification with the details of the new emails. The script should use the Tk library for creating the GUI elements.
The script should check the user's mail spool at regular intervals and display a pop-up ... | glaive |
I am trying to make a GET request to a specific URI with some headers in PowerShell. However, I am encountering an issue with the request and not getting the expected response. Can someone help me with the correct implementation of the PowerShell script to make a successful GET request to the specified URI with the giv... | glaive |
I am trying to create a Dockerized Node.js application, but I am encountering an issue with the Dockerfile. I want to use the `onbuild` image from Node to automate the process of copying my application's source code into the image and installing its dependencies. However, I am not sure how to correctly set up the Docke... | glaive |
What is the outcome when two or more modules in Python try to import each other, resulting in mutual or circular (cyclic) imports? | glaive |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.