messages
listlengths
2
2
source
stringclasses
5 values
[ { "role": "user", "content": "Create a Ruby program that takes in two arrays and a block as input, and uses the block to combine the elements of the two arrays.\n[1,2,3,4], [11,12,13,14]" }, { "role": "assistant", "content": "You can define a method `combine_arrays` for this purpose:\n\n```ruby\...
magicoder
[ { "role": "user", "content": "Create and locate 'jarmods' directory if it doesn't exist\n\n(Language: Java)\n\npackage agaricus.mods.Jarmod2Coremod;\n\nimport cpw.mods.fml.relauncher.IFMLCallHook;\n\nimport java.io.File;\nimport java.util.Map;\n\npublic class Scanner implements IFMLCallHook {\n\n public ...
commitpackft
[ { "role": "user", "content": "How can I sort a list of words based on the number of vowels in each word, in ascending order, using C# code? \nHere is the list of words:\nList<string> words = new List<string> { \"hello\", \"world\", \"apple\", \"banana\", \"pear\", \"orange\", \"cherry\", \"strawberry\" };\n...
wizardlm
[ { "role": "user", "content": "Add migration for verbose name.\n\n(Language: Python)" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.1 on 2017-06-21 18:43\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Mig...
commitpackft
[ { "role": "user", "content": "Add name field for reference list\n\n(Language: Java)\n\npackage ohtuhatut.domain;\n\nimport org.springframework.data.jpa.domain.AbstractPersistable;\n\nimport javax.persistence.Entity;\nimport javax.persistence.FetchType;\nimport javax.persistence.OneToMany;\nimport javax.pers...
commitpackft
[ { "role": "user", "content": "Reduce internal token expiration time\n\n(Language: Java)\n\npackage me.deftware.client.framework.MC_OAuth;\n\nimport java.util.concurrent.Executors;\nimport java.util.concurrent.TimeUnit;\n\npublic class StaticOAuth {\n\n\tprivate static String token = \"\";\n\n\tstatic {\n\t\...
commitpackft
[ { "role": "user", "content": "Disable dropdown when question marked as answered\n\n(Language: JavaScript)\n\n$(document).ready(function() {\n $(document).on('change', '.question-answered-box', function(){\n the_id = $(this).data('the-id')\n text_answer_field = $(this).closest('.text-answer').find('.t...
commitpackft
[ { "role": "user", "content": "Develop a multi-dimensional Facebook advertisement campaign for Nintendo with an emphasis on engaging gamers of all ages who enjoy action, adventure, simulation, and sports games. The campaign should be designed to capture the attention of potential customers across multiple pl...
wizardlm
[ { "role": "user", "content": "Compose a one-paragraph response to the following question, while also providing two real-life examples of independent thinking, a comparative analysis of the pros and cons of being an independent thinker, and a discussion of how external factors such as culture and societal no...
wizardlm
[ { "role": "user", "content": "As an experienced globetrotter, my palate has been refined to crave only the most distinctive and diverse tastes that can be savoured from an authentic culinary escapade. The usual and tedious no longer satisfies my insatiable appetite for exceptional and exciting gastronomic e...
wizardlm
[ { "role": "user", "content": "i'm looking to rewrite this in perl:\ndef custom_sort(l: list, n: int, m: int, s: str):\n l[n:m+1] = sorted([i ** 2 for i in l[n:m+1]], reverse = s=='desc')\n return l" }, { "role": "assistant", "content": "In Perl, you can use the 'splice' function to remove ...
magicoder
[ { "role": "user", "content": "Implement algorithm to print symmetrix matrix\n\nSigned-off-by: WajahatSiddiqui <3c3ea4adfdf19decee174766aef6add34b32b7f0@gmail.com>\n\n(Language: C++)" }, { "role": "assistant", "content": "#include <iostream>\nusing namespace std;\n\nint main() {\n\tint N = 4;\n\t...
commitpackft
[ { "role": "user", "content": "Use the BeautifulSoup and requests libraries to extract and manage the HTML content of specific sections on YouTube's homepage. Implement a simple web crawler that starts from the YouTube homepage and follows the first 'a' link encountered in the body of the page. This crawler ...
magicoder
[ { "role": "user", "content": "Write a code to calculate the average of all elements of an array." }, { "role": "assistant", "content": "Here's a simple Python code for calculating the average of all elements of an array:\n\n```python\ndef average(arr):\n return sum(arr) / len(arr)\n\narr = [1...
magicoder
[ { "role": "user", "content": "Add a resource getter to the abstract service spec\n\n(Language: JavaScript)\n\nimport Item from '../../../../../src/js/structs/Item';\n\nmodule.exports = class ServiceSpec extends Item {\n getId() {\n return this.get('id') || '';\n }\n\n toJSON() {\n return this.get()...
commitpackft
[ { "role": "user", "content": "Please provide a comprehensive list of the essential characteristics that an ideal algorithm must possess. Additionally, please include examples of algorithms that meet these requirements, along with their respective time and space complexity analyses. You may also use pseudoco...
wizardlm
[ { "role": "user", "content": "As the data platform maintainer, you are currently providing support for MQTT and Web API protocols, along with CSV and JSON data sets. To comply with the need to improve user experience, you are required to implement a constraint that mandates the support for more protocols su...
wizardlm
[ { "role": "user", "content": "Change unstable flags for changes to Rust nightly.\n\n(Language: Rust)\n\n#![feature(core)]\n\nextern crate interpolate;\nextern crate num;\n\npub mod vector;\npub mod rect;\npub mod circle;\npub mod grid;\npub mod wrapping_grid;\n\npub use vector::Vec2;\npub use rect::Rect;\np...
commitpackft
[ { "role": "user", "content": "Create a Python function to convert a given temperature in Fahrenheit to Celsius" }, { "role": "assistant", "content": "```python\ndef fahrenheit_to_celsius(temp_fahr):\n temp_celsius = (temp_fahr - 32.0) * (5.0/9.0)\n return temp_celsius\n\n# example\ntemp_fahr =...
python25k
[ { "role": "user", "content": "Provide an example input and an appropriate output for a classification task." }, { "role": "assistant", "content": "Example input: \n\nA dataset of customer information for a bank, including variables such as age, income, education level, employment status, and loa...
wizardlm
[ { "role": "user", "content": "Construct a N level hierarchical tree data structure in PHP which can support operations like insertion, deletion and search operation in optimal time complexity. Also, write functions to print the tree in pre-order, in-order and post-order traversals as strings. Incorporate er...
magicoder
[ { "role": "user", "content": "Could you please provide me with an in-depth analysis of the common latent conditions that arise during the construction of residential buildings in New South Wales, Australia? The report should provide an extensive coverage of various types of latent conditions, including but ...
wizardlm
[ { "role": "user", "content": "Use source_delay instead of sleep, and tidy up a bit\n\n(Language: Python)\n\nfrom travispy import TravisPy\nfrom gpiozero import LED\nfrom gpiozero.tools import negated\nfrom time import sleep\nfrom signal import pause\n\ndef build_passed(repo='RPi-Distro/python-gpiozero', del...
commitpackft
[ { "role": "user", "content": "Create a SQL table called \"products\" to store information about products." }, { "role": "assistant", "content": "CREATE TABLE products (\n id INTEGER PRIMARY KEY,\n name TEXT, \n description TEXT,\n price DECIMAL(10,2)\n);" } ]
codealpaca
[ { "role": "user", "content": "&lt;p&gt;\nLet's consider a function $F(n)$ which represents the count of integers $x≤n$ that can be expressed in the specific form $x=a^2b^3$, where $a$ and $b$ are integers, not necessarily identical, and both exceed 1.&lt;/p&gt;\n&lt;p&gt;\nTo illustrate, $32=2^2\\times 2^3$...
magicoder
[ { "role": "user", "content": "Refactor the following Python code to improve its readability and make it easier to maintain: images = list()\nfor item in allitems:\n if item.endswith('.jpg'):\n images.append(item)" }, { "role": "assistant", "content": "```python\nimages = [item for item in allite...
python25k
[ { "role": "user", "content": "Please provide a [Mark down] document outlining five actionable steps to reduce stress. Your document should include headings, subheadings, bullet points, and any other formatting that will help the reader easily understand and follow the steps. Additionally, please include any...
wizardlm
[ { "role": "user", "content": "Check my IP\n\nChecking your IP address..." }, { "role": "assistant", "content": "```python\nimport socket\nhostname = socket.gethostname()\nIP = socket.gethostbyname(hostname)\nprint(f'Your IP address is {IP}')\n```" } ]
python25k
[ { "role": "user", "content": "A space exploration company wants to recover the cost of their recent asteroid mission by selling diamonds found during their exploration. One diamond weighing 20 grams was discovered and is worth $20 million. To find out how many asteroids they need to explore to recover the c...
wizardlm
[ { "role": "user", "content": "How can I maximize my chances of purchasing limited edition sneakers on release day?" }, { "role": "assistant", "content": "Here are some tips that can help increase your chances of purchasing limited edition sneakers on release day:\n\n1. Sign up for the release no...
wizardlm
[ { "role": "user", "content": "Construct a Python function that seeks out and aggregates all distinct elements from a supplied list, treating the list L = [1, 2, 4, 2, 1] as an example. This function should cleverly eliminate any duplicate values present." }, { "role": "assistant", "content": "Yo...
magicoder
[ { "role": "user", "content": "Allow overriding the DATABASE_URL with an environment varible if in development mode\n\n(Language: Python)\n\nfrom os import getenv\n\nclass Config(object):\n DEBUG = False\n TESTING = False\n SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL')\n STRIP_WWW_PREFIX = Tru...
commitpackft
[ { "role": "user", "content": "**Instructions**\nUse substitution method to solve the following system of equations:\n5x + 2y = 9 \n3x - y = 8\n**Solution**\nWe can solve for y in the second equation:\ny = 3x - 8\nSubstitute this expression for y into the first equation:\n5x + 2(3x - 8) = 9\nSimplify and sol...
wizardlm
[ { "role": "user", "content": "How does a bank assess the liquidity of OTC derivatives such as swaps, options, and forwards, for which there isn't public data regarding trading volume?" }, { "role": "assistant", "content": "Over-The-Counter (OTC) derivatives like swaps, options, and forwards are ...
magicoder
[ { "role": "user", "content": "Is there anyone using Subsonic with asp.net mvc framework? If so, can you tell us something about your experience. Are there tips and tricks that can be shared?" }, { "role": "assistant", "content": "SubSonic is an open-source Object-Relational Mapping (ORM) tool fo...
magicoder
[ { "role": "user", "content": "Demonstrate Python's use of the time module" }, { "role": "assistant", "content": "```python\nimport time\ncurrent_time = time.time()\nformatted_time = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(current_time))\n# Demonstrates fetching the current time and format...
python25k
[ { "role": "user", "content": "Fix indentation; override old-style start() from BackendBase\n\n(Language: Python)\n\nfrom urllib import urlencode\nfrom urllib2 import urlopen\n\nfrom rapidsms.backends.base import BackendBase\n\nclass TropoBackend(BackendBase):\n \"\"\"A RapidSMS threadless backend for Tro...
commitpackft
[ { "role": "user", "content": "Add solution to exercise 4.4.\n\n(Language: Python)" }, { "role": "assistant", "content": "# 3-4 Guest List\n\nguest_list = [\"Albert Einstein\", \"Isac Newton\", \"Marie Curie\", \"Galileo Galilei\"]\n\nmessage = \"Hi \" + guest_list[0] + \" you are invited to dinn...
commitpackft
[ { "role": "user", "content": "Design a robust and effective database schema that can competently accommodate a vast lexicon represented by a thesaurus, inclusive of concomitant synonyms and antonyms for every specified terminology." }, { "role": "assistant", "content": "To create a robust and ef...
magicoder
[ { "role": "user", "content": "Given a pandas dataframe, find out the number of entries under each unique value for a specific column.\nimport pandas as pd\n\ndata = {'vehicle': ['car', 'bus', 'car', 'bike', 'bus', 'bike'],\n 'color': ['blue', 'red', 'green', 'blue', 'blue', 'red'],\n 'price': ...
magicoder
[ { "role": "user", "content": "Add solution to Exercise 1-15.\n\n(Language: C)" }, { "role": "assistant", "content": "/* Exercise 1-15: Rewrite the temperature conversion program of Section 1.2 to\n * use a function for conversion. */\n\n#include <stdio.h>\n#include <stdlib.h>\n\nfloat farenheitT...
commitpackft
[ { "role": "user", "content": "[FIX] Use proper state field for predicate.\n\n(Language: JavaScript)\n\nvar SqlMqWorker = require('sql-mq-worker');\nvar WithdrawalProcessor = require(__dirname+'/../lib/core/withdrawal_processor.js');\nvar gateway = require(__dirname+'/../');\n\nvar worker = new SqlMqWorker({...
commitpackft
[ { "role": "user", "content": "Test both LogLevel.String and .Bytes\n\n(Language: Go)\n\npackage logger\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nfunc TestLogLevelString(t *testing.T) {\n\tt.Parallel()\n\n\ttests := []struct {\n\t\tlvl LogLevel\n\t\texpected string\n\t}{\n\t\t{Debug, \"Debug\"},\n\t\t...
commitpackft
[ { "role": "user", "content": "Devise an HTML document that utilises marquee functionality to continuously scroll the supplied quote across the screen." }, { "role": "assistant", "content": "You can add the scrolling text functionality using the HTML marquee tag. The marquee tag is non-standard H...
magicoder
[ { "role": "user", "content": "Your challenge is to create a short story that not only explores the theme of unrequited love, but also incorporates a complex mathematical formula. Your inspiration is a set of encrypted data that captures the essence of heartbreak. The twist is that the formula must be essent...
wizardlm
[ { "role": "user", "content": "Please provide a comprehensive collection of 10 distinct and persuasive value propositions that a customs brokerage website targeting both novice and experienced importers interested in customs clearance and ISF filing should highlight. The propositions should be concise, no mo...
wizardlm
[ { "role": "user", "content": "Create a CSS code to transform all <p> paragraphs into italicized text with a lavender background color." }, { "role": "assistant", "content": "Here is a simple CSS code that would accomplish this:\n\n```css\np {\n font-style: italic;\n background-color: laven...
magicoder
[ { "role": "user", "content": "Switch REM to MORT due to reverse split issues\n\n(Language: JavaScript)\n\nconst tickers = {\n equities: ['SPY', 'VEU', 'SHY'],\n credit: ['LQD', 'JNK', 'SHY'],\n realEstate: ['VNQ', 'REM', 'SHY'],\n econ: ['GLD', 'TLT', 'SHY'],\n all: [{ symbol: 'SPY', code: 'GOOG/NYSE_S...
commitpackft
[ { "role": "user", "content": "Add a sci notation like universal numeric constructor\n\n(Language: Java)" }, { "role": "assistant", "content": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2017 Barry DeZonia\n * \n * Redistribution and use ...
commitpackft
[ { "role": "user", "content": "Change action creator name to changeGridAction\n\n(Language: JavaScript)\n\nimport {gridChangedAction, GRID_CHANGED} from \"../../src/actions/GameActions.js\";\n\ndescribe(\"Game Actions\", () => {\n\n it(\"should exist\", () => {\n gridChangedAction.should.exist;\n });\n\...
commitpackft
[ { "role": "user", "content": "Create a function in Python that takes in a dictionary and returns a list of all the values my_dictionary = {\n \"a\": 1, \n \"b\": 2,\n \"c\": 3\n}" }, { "role": "assistant", "content": "```python\ndef get_values(dictionary):\n \"\"\"\n Take in a dictionar...
python25k
[ { "role": "user", "content": "How can I securely leverage the authentication token generated by an Azure Active Directory-registered application to access Microsoft Graph API? Your answer should include detailed procedures consisting of multiple steps that demonstrate a deep understanding of the system's ar...
wizardlm
[ { "role": "user", "content": "Due to the complexity of the geometry of the base shape, what adjustments should be made to the formula A = 2πr^2 + 2πrh for the surface area of a cylinder when the base is modified? It is important to take into account the specific properties of the new base shape, such as its...
wizardlm
[ { "role": "user", "content": "Can you write a review of a specific classical music piece with the theme of flatulence? Please include the technical aspects of the composition, the interpretation of the musician, and the overall emotional impact on the audience." }, { "role": "assistant", "conten...
wizardlm
[ { "role": "user", "content": "Can you modify the JavaScript code to list all the European countries that share a land border with the French Republic, including their capital cities and population size? It would be great to also visualize this information in a table format with sortable columns based on the...
wizardlm
[ { "role": "user", "content": "Fix legend gradient label text to use update set.\n\n(Language: JavaScript)\n\nimport {Perc, Label, GuideLabelStyle} from './constants';\nimport guideMark from './guide-mark';\nimport {TextMark} from '../marks/marktypes';\nimport {LegendLabelRole} from '../marks/roles';\nimport...
commitpackft
[ { "role": "user", "content": "What Java libraries and algorithms can I use to analyze the brushstrokes of two different Impressionist paintings and determine their artistic style and potential influences? How can I also use machine learning to identify any underlying political or social commentary within th...
wizardlm
[ { "role": "user", "content": "Edit the following Python code pasted and return the output def print_message(name):\n print(\"Hello \"+name)\n\nprint(\"Matthew\")" }, { "role": "assistant", "content": "```python\ndef print_message(name):\n print(\"Hello \"+name)\n\nname = \"Matthew\"\nprint...
python25k
[ { "role": "user", "content": "Add .js ext to load scripts/slack-github-issues\n\nThis is why Hubot wasn't finding the script. `robot.loadFile` will only try to\nload the file if it has an extension in `require.extensions`.\n\n(Language: JavaScript)\n\n/* jshint node: true */\n'use strict';\n\nvar path = req...
commitpackft
[ { "role": "user", "content": "Rewrite a program in Java that will generate a random string of 10 characters." }, { "role": "assistant", "content": "You can use the `Random` class in java in combination with `StringBuilder` to generate a random string of 10 characters. Here is a sample program:\n...
magicoder
[ { "role": "user", "content": "How can I enhance this sentence to make it more descriptive and set it in the past tense using Python code? Here's the original sentence: \nThe feline [hopped] onto the [table]." }, { "role": "assistant", "content": "Here's an enhanced sentence in the past tense: \n...
wizardlm
[ { "role": "user", "content": "Generate a tweet about the environment." }, { "role": "assistant", "content": "\"As our planet faces unprecedented challenges, it's time for us to step up and take action to protect the environment. Let's work together to create a sustainable future for generations ...
wizardlm
[ { "role": "user", "content": "For Example: [Sunset-Sunrise.org](https://sunrise-sunset.org/search?location=Sahara) provides sunset/sunrise time with HH:MM:SS format.\n\n\nGiven a time such as 12:53:57, I want to round the seconds to 12:54:00. Please advise." }, { "role": "assistant", "content": ...
python25k
[ { "role": "user", "content": "Berikan beberapa contoh penelitian yang dapat dilakukan untuk mempelajari pengaruh strategi pemasaran online terhadap kinerja keuangan sebuah perusahaan. Bagaimana cara mengidentifikasi gap dalam penelitian ini?" }, { "role": "assistant", "content": "Beberapa contoh...
wizardlm
[ { "role": "user", "content": "Define chdir as a macro.\n\nThe previous definition was uselessly complicated, and lacked the\nproper API declaration.\n\n\t* include/libport/unistd.h (chdir): Define as \"_chdir\".\n\n(Language: C)\n\n#ifndef LIBPORT_UNISTD_H\n# define LIBPORT_UNISTD_H\n\n# include <libport/de...
commitpackft
[ { "role": "user", "content": "{\"image_enhancement_process\": {\n \"step_1\": \"Contrast stretching using histogram equalization\",\n \"step_2\": \"Unsharp masking to enhance edges and details\",\n \"step_3\": \"Noise reduction using bilateral filtering\",\n \"step_4\": \"Combining the above steps using...
wizardlm
[ { "role": "user", "content": "Develop a function that computes the geometric, harmonic and arithmetic mean of a given array of positive integers. The function should return the result with the standards of floating-point precision.\n\nImplement this function:\n\narr = [1, 2, 3, 4, 5] \n\nNote: The geometric...
magicoder
[ { "role": "user", "content": "Construct a system for categorizing customer inquiries by type." }, { "role": "assistant", "content": "1. Identify the primary types of customer inquiries: \n - Product inquiries\n - Service inquiries\n - Technical inquiries\n - Billing inquiries\n - Shipp...
wizardlm
[ { "role": "user", "content": "Refactor the provided HTML snippet by modifying it in such a competent way that all its intrinsic elements, comprising both the heading and the paragraph, are meticulously aligned to the center of the page.\n<div>\n <h1>Hello World!</h1>\n <p>This is a paragraph</p>\n</di...
magicoder
[ { "role": "user", "content": "Allow as much writing as needed after sync switch.\n\n(Language: JavaScript)\n\nvar Queue = require('prolific.queue')\nvar createUncaughtExceptionHandler = require('./uncaught')\nvar abend = require('abend')\n\nfunction Shuttle (input, output, sync, uncaught, process) {\n th...
commitpackft
[ { "role": "user", "content": "Identify and add together the individual elements embedded within the multi-level structural pattern provided below.\nmy_array = [[1,2], 3, 4]" }, { "role": "assistant", "content": "One can solve this problem by using a simple recursive function to loop through each...
magicoder
[ { "role": "user", "content": "Add collection class for stealing data from the ECU\n\n(Language: Python)" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# coding=utf-8\n\nimport serial\n\n\nclass EcuCollector():\n SENTINEL = b'X'\n RESPONSE_LENGTH = 91\n\n\n def __init__(s...
commitpackft
[ { "role": "user", "content": "Please provide a detailed explanation of the possible reasons for the failure of the given RSpec code snippet, while also taking into consideration the integration of additional components or dependencies that may have an impact on the code execution. Your explanation should in...
wizardlm
[ { "role": "user", "content": "Based on the given scenario, how can we use Swift code to determine the potential legal consequences for the company? Please provide an analysis of the following data:\nlet poorFinancialDecisions = true\nlet socialMediaScandal = true\nlet poorHRPractices = true\nif poorFinancia...
wizardlm
[ { "role": "user", "content": "Looking to expand the snack options on your menu, as a food delivery business owner, you're looking for more specific suggestions for a variety of snack items that are perfect for sharing with a group of two or more. To make your menu unique, focus on snack items that are inspi...
wizardlm
[ { "role": "user", "content": "Develop a Python function that can remove an element from a specific index in the list and replace it with a new provided element. Use the following list for the task:\ninitial_list = [10, 20, 30, 40, 50]" }, { "role": "assistant", "content": "Sure, Here is a simple...
magicoder
[ { "role": "user", "content": "Localize the passage according to the language and format of the target culture.\nThe weekend is coming and it's time to relax and unwind." }, { "role": "assistant", "content": "French: Le week-end approche et il est temps de se détendre et de se relaxer.\nJapanese:...
wizardlm
[ { "role": "user", "content": "Create a JavaScript function that finds the shortest word in a string.\nsentence = \"I'm so excited to begin this journey\"" }, { "role": "assistant", "content": "function findShortestWord(sentence) { \n let words = sentence.split(\" \"); \n let shortestWord =...
codealpaca
[ { "role": "user", "content": "As a seasoned travel planner, you are assigned to curate an elaborate 2 week daily schedule for a young couple heading off to Tanzania tomorrow. Their preferences lie in cocktails, clubbing, museums, scrumptious delicacies, music and possibly ocean-related activities. The cavea...
wizardlm
[ { "role": "user", "content": "translate the following code to lua, please:\ndef compare_word_sets(phrase1: str, phrase2: str) -> bool:\n # Create sets from the input strings. Sets automatically remove duplicates and don't care about order.\n set1 = set(phrase1.split())\n set2 = set(phrase2.split())...
magicoder
[ { "role": "user", "content": "1. [애드샌스 수익얻기] 이 시드 키워드로 어떤 추가 키워드를 타겟팅할 수 있나요? \n2. 기존 키워드 목록에 더하여, 해당 시드 키워드와 관련된 다른 동의어 또는 유의어를 찾아서, 더욱 구체적인 롱테일 버전을 만들어 볼 수 있을까요? \n3. 해당 시드 키워드와 유사한 주제 또는 관련 주제를 고려하여, 블로그에서 다룰 수 있는 새로운 카테고리를 생성할 수 있을까요? \n4. 첫 번째 카테고리에서는, 해당 주제와 관련된 다른 검색어를 찾아서 새로운 SEO 키워드 10개를 생각해 볼 수 있을...
wizardlm
[ { "role": "user", "content": "A warehouse manages three categories of oranges weighing a, b, c kg per 1000 units respectively. The warehouse gets a purchase order for a custom basket of 25kg containing a specified ratio of these three types of oranges. However, the following conditions are applied:\n\n- The...
magicoder
[ { "role": "user", "content": "Add a header file for the POSIX filesystem.\n\nThis header only exposes `TF_InitPlugin` as we need to call this\nfunction when registering the local filesystems statically.\n\n(Language: C)" }, { "role": "assistant", "content": "/* Copyright 2020 The TensorFlow Auth...
commitpackft
[ { "role": "user", "content": "Describe the Heap Sort algorithm." }, { "role": "assistant", "content": "Heap Sort is a comparison-based sorting algorithm in which the data is organized into a heap data structure. The heap is then sorted increasingly by repeatedly removing the root element, swappi...
codealpaca
[ { "role": "user", "content": "Write a function that returns the maximum value between two numbers in Python" }, { "role": "assistant", "content": "```python\ndef get_max(a, b):\n if a > b:\n return a\n else:\n return b\n```" } ]
python25k
[ { "role": "user", "content": "Identify the bugs in the following python code and fix them.\ndef multiply_dicts(d1, d2):\n for key in d1:\n d1[key] = d2[d1[key]]" }, { "role": "assistant", "content": "def multiply_dicts(d1, d2):\n for key in d1:\n if key in d2:\n d1...
codealpaca
[ { "role": "user", "content": "Write a function to delete a node with a specified value from the given singly linked list. If the value is not found in the list, do nothing.\n\nLinked list: 10 --> 20 --> 30\nValue to delete: 10\n\nAdditionally, consider the following erroneous code as a reference to solve th...
magicoder
[ { "role": "user", "content": "In a PostgreSQL database, write a command to change the contact number associated with a customer in the \"customers\" table, specifically targeting the customer who has the customer ID \"Cust123\"." }, { "role": "assistant", "content": "You can use the UPDATE comma...
magicoder
[ { "role": "user", "content": "Improve the instructions on twitter application auth\n\n(Language: Python)\n\nimport requests\nimport base64\nimport sys\n\nif len(sys.argv) < 3:\n print \"Usage: twitter_application_auth.py <consumer key> <consumer secret>\"\n sys.exit(1)\n\nconsumer_key = sys.argv[1]\nc...
commitpackft
[ { "role": "user", "content": "Mark splitting as optional in transaction status\n\n(Language: TypeScript)\n\nimport {CardResponse} from './CardResponse';\nimport {Status} from './Status';\nimport {Acquirer} from './Acquirer';\nimport {Revert} from './Revert';\nimport {Customer} from './Customer';\nimport {Sp...
commitpackft
[ { "role": "user", "content": "Construct a C# method for validating whether a provided numeral is an Armstrong number or not. An Armstrong number is characterized as a number that is equivalent to the cumulative total of its individual digits when each is elevated to the power equivalent to the count of digi...
magicoder
[ { "role": "user", "content": "Create a responsive image gallery with a custom scrollbar for my portfolio website." }, { "role": "assistant", "content": "To create a responsive image gallery with a custom scrollbar for your portfolio website, you can follow these steps:\n\n1. Create an HTML struc...
wizardlm
[ { "role": "user", "content": "Which professors make great mentors to undergraduates at Delhi Technological University (especially in Data Mining)?\nWhich kinds of software and technology are involved in data mining? How is data mining regulated or processed, if at all?\n\nAre these two questions inquiring a...
python25k
[ { "role": "user", "content": "Write a Python program to classify the type of an angle based on the measure of the angle angle = 180" }, { "role": "assistant", "content": "```python\ndef classify_angle(angle):\n if angle == 0:\n return \"Zero angle\"\n elif angle > 0 and angle < 90:\n ret...
python25k
[ { "role": "user", "content": "Add some UCL-related definitions to be shared by the RTPP code.\n\n(Language: C)" }, { "role": "assistant", "content": "/*\n * Copyright (c) 2018 Sippy Software, Inc., http://www.sippysoft.com\n * All rights reserved.\n *\n * Redistribution and use in source and bin...
commitpackft
[ { "role": "user", "content": "I have this problem : Word Search with Diagonal Movements\nDescription are as below: Given an `m x n` grid of characters `board` and a string `word`, return `true` if `word` exists in the grid.\n\nThe word can be constructed from letters of sequentially adjacent cells, where ad...
magicoder
[ { "role": "user", "content": "Test Class Update: Change UIScope => VaadinUIScope\n\n(Language: Java)\n\npackage org.vaadin.spring.mvp.explicit;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotatio...
commitpackft
[ { "role": "user", "content": "Calculate the sum of the following series and provide the result\n1+4+9+16+25" }, { "role": "assistant", "content": "The given series is the sum of squares of first 5 natural numbers.\n\nSum of squares of first n natural numbers = (n(n+1)(2n+1))/6\n\nFor n=5, sum of...
wizardlm
[ { "role": "user", "content": "How can we create a new environment for Python 3.6 on Anaconda platform that is capable of supporting the installation of tensorflow\\_gpu-1.12.0, and incorporates CUDA9.0 and CUDNN7.4.2? In addition, can you provide a detailed description of the sequential actions to be follow...
wizardlm
[ { "role": "user", "content": "Can you modify the provided Go code to output the names of sports classified as played in a team that have more than two words in their name from this [XML data] set? Additionally, please include the total number of team sports in the output." }, { "role": "assistant", ...
wizardlm