messages
listlengths
2
2
source
stringclasses
5 values
[ { "role": "user", "content": "Craft a compelling story where a vampire detective tries to solve a murder case but has to navigate the complications of their own vampirism. The narrative must incorporate at least three instances where the protagonist's unique abilities and limitations as a vampire play a sig...
wizardlm
[ { "role": "user", "content": "Check for any retrotransposed transcripts that have translations (shouldn't be any).\n\n(Language: Java)" }, { "role": "assistant", "content": "/*\n Copyright (C) 2003 EBI, GRL\n \n This library is free software; you can redistribute it and/or\n modify it under the ...
commitpackft
[ { "role": "user", "content": "How can I identify the outlier in a set of objects using the given code? The code I have is:\ndef find_outlier(objects):\n counts = {}\n for obj in objects:\n count = sum([1 for other in objects if other != obj and other in obj])\n counts[obj] = count\n s...
wizardlm
[ { "role": "user", "content": "Add RunWithLogs function to sh\n\nSigned-off-by: Ryan O'Leary <32139beaa9c574695821e85473b09a4e33316467@google.com>\n\n(Language: Go)\n\n// Copyright 2018 the u-root Authors. All rights reserved\n// Use of this source code is governed by a BSD-style\n// license that can be foun...
commitpackft
[ { "role": "user", "content": "If the variable n is assigned a value of 11 and it is substituted into the mathematical expression of 10 - (n + 6), could you elaborate on what the resulting value would be?" }, { "role": "assistant", "content": "First, the value of n needs to be substituted into th...
magicoder
[ { "role": "user", "content": "Support WS2812Serial Library on Teensy T4\n\nRecently there was reported that the WS2812Serial library (github.com/PaulStoffregen/WS2812Serial) was not ported over to work on the new Teensy T4, so I thought I would take a look.\n\nI added the T4 support, which is now pending in...
commitpackft
[ { "role": "user", "content": "Complete TODOs for T07.01 CreateAContract exercise\n\n(Language: Java)\n\npackage com.example.android.waitlist.data;\n\nimport android.provider.BaseColumns;\n\npublic class WaitlistContract {\n\n\n\n // TODO (1) Create an inner class named WaitlistEntry class that implements...
commitpackft
[ { "role": "user", "content": "Create a function that takes as input a string and evaluates its quantity to true or false." }, { "role": "assistant", "content": "def is_empty(str):\n ''' This function takes as input a string and evaluates its \n quantity to true or false.\n '''\n if len(s...
codealpaca
[ { "role": "user", "content": "Use `reducer` to replace `prepare`\n\n(Language: Python)\n\n__all__ = []\n\nfrom lib.exp.featx.base import Feats\nfrom lib.exp.tools.slider import Slider\nfrom lib.exp.tools.video import Video\nfrom lib.exp.prepare import Prepare\n\n\nclass Featx(Feats):\n def __init__(self,...
commitpackft
[ { "role": "user", "content": "Fix import in private HTMLNode header\n\n(Language: C)\n\n//\n// HTMLNode+Private.h\n// HTMLKit\n//\n// Created by Iska on 20/12/15.\n// Copyright © 2015 BrainCookie. All rights reserved.\n//\n\n///------------------------------------------------------\n/// HTMLKit private ...
commitpackft
[ { "role": "user", "content": "Add a requirement in #The Given Prompt# where only the age of the people whose names start with 'C' should be printed." }, { "role": "assistant", "content": "Modified Prompt:\n\nYou have been given a list of dictionaries containing information about people. Each dic...
wizardlm
[ { "role": "user", "content": "Execute code: import sqlite3\nconn = sqlite3.connect('example.db')" }, { "role": "assistant", "content": "```python\nimport sqlite3\nconn = sqlite3.connect('example.db')\n# Code executed.\n```" } ]
python25k
[ { "role": "user", "content": "Revert \"Update GitHub blog feed URL\"\n\nThis reverts commit 5b7a1ba116731b0e7302ff27b385504876ddd04e.\n\n(Language: Java)\n\npackage com.gh4a.model;\n\nimport io.reactivex.Single;\nimport retrofit2.Response;\nimport retrofit2.http.GET;\nimport retrofit2.http.Path;\n\npublic i...
commitpackft
[ { "role": "user", "content": "I'd like this translated to Java:\nfrom typing import List, Tuple\n\ndef below_zero(operations: List[Tuple[str, int]], case_insensitive: bool = False) -> bool:\n balance = 0\n for op, amount in operations:\n if case_insensitive:\n op = op.lower()\n ...
magicoder
[ { "role": "user", "content": "Edit this convoluted phrase concerning responsibility attribution.\nAs I was the individual responsible for the error, I became the individual who bore the consequences for it." }, { "role": "assistant", "content": "Since I was responsible for the error, I had to fa...
wizardlm
[ { "role": "user", "content": "Expand upon the following code:\n/*\nThis function takes in a vector 'l', and returns a new vector 'l'', wherein the positioning of 'l'' and 'l' is identical regarding non-multiples of 3. However, for values at positions which are multiples of 3, 'l'' holds identical values to ...
magicoder
[ { "role": "user", "content": "Employ the libraries numpy and pandas to compute the mode of the following numerical array [9, 5, 6, 9, 5, 3, 2, 5]. Furthermore, devise a strategy to manage scenarios where the data set exhibits more than one mode." }, { "role": "assistant", "content": "In Python, ...
magicoder
[ { "role": "user", "content": "i need to see how this would be in c++:\nimport psycopg2\nfrom tensorflow import keras\nimport bert\nfrom bert import BertModelLayer\nfrom bert.loader import StockBertConfig, map_stock_config_to_params, load_stock_weights\nfrom bert.tokenization.bert_tokenization import FullTok...
magicoder
[ { "role": "user", "content": "Develop a piece of code that scrutinizes an array of string elements and yields a boolean value of true if every single character within the array adheres to the uppercase format, and false if this condition is not met.\nwords = [\"HELLO\", \"WORLD\", \"TEST\"]" }, { "r...
magicoder
[ { "role": "user", "content": "i'd like to see how this is done in go:\nclass TreeNode:\n def __init__(self, x):\n self.val = x\n self.left = None\n self.right = None\n\ndef sum_of_left_leaves(root):\n \"\"\"Return the sum of all left leaves in the binary tree rooted at root.\"\"\"...
magicoder
[ { "role": "user", "content": "I want to be able to get an estimate of how much code & static data is used by my C++ program?\n\nIs there a way to find this out by looking at the executable or object files? Or perhaps something I can do at runtime?\n\nWill objdump & readelf help?" }, { "role": "assi...
magicoder
[ { "role": "user", "content": "Enhance the given prompt by adding a constraint related to security:\n\n#The Given Prompt#:\n\nelaborate on this \nPart 1: Introduction to Linux\n\nWhat is Linux? History and background\nLinux distributions (Ubuntu, Fedora, Debian, etc.)\nAdvantages of Linux (open-source, stabi...
wizardlm
[ { "role": "user", "content": "Use ContainerCommitResponse struct for Commit cmd\n\nSigned-off-by: Jamie Hannaford <c9546c123e0c53bfdcf5b9c232ec97637bb6aa8f@rackspace.com>\n\n(Language: Go)\n\npackage types\n\n// ContainerCreateResponse contains the information returned to a client on the\n// creation of a n...
commitpackft
[ { "role": "user", "content": "Use existing method to create an AddFileInterface\n\n(Language: Java)\n\n// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.\npackage com.yahoo.vespa.config.server.filedistribution;\n\nimport com.google.inject.Inject;...
commitpackft
[ { "role": "user", "content": "Add testcase missed from r181527.\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@181531 91177308-0d34-0410-b5e6-96231b3b80d8\n\n(Language: C)" }, { "role": "assistant", "content": "// RUN: %clang -fsyntax-only %s\n\n#ifdef __STDC_HOSTED__\n\n#include <tgm...
commitpackft
[ { "role": "user", "content": "As a writer, I have realized that sharing my work with others who possess the same knowledge as me has been extremely beneficial for my writing career. However, I have a hard time finding suitable software that lets me edit, make changes, and transfer the work to my fellow writ...
wizardlm
[ { "role": "user", "content": "How can I calculate the number of trips required to transport 5000 kilograms of goods across the sea using my boat with varying weight carrying capacity due to sea tides? The weight carrying capacity of my boat at any given time can be calculated using the formula BoatCapacity ...
wizardlm
[ { "role": "user", "content": "Construct a While Loop in JavaScript." }, { "role": "assistant", "content": "let i = 0; \nwhile (i < 10) { \n console.log(i); \n i++; \n}" } ]
codealpaca
[ { "role": "user", "content": "Can we play a text-based adventure game where a player navigates through a dungeon, fights monsters, collects loot, and solves puzzles using a character with customizable attributes and skills? The game uses a command-line interface and generates descriptions and responses base...
wizardlm
[ { "role": "user", "content": "Execute code: import pandas as pd\ndf = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})" }, { "role": "assistant", "content": "```python\nimport pandas as pd\ndf = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})\n# Code executed.\n```" } ]
python25k
[ { "role": "user", "content": "What are the key insights behind the concept of \"microscopic mindfulness\" and how can they be applied to improve decision-making in our daily lives?" }, { "role": "assistant", "content": "The concept of \"microscopic mindfulness\" emphasizes the importance of payi...
wizardlm
[ { "role": "user", "content": "Add ratechecker migration to remove_fee_loader\n\n(Language: Python)" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.22 on 2019-10-31 16:33\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nc...
commitpackft
[ { "role": "user", "content": "Remove `keys` from the TBot struct.\n\nThe keys struct is not needed after we have initialized the bot.\n\n(Language: Go)\n\npackage twitterbot\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/ChimeraCoder/anaconda\"\n)\n\ntype TBot struct {\n\tapi *anaconda.TwitterApi\n\t...
commitpackft
[ { "role": "user", "content": "Please develop a JavaScript function that is capable of effectively validating a Brazilian Individual Taxpayer Registry (Cadastro de Pessoas Físicas or CPF), with specific consideration of digits verification, blacklist validation, and additional rules set by the Brazilian gove...
wizardlm
[ { "role": "user", "content": "How to print line numbers to the log. Say when outputting some information to the log, I also want to print the line number where that output is in the source code. As we can see in the stack trace, it displays the line number where the exception has occurred. Stack trace is av...
magicoder
[ { "role": "user", "content": "How can the Venice immersive experience be modified to incorporate elements of other explorers' lives and achievements?\n\nThe immersive experience in Venice consists of six stops where participants must solve challenges related to Marco Polo's life and works." }, { "ro...
wizardlm
[ { "role": "user", "content": "Write a science fiction story about a team of researchers who discover a planet that causes a temporary genetic mutation in any human who sets foot on it, giving them a random superpower that lasts for only 24 hours." }, { "role": "assistant", "content": "In the yea...
wizardlm
[ { "role": "user", "content": "Fix return value of main().\n\n[r19359]\n\n(Language: C)\n\nint x = 0;\n\nint main(int argc, char *argv[]) {\n\tint y;\n\tchar *p = &x;\n\n\t*p = 23;\n\ty = x;\n\tx = 35;\n\treturn y;\n}" }, { "role": "assistant", "content": "int x = 0;\n\nint main(int argc, char *a...
commitpackft
[ { "role": "user", "content": "What about this:\n\n请列举出至少十种口感不同的水果,并分别描述它们的味道、香气和口感特点。" }, { "role": "assistant", "content": "1. 苹果:味道爽口甜润,香气清新,口感脆嫩多汁。\n2. 葡萄:味道酸甜清爽,香气芳香,口感有弹性、柔软,汁水丰富。\n3. 榴莲:味道浓郁、香甜,香气强烈,口感细腻顺滑。\n4. 火龙果:味道甜润,香气清新,口感爽口脆嫩。\n5. 香蕉:味道香甜,香气浓郁,口感柔软细腻,稍微带有一点点粘稠。\n6. 草莓:味道酸甜,香气浓郁,口感脆嫩,...
wizardlm
[ { "role": "user", "content": "We can return struct literal from a function by casting anonymous literal initializer to the return type:\n\nstruct foo f() {\n return (struct foo) { .bar = 42 };\n}\n\n\nIs it possible without mentioning `struct foo` anywhere in the initializer? Separate declaration:\n\nstr...
magicoder
[ { "role": "user", "content": "In what ways can data breaches caused by weak passwords harm a company's reputation, financial stability, and legal liability, and what additional measures can be implemented beyond banning commonly used passwords to prevent such breaches from occurring?" }, { "role": "...
wizardlm
[ { "role": "user", "content": "Generate a HTML page with a table of contents that links to sections on the same page. Additionally, implement a feature that highlights the current section in the table of contents as the user scrolls through the page." }, { "role": "assistant", "content": "Creatin...
magicoder
[ { "role": "user", "content": "Create a Python function that prints all the values in a dictionary.\nDictionary: { \"a\": 1, \"b\": 2, \"c\": 3 }" }, { "role": "assistant", "content": "def printDictValues(dict):\n    for key, value in dict.items():\n        print(value)\n\nprintDictValues({\"a\"...
codealpaca
[ { "role": "user", "content": "Create a function that accepts an acronym and returns its full form. This should account for a list of predefined acronyms and their corresponding full forms (add at least ten items in this list for testing). The function should be case insensitive. If the acronym is not in the...
magicoder
[ { "role": "user", "content": "What is the Keras library used for?" }, { "role": "assistant", "content": "Keras is an open-source library used for creating and training models in deep learning. It is designed to be user-friendly and allows E-commerce developers to quickly build powerful neural ne...
codealpaca
[ { "role": "user", "content": "Design a seamless checkout page for an e-commerce website that not only allows customers to review their current order but also provides them with personalized product recommendations based on their browsing history and previous purchases, thus ensuring a tailored experience fo...
wizardlm
[ { "role": "user", "content": "How can you modify the given code to print \"Output 2\" instead of \"Output 1\"? What changes do you need to make in the conditional statements?\n\n```python\nx = 10\ny = 20\nif x >= 10 and y <= 20:\n print(\"Output 1\")\nelif x > 10 or y < 20:\n print(\"Output 2\")\nelse...
wizardlm
[ { "role": "user", "content": "Compose an essay highlighting the unique and distinctive features that set apart the lesser-known cities of Lucca and Perugia from the famous Italian cities of Rome and Florence. The essay should examine the cultural, historical, and artistic disparities between the two lesser-...
wizardlm
[ { "role": "user", "content": "Implement merge sort using Java code.\n\nSolution:\npublic class MergeSort {\n public void merge(int[] arr, int l, int m, int r) {\n int n1 = m - l + 1;\n int n2 = r - m;\n int L[] = new int[n1];\n int R[] = new int[n2];\n for (int i = 0; i...
wizardlm
[ { "role": "user", "content": "What is the optimal approach for determining if an array includes any occurrence of the None value, requiring multiple steps of reasoning?" }, { "role": "assistant", "content": "In Python, you can use the `in` keyword to determine if an array (or list, in Python ter...
magicoder
[ { "role": "user", "content": "Develop a C language program to calculate the summation of every pair of adjacent elements within an integer array and display the resulting sums.\nnumbers = [2, 3, 4, 5, 6]" }, { "role": "assistant", "content": "Below is a simple C program that fulfills your requir...
magicoder
[ { "role": "user", "content": "Modify this HTML to add a paragraph element, style it with CSS internally and also attach an event listener on it using JavaScript that triggers an alert on clicking the paragraph.\n\n<div class=\"example\">\n <h2>Example</h2>\n</div>" }, { "role": "assistant", "co...
magicoder
[ { "role": "user", "content": "Suppose I have 2 pods podA and podB, each one having 2 containers.\nI'd like to diplay:\n\npodA containerA\npodA containerB\npodB containerA\npodB containerB\n\n\nUsing jsonpath, I'm only able to display this kind of output\n\npodA containerA\ncontainerB\npodB containerA\nconta...
magicoder
[ { "role": "user", "content": "Add caret to start of regex\n\nThis counteracts an issue where initializers within test directories\ncould be automatically loaded.\n\n(Language: JavaScript)\n\n(function() {\ndefine(\"ember/load-initializers\",\n [],\n function() {\n \"use strict\";\n\n return {\n ...
commitpackft
[ { "role": "user", "content": "If a high school wanted to gain insight about the experiences of last year's graduating class, so they sent a survey to a randomly selected group of 75 students. Unfortunately, 27 students did not participate by returning the survey. From a statistical analysis perspective, whi...
magicoder
[ { "role": "user", "content": "I have the following string and I would like to remove `<bpt *>*</bpt>` and `<ept *>*</ept>` (notice the additional tag content inside them that also needs to be removed) without using a XML parser (overhead too large for tiny strings).\n\n\nThe big <bpt i=\"1\" x=\"1\" type=\...
magicoder
[ { "role": "user", "content": "Construct a Python function, which, upon receiving any string of text input, has the capability of converting and returning the entire text in its uppercase form." }, { "role": "assistant", "content": "Here's a simple Python function that converts a string to upperc...
magicoder
[ { "role": "user", "content": "Remove unused persistententity utils code\n\n(Language: Java)\n\npackage internal.org.springframework.content.rest.utils;\n\nimport org.springframework.data.mapping.PersistentEntity;\nimport org.springframework.data.mapping.PersistentProperty;\nimport org.springframework.data.r...
commitpackft
[ { "role": "user", "content": "Add a unittest for spacegroup. Still very basic.\n\n(Language: Python)" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n'''\nCreated on Mar 12, 2012\n'''\n\nfrom __future__ import division\n\n__author__=\"Shyue Ping Ong\"\n__copyright__ = \"Copyright ...
commitpackft
[ { "role": "user", "content": "Find the output of the following .NET Core code snippet.\nint[] numbers = {2, 3, 5, 7};\n\nvar result = numbers.Where(x => x % 2 == 0).Sum();" }, { "role": "assistant", "content": "The output of the code snippet is 10, as 2 and 6 (the two even numbers in the array) ...
codealpaca
[ { "role": "user", "content": "Create a Java program that not only outputs the word with the most number of characters within a user-inputted string or sentence, such as \"Hello my name is John\", but also incorporates the following additional features:\n\n1. If there's a tie between two or more words with t...
magicoder
[ { "role": "user", "content": "Please provide an [ HTML page ] that lists the major gases and their percentages found in Earth's atmosphere. Additionally, please include information on how the levels of these gases are measured and their impact on the environment. Moreover, please ensure that the HTML page i...
wizardlm
[ { "role": "user", "content": "Create tile view GUI component\n\n(Language: Java)" }, { "role": "assistant", "content": "package j2048.jgamegui;\n\nimport j2048.Tile;\n\nimport java.awt.Color;\nimport java.awt.Font;\nimport java.awt.Graphics2D;\nimport java.awt.geom.RoundRectangle2D;\n\nimport jg...
commitpackft
[ { "role": "user", "content": "How can I use C++ to analyze the data from my goldfish memory retention study? I have a sample of 100 goldfish and have recorded their reaction to a stimulus over a period of time in an Excel table. My hypothesis is that the statement \"Goldfish have a 3-second memory\" is fals...
wizardlm
[ { "role": "user", "content": "How can a person with a stable of 25 horses determine the three fastest among them? Given that only five horses can race at a time, what is the minimum number of races required to identify the top three horses?" }, { "role": "assistant", "content": "To determine the...
wizardlm
[ { "role": "user", "content": "Analyze the environmental impact of a given type of transport\nAir transport" }, { "role": "assistant", "content": "Air transport is one of the fastest modes of transportation that enables people and goods to travel long distances quickly. However, it has a signific...
wizardlm
[ { "role": "user", "content": "Explain a quick sort algorithm in 3 sentences." }, { "role": "assistant", "content": "Quick sort is an efficient sorting algorithm that divide-and-conquer approach. It picks an element as a pivot from the array and partitions the array around the pivot. It recursi...
codealpaca
[ { "role": "user", "content": "Remove layer also in the add layer test\n\n(Language: JavaScript)\n\n/* See license.txt for terms of usage */\n\n\"use strict\";\n\nconst { exist, addNewLayer } = require(\"./common.js\");\nconst { closeTab } = require(\"sdk/tabs/utils\");\n\n/**\n * Add layer and check that it...
commitpackft
[ { "role": "user", "content": "I am trying to scrape of prices of products from different webshops.\nI am doing this in `Python` with `requests` and `BeautifulSoup`.\nI want to scrape a price of a product but I don't see it come up in the output.\nMy code looks like this:\n\nresponse = requests.get('https://...
magicoder
[ { "role": "user", "content": "Add explicit specifier to Simulator ctor\n\n(Language: C)\n\n/*\n * simulator.h - interface for simulator\n * Copyright 2018 MIPT-MIPS\n */\n\n#ifndef SIMULATOR_H\n#define SIMULATOR_H\n \n#include <memory.h>\n \n#include <infra/types.h>\n#include <infra/log.h>\n \nclass Simulat...
commitpackft
[ { "role": "user", "content": "Show Python's use of coroutines\n\nPython coroutines provide more powerful data flow control compared to generators..." }, { "role": "assistant", "content": "async def my_coroutine():\n print('Hello')\n await asyncio.sleep(1)\n print('World')\n# Demonstrate...
python25k
[ { "role": "user", "content": "Delete main widget in BasicUi\n\n(Language: C)\n\n#ifndef BASICUI_H_\n#define BASICUI_H_\n\n#include <QMainWindow>\n\nclass MainWidget;\nclass Workspace;\n\nclass BasicUi: public QMainWindow {\n\n Q_OBJECT\n\n public:\n BasicUi(QWidget *parent = 0);\n void s...
commitpackft
[ { "role": "user", "content": "How can I create a quiz in JavaScript that prompts the user with two riddles, one related to their darkest moment and one related to their brightest moment, before granting access to two different doors in a virtual room? The goal is to turn off a light bulb in the \"darkness\"...
wizardlm
[ { "role": "user", "content": "Test update: added toggle to edit enabled field\n\nsvn changeset:4325/svn branch:trunk\n\n(Language: Java)\n\n/* \n@ITMillApache2LicenseForJavaFiles@\n */\n\npackage com.itmill.toolkit.tests;\n\nimport com.itmill.toolkit.data.Property.ValueChangeEvent;\nimport com.itmill.toolki...
commitpackft
[ { "role": "user", "content": "Add test for converting architecture's string description to Architecture enum\n\n(Language: Java)" }, { "role": "assistant", "content": "package tests;\n\nimport static org.junit.Assert.assertEquals;\n\nimport org.junit.Test;\n\nimport util.PlatformSpecific;\nimpor...
commitpackft
[ { "role": "user", "content": "How can I use Python to determine the nutrient composition of an exotic fruit and compare it with that of a common banana? Can you provide a Python code that can analyze data and perform calculations to come up with a conclusion?" }, { "role": "assistant", "content"...
wizardlm
[ { "role": "user", "content": "As someone with experience creating social media templates, I am looking to expand my skill set by joining the Fiverr freelance community. Please provide me with a captivating gig idea that highlights my ability to produce visually stunning and engaging templates tailored for a...
wizardlm
[ { "role": "user", "content": "A company is hiring data scientists to work with their GPT model. They want to test the candidates' ability to understand and work with different types of inputs. \nThey provide the candidates with four datasets: \n1. A text dataset containing 1 million rows of customer reviews...
wizardlm
[ { "role": "user", "content": "What does the `filter()` method do in Python?" }, { "role": "assistant", "content": "The filter() method in Python takes in a function and a list as arguments. The function is called with all the items in the list and a new list is returned which contains items\nfor...
codealpaca
[ { "role": "user", "content": "Develop a Python script that reads a file containing lines of hexadecimal values. For each line of hexadecimal value, it should convert to its equivalent ASCII character and save the converted characters into a new file. The script should also be able to handle errors for inval...
magicoder
[ { "role": "user", "content": "Add dagger module for SavingsAccountsDataManager\n\n(Language: Java)" }, { "role": "assistant", "content": "package de.fau.amos.virtualledger.android.dagger.module;\n\nimport javax.inject.Singleton;\n\nimport dagger.Module;\nimport dagger.Provides;\nimport de.fau.am...
commitpackft
[ { "role": "user", "content": "Use glitch-soc's poll component instead of upstream's\n\n(Language: JavaScript)\n\nimport { connect } from 'react-redux';\nimport Poll from 'mastodon/components/poll';\n\nconst mapStateToProps = (state, { pollId }) => ({\n poll: state.getIn(['polls', pollId]),\n});\n\nexport d...
commitpackft
[ { "role": "user", "content": "Using the conversion formula for Fahrenheit to Celsius, find the equivalent Celsius temperature of the Fahrenheit temperature 80 degrees. Additionally, calculate the Kelvin temperature equivalent of the resulting Celsius temperature and compare it to the boiling point of water ...
wizardlm
[ { "role": "user", "content": "Support -1 gamemode (not set), while it's not valid gamemode and should\nbe only used as starting gamemode for server internals, sometimes custom\nnpc plugins do not set it. All supported versions support this gamemode,\nand no internal logic depends on it, so allowing it shoul...
commitpackft
[ { "role": "user", "content": "I am trying to understand what the \"correct\"/optimal way of betting is using the Kelly Criterion but for bets that don't immediately give an outcome.\nFor example, I have 100 dollars. I get a buy signal, I run Kelly Criterion and it says optimal is 20% bet, so I put 20 dollar...
magicoder
[ { "role": "user", "content": "Prompt: Our platform takes great care in ensuring that all users' content is respectful and culturally sensitive, and in compliance with local and international ethical standards. To enhance our security measures, we are introducing a new system where users' content will be rev...
wizardlm
[ { "role": "user", "content": "I want to hold onto packets that fail the crc check. To do this I have commented out a section of the CC2420RecieveP readDone function that checks the msb bit of the LQI byte in the received buffer.\n\nI think this is working,\n\nHowever, once I receive the packet in my own rec...
magicoder
[ { "role": "user", "content": "Make ErrFileVersionNotUploaded error message more understandable.\n\n(Language: Go)\n\npackage mc\n\nimport \"errors\"\n\nvar (\n\tErrInvalidProjectFilePath = errors.New(\"path not in project\")\n\tErrFileNotUploaded = errors.New(\"existing file not uploaded\")\n\tErrFil...
commitpackft
[ { "role": "user", "content": "Given an array of integers, write a function to find the maximum difference between a lower element and an upper element.\nArray: [3, 10, 2, 6, 4, 8, 1]" }, { "role": "assistant", "content": "def findMaxDifference(arr):\n min_element = arr[0]\n max_difference ...
codealpaca
[ { "role": "user", "content": "#The Given Prompt#:\n\nAventura de Lily Ray y su hermanito:\n\nLily Ray y su hermanito estaban jugando en el parque cuando se dieron cuenta de que estaban perdidos. Decidieron buscar la salida, pero no sabían cómo hacerlo. Después de caminar un rato, encontraron un árbol gigant...
wizardlm
[ { "role": "user", "content": "Given two strings, write a program to check if the two strings are anagrams.\ns1 = \"listen\"\ns2 = \"silent\"" }, { "role": "assistant", "content": "Here is a simple python program for checking if two strings are anagrams of each other.\n\n```python\ndef check_anag...
magicoder
[ { "role": "user", "content": "In no less than 300 words, craft a narrative surrounding the harrowing journey of a resilient mouse who is faced with a formidable challenge. The mouse's journey takes place in an abandoned amusement park that has long been forgotten by humans. However, amidst the rusted rides ...
wizardlm
[ { "role": "user", "content": "What were the primary factors that led to the emergence of life on Earth and how did these factors interact to create the complex biological systems we see today?" }, { "role": "assistant", "content": "The emergence of life on Earth is believed to have been the resu...
wizardlm
[ { "role": "user", "content": "Could you identify and elucidate the position of the inaugural occurrence of the subsequence \"mod\" within the stipulated textual sequence? Here is the mentioned sequence: string = \"GPT MODEL\"" }, { "role": "assistant", "content": "Yes, the task implies finding t...
magicoder
[ { "role": "user", "content": "Fix frontend serving for development\n\n(Language: TypeScript)\n\nimport api from './api'\nimport { runHotMiddleware } from './middleware'\nimport { listen } from './listen'\nimport { monitorExceptions } from './exceptionMonitoring'\nimport { serve...
commitpackft
[ { "role": "user", "content": "Create an array of integers using C++ where the first element is equal to the last element." }, { "role": "assistant", "content": "#include <iostream>\nusing namespace std;\n \nint main() \n{\n // set the array size\n int n = 5;\n int arr[n];\n\n // set ...
codealpaca
[ { "role": "user", "content": "The following bit of code catches the EOS Exception\n\n\nusing (var reader = new BinaryReader(httpRequestBodyStream)) {\n\n try {\n while (true) {\n bodyByteList.Add(reader.ReadByte());\n }\n } catch (EndOfStreamException) { }\n}\n\n\n\nSo why do ...
magicoder
[ { "role": "user", "content": "Data format:\nYou must have [ agenda ] data type in the following Rewrite prompt\nRewrite prompt:\nAs an investment firm, it is important to have productive and engaging business meetings with clients. Here are three potential topics to discuss during your next meeting:\n1. Inv...
wizardlm
[ { "role": "user", "content": "Consider the following information about a book:\n- Its title is \"The Alchemist\"\n- Its author is Paulo Coelho\n- Its publisher is HarperCollins\n- Its publication date is April 25, 1993\n- It has 208 pages\nUsing the provided information, create a mathematical equation that ...
wizardlm
[ { "role": "user", "content": "Choose exact transition match if available\n\n(Language: Go)\n\npackage jiradata\n\nimport (\n\t\"strings\"\n)\n\n// Find will search the transitions for one that matches\n// the given name. It will return a valid trantion that matches\n// or nil\nfunc (t Transitions) Find(nam...
commitpackft