messages
listlengths
2
2
source
stringclasses
5 values
[ { "role": "user", "content": "Optimize the following python code array to get the maximum value from it in one pass.\n[-5, 2, 3, 4, 6, -8]" }, { "role": "assistant", "content": "You can use Python's built-in max() function which is specifically designed for this task. This function iterates over...
magicoder
[ { "role": "user", "content": "Convert a regular expression to an equivalent NFA.\nRegular Expression: ( a (b | c) * d )" }, { "role": "assistant", "content": "Here is the step-by-step conversion of the regular expression (a(bc)*d) into the equivalent NFA\n\n1. We will start from the left of the ...
magicoder
[ { "role": "user", "content": "In the context of formal logic in computer science, two expressions E and F are defined as being unifiable if there exists a set of substitutions for the variables present in E and F that render the two expressions lexically identical. Given that only the variables are w, x, y,...
magicoder
[ { "role": "user", "content": "Add varg to stocazzies list\n\n(Language: TypeScript)\n\nexport default {\n sc: 'stocazzo',\n routes: {\n root: {\n value: 'stocazzo',\n big: 'gran',\n },\n caps: {\n value: 'STOCAZZO',\n big: 'GRAN',\n },\n camel: {\n value: 'StoCazzo'...
commitpackft
[ { "role": "user", "content": "i need this code to work in lua:\nimport re\nfrom collections import OrderedDict\n\ndef words_without_target_advanced(s, target):\n delimiters = re.findall(r'\\W+', s)\n words = re.findall(r'\\w+', s)\n \n result = OrderedDict()\n \n for word, delimiter in zip...
magicoder
[ { "role": "user", "content": "As a healthcare provider, I need to document the symptoms of a sinus infection for my patient's medical record. Can you provide a list of symptoms in an excel table format that I can easily copy and paste into their chart?\nAdditionally, can you include any common complications...
wizardlm
[ { "role": "user", "content": "Pick an appropriate title for a documentary about climate change that not only highlights the environmental impact but also delves into the economic and social implications of global warming." }, { "role": "assistant", "content": "\"Beyond the Horizon: The Multi-Fac...
wizardlm
[ { "role": "user", "content": "Is it possible to to programmatically trigger a postback from server code in ASP.NET? I know that it is possible to do a Response.Redirect or Server.Transfer to redirect to a page, but is there a way to trigger a postback to the same page in server code ( without using javascr...
magicoder
[ { "role": "user", "content": "In JavaScript, how can I calculate the nth prime number in a given range between m and n (inclusive) and then convert it to its hexadecimal form? Additionally, I need to make sure that the sum of the digits in the hexadecimal form is a prime number before returning the result. ...
wizardlm
[ { "role": "user", "content": "Develop a Python-coded software application capable of formulating an arbitrary string through utilization of the specified alphabet characters.\ncharacters = 'abcdefghijklmnopqrstuvwxyz'" }, { "role": "assistant", "content": "Here's a simple Python code that create...
magicoder
[ { "role": "user", "content": "Develop a program in JavaScript language that takes a text string input, reverses the sequence of characters in each separate word without affecting the initial sequential arrangement of the words in the submitted string sentence." }, { "role": "assistant", "content...
magicoder
[ { "role": "user", "content": "What connections, if any, can be drawn between the ancient Incas' practice of child sacrifice and modern-day conspiracy theories surrounding the Illuminati?" }, { "role": "assistant", "content": "There is no credible connection between the ancient Incas' practice of...
wizardlm
[ { "role": "user", "content": "Create an Android app that displays, saves, and updates text notes. The app should also support word search and sorting through a user interface." }, { "role": "assistant", "content": "As an AI model, I'm unable to directly create the described Android app. However,...
magicoder
[ { "role": "user", "content": "Increase the QImageReader allocation limit.\n\n(Language: C++)\n\n/*\nCopyright (c), Helios\nAll rights reserved.\n\nDistributed under a permissive license. See COPYING.txt for details.\n*/\n\n#include \"ImageViewerApplication.h\"\n\nint main(int argc, char **argv){\n\ttry{\n\t...
commitpackft
[ { "role": "user", "content": "Add Nexus Siege game mode\n\n(Language: Java)\n\n/*\n * Copyright 2014 Taylor Caldwell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\...
commitpackft
[ { "role": "user", "content": "Formulate a method in Java employing recursive programming techniques for the generation of Fibonacci numbers, in tandem with a functionality to examine if the resulted numbers are perfect squares." }, { "role": "assistant", "content": "Here is a Java program that i...
magicoder
[ { "role": "user", "content": "Create a program that reads two numbers and prints out their greatest common divisor." }, { "role": "assistant", "content": "def gcd(a, b):\n if a == 0:\n return b \n return gcd(b % a, a)" } ]
codealpaca
[ { "role": "user", "content": "As a security analyst, you received an email from your coworker containing a Haiku poem that describes the process of using numbers and symbols to form equations on a page and unlock hidden truths. However, this poem may contain a hidden message or code written in a different l...
wizardlm
[ { "role": "user", "content": "Under a certain insurance policy, \"Toxic Work\" is defined as \"any work that involves handling, producing, or releasing hazardous chemicals, gases, or materials that could cause harm to humans or the environment.\" Mary, a lab technician, accidentally spills a toxic chemical ...
wizardlm
[ { "role": "user", "content": "\"Attention cowboys and cowgirls! We have a dire situation at the Red Stag bank. A cunning thief has stolen all the gold and left us high and dry. We need your help to track him down and retrieve the loot before he vanishes into thin air. And here's the kicker - the reward for ...
wizardlm
[ { "role": "user", "content": "I am working on creating a calendar with Angular and Typescript. I was following a tutorial that uses JavaScript. For the life of me I cannot figure out how to make it work in Typescript.\nI am trying to use a loop to create a div for each iteration.\nJavaScript code is as foll...
magicoder
[ { "role": "user", "content": "Fix bugs introduced by Code Climate changes\n\n(Language: JavaScript)\n\n// Root file loaded by RequireJS\n\nrequire.config({\n paths: {\n 'jquery': 'lib/jquery',\n 'handlebars': 'lib/handlebars'\n },\n});\n\nrequire([\n 'jQuery',\n 'map_controller'\n ...
commitpackft
[ { "role": "user", "content": "Set up url for index page\n\n(Language: Python)\n\n\"\"\"social_website_django_angular URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.10/topics/http/urls/\nExamples:\nFunction views\n ...
commitpackft
[ { "role": "user", "content": "Test for infinite beam QC\n\n(Language: Python)\n\nimport os\n\nimport unittest2 as unittest\nfrom tkp.quality.restoringbeam import beam_invalid\n\nfrom tkp.testutil.decorators import requires_data\nfrom tkp import accessors\nfrom tkp.testutil.data import DATAPATH\n\n\nfits_fil...
commitpackft
[ { "role": "user", "content": "Create variable to store restaurant name\n\n(Language: JavaScript)\n\nfunction getRestaurants (latitude, longitude) {\n if (latitude && longitude) {\n var center = {lat: latitude, lng: longitude}\n var map = new google.maps.Map(document.getElementsByClassName('map')[0], ...
commitpackft
[ { "role": "user", "content": "Exclude node_modules from deploy step\n\n(Language: JavaScript)\n\n'use strict';\n\nvar gulp = require('gulp');\nvar watch = require('gulp-watch');\nvar deploy = require('gulp-gh-pages');\nvar jshint = require('gulp-jshint');\n\nvar options = {\n branch: 'gh-pages'\n};\n\ngu...
commitpackft
[ { "role": "user", "content": "Add usage of missing Dep so linters won't remove it from test\n\nSummary: google formatter removes this import unless its used.\n\nReviewed By: philipjameson\n\nfbshipit-source-id: 06c0854797\n\n(Language: Java)\n\npackage com.example.buck.library;\n\nimport com.foo.missing.Dep...
commitpackft
[ { "role": "user", "content": "Develop a comprehensive branding strategy that includes a slogan, logo, and color scheme for an ice cream shop catering to a diverse demographic with varying dietary restrictions and preferences. Ensure the slogan is catchy and memorable, while also communicating the values and...
wizardlm
[ { "role": "user", "content": "Can you recommend a romantic comedy movie title? \nHere's a list of popular romantic comedy movies in Go code:\ntitles := []string{\"Crazy, Stupid, Love\", \"When Harry Met Sally\", \"The Proposal\", \"The Big Sick\", \"10 Things I Hate About You\", \"Love Actually\", \"Notting...
wizardlm
[ { "role": "user", "content": "Create a python program that takes a string and prints the reverse of it Hello" }, { "role": "assistant", "content": "\"\"\"\nCreate a python program that takes a string and prints the reverse of it\n\"\"\"\n\n# Get the input string \nmy_string = input('Enter a stri...
python25k
[ { "role": "user", "content": "Which specific computer coding dialect is predominantly associated with the extensive engineering processes and the uninterrupted functioning of the Linux operating system?" }, { "role": "assistant", "content": "The specific computer coding dialect predominantly ass...
magicoder
[ { "role": "user", "content": "Generate an output that represents a string transformation, where the final character sequence mirrors the original string's, effectively reversing its initial order. For instance, if given the phrase \"Hello World\"." }, { "role": "assistant", "content": "Here is a...
magicoder
[ { "role": "user", "content": "Identify the HTML tag for the bold text and also retrieve its parent tag. Moreover, ensure that your code handles nested tags correctly. \nText: This text should be bold" }, { "role": "assistant", "content": "To solve this problem, I'll be using Python's Beautiful S...
magicoder
[ { "role": "user", "content": "Allow passing an event loop to XapianServer\n\n(Language: C)\n\n#ifndef XAPIAND_INCLUDED_SERVER_H\n#define XAPIAND_INCLUDED_SERVER_H\n\n#include <ev++.h>\n\n#include \"threadpool.h\"\n#include \"database.h\"\n\n\nconst int XAPIAND_HTTP_PORT_DEFAULT = 8880;\nconst int XAPIAND_BI...
commitpackft
[ { "role": "user", "content": "Translate and explain this code to Lua\n# Imported Libraries\nimport numpy as np\nimport pandas as pd\nfrom scipy import stats\nfrom sklearn import preprocessing\nfrom sklearn.neighbors import LocalOutlierFactor\nfrom sklearn.preprocessing import StandardScaler\nimport matplotl...
magicoder
[ { "role": "user", "content": "Identify the emotional state of the person based on their physical expressions of a heightened vocal pitch and tight fists, which may indicate a range of emotions such as anger, frustration, or excitement. Can you determine the specific emotional response being exhibited in thi...
wizardlm
[ { "role": "user", "content": "I am upgrading Expo SDK version from 44 to 47. After running expo upgrade, I am facing this error. I also tried installing Patch package, after installing patch package I got this error:\nTypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.source')\n...
magicoder
[ { "role": "user", "content": "Develop a Flutter program that generates a tab bar view with custom headers, accommodating interrelated widgets, across the navigation bars featuring a range of tabs for distinct functions like various meal choices and product categories for Buggy." }, { "role": "assist...
wizardlm
[ { "role": "user", "content": "Create an array of all the odd numbers between 0 and n (inclusive)." }, { "role": "assistant", "content": "def odd_numbers_array(n):\n array = []\n for i in range(0,n+1):\n if i%2 != 0:\n array.append(i)\n return array" } ]
codealpaca
[ { "role": "user", "content": "Create a Python function to break a string into its component words" }, { "role": "assistant", "content": "```python\ndef break_string(string):\n string = string.lower()\n words = string.split(\" \")\n return words\n```" } ]
python25k
[ { "role": "user", "content": "Create a class that calculates the sum of two numbers.\nNumber 1: 2\nNumber 2: 3" }, { "role": "assistant", "content": "Here is a simple Python class that can accomplish this:\n\n```python\nclass Calculator:\n def __init__(self, num1, num2):\n self.num1 = ...
magicoder
[ { "role": "user", "content": "As a makeup artist, you are tasked with selecting the perfect foundation shade for your clients. However, it's not just about identifying the undertones of the skin and selecting the right shade from the [HTML color picker] tool. There are several other factors that need to be ...
wizardlm
[ { "role": "user", "content": "Providing an erroneous piece of code as a reference, write a program to debug and correct a CSS class that is supposed to apply a gradient background color to a div with a class name \"feature\". You should also ensure to add a fall-back solid background color for browsers not ...
magicoder
[ { "role": "user", "content": "How can we modify the given JavaScript code to find all possible combinations of people who can go on a hot air balloon trip without exceeding the weight limit of 1000 kg? The trip will have 8 people with their respective weights mentioned below. The modified code should consid...
wizardlm
[ { "role": "user", "content": "Add unit test for deliver_sm with optional parameters.\n\n(Language: Java)" }, { "role": "assistant", "content": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You ma...
commitpackft
[ { "role": "user", "content": "How can I make this SVG shape look like it's filled with liquid?\n<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M7.86502 3.10304L14.665 10.393L13.5883 12.7913L11.055 13.763L7.75502 10.223C6.97502 9.38304 5.9...
magicoder
[ { "role": "user", "content": "Change the type to a long because the API is returning a number larger than an Integer\n\n(Language: Java)\n\npackage com.stripe.model;\n\npublic class Money {\n\tInteger amount;\n\tString currency;\n\n\tpublic Integer getAmount() {\n\t\treturn amount;\n\t}\n\n\tpublic String g...
commitpackft
[ { "role": "user", "content": "Develop a Python function that identifies the smallest disparity between any pair of elements within a provided array. The function should also return the pair of elements that have the smallest disparity. The array can contain integers, floating point numbers, complex numbers,...
magicoder
[ { "role": "user", "content": "Upon launching the \"Media Library CLI,\" how would you ensure that users understand that the program's four commands including `/help`, `/add`, `/search`, and `/delete` are available? Additionally, is there a more user-friendly way to instruct users on how to add media files t...
wizardlm
[ { "role": "user", "content": "Design a Python program that prompts a user to input a number and displays the Fibonacci sequence up to the given number. The program should also allow the user to confirm whether they want to display the sequence or not before displaying it." }, { "role": "assistant", ...
wizardlm
[ { "role": "user", "content": "Develop a programming script capable of eliminating a designated element based on a specified index value within an array.\nExample array input: [4, 5, 6, 7, 8]\nDesignated Index for removal: 2" }, { "role": "assistant", "content": "Here is a simple Python script th...
magicoder
[ { "role": "user", "content": "What are some potential pitfalls that programmers may encounter while implementing inheritance in C#? In addition, could you provide a comprehensive list of steps that one should take to properly implement inheritance in C# while ensuring that the code is modularized and reusab...
wizardlm
[ { "role": "user", "content": "Build a python program to extract only the unique words from the following sentence sentence = \"I like to play soccer and i like to play basketball\"" }, { "role": "assistant", "content": "```python\ndef extract_unique_words(sentence):\n words_list = sentence.sp...
python25k
[ { "role": "user", "content": "How can I use natural language processing in Python to classify the sentiment of a given sentence as positive, negative or neutral? Can you provide an example of how to classify the sentiment of the following sentence: \"This job is very demanding.\" using shell cmd?" }, { ...
wizardlm
[ { "role": "user", "content": "Develop an intricately designed PHP script with the ability to perform a multifaceted task while incorporating sophisticated self-modification capabilities. The script should be able to adapt its code intelligently based on a range of factors such as input variables, environmen...
wizardlm
[ { "role": "user", "content": "Write a recursive function that adds all the numbers in a given list. The list may contain other numerical lists which also need to be added up. Consider the case where the list may contain unnecessary characters or non-numeric lists, your function must effectively identify and...
magicoder
[ { "role": "user", "content": "Create a Python program to iterate through a dictionary and print out all the values {\"a\":1, \"b\":2, \"c\":3, \"d\":4}" }, { "role": "assistant", "content": "```python\nmy_dict = {\"a\":1, \"b\":2, \"c\":3, \"d\":4}\n\nfor key, value in my_dict.items():\n prin...
python25k
[ { "role": "user", "content": "Construct a concise summary of the following article.\nThe article is about the recent findings on the impacts of climate change, including rising temperatures and elevated sea levels, and risk associated with it." }, { "role": "assistant", "content": "The impacts o...
wizardlm
[ { "role": "user", "content": "Create an implementation of the Burrows-Wheeler Transform (BWT) for data compression in Assembly Language." }, { "role": "assistant", "content": "Sorry, but it's not practical - nor advisable - to write the Burrows-Wheeler Transform (BWT) in Assembly Language. The r...
magicoder
[ { "role": "user", "content": "How can you infuse uncommon and delicate flowers into a classic French pastry recipe without compromising its light and flaky texture?" }, { "role": "assistant", "content": "There are a few ways to infuse delicate flowers into a classic French pastry recipe without ...
wizardlm
[ { "role": "user", "content": "I'm using Flash to play an .flv movieclip on my site, but I want to have the .swf send trigger an event in my javascript when it start loading, starts playing and ends playing.\n\nWhat is the best way to do that in Flash CS3 using Actionscript 3.0 ?" }, { "role": "assis...
magicoder
[ { "role": "user", "content": "How can I modify my Rubik's Cube algorithm using JavaScript to handle situations where some colors on the cube are missing or faded? I have created an HTML table with the current state of the cube, where each cell represents a cubelet and its color. The table is structured as f...
wizardlm
[ { "role": "user", "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n\t<title>Sustainable and Diversified Economy in Bahrain</title>\n\...
wizardlm
[ { "role": "user", "content": "Create a ReactJS component that not only dynamically displays a provided page's meta description on the screen, but also includes error handling for invalid or missing URLs. Implement functionality to sanitize the received URLs to prevent potential security risks." }, { ...
magicoder
[ { "role": "user", "content": "Generate a Python function that takes a dataframe and returns a new dataframe with only the columns that start with the letter 'A'" }, { "role": "assistant", "content": "```python\ndef filter_A_columns(df): \n col_list = [col for col in df.columns if col[0] == 'A...
python25k
[ { "role": "user", "content": "Disable screenshots in wdio runner\n\nI don't understand when the screenshots are taken so I'm disabling them.\n\n(Language: JavaScript)\n\nexports.config = {\n host: 'selenium',\n\n specs: [\n './tests/acceptance/specs/**/*.spec.js'\n ],\n\n maxInstances: 10,\n capabil...
commitpackft
[ { "role": "user", "content": "Improve error handling for service retrieval\n\n(Language: JavaScript)\n\nvar request = require('request');\nvar async = require('async');\nvar Service = require('./service.js');\n\nmodule.exports = function(uri){\n this.uri = uri;\n\n this.getServices = function(callback...
commitpackft
[ { "role": "user", "content": "Enhance the subsequent code segment by incorporating a try/except block to manage potential exceptions.\ndef read_file(filename):\n with open(filename) as f:\n return f.read()" }, { "role": "assistant", "content": "You can add a try/except block to this fu...
magicoder
[ { "role": "user", "content": "Allow subclass customizing event and action\n\n(Language: JavaScript)\n\nmi2JS.comp.add('base/Button', 'Base', '',\n\n// component initializer function that defines constructor and adds methods to the prototype \nfunction(proto, superProto, comp, superComp){\n\n\tproto.construc...
commitpackft
[ { "role": "user", "content": "Execute code: import random\nprint(random.choice(['apple', 'banana', 'cherry']))" }, { "role": "assistant", "content": "```python\nimport random\nprint(random.choice(['apple', 'banana', 'cherry']))\n# Code executed.\n```" } ]
python25k
[ { "role": "user", "content": "Add basic encryption for database\n\n(Language: JavaScript)\n\nvar parse = require('./js/parse');\nvar Datastore = require('nedb');\nvar db = new Datastore({\n filename: `${__dirname}/tasks.db`,\n autoload: true\n});\n\n/**\n * Get a query, parse it and add it to\n * database...
commitpackft
[ { "role": "user", "content": "{\n \"location1\": {\n \"name\": \"Boston\",\n \"country\": \"United States\",\n \"coordinates\": {\n \"latitude\": 42.3601,\n \"longitude\": -71.0589\n }\n },\n \"location2\": {\n \"name\": \"Boston\",\n \"country\": \"England\",\n \"coordinat...
wizardlm
[ { "role": "user", "content": "(Note: The word count of the rewritten prompt is 138, which is more than the given prompt word count of 106. However, the prompt is more complex and requires multi-step reasoning compared to the given prompt.)" }, { "role": "assistant", "content": "Rewritten prompt:...
wizardlm
[ { "role": "user", "content": "How can investors utilize qualitative data analysis to make more informed investment decisions? Develop a comprehensive approach that involves multiple steps to gather and interpret qualitative data from various sources such as news articles, social media, and expert opinions. ...
wizardlm
[ { "role": "user", "content": "Rename some constants and strings\n\n(Language: Java)\n\n/*\n * Copyright 2016 ThoughtWorks, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the Lice...
commitpackft
[ { "role": "user", "content": "Generate the output of this code snippet in Python 3 name = \"Jill\"\nprint(\"Hello \" + name + \"!\")" }, { "role": "assistant", "content": "Hello Jill!" } ]
python25k
[ { "role": "user", "content": "Develop a Python function capable of constructing a collection that contains the square of integers within the range starting from 0 and ending at the specified parameter. The particular parameter to utilize here is 10." }, { "role": "assistant", "content": "Here is...
magicoder
[ { "role": "user", "content": "Remove image on backspace key event\n\n(Language: JavaScript)\n\ndefine([\n 'summernote/base/core/func',\n 'summernote/base/core/list',\n 'summernote/base/core/dom'\n], function (func, list, dom) {\n var ImagePopover = function (context) {\n var ui = $.summernote.ui;\n\n...
commitpackft
[ { "role": "user", "content": "How does the dystopian novel \"The Hunger Games\" by Suzanne Collins explore the themes of societal oppression, government control, and the influence of media on individual and collective consciousness? In addition, what is the character development of Katniss Everdeen and her ...
wizardlm
[ { "role": "user", "content": "Create a program that:\n\n1. Reads a JSON string which may consist of multiple nested JSON objects and arrays. For example:\n\n```json\n{\n \"fruits\": {\n \"orange\": 4,\n \"apple\": 1\n },\n \"dates\": [\n \"2020-09-09\",\n {\n \"banana\": 2,\n \"grap...
magicoder
[ { "role": "user", "content": "Add UIView+Render header to toolkit include.\n\n(Language: C)\n\n//\n// Toolkit header to include the main headers of the 'AFToolkit' library.\n//\n\n#import \"AFDefines.h\"\n#import \"AFLogHelper.h\"\n#import \"AFFileHelper.h\"\n#import \"AFPlatformHelper.h\"\n#import \"AFReac...
commitpackft
[ { "role": "user", "content": "Given a piece of code that is supposed to reverse a string without using any built-in functions in Python, however, it contains a few errors. Your task is to debug this code and also enhance it by extending its functionality. The enhanced code should not only be able to reverse...
magicoder
[ { "role": "user", "content": "I am looking for an automated solution to differentiate my modern fortran code, which heavily relies on petsc libraries. In addition, I need the automated solution to take into account the parallel nature of the code and the sparse matrices used in it. What options do I have to...
wizardlm
[ { "role": "user", "content": "Delve into the intricacies of the \"asyncio\" library in Python, specifically emphasizing the \"async\" and \"await\" keywords and their roles in asynchronous programming and concurrency." }, { "role": "assistant", "content": "As an AI, I can't perform programming t...
magicoder
[ { "role": "user", "content": "Add trivial though meaningful comment.\n\n(Language: Go)\n\npackage algoholic\n\nimport \"testing\"\n\nfunc TestInsertionSortSortsReversedInts(t *testing.T) {\n\tcorrectlySortsReversedInts(t, 1e4, func(ns []int) []int {\n\t\tInsertionSort(ns)\n\t\treturn ns\n\t})\n}" }, { ...
commitpackft
[ { "role": "user", "content": "I have an input textbox like this but I want to append % at the end of any value that was input into it at the end\n\n<input type=\"text\" digitsOnly/>\n\n\nSo if 50 was put in 50% would display\nI tried adding a `::after` with `content: \"%\"` in the styles but nothing appears...
magicoder
[ { "role": "user", "content": "Send a user agent to the server.\n\nThis is to get a rough idea of what version of the binary people are\nusing and also their platform and architecture.\n\n(Language: Go)\n\npackage core\n\nimport (\n\t\"google.golang.org/grpc\"\n\t\"log\"\n\t\"os\"\n\tmsg \"qpm.io/common/mess...
commitpackft
[ { "role": "user", "content": "Using only scientific terminology, summarize a peer-reviewed research paper on the decline of wild bee species in a single sentence, including at least three specific causes and three potential solutions for the issue. Additionally, provide a table comparing the population tren...
wizardlm
[ { "role": "user", "content": "How can I use the Linux command line to check the disk usage of a specific directory and its subdirectories? Also, how can I sort the output by size to identify the largest files?" }, { "role": "assistant", "content": "To check the disk usage of a specific directory...
wizardlm
[ { "role": "user", "content": "Make the `now` helper timezone aware\n\nThanks @tysonclugg\n\n(Language: Python)\n\nfrom django.core.urlresolvers import reverse\nfrom django.utils.encoding import iri_to_uri\n\nimport datetime\n\nfrom knights.library import Library\n\nregister = Library()\n\n\n@register.helper...
commitpackft
[ { "role": "user", "content": "Explain how the fast Fourier transform algorithm works in Python" }, { "role": "assistant", "content": "The Fast Fourier Transform (FFT) is an efficient algorithm used to compute the discrete Fourier transform (DFT). The algorithm works by decomposing a signal into ...
python25k
[ { "role": "user", "content": "Refine the specified Python function labelled 'count_nums'. The input parameter 'arr' encapsulates a collection of integers. The function's intent is to return a count of those array elements for which the cumulative total of digits (taking into account a negative initial digit...
magicoder
[ { "role": "user", "content": "Support nil cfg for NewClient\n\n(Language: Go)\n\npackage docker\n\nimport (\n\t\"time\"\n\n\tdockerClient \"github.com/fsouza/go-dockerclient\"\n\t\"github.com/rancherio/os/config\"\n)\n\nconst (\n\tMAX_WAIT = 30000\n\tINTERVAL = 100\n)\n\nfunc NewClient(cfg *config.Config) (...
commitpackft
[ { "role": "user", "content": "Add text representation to alignments\n\n(Language: Java)\n\n/*\n * Copyright (C) 2017 Dennis Neufeld\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published\n * by the Free Softwa...
commitpackft
[ { "role": "user", "content": "Add spoof user-agent to temporarilly fix WebView issue\n\n(Language: JavaScript)\n\n// @flow\nimport React from 'react'\nimport {\n WebView,\n View,\n ActivityIndicator,\n Modal\n} from 'react-native'\nimport { constants, loader } from '../../style'\ntype Event = { nativeEv...
commitpackft
[ { "role": "user", "content": "Construct a SQL query that not only extracts the aliases and residential details of the customers from the database, but also includes the total purchase amount made by each customer, sorted in descending order, using an uncommonly used SQL clause. Moreover, address potential i...
magicoder
[ { "role": "user", "content": "Make the hostname probe for real\n\n(Language: C)\n\n#include <sys/utsname.h>\n#include <libopticonf/var.h>\n#include \"probes.h\"\n\n/** List of built-in probe functions */\nbuiltinfunc BUILTINS[] = {\n {\"probe_pcpu\", runprobe_pcpu},\n {\"probe_hostname\", runprobe_hos...
commitpackft
[ { "role": "user", "content": "Craft an SQL command to extract complete data pertaining to the workforce members associated with department number 1 who are drawing a remuneration surpassing the 50,000 threshold." }, { "role": "assistant", "content": "Here is a basic SQL command that would extrac...
magicoder
[ { "role": "user", "content": "Implement tests for breathing model\n\n(Language: Python)\n\nfrom django.test import TestCase\nfrom ..models import Temperature, HeartBeats\n\n\nclass TemperatureTest(TestCase):\n \"\"\"Test class for temperature model\"\"\"\n\n def setUp(self):\n Temperature.objec...
commitpackft
[ { "role": "user", "content": "Generate Python code to get a list of the top 20 Reddit posts from a given subreddit" }, { "role": "assistant", "content": "```python\nimport requests\nimport json\n\n# Get the response from reddit\nurl = \"https://www.reddit.com/r/dataisbeautiful/top/.json\"\nheade...
python25k