messages
listlengths
2
2
source
stringclasses
5 values
[ { "role": "user", "content": "Sort on order to keep items in Lines\n\nThis was causing a bug where the post items would end up in various\norderes based on the last visit. This sorts them explicitly.\n\n(Language: JavaScript)\n\n/**\n * Show and hide the map layers\n */\nTemplate.componentPage.events({\n ...
commitpackft
[ { "role": "user", "content": "Instruct an SVM (Support Vector Machine) model via the scikit-learn Python library to assimilate and learn from the Wisconsin Breast Cancer dataset, which is inherent within the same library. Post-model training, compute the precision and recall (statistical measurements of mod...
magicoder
[ { "role": "user", "content": "Can you provide a list of food items that are easily portable and can be consumed on the go? Please present your answer in an excel table format with columns for food item name, description, and serving size." }, { "role": "assistant", "content": "Sure, here is a ta...
wizardlm
[ { "role": "user", "content": "Add a requirement to the given prompt: Write a sentence that describes a serene body of water that allows for clear visibility of the smallest underwater flora and fauna, such as a pristine and sparkling alpine lake, while also mentioning the surrounding mountain range and the ...
wizardlm
[ { "role": "user", "content": "Here's a puzzle for you: Using Scala code, how can we use machine learning to determine the best travel destination for a person based on their preferences? \nFirst, we'll load data into a DataFrame and feature engineer it with an assembler that takes into account factors such ...
wizardlm
[ { "role": "user", "content": "How does replacing odd numbers and even numbers with a factor of 3 in the `numbers` array impact the output of the program? Can you provide an explanation on the mathematical principles underlying the change in the output? Will the output be different if the odd numbers are ini...
wizardlm
[ { "role": "user", "content": "Fix distribution and bump version.\n\n(Language: Python)\n\n__author__ = 'yalnazov'\nfrom setuptools import setup\nsetup(\n name='paymill-wrapper',\n version='2.0.0',\n description='Python wrapper for PAYMILL API',\n author='Aleksandar Yalnazov',\n author_email='...
commitpackft
[ { "role": "user", "content": "Given the following incorrect and inefficient Python code snippet, identify and explain the errors, then optimize the code to enhance its computational efficiency. Particular attention should be given to the looping construct and list operation. \n\nConsider that the list could...
magicoder
[ { "role": "user", "content": "Fix braindamage: assertions were not enabled in debug builds.\n\n(Language: C)\n\n#ifndef ERROR_H\n#define ERROR_H\n\n/*\n * Note that we include \"fmt\" in the variadic argument list, because C99\n * apparently doesn't allow variadic macros to be invoked without any vargs\n * ...
commitpackft
[ { "role": "user", "content": "I would like to create a button with animated(gif/video) background\nhere is an example - the DOWNLOAD button on this sites main page: [https://fivem.net/](https://fivem.net/)\nPreferably I would like to see a solution using React" }, { "role": "assistant", "content...
magicoder
[ { "role": "user", "content": "Fix potential data corruption bug\n\n(Language: C)\n\n#include <stdlib.h>\n\n#include \"logging.h\"\n\nchar out[512];\ndebug_mask_t debug_mask = 0;\nstatic int debug_init = 0;\n\n\nchar *print_hex(uint8_t *buf, int count)\n{\n memset(out, 0, count);\n\n int zz;\n for(z...
commitpackft
[ { "role": "user", "content": "Write the code for running the Disk Check utility" }, { "role": "assistant", "content": "```python\nimport subprocess\nsubprocess.run(['chkdsk'])\n```" } ]
python25k
[ { "role": "user", "content": "If you were to construct a series of test cases to rigorously evaluate a software program designed to calculate Airmail Express shipping charges, which set of package weights, including both valid and invalid input values, would comprehensively scrutinize the program's handling...
magicoder
[ { "role": "user", "content": "Please re-write the following in Java:\ndef unique(l: list):\n return sorted(set(l))\n\n# Test\nprint(unique([5, 3, 5, 2, 3, 3, 9, 0, 123])) # Should print [0, 2, 3, 5, 9, 123]\nI'd like to fully understand the translation; could you add notes to the Java code?" }, { ...
magicoder
[ { "role": "user", "content": "Fix with_session decorator for python 2.5\n\ngit-svn-id: ad91b9aa7ba7638d69f912c9f5d012e3326e9f74@1957 3942dd89-8c5d-46d7-aeed-044bccf3e60c\n\n(Language: Python)\n\nfrom flexget.manager import Session\n\n\ndef with_session(func):\n \"\"\"\"Creates a session if one was not pa...
commitpackft
[ { "role": "user", "content": "Create a comprehensive checklist for planning a memorable and environmentally sustainable birthday party, ensuring all materials and activities align with sustainable practices and minimizing waste." }, { "role": "assistant", "content": "Sure, here's a comprehensive...
wizardlm
[ { "role": "user", "content": "Can you provide a Swift code that performs matrix multiplication using parallel computing with Strassen's Algorithm? How can we calculate the time complexity of this algorithm?\nHere is an example implementation of Strassen's Algorithm in Swift using parallel computing:\n[Swift...
wizardlm
[ { "role": "user", "content": "As a web designer, you have been given a challenging task of designing a bakery's web page with comprehensive and detailed requirements that cater to the needs of different types of potential customers. You need to consider different aspects such as the bakery's demographics, c...
wizardlm
[ { "role": "user", "content": "Test that V2 API removes old content types\n\nThis is not intended to be a thorough test, it's just something to capture\nthis difference between v1 and v2 that might not be clear from the code.\n\n(Language: Java)\n\npackage uk.gov.register.resources.v2;\n\nimport org.junit.Te...
commitpackft
[ { "role": "user", "content": "How can we send bulk emails using AWS services while ensuring all emails are personalized to the recipients' preferences and the email content is optimized for high deliverability and engagement rates?" }, { "role": "assistant", "content": "To send personalized and ...
wizardlm
[ { "role": "user", "content": "As a medical educator, I am required to provide a comprehensive lecture on the complications of stroke in patients with sickle cell anemia. The lecture should delve deeper into the pathophysiology of stroke in these patients and also discuss the latest research on the topic. Ad...
wizardlm
[ { "role": "user", "content": "Can you provide detailed descriptions of the abilities and rules for the three players in a TRPG game? The players are Jack, a warrior, Nicole, a wizard, and Kai, a priest. Please make sure that each player's abilities require multiple-step reasoning and strategic thinking to u...
wizardlm
[ { "role": "user", "content": "Incorporate appropriate honorifics and formal language while maintaining the urgency of the request, in order to convey the importance of the task at hand. Additionally, provide a justification for the urgency of the request and suggest potential consequences of delayed action....
wizardlm
[ { "role": "user", "content": "What are some potential ethical implications of using AI to create personalized content for individuals, and how can we mitigate them?" }, { "role": "assistant", "content": "One potential ethical implication of using AI to create personalized content for individuals...
wizardlm
[ { "role": "user", "content": "debug the following code in Java to list all the prime numbers until 50\nclass Main {\n public static void main(String[] args) {\n for(int i = 0; i < 50; i++) {\n if (isPrime(i)) {\n System.out.println(i);\n }\n }\n }\n ...
codealpaca
[ { "role": "user", "content": "As a web developer, your challenge is to design a flawless website using [HTML page] format. To accomplish this, please provide a detailed description of the four critical components that must be present in a website for it to achieve success. Each of these components must be u...
wizardlm
[ { "role": "user", "content": "Present an erroneous Python code snippet that is intended to perform a certain machine learning operation. Explain what the pitfalls and mistakes of the program are and how to correct them. Also, elaborate on the distinction between a data scientist and a machine learning engin...
magicoder
[ { "role": "user", "content": "Update URLs in ExampleIter to match the changes in httpbin's API\n\n/redirect was changed to /relative-redirect\n\n(Language: Go)\n\npackage httpclient_test\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"gnd.la/net/httpclient\"\n)\n\nfunc ExampleIter() {\n\t// Passing nil only w...
commitpackft
[ { "role": "user", "content": "Implement a function to check if two binary trees are same or not." }, { "role": "assistant", "content": "function isSameTree(p, q) {\n if (p === null && q === null) {\n return true;\n }\n if (p === null || q === null || p.val !== q.val) {\n r...
codealpaca
[ { "role": "user", "content": "In the wake of COVID-19, the world has seen a surge in virtual currencies. As businesses struggle to stay afloat and traditional currencies face inflation, governments have been forced to consider alternative economic solutions. One particular virtual currency has gained signif...
wizardlm
[ { "role": "user", "content": "Create NeblinaCore to handle sending and receiving packet.\n\n(Language: Python)" }, { "role": "assistant", "content": "#!/usr/bin/env python\n###################################################################################\n#\n# Copyright (c) 2010-2016 Mot...
commitpackft
[ { "role": "user", "content": "Using at least 5 different poetic devices, such as metaphors, personification, and alliteration, create a 20-line free verse poem about the cyclical nature of the ecosystem in a specific geographical region. The poem must include at least 3 distinct references to scientific con...
wizardlm
[ { "role": "user", "content": "Fix issue where Pulsar would enter a restart loop when cancelling a buffering\n\nSigned-off-by: Steeve Morin <7f3ba7bbc079b62d3fe54555c2b0ce0ddda2bb7c@gmail.com>\n\n(Language: Python)\n\nimport xbmc\nimport urllib2\nimport threading\nfrom pulsar.config import PULSARD_HOST\n\n\n...
commitpackft
[ { "role": "user", "content": "Convert record to class, since we need to build this for JDK 8\n\n(Language: Java)\n\n// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.\npackage com.yahoo.document.json;\n\nimport com.yahoo.document.DocumentOperation;\n\n/*...
commitpackft
[ { "role": "user", "content": "Develop an icebreaker question that not only serves as an effective conversation starter but also aligns with the company's values and culture. The question should be thought-provoking, open-ended, and should require the interviewee to demonstrate their critical thinking and pr...
wizardlm
[ { "role": "user", "content": "Describe what a successful customer engagement strategy looks like." }, { "role": "assistant", "content": "A successful customer engagement strategy involves building strong relationships with customers by understanding their needs, wants, and preferences. This can ...
wizardlm
[ { "role": "user", "content": "As high school students dive deeper into analyzing Bella's character, create a series of thought-provoking questions that challenge their critical thinking and interpretive abilities by examining the character's growth and transformation throughout the story. Use specific idiom...
wizardlm
[ { "role": "user", "content": "Remove unnecessary parent type of TabbedChartsMeta\n\n(Language: TypeScript)\n\nimport { DataCube } from 'src/models/data-cube/data-cube.model';\n\nexport interface Dataset {\n metas: Array<Meta>;\n dataCube: DataCube;\n}\n\nexport type Meta = TabbedChartsMeta | ChartMeta;\n...
commitpackft
[ { "role": "user", "content": "Usually I use shell command `time`. My purpose is to test if data is small, medium, large or very large set, how much time and memory usage will be.\n\n\nAny tools for Linux or just Python to do this?" }, { "role": "assistant", "content": "There are several tools av...
python25k
[ { "role": "user", "content": "Given two countries, France and Germany, develop a comprehensive comparison between their healthcare systems based on the following criteria: healthcare funding, healthcare infrastructure, healthcare policies, healthcare outcomes, healthcare accessibility, healthcare technology...
wizardlm
[ { "role": "user", "content": "Using HTML, CSS, JavaScript, and AJAX, create an interactive registration form with fields for full name, email, phone number. Add a feature to verify if the entered email already exists in the backend server's database." }, { "role": "assistant", "content": "Here i...
magicoder
[ { "role": "user", "content": "Write a one-sentence JavaScript statement to make an AJAX call to a website, including error handling and specifying a custom Content-Type header." }, { "role": "assistant", "content": "```javascript\nfetch(\"https://example.com\", { method: \"GET\", headers: { \"Co...
magicoder
[ { "role": "user", "content": "How can you expand the \"Guri and Gura\" book series by introducing a new character who has a unique personality and plays a significant role in the plot? In addition, what modifications can you make to the existing plot to showcase the new character's contributions to the adve...
wizardlm
[ { "role": "user", "content": "Find the value of cos x tan x sin x / (1 - cos^2 x) if sin x + cos x = sqrt(3) and 0 < x < pi/2." }, { "role": "assistant", "content": "We will start by using the identity $\\tan x = \\frac{\\sin x}{\\cos x}$ to rewrite the expression:\n\n$$\\frac{\\cos x \\tan x \\...
wizardlm
[ { "role": "user", "content": "Define the word 'bemused' using the Merriam-Webster Dictionary API. Please provide a code snippet in [Python] that utilizes the API to retrieve the definition of the word 'bemused'." }, { "role": "assistant", "content": "Here's a Python code snippet that uses the Me...
wizardlm
[ { "role": "user", "content": "Can you explain a multi-step methodology utilized by exceptionally effective copywriters in the realm of personal growth and self-improvement to develop persuasive and authoritative communication? Additionally, please provide concrete examples of this methodology being utilized...
wizardlm
[ { "role": "user", "content": "Create an educational program that focuses on the ethical considerations and cultural practices within the context of international business transactions. This program should aim to help learners recognize the impact of cultural differences on ethical decisions and evaluate how...
wizardlm
[ { "role": "user", "content": "Compose a regular expression pattern for three scenarios:\n1. Verifies whether the provided string comprises solely of numerical digits.\n2. Unravel and fix an erroneous regular expression pattern provided below that's supposed to check if the input string is a legitimate IPv4 ...
magicoder
[ { "role": "user", "content": "How can this code be optimized?\ndef set_similarity(a, b): \n same = 0\n for i in a:\n if i in b:\n same += 1\n return same/max(len(a),len(b))" }, { "role": "assistant", "content": "def set_similarity(a, b): \n return len(set(a).interse...
codealpaca
[ { "role": "user", "content": "Add java solution for 140. Word Break II\n\n140. Word Break II: https://leetcode.com/problems/word-break-ii/\n\n(Language: Java)" }, { "role": "assistant", "content": "package leetcode.word_break_ii;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport j...
commitpackft
[ { "role": "user", "content": "Add new local dependency of scripts.\n\n(Language: Python)" }, { "role": "assistant", "content": "\"\"\"Utility functions not closely tied to other spec_tools types.\"\"\"\n# Copyright (c) 2018-2019 Collabora, Ltd.\n# Copyright (c) 2013-2019 The Khronos Group Inc.\n...
commitpackft
[ { "role": "user", "content": "Construct a well-reasoned and evidence-based argument for why recycling is crucial not only for reducing waste and conserving resources, but also for mitigating the impacts of climate change and promoting sustainable consumption patterns. Additionally, consider addressing poten...
wizardlm
[ { "role": "user", "content": "How can you uncover the hidden gems of Seoul's street food scene, going beyond the typical Korean BBQ and kimchi? The itinerary should involve exploring lesser-known neighborhoods and alleys, and visiting food stalls and markets that are often overlooked by tourists. To make th...
wizardlm
[ { "role": "user", "content": "This Python code was scanned using OCR and has some issues. Can you fix it for me?\ntrom pyflirk.d@+astrean 1mqont Stre4mExe<utiorEnvinonnnen+\nfrom pvflink.t4ble import S7r€amTabl3ErvirOnment, DataTvqes\nfr0nn pyflink.tabl3.d€scnipt0rs im9ont_Zchema, OldC$u, FileSystem\n\n#_se...
magicoder
[ { "role": "user", "content": "Add header to petition response\n\n(Language: JavaScript)\n\nimport React from 'react';\nimport styles from './petition-response.scss';\nimport settings from 'settings';\nimport Heading2 from 'components/Heading2';\nimport Paragraph from 'components/Paragraph';\nimport Markdown...
commitpackft
[ { "role": "user", "content": "Exploring the influence of neurodiversity in tech workplaces and the impact on problem-solving and innovation\n\n1. Crafting an eye-catching title that captures the essence of the prompt\n2. Defining neurodiversity and how it relates to the tech industry\n3. Analyzing the impac...
wizardlm
[ { "role": "user", "content": "Use `__dirname` instead of `process.cwd()` for basePath\n\n(Language: TypeScript)\n\nexport default class Constants {\n public static basePath: string = process.cwd().replace(/\\\\/g, \"/\") + \"/\";\n public static controllerPaths: string[];\n public static modulesPat...
commitpackft
[ { "role": "user", "content": "Fix random algo to evenly distribute.\n\n(Language: C)\n\n#include <stdio.h>\n#include <stdint.h>\n\n#include \"rand.h\"\n\nstatic uint64_t sqrt64(uint64_t n) {\n\tuint64_t g = UINT64_C(1) << 31;\n \n\tfor (uint64_t c = g; c; g |= c) {\n\t\tif (g * g > n) {\n\t\t\tg ^= c; \n\...
commitpackft
[ { "role": "user", "content": "Can you provide information on the economic conditions and political tensions in Europe during the 1930s that contributed to the outbreak of World War II? How did the Treaty of Versailles and the rise of totalitarian regimes impact the situation? Additionally, can you provide a...
wizardlm
[ { "role": "user", "content": "Generate a multithreaded program that parses through a set of given strings. For each string, generate an HTML string to highlight the third word. Given strings will be a mixture of valid and invalid values. You should also provide a piece of erroneous code and ask the candidat...
magicoder
[ { "role": "user", "content": "What are some tips for writing a persuasive essay in Latex? How can I effectively convince my audience through my writing?\n\\begin{enumerate}\n \\item Start with a strong thesis statement that clearly states your argument and position.\n \\item Use factual evidence and s...
wizardlm
[ { "role": "user", "content": "Add additional field to result model class of Alchemy api\n\n(Language: Java)\n\npackage cvut.arenaq.mashup.AlchemyApi;\n\nimport java.util.List;\n\npublic class GetRankedTaxonomy {\n private String status;\n private String language;\n private List<Taxonomy> taxonomy;\...
commitpackft
[ { "role": "user", "content": "Develop a recursive function in PHP that not only displays the series of integer values starting from 0 and ending at 10, but also calculates the factorial of each number in the series. The function should take an integer as input and return an associative array where each key-...
magicoder
[ { "role": "user", "content": "Add a frame data example\n\n(Language: Rust)" }, { "role": "assistant", "content": "use std::env;\n\nuse getopts::Options;\nuse pdb::FallibleIterator;\n\nfn print_usage(program: &str, opts: Options) {\n let brief = format!(\"Usage: {} input.pdb\", program);\n ...
commitpackft
[ { "role": "user", "content": "How can I generate a random set of numbers from 1 to 10 and sort them in ascending order on an HTML page? I want to make sure that each number in the set is unique. Can you provide me with the necessary HTML code to achieve this? Additionally, can you provide me with [Java code...
wizardlm
[ { "role": "user", "content": "Can you provide an example of how artificial intelligence and machine learning are used in a real-world scenario, and explain the difference between the two?\nFor example, in the field of image recognition, how would an AI system differ from a machine learning system? And how w...
wizardlm
[ { "role": "user", "content": "What is another term for a weekly time period?" }, { "role": "assistant", "content": "Seven-day period or a week." } ]
wizardlm
[ { "role": "user", "content": "Add Solution for Problem 005\n\n(Language: C++)" }, { "role": "assistant", "content": "// 005. Longest Palindromic Substring\n/**\n * Given a string S, find the longest palindromic substring in S. \n * You may assume that the maximum length of S is 1000, and there e...
commitpackft
[ { "role": "user", "content": "fix: Add JUnit4 Runner to test\n\n(Language: Java)\n\npackage amu.zhcetstudent;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/t...
commitpackft
[ { "role": "user", "content": "I have this problem : Largest Multiple of Three with Even Number of Digits\nDescription are as below: Given an integer array of `digits`, return the largest multiple of three that can be formed by concatenating some of the given digits in any order. The resulting number must ha...
magicoder
[ { "role": "user", "content": "Fix sleeping database connection bug\n\n(Language: Java)\n\n/*\n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\n */\npackage com.parallax.server....
commitpackft
[ { "role": "user", "content": "Develop a function in python to find the index of an element in a list a = [2, 3, 4, 5, 2]\nx = 2" }, { "role": "assistant", "content": "```python\ndef find_index(a, x):\n indices = []\n if x not in a:\n return -1\n else:\n for i in range(len(...
python25k
[ { "role": "user", "content": "Could you please provide a comprehensive list of functionalities and attributes that should be integrated into an event ticketing application? The product backlog must cover all the essential aspects, including user registration, login, event browsing, ticket purchase and redem...
wizardlm
[ { "role": "user", "content": "Update comments and rename props.data to props.buildStep\n\n(Language: JavaScript)\n\nimport * as React from 'react';\n\nconst HEADERS = ['no', 'text', 'log'];\n\nexport const BuilderDataTable = props => {\n return (\n <table className='data-table'>\n <thead>\n ...
commitpackft
[ { "role": "user", "content": "Print the first, second and third element of this array in JavaScript.\n[20, 40, 60, 80, 100]" }, { "role": "assistant", "content": "let arr = [20, 40, 60, 80, 100];\nconsole.log(arr[0], arr[1], arr[2]);" } ]
codealpaca
[ { "role": "user", "content": "How does transitioning your dog to a plant-based diet contribute to environmental conservation? Our vegan dog food brand, which is made with locally sourced ingredients from ethical and sustainable farmers, aims to provide not only health benefits for pets but also a reduced ca...
wizardlm
[ { "role": "user", "content": "Develop a computational architecture using PyTorch, and then harness the capabilities of Azure Machine Learning to train this architecture. After the training process, operationalize the trained architecture and set up a RESTful API endpoint, guaranteeing its proficiency in pro...
magicoder
[ { "role": "user", "content": "Craft a for loop in the Perl programming language to output every element contained within a list. Here's an example list for demonstration purposes:\nmy @exampleList = (4, 7, 12);" }, { "role": "assistant", "content": "Here is a simple Perl program that uses a for ...
magicoder
[ { "role": "user", "content": "Here's a piece of Python code I got from an OCR scan. Can you help me clean it up?\n0ef maxinumSubArr&ySunn{nums}:\nn =_len[nun$)\nprefixSun = [0} * r\nsutfixSum = [0] *_n\npr€fikMak - [0]_* r\nsuffixMax = [0) * n\nprefixZun[o] = nums[0]\nsuftixSum[=i] = nuns[-1]\nmaxSum = fl0@...
magicoder
[ { "role": "user", "content": "Create a python function that takes a comma-seperated string and returns a list of dictionary objects \"John, Smith, 25; Polly, King, 22\"" }, { "role": "assistant", "content": "```python\ndef create_list(string):\n entries = string.split(\";\")\n result = []\...
python25k
[ { "role": "user", "content": "Create a class in Java for a student and define variables for name, date of birth and grade." }, { "role": "assistant", "content": "public class Student {\n private String name;\n private Date dob;\n private int grade;\n\n public Student(String name, Dat...
codealpaca
[ { "role": "user", "content": "Implement a Python class to embody a music record with attributes such as album_name, band_name, release_year, and song_list." }, { "role": "assistant", "content": "Sure, here is a Python class which represents a music record.\n\n```python\nclass MusicRecord:\n d...
magicoder
[ { "role": "user", "content": "Add Level constants to User Model\n\n(Language: JavaScript)\n\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar UserSchema = new Schema(\n{\n lastName : String,\n firstName : String,\n username : String,\n email : String,\n pa...
commitpackft
[ { "role": "user", "content": "Fix imports for Django 1.6 and above\n\n(Language: Python)\n\n# Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)\n# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma...
commitpackft
[ { "role": "user", "content": "How can we leverage personalized greetings to strengthen connections with others? In addition to the benefits of using a person's name or tailoring a greeting to their interests, what other constraints can we add to make introductions more personalized? Consider incorporating n...
wizardlm
[ { "role": "user", "content": "Create a CSS class that colors any text within its scope with blue." }, { "role": "assistant", "content": ".blue {\n color: blue;\n}" } ]
codealpaca
[ { "role": "user", "content": "Implement Eq and Ord for Rollers\n\n(Language: Rust)\n\n#[macro_use]\nextern crate pest;\nextern crate rand;\n\nmod parse;\nmod random;\n\nuse pest::*;\nuse parse::*;\n\npub fn roll_dice(r: &str) -> i32 {\n let mut parser = Rdp::new(StringInput::new(r));\n parser.expressi...
commitpackft
[ { "role": "user", "content": "In addition to the given prompt, can you also provide information on how to narrow down the search results to only include datasets that contain information on the sleep patterns of female astronauts? Furthermore, could you please suggest ways to export the results in a format ...
wizardlm
[ { "role": "user", "content": "Can you expand on the list of liquids with their boiling points that have higher values than water's standard boiling point of 100 °C? The inquiry extends to a request for at least five different types of liquids with their corresponding boiling points. The presentation format ...
wizardlm
[ { "role": "user", "content": "How can you retrieve a customer's geographical location based on their purchase history? Is it necessary to use a combination of the 'customer_purchase_history' and 'customer_location' tables to obtain this information, or are there any other tables that could provide relevant ...
wizardlm
[ { "role": "user", "content": "Modify the given Python function to print out the reversed list first and then find the sum of the numbers def reverse_list(numbers):\n return numbers[::-1]" }, { "role": "assistant", "content": "```python\ndef reverse_list(numbers):\n reversed_list = numbers[::-1]\...
python25k
[ { "role": "user", "content": "If a person experiences bradypnea (abnormally slow breathing) with a respiratory rate of 4 breaths per minute, how many breaths would they take in an hour?" }, { "role": "assistant", "content": "If a person has a respiratory rate of 4 breaths per minute, they would ...
wizardlm
[ { "role": "user", "content": "Create a Python function to retrieve data from AWS Aurora utilizing a lesser-used AWS SDK, apply data cleaning and preprocessing steps using advanced features in the pandas library, and feed the data into a deep learning model for regression tasks. Additionally, incorporate err...
magicoder
[ { "role": "user", "content": "Write a JavaScript code snippet to compare two numbers and show a message the higher number" }, { "role": "assistant", "content": "Here is a simple JavaScript code snippet that does this:\n\n```javascript\nfunction compareNumbers(a, b) {\n // Check if both inputs...
magicoder
[ { "role": "user", "content": "Set properties on new files\n\ngit-svn-id: 2afc70380305c7078ac9d33db6a1fb988992b501@1771268 13f79535-47bb-0310-9956-ffa450edef68\n\n(Language: Java)\n\n/* $Id$ */\n\n/**\n* Licensed to the Apache Software Foundation (ASF) under one or more\n* contributor license agreements. See...
commitpackft
[ { "role": "user", "content": "Add BSD 3-clause open source header\n\n(Language: C)\n\n#ifndef _AUTOMATON_H_\n#define _AUTOMATON_H_\n\n/*\n * type and function definitions for an automaton\n */\n\n#include \"event.h\"\n#include \"srpc/srpc.h\"\n\ntypedef struct automaton Automaton;\n\nvoid au_init(v...
commitpackft
[ { "role": "user", "content": "Increase default access duration to 30 minutes.\n\n(Language: Java)\n\npackage com.topsy.jmxproxy;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\n\nimport com.yammer.dropwizard.json.JsonSnakeCase;\n\nimport javax.validation.constraints.Min;\n\n@JsonSnakeCase\npublic ...
commitpackft
[ { "role": "user", "content": "After conducting market research, I have identified the most popular colors that people associate with my brand, along with their corresponding RGB values. However, I have also gathered data on the psychological effects of color on consumers and would like you to provide recomm...
wizardlm
[ { "role": "user", "content": "Fix for checkboxes and descriptions\n\n(Language: JavaScript)\n\n(function($){\n\t$.entwine('ss', function($){\n\t\t$('.field label.right').entwine({\n\t\t\tonadd:function() {\n\t\t\t\tthis.hide();\n\t\t\t\tthis.closest('.field').addClass('help-text');\n\t\t\t}\n\t\t});\n\n\t\t...
commitpackft
[ { "role": "user", "content": "Compose an SQL directive geared towards retrieving the appellations of each respective contributor who has made tangible contributions to the compilation of literary works harbored within the confines of our data repository." }, { "role": "assistant", "content": "As...
magicoder