{"text": "[DE Wikipedia] Krogh Island\n\nKrogh Island ist eine 8 km lange Insel westlich der Antarktischen Halbinsel. Sie gehört zu den Biscoe-Inseln und liegt unmittelbar westlich des südlichen Abschnitts der Lavoisier-Insel. Sie begrenzt den Lewis Sound nach Norden und die Wladigerow-Passage nach Westen. Kartiert wurde sie anhand von Luftaufnahmen der Falkland Islands and Dependencies Aerial Survey Expedition (1956–1957). Das UK Antarctic Place-Names Committee benannte sie 1960 nach dem dänischen Physiologen August Krogh (1874–1949), Nobelpreisträger für Medizin des Jahres 1920. Weblinks (englisch) Krogh Island auf geographic.org (englisch) Insel (Antarktika) Insel (Südlicher Ozean) Biscoe-Inseln"} {"instruction": "Develop a machine learning model in Python that takes as input a set of numbers and classifies them into two categories.", "input": "[1, 2, 3, 4, 5]", "output": "# import required libraries\nimport numpy as np\nfrom sklearn import preprocessing\nfrom sklearn.neighbors import KNeighborsClassifier\n\n# define the training data and labels\ndata = np.array([1, 2, 3, 4, 5]).reshape(-1, 1)\nlabels = np.array([0, 0, 1, 1, 1])\n\n# preprocess the data\nscaled_data = preprocessing.scale(data)\n\n# define and train the model\nmodel = KNeighborsClassifier(n_neighbors=3).fit(scaled_data, labels)"} {"text": "[DE Wikipedia] Lügner\n\nLügner steht für: Lügner, jemand, der eine Unwahrheit spricht, siehe Lüge Lügner (Rapper) (Sascha Rossier; * 1973), Schweizer Rapper und Produzent Lügner-Paradox, philosophisches Paradoxon Der Lügner steht für: Der Lügner (Corneille), Komödie von Pierre Corneille (1644) Der Lügner (Goldoni), Komödie von Carlo Goldoni (1750) Der Lügner (1961), deutscher Film von Ladislao Vajda Der Lügner (1981), finnischer Film von Mika Kaurismäki Der Lügner und die Nonne (Film), österreichischer Film von Rolf Thiele (1967) Jakob der Lügner, Roman von Jurek Becker (1969) Jakob der Lügner (1999), amerikanisch-französisch-ungarischer Film von Peter Kassovitz Jakob der Lügner (1974), deutscher Film von Frank Beyer Die Lügnerin steht für: Die Lügnerin (1950), US-amerikanischer Film von Vincent Sherman Die Lügnerin (1965), jugoslawischer Film von Igor Pretnar Die Lügnerin (1992), deutscher Film von Siegfried Kühn Die schöne Lügnerin, deutsch-französischer Film von Axel von Ambesser (1959) Siehe auch: Lugner Lüge (Begriffsklärung)"} {"instruction": "Make a script that checks if a given integer value is divisible by 3 and 5 both.", "input": "value = 10", "output": "def check_divisible(value): \"\"\"Check if value is divisible by 3 and 5.\"\"\" # check if value is divisible by 3 and 5 if value % 3 == 0 and value % 5 == 0: return True else: return False"} {"instruction": "Create a web application in Django that implements a blog system.", "input": "Not applicable", "output": "# Create the project\ndjango-admin startproject blog\n\n# Create the application\ncd blog\npython manage.py startapp posts\n\n# Add the application to the project\n# Edit the settings.py file\nINSTALLED_APPS = [\n 'posts',\n # ...\n]\n\n# Create the database\npython manage.py makemigrations\npython manage.py migrate\n\n# Create the models\n# Edit the models.py file\nfrom django.db import models\nclass Post(models.Model):\n title = models.CharField(max_length=200)\n body = models.TextField()\n\n# Create the Admin page\npython manage.py createsuperuser\n# Follow the prompts to create the superuser\n\n# Create the URLs\n# Edit the urls.py file\nfrom django.urls import path\nfrom django.contrib import admin\nfrom posts.views import HomePageView, CreatePost\n\nurlpatterns = [\n path('admin/', admin.site.urls),\n path('', HomePageView.as_view(), name=\"home\"),\n path('post/new/', CreatePost.as_view(), name=\"create_post\")\n]\n\n# Create Views\n# Edit the views.py file\nfrom django.views.generic.base import TemplateView\nfrom django.views.generic.edit import CreateView\nfrom posts.models import Post\n\nclass HomePageView(TemplateView):\n template_name = \"index.html\"\n\nclass CreatePost(CreateView):\n model = Post\n fields = ['title', 'body']\n template_name = \"create_post.html\"\n \n success_url = '/'\n\n# Create Templates\n# Create the templates directory\n# Create the index.html file\n\n
\n{{ post.body }}
\n {% endfor %}\n Create a new post\n \n\n\n# Create the create_post.html file\n\n \nThis is a sample content of a web page.
"} {"text": "[DE Wikipedia] Mahaney\n\nMahaney ist der Familienname der folgenden Personen: Kevin Mahaney (* 1962), US-amerikanischer Segler William Mahaney (* 1941), US-amerikanischer Geograph und Geologe"} {"text": "[EN Wikipedia] Sourcebooks (publisher)\n\nSourcebooks LLC is an American independent book publisher located in Naperville, Illinois. The company publishes books, eBooks, and digital products. History The company was founded in 1987 by Dominique Raccah as a business and finance publisher. Raccah cashed in $17,000 from her retirement fund to start the press. The company expanded into other categories of trade publishing. As of 2010, they had 54 apps in development. By 2015, the publisher had 120 employees, working on a diverse list of adult, children's, and young adult books, in addition to its rapidly expanding e-commerce businesses. As of 2010, they were the largest woman-owned book publisher in the United States. In 2013, the publisher launched a personalized book engine with its \"Put Me In The Story\" application and website. It added brands such as Sesame Street, the Berenstain Bears, and Hello Kitty, in addition to authors and illustrators such as Nancy Tillman. Later additions to Put Me In The Story included Curious George and characters from Disney and Nickelodeon, among others. In 2013, Sourcebooks acquired motivational and inspirational book publisher Simple Truths. The company reported a 20% gain in sales in 2014, with particular gains from its Sourcebooks Jabberwocky children's imprint and Sourcebooks Fire young adult imprint. The results also included sales of more than two million picture books by Marianne Richmond. In December 2016, Raccah was named book publishing's \"Person of the Year\" by Publishers Weekly, a book publishing trade magazine. In February 2017, Publishers Weekly reported NPD BookScan data showing Sourcebooks as the 18th-largest trade publisher in America. Sourcebooks published 385 titles in 2017 and was the 14th-largest trade publisher in the U.S. In 2018, Sourcebooks acquired mystery imprint Poisoned Pen Press. The following year, Penguin Random House acquired 45% of Sourcebooks, with the company forming a new management board that included Penguin Random House executives. Imprints Sourcebooks (adult nonfiction) Sourcebooks Landmark (fiction) Sourcebooks Casablanca (romance fiction) Cumberland House (gift, cookbooks, and history) Simple Truths (business, leadership, motivation, and inspiration) Sourcebooks Fire (young adult) Sourcebooks Kids Sourcebooks Wonderland (specialized) Sourcebooks Jabberwocky (children) Sourcebooks Young Readers (middle grades) Sourcebooks eXplore (nonfiction) Poisoned Pen Press (mystery) Bloom Books (romance) References External links Companies based in Naperville, Illinois Publishing companies established in 1987 Book publishing companies based in Illinois"} {"text": "[HI Wikipedia] अल्बानिया\n\nअल्बानिया गणराज्य (अल्बानियाई: Republika e Shqipërisë) उत्तरपूर्वी यूरोप में स्थित एक देश है। इसकी भू सीमाएं उत्तर में कोसोवो, उत्तर पश्चिम में मोन्टेनेग्रो, पूर्व में भूतपूर्व यूगोस्लाविया और दक्षिण में यूनान से मिलती हैं। तटीय सीमाएं दक्षिण पश्चिम में आड्रियाटिक सागर और आयोनियन सागर से मिलती हैं। अल्बानिया एक संसदीय लोकतंत्र और अवस्थांतर अर्थव्यवस्था है। अल्बानिया की राजधानी, तिराना, लगभग ८,९५,००० निवासियों वाला नगर है जो देश की ३६ लाख की जनसंख्या का चौथाई भाग है और यह नगर अल्बानिया का वित्तीय केन्द्र भी है। मुक्त बाजार सुधारों के कारण विदेशी निवेश के लिए देश की अर्थव्यस्था खोल दी गई है मुख्यतः ऊर्जा के विकास और परिवहन आधारभूत ढांचे में। अल्बानिया संयुक्त राष्ट्र, नाटो, यूरोपीय सुरक्षा और सहयोग संगठन, यूरोपीय परिषद, विश्व व्यापार संगठन, इस्लामिक सम्मेलन संगठन इत्यादि का सदस्य है और भूमध्य क्षेत्र संघ के संस्थापक सदस्यों में से एक था। अल्बानिया जनवरी २००३ से यूरोपीय संघ में विलय के लिए एक संभावित प्रत्याशी रहा है और इसने औपचारिक रूप से २८ अप्रैल, २००९ को यूरोपीय संघ की सदस्यता के लिए आवेदन किया। अल्बानिया में 26 नवंबर 2019,मंगलवार को भूकंप आया अमेरिकी भूगर्भ सर्वेक्षण के अनुसार 6.4 तीव्रता के साथ आये भूकंप का केन्द्र राजधानी तिराना से 30 किलोमीटर उत्तर-पश्चिम में था। इसके बाद 5.1 और 5.4 की तीव्रता वाले झटके महसूस किए गए।भूकंप से सबसे ज़्यादा नुक़सान दुर्रेस में हुआ है। कुर्बिन में भूकंप आने पर घबरा कर अपने घर से बाहर छलांग लगा देने के कारण तथा उत्तरी शहर लेज्हा में सड़क के टूटने से एक अन्य व्यक्ति की मौत हो गई। अल्बानिया के राष्ट्रपति इलिर मेटा ने कहा कि थुमाने में स्थिति काफी गंभीर है। लोगों को बचाने की पूरी कोशिश की जा रही है। अल्बानिया के प्रधानमंत्री एदी रमा ने कहा कि सभी सरकारी एजेंसियां सतर्क हैं और दुर्रेस और थुमाने में लोगों की जान बचाने के लिए काम कर रही हैं। इससे पहले साल 1979 में 6.9 तीव्रता के भूकंप में 136 लोगों की जान गई थी और क़रीब एक हज़ार लोग घायल हुए थे। इतिहास दूसरी से चौथी सदी तक यह क्षेत्र रोमन साम्राज्य का भाग था। इसके अगले १००० वर्षों तक यह यूनानी भाषा बोलने वाले ओस्ट्रोमीरिज का भाग था। स्कान्दरबर्ग, जिसे बाद में अल्बानिया के राष्ट्रीय नायक होने का गौरव प्राप्त हुआ, ने अपनी मृत्यु तक तुर्कों को अल्बानिया से खदेड़े रखा। इसके बाद लगभग ५०० वर्षों का तुर्क आधिपत्य काल आया, जिसका अन्त बाल्कन युद्ध के बाद हुआ और अल्बानिया १९१२ में एक स्वतन्त्र देश बना। प्रथम बाल्कन युद्ध के बाद अल्बानिया ने ऑटोमन साम्राज्य से अपनी स्वतन्त्रता की घोषणा कर दी। देश में स्थिति अभी भी अशांत थी। द्वितीय विश्व युद्घ के दौरान इटली ने इसपर अधिकार कर लिया, लेकिन इसका लगातार एन्वर होक्ज़ा के नेतृत्व में साम्यवादी विरोध जारी रहा और इतालवियों के देश छोड़ने के बाद साम्यवादियों ने सत्ता सम्भाली। १९९० में एन्वर होक्ज़ा की मृत्यु के पाँच वर्षों बाद तक, अल्बानिया एक पृथक्कृत देश था। देश में बहुदलीय व्यस्था को सुदृढ़ किया जा रहा है, लेकिन देश में अभी भी बहुत सी आर्थिक समस्याएं बनीं हुई हैं, जैसे निवेश की कमी और आधारभूत ढाँचे की कमी और अपर्याप्त बिजली आपूर्ती। इसके…"} {"instruction": "Display a chart on the page to show the data.", "input": "", "output": " "} {"instruction": "Write a Python program to perform a merge sort on given numbers.", "input": "", "output": "def merge_sort(nums):\n if len(nums) > 1:\n mid_index = len(nums) // 2\n left_half = nums[:mid_index]\n right_half = nums[mid_index:]\n\n merge_sort(left_half)\n merge_sort(right_half)\n\n i = j = k = 0\n\n while i < len(left_half) and j < len(right_half):\n if left_half[i] < right_half[j]:\n nums[k] = left_half[i]\n i += 1\n else:\n nums[k] = right_half[j]\n j += 1\n k += 1\n\n while i < len(left_half):\n nums[k] = left_half[i]\n i += 1\n k += 1\n\n while j < len(right_half):\n nums[k] = right_half[j]\n j += 1\n k += 1"} {"instruction": "Write a function in Java to find the element that appears most frequently in the array.", "input": "[9, 5, 1, 0, 4, 5, 9, 2, 8]", "output": "public static int mostFrequentElement(int[] arr) { int count = 0; int maxCount = 0; int mostFrequent = arr[0]; for (int i = 0; i < arr.length; i++) { count = 0; for (int j = 0; j < arr.length; j++) { if(arr[i] == arr[j]) { count++; } if (count > maxCount) { maxCount = count; mostFrequent = arr[i]; } } } return mostFrequent; }"} {"text": "[HI Wikipedia] हरिनारायण\n\nहरिनारायण नाम के दो हिन्दी कवि हुए हैं - एक हरिनारायण मिश्र और दूसरे हरिनारायण। (१) हरिनारायण बेरी (जिला मथुरा) के निवासी थे। 'बारहमासी' और 'गोवर्धनलीला' खोज में इनकी दो रचनाएँ उपलब्ध हुई हैं। 'बारहमासी' में कांता प्रत्येक मास में होनेवाले दु:खों का वर्णन कर अपने पति को प्रवास जाने से रोकती है। 'गोवर्धनलीला' प्रबंधात्मक रचना है जिसमें श्रीकृष्ण इंद्रपूजा का निषेध करवाकर नंद गोपों से गोवर्धन पुजवाते हैं। कवित्व के विचार से इन दोनों ही रचनाओं का साधारण महत्व है। (२) दूसरे हरिनारायण भरतपुर में स्थित कुम्हेर के निवासी ब्राह्मण थे। इनकी तीन रचनाएँ बताई गई हैं - (१) 'माधवानलकामकंदला', (२) 'बैतालपचीसी' कथाप्रधान रचना है। तीसरी रचना 'रुक्मिणीमंगल' में श्रीकृष्णप्रिया रुक्मिणी के हरण का वर्णन है। पहले हरिनारायण की अपेक्षा दूसरे हरिनारायण में काव्यगरिमा अधिक है। हिन्दी कवि बहुविकल्पी"} {"instruction": "Create a function that examines the character and determines if it's an uppercase letter or not.", "input": "", "output": "def is_uppercase(character): if character.isalpha and character.isupper(): return True else: return False"} {"instruction": "Create a class in Java for a Person object with two fields, name and age.", "input": "", "output": "public class Person { private String name; private int age; public Person(String name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public int getAge() { return age; } }"} {"instruction": "Change the Python code to output the product of two numbers.", "input": "def multiply(a, b): return a + b", "output": "def multiply(a, b): return a * b"} {"text": "[EN Wikipedia] Pararrhaptica trochilidana\n\nPararrhaptica trochilidana is a moth of the family Tortricidae. It was first described by Lord Walsingham in 1907. It is endemic to the Hawaiian island of Molokai. External links Archipini Endemic moths of Hawaii"} {"instruction": "Edit the following Java code to create a method which will calculate the area of a rectangle, given its width and length.", "input": "public class Rectangle { private double width; private double length;", "output": "public class Rectangle { private double width; private double length; public double calculateArea() { return width * length; } }"} {"instruction": "Generate an appropriate Python command to edit the following list such that all the negative numbers are replaced with 0.", "input": "[-1, 5, 9, -8, 2]", "output": "def filter_negative(nums):\n return [max(0, n) for n in nums]"} {"text": "[DE Wikipedia] Built to Last (Grateful-Dead-Album)\n\nBuilt to Last ist das dreizehnte und letzte Studioalbum der Band Grateful Dead. Geschichte Das Album wurde zwischen dem 1. Februar und dem 20. Oktober 1989 aufgenommen und am 31. Oktober 1989 über das Label Arista Records veröffentlicht. Mit allen anderen Livealben und Greatest Hits-Kompilation ist es das dreiundzwanzigste Album der Band. Wie auch beim Album In the Dark sollte die Band die Songs des Albums ursprünglich im Marin County Veterans Auditorium unter simulierten Livebedingungen ohne Publikum aufnehmen. Was jedoch bei In the Dark zu großem Erfolg führte, funktionierte bei Built to Last nicht wie gewünscht. Dies kann einerseits an der langen Pause zwischen Reckoning und In the Dark liegen, die die Band diesmal nicht zum Songschreiben hatte. Zudem stammen fast die Hälfte der Songs aus der Feder von Brent Mydland und der Rest vom Duo Robert Hunter und Jerry Garcia oder aber von Bob Weir und John Perry Barlow. Unzufrieden mit den ersten Aufnahmen, wurde anschließend eine Basis an Rhythmus- und Songstruktur gemeinsam erarbeitet, während dann jeder Musiker seine Parts alleine einspielte, bevor zuletzt alles von Garcia und Cutler zusammen geschnitten wurde. Erst dann waren die Songs komplett für alle zu hören. Aufgenommen wurde im Club Front und auf der Skywalker Ranch in San Rafael, Marin County, und im Studio X in Petaluma, Sonoma County. Die Skywalker Ranch gehörte zu diesem Zeitpunkt schon George Lucas und war Firmensitz von Lucasfilm und deren Tochtergesellschaften. Garcia verglich später die Alben miteinander und äußerte in einem Interview, dass das Aufnehmen von Alben meistens für die Band vergleichbar mit Zähneziehen sei. Sie würden einfach keinen Weg finden, es spaßiger zu machen. Für ihn sei besonders schwer, dass er Producer und Interpret zeitgleich ist. Obgleich das Album Goldstatus erreichte, war es bei weitem nicht so erfolgreich wie das Vorgängeralbum und die nächsten Alben sollten alles Livealben werden. Der Titel Build to Last sollte sich bewahrheiten. Es war das letzte Studioalbum, da der Bandleader Garcia 1995 sterben sollte. Für das Cover war wieder Alton Kelly zuständig, der für seine psychedelische Kunst bekannt ist. Es zeigt die Bandmitglieder, wie sie aus dem Dunklen mit Spielkarten ein beleuchtetes Kartenhaus aufbauen. Das Haus wurde von Garcias Tochter Anabelle und ihren Freunden gebaut. Die Idee zum Cover stammt laut eigener Angaben zum ersten Mal von Garcia. Build to Last war das erste Dead Album, bei welchem verstärkt MIDI-Technologie zum Einsatz kam. Als Single wurde „Foolish Heart“/„We Can Run“ ausgekoppelt. 2004 erschien eine überarbeitete Version der sieben Lieder und sechs weiteren von Rhino Records für das Boxset Beyond Description (1973–1989), die dann auch 2006 als einzelne CD veröffentlicht wurden. Erfolge…"} {"text": "[CS Wikipedia] Imambayildi\n\nİmam bayıldı (v překladu Imám omdlel, Imám v bezvědomí) je turecké jídlo z lilku, oblíbené na celém Blízkém východě. Je pojmenováno podle historky o imámovi, který při vychutnávání pokrmu nadšením ztratil vědomí (to souvisí s obrazem imáma v lidové slovesnosti jako člověka, který druhé nabádá k askezi, ale sám si rád dopřeje). İmam bayıldı se připravuje tak, že se lilek nařízne a nasolí, aby pustil hořkou šťávu. Pak se orestuje v olivovém oleji, kapsa se naplní rajčaty dušenými s česnekem, cibulí a kořením a vše se zapeče v troubě. Pokrm se obvykle podává studený s pečivem. Verze tohoto receptu vylepšená o mleté maso se nazývá karnıyarık (rozpůlené břicho). Reference Externí odkazy Recept na turecka-kuchyne.wz.cz Recept na Labužník.cz Turecká kuchyně Bezmasá jídla Zeleninové pokrmy"} {"text": "[CS Wikipedia] Mjory\n\nMjory (, – Miory, , ) je město ve Vitebské oblasti v Bělorusku, správní středisko Mjorského rajónu. K roku 2017 ve městě žilo zhruba osm tisíc obyvatel. Poloha a doprava Mjory leží přibližně 190 kilometrů severozápadně od Vitebsku, správního střediska oblasti, a zhruba 245 kilometrů severně od Minsku, hlavního města Běloruska. Ve městě je nádraží na železniční trati z Druje do Varapajevy a je zde křižovatka silnic R14 (Polack – Braslaŭ) a R18 (Šarkaŭščyna – Kazjany). Dějiny První zmínka je z roku 1514. V roce 1691 byl ze dřeva postaven první katolický kostel. Městem jsou Mjory od roku 1972. Odkazy Reference Externí odkazy Města v Bělorusku Vitebská oblast"} {"instruction": "Define a function in Python to check if a number is even.", "input": "", "output": "def is_even(num): \n if num % 2 == 0: \n return True \n else: \n return False"} {"instruction": "Create a function to take in a given array, rotate it by one, so that the last element of the array is now the first element.", "input": "[1, 2, 3, 4, 5]", "output": "def rotate_list(arr): length = len(arr) temp = arr[length - 1] for i in range(length-1, 0, -1): arr[i] = arr[i-1] arr[0] = temp return arr my_list = [1, 2, 3, 4, 5] print(rotate_list(my_list)) #Output: [5, 1, 2, 3, 4]"} {"instruction": "Formulate a Python code for calculating the Levenshtein distance for two strings.", "input": "", "output": "def calculateLevenshteinDistance(str1, str2): \n n = len(str1)\n m = len(str2)\n \n # Create a matrix to store results \n dp = [[0 for x in range(m + 1)] for x in range(n + 1)] \n\n # Initialize the first row and column with the difference of lengths\n for i in range(n + 1): \n for j in range(m + 1): \n \n if i == 0: \n dp[i][j] = j\n elif j == 0: \n dp[i][j] = i\n \n # Iterate through the matrix and replace the \n # cells with the required edit distance\n for i in range(1, n + 1): \n for j in range(1, m + 1): \n if str1[i-1] == str2[j-1]: \n dp[i][j] = dp[i-1][j-1]\n else: \n dp[i][j] = 1 + min(dp[i][j-1], # Insert \n dp[i-1][j], # Remove \n dp[i-1][j-1]) # Replace \n \n return dp[n][m]"} {"instruction": "Create a python script to read a JSON object and print out its values.", "input": "{\n \"name\": \"Adam\",\n \"age\": 24,\n \"city\": \"New York\"\n}", "output": "import json\n\ndata = json.loads('{ \"name\": \"Adam\", \"age\": 24, \"city\": \"New York\" }')\n\nprint(\"Name: \", data['name']) \nprint(\"Age: \", data['age']) \nprint(\"City: \", data['city'])"} {"instruction": "Create a Python script to pre-process a given corpus and vectorize it for usage as features in a machine learning problem.", "input": "", "output": "import numpy as np\nfrom sklearn.feature_extraction.text import CountVectorizer\n\ndef vectorize_corpus(corpus):\n # Initialize the CountVectorizer\n vectorizer = CountVectorizer()\n # Fit the corpus\n X = vectorizer.fit_transform(corpus)\n # Convert the sparse matrix to numpy array\n X = X.toarray()\n # Return the vectorized corpus and the corresponding feature names\n return X, vectorizer.get_feature_names()"} {"instruction": "Code a function in Python that takes a list of integers (denoted by `lst`) and returns a list of booleans where each element of the output list is `True` if the corresponding element in the input list is a prime number, and `False` otherwise.", "input": "lst = [7, 8, 12, 19, 22, 23]", "output": "def is_prime(n):\n # check if n is divisible by any of the numbers\n # between 2 and n-1\n for i in range(2, n):\n if n % i== 0:\n return False\n\n return True \n\ndef check_lst(lst):\n # generate a list of booleans \n # where each element corresponds to the corresponding\n # element of lst\n result_lst = []\n for i in range(len(lst)):\n if is_prime(lst[i]):\n result_lst.append(True)\n else:\n result_lst.append(False)\n\n return result_lst\n\nlst = [7, 8, 12, 19, 22, 23]\nprint(check_lst(lst))\n\n# Output: \n# [True, False, False, True, False, True]"} {"instruction": "Implement a non-recursive algorithm to compute the factorial of a given number", "input": "7", "output": "def factorial(n): res = 1 # Calculate value of # factorial in for loop for i in range(2,n+1): res = res * i return res n = 7 print(\"Factorial of\",n,\"is\",factorial(n))"} {"instruction": "Find the maximum of three numbers using a Python function.", "input": "a = 10, b = 5, c = 20", "output": "def maximumOfThreeNumbers(a, b, c):\n if (a >= b) and (a >= c):\n return a\n elif (b >= a) and (b >= c):\n return b\n else:\n return c\n\nmaximum = maximumOfThreeNumbers(10, 5, 20)\nprint(\"The maximum number is:\", maximum)"} {"instruction": "Generate a boolean statement in Swift to compare two strings for equality.", "input": "String 1: \"hello\" String 2: \"Hello\"", "output": "let str1 = \"hello\" let str2 = \"Hello\" let result = str1.lowercased() == str2.lowercased() print(result)"} {"instruction": "Develop a Sentiment Analysis classifier in Python. The classifier should predict the sentiment (positive or negative) of a given sentence.", "input": "The food at this restaurant is terrible", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.svm import LinearSVC\n\n# Load the data\ndata = pd.read_csv('data.csv')\n\n# Create the feature vector\nvectorizer = CountVectorizer()\nX = vectorizer.fit_transform(data['text']) \n\n# Create labels\ny = np.where(data['sentiment']=='positive', 1, 0)\n\n# Split the data into training and test sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Train the classifier\nmodel = LinearSVC()\nmodel.fit(X_train, y_train)\n\n# Make a prediction\nsentence = 'The food at this restaurant is terrible'\npreds = model.predict(vectorizer.transform([sentence])) \n\n# Print the prediction\nprint('Sentiment:', 'Positive' if preds[0] else 'Negative')"} {"instruction": "Write a Python program that takes a list of numbers as an argument and prints the count of all even and odd numbers.", "input": "[2, 9, 4, 8, 0, 7, 1]", "output": "def countNumbers(nums):\n evenCount = 0\n oddCount = 0\n \n for num in nums:\n if num % 2 == 0:\n evenCount += 1\n else:\n oddCount += 1\n \n return (evenCount, oddCount)\n\nnums = [2, 9, 4, 8, 0, 7, 1]\nevenCount, oddCount = countNumbers(nums)\n\nprint(\"Even numbers:\", evenCount)\nprint(\"Odd numbers:\", oddCount) \n# Even numbers: 4\n# Odd numbers: 3"} {"text": "[DE Wikipedia] Shinobu Muraki\n\nShinobu Muraki (; * 2. September 1923 in der Präfektur Tokio; † 16. Januar 1997) war eine japanische Szenenbildnerin und Artdirectorin. Leben Muraki begann ihre Karriere im Filmstab 1953 bei Kon Ichikawas Drama Aoiro kakumei. Ab 1955 wirkte sie auch bei einigen Filmen als Artdirector, darunter Dodeskaden – Menschen im Abseits aus dem Jahr 1970. Ihre Arbeit wurde in Japan mehrfach ausgezeichnet, so erhielt sie drei Mal die Auszeichnung für das Bestes Szenenbild bei den Mainichi Eiga Concours. Bei den Japanese Academy Awards war sie zwischen 1978 und 1990 sieben Mal für die Auszeichnung für das Bestes Szenenbild nominiert. 1986 bis 1988 konnte sie den Preis dabei drei Mal in Folge gewinnen, unter anderem für Akira Kurosawas Jidai-geki Ran. Für Ran war sie zusammen mit Muraki Yoshirō 1986 für den Oscar in der Kategorie Bestes Szenenbild sowie den BAFTA Film Award in der Kategorie Bestes Szenenbild nominiert. Beide Auszeichnungen gingen jedoch an andere Filme; der Oscar an Jenseits von Afrika und der BAFTA Award an Zimmer mit Aussicht. Muraki war mit Muraki Yoshirō verheiratet, beide arbeiteten einige Male zusammen, darunter bei Ran und Dodeskaden – Menschen im Abseits. Filmografie (Auswahl) 1970: Dodeskaden – Menschen im Abseits (Dodesukaden) 1983: Die Töchter des Hauses Makioka (Sasameyuki) 1984: Ohan 1985: Ran 1986: Rokumeikan Auszeichnungen (Auswahl) 1986: Oscar-Nominierung in der Kategorie Bestes Szenenbild für Ran 1987: BAFTA-Film-Award-Nominierung in der Kategorie Bestes Szenenbild für Ran Weblinks Szenenbildner Japaner Geboren 1923 Gestorben 1997 Frau"} {"instruction": "Construct a JSX expression that renders a element with className \"highlight\".", "input": "", "output": ""} {"text": "[EN Wikipedia] Trevor Brissett\n\nTrevor Anthony Brissett (2 January 1961 – 17 May 2010) was an English footballer. He played in the Football League for Port Vale and Darlington in the early 1980s. He remained involved with football for the rest of his life, playing for Stafford Rangers, Witton Albion, Macclesfield Town, and Newcastle Town, and coaching at Newcastle Town, Congleton Town, Meir KA and the Stoke City Academy. Playing career Brissett was contracted to Stoke City, before joining local rivals Port Vale in May 1980, after being spotted by John McGrath and John Rudge. He made 45 appearances in 1980–81, missing just five Fourth Division games. However he featured just 15 times in 1981–82, and was given a free transfer in May 1982. He spent the 1982–83 campaign with league rivals Darlington, and played 12 games before he was released by manager Billy Elliott. He moved into non-League football with Stafford Rangers and Witton Albion in 1983. He played 16 games for Witton in the 1983–84 season, featured 38 times in the 1984–85 campaign and played another 46 games in the 1985–86 season. He later played for Macclesfield Town and Newcastle Town. Whilst at Macclesfield Town in summer 1987 he was in a car crash with teammates Nigel Shaw, Ian Elsby and Steve Waddington. He managed to recover to play the final few minutes of an end of season game. Coaching career After a spell as Newcastle Town player/assistant manager he went on to work with Glyn Chamberlain again at Congleton Town. He also coached at Meir KA and the Stoke City Academy. Death Brissett died from cancer in May 2010 at the Queen Elizabeth Hospital Birmingham. His funeral was conducted on 4 June 2010, and was described as \"full to capacity\" with mourners. He was survived by wife Sharon and two daughters, Lauren and Morgan. Career statistics Source: References 1961 births 2010 deaths Black British sportsmen Footballers from Stoke-on-Trent English men's footballers Men's association football fullbacks Stoke City F.C. players Port Vale F.C. players Darlington F.C. players Stafford Rangers F.C. players Macclesfield Town F.C. players Witton Albion F.C. players Newcastle Town F.C. players English Football League players Northern Premier League players Association football coaches Deaths from cancer in England Stoke City F.C. non-playing staff"} {"instruction": "Create a function in JavaScript that takes two temperatures and returns their average.", "input": "", "output": "function average_temperature(temp1, temp2) { return (temp1 + temp2) / 2; }"} {"instruction": "Construct a for loop in JavaScript to iterate through an array of strings and print out each one.", "input": "", "output": "let strArray = [\"Hello\", \"World\", \"!\"]; for(let i = 0; i < strArray.length; i++) { console.log(strArray[i]); }"} {"instruction": "Write a Python function that takes a list and returns the number of elements that are divisible by 3.", "input": "list = [4, 6, 8, 9, 10]", "output": "def number_divisible_by_3(list):\n count = 0\n for item in list:\n if item % 3 == 0:\n count += 1\n return count\n\nresult = number_divisible_by_3(list)\nprint(result)"} {"text": "[DE Wikipedia] PGC 1924587\n\nLEDA/PGC 1924587 ist eine Galaxie Sternbild Andromeda am Nordsternhimmel, die schätzungsweise 1,5 Milliarden Lichtjahre von der Milchstraße entfernt ist. Vom Sonnensystem aus entfernt sich das Objekt mit einer errechneten Radialgeschwindigkeit von näherungsweise 33.000 Kilometern pro Sekunde. Im selben Himmelsareal befinden sich unter anderem die Galaxien NGC 39, PGC 1918660, PGC 1927012, PGC 1933768. Weblinks CDS Portal SIMBAD Astronomical Database Einzelnachweise"} {"instruction": "Design a machine learning model to classify an article as either a sports article or a food article.", "input": "", "output": "The machine learning model can be designed as a sequence of layers built with Keras, followed by a dense layer with two units – one for sports and one for food, and a softmax activation function to achieve the final output. We can feed the model with a dataset consisting of article texts labeled as 'sports' or 'food'. Then, the model can be trained using gradient descent. After training is complete, the model can be used to classify new articles as either 'sports' or 'food' articles."} {"instruction": "Write a Python program to extract the text from the webpage.", "input": "", "output": "import requests \ndef extract_text(url): \n page = requests.get(url) \n return page.content"} {"text": "[CS Wikipedia] Národní parky v Polsku\n\nPolsko má celkem 23 národních parků, nejstarší z nich je Białowieski Park Narodowy na východě Polska, vyhlášený v roce 1947 a naopak zatím nejmladší je Národní park Ústí Warty na západě Polska, vyhlášený roku 2001. Největším polským národním parkem je Biebrzański národní park na severovýchodě Polska, s rozlohou 592,23 km². Největší koncentrace národních parků je v nížině na severovýchodě při hranicích s Běloruskem a Ukrajinou a na jihovýchodě v Karpatech při hranicích se Slovenskem. Při hranicích s Českou republikou leží Krkonošský národní park přiléhající ke stejnojmennému českému Krkonošskému národnímu parku a Národní park Stolové hory, jež je pokračováním české chráněné krajinné oblasti Broumovska. Seznam národních parků Externí odkazy Chráněná území v Polsku"} {"instruction": "Edit the following markup so that it becomes valid HTML5.", "input": "| Name | Age | Gender | Address |
| John Doe | 24 | Male | 123 Main Street |
This is a demo page with a navigation bar at the top.
"} {"instruction": "Write a python program to find the most common words in a given text. Input should be given as a string and output should be a list of words in descending order of frequency.", "input": "text = 'This is a text to find the most common words in the given text. The output should be a list of words in descending order of frequency'", "output": "from collections import Counter\n\ndef find_most_common_words(text):\n words = text.split()\n counter = Counter(words)\n return counter.most_common()\n\nprint(find_most_common_words(text))\n\n# Output: [('a', 2), ('the', 2), ('in', 2), ('of', 2), ('most', 1), ('This', 1), ('is', 1), ('text', 1), ('find', 1), ('common', 1), ('words', 1), ('given', 1), ('output', 1), ('should', 1), ('be', 1), ('list', 1), ('descending', 1), ('order', 1), ('frequency', 1)]"} {"text": "[EN Wikipedia] Gmina Gostynin\n\nGmina Gostynin is a rural gmina (administrative district) in Gostynin County, Masovian Voivodeship, in east-central Poland. Its seat is the town of Gostynin, although the town is not part of the territory of the gmina. The gmina covers an area of , and as of 2006 its total population is 12,245. The gmina contains part of the protected area called Gostynin-Włocławek Landscape Park. Villages Gmina Gostynin contains the villages and settlements of: Aleksandrynów Anielin Antoninów Baby Dolne Baby Górne Belno Białe Białotarsk Bielawy Bierzewice Bolesławów Budy Kozickie Budy Lucieńskie Choinek Dąbrówka Emilianów Feliksów Gaśno Górki Drugie Górki Pierwsze Gorzewo Gulewo Halinów Helenów Huta Zaborowska Jaworek Józefków Kazimierzów Kiełpieniec Kleniew Klusek Kozice Krzywie Legarda Leśniewice Lipa Lisica Łokietnica Lucień Marianka Marianów Marianów Sierakowski Mysłownia Nowa Nagodów Niecki Nowa Huta Nowa Jastrzębia Nowa Wieś Nowy Zaborów Osada Osiny Podgórze Pomorzanki Rębów Rogożewek Rumunki Ruszków Rybne Sałki Sieraków Sierakówek Skrzany Sokołów Solec Stanisławów Stanisławów Skrzański Stary Zaborów Stefanów Strzałki Wrząca Zieleniec Zuzinów and Zwoleń Neighbouring gminas Gmina Gostynin is bordered by the town of Gostynin and by the gminas of Baruchowo, Łąck, Łanięta, Lubień Kujawski, Nowy Duninów, Strzelce and Szczawin Kościelny. References Polish official population figures 2006 External links Gostynin Gostynin County"} {"instruction": "Write an efficient Python program to remove duplicate characters from the given string.", "input": "String: Hello world", "output": "He lwrd"} {"instruction": "Implement a program in Python that takes a string as an input and prints out the length of the longest word in the string.", "input": "string = \"The quick brown fox jumps over the lazy dog\"", "output": "def longest_word(string):\n words = string.split(\" \")\n max_length = 0\n longest_word = \"\"\n for word in words:\n if(len(word) > max_length):\n max_length = len(word)\n longest_word = word\n print(\"Longest word is {} with length {}\".format(longest_word,max_length))"} {"instruction": "Given a list of numbers, write a program which partitions the list into two parts, such that the sum of the elements in the first part exceeds the sum of the elements in the second part.", "input": "", "output": "def partition(lst): left_sum, right_sum = 0, sum(lst) for i in range(len(lst)-1): left_sum += lst[i] right_sum -= lst[i] if left_sum > right_sum: return lst[:i+1], lst[i+1:] return None"} {"text": "[HI Wikipedia] शिव\n\nशंकर या महादेव अरण्य संस्कृति जो आगे चल कर सनातन शिव धर्म नाम से जाने जाते है में सबसे महत्वपूर्ण देवताओं में से एक है। वह त्रिदेवों में एक देव हैं। इन्हें देवों के देव महादेव भी कहते हैं। इन्हें भोलेनाथ, शंकर, महेश, भिलपती, भिलेश्वर,रुद्र, नीलकंठ, गंगाधार आदि नामों से भी जाना जाता है। तंत्र साधना में इन्हे भैरव के नाम से भी जाना जाता है। हिन्दू शिव घर्म शिव-धर्म के प्रमुख देवताओं में से हैं। वेद में इनका नाम रुद्र है। यह व्यक्ति की चेतना के अन्तर्यामी हैं। इनकी अर्धांगिनी (शक्ति) का नाम पार्वती है। इनके पुत्र कार्तिकेय , अय्यपा और गणेश हैं, तथा पुत्रियां अशोक सुंदरी , ज्योति और मनसा देवी हैं। शिव अधिक्तर चित्रों में योगी के रूप में देखे जाते हैं और उनकी पूजा शिवलिंग तथा मूर्ति दोनों रूपों में की जाती है। शिव के गले में नाग देवता विराजित हैं और हाथों में डमरू और त्रिशूल लिए हुए हैं। कैलाश में उनका वास है। यह शैव मत के आधार है। इस मत में शिव के साथ शक्ति सर्व रूप में पूजित है। शंकर जी को संहार का देवता कहा जाता है। शंंकर जी सौम्य आकृति एवं रौद्ररूप दोनों के लिए विख्यात हैं। इन्हें अन्य देवों से बढ़कर माना जाने के कारण महादेव कहा जाता है। सृष्टि की उत्पत्ति, स्थिति एवं संहार के अधिपति शिव हैं। त्रिदेवों में भगवान शिव संहार के देवता माने गए हैं। शिव अनादि तथा सृष्टि प्रक्रिया के आदि स्रोत हैं और यह काल महाकाल ही ज्योतिषशास्त्र के आधार हैं। शिव का अर्थ यद्यपि कल्याणकारी माना गया है, लेकिन वे हमेशा लय एवं प्रलय दोनों को अपने अधीन किए हुए हैं। रावण, शनि, कश्यप ऋषि आदि इनके भक्त हुए है। शिव सभी को समान दृष्टि से देखते है इसलिये उन्हें महादेव कहा जाता है। शिव के कुछ प्रचलित नाम, महाकाल, आदिदेव, किरात, शंकर, चन्द्रशेखर, जटाधारी, नागनाथ, मृत्युंजय [मृत्यु पर विजयी], त्रयम्बक, महेश, विश्वेश, महारुद्र, विषधर, नीलकण्ठ, महाशिव, उमापति [पार्वती के पति], काल भैरव, भूतनाथ, त्रिलोचन [तीन नयन वाले], शशिभूषण आदि। भगवान शिव को रूद्र नाम से जाना जाता है रुद्र का अर्थ है रुत् दूर करने वाला अर्थात दुखों को हरने वाला अतः भगवान शिव का स्वरूप कल्याण कारक है। रुद्राष्टाध्यायी के पांचवे अध्याय में भगवान शिव के अनेक रूप वर्णित हैं रूद्र देवता को स्थावर जंगम सर्व पदार्थ रूप, सर्व जाति मनुष्य देव पशु वनस्पति रूप मानकर के सर्व अंतर्यामी भाव एवं सर्वोत्तम भाव सिद्ध किया गया है इस भाव का ज्ञाता होकर साधक अद्वैतनिष्ठ बनता है। संदर्भ रुद्राष्टाध्यायी पृष्ठ संख्या 10 गीता प्रेस गोरखपुर। रामायण में भगवान राम के कथन अनुसार शिव और राम में अंतर जानने वाला कभी भी भगवान शिव का या भगवान राम का प्रिय नहीं हो सकता। शुक्ल यजुर्वेद संहिता के अंतर्गत रुद्र अष्टाध्यायी के अनुसार सूर्य, इंद्र, विराट पुरुष, हरे वृक्ष, अन्न, जल, वायु एवं मनुष्य के कल्याण के सभी हेतु भगवान शिव के ही स्वरूप हैं। भगवान सूर्य के रूप में वे शिव भगवान मनुष्य के कर्मों को भली-भांति निरीक्षण कर उन्हें वैसा ही फल देते हैं। आशय यह है कि संपूर्ण सृष्टि शिवमय है। मनुष्य अपने-अपने कर्मानुसार फल पाते हैं अर्थात स्वस्थ बुद्धि वालों को वृष्टि रूपी जल, अन्न, धन, आरोग्य, सुख आदि भगवान शिव प्रदान करते हैं और दुर्बुद्धि वालों के लिए…"} {"text": "[HI Wikipedia] काशी\n\nकाशी नगरी वर्तमान वाराणसी शहर में स्थित पौराणिक नगरी है। इसे संसार के सबसे पुरानी नगरों में माना जाता है। भारत की यह जगत्प्रसिद्ध प्राचीन नगरी गंगा के वाम (उत्तर) तट पर उत्तर प्रदेश के दक्षिण-पूर्वी कोने में वरुणा और असी नदियों के गंगा संगमों के बीच बसी हुई है। इस स्थान पर गंगा ने प्राय: चार मील का दक्षिण से उत्तर की ओर घुमाव लिया है और इसी घुमाव के ऊपर इस नगरी की स्थिति है। इस नगर का प्राचीन 'वाराणसी' नाम लोकोच्चारण से 'बनारस' हो गया था जिसे उत्तर प्रदेश सरकार ने शासकीय रूप से पूर्ववत् 'वाराणसी' कर दिया है। जिसके राजा राज ऋषि राम कोल नागवंशीय थे विश्व के सर्वाधिक प्राचीन ग्रंथ ऋग्वेद में काशी का उल्लेख मिलता है - 'काशिरित्ते.. आप इवकाशिनासंगृभीता:'। पुराणों के अनुसार यह आद्य वैष्णव स्थान है। पहले यह भगवान विष्णु (माधव) की पुरी थी। जहां श्रीहरिके आनंदाश्रु गिरे थे, वहां बिंदुसरोवर बन गया और प्रभु यहां बिंधुमाधव के नाम से प्रतिष्ठित हुए। ऐसी एक कथा है कि जब भगवान शंकर ने क्रुद्ध होकर ब्रह्माजी का पांचवां सिर काट दिया, तो वह उनके करतल से चिपक गया। बारह वर्षों तक अनेक तीर्थों में भ्रमण करने पर भी वह सिर उन से अलग नहीं हुआ। किंतु जैसे ही उन्होंने काशी की सीमा में प्रवेश किया, ब्रह्महत्या ने उनका पीछा छोड़ दिया और वह कपाल भी अलग हो गया। जहां यह घटना घटी, वह स्थान कपालमोचन-तीर्थ कहलाया। महादेव को काशी इतनी अच्छी लगी कि उन्होंने इस पावन पुरी को विष्णुजी से अपने नित्य आवास के लिए मांग लिया। तब से काशी उनका निवास-स्थान बन गया। इतिहास हरिवंशपुराण के अनुसार काशी को बसानेवाले भरतवंशी राजा 'काश' थे। कुछ विद्वानों के मत में काशी वैदिक काल से भी पूर्व की नगरी है। शिव की उपासना का प्राचीनतम केंद्र होने के कारण ही इस धारणा का जन्म हुआ जान पड़ता है; क्योंकि सामान्य रूप से शिवोपासना को पूर्ववैदिककालीन माना जाता है। वैसे, काशी जनपद के निवासियों का सर्वप्रथम उल्लेख हमें अर्थर्ववेद की पैप्पलादसंहिता में (५, २२, १४) मिलता है। शुक्लयजुर्वेद के शतपथ ब्राह्मण में (१३५, ४, १९) काशिराज धृतराष्ट्र का उल्लेख है जिसे शतानीक सत्राजित् ने पराजित किया था। बृहदारण्यकोपनिषद् में (२, १, १, ३, ८, २) काशिराज अजातशत्रु का भी उल्लेख है। कौषीतकी उपनिषद् (४, १) और बौधायन श्रौतसूत्र में काशी और विदेह तथा गोपथ ब्राह्मण में काशी और कोसल जनपदों का साथ-साथ वर्णन है। इसी प्रकार काशी, कोसल और विदेह के सामान्य पुरोहित जलजातूकर्ण्य का नाम शांखायन श्रौतसूत्र में प्राप्य है। काशी जनपद की प्राचीनता तथा इसकी स्थिति इन उपर्युक्त उल्लेखों से स्पष्ट हो जाती है। वाल्मीकि रामायण में (किष्किंधा कांड ४०, २२) सुग्रीव द्वारा वानरसेना को पूर्वदिशा की ओर भेजे जाने के संदर्भ में काशी और कोसल जनपद के निवासियों का एक साथ उल्लेख किया गया है– महीं कालमहीं चापि शैलकानन शोभिंता। ब्रह्ममालन्विदेहांश्च मालवान्काशिक सलान्। महाभारत में काशी जनपद के अनेक उल्लेख हैं और काशिराज की कन्याओं के भीष्म द्वारा अपहरण की कथा तो सर्वविदित ही है (आदि पूर्व, अध्याय १०२)। महाभारत के युद्ध में काशिराज ने पांडवों का साथ दिया था। बौद्ध काल में, गौतम बुद्ध के जन्म के पूर्व तथा उनके समय में काशी को बहुत प्रसिद्धि प्राप्त हो चुकी थी।…"} {"instruction": "Write a SQL query to select all rows in the table 'students' whose marks are greater than 25.", "input": "", "output": "SELECT * FROM students WHERE marks > 25;"} {"instruction": "Design a python script to calculate BMI of a person.", "input": "", "output": "def calculate_bmi(height, weight): \n bmi = weight / ((height/100) ** 2)\n return bmi"} {"instruction": "How does the fadeIn() function work in jQuery?", "input": "", "output": "The fadeIn() function in jQuery is used to gradually increase the opacity of an element from hidden to visible, in a specified duration. The function works by adjusting the CSS property for opacity for the element, from 0 to 1, over a specified duration of time."} {"text": "[HI Wikipedia] और भी ग़म हैं ज़माने में\n\nऔर भी ग़म हैं ज़माने में १९८० के दशक के आरम्भिक सालों में एक भारतीय टेलिविज़न धारावाहिक था जो दूरदर्शन पर प्रसारित किया जाता था। इसकी ३२ कड़ियाँ प्रसारित हुई जिनमें मनोरंजन और सामाजिक शिक्षा का मिश्रण हुआ करता था। हर दो सप्ताह में एक बार प्रसारित होने वाले इस धारावाहिक की हर किश्त में एक सामाजिक बुराई लेकर उसपर आधारित कहानी बनाई जाती थी। इस टी वी शृंखला का नाम कवि फ़ैज़ अहमद फ़ैज़ की प्रसिद्ध कृति 'और भी दुख हैं ज़माने में' के शीर्षक में एक शब्द बदलकर रखा गया था जिसमें शायर अपनी प्रेमिका को समझाता है कि वह उसपर पूरा ध्यान नहीं दे पा रहा क्योंकि आसपास के दुख और अन्याय को देखकर उसका मन विचलित हो उठता है। इन्हें भी देखें फ़ैज़ अहमद फ़ैज़ सन्दर्भ भारतीय टेलीविजन धारावाहिक दूरदर्शन धारावाहिक"} {"instruction": "Resolve the issue in the code causing a \"TypeError\" to be thrown", "input": "names = [\"John\", \"James\", 10] for name in names: print(name)", "output": "\"\"\" Resolve the issue in the code causing a TypeError to be thrown \"\"\" names = [\"John\", \"James\", 10] for name in names: # Check the type of the element and only display it if it's a string if type(name) == str: print(name) \"\"\" Output: John James \"\"\""} {"instruction": "What is the purpose of neural networks?", "input": "", "output": "The purpose of neural networks is to recognize patterns in data and make predictions or decisions based on those patterns. Neural networks are an approach to artificial intelligence, modeled after the neural networks in the human brain. They allow computers to learn by processing large amounts of data and identifying patterns and trends in it."} {"instruction": "Given a large string S, find the total number of occurrences of a pattern p in S.", "input": "S = “Mississippi”, p = “si”", "output": "//Function to find the total number of occurrences of a pattern p in a large string S function findOccurrences(S, p) { let count = 0; let initialIndex = 0; while (S.indexOf(p, initialIndex) !== -1) { initialIndex = S.indexOf(p, initialIndex) + 1; count++; } console.log(count); } findOccurrences('Mississippi', 'si'); //Output: 2"} {"instruction": "Write a 50 lines of code snippet in Python that implements linear search algorithm.", "input": "A list of integers: [1, 4, 3, 2, 5]", "output": "def linear_search(arr, target):\n for i in range(len(arr)):\n if arr[i] == target:\n return i\n \n return -1\n\n# Test array \narr = [1, 4, 3, 2, 5] \ntarget = 3\n\n# Function call \nresult = linear_search(arr, target) \n \nif result != -1: \n print (\"Element is present at index\", result) \nelse: \n print (\"Element is not present in array\")"} {"instruction": "Modify the following Java program to find the area of a rectangle.", "input": "public class Area { public static void main(String[] args) { double radius = 10; double area = 3.14 * radius * radius; System.out.println(\"The area of the circle = \"+area); } }", "output": "public class Area { public static void main(String[] args) { double length = 10; double width = 5; double area = length * width; System.out.println(\"The area of the rectangle = \"+area); } }"} {"instruction": "Rewrite the following jQuery code to its vanilla JavaScript equivalent.", "input": "$(\"#list li\").each(function(){ //some code });", "output": "document.querySelectorAll(\"#list li\").forEach(function (el) { //some code });"} {"instruction": "Create a block of HTML code to display a table with 6 columns and 10 rows.", "input": "", "output": "| Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |
|---|---|---|---|---|---|
| Row 1 | Row 1 | Row 1 | Row 1 | Row 1 | Row 1 |
| Row 2 | Row 2 | Row 2 | Row 2 | Row 2 | Row 2 |
| Row 10 | Row 10 | Row 10 | Row 10 | Row 10 | Row 10 |
| Name | Phone | |
|---|---|---|
| John Doe | 123-456-7890 | john.doe@example.com |
| Jane Doe | 123-456-0987 | jane.doe@example.com |
| Jeff Smith | 123-456-7654 | jeff.smith@example.com |
| Lauren Anderson | 123-456-8201 | lauren.anderson@example.com |
| David Johnson | 123-456-8321 | david.johnson@example.com |
| Column1 | Column2 | Column3 |
|---|
| First Name | Last Name | Age | City |
|---|---|---|---|
| John | Doe | 50 | New York |
| Jane | Smith | 41 | Los Angeles |
| Dave | Jackson | 28 | Boston |