instruction_seed
stringlengths
0
26.4k
source
stringclasses
4 values
Train a model to predict the labels of a handwritten digits dataset.
codefeedback
Create a linear regression model using TensorFlow.
codefeedback
Describe an algorithm for finding the maximum value in a given list of integers.
codefeedback
Using the given snippet of code, create a compiler to check if a given string is valid Python code.
codefeedback
Generate a pandas DataFrame with three columns containing random integer numbers between 0 and 10.
codefeedback
Create a SQL query to delete all rows of a table named 'employees', where the employee's salary is below 50K.
codefeedback
Create a web browser automation script in Python to scrape the data from a website.
codefeedback
Describe the Dynamic Programming approach used to solve the Knapsack problem.
codefeedback
Construct a function in JavaScript to find all the Perfect Numbers up to the given parameter n.
codefeedback
Design an algorithm to find the two numbers in an array that have the largest sum. [1,3,4,6,7]
codefeedback
Write a function that takes a SQL query as an argument and prints out the results of the query in a tabular format. SELECT * FROM tableA
codefeedback
Construct a program in Java for solving the Tower of Hanoi puzzle.
codefeedback
Design an algorithm to delete all occurrences of a given key k in a singly linked list.
codefeedback
Develop a regex pattern to match any valid phone number.
codefeedback
Parse an XML document and return a JSON object containing the data. <book> <title>Cat in the Hat</title> <author>Dr. Seuss</author> <year>1957</year> </book>
codefeedback
Create a deep learning model to output a sentence in French when given an English sentence as input. I like to eat apples.
codefeedback
Generate a random password of length 16 using the letters a-z.
codefeedback
Given a set of points and an origin point, calculate the distance between the origin point and each point in the set. [(1,1),(4,4),(3,3)] (0,0)
codefeedback
Implement a function that takes a 2D matrix and rotates the matrix 90 degrees clockwise. [[1,2,3], [4,5,6], [7,8,9]]
codefeedback
Write a function that takes a string and returns the number of substrings with at least k different characters "abacdc"
codefeedback
Write a function that takes a list of integers and returns the shortest continuous increasing subarray in the list. [2,3,3,4,3,4,5,6,7]
codefeedback
Write a Python function to check whether a string is a palindrome or not, ignoring spaces and special characters.
codefeedback
Given a 2D matrix of integers, find a path from the leftmost column to the right-most column that maximises the sum of numbers. [[3,4,7,2], [2,7,4,1], [7,1,2,4], [8,2,2,7]]
codefeedback
Given a 2D matrix of integers, retrive the maximum sum submatrix. [[2,-2,3,4],[-4,-3,1,1],[-1,5,5,-3]]
codefeedback
Create a text-based game in Python.
codefeedback
Write a code to find the two largest numbers in an array and return them in reverse order. array = [7,2,9,3,1,5]
codefeedback
Write a shell script to print the longest word in a sentence. string = "This is a sentence with words of different lengths"
codefeedback
Rewrite this function to use a binary search instead. def linear_search(arr, x): for i in range (len(arr)): if arr[i] == x: return i return -1
codefeedback
Create a function that searches for elements in an array and returns the index position of the element. array = [3, 7, 11, 14, 19] element = 11
codefeedback
Create a function that returns the complement of a given DNA string (A → T, C → G). dna_string = "ATCGACG"
codefeedback
Modify the given code to find the factorial of a specified number. def factorial_(num): """Find the factorial of a given number""" # TODO return 1
codefeedback
Write a Python function that calculates the cosine distance between two vectors. vector1 = [1, 2, 3] vector2 = [4, 5, 6]
codefeedback
Create a function that evaluates the quadratic equation.
codefeedback
Implement a text classifier for recognizing phrases that are indicative of anger in a sentence. He threw the ball so hard, his anger couldn't be concealed.
codefeedback
Generate a random password consisting of alphanumeric characters and special characters.
codefeedback
Create a Python program to define a factorial of a given number.
codefeedback
Define a function to print out the elements in a list without using a loop.
codefeedback
Make an algorithm to rotate a matrix by 90 degrees. [[1,2,3], [4,5,6], [7,8,9]]
codefeedback
Design a recursive algorithm to generate the Fibonacci sequence.
codefeedback
Write a stack-based language for a simple calculator that can perform the following tasks: Add, subtract, multiply, and divide integers.
codefeedback
Create a SQL database with two separate tables named "Students" and "Courses" to store relevant information about student records.
codefeedback
Build a web application to display the current time in different countries.
codefeedback
Create a React component that takes a zipcode as an input and displays related information about the zipcode in a formatted way.
codefeedback
Use regex to extract specific words between two delimiters in a sentence. string = "This is a string with multiple words and special characters !@#"
codefeedback
Create a Tkinter app with a label and a button.
codefeedback
Build a convolution neural network using tensorflow that takes a single input and classify it into one of three categories.
codefeedback
Write a SQL query to minmize the output of employee salaries without firing them. TABLE employee_info ( emp_ID INT PRIMARY KEY, emp_name VARCHAR, salary int )
codefeedback
Create a function that filters an array for all numbers greater than the given number.
codefeedback
give an example of a natural language processing task solved using supervised learning.
codefeedback
Write a function to check for palindrome str = "abcba"
codefeedback
You are given a 2D array and you need to rotate it 90 degrees clockwise. array = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16], ]
codefeedback
Write a JavaScript function to replace all non-alphabetical characters in a string with the symbol ‘#’. Given string: "Hello, world!"
codefeedback
Build a Python program to generate a prime numbers list in a given range.
codefeedback
Calculate the nth fibonacci number in the series. n = 10
codefeedback
Write a shell script that download and install the latest version of Python 3.
codefeedback
Given a binary tree, write a function to print out the elements in level order.
codefeedback
Write a RegEx expression to find substrings of length 5 that are lowercase.
codefeedback
Design an algorithm to rotate a given array in clockwise direction by a given index. array = [1, 2, 3, 4, 5] index = 2
codefeedback
Write a class in Java to convert a decimal number to its binary equivalent.
codefeedback
Modify a given program to replace each element in an array with the sum of all elements before it. [1,2,3,4]
codefeedback
Design a C++ function 'removeDuplicates' to remove all duplicate elements from an array and return the new length of the array. arr = [1, 3, 1, 5, 5]
codefeedback
Write an `SQL` query to select the empoloyee's name and department who were hired after `Jan 2020`.
codefeedback
Implement a function that can convert a number from one number system to another. Input: The number 60 in binary to be converted to decimal.
codefeedback
Design an algorithm to summarize a long text.
codefeedback
Design a binary search tree that has the following values in the given order - 5, 4, 11, 6, 10, 8.
codefeedback
Given two strings, find and replace the first instance of the string1 with string2. string1 = "apple"; string2 = "apricot"; string3 = "One apple a day keeps the doctor away"
codefeedback
Build a web service that returns a list of all the customers in a MySQL database.
codefeedback
Create an interface for a number guessing game using HTML, CSS, and JavaScript.
codefeedback
Suggest a 3D modelling software for creating 3D designs.
codefeedback
How would you modify the query to print the average grade of the students? SELECT name, grade FROM Students;
codefeedback
Create a Node.js server to handle POST requests None
codefeedback
Create a function that takes as input a string and evaluates its quantity to true or false.
codefeedback
Train a machine learning model to predict whether a customer is likely to purchase a product.
codefeedback
Construct a machine learning model to classify a given dataset into two class labels. Dataset
codefeedback
Create a tensorflow model to predict the probability of rain given an input dataset. Weather dataset
codefeedback
Generate a random string of length 5 with only lowercase alphabetic characters.
codefeedback
Write a lambda expression to show the first character of a string.
codefeedback
Write a Python program to create a Caesar Cipher encryption algorithm.
codefeedback
Write an R statement to calculate the probability of getting a number greater than 5 from a range of 1 to 10.
codefeedback
Write a code to filter out numbers which are divisible by 3 and 5 from a given list. list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
codefeedback
Create an HTML form that takes the user's name, email, and photo and saves it in a database.
codefeedback
Write a SQL query to find the top 3 most visited websites on a specific day.
codefeedback
Implement a tournament bracket for a single elimination tournament using C programming.
codefeedback
Output a Regex expression to match all dates in the following format dd/mm/yyyy
codefeedback
Convert the following hexadecimal number FA to its binary form. FA
codefeedback
Calculate the area of a triangle with base b=4 and height h = 5.
codefeedback
Write a SQL query to update the status of all rows in the ‘customers’ table from active to inactive.
codefeedback
Write a function that receives an array and removes every odd element from it. [1, 2, 3, 4, 5, 6, 7, 8]
codefeedback
What is the difference between deep learning and traditional AI?
codefeedback
Write an algorithm in Java to reverse an array. [1, 2, 3, 4, 5]
codefeedback
Create an algorithm to traverse a binary tree in pre-order in Python.
codefeedback
Write a Python program to determine if an input string is a valid IP address.
codefeedback
Write a function to print the spiral ordering of an input matrix. [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
codefeedback
Based on the following input array, return the largest two numbers in the array. numbers = [10, 9, 8, 7, 6, 5]
codefeedback
Identify the dependent and independent variables in the following equation y=x^2+5
codefeedback
Design a stack class for a language of your choice
codefeedback
Implement a quick sort algorithm for a given array list.
codefeedback
Given a list of numbers and a target, write an algorithm to determine if the list contains a subset that sums up to the target.
codefeedback
Execute a valid query using PostgreSQL for finding the title of all movies released in the year 2000.
codefeedback
Design a shell script for sorting the elements of a given array [2, 5, 1, 8, 4]. Array elements: [2, 5, 1, 8, 4]
codefeedback