SMART
Collection
Collection of models and datasets used for ACL 2024 paper, SMART - Submodular Data Mixture Strategy for Instruciton Tuning
•
338 items
•
Updated
prompt
stringlengths 114
7.32k
| response
stringlengths 1
523
|
---|---|
Instructions: Given a concept word, generate a hypernym for it. A hypernym is a superordinate, i.e. a word with a broad meaning constituting a category, that generalizes another word. For example, color is a hypernym of red.
Input: head
Output: | object |
Teacher:In this task, you are given two sets, and you need to count the number of elements at the union of two given sets. A Set is shown by two curly braces and comma-separated numbers inside, like {1, 2, 3}. Union of two given sets is the smallest set which contains all the elements of both the sets. To find the union of two given sets, A and B is a set that consists of all the elements of A and all the elements of B such that no element is repeated.
Teacher: Now, understand the problem? Solve this instance: Set1: '{16, 12, 15}', Set2: '{14, 15, 16, 18, 19}'. How many elements are there in the union of Set1 and Set2 ?
Student: | 6 |
Read the given message of a sender that is intended to start a conversation, and determine whether it was written by a 'Bot' or by a 'Human'. Typically, bots will have a more disjointed manner of speaking, and will make statements that don't relate to each other, don't make coherent sense, or otherwise appear unnatural. Human will make statements in a more or less coherent and logical way. Since these messages are supposed to be conversation openers, humans will generally start sensibly with a hello or an introduction. Humans may also ask why the other person is not responding. Bots, however, may act as if they are in the middle of a nonsensical conversation.
[EX Q]: SENDER A: do you have any animals ?
[EX A]: Bot
[EX Q]: SENDER A: Buongiorno! Such a nice day! How are you?
[EX A]: Bot
[EX Q]: SENDER A: What do you do for living?
SENDER A: What is the color of your eyes?
SENDER A: What is color of your skin?
SENDER A: Do you like bikes?
[EX A]: | Human
|
Given an input word generate a word that rhymes exactly with the input word. If not rhyme is found return "No"
[Q]: danger
[A]: stranger
[Q]: them
[A]: gem
[Q]: mount
[A]: | mt
|
In this task you will be given a string and you should find the longest substring that is a palindrome. A palindrome is a string that is the same backwards as it is forwards. If the shortest possible palindrome is length 1 you should return the first character.
ssslwsswlws
lwsswl
gvvvgvyvyy
gvvvg
ccwwwwcrrc
| cwwwwc
|
In this task, you need to provide the parts-of-speech tag of a word present in a sentence specified within curly braces ( '{{ ... }}' ). The parts-of-speech tags are fine labels that represent a category of words with similar grammatical properties. The list of part-of-speech tags i.e tagset of this corpus is : '$': Dollar Sign, "''": Single Quotes, ',': Comma Symbol, '-LRB-': Left Parantheses, '-RRB-': Right Parantheses, '.': Period, ':': Colon, 'ADD': Email Address, 'AFX': Affix, 'CC': Coordinating conjunction, 'CD': Cardinal Number, 'DT': Determiner, 'EX': Existential there, 'FW': Foreign Word, 'GW': Go with, 'HYPH': Hyphen symbol, 'IN': Preposition or a subordinating conjunction, 'JJ': Adjective, 'JJR': A comparative Adjective, 'JJS': A Superlative Adjective, 'LS': List item Marker, 'MD': Modal, 'NFP': Superfluous punctuation, 'NN': Singular Noun, 'NNP': Singular Proper Noun, 'NNPS': Prural Proper Noun, 'NNS': Prural Noun, 'PDT': Pre-determiner, 'POS': Possessive Ending, 'PRP': Personal pronoun, 'PRP$': Possessive Pronoun, 'RB': Adverb, 'RBR': Comparative Adverb, 'RBS': Superlative Adverb, 'RP': Particle, 'SYM': Symbol, 'TO': To , 'UH': Interjection, 'VB': Base form Verb, 'VBD': Verb in Past tense, 'VBG': Verb in present participle, 'VBN': Verb in past participle, 'VBP': Verb in non-3rd person singular present, 'VBZ': Verb in 3rd person singular present, 'WDT': Wh-determiner, 'WP': Wh-pronoun, 'WP$' Possessive Wh-pronoun, 'WRB': Wh-adverb, 'XX': Unknown, '``': Double backticks.
Input: Consider Input: Sentence: the company is Arco Products , adn their comments are on the {{ attached }} file .
Word: attached
Output: VBN
Input: Consider Input: Sentence: Game 15 : Monday , August 6 @ 7:00 PM vs. Phoenix {{ MERCURY }}
Word: MERCURY
Output: NNP
Input: Consider Input: Sentence: I m around 5 ' 2 - 5 ' 4 , 11 years old and i m wondering what size horse i 'll need {{ that }} i wo nt grow out of quickly ?
Word: that
| Output: WDT
|
Teacher:You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right
Teacher: Now, understand the problem? Solve this instance: [49, 57, 65, 73, 81, 89, 97]
Student: | 1 |
In this task, you need to provide the parts-of-speech tag of a word present in a sentence specified within curly braces ( '{{ ... }}' ). The parts-of-speech tags are fine labels that represent a category of words with similar grammatical properties. The list of part-of-speech tags i.e tagset of this corpus is : '$': Dollar Sign, "''": Single Quotes, ',': Comma Symbol, '-LRB-': Left Parantheses, '-RRB-': Right Parantheses, '.': Period, ':': Colon, 'ADD': Email Address, 'AFX': Affix, 'CC': Coordinating conjunction, 'CD': Cardinal Number, 'DT': Determiner, 'EX': Existential there, 'FW': Foreign Word, 'GW': Go with, 'HYPH': Hyphen symbol, 'IN': Preposition or a subordinating conjunction, 'JJ': Adjective, 'JJR': A comparative Adjective, 'JJS': A Superlative Adjective, 'LS': List item Marker, 'MD': Modal, 'NFP': Superfluous punctuation, 'NN': Singular Noun, 'NNP': Singular Proper Noun, 'NNPS': Prural Proper Noun, 'NNS': Prural Noun, 'PDT': Pre-determiner, 'POS': Possessive Ending, 'PRP': Personal pronoun, 'PRP$': Possessive Pronoun, 'RB': Adverb, 'RBR': Comparative Adverb, 'RBS': Superlative Adverb, 'RP': Particle, 'SYM': Symbol, 'TO': To , 'UH': Interjection, 'VB': Base form Verb, 'VBD': Verb in Past tense, 'VBG': Verb in present participle, 'VBN': Verb in past participle, 'VBP': Verb in non-3rd person singular present, 'VBZ': Verb in 3rd person singular present, 'WDT': Wh-determiner, 'WP': Wh-pronoun, 'WP$' Possessive Wh-pronoun, 'WRB': Wh-adverb, 'XX': Unknown, '``': Double backticks.
Q: Sentence: Everybody seems to flee this country and move overseas , to Australia , {{ etc }} .
Word: etc
A: | FW |
Given the task definition and input, reply with output. In this task, you are given a hateful post in Bengali that expresses hate or encourages violence towards a person or a group based on the protected characteristics such as race, religion, sex, and sexual orientation. You are expected to classify the post into two classes: religious or non-political religious on the topic.
আন্তর্জাতিক ডেস্ক নোট বাতিল কাণ্ডে ভারতজুড়ে দেখা দিয়েছে নৈরাজ্য। তাতে বাদ যাবেন কেন মন্ত্রী এমপিরা। এবার মহারাষ্ট্রের সমবায়মন্ত্রী সুভাষ দেশমুখের গাড়ি থেকে লাখ টাকার মূল্যমানের নিষিদ্ধ ও এক হাজার টাকার নোট উদ্ধার করা হয়েছে। খবর আনন্দবাজার পত্রিকার।
| non-religious |
Given an input word generate a word that rhymes exactly with the input word. If not rhyme is found return "No"
Ex Input:
came
Ex Output:
fame
Ex Input:
plural
Ex Output:
rural
Ex Input:
whether
Ex Output:
| weather
|
A ploynomial equation is a sum of terms. Here each term is either a constant number, or consists of the variable x raised to a certain power and multiplied by a number. These numbers are called weights. For example, in the polynomial: 2x^2+3x+4, the weights are: 2,3,4. You can present a polynomial with the list of its weights, for example, equation weights = [6, 4] represent the equation 6x + 4 and equation weights = [1, 3, 4] represent the equation 1x^2 + 3x + 4. In this task, you need to compute the result of a polynomial expression by substituing a given value of x in the given polynomial equation. Equation weights are given as a list.
Q: x = 1, equation weights = [8, 9, 7, 6, 3]
A: 33
****
Q: x = 6, equation weights = [5, 8, 3]
A: 231
****
Q: x = 2, equation weights = [7, 4, 6]
A: | 42
****
|
Detailed Instructions: Turn the given fact into a question by a simple rearrangement of words. This typically involves replacing some part of the given fact with a WH word. For example, replacing the subject of the provided fact with the word "what" can form a valid question. Don't be creative! You just need to rearrange the words to turn the fact into a question - easy! Don't just randomly remove a word from the given fact to form a question. Remember that your question must evaluate scientific understanding. Pick a word or a phrase in the given fact to be the correct answer, then make the rest of the question. You can also form a question without any WH words. For example, "A radio converts electricity into?"
Problem:Fact: Thyroxine increase the rate of metabolism in cells throughout the body.
Solution: | What increases the rate of metabolism in cells throughout the body? |
You will be given a definition of a task first, then some input of the task.
Given a concept word, generate a hypernym for it. A hypernym is a superordinate, i.e. a word with a broad meaning constituting a category, that generalizes another word. For example, color is a hypernym of red.
coconut
Output: | produce |
Detailed Instructions: Given the sentence, generate "yes, and" response. "Yes, and" is a rule-of-thumb in improvisational comedy that suggests that a participant in a dialogue should accept what another participant has stated ("Yes") and then expand on that line of thought or context ("and..."). 1 In short, a "Yes, and" is a dialogue exchange in which a speaker responds by adding new information on top of the information/setting that was constructed by another speaker. Note that a "Yes, and" does not require someone explicitly saying 'yes, and...' as part of a dialogue exchange, although it could be the case if it agrees with the description above. There are many ways in which a response could implicitly/explicitly agree to the prompt without specifically saying 'yes, and...'.
Q: You want to be an au pair? How is that different from a nanny?
A: | I'm from another country and you don't pay me. |
Instructions: A ploynomial equation is a sum of terms. Here each term is either a constant number, or consists of the variable x raised to a certain power and multiplied by a number. These numbers are called weights. For example, in the polynomial: 2x^2+3x+4, the weights are: 2,3,4. You can present a polynomial with the list of its weights, for example, equation weights = [6, 4] represent the equation 6x + 4 and equation weights = [1, 3, 4] represent the equation 1x^2 + 3x + 4. In this task, you need to compute the result of a polynomial expression by substituing a given value of x in the given polynomial equation. Equation weights are given as a list.
Input: x = 2, equation weights = [3, 5, 7, 1, 4]
Output: | 122 |
In this task, you are given a country name and you need to return the Top Level Domain (TLD) of the given country. The TLD is the part that follows immediately after the "dot" symbol in a website's address. The output, TLD is represented by a ".", followed by the domain.
Let me give you an example: Andorra
The answer to this example can be: .ad
Here is why: .ad is the TLD of the country called Andorra.
OK. solve this:
Antigua and Barbuda
Answer: | .ag |
Teacher:Given an input word generate a word that rhymes exactly with the input word. If not rhyme is found return "No"
Teacher: Now, understand the problem? Solve this instance: plural
Student: | rural |
Q: You are given a time in 24-Hours format, and you need to convert it to time in the 12-Hours format. For a 24-Hours format time larger than 12:00, subtract 12 hours from the given time, then add 'PM'. For example, if you have 14:30 hours, subtract 12 hours, and the result is 2:30 PM. If the 24-Hours format time is less than or equal to 12:00, add 'AM'. For example, say you have 10:15 hours, add the 'AM' to the end, here we get 10:15 AM. Note that 00:00 Hrs in 24-Hours format is 12:00 AM in 12-Hours format and 12:00 Hrs in 24-Hours format would be 12:00 PM in 12-Hours format.
04:44 Hrs
A: | 04:44 AM |
We would like you to assess the QUALITY of each of the following argument (discussing Death Penalty) and determine if the argument is Valid or Invalid. A valid argument is clearly interpretable and either expresses an argument, or a premise or a conclusion that can be used in an argument for the topic of death penalty. An invalid argument is a phrase that cannot be interpreted as an argument or not on the topic of death penalty.
Q: Texas' system of capital punishment is less than a quarter the cost of housing a criminal for life.
A: Valid
****
Q: But the statistics don't support the idea that the death penalty is any more effective as a detterent than is a life sentence.
A: Valid
****
Q: ̢���The additional cost of confining an inmate to death row, as compared to the maximum security prisons where those sentenced to life without possibility of parole ordinarily serve their sentences, is $90,000 per year per inmate.
A: | Valid
****
|
Given an input word generate a word that rhymes exactly with the input word. If not rhyme is found return "No"
[EX Q]: blood
[EX A]: mud
[EX Q]: start
[EX A]: heart
[EX Q]: corn
[EX A]: | scorn
|
Read the given story and classify it as 'imagined', 'recalled', or 'retold'. If a story is imagined, the person who wrote the story is making it up, pretending they experienced it. If a story is recalled, the person who wrote the story really experienced it and is recalling it from memory. If a story is retold, it is a real memory like the 'recalled' stories, but written down much later after previously writing a 'recalled' story about the same events. So, recalled stories and retold stories will be fairly similar, in that they both were real experiences for the writer. Imagined stories have a more linear flow and contain more commonsense knowledge, whereas recalled stories are less connected and contain more specific concrete events. Additionally, higher levels of self reference are found in imagined stories. Between recalled and retold stories, retold stories flow significantly more linearly than recalled stories, and retold stories are significantly higher in scores for cognitive processes and positive tone.
The date was July 29th, 2019. It’s officially my due date! A few days ago, I went to the hospital with horrible contractions. They sent me home because I was only 1cm dilated. I’ve been in so much pain, I haven’t slept for around 48 hours. It hurt to sit, hurt to lay down, I’ve basically been standing up on my feet for 2 days. I haven’t eaten either. My bladder was irritated and just stopped working. I couldn’t pee no matter how hard I tried. I was truly the most miserable I’ve ever been. I finally couldn’t stand it anymore so my mom and boyfriend took me back to the hospital and I FINALLY got admitted!! :D I guess all those crazy contractions worked because I finally dilated to 3cm and they admitted me! (After threatening their lives if they didn’t lol) so here I am, on my due date, CRAZY happy with my epidural, and waiting to progress. Right now I’m about 5-6cm. Can’t wait to meet my little boy! UPDATE: My son was born 7/29 at 2:49am. 5 lbs 9oz We’re in post partum recovery, I ended up having a c-section due to meconium in his amniotic fluid. He is perfect, healthy, and we’re learning breastfeeding together. He’s my angel. | recalled |
TASK DEFINITION: Given a sequence of actions to navigate an agent in its environment, provide the correct command in a limited form of natural language that matches the sequence of actions when executed. Commands are lowercase and encapsulate the logic of the sequence of actions. Actions are individual steps that serve as the building blocks for a command. There are only six actions: 'I_LOOK', 'I_WALK', 'I_RUN', 'I_JUMP', 'I_TURN_LEFT', and 'I_TURN_RIGHT'. These actions respectively align with the commands 'look', 'walk', 'run', 'jump', 'turn left', and 'turn right'. For commands, 'left' and 'right' are used to denote the direction of an action. opposite turns the agent backward in the specified direction. The word 'around' makes the agent execute an action while turning around in the specified direction. The word 'and' means to execute the next scope of the command following the previous scope of the command. The word 'after' signifies to execute the previous scope of the command following the next scope of the command. The words 'twice' and 'thrice' trigger repetition of a command that they scope over two times or three times, respectively. Actions and commands do not have quotations in the input and output.
PROBLEM: I_TURN_RIGHT I_RUN I_TURN_LEFT I_TURN_LEFT I_JUMP I_TURN_LEFT I_TURN_LEFT I_JUMP
SOLUTION: jump opposite left twice after run right
PROBLEM: I_TURN_RIGHT I_TURN_LEFT I_RUN
SOLUTION: run left after turn right
PROBLEM: I_TURN_RIGHT I_RUN I_TURN_RIGHT I_RUN I_TURN_RIGHT I_RUN I_TURN_RIGHT I_TURN_RIGHT I_WALK I_TURN_RIGHT I_TURN_RIGHT I_WALK
SOLUTION: | walk opposite right twice after run right thrice
|
In this task you will be given a string and you should find the longest substring that is a palindrome. A palindrome is a string that is the same backwards as it is forwards. If the shortest possible palindrome is length 1 you should return the first character.
--------
Question: tggggtgtgttgtgg
Answer: gtgttgtg
Question: qhqqkhqkqqkhh
Answer: kqqk
Question: tduuduuutddudud
Answer: | uuduu
|
You will be given a definition of a task first, then an example. Follow the example to solve a new instance of the task.
In this task, you are given an english sentence and a kurdish sentence you have to determine if they both are faithful translations of each other.
Construct an answer that is 'Yes' if the second 'Kurdish' sentence is a translation of 'English' sentence and 'No' otherwise
'English : Diyarbakır 2nd Criminal Court of Peace has issued a gag order on the bomb attack on police shuttle in Diyarbakır.', 'Kurdish : Biryara qedexekirinê di rûpela Lijneya Bilnd a Radyo û Televizyonan (RTUK) de bi daxuyaniyek hat diyarkirin û wiha hat gotin:'
Solution: Yes
Why? The answer is 'Yes' because the second sentence is a consise and faithful translation of 'English' sentence into 'Kurdish'
New input: 'English : m) Banning, postponing, requiring permission for assemblies or protest marches to be held in closed and open areas determining, assigning and appointing the location and time of assemblies and protest marches as well as monitoring and guarding and if necessary dispersing all assemblies subjected to permission','Kurdish : Li gor DHAyê 2 PKKyî û li gor ajansa Anadolûyê(AA) PKKyîyek miriye.'
Solution: | No |
In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.
Let me give you an example: [47, 444, 859, 530, 197, 409]
The answer to this example can be: [47, 859, 197, 409]
Here is why: The integers '444' and '530' are not prime integers and they were removed from the list.
OK. solve this:
[407, 155, 445, 263, 554, 19, 611, 915, 397, 194]
Answer: | [263, 19, 397] |
Q: Read the given message of a sender that is intended to start a conversation, and determine whether it was written by a 'Bot' or by a 'Human'. Typically, bots will have a more disjointed manner of speaking, and will make statements that don't relate to each other, don't make coherent sense, or otherwise appear unnatural. Human will make statements in a more or less coherent and logical way. Since these messages are supposed to be conversation openers, humans will generally start sensibly with a hello or an introduction. Humans may also ask why the other person is not responding. Bots, however, may act as if they are in the middle of a nonsensical conversation.
SENDER A: hi there
SENDER A: i just bought my first home and would be glad to see you there
SENDER A: cause i already have a children in the basement
SENDER A: that might sounds rough but i am an omnivore
SENDER A: i am expecting twins in two months i ordered on ebay with cashback
A: | Human |
Detailed Instructions: In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.
Problem:[349, 309, 165, 702, 451, 941, 261, 308, 637, 839, 859, 677, 281]
Solution: | [349, 941, 839, 859, 677, 281] |
A ploynomial equation is a sum of terms. Here each term is either a constant number, or consists of the variable x raised to a certain power and multiplied by a number. These numbers are called weights. For example, in the polynomial: 2x^2+3x+4, the weights are: 2,3,4. You can present a polynomial with the list of its weights, for example, equation weights = [6, 4] represent the equation 6x + 4 and equation weights = [1, 3, 4] represent the equation 1x^2 + 3x + 4. In this task, you need to compute the result of a polynomial expression by substituing a given value of x in the given polynomial equation. Equation weights are given as a list.
Q: x = 3, equation weights = [7, 9, 1]
A: | 91 |
Given a part of privacy policy text, identify the purpose for which the user information is collected/used. The purpose should be given inside the policy text, answer as 'Not Specified' otherwise
[Q]: An unnamed third party does receive your unspecified personal information for a basic service or feature. The data is personally identifiable. You can opt out by contacting the company for the collection or sharing of your information.
[A]: Basic service/feature
[Q]: The site collects your cookies or tracking elements for analytics or research. Collection happens when you implicitly provide information on the website.
[A]: Analytics/Research
[Q]: A named third party does receive unspecified information about you for legal requirements.
[A]: | Legal requirement
|
Instructions: Turn the given fact into a question by a simple rearrangement of words. This typically involves replacing some part of the given fact with a WH word. For example, replacing the subject of the provided fact with the word "what" can form a valid question. Don't be creative! You just need to rearrange the words to turn the fact into a question - easy! Don't just randomly remove a word from the given fact to form a question. Remember that your question must evaluate scientific understanding. Pick a word or a phrase in the given fact to be the correct answer, then make the rest of the question. You can also form a question without any WH words. For example, "A radio converts electricity into?"
Input: Fact: Fanning a fire allows it to continue burning.
Output: | What does fanning a fire do? |
Given the task definition and input, reply with output. Given a sequence of actions to navigate an agent in its environment, provide the correct command in a limited form of natural language that matches the sequence of actions when executed. Commands are lowercase and encapsulate the logic of the sequence of actions. Actions are individual steps that serve as the building blocks for a command. There are only six actions: 'I_LOOK', 'I_WALK', 'I_RUN', 'I_JUMP', 'I_TURN_LEFT', and 'I_TURN_RIGHT'. These actions respectively align with the commands 'look', 'walk', 'run', 'jump', 'turn left', and 'turn right'. For commands, 'left' and 'right' are used to denote the direction of an action. opposite turns the agent backward in the specified direction. The word 'around' makes the agent execute an action while turning around in the specified direction. The word 'and' means to execute the next scope of the command following the previous scope of the command. The word 'after' signifies to execute the previous scope of the command following the next scope of the command. The words 'twice' and 'thrice' trigger repetition of a command that they scope over two times or three times, respectively. Actions and commands do not have quotations in the input and output.
I_TURN_RIGHT I_TURN_RIGHT I_JUMP I_TURN_LEFT I_TURN_LEFT I_WALK I_TURN_LEFT I_TURN_LEFT I_WALK I_TURN_LEFT I_TURN_LEFT I_WALK
| walk opposite left thrice after jump opposite right |
Given the task definition and input, reply with output. You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right
[48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194]
| 1 |
In this task you will be given a list of dictionaries. A dictionary is a set of key-value pairs, where each key is unique and has a value associated with that key. You should sort the list of dictionaries from smallest to largest by their 'first' key. If there is two dictionaries with the same 'first' value then sort them by their 'second' key. Negative numbers should come before positive numbers.
Ex Input:
[{'first': -2, 'second': 46}, {'first': -8, 'second': 21}, {'first': 17, 'second': 92}, {'first': -77, 'second': -24}]
Ex Output:
[{'first': -77, 'second': -24}, {'first': -8, 'second': 21}, {'first': -2, 'second': 46}, {'first': 17, 'second': 92}]
Ex Input:
[{'first': 55, 'second': 15}, {'first': -54, 'second': -33}, {'first': 64, 'second': 21}, {'first': 92, 'second': -40}, {'first': 9, 'second': -33}, {'first': -29, 'second': 70}, {'first': -30, 'second': -24}, {'first': -43, 'second': -62}, {'first': 91, 'second': 54}]
Ex Output:
[{'first': -54, 'second': -33}, {'first': -43, 'second': -62}, {'first': -30, 'second': -24}, {'first': -29, 'second': 70}, {'first': 9, 'second': -33}, {'first': 55, 'second': 15}, {'first': 64, 'second': 21}, {'first': 91, 'second': 54}, {'first': 92, 'second': -40}]
Ex Input:
[{'first': -31, 'second': 13}, {'first': -43, 'second': -18}, {'first': 53, 'second': -38}, {'first': 20, 'second': -1}]
Ex Output:
| [{'first': -43, 'second': -18}, {'first': -31, 'second': 13}, {'first': 20, 'second': -1}, {'first': 53, 'second': -38}]
|
Given a concept word, generate a hypernym for it. A hypernym is a superordinate, i.e. a word with a broad meaning constituting a category, that generalizes another word. For example, color is a hypernym of red.
Q: toast
A: | bread |
Detailed Instructions: In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.
Problem:[994, 379, 373, 76, 683]
Solution: | [379, 373, 683] |
Instructions: Given a concept word, generate a hypernym for it. A hypernym is a superordinate, i.e. a word with a broad meaning constituting a category, that generalizes another word. For example, color is a hypernym of red.
Input: guitar
Output: | artifact |
In this task, you are given two sets, and you need to count the number of elements at the union of two given sets. A Set is shown by two curly braces and comma-separated numbers inside, like {1, 2, 3}. Union of two given sets is the smallest set which contains all the elements of both the sets. To find the union of two given sets, A and B is a set that consists of all the elements of A and all the elements of B such that no element is repeated.
Q: Set1: '{4, 7, 8, 9, 10, 12}', Set2: '{8}'. How many elements are there in the union of Set1 and Set2 ?
A: 6
****
Q: Set1: '{4, 7, 10, 11, 13, 18}', Set2: '{2, 3, 4, 6, 8, 9, 11, 15, 18}'. How many elements are there in the union of Set1 and Set2 ?
A: 12
****
Q: Set1: '{19, 18, 11}', Set2: '{9, 15, 16, 17, 18}'. How many elements are there in the union of Set1 and Set2 ?
A: | 7
****
|
Definition: This task is to find the number of 'For' loops present in the given cpp program.
Input: int n, m, ans, a[20];
void calc(int dep, int x)
{
if (x == 1)
{
ans++;
return;
}
for (int i = a[dep-1]; i <= x; i++)
if (!(x % i))
{
a[dep] = i;
calc(dep + 1, x / i);
}
}
int main()
{
scanf("%d", &n);
for (a[0] = 2;n; n--)
{
scanf("%d", &m);
ans = 0;
calc(1, m);
printf("%d\n", ans);
}
return 0;
}
Output: | 2 |
Detailed Instructions: In mathematics, the absolute value of a number is the non-negative value of that number, without regarding its sign. For example, the absolute value of -2 is 2, and the absolute value of 5 is 5. In this task you will be given a list of numbers and you need to return the element with highest absolute value. If a negative and positive element have the same absolute value you should return the positive element. The absolute value for negative numbers can be found by multiplying them by -1. After finding the element with the maximum absolute value you should return the value of that element before you applied the absolute value.
Q: [68.016 -3.795 74.085]
A: | 74.085 |
Given the task definition and input, reply with output. Given a concept word, generate a hypernym for it. A hypernym is a superordinate, i.e. a word with a broad meaning constituting a category, that generalizes another word. For example, color is a hypernym of red.
shirt
| artefact |
Given the task definition, example input & output, solve the new input case.
In this task, you are given two sets, and you need to count the number of elements at the union of two given sets. A Set is shown by two curly braces and comma-separated numbers inside, like {1, 2, 3}. Union of two given sets is the smallest set which contains all the elements of both the sets. To find the union of two given sets, A and B is a set that consists of all the elements of A and all the elements of B such that no element is repeated.
Example: Set1: '{2, 3, 6, 9, 10, 14, 15, 20}', Set2: '{3, 5, 7, 9, 12, 15, 16}'. How many elements are there in the union of Set1 and Set2 ?
Output: 12
The union of Set1 and Set2 is {2, 3, 5, 6, 7, 9, 10, 12, 14, 15, 16, 20}. It has 12 elements. So, the answer is 12.
New input case for you: Set1: '{2, 6, 7, 11, 20}', Set2: '{2, 3, 5, 9, 17, 18, 19}'. How many elements are there in the union of Set1 and Set2 ?
Output: | 11 |
Instructions: In this task, you are given two sets, and you need to count the number of elements at the union of two given sets. A Set is shown by two curly braces and comma-separated numbers inside, like {1, 2, 3}. Union of two given sets is the smallest set which contains all the elements of both the sets. To find the union of two given sets, A and B is a set that consists of all the elements of A and all the elements of B such that no element is repeated.
Input: Set1: '{3, 4, 5, 6, 8, 13, 17, 19}', Set2: '{2, 3, 5, 8, 11, 16}'. How many elements are there in the union of Set1 and Set2 ?
Output: | 11 |
This task is to find the number of 'For' loops present in the given cpp program.
Example: main()
{
float a[4];
float k;
float c;
int i;
for(i=0;i<4;i++)
{
scanf("%f",&a[i]);
}
scanf("%f",&c);
c=2*3.1415926*c/360;
k=(a[0]+a[1]+a[2]+a[3])/2;
double s,sq;
sq=(k-a[0])*(k-a[1])*(k-a[2])*(k-a[3]) - a[0]*a[1]*a[2]*a[3]*(double)cos(c/2)*(double)cos(c/2);
if(sq<0)
printf("Invalid input");
else
{
s=sqrt(sq);
printf("%.4f",s);
}
}
Example solution: 1
Example explanation: The number of 'for' loops in the code is given by the number of 'for' string present in the code. Since we can find the exact number of for loops, this is a good example.
Problem: int tot;
void find(int m,int n)
{
int i,j,k;
if (m==1) tot=tot+1;
else
{
for (i=n;i<=m;i++)
if(m%i==0)
find (m/i,i);
}
}
int main()
{
int i,j,k,m,n;
cin >>n;
for (i=1;i<=n;i++)
{
tot=0;
cin >>m;
find(m,2);
cout <<tot<<endl;
}
cin >>n;
return 0;
}
| Solution: 2 |
Detailed Instructions: In this task you are expected to write an SQL query that will return the data asked for in the question. An SQL query works by selecting data from a table where certain conditions apply. A table contains columns where every row in that table must have a value for each column. Every table has a primary key that uniquely identifies each row, usually an id. To choose which columns are returned you specify that after the "SELECT" statement. Next, you use a "FROM" statement to specify what tables you want to select the data from. When you specify a table you can rename it with the "AS" statement. You can reference that table by whatever name follows the "AS" statement. If you want to select data from multiple tables you need to use the "JOIN" statement. This will join the tables together by pairing a row in one table with every row in the other table (Cartesian Product). To limit the number of rows returned you should use the "ON" statement. This will only return rows where the condition specified after the statement is true, this is usually an equals operator with primary keys. You can also use the "WHERE" statement to specify that only rows with column values statisfying a certain condition, should be returned. The "GROUP BY" statement will group rows together that have equal column values for whatever columns follows the statement. The "HAVING" statement will return groups that statisfy whatever condition follows the statement. Any column(s) being returned from grouped rows must either be an aggregate function, (AVG, MAX, COUNT, SUM, ...) of a column, or the column(s) that the data was grouped by. To sort the returned data you can use the "ORDER BY" command which will order the data by whatever aggregate function or column follows the statement. The "DESC" statement will sort in descending order and the "ASC" statement will sort in ascending order. Finally, you can use the "LIMIT" statement to return a certain number of rows. When "*" is used in an SQL statement every column is returned. For example, SELECT * FROM table WHERE attribute = 1, will select every column from rows with the attribute column equal to 1.
Problem:What are the all games score and location of the school called Clemson?
Solution: | SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson' |
Teacher:In this task you are expected to write an SQL query that will return the data asked for in the question. An SQL query works by selecting data from a table where certain conditions apply. A table contains columns where every row in that table must have a value for each column. Every table has a primary key that uniquely identifies each row, usually an id. To choose which columns are returned you specify that after the "SELECT" statement. Next, you use a "FROM" statement to specify what tables you want to select the data from. When you specify a table you can rename it with the "AS" statement. You can reference that table by whatever name follows the "AS" statement. If you want to select data from multiple tables you need to use the "JOIN" statement. This will join the tables together by pairing a row in one table with every row in the other table (Cartesian Product). To limit the number of rows returned you should use the "ON" statement. This will only return rows where the condition specified after the statement is true, this is usually an equals operator with primary keys. You can also use the "WHERE" statement to specify that only rows with column values statisfying a certain condition, should be returned. The "GROUP BY" statement will group rows together that have equal column values for whatever columns follows the statement. The "HAVING" statement will return groups that statisfy whatever condition follows the statement. Any column(s) being returned from grouped rows must either be an aggregate function, (AVG, MAX, COUNT, SUM, ...) of a column, or the column(s) that the data was grouped by. To sort the returned data you can use the "ORDER BY" command which will order the data by whatever aggregate function or column follows the statement. The "DESC" statement will sort in descending order and the "ASC" statement will sort in ascending order. Finally, you can use the "LIMIT" statement to return a certain number of rows. When "*" is used in an SQL statement every column is returned. For example, SELECT * FROM table WHERE attribute = 1, will select every column from rows with the attribute column equal to 1.
Teacher: Now, understand the problem? Solve this instance: What is the employee id of the head whose department has the least number of employees?
Student: | SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1 |
Given a part of privacy policy text, identify the purpose for which the user information is collected/used. The purpose should be given inside the policy text, answer as 'Not Specified' otherwise
Example input: The site collects your IP address or device IDs for advertising. Collection happens when you implicitly provide information on the website.
Example output: Advertising
Example explanation: The given policy text states that it uses user information for 'advertising' explicitly
Q: The site collects your contact information for marketing purposes. Collection happens when you explicitly provide information in an unspecified way.
A: | Marketing |
In mathematics, the absolute value of a number is the non-negative value of that number, without regarding its sign. For example, the absolute value of -2 is 2, and the absolute value of 5 is 5. In this task you will be given a list of numbers and you need to return the element with highest absolute value. If a negative and positive element have the same absolute value you should return the positive element. The absolute value for negative numbers can be found by multiplying them by -1. After finding the element with the maximum absolute value you should return the value of that element before you applied the absolute value.
[-15.482 6.816 -46.156 67.576 -17.716 49.795 -54.705 -61.433] | 67.576 |
Given a concept word, generate a hypernym for it. A hypernym is a superordinate, i.e. a word with a broad meaning constituting a category, that generalizes another word. For example, color is a hypernym of red.
Example input: crystal
Example output: rock
Example explanation: A crystal is a type of rock, so rock is a valid hypernym output.
Q: guitar
A: | artifact |
In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.
Input: Consider Input: [410, 904, 443]
Output: [443]
Input: Consider Input: [598, 598, 369, 751, 523, 29, 887, 859, 673, 13, 547, 710, 156, 471]
Output: [751, 523, 29, 887, 859, 673, 13, 547]
Input: Consider Input: [812, 173, 433, 173, 245]
| Output: [173, 433, 173]
|
Given the task definition and input, reply with output. In this task you are expected to write an SQL query that will return the data asked for in the question. An SQL query works by selecting data from a table where certain conditions apply. A table contains columns where every row in that table must have a value for each column. Every table has a primary key that uniquely identifies each row, usually an id. To choose which columns are returned you specify that after the "SELECT" statement. Next, you use a "FROM" statement to specify what tables you want to select the data from. When you specify a table you can rename it with the "AS" statement. You can reference that table by whatever name follows the "AS" statement. If you want to select data from multiple tables you need to use the "JOIN" statement. This will join the tables together by pairing a row in one table with every row in the other table (Cartesian Product). To limit the number of rows returned you should use the "ON" statement. This will only return rows where the condition specified after the statement is true, this is usually an equals operator with primary keys. You can also use the "WHERE" statement to specify that only rows with column values statisfying a certain condition, should be returned. The "GROUP BY" statement will group rows together that have equal column values for whatever columns follows the statement. The "HAVING" statement will return groups that statisfy whatever condition follows the statement. Any column(s) being returned from grouped rows must either be an aggregate function, (AVG, MAX, COUNT, SUM, ...) of a column, or the column(s) that the data was grouped by. To sort the returned data you can use the "ORDER BY" command which will order the data by whatever aggregate function or column follows the statement. The "DESC" statement will sort in descending order and the "ASC" statement will sort in ascending order. Finally, you can use the "LIMIT" statement to return a certain number of rows. When "*" is used in an SQL statement every column is returned. For example, SELECT * FROM table WHERE attribute = 1, will select every column from rows with the attribute column equal to 1.
Show the name of the customer who has the most orders.
| SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 |
Detailed Instructions: In this task, you are given two strings A,B. You must perform the following operations to generate the required output list: (i) Find the longest common substring in the strings A and B, (ii) Convert this substring to all lowercase and sort it alphabetically, (iii) Replace the substring at its respective positions in the two lists with the updated substring.
Q: zSdSPLevHgi, FCTRSPLevLwq
A: | zSdelpsvHgi, FCTRelpsvLwq |
In this task, you are given two strings A,B. You must perform the following operations to generate the required output list: (i) Find the longest common substring in the strings A and B, (ii) Convert this substring to all lowercase and sort it alphabetically, (iii) Replace the substring at its respective positions in the two lists with the updated substring.
Q: LWOVJF, ABOVds
A: | LWovJF, ABovds |
Q: Given a concept word, generate a hypernym for it. A hypernym is a superordinate, i.e. a word with a broad meaning constituting a category, that generalizes another word. For example, color is a hypernym of red.
van
A: | conveyance |
Given the task definition and input, reply with output. In this task, you are given two sets, and you need to count the number of elements at the union of two given sets. A Set is shown by two curly braces and comma-separated numbers inside, like {1, 2, 3}. Union of two given sets is the smallest set which contains all the elements of both the sets. To find the union of two given sets, A and B is a set that consists of all the elements of A and all the elements of B such that no element is repeated.
Set1: '{6}', Set2: '{8, 9, 20, 14}'. How many elements are there in the union of Set1 and Set2 ?
| 5 |
You will be given a definition of a task first, then some input of the task.
In this task, you are given a date in "mm/dd/yyyy" format. You need to check if the date is valid or not. Return 1 if it is valid, else return 0. A date is valid is the components month("mm"), day("dd") and year("yyyy") are all valid individually. A day(dd) is valid if it is greater than or equal to 1 and less than 30 or 31 depending upon the month(mm). Months which have 31 days are January, March, May, July, August, October, December. Rest of the months have 30 days except February which has 28 days if it is not a leap year and 29 days if it is a leap year. A month(mm) is valid if it lies in the range from 1 to 12 as there are 12 months in a year. A year is always valid if it is expressed in the form of "yyyy".
13/20/1340
Output: | 0 |
Given a sequence of actions to navigate an agent in its environment, provide the correct command in a limited form of natural language that matches the sequence of actions when executed. Commands are lowercase and encapsulate the logic of the sequence of actions. Actions are individual steps that serve as the building blocks for a command. There are only six actions: 'I_LOOK', 'I_WALK', 'I_RUN', 'I_JUMP', 'I_TURN_LEFT', and 'I_TURN_RIGHT'. These actions respectively align with the commands 'look', 'walk', 'run', 'jump', 'turn left', and 'turn right'. For commands, 'left' and 'right' are used to denote the direction of an action. opposite turns the agent backward in the specified direction. The word 'around' makes the agent execute an action while turning around in the specified direction. The word 'and' means to execute the next scope of the command following the previous scope of the command. The word 'after' signifies to execute the previous scope of the command following the next scope of the command. The words 'twice' and 'thrice' trigger repetition of a command that they scope over two times or three times, respectively. Actions and commands do not have quotations in the input and output.
Example input: I_TURN_LEFT I_JUMP
Example output: jump left
Example explanation: If the agent turned to the left and jumped, then the agent jumped to the left.
Q: I_TURN_RIGHT I_TURN_RIGHT I_LOOK I_TURN_RIGHT I_TURN_RIGHT I_LOOK I_TURN_RIGHT I_TURN_RIGHT I_LOOK I_TURN_LEFT I_JUMP I_TURN_LEFT I_JUMP I_TURN_LEFT I_JUMP I_TURN_LEFT I_JUMP
A: | jump around left after look opposite right thrice |
Detailed Instructions: In this task, you are given two strings A,B. You must perform the following operations to generate the required output list: (i) Find the longest common substring in the strings A and B, (ii) Convert this substring to all lowercase and sort it alphabetically, (iii) Replace the substring at its respective positions in the two lists with the updated substring.
Q: GQPYIbLDmeFX, mzulIbLDOib
A: | GQPYbdilmeFX, mzulbdilOib |
Given a short bio of a person, find the minimal text span containing the date of birth of the person. The output must be the minimal text span that contains the birth date, month and year as long as they are present. For instance, given a bio like 'I was born on 27th of Decemeber 1990, and graduated high school on 23rd October 2008.' the output should be '27th of December 1990'.
Beckinsale was born on 26 July 1973 in the Chiswick district of London, the only child of actors Richard Beckinsale and Judy Loe | 26 July 1973 |
In mathematics, the absolute value of a number is the non-negative value of that number, without regarding its sign. For example, the absolute value of -2 is 2, and the absolute value of 5 is 5. In this task you will be given a list of numbers and you need to return the element with highest absolute value. If a negative and positive element have the same absolute value you should return the positive element. The absolute value for negative numbers can be found by multiplying them by -1. After finding the element with the maximum absolute value you should return the value of that element before you applied the absolute value.
Example Input: [-36.987 67.325 -61.149 -21.689 -95.319 67.889 28.181]
Example Output: -95.319
Example Input: [34.945 58.938]
Example Output: 58.938
Example Input: [-52.013 -38.618 -75.497]
Example Output: | -75.497
|
You are given a time in 24-Hours format, and you need to convert it to time in the 12-Hours format. For a 24-Hours format time larger than 12:00, subtract 12 hours from the given time, then add 'PM'. For example, if you have 14:30 hours, subtract 12 hours, and the result is 2:30 PM. If the 24-Hours format time is less than or equal to 12:00, add 'AM'. For example, say you have 10:15 hours, add the 'AM' to the end, here we get 10:15 AM. Note that 00:00 Hrs in 24-Hours format is 12:00 AM in 12-Hours format and 12:00 Hrs in 24-Hours format would be 12:00 PM in 12-Hours format.
Example input: 19:00 Hrs
Example output: 07:00 PM
Example explanation: For a 24-Hours format time larger than 12:00, we should subtract 12 hours from the given time, then add 'PM'. So, the output is correct.
Q: 12:08 Hrs
A: | 12:08 PM |
Detailed Instructions: In this task, you are given two strings A,B. You must perform the following operations to generate the required output list: (i) Find the longest common substring in the strings A and B, (ii) Convert this substring to all lowercase and sort it alphabetically, (iii) Replace the substring at its respective positions in the two lists with the updated substring.
Problem:VzVtccWXhozRDdpgCMcLwTeXTObECieGPyeQPFXmpZhP, jlsjNFudeTGzpgCMcLwTeXTObECieGPygcbMJRrD
Solution: | VzVtccWXhozRDdbccceeeggilmoppttwxyeQPFXmpZhP, jlsjNFudeTGzbccceeeggilmoppttwxygcbMJRrD |
In this task you will be given a list of dictionaries. A dictionary is a set of key-value pairs, where each key is unique and has a value associated with that key. You should sort the list of dictionaries from smallest to largest by their 'first' key. If there is two dictionaries with the same 'first' value then sort them by their 'second' key. Negative numbers should come before positive numbers.
Q: [{'first': -52, 'second': 39}, {'first': -77, 'second': 0}, {'first': 90, 'second': -35}]
A: [{'first': -77, 'second': 0}, {'first': -52, 'second': 39}, {'first': 90, 'second': -35}]
****
Q: [{'first': 18, 'second': -55}, {'first': 98, 'second': -83}, {'first': 6, 'second': -11}]
A: [{'first': 6, 'second': -11}, {'first': 18, 'second': -55}, {'first': 98, 'second': -83}]
****
Q: [{'first': 82, 'second': 54}, {'first': -37, 'second': -13}, {'first': -14, 'second': 8}, {'first': 70, 'second': -80}]
A: | [{'first': -37, 'second': -13}, {'first': -14, 'second': 8}, {'first': 70, 'second': -80}, {'first': 82, 'second': 54}]
****
|
Given an input word generate a word that rhymes exactly with the input word. If not rhyme is found return "No"
Q: fire
A: | higher |
In this task, you are given a hateful post in Bengali that expresses hate or encourages violence towards a person or a group based on the protected characteristics such as race, religion, sex, and sexual orientation. You are expected to classify the post into two classes: religious or non-political religious on the topic.
Q: সাব্বাস পাকিস্তান মালাউনদের দংস করে দিতে হবে
A: religious
****
Q: একজন আলেমের বিরূদ্ধে এমন মন্তব্য গ্রহন যোগ্য নয়।।
A: religious
****
Q: দুঃখের বিষয় মুসলিম হয়েও কোরান পড়েও জঙ্গি হচ্ছে,নাস্তিক হচ্ছে
A: | religious
****
|
In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.
Ex Input:
[142, 269, 33, 912, 908, 784, 414, 883, 337, 582, 727]
Ex Output:
[269, 883, 337, 727]
Ex Input:
[688, 993, 3, 101, 281, 674, 359, 246, 421, 491, 82, 565, 89, 493]
Ex Output:
[3, 101, 281, 359, 421, 491, 89]
Ex Input:
[59, 137, 53, 139, 139, 830, 59, 313]
Ex Output:
| [59, 137, 53, 139, 139, 59, 313]
|
In this task, you need to provide the parts-of-speech tag of a word present in a sentence specified within curly braces ( '{{ ... }}' ). The parts-of-speech tags are fine labels that represent a category of words with similar grammatical properties. The list of part-of-speech tags i.e tagset of this corpus is : '$': Dollar Sign, "''": Single Quotes, ',': Comma Symbol, '-LRB-': Left Parantheses, '-RRB-': Right Parantheses, '.': Period, ':': Colon, 'ADD': Email Address, 'AFX': Affix, 'CC': Coordinating conjunction, 'CD': Cardinal Number, 'DT': Determiner, 'EX': Existential there, 'FW': Foreign Word, 'GW': Go with, 'HYPH': Hyphen symbol, 'IN': Preposition or a subordinating conjunction, 'JJ': Adjective, 'JJR': A comparative Adjective, 'JJS': A Superlative Adjective, 'LS': List item Marker, 'MD': Modal, 'NFP': Superfluous punctuation, 'NN': Singular Noun, 'NNP': Singular Proper Noun, 'NNPS': Prural Proper Noun, 'NNS': Prural Noun, 'PDT': Pre-determiner, 'POS': Possessive Ending, 'PRP': Personal pronoun, 'PRP$': Possessive Pronoun, 'RB': Adverb, 'RBR': Comparative Adverb, 'RBS': Superlative Adverb, 'RP': Particle, 'SYM': Symbol, 'TO': To , 'UH': Interjection, 'VB': Base form Verb, 'VBD': Verb in Past tense, 'VBG': Verb in present participle, 'VBN': Verb in past participle, 'VBP': Verb in non-3rd person singular present, 'VBZ': Verb in 3rd person singular present, 'WDT': Wh-determiner, 'WP': Wh-pronoun, 'WP$' Possessive Wh-pronoun, 'WRB': Wh-adverb, 'XX': Unknown, '``': Double backticks.
Q: Sentence: And {{ I }} have not met one stuck - up trail rider !
Word: I
A: | PRP |
In this task you are expected to write an SQL query that will return the data asked for in the question. An SQL query works by selecting data from a table where certain conditions apply. A table contains columns where every row in that table must have a value for each column. Every table has a primary key that uniquely identifies each row, usually an id. To choose which columns are returned you specify that after the "SELECT" statement. Next, you use a "FROM" statement to specify what tables you want to select the data from. When you specify a table you can rename it with the "AS" statement. You can reference that table by whatever name follows the "AS" statement. If you want to select data from multiple tables you need to use the "JOIN" statement. This will join the tables together by pairing a row in one table with every row in the other table (Cartesian Product). To limit the number of rows returned you should use the "ON" statement. This will only return rows where the condition specified after the statement is true, this is usually an equals operator with primary keys. You can also use the "WHERE" statement to specify that only rows with column values statisfying a certain condition, should be returned. The "GROUP BY" statement will group rows together that have equal column values for whatever columns follows the statement. The "HAVING" statement will return groups that statisfy whatever condition follows the statement. Any column(s) being returned from grouped rows must either be an aggregate function, (AVG, MAX, COUNT, SUM, ...) of a column, or the column(s) that the data was grouped by. To sort the returned data you can use the "ORDER BY" command which will order the data by whatever aggregate function or column follows the statement. The "DESC" statement will sort in descending order and the "ASC" statement will sort in ascending order. Finally, you can use the "LIMIT" statement to return a certain number of rows. When "*" is used in an SQL statement every column is returned. For example, SELECT * FROM table WHERE attribute = 1, will select every column from rows with the attribute column equal to 1.
--------
Question: What are the names of the aircraft that the least people are certified to fly?
Answer: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1
Question: Return the code of the document type that is most common.
Answer: SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
Question: Show the draft pick numbers and draft classes of players whose positions are defenders.
Answer: | SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = "Defender"
|
Detailed Instructions: In this task you will be given a list of dictionaries. A dictionary is a set of key-value pairs, where each key is unique and has a value associated with that key. You should sort the list of dictionaries from smallest to largest by their 'first' key. If there is two dictionaries with the same 'first' value then sort them by their 'second' key. Negative numbers should come before positive numbers.
Problem:[{'first': -84, 'second': 32}, {'first': 33, 'second': 17}, {'first': -15, 'second': -12}, {'first': -9, 'second': 3}, {'first': -83, 'second': -76}, {'first': 27, 'second': 40}, {'first': 78, 'second': -99}, {'first': -55, 'second': -63}]
Solution: | [{'first': -84, 'second': 32}, {'first': -83, 'second': -76}, {'first': -55, 'second': -63}, {'first': -15, 'second': -12}, {'first': -9, 'second': 3}, {'first': 27, 'second': 40}, {'first': 33, 'second': 17}, {'first': 78, 'second': -99}] |
In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.
Input: Consider Input: [3, 590, 953, 163, 614, 131, 419, 222, 23, 257, 278, 853, 874, 127, 43]
Output: [3, 953, 163, 131, 419, 23, 257, 853, 127, 43]
Input: Consider Input: [929, 960, 862, 251, 421, 577, 11, 238, 769, 11, 379, 739, 883, 494, 266, 880, 115]
Output: [929, 251, 421, 577, 11, 769, 11, 379, 739, 883]
Input: Consider Input: [608, 467, 191, 128, 288, 951, 601, 895, 60, 439, 490, 251]
| Output: [467, 191, 601, 439, 251]
|
In this task, you are given a country name and you need to return the Top Level Domain (TLD) of the given country. The TLD is the part that follows immediately after the "dot" symbol in a website's address. The output, TLD is represented by a ".", followed by the domain.
Q: Grenada
A: | .gd |
Detailed Instructions: The provided file includes inquiries about restaurants in Spanish, and we ask you to translate those to English language. Please bear in mind the following guidelines while doing the translation: 1) We are looking for the most naturally written and formal form of each sentence in your language. We are *NOT* looking for colloquial forms of the sentence. We are looking for formal form which is how you would type your queries in a text-based virtual assistant. 2) The words between quotation marks *SHOULD NOT* be translated. We expect you to keep those values intact and include the quotation marks around them as well. 3) The fully capitalized words like DATE_0, or DURATION_0 *SHOULD NOT* be translated. Please keep them as they are in the translations. 4) Please do not localize measurement units like miles to kilometers during your translation. miles should be translated to its equivalent in your language. 6) Note the input is all lowercased except for fully capitalized special placeholders (e.g. NUMBER, DATE, TIME). Please do the same in your translations.
Q: busque un restaurante "egyptian".
A: | search for an " egyptian " restaurant . |
Definition: In mathematics, the absolute value of a number is the non-negative value of that number, without regarding its sign. For example, the absolute value of -2 is 2, and the absolute value of 5 is 5. In this task you will be given a list of numbers and you need to return the element with highest absolute value. If a negative and positive element have the same absolute value you should return the positive element. The absolute value for negative numbers can be found by multiplying them by -1. After finding the element with the maximum absolute value you should return the value of that element before you applied the absolute value.
Input: [-82.551 -73.472 13.221]
Output: | -82.551 |
Instructions: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right
Input: [143, 135, 127, 119, 111, 103, 95, 87, 79, 71, 63, 55, 47, 39]
Output: | 1 |
A ploynomial equation is a sum of terms. Here each term is either a constant number, or consists of the variable x raised to a certain power and multiplied by a number. These numbers are called weights. For example, in the polynomial: 2x^2+3x+4, the weights are: 2,3,4. You can present a polynomial with the list of its weights, for example, equation weights = [6, 4] represent the equation 6x + 4 and equation weights = [1, 3, 4] represent the equation 1x^2 + 3x + 4. In this task, you need to compute the result of a polynomial expression by substituing a given value of x in the given polynomial equation. Equation weights are given as a list.
x = 2, equation weights = [9, 1, 6, 7]
95
x = 1, equation weights = [3, 6, 7]
16
x = 5, equation weights = [7, 1, 8]
| 188
|
Adverse drug reactions are appreciably harmful or unpleasant reactions resulting from an intervention related to the use of medical products, which predicts hazard from future administration and warrants prevention or specific treatment, or alteration of the dosage regimen, or withdrawal of the product. Given medical case reports extracted from MEDLINE, the task is to classify whether the case report mentions the presence of any adverse drug reaction. Classify your answers into non-adverse drug event and adverse drug event.
Q: We report the case histories of identical twin brothers who developed concordant acute lymphoblastic leukemia at the age of 4 years and who later developed leukoencephalopathy and hydrocephalus related to central nervous system prophylaxis by, in the first case intrathecally administered methotrexate and, in the second by intrathecally administered methotrexate and cranial irradiation.
A: adverse drug event
****
Q: MAIN OUTCOME MEASURES: Clinical signs and symptoms of ITB withdrawal of varying severity were assessed by vital signs (temperature, heart rate), physical examination (reflexes, tone, clonus), and patient report of symptoms (itching, nausea, headache, malaise).
A: non-adverse drug event
****
Q: This drug has not been studied prospectively in large numbers of pregnant women and lacks the Food and Drug Administration's approval for gestational use unless benefits clearly outweigh potential fetal harm.
A: | non-adverse drug event
****
|
You will be given a definition of a task first, then an example. Follow the example to solve a new instance of the task.
In this task, you are given two strings A,B. You must perform the following operations to generate the required output list: (i) Find the longest common substring in the strings A and B, (ii) Convert this substring to all lowercase and sort it alphabetically, (iii) Replace the substring at its respective positions in the two lists with the updated substring.
bYubMFxyTqR, AcDbMFxSnI
Solution: bYubfmxyTqR, AcDbfmxSnI
Why? Here, 'bMFx' is the longest common substring in both the input strings 'bYubMFxyTqR' and 'AcDbMFxSnI'. Sorting it and converting to lowercase gives 'bfmx'. Replacing 'bfmx' instead of 'bMFx' in the two strings gives 'bYubfmxyTqR' and 'AcDbfmxSnI'
New input: dVrFYZIvMwPDPQX, tyZIGZIvMwjPIo
Solution: | dVrFYimvwzPDPQX, tyZIGimvwzjPIo |
Detailed Instructions: Given a sequence of actions to navigate an agent in its environment, provide the correct command in a limited form of natural language that matches the sequence of actions when executed. Commands are lowercase and encapsulate the logic of the sequence of actions. Actions are individual steps that serve as the building blocks for a command. There are only six actions: 'I_LOOK', 'I_WALK', 'I_RUN', 'I_JUMP', 'I_TURN_LEFT', and 'I_TURN_RIGHT'. These actions respectively align with the commands 'look', 'walk', 'run', 'jump', 'turn left', and 'turn right'. For commands, 'left' and 'right' are used to denote the direction of an action. opposite turns the agent backward in the specified direction. The word 'around' makes the agent execute an action while turning around in the specified direction. The word 'and' means to execute the next scope of the command following the previous scope of the command. The word 'after' signifies to execute the previous scope of the command following the next scope of the command. The words 'twice' and 'thrice' trigger repetition of a command that they scope over two times or three times, respectively. Actions and commands do not have quotations in the input and output.
Q: I_TURN_LEFT I_WALK I_TURN_LEFT I_WALK I_TURN_RIGHT I_JUMP I_TURN_RIGHT I_JUMP I_TURN_RIGHT I_JUMP
A: | walk left twice and jump right thrice |
You will be given a definition of a task first, then some input of the task.
The input is taken from a negotiation between two participants who take the role of campsite neighbors and negotiate for Food, Water, and Firewood packages, based on their individual preferences and requirements. Given an utterance and recent dialogue context containing past 3 utterances (wherever available), output Yes if the utterance contains the self-need strategy, otherwise output No. self-need is a selfish negotiation strategy. It is used to create a personal need for an item in the negotiation, such as by pointing out that the participant sweats a lot to show preference towards water packages.
Context: 'Hi there. I'm really looking forward to this camping trip! Hope we can make a deal over these extra supplies. 🙂 I was hoping to do some hiking and swimming away from my campsite, so having some extra fresh water would be really helpful to me.' 'Hello there. I too am looking forward to this trip. Definitely need to decompress. ' 'Sounds like it'll be great for both of us. Is there anything extra you need?'
Utterance: 'My favorite thing to do around the campfire is to sing songs. I also like to do extra hiking as well. I especially need firewood. '
Output: | Yes |
Teacher:You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right
Teacher: Now, understand the problem? Solve this instance: [20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122]
Student: | 1 |
In this task, you are given two strings A,B. You must perform the following operations to generate the required output list: (i) Find the longest common substring in the strings A and B, (ii) Convert this substring to all lowercase and sort it alphabetically, (iii) Replace the substring at its respective positions in the two lists with the updated substring.
Ex Input:
RjFFHTXVgptjkDvppuFNkqVRLjRzJghmlBmZ, cUvqWoVkRCGyuwTqQQPppuFNkqVRLjRzJghmlBHryCHZXrCMw
Ex Output:
RjFFHTXVgptjkDvbfghjjkllmnppqrruvzmZ, cUvqWoVkRCGyuwTqQQPbfghjjkllmnppqrruvzHryCHZXrCMw
Ex Input:
JsVOdcxLNdCCixVsdRvEgjaDDOXTplbZwPQfHcJZQjGFHlxnYZRq, hDmLdhZBJXqmhkpEgjaDDOXTplbZwPQfHcJAzOVTTLxDjH
Ex Output:
JsVOdcxLNdCCixVsdRvabcddefghjjloppqtwxzZQjGFHlxnYZRq, hDmLdhZBJXqmhkpabcddefghjjloppqtwxzAzOVTTLxDjH
Ex Input:
xCMYzFUScBPODfsgAUZIEAfRDNLeDoRRDDGjigu, snkmdDfsgAUZIEAfRDNLoiGMQDP
Ex Output:
| xCMYzFUScBPOaaddeffgilnrsuzeDoRRDDGjigu, snkmdaaddeffgilnrsuzoiGMQDP
|
In this task you will be given a string and you should find the longest substring that is a palindrome. A palindrome is a string that is the same backwards as it is forwards. If the shortest possible palindrome is length 1 you should return the first character.
Q: zzpzpppzpazz
A: | pzpppzp |
In this task, you will be given a list of numbers. The goal is to divide all the numbers in the list by a constant such that the sum of the resulting list is 1. The output should be rounded to 3 decimals.
[-25.627, 186.201, -18.481, 182.741, 182.146] | [-0.051 0.367 -0.036 0.36 0.359] |
Part 1. Definition
Given a short bio of a person, find the minimal text span containing the date of birth of the person. The output must be the minimal text span that contains the birth date, month and year as long as they are present. For instance, given a bio like 'I was born on 27th of Decemeber 1990, and graduated high school on 23rd October 2008.' the output should be '27th of December 1990'.
Part 2. Example
Basinger was born in Athens, Georgia, on December 8, 1953
Answer: December 8, 1953
Explanation: The output is correct as it is a valid text span, is of minimal length and is the correct date of birth.
Part 3. Exercise
James Harrison Coburn III was born in Laurel, Nebraska on August 31, 1928, the son of James Harrison Coburn II (1902–1975) and Mylet S.
Answer: | August 31, 1928 |
Given the task definition and input, reply with output. In this task you will be given a list of dictionaries. A dictionary is a set of key-value pairs, where each key is unique and has a value associated with that key. You should sort the list of dictionaries from smallest to largest by their 'first' key. If there is two dictionaries with the same 'first' value then sort them by their 'second' key. Negative numbers should come before positive numbers.
[{'first': 86, 'second': 88}, {'first': 51, 'second': -88}, {'first': -15, 'second': 68}, {'first': 44, 'second': 18}, {'first': 75, 'second': -69}, {'first': -74, 'second': -9}, {'first': -40, 'second': -95}]
| [{'first': -74, 'second': -9}, {'first': -40, 'second': -95}, {'first': -15, 'second': 68}, {'first': 44, 'second': 18}, {'first': 51, 'second': -88}, {'first': 75, 'second': -69}, {'first': 86, 'second': 88}] |
This task is to find the number of 'For' loops present in the given cpp program.
Example Input:
// ????.cpp : ??????????????
//
int f(int x,int y)
{
int i,a=1;
if(x<y) return 0;
if(x==y) return 1;
if(x>y)
{
if(y==1)
{
for(i=y+1;i<=x;i++)
{
if(x%i==0) a=a+f(x/i,i);
}
}
else
{
for(i=y;i<=x;i++)
{
if(x%i==0) a=a+f(x/i,i);
}
}
return a;
}
}
int main()
{
int n,j,b=0,p,k;
scanf("%d",&p);
for(k=1;k<=p;++k)
{
scanf("%d",&n);
b=f(n,1);
printf("%d\n",b);
}
return 0;
}
Example Output: 3
Example Input: int sum=0;
void f(int x,int y)
{
if(x==1)
sum++;
while(y<=x)
{
if(x%y==0)
f(x/y,y);
y++;
}
}
int main()
{
int n,i,a;
cin>>n;
for(i=1;i<=n;i++)
{
cin>>a;
int j=2,num=1;
while(j<=a/2)
{
if(a%j==0)
{
sum=0;
f(a/j,j);
num+=sum;
}
j++;
}
printf("\n%d",num);
}
return 0;
}
Example Output: 1
Example Input: /*
* 11.27.cpp
*
* Created on: 2011-11-27
* Author: Administrator
*/
int coun; // ???????
void depart(int n,int i)
{
int j;
if (n==1) coun++ ;
else for (j=i;j<=n;j++) //???j?? ??????
if (n%j==0) {depart(n/j,j);}
}
int main (){
int n,j;
cin>>n;
int b[n]; //???????
for(j=0;j<n;j++)
cin>>b[j];
for(j=0;j<n;j++)
{
coun=0; //?????
depart(b[j],2);
cout<<coun<<endl;
}
return 0;
}
Example Output: | 3
|
Teacher:In this task, you are given two strings A,B. You must perform the following operations to generate the required output list: (i) Find the longest common substring in the strings A and B, (ii) Convert this substring to all lowercase and sort it alphabetically, (iii) Replace the substring at its respective positions in the two lists with the updated substring.
Teacher: Now, understand the problem? Solve this instance: HvyMcjNLQGJqiqCE, WXwCMcegXobcyMcjNLQGJqiqWFnX
Student: | HvcgijjlmnqqqyCE, WXwCMcegXobccgijjlmnqqqyWFnX |
You will be given a definition of a task first, then some input of the task.
Given a part of privacy policy text, identify the purpose for which the user information is collected/used. The purpose should be given inside the policy text, answer as 'Not Specified' otherwise
A third party outside of our label scheme does receive unspecified information about you for service operations or security.
Output: | Service operation and security |
A ploynomial equation is a sum of terms. Here each term is either a constant number, or consists of the variable x raised to a certain power and multiplied by a number. These numbers are called weights. For example, in the polynomial: 2x^2+3x+4, the weights are: 2,3,4. You can present a polynomial with the list of its weights, for example, equation weights = [6, 4] represent the equation 6x + 4 and equation weights = [1, 3, 4] represent the equation 1x^2 + 3x + 4. In this task, you need to compute the result of a polynomial expression by substituing a given value of x in the given polynomial equation. Equation weights are given as a list.
Example Input: x = 7, equation weights = [5, 3, 4]
Example Output: 270
Example Input: x = 9, equation weights = [1, 3, 6]
Example Output: 114
Example Input: x = 10, equation weights = [9, 2, 7]
Example Output: | 927
|
Detailed Instructions: Given a part of privacy policy text, identify the purpose for which the user information is collected/used. The purpose should be given inside the policy text, answer as 'Not Specified' otherwise
Q: The site collects your location information for an unspecified purpose. Collection happens when you implicitly provide information on the website, and your data is aggregated or anonymized.
A: | Unspecified |
Detailed Instructions: In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.
Problem:[874, 918, 93, 523, 613, 271, 118, 160, 660, 83, 415, 379, 673, 60, 941, 139, 711, 421]
Solution: | [523, 613, 271, 83, 379, 673, 941, 139, 421] |
In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.
[629, 179, 911, 674, 686, 43, 487, 845, 419, 14, 231] | [179, 911, 43, 487, 419] |
In this task you will be given a list of dictionaries. A dictionary is a set of key-value pairs, where each key is unique and has a value associated with that key. You should sort the list of dictionaries from smallest to largest by their 'first' key. If there is two dictionaries with the same 'first' value then sort them by their 'second' key. Negative numbers should come before positive numbers.
Example: [{'first': 8, 'second': 7}, {'first': -7, 'second': -2}, {'first': 8, 'second': 2}]
Example solution: [{'first': -7, 'second': -2}, {'first': 8, 'second': 2}, {'first': 8, 'second': 7}]
Example explanation: The two dictionaries that had the same 'first' value were sorted by their 'second' value and the smaller one was listed first. So this is a good example.
Problem: [{'first': 77, 'second': 56}, {'first': 46, 'second': -17}, {'first': 79, 'second': 88}, {'first': -80, 'second': 27}, {'first': -25, 'second': -48}]
| Solution: [{'first': -80, 'second': 27}, {'first': -25, 'second': -48}, {'first': 46, 'second': -17}, {'first': 77, 'second': 56}, {'first': 79, 'second': 88}] |
A ploynomial equation is a sum of terms. Here each term is either a constant number, or consists of the variable x raised to a certain power and multiplied by a number. These numbers are called weights. For example, in the polynomial: 2x^2+3x+4, the weights are: 2,3,4. You can present a polynomial with the list of its weights, for example, equation weights = [6, 4] represent the equation 6x + 4 and equation weights = [1, 3, 4] represent the equation 1x^2 + 3x + 4. In this task, you need to compute the result of a polynomial expression by substituing a given value of x in the given polynomial equation. Equation weights are given as a list.
x = 9, equation weights = [4, 5, 8] | 377 |
In this task, you are given two sets, and you need to count the number of elements at the union of two given sets. A Set is shown by two curly braces and comma-separated numbers inside, like {1, 2, 3}. Union of two given sets is the smallest set which contains all the elements of both the sets. To find the union of two given sets, A and B is a set that consists of all the elements of A and all the elements of B such that no element is repeated.
Set1: '{10, 20, 4}', Set2: '{1, 2, 5, 6, 7, 13, 19, 20}'. How many elements are there in the union of Set1 and Set2 ? | 10 |
You will be given a definition of a task first, then some input of the task.
Adverse drug reactions are appreciably harmful or unpleasant reactions resulting from an intervention related to the use of medical products, which predicts hazard from future administration and warrants prevention or specific treatment, or alteration of the dosage regimen, or withdrawal of the product. Given medical case reports extracted from MEDLINE, the task is to classify whether the case report mentions the presence of any adverse drug reaction. Classify your answers into non-adverse drug event and adverse drug event.
Ten months after the injection, visual acuity remained at 20/50, and intraocular pressure measured 15 mm Hg without antiglaucomatous therapy taken.
Output: | non-adverse drug event |
Detailed Instructions: In mathematics, the absolute value of a number is the non-negative value of that number, without regarding its sign. For example, the absolute value of -2 is 2, and the absolute value of 5 is 5. In this task you will be given a list of numbers and you need to return the element with highest absolute value. If a negative and positive element have the same absolute value you should return the positive element. The absolute value for negative numbers can be found by multiplying them by -1. After finding the element with the maximum absolute value you should return the value of that element before you applied the absolute value.
Q: [-46.939 2.513 -66.96 -34.256 -9.678 43.711 -64.371 -53.762 39.237
21.619]
A: | -66.96 |
Detailed Instructions: In this task you are expected to write an SQL query that will return the data asked for in the question. An SQL query works by selecting data from a table where certain conditions apply. A table contains columns where every row in that table must have a value for each column. Every table has a primary key that uniquely identifies each row, usually an id. To choose which columns are returned you specify that after the "SELECT" statement. Next, you use a "FROM" statement to specify what tables you want to select the data from. When you specify a table you can rename it with the "AS" statement. You can reference that table by whatever name follows the "AS" statement. If you want to select data from multiple tables you need to use the "JOIN" statement. This will join the tables together by pairing a row in one table with every row in the other table (Cartesian Product). To limit the number of rows returned you should use the "ON" statement. This will only return rows where the condition specified after the statement is true, this is usually an equals operator with primary keys. You can also use the "WHERE" statement to specify that only rows with column values statisfying a certain condition, should be returned. The "GROUP BY" statement will group rows together that have equal column values for whatever columns follows the statement. The "HAVING" statement will return groups that statisfy whatever condition follows the statement. Any column(s) being returned from grouped rows must either be an aggregate function, (AVG, MAX, COUNT, SUM, ...) of a column, or the column(s) that the data was grouped by. To sort the returned data you can use the "ORDER BY" command which will order the data by whatever aggregate function or column follows the statement. The "DESC" statement will sort in descending order and the "ASC" statement will sort in ascending order. Finally, you can use the "LIMIT" statement to return a certain number of rows. When "*" is used in an SQL statement every column is returned. For example, SELECT * FROM table WHERE attribute = 1, will select every column from rows with the attribute column equal to 1.
Problem:What are the names of the teachers and how many courses do they teach?
Solution: | SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name |
Given the task definition and input, reply with output. Given the sentence, generate "yes, and" response. "Yes, and" is a rule-of-thumb in improvisational comedy that suggests that a participant in a dialogue should accept what another participant has stated ("Yes") and then expand on that line of thought or context ("and..."). 1 In short, a "Yes, and" is a dialogue exchange in which a speaker responds by adding new information on top of the information/setting that was constructed by another speaker. Note that a "Yes, and" does not require someone explicitly saying 'yes, and...' as part of a dialogue exchange, although it could be the case if it agrees with the description above. There are many ways in which a response could implicitly/explicitly agree to the prompt without specifically saying 'yes, and...'.
That was a scary time. Thank god you went out on a limb and did that surgery 'cause that could have burst and killed you.
| It's true. Did you know the appendix is only as big as your pinky and it can do all that kind of damage to you inside. |
In mathematics, the absolute value of a number is the non-negative value of that number, without regarding its sign. For example, the absolute value of -2 is 2, and the absolute value of 5 is 5. In this task you will be given a list of numbers and you need to return the element with highest absolute value. If a negative and positive element have the same absolute value you should return the positive element. The absolute value for negative numbers can be found by multiplying them by -1. After finding the element with the maximum absolute value you should return the value of that element before you applied the absolute value.
Q: [ -3.466 -59.031 37.431 -9.069 -61.135 38.803 -1.332 68.465]
A: 68.465
****
Q: [-73.763 -90.237]
A: -90.237
****
Q: [ 24.262 77.365 -85.683 -51.117 -75.407 76.889 26.441 83.366]
A: | -85.683
****
|
In this task, you are given two strings A,B. You must perform the following operations to generate the required output list: (i) Find the longest common substring in the strings A and B, (ii) Convert this substring to all lowercase and sort it alphabetically, (iii) Replace the substring at its respective positions in the two lists with the updated substring.
wAfZANBNL, zDIZANLO | wAfanzBNL, zDIanzLO |