messages
listlengths
2
2
source
stringclasses
5 values
[ { "role": "user", "content": "Create a C++ program that involves carrying out a multi-step process for determining the maximum value within an array of integers, utilizing an algorithm to comprehensively examine the given data set.\nint array[] = {1, -2, 3, 4, 7, 5}" }, { "role": "assistant", "c...
magicoder
[ { "role": "user", "content": "How can you create a captivating advertisement for the book Time Manipulation, which is designed to help aspiring drummers improve their coordination, polyrhythms, beat displacement, and rhythmic modulation? In what unique ways could you showcase the book and its content, incor...
wizardlm
[ { "role": "user", "content": "Embark on a labyrinthine journey through the complex realm of quantum entanglement, accentuating its crucial significance in the rapidly advancing discipline of quantum computing. Could you meticulously construct an exhaustive narrative that probes into the inception, progressi...
magicoder
[ { "role": "user", "content": "Can you provide me with some captivating opening paragraphs for an article highlighting the value and advantages of availing expert countertop installation services? The article must be a minimum of 100 words in length. Specifically, I am seeking original and well-written openi...
wizardlm
[ { "role": "user", "content": "Construct a list in Python that contains the names of the months in order, starting with January." }, { "role": "assistant", "content": "months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \...
codealpaca
[ { "role": "user", "content": "Could you develop an intricate Python program that performs the execution of a Linux command, subsequently displaying the output?\nThe particular Linux command in question is: uname -a" }, { "role": "assistant", "content": "In Python, one can make use of the subproc...
magicoder
[ { "role": "user", "content": "Add unit test for RegexTemplate.\n\n(Language: Java)" }, { "role": "assistant", "content": "package com.basgeekball.awesomevalidation.utility;\n\nimport junit.framework.TestCase;\n\nimport java.util.regex.Pattern;\n\npublic class RegexTemplateTest extends TestCase {...
commitpackft
[ { "role": "user", "content": "Create contents of .h file\n\n(Language: C)\n\n#ifndef ANN_H\n#define ANN_H\n\n#endif" }, { "role": "assistant", "content": "#ifndef ANN_H\n#define ANN_H\n\n#define INPUTS 3\n#define HIDDEN 5\n#define OUTPUTS 2\n#define ROWS 5\n\ntypedef struct {\n double input[H...
commitpackft
[ { "role": "user", "content": "With the rise of virtual reality technology, emotions can now be experienced more intensely than ever before. How can we incorporate this into the calculateKarmaScore() function to account for different intensities of emotions? Additionally, can the function be enhanced to reco...
wizardlm
[ { "role": "user", "content": "Je suis désolé, mais il n'est pas possible de générer un code Python sans spécifier les exigences détaillées du programme. Pouvez-vous fournir des informations plus précises sur les fonctionnalités de l'application, les entrées et les sorties attendues, les bibliothèques à util...
wizardlm
[ { "role": "user", "content": "Add Bubble Sort in Java\n\n(Language: Java)" }, { "role": "assistant", "content": "package com.dev.namhoai.sort;\n\npublic class BubbleSort {\n\n public static <T extends Comparable> void sort(T[] a) {\n for (int i = 0; i < a.length; i++) {\n //...
commitpackft
[ { "role": "user", "content": "Fix add Ember Try config for 1.12.X\n\n(Language: JavaScript)\n\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-1.13.X',\n dependencies: {\n 'ember': '1.13.10'\n }\n },\n {\n ...
commitpackft
[ { "role": "user", "content": "Add 145 Binary Tree Postorder Traversal\n\n(Language: C++)" }, { "role": "assistant", "content": "// 145 Binary Tree PostOrder Tranversal\n/**\n* Given a binary tree, return the postorder traversal of its nodes' values.\n* \n* For example:\n* Given binary tree {1,#,...
commitpackft
[ { "role": "user", "content": "Generate a set of Python functions to take inputs values from a list of objects and output a result. The output for each object should include the object's ID and the calculated results from the given inputs.\n[{\"id\": 1, \"inputs\": [1,2,3]}, {\"id\": 2, \"inputs\": [2,3,4]}]...
magicoder
[ { "role": "user", "content": "Please refactor the following Python 2 code snippet into Python 3 compatible syntax, while also handling any deprecated features. Furthermore, split your logic into separate functions each handling a specific part (getting user input, converting input to list of integers and pr...
magicoder
[ { "role": "user", "content": "Fix typo resulting in build issue\n\n(Language: JavaScript)\n\nenvimport * as MuConstants from '../exports/MuConstants'\n\nconst service = MuConstants.STORIES_SERVICE_URL\n\nfunction handleErrors(response) {\n if (!response.ok) {\n throw Error(response.statusText);\n }\n ...
commitpackft
[ { "role": "user", "content": "Given a dataset of restaurant reviews from different customers, organize the data in a format where each dish is represented as a key-value pair, with the key being the dish name and the value being an array of arrays of customer reviews. The customer reviews should be ordered ...
wizardlm
[ { "role": "user", "content": "Describe the differences between np.array and a list, considering memory efficiency, computation time, and ability to store non-homogenous data types." }, { "role": "assistant", "content": "`np.array` and `list` in python are both used to store data but they are qui...
magicoder
[ { "role": "user", "content": "How can I use Scala to create an adverb that describes how one listens to music using the words \"synesthetically\" and \"subconsciously\"?\nHere's some Scala code that can generate the adverb:\nval adverb = \"synesthetically\".stripSuffix(\"ally\") + \"subconsciously\"\nThis c...
wizardlm
[ { "role": "user", "content": "In light of the mathematical principle that stipulates an integer c to be a mutual divisor of two integers x and y, provided c divides both x and y without a remainder, could you ascertain which among the following sets of integers might potentially encompass all the common div...
magicoder
[ { "role": "user", "content": "Can you share with me your experience attending a secret underground gathering for Malifaux enthusiasts, where participants engage in immersive gameplay with custom-built terrain, unique storylines, and intense character roleplaying?" }, { "role": "assistant", "cont...
wizardlm
[ { "role": "user", "content": "Add data migration for existing zotero user and node settings models - \"personal\" library is the only library that was previously available, but now group libraries are accessible.\n\n(Language: Python)" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*...
commitpackft
[ { "role": "user", "content": "Design a data structure to store user information such as username, password, date of birth and email address." }, { "role": "assistant", "content": "The information can be stored in a user class using the following structure: \nclass User {\n string username;\n s...
codealpaca
[ { "role": "user", "content": "Write a Python code to multiply two given numbers, and additionally, the functions should return 'Not a number' if a non-numeric input is given. An erroneous piece of code is provided below for reference. Fix the code to achieve the required functionality.\n\nErroneous code:\n`...
magicoder
[ { "role": "user", "content": "Can you provide an example of how a neural network outperforms a conventional algorithm in a specific task? Please present your findings in the form of [Python code]. Additionally, please explain the advantages of using a neural network over a conventional algorithm in terms of...
wizardlm
[ { "role": "user", "content": "Given a N-dimensional matrix, write a program to traverse it in a zigzag pattern without using any in-built or third-party library functions. Also, the program should consider the cases of both even and odd numbered dimensions.\nA piece of erroneous code is provided below which...
magicoder
[ { "role": "user", "content": "Create a function that can transform a string of text into an object containing the number of occurrences of each letter in the string.\nHello World" }, { "role": "assistant", "content": "\"\"\"\nCreate a function that can tranform a string of text into an object co...
codealpaca
[ { "role": "user", "content": "Improve the given Python code snippet that calculates the least common multiple (LCM) of two non-negative integers, named 'x' and 'y', ensuring that it also handles zero values and different limit scenarios:\n\ndef least_common_multiple(x: int, y: int) -> int:\n \"\"\" Retur...
magicoder
[ { "role": "user", "content": "Make sure to import build from googleapiclient.discovery.\n\n(Language: Python)\n\n\"\"\"[START auth]\"\"\"\n\nfrom oauth2client.client import GoogleCredentials\nfrom googleapiclient.discovery\n\ndef get_service():\n credentials = GoogleCredentials.get_application_default()\...
commitpackft
[ { "role": "user", "content": "Develop a function that can verify the emptiness of a list, including any nested lists, regardless of their depth of nesting. This function should simultaneously compute the total count of empty lists and the aggregate number of elements across all lists. The result should be a...
magicoder
[ { "role": "user", "content": "Support operation name in DDP method\n\n(Language: JavaScript)\n\nimport { runQuery } from 'graphql-server-core';\n\nexport function createGraphQlMethod (schema) {\n return function graphQlMethod({ query, variables }) {\n this.unblock();\n\n const { userId } = ...
commitpackft
[ { "role": "user", "content": "Write a program that accepts a two-dimensional list where each sub-list contains words and concatenates them into a single string, with each word separated by a comma and a space. In addition to this, any duplicated words must only appear once in the output string. \n\nlst = [[...
magicoder
[ { "role": "user", "content": "Write a sql query that takes the maximum of a particular column\nTable: employees\nColumns: name, salary" }, { "role": "assistant", "content": "SELECT MAX(salary) FROM employees;" } ]
codealpaca
[ { "role": "user", "content": "Investigate the intricate systems and elements involved in the utilization of Google's AutoML for the development of an advanced algorithm, specifically designed for image recognition tasks in the niche field of computer vision. Moreover, elucidate the interaction and influence...
magicoder
[ { "role": "user", "content": "What are some strategies for small businesses to overcome budget constraints and maintain high customer satisfaction during digital transformation? Additionally, what are the top three obstacles they may encounter and how can they be addressed? \nIn terms of automating certain ...
wizardlm
[ { "role": "user", "content": "Classify the following immigration reforms as liberal or conservative policies.\nDACA" }, { "role": "assistant", "content": "Liberal policy." } ]
wizardlm
[ { "role": "user", "content": "Do you mind rewriting this for C#?\ndef number_to_binary(x: str, base: int) -> str:\n return bin(int(x, base))[2:]" }, { "role": "assistant", "content": "Sure, Here you go:\n\n```csharp\nusing System;\n\npublic static string NumberToBinary(string x, int baseNum)\...
magicoder
[ { "role": "user", "content": "How can I create a complex and multi-dimensional daughter character for Snow White in my Java code who has not only the power of telekinesis, but also other supernatural abilities and is struggling with not only her royal lineage but also with the societal norms and expectation...
wizardlm
[ { "role": "user", "content": "Please provide a step-by-step approach to filtering out specific lines from the output of the 'grep' command using the 'sed' command. Specifically, the lines containing the words 'demo' or 'trial' should be excluded. Additionally, please explain the significance of integrating ...
wizardlm
[ { "role": "user", "content": "Add a check for the issue\n\n(Language: TypeScript)\n\nimport { GitHub } from \"danger/distribution/platforms/GitHub\"\nimport { Platform } from \"danger/distribution/platforms/platform\"\nimport { dsl } from \"./danger_run\"\n\nconst getPerilPlatformForDSL = (type: dsl, github...
commitpackft
[ { "role": "user", "content": "In a FIFA World Cup results Excel table, what team won the championship in the 2018 tournament?" }, { "role": "assistant", "content": "In the 2018 FIFA World Cup, the championship was won by the national football team of France." } ]
wizardlm
[ { "role": "user", "content": "Determine if 4 and 12 are relatively prime." }, { "role": "assistant", "content": "No, 4 and 12 are not relatively prime because they have a common factor of 4." } ]
wizardlm
[ { "role": "user", "content": "Construct a JavaScript code snippet that outputs the exact present date and time in the following format: \"Wednesday, November 20, 2019 12:00:00 AM GMT+0530\", ensuring effective use of the Date object and its methods." }, { "role": "assistant", "content": "Here is...
magicoder
[ { "role": "user", "content": "How can we ensure the accuracy and reliability of data collected for machine learning applications? In addition to traditional data collection methods, such as surveys and manual data entry, what are some innovative ways to gather data, such as using IoT devices or incorporatin...
wizardlm
[ { "role": "user", "content": "Fix comment relating HTTP to be more generic.\n\n(Language: Java)\n\npackage net.morimekta.providence.util;\n\nimport net.morimekta.providence.PServiceCall;\n\nimport javax.annotation.Nullable;\nimport java.util.concurrent.TimeUnit;\n\n/**\n * Interface handling the instrumenta...
commitpackft
[ { "role": "user", "content": "In the hexadecimal system, what is the highest possible numerical value that can be represented by a single octet?" }, { "role": "assistant", "content": "In computer systems, an octet is a unit of digital information that consists of 8 bits. In hexadecimal represent...
magicoder
[ { "role": "user", "content": "So, I'm aware that multi-armed bandits are great for evaluating multiple models and from what I understand, it is mainly used to pick a specific model.\nI would still like to evaluate two models but I want to do it differently. Take a look at this simple equation:\n\nW_A * Reco...
magicoder
[ { "role": "user", "content": "Construct an analogy to describe the relationship between two members of a family." }, { "role": "assistant", "content": "Two members of a family are like two pieces of a puzzle. Each piece has its own unique shape, size, and color, and it is only when they come tog...
wizardlm
[ { "role": "user", "content": "Can you deduce the objective and subjective aspects of this sentence - \"The culinary masterpiece provided a tempting experience\"? Show your reasoning behind your answer." }, { "role": "assistant", "content": "Objective aspect: \n- The sentence describes a culinary...
wizardlm
[ { "role": "user", "content": "Add APITimerCounter which only counts the first call within a thread to an API\n\n(Language: Java)" }, { "role": "assistant", "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE fil...
commitpackft
[ { "role": "user", "content": "Given the data of seven individuals, how can we use logistic regression in Go to predict who is likely to subscribe to a paid service in the future? Which variables do you think are the most important in making this prediction? \nHere is an example of how to use logistic regres...
wizardlm
[ { "role": "user", "content": "Utilizing the supplied numerical array as input, formulate a JavaScript function that outputs the accumulated sum of every individual element within this aforementioned array.\n[3, 5, 2, 6, 4, 4]" }, { "role": "assistant", "content": "Here is a simple JavaScript fun...
magicoder
[ { "role": "user", "content": "Embark on the pioneering construction and execution of a groundbreaking, unified structure that harnesses the potential of cutting-edge quantum computing and intricate nanotechnology, with a specific focus on Quantum-Driven Precision Nanotechnological Innovations (QDPNI), utili...
magicoder
[ { "role": "user", "content": "How to extract specific query parameters from a URL in a Next.js application and ensure that they are correctly sent to the relevant API endpoint with proper headers or other necessary parameters. This task may require analyzing the structure of the URL string and using query-s...
wizardlm
[ { "role": "user", "content": "I'm using Selenium and Python to extract info from a page \n\n\nHere is the div I want to extract from: \n\n\n\n```\n<div class=\"_2v66\">5</div>\n\n```\n\nI want to extract the value \"5\" \n\n\nHere is the Python I have written:\n\n\n\n```\nelement = browser.find_elements_by_...
python25k
[ { "role": "user", "content": "Construct a comprehensive response for a Sentiment Analysis task using advanced Huggingface Transformers. Your answer must incorporate not only functions to cleanse data from a TXT file, but also data organized as 'review' and 'sentiment', sequentially employing these elements ...
magicoder
[ { "role": "user", "content": "Generate a python program to generate a json response based on following specification The response should contain the following keys:\n- name\n- email\n- age" }, { "role": "assistant", "content": "```python\nimport json\n\ndata = {\n 'name': 'John Doe',\n 'em...
python25k
[ { "role": "user", "content": "Given the numerical sequence where each term must be divisible by 3, starting from 2, develop an algorithm to identify the largest prime number in the sequence." }, { "role": "assistant", "content": "1. Start with the number 2.\n2. Multiply by 3 to get the next term...
wizardlm
[ { "role": "user", "content": "Can you create a list of 10 obscure historical facts about the Roman Empire, specifically focusing on the lesser-known emperors and their lesser-known achievements? Each fact should be presented in the form of a trivia question, similar to a pub quiz, and should be answerable b...
wizardlm
[ { "role": "user", "content": "As the head of the hosting service department, you strive to provide impeccable IT services to your clients to ensure their business success. The department's primary goal is to cater to all your customers' IT needs and manage their IT products so that they can concentrate on t...
wizardlm
[ { "role": "user", "content": "Craft a structured query language directive that extracts the moniker with the longest alphanumeric character string length from the database table designated as 'words', having column identifiers such as 'id' and 'name'." }, { "role": "assistant", "content": "The S...
magicoder
[ { "role": "user", "content": "Implement Ridge regression manually without using Scikit-learn library or any other machine learning libraries on the California housing dataset. Utilize the stochastic gradient descent method for optimization, also ensure to handle any anomalies or irregularities in the data. ...
magicoder
[ { "role": "user", "content": "Use properties where it makes sense\n\n(Language: JavaScript)\n\nimport React from 'react';\n\nclass ApplicationPreviewContainer extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n previewUrl: 'http://localhost:8000'\n };\n }\n\...
commitpackft
[ { "role": "user", "content": "Write the code for pausing the TV when the doorbell rings" }, { "role": "assistant", "content": "```python\ndoorbell_rings = True\nif doorbell_rings:\n # Code to pause TV using smart home API\n```" } ]
python25k
[ { "role": "user", "content": "I'm looking for a bit more background on a question that came up here: Our traders use some sort of Longstaff-Schwartz to calculate the optimal point when to call an issuer-callable bond.\nMy question is: Does anyone know whether a) it' s possible and b) how to exactly locate t...
magicoder
[ { "role": "user", "content": "Craft an efficient piece of code to rearrange the elements of a provided array that contain distinct fruit names as strings. However, some of these entries are presented in mixed-case format. Ensure your code sorts these in reverse alphabetical sequence, while observing case-in...
magicoder
[ { "role": "user", "content": "Make gulp build just build the js.\n\nOther functionality coming back later.\n\n(Language: JavaScript)\n\nvar gulp = require('gulp')\nvar coffee = require('gulp-coffee')\nvar concat = require('gulp-concat')\nvar prepend = require('gulp-insert').prepend\nvar shell = require('gul...
commitpackft
[ { "role": "user", "content": "Can you modify the existing code to add the option of family members listing their least favorite foods as well? Currently, the code only displays the healthy foods that each member likes.\n\nfoods = {'broccoli','spinach','carrots','sweet potato','brown rice','chicken breast','...
wizardlm
[ { "role": "user", "content": "Devise an SQL command to extract the designations and matching hire dates from a 'staff' database structure, arranged in reverse chronological order based on the date of joining." }, { "role": "assistant", "content": "Here is a basic SQL query that accomplishes this...
magicoder
[ { "role": "user", "content": "You are a personal trainer who specializes in endurance training. Your client is training for an upcoming marathon and wants a training plan that is more intense and challenging than a typical marathon training program. Create a six-day training plan that incorporates strength ...
wizardlm
[ { "role": "user", "content": "What is the shell command to list all files in a directory, including hidden files? And how can I modify this command to also display file sizes in a human-readable format? Also, can you provide any best practices for efficiently managing and manipulating large directories in t...
wizardlm
[ { "role": "user", "content": "Return how many characters are in the following string.\nword = \"Hello\"" }, { "role": "assistant", "content": "length = len(word)\nprint(length)\n# Output: 5" } ]
codealpaca
[ { "role": "user", "content": "Generate a correct SQL statement to select the employees with their name, gender, age and salary" }, { "role": "assistant", "content": "SELECT name, gender, age, salary\nFROM employee;" } ]
codealpaca
[ { "role": "user", "content": "Can you create a dynamic virtual zoo where players can design and personalize their own unique habitats? The game requires players to manage exotic animals that possess a vast array of personalized traits and actions, which are randomly generated and develop over time as they i...
wizardlm
[ { "role": "user", "content": "How can we utilize the \"visit_data\" dataframe to create more detailed visualizations that offer a deeper understanding of Cathy's experience at the art museum? Can we incorporate the ggplot2 package in R to construct a multi-faceted visualization that showcases the connection...
wizardlm
[ { "role": "user", "content": "Design a function that calculates the heat index, rounding to the nearest whole number, given the relative humidity in percentage and the temperature in Fahrenheit. This function should handle exceptional scenarios where the temperature is below 80 degrees Fahrenheit or the rel...
magicoder
[ { "role": "user", "content": "Here's a puzzle for you! I have some Scala code that I want to modify. I need to calculate sentiment scores for multiple texts and identify the most frequent sentiment words used by the writer in each text. Can you help me figure out how to make these modifications? It's like a...
wizardlm
[ { "role": "user", "content": "I want to calculate the time span between 2 times which I saved in a database.\nSo literally I want to know the length of time between the 2 values.\n\n14:10:20 - 10:05:15 = 02:05:05\n\nSo the result would be 02:05:05.\n\nHow would I be able to achieve this using C#?\n\n14:10:2...
magicoder
[ { "role": "user", "content": "How can I modify the existing PHP program to generate a random quote about hope and resilience from a MySQL database and display it on a webpage based on the user's input of a specific topic? Can you provide a sample code that demonstrates the retrieval of data from a MySQL dat...
wizardlm
[ { "role": "user", "content": "Enhance the given Python code to include a more complicated function, \"intersperse\", which takes in three parameters. The parameters are two lists, `numbers1` and `numbers2`, and an integer `delimeter`. The function should weave elements from both `numbers1` and `numbers2` to...
magicoder
[ { "role": "user", "content": "In addition to the existing requirement, please enhance the given prompt by mandating that each image or graphic must be unique and cannot be a repeat of any previously used visual aids." }, { "role": "assistant", "content": "Sure, I can enhance the prompt as per yo...
wizardlm
[ { "role": "user", "content": "Examine the provided Python code segment meticulously, which is intended to calculate the sum of a list of numbers. Identify potential areas of enhancement, considering factors such as efficiency, readability, and adherence to Python's best practices.\ndef sum_list(list):\n ...
magicoder
[ { "role": "user", "content": "How can I market a limited edition set of handcrafted wooden speakers made from rare and exotic woods, which offer unmatched acoustic clarity and are designed with precision engineering, to hi-fi audio enthusiasts and collectors with a penchant for aesthetics and quality?" },...
wizardlm
[ { "role": "user", "content": "Develop a comprehensive project documentation for a high-performance, moisture-wicking sport reflective sock aimed at runners and cyclists, incorporating details of design, materials, manufacturing process, user testing, and product specifications. Additionally, the documentati...
wizardlm
[ { "role": "user", "content": "> System.InvalidOperationException: DragDrop registration did not\n succeed. ---> System.Threading.ThreadStateException:\n\nWhat does this exception mean? I get it at this line trying to add a panel to a panel at runtime...\n\n\nsplitReport.Panel1.Controls.Add(ChartPanel);\n\...
magicoder
[ { "role": "user", "content": "Enable fuzziness + AND phrases when searching text\n\n(Language: JavaScript)\n\nconst fp = require('lodash/fp')\n\nconst elastic = require('./index')\n\nconst toBody = message =>\n fp.pick([\n 'timestamp',\n 'from',\n 'to',\n 'text',\n ], message)\n\nconst indexMe...
commitpackft
[ { "role": "user", "content": "Make the authConfig field final.\n\n(Language: Java)\n\npackage org.jboss.shamrock.security;\n\nimport java.util.List;\n\nimport org.jboss.builder.item.MultiBuildItem;\nimport org.jboss.shamrock.runtime.RuntimeValue;\n\n/**\n * Information about an authentication mechanism to e...
commitpackft
[ { "role": "user", "content": "Given a SQL table of user accounts with columns for login attempts and user roles, write a SQL query to find the user with the lowest number of login attempts excluding administrator accounts. Assume the 'login_attempts' column stores the number of login attempts and the 'user_...
magicoder
[ { "role": "user", "content": "Can you create a comprehensive script that will scrape various tables from a given website, combine them, and create a single pandas dataframe, with the ultimate goal of utilizing machine learning to predict the table most likely to contain missing data? The script needs to hav...
wizardlm
[ { "role": "user", "content": "Stop catching just to throw again\n\n(Language: TypeScript)\n\nimport cachedFetch, { type CachedFetchOptions } from './cachedFetch';\n\nexport let apiUrl = 'https://pokeapi.co/api/';\nexport let apiVersion = 'v2';\n\nexport async function getResource(resource: string, options: ...
commitpackft
[ { "role": "user", "content": "Explain how the hydrogen atom produces an emission spectrum" }, { "role": "assistant", "content": "The hydrogen atom produces an emission spectrum because of the electrons present in its structure. The electrons in the hydrogen atom are arranged in different energy ...
wizardlm
[ { "role": "user", "content": "Add an option to revalidate home page\n\n(Language: TypeScript)\n\nimport {ApolloQueryResult} from \"@apollo/client\"\nimport {GetStaticPropsResult} from \"next\"\nimport {Fragment, FC} from \"react\"\n\nimport PostsPayload from \"type/api/PostsPayload\"\n\nimport getApollo fro...
commitpackft
[ { "role": "user", "content": "As you step into the virtual interview room, you realize that the interviewer's demeanor is strictly professional, and it's evident that the company has implemented state-of-the-art AI systems to evaluate every move you make. In this daunting situation, it's crucial to not only...
wizardlm
[ { "role": "user", "content": "Add unit test for SingleLocalDateUriParameter\n\n(Language: Java)" }, { "role": "assistant", "content": "package org.roklib.urifragmentrouting.parameter;\n\nimport org.roklib.urifragmentrouting.parameter.converter.ISO8601ToLocalDateParameterValueConverter;\nimport o...
commitpackft
[ { "role": "user", "content": "Give me the PHP version of the following:\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// FractionToFloat converts string fraction to float64\nfunc FractionToFloat(fraction string) (float64, error) {\n\tfr := strings.Split(fraction, \"/\")\n\tnumerat...
magicoder
[ { "role": "user", "content": "Build a keyword extraction system using TextBlob to identify the most frequently occurring words in a given text." }, { "role": "assistant", "content": "```python\nfrom textblob import TextBlob\nfrom collections import Counter\ntext = 'TextBlob is amazing for natura...
python25k
[ { "role": "user", "content": "Design an algorithm that can generate a sequence of prime numbers, each of which is the sum of two perfect squares, and whose product equals a perfect cube. The algorithm must also output the smallest and largest numbers in the sequence. Best of luck!" }, { "role": "ass...
wizardlm
[ { "role": "user", "content": "Update REPL to read/print a ConsCell * rather than a Sexp&.\n\n(Language: C++)\n\n#include <iostream>\n\n#include \"reader.h\"\n\nnamespace\n{\n\nclass Repl\n{\n std::istream& in_;\n std::ostream& out_;\n std::string prompt_ = \"mclisp> \";\n mclisp::Reader reader_;\n\n pu...
commitpackft
[ { "role": "user", "content": "Fix the code: def calculate_discount(price, discount):\n return price - (price * discount / 100)" }, { "role": "assistant", "content": "```python\ndef calculate_discount(price, discount):\n if not (isinstance(price, (int, float)) and isinstance(discount, (int,...
python25k
[ { "role": "user", "content": "Develop a function 'detectDupes' that identifies if a tuple has more than one of the same entries. Additionally, the function should return not just a boolean, but also the duplicated entries. Consider case sensitivity for string entries. For example, tuple = (2, 6, \"Dog\", \"...
magicoder