{"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 Blog\n \n \n {% for post in posts %}\n

{{ post.title }}

\n

{{ post.body }}

\n {% endfor %}\n Create a new post\n \n\n\n# Create the create_post.html file\n\n \n Create Post\n \n \n

Create a New Post

\n
\n {% csrf-token %}\n {{ form.as_p }}\n \n
\n \n"} {"instruction": "Suggest an appropriate way to select the last element of a given list in Python.", "input": "", "output": "list[-1]"} {"instruction": "Create a program to print the multiplication table for a given number in Python.", "input": "", "output": "\"\"\"\nCreate a program to print the multiplication table for a given number in Python\n\"\"\"\n\ndef multiplication_table(n):\n for i in range(1, 11):\n print(n, 'x', i, '=', n*i)\n\nif __name__==\"__main__\":\n multiplication_table(5)"} {"text": "[DE Wikipedia] Cottbuser Radstadion\n\nDas Cottbuser Radstadion befindet sich im Stadtteil Spremberger Vorstadt der brandenburgischen Stadt Cottbus. Das Stadion liegt im Sportzentrum Cottbus, das mit weiteren Sportanlagen und einem Sportinternat zum Olympiastützpunkt Brandenburg gehört. Die Bahn ist 333,33 Meter lang und aus Beton mit einer Kunstharzbeschichtung. Sie ist halboffen, das heißt, Bahn und Zuschauertribünen sind überdacht, nur der Innenraum hat keine Überdachung. Sie wurde am 31. Oktober 1987 in ihrer jetzigen Ausgestaltung nach einer umfassenden Rekonstruktion neu eingeweiht. Das 1952 fertiggestellte Max-Reimann-Stadion verfügte über ein Leichtathletikstadion und eine 400 m Radrennbahn, auf der in den fünfziger und sechziger Jahren vor hunderten Zuschauern hervorragender Radsport geboten wurde. Höhepunkte waren die alljährlich stattfindenden Rennen um den Oster- und Pfingstpreis. Dieses 400 m Rondell wurde zuvor abgerissen und die neue Bahn an gleicher Stelle errichtet. Das neue Radstadion bietet Sitzplätze für rund 1900 und Stehplätze für rund 1300 Zuschauer. Die Bahn ist im Besitz der Stadt. Fünfmal wurden seit der Wiedereröffnung bisher auf der Bahn deutsche Bahnmeisterschaften ausgetragen, zuletzt 2016. 2007 fanden dort Bahn-Europameisterschaften für den Nachwuchs statt, 1995 und 1996 Läufe des Bahnrad-Weltcups. Jährlich wird vom RSC Cottbus ein international und hochklassig besetztes Sprintturnier, der Große Preis von Deutschland im Sprint, ausgerichtet. Weiterhin werden jährlich seit August 2012 die Cottbuser Nächte im Bahnradsport ausgetragen. Weblinks Das Radstadion Cottbus auf ssb-cottbus.de Geschichte des Sportzentrums auf ssb-cottbus.de Einzelnachweise Radrennbahn in Deutschland Architektur (DDR) Radstadion Radstadion Erbaut in den 1980er Jahren"} {"instruction": "Create a Python script to find the maximum and minimum numbers from a list.", "input": "list1 = [2, 3, 7, 4, 5]", "output": "maxnum = max(list1)\nminnum = min(list1)\nprint(\"Maximum number is:\", maxnum) \nprint(\"Minimum number is:\", minnum) \n#prints Maximum number is: 7 Minimum number is: 2"} {"text": "[CS Wikipedia] Martina Zvěřinová\n\nMartina Zvěřinová, roz. Dočkalová, (* 22. července 1983 Pardubice) je česká reprezentantka v orientačním běhu. Mezi její největší úspěch patří zlatá a stříbrná medaile z juniorského mistrovství světa 2003 a 2001. V současnosti běhá za český klub OK Lokomotiva Pardubice a též za finský klub Tampereen Pyrintö za který startuje ve skandinávii. V sobotu 7.8.2010 se na Zemské Bráně vdala za orientačního běžce Petra Zvěřinu. Sportovní kariéra Umístění na MŠ a ME Umístění na MČR Odkazy Reference Související články Česká reprezentace v orientačním běhu Externí odkazy Výsledky Martiny Zvěřinové v systému ORIS Profil Martiny Zvěřinové na World of O Rozhovor s Martinou Dočkalovou v Sedmičce.cz České orientační běžkyně Akademické mistryně světa v orientačním běhu Medailisté mistrovství světa v orientačním běhu Mistryně České republiky v orientačním běhu Juniorské mistryně České republiky v orientačním běhu Narození v roce 1983 Narození 22. července Narození v Pardubicích Žijící lidé Ženy"} {"instruction": "Print the Fibonacci sequence up to a given number in Python.", "input": "10", "output": "# Declare a function\ndef Fibonacci(num):\n a = 0\n b = 1\n \n # Iterate\n for i in range(num):\n print(a, end=\" \")\n c = a + b\n a = b\n b = c\n print()\n \n# Print the sequence\nFibonacci(10)"} {"instruction": "Debug the following JavaScript code which calculates the average of an array of integers:", "input": "arr = [2, 3, 4, 5] sum = 0 for (i = 0; i < arr.length; i++) { sum += arr[i]} average = sum / arr.length", "output": "arr = [2, 3, 4, 5] sum = 0 for (i = 0; i < arr.length; i++) { sum += arr[i]; } average = sum / arr.length; console.log(average);"} {"text": "[EN Wikipedia] Kaledibi, Hani\n\nKaledibi () is a neighbourhood in the municipality and district of Hani, Diyarbakır Province in Turkey. It is populated by Kurds and had a population of 709 in 2022. References Neighbourhoods in Hani District Kurdish settlements in Diyarbakır Province"} {"instruction": "Write a Python code snippet to generate two random numbers and display the larger one.", "input": "", "output": "import random\n\nrand1 = random.randint(1, 100)\nrand2 = random.randint(1, 100)\n\nif rand1 > rand2:\n print(rand1)\nelse:\n Print(rand2)"} {"instruction": "Suggest an alternative for the following code snippet which is faster and less memory intensive.", "input": "arr = [2, 3, 5, 7] result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): result.append((arr[i], arr[j]))", "output": "arr = [2, 3, 5, 7] result = [(arr[i],arr[j]) for i in range(len(arr)-1) for j in range(i+1,len(arr))]"} {"instruction": "Using the following list of prime numbers, calculate their sum.", "input": "[2, 3, 5, 7, 11, 13]", "output": "The sum of the numbers in the list is 51."} {"instruction": "Convert the following recursive function to an iterative one.", "input": "def factorial(n): if n == 0: return 1 else: return n * factorial(n - 1)", "output": "def factorial(n): result = 1 for i in range(1, n + 1): result = result * i return result"} {"text": "[CS Wikipedia] Pavol Poljak\n\nPavol Poljak (16. prosince 1911, Malá Čausa – 13. února 1983, Bratislava) byl slovenský fotograf a publicista, představitel české a slovenské fotografie od meziválečného období do 80. let 20. století. Život Fotografii se věnoval profesionálně jako komerční reportér, fotograf ve Vojenském zeměpisném ústavu, ve státním filmu nebo zdravotnictví, ale zejména jako amatér toulající se ulicemi Bratislavy zachycující tvář města v proměnách světla a stínu. Nechával se strhávat jeho panoramatem, zátiším mnoha uliček se siluetou hradních ruin a třpytící se stuhou Dunaje. Jako málokdo jiný objevil rozličnou tvář města v zimě, večer při západech slunce. Podobný princip – redukci podrobností bohatým využitím stínu a nedostatku světla, kontrast tmavých a jasných partií doprovází i jeho krajinářské práce. A ani ty nejsou popisné. Více než o tváři země mluví o její náladě, o jejím vzrušení, o jejím duchu. Duchu napětí a zápasu, reprezentovaným soubojem světla a stínu na obraze, tíhou dešťových mračen a oslnivě jasných kousků čistého nebe, slunečních paprsků prodírajících se touto masou a odrážejících se v kalužích vody nebo lesku hladkých vozovek. V této skutečnosti si mnohokrát hledá své místo samotný člověk vyvolávající ozvěnu v myšlenkovém i citovém světě. Výstavy 1964 V. Internationale Ausstellung bildmässiger Photographie, V. Mezinárodní výstava ilustrační fotografie, Linec 1967 Je jich 215 000. Jak žijí? Výstava fotografií Pavla Poljaka – Ze života Cikánů, Bratislava Galerie Odkazy Reference Externí odkazy Fotogalerie na stránce webumenia.sk Slovenští fotografové Portrétní fotografové Fotografové vedut Muži Narození v roce 1911 Úmrtí v roce 1983 Úmrtí 13. února Narození 16. prosince Narození v Malé Čause Úmrtí v Bratislavě"} {"instruction": "Create a Python program that takes a user's input and converts it into pig latin.", "input": "Not applicable", "output": "def pig_latin(word):\n vowels = \"aeiouy\"\n if word[0].lower() in vowels:\n return word + \"ay\"\n else:\n return word[1:] + word[0] + \"ay\"\n\nprint(pig_latin(\"hello\")) # Output: \"ellohay\""} {"instruction": "Write a Python program to get all possible unique subsets of a given set of numbers.", "input": "S = [1, 2, 3]", "output": "def get_subsets(S):\n subsets = [[]]\n for i in S:\n for j in range(len(subsets)):\n subsets.append(subsets[j] + [i])\n return subsets\n\nS = [1, 2, 3]\nprint(get_subsets(S))\n# Output: [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]"} {"instruction": "Create a Python program that scrapes data from a web page and stores the data in a spreadsheet.", "input": "Not applicable", "output": "import requests\nfrom lxml import html\nimport openpyxl\n\n# Setup the web page URL\nurl = 'https://example.com/data.html'\n\n# Scrape the web page\nresponse = requests.get(url)\nhtml_data = html.fromstring(response.text)\n\n# Create an Excel workbook\nwb = openpyxl.Workbook()\nsheet = wb.active\n\n# Read the data from the web page and store it in the workbook\ndata_table = html_data.xpath('//table')\nfor i, row in enumerate(data_table[0].xpath('./tbody/tr'), 1):\n for j, cell in enumerate(row.xpath('./td'), 1):\n sheet.cell(row=i, column=j, value=cell.text_content().strip())\n\n# Save the workbook\nwb.save(\"data.xlsx\")"} {"instruction": "Given a list of numbers, write a python program that finds an index of an array element and its corresponding value.", "input": "my_list = [2,4,6,8,10]", "output": "def find_index_and_value(my_list):\n for i, num in enumerate(my_list):\n print(\"Element with index %d has value %d\" % (i, num))\n\nmy_list = [2,4,6,8,10]\nfind_index_and_value(my_list)"} {"instruction": "Construct an artificial neural network in Python for solving a classification problem. This network should contain three layers.", "input": "Description of the classification task", "output": "import numpy as np\nimport tensorflow as tf\n\n# Input feature set\nX = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])\n# Output class labels\ny = np.array([[0], [1], [1], [0]])\n\n# Define model layers\nmodel = tf.keras.Sequential([\n tf.keras.layers.Dense(2, input_dim=2, activation='relu'),\n tf.keras.layers.Dense(4, activation='relu'),\n tf.keras.layers.Dense(1, activation='sigmoid')\n])\n\n# Compile model\nmodel.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])\n\n# Fit model\nmodel.fit(X, y, epochs=1000, verbose=0)\n\n# Evaluate model\naccuracy = model.evaluate(X, y)[1]\nprint('Accuracy: %.2f' % (accuracy*100))"} {"instruction": "Write an SQL query to get the sum of the values in a column.", "input": "tableName: myTable columnName: myColumn", "output": "SELECT SUM(myColumn) FROM myTable"} {"text": "[EN Wikipedia] Vega de Liébana\n\nVega de Liébana is a municipality in the province and autonomous community of Cantabria, northern Spain. See also Pico Jano References External links Official website of the municipality Municipalities in Cantabria"} {"instruction": "Design a program in Python that takes a string as an input and checks whether all the vowels are present in the string or not.", "input": "This is a test", "output": "def check_vowels(string):\n vowels = ['a','e','i','o','u']\n for vowel in vowels:\n if vowel not in string:\n return False\n return True\n\nprint(check_vowels('This is a test'))"} {"instruction": "Create a Python script to print the 3rd element in a given list.", "input": "[1,2,3,4,5,6]", "output": "list = [1,2,3,4,5,6] print(list[2]) # Output: 3"} {"instruction": "Write a code that takes in a list of names and creates a dictionary with the names as keys and their lengths as values.", "input": "names = [\"Mary\", \"John\", \"Mike\"]", "output": "def name_length_dict(names): name_length_dict = dict() for name in names: name_length_dict[name] = len(name) return name_length_dict name_length_dict(names)"} {"instruction": "Convert this program from procedural to object-oriented.", "input": "def calculate_mortgage(principle, years, rate): # calculation return monthly_payment def calculate_interest_rate(value): # calculation return interest_rate", "output": "class MortgageCalculator: def __init__(self, principle, years, rate): self.principle = principle self.years = years self.rate = rate def calculate_mortgage(self): # calculation return monthly_payment def calculate_interest_rate(self, value): # calculation return interest_rate"} {"instruction": "Create a Python program that displays a table of results based on user input.", "input": "Inputs for the table are scale (integer) and input values (list of integers)", "output": "scale = int(input('Input scale: '))\nvalues = list(map(int, input('Input values: ').split()))\n\ndef print_table(scale, values):\n for v in values:\n print(f'{v:>{scale}}', end='\\t')\n print()\n for v in values:\n print(f'{v**2:>{scale}}', end='\\t')\n print()\n for v in values:\n print(f'{v**3:>{scale}}', end='\\t')\n print()\n\nprint_table(scale, values)"} {"instruction": "Create a CSS program that formats the text in a paragraph so that it has the following characteristics: font size is 2em, font weight is bold, font color is orange.", "input": "", "output": "p { font-size: 2em; font-weight: bold; color: orange; }"} {"text": "[HI Wikipedia] दीवारकला\n\nदीवारकला या ग्रफ़ीटी (graffiti) दीवारों पर बनी लिखाईयों और चित्रों को कहते हैं। यह एक प्रकार की जनकला है और अक्सर ग़ैर-क़ानूनी होती है। दीवारकला के उदहारण प्राचीन मिस्र के ज़माने से ही मिलते आ रहें हैं। दीवारकला चिह्नों और साधारण लिखाईयों से लेकर विस्तृत तस्वीरों का रूप ले सकती है Iआज के आधुनिक समाज में इसे चित्रित करने के लिए स्प्रे पेंट या मार्कर पेन का प्रयोग किया जाता I गैलरी डबलिन सिटी में दीवारकला इन्हें भी देखें जनकला सन्दर्भ दीवारकला जनकला दृश्य कलाएँ"} {"instruction": "Generate an appropriate Python program to calculate the future value of an investment with the given principal, rate of interest and years.", "input": "Principal: 10000\nRate of interest: 10\nYears: 5", "output": "# Calculate the Future Value of an Investment \ndef future_value(principal, rate, years): \n\n# Calculate the total amount \ntotal_amount = principal * (1+(rate/100))**years\n\n# return the future value\nreturn round(total_amount,2)\n\n# Testing \nprint(future_value(10000,10,5))"} {"instruction": "Implement a function to calculate the sum of digits of a given positive integer.", "input": "", "output": "def sum_digits(n): total = 0 while n: total += n % 10 n //= 10 return total"} {"instruction": "Write a Python program to exchange the values of two different variables.", "input": "x = 10 y = 20", "output": "x, y = y, x"} {"instruction": "Implement Bubble Sort using Python.", "input": "[6, 2, 5, 1, 8]", "output": "def bubble_sort(arr):\n for i in range(len(arr)):\n\t\tfor j in range(len(arr)-1-i):\n\t\t\tif arr[j] > arr[j+1]:\n\t\t\t\ttemp = arr[j]\n\t\t\t\tarr[j] = arr[j+1]\n\t\t\t\tarr[j+1] = temp\n\t\t\t\t\narr = [6, 2, 5, 1, 8]\n\nbubble_sort(arr)\n\nprint(arr)"} {"instruction": "Develop a query in SQL to display all columns from a table named 'products' with a product price greater than 10.", "input": "", "output": "SELECT * FROM products WHERE price > 10;"} {"instruction": "Create a Python program to detect if a given string contains an anagram of a given substring.", "input": "string: \"listen\"\nsubstring: \"silent\"", "output": "def isAnagramSubstring(string, substring):\n if len(substring) > len(string):\n return False\n\n chars = {}\n\n for char in string[:len(substring)]:\n if char in chars:\n chars[char] += 1\n else:\n chars[char] = 1\n\n for char in substring:\n if char not in chars or chars[char] == 0:\n return False\n else:\n chars[char] -= 1\n\n return True\n\nstring = \"listen\"\nsubstring = \"silent\"\n\nif isAnagramSubstring(string, substring):\n print(\"It contains an anagram of the substring\")\nelse:\n print(\"It does not contain an anagram of the substring\")"} {"instruction": "Create an if statement that prints \"Fizz\" if a number is divisible by 3 and \"Buzz\" if a number is divisible by 5.", "input": "", "output": "if (num % 3 == 0 && num % 5 == 0) { console.log(\"FizzBuzz\"); } else if (num % 3 == 0) { console.log(\"Fizz\"); } else if (num % 5 == 0) { console.log(\"Buzz\"); }"} {"text": "[EN Wikipedia] Oreste Crisostomi\n\nOreste Crisostomi (born 21 August 1982), is an Italian filmmaker. He is particularly known as the writer and artistic director of the critically acclaimed documentary Fuori fuoco (Out of focus). Personal life He was born and raised in Terni. Since 2011, he has been carrying out constant cultural activities with the inmates from Terni penitentiary, where he made the documentary Fuori fuoco. Career He made his debut as a director and screenwriter in 2010 with the feature film Alice, previewed at the Flaiano Prizes, starring Catherine Spaak . During the 2011/12 season, he made the play Io as an author and director. The play is inspired by Pierre Rivière's memoir, a case of parricide from the 19th century. In 2013, he was appointed director of the Film Festival Popoli e Religioni. In 2014 and 2015, he worked on the production of Asino, a documentary film by Anatoly Vasiliev. In 2018, his collective documentary project Fuori fuoco, made with the inmates from Terni penitentiary, was premiered at the Perugia International Journalism Festival, screened at the Chamber of Deputies and at the Festival dei Due Mondi. In 2021, he made the documentary Give Me the End You're At, a production of Associazione Museo Nazionale del Cinema, as a screenwriter and director. Filmography References External links Oreste Crisostomi at Cinemaitaliano Living people Italian screenwriters Italian film directors Italian documentary filmmakers 1982 births"} {"text": "[CS Wikipedia] Vladimir Varankin\n\nVladimir Valentinovič Varankin (12. listopadu 1902 Nižnij Novgorod – 3. října 1938) byl ruský historik a esperantista. Je autorem filologického díla Teorio de esperanto; významný je jeho velký původní román Metropoliteno. Život a esperantská činnost Narodil se v roce 1902 v Nižním Novgorodu. Esperanto začal studovat s několika přáteli v posledním ročníku střední školy v roce 1919. Společně založili malý místní kroužek mladých esperantistů, jenž velmi rychle významně rozšířil svou činnost i územní působnost – během dvou let spolek působil v celé gubernii a jeho členové pořádali vlastní kurzy esperanta, vydávali list Ruĝa Esperantisto, organizovali činnost ruské esperantské komunity a dokonce se pokusili založit velkou esperantskou organizaci. Sám Varankin se brzy stal významným představitelem místní esperantské komunity. V roce 1927 přesídlil do Moskvy, zastával vysoké funkce v esperantských organizacích a postupně napsal učebnice Teorio de Esperanto (1929) a Esperanto por laboristoj. V noci z 7. na 8. února 1938 byl Varankin zatčen a posléze obviněn z protisovětské propagandy, špionážní a sabotážní činnosti v rámci smyšlené organizace, z přípravy Stalinovy vraždy a dalších trestných činů. Byl mu zabaven a zničen majetek a v říjnu 1938 byl odsouzen a bez možnosti odvolání nebo amnestie v Moskvě popraven. Stal se tak jednou z obětí stalinského Velkého teroru. Po přezkumu případu Nejvyšším soudem SSSR v roce 1957 byl odsuzující rozsudek zrušen a Varankin byl zcela rehabilitován. Odkazy Reference Externí odkazy Ruští esperantisté Spisovatelé píšící esperantem Oběti Velké čistky Narození 12. listopadu Narození v roce 1902 Narození v Nižním Novgorodě Úmrtí 3. října Úmrtí v roce 1938 Úmrtí v Moskvě Muži"} {"instruction": "Write a code for concatenating two arrays.", "input": "Array1: [1,2,3] Array2: [4,5,6]", "output": "def concat_arrays(arr1, arr2): return arr1 + arr2 print(concat_arrays([1,2,3], [4,5,6])) Output: [1, 2, 3, 4, 5, 6]"} {"text": "[CS Wikipedia] Bachmačská pamětní medaile\n\nBachmačská pamětní medaile je pamětní medaile zřízená 5. března 1948 jako připomínka třicátého výročí bitvy u Bachmače (březen 1918). Vznikl usnesením vlády, které bylo uveřejněno ve Věstníku ministerstva národní obrany č. 19 ze dne 13. března 1948. Medaile je bronzová podle návrhu medailéra Jaroslava Hejduka. Externí odkazy Bachmačská pamětní medaile na vyznamenani.net Bachmačská pamětní medaile na forum.valka.cz Československá státní vyznamenání Medaile Ocenění založená roku 1948"} {"text": "[DE Wikipedia] Jaruco\n\nJaruco ist ein Municipio und eine Stadt in der kubanischen Provinz Mayabeque. Bis 2010 gehörte das Municipio zur aufgelösten Provinz La Habana. Sie wurde 1762 von Spaniern als Ciudad Condal de San Juan Bautista de Jaruco gegründet und hat ca. 20.400 Einwohner (Stand: 2003). Die Stadt liegt landeinwärts auf halber Strecke zwischen der Hauptstadt Havanna und Matanzas im Nordwesten der Provinz. An Sehenswürdigkeiten gibt es den Parque Escaleras de Jaruco, einen landschaftlich interessanten Park. Der Benediktinerorden bekam 2009 Jaruco von der kubanischen Regierung als Sitz für ein Kloster zugewiesen. Das zugewiesene Grundstück erwies sich jedoch als ungeeignet für einen Klosterneubau, so dass die Gemeinschaft weiterhin in Havanna ihren provisorischen Sitz hat (Stand: 2011). Einzelnachweise Municipio in der Provinz Mayabeque Ort in Kuba"} {"text": "[HI Wikipedia] युगाण्डा\n\nयुगांडा गणराज्य पूर्वी अफ्रीका में स्थित एक स्थलरुद्ध देश है। इसकी सीमा पूर्व में केन्या, उत्तर में सूडान, पश्चिम में कांगो लोकतान्त्रिक गणराज्य, दक्षिण पश्चिम में रवांडा और दक्षिण में तंजानिया से मिलती है। देश के दक्षिणी हिस्से में विक्टोरिया झील का एक बड़ा भाग शामिल है, जिससे केन्या और तंजानिया से सीमा निर्धारित होती है। युगांडा नाम बुगांडा राजशाही से लिया गया है, जिसमें देश का दक्षिणी ह्स्सिा, राजधानी कंपाला को शामिल कर, आता था। देश की एक तिहाई जनसंख्या अंतरराष्ट्रीय गरीबी रेखा (2 डालर प्रतिदिन) से नीचे जीवनयापन करती है। परिचय यूगांडा पूर्वी मध्य-अफ्रीका का एक विषुवत्‌रेखीय देश है, जो पूर्णत: स्थलरुद्ध है। इसके उत्तर में सूडान, पशिचम में काँगो (लिओपोल्डविल) पूर्व में केन्या, दक्षिण-पश्चिम में रूआंडा, एवं दक्षिण में टैंगैन्यीका देश तथा विक्टोरिया झील स्थित है। इसका कुल क्षेत्रफल ९३,९८१ वर्ग मील है, जिसका १३,६८९ वर्ग मील भाग जलग्रस्त एवं दलदली है। प्राकृतिक स्वरूप देश का अधिकांश भूभाग पठारी है, जो समुद्रतल से लगभग ४,००० फुट ऊँचा है। पश्चिमी सीमा पर रूबंजोरी पर्वत स्थित है, जिसका उच्चतम शिखर समुद्रतल से १६,७९१ फुट ऊँचा है, जककि पूर्वी सीमा पर स्थित ऐलगन पर्वत की अधिकतम ऊँचाई १४,१७८ फुट है। देश के मध्य में क्योगा एवं दक्षिण में विक्टोरिया झीलें स्थित हैं। जलवायु समुद्रतल से अधिक उँचाई पर स्थित इस देश का ताप अन्य विषुवत्रेखीय प्रदेशों की तुलना में न्यून है। औसत वार्षिक ताप उत्तर में १५° सें० एवं दक्षिण में २२° सें० है। वार्षिक तापांतर साधारण हैं। औसत वार्षिक वर्षा की मात्रा उत्तर में ३५ इंच एवं दक्षिण में ५९ इंच तक है। प्राकृतिक वनस्पति एवं जीवजंतु पश्चिम के उच्च प्रदेश में लंबी घास तथा वनों की प्रचुरता है। उत्तर के शुष्कतर क्षेत्र में छोटी घास ही अधिक मिलती है। देश के दक्षिणी भाग में प्राकृतिक वनस्पति साफ करके भूमि को कृषियोग्य बना लिया गया है, हिसमें केले की उपज मुख्य है। कहीं कहीं हाथी घास उगती है, जिसकी ऊँचाई १० फुट तक हो जाती है। पशुओं में हाथी, दरियाई घोड़ा, भैंसा, बंदर इत्यादि अधिक हैं। कुछ भागों में शेर, जिराफ तथा गैंड़े भी मिलते हैं। कृषि कृषि में कपास, कहवा, गन्ना तंबाकू तथा चाय की उपज महत्वपूर्ण है। अन्य फसलों में केला, मक्का और बाजरा उल्लेखनीय हैं। asasSAS उद्योग खनिज ताँबा उत्खनन तथा कपास एवं कहवा संबंधी उद्योग प्रमुख हैं। अन्य उद्योग धंधों के अंतर्गत वस्त्रनिर्माण, सीमेंट, मदिरा, चीनी, लकड़ी चीरने तथा साबुन निर्माण का काम होता है। सन्दर्भ युगांडा देश स्थलरुद्ध देश"} {"text": "[EN Wikipedia] Tapu River\n\nThe Tapu River (Waipatukahu Stream prior to 1974) is a river of the Coromandel Peninsula in New Zealand's North Island. It flows west from the Coromandel Range, reaching the Firth of Thames at the settlement of Tapu, approximately halfway between Thames and Coromandel. Except for ammoniacal nitrogen, water quality in the river is good, as it mainly drains native forest; only 5.1% of the catchment is farmed. The river runs over andesite and dacite. Fish in the river include long and shortfin eels (tuna), common bully (toitoi), redfin bully, torrentfish (panoko), smelt (pōrohe), īnanga, koura, trout and shrimp. To protect Tapu from flooding, the flow capacity of the river has been maximised. The native frogs, Leiopelma archeyi and Leiopelma hochstetteri, live near the valley. The Tapu-Coroglen Road, opened in 1927, follows the river, passing the Rapaura Watergardens and the square kauri tree. Kauri was logged in the 1880s and 1950s. The SH25 bridge was built about 1937. Gold was mined in the valley from 1868 at several mines and continued until at least the 1930s. See also List of rivers of New Zealand References Thames-Coromandel District Rivers of Waikato Rivers of New Zealand Firth of Thames Hauraki Gulf catchment"} {"instruction": "Design a function to convert Fahrenheit to Celsius in Python.", "input": "", "output": "def fahrenheit_to_celsius(f): celsius = (f - 32) * 5/9 return celsius"} {"instruction": "Generate a Python program for converting temperatures from Celsius to Fahrenheit.", "input": "15 degree Celsius", "output": "# Take input from user\nc = float(input('Enter temperature in Celsius: '))\n\n# Compute temperature in Fahrenheit\nf = (c * 1.8) + 32\n\n# Print the result\nprint('{} degree Celsius is equal to {} degree Fahrenheit.'.format(c, f))"} {"instruction": "Modify the C++ program below to print the average value of an array.", "input": "int array[4] = {2, 3, 5, 7};", "output": "#include int main() { int array[4] = {2, 3, 5, 7}; int sum = 0; for(int i = 0; i < 4; i++) { sum += array[i]; } double avg = (double)sum / 4; std::cout << \"Average value of array : \" << avg; return 0; }"} {"instruction": "Write a query to select the first 3 characters of every row from a column called 'name' from a PostgreSQL table.", "input": "", "output": "SELECT SUBSTRING(name, 1, 3) FROM table_name;"} {"instruction": "Perform PCA on a dataset.", "input": "", "output": "from sklearn.decomposition import PCA def perform_pca(X): pca = PCA(n_components=2) pca.fit(X) X_pca = pca.transform(X) return X_pca"} {"instruction": "Design a text-based game in C++ in which the player can move around the game world.", "input": "", "output": "#include #include std::string room_name; int player_position_x = 0; int player_position_y = 0; void move_player(int x, int y) { player_position_x += x; player_position_y += y; room_name = get_room_name(player_position_x, player_position_y); std::cout << \"Moved to \" << room_name << std::endl; } std::string get_room_name(int x, int y) { std::string name; // implement function to return the name of the room at given coordinates return name; } int main() { while(true) { std::string input; std::cout << \"Where do you want to go?\" << std::endl; std::cin >> input; // implement function to interpret user input and move the player accordingly } return 0; }"} {"text": "[DE Wikipedia] Chwalibożyce\n\nChwalibożyce ( Frauenhain) ist ein Dorf in Niederschlesien. Der Ort liegt in der Gmina Oława im Powiat Oławski in der polnischen Woiwodschaft Niederschlesien. Geographie Geographische Lage Das Angerdorf Chwalibożyce liegt neun Kilometer südlich des Gemeindesitzes und der Kreisstadt Oława (Ohlau) und rund 37 Kilometer südöstlich der Woiwodschaftshauptstadt Breslau. Der Ort liegt in der Nizina Śląska (Schlesische Tiefebene) innerhalb der Równina Grodkowska (Grottkauer Ebene). Nachbarorte Nachbarorte von Chwalibożyce sind im Nordwesten Osiek (Hennersdorf), im Nordosten Maszków (Philippsfeld), im Osten Psary (Hünern) und im Süden Jankowice Małe (Klein Jenkwitz). Geschichte Das Dorf wurde 1294 erstmals als Wowrinhayn erwähnt. Weitere Erwähnungen erfolgte 1378 als Frouwenhain sowie 1391 als Frawnhain. Nach dem Ersten Schlesischen Krieg 1742 fiel Frauenhain zusammen mit dem größten Teil Schlesiens an Preußen. Nach der Neugliederung Preußens gehörte die Landgemeinde Frauenhain ab 1815 zur Provinz Schlesien und war ab 1816 dem Landkreis Ohlau eingegliedert. 1874 wurde der Amtsbezirk Frauenhain gegründet, welcher die Landgemeinden Frauenhain, Hennersdorf und Klein Jenkwitz umfasste. Erster Amtsvorsteher war der Gutsbesitzer Hauptmann Kleinmichel in Frauenhain. 1885 zählte der Ort 502 Einwohner. 1933 zählte Frauenhain 450, 1939 wiederum 446 Einwohner. Bis 1945 befand sich der Ort im Landkreis Ohlau. Als Folge des Zweiten Weltkriegs fiel Frauenhain wie fast ganz Schlesien 1945 an Polen, wurde in Chwalibożyce umbenannt und der Woiwodschaft Breslau angegliedert. Die deutsche Bevölkerung wurde, soweit sie nicht vorher geflohen war, weitgehend vertrieben. Die neu angesiedelten Bewohner waren zum Teil Heimatvertriebene aus Ostpolen. 1999 kam der Ort zum Powiat Oławski in der Woiwodschaft Niederschlesien. Sehenswürdigkeiten Die römisch-katholische Antoniuskirche (poln. Kościół św. Antoniego) wurde 1294 erstmals erwähnt. Der heutige steinerne gotische Bau stammt aus dem 15. Jahrhundert. Im 18. Jahrhundert erfolgte eine Umgestaltung des Innenraums im spätbarocken Stil. Gedenktafel für die ehemaligen Bewohner von Frauenhain Bildstock Steinernes Wegekreuz Vereine Fußballverein Burza Dombud Chwalibożyce Weblinks Einzelnachweise Ort der Woiwodschaft Niederschlesien Gmina Oława Ort in Schlesien Angerdorf Ersterwähnung 1294"} {"instruction": "Write a PowerShell script to print out the current date.", "input": "", "output": "Get-Date | Format-List"} {"instruction": "Using the heapsort algorithm, sort the following array of numbers in ascending order.", "input": "[97,54,67,8,2,22,5,47]", "output": "[2, 5, 8, 22, 47, 54, 67, 97]"} {"instruction": "Create a Python function that takes two arguments: a number and an alphabet, and returns a list of strings composed of the alphabet each with the supplied length.", "input": "alphabet = 'ABCDE'\nlength = 3", "output": "def generate_strings(alphabet, length):\n lst = []\n \n for a in alphabet:\n for b in alphabet:\n for c in alphabet:\n s = a + b + c\n lst.append(s)\n \n return lst\n\nresult = generate_strings(alphabet, length)\nprint(result)"} {"text": "[CS Wikipedia] Lobau\n\nLobau je údolní niva nacházející se na levém břehu Dunaje východně od rakouského hlavního města Vídně. Území o rozloze 23 km² je administrativně rozděleno mezi vídeňský obvod Donaustadt a město Groß-Enzersdorf. Lobau je tvořeno lužním lesem a sítí vodních kanálů. Nejrozšířenějším stromem je dub letní, roste zde také javor babyka, jasan ztepilý, topol černý a vrba bílá. V podrostu se nachází např. stulík žlutý, bublinatka jižní, rákos obecný, áron východní, ostružiník ježiník, svída krvavá, játrovky a mechorosty. Faunu tvoří bobr evropský, želva bahenní, okoun říční, cejn velký, kudlanka nábožná, volavka popelavá, ledňáček říční, rákosník velký nebo moudivláček lužní. Lobau bylo původně říčním ostrovem, po regulaci Dunaje v roce 1875 bylo z východní strany spojeno s pevninou. Neobyvatelné pravidelně zaplavované území v jihozápadním cípu Moravského pole bývalo oblíbeným lovištěm habsburského dvora. V roce 1905 bylo Lobau vyhlášeno chráněným územím a roku 1918 přešlo pod správu města Vídně. V roce zde 1977 vznikla biosférická rezervace pod záštitou UNESCO, která byla v roce 1996 začleněna do národního parku Donau-Auen. Oblast, označovaná jako džungle na okraji velkoměsta, je využívána převážně k rekreaci (cykloturistika, koupání, projížďky na loďkách). Část Lobau slouží také jako výcvikový prostor pro rakouskou armádu, nachází se zde vodárna zásobující Vídeň pitnou vodou. V Lobau se nachází přístav pro cisternové lodě s rafinerií.Za druhé světové války zde byly zahájeny práce na plánovaném dunajskooderském kanálu, jeho zbytky dělí území na horní a dolní Lobau. Při terénních úpravách v sedmdesátých letech 20. století vznikl z části Lobau umělý ostrov Donauinsel. Diskutuje se o záměru firmy ASFiNAG postavit silniční tunel pod Lobau, který je nutný k dokončení obchvatu Vídně, existují však obavy z nevratného poškození unikátních ekosystémů i z nebezpečně vysoké hladiny spodní vody. Náklady na stavbu, která by měla být dokončena nejdříve v roce 2030, se odhadují na 1,9 miliardy eur. V roce 1809 zde proběhla bitva u Aspern a Esslingu. Vyznamenal se v ní Georges Mouton de Lobau, který dostal podle místa svůj šlechtický predikát. Tehdejší události připomíná naučná stezka. Fotogalerie Reference Externí odkazy Wien Geschichte Wiki Geografie Vídně Chráněná území v Rakousku"} {"instruction": "Build a function in Python to output a list of the first n Fibonacci numbers.", "input": "", "output": "def Fibonacci(n): \n \n # Taking 1st two Fibonacci numbers as 0 and 1 \n FibArray = [0, 1] \n \n for i in range(2, n): \n FibArray.append(FibArray[i-2] + FibArray[i-1]) \n \n return FibArray[:n] \n\nprint(Fibonacci(7)) # [0, 1, 1, 2, 3, 5, 8]"} {"text": "[CS Wikipedia] Václav Havel\n\nVáclav Havel (5. října 1936 Praha – 18. prosince 2011 Vlčice-Hrádeček) byl český dramatik, esejista, disident a kritik komunistického režimu, později politik a státník. Byl devátým a posledním prezidentem Československa (1989–1992) a prvním prezidentem České republiky (1993–2003). Václav Havel působil v 60. letech 20. století v Divadle Na zábradlí, kde jej také proslavily hry Zahradní slavnost (1963) a Vyrozumění (1965). V době kolem pražského jara se zapojil do politické diskuse a prosazoval zavedení demokratické společnosti. Po násilném potlačení reforem vojenskou invazí států Varšavské smlouvy byl postižen zákazem publikovat a stal se jedním z prominentních disidentů, kritiků tehdejšího normalizačního režimu. Vystupoval na obranu politických vězňů a stal se spoluzakladatelem a jedním z prvních mluvčích občanské iniciativy za dodržování lidských práv Charta 77. To upevnilo jeho mezinárodní prestiž, ale také mu vyneslo celkem asi pět let věznění. V této době napsal kromě dalších divadelních her také vlivné eseje, například Moc bezmocných (1978). Po vypuknutí sametové revoluce v listopadu 1989 se stal jedním ze spoluzakladatelů protikomunistického hnutí Občanské fórum a jako jeho kandidát byl 29. prosince 1989 zvolen prezidentem Československa. Měl zásadní vliv na směřování země k parlamentní demokracii a zapojení do politických struktur západní civilizace. V roce 1992 se mu však nepodařilo zabránit rozpadu československého státu na dvě samostatné republiky: Českou a Slovenskou. Od roku 1993 byl po dvě funkční období prezidentem České republiky. Jako prezident vyvedl Československo z Varšavské smlouvy (1. července 1991) a výrazně přispěl ke vstupu nástupnické České republiky do Severoatlantické aliance (NATO) v roce 1999. Výrazně prosazoval také přijetí země do Evropské unie, uskutečněné v roce 2004, po jeho odchodu z funkce prezidenta. Jako literát se světově proslavil svými dramaty v duchu absurdního divadla, v nichž se mimo jiné zabýval tématy moci, byrokracie a jazyka, a také svým esejistickým dílem. V esejích a dopisech z vězení se vedle politických analýz zaobíral filozofickými otázkami svobody, moci, morálky či transcendence. Věnoval se také experimentální poezii; básně psané především v 60. letech obsahuje jeho sbírka Antikódy. Život Mládí Václav Havel se narodil v Praze v podnikatelské a intelektuálské rodině Václava M. Havla (1897–1979) a jeho manželky Boženy, rozené Vavrečkové (1913–1970). Měl mladšího bratra Ivana M. Havla (1938–2021). Byl vnukem československého diplomata Huga Vavrečky i stavitele paláce Lucerna Vácslava Havla. Jeho strýcem byl zakladatel AB Barrandov Miloš Havel. Druhou světovou válku rodina přečkala v ústraní na Havlově na Českomoravské vrchovině. Po osvobození Československa v roce 1945 navštěvoval elitní internátní…"} {"instruction": "How do you convert a string to an integer in Python?", "input": "", "output": "In Python, strings can be converted to integers using the int() function. This function takes a string as its argument and returns an integer object. The int() function can also take optional parameters that allow for conversion from one base or radix, or from different types of numbers (e.g. octal, hexadecimal, binary)."} {"instruction": "Create a list in Python of all integers from -5 to 10.", "input": "", "output": "list_nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"} {"instruction": "You need to find all the words in a given sentence sorted by their length.", "input": "I like to read books", "output": "def sortByLength(sentence): words = sentence.split(' ') sortedWords = sorted(words, key=len) return sortedWords"} {"text": "[EN Wikipedia] Pahi River\n\nThe Pahi River is a river of the Northland Region of New Zealand's North Island. It flows generally west from its origins southwest of Maungaturoto, and the last few kilometres of its length form an upper silty arm of the Kaipara Harbour. It forms one of the arms of the Arapaoa River, in the northeastern part of the harbour's system. See also List of rivers of New Zealand References Kaipara District Rivers of the Northland Region Rivers of New Zealand Kaipara Harbour catchment"} {"text": "[EN Wikipedia] Balestrini\n\nBalestrini is an Italian surname. Notable people with the surname include: Alberto Balestrini (born 1931), Argentine fencer Alberto Balestrini (1947–2017), Argentine politician Carlo Balestrini (1868–1922), Italian painter Carlos Balestrini (1880–1972), Argentine sport shooter Giulio Balestrini (1907–?), Italian footballer Nanni Balestrini (1935–2019), Italian poet Italian-language surnames"} {"instruction": "Write a function that takes an array of numbers and returns an array whose elements are the product of all the elements except the element at the current index.", "input": "arr = [2, 3, 4, 5]", "output": "def get_products(arr): left = [1] right = [1] ans = [] # Traverse from left to right for i in range(1, len(arr)): left.append(arr[i-1] * left[i-1]) # Traverse from right to left for i in reversed(range(len(arr)-1)): right.insert(0, arr[i+1] * right[0]) # Compute the product of all elements except itself for i in range(len(arr)): ans.append(left[i] * right[i]) return ans get_products(arr) # returns [20, 15, 12, 10]"} {"instruction": "Unwrap the function parameter with default argument.", "input": "def func(arg1, arg2=\"default\"): pass", "output": "def func(arg1, arg2): if arg2 is None: arg2 = \"default\" pass"} {"instruction": "Given a list of numbers, find the minimum and maximum elements.", "input": "[3, 4, 8, 1, 5, 0, 9]", "output": "min_el = 0 max_el = 9"} {"instruction": "Modify the following code to print all words with more than 5 characters in a given string.", "input": "text = \"This is an example string\"", "output": "text = \"This is an example string\" words = text.split() for word in words: if len(word) > 5: print(word)"} {"instruction": "Write an algorithm in JavaScript to print all the elements inside a given array.", "input": "var names = [\"Harry\", \"Ron\", \"Hermione\"]", "output": "for (var i = 0; i < names.length; i++) { console.log(names[i]); }"} {"instruction": "Develop a program to remove an element from a list at the specified index.", "input": "my_list = [4, 5, 6, 7] index = 2", "output": "def remove_at_index(my_list, index): del my_list[index] return my_list"} {"instruction": "Convert the following SQL query into a python pandas dataframe.", "input": "SELECT * from books WHERE author LIKE '%Rowling%';", "output": "import pandas as pd\n\n# read the books table\ndf = pd.read_sql(\"SELECT * from books\", connection)\n\n# filter for rows with matching author\ndf_filtered = df[df['author'].str.contains(\"Rowling\")]\n\n# print the results\nprint(df_filtered)"} {"instruction": "Write a Java program to read input from the console.", "input": "", "output": "import java.util.Scanner; class UserInput { public static void main(String[] args) { Scanner read = new Scanner(System.in); System.out.print(\"Enter some string: \"); String inputString = read.nextLine(); System.out.println(\"You have entered: \" + inputString); } }"} {"instruction": "Generate a Python program that produces a spiral matrix with the specified number of rows and columns.", "input": "Row count: 9\nColumn count: 6", "output": "def spiral_matrix(num_rows, num_columns):\n matrix = [[0] * num_columns for row in range(num_rows)]\n\n stride = [(1, 0), (0, 1), (-1, 0), (0, -1)]\n direction = 0\n x, y = 0, 0\n val = 1\n while 0 <= x < num_rows and 0 <= y < num_columns:\n matrix[x][y] = val\n x += stride[direction][0]\n y += stride[direction][1]\n if x < 0 or y < 0 or x == num_rows or y == num_columns or matrix[x][y] != 0:\n x -= stride[direction][0]\n y -= stride[direction][1]\n direction += 1\n if direction == len(stride):\n direction = 0\n x += stride[direction][0]\n y += stride[direction][1]\n val += 1\n return matrix"} {"instruction": "Write a function to convert a 3 letter acronym to its full form.", "input": "Acronym: \"GDP\"", "output": "\"\"\" Convert a 3 letter acronym to its full form \"\"\" def acronym_to_full_form(acronym): acronyms = { 'GDP': 'Gross Domestic Product', 'CIA': 'Central Intelligence Agency', 'NASA': 'National Aeronautics and Space Administration' } return acronyms[acronym] if __name__ == '__main__': acronym = \"GDP\" print(acronym_to_full_form(acronym))"} {"instruction": "Construct a regular expression to extract all words from a given string that start with a specific letter.", "input": "input_str = \"The quick brown fox jumped over the lazy dog\"", "output": "var regex = /\\b[qQ]\\w+\\b/g; var result = input_str.match(regex); console.log(result); //['quick']"} {"instruction": "Complete the following HTML template with appropriate tags:", "input": " ", "output": " Title of page

Header title

This 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": "
My Website
", "output": " My Website
"} {"text": "[EN Wikipedia] 1945 Egyptian parliamentary election\n\nParliamentary elections were held in Egypt in January 1945. Boycotted by the Wafd Party, they resulted in a victory for the Saadist Institutional Party, which won 125 of the 264 seats. Results References Egypt Parliamentary elections in Egypt Parliamentary Egypt Election and referendum articles with incomplete results"} {"text": "[CS Wikipedia] Měnová krize\n\nMěnová krize či krize platební bilance je náhlá devalvace měny, jež často končí spekulativním útokem na devizovém trhu. Měnová krize může být zapříčiněna dlouhodobým deficitem platební bilance nebo nedůvěrou trhu ve schopnost vlády krýt svou vlastní měnu. Měnové krize většinou postihují režimy fixního měnového kurzu, spíše než režimy volně pohyblivého kurzu (floating). Měnová krize je typem finanční krize, která je často spojena s reálnou ekonomickou krizí. Měnové krize mohou být zvláště destruktivní pro malé otevřené ekonomiky (nebo velké, avšak nestabilní). Vlády se v takových případech snaží odrazit útoky tím, že uspokojují převis poptávky po dané měně pomocí vlastních měnových rezerv, nebo svých devizových rezerv (většinou USD, EUR nebo GBP). Měnové krize mají velké a nákladné dopady na ekonomiku, avšak schopnost předvídat jejich načasování a rozsah je omezena teoretickým pochopením komplexních interakcí mezi makroekonomickými fundamenty, očekáváním investorů a vládní politikou. Recese připisované měnovým krizím zahrnují následující případy: Hospodářská krize v Mexiku (1994), Asijská finanční krize (1997), Ruská finanční krize (1998), Argentinská krize (1999–2002). Odkazy Reference Související články Finanční krize Peněžní trh Externí odkazy"} {"instruction": "Write an SQL query to join two tables named 'books' and 'authors' on author_id.", "input": "", "output": "SELECT books.book_title, authors.author_name FROM books INNER JOIN authors ON books.author_id = authors.author_id;"} {"text": "[CS Wikipedia] Acta diurna\n\nActa diurna (latinsky denní akta či denní zprávy), často zvané jen Acta, byly denní římské oficiální zprávy, předchůdci dnešních novin. Informace byly tesány do kamene nebo ryty do kovových desek, které následně byly věšeny na veřejných místech jako například na Forum Romanum. První takovéto zprávy se objevily okolo roku 131 př. n. l. v období Římské republiky. Původním obsahem byly soudní rozsudky. Odkazy Reference Externí odkazy Žurnalistika Vzniklo v 2. století př. n. l. Latinská slova a fráze"} {"instruction": "Generate a Python script that prints the numbers from 1 to 10.", "input": "", "output": "# Print numbers 1 to 10\nfor num in range(1, 11):\n print(num)"} {"instruction": "Create a Python code to find all uncommon characters between two strings.", "input": "string1 = 'green', string2 = 'blue'", "output": "def uncommon_chars(string1, string2): uncommon = [] for char in string1: if char not in string2: uncommon.append(char) for char in string2: if char not in string1: uncommon.append(char) return uncommon"} {"instruction": "Create a function 'greet' that takes a string parameter 'name' and returns the string 'Hello name!'", "input": "", "output": "function greet(name) { return 'Hello ' + name + '!'; }"} {"instruction": "In the following code snippet, what will be the output of the print statement ?", "input": "x = 10 y = 5 x = x + y print(x)", "output": "x = 10 y = 5 x = x + y print(x) # Prints 15"} {"text": "[HI Wikipedia] गुप्त-कलाओं से रक्षा\n\nगुप्त-कलाओं से रक्षा (Defense Against the Dark Arts) जे. के. रोलिंग द्वारा अंग्रेज़ी में रचित हैरी पॉटर (उपन्यास) शृंखला में ज़िक्र तन्त्र-मन्त्र और जादू-टोने के विद्यालय हॉग्वार्ट्स में पढ़ाया जाने वाला एक विषय है। इसमें अनैतिक काले जादू, ख़ूँख़ार जीवों और काले जादूगरों से अपनी अत्मरक्षा करना सिखाया जाता है। हैरी के पहले साल में गुप्त-कलाओं के अध्यापक थे- प्र क्वीरिल| दूसरे साल में थे- गिलड्रोय लौक-हार्ट, तीसरे साल में थे- आर जे ल्यूपिन, चौथे साल में थे एलेस्टर 'मैड-आई' मूडी और पांचवें साल में थीं डोलेरस अमब्रिज| इन्हें भी देखें हैरी पॉटर (उपन्यास) हैरी पॉटर en:Hogwarts#Subjects and teachers nn:Galtvort høyere skole for hekseri og trolldom#Skulefag sv:Hogwarts#Ämnen vi:Hogwarts#Môn học"} {"instruction": "Write a Python program to take in a string and reverse the given string using a while loop.", "input": "", "output": "def reverse_string(str):\n str_rev = ''\n i = len(str) - 1\n\n while i >= 0:\n str_rev += str[i]\n i -= 1\n\n return str_rev"} {"instruction": "Design a program to flatten a given list.", "input": "[[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "def flatten_list(lst): res = [] for l in lst: for i in l: res.append(i) return res"} {"instruction": "Sort this array of integers in ascending order using JavaScript.", "input": "const array = [26, 4, 11, 56, 23, 39]", "output": "const array = [26, 4, 11, 56, 23, 39]; let sortedArray = array.sort(function(a,b){ return a-b; }); console.log(sortedArray);"} {"text": "[CS Wikipedia] Tamara Tichonovová\n\nTamara Ivanovna Tichonovová (: Тамара Ивановна Тихонова), provdaná Volkovová (* 13. června 1964, Kovaljovo, Udmurtská ASSR, Sovětský svaz) je bývalá sovětská a ruská běžkyně na lyžích a biatlonistka. Jako reprezentantka Sovětského svazu vybojovala na ZOH 1988 v Calgary dvě zlaté medaile, v závodě na 20 km volně a se štafetou. K tomu ještě přidala stříbro ze závodu na 5 km klasicky. Z Mistrovství světa v klasickém lyžování má dvě zlaté, stříbrnou a dvě bronzové medaile. V celkovém hodnocení Světového poháru v běhu na lyžích skončila nejlépe třetí, v sezóně 1988/89. Biatlonu se věnovala krátce a nedosáhla výraznějších úspěchů. Ve Světovém poháru v biatlonu skončila v individuálních závodech nejlépe na 9. místě, se štafetou pak na 2. místě. Kariéra Ve Světovém poháru v běhu na lyžích debutovala jako devatenáctiletá v sezóné 1983/84, když v Murmansku skočila 24. března 1984 v závodě na 20 km na 20. místě. V této době dominovaly na světové scéně skandinávské lyžařky, z reprezentantek SSSR jim byla schopna konkurovat pouze Raisa Smetaninová. Ale po Tichonovové v následující sezóně debutovaly další mladé talentované sovětské lyžařky, a Sovětský svaz (a později Rusko) začalo hrát v ženském běhu na lyžích zásadní roli. V sezóně 1984/85 se pravidelně účastnila Světového poháru, třikrát skončila v první desítce. V celkovém hodnocení obsadila 15. místo. Největším úspěchem sezóny byla ovšem zlatá medaile z MS 1985 v rakouském Seefeldu, kterou vybojovala jako členka vítězné sovětské štafety. Sezóna 1985/86 nebyla příliš vydařená. Nejlepšími výsledky ve Světovém poháru byly 10. a 11. místo ze severoamerických závodů. V celkovém hodnocení obsadila 23. místo. Sezónu 1986/87 vypustila, zúčastnila se pouze zimní univerziády na Štrbském Plese, kde vybojovala zlato v závodě na 5 km a stříbro se štafetou. Olympijská sezóna 1987/88 ji zastihla ve vynikající formě. Dne 16. prosince 1987 vybojovala v závodě na 10 km volně v jugoslávské Bohinji své první individuální vítězství ve Světovém poháru. Zimní olympijské hry 1988 v Calgary pak byly vrcholem její lyžařské kariéry. Vybojovala zde dvě zlaté medaile, v závodě na 20 km volně a se štafetou, a k tomu ještě přidala stříbro ze závodu na 5 km klasicky. Ve zbylém závodě, běhu na 10 km klasicky, obsadila 5. místo. V celkovém hodnocení Světového poháru (kam se výsledky olympijských závodů započítávaly) skončila na 4. místě. V sezóně 1988/89 navázala na úspěchy z předchozí sezóny. Ve Světovém poháru tehdy poprvé zazářila nová vycházející hvězda běžeckého lyžování, Jelena Vjalbeová, která ve dvaceti letech vybojovala první ze svých pěti Velkých křišťálových glóbů. Tichonovová však skončila v celkovém pořadí na 3. místě, což je její kariérní maximum. V individuálních závodech skončila 3× druhá, z toho 2× právě za Vjalbeovou. Na MS…"} {"instruction": "Create a Python script to calculate the circumference of a circle given its radius.", "input": "radius = 5", "output": "def calc_circumference(radius):\n circumference = 2 * 3.14 * radius\n return circumference\n \ncircumference = calc_circumference(radius)\nprint(circumference)"} {"instruction": "Generate a Java program that creates a class Student with attributes name and age, and a constructor to initialize the attributes.", "input": "", "output": "public class Student { private String name; private int age; public Student(String name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public int getAge() { return age; } }"} {"instruction": "Create an application with a Python backend and a React frontend that allows a user to create a list of tasks.", "input": "Not applicable", "output": "# Python Backend\n# Web server setup\napp = Flask(__name__)\n\n# Database setup\ndb = SQLAlchemy(app)\n\n# Model for tasks\nclass Task(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n title = db.Column(db.String(80), unique=True, nullable=False)\n is_completed = db.Column(db.Boolean, default=False)\n\n def __repr__(self):\n return f''\n\n# API Endpoint\n@app.route('/tasks', methods=['POST'])\ndef create_task():\n request_data = request.get_json()\n title = request_data.get('title')\n if not title:\n return jsonify({'error': 'Title must be provided.'}), 400\n\n task = Task(title=title)\n db.session.add(task)\n db.session.commit()\n\n return jsonify(task.serialize())\n\n# React Frontend\nimport React, { useState, useEffect } from 'react'\nimport axios from 'axios'\n\nexport const TaskList = () => {\n const [tasks, setTasks] = useState([])\n\n useEffect(() => {\n getTasks()\n }, [])\n\n const getTasks = async () => {\n const response = await axios.get('http://localhost:3000/tasks')\n setTasks(response.data)\n }\n\n return (\n
\n {tasks.map(task => (\n
\n \n \n
\n ))}\n
\n )\n}"} {"instruction": "What HTML element is used to create a table?", "input": "", "output": "The HTML element used to create a table is the element."} {"instruction": "Construct an array in JavaScript containing five elements.", "input": "", "output": "my_array = [1,2,3,4,5]"} {"instruction": "Create a program which takes a given list and returns a list with only the unique elements.", "input": "[3, 5, 7, 9, 5, 3, 7]", "output": "my_list = [3, 5, 7, 9, 5, 3, 7] unique_list = list(set(my_list)) print(unique_list) #Output: [3, 5, 7, 9]"} {"instruction": "Implement a function that prints n asterisk characters in a row.", "input": "", "output": "def print_asterisks(n): for i in range(n): print(\"*\", end=\"\") print()"} {"instruction": "Design a class in Python that takes in one input, an integer, and prints out a multiplication table.", "input": "", "output": "class MultiplicationTable: \n def __init__(self, num): \n self.num = num \n \n def printTable(self):\n for i in range(1, 11): \n print(self.num,\"*\",i,\"=\",self.num * i)"} {"instruction": "Write a Python code snippet to display a formatted date and time.", "input": "", "output": "import datetime\n\ndateandtime = datetime.datetime.now()\n# print date and time string\nprint(dateandtime.strftime(\"%d/%m/%Y %H:%M:%S\"))"} {"instruction": "Write a code to find the maximum length of the longest consecutive increasing subsequence in the given array.", "input": "arr = [2, 3, 1, 10, 5, 6, 8, 7]", "output": "def max_length(arr): ans = 1 j = 0 for i in range(len(arr)): if (arr[i+1] - arr[i] > 0): j += 1 ans = max(ans, j+1) else: j = 0 return ans print(max_length(arr))"} {"instruction": "Create an if statement to check if an integer i is between 1 and 10.", "input": "", "output": "if (i >= 1 && i <= 10) { // code to run if the condition is true }"} {"text": "[EN Wikipedia] WIFO\n\nWIFO may refer to: WIFO (Nazi company), a former solid fuel research institute in Nazi Germany WIFO-FM, a radio station or the Austrian Institute of Economic Research"} {"instruction": "Explain the basic syntax for a for loop in JavaScript.", "input": "", "output": "The basic syntax for a for loop in JavaScript is as follows: for (initialization; condition; iteration). The initialization statement is run once at the beginning of the loop, and typically initializes one or more loop variables, which are used to track the progress of the loop. The condition statement is used to check the result of the initialization statement; if the result is true, the loop will execute. The iteration statement is run each time the loop runs; it modifies the loop variable(s) so that the loop can terminate when the specified condition is met. Once the loop has finished executing, program execution continues after the for loop statement."} {"instruction": "Create a Python function which accepts two numbers then return an array with the Fibonacci sequence starting by the two numbers.", "input": "start_1: 1 start_2: 2", "output": "def fib_array(start_1, start_2): arr = [start_1, start_2] while True: next_num = arr[-1] + arr[-2] if next_num > 100: break arr.append(next_num) return arr"} {"instruction": "Create a vector in R to store the elements ‘apple’, ‘mango’, ‘banana’ and ‘orange’.", "input": "", "output": "fruits <- c(\"apple\", \"mango\", \"banana\", \"orange\")"} {"instruction": "Write a Python function that takes a list of floats as an argument and returns the sum of all elements.", "input": "some_list = [1.5, 5.9, 3.7, 5.2]", "output": "def sum_list(some_list): result = 0 for num in some_list: result += num return result print(sum_list(some_list)) # Prints 15.3"} {"text": "[DE Wikipedia] Liddy Holloway\n\nElizabeth Brenda „Liddy“ Holloway (* 27. März 1945 in Wellington; † 29. Dezember 2004 in Auckland) war eine neuseeländische Schauspielerin und Drehbuchautorin. Leben und Karriere Die Tochter des Politikers Phil Holloway war zunächst viele Jahre als Journalistin tätig. Erst nach der Geburt ihres dritten Kindes wandte sie sich der Schauspielerei zu. Sie begann, in Neuseeland am Theater aufzutreten und erhielt dann eine Rolle in der Seifenoper Prisoner, in der sie von 1981 bis 1984 zu sehen war. Zudem schrieb sie einige Drehbücher für die Serie. Von 1992 bis 1998 gehörte sie zur Stammbesetzung der Seifenoper Shortland Street und spielte die wiederkehrende Rolle der Alkmene in der Fantasyserie Hercules. Des Weiteren wirkte sie in einigen internationalen Produktionen wie der Komödie Trouble ohne Paddel mit. 1996 schrieb sie die Drehbücher für verschiedene Folgen von Serien wie Prisoners, Seekers und City Life. Ihre Arbeit an frühen Entwürfen des Drehbuchs zum Film Whale Rider führte im Januar 2004 zu einem Rechtsstreit mit der NZ Film Commission, welche die Rechte von einem verstorbenen Produzenten übernommen hatten und Holloway entgegen früheren Absprachen eine Nennung in den Credits des Films verweigerten. Am 29. Dezember 2004 verstarb sie an Leberkrebs. Sie hinterließ drei erwachsene Kinder, darunter den Schauspieler Joel Tobeck. Filmografie (Auswahl) Schauspieler 1981–1984: Prisoner (Fernsehserie, 13 Episoden) 1982: Squizzy Taylor – Karriere eines Räubers (Squizzy Taylor) 1982: The Clinic 1986: Queen City Rocker 1992–1998: Shortland Street (Fernsehserie) 1995–1998: Hercules (Fernsehserie, 10 Episoden) 2000: Jubilee 2000: In Sachen Mord (Murder Call, Fernsehserie, 1 Episode) 2001: Her Majesty 2002: Mord in Greenwich (Murder in Greenwich, Fernsehfilm) 2003: Lucy (Fernsehfilm) 2003: Sylvia 2004: Fracture 2004: Trouble ohne Paddel (Without a Paddle) Drehbuchautor 1983: Prisoner (Fernsehserie, 2 Episoden) 1986: Seekers (Fernsehserie, 2 Episoden) 1991: Shark in the Park (Fernsehserie, 2 Episoden) 1995–1996: Wendy (Riding High) (Fernsehserie, 3 Episoden) 1996: City Life (Fernsehserie) Weblinks Einzelnachweise Filmschauspieler Theaterschauspieler Drehbuchautor Person (Wellington) Neuseeländer Geboren 1945 Gestorben 2004 Frau"} {"instruction": "Create a class in Python that represents a vector in a 3-dimensional space.", "input": "", "output": "class Vec3:\n def __init__(self, x, y, z):\n self.x = x\n self.y = y\n self.z = z\n\n def __str__(self):\n return \"({}, {}, {})\".format(self.x, self.y, self.z)"} {"instruction": "Change the following code so that it can reverse a list without modifying the original list", "input": "[1, 2, 3]", "output": "def reverse(lst): return lst[::-1] lst = [1, 2, 3] print(reverse(lst))"} {"instruction": "Using an AI platform, create a sentiment analysis model to predict a sentiment of a given sentence.", "input": "", "output": "model = AIplatform.SentimentAnalysis() model.fit(X, y) prediction = model.predict(sentence)"} {"instruction": "Compute the big-O time complexity for this algorithm.", "input": "def factorial(n): if n == 0: return 1 else: return n*factorial(n-1)", "output": "The time complexity for this algorithm is O(n)."} {"text": "[EN Wikipedia] Alkali metal\n\nThe alkali metals consist of the chemical elements lithium (Li), sodium (Na), potassium (K), rubidium (Rb), caesium (Cs), and francium (Fr). Together with hydrogen they constitute group 1, which lies in the s-block of the periodic table. All alkali metals have their outermost electron in an s-orbital: this shared electron configuration results in their having very similar characteristic properties. Indeed, the alkali metals provide the best example of group trends in properties in the periodic table, with elements exhibiting well-characterised homologous behaviour. This family of elements is also known as the lithium family after its leading element. The alkali metals are all shiny, soft, highly reactive metals at standard temperature and pressure and readily lose their outermost electron to form cations with charge +1. They can all be cut easily with a knife due to their softness, exposing a shiny surface that tarnishes rapidly in air due to oxidation by atmospheric moisture and oxygen (and in the case of lithium, nitrogen). Because of their high reactivity, they must be stored under oil to prevent reaction with air, and are found naturally only in salts and never as the free elements. Caesium, the fifth alkali metal, is the most reactive of all the metals. All the alkali metals react with water, with the heavier alkali metals reacting more vigorously than the lighter ones. All of the discovered alkali metals occur in nature as their compounds: in order of abundance, sodium is the most abundant, followed by potassium, lithium, rubidium, caesium, and finally francium, which is very rare due to its extremely high radioactivity; francium occurs only in minute traces in nature as an intermediate step in some obscure side branches of the natural decay chains. Experiments have been conducted to attempt the synthesis of element 119, which is likely to be the next member of the group; none were successful. However, ununennium may not be an alkali metal due to relativistic effects, which are predicted to have a large influence on the chemical properties of superheavy elements; even if it does turn out to be an alkali metal, it is predicted to have some differences in physical and chemical properties from its lighter homologues. Most alkali metals have many different applications. One of the best-known applications of the pure elements is the use of rubidium and caesium in atomic clocks, of which caesium atomic clocks form the basis of the second. A common application of the compounds of sodium is the sodium-vapour lamp, which emits light very efficiently. Table salt, or sodium chloride, has been used since antiquity. Lithium finds use as a psychiatric medication and as an anode in lithium batteries. Sodium, potassium and lithium are essential elements,…"} {"instruction": "Specify a quick sort algorithm in Python to sort the given array of numbers.", "input": "[9, 6, 5, 3, 4, 7, 4, 1]", "output": "def quick_sort(arr):\n if len(arr) <= 1:\n return arr\n pivot = arr[len(arr) // 2]\n left = [x for x in arr if x < pivot]\n mid = [x for x in arr if x == pivot]\n right = [x for x in arr if x > pivot]\n return quick_sort(left) + mid + quick_sort(right)\n\nprint(quick_sort([9, 6, 5, 3, 4, 7, 4, 1]))"} {"instruction": "Generate a Python program to print all odd numbers from an array of integers.", "input": "[3, 5, 7, 10, 15]", "output": "def printOddNumbers(array):\n for number in array:\n if number % 2 != 0:\n print(number)\n\narray = [3, 5, 7, 10, 15]\nprintOddNumbers(array)"} {"instruction": "Create a program in Python that takes an input string and an integer n, and generates all permutations of the string with length n.", "input": "\"ABCD\", 2", "output": "def permutateString(inputStr, n):\n if n == 0:\n return []\n elif len(inputStr) == 1:\n return [inputStr]\n else:\n result = []\n for i in range(len(inputStr)):\n firstChar = inputStr[i]\n remainingChars = inputStr[:i] + inputStr[i+1:]\n for permutation in permutateString(remainingChars, n-1):\n result.append([firstChar] + permutation)\n return result\n\ninputStr = \"ABCD\"\nn = 2\npermutations = permutateString(inputStr, n)\n\nfor permutation in permutations:\n print(''.join(permutation))"} {"text": "[EN Wikipedia] Guns for Sale\n\nGuns for Sale is a 1998 documentary film about the effect of guns on manhood, raiding, and livelihood in Karamajong, northern Uganda. Synopsis This film starts off with a brief introduction of the Karamajong people in Northern Uganda, Africa. They are one of the most feared tribes in all of Africa and are well known for their cattle herding and raiding. Traditions remain, but guns entered the fold and have become intertwined not only in Karamajong culture, but also the culture of neighboring tribes as well. The arms trade is responsible for this rise in guns from traditional sticks, spears, and bow & arrows; which has led to overwhelming brutality and violence all throughout Africa. The film introduces Lokwarionga, a skilled warrior, commander, guardian, and feared raider who is part of the Karamajong ethnic people and has his fair share of violence. He has ten confirmed kills and holds much renown among his people. However, an aged Lokwarionga is introduced not a youthful one and his many wives and children have brought out a peaceful nature to him. He has seen the blood that spills with combat and has transitioned to a peaceful protector role. Violence plagues Uganda and the Ugandan government developed an initiative to recruit Karamajong warriors, including Lokwarionga, as vigilantes to bring peace to surrounding areas. These peace keepers essentially settle disputes and report back to the government. An important conflict that opens this story up is a cattle raid on the Karamajong by a neighboring enemy, which causes Lokwarionga and other warriors to investigate and than contact the government. He meets with a Ugandan government official, but the official really just receives the report and tells them there is nothing that can really be done at that point. Simultaneously, Longora, younger brother of Lokwarionga, is presented in the film. Longora is not a warrior yet and does not own a firearm at this point. He is still learning the ropes and even raiding is fairly new to him. Juxtaposed to Lokwarionga, who is transitioning from that lifestyle, Longora is actively pursuing it. So, as a response to the cattle raid the Karamajong along with Lokwarionga plan to do a counter raid. First, they commence a raiding ceremony that has incorporated modern elements. The ceremony begins with the sacrifice of a cow. The cow is cut open and warriors must eat bits of the raw meat. Next, the warriors and their guns are smeared with the insides of the cow's intestines. Finally, the raid comes to fruition and is ultimately successful. Longora, who was part of the raiding party, at this point shows his first real demonstration of manhood. Lokwarionga contradicts his new lifestyle when he presents his younger brother with a weapon. Although it seems necessary to have…"} {"text": "[EN Wikipedia] Dudua charadraea\n\nDudua charadraea is a moth of the family Tortricidae first described by Edward Meyrick in 1909. It is found in Thailand, Sri Lanka, Taiwan, western Java and western Sumatra. References Moths described in 1909 Olethreutini Moths of Japan"} {"instruction": "Create an object in JavaScript to store a student's information.", "input": "name = \"John Doe\" age = 18", "output": "let studentObj = { name: \"John Doe\", age: 18 }"} {"instruction": "Write a Python program to identify the count of the largest contiguous subarray of numbers in a given array.", "input": "arr=[-2, -3, 4, -1, -2, 1, 5, -3]", "output": "def max_contiguous_subarray(arr):\n max_end = 0\n max_so_far = 0\n\n for i in range(len(arr)):\n max_end = max(max_end + arr[i], 0)\n max_so_far = max(max_end, max_so_far)\n\n if max_so_far > 0:\n return len(arr) - max_so_far\n else:\n return 0"} {"instruction": "Suggest a cleaner and more concise way to implement the following code snippet.", "input": "def find_matching_number(nums, target): for num in nums: if num == target: return True return False", "output": "def find_matching_number(nums, target): return target in nums"} {"instruction": "Create a program in Python that can analyze over a million articles to find the most commonly used words.", "input": "A folder containing one million articles in text files.", "output": "import os\nfrom collections import Counter\nfrom nltk import word_tokenize\n\n# Specify the directory containing the files\ndirectory = 'articles_folder'\n\n# Initialize a Counter object\nword_counts = Counter()\n\n# Iterate through all the files in the directory\nfor filename in os.listdir(directory):\n if filename.endswith('.txt'):\n with open(os.path.join(directory, filename)) as f:\n for line in f:\n tokens = word_tokenize(line)\n word_counts.update(tokens)\n\n# Print the most common words\nfor word, count in word_counts.most_common(20):\n print(f'{word}: {count}')"} {"instruction": "Write a Python program that prints out all possible words from a collection of letters.", "input": "letters = [\"a\", \"b\", \"t\"]", "output": "import itertools\n\nletters = [\"a\", \"b\", \"t\"]\nwords = []\n\n# we use itertool's permutations to generate all combinations of letters\nResult = itertools.permutations(letters, 3)\n\n# we iterate through the output of itertool's permutation\n# and append it to result list of words\nfor ele in list(Result):\n words.append(''.join(ele))\n\n# printing the result\nprint(words)"} {"instruction": "Construct a Python program that can extract the name of an author from a given book title.", "input": "title = 'Harry Potter and the Sorcerer's Stone'", "output": "def extract_author(title):\n title_words = title.split()\n for word in title_words[::-1]:\n if word[0].isupper():\n return word\n\nprint(extract_author(title)) # Potter"} {"text": "[HI Wikipedia] हरमुख\n\nहरमुख भारत के जम्मू व कश्मीर राज्य के गान्दरबल ज़िले में सिन्द नदी (सिन्धु नदी से भिन्न) और किशनगंगा नदी के बीच स्थित एक ५,१४२ मीटर (१६,८७० फ़ुट) ऊँचा पहाड़ है। यह गंगाबल झील से उभरता हुआ प्रकट होता है और हिन्दुओं द्वारा पवित्र माना जाता है। इसे चढ़ने का सबसे आसान मार्ग बांडीपूर ज़िले के आरीन क्षेत्र से जाता है। पवित्रता हरमुख का मतलब 'शिव का मुख' है और यह पर्वत स्थानीय हिन्दुओं द्वारा शिवजी का ठिकाना माना जाता है। इसे कभी-कभी 'कश्मीरी कैलाश' भी कहा जाता था। कश्मीरी भाषा की 'हरमुखुक गोसोनी' नामक धार्मिक कथा के अनुसार: एक बार किसी संन्यासी ने हरमुख के शिखर पर पहुँचकर शिवजी के चहरे के दर्शन करने की कोशिश करी। बारह लम्बे बरसों तक वह ऊपर पहुँचने का प्रयत्न करता रहा लेकिन नाकामयाब रहा। एक दिन उसने एक गुज्जर चरवाहे को शिखर से उतरते देखा। जब गुज्जर उसके पास पहुँचा तो संन्यासी ने गुज्जर से पूछा कि उसे ऊपर क्या दिखा। गुज्जर ने बताया कि वह अपनी खोई हुई बकरी ढूंढ रहा था और शिखर पर उसने एक दम्पति मिया-बीवी को एक गाय को मनुष्य के कोपले (शिर) में दूध दोहते हुए देखा। दम्पति ने उसे कुछ दूध पीने को दिया लेकिन गुज्जर ने पीने से इन्कार कर दिया। जब उसने दम्पति से विदा ली तो उन्होने उसके माथे पर थोड़ा दूध मल दिया। संन्यासी ने यह सुना तो उसने ख़ुशी से आगे बढ़कर गुज्जर के माथे से कुछ दूध चाट लिया। चाटते ही संन्यासी को मुक्ति मिल गई और वह चकित गुज्जर की नज़रों से सामने से ग़ायब हो गया। संस्कृति में हरमुख का उल्लेख कई कश्मीरी रचनाओं में मिलता है। इसका एक उदहारण प्रसिद्ध कश्मीरी प्रेम व भक्ति गीत \"हरमुख बरतल\" है: इन्हें भी देखें गान्दरबल ज़िला कृशनसर किशनगंगा नदी सिन्द नदी बाहरी जोड़ हरमुख बरतल, गीत का एक यूट्यूब विडियो सन्दर्भ हिन्दू तीर्थ स्थल धार्मिक पर्वत स्थल भारत के पर्वत गान्दरबल ज़िला जम्मू और कश्मीर के पर्वत हिमालय के पाँच हज़ारी"} {"text": "[CS Wikipedia] Ludvík Lazar Zamenhof\n\nLudvík Lazar Zamenhof (pol. ) (15. prosince 1859 Bělostok – 14. dubna 1917 Varšava) byl oční lékař, filolog a tvůrce esperanta, umělého jazyka určeného pro mezinárodní komunikaci. Dětství a kulturní pozadí Narodil se 15. prosince 1859 v polském městě Bělostoku (tehdy součást Ruského impéria). Jeho původní křestní jméno bylo Eliezer (v jidiš Lejzer, v ruštině Lazar). Byl nejstarším synem 22letého učitele jazyků Mordechaje (Marka) Zamenhofa a jeho o tři roky mladší manželky Liby Rochly (Rozálie), kterým se postupně narodilo dalších 10 dětí (z nichž 2 záhy zemřely). Za svůj rodný jazyk považoval ruštinu, kterou mluvil jeho otec (případně běloruštinu, která tehdy nebyla považována za odlišnou od ruštiny a která možná měla silný vliv na fonologii esperanta). Odmalička mluvil ale také jidiš, který se naučil od matky. Jak vyrůstal, mluvil častěji polsky a v tomto jazyce později vychovával své děti. Jeho otec byl učitelem němčiny a Zamenhof hovořil plynně také německy, ačkoliv ne tak přirozeně jako jidiš. Později se naučil také francouzsky, latinsky, řecky, hebrejsky a anglicky a zajímal se o italštinu, španělštinu a litevštinu. V Bělostoku žily kromě jidiš hovořící židovské většiny ještě další tři jazykové skupiny: Poláci, Němci a Bělorusové. Trápilo jej, když musel pozorovat jejich časté vzájemné neshody. Došel k názoru, že hlavní příčinou nedůvěry a nepřátelství mezi národy jsou jazykové bariéry. Domníval se, že tento problém je možné odstranit zavedením nového společného jazyka, který by hrál úlohu neutrálního komunikačního prostředku mezi lidmi z různého etnického a jazykového prostředí. Práce na mezinárodním jazyce O vytvoření umělého jazyka se poprvé pokusil již na gymnáziu, kdy vytvořil první koncepci tohoto jazyka, který nazval \"Lingwe Uniwersala\" (1878). Mezi svými přáteli získal příznivce svého projektu, ale dospělí reagovali na jeho dílo vesměs s posměšky, či ho považovali přímo za blázna. Otec si na něm vynutil slib, že dokud neukončí svá studia, nebude se svému projektu věnovat. Ačkoliv Ludvík měl primární zájem o jazyky, poslechl otcovo přání zajistit si existenci a odjel do Moskvy na fakultu medicíny, neboť to byl jediný obor, který Židé tehdy v carské říši směli studovat. Snažil se pilně vzdělávat a přivydělávat si na živobytí, přesto zde často trpěl zimou i hladem. V březnu 1881 byl při atentátu zabit car Alexandr II. a politická situace a nacionalistické nálady se značně přiostřily. Když se záhy poté Ludvík vrátil na prázdniny domů, zjistil, že navzdory dohodě mezitím otec projekt jeho jazyka spálil. Patrně se obával, že materiál by mohl být považován za součást židovského proticarského spiknutí. Ani tato těžká ztráta však Ludvíka od jeho snu neodradila. Během následného studia medicíny ve Varšavě tajně po paměti svůj jazyk znovu…"} {"instruction": "Translate the following pseudocode into Python code.", "input": "i = 0\nwhile i < 10\n print i\n i = i + 1", "output": "i = 0\nwhile i < 10:\n print(i)\n i += 1"} {"instruction": "Refactor the following condition to use the ternary operator instead of an if-else statement.", "input": "if (x < 0) { y = -1; } else { y = 1; }", "output": "y = x < 0 ? -1 : 1;"} {"instruction": "Optimize the following python code for a more efficient solution.", "input": "def to_square(nums):\n squares = []\n for num in nums:\n squares.append(num * num)\n return squares", "output": "def to_square(nums):\n squares = [num * num for num in nums]\n return squares"} {"text": "[CS Wikipedia] Bitva u Tarutina\n\nBitva u Tarutina byla bitvou napoleonských válek. Bitva skončila vítězstvím ruské armády nad francouzskými vojsky. Nástin událostí 24. června 1812 vpadla Napoleonova půlmilionová armáda do Ruska. Ruská armáda nemohla francouzský postup zastavit a musela ustupovat. Po nerozhodné bitvě u Borodina (7. září) Francouzi dokonce obsadili Moskvu. Ruská armáda se stáhla do Tarutina a začala zde sbírat síly, zatímco Napoleon zůstal v Moskvě a snažil se o uzavření míru s Ruskem. Brzy však Napoleon pochopil nutnost ústupu z Moskvy. Za trasu ústupu si zvolil jít na Kalugu a pak na Smolensk. Směrem k Rusům vyslal předvoj neapolského krále Joachima Murata. Murat rozmístil svých 25 000 mužů v prostoru mezi vesnicí Tětěrinka a říčkou Černyšná. Murat se však dopustil těžké chyby. V nedalekém lese zapomněl rozestavět hlídky. To neuniklo ruskému průzkumu a vrchní ubytovatel ruské armády Karel Toll vypracoval plán útoku. S tím však nesouhlasil ruský vrchní velitel, maršál Kutuzov. Tím se dostal do střetu s jinými veliteli, kteří s plánem souhlasili. Hlavu této opozice tvořil generál Bennigsen. Kutuzov nakonec plán přijal, ale jeho provedení nechal na Bennigsenovi. Tato akce nezačala dobře, jelikož někteří velitelé, kteří se měli účastnit, dostali pokyny pozdě a jiní je nechápali. Tak se stalo, že postup nezačal 16. října, ale večer 17. října. Pochod k Muratovi byl zmatený a pomalý. V určených pět hodin 18. října stála na svém místě jen kolona generálporučíka Baggovouta. Teprve v sedm hodin byli Rusové připraveni. Ruský útok začal v sedm hodin a zastihl Francouze nepřipravené. Sám Murat skočil do sedla svého koně polooblečený. Francouzi nakonec ustoupili. Bitva morálně posílila ruskou armádu a urychlila Napoleonův ústup z Moskvy. Odkazy Literatura Jiří Kovařík: Externí odkazy Bitvy Francie Neapolské království Bitvy roku 1812 Bitvy Ruského impéria Bitva u Tarutina Bitvy Napoleonova ruského tažení Bitvy svedené v Rusku Bitva u Tarutina"} {"instruction": "Write an R statement to calculate the probability of getting a number greater than 5 from a range of 1 to 10.", "input": "", "output": "# Calculate the probability probability = mean(x > 5) print(f\"Probability of getting a number greater than 5 from a range of 1 to 10 is {probability}.\")"} {"text": "[CS Wikipedia] Klimczok\n\nKlimczok dříve také Klimczak (1117 m n. m.) je horský vrchol, který se nachází v jihovýchodní části Pásma Baraniej Góry (Beraní hory) v Slezských Beskydech. Přes vrchol prochází administrativní hranice Bílsko-Bělé a také procházela historická hranice mezi Slezskem a Malopolskem. Vrchol Klimczok je nejvyšším bodem Bílsko-Bělé. Popis Nachází se na hřebeni, který se táhne od jihozápadu z Trzech Kopców. Klimczok představuje svorník z něhož vybíhá na sever hřbet, který pozvolna klesá k vrcholu Szyndzielnia (1028 m n. m.) a druhý východní hřbet směřuje k vrcholu Magura (1109 m n. m.). Klimczok má zaoblený tvar vrcholu. Hřebeny, které z něho vybíhají jsou dosti široké, ale jejich svahy klesající do údolí Bělé (na severovýchodě), Biłe (na jihu) a Barbary (na západě) jsou strmé a porostlé bukovo-smrkovými lesy. Na severovýchodních svazích se nacházejí prameny zdrojnice řeky Bělá. Na vrcholu hory se nachází ocelový stožár s telekomunikačními anténami. Na vrcholu stála do sedmdesátých let dřevěná triangulační věž, ze které byl výhled na část Západních Karpat od Lysé Hory na západě až po Tatry na jihovýchodě. V současné době kvůli zalesnění je možný výhled průsekem v jihovýchodním směru na hřbety Beskidu Żywieckého a za nimi se tyčí vrcholy Tater. Na Klimczoku se vyskytuje oměj tuhý moravský, jedna ze vzácných druhů rostlin rostoucích v Polsku. Podnebí Na Klimczoku je střední roční teplota 5–6 °C. Sněhová pokrývka dosahuje cca 220 cm a drží se kolem 125 dní v roce od začátku listopadu až do začátku dubna. Největší vrstva sněhu byla naměřena 14. března 1993, kdy dosáhla 305 cm. Roční dešťové srážky činí do 1300 mm. Slunečných dnů je 79 v roce. Název Ještě na začátku 19. století byla hora nazývána Goryczną Skałką nebo prostě Skałką. Na západních svazích, těsně pod vrcholem, se táhne systém skalních příkopů a štěrbin, ve kterých se nachází několik malých jeskyní. Největší z nich, která má délku 26 m, měla být podle místní tradice úkrytem známého Żywiecko–slezského zbojníka Klimczoka. V období romantismu pak podle jeho jména dostala hora název Klimczok. Turistika V sedle mezi Klimczokem a Magurou (Siodło pod Klimczokiem) se nachází významná křižovatka pěších turistických tras do Szczyrku, Bystre, Brenné, do sedla Salmopolska, sedla Karkoszczonka, k vrcholům Szyndzielné a Błatné. Na úbočí Magury se nachází turistická chata PTTK Schronisko PTTK na Klimczoku (dříve Klementynówką), která byla postavena na začátku 19. století. V chatě má sídlo horská služba (GOPR). Na vrchol Klimczok lze vystoupit: ze sedla Siodło pod Klimczokiem po černé turistické značce od turistické chaty Schronisko PTTK na Szyndzielni po žluté turistické značce od turistické chaty Schronisko PTTK na Błątnie po žluté turistické značce Ze sedla Siodło pod Klimczokiem v průseku k vrcholu (východní…"} {"instruction": "Create a dictionary in Python and store the names of four countries and the cities within them.", "input": "", "output": "# Create a Dictionary dict = { \"India\" : [\"Delhi\", \"Mumbai\", \"Chennai\"], \"USA\" : [\"New York\", \"Washington\", \"Los Angeles\"], \"Canada\" : [\"Toronto\", \"Vancouver\", \"Ottawa\"], \"France\" : [\"Paris\", \"Marseille\", \"Lyon\"] } # Print the Dictionary print(dict)"} {"instruction": "Formulate a SQL query that fetches the records with the latest date", "input": "Table name: my_table Columns: id, date", "output": "SELECT * FROM my_table ORDER BY date DESC LIMIT 1;"} {"instruction": "Create a JavaScript function which takes two arguments and returns the larger number.", "input": "", "output": "function findMax(num1, num2) { if (num1 > num2) { return num1; } else { return num2; } }"} {"instruction": "Update the given code to generate the correct output", "input": "def func(x, n): s = 0 for i in range (n): s += (x**i) return s Output: The sum of series x^1 + x^2 + x^3 + ... + x^n is", "output": "def func(x, n): s = 0 for i in range (n): s += (x**i) return s def generateSumString(x, n): result = \"The sum of series \" for i in range(1, n+1): result += x + \"^\" + str(i) if(i != n): result += \" + \" else: result += \" is\" return result def main(): x = 4 n = 5 print(generateSumString(x, n), func(x,n)) main()"} {"instruction": "Develop a web scraping Python program to scrape the product details of a sample store.", "input": "The website is located at https://example.com", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# Get the HTML from the webpage\npage = requests.get('https://example.com')\nsoup = BeautifulSoup(page.text, 'html.parser')\n\n# Isolate the product information\nproduct_list = soup.find_all('div', class_='product')\n\n# Extract the product information\nproducts = []\nfor product in product_list:\n name = product.find('div', class_='name').text.strip()\n price = product.find('div', class_='price').text.strip()\n description = product.find('div', class_='description').text.strip()\n products.append({\n 'name': name,\n 'price': price,\n 'description': description\n })\n\n# Print the product list\nprint(products)"} {"instruction": "Create a PHP script to encode a given string in base-64.", "input": "", "output": ""} {"instruction": "Generate a list of combinations of three numbers from a given array in Python.", "input": "[1, 2, 3, 4, 5]", "output": "combinations = []\nfor i in range(len(arr)):\n for j in range(i+1, len(arr)):\n for k in range(j+1, len(arr)):\n combinations.append([arr[i], arr[j], arr[k]])"} {"instruction": "Improve the performance of the below algorithm written in Python.", "input": "", "output": "def algorithm(arr):\n result = []\n for i in range(len(arr)):\n for j in range(i + 1, len(arr)):\n if arr[i] + arr[j] == 0:\n result.append((arr[i], arr[j]))\n return result\n\ndef optimizedAlgorithm(arr):\n result = []\n seen = set()\n for num in arr:\n if -num in seen:\n result.append((num, -num))\n seen.add(num)\n return result"} {"text": "[CS Wikipedia] Pala\n\nPala může být: příjmení osob Pala (příjmení) sídla v Estonsku Pala (obec) – samosprávná obec v kraji Jõgevamaa Pala (Pala) – vesnice náležející ke stejnojmenné obci Pala (Kõue) – vesnice náležející k obci Kõue v kraji Harjumaa Pala (Kuusalu) – vesnice náležející k obci Kuusalu v kraji Harjumaa Pala (Türi) – vesnice náležející k obci Türi v kraji Järvamaa sídla v Portugalsku Pala (okres Baião) – vesnice v okrese Baião Pala (okres Pinhel) – vesnice v okrese Pinhel Pala (okres Mortágua) – vesnice v okrese Mortágua jiná zeměpisná označení Pala (Čad) – město v Čadu Pala (Dolomity) – pohoří v Dolomitech v severní Itálii Pala (chráněné území) – chráněné území na ostrově Aunu'u na Americké Samoi Pala (jezero) – jezero v indickém státě Mizóram Pala (řeka) – řeka v Rusku, přítok Vygu Pala (Minija) – řeka v Litvě, přítok řeky Minija Pala (Spojené státy americké) – město v americkém státě Kalifornie Pala nebo Palu (Turecko) – město a oblast v Turecku Pala (Východní Timor) – město na východotimorském ostrově Autauro Pala nebo Palai – město v Indii La Pala – osada v Argentině ostatní Pala (dynastie) – indická dynastie v 8. až 12. století Pala (jednotka času) – indická časová jednotka odpovídající 24 sekundám Pala (kmen) – kalifornský kmen Pala (planetka) – planetka 1921 v hlavním pásu planetek Pala (zbraň) – turecká šavle používaná v 18. století Palla, někdy též pala – liturgická přikrývka kalicha Související články Pála Rozcestníky - místopisné jméno"} {"instruction": "Think of a situation where you would use recursion.", "input": "", "output": "Recursion can be used when performing a task that can be broken down into smaller, simpler parts. For example, performing a Depth-First Search on a Graph. It can also be used when implementing algorithms to solve complex problems such as finding the largest number in a list or creating a binary search tree."} {"instruction": "Create a Python script to solve an equations.", "input": "2x + 3 = 5", "output": "def solve(eq):\n lhs_x = eq.split(\"=\")[0]\n rhs = float(eq.split(\"=\")[1])\n x = float(lhs_x.split(\"+\")[0].split(\"x\")[0])\n constant = float(lhs_x.split(\"+\")[1])\n return (rhs - constant) / x\n\nif __name__ == \"__main__\":\n eq = \"2x + 3 = 5\"\n print(solve(eq))"} {"instruction": "Write a Python function that prints the first n even numbers.", "input": "", "output": "def print_even_numbers(n): for i in range(2, n*2, 2): print(i)"} {"text": "[HI Wikipedia] आमिर ख़ान\n\nआमिर ख़ान (नस्तालीक़: عامر خان) (जन्म आमिर हुसैन ख़ान ; मार्च 14, 1965) एक भारतीय फ़िल्म अभिनेता, निर्माता, निर्देशक, पटकथा लिखनेवाले, कभी कभी गायक और आमिर ख़ान प्रोडक्सनस के संस्थापक-मालिक है। अपने चाचा नासिर हुसैन की फ़िल्म यादों की बारात (1973) में एक बाल कलाकार की भूमिका में नज़र आए थे और ग्यारह साल बाद ख़ान का करियर फ़िल्म होली (1984) से आरम्भ हुआ उन्हें अपने चचेरे भाई मंसूर ख़ान के साथ फ़िल्म क़यामत से क़यामत तक (1988) के लिए अपनी पहली व्यवसायिक सफलता मिली और उन्होंने फ़िल्म में एक्टिंग के लिए फिल्मफेयर सर्वश्रेष्ठ मेल नवोदित पुरस्कार (सर्वश्रेष्ठ नवोदित पुरूष कलाकार के लिए फ़िल्मफेयर पुरस्कार) जीता। पिछले आठ नामांकन के बाद 1980 और 1990 के दौरान, ख़ान को राजा हिन्दुस्तानी (1996), के लिए पहला फ़िल्मफ़ेयर सर्वश्रेष्ठ अभिनेता पुरस्कार मिला जो अब तक की उनकी एक बड़ी व्यवसायिक सफलता थी। उन्हें बाद में फिल्मफेयर कार्यक्रम में दूसरा सर्वश्रेष्ठ अभिनेता पुरस्कार और लगान में उनके अभिनय के लिए 2001 में कई अन्य पुरस्कार मिले और अकादमी पुरस्कार के लिए नामांकित किया गया। अभिनय से चार साल का सन्यास लेने के बाद, केतन मेहता की फ़िल्म द रायजिंग (2005) से ख़ान ने वापसी की। २००७ में, वे निर्देशक के रूप में फ़िल्म तारे ज़मीन पर का निर्देशन किया, जिसके लिए उन्हें फिल्मफेयर सर्वश्रेष्ठ निर्देशक पुरस्कार दिया गया। कई कमर्शियल सफल फ़िल्मों का अंग होने के कारण और बहुत ही अच्छा अभिनय करने के कारण, वे हिन्दी सिनेमा के एक प्रमुख अभिनेता बन गए हैं। पारिवारिक पृष्ठभूमि आमिर ख़ान बांद्रा के होली फेमिली अस्पताल, मुंबई, भारत में एक ऐसे मुस्लिम परिवार में जन्म लिए जो भारतीय मोशन पिक्चर में दशकों से सक्रिय थे। उनके पिता, ताहिर हुसैन एक फ़िल्म निर्माता थे जबकि उनके दिवंगत चाचा, नासिर हुसैन, एक फ़िल्म निर्माता के साथ-साथ एक निर्देशक भी थे। मौलाना अबुल कलाम आजाद के वंशज होने के कारण, उनकी जड़ें अफगानिस्तान के हेरात शहर में देखे जा सकते हैं। वे भारत के पूर्व राष्ट्रपति, डॉ॰जाकिर हुसैन के भी वंशज हैं और भारत की अल्पसंख्यक कल्याण मंत्री, डॉ॰नजमा हेपतुल्ला के दूसरे भतीजे भी हैं। फ़िल्म करियर ख़ान ने अपना फ़िल्मी करियर की शुरुआत एक बाल कलाकार के रूप में नासिर हुसैन द्बारा गृह निर्मित, निर्माण व निर्देशित फ़िल्म यादों की बारात (1973) और मदहोश (1974) से की। ग्यारह साल बाद, उन्हें एडल्ट अभिनय डेब्यू का मौका मिला जिस पर किसी ने ध्यान नहीं दिया, वह थी केतन मेहता की होली (1984). ख़ान का पहला मुख्य किरदार 1988 के दौरान फ़िल्म क़यामत से क़यामत तक में नज़र आया, जिसे उनके भतीजे और नासिर हुसैन के बेटे मंसूर ख़ान ने निर्देशित किया था।क़यामत से क़यामत तक बॉक्स ऑफिस पर काफी सफल रही और इसने ख़ान के करियर को एक लीडिंग अभिनेता के तौर पर आगे बढाया.एक टिपिकल 'चॉकलेट अभिनेता' के रूप में उन्हें किशोरों का आदर्श माना जाने लगा। उसके बाद वे '80 और '90 की शुरुआत में कई फ़िल्मों में दिखे: दिल (1990), जो साल का सबसे बड़ा व्यवसायिक हिट रही, दिल है कि मानता नहीं (1991), जो जीता वही सिकंदर (1992), हम हैं राही प्यार के (1993) (जिसके लिए उन्होंने पटकथा भी लिखा) और रंगीला (1995).इनमे से अधिकतर फ़िल्में आलोचनात्मक व…"} {"instruction": "Modify the above Python Flask application to accept form input and create a new task.", "input": "Not applicable", "output": "from flask import Flask, request, redirect, render_template\nfrom flask_sqlalchemy import SQLAlchemy\n\napp = Flask(name)\napp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'\ndb = SQLAlchemy(app)\n\nclass Task(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n description = db.Column(db.String(120), unique=True)\n\ndb.create_all()\n\n@app.route('/tasks', methods=['GET'])\ndef get_tasks():\n tasks = Task.query.all()\n return {'tasks': [task.description for task in tasks]}\n\n@app.route('/tasks/int:id', methods=['PUT'])\ndef update_task(id):\n task = Task.query.get(id)\n task.description = request.json['description']\n db.session.commit()\n return {'message': 'Task updated'}\n\n@app.route('/tasks/int:id', methods=['DELETE'])\ndef delete_task(id):\n Task.query.filter_by(id=id).delete()\n db.session.commit()\n return {'message': 'Task deleted'}\n\n@app.route('/', methods=['GET', 'POST'])\ndef create_task():\n if request.method == 'POST':\n task = Task(description=request.form['description'])\n db.session.add(task)\n db.session.commit()\n return redirect('/')\n return render_template('index.html')\n \nif name == 'main':\n app.run(debug=True)"} {"instruction": "Build a program to remove all duplicate words from a given list of strings", "input": "[\"Python\", \"Python\", \"programming\", \"language\", \"language\"]", "output": "def remove_duplicates(lst):\n new_list = []\n for i in lst:\n if i not in new_list:\n new_list.append(i)\n return new_list\n\nprint(remove_duplicates([\"Python\", \"Python\", \"programming\", \"language\", \"language\"]))"} {"text": "[HI Wikipedia] तोडुपुज़ा\n\n\"तोडुपुज़ा\" (थोडुपुझा)( केरल राज्य में इडुक्की जिले में एक नगरपालिका और व्यावसायिक केंद्र है। यह शहर कोच्चि से 62 किलोमीटर पूर्व दक्षिण में बसा हुआ है। पी.जे. जोसेफ तोडुपुज़ा विधानसभा निर्वाचन क्षेत्र से सातवीं बार के लिए निर्वाचित हुए. वह केरल कांग्रेस (एम) पार्टी के अध्यक्ष है। लोकप्रिय फिल्म अभिनेत्री असिन परिवार तोडुपुज़ा से है। मलयालम फिल्म अभिनेता आसिफ अली और निषान्त सागर तोडुपुज़ा से हैं। नाम तोडुपुज़ा यह दो शब्द से जुडा हुआ है,'तोडु' (का मतलब एक छोटी सी धारा) और 'पुज़ा' (का मतलब एक नदी) से आया हो सकता है। यह माना जाता है कि एक छोटी सी धारा एक नदी की रूप में विकसित की है। वहाँ एक और संस्करण है जो 'तोडु'का मतलब स्पर्श' और 'पुज़ा'का मतलब'नदी' के रूप में 'परिभाषित कर सकता है। इस प्रकार नदी को छूकर रहनेवाली शहर तोडुपुज़ा बन गया'। इतिहस तोडुपुज़ा कई सदियों का इतिहासवाले एक प्राचीन शहर है। बौद्ध और जैन धर्मों जो केरल में 300 ईसा पूर्व में अपनी पहली पैठ बनाई तोडुपुज़ा और पड़ोसी क्षेत्रों में अपने प्रभाव को छोड़ दिया है। बौद्ध धार्मिक तोडुपुज़ा के निकट कारिकोड में पाया अवशेष इस शंका करना के पर्याप्त सबूत है। 100 ई. में केरल प्रशासनिक कारणों के लिए जैसे से में वेणाड, ओटनाडु, नविषैनाडु, मंजुनाडु, वेम्बोलीनाडु और कीषमलैनाडु के रूप में कई प्रांतों में विभाजित किया गया था। तोडुपुज़ा और मूवाट्टुपुज़ा (झा) कीषमलैनाडु का हिस्से थे और कारिकोड इसका राजधानी थे। कीषमलैनाडु 1600 ई. तक अस्तित्व में था। उस वर्ष में यह वदक्कमकूर के साथ एक लड़ाई खो दिया है और इसे का एक हिस्सा बन गया। वदक्कमकूर के राजा लोग कई वर्षों के लिए कारिकोड में रहते थे। मार्ताण्ड वर्मा महाराजा की समय में वदक्कमकूर त्रावणकोर के राज्य का हिस्सा बन गया।. वह अपने प्रतिनिधि नेय्याट्टिनकरा (त्रिवेंद्रम) से सर्वाधिकारी इलाशमप्रती श्री नारायण मेनन नियुक्त तोडुपुज़ा में किया था। उनको मार्ताण्ड वर्मा महाराजा ने मट्टत्तिल कोविलकम के संरक्षक और तोडुपुज़ा 'देशाम' (क्षेत्र) के शासकों और कीषमलैनाडु की \"नाडू वाझी\" उभरा था। 'देशाम' के एक समूह के लिए नाडू कहते थे। उनका सरकारी निवास थे मट्टत्तिल कोविलकम जो चालामकोड गांव में स्थित है। कीषमलैनाडु के आधिकारिक मुख्यालय कारिकोड थे। उनके शासनकाल की अवधि कीषमलैनाडु का स्वर्ण युग था। उन्होंने कई शानदार स्मारकों, सबसे प्रसिद्ध जिनमें से सरकारी कार्यालयों, पंडिका शाला और मंदिर बनवाया। वह इस क्षेत्र में भी नई शैली के कर संग्रह के संस्थापक थे। कारिकोड में आप एक प्राचीन किले और नैनार मस्जिद, जो वदक्कमकूर राजा द्वारा अपने मुस्लिम सैनिकों के लिए निर्मित किये थे और किले के अवशेष भी देख सकते हैं। थोडुपुझा के पास एक पुराना गिरिजाघर (चर्च) है, जो 13 वीं सदी से पहले का माना जाता है। 1956 में केरल राज्य के गठन के समय तोडुपुज़ा एर्नाकुलम जिले का हिस्सा था।. वर्ष 1972 में, तोडुपुज़ा तालुक एर्नाकुलम जिले से और देविकुलम, ऊडुम्बनचोला और पीरमेडु तालुका, जो कोट्टायम जिले के हिस्सा थे साथ शामिल होने के द्वारा इडुक्की जिले बनाई गई थी। केरल के नगर इडुक्की ज़िला"} {"instruction": "Write a function in Python that will take two inputs, an array of strings and a letter, and returns the number of elements in the array that contain the given letter.", "input": "['cat', 'dog', 'fish','apple']\nletter: 'a'", "output": "def count_elements_with_letter(arr,letter):\n count = 0\n for a in arr:\n if letter in a:\n count += 1 \n \n return count \n\ncount_elements_with_letter(['cat','dog','fish','apple'], 'a')\n# output: 3"} {"instruction": "Write an algorithm to generate the Fibonacci series up to the nth term", "input": "", "output": "def fibonacci(n): a = 0 b = 1 if n < 0: print(\"Incorrect input\") elif n == 0: return a elif n == 1: return b else: for i in range(2,n): c = a + b a = b b = c return b"} {"instruction": "Design a Python script to check if a given value is an alphabet or not.", "input": "", "output": "\"\"\"\nDesign a Python script to check if a given value is an alphabet or not \n\"\"\"\n\n# function to check if the given value is an alphabet or not\ndef is_alphabet(value):\n # check if the value is empty\n if value == '':\n return False\n\n # check if the given value is an alphabet\n if value.isalpha():\n return True\n else:\n return False\n\nif __name__ == '__main__':\n value = input('Enter a value: ')\n print(is_alphabet(value))"} {"instruction": "From the input list, create a dictionary containing only key-value pairs for even integers.", "input": "[4, 7, 9, 10, 16, 18]", "output": "# function to create a dictionary containing only key-value pairs for even integers def even_dict(arr): return {i : i for i in arr if i % 2 == 0}"} {"instruction": "Construct a decision tree classifier from given datasets in Python.", "input": "Feature sets in the datasets are ‘Age’, ‘Income’ and ‘Gender’ and labels are ‘Credit’.", "output": "from sklearn import tree\nimport pandas as pd\n\n# Load the data\ndf = pd.read_csv(\"data.csv\")\n\n# Define the features and labels\nfeatures = [\"Age\", \"Income\", \"Gender\"]\nlabels = [\"Credit\"]\n\n# Create a Decision Tree classifier\nclf = tree.DecisionTreeClassifier()\n\n# Train the model using the training sets\nclf.fit(df[features], df[labels])\n\n# Make predictions using the testing set\npredictions = clf.predict(df[features])"} {"instruction": "design a functions which removes the duplicate elements from a list", "input": "", "output": "def remove_duplicates(x): res = [] for i in x: if i not in res: res.append(i) return res"} {"text": "[DE Wikipedia] Olympische Sommerspiele 1920/Schwimmen – 100 m Freistil (Männer)\n\nDer Schwimmwettkampf über 100 Meter Freistil der Männer bei den Olympischen Spielen 1920 in Antwerpen wurde vom 22. bis 29. August 1920 ausgetragen. Alle Medaillengewinner kamen aus den Vereinigten Staaten. Rekorde Vor Beginn der Olympischen Spiele waren folgende Rekorde gültig. Folgende neue Rekorde wurden aufgestellt: Ergebnisse Viertelfinale Die zwei ersten Athleten eines jeden Laufs sowie die der zeitschnellste Athlet aller Läufe qualifizierten sich für das Halbfinale. Lauf 1 Lauf 2 Lauf 3 Lauf 4 Lauf 5 Lauf 6 Halbfinale Die ersten zwei Athleten eines jeden Laufs und der schnellste Dritte qualifizierten sich für das Finale. Halbfinale 1 Halbfinale 2 Finale Das Finale wurde zunächst am 24. August ausgetragen. Herald legte Protest ein, weil er sich von Ross behindert fühlte. Am 29. August wurde das Finale ohne Ross ein zweites Mal ausgeschwommen, an der Verteilung der Medaillen änderte sich nichts. Weblinks Ergebnisse Freistil 100 m"} {"instruction": "Create a function that returns a substring of a given string.", "input": "string = 'This is a sample string'", "output": "def get_substring(string, start, end): return string[start:end]"} {"instruction": "Design an algorithm in python to solve the Towers of Hanoi puzzle.", "input": "Number of discs: 3", "output": "def hanoi(discs, start, temp, end):\n if discs > 0:\n hanoi(discs - 1, start, end, temp)\n end.append(start.pop())\n hanoi(discs - 1, temp, start, end)"} {"instruction": "Write a HTML code to display a ordered list of five items inside a div with the classname \"list\".", "input": "", "output": "
  1. Item 1
  2. Item 2
  3. Item 3
  4. Item 4
  5. Item 5
"} {"text": "[EN Wikipedia] Ruakōkoputuna River\n\nThe Ruakōkoputuna River is a river of the Wairarapa, in the Wellington Region of New Zealand's North Island. It flows northeast from its sources within Haurangi Forest Park to the east of Palliser Bay, reaching the Huangarua River south of Martinborough. The river's upper section flow through the Patuna Chasm, a narrow slot canyon. See also List of rivers of New Zealand References Rivers of the Wellington Region Rivers of New Zealand"} {"instruction": "What could be a use case of a 'while' loop in Python?", "input": "", "output": "A while loop can be used to iterate over a sequence or perform a computation until a specific condition is met. For example, it can be used to generate a list of prime numbers, where it would check if the current number is a prime number by checking if its divisible by any of the already discovered primes before it."} {"text": "[EN Wikipedia] 1949–50 Norwegian 1. Divisjon season\n\nThe 1949–50 Norwegian 1. Divisjon season was the 11th season of ice hockey in Norway. Eight team participated in the league, and Gamlebyen won the championship. Regular season External links Norwegian Ice Hockey Federation Norra Eliteserien (ice hockey) seasons 1949–50 in Norwegian ice hockey"} {"instruction": "Write a Python program to implement Linear Search for an array of numbers", "input": "arr = [2, 3, 5, 7, 11]\nn = 11", "output": "def LinearSearch(arr, n):\n for i in range(len(arr)):\n if arr[i] == n:\n return i\n return -1\n\nindex = LinearSearch(arr, n)\nprint(index)"} {"instruction": "Search in the API documentation to find all possible parameters that can be used with the API call.", "input": "", "output": "The API contains the following parameters that can be used with the API call: - search queries - sorting criteria - filters - categories - limit - offset - user information - timestamp"} {"instruction": "Remove the empty tuples in the list.", "input": "mylist = [(), (1,), (1, 2), (), (3, 4), (), (5)]", "output": "mylist = [(), (1,), (1, 2), (), (3, 4), (), (5)] filtered_list = list(filter(None, mylist)) print(filtered_list)"} {"instruction": "Create an HTML code that renders a checkbox with the text \"Remember me\" next to it.", "input": "", "output": " Remember me"} {"instruction": "Create a machine learning model in Python that predicts the product popularity based on the customer reviews.", "input": "Data set containing customer reviews and sales volumes", "output": "# import libraries\nimport pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.linear_model import LogisticRegression\n\n# read data \ndata = pd.read_csv('data.csv')\n\n# split data into features and labels\nX = data['customer_reviews']\ny = data['Popularity']\n\n# train_test_split\nX_train, X_test, y_train, y_test = train_test_split(X,y, test_size=0.2, random_state=42)\n\n# Create Tf-idf vectorizer \ntf = TfidfVectorizer(stop_words='english')\n\n# Fit the vectorizer to the data\ntf.fit(X_train)\n\n# Transform train and test data\nX_train_tf = tf.transform(X_train)\nX_test_tf = tf.transform(X_test)\n\n# Train and fit the model\nlog_model = LogisticRegression()\nlog_model.fit(X_train_tf,y_train)\n\n# Predict the labels\ny_preds = log_model.predict(X_test_tf)\n\n# Evaluate the model \naccuracy = accuracy_score(y_test, y_preds)\n\nprint('The model accuracy is:', accuracy)"} {"instruction": "Create a JavaScript object for a square with sides 8, 10 and 12.", "input": "", "output": "let objSquare = { side1: 8, side2: 10, side3: 12 }"} {"instruction": "Compute the edits between two strings.", "input": "str1 = \"I am eating\" str2 = \"I am eating a sandwich\"", "output": "def edit_distance(str1, str2): \"\"\" Compute the edit distance between two strings \"\"\" m = len(str1) n = len(str2) distance = [[0 for i in range(n+1)] for j in range(m+1)] for i in range(m+1): for j in range(n+1): # If first string is empty, only option is to insert all characters of second string if i == 0: distance[i][j] = j # If second string is empty, only option is to remove all characters of first string elif j == 0: distance[i][j] = i # If last characters are same, ignore last char and recur for remaining string elif str1[i-1] == str2[j-1]: distance[i][j] = distance[i-1][j-1] # If last characters are not same, consider all possibilities and find minimum else: replace_cost = distance[i-1][j-1] + 1 remove_cost = distance[i-1][j] + 1 insert_cost = distance[i][j-1] + 1 distance[i][j] = min(replace_cost, remove_cost, insert_cost) return distance[m][n] if __name__ == '__main__': str1 = \"I am eating\" str2 = \"I am eating a sandwich\" print(edit_distance(str1, str2))"} {"instruction": "Research and write a report on the current state of the Python programming language.", "input": "", "output": "Python is an interpreted, high-level programming language developed by Dutch programmer Guido Van Rossum in 1991. It has a comprehensive and large standard library, and a very easy-to-learn and widely used syntax. Python is commonly used in many areas of scientific computing and is widely used in web and software development, artificial intelligence, machine learning, and data science. Python is highly regarded for its readability and broad applicability, and is the most popular language for learning Computer Science due to its flexible and expanding libraries. It supports object-oriented, procedural, and functional programming. Python, like most languages, can be used to create sophisticated applications, graphs and data visualizations, create web development, debug existing projects, and many other interesting tasks. It is a beginner-friendly language and the official support is well organized and up-to-date, making it truly an ideal choice for beginners. The experience and effort involved in learning Python can easily be produced in other computer-related related fields, making Python increasingly attractive and adopted."} {"instruction": "Create a program in JavaScript to calculate the area of a triangle with given side lengths.", "input": "side_1 = 10 side_2 = 10 side_3 = 8", "output": "let side_1= 10; let side_2= 10; let side_3= 8; //calculate the permiter of triangle let perimiter = (side_1 + side_2 + side_3)/2; //calculate the area of triangle using Heron's formula let area = Math.sqrt(perimiter*(perimiter-side_1)*(perimiter-side_2)*(perimiter-side_3)); console.log(area);"} {"instruction": "Write a Python program to parse the given HTML data and print out each HTML tag.", "input": " \n \n Parse HTML \n \n \n

Header

\n

This is a paragraph

\n

Sub-header

\n \n ", "output": "import re\n\n# Regex to match HTML tags\npattern = re.compile('<[^>]+>')\n\n# Input HTML data\nhtml = \"\"\"\n \n \n Parse HTML \n \n \n

Header

\n

This is a paragraph

\n

Sub-header

\n \n \n\"\"\"\n\n# Match and print all HTML tags\nprint('HTML Tags:')\nfor tag in re.findall(pattern, html):\n print(tag)"} {"instruction": "Create a React component that renders a list of items.", "input": "items = [\"Apple\", \"Banana\", \"Cherry\"]", "output": "import React from 'react'; const ListView = (props) => { return (
{ props.items.map((item, index) => (
  • {item}
  • )) }
    ); } export default ListView;"} {"text": "[CS Wikipedia] Situace (edice)\n\nSituace byla edice publikací o výtvarném umění, kterou vydávala Jazzová sekce Svazu hudebníků v sedmdesátých a osmdesátých letech 20. století. Edici řídil Karel Srp mladší. Publikace měly jednotnou grafickou úpravu, jejímž autorem byl Joska Skalník, formát A4 a rozsah 20 stran černobílého tisku na křídovém papíře. Edice se osamostatnila z původní rubriky časopisu JAZZ. Rubrika časopisu JAZZ JAZZ 23 - Karel Miler, duben 1978, str 58-59 JAZZ 24 - Milan Grygar, prosinec 1978, str. 38-40 JAZZ 25 - Stanislav Zippe, červen 1979, str. 42-43 JAZZ 26 - Jiří Kovanda, duben 1980, str. 56-58 JAZZ 27/28 - Václav Vokolek, červen 1980, str. 98-99 Samostatné svazky 1 Adriena Šimotová : koláže – objekty – kresby, březen 1979 2 Karel Miler : možnosti, duben 1978 3 Jitka Svobodová : kresby a objekty, květen 1979 4 Milan Grygar : kresby, září 1979 5 Emila Medková : fotografie, prosinec 1979 6 Stanislav Kolíbal : mezi prostorem a plochou, květen 1980 7 Jan Svoboda : fotografie, červenec 1980 8 Eva Kmentová : kresby, plastiky, listopad 1980 9 Libor Fára : dialog projektu okno, prosinec 1980 10 Václav Boštík : obrazy, duben 1981 11 Petr Štembera : performance, květen 1981 12 Karel Malich : vědomí a kosmické energie, listopad 1982 13 Dalibor Chatrný : prostorové orientace, leden 1982 14 Hugo Demartini : modely, leden 1983 15 Vladimír Janoušek : změny, říjen 1983 V letech 1983-4 byly připraveny do tisku další svazky, které už nevyšly: 16: Čestmír Kafka, Situace 17: Květa a Jitka Válovy Externí odkazy Knižní edice Jazzová sekce"} {"text": "[CS Wikipedia] Překlady slovanských literatur\n\nPřeklady slovanských literatur () vznikly v roce 2009 v Ústavu slovanské filologie na Filologické fakultě Slezské univerzity v Katovicích, nejprve jako kontinuálně vydávaná publikace. V rámci jiho- a západoslovanských jazyků jsou věnovány otázkám uměleckého překladu, jež jsou viděny z perspektivy teoretické, literárněhistorické i kulturněhistorické. Od roku 2017 je šéfredaktorem doc. Lešek Malčák (docent Ústavu slovinské filologie na Filozofické fakultě Slezské univerzity), který nahradil prof. Božena Tokaž (šéfredaktorka 2009–2016, zakladatelka) – plný profesor na Ústavu slovinské filologie na Filozofické fakultě Slezské univerzity. Informace o časopise Soustřeďují se rovněž na registraci edic a recepci překladů, jakož i na bádání týkající se specifik překladu mezi příbuznými jazyky, překladu jedné kultury do jiné prostřednictvím literatury jako média, úloze překladu v komparatistickém bádání. Vzhledem k podvojnému typu výzkumu, jež je založen na studiu dokumentárním a sociologickém (bibliografie překladů slovanských literatur do polštiny a polské literatury do slovanských jazyků a jejich recepce) a kritickém a interpretačním (sloužícím teoretickému zevšeobecnění), bývají jednotlivé svazky vydávány ve dvou částech. Struktura Každý svazek se skládá ze dvou částí: problémové a bibliografické v oblasti překladů polsko-slovanských (polské literatury do následujících jazyků: bulharština, chorvatština, čeština, makedonština, srbština, slovenština a slovinština) a slovansko-polských (ze slovanských literatur do polštiny) a z bibliografie překladů publikovaných po roce 1990 (bibliografie zahrnující předcházející léta bude doplňována později). Úkoly časopisu Cílem publikací, prvních svého druhu ve slavistickém prostředí (s výjimkou rusistického), je najít rozdíly, shody i cesty vzájemného dialogu mezi slovanskými kulturami a poskytnout základy pro slovanskou komparatistiku. Slovanští sousedé, a to i navzdory jazykové příbuznosti, zůstávají vedle sebe velice často vzájemně neznámí a vzdálení. Vzhledem k fungování slovanských literatur v mezikulturní komunikaci, podmíněné politicky, společensky i umělecky, velmi často autoři přivádějí do okruhu svých zájmů třetí – neslovanskou kulturu. Časopis Překlady slovanských literatur se rozvíjí ve spolupráci s polským překladatelským prostředím (mezi jinými Krakov, Poznaň, Vratislav, Bielsko-Bialá) i se středisky zahraničními (Bulharsko, Chorvatsko, Česká republika, Makedonie, Srbsko, Slovensko, Slovinsko). Patří mezi recenzované časopisy s celostátní působností, vzbuzuje zájem v zahraničních univerzitních střediscích. Otiskuje texty napsané v polštině i v jiných jazycích, zejména slovanských.Všechny cizojazyčné články mají dvě jazykové verze – originální i přeloženou, s ohledem na polského čtenáře. Ke každému článku…"} {"instruction": "Edit this code to sort a list of strings alphabetically", "input": "mylist = [\"Eggs\", \"Cheese\", \"Milk\"]", "output": "mylist.sort()"} {"instruction": "Write a Python program to implement a sorting algorithm (your choice).", "input": "num_list = [5,2,1,9,7,8]", "output": "def sorting_algorithm(num_list):\n for i in range(len(num_list)):\n for j in range(i + 1, len(num_list)):\n if num_list[i] > num_list[j]:\n num_list[i], num_list[j] = num_list[j], num_list[i]\n return num_list"} {"instruction": "Modify the following code to print out \"The result is 30\".", "input": "int a = 10 int b = 20 Console.WriteLine(\"The result is \" + a + b)", "output": "int a = 10; int b = 20; Console.WriteLine(\"The result is \" + (a + b).ToString());"} {"instruction": "Create a REST API endpoint to retrieve specific user data from the database", "input": "A relational database with a user table containing: user_id, email, phone_number", "output": "@app.route('/user', methods=['GET']) def get_user(): user_id = request.args.get('user_id') user = db.execute('SELECT * FROM user WHERE user_id = ?', (user_id,)).fetchone() if user is None: `. abort(404) return jsonify(user)"} {"instruction": "Create a program using C++ to check whether a given number is a prime number.", "input": "15", "output": "int n = 15; bool prime = true; for(int i = 2; i < n; i++) { if (n % i == 0) { prime = false; break; } } if (prime) { cout << \"The number is prime\"; } else { cout << \"The number is not prime\"; }"} {"instruction": "Utilizing the Java syntax, write a code snippet to find the maximum value in the given array.", "input": "[4, 15, 11, 26, 2]", "output": "int max = arr[0]; for (int i = 1; i < arr.length; i++) { if (arr[i] > max) { max = arr[i]; } } System.out.println(\"Maximum value is: \" + max);"} {"instruction": "Formulate an algorithm to evaluate a given sudoku board in Python.", "input": "board = [[3, 0, 6, 5, 0, 8, 4, 0, 0], \n [5, 2, 0, 0, 0, 0, 0, 0, 0], \n [0, 8, 7, 0, 0, 0, 0, 3, 1], \n [0, 0, 3, 0, 1, 0, 0, 8, 0], \n [9, 0, 0, 8, 6, 3, 0, 0, 5], \n [0, 5, 0, 0, 9, 0, 6, 0, 0], \n [1, 3, 0, 0, 0, 0, 2, 5, 0], \n [0, 0, 0, 0, 0, 0, 0, 7, 4], \n [0, 0, 5, 2, 0, 6, 3, 0, 0]]", "output": "def evaluate_suduku(board):\n rows = len(board)\n cols = len(board[0])\n # Check rows\n for row in board:\n if not all_unique(row):\n return False\n # Check columns\n for i in range(cols):\n column = [row[i] for row in board]\n if not all_unique(column):\n return False\n # Check 3x3 boxes\n for i in range(0,rows-2,3):\n for j in range(0,cols-2,3):\n box = []\n for row in board[i:i+3]:\n for num in row[j:j+3]:\n box.append(num)\n if not all_unique(box):\n return False\n return True\n\n# Helper Function to check uniqueness\ndef all_unique(lst): \n seen = set() \n return not any(i in seen or seen.add(i) for i in lst)"} {"text": "[EN Wikipedia] Tom Banks (rugby union, born 1994)\n\nTom Banks (born 18 June 1994) is an Australian professional rugby player who currently plays for the in the Super Rugby. He has represented Australia in international rugby. Banks started his Super Rugby career with the Queensland Reds in 2015. He has played in the National Rugby Championship for and the . His preferred position is fullback or wing. Early years Thomas Banks was born in Brisbane, Queensland. He attended school at Brisbane Boys' College during which time he represented Queensland at schoolboy rugby in 2011 and 2012. He moved on to play for the University of Queensland in the Queensland Premier Rugby competition from 2013. Rugby career In 2014, Banks played for the Queensland Reds at under 20 level and was also a member of their wider training squad, He didn't make the senior squad for the following season, but did manage to earn his first cap as a substitute in a match against the at Suncorp Stadium. In 2015 and 2016 he played for in the National Rugby Championship. Banks missed out on selection for the Reds 2016 Super Rugby squad. Despite this, he picked up a second Super Rugby cap in the final match of the 2016 season against the . Banks signed a one-year Super Rugby deal with the Brumbies for the 2017 season. After impressing in his first season of play for the Brumbies, Banks was called up to join the Australia national team squad later that year to replace the injured Dane Haylett-Petty. He was also selected by former Grand Slam-winning coach Alan Jones in the Barbarians squad to play the Wallabies at Allianz Stadium in late October 2017. Super Rugby statistics References 1994 births Living people Australia international rugby union players Australian rugby union players Rugby union fullbacks Rugby union wings Queensland Country (NRC team) players Queensland Reds players ACT Brumbies players Canberra Vikings players People educated at Brisbane Boys' College Rugby union players from Brisbane Mie Honda Heat players"} {"instruction": "What data structure would be best to store an employee roster containing their name, age, and gender?", "input": "", "output": "The best data structure for storing an employee roster containing their name, age, and gender would be a hash table. A hash table is a data structure that allows for fast lookups and inserts by mapping values to keys. Each employee can be stored as a key-value pair, with their name, age, and gender as the respective values."} {"instruction": "Generate a crypto wallet address using Python.", "input": "", "output": "from web3 import Web3\nfrom web3.personal import Personal\n\n# Create a Web3 instance to use\nw3 = Web3(Web3.EthereumTesterProvider())\n\n# Create a Personal instance to use\npersonal = Personal(w3)\n\n# Generate a new wallet address\naddress = personal.newAccount('my_wallet_password')\n\nprint(address) # Output: 0x..."} {"instruction": "How can we check the type of a variable in JavaScript?", "input": "", "output": "We can check the type of a variable in JavaScript using the typeof operator. For example, to check the type of the variable x, we can use the following code: var x = 10; console.log(typeof x); // outputs \"number\""} {"instruction": "Generate code to create an array of 5 random integers between 0 and 10.", "input": "", "output": "arr = []; for(let i=0; i<5; i++){ arr.push(Math.floor(Math.random() * 11)); } // Result: arr = [4, 6, 8, 2, 9]"} {"instruction": "Given a large text, write a Python script to find common phrases.", "input": "\"In the morning, the sun rises in the east and sets in the west. In the evening, the stars come out and shine in the night sky. The moon rises in the east and sets in the west.\"", "output": "import re\n\n# input string\nstring = \"In the morning, the sun rises in the east and sets in the west. In the evening, the stars come out and shine in the night sky. The moon rises in the east and sets in the west.\"\n\nwords = string.split(\" \")\n\n# set that contains the frequnt phrases\nphrases = set()\n\n# loop over the words in the string\nfor index, word in enumerate(words):\n # loop over the words ahead of the current word\n for ahead in range(index+1, min(index+4, len(words))):\n # check if the phrase exists in the string\n if \" \".join(words[index:ahead+1]) in string:\n # add the phrase to the set\n phrases.add(\" \".join(words[index:ahead+1]))\n\n# print the phrases\nprint(phrases)"} {"text": "[CS Wikipedia] Modřanka Tower\n\nModřanka Tower je výškový bytový dům nacházející se v Modřanech na Praze 4. Má 15 nadzemních podlaží a přibližně 70 bytů. K dokončení došlo v roce 2019. Je součástí developerského projektu areálu Modřanka zahrnující 292 bytů. Jeho architektonický návrh vytvořilo studio LOXIA, investorem je firma Horizon Holding. Odkazy Reference Externí odkazy Oficiální stránky Stavby v Modřanech Mrakodrapy v Praze Bytové domy v Praze Postaveno v Česku 2019"} {"instruction": "Write a Python function that takes an array of numbers as an argument and returns the largest prime factor of the product of the numbers in the array.", "input": "[12, 10, 15]", "output": "def largest_prime_factor(arr):\n import math\n product = 1\n \n for num in arr:\n product *= num \n \n largest_factor = -1 \n \n for i in range(2, math.floor(math.sqrt(product))+1): \n while product % i == 0: \n product = product / i \n largest_factor = i \n \n if largest_factor == -1:\n return product\n else:\n return largest_factor"} {"text": "[EN Wikipedia] Gaten Matarazzo\n\nGaetano John Matarazzo III (; ; born September 8, 2002) is an American actor. He began his career on the Broadway stage as Benjamin in Priscilla, Queen of the Desert (2011–12) and as Gavroche in Les Misérables (2014–15). Matarazzo gained recognition for playing Dustin Henderson in the Netflix science-fiction-horror drama series Stranger Things (2016–present). He also hosted the Netflix show Prank Encounters (2019–2021). In 2022, he co-starred in the coming-of-age comedy film Honor Society and voiced Boris the Dragon on the animated fantasy comedy film My Father's Dragon. Early life Gaetano John Matarazzo III was born on September 8, 2002, in New London, Connecticut, to Gaetano Jr. and Heather Matarazzo (no relation to the actress of the same name), but raised in Little Egg Harbor Township, New Jersey, and is of Italian descent. He was born with cleidocranial dysplasia (CCD). He has an older sister and a younger brother. Career He pursued vocal training at Starlight Performing Arts Center in New Jersey. In 2011, he competed and won third place with his vocal solo titled “Ben” at the Starpower Talent Competition Nationals in Uncasville, Connecticut. His first professional credit was in the Broadway musical Priscilla, Queen of the Desert, for which he was cast as a replacement in 2011. Following the production, he took part in a special \"Cast of 2032\" professional youth performance of Godspell at Circle in the Square Theatre in 2012. In 2013, he joined the Les Misérables 25th Anniversary Tour in the United States in the role of Gavroche; the following year, he played the same role in the Tony-nominated 2014 Broadway revival of the musical. Matarazzo made his screen acting debut in a 2015 episode of The Blacklist. After he was cast as Dustin Henderson in Stranger Things, the character's background was modified to have CCD as well. The show's first season premiered in July 2016 to critical acclaim. Over the next several years, Matarazzo also appeared in music videos and various reality and competition shows. On May 11, 2018, it was announced that he was cast in the animated film, Hump. He began hosting the Netflix hidden camera series Prank Encounters in 2019; he also served as an executive producer. That year, he also appeared in the Hollywood Bowl production of Into the Woods. He provided the voice of Buba in The Angry Birds Movie 2. In May 2022, it was announced that Matarazzo would return to Broadway, joining the final cast of the musical Dear Evan Hansen as Jared Kleinman. He starred in the Paramount+ film Honor Society with Angourie Rice, which was released on July 29, 2022. He voiced as the dragon in Cartoon Saloon's film adaptation of Ruth Stiles Gannett's My Father's Dragon novel series. It was announced in December 2022 that Matarazzo would be…"} {"text": "[DE Wikipedia] -itz\n\n-itz ist eine Ortsnamenendung mit slawischem Ursprung. Herkunft Die Ortsnamen auf -(i)(t)z sind aus unterschiedlichen slawischen Ortsnamentypen entstanden. slawische Bewohnernamen mit -ici als Endung (vgl. Sorbisch -icy bzw. -ecy) Putdargoniz (1198 in Mecklenburg erwähnt), entstanden aus einem rekonstruierten Ortsnamen *Poddargonici Biskupitz (in Westpreußen und Posen), entstanden aus einem rekonstruierten Ortsnamen *Biskupici slawische Patronyme mit dem Suffix -ovici; siehe -witz Kattowitz (in Oberschlesien), zusammengesetzt aus dem Personennamen Kat und dem Suffix -ovici und damit „bei den Leuten des Kato“ bedeutend ursprünglich appellativische Ortsnamen mit dem Suffix -ica, -ec(e) (-ьcь, -ьce u. a.) Kamenz (Lausitz), aus altsorbisch kameń „Stein“ plus Suffix -ece und damit „der Steinige (gemeint: Ort)“ bedeutend Chemnitz (Sachsen), zuerst ein Gewässername und erst später auf den Ort übertragen, ebenfalls aus altsorbisch kameń „Stein“, aber plus Suffix -ice (weshalb mit i-Umlaut) und damit „der Steinige (gemeint: Bach)“ bedeutend weitere derart gebildete Flussnamen sind etwa Lafnitz, Fladnitz, Rechnitz; aber anders: Retz aus rece kleiner Bach, germanisiert 1180 rezze Dölitz (Mecklenburg und Leipzig), entstanden aus einem rekonstruierten Ortsnamen *Dolbьcь Görnitz (Mecklenburg, Holstein, Sachsen), entstanden aus einem rekonstruierten Ortsnamen Gornica Gradec ‚kleine Burg‘, Stammform zahlreicher deutscher Namen auf Vokal + (t)z das urslawische Suffix -ika tritt bei sehr früh verdeutschten Ortsnamen auf und wurde in Österreich sekundär an das deutsche Suffix -ing angeglichen Mödling (Niederösterreich), nach dem gleichnamigen Gewässernamen benannt, früheste Erwähnungen als ad Medilihha (903, Kopie 13. Jahrhundert), de Medlik (nach 1190), erstmals 1491 Mödling Im Wendland wird die -itz-Endung manchmal diphthongiert und lautet dann -eitz. Beispiele: Reddebeitz Waddeweitz Nicht slawischen Ursprungs ist dagegen die Endung des Ortsnamens Bomlitz (erstmals belegt 1681), die mit dem Talknick des damals Bommelse genannten Baches (Bommel-Etz) oder einem Wehr (Bommel-Letzel) in Verbindung gebracht wird. Verbreitung Das Suffix -(i)(t)z und seine Verwandten sind im deutschen Ortsnamensschatz in solchen Regionen (östliches Deutschland, österreichisches Wald- und Mühlviertel) weit verbreitet, die früher west- und südslawisch besiedelt waren bzw. zum Teil bis heute sind, jedoch im Rahmen der deutschen Ostsiedlung weitgehend germanisiert wurden. Die Westgrenze ihres Vorkommens markiert damit im Großen und Ganzen die bis ins 12. Jahrhundert bestehende Grenze zwischen dem germanischen und slawischen Sprachgebiet. In Ostfranken und Österreich gehen einige -itz-Namen allerdings schon auf erste Germanisierungen ab dem 8. Jahrhundert zurück. Daneben war das Suffix bis in…"} {"instruction": "Create a Python program to parse a CSV string and print each row in a readable format.", "input": "CSVString = \"John Doe, 22, ABC Street, 07777\\nMary Smith, 26, XYZ Street, 02222\"", "output": "import csv \n \ncsvString = \"John Doe, 22, ABC Street, 07777\\nMary Smith, 26, XYZ Street, 02222\"\n \n# Convert CSV String to List\ncsvList = csvString.split('\\n')\n \n# Print each Row of CSV \nfor row in csvList: \n print(row)"} {"instruction": "Convert this string from snake_case to CamelCase.", "input": "snake_case_string = \"example_string\"", "output": "camelCaseString = ''.join(x.capitalize() or '_' for x in snake_case_string.split('_'))"} {"instruction": "Create a Python program that takes a positive integer as input and returns the closest Fibonacci number.", "input": "Not applicable", "output": "def closest_fibonacci(number):\n a, b = 0, 1\n while b < number:\n a, b = b, a + b\n return a\n\nnumber = int(input('Enter a positive integer: '))\nprint(\"The closest Fibonacci number is\", closest_fibonacci(number))"} {"instruction": "Write a web crawler using Python Scrapy which starts from a URL and follows all the hyperlinks on the page until a given depth is reached.", "input": "The URL to start the crawl and a maximum depth of two levels.", "output": "import scrapy\nfrom scrapy.spiders import CrawlSpider, Rule\nfrom scrapy.linkextractors import LinkExtractor\n\nclass MySpider(CrawlSpider):\n name = 'crawler'\n allowed_domains = ['example.com']\n start_urls = ['http://example.com/']\n \n rules = [\n Rule(LinkExtractor(allow=()), follow=True, callback='parse_item', process_links='filter_links', max_depth=2)\n ]\n\ndef filter_links(self, links):\n # Filter the links to follow\n filtered_links = []\n for link in links:\n if link.url not in self.visited_urls and link.url.startswith(self.domain):\n filtered_links.append(link)\n return filtered_links\n\ndef parse_item(self, response):\n # Parse the page\n pass"} {"text": "[DE Wikipedia] Tadschikischer Nationalpark\n\nDer Tadschikische Nationalpark, auch Pamir-Nationalpark, ist ein geschütztes Gebiet im Pamirgebirge im östlichen Teil von Tadschikistan. Er umfasst eine Fläche von insgesamt 26.000 km². Das Gebiet wurde 1992 durch Tadschikistan zum Nationalpark erklärt und im Jahr 2013 in die Liste der UNESCO-Weltnaturerbestätten aufgenommen. Geographie Der Park erstreckt sich über Gegenden des West- und Ost-Pamirs und macht mit seinen rund 2,6 Millionen Hektar Fläche 11 Prozent des Nationalgebietes von Tadschikistan aus. Er ist naturräumlich heterogen und besteht aus verschiedenen Biomen wie alpinen und hochalpinen Bergregionen, Grasland, Steppe und Wüste. Im Park befinden sich mehrere Schutzgebiete: Pamir-Schutzgebiet, das den See Karakul einschließt Zorkul-Schutzgebiet mit dem Zorkulsee-System (nach Ramsar-Liste ein wichtiges Vogelgebiet) Muskol-Schutzgebiet als Verbindung zwischen Transalaigebirge und der Muskolkette Sanglyar-Schutzgebiet, umfasst die Peter-I.-Kette Flora und Fauna Die Vegetation und das sich daraus ergebende Artenspektrum von Tieren spiegeln die unterschiedlichen Lebensräume in diesem Großschutzgebiet wider. Sowohl Pflanzen der Südwest- wie auch der Zentralasiatischen floristischen Regionen finden sich im Tadschikischen Nationalpark. National seltene und gefährdete Wirbeltiere und Vögel leben in der Region. Zu Ersteren zählen das Argali (im Deutschen auch Riesenwildschaf) (Ovis ammon-Gruppe) und in den Bergen der Irbis (Panthera uncia) und der Asiatische Steinbock (Capra sibirica). Entwicklung Das Gebiet des Parks wurde 1992 vom damals erst knapp ein Jahr alten Staat Tadschikistan zum Nationalpark erklärt. Ein tadschikisch-schweizerisches Forschungsprojekt entwickelte ab Mitte der 1990er Jahre in einem zehnjährigen Projekt Strategien in zehn unterschiedlichen Sektoren für eine nachhaltige Entwicklung der Park-Region. Im Jahr 2013 nahm das Welterbekomitee den Park in die Liste der UNESCO-Weltnaturerbestätten auf. Schutz Der Tadschikische Nationalpark ist eines der größten Hochgebirgs-Schutzgebiete in der Paläarktis. Der Fedtschenko-Gletscher ist der größte noch existente Talgletscher in Eurasien. Das Gebiet des Tadschikischen Nationalparks gehört dem tadschikischen Staat und wurde unter den höchsten Schutzstatus des Landes gestellt. Das Welterbekomitee hob als charakteristisch die enorme Größe des Gebietes mit einer bergig-alpinen Wüstenlandschaft, weit ab von menschlicher Besiedlung hervor. Dies führe zu einem hohen Grad an physischer Unversehrtheit. Die Kernzone des Parks macht 78 Prozent aus, ein Prozentsatz, der sonst bei kaum einem Weltnaturerbegebiet gegeben ist. Deshalb wurde auf eine Ausgleichszone verzichtet; stattdessen wurden lediglich drei Zonen der beschränkten Nutzung in der Peripherie des Parks klassifiziert. Weblinks Tajik…"} {"instruction": "Create an array of numbers and check if a given number exists in the array. Output true if it exists, output false if it does not.", "input": "arr = [1,2,3,4,5] n = 4", "output": "true"} {"text": "[HI Wikipedia] रमेश भाई ओझा\n\nरमेश भाई ओझा एक आध्यात्मिक हिन्दू धर्मोपदेशक हैं, जो वेदान्त दर्शन पर धाराप्रवाह व्याख्यान देते हैं। उनकी रामकथा सुनने भारी संख्या में श्रोता पहुँचते हैं। गुजरात के देवका में पैदा हुए रमेश भाई ने अपनी जन्मभूमि में देवका विद्यापीठ की स्थापना की है। इस विद्यापीठ में भारतीय गुरुकुल परम्परा के अनुसार शिक्षा दी जाती है। सन्दर्भ बाहरी कड़ियाँ रमेश भाई ओझा के व्याख्यान धार्मिक नेता"} {"instruction": "Sort the following array", "input": "arr = [4, 2, 3, 5, 1]", "output": "arr.sort() print(arr)"} {"text": "[DE Wikipedia] Scott Halberstadt\n\nScott Halberstadt (* 17. August 1976 in Connersville, Indiana) ist ein US-amerikanischer Schauspieler. Halberstadt absolvierte die Connersville High School. Er war von 2000 bis 2010 als Schauspieler in Hollywood tätig. Bekannt wurde er durch die Rolle des Nerds Eric in der Fernsehserie Drake & Josh. Inzwischen hat sich Halberstadt aus dem Filmgeschäft zurückgezogen und arbeitet als Datenanalyst in der IT-Branche. Filmografie (Auswahl) 2002: In Your Face 2004–2007: Drake & Josh (Fernsehserie, 16 Folgen) 2006: Grandma’s Boy 2006: Hotel Zack & Cody (The Suite Life of Zack & Cody; Fernsehserie, Folge Twins at the Tipton) 2008: Frohe Weihnachten, Drake & Josh (Merry Christmas, Drake & Josh, Fernsehfilm) 2010: iCarly (Fernsehserie, Folge iStart a Fan War) Weblinks Einzelnachweise Filmschauspieler US-Amerikaner Geboren 1976 Mann"} {"text": "[DE Wikipedia] Benken BL\n\nBenken war eine Gemeinde des Bezirks Arlesheim des Kantons Basel-Landschaft in der Schweiz. Am 1. Januar 1972 wurde Benken mit der Gemeinde Biel zur Gemeinde Biel-Benken fusioniert. Bereits seit dem 16. Jahrhundert haben Biel und Benken eine gemeinsame Bürger-, Schul- und Kirchgemeinde, und auch als Ortschaft gehören die beiden Ortsteile heute zusammen. Sehenswürdigkeiten Weblinks Ort im Kanton Basel-Landschaft Ehemalige politische Gemeinde in der Schweiz Biel-Benken Gemeindeauflösung 1972"} {"text": "[HI Wikipedia] ग्रहण\n\nग्रहण एक खगोलीय घटना है जो तब होती है जब कोई खगोलीय पिण्ड या अंतरिक्ष यान अस्थायी रूप से किसी अन्य पिंड की छाया में आता है या उसके और दर्शक के बीच कोई अन्य पिंड आ जाता है । तीन आकाशीय पिंडों का यह एक सीध में आना युति वियुति रूप में जाना जाता है। युति वियुति के अलावा, ग्रहण शब्द का उपयोग तब भी किया जाता है जब कोई अंतरिक्ष यान एक ऐसी स्थिति में पहुँच जाता है जहाँ वह दो खगोलीय पिंडों की सीध में इस प्रकार से ही आ जाए। ग्रहण पूर्ण होता है या आंशिक हो सकता है । ग्रहण शब्द का प्रयोग अक्सर सूर्य ग्रहण का वर्णन करने के लिए किया जाता है, जब चंद्रमा की छाया पृथ्वी की सतह को पार करती है, या चंद्र ग्रहण, जब चंद्रमा पृथ्वी की छाया में चला जाता है। हालांकि, ग्रहण का अर्थ केवल पृथ्वी-चंद्रमा प्रणाली तक सीमित नहीं है : उदाहरण के लिए, एक अन्य ग्रह अपने चंद्रमाओं में से एक की छाया में जा रहा है, या किसी ग्रह का चंद्रमा अपने ग्रह की छाया से गुजर रहा है, या एक चंद्रमा दूसरे चंद्रमा की छाया से गुजर रहा है । एक द्वितारा प्रणाली भी ग्रहण उत्पन्न कर सकती है यदि उसके तारों की कक्षा का तल दर्शक की सीध में आता है । पृथ्वी-चंद्रमा प्रणाली सूर्य या चन्द्र ग्रहण तभी हो सकता है , जब सूर्य, पृथ्वी और चंद्रमा लगभग एक सीधी रेखा में हों । चूँकि चंद्रमा का कक्षा का तल पृथ्वी की कक्षा के तल से झुका हुआ है, इस लिए हर पूर्णिमा और अमावस्या को ग्रहण नहीं होते। ये दोनों कक्षाएँ जिन बिंदुओं पर मिलती हैं उन्हें चन्द्रपात कहते हैं। पृथ्वी के अपनी कक्षा में घूमने के प्रभाव को सूर्य के आभासी मार्ग द्वारा भी समझा जा सकता है , इसको सूर्यपथ या क्रांतिवृत्त कहते है। ग्रहण तभी हो सकता है जब सूर्य और चन्द्रमा चन्द्रपातों के निकट हों । ऐसा वर्ष में दो बार होता है । एक कैलेंडर वर्ष में चार से सात ग्रहण हो सकते हैं , एक ग्रहण वर्ष या ग्रहण युग में ग्रहणों की पुनरावृत्ति होती है। 1901 और 2100 के बीच में एक वर्ष में अधिकतम सात ग्रहण हैं: चार चंद्र (उपछाया ग्रहण) और तीन सूर्य ग्रहण: 1908, 2038 । चार सूर्य और तीन चंद्र ग्रहण: 1918, 1973, 2094। पांच सौर और दो चंद्र ग्रहण: 1934। उपछाया चंद्र ग्रहणों को छोड़कर, इसमें अधिकतम सात ग्रहण होते हैं: 1591, 1656, 1787, 1805, 1918, 1935, 1982 और 2094। सूर्यग्रहण सूर्य ग्रहण तब होता है जब पृथ्वी के दर्शक के लिए चंद्रमा सूर्य के सामने से गुजरता है। सूर्य ग्रहण का पूर्ण या आंशिक या वलयाकार होना घटना के दौरान चन्द्रपात के सापेक्ष सूर्य और चन्द्रमा की स्थिति, और पृथ्वी से चंद्रमा की दूरी पर और इस पर भी निर्भर करता है कि दर्शक पृथ्वी पर कहाँ खडा है । अलग अलग स्थान से दर्शक को अलग अलग प्रकार के ग्रहण दिखाई दे सकते हैं। यदि सूर्य और चन्द्रमा बिलकुल सटीक चन्द्रपात पर हैं तो या तो पूर्ण सूर्य या वलयाकार सूर्य ग्रहण होंगे। चन्द्रमा के पृथ्वी के निकट होने पर पूर्ण और दूर होने पर वलयकार सूर्य ग्रहण होगा। चन्द्रमा में बहुत अधिक बदलाव नहीं होता इसलिए वलयकार सूर्य ग्रहण भी लगभग पूर्ण सूर्य ग्रहण जैसा ही दिखाई देता है , बस इसमें पूर्णता से समय हल्का का सूर्य का किनारा दिखाई देता है जिसे अग्नि कुण्डल ( रिंग ऑफ़ फायर) कहते है। पूर्ण सूर्य ग्रहण तब दिखाई देता है दर्शक चन्द्रमा की छाया के…"} {"instruction": "Implement an algorithm in Python which can sort an array of numbers in ascending order.", "input": "", "output": "def insertion_sort(arr): \n #Iterationg through the array \n for i in range(1, len(arr)): \n key = arr[i] \n j = i-1\n \n while j >= 0 and arr[j] > key: \n arr[j + 1] = arr[j] \n j -= 1\n arr[j + 1] = key \n \n return arr"} {"text": "[HI Wikipedia] योनशोपिंग लैन\n\nयोनशोपिंग लैन (स्वीडी: Jönköpings län, अंग्रेज़ी: Jönköping) स्वीडन का एक लैन है। 'लैन' स्वीडन का उच्च-स्तरीय प्रशासनिक विभाग होता है, जिसे कभी-कभी 'काउंटी' भी कहते हैं। इन्हें भी देखें स्वीडन की काउंटियाँ सन्दर्भ योनशोपिंग लैन स्वीडन की काउंटियाँ स्वीडन"} {"instruction": "Given the different test scores in the list, calculate the GPA.", "input": "[('DS', 98), ('OS', 95), ('SE', 85), ('ML', 80)]", "output": "GPA: 89.25"} {"instruction": "Write a python program to detect the facial expressions of a person using the OpenCV library.", "input": "Not applicable", "output": "import cv2\n\n# load the cascade classifier\nface_cascade = cv2.CascadeClassifier(\"haarcascade_frontalface_default.xml\")\n\n# Read the input image\nimg = cv2.imread(\"input.jpg\")\n\n# Convert to grayscale\ngray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n\n# Detect the faces\nfaces = face_cascade.detectMultiScale(gray_img, scaleFactor=1.1, minNeighbors=5)\n# Draw the rectangle around each face\nfor x, y, w, h in faces:\n cv2.rectangle(img, (x, y), (x + w, y + h), (0, 255, 0), 3)\n\n# Detect the facial expressions\ngray_faces = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\nfor x, y, w, h in faces:\n face_img = gray_faces[y:y + h, x:x + w]\n expression = expression_model.predict(face_img)\n \n# Output\nprint(\"The expression of the person is: {}\".format(expression))"} {"text": "[CS Wikipedia] Wikipedie\n\nWikipedie (anglicky a v mnoha dalších jazycích Wikipedia) je mnohojazyčná online encyklopedie vytvořená a udržovaná jako projekt otevřené spolupráce se svobodným (otevřeným) obsahem, na jejíž tvorbě spolupracují dobrovolní přispěvatelé z celého světa. Využívá wiki redakční systém a je to největší a nejoblíbenější všeobecné referenční dílo na World Wide Webu; podle hodnocení služby Alexa Internet z června 2019 je jednou z nejpopulárnějších webových stránek vůbec. Obsahuje výhradně bezplatný obsah a neobsahuje jakékoliv komerční reklamy. Wikipedie je vlastněna a podporována, stejně jako další vzájemně propojené projekty, nadací Wikimedia Foundation, neziskovou organizací, která je financována především prostřednictvím darů. Wikipedie byla spuštěna 15. ledna 2001 Jimmym Walesem a Larrym Sangerem. Její jméno navrhl Larry Sanger, jako spojení slov „wiki“ (havajské slovo pro „rychlý“) a „encyklopedie“. Zpočátku fungovala pouze anglická jazyková verze, brzy ale vznikly i další jazykové mutace. Česká verze byla spuštěna 3. května 2002. Celkově obsahovala Wikipedie v lednu 2023 více než 60,2 milionu článků ve více než 300 různých jazycích a v únoru 2014 dosáhla 18 miliard zobrazení stránek a téměř 500 milionů jedinečných návštěvníků měsíčně. Wikipedie funguje na principu tzv. wiki, což znamená, že nový článek může vložit a libovolný článek může změnit (ať už pouze opravit překlep, zkorigovat věcnou chybu, článek výrazně rozšířit nebo zcela přepsat) takřka kdokoli s přístupem na web. Jedním ze základních pravidel prosazovaných uživateli je tzv. nezaujatý úhel pohledu – články musí nezaujatě prezentovat všechny podstatné názory na příslušné téma, aniž by některý vydávaly za jedinou objektivní pravdu. Požadavek na ověřitelnost údajů v článcích je uplatňován zejména u kontroverzních údajů a témat. Historie a rozsah Zárodek Wikipedie vznikl v roce 1995, kdy programátor Ward Cunningham založil webové stránky nazvané WikiWikiWeb, které mohl upravovat každý jejich návštěvník – od té doby se podobných systémů, dnes označovaných jako wiki (havajské slovo pro „rychlý“, míněno stránky, na kterých může návštěvník cokoliv rychle opravit) objevilo velké množství. Velmi často jsou používány např. jako vnitrofiremní báze znalostí. Wikipedie jako taková vznikla 15. ledna 2001 jako doplňkový projekt k dnes již neexistující encyklopedii Nupedia, do které mohli přispívat jen odborníci. Zakladateli obou projektů byli Američané Jimmy Wales (přezdívaný Jimbo), internetový podnikatel, a Larry Sanger, filosof a informatik, který brzy z Wikipedie odešel. Wales 20. června 2003 založil podle zákonů státu Florida (USA) neziskovou nadaci Wikimedia, na kterou převedl autorská a vlastnická práva související s Wikipedií i sesterskými projekty. Sanger na konci roku 2004 rozpoutal diskusi…"} {"instruction": "Create a Python library to implement a common algorithm.", "input": "", "output": "import math\n\ndef algorithm(input1, input2):\n # Algorithm logic here\n return output"} {"instruction": "Create a program that checks for duplicates in a list and removes them.", "input": "", "output": "def remove_duplicates(lst): res = [] for ele in lst: if ele not in res: res.append(ele) return res"} {"instruction": "Create a CSS rule for a class called \"main-text\" which sets the font weight of the text to bold and the font color to blue.", "input": "", "output": ".main-text { font-weight: bold; color: blue; }"} {"instruction": "Using the given list, create a new variable \"result\" that stores the sum of all the elements.", "input": "items = [1, 2, 3, 4, 5]", "output": "result = 0 for item in items: result += item"} {"instruction": "Modify the code for the given purpose", "input": "string = input(\"Enter a string: \")", "output": "string = input(\"Enter a string: \") if not string.isalpha(): print(\"Input must contain only letters\")"} {"instruction": "Compile the following code to JavaScript and return the compiled code.", "input": "function myFunc(a, b) { return a + b; }", "output": "function myFunc(a, b) { return a + b; } //Compiled Version const myFunc = (a, b) => a + b;"} {"text": "[HI Wikipedia] बयान-ओलगी प्रांत\n\nबयान-ओलगी (मंगोल: Баян-Өлгий; अंग्रेज़ी: Bayan-Ölgii) मंगोलिया के सुदूर पश्चिम में स्थित उस देश का एक अइमग (यानि प्रांत) है। यहाँ कज़ाख़ लोग बहुसंख्या में हैं और यह मंगोलिया का एकमात्र मुस्लिम व कज़ाख़ बहुसंख्यक प्रांत है। इस प्रांत की स्थापना १९४० में हुई थी। बयान-ओलगी प्रांत के कुछ नज़ारे इन्हें भी देखें मंगोलिया के प्रांत अइमग सन्दर्भ बयान-ओलगी प्रांत मंगोलिया के प्रांत"} {"text": "[CS Wikipedia] Bucharský bublák\n\nBucharský bublák je velice staré plemeno holuba domácího pocházející z jihozápadní Asie. Náleží do plemenné skupiny bubláků, což jsou holubi, u kterých se vyvinul specifický hlasový projev, tzv. bublání. Vrkání je modifikováno do déletrvajícího zvuku připomínajícího vzdálené zurčení potoka, zvonění zvonů nebo bubnování. U bucharského bubláka se však šlechtění zaměřuje především na strukturu opeření a rozvinutí pernatých ozdob a požadavek na melodičnost a délku bublání ustoupil do pozadí. Bucharský bublák je největším plemenem bubláků a je z nich také nejznámější a celosvětově nejrozšířenější. V Česku se ale téměř nechová. Plemeno se však podílelo na vzniku většiny jiných plemen bubláků, včetně českého národního plemene český bublák. V českém vzorníku plemen holubů se bucharský bublák řadí mezi barevné holuby do podskupiny bubláci, v seznamu plemen EE náleží do samostatné plemenné skupiny bubláci a to pod číslem 0501. Kvůli rozvoji pernatých ozdob je bucharský bublák někdy řazen i mezi strukturové holuby. Historie Bucharský bublák je staré plemeno. Název získal podle uzbeckého města Buchara, z jehož okolí pochází. Už v druhé polovině 19. století se bucharský bublák z Ruska dostal do Evropy, nejprve do zoologických zahrad, následně se rozšířil do chovů a stal se základem pro šlechtění evropských rousných plemen bubláků. Na začátku 20. století se v Praze nacházel chov bucharského bubláka celosvětového významu, jehož chovatelem byl tehdejší šéfredaktor časopisu Zvířena, Antonín Král. Popis Bucharský bublák je poměrně velký holub kompaktního vzhledu, který je kromě samotného vzrůstu ptáka dán i výrazně nakypřeným, bohatým opeřením. Pernaté ozdoby jsou mohutně vyvinuté, čelní růžice překrývá oči, je doplněna lasturovitou chocholkou a nohy jsou porostlé dlouhými, do široka rozloženými rousy. Hlava je velká, široká a plochá, zdobená dvěma vrkoči: přední vrkoč je bohatě propeřená čelní růžice se středem nad ozobím. Z tohoto víru vyrůstají dlouhá pírka všemi směry, vpředu zakrývají téměř celý zobák, po stranách oči a dále kryjí celé temeno hlavy. Vzadu se čelní růžice spojuje s opeřením zadního vrkoče. Zadním vrkočem je vysoce postavená bohatá lasturovitá chocholka, která se táhne od ucha k uchu ptáka a je zakončená výraznými postranními růžicemi. V zátylí vrkoč pokračuje v podobě hřívy až na horní část krku. Zobák je středně dlouhý, silnější, s malým a jemným ozobím. U černých a modrých barevných rázů je tmavý, u ostatních rohový až narůžovělý. Oční duhovka je perlová, u bílých tmavá, vikvová. Krk je krátký a velmi silný a přechází v širokou a dobře klenutou hruď. Trup je nízký a široký, hřbet se jen málo svažuje a držení těla je skoro vodorovné. Ocas je nesen v linii hřbetu. Křídla jsou poměrně dlouhá, jejich letky dosahují až ke konci ocasu. Nohy jsou…"} {"instruction": "Compose a function in C to display the result of raising a number to a positive power", "input": "", "output": "int power(int k, int n) { int result = 1; while (n > 0) { result *= k; n--; } return result; }"} {"instruction": "Generate a program to get the min and max values from a list in one line.", "input": "", "output": "def get_min_max(lst): return min(lst), max(lst)"} {"text": "[HI Wikipedia] अर्गाइल पिंक जुबली\n\nअर्गाइल पिंक जुबली () ऑस्ट्रेलिया में खुदाई से प्राप्त बगैर तराशा हुआ अब तक का सबसे बड़ा गुलाबी हीरा है। इस हीरे को वेस्टर्न ऑस्ट्रेलिया के रियो टिण्टो आर्गाइल हीरा खदान में पाया गया है। आमतौर पर आर्गाइल पिंक जुबली जैसे कीमती पत्थर या तो किसी अजायबघर में रख दिये जाते हैं या क्रिस्टी'ज जैसे ऊँचे नीलामी घरों में चले जाते हैं। क्रिस्टी ने अपने २४४ वर्षों के इतिहास में केवल १८ ऐसे तराशे हुए गुलाबी हीरों की नीलामी की है जिनका वजन १० कैरेट से अधिक रहा हो। मूल रूप से १२.७६ कैरट (२.५५ ग्राम) वजन के हल्के गुलाबी हीरे को रिचर्ड हाऊ किम कैम ने फरवरी २०१२ में पर्थ में तराशना शुरू किया। तराशे जाने के दौरान ही इस हीरे के भीतर एक बड़ी कमी का पता चला जिसे दूर नहीं किया जा सका। केवल मौटे तौर आकार देकर और सँवारकर, ८.०१ कैरट (१.६० ग्राम) के इस हीरे को मेलबर्न अजायबघर को दान कर दिया गया। सन्दर्भ बाहरी कड़ियाँ म्यूज़ियम विक्टोरिया पर अर्गाइल पिंक जुबली Precious pink sparkler lights up museum हीरा नामित हीरे"} {"instruction": "Generate a unique ID in Python for a given string.", "input": "string = \"Hello World!\"", "output": "import uuid\nunique_id = uuid.uuid3(uuid.NAMESPACE_DNS, string)"} {"instruction": "Reverse the order of the given array without using inbuilt functions.", "input": "nums = [12, 23, 34, 45]", "output": "# Function to reverse the order of the given array def reverse_array(nums): # Variable to store the result result = [] # Iterate over the provided array starting from the last element for i in range(len(nums) -1, -1, -1): # Append each number to the result array result.append(nums[i]) # Return the result array return result # Test the function by printing the array in reverse order print(reverse_array(nums))"} {"text": "[CS Wikipedia] Luboš Patera\n\nLuboš Patera (10. dubna 1963 Kladno – 11. listopadu 2020) byl občanský aktivista bojující za práva dětí v Česku a na Slovensku. Působil v občanském sdružení pro ochranu práv dětí, rodičů a prarodičů – Iustin. Šlo o jednoho z prvních otců, kteří uspěli se svojí žalobou proti České republice u Evropského soudu pro lidská práva. Byl zastáncem Cochemského modelu pro přístup státu k řešení rozchodu / rozvodu rodičů a propagátorem střídavé péče. Reference Externí odkazy Iustin - sdružení pro ochranu práv dětí, rodičů a prarodičů Čeští aktivisté Narození 10. dubna Narození v roce 1963 Narození v Kladně Úmrtí v roce 2020 Úmrtí 12. listopadu Muži"} {"instruction": "Construct a code that takes a list of words as input and changes the case of each item in the list.", "input": "[cat, dog, apple]", "output": "def toUpperCase(words): upper_words=[] for word in words: upper_words.append(word.upper()) return upper_words if __name__ == \"__main__\": print(toUpperCase(['cat','dog','apple']))"} {"text": "[CS Wikipedia] Freestyle\n\nFreestyle je forma elektronické hudby, který vznikl na začátku 80. let ve Spojených státech. Popularita žánru přebývá až do dneška, především v portorických a italských komunitách. Historie Freestyle se vyvinulo v New Yorku a Miami na přelomu osmdesátých let jako fúze disca pozdějších sedmdesátých let s elektronickými synkopickými hudebními nástroji electra osmdesátých let. Styl si oblíbili především \"breakdanceři\". Mezi nejstarší freestyle skladby mimo jiné patří song \"Planet Rock\" (1982) od Afrika Bambaataa & Soul Sonic Force a \"Let the Music Play\" (1983) od Shannon. Freestyle rovněž ovlivnilo techniku samplování, což je typickým znakem hip hopové hudby. V 90. letech freestyle proniklo do popové hudby a mezi nejznámější hudebníky této popové variace patří MC Hammer, Paula Abdulová, Bobby Brown, New Kids on the Block a Milli Vanilli. Hudebníci Shannon Lisa Lisa and Cult Jam Company B Sweet Sensation Timmy T Brenda K. Starr The Cover Girls Exposé Stevie B TKA George Lamond Sa-Fire Information Society Noel Nocera Laissez Faire Shana Petrone Tolga Dino Joee Desimone Fascination Seduction India Denise Lopez Linear Collage Teena Marie Stacey Q Pajama Party Pvxtrvk Slvxvk Externí odkazy Elektronická taneční hudba"} {"instruction": "Create a simple Python program to calculate the sum of two numbers and print out the result.", "input": "Number 1: 3\nNumber 2: 5", "output": "num1 = 3\nnum2 = 5\n\nresult = num1 + num2\n\nprint(f'The sum of {num1} and {num2} is {result}')"} {"instruction": "Generate a SQL query to update the job title for all the employees with name 'John'", "input": "", "output": "UPDATE employees SET JobTitle = 'Software Engineer' WHERE Name = 'John'"} {"instruction": "What is a JavaScript Promise?", "input": "", "output": "A JavaScript Promise is an object that represents the eventual completion of an asynchronous operation. A Promise object can be either resolved (successful) or rejected (failed). It provides a unified API for handling asynchronous operations, no matter when the operations are completed."} {"text": "[DE Wikipedia] Patsy Reddy\n\nDame „“ (* 17. Mai 1954 in , ) ist eine neuseeländische Rechtsanwältin und war von 2016 bis 2021 die 21. Generalgouverneurin von Neuseeland. Frühes Leben und Ausbildung wurde 1955 als Tochter des Ehepaars und in geboren. Ihre Eltern waren beide Lehrer. Sie wuchs zunächst in und später in in der Region auf. Als sie sechs Jahre alt war, zogen ihre Eltern nach , wo sie nacheinander die , die und die besuchte. Ihr Studium in Rechtswissenschaft schloss sie 1979 an der mit dem und ab. Karriere Nach ihrem Abschluss arbeitete sie als Dozentin an der ihrer Universität. 1982 verließ sie dann den universitären Bereich und nahm eine Tätigkeit als Rechtsanwältin in dem australischen Unternehmen mit Sitz in und auf, später in umbenannt. 1983 stieg sie dort als Geschäftspartnerin ein. 1987 ging sie zu und übernahm dort die Managerposition für den Bereich „Spezielle Projekte“. 1999 entschied sie sich, mit zwei Kollegen das Unternehmen zu gründen, das im Investmentgeschäft tätig wurde. war Vorstandsvorsitzende der , stellvertretende Vorsitzende der und Chefverhandlerin für die --Ansiedlungen und . Bevor sie das Amt des Generalgouverneurs antrat, arbeitete sie zuletzt zusammen mit an einer Überarbeitung der Gesetzgebung für die New Zealand’s intelligence agencies. Am 14. September 2016 wurde sie zum 21. ernannt und löste damit ab. Wie üblich endete ihr Amt nach etwa fünf Jahren im Oktober 2021. Zu ihrer Nachfolgerin wurde Cindy Kiro ernannt. Auszeichnungen und Ehrungen 2014 wurde für ihre Verdienste und Engagements im Bereich der Kunst, ihrer Rolle in der Unterstützung des , des und der Organisation der mit dem (DNZM) ausgezeichnet. Außerdem engagierte sich in der Hilfsorganisation St John und wurde dort mit dem Status eines Prior ausgezeichnet. Weblinks Einzelnachweise Generalgouverneur (Neuseeland) Politiker (21. Jahrhundert) Rechtsanwalt (Neuseeland) Dame Grand Companion des New Zealand Order of Merit Commander des Royal Victorian Order Träger des Order of Saint John Neuseeländer Geboren 1954 Frau"} {"text": "[EN Wikipedia] We Rule the Night\n\nWe Rule the Night is the fourth studio album by Swedish metalcore band Sonic Syndicate. The album was released on August 27, 2010 through Nuclear Blast and was produced by Toby Wright. We Rule the Night is the first full-length release by the band to feature the vocals of Nathan James Biggs (former Hollow Earth Theory singer) who replaced former singer Roland Johansson who left the band in 2009. However, it is also the last album to feature founding members Richard and Roger Sjunnesson, who both left the band in October 2010 and May 2012 respectively. The band toured Europe to support the album with the \"We Rule the World Tour\", starting on September 15, 2010 with Christoffer Andersson standing in for Richard. Writing and recording Sonic Syndicate started working on the pre-production of the new album as of January 2010 and soon after announced that the producer for the album would be legendary U.S. producer Toby Wright. The main recording of the album took place at Bohus Sound Studios in Kungälv, Sweden. February 23, 2010 announced that they were finished with the recording the album. As of March 2010, although the album was being mixed and mastered in Sweden, Toby Wright returned to USA to begin the final mixing and mastering on the album at the Paramount Studios in North Hollywood, California. As of March 7, 2010, the album was complete, although after much delay it wouldn't be released until six months later. This is the first Sonic Syndicate album to have two lyricists and also the first album which Robin Sjunnesson makes a significant contribution to the songwriting, writing alongside the new singer Nathan J. Biggs seven songs on the album. This is one of many features that possibly gave We Rule The Night a very different sound compared to previous material. Release and promotion On November 6, 2009, the band released the EP Burn This City featuring the single and radio version of the title track \"Burn This City\" and a non-album track called \"Rebellion in Nightmareland\". \"Burn This City\" went under a different mix for the album version to make it fit the style and sound of We Rule the Night. On May 4, 2010, Nuclear Blast offered a free download of the album version. On March 5, 2010, the band revealed the title and artwork for We Rule the Night. The artwork was created by Gustavo Savez of Abstrata Art, the same artist who made the artwork for Burn This City in 2009. On March 19, 2010, the band revealed the full track listing of the standard CD version of the album and that there would be a limited digipack edition with a bonus DVD and two bonus tracks. The lead single \"Revolution, Baby!\" had its world premiere on the Swedish radio station Bandit Rock on May 5, 2010. On May 7, 2010, the single was made available for purchase and download on…"} {"text": "[EN Wikipedia] Net foreign assets\n\nIn economics, the concept of net foreign assets relates to balance of payments identity. The net foreign asset (NFA) position of a country is the value of its net claims on the rest of the world (RoW), i. e. the value of the assets that country owns abroad, minus the value of the domestic assets owned by foreigners: The net foreign asset position of a country reflects the indebtedness of that country. The traditional balance of payments identity Traditional balance-of-payments accounting is that the change in the net foreign asset position equals the current account balance. In other words, if a country runs a $700 billion current account deficit, it has to borrow exactly $700 billion from abroad to finance the deficit and therefore, the country's net foreign asset position falls by $700 billion. The augmented balance of payments identity The traditional balance of payments identity does not take into account changes in asset prices and exchange rates. For example, the value of external assets or liabilities can change due to higher or lower stockmarket prices or a default/write-off on debt. Similarly, changes in exchange rates will affect the value of foreign assets and liabilities. An appreciation of a country's currency will decrease both the value of assets denominated in foreign currency and the burden of liabilities denominated in foreign currency. The value of assets and liabilities denominated in the home currency will not be affected by changes in the exchange rate. Suppose the same country has some assets it owns abroad, and the value of these assets appreciates by $700 billion. The appreciation of asset prices, referred to as \"positive valuation effects\" in this case exactly offsets the current account deficit. At the end of the day, the country's net foreign asset position remains unchanged, despite the $700 billion current account deficit. The effect will be the same if the value of the country's external liabilities falls by $700 billion, or the gains in value of its foreign assets minus the gains in value of its liabilities is $700 billion. The net foreign asset position equals the current account plus valuation effects: See also Net international investment position International macroeconomics Macroeconomic indicators"} {"instruction": "Describe in Python a custom exception for handling database connection errors.", "input": "", "output": "class DBConnectionError(Exception): def __init__(self, message): self.message = message def __str__(self): return 'An Error Occured:\\n\\t' + self.message"} {"instruction": "Manually debug the following code to find any errors.", "input": "def foo(x): y = x**3 z = y + 2 return z", "output": "No errors found in the given code."} {"instruction": "Rewrite this function using a recursive algorithm.", "input": "def factorial(n): result = 1 for i in range(1, n+1): result *= i return result", "output": "def factorial(n): if n == 0: return 1 else: return n * factorial(n-1)"} {"text": "[EN Wikipedia] Laura Angela Collins\n\nLaura Angela Collins is a London-based Irish Traveller activist and author. Early life Collins was born and raised in Bermondsey, London to Irish parents and attended the BRIT School for performing arts and technology. Her grandmother, Angelina Collins, renamed Angela, is buried in a mass grave in St. Finbarr's Cemetery in County Cork with 72 other women, after working for 27 years in a Magdalene laundry. Collins has campaigned for her grandmother's exhumation and for apologies from the Irish government and Catholic Church. Collins' mother, Mary Teresa Collins, is a survivor of the industrial school system in Ireland, and was a child resident of St Vincent's Magdalene Laundry in Cork. Career Collins chairs an Irish Traveller led survivor support group, she has published research regarding the Irish Traveller community, and the Tuam Mother and Baby Home, where 800 babies are in a mass grave in Tuam, County Galway. She has also undertaken research on Irish institutions such as industrial schools, mother and baby homes, county homes and the Magdalene Laundries and has been a critic of the Mother and Baby Homes Commission of Investigation and past investigations into child abuse such as the Commission to Inquire into Child Abuse and the McAleese Report (formally known as the Report of the Inter-Departmental Committee to establish the facts of State involvement with the Magdalen Laundries). In July 2015 Collins arranged a protest in Dublin she flew over from London with her family to peacefully stand outside the Dáil Éireann. On the day Laura’s mother Mary stated she believes the mass grave her mother is within is filled with Traveller women subjected to the same inhumane treatment that she received while in the Industrial Schools. In September 2015 Collins had called on the Irish government to fast track the redress scheme for aging survivors, and to grant free legal aid to people taking a case to the Mother & Baby Homes Commission and for the government and the church to support and fund families to remove their loved ones from mass graves and give them their own burial. She wrote to the Minister for Justice calling for justice for the forgotten families of the victims of institutional abuse. Although it was arranged for a meeting with the Justice Department to deliver the letter, as they approach on their arrival the doors were locked. On 27 January 2017, Collins and her mother held a service at her grandmother's, Angela Collins, mass grave in St. Finbarr's Cemetery for all the women and children who had died within Irish institutions. Collins said to the TheJournal.ie her grandmother was \"a good mum and all the children were healthy, Angelina did not go out and rob a shop and got herself arrested – she was a mother caring for her children. All it is…"} {"instruction": "Design a Python class structure for playing cards with two classes: Deck and Card.", "input": "", "output": "class Deck: def __init__(self): self.cards = [] def populate(self): suits = ['Hearts', 'Spades', 'Clubs', 'Diamonds'] numbers = [2,3,4,5,6,7,8,9,10,'Jack','Queen','King','Ace'] for suit in suits: for number in numbers: self.cards.append(Card(suit, number)) def shuffle(self): random.shuffle(self.cards) def deal(self): card = self.cards.pop() return card class Card: def __init__(self, suit, number): self.suit = suit self.number = number"} {"instruction": "In JavaScript, what is the difference between var and let?", "input": "", "output": "The main difference between the \"var\" and \"let\" keywords in JavaScript is their scope. Variables declared with the \"var\" keyword have a function scope and are available throughout the entire function, while variables declared with \"let\" have a block scope and are available only in the block in which they are declared."} {"instruction": "Create a program in Python to print out the most frequent word in a given dictionary", "input": "d = {'dog':3, 'cat':5, 'bird':4, 'horse':7}", "output": "# Initialize a variable for the maximum count\nmax_count = 0\n\n# Initialize a variable for the most frequent word\nmost_frequent_word = \"\"\n\n# Loop the dictionary\nfor key, value in d.items():\n if value > max_count:\n max_count = value\n most_frequent_word = key\n\n# Print the most frequent word\nprint(\"The most frequent word is '{}'\".format(most_frequent_word))"} {"instruction": "Make the following changes to a JavaScript program.", "input": "let num1 = 10; let num2 = 8;", "output": "let num1 = 10; let num2 = 8; let sum = num1 + num2; console.log(sum); // Output will be 18."} {"instruction": "In C++, write a code snippet to print \"Welcome to GeeksforGeeks\" 10 times using a for loop.", "input": "", "output": "for (int i = 0; i < 10; i++) { cout << \"Welcome to GeeksforGeeks\" << endl; }"} {"text": "[DE Wikipedia] Ulrike Röttger\n\nUlrike Röttger (* 1966 in Kamen) ist eine deutsche Kommunikationswissenschaftlerin. Seit 2003 ist sie Professorin für Public Relations am Institut für Kommunikationswissenschaft der Westfälischen Wilhelms-Universität in Münster. Im Mai 2008 wurde sie zur Vorsitzenden der Deutschen Gesellschaft für Publizistik und Kommunikationswissenschaft gewählt. Biographie Ulrike Röttger studierte Journalistik an der Technischen Universität Dortmund. Danach war Röttger von 1993 bis 1994 Mitarbeiterin einer Agentur für Kommunikationsberatung und PR in Bochum und wissenschaftliche Mitarbeiterin an verschiedenen Instituten. 1999 wurde sie mit der Arbeit \"Public Relations – Institut und Profession\" promoviert. Seit 2003 ist sie Professorin in Münster. Ihre Schwerpunkte in Forschung und Lehre sind: Public Relations, insbesondere Hochschul-PR CSR-Kommunikation Kampagnenkommunikation Issues Management Interne Kommunikation Online-PR/Weblogs Kommunikationsberatung Kommunikatorforschung Public Relations Von einer Modellierung von Öffentlichkeitsarbeit als gesellschaftliches Teilsystem distanziert Röttgers sich, da sie in Frage stellt, ob die Public Relations überhaupt als autonomes autopoietisches System im Sinne der Systemtheorie angesehen werden können. In ihren Augen unterscheidet sich PR je nach Auftraggeber zu stark, um eine Primärfunktion auszumachen, welche ausschließlich von der PR für die Gesellschaft erbracht wird bzw. um so eine Leitdifferenz zu finden. Die Autonomie der PR als Teilsystem sei fragwürdig, da sie ihre Entscheidungsstandards und -strukturen nicht unbedingt selbst entwickelt. Durch den systemtheoretischen Standpunkt seien Beobachtungen über Public Relations außerdem sehr schwer zu operationalisieren. Röttger hat sich insbesondere damit beschäftigt, wie Public Relations unter Rückgriff auf strukturationstheoretische Ansätze (Giddens 1984; 1997) theoretisch fundiert und empirisch analysiert werden kann (Röttger 2000; Jarren/Röttger 2004). Der Strukturationstheoretisch begründete Ansatz der PR nach Jarren und Röttger unterscheidet mehrere Funktionen der PR: Interpenetration: PR verkoppelt die Organisation mit strategisch relevanten Umweltsystemen durch das Etablieren von Interpenetrationszonen. Steuerung: Kontextsteuerung von Umweltsystemen u. a. durch Kommunikation und Steuerungsressourcen. Reflexierung: Einspeisung von zur Legitimation relevanter Fremdbeschreibungen in das Organisationssystem durch systematische Umweltbeobachtungen Literatur (Auswahl) als Herausgeberin: PR-Kampagnen. Über die Inszenierung von Öffentlichkeit. Westdeutscher Verlag, Opladen 1997, ISBN 3-531-12950-3 (2., überarbeitete und ergänzte Auflage. ebenda 2001, ISBN 3-531-32950-2). als Herausgeberin: Issues Management. Theoretische Konzepte und praktische Umsetzung. Eine…"} {"instruction": "Create a code that recognizes if an inputted string is a palindrome or not.", "input": "", "output": "def is_palindrome(input_string): rev_input = input_string[::-1] return input_string == rev_input"} {"instruction": "What is the command for executing a code written in Java?", "input": "", "output": "The command for executing a code written in Java is \"java [filename]\"."} {"instruction": "Write a Python program to create an array containing 10 random numbers from 1 to 10 and sort them in ascending order.", "input": "", "output": "import numpy as np\n\n# Create an array of 10 random numbers between 1 to 10\narr = np.random.randint(low=1, high=11, size=10)\n\n# Sort the array in ascending order\narr.sort()\n\nprint(arr)"} {"instruction": "Define a function in Python that takes two strings and returns a new string which is the concatenation of the two.", "input": "\"Hello\" and \"World\"", "output": "def concatenate_two_strings(str_1, str_2):\n return str_1 + str_2\n\nconc_str = concatenate_two_strings(\"Hello\", \" World\")\nprint(conc_str)"} {"text": "[DE Wikipedia] Karl Hoppe\n\nKarl Hoppe ist der Name folgender Personen: * Karl Hoppe (Philologe) (1868–1946), deutscher Klassischer Philologe Karl Hoppe (Germanist) (1892–1973), deutscher Germanist Karl Hoppe (Politiker, 1898) (1898–1963), deutscher Politiker (SPD, KP), MdL Saarland Karl Hoppe (Rennfahrer) (1923–1987), deutscher Motorradrennfahrer Karl Hoppe (Politiker, 1934) (1934–2002), deutscher Politiker (CDU), MdL Rheinland-Pfalz"} {"text": "[HI Wikipedia] ग्रिम की परी कथाएँ\n\nबच्चों की और घरेलू कथाएँ () जर्मन लोक कथाओं का एक संग्रह है जो ग्रिम भाइयों - जैकब और विल्हेल्म के द्वारा १८१२ में प्रकाशित किया गया था। आज इस संग्रह को ग्रिम की परी कथाएँ के नाम से जाना जाता है ()। रचना इन कथाओं के कुल सात संपादन प्रकाशित हुए - पहला संपादन पहला संस्करण -१८१२ - ८६ कथाएँ दूसरा संस्करण - १८१४ - ७० कथाएँ दूसरा संपादन पहले दो संस्करण - १८१९ तीसरा संस्करण - १८२२ कुल १७० कथाएँ परी कथाएँ ग्रीम बंधुओ द्वारा ८६ कथाओं का प्रथम अंक सं १८१२ ईस्वी में प्रकाशित किया गया .दूसरा अंक सं १८१५ ईसवी में प्रकाशित किया गया जिसमे ७० कथाएं थीं इसका दूसरा संस्करण १८१९ में दो भागो में तथा तीसरा संस्करण १८२२ में प्रकाशित हुआ जिसमे १७० अथाओं का समावेश था .सातवे संस्करण में कुल 211 कथाएं थीं प्रथम संस्करण की कथों को बाल -कथा के तौर पर प्रस्तुत करने पार उनकी आलोचना हुई ,जन्हे बाद में परिवर्तित और परिवर्धित किया गया ."} {"instruction": "Use JS to create an object called `user` which contains two properties: `name` with a string value of \"John\", and `age` with a numeric value of 25.", "input": "", "output": "let user = { name: \"John\", age: 25 };"} {"instruction": "Write a Python program to traverse a given array from the end and replace each odd number with the product of the previous and next neighbors.", "input": "[1, 3, 5, 7, 9, 11, 13]", "output": "def neighbor_product(arr):\n # loop through array elements in reverse order\n for i in range(len(arr)-1, 0, -1):\n # check if element is odd\n if arr[i] % 2 == 1:\n # replace element with product of the previous and next neighbors\n arr[i] = arr[i-1] * arr[i+1]\n return arr\n\narr = [1, 3, 5, 7, 9, 11, 13]\n\nupdated_arr = neighbor_product(arr)\nprint(updated_arr)"} {"instruction": "Print out the prime numbers between 0 to 100.", "input": "", "output": "for n in range(2, 101): for i in range(2, n): if n % i == 0: break else: print(n, end = ' ')"} {"instruction": "Design an algorithm to find the maximum subarray of an array of numbers.", "input": "", "output": "def max_subarray(arr): max_so_far = 0 max_ending_here = 0 for i in range(len(arr)): max_ending_here = max_ending_here + arr[i] if max_ending_here < 0: max_ending_here = 0 if (max_so_far < max_ending_here): max_so_far = max_ending_here return max_so_far"} {"text": "[DE Wikipedia] Nur dem Namen nach\n\nNur dem Namen nach (OT: In Name Only) ist ein US-amerikanischer Spielfilm mit Carole Lombard, Cary Grant und Kay Francis in den Hauptrollen unter der Regie von John Cromwell. Handlung Alec Walker ist unglücklich mit Maida, einer durch und durch berechnenden Frau, verheiratet. Sie hat Alec nicht aus Liebe geheiratet, sondern um Armut und Mangel zu entkommen. Jetzt nutzt sie ihren Mann aus und treibt ihn mit ihrer emotionalen Kälte in die Trunksucht. Alle Welt gibt Alec die Schuld an der Misere und lobt im Gegenzug Maida für ihre scheinbar unendliche Geduld und Nachsicht. Vor allem Alecs Eltern werfen ihm unentwegt vor, dass er seine Frau rücksichtslos behandle. Eines Tages lernt Alec die junge Künstlerin Julie Eden kennen, deren Mann vor kurzem gestorben und die daraufhin mit ihrer kleinen Tochter Ellen in ein Cottage gezogen ist. Beide verlieben sich ineinander und Alec beschließt, sein Leben von Grund auf zu ändern. Die Leute fangen an, über die beiden Liebenden zu tuscheln und durch Zufall lernen sich auch Maida und Julie kennen. Zunächst unschlüssig über den weiteren Verlauf, willigt Maida schließlich ein, sich scheiden zulassen, da Alec ihr eine großzügige Abfindung zugestehen will. Kurz vor der Abfahrt nach Paris, wo alles möglichst geräuschlos über die Bühne gehen soll, stachelt Suzanne, eine intrigante Frau, die mehrfach versucht hat, Alec zu verführen und ihm kein Glück bei einer anderen gönnt, Maida auf, die Scheidung abzublasen. Alec verfällt nach diesem Rückschlag immer mehr dem Alkohol und bekommt eine Lungenentzündung. Er liegt schon fast im Sterben, als Julie sehr widerstrebend von Alecs Mutter die Erlaubnis bekommt, an sein Bett zu treten. Maida ist außer sich und beschimpft Julie. Sie sagt, sie habe Alec nur aus Geldgier geheiratet und niemand werde ihr die Position streitig machen, selbst wenn Alec an gebrochenem Herzen sterben sollte. Ihr Schwiegervater hört jedoch die Konversation und weist Maida aus dem Haus. Alec fasst neuen Lebensmut und die Liebenden haben endlich eine Zukunft. Hintergrund Kay Francis hatte Ende 1938 nach einem erbitterten Streit mit Warner Brothers ihren Studiovertrag erfüllt. Vorangegangen war ein Gerichtsverfahren, das Francis Ende 1937 angestrengt hatte, um vorzeitig aus ihrem laufenden Vertrag aussteigen zu können. Sie gab an, das Studio habe ihr nur minderwertige Drehbücher angeboten und mündliche Zusagen, sie in besseren Rollen wie Tovarich oder Drei Schwestern aus Montana einzusetzen, gebrochen. Das Studio versuchte zunächst, die Schauspielerin aus ihrem laufenden Vertrag rauszukaufen, und bot an, ihr 50 % der noch ausstehenden Gagen zu zahlen. Francis lehnte ab und das Verfahren endete im September 1937 mit einem Vergleich. Warner Brothers setzten die Schauspielerin fortan nur noch in B-Movies ein, um…"} {"instruction": "Using the provided HTML structure and jQuery code, change the background color to green when the button is clicked.", "input": "

    Hello World!

    ", "output": "

    Hello World!

    "} {"instruction": "Create a Node.js function to validate an email with a given regex.", "input": "", "output": "function validateEmail(email) { var re = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/; return re.test(email); }"} {"instruction": "Create a python class that generates a multiplication quiz.", "input": "", "output": "class MultiplicationQuiz:\n def __init__(self, num_questions):\n self.num_questions = num_questions\n \n def generate_quiz(self):\n # Generate num_questions random questions \n for _ in range(self.num_questions):\n num1 = random.randint(1, 12)\n num2 = random.randint(1, 12)\n print(f'What is {num1} x {num2}?')\n\n# Test\nquiz = MultiplicationQuiz(10)\nquiz.generate_quiz()"} {"instruction": "Design an algorithm using Python to select the kth largest element from a list.", "input": "[5, 10, 15, 20, 25]", "output": "def getKthLargest(arr, k): \n arr.sort() \n \n # Return the k'th largest element\n return arr[len(arr)-k]"} {"instruction": "Design a process in Python for extracting information from a given database.", "input": "", "output": "import sqlite3\n\n# Connecting to the Database file\nconn = sqlite3.connect('')\n\n# Creating a cursor to work with database\ncursor = conn.cursor()\n\n# Executing a query\nresult = cursor.execute(\"SELECT FROM
    WHERE \")\n\n# Storing the results in a list while iterating over it\ndata = [row for row in result]\n\n# Closing the connection\nconn.close()"} {"instruction": "Find all words that contain the string \"ed\" in the provided text.", "input": "She's a very dedicated person, who always tries to get the job done.", "output": "dedicated, tried"} {"instruction": "Describe the working of a recursive function.", "input": "", "output": "A recursive function is a function that calls itself until a certain condition is met. It takes in an argument and performs some operation, then calls itself with a modified version of the argument until the condition is satisfied. The result of each call is combined in some fashion to form the final output. This allows the same method to be used to solve several different problems."} {"instruction": "Write a CSS code to make a dive tag red with a background color of yellow.", "input": "", "output": "div { background-color: yellow; color: red; }"} {"instruction": "In Python, write code to sort a list of integers in ascending order.", "input": "[9, 15, 5, 11, 4]", "output": "def sort_list(list_of_numbers): list_of_numbers.sort() return list_of_numbers print(sort_list([9, 15, 5, 11, 4])) # Output: [4, 5, 9, 11, 15]"} {"instruction": "Write a JavaScript code snippet to track the mouse movement.", "input": "", "output": "document.addEventListener(\"mousemove\", function(e) { console.log(\"mouse is at x:\" + e.clientX + \" y:\" + e.clientY); });"} {"text": "[CS Wikipedia] Vodní bilance\n\nVodní bilance je poměr mezi příjmem a výdejem tekutin. Denní příjem a ztráta tekutin by měly být v rovnováze. Voda tvoří 50 – 75 % celkové tělesné hmotnosti. Rozdíly jsou dány především podílem tuku v těle. Netuková tělesná hmota obsahuje konstantní množství vody (75 %), zatímco v tukové tkáni je obsah vody malý. Tuková tkáň obsahuje jen asi 23 % vody, proto ji lidé s nadváhou mají v těle jen okolo 40 %, zatímco špičkoví sportovci se blíží právě těm 75 %. Většina tělesné vody je ve svalové tkáni a v krvi. Každý den jí ztrácíme dýcháním, trávením, vylučováním a potem. Doplňování tekutin je způsob, jak pokrýt každodenní ztráty. U sportovce jsou tyto ztráty mnohem vyšší, a proto je důležité věnovat příjmu tekutin značnou pozornost. Pokud tomu tak není, nedostatek tekutin způsobuje zvýšení koncentrace metabolitů, dřívější únavu, prodloužení doby regenerace a pokles fyzické výkonnosti. Při ztrátách vody (v potu, moči, stolici) dochází také ke ztrátám minerálních látek, které pomocí osmotického tlaku řídí rozložení tekutin v těle. Optimální množství příjmu tekutin se pohybuje kolem 2 litrů za den (u dospělého člověka přibližně 40 ml.kg−1), sportovec s pravidelnou fyzickou zátěží má spotřebu tekutin vyšší. Příjem a výdej tekutin Tělo zdravého štíhlého muže s hmotností 70 kg obsahuje celkem asi 42 l vody. Obrat vody v organismu je větší než obrat všech ostatních látek: u osoby se sedavým způsobem života žijící v mírném klimatu činí denní obrat vody 2 – 4 l (5 – 10 %) celkového tělesného obsahu vody. Průměrný obrat vody u 70 kg muže činí tedy zhruba 3 l. Z těchto 3 l přijme cca 1600 ml ve formě nápojů, 1000 ml ve formě potravin a asi 400 ml tvoří metabolická voda z přeměny látek. Vzhledem k tomu, že výdej a příjem mají být v rovnováze, bude výdej vody taky okolo 3 l. Ten tvoří moč cca 1400 ml, vydechovaný vzduch 320 ml, vypařování kůží 530 ml, pocení 650 ml, stolice 100 ml. Reference Související články Nápoj Pitný režim Tělní tekutiny Nápoje Výživa"} {"instruction": "Create a Python function that takes in a list of numbers, evaluates every 3rd number in the list and returns the total.", "input": "[3, 8, 7, 4, 9, 2, 1, 6]", "output": "def evaluate_list(nums_list):\n # set counter to 0\n counter = 0\n # set total as 0\n total = 0 \n # iterate through list\n for num in nums_list:\n # check if counter divides by 3\n if counter%3 == 0:\n # add number to total\n total += num\n # increment counter\n counter += 1\n #return total\n return total\n\nnums_list = [3, 8, 7, 4, 9, 2, 1, 6]\nresult = evaluate_list(nums_list)\n\nprint(result)\n# Output: 14"} {"instruction": "Add a function to the following JavaScript code to search a value in a given array", "input": "const arr = [12, 5, 8, 130, 44];", "output": "const arr = [12, 5, 8, 130, 44]; function searchValue(arr, value) { for (let i = 0; i < arr.length; i++) { if (arr[i] === value) { return (i); } } return -1; }"} {"text": "[EN Wikipedia] 2010 Giravanz Kitakyushu season\n\n2010 Giravanz Kitakyushu season Competitions Player statistics Other pages J. League official site Giravanz Kitakyushu Giravanz Kitakyushu seasons"} {"instruction": "Write a procedure in PL/SQL to count the number of employees in a company.", "input": "", "output": "CREATE OR REPLACE PROCEDURE count_employees AS BEGIN SELECT COUNT(*) FROM Employees; END;"} {"instruction": "Create a function in Python to return the length of the longest word in a list of words.", "input": "words = [\"cat\", \"longestword\", \"dog\", \"night\"]", "output": "def findLongestWordLength(words):\n longest_length = 0\n for word in words:\n if len(word) > longest_length:\n longest_length = len(word)\n return longest_length\n\nlongest_word_length = findLongestWordLength([\"cat\", \"longestword\", \"dog\", \"night\"])\nprint(longest_word_length)"} {"text": "[EN Wikipedia] Seaforth River\n\nThe Seaforth River is a river in New Zealand, flowing into Dusky Sound. About and up from Supper Cove in Dusky Sound is Lake Maree. The river rises about another to the north, on the slopes of the Black Giants, at about . Like many former British Empire locations, it and its lakes have Scottish names. The river was first mapped in 1896 by Thomas Mackenzie, who was briefly Prime Minister in 1912. He described cataracts of , and between the Sound and the Loch and named the river after himself. However, in 1897 E. H. Wilmot discovered that the Mackenzie and Seaforth were the same river and removed the former name. The route Mackenzie followed is now part of the Dusky Track. It was thought that few had followed the route until at least 1950. Carbon dating of beech tree stumps in Lake Maree indicate it was formed when a large rock fall dammed the river during the 1826 earthquake. Near Kintail Hut, Gair Loch is another debris dammed lake. Further debris fell, probably during the 2011 Christchurch earthquake. Mackenzie described the vegetation as mainly birch, with red-pine, rata, and some totara. He said that there were also ribbon-wood, panax, mikimiki, pepper-tree, mokomoko, tutu, ferns and mosses. A 1981 survey identified six native fish - Anguilla dieffenbachii, Prototroctes oxyrhynchus, Galaxias maculatus, Galaxias fasciatus, Galaxias brevipinnis and Gobiomorphus huttoni. Moose were liberated in the valley in 1910, but it is not thought that they survived. See also List of rivers of New Zealand References Rivers of Fiordland"} {"text": "[HI Wikipedia] सचिन तेंदुलकर\n\nसचिन रमेश तेंडुलकर Sachin Tendulkar, जन्म: 24 अप्रैल 1973) क्रिकेट के इतिहास में विश्व के सर्वश्रेष्ठ बल्लेबाज़ में माने जाते हैं। भारत के सर्वोच्च नागरिक सम्मान भारत रत्न से सम्मानित होने वाले वह सर्वप्रथम खिलाड़ी और सबसे कम उम्र के व्यक्ति हैं। राजीव गांधी खेल रत्न पुरस्कार से सम्मानित होने वाले पहले क्रिकेट खिलाड़ी हैं। सन् २००८ में वे पद्म विभूषण से भी पुरस्कृत किये जा चुके है। सन् १९८९ में अन्तर्राष्ट्रीय क्रिकेट में पदार्पण के पश्चात् उन्होंने बल्लेबाजी में भी कई कीर्तिमान स्थापित किए हैं। उन्होंने टेस्ट व एक दिवसीय क्रिकेट, दोनों में सर्वाधिक शतक अर्जित किये हैं। वे टेस्ट क्रिकेट में सबसे ज़्यादा रन बनाने वाले बल्लेबाज़ हैं। इसके साथ ही टेस्ट क्रिकेट में १४००० से अधिक रन बनाने वाले वह विश्व के एकमात्र खिलाड़ी हैं। एकदिवसीय मैचों में भी उन्हें कुल सर्वाधिक रन बनाने का कीर्तिमान प्राप्त है। उन्होंने अपना पहला प्रथम श्रेणी क्रिकेट मैच मुम्बई के लिये १४ वर्ष की आयु में खेला था। उनके अन्तर्राष्ट्रीय खेल जीवन की शुरुआत १९८९ में पाकिस्तान के विरुद्ध कराची से हुई। 2001 में, सचिन तेंदुलकर अपनी 259 पारी में 10,000 ओडीआई रन पूरा करने वाले पहले बल्लेबाज बने। बाद में अपने करियर में, तेंदुलकर भारतीय दल का हिस्सा थे जिन्होंने २०११ क्रिकेट विश्व कप जीता, भारत के लिए छह विश्व कप के प्रदर्शन में उनकी पहली जीत। दक्षिण अफ्रीका में आयोजित टूर्नामेंट के 2003 संस्करण में उन्हें पहले \"प्लेयर ऑफ द टूर्नामेंट\" नाम दिया गया था। 2013 में, वे विस्डेन क्रिकेटर्स के अल्मनैक की 150 वीं वर्षगांठ को चिह्नित करने के लिए नामित एक अखिल भारतीय टेस्ट वर्ल्ड इलेवन में शामिल एकमात्र भारतीय क्रिकेटर थे। सचिन क्रिकेट जगत के सर्वाधिक प्रायोजित खिलाड़ी हैं और विश्व भर में उनके अनेक प्रशंसक हैं। उनके प्रशंसक उन्हें प्यार से भिन्न-भिन्न नामों से पुकारते हैं जिनमें सबसे प्रचलित लिटिल मास्टर व मास्टर ब्लास्टर है। क्रिकेट के अलावा वह अपने ही नाम के एक सफल रेस्टोरेंट के स्वामी भी हैं। सचिन तेंदुलकर भूतपूर्व राज्य सभा सांसद भी रह चुके हैं। सन् २०१२ में उन्हें राज्य सभा के सदस्य के रूप में नामित किया गया था। क्रिकेट के भगवान कहे जाने वाले सचिन तेंदुलकर पर एक बायोपिक फिल्म ‘सचिन : ए बिलियन ड्रीम्स’ बनाई जा चुकी है। इस फ़िल्म का टीज़र भी बहुत रोमांचक हैं। टीजर में सचिन को उन्हीं की कहानी सुनाते हुए देखेंगे जो एक शरारती बच्चे से एक हीरो बनकर उभरता है। ख़ुद सचिन तेंदुलकर का भी ये मानना है कि क्रिकेट खेलने से अधिक चुनौतीपूर्ण अभिनय करना है। सचिन – ए बिलियन ड्रीम्स’ का निर्माण श्रीकांत भासी और रवि भगचंदका ने किया है और इसका निर्देशन जेम्स अर्सकिन ने। सचिन ने 14 साल की आयु में क्रिकेट खेलना शुरू किया था व्यक्तिगत जीवन (family life) राजापुर के सारस्वत ब्राह्मण परिवार में जन्मे सचिन का नाम उनके पिता रमेश तेंदुलकर ने अपने चहेते संगीतकार सचिन देव बर्मन के नाम पर रखा था। सचिन के पिता मराठी स्कूल में शिक्षक थे। उनके बड़े भाई अजीत तेंदुलकर ने उन्हें क्रिकेट खेलने के लिये प्रोत्साहित किया था। सचिन के एक भाई नितिन तेंदुलकर और एक बहन सविताई तेंदुलकर भी हैं। 24 मई, 1995 के दिन सचिन ने डॉ. अंजलि महेता से शादी की…"} {"instruction": "Output the current date in YYYYMMDD format.", "input": "", "output": "let today= new Date(); let dd = String(today.getDate()).padStart(2, '0'); let mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! let yyyy = today.getFullYear(); console.log(yyyy+mm+dd);"} {"text": "[EN Wikipedia] Ronga River\n\nThe Ronga River is a river of the Marlborough Region of New Zealand's South Island. Although its source is on a ridge only from the island's north coast, the river flows south, reaching the Rai River close to the township of Rai Valley. References Rivers of the Marlborough Region Rivers of New Zealand"} {"instruction": "Program a function to remove all the even numbers from an array", "input": "", "output": "def remove_even(arr): new_arr = [] for num in arr: if num % 2 != 0: new_arr.append(num) return new_arr"} {"instruction": "Given a Python list of integers, write a function to find the sum of the elements in the list.", "input": "nums = [1, 2, 3, 4, 5]", "output": "def findSum(nums):\n total = 0\n for num in nums:\n total += num\n return total"} {"instruction": "Create an array of strings from an array of integers.", "input": "[1, 4, 8]", "output": "[\"1\", \"4\", \"8\"]"} {"instruction": "Given a list of words and a target word, determine if the target word is in the list", "input": "list_words = [\"apple\", \"banana\", \"orange\", \"mango\"] target_word = \"pineapple\"", "output": "list_words = [\"apple\", \"banana\", \"orange\", \"mango\"] target_word = \"pineapple\" if target_word in list_words: print (\"Target word is in the list\") else: print (\"Target word is not in the list\")"} {"instruction": "Create a Python program that displays the elements of an array in reverse order.", "input": "", "output": "def reverse_array(arr):\n \"\"\"Prints the elements of an array in reverse order\"\"\"\n length = len(arr)\n for i in reversed(range(length)):\n print(arr[i], end=\" \")"} {"instruction": "Write a JavaScript program to find the most commonly occurring item in a given object.", "input": "", "output": "function mostCommonlyOccuring(obj) { let count = {}; let maxCount = 0; let mostCommon = null; for (const key in obj) { if (obj.hasOwnProperty(key)) { if (obj[key] in count) { count[obj[key]]++; } else { count[obj[key]] = 1; } if (count[obj[key]] > maxCount) { maxCount = count[obj[key]]; mostCommon = obj[key]; } } } return mostCommon; }"} {"instruction": "Build a web scraping tool using Python that extracts data from a given web page.", "input": "", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# Function to make a GET request to a given URL\ndef get_page_data(url):\n # Make a GET request\n response = requests.get(url)\n\n # Parse the HTML from the GET request\n soup = BeautifulSoup(response.text, 'html.parser')\n\n # Extract the desired data\n data = soup.find_all('div', {'class':'data-container'})\n\n # Return the data\n return data\n\n# Extract data from a given URL\ndata = get_page_data('example.com/data-page')\n\n# Print the extracted data\nprint(data)"} {"instruction": "Develop a Python program for classifying data into two categories - positive and negative.", "input": "Not applicable", "output": "import pandas as pd \n\n# Read the data \ndata = pd.read_csv('data.csv')\n\n# Create input features \nX = data[['feature1','feature2','feature3']]\n\n# Create output label \ny = data['label']\n\n# Split data into training and testing sets \nfrom sklearn.model_selection import train_test_split\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.20, random_state=0) \n\n# Train the model\nfrom sklearn.linear_model import LogisticRegression\nlr = LogisticRegression()\nlr.fit(X_train, y_train)\n\n# Predict on test set\npredictions = lr.predict(X_test)\n\n# Evaluate accuracy\nfrom sklearn.metrics import accuracy_score\nprint('Accuracy:', accuracy_score(y_test, predictions))"} {"text": "[DE Wikipedia] In all meinen Träumen bist Du\n\nIn all meinen Träumen bist Du ist eine US-amerikanische Filmbiografie aus dem Jahr 1951 von Michael Curtiz über den Musiker Gus Kahn (1886–1941), der von Danny Thomas dargestellt wurde. In weiteren Rollen spielten Doris Day und Frank Lovejoy. Der Film wurde von Warner Bros. produziert. Handlung 1908 lernt der junge Liedtexter Gus Kahn in Chicago die Angestellte eines Musikverlages Grace LeBoy kennen und bittet sie um Hilfe bei seinen bisher erfolglosen Texten. Sie zeigt ihm, dass populäre Songs die Leute dazu bringen, „Ich liebe dich“ zu sagen. Gus besucht Grace, die bei ihren Eltern lebt, und wird zum Abendessen eingeladen. Mr. LeBoy zitiert aus Sonette aus dem Portugiesischen der britischen Dichterin Elizabeth Barrett Browning, wobei Gus sich unterlegen fühlt. Als er heimgeht, lässt er seine neu verfassten Texte liegen. Grace ist von ihnen angetan und komponiert Melodien für sie. Als ihr Vorgesetzter sich weigert, sich die Stücke anzuhören, kündigt sie und verkauft den Songs I Wish I Had a Girl an Fred Townsend. Der Song wird ein Erfolg, während die anderen Lieder erfolglos bleiben. Thompson schlägt vor, dass Gus mit dem Komponisten Egbert Van Alstyne zusammenarbeitet, doch aus Loyalität zu Grace lehnt Gus ab, stimmt aber dann doch zu, als Grace vorgibt, eine von Van Alstynes Melodien komponiert zu haben. Als der Tenor John McCormack den Song Memories vorträgt, den Gus mit Van Alstyne komponiert hat, findet er den Mut, Grace einen Antrag zu machen. Die beiden heiraten und schon bald wird Grace schwanger. Gus textet aus diesem Anlass Pretty Baby. Mit dem Komponisten Isham Jones fertigt Gus in der Folgezeit einige Klassiker. Als Townsend die Veröffentlichung von The One I Love Belongs to Somebody Else verweigert, trägt Grace den Song dem Theaterproduzenten Sam Harris vor, der das Lied für seine neue Show kauft. Grace bringt einen Jungen zur Welt, Donald. Kurz darauf unterbricht Gus seine Musikkarriere, um im Ersten Weltkrieg zu dienen. Nach dem Krieg wird Grace erneut schwanger. Diesmal werden Grace und Gus Eltern einer Tochter, Irene. Gus ist zu einer Berühmtheit geworden. Der Manager Florenz Ziegfeld möchte, dass er eine ganze Show für ihn schreibt. Gus will jedoch Chicago nicht verlassen, doch Grace ergreift die Initiative und sagt für ihn zu. Zuerst kommt Gus nicht sonderlich gut mit Ziegfelds Komponisten Walter Donaldson zurecht. Trotzdem schreibt er während des Besuchs eines Pferderennens mit Donaldson und dessen Freundin Frankie Mason das Lied Carolina in the Morning. Ziegfelds Star Gloria Knight hält nichts von dem Lied und unterrichtet Gus in Kultiviertheit. Das Ergebnis ist der Song Love Me or Leave Me, welchen Gloria per Telefon Grace vorsingt. Zur Eröffnung des Musicals Whoopee! kommt auch Grace überraschend nach New York. Gloria…"} {"instruction": "Provide an algorithm in Python to merge two sorted arrays into a single sorted array.", "input": "[3, 8, 11] and [1, 4, 9]", "output": "def merge_arrays(arr1, arr2):\n merged_arr = []\n # Make copies of arrays\n arr1_copy = arr1[:]\n arr2_copy = arr2[:]\n \n # add elements from both array in sorted order\n while arr1_copy and arr2_copy:\n if arr1_copy[0] <= arr2_copy[0]:\n merged_arr.append(arr1_copy.pop(0))\n else:\n merged_arr.append(arr2_copy.pop(0))\n \n # add remaining elements of array\n if arr1_copy:\n merged_arr.extend(arr1_copy)\n else:\n merged_arr.extend(arr2_copy)\n \n # return merged array\n return merged_arr\n\narr1 = [3, 8, 11]\narr2 = [1, 4, 9]\n\nprint(merge_arrays(arr1, arr2))"} {"instruction": "Write a Python program to generate a combination of random characters.", "input": "", "output": "import random\n \ncharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'\nlength = 8\n \nrandstring = ''.join(random.choice(characters) for i in range(length))"} {"instruction": "Create a HTML table to present student information.", "input": "", "output": "
    NameAgeGenderAddress
    John Doe24Male123 Main Street
    "} {"instruction": "Create a python program to find the length of the longest run of 1s in the binary form of a positive integer.", "input": "", "output": "def longest_run_of_ones(n):\n max = 0\n count = 0\n while n > 0:\n if n % 2 == 1:\n count += 1\n else:\n if count > max:\n max = count\n count = 0\n n //= 2\n if count > max:\n max = count\n return max"} {"instruction": "Construct a Python program to convert degrees Celsius to Fahrenheit.", "input": "C = 32", "output": "#Program to convert Celsius to Fahrenheit\n\n#user input\nC = 32\n\n#Celsius to Fahrenheit conversion\nF = (C*9/5)+32\n\n#print the result\nprint('%0.2f degree Celsius is equal to %0.2f degree Fahrenheit' %(C, F))"} {"instruction": "Using the HTML provided, add an ID attribute to the div tag to specify the unique identifier \"box1\"", "input": "
    Hello World!
    ", "output": "
    Hello World!
    "} {"text": "[CS Wikipedia] Miláček (film, 2012)\n\nMiláček (v originále Bel Ami) je historické drama, další z řady filmových adaptací stejnojmenného klasického románu francouzského autora Guy de Maupassanta z roku 1885. Natočen byl v britské, francouzské a italské koprodukci podle scénáře Rachel Bennette. Film režírovali Declan Donnellan a Nick Ormerod. Film měl premiéru 17. února 2012 na 62. Berlinale a do kin byl uveden 8. června téhož roku distribuční společností Magnolia Pictures. Obsazení Odkazy Reference Externí odkazy Britské dramatické filmy Britské historické filmy Filmy z roku 2012 Filmy inspirované dílem Guye de Maupassanta"} {"instruction": "Write a SQL statement to select the names of employees beginning with 'A'.", "input": "", "output": "SELECT name FROM employees WHERE name LIKE 'A%';"} {"text": "[HI Wikipedia] मिर्ज़ापुर\n\nमिर्ज़ापुर (Mirzapur) भारत के उत्तर प्रदेश राज्य के मिर्ज़ापुर ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। विवरण पर्यटन की दृष्टि से मिर्ज़ापुर उत्तर प्रदेश का काफी महत्वपूर्ण जिला माना जाता है। यहां की प्राकृतिक सुंदरता और धार्मिक वातावरण बरबस लोगों का ध्यान अपनी ओर खींचती है। मिर्ज़ापुर में स्थित विंध्याचल धाम भारत के प्रमुख हिन्दू धार्मिक स्थलों में से एक है। इसके अतिरिक्त सीताकुण्ड, लाल भैरव मंदिर, मोती तालाब, टांडा जलप्रपात, विल्डमफ़ाल झरना, तारकेश्‍वर महादेव, महा त्रिकोण, शिवपुर, चुनार किला, गुरूद्वारा गुरू दा बाघ और रामेश्‍वर, देवरहा बाबा आश्रम, अड़गड़ानंद आश्रम व अन्य छोटे बड़े जल प्रपातों आदि के लिए प्रसिद्ध है। मिर्ज़ापुर भदोही, वाराणसी, सोनभद्र, इलाहाबाद से घिरा हुआ है। भारत का अंतराष्ट्रीय मानक समय मिर्ज़ापुर जिले के अमरावती चौराहा स्थान से लिया गया है। मिर्ज़ापुर ग़ुलाबी पत्थरों (पिंकस्टोन) के लिये बहुत विख्यात है, प्राचीन समय में इस पत्थर का प्रयोग मौर्य वंश के राजा सम्राट् अशोक के द्वारा बौद्ध स्तुप एवं अशोक स्तम्भ (वर्तमान में भारत का राष्ट्रीय चिन्ह) को बनाने में किया गया था। मिर्ज़ापुर के लोगों की मूल भाषा मिर्ज़ापुरी है तथा हिन्दी एवं भोजपुरी भी चलन में है। मिर्ज़ापुर में एक मेडिकल कॉलेज संचालन में है तथा एक इंजीनियरिंग कॉलेज निर्माणाधीन है। यहां पर दो इंजीनियरिंग कॉलेज भी है|यहा बनारस हिंदू विश्वविद्यालय का दक्षिणी परिसर भी स्थित, जो बरकछा मे पहाडी के ऊपर हैं, जिसमे प्रमुख वेटनरी विद्यालय स्थित हैं, ज्याहा पशू की बहोत बडी हॉस्पिटल हैं, ओर ऐसी बहोत सी फॅकल्टीस हैं, जिसमे १००० से ज्यादा विद्यार्थी अध्यापन करते हैं। नाम जनपद के नाम को लेकर कई भ्रांतियां व्याप्त हैं। कुछ प्राचीन लोककथाओं के अनुसार विंध्याचल, अरावली एवं नीलगिरी से घिरे हुए क्षेत्र को विंध्यक्षेत्र के नाम से जाना जाता है। समयांतराल विंध्यक्षेत्र में विभिन्न क्षेत्रों का अलग अलग नामकरण हुआ। जैसे की मांडा के समीप के क्षेत्र पम्पापुर के नाम से, वर्तमान का अमरावती क्षेत्र गिरिजापुर के नाम से तथा आसपास का क्षेत्र सप्त सागर के नाम से विख्यात हुआ। 17वीं शताब्दी में जब ब्रिटिश ईस्ट इंडिया कंपनी भारत में तेज़ी से अपने पाँव पसार रही थी, कलकत्ता से लेकर दिल्ली तक कंपनी का कारोबार फैलता ही जा रहा था तब कंपनी के अफसरों को मध्य भारत में भी अपना व्यापार फ़ैलाने की आवश्यकता महसूस हुयी इसी सन्दर्भ अफसरों ने गंगा के रास्ते में पड़ने वाले लगभग सभी नगरीय क्षेत्रों का गहन अध्ययन किया। तमाम क्षेत्रों में विंध्याचल एवं गंगा की बाँहों में फैला विंध्यक्षेत्र अंग्रेजी अफसरों को भा गया। 1735 ईसवी में लार्ड मर्क्यूरियस वेलेस्ले नाम के एक अँगरेज़ अफसर ने इस क्षेत्र की स्थापना मिर्ज़ापुर नाम से की। मिर्ज़ा शब्द अंग्रेजी शब्दकोश में 1595 ईसवी से जुड़ा जिसका शाब्दिक अर्थ है \"राजाओ का क्षेत्र\"। इस शब्द की व्युत्पत्ति अमीर (English: Emir) एवं ज़ाद (Persian) को मिलाकर बनाए शब्द अमीरजादा से हुयी। पर्शिया में अमीरजादा के लिए एक शब्द मोरजा भी है। अतः अंग्रेज़ों ने अपने क्षेत्र विस्तार के समय मिर्ज़ा शब्द को उपाधि की तरह उपयोग किया तथा क्षेत्र का नाम \"मिर्ज़ापुर\" रख जिसका अर्थ हुआ राजाओं का…"} {"instruction": "Change the comment to a print statement in the code.", "input": "x = 1 # print the value of x", "output": "x = 1 print(x)"} {"instruction": "Edit the following code so that the item at index 4 is multiplied by two.", "input": "arr = [1, 2, 3, 4, 5, 6]", "output": "arr = [1, 2, 3, 4, 10, 6]"} {"text": "[EN Wikipedia] Rhabdochaeta queenslandica\n\nRhabdochaeta queenslandica is a species of tephritid or fruit flies in the genus Rhabdochaeta of the family Tephritidae. Distribution Australia. References Tephritinae Insects described in 1996 Diptera of Australasia"} {"instruction": "Convert the following enum type expression in Java for days of the week to equivalent C# syntax.", "input": "enum Weekday {SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY};", "output": "enum Weekday { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };"} {"instruction": "Create an algorithm in Python to optimize the order of parallel computations so that the total time required to finish all computations is minimized.", "input": "operations = { A: 10, B: 5, C: 15, D: 20 }", "output": "# Compute the optimal order\ndef compute_optimal_order(operations):\n\n # Create a list to store the order.\n order = []\n\n # Sort the operations in ascending order by time.\n sorted_operations = sorted(operations.items(), key=lambda x: x[1])\n \n # Total time for the operations in the order.\n total_time = 0\n \n # Iterate through the operations.\n for operation in sorted_operations:\n operation_name = operation[0]\n operation_time = operation[1]\n \n order.append((operation_name, total_time))\n \n # Update the total time for the order.\n total_time += operation_time\n \n return order\n \noperations = { A: 10, B: 5, C: 15, D: 20 }\n \noptimal_order = compute_optimal_order(operations)\n\nprint(optimal_order)\n# Output: [('B', 0), ('A', 5), ('C', 15), ('D', 30)]"} {"instruction": "Create a Django web application that allows users to view, add, and edit blog posts.", "input": "", "output": "# create our Django project\ndjango-admin startproject blogapp\n\n# create our app \ncd blogapp\npython manage.py startapp posts\n\n# create a model for our blog posts\n# in posts/models.py:\nfrom django.db import models\n\nclass Post(models.Model):\n title = models.CharField(max_length=255)\n content = models.TextField()\n created_at = models.DateTimeField(auto_now_add=True)\n updated_at = models.DateTimeField(auto_now=True) \n\n# register the model with admin\n# in posts/admin.py:\nfrom django.contrib import admin\nfrom .models import Post\n\nadmin.site.register(Post)\n\n# create a form for our blog posts\n# in posts/forms.py:\nfrom django import forms\nfrom .models import Post\n\nclass PostForm(forms.ModelForm):\n class Meta:\n model = Post\n fields = ['title', 'content']\n\n# create a view for our posts\n# in posts/views.py:\nfrom django.shortcuts import render\nfrom .models import Post\nfrom .forms import PostForm\n\ndef posts_view(request):\n posts = Post.objects.all()\n if request.method == 'POST':\n form = PostForm(request.POST)\n if form.is_valid():\n post = form.save()\n return redirect('posts_view')\n else:\n form = PostForm()\n return render(request, 'posts/posts_view.html', { 'posts': posts, 'form': form })"} {"text": "[EN Wikipedia] 1811 in Denmark\n\nEvents from the year 1811 in Denmark. Incumbents Monarch – Frederick VI Prime minister – Frederik Moltke Events 3 March Sparekassen Bikuben is founded in Copenhagen. 27 March – The Battle of Anholt during the Gunboat War. 30 June Hassel & Teudt is founded in Copenhagen. Undated Christiani & Grisson is founded. Births JanuaryMarch 18 February Camillus Nyrop, instrument maker (died 1883) 12 March Johannes Peter Langgaard, businessman and brickyard owner (died 1890) AprilJune 3 April Christian August Broberg, businessman and politician (died 1886) 23 April – Carl Ferdinand Allen, historian (died 1871) JulySeptember 16 August – Adam August Müller, painter (died 1844) 2 September – J. C. Jacobsen, brewer, industrialist, founder of Carlsberg (died 1887) OctoberDecember 23 November – Elise Holst, stage actress (died 1891) 24 November Ditlev Gothard Monrad, politician and bishop (died 1887) 4 December – Martin Hammerich, literary historian and educator (died 1881) 31 December – Moritz Unna, photographer (died 1871) Deaths 4 September – Frédéric de Coninck, merchant, ship owner (born 1740) 26 September – Cathrine Marie Møller, artist (born 1744) 12 October – Thomas Potter, industrialist (born 1745) References 1810s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Create a JavaScript function named 'calculateAge' that determines a person's age based on the birth year given.", "input": "", "output": "function calculateAge(birthYear) { let age = 2019 - birthYear; return age; }"} {"instruction": "Suggest improvements to the code fragment given below.", "input": "x = 25 if x < 20 print(\"x is less than 20\")", "output": "if x < 20: print(\"x is less than 20\")"} {"text": "[EN Wikipedia] 1834 in Denmark\n\nEvents from the year 1834 in Denmark. Incumbents Monarch – Frederick VI Prime minister – Otto Joachim Events 29 November P. Hertz is founded by Peter Hertz in Copenhagen. Undated Fædrelandet is established as a weekly journal by and Johannes Dam Hage. Henning Smith's Iron Foundry is established in Aalborg. Holmen Canal is filled out with soil. Sports Date unknown Ajax København is founded. Births 23 May Carl Bloch, painter (died 1890) 15 July – Hans Peter Johan Lyngbye (died 1920) 15 October Poul Borum, writer (died 1996) 1 December Valdemar Oldenburg, jurist and politician (died 1918) 4 December – Carl Lange, physician and psychologist (died 1900) Deaths 4 September – Peter Erasmus Müller, bishop (born 1776) References 1830s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Write a Python code using list comprehension to get the power of each element in a list.", "input": "list_num = [1, 2, 3, 4, 5]", "output": "power_list = [num**2 for num in list_num] print(power_list) # prints [1, 4, 9, 16, 25]"} {"instruction": "What is the minimum number of arguments needed to call the function \"foo\".", "input": "", "output": "The minimum number of arguments needed to call the function \"foo\" is 0."} {"text": "[EN Wikipedia] Linguistic Systems\n\nLinguistic Systems, Inc., also known as LSI, provides language translation services (conversion) for all media in over 115 languages. LSI focuses on the translation of legal, medical, business, institutional, academic, government and personal documents. LSI is headquartered in Cambridge, Massachusetts. About LSI Linguistic Systems, Inc. (LSI) was founded in 1967 by Martin Roberts. LSI's translates to/from 115 languages, DTP, audio-visual conversions, software localization, consecutive and simultaneous interpreting services, foreign brand name analysis, and machine translation with post-editing. LSI has provided translation services to over half of the Fortune 500 companies and most of the Fortune 100. Among its clients are AT&T, Boeing, Citigroup, Coca-Cola, DuPont, Exxon-Mobil, General Electric, General Motors, Hewlett-Packard, IBM, Johnson & Johnson, Pfizer, Procter & Gamble, Simon & Schuster, Time Warner, Verizon, and Walmart. As of 2013, LSI had a network of more than 7,000 translators who translate into their native languages; These include lawyers, scientists, engineers, and other bilingual professionals. Notes Machine translation Translation companies Applied linguistics"} {"text": "[HI Wikipedia] जिब्राल्टर में क्रिकेट\n\nजिब्राल्टर औबेरियन प्रायद्वीप और यूरोप के दक्षिणी छोर पर भूमध्य सागर के प्रवेश द्वार पर स्थित एक स्वशासी ब्रिटिश विदेशी क्षेत्र है। 6.843 वर्ग किलोमीटर (2.642 वर्ग मील) में फैले इस देश की सीमा उत्तर में स्पेन से मिलती है। जिब्राल्टर ऐतिहासिक रूप से ब्रिटेन के सशस्त्र बलों के लिए एक महत्वपूर्ण आधार रहा है और शाही नौसेना का एक आधार है। जिब्राल्टर में विभिन्न प्रकार के खेल जिब्राल्टर की जनता के रोजमर्रा जीवन का अहम हिस्सा हैं। यहाँ विशेष रूप से फुटबॉल, क्रिकेट और बास्केटबॉल जैसे खेल ज्यादा लोकप्रिय हैं। क्रिकेट यहाँ ब्रिटिश सैनिकों द्वारा लाया गया था। जिब्राल्टर का वातावरण इस खेल के लिए काफ़ी अनुकूल है। क्रिकेट बल्ले और गेंद का एक दलीय खेल है जिसकी शुरुआत दक्षिणी इंग्लैंड में हुई थी। इसका सबसे प्राचीन निश्चित-संदर्भ 1598 का मिलता है और अब यह 100 से भी अधिक देशों में खेला जाता है। क्रिकेट के कई रूप हैं; इसका उच्चतम स्तर टॅस्ट क्रिकेट है, जिसमें वर्तमान प्रमुख राष्ट्रीय टीमें भारत, ऑस्ट्रेलिया, दक्षिण अफ्रीका, इंग्लैण्ड, श्रीलंका, वेस्टइंडीज, न्यूजीलैण्ड, पाकिस्तान व बांग्लादेश हैं। जिब्राल्टर राष्ट्रीय क्रिकेट टीम जिब्राल्टर का अन्तराष्ट्रीय क्रिकेट में प्रतिनिधित्व करने वाली टीम है। टीम अंतरराष्ट्रीय क्रिकेट परिषद की वर्ष 1969 से सहयोगी सदस्य है। टॅस्ट क्रिकेट नहीं खेलने वाली यूरोपीय टीमों में जिब्राल्टर की टीम इस समय छठे स्थान पर है। इतिहास प्रारंभिक इतिहास जिब्राल्टर इबेरियाई प्रायद्वीप के दक्षिणी सिरे पर स्थित एक ब्रिटिश प्रवासी शासित प्रदेश है। यहाँ अट्ठारहवी सदी के अंत में ब्रिटिश सैनिकों द्वारा क्रिकेट का खेल लाया गया। वर्ष 1800 से ही रॉक ऑफ़ जिब्राल्टर के उत्तर में एक क्रिकेट का मैदान है। 1822 तक सैनिकों के साथ-साथ जिब्राल्टर की समान्य जनता ने भी क्रिकेट खेलना शुरू कर दिया। जिब्राल्टर क्रिकेट क्लब की स्थापना 1883 में हुई। यह बीसवी सदी तक जिब्राल्टर में नागरिक क्रिकेट का आधार साबित हुआ। वर्ष 1890 में इंग्लैंड के दौरे पर जा रही ऑस्ट्रेलिया राष्ट्रीय क्रिकेट टीम जिब्राल्टर में रुकी थी। असल में जिस जहाज पर ऑस्ट्रेलियाई टीम अपनी इंग्लैंड की यात्रा के लिए सवार थी उसकी टक्कर दो अन्य जहाजों से हो गई थी जिसके परिणामस्वरूप टीम के जहाज को जिब्राल्टर बंदरगाह में रुकना पड़ा। ऑस्ट्रेलियाई टीम ने एक मैच जिब्राल्टर गैरीसन टीम के विरुद्ध खेला। स्थानीय टीम केवल पच्चीस रन के स्कॉर पर ही सिमट गई थी जबकि विरोधी ऑस्ट्रेलियाई टीम ने आठ विकेट के नुकसान पर एक सौ पचास रन बनाए थे। 1930 के दशक में खेल में समृद्धि हुई जिसमें जिब्राल्टर से स्थानीय स्तर पर पैदा हुए कई क्रिकेट खिलाड़ी आए। हालांकि द्वितीय विश्व युद्ध के दौरान खेल की यह वृद्धि थम गई क्यों कि क्रिकेट के कई मैदान मिलिट्री द्वारा सैन्य प्रयोजनों के लिए उपयोग में लिए जाने लगे। इनमें से एक को तो हवाई पट्टी ही बना दिया गया। युद्धोत्तर वर्ष 1950 के दशक में जिब्राल्टर में क्रिकेट क्लबों की संख्या में बढ़ोतरी हुई तथा 1960 जिब्राल्टर क्रिकेट संघ (जिब्राल्टर क्रिकेट एसोसिएशन) की स्थापना हुई। 1969 में टीम को अन्तराष्ट्रीय क्रिकेट परिषद की सहयोगी सदस्यता के लिए निर्वाचित किया गया। 1973 अंग्रेज़ी घरेलू सत्र की समाप्ति के…"} {"instruction": "Write an SQL query to select the productname and the total price of orders with more than 10 items", "input": "", "output": "SELECT productname, SUM(price) AS total_price FROM Orders JOIN OrderItems USING (orderId) JOIN Products USING (productId) WHERE quantity > 10 GROUP BY orderId"} {"instruction": "Reverse the order of the values in the input list using Python.", "input": "list = [1, 4, 5, 6, 7]", "output": "list = [7, 6, 5, 4, 1] def reverse_list(input_list): \"\"\"Reverse the order of the values in the input list.\"\"\" return input_list[::-1] if __name__ == '__main__': list = [1, 4, 5, 6, 7] print(reverse_list(list))"} {"instruction": "What is the best data structure to store a dictionary?", "input": "", "output": "The best data structure to store a dictionary is a hash table. A hash table is an efficient data structure that uses key-value pairs to store data. It provides fast insertion, deletion and search operations, allowing it to be used to search for a specific key in a dictionary quickly and easily."} {"instruction": "Create a loop in Python that prints out a list of numbers from 1 to 10 multiplied by 3.", "input": "", "output": "for i in range(1, 11):\n print(i * 3)"} {"instruction": "Design a Django web application to store user profiles.", "input": "", "output": "# models.py from django.db import models class Profile(models.Model): user = models.OneToOneField(\"auth.User\", on_delete=models.CASCADE) first_name = models.CharField(max_length=100) last_name = models.CharField(max_length=100) birth_date = models.DateField() # views.py from django.shortcuts import render from .models import Profile def profile(request): profile = Profile.objects.get(user=request.user) return render(request, 'profile.html', {'profile': profile}) # urls.py from django.urls import path from .views import profile urlpatterns = [ path('profile/', profile, name='profile'), ]"} {"text": "[EN Wikipedia] Linford Wood\n\nLinford Wood is a Local Nature Reserve in East Tilbury in Essex. It is owned and managed by Thurrock Council. The site has mixed woodland, a willow plantation, hedges, ditches and an open area. Birds include tawny owls, great spotted woodpeckers and green woodpeckers. It is part of the proposed extended Thurrock Thameside Nature Park. There is access from East Tilbury Road. References Local Nature Reserves in Essex Thurrock"} {"instruction": "Refactor this function to be less complex and more readable.", "input": "def calculate_price(products): total_price=0 for p in products: total_price+=p[0]*p[1] return total_price", "output": "def calculate_price(products): total_price = 0 for price, quantity in products: total_price += price * quantity return total_price"} {"instruction": "In C#, write a loop to sum up a given array of numbers.", "input": "int[] numbers = {1, 2, 3, 4, 5};", "output": "int sum = 0; for(int i = 0; i < numbers.length; i++) { sum += numbers[i]; }"} {"instruction": "Create a Python program to filter out all negative numbers from a list.", "input": "", "output": "def filter_negative(data):\n \"\"\"Filters out all negative numbers from a list\"\"\"\n return [x for x in data if x >= 0]"} {"instruction": "Print out the average of all elements within a given array.", "input": "arr = [3, 7, 4, 8, 9]", "output": "arr = [3, 7, 4, 8, 9] sum = 0 for num in arr: sum += num average = sum / len(arr) print(average) # prints 6.4"} {"text": "[HI Wikipedia] रेमिका थापा\n\nरेमिका थापा नेपाली भाषा की भारतीय कवियित्रि है। इनका जन्म 28 अक्तूवर 1971 को मांग्पू दार्जिलिंग में हुआ। सन्दर्भ नेपाली साहित्यकार 1971 में जन्मे लोग जीवित लोग"} {"text": "[CS Wikipedia] Viktor Spasov\n\nViktor Spasov ( * 19. července 1959) je bývalý ukrajinský atlet, halový mistr Evropy ve skoku o tyči z roku 1982. Kariéra Jeho prvním úspěchem bylo vítězství na mistrovství Evropy juniorů v roce 1977. V roce 1982 se stal halovým mistrem Evropy ve skoku o tyči, zároveň si vytvořil svůj osobní rekord výkonem 570 cm. Externí odkazy Narození v roce 1959 Narození 19. července Ukrajinští tyčkaři Žijící lidé Muži"} {"instruction": "Create a SQL query to update all rows of the table \"product\" if their stock is below 10.", "input": "", "output": "UPDATE product SET stock = 10 WHERE stock < 10;"} {"text": "[CS Wikipedia] Paz (satelit)\n\nPaz (španělsky „mír“), dříve označován také jako SEOSAR, je španělská vojenská radarová družice, kterou vyrobila francouzská společnost Airbus a provozovatelem je společnost Hidesat. Její pracovní pozice je na heliosynchronní dráze ve výšce 514 km. Paz byl vynesen pomocí nosné rakety Falcon 9 Block 3 společnosti SpaceX, sídlem v kalifornském Hawthornu. Ten samý první stupeň B1038.2 vynášel i satelit Formosat-5. První stupeň byl vybaven roštovými kormidly, ale ne přistávacími nohami, nedošlo ani k žádným testovacím zpomalovacím zážehům. Sekundární náklad tvořily dvě testovací družice Tintin A a B společnosti SpaceX, které mají sloužit pro otestování technologií pro internetovou konstelaci Starlink. Statický zážeh před letem proběhl 11. února kolem 20:00 SEČ. Pro snímkování Země pro vládní a komerční účely používá Paz radar se syntetickou aperturou (SAR), což mu umožňuje mapování velkých zeměpisných oblastí ve dne i v noci ve vysokém rozlišení. Pracuje v pásmu X na vlnové délce 3,1 cm (frekvenci 9,65 GHz). Na jeho palubě jsou i další senzory pro pozorování počasí a pohybu lodí. Paz svoje pozorování koordinuje s německými družicemi TerraSAR-X a TanDEM-X, které obíhají po stejné dráze. Tato spolupráce byla domluvena společností Hidesat a bývalým evropským leteckým výrobcem Astrium, který provozuje německé satelity. Snímky s vysokým rozlišením budou použity pro vojenské operace, hraniční kontrolu, zpravodajství, monitoring životního prostředí, ochranu přírodních zdrojů, plánování měst a infrastruktury a sledování přírodních katastrof. Reference Umělé satelity Země Kosmonautika v roce 2018 Lety Falconu"} {"instruction": "Create an SQL query that returns the names and phone numbers of customers from the state of Virginia.", "input": "", "output": "SELECT name, phone FROM customers WHERE state= 'Virginia';"} {"instruction": "Create an array of length 10 from a given list of values.", "input": "given_list = [1, 2, 3, 4, 5]", "output": "final_list = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]"} {"instruction": "Convert the given code by replacing for loop with a while loop.", "input": "for i in range(5): print(i)", "output": "i = 0 while i < 5: print(i) i += 1"} {"instruction": "Write a Python program to create a function for adding two numbers.", "input": "", "output": "def add(a, b):\n return a + b"} {"instruction": "Edit the following HTML code snippet to change the color of the heading to blue.", "input": "

    Heading

    ", "output": "

    Heading

    "} {"instruction": "Create a RNN model using Python that can classify a piece of text as either positive or negative sentiment.", "input": "", "output": "# Load the required libraries\nimport numpy as np\nimport tensorflow\nfrom tensorflow.keras.preprocessing.text import Tokenizer\nfrom tensorflow.keras.preprocessing.sequence import pad_sequences\nfrom tensorflow.keras.layers import Embedding, LSTM, Dense, Dropout\n\n# Load the training dataset\nsentences = ['This is a good sentiment', 'This is a bad sentiment']\nlabels = [1, 0]\n\n# Create the tokenizer\ntokenizer = Tokenizer(num_words=1000)\ntokenizer.fit_on_texts(sentences)\n\n# Encode the sentences\nencoded_sentences = tokenizer.texts_to_sequences(sentences)\npadded_sentences = pad_sequences(encoded_sentences, maxlen=10)\n\n# Build the model\nmodel = Sequential()\nmodel.add(Embedding(input_dim=1000, output_dim=32, input_length=10))\nmodel.add(LSTM(32))\nmodel.add(Dense(1, activation='sigmoid'))\n\n# Compile and fit the model\nmodel.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])\nmodel.fit(padded_sentences, labels, epochs=10) \n\n# Evaluate the model\nscores = model.evaluate(padded_sentences, labels) \nprint(\"Accuracy: %.2f%%\" % (scores[1]*100))"} {"text": "[EN Wikipedia] François Boucher (disambiguation)\n\nFrançois Boucher may refer to: François Boucher, French painter Francois Boucher (art historian), French art historian François Boucher (violinist), Canadian violinist"} {"instruction": "Given a string, what is the best way to reverse the characters in it?", "input": ">", "output": "\"\"\" The best way to reverse the characters in a string is by using the slicing option of a string object. The string slicing reverses a string by slicing it from the end of the string and going to the beginning of the string. This can be done with the following syntax: string_name[::-1] For example, to reverse the string \"Hello World!\", the following can be used: \"Hello World!\"[::-1] which will output \"!dlroW olleH\". \"\"\""} {"text": "[CS Wikipedia] Farní sbor Českobratrské církve evangelické ve Velkém Meziříčí\n\nFarní sbor Českobratrské církve evangelické ve Velkém Meziříčí je sborem Českobratrské církve evangelické ve Velkém Meziříčí. Sbor spadá pod Horácký seniorát. Farářkou sboru je Markéta Slámová a kurátorkou Dana Konvalinková. Faráři sboru Josef Závodský (1929-1943) Jiří Novotný (1943-1947) Jaroslav Pleva (1948-1971) Jiří Ruml (1971–1987) Joel Ruml (1987–1999) Pavel Janošík (2000–2016) Markéta Slámová (od r. 2016) Externí odkazy Oficiální stránky sboru Údaje o sboru na portálu Evangnet Velké Meziříčí Náboženství ve Velkém Meziříčí Náboženství v okrese Žďár nad Sázavou Organizace ve Velkém Meziříčí"} {"instruction": "Create a data frame from a dictionary.", "input": "my_dict = {'state': ['Ohio', 'Ohio', 'Ohio', 'Nevada', 'Nevada'], 'year': [2000, 2001, 2002, 2001, 2002], 'pop': [1.5, 1.7, 3.6, 2.4, 2.9]}", "output": "import pandas as pd my_df = pd.DataFrame(my_dict) print(my_df)"} {"instruction": "Parse the given XML document.", "input": " A Game of Thrones George R. R. Martin 9.99 A Clash of Kings George R. R. Martin 12.99 ", "output": "#import the required modules import xml.etree.ElementTree as ET # parse the given xml document tree = ET.parse('document.xml') root = tree.getroot() # iterate over all the elements in the document for book in root.findall('book'): title = book.find('title').text author = book.find('author').text price = book.find('price').text # print the element and its attribute print('Title:', title, ', Author:', author, ', Price:', price)"} {"text": "[HI Wikipedia] एस्पेरान्तो का प्राग इश्तिहार\n\nएस्पेरान्तो की प्रगति चाहने वाले हम लोग यह इश्तिहार सब सरकारों अन्तर्राष्ट्रीय संस्थाओं और सज्जनों के नाम दे रहे हैं; यहाँ दिये गए उद्देश्यों की ओर दृढ़ निश्चय से काम करने की घोषणा कर रहे हैं; और सब संस्थाओं और लोगों को हमारे प्रयास में जुटने का निमन्त्रण दे रहे हैं। एस्पेरान्तो जिसका आगाज़ १८८७ में अन्तर्राष्ट्रीय संप्रेषण के लिये एक सहायक भाषा के रूप में हुआ था और जो जल्दी ही अपने आप में एक जीती जागती ज़बान बन गई -- पिछले एक शताब्दी से लोगों को भाषा और संस्कृति की दीवारों को पार कराने का काम कर रही है। जिन उद्देश्यों से एस्पेरान्तो बोलने वाले प्रेरित होते आए हैं, वो उद्देश्य आज भी उतने ही महत्वपूर्ण और सार्थक हैं। ना दुनिया भर में कुछ ही राष्ट्रीय भाषाओं के इस्तेमाल होने से, ना संप्रेषण तकनीकों में प्रगति से, ना ही भाषा सिखाने के नए तौर-तरीक़ों से, यह निम्नलिखित मूल यथार्त हो पायेंगे जिन्हें हम सच्ची और साधक भाषा प्रणाली के लिए अनिवार्य मानते हैं। लोकतंत्र ऐसी संचार-प्रणाली जो किसी एक को ख़ास फ़ायदा प्रदान करते हुए औरों से यह चाहे कि वे सालों भर का प्रयास करें और वो भी एक मामूली योग्यता प्राप्त करने के लिए, ऐसी प्रणाली बुनियादी तौर पर अलौकतांत्रिक है। यद्यपि एस्पेरान्तो और ज़बानों की तरह ही, दोष-हीन नहीं है, पर विश्वव्यापक समान संप्रेषण के लिए, एस्पेरान्तो बाकी भाषाओं से कहीं बेहतर है। हम मानते हैं कि भाषा असमता संप्रेषण असमता को हर स्तर पर पैदा करती है, अन्तर्राष्ट्रीय स्तर पर भी। हमारा आन्दोलन लोकतांत्रिक संप्रेषण का आन्दोलन है। विश्वव्यापी विद्या हर जातीय भाषा किसी ना किसी संस्कृति और देश से मिली जुड़ी हुई है। मिसाल के तौर पे, अंग्रेज़ी सीखता छात्र दुनिया के अंग्रेज़ी बोलने वाले देशों के बारे में सीखता है -- ख़ास कर, अमेरिका और इंग्लैंड के बारे में। एस्पेरान्तो सीखने वाला छात्र एक ऐसी दुनिया के बारे में सीखता है जिसमे सीमाएँ नहीं हैं, जहाँ हर देश घर है। हमारा मत है कि हर भाषा में दी गयी विद्या किसी ना किसी दृष्टिकोण से जुड़ी हुई है। हमारा आन्दोलन विश्वव्यापी विद्या का आन्दोलन है। प्रभावशील विद्या विदेशी भाषा सीखने वालों में कुछ प्रतिशत ही विदेशी भाषा में धाराप्रवाह हासिल कर पाते हैं। एस्पेरान्तो में धाराप्रवाह घर बैठ कर पढ़ाई से भी मुमकिन है। कई शोध-पत्रों में साबित किया गया है कि एस्पेरान्तो सीखने से अन्य भाषाओं का सीखना आसान हो जाता है। यह भी अनुशंसित किया गया है कि भाषा-चेतना के पाठ्यक्रमों की बुनियाद में ही एस्पेरान्तो सम्मिलित होना चाहिए। हमारा मत है कि जिन विद्यार्थियों को दूसरी भाषा सीखने से फ़ायदा हो सकता है, उन विद्यार्थियों केलिए विदेशी भाषाएँ सीखने की कठिनाइयाँ हमेशा एक दीवार बन कर खड़ी रहेंगी। हमारा आन्दोलन प्रभावशील भाषाग्रहण का आन्दोलन है। बहुभाष्यता एस्पेरान्तो समुदाय उन चुने-गिने विश्वव्यापी समुदायों में से है जिनका हर सदस्य दुभाषी या बहुभाषी है। इस समुदाय के हर सदस्य ने कम से कम एक विदेशी भाषा को बोलचाल-स्तर तक सीखने का प्रयास किया है। कई बार इस कारण अनेक भाषाओं का ग्यान और अनेक भाषाओं के प्रति प्रेम पैदा हुआ है -- निजि मानसिक-क्षितिजों में बढ़ौत्री हुई है। हम मानते हैं कि हर इनसान को, चाहे वो छोटी ज़बान बोलने वाला हो, या बड़ी,…"} {"instruction": "Create a web application using Python Flask for managing a library database, including models for Book, Author, and Publisher.", "input": "Not applicable", "output": "from flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\n\napp = Flask(name)\napp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'\ndb = SQLAlchemy(app)\n\nclass Book(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n title = db.Column(db.String(80), unique=True)\n author_id = db.Column(db.Integer, db.ForeignKey('author.id'))\n publisher_id = db.Column(db.Integer, db.ForeignKey('publisher.id'))\n\nclass Author(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Column(db.String(80), unique=True)\n\nclass Publisher(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Column(db.String(80), unique=True)\n\ndb.create_all()\n\nif __name__ == '__main__':\n app.run(debug=True)"} {"text": "[DE Wikipedia] Laurence Doherty\n\nHugh Laurence „Laurie“ Doherty (* 8. Oktober 1875 in London; † 21. August 1919 in Broadstairs, Kent) war ein englischer Tennisspieler. Er gewann 1900 zwei olympische Titel, zwischen 1902 und 1906 fünf Mal den Einzeltitel der Wimbledon Championships sowie als erster Nichtamerikaner 1903 die US-amerikanischen Meisterschaften. Mit seinem älteren Bruder Reginald bildete er das erfolgreichste Doppel um die Jahrhundertwende 1900. Familie und Bildung Laurence Doherty, der als drei Jahre jüngerer Bruder von Reginald auch „Little Do“ genannt wurde, kam 1875 im Londoner Stadtteil Wimbledon zur Welt. Wie sein Bruder besuchte auch Laurence die Westminster School und studierte anschließend am Trinity College der Universität Cambridge. Sportliche Karriere Doherty nahm von 1893 bis 1910 an Tennisturnieren teil. Nachdem er 1898 noch im Finale der Wimbledon Championships seinem Bruder Reginald unterlag, gewann er dort von 1902 bis 1906 fünfmal in Folge. Sein Bruder hatte zuvor von 1897 bis 1900 triumphiert. Zudem gewann Laurie 1903 als erster Nicht-Amerikaner die US-amerikanischen Meisterschaften. Mit diesem Sieg war er der erste Tennisspieler, der sowohl die Wimbledon Championships als auch die US-Meisterschaften für sich entscheiden konnte. Zusammen mit seinem Bruder holte er sich darüber hinaus zwischen 1897 und 1905 acht Mal den Doppeltitel in Wimbledon. 1902 und 1903 siegten die beiden auch bei den US-Meisterschaften. In ihren Hochzeiten verloren die Dauherty-Brüder nur fünf ihrer unzähligen Doppel-Matches. Bei den Olympischen Spielen 1900 siegte er sowohl im Einzel als auch mit seinem Bruder im Doppel. Im Mixed belegte er an der Seite von Marion Jones den dritten Platz. Im Davis Cup spielte er von 1902 bis 1906 und holte mit der britischen Mannschaft in jedem Jahr den Titel. Laurence verlor dabei kein einziges seiner zwölf Einzel- und Doppelmatches. Leben nach dem Tennis 1903 veröffentlichte er mit seinem Bruder das Buch R.F. and H.L. Doherty on Lawn Tennis. Nachdem ihn eine schlechte gesundheitliche Verfassung schon 1906 vorerst vom Tennisspielen abhielt, begann er mit dem Golfspielen. Er nahm an einigen Amateurturnieren teil und sein bestes Ergebnis erreichte er 1908 beim Royal St. George’s, als er unter die letzten 16 kam. Sein Handicap war +2. 1914 trat Doherty der Royal Navy Reserve bei. Die mitunter strengen Einsatzbedingungen verschlechterten seinen ohnehin empfindlichen Zustand. 1919 im Alter von 43 Jahren starb er nach langer Krankheit. Im Jahr 1980 wurde er zusammen mit seinem Bruder in die International Tennis Hall of Fame aufgenommen. Titel Einzel Doppel Mixed Quellen und Weblinks B. Collins: History of Tennis. 2. Auflage. New Chapter Press, New York 2010, ISBN 978-0-942257-70-0, S. 571. L. Tingay: One Hundred Years of Wimbledon. Guinness World…"} {"text": "[DE Wikipedia] Sky\n\nSky (englisch „Himmel“, „Himmelsgewölbe“) steht für: Sky, ehemalige norddeutsche Verbrauchermarktkette, siehe coop eG Sky (Band), britische Rockband Sky: Kinder des Lichts, auch Sky, Computerspiel von Thatgamecompany (2019) Sky Airline, chilenische Fluggesellschaft Sky Airlines, türkische Charterfluggesellschaft Sky (Wolkenkratzer), Wohnturm in New York City Sky (Lied), Lied der englischen Sängerin Sonique Sky (Software), Skype-for-Business-Anwendung Pseudonym von Li Xiaofeng (* 1985), chinesischer E-Sportler Chicago Sky, ein WNBA-Basketball-Franchise Team Sky (bis 2018), britisches Profiradsport-Team, jetzt Ineos Grenadiers Sky – Der Himmel in mir, deutsch-französischer Spielfilm (2015) Pay-TV-Anbieter: Sky Limited, britischer Mutterkonzern, ehemals BSkyB Sky Deutschland, deutscher Pay-TV-Anbieter, ehemals Premiere und DF1 Sky Italia, italienischer Pay-TV-Anbieter SKY Perfect JSAT Corporation, japanischer Pay-TV-Anbieter, zur SKY Perfect JSAT Holdings gehörend Personen: Emma Sky (* um 1968), britische Politikberaterin und Nahostexpertin Iyo Sky (* 1990), japanische Wrestlerin Jennifer Sky (* 1976), US-amerikanische Schauspielerin Kathleen Sky (* 1943), US-amerikanische Science-Fiction- und Fantasy-Autorin Reena Sky (* 1983), US-amerikanische Pornodarstellerin und Schauspielerin Vanja Sky (* 1993), kroatische Bluessängerin Velvet Sky (Wrestlerin) (* 1981), US-amerikanische Wrestlerin SKY steht für: Skymark (ICAO-Code), japanische Fluggesellschaft SKY (Universität), drei südkoreanische Eliteuniversitäten Bahnhof Sennhof-Kyburg (DS100-Code) Siehe auch: Sky du Mont Big Sky Skai SKI Skye Skyy Abkürzung"} {"text": "[HI Wikipedia] गोदी\n\nनौनिवेश या गोदी या 'डॉक' (dock) जलयानों के ठहरने के स्थान को कहते हैं। यदि स्थान पूरी तरह घिरा हुआ नहीं है, बल्कि उसका मुख समुद्र से आने-जाने के लिए सदा खुला रहता है, तो उसके लिए 'बेसिन' नाम अधिक उपयुक्त है, यद्यपि यह नाम सर्वव्यापी नहीं है। गोदियों के मुख पर फाटक या कोठियाँ लगी होती हैं, जिससे उनमें यथेच्छ तल तक पानी रखा जा सके। जिस गोदी में पानी प्राय: एक ही तल तक रहता है, वह सजल गोदी कहलाती है तथा जिस गोदी में से पानी बिलकुल खाली किया जा सकता है, वह 'सूखी गोदी' कहलाती है। सूखी गोदी में जहाज निरीक्षण करने या मरम्मत करने के लिए लाए जाते हैं। सूखी गोदी का ही एक रूप 'तिरती गोदी' है। यह तैरते हुए बड़े बड़े पीपों की संरचना होती है, जो भीतर पानी भरकर, या खाली करके, नीची या ऊँची की जा सकती है और जहाज उसपर रखकर पानी के ऊपर उठाया जा सकता है। जिन पत्तनों में प्रकृतिप्रदत्त सुरक्षित और गहरा विशाल बेसिन होता है, ज्वारभाटा कम आता है और समुद्र में तेज धाराएँ नहीं होतीं, वहाँ सजल गोदी की आवश्यकता नहीं होती, जैसे न्यूयॉर्क में। किंतु सूखी या तिरती गोदी सभी बड़े आधुनिक पत्तनों का अनिवार्य अंग होती है। सजल गोदी समुद्रतट या नदीतट पर प्राकृतिक या गहरी खोदी हुई उपखाड़ी होती है, जिसके किनारे जहाजों में माल लादने या उतारने के लिए पक्के घाट या प्लैटफार्म बने होते हैं। यदि ये तट के समांतर होते है, तो पार्श्वघाट या धक्का कहलाते हैं। और यदि जल में प्रवेश करते हुए तट के लंबवत्अथवा अन्य किसी कोण पर बने होते हैं, तो पाए कहलाते हैं। घाट, धक्के या पाए सजल गोदी के मुख्य अंग हैं। कभी कभी तिरते घाट भी बनाए जाते हैं, जो ज्वार भाटे के साथ ऊँचे नीचे हो सकते हैं। ये चल पुलों द्वारा अचल घाटों से जुड़े रहते हैं। गोदी की दीवारें बहुत मजबूत बनाई जाती हैं। ये प्राय: (१) धन कंक्रीट की, (२) अखंड कंक्रीट की, (३) संपीडित वायु द्वारा गलाई गई कोठियों की, (४) प्रबलित कंक्रीट में पेंदायुक्त ढोलों की, या (५) स्थूणों, ढोलों आदि की मिश्रित दीवारें होती हैं। इनके ऊपर प्राय: ग्रैनाइट की शीर्षिका (coping) अवश्य रहती है। आजकल जहाज प्राय: बक्सनुमा बनते हैं। उनकी दीवारें सीधी खड़ी रहती हैं या कभी कभी ऊपर की ओर भीतर को झुकी रहती हैं। इसलिए घाट की दीवारें सामने की ओर बिल्कुल खड़ी या लगभग खड़ी बनाई जाती हैं, ताकि जहाज घाट के बिल्कुल पास तक आ सकें और नौभार चढ़ाने उतारनेवाली क्रेनों की पहुँच के भीतर हो सके। दीवारें पुश्तों की भाँति बनाई जाती हैं, जिनकी पीछे की सतह ढालू या सीढ़ीदार रहती है। इनकी नीवें काफी चौड़ी होती हैं, ताकि नीचे मिट्टी पर उसकी क्षमता से अधिक भार न पड़े। नींव पीछे की ओर कुछ ढालू भी रखी जाती है, ताकि भराई का दबाव पड़ने पर दीवार की ओर खिसक न जाए। दीवार के अचल भार तथा पीछे की भराई की ठेल का ध्यान रखकर दीवारों का अभिकल्पन किया जाता है। इनकी औसत मोटाई, ऊँचाई की चौथाई से कम नहीं होती, प्राय: एक तिहाई रखी जाती है। आधार पर चौड़ाई ऊँचाई की आधी से लेकर दो तिहाई तक होती है। दीवार में लगभग ५०-५० फुट पर जलछिद्र रखे जाते हैं, ताकि जब सामने पानी का तल नीचा हो तब पीछे का पानी निकल सके। गोदीद्वार तथा जलपाश जहाँ ज्वार भाटा बहुत ऊँचा (१५� से अधिक) आता है, वहाँ बड़े-बड़े बेसिन घेरकर प्राय: बंद कर लिए जाते हैं और…"} {"instruction": "Calculate the maximum of three numbers in Java.", "input": "int a = 10; int b = 15; int c = 20;", "output": "int max = Math.max(a, Math.max(b, c)); System.out.println(\"Maximum of the three numbers is: \"+max);"} {"instruction": "Design a class in Python that could represent a book.", "input": "", "output": "class Book:\n def __init__(self, title, author, year):\n self.title = title\n self.author = author\n self.year = year\n\n # other methods, such as get_title(), set_title(), get_author(), set_author(), etc. could go here"} {"instruction": "Write an R program to find the unique values in a vector.", "input": "data = c(10, 20, 30, 20, 40, 30, 50)", "output": "data = c(10, 20, 30, 20, 40, 30, 50) uniq_data = unique(data) print(uniq_data) # Outputs: 10, 20, 30, 40, 50"} {"text": "[DE Wikipedia] Flinders-Halbinsel\n\nDie Flinders-Halbinsel (englisch: Flinders Peninsula) ist eine Halbinsel im Süden des australischen Bundesstaates Western Australia. Sie bildet den östlichen Abschluss der rund 15 Kilometer langen Torndirrup Peninsula. Nördlich der Halbinsel liegt der King George Sound mit dem Ort Albany am gegenüberliegenden Ufer. Im Süden erstreckt sich das offene Meer mit der Großen Australischen Bucht als Teil des Indischen Ozeans. Flinders-Halbinsel und die nach Norden sich erstreckenden Vancouver Peninsula bilden zusammen die Frenchman Bay, Teil des King George Sounds. Die unerschlossene Flinders-Halbinsel ist 4,7 Kilometer lang, und an der breitesten Stelle 1,3 Kilometer breit. Die Halbinsel gehört zum Torndirrup-Nationalpark. Zur Ostspitze führt der Bald Head Walking Trail. Von einem Parkplatz am Rande der Halbinsel sind es über Isthmus Hill und Limestone Head zum Bald Head, dem Ende der Halbinsel, und zurück 12,5 Kilometer. Einzelnachweise Halbinsel (Australien und Ozeanien) Halbinsel (Indischer Ozean) Große Australische Bucht Halbinsel (Australien) Geographie (Western Australia)"} {"text": "[EN Wikipedia] United Business Institutes\n\nUBI Business School, or UBI, (formerly known as United Business Institutes) is a private establishment of higher education located in Brussels, Luxembourg and Shanghai delivering BSc, MSc, MBA and DBA programmes in Business Studies and Administration. The school was founded as an asbl (non-profit organisation) in Brussels on 4 April, 1992 and all programmes are validated by Middlesex University in the United Kingdom. Programmes at its European campuses are taught in English while the Shanghai campus programmes are taught in Mandarin Chinese. The school's programmes are focused around three major axes: Globalisation, Digitalisation and Global Corporate Citizenship. In 2023, the school was awarded a 5 star QS overall rating, with recognised areas of excellence for Employment, Teaching and Online Learning. The school has also been ranked #26 worldwide for its joint EMBA programme. Campuses UBI - Brussels is located in the very centre of the city, at 48 rue de Namur, close to the Central train station and within walking distance of the European Quarter, and the Luxembourg train station. UBI - Luxembourg was opened in 2013 to operate a campus in Wiltz, Luxembourg. It is located in the Wiltz Castle. UBI - Shanghai was opened in 2018 in the Yangpu District of Shanghai, China. Programmes UBI offers the following degrees across its various campuses: Accreditation The courses correspond to the British programme style of business studies. UBI awards degrees validated by Middlesex University in the United Kingdom. UBI and Middlesex have signed a protocol of cooperation for the realisation of the programmes. Currently, students can study Bachelor, Master in Business Administration and Doctorate programmes on UBI's campuses. Middlesex University validates UBI's programmes and oversees their quality assurance measures. See also Middlesex University References External links Official website 1992 establishments in Belgium Business schools in Belgium Business schools in Luxembourg University-affiliated schools"} {"instruction": "Name two methods of sorting a list in Python.", "input": "", "output": "The two methods of sorting a list in Python are the sorted() function and the .sort() method."} {"instruction": "Create a MySQL query to return the employee details from the \"employees\" table with the minimum salary.", "input": "Table Name: Employees Columns: Emp_ID, First_Name, Last_Name, Job_Position, Salary", "output": "SELECT * FROM Employees ORDER BY Salary ASC LIMIT 1"} {"text": "[CS Wikipedia] Haimann\n\nPříjmení Haimann nese více osob, mimo jiné: Julius Haimann (1887–1939) – německý filmový producent Karel Haimann (1902–?) – český projektant, autor vzduchotechniky vily Tugendhat Petr Haimann (* 1938) – český historik a teoretik architektury, numismatik"} {"instruction": "Write a Python program to determine the maximum of two numbers.", "input": "a = 15, b = 20", "output": "def get_max(a, b):\n if a > b:\n return a\n else:\n return b\n\na = 15\nb = 20\n\nmax_value = get_max(a, b)\nprint(\"The maximum value is:\", max_value)"} {"instruction": "Using the data provided below, create an SQL query to find the first name, last name and age of all employees over the age of 40.", "input": "Table: employees Columns: first_name, last_name, age", "output": "SELECT first_name, last_name, age FROM employees WHERE age > 40"} {"instruction": "Create a vectorized function in Python that computes the sigmoid of a given number.", "input": "", "output": "import numpy as np\n\ndef sigmoid(x):\n \"\"\"\n Compute the sigmoid of an array of numbers x. \n \"\"\"\n # Apply the sigmoid function to every element of x \n sig = np.vectorize(lambda x: 1/(1 + np.exp(-x)))\n return sig(x)\n\nprint(sigmoid(5))"} {"instruction": "Build a Python program to decrypt a given secret code.", "input": "", "output": "def decrypt(code):\n # create a shift list \n shift_list = [1, 3, 5, 7, 9, 11] \n \n # empty list to store decoded message \n decoded_message = ''\n \n # iterate over characters in the secret code\n for char in code: \n # store character's ASCII value in a variable \n char_ascii_value = ord(char) \n # shift list index for correct decryption\n shift_index = 0\n # loop until incorrect shift index\n while char_ascii_value // len(shift_list) > 0: \n char_ascii_value -= len(shift_list)\n shift_index += 1\n # decryption\n decrypted_char_ascii_value = char_ascii_value - shift_list[shift_index] \n # add decrypted character to the decoded message\n decoded_message += chr(decrypted_char_ascii_value) \n \n # return decoded message \n return decoded_message \n \n \nsecret_code = '’Š§ ¢ °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°'\nprint(decrypt(secret_code))"} {"instruction": "Create a Python dictionary that stores the number of occurrences of each character in a string.", "input": "s = \"Hello World!\"", "output": "def countCharacters(s):\n # Create empty dictionary \n chars_dict = {}\n \n # Iterate over each character in the string\n for char in s:\n # If the character is not in the dictionary, set the value to 1\n if char not in chars_dict:\n chars_dict[char] = 1\n # Otherwise, increment the value\n else:\n chars_dict[char] += 1\n \n return chars_dict"} {"instruction": "Create a function that takes two integers, A and B, and returns the largest common divisor between A and B.", "input": "", "output": "def get_largest_common_divisor(a, b): while a != 0 and b != 0: if a > b: a %= b else: b %= a return a + b if __name__ == '__main__': print(get_largest_common_divisor(15, 9))"} {"text": "[EN Wikipedia] Muddiman Committee\n\nThe Muddiman Committee or the Reforms Enquiry Committee (1924) was a committee led by Sir Alexander Muddinman, organized by the British and Indian government, to meet the demand of Indian leaders in the context of Indians new ( swaraj party resolution 1920]] (India's Independence). This committee would aid in investigating the diarchy issue on the Constitution as set up in 1921 under the Indian Council Act of 1919. Noteworthy members Sir Alexander Muddiman Sir Sivaswami Aiyar Dr. R. P. Paranjape Sir Tejbahadur Sapru Mohammad Ali Jinnah Bijoy Chand Mahtab The Reports The reports created by the committee was divided into two parts due to disagreements, the majority report and minority report. The Majority Report declared by officials that a diarchy had not been established, has not been given a fair trial run, and so only minor changes in non-official Indians were recommended The Minority Report declared by nonofficials that the Act of 1919 had failed, and that they need a Constitution that has a permanent basis with a provision for automatic progress in the future. Submitted in September 1925, the combination of these reports recommended the appointment of a Royal Commission. Lord Birkenhead, the Secretary of State for India, stated that actions would be taken on the basis of the majority report. References Indian independence movement"} {"instruction": "Generate a Python program that determines the largest number in the given array.", "input": "[7, 12, 5, 9]", "output": "arr = [7, 12, 5, 9]\n\ndef find_max(arr):\n max_num = arr[0]\n for num in arr:\n if num > max_num:\n max_num = num\n return max_num\n\nprint(\"The largest number is:\", find_max(arr))"} {"instruction": "Write a python program to remove all the elements from a list that are less than 10.", "input": "mylist = [4, 7, 21, 24, 88, 12]", "output": "def remove_less_than_10(mylist): return [n for n in mylist if n >= 10]"} {"instruction": "Transform a given XML document into a JSON object using Python.", "input": "", "output": "import xmltodict # open the XML document with open(\"document.xml\") as f: xml_data = f.read() # convert to json json_data = xmltodict.parse(xml_data) # print the JSON object print(json.dumps(json_data, indent=2))"} {"instruction": "Write a Python program that merges two sorted lists into one.", "input": "list_1 = [1, 3, 5, 7, 9]\nlist_2 = [2, 4, 6, 8, 10]", "output": "list_1 = [1, 3, 5, 7, 9]\nlist_2 = [2, 4, 6, 8, 10]\n\ndef merge_lists(list_1, list_2):\n '''Merges two sorted lists into one'''\n\n merged_list = []\n\n while list_1 and list_2:\n if list_1[0] < list_2[0]:\n merged_list.append(list_1.pop(0))\n else:\n merged_list.append(list_2.pop(0))\n\n merged_list.extend(list_1 + list_2)\n\n return merged_list\n\nmerged_list = merge_lists(list_1, list_2)\n\nprint(merged_list)"} {"instruction": "Given an array with n elements, find the maximum element of the array.", "input": "[1, 10, 5, 33, 4]", "output": "33"} {"instruction": "Write a code to find the day of the week corresponding to a given date using the calendar module?", "input": "Day: 25 Month: December Year: 2020", "output": "\"\"\" Find the day of the week corresponding to a given date using calendar module \"\"\" import calendar def get_day_of_week(day, month, year): dayNumber = calendar.weekday(year,month,day) dayName = calendar.day_name[dayNumber] return dayName if __name__ == '__main__': day = 25 month = 12 year = 2020 print(get_day_of_week(day, month, year))"} {"text": "[DE Wikipedia] Alois Schertzinger\n\nAlois Schertzinger (* 13. Juli 1787 in Gütenbach; † in Sarata, gebürtig Aloysius Schertzinger) war Uhrmacher, Kapellmeister und Mitbegründer der deutschen Siedlung Sarata in Bessarabien. Leben Alois Schertzinger wurde am 13. Juli 1787 in Gütenbach bei Furtwangen im Schwarzwald geboren. Schertzinger erlernte das Uhrmacherhandwerk und wanderte mit 17 Jahren nach Sankt Petersburg aus. Dort bekam er für seine Uhrmacherkunst eine Auszeichnung und wurde als „tüchtiger Meister“ befunden. Er war ein guter Violinspieler und nahm an einigen Konzerten teil. Durch seine Musikalität war er zeitweise Kapellmeister am Hofe des Zaren Alexander I. von Russland. In St. Petersburg traf er auf den Prediger Ignaz Lindl. Mit ihm schloss er eine enge Freundschaft. Als Lindl aufbrach, um im südrussischen Gouvernement Bessarabien eine Siedlung mit deutschen Auswanderern zu gründen, folgte ihm Schertzinger. Alois Schertzinger entwarf den Plan zur Ansiedlung des Kolonistendorfes Sarata (heute in der Ukraine), das 1822 entstand. Da er die russische Sprache beherrschte und durch sein Organisationstalent beim Beschaffen von Baumaterialien war er eine wichtige Stütze der deutschen Siedler. Am heiratete Schertzinger die aus Bad Langenbrücken/Baden stammende Marianna Schäfer (1805–1888), mit welcher er 3 Kinder hatte. Schertzinger war über 19 Jahre Gehilfe von Gottlieb Veygel, dem Bürgermeister Saratas und wiederholt Bevollmächtigter der Gemeinde beim Landgericht Akkerman. Trotz der Anerkennung für seine Verdienste bei der Gründung von Sarata, zog er sich in späten Jahren betrübt, nach einer Zurücksetzung innerhalb der Gemeinde, ins Privatleben zurück. Für seine langjährigen Dienste ehrte ihn der russische Zar durch die Verleihung der silbernen Medaille, mit der nur wenige Bessarabiendeutsche ausgezeichnet wurden. Alois Schertzinger starb am 12. Februar 1864 in Sarata an einem Schlaganfall und wurde dort am 14. Februar 1864 beigesetzt. Literatur Christian Fieß: Heimatbuch Sarata: 1822-1940, Mühlacker, 1979, Selbstverlag Einzelnachweise Musiker (Deutschland) Bessarabiendeutsche Russlanddeutscher Kapellmeister Geboren 1787 Gestorben 1864 Mann"} {"instruction": "Create a function which takes two parameters and returns true if the second parameter is a power of the first parameter.", "input": "x = 16 y = 4", "output": "def is_a_power_of(x, y): if x == y: return True if x > y and y != 0: return is_a_power_of(x/y, y) else: return False power_of = is_a_power_of(x, y)"} {"text": "[DE Wikipedia] Thomas Keating\n\nThomas Aquinas Keating OCSO (* 7. März 1923 in New York; † 25. Oktober 2018 in Spencer, Massachusetts) war ein US-amerikanischer Trappistenmönch und Abt sowie einer der Mitbegründer des Centering Prayer. Leben Thomas Keating studierte nach dem Besuch der Deerfield Academy Philosophie und Theologie an der Yale University und der Fordham University. Im Dezember 1943 beendete er sein Studium. Keating trat im Januar 1944 in Valley Falls, Rhode Island, in den Trappistenorden ein. 1958 wurde er zum Superior des St. Benedikt-Klosters in Snowmass, Colorado, gewählt. 1961 wurde er Abt der St. Josephs Abbey in Spencer, Massachusetts. Nach seinem Rücktritt als Abt von Spencer im Jahr 1981 kehrte er nach Snowmass zurück, wo er eine bestimmte Form von zehntägigen intensiven Einkehrtagen durchführte, wobei der Schwerpunkt auf der Praxis des Centering Prayer lag. Er war einer der drei Mitbegründer dieser Gebetsform, die eine neuere Methode des kontemplativen Gebetes darstellt. Es entstand 1975 in der St. Josephs Abbey. William Meninger und Basil Pennington, beide ebenfalls Zisterziensermönche, waren die anderen Mitbegründer. Das Konzept wurde erstmals von Pater Keating vorgeschlagen. William Meninger begann mit einer Gebetsmethode, die auf dem aus dem 14. Jahrhundert stammenden spiritueller Klassiker Die Wolke des Nichtwissens basiert. Er bezeichnet dies als das Gebet in der „Wolke“ (des Nichtwissens) und lehrte es die Priester bei Einkehrtagen. Basil Pennington war der erste, der das Gebet an ein Laienpublikum in Connecticut weitergab, wo die Teilnehmer den Begriff „Centering Prayer“ vorschlugen. Thomas Merton hatte den Begriff schon zuvor benutzt. Im Jahr 1984 gründete Thomas Keating zusammen mit Gustave Reininger und Edward Bednar die Contemplative Outreach Ltd., ein internationales ökumenisches geistliches Netzwerk, das die Praxis des Centering Prayer und der Lectio divina verbreiten helfen soll. Dabei handelt es sich um Methoden zum Gebet aus der christlichen kontemplativen Tradition. Contemplative Outreach bietet Hilfen für die Gläubige, die den kontemplativen Weg beschritten haben, z. B. Einkehrtage und Workshops. Keating veröffentlichte 28 Bücher, viele davon über das Beten. 2014 erschien ein Dokumentarfilm „Thomas Keating: A Rising Tide of Silence“. Keating war zudem Präsident von Monastic Interreligious Dialogue und von Temple of Understanding. Thomas Keating lebte bis März 2018 im St. Benedikt-Kloster in Snowmass, Colorado und starb am 25. Oktober 2018 in St. Joseph’s Abbey in Spencer, Massachusetts. Veröffentlichungen Die Krise des Glaubens. Johannes-Verlag, Leutesdorf am Rhein 1975, ISBN 3-7794-0611-X. Das Gebet der Sammlung. Einführung und Begleitung des kontemplativen Gebetes (1. Bd. der Trilogie). Vier-Türme-Verlag, Münsterschwarzach 1987;…"} {"instruction": "Create a Python program that takes an input of a list of numbers and prints out the median of the list.", "input": "[2, 9, 4, 8, 0, 7, 1]", "output": "def median(nums):\n # Sort the list\n nums.sort()\n \n length = len(nums)\n \n # Check for even length list\n if length % 2 == 0:\n # Get average of two middle elements\n median = (nums[int(length / 2)] + nums[int(length / 2 - 1)]) / 2\n else:\n # Return middle element\n median = nums[int(length / 2)]\n \n return median\n \nnums = [2, 9, 4, 8, 0, 7, 1]\nprint(median(nums)) # 4.5"} {"text": "[HI Wikipedia] लाल सागर मुहाफ़ज़ाह\n\nलाल सागर मुहाफ़ज़ाह (अरबी: , अंग्रेज़ी: Red Sea) मिस्र का एक मुहाफ़ज़ाह (उच्च-स्तरीय प्रशासनिक विभाग) है। यह देश के दक्षिण-पूर्वी कोने में नील नदी और लाल सागर के दरम्यान स्थित है। इसकी दक्षिणी सीमा सुडान से लगती है। इसमें 'हलाइब त्रिकोण' नामक क्षेत और सियाल द्वीप भी आते हैं जिनको लेकर मिस्र व सुडान में विवाद है। इन्हें भी देखें मिस्र के मुहाफ़ज़ात‎ सन्दर्भ लाल सागर मुहाफ़ज़ाह मिस्र के मुहाफ़ज़ात मिस्र"} {"text": "[DE Wikipedia] Ko Mak\n\nKo Mak (auch: Ko Maak, Thai ) ist eine Insel in Thailand. Geografie Ko Mak gehört zur Provinz Trat und liegt im östlichen Golf von Thailand zwischen Ko Chang (nördlich) und Ko Kut (südlich) und hat einen Umfang von 27 Kilometer mit einigen Sandstränden. Die Insel hat einen Durchmesser von sechs Kilometer und die Form eines vierblättrigen Kleeblatts, die Fläche beträgt etwa 16 km². Im Gegensatz zu den vorgenannten ist Ko Mak weitgehend flach. Neben den schönen Stränden sind die vielen kleineren Inseln und Inselchen reizvoll. So liegt nördlich von Ko Mak die Insel Ko Wai, die von Korallenriffen umgeben ist, ruhige Strände und üppige tropische Flora aufweist. Auch das östlich vorgelagerte Ko Kradat verfügt über sehr schöne Strände. Bei besonders niedriger Ebbe ist es möglich, nach Ko Kham zu wandern (etwa einen Kilometer nordwestlich von Ko Mak). Die Insel Ko Phi, nordwestlich von Ko Mak und südwestlich von Ko Kham, ist unbewohnt. Ko Mak liegt nicht im Naturschutzgebiet und wird deswegen auch landwirtschaftlich genutzt. Hauptsächlich werden Kautschukbäume und Kokospalmen kultiviert. Westlich von Ko Mak liegt die Inselgruppe von Ko Rang, die einen bergigen Charakter hat. Auf den Inseln werden Nester der Vogelart Salanganen geerntet, aus denen dann die chinesische Schwalbennestersuppe hergestellt wird. Tourismus Der Tourismus ist noch nicht sehr ausgeprägt. Es gibt zwölf Resorts oder Bungalowanlagen. Rund um die Insel ist Sporttauchen möglich. Es gibt eine Fährverbindung zum südlich von Trat gelegenen Laem Ngop, wobei die Überfahrt regulär drei Stunden dauert. Daneben gibt es auch mehrmals am Tag Speedboatverbindungen, die von einigen Resorts angeboten werden und etwa eine Stunde dauern. Siehe auch Liste thailändischer Inseln Weblinks Mak Mak Mak Provinz Trat"} {"instruction": "Write an SQL query that returns the seating capacity of a given theater.", "input": "theater name = “Fox Theatre”", "output": "SELECT theater_name, seating_capacity FROM theater WHERE theater_name = 'Fox Theatre';"} {"text": "[CS Wikipedia] Viskozita\n\nViskozita (také vazkost) je fyzikální veličina udávající poměr mezi tečným napětím a změnou rychlosti v závislosti na vzdálenosti mezi sousedními vrstvami při proudění skutečné kapaliny. U pevných látek se viskozita projevuje různou deformační odezvou v závislosti na délce trvání působení zatížení (při dlouhodobém zatížení materiál „teče“) – pro viskózní materiály (beton, asfaltový beton) neplatí jednoduchý Hookův zákon a vyskytuje se u nich tzv. dotvarování. Viskozita je veličina charakterizující vnitřní tření a závisí především na přitažlivých silách mezi částicemi. Kapaliny s větší přitažlivou silou mají větší viskozitu, větší viskozita znamená větší brzdění pohybu kapaliny nebo těles v kapalině. Pro ideální kapalinu má viskozita nulovou hodnotu (taková kapalina se zařazuje jako další skupenství – tzv. supratekutina). Kapaliny s nenulovou viskozitou se označují jako viskózní (vazké). Značení Symbol dynamické viskozity: η Jednotka SI: newton sekunda na metr čtvereční, značka jednotky: N.s·m−2, ekvivalentně též Pascal sekunda, značka Pa·s. V soustavě CGS je jednotkou dynamické viskozity poise značka P. Běžněji se používá centipoise cP. 1 cP = 10−2 P = 10−3 Pa⋅s = 1 mPa⋅s Symbol kinematické viskozity: ν Jednotka SI: metr čtvereční za sekundu, značka jednotky: m2·s−1 (praktičtější je mm2·s−1, příp. cm2·s−1). V soustavě CGS byl jednotkou viskozity stokes (zkratka St, podle fyzika George Gabriel Stokese). 1 St = 1 cm2·s−1 = 10−4 m2·s−1 1 cSt = 1 mm2·s−1 = 10−6m2·s−1 Výpočet Tečné napětí vnitřního tření je v nejjednodušším případě podle Newtonova zákona přímo úměrné gradientu rychlosti, , kde označuje gradient rychlosti ve směru kolmém na rychlost, je tečné napětí a se nazývá dynamická viskozita (vazkost). Převrácená hodnota dynamické viskozity se nazývá tekutost Podíl dynamické viskozity a hustoty kapaliny se nazývá kinematická viskozita (nebo součinitel kinematické viskozity). Uvedený vztah platí pro velkou většinu kapalin (i plynů). Takové tekutiny se nazývají newtonské tekutiny (newtonovské). Dynamická viskozita u nich nezávisí na gradientu rychlosti. Existují však také anomální tekutiny, u nichž je viskozita na gradientu rychlosti závislá. Takové kapaliny se nazývají nenewtonské. Viskozita plynů U plynů lze viskozitu považovat za nezávislou na tlaku plynu (s výjimkou velmi nízkých a velmi vysokých tlaků). Viskozita plynů stoupá s rostoucí teplotou, čímž se odlišuje od viskozity kapalin, u nichž viskozita s rostoucí teplotou klesá. Pro popis závislosti dynamické viskozity plynů na teplotě lze použít Sutherlandův vzorec , kde je absolutní teplota a jsou látkové konstanty. Vlastnosti Viskozita klesá s rostoucí teplotou a roste s rostoucím tlakem. Vliv tlaku je však obvykle zanedbatelný. Přehled hodnot dynamických viskozit pro různé kapaliny (při 20…"} {"instruction": "Create an API in Python that takes in an integer as an input parameter and returns whether the number is prime or not.", "input": "num: 37", "output": "# Import the required library\nimport math\n\n# Check if a number is prime\ndef is_prime(num):\n if num < 2:\n return False\n for i in range(2, int(math.sqrt(num)) + 1):\n if num % i == 0:\n return False\n return True\n\n# Main program\nnum = int(input('Enter a number: '))\nif is_prime(num):\n print(f'{num} is a prime number')\nelse:\n print(f'{num} is not a prime number')"} {"instruction": "Port a Java code snippet to Python 3.", "input": "public class Foo {\n public int foo( int a, int b ) {\n return a + b;\n }\n}", "output": "def foo(a, b):\n return a + b"} {"instruction": "Create a web scraper using Python that collects data from the given URL - http://example.com/", "input": "http://example.com/", "output": "import requests\nfrom lxml import html\n\n# Get the response\nresp = requests.get('http://example.com/')\n\n# Parse the response\ndoc = html.fromstring(resp.text)\n\n# Extract the data\ndata = doc.xpath('//div/span/text()')\n\n# Print out the data\nprint(data)"} {"instruction": "Format the below Epoch time (in milliseconds) to a date format in PHP.", "input": "Time: 1574395883358", "output": "echo date(\"Y-m-d H:i:s\", 1574395883358/1000); // Output: 2019-11-23 23:54:43"} {"instruction": "Write a Java function to classify a given set of numbers into even and odd.", "input": "", "output": "public static void classifyNumber(int[] numbers) { for (int num : numbers) { if (num % 2 == 0) { System.out.println(num + \" is even\"); } else { System.out.println(num + \" is odd\"); } } }"} {"text": "[HI Wikipedia] केशिराज\n\nकेशिराज (कन्नड: ಕೇಶಿರಾಜ) तेरहवीं शती के कन्नड वैयाकरण एवं कवि थे। उन्होने 'शब्दमणिदर्पण' नामक प्रसिद्ध कन्नड व्याकरण ग्रन्थ की रचना की थी। इस कार्य के कारण वे कन्नड व्याकरण के सबसे महान सिद्धान्तकार माने जाते हैं। वे संस्कृत के भी पण्डित थे। वे होयसला राजदरबार के प्रतिष्ठित कवि थे। कन्नड कवि कन्नड वैयाकरण"} {"instruction": "Find the largest key in a dictionary", "input": "{'a':1, 'b':5, 'c':6, 'd':9}", "output": "def findLargestKey(d): # Initialize largest_key and largest_val largest_key = None largest_val = -1 # Iterate each key-value in dictionary for key, value in d.items(): # Initialize largest_key and largest_val if value > largest_val: largest_val = value largest_key = key return largest_key"} {"instruction": "Using the given code, create a JavaScript to add an item to the data array.", "input": "let data = [ {name:\"John\", age:20}, {name:\"Amy\", age:21} ]", "output": "data.push({name: 'Bob', age: 25});"} {"text": "[HI Wikipedia] किरोड़ीमल महाविद्यालय\n\nकिरोड़ीमल महाविद्यालय दिल्ली विश्वविद्यालय के उत्तरी परिसर में स्थित एक प्रमुख महाविद्यालय है। इस महाविद्यालय के पढ़े छात्र-छात्राये देश विदेशो में अनेक महत्वपूर्ण पदों पर कार्यरत है। सन्दर्भ दिल्ली विश्वविद्यालय"} {"text": "[DE Wikipedia] Ernst Paul Dörfler\n\nErnst Paul Dörfler (* 15. Mai 1950 in Kemberg) ist ein deutscher Autor und Umweltschützer und war Mitbegründer der Grünen Partei in der DDR. Leben Ernst Paul Dörfler wuchs in Meuro bei Bad Schmiedeberg auf und absolvierte in Pretzsch an der Elbe das Abitur. Er studierte 1968 bis 1973 Chemie an der Technischen Hochschule „Otto von Guericke“ in Magdeburg, war danach vier Jahre in Forschung und Lehre tätig. Dörfler wurde zum Dr. rer. nat. promoviert. Nach einer Saison als Rettungsschwimmer an der Ostseeküste im Jahr 1977 arbeitete er als Operativtechnologe für Mikroelektronik im Werk für Fernsehelektronik in Berlin-Oberschöneweide. Von 1978 bis 1982 war er als Ökochemiker am Institut für Wasserwirtschaft in Berlin und Magdeburg beschäftigt. 1979 unterbrach er seine Berufstätigkeit für ein Babyjahr mit seiner Tochter Anne. 1983 verließ Dörfler seine Stelle am Institut, um sich als freier Schriftsteller verschiedenen Umweltthemen umfänglich zu widmen. Hatte er bereits zuvor an mehreren Studien zur ökologischen Situation in der DDR (darunter an der Nitrat- und der Pestizidstudie) mitgearbeitet, die vor 1989 unveröffentlicht bleiben mussten, so schrieb der auf einem Bauernhof aufgewachsene Dörfler zusammen mit seiner damaligen Frau Marianne in dem international Aufsehen erregenden und mehrfach aufgelegten Bestseller „Zurück zur Natur?“ über die Zusammenhänge zwischen Natur und menschlichen Aktivitäten in Wald, Acker und Wasser und auch über die Grenzen des Wachstums und die Notwendigkeiten von Technikfolgenabschätzung unter Bedingungen von Komplexität. So problematisiert er 1986 in „Zurück zur Natur?“ nach einer historischen Einordnung des Ackerbaus z. B. die Schwierigkeiten bei den neuartigen Belastungen durch den Einsatz von Düngemitteln. Demzufolge spiegelt sich im Mineraldüngereinsatz ein ökologisches Gesetz von Eilhard Alfred Mitscherlich vom abnehmenden Ertragszuwachs durch den Düngereinsatz bei landwirtschaftlichen Kulturpflanzen wider, da für den dreifachen Anstieg der Ernte von 1910 bis in die 1980er der Aufwand „im gleichen Zeitraum um das Fünf- bis Zehnfache erhöht“ werden musste. Diese Vermutung wurde 2009 im Science Journal bestätigt. Das entstehende Lachgas ist dabei schädlicher als FCKW und wirkt sich auch auf den Klimawandel aus, auch im Kraftstoffvergleich hat es eine schlechte Bilanz. Dörfler zitiert im Buch einen Nitrat-Grenzwert von 45 mg/l als Grenzwert der Weltgesundheitsorganisation. In einer Studie des Umweltbundesamtes aus dem Jahr 2017 zu den Kosten der Trinkwasserbeeinträchtigung durch Überdüngung wird ein Zielwert von 37,5 mg Nitrat pro Liter Trinkwasser angegeben, und es werden die Kosten für das Minimierungsgebot aus § 6 der Trinkwasserverordnung für Zielwerte von 25 bzw. 10 mg Nitrat pro Liter berechnet. Als einer der ersten…"} {"instruction": "Write a Python function to check if a given number is a prime number or not. A prime number is an integer greater than 1 which is not divisible by any other numbers.", "input": "11", "output": "def is_prime(n): #Check if n islarger than one if n > 1: # Check if n is divisible by any number between2 and n for i in range(2,n): if (n % i) == 0: return False else: return True else: return False"} {"instruction": "Given a dictionary, create a program to find the longest word in Python.", "input": "{\"hello\": 5, \"world\": 5, \"welcome\": 7, \"to\": 2, \"programming\": 11}", "output": "def longest_word(dictionary): \n longest = \"\"\n for word in dictionary: \n if len(word) > len(longest): \n longest = word \n return longest"} {"instruction": "Write a Python program to predict whether a customer is likely to churn or not.", "input": "[\n{'id':1, 'age':25, 'gender':'Male', 'priority':'High'},\n{'id':2, 'age':28, 'gender':'Male', 'priority':'Low'},\n{'id':3, 'age':35, 'gender':'Female', 'priority':'High'},\n{'id':4, 'age':18, 'gender':'Female', 'priority':'Low'},\n{'id':5, 'age':45, 'gender':'Male', 'priority':'Low'},\n{'id':6, 'age':27, 'gender':'Female', 'priority':'High'},\n]", "output": "import pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.tree import DecisionTreeClassifier\n\n# Load the data\ndata = [\n{'id':1, 'age':25, 'gender':'Male', 'priority':'High'},\n{'id':2, 'age':28, 'gender':'Male', 'priority':'Low'},\n{'id':3, 'age':35, 'gender':'Female', 'priority':'High'},\n{'id':4, 'age':18, 'gender':'Female', 'priority':'Low'},\n{'id':5, 'age':45, 'gender':'Male', 'priority':'Low'},\n{'id':6, 'age':27, 'gender':'Female', 'priority':'High'},\n]\n\n# Convert data into a pandas DataFrame\ndf = pd.DataFrame(data)\n\n# Create target variable\ndf['churn'] = [0, 0, 0, 1, 1, 0]\n\n# Convert categorical variables to dummy variables\ndf_dummy = pd.get_dummies(df, columns = ['gender', 'priority'], drop_first = True)\n\n# Split the data into train and test\nX = df_dummy.drop(['id', 'churn'], axis = 1)\ny = df_dummy['churn']\n\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 0)\n\n# Feature scaling\nsc = StandardScaler() \nX_train = sc.fit_transform(X_train) \nX_test = sc.transform(X_test)\n\n# Create the model\nclf = DecisionTreeClassifier() \nclf.fit(X_train, y_train) \n\n# Make predictions\ny_pred = clf.predict(X_test)\n\n# Evaluate the model\ny_prob = clf.predict_proba(X_test)[:, 1]\n\nprint(\"Accuracy:\", clf.score(X_test, y_test))"} {"instruction": "Write a Python program to solve a quadratic equation given the coefficients a, b, c?", "input": "", "output": "import math\n\ndef solve_quadratic(a, b, c):\n # calculate discriminant\n d = (b**2) - (4*a*c)\n \n # find two solutions\n sol1 = (-b-math.sqrt(d))/(2*a)\n sol2 = (-b+math.sqrt(d))/(2*a)\n \n return sol1, sol2"} {"text": "[CS Wikipedia] Quend\n\nQuend je francouzská obec v departementu Somme v regionu Hauts-de-France. V roce 2010 zde žilo 1 381 obyvatel. Vývoj počtu obyvatel Související články Seznam obcí v departementu Somme Externí odkazy Reference Obce v departementu Somme Přímořská letoviska ve Francii"} {"instruction": "Write Python code to select values greater than 2 in a given list.", "input": "[1, 2, 3, 4, 5]", "output": "list = [1, 2, 3, 4, 5]\n \nresult = [value for value in list if value > 2]\n \nprint(result)"} {"instruction": "Create a Python program to compare two strings.", "input": "", "output": "def compare_strings(s1, s2):\n if len(s1) != len(s2):\n return False\n for i in range(len(s1)):\n if s1[i] != s2[i]:\n return False\n return True"} {"text": "[HI Wikipedia] सत्यमंगलम\n\nसत्यमंगलम (Sathyamangalam) भारत के तमिल नाडु राज्य के ईरोड ज़िले में स्थित एक नगर है। यह पूर्वी घाट के चरणों में भवानी नदी के किनारे बसा हुआ है। इन्हें भी देखें ईरोड ज़िला सन्दर्भ ईरोड ज़िला तमिल नाडु के शहर ईरोड ज़िले के नगर"} {"text": "[EN Wikipedia] Vidmantas Jažauskas\n\nVidmantas Jažauskas (born 30 November 1961 in Biržai, Lithuanian SSR) is a Lithuanian painter, book illustrator, poet, and social activist. Biography In 1991, he graduated from the Vilnius Art Institute. He teaches at the Biržai Vladas Jakubėnas Music School. Since 1982, he has participated in exhibitions, Solo exhibitions organized by Vilnius, Kaunas, Panevezys, Siauliai. Since 2000, he has been a member of the Lithuanian Artists' Association. Since 2001 he has been a member and the leader of the Biržai artists group \"8+\". He is married to Eglė; they have 5 children: Justinas, Paulius, Ieva, Danielius, Augustinas. Style and Works Vidmantas Jažauskas has written a statement about his art: \"I could summarize my creative process with the words of a famous American artist and contemporary realist Alan Katz – \"I am one of those painters who just painted while the art world burned...\" Also, as in his words – I was only interested in the \"universal human content that never changes\". In fact, such a position was not formed immediately, because, all the people of my generation (including myself), were effected by the transformation of art forms from modernism to postmodernism, that began after the independence and continues to this day. But thanks to the Internet, I realized that there can not be any contradiction between the words \"contemporary\" and \"realism\". Therefore, the artist's temperament, sensuality, the way of seeing his world, the search for harmony and beauty in the surroundings, the humanistic setting, remain the main values of the 21st century. \". Artworks Vidmantas Jažauskas has his own online gallery, where he posts his most recent artworks. Articles Vidmantas also writes articles about art history and other artists on his page. Poetry \"rudens pradžia\"; \"gegužė\"; \"vienintelis vasaros eilėraštis\", Lietuvos rašytojų sąjungos savaitraštis, 2003-07-25 See also List of Lithuanian painters References External links Artist's website Vidmantas Jažauskas. \"Menininko kūryba nuo miesto dydžio nepriklauso\", Bernardinai, 2009-05-18 \"Vidmantas Jažauskas\" Lithuanian Wikipedia Lithuanian painters 1961 births Living people Vilnius Academy of Arts alumni"} {"instruction": "Create a function to convert an XML string to a JSON object.", "input": "", "output": "import xmltodict def xmlToJsonObject(xmlStr): return xmltodict.parse(xmlStr)"} {"text": "[EN Wikipedia] Bistra (Bicaz)\n\nThe Bistra (in its upper course also: Bistra Mare) is a left tributary of the river Capra in Romania. It flows into the Capra in Telec. Its length is and its basin size is . References Rivers of Romania Rivers of Neamț County"} {"instruction": "Replace the placeholder text with a valid statement that sets the default value for the 'count' parameter of the function", "input": "def prints(word, count=TODO): for i in range(count): print(word)", "output": "def prints(word, count=0): for i in range(count): print(word)"} {"instruction": "Generate a hash for a given dictionary.", "input": "my_dict = {'name': 'John', 'age': 27, 'profession': 'programmer'}", "output": "import hashlib def generate_hash(my_dict): my_string = str(my_dict) res = hashlib.md5(my_string.encode()).hexdigest() return res print(generate_hash(my_dict))"} {"instruction": "Create a python script that compares two sets of input data (lists of numbers) and outputs the intersection set.", "input": "set1 = [1, 2, 3, 4, 5]\nset2 = [3, 4, 5, 6, 7]", "output": "def find_intersection(set1, set2):\n intersect_set = []\n for num in set1:\n if num in set2:\n intersect_set.append(num)\n return intersect_set\n\nset1 = [1, 2, 3, 4, 5]\nset2 = [3, 4, 5, 6, 7]\n\nintersect_set = find_intersection(set1, set2)\nprint(intersect_set) # Output -> [3, 4, 5]"} {"instruction": "Create a function to calculate the compound interest rate given the initial principal amount P, the annual interest rate r and the number of times compounding occurs in a year n.", "input": "", "output": "def compound_interest(P, r, n): return P * (1 + (r/n))**(n*t)"} {"text": "[EN Wikipedia] Puriri River\n\nThe Puriri River is a river of the Waikato Region of New Zealand's North Island. It flows west close to the point where the Coromandel Peninsula joins the rest of the North Island, reaching the Waihou River east of Turua. 73% of the catchment is in forest and 27% in pasture. The main tributaries are Apakura, Kotorepupuai and Matangiharara streams. Average channel gradients are 5% to 7%. The Apakura Stream rises on Pakirarahi, which is high. Macroinvertebrate levels in the stream indicate a good water quality. The stream is used for water supply. Radiocarbon dating of shell middens beside the river indicates the earliest settlement along the river was about 1674. See also Puriri, New Zealand List of rivers of New Zealand References Thames-Coromandel District Rivers of Waikato Rivers of New Zealand Hauraki Gulf catchment"} {"instruction": "Write a PHP snippet to set cookie for the current page with the name \"username\" and value \"foo\".", "input": "", "output": "setcookie('username', 'foo', 0);"} {"text": "[EN Wikipedia] Altaic languages\n\nAltaic () is a controversial proposed language family that would include the Turkic, Mongolic and Tungusic language families and possibly also the Japonic and Koreanic languages. The hypothetical language family has long been rejected by most comparative linguists, although it continues to be supported by a small but stable scholarly minority. Speakers of the constituent languages are currently scattered over most of Asia north of 35° N and in some eastern parts of Europe, extending in longitude from the Balkan Peninsula to Japan. The group is named after the Altai mountain range in the center of Asia. The Altaic family was first proposed in the 18th century. It was widely accepted until the 1960s and is still listed in many encyclopedias and handbooks, and references to Altaic as a language family continue to percolate to modern sources through these older sources. Since the 1950s, most comparative linguists have rejected the proposal, after supposed cognates were found not to be valid, hypothesized sound shifts were not found, and Turkic and Mongolic languages were found to be converging rather than diverging over the centuries. The relationship between the Altaic languages is now generally accepted to be the result of a sprachbund rather than common ancestry, with the languages showing influence from prolonged contact. The continued use of the term \"Altaic\" to refer to the various iterations of an Altaic theory, the \"Altaic sprachbund\" and infrequently as a general term for the region has resulted in confusion around the status of the Altaic hypothesis, with the end result being many Altaicists adopting the name \"Transeurasian\" for modifications of the family proposal to avoid confusion. This confusion is compounded by literature which refers to Altaic as an accepted hypothesis, which historically was the case. Altaic has maintained a limited degree of scholarly support, in contrast to some other early macrofamily proposals. Continued research on Altaic is still being undertaken by a core group of academic linguists, but their research has not found wider support. In particular it has support from the Institute of Linguistics of the Russian Academy of Sciences and remains influential as a substratum of Turanism, where a hypothetical common linguistic ancestor has been used in part as a basis for a multiethnic nationalist movement. Earliest attestations The earliest attested expressions in Proto-Turkic are recorded in various Chinese sources. Anna Dybo identifies in Shizi (330 BCE) and the Book of Han (111 CE) several dozen Proto-Turkic exotisms in Chinese Han transcriptions. Lanhai Wei and Hui Li reconstruct the name of the Xiōngnú ruling house as PT *Alayundluğ /alajuntˈluγ/ 'piebald horse clan.' The earliest known texts in a Turkic language are…"} {"text": "[EN Wikipedia] 1844 in Denmark\n\nEvents from the year 1844 in Denmark. Incumbents Monarch – Christian VIII Prime minister – Poul Christian Stemann Events Søren Kierkegaard publishes Philosophical Fragments. Undated Births JanuaryMarch 12 January – Louis Hasselriis, sculptor (died 1912) 13 January Peter Gottfred Ramm, military officer, landowner and company founder (died 1917) 1 February – Ernst Immanuel Cohen Brandes, economist, writer, and editor (died 1892) AprilJune 11 April – Vilhelm Herman Oluf Madsen, politician (died 1917) 12 June Klaus Berntsen, politician (died 1927) Oscar Alexander Ræder, writer (died 1877) JulySeptember 20 September Emilie West, educator (died 1907) OctoberDecember 9 November Andreas Riis Carstensen, painter (died 1906) 1 December – Alexandra of Denmark, queen-empress consort of King Edward VII of the United Kingdom (died 1925 in the United Kingdom) 4 December – Henrik Franz Alexander von Eggers, soldier and botanist (died 1903) 6 December – Rogert Møller, architect (died 1918) Deaths 7 March – Christian Horneman, miniature painter (born 1765) 15 March – Adam August Müller, painter (born 1811) 24 March – Bertel Thorvaldsen, sculptor (born 1770) 16 December – Johan Ernst Hartmann, organist and composer (born 1770) 24 December – Friedrich Bernhard Westphal, painter (born 1803) References 1840s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Write a Python program to sort the input list according to its length.", "input": "list = [\"Hello\", \"World\", \"This is a test\"]", "output": "list = [\"Hello\", \"World\", \"This is a test\"]\n\ndef sort_list_length(list):\n '''\n Function to sort the list according to its length\n '''\n return sorted(list, key=len)\n\nif __name__ == \"__main__\":\n list = [\"Hello\", \"World\", \"This is a test\"]\n sorted_list = sort_list_length(list)\n print(sorted_list)"} {"instruction": "Implement a function that takes an integer n as input and returns a matrix of size nxn consisting of the natural numbers from 1 to n^2 in row major order.", "input": "n = 5", "output": "[[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]"} {"instruction": "Write code to sort a Python list of tuples based on their second element in the tuple.", "input": "list_of_tuples = [('a', 5), ('b', 1), ('c', 10)]", "output": "list_of_tuples.sort(key=lambda tup: tup[1])"} {"instruction": "Given an array of integers, write a function to determine whether the array is a palindrome.", "input": "array = [1,2,3,2,1]", "output": "def isPalindrome(array): return array == array[::-1] # reversed array"} {"text": "[CS Wikipedia] Modulární programování\n\nModulární programování je technika návrhu softwaru, která zdůrazňuje rozdělení funkčnosti programu na nezávislé, zaměnitelné moduly, z nichž každý obsahuje vše nezbytné pro jediný aspekt požadované funkcionality. Koncepčně moduly představují oddělení zodpovědností a zlepšují udržovatelnost softwaru explicitním vyjádřením logických hranic mezi komponenty. Při vytváření většího množství softwarových projektů přinášejí koncept znovupoužitelnosti, umožňující moduly vytvořené v jednom projektu používat i v projektech jiných. Moduly se obvykle začleňují do programů pomocí rozhraní. Rozhraní modulu popisuje, které prvky jsou modulem poskytovány a které jsou modulem vyžadovány. Prvky definované v rozhraní jsou přístupné z ostatních modulů. Implementační část obsahuje konkrétní implementaci kódu, typů a dalších prvků, které odpovídají prvkům deklarovaným v části rozhraní. Modulární programování spolu se strukturovaným programováním a objektově orientovaným programováním představují různé aspekty návrhu a vytváření softwaru metodou „shora-dolů“ () „postupným zjemňováním“ (), které vznikaly v šedesátých letech 20. století, a jejichž společným cílem je usnadnit konstrukci rozsáhlých softwarových programů a systémů rozkladem na menší části. Zatímco modulární programování se zabývá strukturou programu na nejvyšší úrovni (skupiny funkcí), strukturované programování se vztahuje na používání řídicích struktur na úrovni jednotlivých funkcí a v rámci funkcí; objektově orientované programování pak na využívání datových objektů jako speciálního nástroje pro vytváření datových struktur. Související články Soudržnost (informatika) Provázanost Knihovna (programování) Strukturované programování Reference Paradigmata programování"} {"instruction": "Create a SQL table with the following schema: id (integer), name (string), city (string).", "input": "", "output": "CREATE TABLE myTable ( id INTEGER, name VARCHAR(255), city VARCHAR(255) );"} {"instruction": "Write a Java method to remove repeated elements from an array.", "input": "", "output": "public static int[] removeDuplicates(int[] arr) { int n = arr.length; int[] temp = new int[n]; int j = 0; for (int i=0; i Book Author The Great Gatsby F. Scott Fitzgerald The Catcher in the Rye J.D. Salinger To Kill a Mockingbird Harper Lee "} {"instruction": "Create a C++ code to display the following pattern. x xxx xxxxx xxxxxxx", "input": "", "output": "#include using namespace std; // Function to demonstrate printing pattern void triangle(int n) { // Outer loop to handle number of rows // n in this case for (int i=0; i player2_score):\n print(\"Player 1 wins!\")\nelif (player2_score > player1_score):\n print(\"Player 2 wins!\")\nelse:\n print(\"It's a Tie!\")"} {"instruction": "Create a program in C to find the biggest of three numbers.", "input": "", "output": "int max(int a, int b, int c) { int big = a; if(b > big) big = b; if(c > big) big = c; return big; }"} {"instruction": "Generate a python program that takes two sets of integers as input and outputs the intersection of those sets.", "input": "set1 = {1, 2, 3, 4}\nset2 = {3, 4, 5, 6}", "output": "def intersection(set1, set2): \n return set1 & set2\n\nresult = intersection(set1, set2) \nprint(result)"} {"instruction": "Write a python program that takes a list of numbers as input and prints out the sum of the two numbers that are closest to zero.", "input": "nots = [1, 5, -3, 0 -7]", "output": "# Take the list of numbers\nnots = [1, 5, -3, 0, -7]\n\n# Sort the list\nnots.sort()\n\n# Set up variables to store the two closest values\nclosest1 = 0 \nclosest2 = 0\n\n# Iterate through the list\nfor val in nots:\n # Check if the absolute value of the current number \n # is closest to zero\n if abs(val) < abs(closest1):\n closest2 = closest1 \n closest1 = val\n\n# Print the sum of the two closest values\nprint(closest1 + closest2)"} {"instruction": "Write a Python program that simulates a coin flip game. The program should randomize a value between 0 and 1 and return \"Heads\" for values less than .5 and \"Tails\" for values greather than .5", "input": "Not applicable", "output": "import random\n\ndef coin_flip():\n\tif random.random() < 0.5:\n\t\treturn \"Heads\"\n\telse:\n\t\treturn \"Tails\"\n\nprint(coin_flip())"} {"instruction": "Output the lexicographical order of a given array of strings.", "input": "words = [\"apple\", \"banana\", \"cherry\"]", "output": "apple, banana, cherry"} {"instruction": "Write a Python program to query a MySQL database and produce a chart representing the results of the query.", "input": "The query is to calculate the total number of orders for each customer. The table name is 'orders'.", "output": "import mysql.connector\nimport matplotlib.pyplot as plt\n\n# Connect to the database\nmydb = mysql.connector.connect(\n host=\"localhost\",\n user=\"root\",\n passwd=\"password\",\n database=\"dbname\"\n)\n\n# Create a cursor\nmycursor = mydb.cursor()\n\n# Execute a query\nmycursor.execute(\"SELECT customer_id, COUNT(*) FROM orders GROUP BY customer_id\")\n\n# Fetch results\nresults = mycursor.fetchall()\n\n# Generate Chart\nordercounts = [result[1] for result in results]\ncustomers = []\nfor result in results:\n mycursor.execute(\"SELECT name FROM customers WHERE id = %s\" % (result[0],))\n name_result = mycursor.fetchone()\n customers.append(name_result[0])\n\nplt.bar(customers, ordercounts)\nplt.xticks(customers, rotation=90)\nplt.ylabel('Order Count')\nplt.xlabel('Customer')\nplt.show()"} {"instruction": "Retrieve the 5th element from a list named 'numbers'.", "input": "numbers = [1, 2, 3, 4, 5, 6, 7, 8]", "output": "5"} {"instruction": "Write an algorithm in Python to count how many words a given string contains.", "input": "", "output": "def count_words(string): words = string.split() return len(words)"} {"instruction": "Parse the following JSON into a Python dictionary.", "input": "{\n \"name\": \"John\",\n \"age\": 28,\n \"hobbies\": [\n \"Programming\",\n \"Sports\"\n ]\n}", "output": "# import the json module\nimport json\n\n# parse the json\njson_dict = json.loads('{ \"name\": \"John\", \"age\": 28, \"hobbies\": [ \"Programming\", \"Sports\" ]}')\n\n# print the parsed json\nprint(json_dict)"} {"instruction": "Rewrite the code snippet using a different loop structure.", "input": "i = 0 while i < 5: print(i) i += 1", "output": "for i in range(0, 5): print(i)"} {"instruction": "Create an AI chatbot that can answer questions about the given topic \"Covid-19\".", "input": "Topic: Covid-19", "output": "# Imports from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer # Create the AI Chatbot bot = ChatBot(\"CovidBot\") # Train the bot on the corpus trainer = ChatterBotCorpusTrainer(bot) trainer.train(\"chatterbot.corpus.english.covid19\") # Start the chatbot while True: user_input = input(\"User: \") if user_input == 'exit': break bot_response = bot.get_response(user_input) print(\"CovidBot:\",bot_response)"} {"instruction": "How does JavaScript handle undeclared variables?", "input": "", "output": "JavaScript will automatically create an undeclared variable if it is referenced in the code. The variable is then set to the undefined value. The variable cannot be set or accessed until it has been declared. The variable will also remain in the global scope."} {"instruction": "Create a HTML form and assign 'onSubmit' handler to it.", "input": "", "output": "
    "} {"instruction": "Design a code in Python to count the number of unique elements in a list.", "input": "numbers_list = [1, 2, 2, 5, 6, 6]", "output": "def count_unique_elements(numbers_list): \n seen = set() \n count = 0 \n for number in numbers_list: \n if number not in seen: \n seen.add(number) \n count+=1 \n return count"} {"instruction": "Suggest a Python code to create a list containing the first five positive numbers.", "input": "", "output": "numbers = [] for i in range(1, 6): numbers.append(i) print(numbers)"} {"instruction": "Create a web scrapper in Python that collects all the blog posts from the given website and stores them in a SQLite database.", "input": "Website URL: https://blog.floydhub.com/", "output": "import requests\nimport sqlite3\nfrom bs4 import BeautifulSoup\n\n# Get the web page content\nurl = 'https://blog.floydhub.com/'\npage = requests.get(url)\n\n# Parse the page\nsoup = BeautifulSoup(page.content, 'html.parser')\n\n# Extract the posts\nposts = soup.find_all('div', {'class': 'post-content'})\n\n# Create a database connection\nconn = sqlite3.connect('blog_posts.db')\ncur = conn.cursor()\n\n# Create the table\ncur.execute('CREATE TABLE IF NOT EXISTS posts (title TEXT, content TEXT)')\n\n# Insert the posts into the database\nfor post in posts:\n title = post.find('h2').get_text()\n content = post.find('p').get_text()\n cur.execute('INSERT INTO posts VALUES (?,?)', (title,content))\n\n# Commit the changes\nconn.commit()\n\n# Close the connection\nconn.close()"} {"instruction": "Create a web page with a navigation bar at the top.", "input": "", "output": " Navigation Bar Demo

    Welcome!

    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
    "} {"instruction": "Create a Python program to detect the occurrence of a certain word in a collection of text documents.", "input": "A collection of 10 text documents from a news website and the word is \"coronavirus\".", "output": "import os\n\ndef detect_coronavirus(input_dir):\n # input_dir - The directory containing the text documents\n total_occurrences = 0\n\n # Iterate through each file in the input_dir\n for file in os.listdir(input_dir):\n file_path = os.path.join(input_dir, file)\n\n # Read the file\n with open(file_path, 'r') as f:\n data = f.read()\n\n # Detect the occurrences of the word \"coronavirus\"\n occurrence_count = data.lower().count(\"coronavirus\")\n total_occurrences += occurrence_count\n\n return total_occurrences\n\n# Call the function\noccurrences = detect_coronavirus('input_dir')\nprint(f'The word \"coronavirus\" has occurred {occurrences} times.')"} {"instruction": "Develop a REST API in Python that fetches the number of likes of a specific post.", "input": "", "output": "from flask import Flask\nimport requests\n \napp = Flask(__name__)\n \n@app.route('/post-likes/', methods=['GET'])\ndef post_likes(id):\n response = requests.get('https://api.example.com/likes?id={id}')\n return response.json()\n\nif __name__ == '__main__':\n app.run()"} {"instruction": "Modify the given JavaScript code to display \"Hello World\" using alert.", "input": "let message = 'Hi'; alert(message);", "output": "let message = 'Hello World'; alert(message);"} {"text": "[EN Wikipedia] Dechloromonas\n\nDechloromonas is a genus in the phylum Pseudomonadota (Bacteria). Etymology The name Dechloromonas derives from:Latin pref. de, from; Neo-Latin noun chlorinum (from Greek adjective chlorōs, green), chlorine; Neo-Latin pref. chloro-, pertaining to chlorine; Latin feminine gender noun monas (μονάς), unit, monad; Neo-Latin feminine gender noun Dechloromonas, a dechlorinating monad. Members of the genus Dechloromonas can be referred to as dechloromonads (viz. Trivialisation of names). Species The genus contains 4 species, namely D. agitata ( Achenbach et al. 2001, (Type species of the genus).; Latin feminine gender participle adjective agitata, excited, agitated, highly active.) D. aromatica( Cavalier-Smith 2002) D. denitrificans ( Horn et al. 2005, ; Neo-Latin participle adjective denitrificans, denitrifying.) D. hortensis ( Wolterink et al. 2005, ; Latin feminine gender adjective hortensis, of or belonging to a garden.) See also Bacterial taxonomy Microbiology References Bacteria genera Azonexaceae Rhodocyclales Betaproteobacteria"} {"instruction": "In Python, parse the following XML document and extract the book title and author.", "input": "\n Title1\n Author1\n", "output": "# import the necessary libraries\nimport xml.etree.ElementTree as ET\n\n# Parse the XML document\nroot = ET.fromstring(xml_doc)\n\nfor book in root:\n if book.tag == 'title':\n title = book.text\n elif book.tag == 'author':\n author = book.text\n\nprint(f\"Book Title: {title}, Author: {author}\")"} {"instruction": "Write a SQL query to select the employee names and IDs from the table 'employees' where the name contains \"John\".", "input": "", "output": "SELECT name, id FROM employees WHERE name LIKE '%John%';"} {"instruction": "Edit the following Python code to reverse the list.", "input": "list1 = [1,2,3,4,5,6]", "output": "list1 = [1,2,3,4,5,6]\n\n# Reversing the list\nlist1 = list1[::-1] # Output: [6, 5, 4, 3, 2, 1]"} {"instruction": "Create an SQL statement to select the title and description of all movies with a rating greater than 3.", "input": "", "output": "SELECT title, description FROM movies WHERE rating > 3;"} {"instruction": "Create a function for printing each letter of a string on a separate line.", "input": "str = \"Hello World\"", "output": "def print_letter_separately(str): for letter in str: print(letter) # Output print_letter_separately(str)"} {"instruction": "Create a HTML page that has a table displaying the names, phone numbers and email addresses of 5 employees.", "input": "", "output": " Employees

    Employees

    Name Phone Email
    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
    "} {"instruction": "Write a function in Python to return the first n digits of the Fibonacci sequence.", "input": "n = 5", "output": "def fibonacci(n): a = 0 b = 1 if n < 0: print(\"Incorrect input\") elif n == 0: return a elif n == 1: return b else: for i in range(2,n): c = a + b a = b b = c return b fibonacci(n)"} {"instruction": "Create a function to filter out any strings containing the word \"the\" from a list of strings.", "input": "", "output": "def filter_the(string_list): filtered_list = [] for string in string_list: if \"the\" not in string: filtered_list.append(string) return filtered_list"} {"instruction": "Generate code to prompt user input using Python.", "input": "Not applicable", "output": "name = input('What is your name? ')\nprint('Hello', name, '!')"} {"instruction": "Create a loop that prints out numbers from 0 to 15, except skip numbers 6, 7, and 12.", "input": "", "output": "for num in range(16): if num not in [6, 7, 12]: print(num)"} {"instruction": "What are the three main principles of OOP?", "input": "", "output": "The three main principles of Object Oriented Programming (OOP) are encapsulation, inheritance, and polymorphism. Encapsulation is the process of wrapping data and functions together into one unit. Inheritance is the process of allowing a class to inherit the properties and behavior of a parent class. Polymorphism is the ability to define multiple versions of the same function or object depending on the context in which they are used."} {"instruction": "Create a simple Python script that prints out verses from the poem \"Twinkle Twinkle Little Star\".", "input": "", "output": "#print the verses\nprint(\"Twinkle, twinkle, little star,\")\nprint(\"How I wonder what you are!\")\nprint(\"Up above the world so high,\")\nprint(\"Like a diamond in the sky.\")\nprint(\"Twinkle, twinkle, little star,\")\nprint(\"How I wonder what you are!\")"} {"text": "[HI Wikipedia] बौद्ध धर्म\n\nबौद्ध धर्म नेपाल की श्रावक परंपरा से निकला ज्ञान धर्म और दर्शन है। श्रावक ( संस्कृत ) या सावक ( पाली ) का अर्थ है \"सुनने वाला\" या, अधिक सामान्यतः, \"शिष्य\"। इस शब्द का प्रयोग बौद्ध धर्म और जैन धर्म में किया जाता है । ईसा पूर्व छठवीं शताब्दी में गौतम बुद्ध द्वारा बौद्ध धर्म का प्रवर्तन किया गया। गौतम बुद्ध का जन्म सिंहली परंपरा के अनुसार 624 ईसा पूर्व । एक सामान्य परंपरा के अनुसार 563 ईसा पूर्व में लुंबिनी (वर्तमान नेपाल में) में में हुआ, उन्हें बोध गया में ज्ञान की प्राप्ति हुई, जिसके बाद सारनाथ में प्रथम उपदेश दिया, और उनका महापरिनिर्वाण 483 ईसा पूर्व कुशीनगर,भारत में हुआ था। उनके महापरिनिर्वाण के अगले पाँच शताब्दियों में, बौद्ध धर्म पूरे भारतीय उपमहाद्वीप में फैला और अगले दो हजार वर्षों में मध्य, पूर्वी और दक्षिण-पूर्वी एशिया में भी फैल गया। भगवान बुद्ध ओर महात्मा बौद्ध दोनों एक ही है , हीनयान, थेरवाद, महायान और वज्रयान धर्म में प्रमुख सम्प्रदाय हैं। दुनिया के करीब 2 अरब (29%) लोग बौद्ध धर्म के अनुयायी हैं। किंतु, अमेरिका के प्यु रिसर्च के अनुसार, विश्व में लगभग 54 करोड़ लोग बौद्ध धर्म के अनुयायी है, जो दुनिया की आबादी का 7% हिस्सा है। प्यु रिसर्च ने चीन, जापान व वियतनाम देशों के बौद्धों की संख्या बहुत ही कम बताई हैं, हालाँकि यह देश सर्वाधिक बौद्ध आबादी वाले शीर्ष के तीन देश हैं। प्रबुद्ध सोसाइटी के राष्ट्रीय अध्यक्ष डॉ. श्री प्रकाश बरनवाल के अनुसार दुनिया के 200 से अधिक देशों में बौद्ध अनुयायी हैं। किन्तु चीन, जापान, वियतनाम, थाईलैंड, म्यान्मार, भूटान, श्रीलंका, कंबोडिया, मंगोलिया, लाओस, सिंगापुर, दक्षिण कोरिया एवं उत्तर कोरिया समेत कुल 13 देशों में बौद्ध धर्म 'प्रमुख धर्म' है। भारत, नेपाल, अमेरिका, ऑस्ट्रेलिया, इंडोनेशिया, रूस, ब्रुनेई, मलेशिया आदि देशों में भी करोड़ों बौद्ध अनुयायी हैं। नमो buddhay गौतम बुद्ध गौतम बुद्ध के जीवन के विषय में प्रामाणिक सामग्री विरल है। इस प्रसंग में उपलब्ध अधिकांश वृत्तान्त एवं कथानक भक्तिप्रधान रचनाएँ हैं और बुद्धकाल के बहुत बाद के हैं। प्राचीनतम सामग्री में पालि त्रिपिटक के कुछ स्थलों पर उपलब्ध अल्प विवरण उल्लेख्य हैं, जैसे - बुद्ध की पर्येषणा, संबोधि, धर्मचक्रप्रवर्तन एवं महापरिनिर्वाण के विवरण। बुद्ध की जीवनी के आधुनिक विवरण प्रायः पालि की निदानकथा अथवा संस्कृत के महावस्तु, ललितविस्तर एवं अश्वघोष कृत बुद्धचरित पर आधारित होते हैं। किंतु इन विवरणों की ऐतिहासिकता वहीं तक स्वीकार की जा सकती है जहाँ तक उनके लिए प्राचीनतर समर्थन उपलब्ध हों। ईसा पूर्व 563 के लगभग शाक्यों की राजधानी कपिलवस्तु के निकट लुंबिनी वन में गौतम बुद्ध का जन्म प्रसिद्ध है। यह स्थान वर्तमान नेपाल राज्य के अंतर्गत भारत की सीमा से 7 किलोमीटर दूर है। यहाँ पर प्राप्त अशोक के रुम्मिनदेई स्तंभलेख से ज्ञात होता है 'हिद बुधे जाते' (= यहाँ बुद्ध जन्मे थे)। सुत्तनिपात में शाक्यों को हिमालय के निकट कोशल में रहनेवाले गौतम गोत्र के क्षत्रिय कहा गया है। कोशलराज के अधीन होते हुए भी शाक्य जनपद स्वयं एक गणराज्य था। इस प्रकार के राजा शुद्धोदन बुद्ध के पिता एवं मायादेवी उनकी माता प्रसिद्ध हैं। जन्म के पाँचवे दिन बुद्ध को 'सिद्धार्थ' नाम दिया गया और जन्मसप्ताह में…"} {"instruction": "Create an R function that plots a histogram of a given data set.", "input": "", "output": "plot_histogram <- function(data) { hist(data, main = \"Histogram of given data set\") }"} {"instruction": "Build a package and deploy it in the cloud.", "input": "The package is an API to authenticate users and the API should be able to authenticate users having different types of API keys.", "output": "Create a package containing API authentication logic and all the necessary API keys. Set up a cloud service, such as AWS or GCP, and deploy the package. Configure the cloud service to accept incoming requests and authenticate the user using the API keys."} {"text": "[EN Wikipedia] Xie Hongjun\n\nXie Hongjun (; born 2 August 1929) is a former Chinese footballer. Club career As an 11-year-old, Xie Hongjun played for Shanghai Jiangnan Shipyard's football team. Throughout his career, Hongjun played for Shanghai Team, East Team, the Navy football team and Bayi. Xie was regarded as China's fastest football player, running 100 metres in 11.2 seconds. International career Xie made his debut for China in 1953. In 1954, Xie travelled with the Chinese national team on a year-and-a-half long tour of Hungary and eastern Europe. In 1956, Xie was selected to play for China at the 1956 Summer Olympics, however China withdrew. Coaching career In 1975, Xie became a youth team coach for Beijing. Xie began to coach his son, Xie Feng, when he was three years-old. Personal life Xie Hongjun is married to former Chinese sprinter Zheng Yuru (). Together they have a son, Xie Feng, who played for Beijing Guoan and Shenzhen Pingan. References 1929 births Living people Chinese men's footballers Footballers from Zhongshan Bayi Football Team players China men's international footballers People from Zhongshan Men's association football players not categorized by position"} {"instruction": "Write a C++ program to find the kth smallest element in an unsorted array using minimum number of comparisons.", "input": "", "output": "#include #include using namespace std; int kthSmallest(int arr[], int n, int k) { sort(arr, arr + n); return arr[k - 1]; } // Function to find the kth smallest element int kthSmallestWComp(int arr[], int n, int k) { // Initialize values of left and right int left = -2147483648, right = 2147483647, ans = -1; while (left <= right) { int mid = (left + right) / 2; int countLtEqMid = 0, countGtMid = 0; // Loop to count total less than equal mid for (int i = 0; i < n; i++) if (arr[i] <= mid) countLtEqMid++; // Loop to count total greater than mid for (int i = 0; i < n; i++) if (arr[i] > mid) countGtMid++; if (countLtEqMid < k && k <= (countLtEqMid + countGtMid)) { ans = mid; left = mid + 1; } else if (countLtEqMid >= k) right = mid - 1; else left = mid + 1; } return ans; }"} {"instruction": "Write a Python class to represent a polynomial of degree n.", "input": "", "output": "class Polynomial:\n def __init__(self, coeff):\n self.coeff = coeff\n\n def __call__(self, x):\n result = 0\n for idx, c in enumerate(self.coeff):\n result += c * x ** idx\n return result"} {"instruction": "Create a Python program to print out the numbers in reverse order from 100 to 1.", "input": "", "output": "for i in range (100,0,-1):\n print(i)"} {"instruction": "Define an interface for a data import task in Python.", "input": "Not applicable", "output": "class DataImportTask:\n\n def __init__(self, source, destination):\n self.source = source\n self.destination = destination\n\n # Method to download the source file to the file system\n def download(self):\n # Implementation here\n\n # Method to read the content of the source file into a CSV format\n def read(self):\n # Implementation here\n\n # Method to format the content into the destination format\n def format(self):\n # Implementation here\n\n # Method to save the destination in the desired location\n def save(self):\n # Implementation here"} {"text": "[EN Wikipedia] Gmina Pniewy, Masovian Voivodeship\n\nGmina Pniewy is a rural gmina (administrative district) in Grójec County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Pniewy, which lies approximately 10 kilometres (6 mi) north-west of Grójec and 40 km (25 mi) south-west of Warsaw. The gmina covers an area of , and as of 2006 its total population is 4,597. Villages Gmina Pniewy contains the villages and settlements of Aleksandrów, Budki Petrykowskie, Ciechlin, Cychry, Dąbrówka, Daszew, Ginetówka, Jeziora, Jeziora-Nowina, Jeziórka, Józefów, Jurki, Karolew, Kocerany, Kolonia Jurki, Konie, Kornelówka, Kruszew, Kruszewek, Michrów, Michrów-Stefów, Michrówek, Natalin, Nowina-Przęsławice, Osieczek, Pniewy, Przęsławice, Przykory, Rosołów, Teodorówka, Wiatrowiec, Wilczoruda, Wilczoruda-Parcela, Witalówka, Wola Grabska, Wola Pniewska, Wólka Załęska and Załęże Duże. Neighbouring gminas Gmina Pniewy is bordered by the gminas of Belsk Duży, Błędów, Grójec, Mszczonów, Tarczyn and Żabia Wola. References Polish official population figures 2006 Pniewy Gmina Pniewy"} {"instruction": "Given a list of numbers, print the difference between the largest and the smallest number.", "input": "list_of_numbers = [10, 7, 5, 12, 4]", "output": "difference = max(list_of_numbers) - min(list_of_numbers) print(difference)"} {"instruction": "Parse a given XML document and create a JavaScript object.", "input": " Kerridge, Alan The Kitchen Diaries 29.99 Zinsser, William On Writing Well 19.95 ", "output": "const parser = new DOMParser(); const xmlDoc = parser.parseFromString(text, \"text/xml\"); const books = xmlDoc.querySelectorAll('book'); const result = {}; books.forEach(book => { const id = book.getAttribute('id'); result[id] = { author: book.querySelector('author').textContent, title: book.querySelector('title').textContent, price: book.querySelector('price').textContent } }); console.log(result); // { // bk101: {author: \"Kerridge, Alan\", title: \"The Kitchen Diaries\", price: \"29.99\"}, // bk102: {author: \"Zinsser, William\", title: \"On Writing Well\", price: \"19.95\"} // }"} {"instruction": "Print the numbers in a Fibonacci series with a loop.", "input": "", "output": "# Fibonacci Series using a loop # the first two numbers of the Fibonacci series is 0 and 1 a = 0 b = 1 print(a) print(b) for i in range(10): c = a + b a = b b = c print(c)"} {"instruction": "Create a method called `combineName` that takes in two strings and combines them together into a full name.", "input": "firstName = 'John' lastName = 'Smith'", "output": "def combineName(firstName, lastName): \"\"\" A method that takes in two strings and combines them into a full name. Args: firstName (str): first name lastName (str): last name Returns: fullName (str): combined full name \"\"\" fullName = firstName + \" \" + lastName return fullName if __name__ == '__main__': firstName = 'John' lastName = 'Smith' print(combineName(firstName, lastName))"} {"text": "[HI Wikipedia] सुशील कोइराला\n\nसुशील कोईराला नेपाल के प्रधानमंत्री रह चुके हैं। वे नेपाल के वरिष्ठ राजनीतिज्ञ तथा लोकतान्त्रिक योद्धा है तथा नेपाली कांग्रेस पार्टी के सभापति है। 10 फ़रवरी 2014 को राष्ट्रपति ने उन्हें प्रधानमंत्री पद की शपथ दिलाई। वे नेपाल के 37वें तथा वर्ष 2008 में राजशाही खत्म होने के बाद छठे प्रधानमंत्री रहे। अक्टूबर २०१५ में नया संविधान लागू होने के पश्चात चुनाव में उन्हें खड्ग प्रसाद शर्मा ओली के हाथों हार का सामना करना पड़ा। परिचय सुशील कोइराला का जन्म पिता बोधप्रसाद व माता कुमुदिनी के ज्येष्ठ सुपुत्र के रूप में विराटनगरमे सन् १९३९ में हुआ। वे अविवाहित हैं। वे नेपाल के पूर्व प्रधानमंत्री गिरिजा प्रसाद कोईराला के कजिन हैं। सन 1960 में तत्कालीन राजा ने संविधान भंग कर कई राजनीतिक लोगों को जेल में डाल दिया था, इसमें उनके कई रिश्तेदार भी शामिल थे। वह भारत आ गए और उन्होंने वहाँ लगभग 16 साल गुजारे। इस दौरान वे 6 साल भारत और नेपाल की जेलों में भी रहे। राजनीतिमें प्रवेश वी पी कोइराला की प्रजातान्त्रिक समाजवादी धारा से प्रेरित होकर सन् 1950 से इन्होने राजनीति में प्रवेश किया। सन 1955 में वे नेपाली कांग्रेस से जुड़े। १९६१ में राजा महेन्द्र द्वारा प्रजातन्त्र का हरण होने के बाद वे १६ साल भारत में प्रवास में रहे। वहीँ से नेपाली काँग्रेस के मुखपत्र तरुण का सम्पादन किया। नेपाल और भारत में उन्होंने लगभग 6 साल राजनैतिक बन्दी का जीवन गुजारा। 1980 में वे नेपाली काँग्रेस के केन्द्रीय सदस्य बने। 1981 के जनमत संग्रह में वे बहुदलीय प्रजातन्त्र के अभियान में शामिल रहे। वे 1986 सत्याग्रह और 1989 की ऐतिहासिक जनआन्दोलन १ में सक्रियरूप से शामिल थे। सभापति सन् २०१० सितंबर २२ को काठमांडू में हुई १२ वें महाधिवेशन में वे नेपाली काँग्रेस के सभापति चुने गए। पाँच दशक राजनीति में गुजारने वाले कोइराला ने कई बार बने कांग्रेस नेतृत्व वाली सरकार के मन्त्री पद अस्वीकार किए हैं। समकालीन नेताओं में कोइराला की जीवनशैली को ज्यादा ही सादगीपूर्ण माना जाता हैं। प्रधानमंत्री पद २०१३ में हुए चुनाव में नेपाली कांग्रेस 194 सांसदों के साथ सबसे बड़ी पार्टी के रूप में उभरी जबकि 173 सदस्यों के साथ सीपीएन-यूएमएल संसद में दूसरी सबसे बड़ी पार्टी बनी। नेपाली कांग्रेस के साथ छह सूत्री समझौता करने के बाद सीपीएन-यूएमएल की स्थायी समिति ने प्रधानमंत्री पद के लिए कोइराला का समर्थन किया। छह सूत्री समझौते के तहत दोनों पार्टियां एक साल के भीतर नया संविधान लागू करने और नए संविधान को मंजूरी देने के बाद इसके अध्यक्ष, उपाध्यक्ष और चेयरमैन के पदों के लिए चुनाव कराने पर सहमत हुईं। इनके प्रधानमंत्रित्व काल में नेपाल में २० सितंबर २०१५ को नया संविधान लागू हो गया। प्रथम बार नेपाल में लोकतान्त्रिक संविधान लागू होने के बाद अक्टूबर २०१५ में प्रानमंत्री पद के लिए हुए चुनाव में वे सी पी एन -यू एम एल के उम्मीदवार के पी शर्मा ओली से चुनाव हार गए। ओली को १४ राजनीतिक दलों के ३२१ सांसदों और एक निर्दलीय संसद का समर्थन प्राप्त था। इस निर्वाचन में ओली को ५९८ और सुशील कोइराला को ३३८ मत प्राप्त हुए। मृत्यु विसं 2072 माघ 25,अथवा 9 फरवरी सन् 2016 की रात 12 बजकर 50 मिनट मध्यरात में काठमांडू महाराजगंज स्थित उनके निवास में कोइरालाका निधन हुआ था। कुछ…"} {"text": "[CS Wikipedia] Danilo Ilić\n\nDanilo Ilić (1891, Bosna a Hercegovina – 3. února 1915, tamtéž) byl členem tajné srbské nacionalistické organizace Černá ruka a hlavním organizátorem a vůdcem skupiny osob, které dne 28. června 1914 provedly úspěšný atentát na Františka Ferdinanda d'Este. Vystudoval Státní pedagogickou univerzitu v Sarajevu, po dokončení studia pak určitou dobu vyučoval na základní škole. Ilic se v roce 1913 přestěhoval do Bělehradu, kde pracoval jako novinář a stal se členem tajné organizace Černá ruka. Sarajevský atentát V roce 1914 se Ilić vrátil do Sarajeva, kde působil jako redaktor místních Novin Srbů. Téhož roku spoluorganizoval nábor mladých mužů do skupiny Černá ruka, a během léta vybrali Gavrilo Principa, Nedeljko Čabrinoviće a Trifko Grabeže k provedení atentátu na arcivévodu Františka Ferdinanda, který byl posléze spáchán dne 28. června 1914. Princip a Nedeljko Čabrinović byli po atentátu zatčeni a vyslýcháni policií. Výše zmínění u výslechu odmítali vypovídat a vyzradit jména kompliců. Policie však veškerá jména a informace o spiklencích získala od jiného, méně významného člena organizace, který byl zadržen během namátkové silniční kontroly. Muhamedovi Mehmedbašićovi se podařilo uniknout do Srbska, avšak Ilić, Veljko Čubrilović, Vaso Čubrilović, Cvijetko Popović a Miško Jovanović byli zatčeni a obviněni. Z účasti na atentátu bylo obviněno celkem osm osob, k dalším obviněním patřila také velezrada a vražda arcivévody Františka Ferdinanda. Podle tehdejšího rakousko-uherského práva nesměla být k trestu smrti odsouzena osoba mladší dvaceti let. Nedjelko Čabrinović, Gavrilo Princip a Trifko Grabež proto dostali nejvyšší dvacetiletý trest odnětí svobody, Vaso Čubrilović dostal 16 let a Cvijetko Popovic 13 let. Danilo Ilić, Veljko Čubrilovic a Miško Jovanović, kteří se na atentátu přímo podíleli, byli odsouzeni k trestu smrti oběšením dne 3. února 1915. Reference Související články Gavrilo Princip Nedeljko Čabrinović Příčiny první světové války Externí odkazy Narození v roce 1891 Úmrtí v roce 1915 Srbští atentátníci Srbové odsouzení k trestu smrti Muži"} {"instruction": "Create an algorithm in Python to calculate the Fibonacci sequence up to a given number.", "input": "Not applicable", "output": "def fibonacci(n):\n a, b = 0, 1\n while a < n:\n print(a, end=' ')\n a, b = b, a+b\n\nfibonacci(100)"} {"instruction": "Create a sentiment analysis web application, using Python.'", "input": "Not applicable", "output": "import flask\nfrom flask import request, jsonify\nfrom textblob import TextBlob\n\n#Initialize the Flask App\napp = flask.Flask(__name__)\napp.config[\"DEBUG\"] = True\n\n#Create a route for the web application\n@app.route('/', methods=['GET'])\ndef home():\n return '

    Sentiment Analysis Web Application

    '\n\n#Create a route for the API\n@app.route('/api/v1/sentiment', methods=['GET'])\ndef sentiment():\n #Get the text\n text = request.args.get('text')\n if text is None:\n return jsonify({'error': 'no text received'})\n\n #Create a TextBlob from the text\n sentiment = TextBlob(text).sentiment\n\n #Return the sentiment as JSON\n return jsonify({'polarity': sentiment.polarity, 'subjectivity': sentiment.subjectivity})\n\napp.run()"} {"instruction": "Find the length of a string `The quick brown fox`.", "input": "", "output": "19"} {"instruction": "Write a Python program to query Twitter to get the most recent tweets from a user.", "input": "username: @elonmusk", "output": "import tweepy\n\n# Authenticate to Twitter\nauth = tweepy.OAuthHandler(\"CONSUMER_KEY\", \"CONSUMER_SECRET\")\nauth.set_access_token(\"ACCESS_TOKEN\", \"ACCESS_TOKEN_SECRET\")\n# Create API object\napi = tweepy.API(auth)\n\n# Get the most recent tweets from the given user\ntweets = api.user_timeline(screen_name=\"@elonmusk\")\n\nfor tweet in tweets:\n print(tweet.text)"} {"instruction": "Create a Python function to grade a multiple choice exam based on a given Answer key and a student's answers.", "input": "Answer Key : [A, B, D, C, D]\nStudent's Answers: [A, A, C, B, D]", "output": "def grade_exam(answer_key, student_answers):\n score = 0\n for i in range(len(answer_key)):\n if answer_key[i] == student_answers[i]:\n score += 1\n \n return score / len(answer_key) * 100\n\nanswer_key = ['A', 'B', 'D', 'C', 'D']\nstudent_answers = ['A', 'A', 'C', 'B', 'D']\n\nprint(\"Student's exam grade:\", grade_exam(answer_key, student_answers))"} {"instruction": "Create a C# program to check if any element in an array is equal to a given number.", "input": "arr = {1, 4, 7, 9} and given number = 7", "output": "public static bool IsEqualToGivenNumber(int[] arr, int number) { for(int i = 0; i < arr.Length; i++) { if(arr[i] == number) { return true; } } return false; }"} {"instruction": "Create a SQL query to select all the records from the table ‘fruit_list’ that have an expiry date falling within the next 10 days.", "input": "", "output": "SELECT * FROM fruit_list WHERE expiry_date >= CURRENT_DATE AND expiry_date < CURRENT_DATE + INTERVAL 10 DAY;"} {"instruction": "Create a cURL command that retrieves the contents of a webpage.", "input": "", "output": "curl -X GET http://example.com"} {"instruction": "Can you create a Python program that returns the largest number in a list of numbers?", "input": "[4, 8, 2, 6, 9]", "output": "def largestNumber(list): \n maximum = list[0] \n \n for num in list: \n if num > maximum: \n maximum = num \n return maximum \n \nlist = [4, 8, 2, 6, 9] \nlargestNumber = largestNumber(list) \n \nprint(\"Largest number in the given list is:\", largestNumber)"} {"instruction": "Create a script in Python that checks that a given URL is active and responding.", "input": "url = \"http://www.example.com\"", "output": "import requests\n\nurl = \"http://www.example.com\"\n\ntry:\n request = requests.get(url)\n if request.status_code == 200:\n print(\"URL is active and responding\")\nexcept Exception as e:\n print(f\"Error: {e}\")"} {"instruction": "Generate a Python regular expression that can identify valid email addresses.", "input": "Not applicable", "output": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"} {"instruction": "Develop a function in Python that takes two strings and returns a new string that is the longest common subsequence of the two given strings.", "input": "", "output": "def longest_common_subsequence(s1, s2): \n m = len(s1) \n n = len(s2)\n dp = [[0] * (n + 1) for _ in range(m + 1)]\n for i in range(1, m + 1): \n for j in range(1, n + 1):\n if s1[i-1] == s2[j-1]: \n dp[i][j] = dp[i-1][j-1] + 1\n else:\n dp[i][j] = max(dp[i-1][j], dp[i][j-1])\n result = ''\n i, j = m, n\n while i > 0 and j > 0:\n if s1[i-1] == s2[j-1]: \n result = s1[i-1] + result\n i -= 1\n j -= 1\n elif dp[i-1][j] > dp[i][j-1]: \n i -= 1\n else: \n j -= 1\n return result"} {"instruction": "Construct an SQL query to find the name of all employees in department ID 7.", "input": "", "output": "SELECT name FROM Employees WHERE departmentID = 7;"} {"text": "[EN Wikipedia] 2012 United States Senate election in Indiana\n\nThe 2012 United States Senate election in Indiana took place on November 6, 2012, concurrently with the U.S. presidential election as well as other elections to the United States Senate and House of Representatives and various state and local elections. Incumbent Republican U.S. Senator Richard Lugar ran for reelection to a seventh term, but was defeated in the primary by Tea Party-backed Richard Mourdock. U.S. Representative Joe Donnelly, a Democrat from Indiana's 2nd congressional district, was unopposed in his party's primary, and then defeated both Mourdock and Libertarian Andrew Horning in the general election. As of , this is the last time Democrats won any statewide election in Indiana, and the most recent Senate election in which an elected incumbent was defeated in the primary. This election is also the most recent time a party would flip a Senate seat in a presidential election year without carrying the state in the concurrent presidential election. In addition, with Republicans flipping Indiana's other Senate seat two years earlier, this election is the last time a party would flip a Senate seat in a state whose other seat was flipped by the opposition party in the previous election cycle. Background and overview On November 7, 2006, incumbent Richard Lugar was unopposed by any major party candidate as no Democrat filed for the May 2006 primary. He was re-elected to his sixth six-year term with 87.3% of the vote. After the 2012 election, Lugar would have had an even chance, according to Senate Republican Conference rules, to be elected as its president pro tempore. However, the issue was rendered moot with Lugar's primary loss on May 9, 2012, as Indiana state law prohibits candidates from running for an election after losing a primary. Time featured the race in their \"Fury of the Senate\" article. The article mentioned how Donnelly was lucky that Mourdock won out in the primary against Lugar, a well-liked centrist member of the GOP. Another boost came when Mourdock's remarks regarding rape helped propel Donnelly to victory. Republican primary The Republican primary was held on May 8, 2012. Candidates Declared Richard Lugar, incumbent U.S. senator Richard Mourdock, state treasurer Declined Mike Delph, state senator Bob Thomas, auto dealer Campaign Due to Lugar's unpopularity among some Tea Party voters because of his positions regarding illegal immigration, voting to confirm then-U.S. Supreme Court nominees Sonia Sotomayor and Elena Kagan, the DREAM Act, the New START Treaty, some gun control bills, and congressional earmarks, he was challenged by a Tea Party-backed candidate. The Indiana Debate Commission's GOP primary debate with Sen. Richard Lugar and State Treasurer Richard Mourdock was set to air at 7 p.m. EDT on Wednesday, April 11.…"} {"instruction": "Describe in code what is supervised learning.", "input": "", "output": "Supervised learning is a type of machine learning that uses labeled data to train algorithms to predict outcomes. It involves using labeled data points as input and output to teach the machine how to predict outcomes. The algorithm is “supervised” because it has a pre-defined set of examples to learn from, making it easier to predict future outcomes."} {"instruction": "Explain the following piece of JavaScript code.", "input": "let arr1 = [1,2,3,4]; let arr2 = [...arr1];", "output": "This code creates a new array, arr2, which contains the same elements as the original array, arr1. The spread operator (...) is used to unpack the elements of arr1, and copy them into the newly created arr2."} {"instruction": "Create a UI class with methods for handling input, window destruction, and exposing. Initialize the UI class with a thread lock, shared memory object, and semaphore object. Connect the UI class to a message handler and socket. Add watch functions for input and hang up events. Create a GTK window with a title, size, and position. Set the window to be app paintable and use RGBA colormap. Connect the window to the expose and destroy events. Create a pixbuf object with a specified width and height. Call the main method of the UI class.", "input": "", "output": "#!/usr/bin/python\n\nimport sys\nimport os\nimport tempfile\nimport gobject\nimport gtk \nimport socket\nimport shm\nimport threading\nimport time\nimport struct\nimport cairo\nimport array\nimport cPickle as pickle\n\nimport message\nimport config\n\n#gtk.gdk.threads_init()\n\ndef olog(str):\n olog_nonl(str + \"\\n\")\n\ndef olog_nonl(str):\n sys.stderr.write(\"O: \" + str)\n sys.stderr.flush()\n\nclass UI:\n shm_obj = None\n sem_obj = None\n cr = None\n pixbuf = None\n rectangle = None\n\n def redraw(self) :\n print \"redraw-----\"\n if self.sem_obj != None:\n self.thread_lock.acquire()\n try :\n try :\n self.sem_obj.P()\n try :\n shm_obj = self.shm_obj\n size = struct.unpack_from(\"i\", shm_obj.read(4,4*0))[0]\n x = struct.unpack_from(\"i\", shm_obj.read(4,4*1))[0]\n y = struct.unpack_from(\"i\", shm_obj.read(4,4*2))[0]\n width = struct.unpack_from(\"i\", shm_obj.read(4,4*3))[0]\n height = struct.unpack_from(\"i\", shm_obj.read(4,4*4))[0]\n pixbufloader = gtk.gdk.PixbufLoader()\n pixbufloader.write(shm_obj.read(size,4*5))\n pixbufloader.close() \n pixbuf = pixbufloader.get_pixbuf()\n\n # shm_obj = self.shm_obj\n # size = struct.unpack_from(\"i\", shm_obj.read(4,4*0))[0]\n # x = struct.unpack_from(\"i\", shm_obj.read(4,4*1))[0]\n # y = struct.unpack_from(\"i\", shm_obj.read(4,4*2))[0]\n # width = struct.unpack_from(\"i\", shm_obj.read(4,4*3))[0]\n # height = struct.unpack_from(\"i\", shm_obj.read(4,4*4))[0]\n # pixels = pickle.loads(shm_obj.read(size,4*5))\n # pixbuf = gtk.gdk.pixbuf_new_from_array(pixels, gtk.gdk.COLORSPACE_RGB,8) \n finally :\n self.sem_obj.V()\n pass\n\n #print pixbuf.get_width()\n #print pixbuf.get_height()\n #print x\n #print y\n pixbuf.copy_area(0, 0, pixbuf.get_width(), pixbuf.get_height(), self.pixbuf, x, y)\n self.rectangle = (x,y,width,height)\n self.win.queue_draw_area(x,y, pixbuf.get_width(),"} {"instruction": "Formulate an SQL query to make this table:", "input": "Table: books book_id | book_title | book_edition ------------------------", "output": "CREATE TABLE books ( book_id INTEGER PRIMARY KEY, book_title VARCHAR(50), book_edition VARCHAR(50) );"} {"instruction": "Create a code to save the first ten prime numbers in an array.", "input": "", "output": "# prime number sieve def prime_numbers(n): prime = [True for i in range(n+1)] p = 2 while (p * p <= n): if (prime[p] == True): for i in range(p * p, n+1, p): prime[i] = False p += 1 prime_numbers = [] for p in range(2, n): if prime[p]: prime_numbers.append(p) return prime_numbers[:10] if __name__ == \"__main__\": n = 100 print(prime_numbers(n))"} {"instruction": "Write the code to calculate a factorial recursively", "input": "", "output": "def factorial(n): if n == 0: return 1 else: return n * factorial(n - 1)"} {"text": "[EN Wikipedia] Pycnoglypta\n\nPycnoglypta is a genus of beetles belonging to the family Staphylinidae. The species of this genus are found in Europe and Northern America. Species: Pycnoglypta aptera Campbell, 1983 Pycnoglypta baicalica (Motschulsky, 1860) References Staphylinidae Staphylinidae genera"} {"text": "[EN Wikipedia] Asteraceae\n\nThe family Asteraceae (), with the original name Compositae, consists of over 32,000 known species of flowering plants in over 1,900 genera within the order Asterales. Commonly referred to as the aster, daisy, composite, or sunflower family, Compositae were first described in the year 1740. The number of species in Asteraceae is rivaled only by the Orchidaceae, and which is the larger family is unclear as the quantity of extant species in each family is unknown. Most species of Asteraceae are annual, biennial, or perennial herbaceous plants, but there are also shrubs, vines, and trees. The family has a widespread distribution, from subpolar to tropical regions, in a wide variety of habitats. Most occur in hot desert and cold or hot semi-desert climates, and they are found on every continent but Antarctica. Their primary common characteristic is flower heads, technically known as capitula, consisting of sometimes hundreds of tiny individual florets enclosed by a whorl of protective involucral bracts. The oldest known fossils are pollen grains from the Late Cretaceous (Campanian to Maastrichtian) of Antarctica, dated to million years ago (mya). It is estimated that the crown group of Asteraceae evolved at least 85.9 mya (Late Cretaceous, Santonian) with a stem node age of 88–89 mya (Late Cretaceous, Coniacian). Asteraceae is an economically important family, providing food staples, garden plants, and herbal medicines. Species outside of their native ranges can be considered weedy or invasive. Description Members of the Asteraceae are mostly herbaceous plants, but some shrubs, vines, and trees (such as Lachanodes arborea) do exist. Asteraceae species are generally easy to distinguish from other plants because of their unique inflorescence and other shared characteristics, such as the joined anthers of the stamens. Nonetheless, determining genera and species of some groups such as Hieracium is notoriously difficult (see \"damned yellow composite\" for example). Roots Members of the family Asteraceae generally produce taproots, but sometimes they possess fibrous root systems. Some species have underground stems in the form of caudices or rhizomes. These can be fleshy or woody depending on the species. Stems Stems are herbaceous, aerial, branched, and cylindrical with glandular hairs, generally erect, but can be prostrate to ascending. The stems can contain secretory canals with resin, or latex, which is particularly common among the Cichorioideae. Leaves Leaves can be alternate, opposite, or whorled. They may be simple, but are often deeply lobed or otherwise incised, often conduplicate or revolute. The margins also can be entire or toothed. Resin or latex also can be present in the leaves. Inflorescences Nearly all Asteraceae bear their flowers in dense…"} {"instruction": "Create a JavaScript function that takes in two arrays of numbers, and returns an array containing only the numbers that appear in both arrays.", "input": "arr1 = [1, 2, 3, 4, 5]; arr2 = [3, 4, 5, 6, 7]", "output": "function containsSameNumbers(arr1, arr2) { const intersection = []; for (let i = 0; i < arr1.length; i++) { if (arr2.includes(arr1[i])) { intersection.push(arr1[i]); } } return intersection; } containsSameNumbers(arr1, arr2); // Output: [3, 4, 5]"} {"instruction": "Create a simple calculator program in Python.", "input": "", "output": "def simple_calculator():\n num1 = float(input(\"Enter the first number: \")) \n num2 = float(input(\"Enter the second number: \")) \n oper = input(\"Enter your operation (+, -, *, /): \") \n \n if oper == \"+\":\n print(\"Result:\", num1 + num2) \n elif oper == \"-\":\n print(\"Result:\", num1 - num2) \n elif oper == \"*\":\n print(\"Result:\", num1 * num2) \n elif oper == \"/\":\n print(\"Result:\", num1 / num2) \n else:\n print(\"Invalid operation\")\n\nsimple_calculator()"} {"instruction": "Write a python program to calculate maximum revenue.", "input": "prices = [10, 7, 5, 8, 11, 9]", "output": "def max_revenue(prices):\n diff = [prices[i + 1] - prices[i] for i in range(len(prices) - 1)] \n max_diff = 0\n for i in range(len(diff)): \n for j in range(i + 1, len(diff) + 1): \n current_diff = sum(diff[i:j]) \n if current_diff > max_diff: \n max_diff = current_diff \n \n return max_diff"} {"text": "[CS Wikipedia] 137 (číslo)\n\nSto třicet sedm je přirozené číslo. Následuje po číslu sto třicet šest a předchází číslu sto třicet osm. Pořadové číslo je stý třicátý sedmý nebo stosedmatřicátý. Římskými číslicemi se zapisuje CXXXVII. Matematika Sto třicet sedm je 33. prvočíslo, tvoří prvočíselnou dvojici s číslem 139 nešťastné číslo nepříznivé číslo ve stupních přibližná velikost zlatého úhlu Chemie 137 je nukleonové číslo druhého nejběžnějšího izotopu barya. Cesium-137 je jedním z radionuklidů, které běžně vznikají při jaderném štěpení uranu-235 a dalších štěpitelných nuklidů. počet atomů v molekule chlorofylu Fyzika konstanta jemné struktury, která charakterizuje sílu elektromagnetické interakce, má hodnotu přibližně 1/137. Doprava Silnice II/137 je česká silnice II. třídy vedoucí na trase Načeradec – Mladá Vožice – Tábor – Malšice – Sudoměřice u Bechyně – Hodětín Publikace 137: Jung, Pauli, and the Pursuit of a Scientific Obsession - kniha historika Arthura I. Millera Roky 137 137 př. n. l. Reference Externí odkazy Přirozená čísla Prvočísla"} {"instruction": "Demonstrate how tog concatenate two strings in Python.", "input": "", "output": "a = \"Hello\"\nb = \"World!\"\n\nc = a + b\nprint(c)"} {"instruction": "Convert this bubble sort algorithm from C++ to Python.", "input": "void bubbleSort(int arr[], int n) \n{ \n for (int i = 0; i < n; i++) \n {\n for (int j = 0; j < n-i-1; j++) \n {\n if (arr[j] > arr[j+1]) \n swap(&arr[j], &arr[j+1]); \n }\n }\n}", "output": "def bubble_sort(arr):\n n = len(arr)\n for i in range(n):\n for j in range(n-i-1):\n if arr[j] > arr[j+1]:\n arr[j], arr[j+1] = arr[j+1], arr[j] \n return arr\n\narr = [2, 3, 4, 1, 5]\nprint(bubble_sort(arr))"} {"instruction": "Modify the code so that it prints the given string in lowercase letters.", "input": "String: \"HELLO WORLD\" Code: #include using namespace std; int main() { string s = \"HELLO WORLD\"; cout << s << endl; return 0; }", "output": "#include #include using namespace std; int main() { string s = \"HELLO WORLD\"; // Convert string s to lowercase letters transform(s.begin(), s.end(), s.begin(), ::tolower); cout << s << endl; return 0; }"} {"instruction": "Which basic data type is represented by the following JSON? {\"name\": \"John\", \"age\": 30}", "input": "", "output": "The JSON given represents a basic object data type."} {"text": "[DE Wikipedia] Mirla Castellanos\n\nMirla Josefina Castellanos Peñaloza (* 31. März 1941 in Valencia) ist eine venezolanische Sängerin. Castellanos debütierte 1960 als Sängerin bei Radio Caracas Televisión in der Show de Víctor. Sie arbeitete in der Folgezeit als Sekretärin des Sportjournalisten Juan Vené. Von Ricardo Tirado, Luis Cruz und Oswaldo Yépez wurde sie künstlerisch gefördert und veröffentlichte 1961 eine Single mit dem Titel Tema para enamorados. Sie wurde dann Mitglied des Cuarteto Los Naipes, bevor sie eine Sololaufbahn begann. 1969 gewann sie mit einem Song von Manuel Alejandro den Ersten Preis beim Festival de Benidorm, nach einer Europatournee 1970 den Zweiten Preis beim Festival Latinoamericano de la Canción in Mexiko. In den 1970er Jahren wurde sie mit ihrer Liveshow La Primerisima berühmt, besonders erfolgreich wurde das Album Vuelve Pronto (1982). Como Núnca ist eine Kompilation ihrer größten Hits. Quellen musica.com: Biografía de Mirla Castellanos Sänger Venezolaner Geboren 1941 Frau"} {"instruction": "Create a JavaScript function to remove all spaces from a string.", "input": "", "output": "function removeSpaces(str) { return str.replace(/ /g,\"\"); }"} {"instruction": "Create a Python function to check if a given number is abundant or not. An abundant number is a number which is less than the sum of its proper divisors.", "input": "number = 24", "output": "def is_abundant(number):\n sum = 0\n for i in range(1, number):\n if number % i == 0:\n sum += i\n return sum > number"} {"instruction": "Generate valid HTML for a table with three columns", "input": "", "output": "
    Column1 Column2 Column3
    "} {"instruction": "Create a loop in Python that prints numbers 1 to 10.", "input": "", "output": "for i in range(1, 11):\n print(i)"} {"text": "[EN Wikipedia] Křížkový Újezdec\n\nKřížkový Újezdec is a municipality and village in Prague-East District in the Central Bohemian Region of the Czech Republic. It has about 300 inhabitants. Administrative parts The village of Čenětice is an administrative part of Křížkový Újezdec. History The first written mention of Křížkový Újezdec is from 1349. Gallery References Villages in Prague-East District"} {"instruction": "Rewrite the following function in Python: \nfunction add(x, y) {\n return x + y;\n}", "input": "Not applicable", "output": "def add(x, y):\n return x + y"} {"instruction": "Write a single line of code to display the current date and time in the format \"Month day year, Hour:Minute” using the Python module datetime.", "input": "", "output": "print(datetime.datetime.now().strftime('%b %d %Y, %H:%M'))"} {"instruction": "Create a function in Rust that takes two strings and returns true if they are anagrams.", "input": "", "output": "fn anagrams(s1: &str, s2: &str) -> bool { let s1 = s1.to_lowercase().chars().collect::>(); let s2 = s2.to_lowercase().chars().collect::>(); s1.sort_unstable(); s2.sort_unstable(); s1 == s2 }"} {"instruction": "Can you propose a C++ program for adding two matrices?", "input": "Matrix1 = [[2, 3], [4, 5]] Matrix2 = [[6, 7], [8, 9]]", "output": "#include #define N 2 // function to add two matrices void addMatrix(int A[][N], int B[][N], int C[][N]) { int i, j; for (i = 0; i < N; i++) for (j = 0; j < N; j++) C[i][j] = A[i][j] + B[i][j]; } int main() { int A[N][N] = {{2, 3}, {4, 5}}; int B[N][N] = {{6, 7}, {8, 9}}; int C[N][N]; // To store result addMatrix(A, B, C); cout << \"Resultant Matrix:\\n\"; int i, j; // Print the resultant matrix for (i = 0; i < N; i++) { for (j = 0; j < N; j++) cout << C[i][j] << \" \"; cout << \"\\n\"; } return 0; }"} {"text": "[EN Wikipedia] Yolbulan, Ergani\n\nYolbulan is a neighbourhood in the municipality and district of Ergani, Diyarbakır Province in Turkey. Its population is 658 (2022). References Neighbourhoods in Ergani District"} {"instruction": "Create an AWS Lambda function with a Python runtime for sending a message to an SNS topic.", "input": "Not applicable", "output": "import json\nimport boto3\n \ndef lambda_handler(event, context):\n # Create an SNS Client\n sns_client = boto3.client('sns')\n \n # Send a message to the SNS topic\n topic_arn = 'arn:aws:sns:eu-west-1:123456789012:my-topic'\n message = 'This is a test message'\n response = sns_client.publish(\n TopicArn = topic_arn,\n Message = message\n )\n return {\n 'statusCode': 200,\n 'body': json.dumps(response)\n }"} {"instruction": "Generate a Python program to round a floating point number to a certain number of decimal places.", "input": "2.71828, 3", "output": "def round_float(num, decimal_ places):\n '''\n Function to round a floating point number to a certain number of decimal places\n '''\n return round(num, decimal_places)\n\nresult = round_float(2.71828, 3)\nprint(result)"} {"instruction": "Find the minimum of two given numbers.", "input": "4, 6", "output": "def min_two(a, b): if a < b: return a else: return b min_val = min_two(4, 6) print(min_val)"} {"instruction": "How many jokes can you write in Python?", "input": "", "output": "There is no definite answer to this question. It depends on the creativity and programming skills of the individual. It is possible to write an infinite number of jokes, but writing a joke that is funny and unique will require more effort and expertise."} {"instruction": "Using Python, create a program to filter out all non-prime numbers from a list.", "input": "myList = [2, 4, 5, 20, 44]", "output": "def filterPrimes(myList):\n result = []\n for i in myList:\n is_prime = True\n for j in range(2,i):\n if i % j == 0:\n is_prime = False\n break\n if is_prime:\n result.append(i)\n return result\n\nprint(filterPrimes(myList)) #[2, 5]"} {"instruction": "You are asked to create an encryption program that produces an output which should be different from its original one when decrypted.", "input": "\"\"", "output": "# Python 3 program for the implementation of the Encryption Algorithm\n\n# Method to encrypt the given string\ndef encrypt_string(str): \n cipher = \"\" \n for s in str:\n # Shift each character by 2 ascii value\n s = chr(ord(s) + 2) \n cipher += s \n \n return cipher \n \n# Driver code \nstr = \"python\" \nprint (\"Encrypted String: \" + encrypt_string(str))"} {"text": "[EN Wikipedia] 1864 in Denmark\n\nEvents from the year 1864 in Denmark. Incumbents Monarch – Christian IX Prime minister – Ditlev Gothard Monrad (until 11 July), Christian Albrecht Bluhme Events 1 February – The Second Schleswig War breaks out after the First Schleswig War had left the Schleswig-Holstein Question unsettled when Treussia-Austria crosses the River Eider with 57,000 soldiers. February It soon results in the Evacuation of Danevirke. The Battle of Sankelmark, a minor battle which occurs at Sankelmark, on the road between Schleswig and Flensburg, during the Danish retreat from Danevirke. 17 March – The Battle of Jasmund near the Prussian island of Rügen results in a tactical Danish victory. 17 and 18 April – Denmark suffers a severe defeat to the German Confederation in the Battle of Dybbøl which effectively decides the war. 9 May – Denmark wins a tactical victory in the Battle of Heligoland but it has no impact on the outcome of the war. 12 May – A general armistice came into effect, Denmark has lost the war. 29 June – In the Battle of Als, the last major engagement of the war, the Prussians secure Als after a night attack masterminded by the Chief of Staff Leonhard Graf von Blumenthal, 3 July – The Battle of Lundby in north-eastern Himmerland results in great Danish losses. It becomes the last battle of the Second Schleswig War. 8 July – The Cabinet of Monrad is succeeded by the Cabinet of Bluhme. 30 October – The Second Schleswig War ends. The Duchies of Schleswig, Holstein and Lauenburg are ceded to Prussia. Undated Births JanuaryMarch 9 February – August Hassel, sculptor (died 1942) AprilJune 6 May – Jens Christian Kofoed, architect (died 1941) 15 May – Vilhelm Hammershøi, painter (died 1916) JulySeptember 23 May – Louis Glass, composer (died 1936) 12 July – Carl Brummer, architect (died 1953) 16 August – Kristian Hude, photographer (died 1929) 1 September Albert Edvard Wang , painter (died 1930) OctoberDecember 15 November – Sophus Falck, manufacturer and founder of Falck (died 1926) Deaths 15 February Adam Wilhelm Moltke, landowner and politician (born 1785) 28 March – Princess Louise Charlotte, princess of Denmark (born 1789) 7 September - Gustav Friedrich Hetsch, architect (born 1788) 20 October – Carl Christian Rafn, historian, translator and antiquarian (born 1795) 17 November – Peter Christian Knudtzon, businessman (born 1789) References 1860s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Generate a python function to convert numbers to English words.", "input": "The function should take a number in the range of 0 to 999.", "output": "def number_to_words(number):\n if number == 0:\n return \"Zero\"\n \n # Variables to keep track of output\n output = \"\"\n \n # Placeholders for each of the three digits\n ones_place = [\"\", \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\"]\n tens_place = [\"\", \"\", \"Twenty\", \"Thirty\", \"Forty\", \"Fifty\", \"Sixty\", \"Seventy\", \"Eighty\", \"Ninety\"]\n hundred_placements = [\"\", \"One Hundred\", \"Two Hundred\", \"Three Hundred\", \"Four Hundred\", \"Five Hundred\", \"Six Hundred\", \"Seven Hundred\", \"Eight Hundred\", \"Nine Hundred\"]\n \n # Hundreds place\n if number % 100 == 0 and number > 100:\n output = output + (hundred_placements[int(number/100)])\n number = number % 100\n else:\n output = output + (hundred_placements[int(number/100)]) + \" \"\n number = number % 100\n \n # Tens place \n if number >= 20: \n output = output + (tens_place[int(number/10)]) + \" \"\n number = number % 10\n else:\n output = output + (ones_place[number])\n number = 0\n \n # Adding the last number\n if number > 0:\n output = output + (ones_place[int(number/1)])\n \n # Returns output\n return output"} {"text": "[EN Wikipedia] The Woman in White (1966 TV series)\n\nThe Woman in White is a British drama television series which originally aired on BBC 1 in six 25-minute-long episodes between 2 October and 6 November 1966. It was adapted from the 1860 novel The Woman in White by Wilkie Collins. As of 2021, none of the six episodes are known to exist in the BBC archives. Plot summary Main cast Alethea Charlton as Marian Halcombe Jennifer Hilary as Laura Fairlie Louis Mansi as Professor Pesca Nicholas Pennell as Walter Hartright John Barron as Sir Percival Glyde Geoffrey Bayldon as Mr. Fairlie Francis de Wolff as Count Fosco Alan Collins as Louis Daphne Heard as Madame Fosco Anne Dyson as Mrs. Michelson David Langford as Matthews Katherine Parr as Mrs Catherick Elsie Wagstaff as Mrs. Clements References External links 1960s British drama television series 1966 British television series debuts BBC television dramas Films based on works by Wilkie Collins"} {"instruction": "Design a JSON schema for an item.", "input": "", "output": "{ \"type\": \"object\", \"properties\": { \"id\": { \"type\": \"string\" }, \"name\": { \"type\": \"string\" }, \"price\": { \"type\": \"number\" }, \"quantity\": { \"type\": \"integer\" } }, \"required\": [\"id\", \"name\", \"price\", \"quantity\"] }"} {"instruction": "Write a regex to match the email address format.", "input": "", "output": "regex = r'^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$'"} {"text": "[DE Wikipedia] Isarmündung\n\nDie Isar ist ein Zufluss der Donau. Das Isarmündungsgebiet liegt zu einem großen Teil im Bereich der Gemeinde Moos, südlich des Stadtzentrums von Deggendorf und östlich von Plattling. An 18 km der Isar liegt hier eine vielfältige Auenlandschaft, in der die Natur großenteils sich selbst überlassen wird. Um sie dennoch Besuchern zugänglich zu machen, wurde das Infohaus Isarmündung mit seinen Außenanlagen und Wanderwegen eingerichtet. Die letzten 1,63 Kilometer der Isar bis zu ihrer Mündung in die Donau, liegen vollständig auf dem Gemeindegebiet der Stadt Deggendorf (Stadtteil Fischerdorf). Der unmittelbar südlich der Mündung gelegene Ort Isarmünd wird abgesiedelt, um diesen immer wieder bei Hochwasser überschwemmten Bereich als Polder nutzen zu können. Flora und Fauna Im Isarmündungsgebiet finden sich beispielhaft die verschiedenen Lebensräume einer Auenlandschaft: Fließgewässer Untersuchungen in den Jahren 1990/91 wiesen 35 verschiedene Fischarten nach. Leitfisch ist hier die Barbe, dieser Abschnitt der Isar wird eine Barbenregion genannt. Kiesbänke und kiesige, flachere Uferzonen nutzen die Fische als Laichplatz, die strukturreichen Ufer als Schutz und Nahrungsstätte. Hier leben die im gesamten Donauraum vom Aussterben bedrohten Arten Schneider, Frauennerfling und die drei Barscharten Schrätzer, Streber und Zingel. Altwässer Durch die Verlagerung des Flussbetts der Isar, die innerhalb der Deiche an ihren letzten 10,5 km frei fließen kann, bilden sich Altwässer, in denen verschiedene, an stilles oder stehendes Wasser angepasste Tierarten leben. So sind im Isarmündungsgebiet 10 verschiedene Amphibienarten nachgewiesen, wie z. B. der Moorfrosch oder der Springfrosch. Die so entstandenen Tümpel und halb abgeschnittenen Flussteile bieten auch Lebensraum für eine Vielzahl von Insekten wie die Große Königslibelle. Von diesem Nahrungsangebot profitiert z. B. der Schilfrohrsänger. Der sehr seltene Eisvogel, der sich hauptsächlich von kleinen Fischen ernährt, findet in Steilufern der Auengewässer Platz für seine Bruthöhlen. Häufige, stilles Wasser bevorzugende Fische sind die Rotfeder und das Rotauge. Weichholzauwald Das Merkmal des Weichholzauwalds – im Gegensatz zum Hartholzauwald – ist die regelmäßige Überflutung durch Hochwässer. Die hier wachsenden Weichhölzer wie Weiden und Pappeln nutzt der sehr häufig vorkommende Biber. Das Weißsternige Blaukehlchen hat hier eines der bedeutendsten Vorkommen in Mitteleuropa. Hartholzauwald Den jenseits der Deiche liegenden und seltener überschwemmten Hartholzauwald dominieren Eschen, Stieleichen und Bergahorn. Der sehr seltene Mittelspecht findet hier Nahrung und, in altem Holz, Platz für seine Bruthöhlen. Ebenfalls ein Baumhöhlenbrüter ist der Halsbandschnäpper. Durch die dichten Baumkronen und die Strauchschicht…"} {"instruction": "Create a Python program to check for anagrams of a string.", "input": "\"listen\", \"silent\"", "output": "def anagramCheck(str1, str2):\n if (len(str1) != len(str2)):\n return False\n\n str1 = sorted(str1)\n str2 = sorted (str2)\n\n # Compare each character in str1 with\n # each character in str2\n for i in range( len( str1 ) ):\n if (str1[i] != str2[i]):\n return False\n \n return True"} {"instruction": "Create a machine learning model in Python to predict the total surface area of a cube given its side length", "input": "side_length = 3", "output": "import numpy as np from sklearn.linear_model import LinearRegression # Data X_train = np.array([1, 2, 3, 4, 5]).reshape(-1, 1) y_train = np.array([6, 12, 18, 24, 30]) # Model model = LinearRegression() model.fit(X_train, y_train) # Prediction side_length = 3 pred = model.predict([[side_length]]) print('The surface area for a cube with side length %.2f is %.2f' % (side_length, pred[0]))"} {"instruction": "Using the class group, create an instance of the StudentClass and print out its name attribute.", "input": "class StudentClass: def __init__(self, name): self.name = name", "output": "# create an instance of the StudentClass student_class = StudentClass(\"Statistics\") #print out its name attribute print(student_class.name) # Output: Statistics"} {"text": "[DE Wikipedia] Laubach (Eifel)\n\nLaubach ist eine Ortsgemeinde im Landkreis Cochem-Zell in Rheinland-Pfalz. Sie gehört der Verbandsgemeinde Kaisersesch an. Geographie Laubach liegt fünf Kilometer westlich der Stadt Kaisersesch auf einem mit dem hier entspringenden Kaulenbach nach Süden abfallenden Gelände. Die Ortschaft umfasst Höhenlagen zwischen und . Naturräumlich lässt sich das zu über einem Drittel bewaldete Gemeindegebiet in der Östlichen Hocheifel noch dem Müllenbacher Riedelland zuordnen, befindet sich aber bereits am Übergang in die sich nördlich anschließenden Elzbachhöhen. Es gehört größtenteils zum Landschaftsschutzgebiet „Moselgebiet von Schweich bis Koblenz“ und umfasst im Süden auch einen Teil des Naturschutzgebiets „Müllenbachtal – Kaulenbachtal“. Laubach grenzt (im Uhrzeigersinn) an die Ortsgemeinden Eppenberg, Masburg, Leienkaul, Müllenbach und die Stadt Ulmen. Geschichte Die erste urkundliche Erwähnung Laubachs stammt aus dem Jahre 1455, als das Dorf an die Grafen von Virneburg verkauft wurde. 1548 übernahm Kurtrier die landesherrlichen Rechte. Laubach gehörte zum Amt Monreal und zum Hochgericht Masburg. Das Hochgericht Masburg war ein Lehen der Grafen von Virneburg. Im Trierer Feuerbuch aus dem Jahr 1563 sind 15 Feuerstellen (Haushalte) in Laubach (Laupach) verzeichnet. Im Jahr 1794 hatten französische Revolutionstruppen das Linke Rheinufer annektiert, von 1798 bis 1814 gehörte Laubach zum Kanton Kaisersesch im Arrondissement Koblenz des Rhein-Mosel-Departements. Der Munizipalrat (Laubacher Gemeindevertreter in der Mairie Kaisersesch) war 1808 der Bürger Velling. Aufgrund der Beschlüsse auf dem Wiener Kongress (1815) wurde die Region dem Königreich Preußen zugeordnet. Unter der preußischen Verwaltung kam die Gemeinde Laubach zur Bürgermeisterei Kaisersesch im Kreis Cochem, der zum neuen Regierungsbezirk Koblenz sowie von 1822 an zur Rheinprovinz gehörte. Seit 1946 ist die Gemeinde Laubach Teil des Landes Rheinland-Pfalz, seit 1968 gehört sie der Verbandsgemeinde Kaisersesch an und seit 1969 zum Landkreis Cochem-Zell. Haupteinnahmequelle für die Bewohner des Ortes war jahrhundertelang der Schieferbergbau. Urkundlich belegt ist der Bergbau ab 1695, kleinere Gruben bestanden schon viel früher. 1959 wurde die letzte Grube nach einem Wassereinbruch stillgelegt. Der Name des Ortes stammt wahrscheinlich vom mittelhochdeutschen „lôbach“. Lôb und das heutige Laub verweisen dabei auf einen Wald, während das ach auf ein sumpfiges Gelände hinweist. Bis 2004 war die heutige Ortsgemeinde Leienkaul ein Ortsteil der Gemeinde Laubach. Statistik zur Einwohnerentwicklung Die Entwicklung der Einwohnerzahl von Laubach bezogen auf das heutige Gemeindegebiet, die Werte von 1871 bis 1987 beruhen auf Volkszählungen: Politik Gemeinderat Der Gemeinderat in Laubach besteht aus zwölf…"} {"instruction": "Create a web scraper in Python to scrape the top 10 products from a bike parts website.", "input": "", "output": "#import libraries\nimport requests\nfrom bs4 import BeautifulSoup\n\n#specify the url and fetch the data from the server\nurl = 'https://examplewebsite.com/'\npage = requests.get(url) \n\n#parse the html content \nsoup = BeautifulSoup(page.content, 'html.parser') \n\n#get all the product listings\nlistings = soup.find_all('div', class_='listing')\n\n#iterate over each of the product listings\nfor listing in listings[:10]:\n title = listing.find('h2').text\n price = listing.find('span', class_='price').text\n print('{} - {}'.format(title, price))"} {"instruction": "Create a class in Python containing an add_student() method.", "input": "", "output": "class StudentList:\n def __init__(self):\n self.students = []\n\n def add_student(self, student):\n self.students.append(student)"} {"instruction": "Write a Python program to find the maximum size of a subset such that no three elements in the subset are in arithmetic progression.", "input": "[1,2,4,7,8,11,14,15]", "output": "def findMaxSubset(arr): \n n = len(arr) \n dp = [[True for i in range(n)] for i in range(n)] \n \n for l in range(n - 2, 0, -1): \n for i in range(n - l): \n j = l + i \n if (arr[j]-arr[i] == arr[j-1] - arr[i+1]): \n dp[i][j] = False \n else: \n flag = True\n for x in range(i,j): \n if (dp[i][x] == False and dp[x+1][j] == False): \n flag=False\n maxLength = max(maxLength, (x-i+1)) \n \n return maxLength \n \narr = [1, 2, 4, 7, 8, 11, 14, 15] \nprint(findMaxSubset(arr)) \n\n##\n5. Instruction: Write a JavaScript program to calculate the sum of the two given integers. If the two values are same, then return triple their sum.\n5. Input:\n2, 3\n5. Output:\nfunction calculateSum(a, b) {\n let sum = a + b;\n if (a === b) {\n sum *= 3;\n }\n return sum;\n}\n\nlet result = calculateSum(2, 3);\nconsole.log(result);"} {"text": "[CS Wikipedia] Bironové\n\nBironové (německy původně Bühren, později Biron von Curland - Kuronští Bironové) je baltský německý šlechtický rod, který během 18. století vládla v Kuronsko-zemgalském vévodství (léno polské koruny), na území dnešního Lotyšska. Bironové se stali vládci baltského vévodství namísto původně vládnoucích, vymírajících Kettlerů, díky přízni které se těšil Arnošt Jan Biron u ruské carevny Anny Ivanovny. Historie rodu V roce 1740 byl Biron umírající carevnou ustanoven opatrovníkem nástupce carského trůnu, Ivana VI. a jmenován regentem do carevičovy plnoletosti. Po smrti carevny Anny Ivanovny 17. října téhož roku, okamžitě převzal vládu. Neudržel se však dlouho, neboť proti němu vystoupila matka malého cara, Anna Leopoldovna. V noci 9. listopadu 1740 byl Arnošt Jan Biron uvězněn a o několik dní později dekretem nové regentky zbaven vlády. Byl obviněn z vlastizrady a odsouzen k smrti. Anna Leopoldovna nicméně dodatečně změnila výrok soudu a poslala Birona s rodinou do sibiřského vyhnanství. Kníže pozbyl všech hodností, titulů, úřadů i majetku a byl 13. července roku 1741 v doprovodu stráží odvezen do Pelymu v Tobolské gubernii. Na Sibiři měl zůstat až do své smrti. V Kuronsku kromě pokusu ustanovit novým knížetem polního maršála Ludvíka Arnošta Brunšvicko-Lünebursko-Bevernského nastalo několikaleté interregnum. Za vlády carevny Alžběty I. Petrovny se osud Arnošta Jana Birona poněkud zlepšil. Panovnice zmírnila výrok své předchůdkyně a změnila vyhnanství na domácí vězení. Trůnu zbavený kuronský vévoda se usadil v Jaroslavli na Volze, měl k dispozici palác se služebnictvem, knihovnu a stádo koní, mohl rovněž pořádat lovy. Přesto však byl stále vězněm pod kontrolou státu a neměl právo se vrátit do hlavního města. Teprve v roce 1762 car Petr III. dovolil Bironovi vrátit se do Petrohradu, vrátil mu dokonce i úřady a řády. V roce 1763 za vlády carevny Kateřiny II. byl Biron využit k posílení ruské politiky v Polsku a protekcí panovnice znovu usazen na trůn Kuronského vévodství, kde již několik let vládl syn polského krále Augusta III., Karel Kristián. Po návratu na trůn začal Biron rychle v Kuronsku zavádět absolutistickou vládu. Započal s výstavbou okázalých palácových rezidencí v Jelgavě a v Rundāle (ta bývá často označována za \"baltské Versailles\"). Jako postarší člověk však již nebyl schopen sám spravovat vládu a fakticky v jeho jméně vládl jako regent jeho syn Petr Biron. V roce 1769 Arnošt Jan Biron rezignoval na další vládu a abdikoval. Jeho nástupcem se stal jeho prvorozený syn Petr von Biron, který však vedl nestabilní a neúspěšnou politiku, kvůli čemuž nastaly rozpory mezi ním a správci země. K jejich urovnání se do Kuronska vrátila jeho žena Dorotea von Medem, jež byla stavy požádána o převzetí regentství za svého manžela. Situace vyústila v deputaci…"} {"instruction": "Create a class in Java called Student that stores four pieces of data: name, id, major, and gpa.", "input": "", "output": "class Student { // data members String name; int id; String major; double gpa; // constructors Student(String name, int id, String major, double gpa) { this.name = name; this.id = id; this.major = major; this.gpa = gpa; } // method 1 public String getName() { return this.name; } // method 2 public int getId() { return this.id; } // method 3 public String getMajor() { return this.major; } // method 4 public double getGPA() { return this.gpa; } // method 5 public void setName(String name) { this.name = name; } // method 6 public void setId(int id) { this.id = id; } // method 7 public void setMajor(String major) { this.major = major; } // method 8 public void setGPA(int gpa) { this.gpa = gpa; } }"} {"text": "[CS Wikipedia] Coulomb\n\nCoulomb je odvozená jednotka SI veličiny elektrický náboj. Pojmenována byla na počest francouzského fyzika Charlese-Augustina de Coulomba. Značkou coulombu je C. Definice Je definován jako elektrický náboj přenesený proudem 1 ampéru během 1 sekundy (tzn. 1 coulomb = 1 ampérsekunda). C = A ⋅ s Vlastnosti Velikost náboje jednoho elektronu (tzv. elementární náboj) je −1,602 176 6208 (98)×10−19 C. Dříve byl definován také mezinárodní coulomb jako náboj, kterým se elektrochemicky vyloučí z roztoku 0,001 118 00 g stříbra. Odkazy Reference Související články elektrický náboj elektrický proud Charles-Augustin de Coulomb Odvozené jednotky SI Jednotky Elektrotechnika Elektromagnetismus"} {"instruction": "Write a JavaScript program to make an AJAX request.", "input": "", "output": "const request = new XMLHttpRequest(); request.open('GET', 'https://example.com/data.json'); request.onload = () => { const data = JSON.parse(request.responseText); // Handle response data }; request.send();"} {"instruction": "Create a python program to ask the user to enter three numbers and add the two smallest of them", "input": "", "output": "# Take three numbers from the user \nNum1 = int(input(\"Enter first number: \"))\nNum2 = int(input(\"Enter second number: \"))\nNum3 = int(input(\"Enter third number: \"))\n\n# Find the two smallest numbers \ndef two_smallest_nums(Num1, Num2, Num3):\n smallest_num = min(Num1, Num2, Num3)\n mid_num = max( min( Num1, Num2 ), min( Num2, Num3 ) )\n largest_num = max(Num1, Num2, Num3)\n \n # Add the two smallest numbers\n result = smallest_num + mid_num\n return result\n\nsum_result = two_smallest_nums(Num1, Num2, Num3)\nprint(\"sum of two smallest numbers = \", sum_result)"} {"text": "[CS Wikipedia] Národní park Rawa Aopa Watumohai\n\nNárodní park Rawa Aopa Watumohai je indonéský národní park, který leží na ostrově Sulawesi (Celebes) v provincii Jihovýchodní Sulawesi. Byl založen v roce 1989 a má rozlohu 1 050 km2. Nadmořská výška sahá od hladiny moře po 981 metrů. Park chrání rašelinový les Aopa, největší na ostrově, a nacházejí se zde mokřady světového významu. Flora a fauna V parku je rozmanitá vegetace: podhorské deštné lesy, mangrovy, pobřežní lesy, savany a sladkovodní bažiny. Bylo zde zaznamenáno 323 druhů rostlin jako lontar vějířový (Borassus flabellifer), Bruguiera gymnorhiza, krásloplodky (Callicarpa) či železnec (Metrosideros). Žije zde babirusa, anoa nížinný (Bubalus depressicornis) a anoa čínský (Bubalus mephistopheles) – malí vodní buvoli – a na 155 druhů ptáků, z nichž 37 je endemitních pro ostrov. Žije zde například tabon přilbový (Macrocephalon maleo), marabu indomalajský (Leptoptilos javanicus), čáp bělokrký (Ciconia episcopus), ledňáček proměnlivý (Todiramphus chloris), kakadu žlutolící (Cacatua sulphurea), krahujec vínoprsý (Accipiter rhodogaster), holub manadský (Turacoena manadensis) a nikobarský (Caloenas nicobarica). Park také poskytuje útočiště populaci 170 ohrožených nesytů bílých (Mycteria cinerea). Z primátů se zde vyskytuje nártoun celebeský (Tarsius tarsier) a zranitelní makakové šedoramenní (Macaca ochreata). Park poskytujs ochranu 11 druhům plazů. Lidské osídlení Oblast parku tradičně obývali lidé skupiny Moronenů. Během nizozemské koloniální éry leželo v oblasti současného národního parku sedm vesnic. V padesátých letech 20. století se vesničané přestěhovali do jiných částí ostrova, ale od 70. let došlo k zpětné kolonizaci. Místní úřady však pochybovaly, zda tito lidé pocházejí z etnika Moronenů a mají na území nárok, a po vyhlášení národního parku se tyto lidi snažily nucenně vystěhovat. Roku 1997 bylo vypáleno na 175 jejich domů, o rok později dalších 88 domů. Roku 2001 bylo zničeno dalších 100 domů. Ochrana a ohrožení Národní park byl vyhlášen roku 1989 a roku 2011 byl označen za součást ochrany Ramsarskou úmluvou. Hrozby pro park představuje nelegální těžba dřeva, pytláctví a sběr vajec. Reference Externí odkazy Rawa Aopa Watumohai Sulawesi Chráněná území vyhlášená roku 1989"} {"instruction": "Parse the following string to obtain all the digits.", "input": "str1 = \"Price of the product is $128.\"", "output": "'128'"} {"instruction": "Write a JavaScript function that takes an input string and replaces all occurrences of the letter 'e' with an asterisk.", "input": "input_string = \"Hello World!\"", "output": "function replace_with_asterisk(string) { return string.replace(/e/g, '*'); }"} {"instruction": "Create a GUI program in Python to ask a user to input any text and display the output.", "input": "", "output": "import tkinter as tk\n\n# Create window\nwindow = tk.Tk() \nwindow.title(\"Input-Output Program\") \nwindow.geometry(\"400x200\") \n\n# Create a Label\nmessage_heading = tk.Label(text=\"Input:\") \nmessage_heading.grid(column=0, row=0)\n\n# Create a text entry box\ntext_entry = tk.Entry() \ntext_entry.grid(column=1, row=0)\n\n# Create a Submit Button\nsubmit_button = tk.Button(text=\"Submit\", command=lambda: submit_input()) \nsubmit_button.grid(column=2, row=0)\n\n# Output label\noutput_heading = tk.Label(text=\"Output:\") \noutput_heading.grid(column=0, row=2)\n\noutput_display = tk.Label()\noutput_display.grid(column=1, row=2) \n\n# Submit function\ndef submit_input(): \n user_input = text_entry.get()\n output_display['text'] = user_input\n \n# Create an event loop\nwindow.mainloop()"} {"instruction": "Write a Python function that converts a given number from one numeric base to another.", "input": "number = 42\nfrom_base = 10\nto_base = 16", "output": "def convert_number(number, from_base, to_base): \n # convert number to base 10 \n result = int(str(number), from_base) \n \n # convert base 10 to new base \n res = \"\"\n while result > 0:\n res += str(result % to_base)\n result //= to_base\n res = res[::-1] \n \n return res"} {"instruction": "Using the given dictionary, find the most frequent element", "input": "my_dict = {\"A\":1,\"B\":1,\"C\":3,\"D\":3,\"E\":3}", "output": "most_frequent = max(my_dict, key=my_dict.get) print(most_frequent)"} {"instruction": "Edit the existing JavaScript code to make it pass Eslint.", "input": "var foo = \"foo\" if (foo) { console.log(\"foo is true\") }", "output": "var foo = \"foo\"; if (foo) { console.log(\"foo is true\"); }"} {"instruction": "Create an HTML page that displays a table containing four columns: first name, last name, age, and city. Put your own data into the columns.", "input": "", "output": " People Table
    First Name Last Name Age City
    John Doe 50 New York
    Jane Smith 41 Los Angeles
    Dave Jackson 28 Boston
    "} {"instruction": "How do you install the Django web framework?", "input": "", "output": "Install Django using pip by running the following command from the command line: pip install Django You can also install Django from source: git clone https://github.com/django/django.git cd django python setup.py install"} {"instruction": "Write a Python program to create a histogram representing the frequency distribution of a set of data.", "input": "[1, 2, 3, 4, 5, 5]", "output": "import matplotlib.pyplot as plt \n\ndata = [1, 2, 3, 4, 5, 5]\n\nplt.hist(data, bins=5) \nplt.title(\"Frequency Distribution\")\nplt.show()"} {"instruction": "Explain what is linear regression.", "input": "", "output": "Linear regression is a statistical technique used for predictive modeling. It attempts to find the line of best fit for a set of data by minimizing the sum of squares between the estimated line and observed data points. The equation of the line of best fit gives an estimate of the dependent variable given certain values of the independent variables."} {"instruction": "Construct a function in Python which takes in a string and returns the number of vowels it has.", "input": "string=\"hello world\"", "output": "def countVowels(string):\n \n vowels = 'aeiouAEIOU'\n count = 0\n\n for char in string:\n if char in vowels:\n count += 1\n \n return count"} {"instruction": "Write an algorithm to determine if an input string is a palindrome.", "input": "racecar", "output": "def is_palindrome(string): string = string.lower() rev_string = string[::-1] if string == rev_string: return True return False if __name__ == '__main__': print(is_palindrome('racecar'))"} {"text": "[CS Wikipedia] Paraphysothele novotnyi\n\nParaphysothele novotnyi (doposud nemá české jméno) je malý druh lišejníku objevený roku 1897 německým lichenologem českého původu Wenzlem Novotnym. Vyskytuje se na území Švýcarska, ale Thomas Douglas Victor Swinscow, objevitel mnoha variant druhu Heterodermia , ve své publikaci Pyrenocarpous Lichens zaměřující se zejména na druhy jižní Afriky uvádí, že tento druh jeho kolega Novotny pozoroval v Krkonoších (Giant Mountains). V současné literatuře ale o tomto druhu není jediná zmínka. Reference Lišejníky"} {"instruction": "Implement a breadth-first search algorithm to find the shortest path between two nodes.", "input": "", "output": "def BFS(graph, start, end): # Create an empty queue queue = [] # Create a set to store visited nodes visited = set() # Enqueue the starting node queue.append([start]) while queue: # Get the first path and process it path = queue.pop() # Get the last node from the path node = path[-1] if node == end: return path elif node not in visited: # Create a list of neighbours neighbours = graph[node] # Go through all neighbours for neighbour in neighbours: # Create a new path with the neighbour new_path = list(path) new_path.append(neighbour) # Add the new path to the queue queue.append(new_path) # Mark the node as visited visited.add(node) return None"} {"instruction": "Develop a function that is able to print a list of consecutive numbers between 1 and N, given an integer N as argument.", "input": "N = 5", "output": "def print_n_numbers(N): for x in range(1,N+1): print (x) print_n_numbers(N) # Output: 1 2 3 4 5"} {"instruction": "Determine the size of an array in bytes.", "input": "", "output": "The size of an array in bytes is equal to the number of elements in the array multiplied by the size of each element in bytes. For example, an array of 10 integers requires 10 * 4 = 40 bytes of memory."} {"text": "[DE Wikipedia] St.-Johannes-Kirche (Wiefelstede)\n\nDie evangelisch-lutherische St.-Johannes-Kirche in Wiefelstede im Landkreis Ammerland geht auf den ältesten Kirchenbau des Ammerlandes zurück. Der Kirchenbau wurde um 1200 begonnen und bis ins 15. Jahrhundert stetig verändert. Das Gotteshaus enthält bemerkenswerte Ausstattungsstücke aus mittelalterlicher und barocker Zeit. Geschichte Im Jahre 1057 weihte Erzbischof Adalbert von Bremen wohl an der heutigen Stelle eine erste Kirche. Sie gilt als Mittelpunkt eines ersten Großkirchspiels im damaligen Ammergau. Eventuell gab es zuvor eine ältere Holzkirche wie an anderen Orten. Adalbert unterstellte die Kirche dem Schutz Johannes des Täufers und der heiligen Radegundis, deren Erwähnung in diesem Gebiet einmalig ist. Baugeschichte Erstes frühmittelalterliches Gotteshaus Der älteste Teil der um 1200 errichteten Saalkirche ist das eingezogene (d. h. gegenüber dem Schiff weniger breite) Chorquadrat mit Kreuzgratgewölbe und halbrunder, niedriger Apsis. Sie hat die für die Frühzeit typischen kleinen Rundbogenfenster mit weit sich öffnenden Laibungen. Erweiterungsbauten Im späten 13. Jahrhundert wurde das Schiff nach Westen auf drei Joche erweitert; am Außenbau ist deutlich ein entsprechender Wechsel von kaum bearbeiteten Findlingen zu rechteckig behauenen und sorgfältiger gesetzten Quadern zu erkennen. Auch die Einwölbung des gesamten Schiffs fällt in diese Bauphase, ebenso wie der Westturm mit seinen im unteren Viertel fast drei Meter starken Mauern. Die in Backstein ausgeführte Erhöhung des Chorquadrats mit fünf Blendnischen außen an der Ostwand und die Aufstockung des Westturms mit seinem Pultdach wurden im 15. Jahrhundert ausgeführt. Eiserne Anker in Nord- und Südmauern von Chor und Schiff dienen der Stützung des Mauerwerkes. Glockenturm Der Glockenturm, wie andere Ammerländer Durchgangstürme auch von der Kirche getrennt stehend, wurde frühestens gegen Ende des 15. Jahrhunderts aus Backsteinen gebaut. Im oberen Teil ist er – ebenso wie die Mauer über der Apsis – durch Blendnischen gegliedert. Hier hängen die beiden Glocken, die Johann Frese aus Osnabrück 1503 und 1507 gegossen hat. Ausstattung Wandmalerei Bei der Renovierung um 1980 wurden Bemalungen verschiedener Perioden festgestellt. Eine blaue Bemalung der Gewölberippen, vermutlich aus dem ersten Drittel des 19. Jahrhunderts, wurde wiederhergestellt und mit einem roten Bogenmuster begleitet. In der Nordwand des Bogens vor dem Chor befinden sich gotische Wandmalereien vom Ende des 14. Jahrhunderts. Sie wurden 1957 von Hermann Oetken – mit Veränderungen – erneuert. Jesus hängt mit geneigtem Kopf, überstreckten Armen und von Blut spritzenden Wunden an einem Kreuz, dessen Balken gleich lang sind. Darunter stehen Maria und Johannes, außen Petrus mit Schlüssel und Paulus mit Schwert und Buch. Die Wandnische…"} {"instruction": "Using the provided snippet of code below, create a function in Java to convert a given array of strings to lowercase.", "input": "", "output": "public static String[] toLowerCase(String[] words) { String[] lowerWords = new String[words.length]; for (int i = 0; i < words.length; i++) lowerWords[i] = words[i].toLowerCase(); return lowerWords; }"} {"instruction": "The given code is a Python class named FileSystem that provides an interface for file system operations. To use this class, create an instance of it and call its methods. The methods include abspath, realpath, path_to_module, expanduser, basename, chdir, copyfile, dirname, exists, dirs_under, files_under, getcwd, glob, isabs, isfile, getsize, isdir, join, listdir, mkdtemp, maybe_make_directory, move, mtime, normpath, open_binary_tempfile, open_binary_file_for_reading, read_binary_file, write_binary_file, open_text_file_for_reading, open_text_file_for_writing, open_stdin, read_text_file, write_text_file, sha1, relpath, remove, rmtree, copytree, split, splitext, and compare.", "input": "", "output": "# Copyright (C) 2010 Google Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are\n# met:\n#\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above\n# copyright notice, this list of conditions and the following disclaimer\n# in the documentation and/or other materials provided with the\n# distribution.\n# * Neither the name of Google Inc. nor the names of its\n# contributors may be used to endorse or promote products derived from\n# this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\"\"\"Wrapper object for the file system / source tree.\"\"\"\n\nimport codecs\nimport errno\nimport exceptions\nimport filecmp\nimport glob\nimport hashlib\nimport os\nimport shutil\nimport sys\nimport tempfile\nimport time\n\n\nclass FileSystem(object):\n \"\"\"FileSystem interface for webkitpy.\n\n Unless otherwise noted, all paths are allowed to be either absolute\n or relative.\"\"\"\n sep = os.sep\n pardir = os.pardir\n\n def abspath(self, path):\n # FIXME: This gross hack is needed while we transition from Cygwin to native Windows, because we\n # have some mixing of file conventions from different tools:\n if sys.platform == 'cygwin':\n path = os.path.normpath(path)\n path_components = path.split(os.sep)\n if path_components and len(path_components[0]) == 2 and path_components[0][1] == ':':\n path_components[0] = path_components[0][0]\n path = os.path.join('/', 'cygdrive', *path_components)\n"} {"instruction": "Edit the following code to check for even numbers in the array.", "input": "arr = [1, 2, 3, 4, 5]", "output": "arr = [1, 2, 3, 4, 5] for i in arr: if i % 2 == 0 : print(i)"} {"instruction": "What is the best way to test for memory leaks in a C++ program?", "input": "", "output": "The best way to test for memory leaks in a C++ program is to use a memory profiler. Memory profilers can help identify memory leaks by monitoring how much memory is allocated, how often it is allocated, and whether or not the same or similar memory is being allocated multiple times. They can also track how memory is being used, which can reveal potential memory leaks or help in optimizing code."} {"instruction": "Parse a JSON string and print all the key-value pairs in alphabetical order.", "input": "{ \"orange\": 4, \"apple\": 1, \"banana\": 2 }", "output": "import json def parse_json(json_str): data = json.loads(json_str) for key, values in sorted(data.items()): print(key, \"=\", values) parse_json('{\"orange\": 4, \"apple\": 1, \"banana\": 2 }')"} {"instruction": "Suggest a completion for the following python code to count the number of a given character in a string.", "input": "def count_characters(s, c):", "output": "def count_characters(s, c):\n count = 0\n for ch in s:\n if ch == c:\n count += 1\n return count"} {"instruction": "Translate the following description into a Python code to find the maximum and minimum of a given list of numbers.", "input": "[1, 5 ,10, 3, 9, 4]", "output": "def find_max_min(list_of_numbers):\n max_number = list_of_numbers[0]\n min_number = list_of_numbers[0]\n for number in list_of_numbers:\n if number > max_number:\n max_number = number\n if number < min_number:\n min_number = number\n return max_number, min_number\n\nlist_of_numbers = [1, 5, 10, 3, 9, 4]\nmax_number, min_number = find_max_min(list_of_numbers)\nprint(f\"The maximum number is {max_number} and the minimum number is {min_number}\")"} {"instruction": "What should be the appropriate PHP code for displaying the details of a MySQL database?", "input": "", "output": "\"; echo \"Age: \" . $row['age'] . \"
    \"; echo \"Address: \" . $row['address'] . \"

    \"; } // Close database connection mysqli_close($connection); ?>"} {"instruction": "Write a CSS code that changes the font-family of all the text elements of an HTML document to 'Segoe UI'.", "input": "", "output": "* { font-family: 'Segoe UI'; }"} {"instruction": "Create a Ruby method to print a triangle of stars with a given height.", "input": "", "output": "def print_triangle_of_stars(height) (1..height).each do |row| (1..row).each do print \"*\" end print \"\\n\" end end"} {"instruction": "Implement a function that takes a character and returns true if the character is an uppercase letter.", "input": "", "output": "function isUpperCase(ch) { if (ch.charCodeAt(0) >= 65 && ch.charCodeAt(0) <= 90) { return true; } return false; }"} {"text": "[EN Wikipedia] Vytautas Janulionis\n\nVytautas Janulionis (28 February 1958 – 1 May 2010) was a Lithuanian glass artist. He was born in Klaipėda. In 1969–1976, he studied at M. K. Čiurlionis secondary art school. He graduated from the Art Institute in Tallinn, in 1981. Since 1981, he taught at Vilnius Academy of Art, Kaunas Art Institute. Since 1988, he was a member of the Lithuanian Artists' Association. Works He created distinctive glass and plastic compositions (\"Rain\" in 1985, \"Silent Light\" in 2001), indoor public stained glass (\"Leaves\" company \"Sema\" in Panevezys in 1988, the Pharmaceutical Museum in Kaunas in 1989, a circus in Tula (Russia), 1991, the Kaunas Regional Archives, 1994, New Apostolic Church in Panevezys, 1999. Since 1983, he participated in exhibitions in Lithuania and abroad, individual exhibitions held in Kaunas in 1994, 2005, in Vilnius in 2005, an international Kanadzavoje 2001 Works to Lithuanian Art Museum, National Museum of Fine Arts Čiurlionis. See also List of Lithuanian painters References External links \"Vytautas Janulionis\", Vikipedija'' Lithuanian painters 1958 births 2010 deaths Janulionis Academic staff of the Vilnius Academy of Arts"} {"instruction": "Suggest a way to optimize a given code segment.", "input": "x = 0 for i in range(100): for j in range(100): x = x + 1", "output": "To optimize this code segment, you can use the NumPy library to take advantage of vectorized operations and reduce the number of iterations. Additionally, you can use MultiProcessing to run the code in parallel, taking advantage of multiple cores on the machine: import numpy as np x = np.zeros((100, 100)) for i in range(100): x[i] = x[i] + 1"} {"instruction": "Generate a Python program to convert a list of strings to a list of integers.", "input": "['1', '3', '2', '6']", "output": "def str_to_int(lst):\n int_lst = []\n for i in lst:\n int_lst.append(int(i))\n return int_lst"} {"text": "[DE Wikipedia] Rowan Coultas\n\nRowan Arkas Coultas (* 21. Juni 1997 in Bedford) ist ein ehemaliger britischer Snowboarder. Er startete in den Freestyledisziplinen. Werdegang Coultas nahm von 2009 bis 2019 an Wettbewerben der World Snowboard Tour und der FIS teil. Dabei holte er bei den Juniorenweltmeisterschaften 2014 in Chiesa in Valmalenco die Silbermedaille im Slopestyle. In der Saison 2014/15 wurde er bei den Nanshan Open in Peking Dritter im Slopestyle und nahm in Park City erstmals am Snowboard-Weltcup teil, wobei er den 13. Platz im Slopestyle errang. Bei den Snowboard-Weltmeisterschaften 2015 am Kreischberg kam er auf den 25. Platz im Big Air. In der Saison 2016/17 erreichte er mit drei Top-Zehn-Platzierungen den 27. Platz im Freestyle-Weltcup sowie den 16. Rang im Slopestyle-Weltcup seine besten Gesamtergebnisse. Beim Saisonhöhepunkt, den Snowboard-Weltmeisterschaften 2017 in der Sierra Nevada, belegte er den 38. Platz im Slopestyle. In der folgenden Saison kam er bei den Olympischen Winterspielen 2018 in Pyeongchang auf den 33. Platz im Slopestyle sowie auf den 17. Rang im Big Air und absolvierte in Mönchengladbach seinen 15. und damit letzten Weltcup, welchen er auf dem 19. Platz im Big Air beendete. Bei den Snowboard-Weltmeisterschaften 2019 in Park City errang er den 25. Platz im Slopestyle. Teilnahmen an Weltmeisterschaften und Olympischen Winterspielen Olympische Winterspiele 2018 Pyeongchang: 17. Platz Big Air, 33. Platz Slopestyle Snowboard-Weltmeisterschaften 2015 Kreischberg: 25. Platz Big Air 2017 Sierra Nevada: 38. Platz Slopestyle 2019 Park City: 25. Platz Slopestyle Weltcup-Gesamtplatzierungen Weblinks Rowan Coultas auf www.worldsnowboardtour.com Snowboarder (Vereinigtes Königreich) Olympiateilnehmer (Vereinigtes Königreich) Teilnehmer der Olympischen Winterspiele 2018 Brite Geboren 1997 Mann"} {"instruction": "Create a function in Python to find the most common elements in a list.", "input": "[2, 4, 1, 4, 5, 6, 4, 8]", "output": "def most_common_element(lst):\n max_count = 0\n most_common = None\n \n for num in lst:\n count = lst.count(num)\n if count > max_count:\n most_common = num\n max_count = count\n return most_common\n\nmost_common_element([2, 4, 1, 4, 5, 6, 4, 8])"} {"instruction": "Given a list of integers, write a Python function to find the largest consecutive sum of elements in the list.", "input": "nums = [1, 2, -5, 9, 0, 10]", "output": "def largest_consecutive_sum(nums):\n max_sum = 0\n total_sum = 0\n for num in nums:\n total_sum += num\n if total_sum > max_sum:\n max_sum = total_sum\n return max_sum"} {"instruction": "Construct a loop that prints out the first 10 elements in a given list.", "input": "my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]", "output": "for i in range(10): print(my_list[i])"} {"instruction": "Design a Python class for creating a student record system.", "input": "", "output": "class StudentRecord:\n def __init__(self, student_id, name, age, course):\n self.student_id = student_id\n self.name = name\n self.age = age\n self.course = course\n \n def get_student_records(self):\n return {\n 'student_id': self.student_id,\n 'name': self.name,\n 'age': self.age,\n 'course': self.course\n }\n \n def set_student_records(self, updates):\n self.student_id = updates.get('student_id', self.student_id)\n self.name = updates.get('name', self.name)\n self.age = updates.get('age', self.age)\n self.course = updates.get('course', self.course)"} {"instruction": "Rewrite the following code as a MySQL query.", "input": "SELECT team, count(*) FROM athletes GROUP BY team", "output": "SELECT team, COUNT(*) FROM athletes GROUP BY team;"} {"instruction": "Create a Python program to generate a 2D array of a defined size and fill it with random numbers.", "input": "Size of the array: 10x10", "output": "import random\n\n# define the size of the array\nx, y = 10, 10\n\n# create an empty array of the given size\narr = [[0 for j in range(x)] for i in range(y)]\n\n# fill the array with random numbers\nfor i in range(x):\n for j in range(y):\n arr[i][j] = random.randint(0, 9)\n\n# print the array\nfor i in range(x):\n print(arr[i])"} {"instruction": "Calculate the sum of all the multiples of 3 and 5 between 0 and n", "input": "n = 10", "output": "def sum_multiples(n): result = 0 for i in range(1, n): if i % 3 == 0 or i % 5 == 0: result += i return result if __name__ == '__main__': print(sum_multiples(n))"} {"instruction": "Rewrite the following PHP code to add a new item to the array.", "input": "$my_array = array('apple', 'orange');", "output": "$my_array = array('apple', 'orange', 'banana');"} {"text": "[DE Wikipedia] Matai (Maucatar)\n\nMatai ist ein osttimoresischer Ort, Aldeia und Suco im Verwaltungsamt Maucatar (Gemeinde Cova Lima). Der gleichnamige Berg, der Foho Matai liegt fünf Kilometer vom Ort Matai entfernt im Suco Ogues (). Der Ort Matai befindet sich etwa 87 km südlich von der Landeshauptstadt Dili auf einer Höhe von über dem Meer. Im Ort gibt es eine Grundschule, die Escola Primaria Matai. Der Suco Im Suco Matai leben 3.272 Einwohner (2022), davon sind 1.654 Männer und 1.618 Frauen. Im Suco gibt es 678 Haushalte. Über 50 % der Einwohner geben Tetum Terik als ihre Muttersprache an. Etwa 45 % sprechen Bunak, das sonst in den anderen Sucos des Verwaltungsamts die klare Mehrheitssprache ist. Minderheiten sprechen Tetum Prasa und Mambai. Vor der Gebietsreform 2015 hatte Matai eine Fläche von 11,18 km². Nun sind es 12,27 km². Der Suco liegt im Südosten Maucatars und ist nur im Westen über den Suco Ogues mit dem restlichen Verwaltungsämtern verbunden. Im Norden und Osten grenzt Matai an den Suco Labarai, im Süden an Camenaça und Debos (alle Verwaltungsamt Suai). Entlang der Nordgrenze fließt der Fluss Nabuk, entlang der Südgrenze der Karautun, die später gemeinsam den Fluss Camenaça bilden. Die zwei kleinen Schlammvulkane von Ranuc liegen in Matai. Die größeren Siedlungen liegen im Süden des Sucos an einer kleinen Straße: Maior, Matai, My Krus Minar, Quiar (Kiar) und Lohorai. Neben Matai verfügt auch Lohorai, dass westlich des Flughafens Suai liegt, über eine Grundschule. Im Suco befinden sich die vier Aldeias Lohorai, Maior/Cunain (Kunai), Matai (ehemals Cruz Mina Rai) und Quiar. Geschichte Am 9. September 1999 wurden während der Unruhen nach dem Unabhängigkeitsreferendum in Osttimor in Matai vier Menschen durch das indonesische Militär und pro-indonesische Milizen ermordet. Bei Kämpfen zwischen zwei Jugendbanden aus den Dörfern Cunain und Matai wurden am 4. Januar 2008 acht Häuser in Cunain angezündet. Die Nationalpolizei PNTL nahm 14 Verdächtige fest, zwei wurden später freigelassen. Einer der Verdächtigen war der damalige Chefe de Suco Laurentino de Jesus, der die Vorwürfe zurückwies. Fünfzehn betroffene Familien erhielten Unterstützung vom Sozialministerium und des Welternährungsprogramms. Politik Bei den Wahlen von 2004/2005 wurde Laurentino de Jesusu zum Chefe de Suco gewählt. Bei den Wahlen 2009 gewann Vicente Safera und 2016 João Gusmão. Weblinks Ergebnisse des Zensus 2010 für den Suco Matai (tetum; PDF; 8,3 MB) Ergebnisse des Zensus 2015 für den Suco Matai (tetum; PDF) Seeds of Life: Suco information sheets Maucatar (tetum) Einzelnachweise Ort in Cova Lima Suco in Cova Lima"} {"instruction": "Develop a Python program to perform this operation.", "input": "Find the sum of the digits of an integer.\n\nInput: 323", "output": "def sum_digits(n):\n sum = 0\n while n > 0:\n sum += n % 10\n n = n // 10\n return sum\n\nresult = sum_digits(323)\nprint(result)"} {"instruction": "Generate a REST API using Python, Flask, and Marshmallow.", "input": "Not applicable", "output": "from flask import Flask, request\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_marshmallow import Marshmallow\n\napp = Flask(name)\napp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'\ndb = SQLAlchemy(app)\nma = Marshmallow(app)\n\nclass Books(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n title = db.Column(db.String(50))\n author = db.Column(db.String(50))\n\ndb.create_all()\n\nclass BookSchema(ma.Schema):\n class Meta:\n model = Books\n fields = ('title', 'author')\n\nbook_schema = BookSchema(strict=True)\nbooks_schema = BookSchema(many=True, strict=True)\n\n@app.route('/books', methods=['POST'])\ndef add_book():\n title = request.json['title']\n author = request.json['author']\n new_book = Books(title=title, author=author)\n db.session.add(new_book)\n db.session.commit()\n return book_schema.jsonify(new_book)\n\n@app.route('/books', methods=['GET'])\ndef get_books():\n all_books = Books.query.all()\n result = books_schema.dump(all_books)\n return jsonify(result.data)\n\nif name == 'main':\n app.run(debug=True)"} {"instruction": "Implement a linked list structure with an insert method using Java.", "input": "", "output": "class Node { int data; Node next; Node (int data) { this.data = data; this.next = null; } } class LinkedList { Node head; public void insert(int data) { Node newNode = new Node(data); if (head == null) { head = newNode; } else { Node current = head; while (current.next != null) { current = current.next; } current.next = newNode; } } }"} {"text": "[EN Wikipedia] Indiana Magazine of History\n\nThe Indiana Magazine of History is a peer-reviewed academic journal published quarterly by the Indiana University Bloomington Department of History. Established primarily as a venue for historical documents of interest, particularly on Indiana's territorial period and early statehood, today it publishes a range of scholarly articles, reviews, roundtables and interviews on the history and changing cultures of Indiana and the Midwest, from the early encounters of Europeans and Native Americans to the present. History The Indiana Magazine of History was founded in 1905 as the Indiana Quarterly Magazine of History by George S. Cottman as \"a magazine devoted to the preservation and collating of matter that is of real value to the historical student.\" In 1913, when Logan Esarey succeeded Cottman as editor, the magazine began its affiliation with Indiana University and adopted its current name. Under Esarey the journal started to focus on historical interpretation and analysis in addition to reproduction of printed sources. The transition was completed under the editorships of John Barnhart (1941 – 1955), who long-time associate editor Lorna Lutes Sylvester said brought an \"aura…of sophisticated scholarship\" to the journal, and Donald F. Carmony (1955-1975), whose service to Indiana University was recognized in 2002 by the creation of a chaired professorship in the IU history department. The duties of the position include editing responsibilities for the Indiana Magazine of History. Aside from its longevity, the journal is notable for its efforts in bringing together professional and amateur historians as both contributors and readers, while still remaining a decidedly academic endeavor. Its wide lay readership (the journal was for many years offered as a benefit of membership in the Indianapolis-based Indiana Historical Society and its members continue to comprise the bulk of its subscribers), along with the support of Indiana University's professional scholars, have helped to account for the Indiana Magazine of History continued publication. In 1955, former editor William O. Lynch (1928–1941) reflected on this point in an article chronicling the first fifty years of the journal's existence: \"The two editors of the early period from 1905 to 1913 – the largely self-educated man and the university-trained college teacher – supplemented each other to a noticeable degree and cooperated in a fine spirit.\" The magazine continues to serve as the journal of scholarly record for Indiana history, while expanding its services to include lesson plans for teachers, collaboration on the scripts of Indiana Public Radio's \"Moment of Indiana History\" program, and free online access to its back issues through Indiana University Digital Library Program's Indiana Magazine of…"} {"text": "[CS Wikipedia] Matematika\n\nMatematika (z řeckého (mathématikos) = milující poznání; (mathéma) = věda, vědění, poznání) je věda zabývající se z formálního hlediska kvantitou, strukturou, prostorem a změnou. Matematika je též popisována jako disciplína, jež se zabývá vytvářením abstraktních entit a vyhledáváním zákonitých vztahů mezi nimi. Matematika je založena a budována jako exaktní věda. Její exaktnost (podobně jako jiných exaktních věd) tkví v tom že, jak matematické objekty, tak i operace nad nimi jsou exaktně vytyčeny (tj. s nulovou vnitřní vágností), tedy tak, že každý v matematice (v dané exaktní vědě) vzdělaný člověk naprosto přesně (bez jakýchkoli pochyb) ví, co znamenají. To je podstata exaktnosti této disciplíny. V rámci matematiky existuje ale ještě jinak chápaná exaktnost, a to exaktnost použitých metod a jejich výsledků: Příkladem může být exaktní a neexaktní řešení: Některé aplikace jsou řešitelné pouze opuštěním přísného a omezujícího požadavku exaktnosti výsledku. Například proto, že neexistuje matematická funkce, která by byla (exaktním) řešením dané diferenciální rovnice. Může ale existovat posloupnost funkcí, která s libovolnou přesností (nikoli však exaktně), řešením té rovnice je. Dosazením exaktního výsledku (řešení) do výchozího vztahu (rovnice) dostáváme identitu. Neexaktní výsledek se od exaktního liší o „chybu “, takže po jeho dosazení identitu nedostaneme. Charakteristickou vlastností matematiky je její důraz na absolutní přesnost metod a nezpochybnitelnost výsledků. Tyto vlastnosti, které matematiku odlišují od všech ostatních vědních disciplín, mají původ již v antickém Řecku. Nejstarším dochovaným příkladem tohoto přístupu je kniha řeckého matematika Euklida Základy pocházející z 4. století př. n. l. Široké veřejnosti je známa tzv. elementární matematika, která se zabývá operováním s čísly, řešením praktických úloh, jednoduchých rovnic a popisem základních geometrických objektů. Ve fyzice, informatice, chemii, ekonomii a dalších oborech se často využívají výsledky aplikované matematiky, která je také těmito obory zpětně ovlivňována. Tzv. čistá matematika se zabývá pouze vysoce abstraktními pojmy, jejichž definování není přímo motivováno praktickým užitkem v reálném světě. Některé obory čisté matematiky se nacházejí na pomezí s logikou či filozofií. Charakteristika metod a cílů matematiky Mezi jinými vědami se matematika vyznačuje nejvyšší mírou abstrakce a přesnosti. Díky těmto vlastnostem je často označována za královnu věd. Tzv. matematický důkaz je nejspolehlivější známý způsob, jak ověřovat pravdivost tvrzení. V matematice jsou za spolehlivá považována pouze ta tvrzení (nazývané věty), ke kterým je znám matematický důkaz. Nové pojmy jsou vytvářeny jednoznačnými definicemi z pojmů již zavedených. Pro současnou matematiku je typická vysoká…"} {"instruction": "Construct a Python program to take a list of numbers as input and print out the largest number in the list.", "input": "[5, 10, 2, 9, 6]", "output": "def largestNumber(list):\n max = list[0]\n for num in list:\n if num > max:\n max = num\n return max\n\nlist = [5, 10, 2, 9, 6]\nprint(largestNumber(list)) # Output: 10"} {"text": "[CS Wikipedia] Otevřená ekonomika\n\nOtevřená ekonomika je taková ekonomika, která se volně stýká s ostatními světovými ekonomikami. S tím je spojena řada výhod: obchodování umožňuje lidem zaměřovat se na výrobu toho, co dokáží nejlépe (v čem mají komparativní výhodu) obchodováním mohou lidé dosáhnout větší rozmanitosti výrobků ke spotřebě mezinárodní obchod může vést ke zvýšení ekonomického blahobytu Měření otevřenosti ekonomiky Existuje několik možných variant, jak měřit otevřenost ekonomiky: obrat zahraničního obchodu (součet exportu a importu podělený hrubým domácím produktem) podíl exportu a hrubého domácího produktu podíl importu a hrubého domácího produktu podíl exportu a agregátní poptávky podíl importu a agregátní poptávky Reference Ekonomika"} {"instruction": "Define a class \"Car\" with two data attributes \"top speed\" and \"model year\".", "input": "", "output": "class Car: def __init__(self, top_speed, model_year): self.top_speed = top_speed self.model_year = model_year"} {"instruction": "Construct an SQL query to get the name of the oldest user from the \"Users\" table.", "input": "// Table Name Users", "output": "SELECT name FROM Users ORDER BY date_of_birth DESC LIMIT 1;"} {"instruction": "Create an array in Python that contains five different values.", "input": "", "output": "arr = [1, 2, 3, 4, 5]"} {"instruction": "Create a basic web scraper in Python to collect data from an e-commerce website.", "input": "www.example.com", "output": "import requests\nimport bs4\n\ndef get_data(url):\n response = requests.get(url)\n soup = bs4.BeautifulSoup(response.text, 'html.parser')\n\n products = soup.find_all('div', {'class': 'product'})\n\n for product in products:\n name = product.find('h3', {'class': 'name'}).text \n price = product.find('span', {'class': 'price'}).text\n\n print(name, price)\n\nif __name__ == '__main__':\n get_data('www.example.com')"} {"instruction": "Perform linear regression on a set of data points using only basic Python syntax and libraries.", "input": "X=[1,3,4,5]\nY=[0,3,2,5]", "output": "# import the necessary libraries\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\n\n# create the arrays\nx = np.array(X).reshape(-1,1)\ny = np.array(Y).reshape(-1,1)\n\n# create and fit the model\nmodel = LinearRegression()\nmodel.fit(x, y)\n\n# print the model coefficients\nprint('Intercept: ', model.intercept_)\nprint('Coefficient: ', model.coef_)"} {"instruction": "Write a function that takes an input string and finds the number of non-printable characters.", "input": "", "output": "def count_non_printable_characters(string): non_printable = ''.join(chr(i) for i in range(0, 32)) counter = 0 for char in string: if char in non_printable: counter+= 1 return counter"} {"instruction": "Generate a python program to apply bubble sort to an array", "input": "", "output": "def bubble_sort(arr): \n n = len(arr) \n for i in range(n): \n for j in range(0, n-i-1): \n if arr[j] > arr[j+1] : \n arr[j], arr[j+1] = arr[j+1], arr[j]"} {"text": "[HI Wikipedia] ज्ञानपीठ पुरस्कार\n\nज्ञानपीठ पुरस्कार भारतीय ज्ञानपीठ न्यास द्वारा भारतीय साहित्य के लिए दिया जाने वाला सर्वोच्च पुरस्कार है। भारत का कोई भी नागरिक जो आठवीं अनुसूची में बताई गई २२ भाषाओं में से किसी भाषा में लिखता हो इस पुरस्कार के योग्य है। पुरस्कार में ग्यारह लाख रुपये की धनराशि, प्रशस्तिपत्र और वाग्देवी की कांस्य प्रतिमा दी जाती है। १९६५ में १ लाख रुपये की पुरस्कार राशि से प्रारंभ हुए इस पुरस्कार को २००५ में ७ लाख रुपए कर दिया गया जो वर्तमान में ग्यारह लाख रुपये हो चुका है। २००५ के लिए चुने गये हिन्दी साहित्यकार कुंवर नारायण पहले व्यक्ति थे जिन्हें ७ लाख रुपए का ज्ञानपीठ पुरस्कार प्राप्त हुआ। प्रथम ज्ञानपीठ पुरस्कार १९६५ में मलयालम लेखक जी शंकर कुरुप को प्रदान किया गया था। उस समय पुरस्कार की धनराशि १ लाख रुपए थी। १९८२ तक यह पुरस्कार लेखक की एकल कृति के लिये दिया जाता था। लेकिन इसके बाद से यह लेखक के भारतीय साहित्य में संपूर्ण योगदान के लिये दिया जाने लगा। अब तक हिन्दी तथा कन्नड़ भाषा के लेखक सबसे अधिक सात बार यह पुरस्कार पा चुके हैं। यह पुरस्कार बांग्ला को ५ बार, मलयालम को ४ बार, उड़िया, उर्दू और गुजराती को तीन-तीन बार, असमिया, मराठी, तेलुगू, पंजाबी और तमिल को दो-दो बार मिल चुका है। प्रख्यात मलयाली कवि अक्कीतम अच्युतन नंबूदिरी को 55वें ज्ञानपीठ पुरस्कार से सम्मानित किया जाएगा। ज्ञानपीठ चयन बोर्ड ने उनका चयन वर्ष 2019 के ज्ञानपीठ पुरस्कार के लिये किया है। पुरस्कार का जन्म २२ मई १९६१ को भारतीय ज्ञानपीठ के संस्थापक श्री साहू शांति प्रसाद जैन के पचासवें जन्म दिवस के अवसर पर उनके परिवार के सदस्यों के मन में यह विचार आया कि साहित्यिक या सांस्कृतिक क्षेत्र में कोई ऐसा महत्वपूर्ण कार्य किया जाए जो राष्ट्रीय गौरव तथा अंतर्राष्ट्रीय प्रतिमान के अनुरूप हो। इसी विचार के अंतर्गत १६ सितंबर १९६१ को भारतीय ज्ञानपीठ की संस्थापक अध्यक्ष श्रीमती रमा जैन ने न्यास की एक गोष्ठी में इस पुरस्कार का प्रस्ताव रखा। २ अप्रैल १९६२ को दिल्ली में भारतीय ज्ञानपीठ और टाइम्स ऑफ़ इंडिया के संयुक्त तत्त्वावधान में देश की सभी भाषाओं के ३०० मूर्धन्य विद्वानों ने एक गोष्ठी में इस विषय पर विचार किया। इस गोष्ठी के दो सत्रों की अध्यक्षता डॉ वी राघवन और श्री भगवती चरण वर्मा ने की और इसका संचालन डॉ॰धर्मवीर भारती ने किया। इस गोष्ठी में काका कालेलकर, हरेकृष्ण मेहताब, निसीम इजेकिल, डॉ॰ सुनीति कुमार चैटर्जी, डॉ॰ मुल्कराज आनंद, सुरेंद्र मोहंती, देवेश दास, सियारामशरण गुप्त, रामधारी सिंह दिनकर, उदयशंकर भट्ट, जगदीशचंद्र माथुर, डॉ॰ नगेन्द्र, डॉ॰ बी.आर.बेंद्रे, जैनेंद्र कुमार, मन्मथनाथ गुप्त, लक्ष्मीचंद्र जैन आदि प्रख्यात विद्वानों ने भाग लिया। इस पुरस्कार के स्वरूप का निर्धारण करने के लिए गोष्ठियाँ होती रहीं और १९६५ में पहले ज्ञानपीठ पुरस्कार का निर्णय लिया गया।
    चयन प्रक्रिया ज्ञानपीठ पुरस्कार विजेताओं की सूची पृष्ठ के दाहिनी ओर देखी जा सकती है। इस पुरस्कार के चयन की प्रक्रिया जटिल है और कई महीनों तक चलती है। प्रक्रिया का आरंभ विभिन्न भाषाओं के साहित्यकारों, अध्यापकों, समालोचकों, प्रबुद्ध पाठकों, विश्वविद्यालयों, साहित्यिक तथा भाषायी संस्थाओं से प्रस्ताव भेजने के साथ होता है। जिस भाषा के…"} {"instruction": "Write a PHP code for sending an email to the current logged in user.", "input": "user email: 'xyz@example.com'", "output": "$to = 'xyz@example.com'; $subject = 'Subject of email'; $message = 'Message body of email'; $headers = 'From: sender@example.com' . \"\\r\\n\" . 'Reply-To: sender@example.com' . \"\\r\\n\" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers);"} {"instruction": "Sort the list using Quick Sort", "input": "[2, 3, 5, 6, 1, 4]", "output": "def quick_sort(arr): if len(arr) <= 1: return arr pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] right = [x for x in arr if x > pivot] return quick_sort(left) + [pivot] + quick_sort(right)"} {"instruction": "Create a Python function to encode a given sentence into base64.", "input": "", "output": "import base64\n\ndef encodeInBase64(msg):\n msg_bytes = msg.encode('ascii')\n base64_bytes = base64.b64encode(msg_bytes)\n base64_message = base64_bytes.decode('ascii')\n\n return base64_message"} {"text": "[EN Wikipedia] Pakoka River\n\nThe Pakoka River is a river of the Waikato Region of New Zealand's North Island. It flows southwest from its source southeast of Raglan to reach the northeastern end of the Aotea Harbour. The catchment is made up of just over of waterways. Geology The most notable features of the Pakoka valley were formed by Upper Pliocene–Lower Pleistocene Okete Volcanics about 2 million years ago. These rocks form the top of the Wharauroa Plateau, where the Pakoka rises. They also flowed down from a vent about a kilometre northwest of Bridal Veil Falls to block the valley and form the falls. From its source the river soon drops about , cutting into Coleman Conglomerate a Puaroan (in the Tithonian epoch, about 150 million years ago) poorly sorted conglomerate of sandstone and siltstone, containing andesitic pebbles up to in diameter. A rock arch and several notable bluffs are formed of late Whaingaroan Ahirau Sandstone formed about 28 million years ago. Although classified as sandstone, it looks more like limestone, with 40-60% calcium carbonate content and lapiez features in massive (lacking internal structures), blue-grey, calcareous, fine sandstone. Apart from recent alluvial deposits, the other main rock in the valley is Hauturu Sandstone, which is mid to late Whaingaroan, about 30 million years old. It is commonly knobbly due to resistant bands and lenses of hard calcareous sandstone in soft friable quartzofeldspathic sand. Biota About two-thirds of the catchment is pasture, with the rest under trees and scrub. Less than 10% of the catchment was fenced from livestock in 2014. New Zealand fernbird and Spotless crake have been recorded in the catchment. A Regional Council study describes the vegetation around the estuary - \"Te Heru Point and up towards Pakoka Landing, a forest of akeake, kanuka and kowhai lines the estuary arm. Spartina is present on the [right bank] upstream of Ohiawhakainga Creek. Patches of sea meadow are found at the mouth of the Motakotako Creek in front of the rushes. The saline influence on the vegetation finishes just upstream of the road bridge at Pakoka Landing. Moving downstream on the true-left bank are bands of saltmarsh ribbonwood with marsh clubrush and raupo wetland behind. Small patches of seagrass are found on the mud flats around the corner where the river widens out. The farmland is not fenced along the [left bank] and stock access is potentially a problem. A mature (~10 years?) flowering mangrove is upstream of Karetoto Island. A small patch of saltwater paspalum is found immediately opposite the island. A patch of seagrass lies behind the oyster bank at Mowhiti Point. The harbour edge is lined by a thin band of rush.\" Mitigation funding from Te Uku Wind Farm and support from farmers and Regional Council have resulted in…"} {"instruction": "Develop an algorithm to find the greatest common factor (GCF) of two numbers in Python.", "input": "", "output": "def gcf(a,b): if a == 0 : return b return gcf(b % a, a)"} {"instruction": "Compose a query in SQL to delete all records from a table named \"students\".", "input": "", "output": "DELETE FROM students;"} {"instruction": "Using the data provided, create a SQL command to get the total number of orders from customers in the USA.", "input": "Table name: \"Orders\" Columns: \"Cust_ID\", \"Cust_Country\", \"Order_ID\"", "output": "SELECT COUNT(Order_ID) AS Total_Orders FROM Orders WHERE Cust_Country=\"USA\""} {"instruction": "Merge the elements of two given arrays into one.", "input": "[1, 2, 3] and [4, 5, 6]", "output": "[1, 2, 3, 4, 5, 6]"} {"instruction": "Develop a JavaScript object for storing the name and occupation of an employee.", "input": "name = 'John Doe', occupation = 'Programmer'", "output": "const employee = { name: 'John Doe', occupation: 'Programmer' }"} {"instruction": "Create a script in Python that takes a list of strings and prints the string with the longest length.", "input": "['hello', 'world', 'abracadabra']", "output": "def longest_string(str_list):\n longest = str_list[0]\n for s in str_list:\n if len(s) > len(longest):\n longest = s\n print(longest)\n \nlongest_string(['hello', 'world', 'abracadabra'])"} {"instruction": "Write a small program in Python to print the total sum of first n even numbers.", "input": "", "output": "n = int(input(\"Enter a number: \"))\n\ntotal = 0\nfor i in range(2, (2*n)+1, 2):\n total += i\n \nprint(\"The sum of first\", n, \"even numbers is\", total)"} {"instruction": "Implement an algorithm in Python to find the longest palindromic substring from a given string.", "input": "", "output": "def longest_palindromic_substring(s):\n longest = ''\n for i in range(len(s)):\n for j in range(i, len(s)):\n substr = s[i:j+1]\n if is_palindrome(substr) and len(substr) > len(longest):\n longest = substr\n return longest\n\ndef is_palindrome(s):\n return s == s[::-1]\n\n# Find the longest palindromic substring in \"cabbad\"\nlongest = longest_palindromic_substring(\"cabbad\")\nprint(longest)"} {"text": "[HI Wikipedia] हावड़ा\n\nहावड़ा (अंग्रेज़ी: Howrah, बांग्ला: হাওড়া) , भारत के पश्चिम बंगाल राज्य का एक औद्योगिक शहर, पश्चिम बंगाल का दूसरा सबसे बड़ा शहर एवं हावड़ा जिला एवं हावड़ सदर का मुख्यालय है। हुगली नदी के दाहिने तट पर स्थित, यह शहर कलकत्ता, के जुड़वा के रूप में जाना जाता है, जो किसी ज़माने में भारत की अंग्रेज़ी सरकार की राजधानी और भारत एवं विश्व के सबसे प्रभावशाली एवं धनी नगरों में से एक हुआ करता था। रवीन्द्र सेतु, विवेकानन्द सेतु, निवेदिता सेतु एवं विद्यासागर सेतु इसे हुगली नदी के पूर्वी किनारे पर स्थित पश्चिम बंगाल की राजधानी, कोलकाता से जोड़ते हैं। आज भी हावड़, कोलकाता के जुड़वा के रूप में जाना जाता है, समानताएँ होने के बावजूद हावड़ा नगर की भिन्न पहचान है इसकी अधिकांशतः हिन्दी भाषी आबादी, जो कि कोलकाता से इसे थोड़ी अलग पहचान देती है। समुद्रतल से मात्र 12 मीटर ऊँचा यह शहर रेलमार्ग एवं सड़क मार्गों द्वारा सम्पूर्ण भारत से अच्छी तरह जुड़ा हुआ है। यहाँ का सबसे प्रमुख रेलवे स्टेशन हावड़ा जंक्शन रेलवे स्टेशन है। हावड़ा स्टेशन पूर्व रेलवे तथा दक्षिणपूर्व रेलवे का मुख्यालय है। हावड़ स्टेशन के अलावा हावड़ा नगर क्षेत्र मैं और 6 रेलवे स्टेशन हैं तथा एक और टर्मिनल शालीमार रेलवे टर्मिनल भी स्थित है। राष्ट्रीय राजमार्ग 2 एवं राष्ट्रीय राजमार्ग 6 इसे दिल्ली व मुम्बई से जोड़ते हैं। हावड़ा नगर के अन्तर्गत सिबपुर, घुसुरी, लिलुआ, सलखिया तथा रामकृष्णपुर उपनगर सम्मिलित हैं। नाम करण हावड़ा का नाम, बंगाली शब्द \"हाओर\" (बंगला: হাওর) से आया है जो की बंगाली में पानी, कीचड़ और जमे हुए जैविक मलबे के पोखड़ लिए इस्तेमाल होता है। वैज्ञानिक रूप से हाओर एक अवसाद है, जो एक नदी दलदल या झील होता है। इस शब्द का उपयोग बंगाल के पूर्वी हिस्से में ज्यादा हुआ करता था(जो अब बांग्लादेश है)।. इतिहास मौजूदा हावड़ा नगर का ज्ञात इतिहास करीब 500 वर्ष पुराना है। परन्तु हवड़ा जनपद क्षेत्र का इतिहास प्राचीन बंगाली राज्य भुरशुट (बंगाली: ভুরশুট) से जुड़ा है, जो प्राचीन काल से 15वीं शताब्दी तक, हावड़ा जिला और हुगली ज़िला के क्षेत्र पर शासन करती थी। सन 1569-75 में भारत भ्रमण कर रहे वेनिस के एक भ्रमणकर्ता सेज़र फ़ेडरीची (अंग्रेज़ी: Caesar Federichi) ने अपने भारत दौरे की अपनी दैनिकी में 1578 ई में बुट्टोर (Buttor) नामक एक जगह का वर्णन किया था। उनके विवरण के अनुसार वह एक ऐसा स्थान था जहाँ बहुत बड़े जहाज भी यात्रा कर सकता थे और वह सम्भवतः एक वाणिज्यिक बन्दरगाह भी था। उनका यह विवरण मौजूदा हावड़ा के बाटोर इलाके का है। बाटोर का उल्लेख 1495 में बिप्रदास पीपिलई द्वारा लिखि बंगाली कविता मानसमंगल मैं भी है। सन 1713 मैं मुग़ल बादशाह औरंगज़ेब के पोते बादशाह फर्रुख़शियार के राजतिलक के मौक़े पर ब्रिटिश ईस्ट इण्डिया कम्पनी ने मुग़ल दरबार में एक प्रतिनिधिमण्डल भेजा था, जिसका उद्धेश्य हुगली नदी के पूर्व के 34 और पश्चिम के पाँच गाँव: सलकिया (Salica), हरिराह (Harirah अथवा हावड़ा), कसुंडी (Cassundea) बातोर (battar) और रामकृष्णपुर (Ramkrishnopoor) को मुगलों से खरीदना था। शहंशाह ने केवल पूर्व के 34 गाँवों पर सन्धि की। कम्पनी के पुराने दस्तावेजों में इन गाँवों का उल्लेख है। आज ये सारे गाँव हावड़ा शहर के क्षेत्र और उपनगर हैं। सन 1728 हावड़ा के…"} {"instruction": "Edit the code such that it prints the same output.", "input": "str1 = \"python \" str2 = \"programming\" print(str1 + str2)", "output": "str1 = \"python\" str2 = \" programming\" print(str1 + str2)"} {"text": "[CS Wikipedia] Vladimír Blucha\n\nVladimír Blucha (* 6. července 1931 Mokré Lazce u Opavy – 20. listopadu 2020) byl český regionální historik, geograf, kronikář, vlastivědný pracovník a pedagog, který napsal řadu článků a několik knih o historii Krnova. Život Německé úřady ve vládním obvodě Opava v Sudetech ho v roce 1938 přejmenovaly z Vladimíra na Waldemara. Na konci války, když přišla do Mokrých Lazců fronta, úplně vyhořel pronajatý domek, ve kterém Bluchovi bydleli. Tak se v červnu 1945 usadili v pohraničí v Krnově. Vladimír Blucha maturoval v roce 1950 na krnovském gymnáziu. Druhou maturitu vykonal v roce 1957 a tím získal kvalifikaci jako učitel pro 1.–5. postupný ročník. Po základní vojenské službě pracoval na ONV v Krnově, kde byl až do roku 1960 inspektorem pro kulturu. Poté dálkově vystudoval Pedagogický institut v Ostravě, obory matematika a zeměpis. V letech 1960–1970 učil na 1. ZDŠ na Dvořákově okruhu 2 a od roku 1970 do roku 1990 učil na 3. ZDŠ na Opavské ulici. Od srpna 1990 byl vedoucím Okresního pedagogického střediska v Nových Heřminovech. V letech 1965–1969 a v letech 1990–2000 byl kronikářem města Krnova. Jeho články vycházely v různých novinách a časopisech. Byl čestným členem Matice slezské a také předsedou jejího krnovského odboru. Byl členem Čs. společnosti geografické, Čs. společnosti archeologické a České numismatické společnosti. Byl ženatý a měl dceru RNDr. Lenku Bucherovou-Fišerovou (* 1964, roz. Bluchovou), Ph.D., která je vysokoškolskou učitelkou a překladatelkou chemické angličtiny. Nejznámější je jeho kniha Velký požár (2002). Žánr tohoto díla by se dal charakterizovat jako „historický obraz“, jednotlivé kapitoly, popisující příběh jednotlivých Krnovanů v jednom zajímavém historickém období, se skládají v celkový obraz tohoto období. Kniha tak připomíná např. obrazy Hieronyma Bosche, na kterých sledujeme jednotlivé drobné scény, které dohromady tvoří zvláštní atmosféru celého výjevu. Dílo Kronika města Krnova za roky 1965-1969 a 1990-2000 Historie města Krnova (1969; in: Vladimír Blucha, Ladislav Zapletal (1969): Krnov: historie a geografie města) Stručné dějiny města Krnova (199?) Obrázky z dějin Krnova (1993) Klíč k domovu: Čtení o Krnovsku pro mládež i dospělé (1995) Vysoké nebe: historická freska o životě na Krnovsku v 16. století (1998) Historia regionu głubczycko-krnowskiego (200?; spolu s Katarzynou Maler) Velký požár: (Krnov 1779) : historický obraz ze života v Krnově v 18. století (2002) Město Krnov: průvodce po památkách (2003) Prožil jsem krásný život: sborník vzpomínek o tom, jak jsme chtěli bránit republiku a o životě v osvobozeném Krnovsku (2005; spolu s Naděždou Paprskarzovou) Město mezi dvěma řekami: čtení o pozoruhodné historii města zvaného Kyrnow, Jegerdorf, Carnovia, Jägerndorf, Karniów, Krnov (2007) Řeka mého rodu a rod mé řeky:…"} {"instruction": "Create a function in Python that will take a list as an argument and return the average of the first 3 elements in the list.", "input": "[1, 2, 3, 4, 5]", "output": "def getAverageOfFirstThree(data):\n sum = 0\n for i in range(3):\n sum += data[i]\n \n return sum / 3"} {"instruction": "Write a SQL query to find the average age of people living in the UK.", "input": "", "output": "SELECT AVG(TIMESTAMPDIFF(YEAR, date_of_birth, CURRENT_DATE)) as average_age FROM people WHERE country = 'UK';"} {"instruction": "Design a neural network model to detect the sentiment of a given sentence.", "input": "", "output": "The designed neural network model can be implemented with an embedding layer followed by a convolutional layer and then a global max-pooling layer. The output of the pooling layer can be passed through a fully connected layer with a sigmoid activation function to achieve the final output of the model. We can feed the model with a dataset of sentences labeled as either 'positive' or 'negative'. The model can then be trained using gradient descent. After training is complete, the model can be used to detect the sentiment of new sentences as either 'positive' or 'negative'."} {"instruction": "Create a Java program to delete an element for a given position in an array.", "input": "[1, 3, 5, 6, 8], position=2", "output": "public static int[] deleteElement(int[] arr, int pos) { int n = arr.length; int i; // Removing the element at a given position for (i = pos; i < n - 1; i++) arr[i] = arr[i+1]; // Returning the resulting array return arr; } public static void main(String[] args) { int[] arr = {1, 3, 5, 6, 8}; int pos = 2; int[] new_arr = deleteElement(arr, pos); System.out.println(\"Array after deletion:\"); for(int i=0; i Three Column Page

    Three Column Page

    Content for Column 1
    Content for Column 2
    Content for Column 3
    "} {"instruction": "Design a class to convert a given string to Morse code and store it as a list.", "input": "", "output": "class MorseCodeConverter: def __init__(self, string): self.string = string self.alphabet = { 'a': '.-', 'b': '-...', 'c': '-.-.', 'd': '-..', 'e': '.', 'f': '..-.', 'g': '--.', 'h': '....', 'i': '..', 'j': '.---', 'k': '-.-', 'l': '.-..', 'm': '--', 'n': '-.', 'o': '---', 'p': '.--.', 'q': '--.-', 'r': '.-.', 's': '...', 't': '-', 'u': '..-', 'v': '...-', 'w': '.--', 'x': '-..-', 'y': '-.--', 'z': '--..', '1': '.----', '2': '..---', '3': '...--', '4': '....-', '5': '.....', '6': '-....', '7': '--...', '8': '---..', '9': '----.', '0': '-----' } def convert(self): morse_code = [] for char in self.string: if char in self.alphabet: morse_code.append(self.alphabet[char]) return morse_code"} {"instruction": "Create a RESTful API endpoint in Python that returns all the users in a database.", "input": "Not applicable", "output": "import flask\nfrom flask import Flask, request\nfrom flask_sqlalchemy import SQLAlchemy\n\napp = flask.Flask(name)\napp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'\ndb = SQLAlchemy(app)\n\nclass User(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Column(db.String(120))\n\n@app.route('/users', methods=['GET'])\ndef get_users():\n users = User.query.all()\n users_data = []\n for user in users:\n users_data.append({'id': user.id, 'name': user.name})\n return jsonify({'users': users_data})"} {"text": "[CS Wikipedia] Obyvatelstvo Švédska\n\nPočet obyvatel Švédska činil v k 31. srpnu 2015 odhadem 9 816 666 lidí. K 30. červnu 2009 to pro srovnání bylo 9 292 359 obyvatel.. K 31. prosinci 2013 dosahoval počet obyvatel čísla 9,64 milionu. Švédsko je jednou z nejřidčeji zalidněných zemí Evropy - hodnota dosahuje počtu 21,5 lidí na kilometr čtvereční. Největší hustota zalidnění v rámci Švédska je v oblasti Öresundu na jihu (provincie Skåne) a v okolí jezera Mälaren ve středním Švédsku (provincie Stockholm). Zhruba 85 % obyvatel žije v městských oblastech. Rok 2015 – naděje dožití, muži 83 let a ženy 85 let. Přirozený pohyb Švédsko patří k evropským zemím s nejvyšším ukazatelem úhrnné plodnosti (1,91 k 31. prosinci 2008), přesto však přirozený přírůstek i zde dosahuje velmi nízkých hodnot: 2‰ v roce 2008, -0,3‰ v roce 2000, 3,4‰ v roce 1990, 0,7‰ v roce 1980, 3,7‰ v roce 1970 a 3,7‰ v roce 1960. Jak ukazuje graf míra porodnosti zaznamenala značné oživení na konci druhé světové války (v roce 1945 135 373 živě narozených) a od té doby převážně klesala - ke krátkodobému zvýšení došlo periodicky v letech 1964–1967 a 1990–1992. Naopak historického minima dosáhla porodnost nejprve v roce 1981 (91 780 živě narozených) a poté v roce 1999 (88 173 živě narozených). Obyvatelé Švédska se dožívají průměrného věku 80,86 let, což je mezi státy světa řadí na 8. místo a v Evropě po Andoře, San Marinu a Francii na 4. místo. Národnostní složení Pokud jde o národnostní složení v etnickém slova smyslu, oficiální statistiky se o něm vůbec nezmiňují, mateřský jazyk spoluobčanů není pro Švédy podstatnou informací. Zaznamenává se však země původu u imigrantů a lidí, jejichž oba rodiče jsou imigranti. Díky vysoké míře imigrace podpořené tolerancí Švédů vůči cizincům a především štědrou sociální a integrační politikou je současná švédská populace značně multikulturní. Významnou původní národnostní menšinou jsou Sámové (dříve označovaní Laponci) obývající nejsevernější část Švédska. Imigrace Podle oficiálních statistik bylo v roce 2008 ve Švédsku evidováno 562,1 tis. cizinců (v roce 2003 492,0 tis.), z toho největšími skupinami byli přistěhovalci z Finska (175,1 tis.), Iráku (109,4 tis.), Srbska resp. bývalé Jugoslávie (83,0 tis.), Polska (63,8 tis.), Íránu (57,7 tis.), Bosny a Hercegoviny, Dánska (46,2 tis.), Norska (44,3 tis.) a Turecka (39,2 tis.). Podíl obyvatel narozených v zahraničí ovšem činí 13,8% a v součtu s osobami narozenými ve Švédsku s oběma rodiči narozenými v zahraničí činí podíl osob s imigrantským původem 17,9% (k 31. prosinci 2008). Protože většina skupin imigrantů si udržuje vyšší míru porodnosti než etničtí Švédové, podíl populace s imigrantskými kořeny v budoucnosti poroste. V polovině 70. let 20. století začala vznikat politika integrace cizinců, kteří do Švédska přicházeli za prací už od konce…"} {"instruction": "What kind of data structure is most suitable for storing a dictionary?", "input": "", "output": "In most cases, a hash table is the most suitable data structure for storing a dictionary. It is a data structure that maps key/value pairs, allowing for fast access to the data."} {"instruction": "Given two lists, create a function that finds the common elements between the two lists.", "input": "list1 = [1, 2, 3, 4, 5] list2 = [2, 3, 4, 6, 7]", "output": "def find_common(list1, list2): common_elems = [] for elem in list1: if elem in list2: common_elems.append(elem) return common_elems"} {"instruction": "Design an algorithm in Python for linear search.", "input": "[3, 1, 5, 8], 8", "output": "def linear_search(arr, target): \n for i in range(len(arr)):\n if arr[i] == target:\n return i\n return -1"} {"instruction": "Convert the following basic Python code into its equivalent JavaScript code.", "input": "for i in range(1, 5):\n print(i)", "output": "for(let i = 1; i < 5; i++){\n console.log(i);\n}"} {"instruction": "Write an SQL query to find customers who live in a given city and have purchased a given product.", "input": "", "output": "SELECT customers.name FROM customers INNER JOIN orders ON customers.ID = orders.customer_id INNER JOIN products ON orders.product_id = products.ID WHERE customers.city = 'City Name' AND products.name = 'Product Name';"} {"instruction": "Translate the following code written in Python to Java.", "input": "x = \"Hello World\"", "output": "String x = \"Hello World\";"} {"instruction": "Design a CSS class that will set the font family of an HTML element to ‘Arial’, font size to 12 pts and font weight to bold.", "input": "", "output": ".arial-12-pt { font-family: Arial; font-size: 12pt; font-weight: bold; }"} {"instruction": "Write a Python function to print prime numbers between two given numbers.", "input": "low = 5, high = 10", "output": "def print_prime_numbers_between_two_numbers(low, high): \n for numb in range(low,high + 1): \n if numb > 1: \n for i in range(2,numb): \n if (numb % i) == 0: \n break\n else: \n print(numb) \n\n#calling the function\nprint_prime_numbers_between_two_numbers(5, 10)"} {"instruction": "Create a Python program that takes a list as input and sorts it using bubble-sort algorithm.", "input": "[3,2,5,6,1,4]", "output": "def bubble_sort(lst): \n for i in range(len(lst)): \n for j in range(0, len(lst)-i-1): \n if lst[j] > lst[j+1] : \n lst[j], lst[j+1] = lst[j+1], lst[j]\n \nlist = [3,2,5,6,1,4]\nbubble_sort(list)\nprint('Sorted list is: ', list)"} {"instruction": "In Python, write code to identify whether a given string contains only numeric values.", "input": "", "output": "# To identify whether a given string contains only numeric values in Python: # 1. Use the isdigit method of the str object # 2. Pass the given string as an argument to the isdigit method # 3. The method will return True if the given string contains only numeric values, # and False otherwise # Example given_string = \"1234\" if given_string.isdigit(): print(\"The given string contains only numeric values\") else: print(\"The given string does not contain only numeric values\")"} {"instruction": "Create a basic Python script that computes the sum of two variables and stores the result in a third variable.", "input": "x = 5\ny = 8", "output": "# compute the sum of x and y\nresult = x + y\n\n# store the result in a third variable\nz = result\n\n#print the result\nprint(z) # Output: 13"} {"text": "[EN Wikipedia] Rea River\n\nThe Rea River is a river in Fiordland, New Zealand. It rises west of Teardrop Lake and flows into Misty River before it enters Kaikiekie / Bradshaw Sound. See also List of rivers of New Zealand References Rivers of Fiordland"} {"instruction": "Create a class to represent a door in a Python program.", "input": "", "output": "class Door:\n #Initializing a door with default values\n def __init__(self, is_open=False, color=\"brown\", material=\"wood\"):\n self.is_open = is_open\n self.color = color\n self.material = material\n\n #Function to open door \n def open_door(self):\n self.is_open = True\n\n #Function to close door \n def close_door(self):\n self.is_open = False"} {"instruction": "Offer a solution to the following programming problem", "input": "Given a list of strings, return the longest string", "output": "def longest_string(string_list): longest_string = \"\" for s in string_list: if len(s) > len(longest_string): longest_string = s return longest_string"} {"instruction": "Implement a solution in Python to convert the given number to its binary representation.", "input": "155", "output": "def convertToBinary(x): \n return bin(x).replace(\"0b\", \"\") \n\nx = 155\nprint(convertToBinary(x))"} {"instruction": "Purge all rows from the following dataframe that have a negative value in the Age column.", "input": "import pandas as pd data = {'Name': ['Jerry', 'Peter', 'Paul', 'John'], 'Age': [20, 22, -18, 24]} df = pd.DataFrame(data)", "output": "import pandas as pd data = {'Name': ['Jerry', 'Peter', 'Paul', 'John'], 'Age': [20, 22, -18, 24]} df = pd.DataFrame(data) df = df[df['Age'] >= 0]"} {"text": "[DE Wikipedia] AIDAbella\n\nDie AIDAbella ist ein Kreuzfahrtschiff von Carnival Corporation & plc. Sie wird für Fahrten unter der speziell auf den deutschen Markt ausgerichteten Konzernmarke AIDA Cruises eingesetzt. Betrieben wird sie unter italienischer Flagge durch Costa Crociere in Genua. Die AIDAbella war zum Zeitpunkt ihrer Indienststellung ist das fünfte Schiff der AIDA-Flotte und ist bis auf geringfügige Unterschiede baugleich mit ihren sieben Schwesterschiffen der Sphinx-Klasse, vor allem mit den ein Jahr zuvor bzw. nach ihr in Dienst genommenen Neubauten AIDAdiva und AIDAluna. Geschichte Die AIDAbella wurde wie ihre Schwesterschiffe von der Meyer Werft in Papenburg gebaut. Sie war der zweite für Costa Crociere fertiggestellte Neubau und eine Erweiterung des im Oktober 2004 mit der Werft abgeschlossenen Vertrages. Ihre Projektbezeichnung lautete daher AIDA SPHINX III. Als SPHINX II wurde die nach dem ursprünglichen Auftrag erst im Jahr 2009 in Betrieb gesetzte AIDAluna gezählt. Die Kiellegung fand am 10. März 2007 statt. Am 27./28. März 2008 erfolgte die Überführung des Schiffes über die Ems von Papenburg nach Emden. Hierfür war die Ems mittels des Emssperrwerks für rund 12 Stunden aufgestaut worden. Am 27. März gegen 18:30 legte das Schiff in Papenburg ab und passierte am 28. März gegen 3:00 das Emssperrwerk. Am 14. April 2008 lieferte die Werft das 69.200 BRZ große Clubschiff in Emden an die Reederei AIDA Cruises (Rostock) ab. Das deutsche Fotomodell Eva Padberg war am 23. April 2008 die Patin bei der Taufzeremonie auf der Warnow in Warnemünde. Am 24. April startete die Jungfernfahrt von Warnemünde und führte in sieben Tagen über Bergen, Oslo, Göteborg und Kopenhagen zurück nach Warnemünde. Für eine Aktion im Herbst 2010 wurde die AIDAbella ins Guinness-Buch der Rekorde aufgenommen: Vermerkt wurde sie als Kreuzfahrtschiff, das am längsten einen Wasserski-Fahrer hinter sich herziehen konnte. Der Fernsehreporter Jan Schwiderek hielt sich in der Bucht von Alicante bei einer Geschwindigkeit von 14 Knoten sechs Minuten und 25 Sekunden auf den Skiern. Im Dezember 2022 kollidierte das Schiff mit einer Kaimauer in Hamburg und wurde dabei beschädigt. Technische Daten und Ausstattung Das Schiff wird dieselelektrisch angetrieben. Die vier Hauptmotoren von Caterpillar MaK (Typ: 9M43C) leisten je 9.000 kW. Die beiden Fahrmotoren von Siemens (Typ: 1DM5650-8DS06-Z) verfügen über eine Gesamtleistung von 25.000 kW. Die Fahrmotoren wirken auf zwei Festpropeller. Beim Ruder handelt es sich um ein „full balanced twisted rudder“. Das Schiff verfügt über mehrere Querstrahlsteueranlagen, zwei mit einer Leistung von jeweils 2.300 kW im Bug und zwei mit einer Leistung von jeweils 1.500 kW im Heck. An Bord befinden sich 1.025 Passagierkabinen. Für die Passagiere stehen u. a. sieben…"} {"instruction": "Write a Ruby method to check if a given list contains an integer.", "input": "list = [1, 2.5, \"Hello\"]", "output": "def list_contains_integer?(list) list.each do |item| return true if item.is_a? Integer end false end list_contains_integer?(list)"} {"instruction": "Given a list of colors [\"red\", \"green\", \"blue\"], create a Python program to find the longest color name.", "input": "[\"red\", \"green\", \"blue\"]", "output": "def longest_color_name(colors): \n longest_name = 0 \n longest_color = None\n for color in colors: \n if len(color) > longest_name: \n longest_name = len(color) \n longest_color = color\n return longest_color"} {"instruction": "Find the output of the following array after sorting it in ascending order.", "input": "array = [6, 2, 9, 4, 1]", "output": "[1, 2, 4, 6, 9]"} {"instruction": "Use the following code to print each letter of the string \"Hello World\" on a separate line.", "input": "string = \"Hello World\"", "output": "string = \"Hello World\" for letter in string: print(letter)"} {"text": "[HI Wikipedia] कार्टून नेटवर्क\n\nकार्टून नेटवर्क (Cartoon Network) वार्नर ब्रदर्स डिस्कवरी के स्वामित्व वाला एक अमेरिकी केबल टेलीविजन चैनल है। इसकी स्थापना 1 अक्टूबर 1992 को बेट्टी कोहेन द्वारा की गई थी। यह सभी देखें कार्टून नेटवर्क (भारत) सन्दर्भ जन संचार माध्यम टीवी चैनल अमेरिकी कम्पनियाँ"} {"instruction": "Generate a random number between 0 and 1 in Python.", "input": "", "output": "import random\n\nrandomNumber = random.random()\nprint(randomNumber)"} {"text": "[DE Wikipedia] Els Beerten\n\nEls Beerten (* 27. März 1959 in Hasselt) ist eine flämische Kinder- und Jugendbuchautorin. Leben und Werk Els Beerten wuchs in Koersel auf. Sie studierte 1977–1981 Niederlandistik und Anglistik an der KUL in Löwen. Danach besuchte sie eine Schauspielschule in Maastricht. Seit 1985 unterrichtet sie Niederländisch, Englisch und Kreatives Schreiben in Aarschot. Els Beerten ist verheiratet und hat drei Kinder. Kritiken Als gäbe es einen Himmel Jury des Deutschen Jugendliteraturpreises: „Die Autorin hat die komplexen Ereignisse, Fragen, Schicksale und Gefühle dieser Zeit in eine multiperspektivische Erzählung gefasst, um mit jeder Figur und deren Erzähltext eine Facette des Lebens im Krieg zu zeichnen. Dazu verleiht sie jedem der vier Protagonisten eine eigene Stimme. Diese Krisenzeit wirft Fragen auf, wie die nach dem richtigen Verhalten in einem totalitären System oder danach, wie man mit Schuld zurechtkommen kann. Els Beerten liefert eine anspruchsvolle Beschreibung der Orientierungslosigkeit von Jugendlichen in einer schwierigen Zeit und vermittelt dem Leser auf eindrucksvolle Weise deren Wünsche, Träume, Sehnsüchte, Ängste und Befürchtungen. Mirjam Pressler hat diesen Roman auf überzeugende Weise übersetzt.“ Süddeutsche Zeitung: \"Doch je tiefer man sich in dieses Stimmengewirr hineinliest, um so fesselnder wird die Geschichte, desto mehr begreift man die Botschaft der belgischen Autorin: „Der Krieg, das sind wir.“\" Lauf um dein Leben FAZ: „Lauf um dein Leben, 2004 als bester niederländischer Jugendroman mit dem Gouden Zoen ausgezeichnet, blendet Biographieszenen einer versehrten Persönlichkeit ineinander, die aus stillen Reserven eine eigenwillige Widerstandskraft schöpft. Der Dramatik des Geschehens begegnet die Autorin mit einem trotzig lebendigen Erzählen, das Traurigkeit und Angst mit den Momenten der Begeisterung und Erleichterung stimmig vereint. Schonungslos ehrlich und distanzlos kann Noor, die im direkten Gespräch geradezu verstummt ist, als Ich-Erzählerin berichten. Diese Stimme ist authentisch und anziehend, man folgt ihr in die Abgründe ihrer Angst. Noors eigentliche Leistung besteht, viel mehr als in der körperlichen Anstrengung des Marathons, in diesem Erzählen von unterwegs, aus dem Schonraum des Laufens heraus, der es ihr erlaubt, so nah bei sich zu sein, daß sie sich mitteilen kann. Dem aus den Fugen geratenen Lebenslauf setzt sie den Lauf ihres Lebens entgegen – und dieses berührende Protokoll.“ Bibliografie Vreemde Eend, 1985 John Flandersprijs (1985) Scenes, 1987 Zweiter Preis Kinder- en Jeugdjury Vlaanderen (1989) Twee kastelen, 1987 Een buik om in te kruipen, 1988 (dt. Ein Goldfisch wär mir lieber) Een schat onder de vlag, 1989 Teranga-Welkom, 1989 Mijn hoofd zit te vol, 1989 Mijn tweede solo, 1990 (dt. Mein zweites Solo)…"} {"instruction": "Design a Python script to automatically fetch and store new tweets from a given Twitter handle.", "input": "", "output": "import tweepy\n\n# Authentication\nauth = tweepy.OAuthHandler(consumer_key, consumer_secret)\nauth.set_access_token(access_token, access_token_secret)\n\n# Initializing the API\napi = tweepy.API(auth)\n \n#Fetching tweets from the given Twitter handle\ntweets = api.user_timeline(screen_name='', count=200, include_rts=False, tweet_mode=\"extended\")\n \n# Storing the tweets in a list\ntweet_list = []\nfor tweet in tweets:\n tweet_list.append(tweet.full_text)\n\n# Saving the tweet list as a file\nwith open('data.txt', 'w') as f:\n for item in tweet_list:\n f.write(\"%s\\n\" % item)"} {"instruction": "Create a Machine Learning model in Python that takes data points from a spreadsheet and classifies them as either a positive or a negative result.", "input": "The spreadsheet contains the following columns: City, Temperature, Hours of Sunlight, Amount of Rain.\n\nThe data points are for the cities of New York, Tokyo, and London.", "output": "# Import necessary libraries\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.svm import SVC\n\n# Read data\ndata = pd.read_csv(\"data.csv\")\n\n# Split data into features and labels\nX = data.loc[:, data.columns != 'Result']\ny = data['Result']\n\n# Split data into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=1)\n\n# Standardize data\nsc = StandardScaler()\nX_train = sc.fit_transform(X_train)\nX_test = sc.transform(X_test)\n\n# Create model\nsvc = SVC(kernel='linear', C=1)\n\n# Train model\nsvc.fit(X_train, y_train)\n\n# Make prediction\ny_pred = svc.predict(X_test)"} {"instruction": "Write a function to move all zeros in an array to the end.", "input": "[1, 2, 0, 3, 4, 0, 5]", "output": "def moveZeroes(nums): zeros = 0 for i in range(len(nums)): if nums[i] == 0: zeros += 1 else: nums[i-zeros] = nums[i] nums[len(nums)-zeros:] = [0] * zeros"} {"text": "[DE Wikipedia] Francisco Carreño (Komponist)\n\nFrancisco Carreño (* 9. März 1910 in Porlamar; † 25. Juli 1965 in Caracas) war ein venezolanischer Musiker, Komponist, Musikpädagoge und Folklorist. Leben Francisco Carreño war der älteste von fünf Geschwistern. Zwei Brüder seiner Mutter, die beide Musiker waren, gaben ihm den ersten Unterricht und lehrten ihn das Cuatro­spiel. Mit seinem jüngeren Bruder Inocente, der später als Komponist bekannt wurde, sammelte er erste praktische Erfahrungen in Lino Gutiérrez' Banda Municipal Luisa Cáceres de Arismendi. 1932 ging er mit seinem damals zwölfjährigen Bruder nach Caracas, wo sich beide an der Escuela Superior de Música einschrieben. Gemeinsam bildeten sie ein Gitarrenduo, das im Theater und bei Radiosendern auftrat. Für ihren Lebensunterhalt arbeiteten sie zudem auch als Schuhmacher. Ab Ende der 1930er Jahre betrieb Carreño musikalische Feldforschung in Venezuela. Später wurde er als Beauftragter für Forschung des Bildungsministeriums Mitglied des Instituto de Folklore, das 1946 unter der Leitung von Juan Liscano gegründet worden war. Dort war er 1948 künstlerischer Leiter der Fiesta de la tradición im Nuevo Circo von Caracas, bei der Vertreter traditioneller Musik aus allen Teilen Venezuelas zusammenkamen. Als Nachfolger Liscanos als Leiter des Instituto de Folklore setzte er seine Forschungsarbeit fort und sorgte für die Aufnahme traditioneller Tänze in das Schulprogramm. Unter der Präsidentschaft von Marcos Pérez Jiménez bekam Carreño wegen seiner linken politischen Einstellung zunehmende Schwierigkeiten. 1953 wurde er als als Leiter des Folkoreinstutes abgelöst und gründete daraufhin die Escuela del Folklore Venezolano (ab 1959 Escuela de Folklore “Francisco Carreño”), an der traditionelle Instrumente wie Bandolín, Maracas, Arpa Criolla und insbesondere Cuatro unterrichtet wurde. Mit Studenten der Schule und Schülern anderer Schulen, an denen er unterrichtete, bildete er Ensembles mit bis zu 400 Mitgliedern, die Konzerte u. a. im Stadttheater von Caracas, in der Nationalbibliothek und Sälen der Universidad Central de Venezuela gaben. Im Fernsehen hatte er 1956 die Sendung La lección de cuatro de los jueves. In der Regierungszeit Rómulo Betancourts wurde Carreño aus seiner Schule ausgeschlossen und kam in politische Haft. Hier schrieb er eine Reihe revolutionärer Lieder, darunter Canto de los Pregoneros und Canto a la juventud revolucionaria. An multipler Sklerose erkrankt wurde er erst kurz vor seinem Tod begnadigt, um sich im Universitätskrankenhaus von Caracas behandeln zu lassen. Carreño komponierte etwa 400 Werke, darunter Merengues, Walzer und Pasajes. Quellen Cancioneros: Francisco Carreño Aporrea, 4. 11. 2018: Del país profundo: La pasión venezolanista de Francisco Carreño Universalia: Francisco Carreño, difusor del cuatro Komponist…"} {"instruction": "Write a Python program to find the longest increasing subsequence of a given array of integers", "input": "arr = [10, 22, 9, 33, 21, 50, 41, 60, 80]", "output": "def longest_increasing_subsequence(arr):\n n = len(arr)\n \n # An array to store increasing subsequences\n dp = [1]*n\n \n # Compute optimal values in bottom up manner\n for i in range (1 , n):\n for j in range(0 , i):\n if arr[i] > arr[j] and dp[i]< dp[j] + 1 :\n dp[i] = dp[j]+1\n \n # Pick maximum of dp[i]\n # Initialize result\n maximum = 0\n \n # Pick maximum of all dp[i]\n for i in range(n):\n maximum = max(maximum , dp[i])\n \n return maximum"} {"instruction": "Edit this C++ code to remove all comments.", "input": "// This is a comment // This is another comment int main() { /* This is a multiline comment */ std::cout << \"Hello World\"; return 0; }", "output": "int main() { std::cout << \"Hello World\"; return 0; }"} {"instruction": "Generate a python program to substitute $username with an input's username.", "input": "The user named \"$username\" will receive a special price.", "output": "def substitute_username(input):\n output = input.replace(\"$username\", input.username)\n return output"} {"text": "[HI Wikipedia] राफ्टिंग\n\nकैंपिंग एवं ट्रेकिंग की तरह राफ्टिंग भी एक रोमांचकारी गतिविधि है। ऊँची-नीची लहरो से एक छोटी सी नाव में जूझना भी एक अलग तरह का अनुभव है। मनोरंजन के साथ-साथ यह हमें साहसी, एवं जूझारु भी बनाती है। इसके अलावा एक साथ काम करने के कारण आपस में सहयोग की भावना भी बढ़ती है। बड़ी-ड़ी लहरे जब वेग के साथ व्यक्ति की ओर आती हैं, तो कुछ क्षणों के लिए सब कुछ भूल जाता है। उसे केवल परस्पर सहयोग से इन लहरों को जीतनें की इच्छा होती है। यात्रा पूरी करने पर उस जीत की जो खुशी होती है, उसका वर्णन शब्दों में करना असम्भव ही है। राफ्टिंग और व्हाइटवाटर राफ्टिंग एक आउटडोर मनोरंजक गतिविधि हैं जिसमे एक हवा वाली बेड़े का उपयोग कर नदी या पानी के अन्य प्रकारों पर नेविगेट करते हैं। यह अक्सर किसी न किसी तरह साफ़ पानी की या फिर उथले पानी के विभिन्न डिग्री पर किया जाता है और आम तौर पर भाग लेने वालों के लिए एक नया और चुनौतीपूर्ण वातावरण का प्रतिनिधित्व करता है। जोखिम से निपटने और टीम वर्क की जरूरत इस अनुभव (राफ्टिंग) का एक महत्वपूर्ण हिस्सा है। एक अवकाश खेल के रूप में इस गतिविधि का विकास के १९७० के मध्य लोकप्रिय हो गया है। यह एक जोखिम भरा खेल के रूप में जाना जाता है एवं यह काफी खतरनाक भी हो सकता है। अंतरराष्ट्रीय राफ्टिंग संघ, जो आईआरएफ के नाम से दुनिया भर में जाना जाता है एवं जो खेल के सभी पहलुओं की देखरेख करता है। वाइट वाटर के प्रकार निमंलिखित ६ स्तर के बाधाओं का सामना वाइट वाटर राफ्टिंग में करना पड़ता है इसके अन्य नामों में इंटरनेशनल स्केल ऑफ़ रिवर दिफ्फिकल्टी भी है ये बहुत खतरनाक से मौत के मुह या फिर गंभीर चोट के बीच में आते है। क्लास १ : बहुत छोटे खुरदुरे क्षेत्र, इनमे कुशलता की जरुरत हो सकती हैं। (कौशल का स्तर: बहुत ही बुनियादी) क्लास २: थोडा उथला पानी, इनमे कुशलता की जरुरत हो सकती हैं। क्लास ३: व्हाइटवॉटर, छोटी तरंगे। क्लास ४: व्हाइटवॉटर, मध्यम तरंगे, कुछ चट्टानें, तीक्ष्ण कुशलता की जरुरत।. क्लास ५: व्हाइटवॉटर, बड़ी तरंगे, बड़ा क्षेत्र, सटीक कुशलता की जरुरत। क्लास ६: काफी खतरनाक एवं इसमें राफ्टर को पर्याप्त व्हाइटवॉटर, बड़ी तरंगे, बड़ी चट्टानों का सामना करना पड़ता है। व्हाइट वाटर राफ्टिंग डोंगियों या कायाक से काफी अलग है इसमें बहुत ही कुशलता एवं विशेषता की जरुरत होती है ताकि पानी में आनेवाली कठिनाइयों को दूर किया जा सके। इनमे कुछ विशिष्ट तकनीक इस्तेमाल किये जाते हैं, इन तकनीकों के उदाहरण में शामिल हैं। पंचिंग उच्च साइडिंग लो साइडिंग कैप्सिजिंग डंप ट्रक लेफ्ट ओवर राईट टैको एंड ओवर एंड डाउनस्ट्रीम फ्लिप बैक रोलर रि राइटिंग फ्लिप लाइन टी रेस्क्यू सुरक्षा व्हाइटवॉटर राफ्टिंग क खतरनाक खेल हो सकता है यदि इसमें मुलभुत सुरक्षा तकनीको की अनदेखी की गई हो। हालांकि पेशेवर एवं निजी राफ्टिंग में दुर्घटना काफी कम देखी गई हैं इसकी एक वजह बहुत सारी घटनाओं का रिपोर्टिंग नहीं होना है। इसलिए दुर्घटनाओं की दर काफी कम समजी जाती हैं। अत: यह जरुरी हैं कि राफ्टिंग करने के पहले आप अपने संचालक के साथ सुरक्षा व्यवस्था का जायजा ले ले। हालाकि इस खेल में विशेशागता बड़ी हैं एवं विशिस्ट उपकारों के प्रयोग के चलते दुर्घटना की सम्भावना घटी हैं। पर्यावरण के मुद्दे प्रत्येक बाहरी गतिविधियों की तरह राफ्टिंग को भी नदियों…"} {"instruction": "Write a Python program to calculate the probability of two dice rolling the same number.", "input": "", "output": "def two_dice_same(n_dice): \n total_prob = 0 \n for i in range(1, n_dice + 1): \n probability = (1/6)**i * (5/6)**(n_dice - i) \n total_prob += probability \n return total_prob\n\nresult = two_dice_same(2)\nprint(result)"} {"text": "[HI Wikipedia] विक्षनरी\n\nविक्षनरी एक वेब आधारित बहुभाषी शब्दकोश है, जिसमें कोई भी शब्द जोड़ सकता है या लिख सकता है। यह विकिमीडिया संस्थान द्वारा संचालित किया जाता है। यह भी विकिपीडिया की तरह मीडियाविकि सॉफ्टवेयर का उपयोग करता है, इस कारण आप भी इसमें कोई भी सम्पादन कर सकते हैं और अनुपलब्ध शब्दों को जोड़ कर इसे बड़ा कर सकते हैं। अभी यह हिन्दी भाषा के शब्दकोश के साथ साथ 171 अन्य भाषाओं में भी उपलब्ध है। इतिहास यह परियोजना हेतु प्रस्ताव डेनियल एलस्टोन और विचार, विकिपीडिया के सह-संस्थापक लेरी सेंगर का था। इसे 12 दिसम्बर 2002 को लिया गया था। पहली बार गैर अंग्रेजी विक्षनरी का निर्माण 28 मार्च 2004 को हुआ था। इस दिन फ्रांसीसी और पोलिश भाषा में इसका निर्माण हुआ था। इसके निर्माण के साथ यह धीरे धीरे अन्य भाषाओं में बनने लगा था। 1 मई 2004 तक इसे अस्थाई रूप में wiktionary.wikipedia.org नामक स्थान पर रखा गया था। उसके बाद इसे इसके नाम वाले पते पर डाला गया। नवम्बर 2016 तक इसके सभी भाषाओं के संस्करण में ढाई करोड़ शब्द जुड़ चुके थे। पचास लाख शब्दों के साथ अंग्रेजी विक्षनरी सबसे आगे रहा। इसके बाद मालागासी 39 लाख और फ्रांसीसी 30 लाख शब्दों के साथ क्रमशः दूसरे और तीसरे स्थान पर थे। कुल इकतालीस भाषाओं की परियोजनाओं ने एक लाख शब्दों की सीमा को पार कर लिया था। यह भी देखिए शब्दकोश विक्शनरी सन्दर्भ बाहरी कड़ियाँ विकिमीडिया परियोजनाएँ"} {"text": "[CS Wikipedia] Everything but the Girl\n\nEverything but the Girl (nebo také EBTG) je britské elektronické duo, které vytvořil v roce 1982 Ben Watt s Tracey Thornovou. Debutovali písní \"Night and Day\", kterou napsal Cole Porter a později ji předělali i autoři jako Frank Sinatra & Tommy Dorsey, a jiní. Píseň je z roku 1983. Jejich debutní album se jmenuje Eden (1984) a jsou v něm písně jako Each and Every One. Diskografie 1984 Eden 1985 Love Not Money 1986 Baby the Stars Shine Bright 1988 Idlewild 1990 The Language of Life 1991 Worldwide 1992 Acoustic 1993 Home Movies 1994 Amplified Heart 1996 Walking Wounded 1996 The Best of Everything but the Girl 1999 Temperamental 2003 Like the Deserts Miss the Rain 2006 Adapt or Die: Ten Years of Remixes 2023 Fuse'' Externí odkazy Taneční hudební skupiny Hudební skupiny nové vlny Bossa nova Sophisti-pop Dvojice v hudbě"} {"instruction": "Construct a Linked List class.", "input": "", "output": "\"\"\" Construct a Linked List class \"\"\" class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def add_node(self, data): temp = Node(data) temp.next = self.head self.head = temp def print_list(self): current = self.head while current: print(current.data) current = current.next if __name__ == '__main__': llist = LinkedList() llist.add_node(1) llist.add_node(3) llist.add_node(5) llist.add_node(7) llist.print_list() # prints 7 5 3 1"} {"instruction": "Delete the last element from the given list.", "input": "[4, 8, 15, 16, 23, 42]", "output": "my_list = [4, 8, 15, 16, 23, 42] del my_list[-1] print(my_list) # prints [4, 8, 15, 16, 23]"} {"text": "[DE Wikipedia] Liste der Wappen im Kreis Steinburg\n\nDiese Liste zeigt die Wappen des Kreises Steinburg (Schleswig-Holstein), seiner Städte, Gemeinden und Ämter. Kreiswappen Amtsfreie Städte und Gemeinden Ämter Amt Breitenburg Amt Horst-Herzhorn Amt Itzehoe-Land Amt Kellinghusen Amt Krempermarsch Amt Schenefeld Amt Wilstermarsch Ehemalige Ämter Ehemalige Gemeinden Blasonierungen Literatur Martin Reißmann: Die Wappen der Kreise, Ämter, Städte und Gemeinden in Schleswig-Holstein. (= Veröffentlichungen der Schleswig-Holsteinischen Landesarchivs. 49). bearb. von Martin Reißmann unter Mitw. von Uta Heß. Landesarchiv Schleswig-Holstein, Husum 1997, ISBN 3-88042-815-8. Hans Schlothfeldt: Schleswig-Holsteinische Kreis- und Ortswappen. Wachholtz, Neumünster 1964. (Hrsg.: Der Schleswig-Holsteinische Heimatbund e. V.) Klemens Stadler: Deutsche Wappen – Bundesrepublik Deutschland. Band 5: Die Gemeindewappen der Bundesländer Niedersachsen und Schleswig-Holstein. Angelsachsen, Bremen 1970. Weblinks Landesarchiv Schleswig-Holstein Kommunale Wappenrolle Schleswig-Holstein Steinburg Wappen Steinburg Wappen Steinburg"} {"instruction": "Generate a list of 10 random integers between 50 and 100.", "input": "", "output": "import random rand_num_list = [random.randint(50, 100) for i in range(10)] print(rand_num_list)"} {"instruction": "Define a function in JavaScript that returns true if a given number is even.", "input": "", "output": "function isEven(num) { return num % 2 === 0; }"} {"text": "[EN Wikipedia] Allan Dwan\n\nAllan Dwan (born Joseph Aloysius Dwan; April 3, 1885 – December 28, 1981) was a pioneering Canadian-born American motion picture director, producer, and screenwriter. Early life Born Joseph Aloysius Dwan in Toronto, Ontario, Canada, Dwan was the younger son of commercial traveler of woolen clothing Joseph Michael Dwan (1857–1917) and his wife Mary Jane Dwan (née Hunt). The family moved to the United States when he was seven years old on December 4, 1892, by ferry from Windsor to Detroit, according to his naturalization petition of August 1939. His elder brother, Leo Garnet Dwan (1883–1964), became a physician. Allan Dwan studied engineering at the University of Notre Dame and then worked for a lighting company in Chicago. He had a strong interest in the fledgling motion picture industry, and when Essanay Studios offered him the opportunity to become a scriptwriter, he took the job. At that time, some of the East Coast movie makers began to spend winters in California where the climate allowed them to continue productions requiring warm weather. Soon, a number of movie companies worked there year-round, and in 1911, Dwan began working part-time in Hollywood. While still in New York, in 1917 he was the founding president of the East Coast chapter of the Motion Picture Directors Association. Career Dwan started his directing career by accident in 1911, when he was sent by his employers to California, in order to locate a company that had vanished. Dwan managed to track the company down, and learned that they were waiting for the film's director (who was an alcoholic) to return from a binge (and allowing them to return to work). Dwan wired back to his employers in Chicago, informing them of the situation, and suggested that they disband the company. They wired back, instructing Dwan to direct the film. When Dwan informed the company of the situation, and that their jobs were on the line, they responded: \"You're the best damn director we ever saw\". Dwan operated Flying A Studios in La Mesa, California, from August 1911 to July 1912. Flying A was one of the first motion pictures studios in California history. On August 12, 2011, a plaque was unveiled on the Wolff building at Third Avenue and La Mesa Boulevard commemorating Dwan and the Flying A Studios origins in La Mesa, California. After making a series of westerns and comedies, Dwan directed fellow Canadian-American Mary Pickford in several very successful movies as well as her husband, Douglas Fairbanks, notably in the acclaimed 1922 Robin Hood. Dwan directed Gloria Swanson in eight feature films, and one short film made in the short-lived sound-on-film process Phonofilm. This short, also featuring Thomas Meighan and Henri de la Falaise, was produced as a joke, for the April 26, 1925 \"Lambs' Gambol\"…"} {"text": "[HI Wikipedia] ब्रतान्य\n\nब्रतान्य (फ़्रान्सीसी: Bretagne), जिसे ब्रिटेनी (Brittany) और ब्रॅय्स (Breizh) भी कहा जाता है, पस्चिमोत्तरी फ़्रान्स में स्थित एक सांस्कृतिक क्षेत्र है। यहाँ पारम्परिक रूप से फ़्रान्सीसी भाषा की बजाय ब्रेतों नामक एक केल्टी भाषा बोली जाती थी जो आयरलैंड व स्कॉटलैंड में बोली जाने वाली पारम्परिक केल्टी भाषाओं से सम्बन्धित है। इन्हें भी देखें केल्टी भाषाएँ सन्दर्भ फ़्रान्स के क्षेत्र केल्टी राष्ट्र"} {"instruction": "Implement a web scraper in Python that can extract the number of followers of a particular user.", "input": "", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# Set the URL\nurl = 'https://www.instagram.com/{username}'\n\n# Make a request\nresponse = requests.get(url)\n\n# Parse the response\nsoup = BeautifulSoup(response.text, 'lxml')\n\n# Extract the followers\nfollowers = soup.find('span', {'class': 'g47SY'}).next_sibling.text\n\n# Print the followers\nprint(f'Number of followers of the user: {followers}')"} {"instruction": "Given a 2D array of binary values and another 2D array, find the indices of the first array where the values of both arrays are equivalent.", "input": "array1 = [[1, 0, 0, 1],[1, 0, 1, 0],[0, 0, 0, 1],[1, 0, 1, 0]] array2 = [[1, 0, 1, 0], [1, 0, 0, 1], [0, 0, 0, 1], [1, 0, 0, 1]]", "output": "def find_empty_position(array1, array2): results = [] for i in range(len(array1)): for j in range(len(array1[0])): if array1[i][j] == array2[i][j] and array1[i][j] == 0: results.append((i, j)) return results"} {"instruction": "Edit the following sentence to change its sentiment from negative to positive.", "input": "I can't stand programming anymore.", "output": "I'm starting to enjoy programming more."} {"instruction": "Generate a new voice sample using a given text and speech synthesis model.", "input": "text = \"Hello, world!\"", "output": " Since this task requires speech synthesis software and a model, it cannot be completed by the GPT model."} {"text": "[EN Wikipedia] Ripia River\n\nThe Ripia River is a river of the Hawke's Bay region of New Zealand's North Island. A major tributary of the Mohaka River, it flows generally southeast from its sources at the northern end of the Ahimanawa Range 25 kilometres east of Lake Taupō, reaching the Mohaka 40 kilometres northwest of Napier. See also List of rivers of New Zealand References Rivers of the Hawke's Bay Region Rivers of New Zealand"} {"instruction": "This code sets up an MQTT RPC server. To use it, you need to import the necessary libraries and create an instance of the TMQTTRPCServer class, passing in a Mosquitto client and a driver ID. Then, call the setup method on the server instance to subscribe to the appropriate MQTT topics. Finally, start the Mosquitto client loop to begin listening for incoming messages.", "input": "", "output": "#!/usr/bin/python\nimport argparse\n\ntry:\n import mosquitto\nexcept ImportError:\n import paho.mqtt.client as mosquitto\n\nimport time, random\nimport sys\n\nfrom mqttrpc import MQTTRPCResponseManager, dispatcher\n\nimport logging\nlogging.getLogger().setLevel(logging.DEBUG)\n\n@dispatcher.add_method\ndef foobar(**kwargs):\n return kwargs[\"foo\"] + kwargs[\"bar\"]\n\n\n\nclass TMQTTRPCServer(object):\n def __init__(self, client, driver_id):\n self.client = client\n self.driver_id = driver_id\n\n def on_mqtt_message(self, mosq, obj, msg):\n print msg.topic\n print msg.payload\n\n parts = msg.topic.split('/')\n driver_id = parts[3]\n service_id = parts[4]\n method_id = parts[5]\n client_id = parts[6]\n\n\n response = MQTTRPCResponseManager.handle(msg.payload, service_id, method_id, dispatcher)\n\n self.client.publish(\"/rpc/v1/%s/%s/%s/%s/reply\" % (self.driver_id, service_id, method_id, client_id ), response.json)\n\n\n def setup(self):\n for service, method in dispatcher.iterkeys():\n self.client.publish(\"/rpc/v1/%s/%s/%s\" % (self.driver_id, service, method), \"1\", retain=True)\n\n self.client.subscribe(\"/rpc/v1/%s/%s/%s/+\" % (self.driver_id, service, method))\n\n\n\n\n\n\n# Dispatcher is dictionary {: callable}\ndispatcher[(\"test\", \"echo\")] = lambda s: s\ndispatcher[(\"test\", \"add\")] = lambda a, b: a + b\n\n\n\n\nif __name__ =='__main__':\n parser = argparse.ArgumentParser(description='Sample RPC server', add_help=False)\n\n parser.add_argument('-h', '--host', dest='host', type=str,\n help='MQTT host', default='localhost')\n\n parser.add_argument('-u', '--username', dest='username', type=str,\n help='MQTT username', default='')\n\n parser.add_argument('-P', '--password', dest='password', type=str,\n help='MQTT password', default='')\n\n parser.add_argument('-p', '--port', dest='port', type=int,\n help='MQTT port', default='1883')\n\n args = parser.parse_args()\n client = mosquitto.Mosquitto()\n\n if args.username:\n client.username_pw_set(args.username, args.password)\n\n\n rpc_server = TMQTTRPCServer(client, 'Driver')\n\n client.connect(args.host, args.port)\n client.on_message = rpc_server.on_mqtt_message\n rpc_server.setup()\n\n\n while 1:\n rc = client.loop()\n if rc != 0:\n break"} {"text": "[HI Wikipedia] फ़िजी\n\nफ़िजी जो कि आधिकारिक रूप से फ़िजी द्वीप समूह गणराज्य (फ़िजीयाई: Matanitu Tu-Vaka-i-koya ko Viti) के नाम से जाना जाता है, दक्षिण प्रशान्त महासागर के मेलानेशिया मे एक द्वीप देश है। यह न्यू ज़ीलैण्ड के नॉर्थ आईलैंड से करीब 2000 किमी उत्तर-पूर्व मे स्थित है। इसके समीपवर्ती पड़ोसी राष्ट्रों मे पश्चिम की ओर वनुआतु, पूर्व में टोंगा और उत्तर मे तुवालु हैं। 17वीं और 18वीं शताब्दी के दौरान डच एवं अंग्रेजी खोजकर्तओं ने फ़िजी की खोज की थी। 1970 तक फ़िजी एक अंग्रेजी उपनिवेश था। प्रचुर मात्रा मे वन, खनिज एवं जलीय स्रोतों के कारण फ़िजी प्रशान्त महासागर के द्वीपों मे सबसे उन्नत राष्ट्र है। वर्तमान मे पर्यटन एवं चीनी का निर्यात इसके विदेशी मुद्रा के सबसे बड़े स्रोत हैं। यहाँ की मुद्रा फ़िजी डॉलर है। फ़िजी के अधिकांश द्वीप 15 करोड़ वर्ष पूर्व आरंभ (आरम्भ) हुए ज्वालामुखीय गतिविधियों से गठित हुए। इस देश के द्वीपसमूह में कुल 322 द्वीप हैं, जिनमें से 106 स्थायी रूप से बसे हुए हैं। इसके अतिरिक्त यहाँ लगभग 500 क्षुद्र द्वीप हैं जो कुल मिला कर 18,300 वर्ग किमी के क्षेत्रफल का निर्माण करते हैं। द्वीपसमूह के दो प्रमुख द्वीप विती लेवु और वनुआ लेवु हैं जिन पर देश की लगभग 8,50,000 आबादी का 87% निवास करती है। नामकरण फिजी द्वीप का मुख्य द्वीप विती लेवु के नाम से जाना जाता है और इसी नाम का उच्चारण इनके पड़ोसी द्वीप टोंगा के निवासी \" फिसी \" के रूप में करते थे जिसके कारण इसका नाम फिजी पड़ा है। यूरोपीय लोगों को फिजीवासियों के बारे मे सर्वप्रथम कैप्टन कुक के महासागरीय अभियानों के दौरान उनके दल के सदस्य रहे लेखको के लेखों के द्वारा पता चला। यह लेखक फिजीवासियों से पहले पहल टोंगा द्वीप पर मिले थे। इन लेखों में फिजी के मूल निवासियों को दुर्जेय योद्धा और क्रूर आदमखोरों के रूप में वर्णित किया गया था साथ ही उन्हें प्रशांत क्षेत्र में श्रेष्ठ वाहिकाओं (पोतों) के निर्माता लेकिन औसत नाविक के रूप मे भी दर्शाया गया है। वे अपने घर को विती कहते थे, लेकिन टोंगाओं ने इसे फिसी कहा और कैप्टन कुक ने जो एक विदेशी थे इनका उच्चारण फिजी किया और अब इन द्वीपों के नाम इसी नाम से जाना जाता है। इतिहास फिजी के पहले निवासियों का आगमन यूरोपीय अन्वेषकों से बहुत पहले ही हो गया था जो कि सत्रहवीं शताब्दी में फिजी आये थे। मिट्टी के बर्तनों की खुदाई से पता चलता है कि 1000 ई.पू के आसपास भी फिजी में निवासी रहा करते थे, हालाँकि अभी भी उनके फिजी प्रवास के विषय मे कोई पुख्ता जानकारी नहीं है। डच अन्वेषक हाबिल टैस्मान सन 1643 में जब दक्षिणी महाद्वीप की तलाश में निकले थे तब उन्होनें फिजी का दौरा किया था। उन्नीसवीं सदी तक यूरोपीय स्थायी रूप से द्वीप पर नहीं बसे थे। 1874 में ब्रिटेन ने इस द्वीप को अपने नियंत्रण मे लेकर इसे अपना एक उपनिवेश बना लिया। ब्रिटिश लोग भारतीय मजदूरों को यहाँ ठेके पर गन्ने के खेतों में काम करने के लिये ले आये। सन 1970 में इस देश को ब्रिटेन ने स्वतंत्रता दी। सन 1987 में देश का लोकतांत्रिक शासन दो सैन्य विद्रोहों से बाधित हुआ क्योंकि पहले तख्तापलट में ऐसा माना गया की तत्कालीन सरकार मे भारतीय फ़ीजियों का प्रभुत्व था तथा दूसरे में ब्रिटिश राजशाही और गवर्नर जनरल की जगह एक गैर कार्यकारी अध्यक्ष की नियुक्ति हुई।…"} {"instruction": "Write a Python program to generate documentation in HTML format for a given Python solution.", "input": "Solution:\ndef add_item(item_list, new_item):\n item_list.append(new_item)\n return", "output": "def generate_html_doc(solution):\n html = \"\\n\\nPython Documentation\\n\\n\\n\\n

    Solution

    \\n\\\n
    \\n\"\n html += solution + \"\\n
    \\n\\n\\n\"\n return html"} {"text": "[DE Wikipedia] Marschallstab\n\nDer Marschallstab als Stab wird von einem Marschall als Insigne seiner Würde geführt und wurde nur bei zeremoniellen Anlässen getragen. Entstehung Der Marschall bezeichnet ein hohes Amt an fürstlichen Höfen und war der (militärische und politische) Führer der Ritterschaft des jeweiligen Fürsten. In der Renaissance spaltete sich das Amt in militärische Führer, den Leiter des Hofes und den Vorsitzenden der Adelsvertretung auf. Bei feierlichen Gelegenheiten trug der Hofmarschall einen langen Stab als Zeichen seiner Würde und machte bei Hof an der Marschallstafel, einer Nebentafel für die Personen, welche nicht an der fürstlichen Tafel selbst Plätze erhielten, den Wirt. Die Person des Hofmarschalls mit dem langen Stab sieht man heute noch u. a. am englischen Hof. Aus dem Marschallstab (Kommandostab) wurde im Mittelalter ein Würdeabzeichen der höchsten militärischen Befehlshaber. Beim Militär war Generalfeldmarschall (auch Feldmarschall, Marschall der Armee o. dgl.) der höchste Dienstgrad. Der Marschallstab entwickelte sich aus dem Streitkolben der Ritter. Der Großadmiralstab wurde bei der deutschen kaiserlichen Marine ohne vorherige Tradition dem Marschallstab nachgebildet. Marschallstäbe in verschiedenen Ländern Sparta Kommandostäbe waren bereits im klassischen Griechenland in Gebrauch. Belegt ist dies etwa für die Armee Spartas, von der Plutarch berichtet, dass der Feldherr Gylippos während der Belagerung von Syrakus 414 v. Chr. allein durch seinen Kommandostab und Feldherrnmantel die Wende bewirkte. Römisches Reich In der römischen Frühzeit, später auch in der Diktatur war dem König, Prätor, Konsul und zuletzt auch dem Diktator eine Gruppe von Liktoren zugeordnet, die die Funktion der Leibwächter ausübten. Ihr Zeichen war das Liktorenbündel (lat. fasces). Ursprünglich waren die Fasces einfache Gerten, die als harmlose Schlagwaffe benutzt wurden. Später wurden die Fasces als Rutenbündel mit einer Beilklinge als Hoheitszeichen dem Würdenträger vorangetragen. Diese Fasces wandelten sich über die folgenden Jahrhunderte zu einem bloßen Ehrenzeichen. Heiliges Römisches Reich Bereits die Feldmarschälle des Heiligen Römischen Reiches trugen Kommandostäbe, die aber sehr unterschiedlich gearbeitet waren. Wallenstein wird als erster Generalis von um 1634 mit Stab so später dargestellt. Prinz Eugen führte einen Kommandostab, der aus zwei zusammengeschweißten Musketenläufen gearbeitet war und viele Durchbrechungen aufwies. Nach dem Untergang des Heiligen Römischen Reiches (HRR) 1806 wurden keine Reichsgeneralfeldmarschälle mehr ernannt. Auch die Generalfeldmarschälle bzw. Feldmarschälle verschiedener Reichsländer des HRR wie Kurbrandenburg (siehe Bild von Alexander von Spaen, 1691), Kurbayern, Kurhannover, Kursachsen oder Kurpfalz trugen einen Stab. Preußen Beim…"} {"instruction": "Modify the code to perform the mathematical expression “x to the power of y”.", "input": "# Calculate x to the power of y # TODO", "output": "# Calculate x to the power of y x_pow_y = x**y"} {"text": "[CS Wikipedia] Estadio Olímpico Universitario\n\nEstadio Olímpico Universitario je víceúčelový stadion v Ciudad de México, sloužící zejména pro fotbal a atletiku. Pojme 72 000 diváků. Otevřen byl v roce 1952 a byl hlavním dějištěm Letních olympijských her 1968. Stadion je součástí Univerzitního kampusu Mexické národní autonomní univerzity, který je zapsán na seznamu světové dědictví UNESCO. Externí odkazy Sportovní zařízení v Mexiku Postaveno v Mexiku 1952 Fotbalové stadiony v Mexiku Atletika v Mexiku Letní olympijské hry 1968 Olympijské stadiony v Mexiku Mistrovství světa ve fotbale 1986"} {"instruction": "Design a function in Python to compute the factorial of a given number.", "input": "", "output": "def factorial(n):\n if n == 0:\n return 1\n else:\n return n * factorial(n-1)"} {"text": "[HI Wikipedia] पंजाब विश्वविद्यालय\n\nपंजाब विश्वविद्यालय (, पंजाबी:ਪੰਜਾਬ ਯੂਨੀਵਰਸਿਟੀ) भारत के प्राचीन विश्वविद्यालयों में से एक है। यह चंडीगढ में स्थित हैं। इसकी स्थापना 1882 में लाहौर में हुई थी और विभाजन के बाद भारत में कुछ समय के लिए यह दिल्ली तथा शिमला से कार्यरत रही थी। 1958 ई. से यह वर्तमान में चण्डीगढ़ शहर के दो सेक्टर में लगभग 450 एकड़ भूमि में फैली है।। प्रसिद्ध भूतपूर्व छात्र-छात्राएँ डॉ॰ मनमोहन सिंह - भारत के चौदहवें प्रधानमंत्री सुषमा स्वराज - दिल्ली की मुख्यमंत्री, भारत की विदेश मंत्री रणदीप सुरजेवाला - काँग्रेस नेता आदित्य पुरी- एच डी एफ सी बैंक के प्रमुख कार्यकारी अधिकारी दीपक शर्मा हिंदी कथाकार सुषम बेदी हिंदी कथाकार, उपन्यासकार, अमरीका में हिंदी की प्रोफेसर अतुल गुर्टु - उच्च ऊर्जा भौतिक विज्ञानी बाहरी कड़ियाँ pu.ac.in - आधिकारिक वेबसाइट सन्दर्भ चंडीगढ़ चंडीगढ़ के विश्वविद्यालय"} {"text": "[HI Wikipedia] राजधानी\n\nराजधानी वह नगरपालिका होती है, जिसे किसी देश, प्रदेश, प्रान्त या अन्य प्रशासनिक ईकाई अथवा क्षेत्र में सरकार की गद्दी होने का प्राथमिक दर्जा हासिल होता है। राजधानी मिसाली तौर पर एक शहर होता है, जहाँ संबंधित सरकार के दफ़्तर और सम्मेलन -ठिकाने स्थित होते हैं और आम तौर पर अपने क़ानून या संविधान द्वारा निर्धारित होती है। परिभाषाएँ शब्द राजधानी संस्कृत से आया है। राजधानी आम तौर पर संघटक क्षेत्र का सब से बड़ा शहर होता है परन्तु लाज़िमी तौर पर नहीं। अनोखे राजधानी इंतज़ाम बहुत सारे सूबों की दो से ज़्यादा राजधानियाँ हैं और कुछ ऐसे भी हैं जिन की कोई राजधानी नहीं है। चिली: चाहे देश का राष्ट्रिय महा-सम्मेलन बालपारायसो में होता है परन्तु राजधानी सैन्टियागो है। चेक गणराज्य: प्राग एक ही संवैधानिक राजधानी है। ब्रनो में देश की तीनों इचाचासर्व-उच्च अदालतों स्थित हैं जो इसको चेक अदालती शाखा की यथार्थ राजधानी बनाते हैं। फ़िनलैंड: गर्मियाँ के दौरान पर राष्ट्रपति नानतली में कुलतारांता में निवास करता है और सरकार की सभी राष्ट्रपति बैठकों भी वहाँ ही होती हैं। फ़्रांस: फ़्रांसीसी संविधान किसी भी शहर को राजधानी के तौर पर मान्यता नहीं देता। क़ानून मुताबिक़ पैरिस संसद के दोनों सदनों (राशटरी सभा और सैनेट) का ठिकाना है लेकिन उनके सांझे महांसंमेलन \"वरसेये के शाही-महल में होते हैं। संकट की घड़ी में संवैधानिक ताकतों किसी ओर सहर में बदली जा सकतीं हैं जिससे संसदों के टिकाने राष्ट्रपती और मंत्री-मंडल वाले स्थानों पर ही रह सकें। सन्दर्भ"} {"text": "[CS Wikipedia] Římskokatolická farnost Dolní Bukovsko\n\nŘímskokatolická farnost Dolní Bukovsko je územním společenstvím římských katolíků v rámci vikariátu České Budějovice - venkov českobudějovické diecéze. O farnosti Historie V roce 1359 je v Dolním Bukovsku doložena plebánie. V kostele Narození Panny Marie se z této doby dochovaly gotické nástěnné malby, které byly později zakryty a da facto náhodně byly objeveny v roce 1935. Duchovní správa neexistovala v Dolním Bukovsku kontinuálně. Středověká plebánie později v důsledku dějinných událostí zanikla. Bukovsko bylo přifařeno k farnosti ve Veselí nad Lužnicí. V roce 1703 se Dolní Bukovsko stalo součástí farnosti Bošilec. Z této doby se dochovaly stížnosti bukovských obyvatel na bošileckého faráře, který pouze využíval výnosy, které měly zajišťovat živobytí kněze, ale duchovní správu konal pouze v Bošilci a o Bukovsko se vůbec nestaral. Farníci navrhovali řešit tento problém ustanovením kněze - expozity, který by byl podřízen bošileckému faráři, ale měl na starosti primárně duchovní službu v Bukovsku. Situace však dlouho nebyla řešena vůbec. Až v roce 1786 byla v Dolním Bukovsku ustanovena lokálie, ze které byla v roce 1858 vytvořena samostatná farnost. Farní pozemky nicméně zůstaly knězi z Bošilce a do Bukovska byly převedeny až koncem 19. století. Přifařené Horní Bukovsko bývalo původně samostatnou farností. Ta však zanikla v důsledku husitských válek a již nikdy nebyla obnovena. Současnost Farnost Dolní Bukovsko je administrována ex currendo ze Ševětína. Odkazy Poznámky Externí odkazy Profil farnosti na webu Českobudějovické diecéze Dolní Bukovsko Dolní Bukovsko"} {"instruction": "Create a Python program that takes a list of strings and filters out strings that do not contain the letter 'a'.", "input": "words = [\"apple\", \"banana\", \"grape\", \"pear\", \"kiwi\"]", "output": "# Filtering out strings without letter 'a'\nfiltered_words = [word for word in words if 'a' in word]\n\n# Print the filtered list\nprint(filtered_words)\n# Output: ['apple', 'banana', 'grape']"} {"text": "[DE Wikipedia] Liste der Monuments historiques in Marcilly-en-Bassigny\n\nDie Liste der Monuments historiques in Marcilly-en-Bassigny führt die Monuments historiques in der französischen Gemeinde Marcilly-en-Bassigny auf. Liste der Immobilien |} Weblinks MarcillyenBassigny MarcillyenBassigny !"} {"instruction": "Write a SQL query to list all the customers whose age is over 18.", "input": "", "output": "SELECT * FROM customers WHERE age > 18;"} {"instruction": "Extract all characters from the following text and store them in a new string.", "input": "Hello world!", "output": "characters = \"Helloworld!\""} {"text": "[DE Wikipedia] Richard Giesen\n\nRichard Giesen ist der Name folgender Personen: * Richard Giesen (Diplomat) (* 1933), deutscher Diplomat Richard Giesen (Rechtswissenschaftler) (* 1964), deutscher Rechtswissenschaftler"} {"instruction": "Count the number of vowels in a sentence.", "input": "\"Hi there, how are you doing?\"", "output": "int countVowels = 0; String sentence = \"Hi there, how are you doing?\"; for (int i = 0; i < sentence.length(); i++) { if (sentence.charAt(i) == 'a' || sentence.charAt(i) == 'e' || sentence.charAt(i) == 'i' || sentence.charAt(i) == 'o' || sentence.charAt(i) == 'u') { countVowels++; } } System.out.println(\"Number of vowels in the string: \" + countVowels);"} {"text": "[DE Wikipedia] Mitterdorf im Mürztal\n\nMitterdorf im Mürztal ist eine ehemalige Marktgemeinde mit Einwohnern () im Gerichtsbezirk Mürzzuschlag und im politischen Bezirk Bruck-Mürzzuschlag in der Steiermark. Bis Ende 2014 war Mitterdorf eine selbständige Marktgemeinde. Im Rahmen der Gemeindestrukturreform in der Steiermark ist die seit 2015 mit den vordem ebenfalls selbständigen Gemeinden Veitsch und Wartberg im Mürztal zur neuen Gemeinde Sankt Barbara im Mürztal zusammengeschlossen. Geografie Geografische Lage Mitterdorf liegt im Mürztal etwa 13 km südwestlich von Mürzzuschlag. Im Süden befinden sich die Fischbacher Alpen. Ehemalige Gemeindegliederung Das Gemeindegebiet umfasste zwei Ortschaften (in Klammern Einwohnerzahl Stand ): Lutschaun () Mitterdorf im Mürztal () Die ehemalige Gemeinde bestand aus zwei Katastralgemeinden (Fläche: Stand 31. Dezember 2018): Lutschaun (379,37 ha) Mitterdorf (734,40 ha) Nachbarorte Geschichte Das früheste Schriftzeugnis ist von 1139 und lautet „Mitterendorf“. Der Name geht auf althochdeutsch mittar (mittlerer, in der Mitte befindlich) zurück. Die Ortsgemeinden als autonome Körperschaften entstanden 1850. Die Katastralgemeinden Wartberg, Scheibsgraben, Mitterdorf und Lutschaun bildeten den Gemeindeverband Wartberg. 1906 schieden Mitterdorf und Lutschaun aus dem Gemeindeverband Wartberg aus. Nach der Annexion Österreichs 1938 kam die Gemeinde zum Reichsgau Steiermark, 1945 bis 1955 war sie Teil der britischen Besatzungszone in Österreich. Kultur und Sehenswürdigkeiten Filialkirche Sankt Barbara Wirtschaft und Infrastruktur Verkehr Mitterdorf liegt an der Semmering Schnellstraße S 6 und an der Südbahn. Umweltschutz Mitterdorf im Mürztal war die erste Gemeinde Österreichs, die moderne LED-Technik in der Straßenbeleuchtung einsetzte. Für die Umrüstung wurde der Gemeinde beim Ideenwettbewerb der Raiffeisenbank Mittleres Mürztal ein Preis verliehen. Politik Bürgermeister war bis Ende 2014 Walter Berger (SPÖ), Vizebürgermeisterin war Renate Planka (SPÖ). Der Gemeinderat setzte sich bis dahin zusammen aus: 12 Mitglieder der SPÖ 3 Mitgliedern der ÖVP Persönlichkeiten Ehrenbürger 1975: Anton Peltzmann (1920–2000), Landesrat Söhne und Töchter der Gemeinde Erich Kamper (1914–1995), Sportjournalist und Publizist Bernd Stöhrmann (* 1944), Politiker der SPÖ August Jilek (* 1949), Theologe und Hochschullehrer Franz Preihs (* 1978), Extremradsportler Marion Mitterhammer (* 1965), Schauspielerin Weblinks www.st-barbara.gv.at Website der Gemeinde Sankt Barbara im Mürztal Einzelnachweise Sankt Barbara im Mürztal Ort im Bezirk Bruck-Mürzzuschlag Ehemalige Gemeinde in der Steiermark Ort an der Mürz Mürzsteger Alpen Fischbacher Alpen"} {"instruction": "Given an array with n numbers, write a function to find if there exists three elements in the array whose sum is equal to a given number.", "input": "array = [5, 3, 1, 8], number = 14", "output": "def sum_three_elements(array, number): \"\"\"Given an array with n numbers, find if there exists three elements in the array whose sum is equal to a given number.\"\"\" array.sort() for i in range(len(array) - 2): left = i + 1 right = len(array) - 1 while left < right: temp = array[i] + array[left] + array[right] if temp == number: return True elif temp < number: left += 1 else: right -= 1 return False if __name__ == '__main__': a = [5, 3, 1, 8] number = 14 print(sum_three_elements(a, number))"} {"instruction": "Create a Python script for creating a GUI app with a login page.", "input": "Not applicable", "output": "from tkinter import *\n\nroot = Tk()\nroot.title(\"Login Page\")\n\n# Create window\n\nwindow_width = 400\nwindow_height = 350\nscreen_width = root.winfo_screenwidth()\nscreen_height = root.winfo_screenheight()\nx_cord = int((screen_width/2) - (window_width/2))\ny_cord = int((screen_height/2) - (window_height/2))\n\n# Set window geometry\n\nroot.geometry(\"{}x{}+{}+{}\".format(window_width, window_height, x_cord, y_cord))\n\n# Create widgets\n\nuser_label = Label(root, text=\"Username:\")\nuser_label.place(x=50, y=150)\n\nusername_input = Entry(root, width=30)\nusername_input.place(x=130, y=150)\n\npassword_label = Label(root, text=\"Password:\")\npassword_label.place(x=50, y=200)\n\npassword_input = Entry(root, width=30, show=\"*\")\npassword_input.place(x=130, y=200)\n\ndef login():\n #Verify input and authenticate user\n print(\"Username: {}\\nPassword: {}\".format(username_input.get(),password_input.get()))\n\nlogin_button = Button(root, text=\"Login\", command=login)\nlogin_button.place(x=180, y=230)\n\n# Create event loop\n\nroot.mainloop()"} {"instruction": "Perform a web scraping to retrieve the prices of a specific product.", "input": "Website: www.amazon.com Product: iPhone 12", "output": "import requests from bs4 import BeautifulSoup website = requests.get('https://www.amazon.com/Apple-iPhone-12-Unlocked-128GB/dp/B08HeG719F/ref=sr_1_1') soup = BeautifulSoup(website.content, 'html.parser') price_divs = [] price_divs = soup.find_all('span', {'class': 'a-price-whole'}) for price_div in price_divs: print(price_div.text)"} {"text": "[DE Wikipedia] Bernhard Heusler\n\nBernhard Heusler (* 27. Dezember 1963 in Basel) ist ein Schweizer Rechtsanwalt und ehemaliger Präsident des Fussballclubs FC Basel. Leben Heusler studierte Rechtswissenschaften an der Universität Basel (lic. iur. 1988; summa cum laude). Er war wissenschaftlicher Assistent bei René Rhinow und wurde in Basel 1992 zum Dr. iur. promoviert. 1994 absolvierte er einen Nachdiplomkurs an der University of California, Davis und war 1994/95 bei der New Yorker Kanzlei Davis Polk & Wardwell tätig. Ab 1994 arbeitete er in der Kanzlei Wenger Plattner in Basel, von 2000 bis 2014 als Partner, und betreute Mandate im Fokus Gesellschaftsrecht, IT-Recht und Sportrecht. Anschliessend war er bis 2017 bei der Anwaltskanzlei Walder Wyss in Basel als Konsulent tätig. Heute ist er Partner bei Heusler Werthmüller Heitz, einer Agentur für Beratung in Wirtschaft, Sport und Kultur. Heusler hat verschiedene Verwaltungsratsmandate inne, darunter der Valora Holding AG. Er ist Präsident der Stiftung für kranke Kinder in Basel. Heusler ist verheiratet und Vater von zwei Kindern. Verwaltungsratsmandate Schneider-Immo-Globe AG Immobal SB Meat Holding AG TCR Neuhof AG Glanzmann Generalunternehmung AG Glanzmann Management AG The Irish Pub Company Basel AG Futura Sport AG Waldmeier Ltd Valora Holding Sa Move Sport + Style AG Montana Sport AG Sopred Ltd FC Basel 1893 AG John Valentine Fitness Club Basel AG FC Basel Holding AG O.T. Drescher Ag Euxinus AG The Irish Pub Company Locarno SA FC Basel Bernhard Heusler war Präsident und Delegierter des Verwaltungsrates des Fussballclubs FC Basel. Von 2012 bis 2017 fungierte Heusler als Präsident des Fussballclubs. Unter der Ära von Heusler gewann der Schweizer Club den Meistertitel acht Mal in Folge und der FC Basel konnte erstmals einen Umsatz über 100 Millionen Schweizer Franken verzeichnen. Literatur Claudio Miozzari: Der perfekte Abgang. Ende der Ära Heusler beim FCB. In: Basler Stadtbuch 2017, S. 1-20. Einzelnachweise Präsident (FC Basel) Rechtsanwalt (Schweiz) Schweizer Geboren 1963 Mann"} {"instruction": "Edit the following Python code to calculate the average of three values given by the user.", "input": "a = int(input(\"Enter first value: \")\nb = int(input(\"Enter second value: \")\nc = int(input(\"Enter third value: \")\n\nprint(\"The average is: \" + a)", "output": "a = int(input(\"Enter first value: \"))\nb = int(input(\"Enter second value: \"))\nc = int(input(\"Enter third value: \"))\n\naverage = (a + b + c) / 3\nprint(\"The average is: \" + str(average))"} {"instruction": "Write a code to extract data from a PDF document.", "input": "", "output": "# install the required package pip install pdfminer.six # importing all the required modules from pdfminer.pdfparser import PDFParser from pdfminer.pdfdocument import PDFDocument # open the pdf file fp = open('sample_form.pdf', 'rb') # create parser object parser = PDFParser(fp) # create pdf document object doc = PDFDocument(parser) # get the text data from pdf file data = doc.get_data() # print the text extracted print(data)"} {"text": "[EN Wikipedia] Gmina Parysów\n\nGmina Parysów is a rural gmina (administrative district) in Garwolin County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Parysów, which lies approximately north-east of Garwolin and south-east of Warsaw. The gmina covers an area of , and as of 2006 its total population is 4,082. Villages Gmina Parysów contains the villages and settlements of Choiny, Górki-Kolonia, Kozłów, Łukowiec, Parysów, Poschła, Słup, Starowola, Stodzew, Wola Starogrodzka and Żabieniec. Neighbouring gminas Gmina Parysów is bordered by the gminas of Borowie, Garwolin, Latowicz, Pilawa and Siennica. References Polish official population figures 2006 Parysow Garwolin County"} {"instruction": "Assign a value to `name` by using the ternary operator", "input": "let name;", "output": "name = condition ? value1 : value2;"} {"text": "[HI Wikipedia] वोटापूरी-कटारक़लाई भाषा\n\nवोटापूरी-कटारक़लाई (Wotapuri-Katarqalai, ) कोहिस्तानी उपशाखा की एक दार्दी भाषा है जो अफ़ग़ानिस्तान के नूरिस्तान प्रान्त की वोटापूरी और कटारक़लाई नामक बस्तियों में बोली जाती थी। सन् १९३५ में कटारक़लाई में इसे ६० घरों में बोला जाता था लेकिन १९५५ में इसे बोलने वाला एक ही व्यक्ति मिला। भाषावैज्ञानिक अनुमान लगते हैं कि यह भाषा विलुप्त हो चुकी है। इन्हें भी देखें वटापूर ज़िला सन्दर्भ हिन्द-आर्य भाषाएँ दार्दी भाषाएँ अफ़ग़ानिस्तान की भाषाएँ नूरिस्तान प्रान्त विलुप्त भाषाएँ"} {"text": "[EN Wikipedia] Dinaritoidea\n\nDinaritoidea is an extinct superfamily of ammonoids in the order Ceratitida. References External links Ceratitida superfamilies"} {"instruction": "Create a Python program to copy elements of one array into another array.", "input": "Array 1=[1,2,3,4]", "output": "array_1 = [1,2,3,4] \narray_2 = [] \n \n# Copying all the elements \nfor i in range(0, len(array_1)): \n array_2.append(array_1[i]) \n \nprint (\"Elements Copied from the Array1 to Array2 are : \" + str(array_2))"} {"instruction": "Can you provide a Python program that resize an array of integers in place?", "input": "arr = [10, 20, 30, 40]\nnew_size = 6", "output": "\"\"\"\nProviding a Python program that resizes an array of integers in place\n\"\"\"\ndef resize_array(arr, new_size):\n # base case\n if len(arr) == new_size:\n return\n\n # add elements to increase the size\n if len(arr) < new_size:\n for _ in range(new_size - len(arr)):\n arr.append(0)\n\n # delete elements to decrease the size \n elif len(arr) > new_size:\n for _ in range(len(arr) - new_size):\n arr.remove(arr[-1])\n\nif __name__ == '__main__':\n arr = [10, 20, 30, 40]\n new_size = 6\n resize_array(arr, new_size)\n print(arr)"} {"text": "[HI Wikipedia] कौमार्य\n\nकौमार्य एक ऐसी अवस्था होती है जिसमें व्यक्ति ने कभी भी संभोग नहीं किया होता है। सांस्कृतिक और धार्मिक परंपराओं में विशेष रूप से अविवाहित महिलाओं, निजी पवित्रता के विचार के साथ जुड़े मामलों और मूल्यों आदि को विशेष मूल्य और महत्व दिया गया है। सतीत्व अथवा शुद्धता की तरह ही, कौमार्य की अवधारणा में भी परंपरागत रूप से शादी से पहले यौन संयम रखना शामिल है और शादी के बाद ही अपने जीवन साथी के साथ यौन क्रियाओं में संलग्न होना है। शादी से पहले संभोग, जो यौन गतिविधियों के एक से अधिक अवसर को इंगित करता है, इसके विपरीत, कौमार्य की अवधारणा को आम तौर पर नैतिक या धार्मिक मामलों या सामाजिक हैसियत के संदर्भ में और पारस्परिक संबंधों में परिणामों के रूप में देखा जा सकता है। शब्द मूल रूप से केवल यौन अनुभवहीन महिलाओं के लिए जाना जाता है, लेकिन विभिन्न परिभाषाओं की एक विस्तृत श्रृंखला शामिल है, जो इसे पारंपरिक, आधुनिक और नैतिक अवधारणाओं के रूप में परिभाषित करते हैं। इन्हें भी देखें कौमार्य परीक्षण योनिचछद पुनर्निर्माण शल्य चिकित्सा (ह्य्मेनोप्लास्टी) सन्दर्भ मानव कामुकता गैर कामुकता हिन्दू धर्म और कामुकता यहूदी धर्म और कामुकता ईसाई धर्म और कामुकता"} {"instruction": "Generate a Python code for replicating an output after switching the contents of two strings.", "input": "Given two strings, ‘str1’ and ‘str2’, swap the contents of the two strings.\n\nFor example, if the two strings are ‘Hello’ and ‘World’, the output after swtiching the contents should be ‘Worlh’ and ‘Hello’", "output": "str1, str2 = 'Hello', 'World'\nstr1, str2 = str2, str1\n\nprint(\"After swapping: str1 =\", str1, \"and str2 =\", str2)"} {"instruction": "Design a program to remove punctuations from a given string.", "input": "", "output": "def remove_punctuations(s): punctuations = '''!()-[]{};:'\"\\,<>./?@#$%^&*_~''' s_without_punc = \"\" for char in s: if char not in punctuations: s_without_punc = s_without_punc + char return s_without_punc"} {"text": "[CS Wikipedia] Fondachelli-Fantina\n\nFondachelli-Fantina je italská obec, součást Metropolitního města Messina, nacházející se na severovýchodní Sicílii. V roce 2016 zde žilo 1021 obyvatel. Rozkládá se v nadmořské výšce nad 600 metrů nad mořem, v údolí řeky Patri v pohoří Peloritani. Okolí dominují vrcholy Montagna Grande, Rocca Salvatesta, Pizzo di Vernà, Ritagli di Lecca a Pizzo Vento. Datum založení není známé. Do roku 1950 byla obec místní částí Novara di Sicilia, poté se stala samostatnou obcí. Skládá se z mnoha malých vesnic. Leží asi 71 km jihozápadně od Messiny. Odkazy Reference Externí odkazy Obce v metropolitním městě Messina"} {"instruction": "Using the code given below, add JavaScript code to make the hyperlinks open in a new tab.", "input": "", "output": ""} {"instruction": "How can you ensure that a button element with the ID of \"submit-btn\" is not clickable?", "input": "", "output": "You can ensure that a button element with the ID of \"submit-btn\" is not clickable by adding this code to the CSS file: #submit-btn{ pointer-events: none; }"} {"instruction": "Generate a random list of 20 numbers between 1 and 100.", "input": "", "output": "[86, 19, 2, 8, 12, 37, 43, 48, 63, 68, 21, 4, 39, 55, 87, 23, 69, 61, 44, 91]"} {"instruction": "Develop a Python script to print all the permutations of a given string.", "input": "", "output": "def permutations(string):\n perms = []\n if len(string) == 1:\n perms.append(string)\n return perms\n \n for i in range(len(string)): \n substring = string[:i] + string[i+1:]\n for permutation in permutations(substring): \n perms.append(string[i] + permutation)\n return perms\n\npermutations('ABC')"} {"text": "[HI Wikipedia] बीने–कौशी तत्समक\n\nThe firstrfu सभी वास्तविक तथा सम्मिश्र संख्याओं के लिए (व्यापक रूप से क्रमविनिमय वलय के तत्व)। ai = cigI और bi = ''di'gf', रखने पर लाग्रांज तत्समक प्राप्त होता है जो यूक्लिडीय समष्‍टि frr के लिए कौशी–श्‍वार्ज असमिका का प्रबल संस्करण है। सन्दर्भ yf e{कौशी नामकरण}} गणित सम्मिश्र विश्लेषण कौशी नामकरण गणितीय सर्वसमिकाएँ"} {"text": "[HI Wikipedia] अगरतला\n\nअगरतला (Agartala) भारत के त्रिपुरा राज्य की राजधानी है। यह पश्चिम त्रिपुरा ज़िले का मुख्यालय भी है। इसकी स्थापना 1850 में महाराज राधा कृष्ण किशोर माणिक्य बहादुर द्वारा की गई थी। बांग्लादेश से केवल दो किमी दूर स्थित यह नगर सांस्कृतिक रूप से समृद्ध है। अगरतला त्रिपुरा के पश्चिमी भाग में स्थित है और हावड़ा नदी शहर से होकर गुजरती है। विवरण अगरतला उस समय प्रकाश में आया जब माणिक्य वंश ने इसे अपनी राजधानी बनाया। 19वीं शताब्दी में कुकी के लगातार हमलों से परेशान होकर महाराज कृष्ण माणिक्य ने उत्तरी त्रिपुरा के उदयपुर स्थित रंगामाटी से अपनी राजधानी को अगरतला स्थानान्तरित कर दिया। राजधानी बदलने का एक और कारण यह भी था कि महाराज अपने साम्राज्य और पड़ोस में स्थित ब्रिटिश बांग्लादेश के साथ संपर्क बनाने चाहते थे। आज अगरतला जिस रूप में दिखाई देता है, दरअसल इसकी परिकल्पना 1940 में महाराज वीर बिक्रम किशोर माणिक्य बहादुर ने की थी। उन्होंने उस समय सड़क, मार्केट बिल्डिंग और नगरनिगम की योजना बनाई। उनके इस योगदान को देखते हुए ही अगरतला को ‘बीर बिक्रम सिंह माणिक्य बहादुर का शहर’ भी कहा जाता है। शाही राजधानी और बांग्लादेश से नजदीकी होने के कारण अतीत में कई प्रसिद्ध व्यक्तियों ने अगरतला का भ्रमण किया। रवीन्द्रनाथ ठाकुर कई बार अगरतला आए थे। उनके बारे में कहा जाता है कि त्रिपुरा के राजाओं से उनके काफी गहरे संबंध थे। पर्यटन स्थल 1901 में निर्मित उज्जयंत पैलेस, अगरतला का मुख्य स्मारक है जो मुगल-यूरोपीय मिश्रित शैली में निर्मित है। 800 एकड़ में फैला यह विशाल परिसर अब राज्य की विधान सभा के रूप में प्रयुक्त होता है। इसमें बगीचे और मानव-निर्मित झीलें है। आमतौर पर इसे जनता के लिए नहीं खोला जाता परंतु यदि आप सायं 3 से 4 बजे के बीत मुख्य द्वार पर जाएं तो आप यहां प्रवेश के लिए प्रवेश-पास प्राप्त कर सकते हैं। पैलेस के मैदान में नारंगी रंग के दो मंदिर अर्थात् उम्मेनश्वर मंदिर और जगन्नाथ मंदिर स्थित है, जिनमें कोई भी व्यक्ति दर्शानार्थ जा सकता है। एयरपोर्ट रोड पर लगभग 1 कि॰मी॰ उत्तर में वेणुबन विहार नामक एक बौद्ध मंदिर है। गेदू मियां मस्जिद, जो अनोखे तकीके से क्राकरी के टूटे हुए टुकड़ों से बनी है, भी मनोरम दर्शनीय है। एचजीबी रोड पर स्थित स्टेट म्यूजियम में एथनोग्राफिकल और आर्कियोलॉजी संबंधी वस्तुएं प्रदर्शित की गई हैं। यह सोमवार से शनिवार तक प्रात: 10 से सायं 5 बजे तक खुलता है, इसमें प्रवेश निशुल्क है। पर्यटन कार्यालय के पीछे स्थित ट्राइबल म्यूजियम त्रिपुरा के 19 आदिवासी समूहों की स्मृति के रूप में बनाया गया है। पुराना अगरतला पूर्व में 5 कि॰मी॰ दूर है। यहां चौदह मूर्तियों वाला मंदिर है जहां जुलाई माह में श्रद्धालु कड़छी-पूजा के लिए एकत्र होते हैं। यहां आटोरिक्शा, बस और जीप द्वारा पहुंचा जा सकता है। उज्जयन्त महल इस महल को महाराजा राधा किशोर माणिक्य ने बनवाया था। अगरतला जाने पर इस महल को जरूर घूमना चाहिए। इसका निर्माण कार्य 1901 में पूरा हुआ था और फिलहाल इसका इस्तेमाल राज्य विधानसभा के रूप में किया जा रहा है। नीरमहल मुख्य शहर से 53 किमी दूर स्थित इस खूबसूतर महल को महाराजा बीर बिक्रम किशोर माणिक्य ने बनवाया था। रुद्रसागर झील के बीच में स्थित इस महल में महाराजा गर्मियों के समय ठहरते थे। महल…"} {"instruction": "Develop a program in Python to find the second largest element in a given array.", "input": "[10, 11, 8, 9, 20]", "output": "def second_largest(arr):\n first = max(arr[0], arr[1])\n second = min(arr[0], arr[1])\n \n for i in range(2, len(arr)):\n if arr[i] > first:\n second = first\n first = arr[i]\n elif arr[i] > second and arr[i] != first:\n second = arr[i]\n \n return second"} {"instruction": "Create a simple Python program that finds the number of even numbers in a given list.", "input": "list1 = [1, 4, 5, 6, 3, 2]", "output": "def count_even_numbers(list1):\n count = 0\n for item in list1:\n if item % 2 == 0:\n count += 1\n return count\n\nprint(count_even_numbers(list1))"} {"instruction": "Generate a program in Python to solve a given linear equation", "input": "3x + 5 = 10", "output": "def solve_linear_eq(eq):\n x, b = eq.split(' ')\n a, op, constant_term = x.split('x')\n\n a = int(a)\n b = int(b)\n constant_term = int(constant_term)\n \n if op == '+':\n x = (constant_term - b) / a\n elif op == '-':\n x = (b - constant_term) / a\n \n return x\n\nsolution = solve_linear_eq('3x + 5 = 10')\nprint(\"x = \" + str(solution))"} {"instruction": "Generate input data for a convolutional neural network (CNN).", "input": "The CNN will classify objects in an image.", "output": "Input data should include an image dataset of the objects to be classified. Each image should contain its corresponding label. Image labels can be one-hot encoded. The dataset should be split into separate training, validation and test datasets."} {"text": "[HI Wikipedia] मल्ल (कुलनाम)\n\nभारत के कई भागों के लोगों का कुलनाम मल्ल है। भारत के उत्तर प्रदेश के पूर्वी जिलों (कुशीनगर, देवरिया, गोरखपुर, महराज गंज, बस्ती, आजमगढ़ आदि) में बसने वाली एक क्षत्रिय जाति क कुलनाम, आंध्र प्रदेश के पूर्वी गोदावरी और विशाखापत्तनम जिलों में 'गवर' नाम की जाति के लोगों का प्रसिद्ध कुलनाम कश्मीरी पण्डितों का कुलनाम मालवा और आसपास के क्षेत्रों के जैन लोगों का कुलनाम मल्ल जाति के लोग द्वंद्वयुद्ध में बड़े निपुण होते थे; इसीलिये द्वंद्वयुद्ध का नाम 'मल्लयुद्ध' और कुश्ती लड़नेवाले का नाम 'मल्ल' पड़ गया है। इस जाति के लोग अखाड़ों में व्यायाम और युद्ध किया करते थे। महाभारत में मल्ल जाति, उनके राजा और उनके देश का उल्लेख हैं। प्राचीन भारतवर्ष के अनेक स्थान जैस मुलतान (मल्लस्यान), मालव, मालभूमि आदि में 'मल्ल' शब्द विकृत रूप में मिलता है। त्रिपिटक से कुशीनगर में मल्लों के राज्य का होना पाया जाता है। मनुस्मृति में मल्लों को लिछिबी (लिच्छाव) आदि के साथ क्षत्रिय' लिखा है। पर मल्ल आदि क्षत्रिय जातियाँ बौद्ध मतावलंबी हो गई थी। इसका उल्लेख स्थान-स्थान पर त्रिपटक में मिलता है जिससे ब्राह्मणों के अधिकार से उनका निकल जाना और ब्रात्य होना ठीक जान पड़ता है और कदाचित् इललिये स्मृतियों मे वे 'व्रात्य' कह गए है। मल्ल राजाओं की कुलदेवी मां भवानी देवी मंदिर कुशीनगर का मंदिर कुशीनगर के बुद्ध स्थली नाम से प्रचलित बुद्धा घाट परिसर में अवस्थित है। ऐसा माना जाता है कि पवित्र हिरण्यवती नदी के किनारे स्थित इस स्थान पर मल्ल युवराजों का मुकुट बंधन संस्कार सम्पन्न होता था महाभारत के काल में इनकी युद्धप्रणाली को राजा लोग इतना पसंद करते थे कि प्रायः सभी राजाओं के दरबार में मल्ल नियुक्त किए जाते थे और उन्हें अखाड़ों में लड़ाया जाता था। कितने लोग मल्लों को रखकर उनसे स्वयं शिक्षा प्राप्त करते थे और मल्लयुद्घ में निपुणता बड़े गौरव की बात मानी जाती थी। जरासंध और भीम मल्लयुद्ध के बड़े व्यसनी थे। जरासंध के यहाँ मल्लों की एक सेना भी थी। इन्हें भी देखें मल्ल महाजनपद मल्ल राजवंश भारतीय कुलनम"} {"instruction": "Edit a Python program to modify a numpy array into a pandas Dataframe.", "input": "Numpy Array", "output": "import numpy as np\nimport pandas as pd\n\n# Load the data\ndata = np.load('data.npy')\n\n# Create the pandas DataFrame\ndf = pd.DataFrame(data)"} {"instruction": "Write a Python program to sort a list of numbers from lowest to highest.", "input": "[7, 3, 5, 8, 4]", "output": "[3, 4, 5, 7, 8]"} {"instruction": "Create a function in C that takes a string as input and returns an integer, which represents the number of occurences of a given character in the string.", "input": "\"Hello, World!\", 'o'", "output": "int count_occurrences(char *str, char c) { int count = 0; // Traverse the string and check // for occurrences of character. for (int i=0; str[i] != '\\0'; i++) if (str[i] == c) count++; return count; }"} {"instruction": "Find a Python solution for this leetcode problem.", "input": "Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice.", "output": "def twoSum(nums, target): numDict = dict() for index, num in enumerate(nums): if num in numDict.keys(): return [numDict[num], index] else: numDict[target-num] = index"} {"text": "[DE Wikipedia] Julia Ritter\n\nJulia Ritter (* 13. Mai 1998 in Lünen, Nordrhein-Westfalen) ist eine deutsche Leichtathletin, die sich auf das Kugelstoßen und den Diskuswurf spezialisiert hat. Sie war U18-Weltmeisterin und U20-Europameisterin im Kugelstoßen. Berufsweg Ritter machte 2016 Abitur am Städtischen Gymnasium Bergkamen. Seit 1. September 2016 arbeitet Ritter als Polizeimeisteranwärterin bei der Bundespolizei und wurde als Dienstanfängerin an der Bundespolizeisportschule Kienbaum vereidigt. Sportliche Karriere Ritter kam erst als 13-Jährige vom Handball zum Kugelstoßen und führte bereits am Jahresende 2012 mit 13,75 m im Kugelstoßen (3 kg) die Deutsche W14-Jahresbestenliste (Freiluft) an. 2013 stand Ritter am Jahresende mit 15,80 m im Kugelstoßen (3 kg) und mit 42,30 m im Diskuswurf (1 kg) an der Spitze der Deutschen U16-Jahresbestenliste (Freiluft). 2014 holte sie sich den Deutschen U18-Vizemeistertitel im Kugelstoßen. 2015 wurde Ritter Deutsche U18-Meisterin im Diskuswurf und beim Kugelstoßen Deutsche U18-Vizemeisterin sowie in Cali (Kolumbien) mit Persönlicher Bestleistung von 18,53 Metern U18-Weltmeisterin. Am Jahresende führte Ritter mit 18,53 m im Kugelstoßen (3 kg) und mit 49,86 m im Diskuswurf (1 kg) die Deutsche U18-Jahresbestenliste (Freiluft) als auch mit 17,88 m im Kugelstoßen (3 kg) und mit 44,05 m im Diskuswurf (1 kg) die Deutsche U18-Jahresbestenliste (Halle und Winterwurf) an. 2016 kam der Wechsel in die U20-Klasse und zur Vier-Kilo-Kugel, weshalb Ritter ins Sportinternat Bochum-Wattenscheid zog und sich der Trainingsgruppe von Miroslaw Jasinski anschloss. Erfolgreich war sie als Deutsche U20-Winterwurf-Meisterin mit dem Diskus und einem 3. Platz im Kugelstoßen bei den Deutschen U20-Winterwurf-Meisterschaften. Es folgten der Deutsche U20-Meistertitel im Diskuswurf, ein 3. Platz bei den Deutschen U20-Meisterschaften im Kugelstoßen und ein 9. Platz bei den U20-Weltmeisterschaften in Bydgoszcz (Polen). Am Jahresende führte Ritter im Diskuswurf (1 kg) die Deutsche U20-Jahresbestenliste mit 53,84 m (Freiluft) als auch mit 49,67 m (Winterwurf) an. 2017 war ihr bis dahin erfolgreichstes Jahr. Im Diskuswurf wurde Ritter Deutsche U20-Winterwurfmeisterin und im Kugelstoßen Deutsche U20-Hallenmeisterin. Bei den Deutschen Hallenmeisterschaften belegte sie im Kugelstoßen den 8. Platz. Im Kugelstoßen sowie im Diskuswurf holte sich Ritter die U20-Meistertitel. Bei den Deutschen Juniorenmeisterschaften wurde sie im Diskuswurf U23-Meisterin und erreichte beim Kugelstoßen den 4. Platz. Durch einen Doppelsieg (Kugel und Diskus) im Mai bei den Halleschen Werfertagen, bei denen Ritter zudem im Diskuswurf mit 55,43 Metern eine neue Bestleistung erzielt hatte, bestätigte sie ihre beiden beim Werfercup in Wiesbaden erfüllten Normen für die U20-Europameisterschaften in Grosseto…"} {"instruction": "Create a Python script to calculate the mode of an integer list.", "input": "[1,1,2,2,2]", "output": "def get_mode(nums):\n # create a dictionary to store count of each number\n counts = {}\n # loop through the list\n for num in nums:\n # add the number to the count if not present\n if num not in counts:\n counts[num] = 1\n # else increment the count\n else:\n counts[num] += 1\n \n # sort the dictionary by count\n sorted_counts = sorted(counts.items(), key=lambda x: x[1], reverse=True)\n \n # get the most frequently occurring number\n mode = sorted_counts[0][0]\n return mode\n\n# test\nnums = [1,1,2,2,2]\nprint(get_mode(nums)) # prints 2"} {"instruction": "Create a password validator program in Python to check if a given password is valid or not.", "input": "", "output": "def is_valid_password(pwd):\n if len(pwd) < 6:\n print(\"Password must be at least 6 characters long.\")\n return False\n\n if not any(char.isdigit() for char in pwd):\n print(\"Password must have at least one number.\")\n return False\n\n if not any(char.isupper() for char in pwd):\n print(\"Password must have at least one uppercase letter.\")\n return False\n\n if not any(char.islower() for char in pwd):\n print(\"Password must have at least one lowercase letter.\")\n return False\n\n return True"} {"instruction": "Develop a program that alters and returns a given string.", "input": "string: \"Python is fun!\"", "output": "\"\"\"\nDevelop a program that alters and returns a given string\n\"\"\"\n\ndef alter_string(string):\n\n # alter the original string \n string_altered = string.replace(\"!\", \"?\")\n\n return string_altered\n\nif __name__ == '__main__':\n string = \"Python is fun!\"\n print(alter_string(string))"} {"text": "[DE Wikipedia] Volyně\n\nVolyně [] (deutsch Wolin) ist eine Stadt in Tschechien. Sie liegt 10 Kilometer südlich von Strakonice und bezeichnet sich als „Tor zum Böhmerwald“ (brána Šumavy). Geographie Geographische Lage Durch die Stadt an der Volyňka führt die Staatsstraße Silnice I/4 zwischen Strakonice und der bayerischen Grenze bei Philippsreut. Gemeindegliederung Zu Volyně gehören die Ortsteile Černětice (Tschernetitz), Račí (Ratschi), Starov (Starau) und Zechovice (Sechowitz). Nachbargemeinden Nachbarorte sind Němětice, Přechovice und Hoštice im Norden, Milejovice im Nordosten, Neuslužice und Litochovice im Osten, Nišovice im Süden, Zechovice und Doubravice u Volyně im Westen sowie Nihošovice im Nordwesten. Geschichte Die erste urkundliche Erwähnung von Volyně stammt aus dem Jahre 1271. Durch das Prager Domkapitel wurden dem Ort im Jahre 1299 Stadtrechte verliehen. Die Stadtbefestigungsanlagen und die Pfarrkirche entstanden 1327. Im 15. Jahrhundert führte Volyně wegen des Salztransportes und Mauteinnahmen eine erfolgreiche Fehde mit der Königsstadt Písek. Auf dem Hügel Malsička entstand 1618 die Kirche der Verklärung des Herrn, eine Hallenkirche im Renaissancestil. In Wolin bestand eine größere jüdische Gemeinde. Nach der Ablösung des Patrimonialherrschaften wurde die Stadt 1850 Sitz eines Gerichtsbezirkes. 1893 wurde die Eisenbahn von Strakonitz nach Winterberg eingeweiht. Kultur und Sehenswürdigkeiten Museen Das Stadtmuseum (městské muzeum) und Kulturzentrum befindet sich an der Školní 744. Bauwerke Rathaus, erbaut 1521–1529, mit Sgraffitifassade Mariensäule auf dem Markt, 1760 nach einem Pestausbruch errichtet Synagoge, erbaut 1838 bis 1840 Jüdischer Friedhof, errichtet im 17. Jahrhundert Regelmäßige Veranstaltungen Koupák smack, 2-tägiges Musikfestival im Juni Söhne und Tochter des Ortes Christian Humpoletz (1712–1783), Zisterzienser, letzter Abt von Baumgartenberg Jan Rubeš (1920–2009), Opernsänger der Stimmlage Bass und Schauspieler Weblinks Informationen über die Stadt (tschechischer Text) Einzelnachweise Ersterwähnung 1271"} {"instruction": "Construct a python dictionary from the following data.", "input": "fruit, apple\nanimal, cat\ncity, London", "output": "mydict = {\n 'fruit': 'apple',\n 'animal': 'cat',\n 'city': 'London'\n}"} {"instruction": "How would you check for syntax errors in a given Java code?", "input": "", "output": "Syntax errors in Java code can be checked by using the Java compiler. The compiler will identify the location and reason for any syntax errors, which can then be corrected. Additionally, IDEs often have built-in syntax checkers that can highlight errors before compilation."} {"instruction": "Write a Python program which prints the first n terms of the Fibonacci sequence.", "input": "n = 10", "output": "def print_fibonacci(n): \n a = 0\n b = 1\n if n < 0: \n print(\"Incorrect input\")\n elif n == 0: \n return a \n elif n == 1: \n return b \n else: \n print(a)\n print(b)\n for i in range(2,n): \n c = a + b \n a = b \n b = c \n print(c)\n \nprint_fibonacci(10)"} {"instruction": "Generate a python program to parse a string and extract the number of vowels.", "input": "Input string: “Hello World!\"", "output": "def count_vowels(s):\n vowels = [\"a\", \"e\", \"i\" , \"o\", \"u\"]\n count = 0 \n for character in s.lower():\n if character in vowels:\n count += 1\n print(\"Number of vowels :\", count)"} {"instruction": "Develop a Python script to print the prime factors of a given positive integer.", "input": "", "output": "def primeFactors(n): \n \n factors = []\n while n % 2 == 0: \n factors.append(2) \n n = n / 2\n \n for i in range(3, int(sqrt(n))+1, 2): \n \n while n % i== 0: \n factors.append(i) \n n = n / i \n \n if n > 2: \n factors.append(n) \n \n return factors \n \nn = 315\nprint(primeFactors(n))"} {"instruction": "Refactor a Python program that prints a sports leaderboard to improve speed and accuracy.", "input": "Example Python program:\n\nscores = [12, 14, 16, 18, 20]\nnames = [\"Ann\", \"Bob\", \"Carol\", \"Dave\", \"Ella\"]\n\nfor i in range(len(scores)):\n print(f\"{i+1}. {names[i]} - {scores[i]} points\")", "output": "scores = [12, 14, 16, 18, 20]\nnames = [\"Ann\", \"Bob\", \"Carol\", \"Dave\", \"Ella\"]\n\n# create a dictionary with name-score pairs\nleaderboard = {names[i]:scores[i] for i in range(len(scores))}\n\n# sort the leaderboard by score\nsorted_leaderboard = sorted(leaderboard.items(), key=lambda x: x[1], reverse=True)\n\n# print the sorted leaderboard\nfor i, (name, score) in enumerate(sorted_leaderboard):\n print(f\"{i+1}. {name} - {score} points\")"} {"instruction": "Write a Python program to implement an algorithm selection sort.", "input": "Not applicable", "output": "def selectionSort(array):\n # loop over the array\n for i in range(len(array)-1):\n # find the minimum element\n minimum = i\n for j in range(i + 1, len(array)): \n if array[minimum] > array[j]: \n minimum = j \n \n # Swap the found minimum element with \n # the first element \n temp = array[i] \n array[i] = array[minimum] \n array[minimum] = temp \n\n# test array\narray = [4, 2, 3, 5, 1]\nselectionSort(array)\n# result\nprint(array)"} {"instruction": "Write a Python program that creates a new dictionary from two existing dictionaries.", "input": "dict1 = {'a':1, 'b':2, 'c':3} \ndict2 = {'d':4, 'e':5, 'f':6}", "output": "dict3 = {key:dict1[key] if key in dict1 else dict2[key] for key in (dict1.keys() | dict2.keys())}"} {"instruction": "Develop a Python function that takes two arrays of equal size as input and returns the sum of the two arrays.", "input": "[1,2,3], [4,5,6]", "output": "def sum_arrays(arr1, arr2):\n result = []\n for i in range(len(arr1)):\n result.append(arr1[i] + arr2[i])\n return result\n\nsummed = sum_arrays([1,2,3], [4,5,6])\nprint(summed)"} {"instruction": "Write a python program to print out the sum of numbers up to an inputted number.", "input": "", "output": "def sum_up(n):\n sum = 0\n for i in range(n + 1):\n sum += i\n return sum\n\nnum = int(input(\"Enter a number: \"))\nprint(\"Sum of numbers up to\", num, \"is\", sum_up(num))"} {"instruction": "Construct a Python class named “Car” that has 3 fields: top_speed, make, and color.", "input": "", "output": "class Car:\n def __init__(self, top_speed, make, color):\n self.top_speed = top_speed\n self.make = make\n self.color = color"} {"instruction": "Develop a Python program that encrypts a given string using 'Caeser Cipher'", "input": "string = 'Hello World'", "output": "def caesarCipherEncryptor(string, key):\n newLetters = []\n newKey = key % 26\n for letter in string:\n newLetters.append(getNewLetter(letter, newKey))\n return ''.join(newLetters)\n \ndef getNewLetter(letter, key):\n newLetterCode = ord(letter) + key\n return chr(newLetterCode) if newLetterCode <= 122 else chr(96 + newLetterCode % 122)"} {"text": "[EN Wikipedia] Gavril Blajek\n\nGavril Blajek (born 23 July 1939) is a Romanian water polo player. He competed in the men's tournament at the 1960 Summer Olympics. References 1939 births Living people Romanian male water polo players Olympic water polo players for Romania Water polo players at the 1960 Summer Olympics People from Brad, Hunedoara Sportspeople from Hunedoara County"} {"text": "[CS Wikipedia] Římskokatolická farnost Mladošovice\n\nŘímskokatolická farnost Mladošovice je územním společenstvím římských katolíků v rámci vikariátu České Budějovice - venkov českobudějovické diecéze. O farnosti Historie V roce 1367 je v Mladošovicích doložena plebánie. Ta později zanikla a do roku 1631 zde duchovní správu zajišťovali augustiniáni-kanovníci z Třeboně. Farnost ve vsi byla obnovena až v roce 1783. Ta přestala být ve 20. století obsazována sídelním duchovním správcem. Současnost Farnost je administrována ex currendo z Borovan. Odkazy Externí odkazy Profil farnosti na webu Českobudějovické diecéze Mladošovice Mladošovice"} {"instruction": "Write a SQL query to find all teachers with more than 10 years of experience.", "input": "", "output": "SELECT * FROM teachers WHERE years_of_experience > 10;"} {"instruction": "Create a function that finds the highest peak in an array of elevation data.", "input": "[9, 10, 12, 15, 7, 8, 11]", "output": "def find_peak(arr): max_h = arr[0] max_i = 0 # traverse the array for i in range(len(arr)): if arr[i] > max_h: max_h = arr[i] max_i = i return max_h, max_i"} {"text": "[CS Wikipedia] Zdeněk Král\n\nZdeněk Král, Ph.D. (* 22. února 1971 Česká Lípa) je český pianista, hudební skladatel a autor dětských knih. Je držitelem několika cen, např. Classic Prague Awards za nejlepší skladbu vážné hudby za rok 2019, Generace (1. a 3. místo), cen Osa za nejúspěšnějšího skladatele vážné hudby 2019 a 2020 /viz níže/. Vystudoval konzervatoř v Teplicích v Čechách (obor kontrabas) Studoval na Konzervatoři Jaroslava Ježka v Praze (obor klavír) Je absolventem JAMU Brno (obor hudební kompozice), tamtéž absolvoval doktorské studium. (Ph.D.) Dílo Zdeněk Král, Ph.D. je autorem hudby k téměř stovce divadelních, filmových a rozhlasových projektů, autorem desítky komorních skladeb (tria, kvartety, sólové skladby, atd.), symfonických a sborových skladeb, oper, muzikálů, písní i šansonů. Natočil 5 sólových klavírních alb, a více než 50 alb s různými interprety, napsal scénickou hudbu k 90 představením, hudbu k filmům Velkofilm, Jako nikdy a Město a ke krátkometrážním snímkům Exchange, Výlet do Paříže a Fake Dragons a hudbu k dokumentu Osud jménem Tugendhat. S Martinem Krajíčkem (mandolína) tvořil duo KK Band. Je členem divadla Komediograf, byl členem seskupení Inspektor Kluzó. Je spoluautorem a jedním z protagonistů pořadu České televize Déčko: Hýbánky. Napsal dětské představení Edison (prem. 19. 6. 2019 ND Brno), knížku pohádek pro děti Tři drakouni, sborník logopedických písniček Žvaní žabák u louže. Dále zpěvníky úprav lidových písní (Písničky pro děti, Písničky o zvířátkách, Nejkrásnější písničky atd.). Je autorem dětské knihy Edison, která vyšla také v ukrajinském a slovenském jazyce. Výběr z hudební tvorby Baron na stromě (symfonický orchestr) Missa brevis (smíšený sbor, sóla, komorní ansámbl) Magnificat (smíšený sbor, varhany) Call me! (symfonický orchestr) Klavírní koncert Houslový koncert Carmina burana 2 - O lidské duši (dětský sbor, sóla, komorní orchestr, big-beatová kapela) Ave verum corpus (soprán, smyčcový kvartet, kontrabas, klavír) Kde domov náš? (klavírní trio) Kvartet (smyčcový kvartet) Otáčím se (smyčcový kvartet) Nekonečné příběhy (smyčcový kvartet, klavír) Oratorium Vánoční zázrak (sbor, sóla, symf. orchestr) Shakespearovské variace (alt solo, klavírní trio) Love Deficience (klavírní trio) Sms Symphony (symf. orchestr) Spain (klavírní trio) Muzikály Jednou budem dál (Petr Michálek, Jan Šotkovský, Zdeněk Král) Orfeus Superstar (Petr Čenský, Zdeněk Král) Interview (Gabriela Petráková, Tomáš Novotný, Marek David, Zdeněk Král) Opery Wheelchair Girl Časožrout v obchoďáku (komorní opera) Čarovná noc (komorní opera) Čertův pramen (komorní opera) Bestie (miniopera) CD piano solo Pianoptikum (piano) You... (piano solo) NAHA (piano solo) Možnosti/Possibilities (piano solo) Zodiac (piano solo) Expectation (piano solo) Ostatní CD KK Band: Šoulet KK Band: Ve…"} {"instruction": "Implement a function that takes two numbers as parameters and returns their difference.", "input": "17, 10", "output": "int difference(int a, int b) { return a - b; }"} {"instruction": "Create a python program to return a new list with each item multiplied by 2 in an existing list.", "input": "[1, 2, 3, 4, 5]", "output": "def mult_by_two(nums): \"\"\" Returns a new list with each item multiplied by 2 in an existing list :param nums: a list of numbers :return: a list of numbers with each item multiplied by 2 \"\"\" new_list = [] for num in nums: new_list.append(num * 2) return new_list if __name__ == '__main__': nums = [1, 2, 3, 4, 5] print(mult_by_two(nums))"} {"text": "[CS Wikipedia] Lukáš Dvořák\n\nLukáš Dvořák (* 1982, Praha) je český fotograf a malíř. Jeho výtvarná díla byla publikována v řadě módních časopisů, včetně Vogue, Harper's Bazaar, Marie Claire, Vanity Fair, Cosmopolitan, Woman, nebo pánských magazínech Playboy a GQ. Život a dílo Narodil se v roce 1982 v Praze. Na počátku své kariéry se věnoval hlavně malbě a hudbě, setkání s fotografií přišlo až v roce 2004. Věnuje se módní fotografii, za kterou odešel do italského Milána. Fotografuje pro řadu módních magazínů jako jsou Harper’s Bazaar, Marie Claire, Vanity Fair, Playboy, GQ, Cosmopolitan, Woman a další. Ve své tvorbě výrazně preferuje černobílou fotografii, která je v jeho podání silně kontrastní a působivá. Jeho snímky charakterizuje intenzivní emotivní a smyslně erotický náboj. Inspiruje se cestováním po světě, kde hledá místa s nejkrásnějším světlem. Lokalita a světlo jsou pro něj stejně důležité jako charizmatické a ženské typy modelek, které fotografuje. Je zastupován galerií Leica Gallery Prague. Bibliografie 2010: First Impression (164 s., vlastní náklad) Výstavy 2004: Lukáš Dvořák - Galerie Nora, Praha, Česko 2005: New Zealand - Café-Bar-Galerie Hidden, Praha 2005: Lukáš Dvořák - Palackého náměstí, Praha 2005: New Zealand - Kulturní centrum Novodvorská, Praha 2009: Lukáš Dvořák - Kongresové Centrum, Praha 2010: Lukáš Dvořák, Festival Internationale de la photographie de mode, Cannes, Francie 2011: Lukáš Dvořák, Prague Photo Festival, Praha 2012: Lukáš Dvořák, Festival Internationale de la photographie de mode, Cannes, France 2014: Lukáš Dvořák, Velvyslanectví v Ghaně, Ghana 2017: Akty, Vnitroblock, Praha Odkazy Reference Literatura Externí odkazy Lukáš Dvořák (oficiální stránky) Lukáš Dvořák na The Creative Finder Lukáš Dvořák Leica Gallery Prague Lukáš Dvořák Lumas Gallery Lukáš Dvořák FOTO pátračka Čeští fotografové Portrétní fotografové Fotografové módy Fotografové aktů Narození v roce 1982 Žijící lidé Muži Narození v Praze"} {"instruction": "Generate a list comprehension in Python that prints the cubes of the first 5 numbers.", "input": "", "output": "[x**3 for x in range(1, 6)]"} {"instruction": "Write a Python program to sort a given array of numbers.", "input": "", "output": "def sort_numbers(arr): \n for i in range(len(arr)): \n min_idx = i \n for j in range(i+1, len(arr)): \n if arr[min_idx] > arr[j]: \n min_idx = j \n arr[i], arr[min_idx] = arr[min_idx], arr[i] \n\narr = [2, 5, 1, 3, 8, 4] \nsort_numbers(arr)"} {"instruction": "Set environment variables for the web application, including debug level, user privileges, limits for mapping and correlation, daily download limit, temporary data lifespan, and various URLs. Also set file paths for various directories and define constants for the website name and port address.", "input": "", "output": "#########################################'\n# Environment Variables - public\n#########################################\n\n#Debug Level\n#1 for debug, mod python will reload import each time\nDEBUG = 1\n\n#USER privilege\nUSERDICT = {'guest':1,'user':2, 'admin':3, 'root':4}\n\n#minimum number of informative strains\nKMININFORMATIVE = 5\n\n#maximum number of traits for interval mapping\nMULTIPLEMAPPINGLIMIT = 11\n\n#maximum number of traits for correlation\nMAXCORR = 100\n\n#Daily download limit from one IP\nDAILYMAXIMUM = 1000\n\n#maximum LRS value\nMAXLRS = 460.0\n\n#temporary data life span\nMAXLIFE = 86400\n\n#MINIMUM Database public value\nPUBLICTHRESH = 0\n\n#NBCI address\nNCBI_LOCUSID = \"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%s\"\nUCSC_REFSEQ = \"http://genome.cse.ucsc.edu/cgi-bin/hgGene?db=%s&hgg_gene=%s&hgg_chrom=chr%s&hgg_start=%s&hgg_end=%s\"\nGENBANK_ID = \"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=Nucleotide&cmd=search&doptcmdl=DocSum&term=%s\"\nOMIM_ID = \"http://www.ncbi.nlm.nih.gov/omim/%s\"\nUNIGEN_ID = \"http://www.ncbi.nlm.nih.gov/UniGene/clust.cgi?ORG=%s&CID=%s\";\nHOMOLOGENE_ID = \"http://www.ncbi.nlm.nih.gov/sites/entrez?Db=homologene&Cmd=DetailsSearch&Term=%s\"\nPUBMEDLINK_URL = \"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=%s&dopt=Abstract\"\nUCSC_POS = \"http://genome.ucsc.edu/cgi-bin/hgTracks?clade=mammal&org=%s&db=%s&position=chr%s:%s-%s&pix=800&Submit=submit\"\nUCSC_BLAT = 'http://genome.ucsc.edu/cgi-bin/hgBlat?org=%s&db=%s&type=0&sort=0&output=0&userSeq=%s'\nUTHSC_BLAT = 'http://ucscbrowser.genenetwork.org/cgi-bin/hgBlat?org=%s&db=%s&type=0&sort=0&output=0&userSeq=%s'\nUCSC_GENOME = \"http://genome.ucsc.edu/cgi-bin/hgTracks?db=%s&position=chr%s:%d-%d&hgt.customText=http://web2qtl.utmem.edu:88/snp/chr%s\"\nENSEMBLE_BLAT = 'http://www.ensembl.org/Mus_musculus/featureview?type=AffyProbe&id=%s'\nDBSNP = 'http://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?type=rs&rs=%s'\nUCSC_RUDI_TRACK_URL = \" http://genome.cse.ucsc.edu/cgi-bin/hgTracks?org=%s&db=%s&hgt.customText=http://gbic.biol.rug.nl/~ralberts/tracks/%s/%s\"\nGENOMEBROWSER_URL=\"http://ucscbrowser.genenetwork.org/cgi-bin/hgTracks?clade=mammal&org=Mouse&db=mm9&position=%s&hgt.suggest=&pix=800&Submit=submit\"\nENSEMBLETRANSCRIPT_URL=\"http://useast.ensembl.org/Mus_musculus/Lucene/Details?species=Mus_musculus;idx=Transcript;end=1;q=%s\"\n\n\nGNROOT = \"/home/zas1024/gene/\" # Will remove this and dependent items later\nSECUREDIR = GNROOT + 'secure/'\nCOMMON_LIB = GN"} {"instruction": "Create a class to represent a two-dimensional vector.", "input": "", "output": "class Vector2D(object): '''Class to represent a two-dimensional vector''' def __init__(self, x, y): self.x = x self.y = y def __add__(self, other): return Vector2D(self.x + other.x, self.y + other.y) def __sub__(self, other): return Vector2D(self.x - other.x, self.y - other.y) def __mul__(self, scalar): return Vector2D(self.x * scalar, self.y * scalar)"} {"instruction": "Construct a parser in Python to read a table from HTML.", "input": " \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    NameAgeCity
    John25New York
    Mary22Chicago
    ", "output": "import lxml.html\n\ndef parse_table(html_str):\n root = lxml.html.fromstring(html_str)\n\n # locate the table\n table = root.xpath('//table')[0]\n\n # collect header names\n header_names = [th.text_content() for th in table.xpath('//th')]\n\n # collect data rows\n data_rows = table.xpath('//tr')[1:]\n data_rows = [[td.text_content().strip() for td in row.xpath('td')]\n for row in data_rows]\n\n # print the result\n print(header_names)\n print(data_rows)"} {"instruction": "Write a Python program to group the values of a given list of elements based on the size of the elements.", "input": "", "output": "\"\"\" Write a Python program to group the values of a given list of elements based on the size of the elements. \"\"\" def group_values(values): result = {} for value in values: size = len(value) if size not in result: result[size] = [] result[size].append(value) return result if __name__ == \"__main__\": values = ['cat', 'dog', 'monkey', 'elephant', 'giraffe'] print(group_values(values))"} {"text": "[HI Wikipedia] उड़न साँप\n\nउड़न साँप क्रिसोपिली (Chrysopelea) जीनस के साँप हैं जो बहुत कम विषैले होते हैं और मनुष्यों के लिए हानिरहित है। ये दक्षिण-पूर्वी एशिया, दक्षिणी चीन, भारत और श्रीलंका में पाए जाते हैं। भारत में ये मध्य भारत, बिहार, उड़ीसा और बंगाल में अधिक पाए जाते हैं। यह बहुत तीव्र गति से चलने की क्षमता रखता है जो इसकी विशिष्टता है। यह अपने शरीर को फुलाकर तथा शरीर को एक विशेष आकार देकर एक डाल से दूसरी डाल पर ग्लाइड कर जाता (कूद जाता) है। इसीलिए इसे 'उड़न साँप' का भ्रामक नाम दिया गया है। यह इस तरह कूदता चलता है मानो उड़ रहा हो। इनका रंग ऊपर से हल्का पीलापन लिए हुए हरा होता है। नियमित दूरियों पर काले रंग की आड़ी पट्टियाँ रहती हैं जो काले सीमांतोंवाले शल्कों के कारण बनी होती हैं। अधरशल्क हरे होते हैं। सिर काला होता है जिसपर साथ साथ पीले या हल्के हरे रंग को आड़ी पट्टियाँ तथा कुछ धब्बे होते हैं। यह साँप छिपकलियों, छोटे स्तनियों, पक्षियों, छोटे साँपों और कीटों को खाता है। यह घरों के आस पास भी कभी कभी दिखाई देता है। यह अंडप्रजक है। यह कभी कभी पेड़ की शाखाओं से लटका भी देखा गया है। बाहरी कड़ियाँ आश्चर्यचकित कर देते हैं उड़ने वाले साँप Flying Snake Home Page naturemalaysia.com's flying snake page Flying Snake Video w/embellished info Researchers reveal secrets of snake flight भारतीय जन्तु सर्प"} {"instruction": "Write a JavaScript program that takes an array as input and prints its contents.", "input": "['Hello','World','!']", "output": "let inputArray = ['Hello', 'World', '!']; for (let i = 0; i < inputArray.length; i++) { console.log(inputArray[i]) }"} {"instruction": "Write an SQL query that calculates the total order value for each delivery zone in the ‘zones’ table.", "input": "", "output": "SELECT zone, SUM(price*quantity) AS 'Total Order Value' FROM orders JOIN zones ON orders.zone_id = zones.zone_id GROUP BY zone;"} {"instruction": "Generate a matrix of random numbers using Python.", "input": "Matrix Size: 20 x 30", "output": "matrix = [[random.random() for j in range(30)] for i in range(20)]"} {"instruction": "Calculate the shortest path from source to destination using Dijkstra's Algorithm.", "input": "graph = { \n 'a': {'b':10, 'c':3}, \n 'b': {'c':1, 'd':2}, \n 'c': {'b':4, 'd':8, 'e':2}, \n 'd': {'e':7}, \n 'e': {'d':9} \n }\n\nsource = a\ndest = d", "output": "\"\"\"\nCalculate the shortest path from source to destination using Dijkstra's Algorithm.\n\"\"\"\n\n# Python program for Dijkstra's single \n# source shortest path algorithm. The program is \n# for adjacency matrix representation of the graph \n \n# Library for INT_MAX \nimport sys \n \nclass Graph(): \n \n def __init__(self, vertices): \n self.V = vertices \n self.graph = graph\n \n # A utility function to find the vertex with \n # minimum distance value, from the set of vertices \n # not yet included in shortest path tree \n def minDistance(self, dist, mstSet): \n \n # Initilaize minimum distance for next node \n min = sys.maxint \n \n # Search not nearest vertex not in the \n # shortest path tree \n for v in range(self.V): \n if dist[v] < min and mstSet[v] == False: \n min = dist[v] \n min_index = v \n \n return min_index \n \n # Funtion that implements Dijkstra's single source \n # shortest path algorithm for a graph represented \n # using adjacency matrix representation \n def dijkstra(self, source): \n \n dist = [sys.maxint] * self.V \n dist[source] = 0\n mstSet = [False] * self.V \n \n for cout in range(self.V): \n \n # Pick the minimum distance vertex from \n # the set of vertices not yet processed. \n # u is always equal to src in first iteration \n u = self.minDistance(dist, mstSet) \n \n # Put the minimum distance vertex in the \n # shotest path tree \n mstSet[u] = True\n \n # Update dist value of the adjacent vertices \n # of the picked vertex only if the current \n # distance is greater than new distance and \n # the vertex in not in the shotest path tree \n for v in range(self.V): \n if self.graph[u][v] > 0 and mstSet[v] == False and dist[v] > dist[u] + self.graph[u][v]: \n dist[v] = dist[u] + self.graph[u][v] \n \n # print the constructed distance array \n print (\"Shortest path from %s to %s is %d\" % (source, dest, dist[dest]))\n \n# Driver program \ngraph = { \n 'a': {'b':10, 'c':3}, \n 'b': {'c':1, 'd':2}, \n 'c': {'b':4, 'd':8, 'e':2}, \n 'd': {'e':7}, \n 'e': {'d':9} \n }\n\ng = Graph(len(graph))\nsource = \"a\"\ndest = \"d\"\ng.dijkstra(graph.index(source))"} {"instruction": "What is the purpose of a join operation in a relational database?", "input": "", "output": "A join operation in a relational database is used to combine data from two or more tables based on a common field. This is done to match and retrieve related data from one or multiple tables and then use it as a single result. The most common type of join is an inner join, which combines only the matching records from both tables. Other types of join operations are left join and right join, which combines all the data from a specified table and contains only the matching data from the other table."} {"instruction": "Write a function in SQL to get the average salary of all engineers whose designation is \"Senior Software Engineer\".", "input": "", "output": "SELECT AVG(salary) FROM engineers WHERE designation = 'Senior Software Engineer';"} {"instruction": "Create a web scraper in Python to extract information from a webpage.", "input": "\"https://www.example.com\"", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nURL = \"https://www.example.com\"\n\npage = requests.get(URL)\nsoup = BeautifulSoup(page.content, 'html.parser')\n \n# extract information by tags\ntitle = soup.find(\"title\")\nheadings = soup.find_all(\"h1\")\nlinks = soup.find_all(\"a\")\n \n# print the extracted data\nprint(\"Title: \", title)\nprint(\"Headings: \")\nfor h in headings:\n print(\"- \", h.text)\nprint(\"Links: \")\nfor link in links:\n print(\"- \", link.text, link.get(\"href\"))"} {"instruction": "The given code is a Python class named \"DepsGraphBuilder\" that is responsible for computing the dependencies graph DepsGraph. To use it, create an instance of the class and call the \"load_graph\" method with a root node, check_updates, update, remotes, and processed_profile as parameters to load the dependencies graph. To extend build requires, call the \"extend_build_requires\" method with a graph, node, build_requires_refs, check_updates, update, remotes, and processed_profile as parameters. The class also has other methods for resolving ranges, handling requirements, configuring nodes, and creating new nodes.", "input": "", "output": "import time\nfrom collections import OrderedDict\n\nfrom conans.client.graph.graph import DepsGraph, Node, RECIPE_EDITABLE\nfrom conans.errors import (ConanException, ConanExceptionInUserConanfileMethod,\n conanfile_exception_formatter)\nfrom conans.model.conan_file import get_env_context_manager\nfrom conans.model.ref import ConanFileReference\nfrom conans.model.requires import Requirements, Requirement\nfrom conans.util.log import logger\n\n\nclass DepsGraphBuilder(object):\n \"\"\" Responsible for computing the dependencies graph DepsGraph\n \"\"\"\n def __init__(self, proxy, output, loader, resolver, recorder):\n self._proxy = proxy\n self._output = output\n self._loader = loader\n self._resolver = resolver\n self._recorder = recorder\n\n def load_graph(self, root_node, check_updates, update, remotes, processed_profile):\n check_updates = check_updates or update\n dep_graph = DepsGraph()\n # compute the conanfile entry point for this dependency graph\n name = root_node.name\n root_node.public_closure = OrderedDict([(name, root_node)])\n root_node.public_deps = {name: root_node}\n root_node.ancestors = set()\n dep_graph.add_node(root_node)\n\n # enter recursive computation\n t1 = time.time()\n self._load_deps(dep_graph, root_node, Requirements(), None, None,\n check_updates, update, remotes,\n processed_profile)\n logger.debug(\"GRAPH: Time to load deps %s\" % (time.time() - t1))\n return dep_graph\n\n def extend_build_requires(self, graph, node, build_requires_refs, check_updates, update,\n remotes, processed_profile):\n\n # The options that will be defined in the node will be the real options values that have\n # been already propagated downstream from the dependency graph. This will override any\n # other possible option in the build_requires dependency graph. This means that in theory\n # an option conflict while expanding the build_requires is impossible\n node.conanfile.build_requires_options.clear_unscoped_options()\n new_options = node.conanfile.build_requires_options._reqs_options\n new_reqs = Requirements()\n\n conanfile = node.conanfile\n scope = conanfile.display_name\n requires = [Requirement(ref) for ref in build_requires_refs]\n self._resolve_ranges(graph, requires, scope, update, remot"} {"instruction": "Create a Python program that finds the longest word in a sentence.", "input": "My name is John", "output": "def find_longest_word(sentence):\n # Split sentence into a list of words\n words = sentence.split()\n # Track the longest word\n longest_word = ''\n # Iterate over the list of words\n for word in words:\n if len(word) > len(longest_word):\n longest_word = word\n # Return the longest word\n return longest_word\n\nprint(find_longest_word(\"My name is John\"))"} {"instruction": "Write a SQL query to count the number of employees in a department with id “IT-006”.", "input": "", "output": "SELECT COUNT(*) FROM Employees WHERE department_id = 'IT-006';"} {"instruction": "Create a simple web page using HTML and CSS to display a list of the top 5 most popular programming languages.", "input": "Not applicable", "output": "\n\n\n Top 5 Programming Languages\n \n\n\n

    Top 5 Programming Languages

    \n
      \n
    • JavaScript
    • \n
    • Python
    • \n
    • Java
    • \n
    • C#
    • \n
    • C++
    • \n
    \n\n"} {"text": "[HI Wikipedia] कराड\n\nकराड भारत के महाराष्ट्र राज्य के सातारा ज़िले में एक नगर और तालुका है। यह नगर कृष्णा नदी तथा कोयना नदी के संगम पर सतारा नगर से 85 किमी दक्षिण-पूर्व में बसा है। कराड को \"यशवंत नगरी\" के नाम से भी जानी जाती है। यह मुम्बई से 320 किमी, सांगली से 45 किमी,और पुणे से 159 किमी दूर है। विवरण इस नगर का स्वायत्त शासन १८८५ ई. में आरंभ हुआ और अब यह एक सुव्यवस्थित नगरपालिका द्वारा शासित होता है। यहाँ की बौद्धकालीन गुफाएँ, मुसलमान-कालीन मस्जिदें और नवीन मंदिर आकर्षण के विशेष केंद्र हैं। कुछ लोग इसे 'करदाह' या 'करहाकादा' के नाम से भी जानते हैं। कराड एक तहसील है साथ ही यहां नगरपालिका भी है, एवं श्री छत्रपति शिवाजी नाम की सब्जी मण्डी भी है। दर्शनीय स्थल कराड में कई जगह पुराने छोटे-छोटे मन्दिर मिल जाते है। कराड के चावड़ी चौक में एक कृष्णाबाई नामक एक उद्यान भी जहां पर यशवंतराव चव्हाण की समाधि बनी हुई ,जहां पर दिनभर लोग आते-जाते रहते है। सिनेमाघर कराड में दो सिनेमाघर है। गुफाएँ कराड में प्राचीन गुफ़ाएँ भी है, साथ ही इनके आसपास उद्यान भी काफी देखने को मिलते है। इन्हें भी देखें कोयना नदी सतारा ज़िला सन्दर्भ सतारा ज़िला महाराष्ट्र के शहर सतारा ज़िले के नगर"} {"instruction": "Create an HTML element that displays text “Welcome” with the color blue.", "input": "", "output": "Welcome"} {"instruction": "Build a Python code to convert a list to a dictionary using the list values as the keys.", "input": "my_list = [\"This\", \"is\", \"a\", \"list\"]", "output": "my_dict = {}\nfor item in my_list:\n my_dict[item] = None\n\nprint(my_dict)"} {"instruction": "Create a SQL query that returns all employees in the \"Marketing\" department.", "input": "", "output": "SELECT * FROM employees WHERE department = 'Marketing';"} {"instruction": "Implement a code in Python for reversing a string.", "input": "", "output": "def reverse_string(string):\n reversed_string = \"\"\n \n for char in string:\n reversed_string = char + reversed_string\n \n return reversed_string"} {"instruction": "Convert the list of numbers into a dictionary where the numeric values are the keys and the corresponding characters are the values.", "input": "num_list = [1, 2, 3] char_list = ['a', 'b', 'c']", "output": "dict_num_char = {num_list[i]: char_list[i] for i in range(len(num_list))} print(dict_num_char)"} {"text": "[HI Wikipedia] गोवा\n\nगोवा या गोआ (कोंकणी: गोंय), क्षेत्रफल के अनुसार से भारत का सबसे छोटा और जनसंख्या के अनुसार चौथा सबसे छोटा राज्य है। पूरी दुनिया में गोवा अपने सुन्दर समुद्र के किनारों और प्रसिद्ध स्थापत्य के लिये जाना जाता है। गोवा पहले पुर्तगाल का एक उपनिवेश था। पुर्तगालियों ने गोवा पर लगभग 450 सालों तक शासन किया और 19 दिसंबर 1961 में यह भारतीय प्रशासन को सौंपा गया। गोवा नाम का उद्भव महाभारत में गोवा का उल्लेख गोपराष्ट्र यानि गोपालकों के देश के रूप में मिलता है। दक्षिण कोंकण क्षेत्र का उल्लेख गोवाराष्ट्र के रूप में पाया जाता है। संस्कृत के कुछ अन्य पुराने स्त्रोतों में गोवा को गोपकपुरी और गोपकपट्टन कहा गया है जिनका उल्लेख अन्य ग्रंथों के अलावा हरिवंशम और स्कंद पुराण में मिलता है। गोवा को बाद में कहीं कहीं गोअंचल भी कहा गया है। अन्य नामों में गोवे, गोवापुरी, गोपकापाटन औरगोमंत प्रमुख हैं। टोलेमी ने गोवा का उल्लेख वर्ष 200 के आस-पास गोउबा के रूप में किया है। अरब के मध्युगीन यात्रियों ने इस क्षेत्र को चंद्रपुर और चंदौर के नाम से इंगित किया है जो मुख्य रूप से एक तटीय शहर था। जिस स्थान का नाम पुर्तगाल के यात्रियों ने गोवा रखा वह आज का छोटा सा समुद्र तटीय शहर गोअ-वेल्हा है। बाद में उस पूरे क्षेत्र को गोवा कहा जाने लगा जिस पर पुर्तगालियों ने कब्जा किया। जनश्रुति के अनुसार गोवा जिसमें कोंकण क्षेत्र भी शामिल है (और जिसका विस्तार गुजरात से केरल तक बताया जाता है) की रचना भगवान परशुराम ने की थी। कहा जाता है कि परशुराम ने एक यज्ञ के दौरान अपने बाणो की वर्षा से समुद्र को कई स्थानों पर पीछे धकेल दिया था और लोगों का कहना है कि इसी वजह से आज भी गोवा में बहुत से स्थानों का नाम वाणावली, वाणस्थली इत्यादि हैं। उत्तरी गोवा में हरमल के पास आज भूरे रंग के एक पर्वत को परशुराम के यज्ञ करने का स्थान माना जाता है। इतिहास गोवा के लंबे इतिहास की शुरुआत् तीसरी सदी इसा पूर्व से शुरू होता है जब यहाँ मौर्य वंश के शासन की स्थापना हुई थी। बाद में पहली सदी के शुरुआत में इस पर कोल्हापुर के सातवाहन वंश के शासकों का अधिकार स्थापित हुआ और फिर बादामी के चालुक्य शासकों ने इस पर वर्ष 580 से 750 तक राज किया। इसके बाद के सालों में इस पर कई अलग अलग शासकों ने अधिकार किया। वर्ष 1312 में गोवा पहली बार दिल्ली सल्तनत के अधीन हुआ लेकिन उन्हें विजयनगर के शासक हरिहर प्रथम द्वार वहाँ से खदेड़ दिया गया। अगले सौ सालों तक विजयनगर के शासकों ने यहाँ शासन किया और 1469 में गुलबर्ग के बहामी सुल्तान द्वारा फिर से दिल्ली सल्तनत का हिस्सा बनाया गया। बहामी शासकों के पतन के बाद बीजापुर के आदिल शाह का यहाँ कब्जा हुआ जिसने गोअ-वेल्हा को अपनी दूसरी राजधानी बनाया। 1510 में, पुर्तगालियों ने एक स्थानीय सहयोगी, तिमैया की मदद से सत्तारूढ़ बीजापुर सुल्तान यूसुफ आदिल शाह को पराजित किया। उन्होंने वेल्हा गोवा में एक स्थायी राज्य की स्थापना की। यह गोवा में पुर्तगाली शासन का प्रारंभ था जो अगली साढ़े चार सदियों तक चला। 1843 में पुर्तगाली राजधानी को वेल्हा गोवा से पंजिम ले गए। मध्य 18 वीं शताब्दी तक, पुर्तगाली गोवा का वर्तमान राज्य सीमा के अधिकांश भाग तक विस्तार किया गया था। भारत ने 1947 में अंग्रेजों से स्वतंत्रता प्राप्त की, भारत ने अनुरोध किया कि…"} {"instruction": "Create a class called \"Animal\" containing three attributes - name, type and age.", "input": "", "output": "class Animal: def __init__(self, name, type, age): self.name = name self.type = type self.age = age"} {"instruction": "Create a program in Python that takes in a text document and counts the number of times a specific word is used in it.", "input": "Text: \"This is a test sentence. This sentence is used for testing.\"\nWord: \"test\"", "output": "text = \"This is a test sentence. This sentence is used for testing.\"\nword = \"test\"\n\ndef count_words(text, word):\n words = text.split()\n count = 0\n for w in words:\n if w == word:\n count += 1\n return count\n\nprint(count_words(text, word)) #2"} {"text": "[HI Wikipedia] इन्दौर\n\nइन्दौर भारत के मध्य प्रदेश राज्य का एक महानगर है। जनसंख्या की दृष्टि से यह मध्य प्रदेश का सबसे बड़ा शहर है, २०११ जनगणना, के अनुसार २१,६७,४४७ लोगों की आबादी सिर्फ ५३० वर्ग किलोमीटर के क्षेत्र में वितरित है। यह मध्यप्रदेश में सबसे अधिक घनी आबादी वाला शहर भी है। यह भारत में टीयर-2 शहरों के अन्तर्गत आता है। इंदौर महानगरीय क्षेत्र (शहर व आसपास के इलाके) की आबादी 3e लाख लोगों के साथ राज्य में सबसे अधिक है। यह इन्दौर जिला तथा इन्दौर संभाग दोनों के मुख्यालय के रूप में कार्य करता है। यह मध्य प्रदेश राज्य की वाणिज्यिक राजधानी भी कहलाती है। इसके साथ ही यह नगर न केवल मध्य प्रदेश बल्कि देश के अन्य क्षेत्रों के लिये शिक्षा के एक केन्द्र के रूप में प्रसिद्ध है। भारत के स्वतन्त्र होने के पूर्व यह यह इन्दौर रियासत की राजधानी था। मालवा पठार के दक्षिणी छोर पर स्थित इंदौर शहर, राज्य की राजधानी भोपाल से १९० किमी पश्चिम में स्थित है। इंदौर को उज्जैन से ओंकारेश्वर की ओर जाने वाले नर्मदा नदी घाटी मार्ग पर एक व्यापार बाजार के रूप में स्थापित किया गया था, वहीं इंद्रेश्वर मंदिर (1741) का निर्माण किया गया, जहाँ से ही पहले इंदूर और बाद में इन्दौर नाम प्राप्त हुआ। मराठा काल में बाजीराव पेशवा ने इस क्षेत्र पर अधिकार प्राप्त कर, अपने सेनानायक मल्हारराव होलकर को यहां का जमींदार बना दिया, जिन्होंने होलकर राजवंश की नींव डाली। होलकर वंश का शासनकाल भारत के स्वतंत्र होने तक रहा। यह मध्य प्रदेश में शामिल होने से पहले ब्रिटिश सेंट्रल इंडिया एजेंसी और मध्य भारत की ग्रीष्मकालीन राजधानी (1948–56) भी था। खान (कान्ह) नदी के तट पर बनी कृष्णापुरा छत्रियाँ, होलकर शासकों को समर्पित हैं। ब्रिटिश काल के समय से ही इन्दौर को एक औद्योगिक शहर के रूप में विकसित किया जाता रहा है। यहाँ लगभग ५,००० से अधिक छोटे-बडे उद्योग हैं। पीथमपुर औद्योगिक क्षेत्र में ४०० से अधिक उद्योग हैं और इनमे १०० से अधिक अंतर्राष्ट्रीय सहयोग के उद्योग हैं। पीथमपुर औद्योगिक क्षेत्र के प्रमुख उद्योग व्यावसायिक वाहन बनाने वाले व उनसे सम्बन्धित उद्योग हैं, इसे \"भारत का डेट्राइट\" भी कहा जाता है। भारत का तीसरा सबसे पुराना शेयर बाजार, मध्यप्रदेश स्टॉक एक्सचेंज इंदौर में स्थित है। औद्योगिक शहर होने के साथ-साथ इन्दौर शिक्षा का भी केन्द्र बन के उभरा है। यह भारत का एकमात्र शहर है, जहाँ भारतीय प्रबन्धन संस्थान (आईआईएम इन्दौर) व भारतीय प्रौद्योगिकी संस्थान (आईआईटी इन्दौर) दोनों स्थापित हैं। प्रधानमंत्री नरेंद्र मोदी के \"स्मार्ट सिटी मिशन\" में १०० भारतीय शहरों को चयनित किया गया है जिनमें से इन्दौर भी एक स्मार्ट सिटी के रूप में विकसित किया जाएगा। स्मार्ट सिटी मिशन के पहले चरण के अंतर्गत २० शहरों को स्मार्ट सिटी के रूप में विकसित किया जायेगा और इंदौर भी इस प्रथम चरण का हिस्सा है। 2021 के स्वच्छता सर्वेक्षण के परिणामों में लगातार पाँचवी बार इन्दौर भारत का सबसे स्वच्छ नगर रहा है। नाम व्युत्पत्ति उज्जैन पर विजय पाने की राह में, राजा इंद्र सिंह ने काह्न नदी (आधुनिक नाम कान(Kahn) और विकृत नाम खान) के निकट एक शिविर रखी और वे इस जगह की प्राकृतिक हरियाली से बहुत प्रभावित हुए। इस प्रकार वह नदियों काह्न और सरस्वती के संगम की जगह पर एक शिवलिंग रखी और १७३१ ई.…"} {"instruction": "Write Python code to generate a random letter from A to Z.", "input": "", "output": "import random\n \ndef generate_random_letter():\n alphabet = list(map(chr, range(65, 91)))\n random_letter = random.choice(alphabet)\n \n return random_letter\n \nrandom_letter = generate_random_letter()\nprint(random_letter)"} {"text": "[HI Wikipedia] दक्षिण कीवू प्रान्त\n\nदक्षिण कीवू प्रान्त (फ़्रान्सीसी: Province du Sud-Kivu, अंग्रेज़ी: South Kivu Province) अफ़्रीका के कांगो लोकतान्त्रिक गणराज्य के पूर्वी हिस्से में स्थित एक प्रान्त है। इसका सीमाएँ कीवू झील से सटी हुई हैं और उसी झील पर इसका और इसके उत्तर में स्थित उत्तर कीवू प्रान्त का नाम पड़ा है। यह दोनों प्रान्त ऐतिहासिक कीवू प्रदेश का हिस्सा हैं जो पूर्वी अफ़्रीकी दरार क्षेत्र का ऊँचाई वाला इलाक़ा है। कीवू झील में स्थित 'इद्ज्वी' नामक द्वीप भी इसी दक्षिण कीवू प्रान्त का प्रशासनिक भाग है। दक्षिण में इसकी पूर्वी सीमाएँ तांगान्यीका झील से भी लगती हैं। कुछ नज़ारे सन्दर्भ दक्षिण कीवू प्रान्त कांगो लोकतान्त्रिक गणराज्य के प्रान्त"} {"text": "[EN Wikipedia] Once Upon ay Time in Mumbai Dobaara!\n\nOnce Upon a Time in Mumbai Dobaara! (; ) is a 2013 Indian Hindi-language gangster film directed by Milan Luthria and produced by Ekta Kapoor and Shobha Kapoor. A sequel to 2010's Once Upon a Time in Mumbaai, the film stars Akshay Kumar, Imran Khan and Sonakshi Sinha, with Sonali Bendre in a special appearance. The film's title is an intentional misspelling of \"Once upon a time in Mumbai Dobaara\", done in accordance with Ekta's belief in numerology and astrology. Filming began on 27 August 2012 in Mumbai, with filming moving to Oman in September, becoming the first major Indian production filmed in the sultanate. Footage was shot in beach in Qantab, Qurum, and at the Shangri-La's Barr Al Jissah Resort & Spa in Muscat. The film's visual effects (VFX) were by Reliance MediaWorks, and a team of 40 artists augmented 600 digital shots in one month. The live action sequences were filmed with RED and Arri's Alexa digital motion-picture camera. Once Upon ay Time in Mumbai Dobaara! was well-promoted, and the film's second trailer was shown on prime-time slots on four television channels. Hollywood actor Al Pacino was shown the theatrical trailer of the film. The film released worldwide on 15 August 2013, on the eve of Independence Day in India. This was later scheduled to avoid clashing with Shah Rukh Khan's Chennai Express, which was released on 9 August. Once Upon ay Time in Mumbai Dobaara! received mixed to negative reviews from critics, and became a box-office failure, despite grossing against a budget of . Plot The film begins where its predecessor ended, with reigning don Shoaib Khan earning respect after his mentor, Sultan Mirza handed over his power to Shoaib in 1975, only to be assassinated by him as revenge for a public humiliation immediately after. Twelve years later, in 1987, Khan is still a charismatic, suave womaniser, who has extended his empire to the Middle East. His only friends are Javed (who oversees his illegal work), his former love Mumtaz, and Aslam, a teenager Khan met during a visit to the slums in which he grew up. An older Khan returns to Bombay to kill Rawal, who opposed his ambition to take the reins in Bombay. Although the city was his first love, rising starlet Jasmine wins his heart. Khan advances Jasmine's career by rigging awards, and showers her with gifts; he becomes obsessed with her. He sends Aslam and another trustworthy aide, Jimmy, to kill Rawal. Jimmy fails, accidentally killing his girlfriend, Mona, and flees. He is soon captured by the police, hot on Khan's trail after learning about his arrival in Bombay. Jimmy, loyal to Khan, does not crack during his interrogation and is freed due to lack of evidence. The police intend to draw Khan out from hiding; he has eluded them for twelve years, and this is their last…"} {"instruction": "Write a recursive python function to generate a Fibonacci sequence up to n number of elements", "input": "", "output": "def fibonacci(n):\n if n == 1:\n return [1]\n elif n == 2:\n return [1, 1]\n else:\n fib_list = fibonacci(n - 1)\n fib_list.append(fib_list[-1] + fib_list[-2])\n return fib_list"} {"instruction": "Create a C++ class called \"TV\".", "input": "", "output": "class TV { public: TV(); // Constructor void turnOn(); void turnOff(); void switchChannel(); };"} {"instruction": "Design a program in Python that outputs the N-th Fibonacci number.", "input": "", "output": "def nth_fibonacci_number(n):\n if n == 0:\n return 0\n if n == 1:\n return 1\n \n a = 0\n b = 1\n for i in range(2, n+1):\n c = a + b\n a = b\n b = c\n \n return c"} {"instruction": "Write a C++ method to calculate the Fibonacci series.", "input": "", "output": "// C++ program to calculate Fibonacci series #include // Fibonacci function int Fibonacci(int n) { if (n <= 1) return n; return Fibonacci(n-1) + Fibonacci(n-2); } int main() { int n; std::cout << \"Enter the number of terms: \"; std::cin >> n; // This loop will print Fibonacci series till n for (int i = 0; i < n; i++) std::cout << Fibonacci(i) << \", \"; std::cout << \"...\" << std::endl; return 0; }"} {"instruction": "Generate a multi-line string in Python.", "input": "", "output": "multi_line_str = ''' \nThis is a multi-line string\nthat spans multiple lines.\n'''"} {"instruction": "Read the given list and return the last element.", "input": "mylist = [1,2,3,4,5]", "output": "5"} {"text": "[CS Wikipedia] Římskokatolická farnost Jiřetín pod Jedlovou\n\nŘímskokatolická farnost Jiřetín pod Jedlovou je církevní správní jednotka sdružující římské katolíky na území obce Jiřetín pod Jedlovou a v jejím okolí. Organizačně spadá do děčínského vikariátu, který je jedním z 10 vikariátů litoměřické diecéze. Centrem farnosti je kostel Nejsvětější Trojice v Jiřetíně pod Jedlovou. Historie farnosti Farnost byla kanonicky zřízena v roce 1611. Matriky jsou vedeny od roku 1650. Duchovní správcové vedoucí farnost Začátek působnosti jmenovaného v duchovní správě farnosti od roku: Kromě kněží stojících v čele farnosti, působili ve farnosti v průběhu její historie i jiní kněží. Většinou pracovali jako farní vikáři, kaplani, katecheté, výpomocní duchovní aj. Území farnosti Do farnosti náleží území obce: Chřibská Nová Ves (Kreibitz Neudörfel) Jedlová (Tannendorf) Jiřetín pod Jedlovou (Sanct Georgenthal) Lesné (Innozenzidorf) Rozhled (Tollenstein) Římskokatolické sakrální stavby na území farnosti Ve farnosti se mohou nacházet i další drobné sakrální stavby, místa římskokatolického kultu a pamětihodnosti, které neobsahuje tato tabulka. Patří mezi ně např. křížová cesta na Křížové hoře. Příslušnost k farnímu obvodu Z důvodu efektivity duchovní správy byl vytvořen farní obvod (kolatura) farnosti – děkanství Varnsdorf, jehož součástí je i farnost Jiřetín pod Jedlovou, která je tak spravována excurrendo. Přehled těchto kolatur je v tabulce farních obvodů děčínského vikariátu. Odkazy Poznámky Reference Související články Děčínský vikariát Křížová hora Seznam obcí v litoměřické diecézi Externí odkazy Profil farnosti v elektronickém katalogu litoměřické diecéze Jiřetín pod Jedlovou Jiřetín pod Jedlovou Jiřetín pod Jedlovou"} {"instruction": "Create a class in Python to represent a student. This class should contain fields for name, age, and a list of subjects taken.", "input": "Not applicable", "output": "class Student:\n def __init__(self, name, age, subjects):\n self.name = name\n self.age = age\n self.subjects = subjects\n \n def getName(self):\n return self.name\n \n def getAge(self):\n return self.age\n \n def getSubjects(self):\n return self.subjects"} {"instruction": "Write a function in Python that takes a number as input and prints out if the number is odd or even.", "input": "Number = 23", "output": "def OddEven(num): if num%2 == 0 : print(\"{} is Even\".format(num)) else : print(\"{} is Odd\".format(num)) OddEven(23)"} {"instruction": "Create an API route in Python that allows users to retrieve the top 5 most recent posts from a blog.", "input": "Blog post data", "output": "import datetime\n\n@app.route('/posts')\ndef get_posts():\n posts = Post.query \\\n .order_by(Post.created_at.desc()) \\\n .limit(5)\n return jsonify([{\n 'title': post.title,\n 'date': post.created_at.strftime('%Y-%m-%d'),\n 'body': post.body\n } for post in posts])"} {"instruction": "Using the data provided, write a Python program to find and print the root of the quadratic equation ax2 + bx + c = 0", "input": "a = 1, b = 5, c = 6", "output": "import math\n\na = 1\nb = 5\nc = 6\n\n# calculate the discriminant\nd = (b**2) - (4*a*c)\n\n# find the two solutions \nsol1 = (-b-math.sqrt(d))/(2*a)\nsol2 = (-b+math.sqrt(d))/(2*a)\n\nprint('The solutions are {0} and {1}'.format(sol1, sol2))"} {"instruction": "Create a script in Python to convert fahrenheit temperatures to celsius.", "input": "", "output": "def fahren_to_celsius(fahren): celsius = (fahren - 32) * (5 / 9) return celsius print(fahren_to_celsius(50)) # Output: 10.0"} {"instruction": "Construct a Genetic Algorithm in Python to minimize the distance from a given set of points to a given reference point", "input": "Points: [(-2, 3), (4, 6), (7, 2)] |Reference Point: (1, 1)", "output": "def genetic_algorithm(points, reference_point):\n # define the search space\n search_space = [np.random.randint(-20, 20) for _ in range(len(points))]\n\n # set the initial minimum distance\n min_distance = float(\"inf\")\n\n # execute the genetic algorithm\n while True:\n # evaluate the search space\n distances = [euclidean_distance(point, reference_point) for point in points]\n new_distance = sum(distances)\n\n # update the min distance\n if min_distance > new_distance:\n min_distance = new_distance\n best_search_space = search_space\n\n # stochastically adjust the search space\n for i in range(len(search_space)):\n search_space[i] += np.random.randint(-3, 3)\n\n # if the new distance is the same as the previous, break the loop\n if new_distance == min_distance:\n break\n\n return best_search_space"} {"instruction": "Write a function to filter a given list such that all any string starting with an 'S' is removed from the list.", "input": "['Swallow', 'Duck', 'Finch', 'Parrot']", "output": "def filter_list(lst): return [elem for elem in lst if not elem.startswith('S')] if __name__ == \"__main__\": print(filter_list(['Swallow', 'Duck', 'Finch', 'Parrot']))"} {"instruction": "Modify the following Python code to reverse the order of the elements in an array", "input": "arr = [1, 2, 3, 4, 5]", "output": "arr = arr[::-1] # Reverses the order of elements in the array."} {"instruction": "Generate a Python code to automatically add an item to the beginning of a given array.", "input": "arr = [1,2,3,4,5]\nnew_item = 7", "output": "def add_item_to_beginning(arr, new_item):\n return [new_item] + arr"} {"instruction": "Generate 10 random numbers between 5 to 10.", "input": "", "output": "import random # Generate 10 random numbers between 5 and 10 random_numbers = [random.randint(5, 10) for _ in range(10)] print(\"The 10 random numbers are: \", random_numbers)"} {"text": "[CS Wikipedia] Hlybokaje\n\nHlybokaje (, – Glubokoje) je město ve Vitebské oblasti v Bělorusku, správní středisko Hlybockého rajónu. K roku 2017 mělo přes devatenáct tisíc obyvatel. Poloha a doprava Hlybokaje leží na západě Vitebské oblasti a od Vitebsku, jejího správního střediska, je vzdáleno zhruba 200 kilometrů západně. Hlybokaje je dopravním uzlem. Ze severu k jihu prochází přes město silnice R3 vedoucí od bělorusko-lotyšské hranice přes Braslaŭ a Šarkouščynu a pokračující přes Dokšycy, Bjahomel a Zembin do Lahojska. Ze západu na severovýchod ji v Hlybokajích křižuje silnice R45 vedoucí od bělorusko-litevské státní hranice (kde je pokračováním silnice z Vilniusu) a pokračující do Polacku. Je zde také železniční stanice na trati z Karaleuščyny do Varapajevy. Dějiny První písemná zmínka je z roku 1414. Rodáci Pavel Suchoj (1895–1975), letecký konstruktér Odkazy Reference Externí odkazy Města v Bělorusku Vitebská oblast"} {"instruction": "Design and develop a CRUD API in Python to store user data in a relational database. The API should include endpoints for creating a new user, updating a user, deleting a user, and listing all users.", "input": "Not applicable", "output": "from flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\n\napp = Flask(__name__)\n\n# configure the database\napp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'\ndb = SQLAlchemy(app)\n\n# create User model\nclass User(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Column(db.String(50), nullable=False)\n \n db.create_all()\n\n# create API endpoints\n@app.route('/users', methods=['POST'])\ndef create_user():\n user = User(name=request.json['name'])\n db.session.add(user)\n db.session.commit()\n return {'id': user.id}\n\n@app.route('/users/int:id', methods=['PUT'])\ndef update_user(id):\n user = User.query.get(id)\n user.name = request.json['name']\n db.session.commit()\n return {'message': 'User updated'}\n\n@app.route('/users/int:id', methods=['DELETE'])\ndef delete_user(id):\n User.query.filter_by(id=id).delete()\n db.session.commit()\n return {'message': 'User deleted'}\n\n@app.route('/users', methods=['GET'])\ndef list_users():\n users = User.query.all()\n return {'users': [user.name for user in users]}\n\nif __name__ == '__main__':\n app.run(debug=True)"} {"text": "[DE Wikipedia] Burtonwood and Westbrook\n\nBurtonwood and Westbrook ist eine Gemeinde (civil parish) in der englischen Unitary Authority Warrington in der Region North West England. Im Jahr 2001 zählte sie 11.265 Einwohner. In Burtonwood befand sich bis 1994 ein Luftwaffenstützpunkt der britischen Royal Air Force, der auch von US-amerikanischen Luftwaffen- und Heereseinheiten benutzt wurde. Teile des Flugplatzes sind mittlerweile mit einer Wohnsiedlung überbaut worden. Geschichte Mit der Industrialisierung wuchs Burtonwoods Bevölkerung von 990 im Jahre 1861 auf 2.408 im Jahre 1911 an. Ein noch größeres Wachstum erfuhr der Ort durch den Zuzug von Militärpersonal nach der Eröffnung des Luftwaffenbasis im Jahre 1940 (1951: 8.238 Einwohner). Nachdem in den 50er Jahren Militär abgezogen wurde, sank die Einwohnerzahl Burtonwoods auf 4.899 im Jahre 1971. Die zivile Nutzung des ehemaligen Militärgeländes und die Errichtung von Siedlungen ließ die Einwohnerzahl wieder stark steigen (auf gegenwärtig über 11.000). Weblinks Einzelnachweise Ort im Borough of Warrington"} {"instruction": "Create a function in Python that adds a new item to the beginning of a list.", "input": "my_list = [\"Cats\", \"Dogs\", \"Fish\"]", "output": "def insert_beginning(my_list, item): my_list = [item] + my_list return my_list"} {"instruction": "Develop an algorithm using Python to optimize the following path planning problem: A robot is placed on an 8x8 grid and needs to find the shortest path to get from point A to point B.", "input": "The 8x8 grid has obstacles located at (1,1), (3,4), (6,4), (7,7).", "output": "import collections\n\n# initialize the queue\nQ = collections.deque()\n# add point A to the queue\nQ.append((0, 0))\n# create a list to hold visited points\nvisited = []\n\n# create the map of the grid\ngrid = [[0, 0, 0, 0, 0, 0, 0, 0],\n [0, 1, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 1, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 1, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 1, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 1, 0]]\n\n# start the breadth-first search\nwhile Q:\n # get the next point in the queue\n x, y = Q.popleft()\n # mark the point as visited\n visited.append((x, y))\n # check if point B has been reached\n if (x, y) == (7, 7):\n break\n # otherwise, explore its neighbors\n if x < 7 and grid[x+1][y] == 0 and (x+1, y) not in visited:\n Q.append((x+1, y))\n if y < 7 and grid[x][y+1] == 0 and (x, y+1) not in visited:\n Q.append((x, y+1))\n if x > 0 and grid[x-1][y] == 0 and (x-1, y) not in visited:\n Q.append((x-1, y))\n if y > 0 and grid[x][y-1] == 0 and (x, y-1) not in visited:\n Q.append((x, y-1))\n\n# the result is a list of points which make up the path\nprint(visited)"} {"instruction": "Create a CSS class to make a
    element have a width of 50%, a height of 75px, and a blue background color.", "input": "", "output": ".divStyle { width: 50%; height: 75px; background-color: blue; }"} {"instruction": "Generate a Python program to generate a random password that contains 8 characters including at least one number, one letter and one special character.", "input": "", "output": "import string\nimport random\n\ndef generate_password():\n letters_and_digits = string.ascii_letters + string.digits\n special_chars = \"!@#$%^&*\"\n chars = letters_and_digits + special_chars\n password = random.choice(string.ascii_lowercase)\n password += random.choice(string.ascii_uppercase)\n password += random.choice(string.digits)\n password += random.choice(special_chars)\n for i in range(4):\n password += random.choice(chars)\n password_list = list(password)\n random.SystemRandom().shuffle(password_list)\n password = ''.join(password_list)\n return password\n\nresult = generate_password()\nprint(result)"} {"text": "[CS Wikipedia] Valivý pohyb\n\nValivý pohyb je druh pohybu tělesa kruhového průřezu po podložce, při kterém nedochází ke smyku (smykovému tření) mezi tělesem a podložkou. Těleso kruhového průřezu je např. válec, koule nebo obruč. Valivý pohyb je pohyb složený z posuvného pohybu a otáčivého pohybu a obvodová rychlost bodů na povrchu tělesa se rovná rychlosti posuvného pohybu. Celková mechanická energie tělesa při valivém pohybu: E = 1/2 m v2 + 1/2 J (v / r)2 kde m je hmotnost tělesa, v je rychlost tělesa, J je moment setrvačnosti tělesa, r je poloměr průřezu tělesa Externí odkazy Kinematika Dynamika"} {"instruction": "Create an array of unique values in JavaScript from the given array.", "input": "[1, 2, 3, 1, 2]", "output": "let array = [1, 2, 3, 1, 2]; let uniqueArray = [...new Set(array)]; console.log(uniqueArray); // [1, 2, 3]"} {"instruction": "Write a script in JavaScript to print the first 20 Fibonacci numbers.", "input": "", "output": "let n1 = 0; let n2 = 1; let n3; console.log(n1 + \" \" + n2); for(let i = 2; i < 20; ++i) { n3 = n1 + n2; console.log(n3); n1 = n2; n2 = n3; }"} {"text": "[HI Wikipedia] खेल\n\nखेल, कई नियमों एवं रिवाजों द्वारा संचालित होने वाली एक प्रतियोगी गतिविधि है। खेल सामान्य अर्थ में उन गतिविधियों को कहा जाता है, जहाँ प्रतियोगी की शारीरिक क्षमता खेल के परिणाम (जीत या हार) का एकमात्र अथवा प्राथमिक निर्धारक होती है, लेकिन यह शब्द दिमागी खेल (कुछ कार्ड खेलों और बोर्ड खेलों का सामान्य नाम, जिनमें भाग्य का तत्व बहुत थोड़ा या नहीं के बराबर होता है) और मशीनी खेल जैसी गतिविधियों के लिए भी प्रयोग किया जाता है, जिसमें मानसिक तीक्ष्णता एवं उपकरण संबंधी गुणवत्ता बड़े तत्त्व होते हैं। सामान्यतः खेल को एक संगठित, प्रतिस्पर्धात्मक और प्रशिक्षित शारीरिक गतिविधि के रूप में परिभाषित किया गया है, जिसमें प्रतिबद्धता तथा निष्पक्षता होती है। कुछ देखे जाने वाले खेल इस तरह के गेम से अलग होते है, क्योंकि खेल में उच्च संगठनात्मक स्तर एवं लाभ (जरूरी नहीं कि वह मौद्रिक ही हो) शामिल होता है। उच्चतम स्तर पर अधिकतर खेलों का सही विवरण रखा जाता है और साथ ही उनका अद्यतन भी किया जाता है, जबकि खेल खबरों में विफलताओं और उपलब्धियों की व्यापक रूप से घोषणा की जाती है। जिन खेलों का निर्णय निजी पसंद के आधार पर किया जाता है, वे सौंदर्य प्रतियोगिताओं और शरीर सौष्ठव कार्यक्रमों जैसे अन्य निर्णयमूलक गतिविधियों से अलग होते हैं, खेल की गतिविधि के प्रदर्शन का प्राथमिक केंद्र मूल्यांकन होता है, न कि प्रतियोगी की शारीरिक विशेषता। (हालाँकि दोनों गतिविधियों में \"प्रस्तुति\" या \"उपस्थिति\" भी निर्णायक हो सकती हैं)। खेल अक्सर केवल मनोरंजन या इसके पीछे आम तथ्य को उजागर करता है कि लोगों को शारीरिक रूप से स्वस्थ रहने के लिए व्यायाम करने की आवश्यकता है। हालाँकि वे हमेशा सफल नहीं होते है। खेल प्रतियोगियों से खेल भावना का प्रदर्शन करने और विरोधियों एवं अधिकारियों को सम्मान देने व हारने पर विजेता को बधाई देने जैसे व्यवहार के मानदंड के पालन की उम्मीद की जाती है। राजस्थान के खेल गिल्ली डंडा और हाथों लिया चार्ली नारियो लुक मिचली प्रसिद्ध खेल रहे हैं इन से शरीर को बहुत फायदा होता था वह रात को सारी बस्ती की लड़कियों और लड़कों के साथ खेलने में मजा ही कुछ और था व्युत्पत्ति \"खेल\" (\"स्पोर्ट\") शब्द की [संस्कृत] शब्द स्पर्ध से उत्पत्ति हुई है, जिसका अर्थ \"प्रतियोगिता\" है। इतिहास प्राप्त कलाकृतियों और ढाँचों से पता चलता है कि चीन के लोग लगभग ४००० ईसा पूर्व से खेल की गतिविधियों में शामिल थे। ऐसा प्रतीत होता है कि चीन के प्राचीन काल में जिम्नास्टिक एक लोकप्रिय खेल था। तैराकी और मछली पकड़ना जैसे खेलों के साथ कई खेल पूरी तरह से विकसित और नियमबद्ध थे। इनका संकेत फराहों के स्मारकों से मिलता है। मिस्र के अन्य खेलों में भाला फेंक, ऊँची कूद और कुश्ती भी शामिल थी। फारस के प्राचीन खेलों में जौरखानेह (Zourkhaneh) जैसा पारंपरिक ईरानी मार्शल आर्ट का युद्ध कौशल से गहरा संबंध था। अन्य खेलों में फारसी मूल के पोलो और खेल में सवारों का द्वंद्वयुद्ध शामिल हैं। प्राचीन यूनानी काल में कई तरह के खेलों की परंपरा स्थापित हो चुकी थी और ग्रीस की सैन्य संस्कृति और खेलों के विकास ने एक दूसरे को काफी प्रभावित किया। खेल उनकी संस्कृति का एक ऐसा प्रमुख अंग बन गया कि यूनान ने ओलिंपिक खेलों का आयोजन किया, जो प्राचीन समय में हर चार साल पर…"} {"instruction": "Create a Python program to implement linear search to find a specified item in an array.", "input": "Array = [1, 2, 3, 4, 5], search_number = 4", "output": "def linear_search(arr, x): \n for i in range(len(arr)): \n if arr[i] == x: \n return i \n return -1\n\narr = [1, 2, 3, 4, 5]\nsearch_number = 4\nresult = linear_search(arr, search_number)\nif result == -1:\n print(\"Number not found in the array\")\nelse:\n print(\"Number found at index:\", result)"} {"instruction": "Construct a query in SQL to find the names of the customers who made purchase on a given date.", "input": "The table name is 'Orders' and the given date is '2020-06-25'.", "output": "SELECT customer FROM orders WHERE date = '2020-06-25';"} {"text": "[CS Wikipedia] Kostel Zvěstování Panny Marie (Horní Cerekev)\n\nKostel Zvěstování Panny Marie (někde uváděn také jako Kostel Zvěstování Páně) je farní kostel v římskokatolické farnosti Horní Cerekev, nachází se v centru města Horní Cerekev na křižovatce ulic Březinova, Havlíčkova a náměstí T. G. Masaryka nedaleko zámku Horní Cerekev a na břehu Zámeckého rybníka. Kostel je trojlodní barokní stavba s pozdně gotickým jádrem s polygonálním závěrem, čtyřbokou věží a renesančním portálem do sakristie. Kostel je chráněn jako kulturní památka České republiky. Pod podlahou kostela jsou kněžšké, panské a měšťanské hrobky. Historie Na místě nynějšího kostela dříve stával dřevěný kostel se dvěma věžemi. Ten byl posléze přestavěn na kamenný, první písemná zmínka o kostele pochází z roku 1384, v tu dobu již kostel měl být farním. Na konci 15. století byl kostel opraven, byla opravena loď kostela a klenba presbytáře. Mezi lety 1547 a 1562 byl kostel výrazně upraven, jednolodní chrám byl přestavěn na trojlodní. Posléze byl kostel upravován ještě v letech 1631 a 1763. Kostel však v roce 1821 vyhořel a byly zničeny obě věže i se zvony, stejně tak shořel i kostel svatého Jana Křtitele. Následně pak byla postavena jen jedna věž. Interiér kostela byl vybaven až v 18. století. V roce 1911 byla na hlavní oblouk v kostelní lodi namalován obraz Večeře Páně od Mikuláše Antonína Číly. V letech 2009 a 2010 došlo k opravě fasády kostela. Odkazy Reference Související články Horní Cerekev Římskokatolická farnost Horní Cerekev Externí odkazy Farnost na stránkách biskupství českobudějovického Zvěstování Panny Marie Horní Cerekev Horní Cerekev Zvěstování Panny Marie Horní Cerekev Kulturní památky v okrese Pelhřimov Stavby v Horní Cerekvi"} {"text": "[CS Wikipedia] Kostel svatého Jiljí (Prosiměřice)\n\nKostel svatého Jiljí je farní kostel v římskokatolické farnosti Prosiměřice, nachází se v centru městyse Prosiměřice. Kostel je dvoulodní stavba s raně gotickým jádrem. Kostel je chráněn jako kulturní památka České republiky. Historie Kostel byl postaven někdy v době před 13. stoletím, kdy první zmínky o kostele pochází z 19. září 1226 v zakládací listině města Znojma. O starších základech kostela svědčí jeho románské základy, v druhé polovině 13. století byl přestavěn do podoby gotické. K dalším úpravám došlo v první polovině 14. století, kdy byl kostel v majetku klášteru Louka. Došlo k zvětšení a zaklenutí presbytáře, přistavení opěrných sloupů a k dalším úpravám. V 15. století pak byl kostel opět upraven a opraven, interiér byl nově vymalován a v roce 1543 byla zaklenuta jižní loď kostela. V osmdesátých letech 16. století pak byl kostel razantně přestavěn, byla zaklenuta hlavní loď kostela, navýšeny stěny kostela a byla zvýšena věž. Okna byla nově upravena z gotických na oblouková a vybudován nový vchod do kaple. Kostel však byl v roce 1620 v době třicetileté války vypálen a vypleněn. Byl však opraven a v roce 1657 nově vysvěcen a byly do něj pořízeny tři oltáře a křtitelnice. Později byl kostel udržován a další velká přestavba kostela proběhla až po roce 1894, kdy podal Leopold Burger návrh na postavení čtyř rohových věžiček a k tomu došlo. Roku 1907 pak byl kostel opět mírně upraven a opraven a po první světové válce byly opraveny vitráže v oknech. V roce 1930 byly pořízeny nové zvony, které však byly v roce 1942 rekvírovány. V roce 1974 pak byl kostel opraven, byly opraveny malby, instalována elektroinstalace a umístěna socha Piety v kněžišti. O rok později byly nalezeny staré prvky ve zdivu a nástěnné malby v presbytáři. V roce 1977 pak byl kostel opět opraven a pod věží bylo objeveno gotické okno a za sanktuariem se nalezly malby ze 14. a 15. století. V roce 1995 pak byla provedena celková oprava kostela. V roce 2008 byly do kostela umístěny tři nové zvony, největší byl pojmenován Bohumil, menší byl pojmenován František a nejmenší byl pojmenován Josef. Požehnání kostela proběhlo 21. září 2008. Odkazy Reference Související články Prosiměřice Římskokatolická farnost Prosiměřice Externí odkazy Farnost na stránkách biskupství brněnského Jiljí Prosiměřice Jiljí Prosiměřice Prosiměřice Kulturní památky v okrese Znojmo Prosiměřice"} {"instruction": "Construct a React component to show an animated loading screen.", "input": "", "output": "import React from 'react'; import { Animate } from '../animations'; class LoadingScreen extends React.Component { render() { return (
    Loading...
    ); } } export default LoadingScreen;"} {"instruction": "Create a Python script to print the sum of all numbers divisible by 3 or 7 in a list.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9 ,10, 11, 12, 13, 14]", "output": "nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n\ntotal = 0\n\nfor num in nums:\n if (num % 3 == 0) or (num % 7 == 0):\n total += num\n\nprint(total) # Output: 42"} {"text": "[DE Wikipedia] Dom St. Peter (Osnabrück)\n\nDer römisch-katholische Dom St. Peter (auch Dom St. Petrus) in Osnabrück ist die Kathedrale des Bistums Osnabrück. Der Dom ist ein spätromanisches Bauwerk und prägt seit seiner Entstehung die Silhouette der Stadt. Hauptpatron ist Sankt Peter. Baugeschichte und Ausstattung Bauwerk Fünfzehn Jahre nach der Bistumsgründung durch Karl den Großen entstand 785 die erste Kirche. Nach Zerstörung durch Normannen im Jahre 890 wurde sie wiederhergestellt. Annähernd so viel Fläche wie die heutige Kirche bedeckte erst die Basilika des 11. Jahrhunderts. Sie hatte einen kreuzförmigen Grundriss und einen mehrgeschossigen Westbau zwischen zwei Türmen. Von ihr erhalten ist Mauerwerk im unteren Teil der Westfassade. Um 1140 wurde der Westchor ausgebaut und mit einem Kreuzgratgewölbe versehen. Im selben Jahrhundert wurde wahrscheinlich auch der Vierungsturm errichtet. Ab 1218 wurden die meisten Teile des Kirchenschiffs umgestaltet: Zuerst wurde das Querhaus ersetzt, dann das Langhaus, das 1272 fertiggestellt wurde. In seinem gebundenen System umfasst das Mittelschiff drei Joche zwischen Westbau und Vierung, die Seitenschiffe je sechs. Seither haben zwar die Außenwände rundbogige Tür- und Fensteröffnungen, wie für die Romanik typisch, aber sämtliche Gewölbe von Langhaus und Querhaus sind Rippengewölbe und spitzbogig, wie es der Gotik entspricht. Spitzbögen haben auch die Arkaden zwischen Mittelschiff und Seitenschiffen und sämtliche Gurtbögen. Bemerkenswert ist, dass die Kuppelgewölbe im Mittelschiff des Langhauses genauso hoch sind wie die Pfeiler, die sie tragen. Durch die Lage der Kämpfer der Mittelschiffsgewölbe treten deren seitliche Schubkräfte so tief auf, dass man es wagen konnte, auf Strebebögen zu verzichten. Ein Brandschaden von 1254 erforderte erhebliche Reparaturen, die Vierung wurde neu eingewölbt und die Vierungspfeiler verstärkt. Der danach begonnene heutige Rechteckchor wurde 1270 fertiggestellt, 1277 der neue Hochaltar geweiht. Chorumgang und Marienkapelle wurden aber erst 150 Jahre später angefügt, 1434 bis 1444. Schon zwischen 1305 und 1350 hatte die Westfassade das große Rosenfenster erhalten. Weitere gotische Fenster bekam die Kathedrale erst 1453. Bischof Konrad III. ließ zwischen 1454 und 1482 das ganze Gebäude gründlich renovieren. 1490 wurde die Kreuzkapelle angebaut. Bis etwa 1500 hatte der Dom zwei gleich große romanische Westtürme. Von 1509 bis 1544 wurde der südliche durch den größeren heutigen gotischen Turm ersetzt und dieser mit einem hohen spitzen Pyramidendach versehen. 1529 musste der Vierungsturm wieder stabilisiert werden. Erst zwei Jahre später erhielt die Kirche ihr heutiges Westportal, nachdem dort die Taufkapelle entfernt worden war. Im Abstand von mehr als anderthalb Jahrhunderten gingen die gotischen Turmhelme der Westtürme…"} {"instruction": "Update the following code to fix a syntax error.", "input": "def add_two_number(a,b): return a + b;", "output": "def add_two_numbers(a, b): return a + b"} {"text": "[CS Wikipedia] Re d'Italia\n\nRe d'Italia byla pancéřová šroubová fregata I. stupně italského královského námořnictva. Její sesterskou lodí byla fregata Re di Portogallo. Obě lodi postavila americká loděnice W. H. Webb v New Yorku. Pod velením kapitána 1. třídy Faà di Bruno byla nasazena při ostřelování ostrova Vis ve dnech 18.–19. června 1866 a bojovala i v následné bitvě s rakouskou eskadrou. Zde ji taranovala a potopila rakouská pancéřová fregata SMS Erzherzog Ferdinand Max. Při potopení lodi zemřeli Faà di Bruno a 381 členů posádky. Literatura Externí odkazy Italské fregaty Lodě přijaté 1864 Lodě potopené 1866"} {"instruction": "Debug the code to fix the error.", "input": "def hi_it(name): print(\"Hi,\" + name) hi_it(\"John\")", "output": "def hi_it(name): print(\"Hi,\" + str(name)) hi_it(\"John\")"} {"instruction": "Modify the given Python program so that it checks the spelling of the given word using an external library.", "input": "word = \"Hello\"", "output": "import spellchecker\n\nword = \"Hello\"\n\ncorrect_word = spellchecker.correction(word)\nif word != correct_word:\n print(\"Did you mean\", correct_word, \"?\")"} {"instruction": "Create a MongoDB query to find all the documents containing the string \"Apple\" in the field \"Company\".", "input": "", "output": "db.collection.find({Company: { $regex: /Apple/ }});"} {"text": "[HI Wikipedia] पिपली\n\nपिपली भारत के हरियाणा प्रान्त का शहर है। राष्ट्रीय राजमार्ग 1 पर बसा यह कस्बा कुरुक्षेत्र का द्वार है तथा यहाँ का बस अड्डा कुरुक्षेत्र हाईवे बस अड्डा के नाम से भी जाना जाता है। हरियाणा के शहर कुरुक्षेत्र"} {"text": "[CS Wikipedia] Preben Elkjær Larsen\n\nPreben Elkjær Larsen (* 11. září 1957) byl dánský fotbalista. Hrával na pozici útočníka. S dánskou fotbalovou reprezentací získal bronzovou medaili na mistrovství Evropy roku 1984 a zúčastnil se i mistrovství světa 1986 (kde se dostal do all-stars a byl vyhlášen 3. nejlepším hráčem turnaje) a evropského šampionátu 1988. Celkem za národní tým odehrál 69 utkání, v nichž vstřelil 38 gólů. S 1. FC Köln se stal mistrem Německa (1978), s Hellasem Verona mistrem Itálie (1985). Roku 1984 byl vyhlášen dánským fotbalistou roku. V anketě Zlatý míč, která hledala nejlepšího fotbalistu Evropy, se ve stejném roce umístil na třetím místě, roku 1985 dokonce na druhém, o rok později na čtvrtém. Po skončení hráčské kariéry se krátce pokoušel o trenérskou dráhu, v letech 1995–1996 vedl Silkeborg IF. Reference Externí odkazy Portrét na stránkách Síně slávy dánského sportu Portrét na Eurofotbal.cz Oficiální stránky Dánští fotbalisté Fotbaloví útočníci Fotbalisté 1. FC Köln Fotbalisté KSC Lokeren Fotbalisté Hellas Verona Fotbalisté Vejle BK Narození v roce 1957 Žijící lidé Muži Dánští fotbaloví trenéři Trenéři Silkeborg IF Bronzoví medailisté z ME ve fotbale Narození 11. září Narození v Kodani Hráči Mistrovství Evropy ve fotbale 1988 Hráči Mistrovství světa ve fotbale 1986 Hráči Mistrovství Evropy ve fotbale 1984"} {"text": "[HI Wikipedia] जाजपुर\n\nजाजपुर (Jajpur) भारत के ओड़िशा राज्य के जाजपुर ज़िले में स्थित एक नगर है। यह उस ज़िले का मुख्यालय भी है। इन्हें भी देखें जाजपुर ज़िला सन्दर्भ जाजपुर ज़िला ओड़िशा के शहर जाजपुर ज़िले के नगर"} {"instruction": "Create a function that prints a provided message 3 times", "input": "message = \"Hello World!\"", "output": "def print_message(message): for i in range(3): print(message)"} {"instruction": "Given a string “Python Exercises”, write a Python function to convert it into “python exercises”.", "input": "", "output": "def convert_string(input_string): \n return input_string.lower()"} {"instruction": "How would you find the frequency of each character in a string using JavaScript?", "input": "string = \"Hello World\"", "output": "function getCharacterFrequencies(string) { let charMap = {}; for (let char of string) { charMap[char] = charMap[char] + 1 || 1; } return charMap; }"} {"instruction": "Find the closest number to given value using a binary search algorithm.", "input": "arr = [2, 4, 7, 10, 11, 12], val = 6", "output": "closest_num = 7 # 10 is the closest number to 6 in the array"} {"text": "[HI Wikipedia] लान्तनौमापुक\n\nलान्तनौमापुक​ (आइसलैण्डी 'Landnámabók' का सही आइसलैण्डी उच्चारण) या लैन्डनामाबोक (अंग्रेज़ी विकृत उच्चारण), जिसे संक्षिप्त रूप से लान्तनौमा (Landnáma) भी कहते हैं, यूरोप के वाइकिंग युग के दौरान 9वीं और 10वीं सदी ईसवी में आइसलैंड में नॉर्स लोगों के आकर बस जाने का ऐतिहासिक वृत्तांत है। यह मध्यकालीन आइसलैण्डी भाषा में लिखा हुआ है। विवरण लान्तनौमा पाँच भागों और 100 से अधिक अध्यायों में बंटा हुआ है। इसके पहले हिस्से में आइसलैंड के पाए जाने और यहाँ बसने वाले पहले लोगों की कहानी है, लेकिन बाद के भागों में पश्चिम से शुरू होकर दक्षिण तक बसने वालों की गिनती की गई है। 12वीं सदी तक बीतने वाली बहुत सी महत्वपूर्ण घटनाओं और पारिवारिक इतिहासों का भी वर्णन है। कुल मिलाकर 3,000 लोग और 1,400 बस्तियों का बखान किया गया है। यहाँ बसने वाले हर व्यक्ति के बारे में लिखा है कि वह कहाँ बसा और उसके आगे कौनसे वंशज हुए। कभी-कभी लोगों और जगहों के बारे में छोटी-छोटी कहानियाँ भी दी गई हैं। लान्तनौमा के अनुसार शुरू में 435 पुरुष यहाँ आकर बसे थे, जिनमें से अधिकतर द्वीप के उत्तरी और दक्षिण-पश्चिमी क्षेत्रों में रहने लगे। लान्तनौमापुक​ को किसने लिखा इस बात को लेकर मतभेद है। कुछ के अनुसार यह एक लेखक का काम है जबकि अन्य का मानना है कि उस काल में हुई सभाओं में सुनाए गए वर्णनों से इसे जोड़-जोड़कर बनाया गया। विभिन्न संस्करण आइसलैंड में नॉर्स लोग यूरोप के वाइकिंग काल के दौरान 870 ईसवी से 930 ईसवी के बीच आकर बसे थे। लान्तनौमापुक​ में उस काल से कहीं बाद के वंशजों के नाम दर्ज हैं इसलिए यह वृत्तान्त उस काल के बाद 11वीं सदी के आसपास ही पूरा हुआ लगता है। वर्तमान में लान्तनौमापुक​ के जो संस्करण बचे हैं वे 13वीं सदी के दूसरे अर्ध के बाद के हैं, हालांकि कुछ इतिहासकारों का मत है कि इन्हें पूर्व रूप में 1068-1148 में जीने वाले आरी थ़ोरगिल्सन (Ari Þorgilsson) ने लिखा था। इस ग्रन्थ के पांच मध्यकालीन रूप मिलते हैं: स्तुरलुपुक (Sturlubók) - स्तुरला थ़ोरदारसन (Sturla Þórðarson) द्वारा कृत। हाउक्सपुक (Hauksbók) - हाउक्र एरलेंदसन (Haukr Erlendsson) द्वारा कृत - यह 'स्तुरलुपुक' और स्तिरमिर कौरासन (Styrmir Kárason) द्वारा लिखित रूपों पर आधारित है। स्तिरमिर कौरासन का संस्करण हमेशा के लिए खोया जा चुका है। मेलापुक (Melabók) स्कार्दसौरपुक (Skarðsárbók) थ़ोरदारपुक (Þórðarbók) इन्हें भी देखें आइसलैंड वाइकिंग सन्दर्भ आइसलैंड आइसलैंड का इतिहास यूरोप का इतिहास वाइकिंग युग"} {"instruction": "Edit the code so it displays the numbers 1 to 5.", "input": "for i in range(2, 10): print(i)", "output": "for i in range(1, 6): print(i)"} {"instruction": "Suggest a suitable algorithm for solving this problem.", "input": "An array of integers is given. Find the highest sum that can be obtained by including different members from the array, such that no two members have the same index.", "output": "We can use the dynamic programming approach to solve this problem. At each step, we calculate the maximum possible sum that can be obtained if we include the current element. We keep track of the maximum sum found so far, and then continue with the next element. At the end, we have the highest sum of elements with no two elements having the same index."} {"text": "[DE Wikipedia] Schwellwerk\n\nDer Begriff Schwellwerk bezeichnet ein Teilwerk einer Orgel, das in seiner Lautstärke durch eine zusätzliche Einrichtung reguliert werden kann. Die Pfeifen dieses Teilwerkes befinden sich in einem geschlossenen Holzkasten, dem Schwellkasten, dessen Vorderseite sich mit Hilfe verschiedener Techniken öffnen und schließen lässt. Eher selten befindet sich das gesamte Orgelwerk in einem Schwellkasten, wie z. B. bei der Hauptorgel der Lutherkirche in Asseln. Bisweilen können auch die Schmalseiten und die Oberseite geöffnet und geschlossen werden. Bedienung Im Normalfall erfolgt das Öffnen und Schließen der Jalousien über einen Fußregler, den Schwelltritt. Dieser Balanciertritt befindet sich etwas oberhalb der Pedaltasten meist etwa in der Mitte der kleinen Oktave, große Orgeln können über mehrere Schwelltritte verfügen. Auch andere Bauformen sind möglich wie etwa der so genannte Löffeltritt der Cavaillé-Coll-Orgel in St. Sulpice (Paris). Dieser Tritt ist nicht ausbalanciert und es gibt drei einrastbare Stellungen: Der Schwellkasten kann nur geschlossen, halb geöffnet oder ganz geöffnet werden. Dies bedingt natürlich eine erhebliche Schwierigkeit, ein homogenes Crescendo bzw. Decrescendo zu erreichen. Ähnlich gestaltete Tritte findet man auch bei Instrumenten Friedrich Ladegasts. Ein Schwellwerk sollte beim Verlassen der Orgel immer geöffnet werden, um Verstimmungen begünstigende Temperaturdifferenzen gegenüber anderen Teilwerken der Orgel zu verhindern, sowie eine gute Durchlüftung zwecks Schimmelvermeidung zu gewährleisten. Konstruktion Eines der gebräuchlichsten Verschlusselemente (auch Schweller genannt) sind Holzjalousien (beim sogenannten Jalousieschweller), jedoch gibt es einige andere Systeme wie Holztüren, die sich zu den Seiten schieben oder falten und so die gesamte Vorderseite freigeben. Der Kasten selbst ist besonders schallisoliert, was je nach Orgelbauer unterschiedlich ausfällt. Die wohl effektivste Methode ist, aus mehreren Holzschichten zwei Wände zu bilden, in deren Zwischenraum Sand eingefüllt wird. Ebenfalls sollten die Holzjalousien aus mehreren Holzschichten recht stark angefertigt werden und ihre Kanten beispielsweise mit Filzstreifen versehen werden, um einen dichten Verschluss zu gewährleisten. Für die gleichmäßige Lautstärkeregelung empfiehlt es sich, den Schwelltritt mechanisch mit den Jalousien zu verbinden und so einzustellen, dass bereits kleine Veränderungen hörbare Auswirkungen auf die Lautstärke haben. Seit dem 19. Jahrhundert werden Orgeln gebaut, bei denen die Jalousien mehrerer Schwellkästen gleichzeitig mit nur einem, Kollektivschweller genannten, Tritt betätigt werden können. Dadurch kann eine erheblich größere Anzahl von Klängen gemeinsam zum Anschwellen gebracht werden. Die Remterorgel des Magdeburger Doms steht…"} {"instruction": "Build a web application in python to display the current temperature in Fahrenheit.", "input": "", "output": "from flask import Flask, request \nfrom requests import get \n\napp = Flask(__name__) \n\n@app.route('/', methods=['GET']) \ndef home():\n api_key = # API key for open weather API\n url = f'http://api.openweathermap.org/data/2.5/weather?q=current&units=imperial&APPID={api_key}'\n output = request.get(url).json()\n temp = output['main']['temp']\n return f\"The current temperature in Fahrenheit is {temp} F\"\nif __name__ == '__main__': \n app.run(debug=True, host='0.0.0.0', port=8989)"} {"instruction": "Develop a Python program that takes a list of words in variable ‘words’ and creates a new variable with the length of each word.", "input": "words = [\"Hello\", \"World\", \"I\", \"Love\", \"You\"]", "output": "word_lengths = [len(word) for word in words]\n\nprint(word_lengths) # [5, 5, 1, 4, 3]"} {"instruction": "Given a sorted list of integers, write a Python function to search for a specific target element.", "input": "", "output": "def binary_search(list, target): low = 0 high = len(list) - 1 while low <= high: mid = (low + high) // 2 if list[mid] < target: low = mid + 1 elif list[mid] > target: high = mid - 1 else: return mid return False"} {"text": "[EN Wikipedia] Gmina Sońsk\n\nGmina Sońsk is a rural gmina (administrative district) in Ciechanów County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Sońsk, which lies approximately south-east of Ciechanów and north of Warsaw. The gmina covers an area of , and as of 2006 its total population is 8,047 (7,938 in 2013). Villages Gmina Sońsk contains the villages and settlements of Bądkowo, Bieńki-Karkuty, Bieńki-Skrzekoty, Bieńki-Śmietanki, Burkaty, Chrościce, Chrościce-Łyczki, Cichawy, Ciemniewko, Ciemniewo, Damięty-Narwoty, Drążewo, Gąsocin, Gołotczyzna, Gutków, Kałęczyn, Komory Błotne, Komory Dąbrowne, Kosmy-Pruszki, Koźniewo Średnie, Koźniewo Wielkie, Koźniewo-Łysaki, Łopacin, Marusy, Mężenino-Węgłowice, Niesłuchy, Olszewka, Ostaszewo, Pękawka, Sarnowa Góra, Skrobocin, Ślubowo, Soboklęszcz, Sońsk, Spądoszyn, Strusin, Strusinek, Szwejki and Wola Ostaszewska. Neighbouring gminas Gmina Sońsk is bordered by the gminas of Ciechanów, Gołymin-Ośrodek, Gzy, Nowe Miasto, Ojrzeń, Sochocin and Świercze. References Polish official population figures 2006 Sonsk Ciechanów County"} {"instruction": "Write a SQL query to retrieve all rows from the table 'movies' whose genre is 'comedy'", "input": "", "output": "SELECT * FROM movies WHERE genre = 'comedy';"} {"instruction": "Write a Python program that takes two lists as input and merges the values from both these lists into the third list.", "input": "list1 = [1, 2, 3, 4, 5]\nlist2 = [6, 7, 8, 9, 0]", "output": "list3 = []\n\nlist3.extend(list1)\nlist3.extend(list2)\n \nprint(list3)"} {"instruction": "Incorporate the PUT method in the given URL.", "input": "URL: https://example.com/users", "output": "https://example.com/users/PUT"} {"instruction": "Write a query in Python to count the total number of times a value appears in a specific column of a table.", "input": "Table: \"mytable\"\nColumn: \"mycolumn\"\nValue: \"myvalue\"", "output": "SELECT COUNT(mycolumn)\n FROM mytable\n WHERE mycolumn = 'myvalue'"} {"text": "[CS Wikipedia] Stupeň B1039 Falconu 9\n\nStupeň B1039 Falconu 9 je první stupeň rakety Falcon 9 verze Block 4 vyráběné společností SpaceX. Poprvé tento první stupeň letěl v srpnu 2017 při misi CRS-12, kdy po vynesení nákladu úspěšně přistál na pevninské ploše Landing Zone 1. Následně byl stupeň zrenovován a letěl znovu při misi CRS-14. Jelikož se u verze Block 4 nepočítalo s více než dvěma lety, tak nebyl provrden pokus o přistání. Historie letů Odkazy Reference Související články Grasshopper (SpaceX) New Shepard (Blue Origin) Externí odkazy B1039"} {"instruction": "Create a Python program that takes an array with n elements and returns the index of the element which appears the maximum number of times.", "input": "n = 8", "output": "def max_frequency_index(lst): \n dct = dict() \n\n for i in range(len(lst)): \n if lst[i] in dct: \n dct[lst[i]] += 1\n else: \n dct[lst[i]] = 1\n max_freq = 0\n max_freq_index = 0\n\n for i in dct: \n if dct[i] > max_freq: \n max_freq = dct[i] \n max_freq_index = lst.index(i) \n \n return max_freq_index \n \n# Driver Code \nlst = [1, 2, 3, 2, 4, 1, 2, 5]\n\n# Find the index of element which has maximum frequency \nprint(max_frequency_index(lst))"} {"instruction": "Create a JavaScript script to toggle a class on the page.", "input": "
    Hello World!
    ", "output": ""} {"text": "[CS Wikipedia] Československo\n\nČeskoslovensko (v některých obdobích Česko-Slovensko) byl stát ve střední Evropě, který existoval v letech 1918–1992, s výjimkou období druhé světové války (1939–1945), kdy však měl svoji exilovou vládu v zahraničí. Země zahrnovala území Čech, Moravy, českého Slezska, Slovenska a do roku 1939 i Podkarpatské Rusi. Československý stát vznikl 28. října 1918, kdy vyhlásil nezávislost na Rakousku-Uhersku. Následné meziválečné období je označováno jako první republika, výraznou politickou osobností této doby byl první československý prezident Tomáš Garrigue Masaryk. Po mnichovské dohodě v roce 1938 se pohraniční Sudety staly součástí Německa a země přišla i o další území ve prospěch Maďarska a Polska. V březnu 1939 vyhlásilo svou nezávislost Slovensko a Podkarpatská Rus byla obsazena Maďarskem. Na zbytku českých zemí byl vyhlášen Protektorát Čechy a Morava, formálně autonomní část nacistického Německa. Po vypuknutí druhé světové války sestavil v říjnu 1939 bývalý československý prezident Edvard Beneš exilovou vládu, která byla posléze uznána spojenci. Po druhé světové válce byl československý stát v roce 1945 obnoven v hranicích, které měl před rokem 1938, s výjimkou Podkarpatské Rusi, která se stala součástí Sovětského svazu. V letech 1948 až 1989 bylo Československo součástí východního bloku s řízenou ekonomikou, vládla zde komunistická strana. Země byla od roku 1949 součástí ekonomické Rady vzájemné hospodářské pomoci a od roku 1955 vojenské Varšavské smlouvy. Politickou liberalizaci v roce 1968 (pražské jaro) násilně ukončila v srpnu 1968 invaze vojsk Varšavské smlouvy pod vedením Sovětského svazu. Následovala doba tzv. normalizace, která byla zakončena v listopadu 1989 pokojnou sametovou revolucí, jež se uskutečnila v období pádu komunismu ve střední a východní Evropě. Po sesazení vlády komunistické strany se Československo stalo demokratickým státem, v čele s prezidentem Václavem Havlem. Zaniklo 31. prosince 1992 rozdělením na suverénní státy, Česko a Slovensko. Název 1918–1938: Československá republika (zkráceně ČSR), nebo Československo, před formalizací názvu v roce 1920, známé také jako Česko-Slovensko nebo Česko-Slovenský stát. 1938–1939: Česko-Slovenská republika nebo Česko-Slovensko 1945–1960: Československá republika (ČSR) nebo Československo 1960–1989: Československá socialistická republika (ČSSR) nebo Československo 1990–1992: Česká a Slovenská Federativní Republika (ČSFR) nebo Československo Oficiální název státu procházel vývojem dle toho, jak se měnilo jeho politické zřízení. Oficiální název v letech 1918 až 1920 byl Republika Československá (RČS) nebo Česko-Slovenský stát. V letech 1920 až 1938 se používal název Československá republika (ČSR). Ještě během dvacátých let se ale běžně objevovalo i označení Československý stát. Za druhé…"} {"instruction": "Write a SQL query to get all the users who have registered in the last 7 days.", "input": "", "output": "SELECT * FROM Users WHERE registration_date > DATE_SUB(CURDATE(), INTERVAL 7 DAY);"} {"text": "[EN Wikipedia] Liudvikas Strolis\n\nLiudvikas Strolis (1905–1996) is a Lithuanian ceramist. See also List of Lithuanian artists References 1905 births 1996 deaths 20th-century Lithuanian artists Soviet artists"} {"instruction": "Create an HTML layout for a website. Make sure the layout has a header, a navigation menu, and a footer.", "input": "", "output": " Webpage Layout

    Header

    Footer

    "} {"instruction": "Create a sorting algorithm for an array that only needs 1 iteration", "input": "", "output": "def one_iteration_sort(arr): for i in range(len(arr)): min_index = i for j in range(i, len(arr)): if arr[j] < arr[min_index]: min_index = j arr[i], arr[min_index] = arr[min_index], arr[i]"} {"text": "[DE Wikipedia] (4092) Tyr\n\n(4092) Tyr ist ein Hauptgürtelasteroid, der am 8. Oktober 1982 von dem dänischen Astronomen Poul Jensen vom Brorfelde-Observatorium aus entdeckt wurde. Der Asteroid wurde nach Tyr benannt, dem Gott des Kampfes und Sieges in den altisländischen Schriften der Edda. Weblinks Hauptgürtelasteroid unter 50 km Durchmesser"} {"instruction": "Create a function in Python for replacing a substring with another substring", "input": "String: \"Hello world!\"\nSubstring to replace: \"world\"\nSubstring to replace with: \"universe\"", "output": "def replace_substring(string, old, new):\n new_string = \"\"\n for word in string.split():\n if word == old:\n new_string += new + \" \"\n else:\n new_string += word + \" \"\n return new_string.rstrip()\n\nstring = \"Hello world!\"\nnew_string = replace_substring(string, \"world\", \"universe\")\n\nprint(new_string) # \"Hello universe!\""} {"instruction": "Generate a function in Python to compute the area of a rectangle.", "input": "", "output": "def area_rectangle(length, breadth): return length * breadth"} {"instruction": "Construct a Python script to normalize a given vector.", "input": "[2, 3, 4]", "output": "def normalize_vector(v):\n norm = 0\n for x in v:\n norm += x**2\n norm = norm**0.5\n for i in range(len(v)):\n v[i] = v[i] / norm\n return v\n\nresult = normalize_vector([2, 3, 4])\nprint(result) # [0.37139068, 0.55708601, 0.74278135]"} {"instruction": "Are string and array objects mutable or immutable in JavaScript?", "input": "", "output": "In JavaScript, strings and arrays are both mutable objects. This means that these objects can be changed after they have been created, and can be modified in place. Other primitive data types, such as numbers and booleans, are immutable and cannot be changed after they have been created."} {"instruction": "Construct a query in MongoDB to select documents with a value greater than 3 for the property \"value\".", "input": "", "output": "db.collection.find( { value: { $gt: 3 } } )"} {"instruction": "Generate a Python program to find the closest pair of points in a two-dimensional plane.", "input": "", "output": "import math\n\n# List of points\npoints = [[2, 3], [12, 30], [40, 50], [5, 1], [12, 10], [3, 4]]\n\n# Initialize variables \nmin_distance = float('inf')\nclosest_pair = ()\n\n# Loop through points\nfor i in range(len(points)):\n for j in range(i+1, len(points)):\n # calculate the distance\n distance = math.sqrt((points[i][0]-points[j][0])**2 + (points[i][1]-points[j][1])**2)\n\n # check if the distance is less than the minimum distance\n if distance < min_distance:\n min_distance = distance\n closest_pair = (points[i], points[j])\n\n# Print the closest pair\nprint(\"The closest pair of points is:\", closest_pair)"} {"instruction": "Find the closest decimal approximation of 0.875.", "input": "", "output": "0.88"} {"instruction": "Design a solution in JavaScript to find the kth smallest element in an unsorted array.", "input": "arr = [8, 5, 7, 2, 3, 1, 9, 4] k = 3", "output": "function kthSmallest(arr, k) { // Sort the array arr.sort((a, b) => a - b); // Return kth element in the sorted array return arr[k - 1]; }"} {"instruction": "Write code to calculate the mean of two numbers", "input": "numbers = [4, 6]", "output": "def mean(numbers): \"\"\"Calculate the mean of two numbers\"\"\" return sum(numbers) / len(numbers)"} {"instruction": "Implement a method that reverses a linked list", "input": "head = 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> null", "output": "// A linked list node class Node: # Constructor to create a new node def __init__(self, data): self.data = data self.next = None # Function to reverse the linked list def reverse(head): prev = None current = head while(current is not None): next = current.next current.next = prev prev = current current = next head = prev return head"} {"instruction": "Write a Python program to implement a text-based game", "input": "", "output": "import random def intro(): print(\"Welcome to the game! You are stuck in a dungeon and must find a way out. Type 'help' for instructions.\") def help_command(): print(\"Type 'north', 'south', 'west', or 'east' to move in that direction. Type 'check inventory' to view items in your inventory. Type 'quit' to quit.\") def move(direction): if direction == 'north': print(\"You moved north.\") elif direction == 'south': print(\"You moved south.\") elif direction == 'west': print(\"You moved west.\") elif direction == 'east': print(\"You moved east.\") def check_inventory(): print(\"You have nothing in your inventory.\") def quit_game(): print(\"Thanks for playing!\") return False intro() playing = True while playing: command = input(\"What would you like to do? > \").lower() if command == 'help': help_command() elif command == 'north' or command == 'south' or command == 'west' or command == 'east': move(command) elif command == 'check inventory': check_inventory() elif command == 'quit': playing = quit_game()"} {"text": "[EN Wikipedia] 1924 United States presidential election in Indiana\n\nThe 1924 United States presidential election in Indiana took place on November 4, 1924, as part of the 1924 United States presidential election which was held throughout all contemporary 48 states. Voters chose 15 representatives, or electors to the Electoral College, who voted for president and vice president. Indiana voted for the Republican nominee, incumbent President Calvin Coolidge of Massachusetts, over the Democratic nominee, Ambassador John W. Davis of West Virginia. Coolidge ran with former Budget Director Charles G. Dawes of Illinois, while Davis ran with Governor Charles W. Bryan of Nebraska. Also in the running that year was the Progressive Party nominee, Senator Robert M. La Follette of Wisconsin and his running mate Senator Burton K. Wheeler of Montana. However, owing to Indiana’s strong Southern leanings, the conservatism of its German Catholic counties, and the dominance of the Ku Klux Klan, the state was one of La Follette’s weakest nationally. Coolidge won the state by a margin of 16.56%; however, Indiana was easily Davis’ strongest antebellum free state, voting around 9 points more Democratic than the nation at-large. this is the last occasion Indiana has voted more Democratic than the nation, as well as more Democratic than neighboring Illinois. Results Results by county See also United States presidential elections in Indiana Notes References Indiana 1924"} {"instruction": "Output the string \"Programming is Fun\" when you run the code?", "input": "", "output": "print('Programming is Fun')"} {"instruction": "Find the lowest common multiple of two numbers a and b.", "input": "a = 12, b = 15", "output": "def lcm(a, b): lcm_num = (a * b) // math.gcd(a, b) return lcm_num lcm(12, 15) # 60"} {"instruction": "Construct a class in Python named \"Person\" which stores first name and last name in instance variables", "input": "", "output": "class Person: def __init__(self, first_name, last_name): self.first_name = first_name self.last_name = last_name"} {"instruction": "Find the sum of all odd numbers between 1-100.", "input": "", "output": "The sum of all odd numbers between 1-100 is 2500."} {"instruction": "Read an array of integers and sort it in increasing order.", "input": "arr = [3, 1, 4, 5, 2]", "output": "def sortArray(arr): n = len(arr) for i in range(n): for j in range(0, n-i-1): if arr[j] > arr[j+1] : arr[j], arr[j+1] = arr[j+1], arr[j] sortArray(arr) print(arr) # Output: [1, 2, 3, 4, 5]"} {"text": "[HI Wikipedia] रतनजी टाटा\n\nसर रतनजी टाटा (२० जनवरी १८७१ ई. - ५ सितंबर १९१८ ई.) भारत के सुविख्यात पारसी उद्योगपति और जनसेवी जमशेदजी नासरवान जी टाटा के पुत्र। उन्होने भारत में टाटा समूह के विकास में एक निर्णायक भूमिका निभाई थी। परिचय जन्म २० जनवरी १८७१ ई. को बंबई में हुआ था। बंबई के सेंट जेवियर कालेज में अध्ययन कर पिता की योजनाओं को सफल बनाने में भाई की पूरी सहायता की। सन् १९०४ ई. में जब पिता की मृत्यु हुई इन्हें और इनके भाई सर दोराब जी जमशेद जी टाटा को अपार वैभव और संपदा उत्तराधिकार में प्राप्त हुई। टाटा ऐंड कंपनी के साझीदार होने के साथ ही ये इंडियन होस्टल्स कंपनी लिमिटेड, टाटा लिमिटेड, लंदन टाटा आयरन ऐंड स्टील वर्क्स साकची, दि टाटा हाइड्रो इलेक्ट्रिक पावर सप्लाई कंपनी लिमिटेड, इंडिया, के डाइरेक्टर भी थे। पिता से प्राप्त संपति का इन्होंने औद्योगिक विकास के कार्यों के साथ-साथ समाजसेवा के कार्यों में उपयोग किया। १९१२ ई. में लंदन स्कूल ऑव इकानॉमिक्स में अपने नाम से सामाजिक विज्ञान और शासन का एक विभाग स्थापित किया। उसी वर्ष निर्धन छात्रों की स्थितियों के अध्ययनार्थ लंदन विश्वविद्यालय में एक रतन टाटा फंड की भी स्थापना की। इनके नाम से एक दानकोश की भी स्थापना हुई। इनका देहांत ५ सितंबर १९१८ ई. को कार्नवाल में हुआ।रतन टाटा अभी बाहरी कड़ियाँ Sir Ratan Tata Biography SRT Trust website Sir Ratan Tata Trust Official website भारतीय व्यवसायी भारतीय उद्योगपति टाटा परिवार"} {"text": "[HI Wikipedia] उपसौर और अपसौर\n\nउपसौर और अपसौर (Perihelion and Aphelion), किसी ग्रह, क्षुद्रग्रह या धूमकेतु की अपनी कक्षा पर सूर्य से क्रमशः न्यूनतम और अधिकतम दूरी है। सौरमंडल में ग्रह सूर्य की परिक्रमा करते हैं, कुछ ग्रहों की कक्षाएं करीब-करीब पूर्ण वृत्ताकार होती है, लेकिन कुछ की नहीं।| कुछ कक्षाओं के आकार अंडाकार जैसे ज्यादा है या इसे हम एक खींचा या तना हुआ वृत्त भी कह सकते हैं। वैज्ञानिक इस अंडाकार आकार को \"दीर्घवृत्त\" कहते हैं। यदि एक ग्रह की कक्षा वृत्त है, तो सूर्य उस वृत्त के केंद्र पर है। यदि, इसके बजाय, कक्षा दीर्घवृत्त है, तो सूर्य उस बिंदु पर है जिसे दीर्घवृत्त की \"नाभि\" कहा जाता है, यह इसके केंद्र से थोड़ा अलग है। एक दीर्घवृत्त में दो नाभीयां होती है। चूँकि सूर्य दीर्घवृत्त कक्षा के केंद्र पर नहीं है, ग्रह जब सूर्य का चक्कर लगाते है, कभी सूर्य की तरफ करीब चले आते है तो कभी उससे परे दूर चले जाते हैं। वह स्थान जहां से ग्रह सूर्य से सबसे नजदीक होता है उपसौर कहलाता है। जब ग्रह सूर्य से परे सबसे दूर होता है, यह अपसौर पर होता है। #जब पृथ्वी उपसौर पर होती है, यह सूर्य से लगभग 14.7 करोड़ कि॰मी॰(3 जनवरी) (9.1 करोड़ मील) दूर होती है। इस दौरान 7% अधिक सौर विकिरण पृथ्वी पर प्राप्त होती है। उपसौर की स्थिति उत्तरी गोलार्द्ध में सर्दियों (शीत) की तीव्रता को कम कर देती है और यह दक्षिणी गोलार्द्ध में ग्रीष्म ऋतू की तीव्रता को बढ़ाती है। उपसौर की स्थिति सामान्यतः 2 जनवरी से 5 जनवरी के बीच बनती है लेकिन यह स्थितियां हर वर्ष बदलती रहती है। #जब अपसौर पर होती है, सूर्य से 15.2 करोड़ कि॰मी॰ (9.5 करोड़ मील) दूर होती है। पृथ्वी, अपसौर (4 जुलाई)पर उपसौर पर की अपेक्षा सूर्य से 50 लाख कि॰मी॰ (30 लाख मील) ज्यादा दूर होती है। इस दौरान सामान्य से 7% कम सौर विकिरण पृथ्वी पर प्राप्त होती है। अपसौर की स्थिति उत्तरी गोलार्द्ध में ग्रीष्म ऋतु की तीव्रता को कम करती है तथा दक्षिणी गोलार्द्ध में शीत (सर्दी) ऋतु की तीव्रता को बढ़ती है। शब्दावली यदि निकाय सूर्य के अलावा किसी अन्य की परिक्रमा करता है, तब उपसौर और अपसौर शब्दों का प्रयोग नहीं करते हैं। पृथ्वी का चक्कर लगाते कृत्रिम उपग्रह (साथ ही चन्द्रमा भी) का नजदीकी बिंदु उपभू (perigee) और दूरस्थ बिंदु अपभू (apogee) कहलाता है। अन्य पिंडों का चक्कर लगाते निकाय के लिए इस सम्बन्ध में प्रयोगात्मक शब्द इस प्रकार है :- सन्दर्भ इन्हें भी देखें अपसौरिका अयनान्त खगोलशास्त्र सूर्य कक्षाएँ (भौतिकी)"} {"instruction": "Create a program in Python that takes a text and tokenizes it into words.", "input": "text = \"This is an example of tokenization\"", "output": "import re \n\n#Replace special characters with space \ntext = re.sub(r'[^\\w\\s]',' ',text)\n#Split text \ntokens = text.split() \n\nprint(tokens)\n#Output: ['This', 'is', 'an', 'example', 'of', 'tokenization']"} {"text": "[DE Wikipedia] Coultas\n\nCoultas ist der Familienname folgender Personen: Brenda Coultas (* 1958), US-amerikanische Schriftstellerin Rowan Coultas (* 1997), britischer Snowboarder"} {"text": "[EN Wikipedia] Z-TER (Z 21500)\n\nThe Z-TER (Z 21500) is a French model of electric multiple unit regional passenger train, manufactured by Alstom and Bombardier Transportation, and operated by SNCF. They are used on regional links, and can be coupled with another Z-TER. They are derived from the French diesel passenger regional train \"X-TER\" (X 72500), and is the first regional train to reach 200 km/h. Their main characteristic is their ability to travel at 124.27 mph, which constitutes a first for TER self-propelled equipment. This ability, used every day over several sections of conventional lines, is also operated for the first time on a high speed line since 2017. This is a first in France, thanks to a adaptation of eight of these elements to signaling specific to LGVs, then renumbered as Z 21700. As other regional trains, they are owned by the French regions, and are dispatched as : 19 \"Pays de la Loire\" region 15 \"Centre\" region 6 \"Aquitaine\" region 17 \"Bretagne\" region Timeline From 2002 to 2004: delivery of 57 copies to the PoitouCharentes, Aquitaine, Centre, Pays de la Loire and Brittany. 2009: The Poitou-Charentes region sells its five elements to the Pays region of the Loire, carrying the park of its last 19 units. 2014: The Aquitaine region sells its six elements to the Centre, Brittany and Pays de la Loire, at the rate of two items by region. The park is then holds more than these last three regions. 2015 to 2016: Transportation of eight vehicles in the Pays de la Loire park in Z-21700. 2017: Circulation of Z-21700 on the LGV Bretagne-Pays de la Loire and on the Sablé comma ensuring TER Nantes - Rennes via Sable See also List of high speed trains References High-speed trains of France Passenger trains running at least at 200 km/h in commercial operations Electric multiple units of France Transport express régional 25 kV AC multiple units 1500 V DC multiple units of France Train-related introductions in 2003"} {"instruction": "Create a Python script to build a machine learning model to predict MPG from an auto dataset.", "input": "", "output": "# Import Libraries\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.metrics import r2_score\n\n# Read in the auto dataset\ndf = pd.read_csv('auto.csv')\n\n# Get the features and labels\nX = df.drop(columns='mpg')\ny = df['mpg']\n\n# Split into train and test\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Create the linear regressor\nlr = LinearRegression()\n\n# Train the model\nlr.fit(X_train,y_train)\n\n# Get the predictions\npreds = lr.predict(X_test)\n\n# Calculate the R2 score\nr2 = r2_score(y_test, preds)"} {"instruction": "Using a given dataset, create a visualization in Python to identify how many of each type of fruit has been sold.", "input": "The dataset has 24 observations and three variables (fruit type, quantity and price).\n\nFruit\tQuantity\tPrice\nBanana\t20\t5\nOrange\t30\t3\nApple\t50\t4\nPear\t10\t2\n...\t...\t...", "output": "import matplotlib.pyplot as plt\nimport pandas as pd\n\n# Read data\ndata = pd.read_csv(\"fruits.csv\")\n\n# Get fruit types\ntypes = data['Fruit'].unique()\n\n# Calculate quantity for each type\nquantity = [sum(data['Quantity'][data['Fruit'] == t]) for t in types]\n\n# Plot the bar chart\nplt.bar(types, quantity)\n\n# Add title, x and y axis labels and legend\nplt.title('Quantity of Fruits sold') \nplt.xlabel('Fruit Type') \nplt.ylabel('Quantity') \nplt.legend('Quantity sold') \n\n# Show the plot \nplt.show()"} {"instruction": "Create a Python program that reads in two strings and outputs the longest common substring.", "input": "str1 = \"GeeksforGeeks\"\nstr2 = \"Practice\"", "output": "def longest_common_substring(str1, str2):\n if len(str1) == 0 or len(str2) == 0:\n return \"\"\n matrix = [[0 for _ in range(0, len(str2)+1)] for _ in range(0, len(str1)+1)]\n longest_string = \"\"\n for i in range(1, len(str1)+1):\n for j in range(1, len(str2)+1):\n if str1[i-1] == str2[j-1]:\n matrix[i][j] = matrix[i-1][j-1] + 1\n if matrix[i][j] > len(longest_string):\n longest_string = str1[i-1 - matrix[i][j]+1 : i]\n else:\n matrix[i][j] = 0\n return longest_string"} {"instruction": "Generate code to find the sum of all numbers in an array using Python.", "input": "", "output": "def sum_of_array(arr):\n # Initialize result \n res = 0 \n \n # Iterate through all elements \n # and add them to result \n for i in range(0, len(arr)): \n res = res + arr[i] \n \n # return final result \n return res"} {"instruction": "Create an artificial neural network in Python using TensorFlow to predict stock prices.", "input": "Not applicable", "output": "import tensorflow as tf\n\n# Create a Neural Network\nmodel = tf.keras.Sequential()\nmodel.add(tf.keras.layers.Dense(4, input_shape=(len(X[0]),), activation='relu'))\nmodel.add(tf.keras.layers.Dense(1))\n\n# Compile model\nmodel.compile(optimizer='adam',\n loss='mean_squared_error',\n metrics=['accuracy'])\n \n# Train model\nmodel.fit(X, y, epochs=20)\n \n# Make predictions\npredictions = model.predict(X)"} {"instruction": "Write a Python program to find the largest three numbers in a list.", "input": "1, 6, 3, 8, 7, 4", "output": "my_list = [1, 6, 3, 8, 7, 4]\nlargest_three = sorted(my_list)[-3:]\nprint(largest_three)"} {"text": "[HI Wikipedia] वुद्ध सायमी\n\nवुद्ध सायमी नेपाली भाषा के नेपाली कवि हैं। इनका जन्म विक्रम संवत 2001 में झोंछे काठमाण्डू में हुआ। इनका एक कविता संग्रह 'मेरो वर्तमान' प्रकाशित है। ये द्विमासिक पत्रिका 'सिड' के सह संपादक हैं। सन्दर्भ नेपाली साहित्यकार 2001 में जन्मे लोग जीवित लोग"} {"text": "[DE Wikipedia] Filadelfia Oslo\n\nFiladelfiakirken Oslo ist eine christliche Gemeinde (Menigheten) der Pfingstbewegung in Norwegen. Sie ist die größte Pfingstkirche des Landes und bietet umfangreiche Angebote im In- und Ausland. Geschichte Die Filadelfia-Gemeinde wurde von Thomas Ball Barratt gegründet. Sie war 1916 die erste Gemeinde in Kristiania, die sich offiziell der Pfingstbewegung anschloss. Offiziell wurde sie sogar erst 1916 gegründet, obwohl sie bereits seit 1910 an verschiedenen Orten in Kristiania Veranstaltungen angeboten hatte. Zur Zeit der Gründung hatte die Gemeinde ca. 200 Mitglieder, 2012 gab es mehr als 2.000, davon waren 1.825 getauft und 538 waren noch ungetaufte Kinder. Die Gemeinde hat in Norwegen aufgrund ihres Alters und ihrer Größe immer einen zentralen Platz eingenommen. Die Gemeindegebäude in St. Olavsgate, dem „Neuen Filadelfia“, wurden 1938 nach einer umfassenden Sanierung eingeweiht. Laut Barratts Memoiren war der Architekt Thomas Strandskogen Leiter des Baukomitees. Ab 2010 wurden die Räumlichkeiten erneut aufwendig umgebaut, um Platz für ein Foyer, Büroflächen und ein Café zu schaffen. Mittlerweile unterhält die Gemeinde Arbeitsstellen an sechs Orten: Filadelfiakirken Sentrum (St. Olavsgate, Oslo) Mikrofila Barnekirke (Kinderkirche, St. Olavsgate, Oslo) Ungfila (Jugendkirche, St. Olavsgate, Oslo) Filadelfiakirken Majorstuen Filadelfiakirken Lillestrøm Filadelfiakirken Enebakk Arbeitsbereiche Sonntagsgottesdienste mit Sonntagsschule Jugendarbeit Bibelschule Alpha-Kurse Kleine Gemeinde, Hauskreisarbeit Filos – Jugendclub in Sagene Zentrum für Gebet und Seelsorge Mission Die Gemeinde hat von Anbeginn an weltweite Mission betrieben. Unter dem Schirm der De norske pinsemenigheters ytremisjon (Norwegische Pfingstmission, PYM) sind Missionare im Kongo (mit CELPA – Pfingstbewegung im Kongo), auf den Philippinen, in Indien und dem Mittleren Osten aktiv. Gemeindeleitung Die Gemeinde hat sowohl eine organisatorische Leitung als auch eine geistliche Leitung. Die Organe der Leitung sind ein Führungsrat oder Ältestenrat (lederråd oder eldsteråd), die Pastoren mit verschiedenen Verantwortlichkeiten und Leitungsteams. Der Eldsteråd wird von den Mitgliedern der Gemeinde gewählt. Hauptpastoren (chronologisch) Thomas Ball Barratt Osvald Orlien Knut Petersen Paul Paulsen Erling Strøm Morgan Kornmo David Østby Egil Svartdahl Daniel Egeli Zusammenarbeit Die Gemeinde Filadelfia Blaker in Blaker ist eine Tochtergründung der Filadelfiakirken. Daneben bietet die gemeinde mehreren internationalen, nicht-norwegischen, ethnischen Gemeinden in Oslo eine Heimat. Church of Pentecost Shalom Eritrean Pentecostal Church Shekinah Church Filipino Christian Church Einzelnachweise Literatur Torill F. Brox (Hrsg.): Årbok 2007. For Pinsebevegelsen i Norge. Korsets Seier Publikasjoner AS…"} {"text": "[CS Wikipedia] Stock, Aitken & Waterman\n\nStock, Aitken & Waterman, zkráceně SAW je britské skladatelské a produkční trio skládající se z Mike Stocka, Matta Aitkena a Pete Watermana. Jejich doba slávy nastávala v pozdějších osmdesátých letech. Dohromady prodali 40 milion nahrávek a měli víc než 100 hitů britské Top 40. Vydělali si v přepočtu £60 milionů což je víc než $103.78 miliónů. Historie SAW původně začalo v produkci hi-NRG klubových hitů (především v undergroundu), ale již brzy si vydobyli veliký úspěch spojením Hi-NRG-orientovaným soundem s romantickými texty. Rovněž experimentovali se swingovým rytmem. SAW se považují za britskou verzi motownovského produkčního tria Holland-Dozier-Holland, což bylo významné soulové a rhythm and bluesové trio. Hudebníci Seznam hudebníků, které kdy hráli písně sepsané/produkované triem SAW: #1 Hity Následující hity, které produkovalo trio SAW si vydobylo příčku #1 v UK Pop chart: 1985 \"You Spin Me Round (Like a Record)\", Dead or Alive 1987 \"Respectable\", Mel and Kim 1987 \"Let It Be\", Ferry Aid, cover Beatles hitu z roku 1970 1987 \"Never Gonna Give You Up\", Rick Astley 1987 \"I Should Be So Lucky\", Kylie Minogue 1989 \"Especially for You\", Kylie Minogue and Jason Donovan 1989 \"Too Many Broken Hearts\", Jason Donovan 1989 \"Hand on Your Heart\", Kylie Minogue 1989 \"Ferry Cross the Mersey\", Christians, Holly Johnson, Paul McCartney, Gerry Marsden & SAW, cover hitu z roku 1964 od kapely Gerry and the Pacemakers 1989 \"Sealed with a Kiss\", Jason Donovan, cover písně od Brian Hylanda 1989 \"You'll Never Stop Me Loving You\", Sonia 1989 \"Do They Know It's Christmas\", Band Aid II 1990 \"Tears on My Pillow\", cover Kylie Minogue. Původně píseň z roku 1958 od R&B/doo-wop kapely Little Anthony and the Imperials Reference Britští hudební skladatelé Eurobeat Držitelé ceny Brit"} {"instruction": "Write a function in Python to convert a given decimal number into its binary form.", "input": "", "output": "def decimal_to_binary(num): binary = [] while num > 0: binary.append(num%2) num //= 2 binary.reverse() return binary"} {"text": "[HI Wikipedia] मधुबनी\n\nमधुबनी भारत के बिहार प्रान्त में दरभंगा प्रमंडल अंतर्गत एक जिला है। दरभंगा एवं मधुबनी को मिथिला संस्कृति का द्विध्रुव माना जाता है। मैथिली यहाँ की प्रमुख भाषा है। विश्वप्रसिद्ध मिथिला पेंटिंग एवं मखाना के पैदावार की वजह से मधुबनी को विश्वभर में जाना जाता है। इस जिला का गठन 1972 में दरभंगा जिले के विभाजन के उपरांत हुआ था।मधुबनी चित्रकला मिथिलांचल क्षेत्र जैसे बिहार के दरभंगा, मधुबनी एवं नेपाल के कुछ क्षेत्रों की प्रमुख चित्रकला है। प्रारम्भ में रंगोली के रूप में रहने के बाद यह कला धीरे-धीरे आधुनिक रूप में कपड़ो, दीवारों एवं कागज पर उतर आई है। मिथिला की औरतों द्वारा शुरू की गई इस घरेलू चित्रकला को पुरुषों ने भी अपना लिया है। वर्तमान में मिथिला पेंटिंग के कलाकारों ने अंतरराष्ट्रीय स्तर पर मधुबनी व मिथिला पेंटिंग के सम्मान को और बढ़ाये जाने को लेकर तकरीबन 10,000 sq/ft में मधुबनी रेलवे स्टेशन के दीवारों को मिथिला पेंटिंग की कलाकृतियों से सरोबार किया। उनकी ये पहल निःशुल्क अर्थात श्रमदान के रूप में की गई थी। श्रमदान स्वरूप किये गए इस अदभुत कलाकृतियों को विदेशी पर्यटकों व सैनानियों द्वारा खूब पसंद किया जा रहा है। नामाकरण उत्तर बिहार के पूर्णिया जिले में स्थित है मधुरौट शाखा के मधुवंशी यादव क्षत्रियों का नज़रगंज राजघराना जिसका पूरे बंगाल प्रेसिडेंसी में एक अलग रूतबा था।इन यदुवंशियों इतिहास मथुरा से शुरू होने के कारण ही मधुरौट वंश कहलाया, महाराज मधु के नाम से ये मधुवंशी या माधव वंशी भी कहलाते हैं, द्वारकाधीश के पूर्वज और महराज यदु के पीढ़ी में जन्मे महाराज मधु बहुत ही प्रतापी राजा थे। उन्होंने हीं मथुरा शहर की स्थापना की थी तथा इनके प्रताप के कारण हीं द्वारकाधीश भगवान् श्रीकृष्णचंद्र को माधव भी कहा जाता है। कालांतर में यादव राजस्थान तथा मथुरा से विस्थापित होते हुए बिहार में प्रवेश किया अपने पूर्वज महाराज मधु के नाम पर मधुबनी तथा मधेपुरा जैसे इलाके आबाद करते हुए पूर्णियां के नज़रगंज राजघराना का स्थापना कर वहीं बस गए। मधुबनी जिले के प्राचीनतम ज्ञात निवासियों में किरात, भार, थारु जैसी जनजातियाँ शामिल है। वैदिक स्रोतों के मुताबिक आर्यों की विदेह शाखा ने अग्नि के संरक्षण में सरस्वती तट से पूरब में सदानीरा (गंडक) की ओर कूच किया और इस क्षेत्र में विदेह राज्य की स्थापना की। विदेह के राजा मिथि के नाम पर यह प्रदेश मिथिला कहलाने लगा। रामायणकाल में मिथिला के राजा सिरध्वज जनक की पुत्री सीता का जन्म मधुबनी की सीमा पर स्थित सीतामढी में हुआ था। विदेह की राजधानी जनकपुर, जो आधुनिक नेपाल में पड़ता है, मधुबनी के उत्तर-पश्चिमी सीमा के पास है। बेनीपट्टी के पास स्थित फुलहर के बारे में ऐसी मान्यता है कि यहाँ फुलों का बाग था जहाँ से सीता फुल लेकर गिरिजा देवी मंदिर में पूजा किया करती थी। पंडौल के बारे में यह प्रसिद्ध है कि यहाँ पांडवों ने अपने अज्ञातवाश के कुछ दिन बिताए थे। विदेह राज्य का अंत होने पर यह प्रदेश वैशाली गणराज्य का अंग बना। इसके पश्चात यह मगध के मौर्य, शुंग, कण्व और गुप्त शासकों के महान साम्राज्य का हिस्सा रहा। १३ वीं सदी में पश्चिम बंगाल के मुसलमान शासक हाजी शम्सुद्दीन इलियास के समय मिथिला एवं तिरहुत क्षेत्रों का बँटवारा हो गया। उत्तरी भाग जिसके अंतर्गत मधुबनी, दरभंगा…"} {"text": "[HI Wikipedia] मुहम्मद\n\nमुहम्मद 570 ई - 8 जून 632 ई) इस्लाम के संस्थापक थें। इस्लामिक मान्यता के अनुसार, वह एक पैगम्बर और ईश्वर के संदेशवाहक थे, जिन्हें इस्लाम के पैग़म्बर भी कहते हैं, जो पहले आदम , इब्राहीम , मूसा ईसा (येशू) और अन्य पैगम्बर द्वारा प्रचारित एकेश्वरवादी शिक्षाओं को प्रस्तुत करने और पुष्टि करने के लिए भेजे गए थे। इस्लाम की सभी मुख्य शाखाओं में उन्हें अल्लाह के अंतिम पैगम्बर के रूप में देखा जाता है, हालांकि कुछ आधुनिक संप्रदाय इस विश्वास से अलग भी नज़र आते हैं। मुसलमान यह विश्वास रखते हैं कि कुरान जिब्राईल (ईसाईयत में गैब्रियल) नामक एक फरिश्ते के द्वारा, मुहम्मद को ७वीं सदी के अरब में, लगभग ४० साल में याद-कंठस्‍थ कराया गया था। मुहम्मद , विश्वासियों को एकजुट करने में एक मुस्लिम धर्म स्थापित करने में, एक साथ इस्लामिक धार्मिक विश्वास के आधार पर कुरान के साथ-साथ उनकी शिक्षाओं और प्रथाओं के साथ नज़र आते हैं। लगभग 570 ई (आम-अल-फ़ील (हाथी का वर्ष)) में अरब के शहर मक्का में पैदा हुए, मुहम्मद की छह साल की उम्र तक उनके माता-पिता का देहांत हो चुका था। ; वह अपने पैतृक चाचा अबू तालिब और अबू तालिब की पत्नी फातिमा बिन्त असद की देखभाल में थे। समय-समय पर, वह प्रार्थना के लिए कई रातों के लिए हिरा नाम की पर्वत गुफा में अल्लाह की याद में बैठते। बाद में 40 साल की उम्र में उन्होंने गुफा में जिब्रील अलै. को देखा, जहां उन्होंने कहा कि उन्हें अल्लाह से अपना पहला इल्हाम प्राप्त हुआ। तीन साल बाद, 610 में, मुहम्मद ने सार्वजनिक रूप से इन रहस्योद्घाटनों का प्रचार करना शुरू किया, यह घोषणा करते हुए कि \" ईश्वर एक है \", अल्लाह को पूर्ण \"समर्पण\" (इस्लाम) कार्यवाही का सही तरीका है (दीन), और वह इस्लाम के अन्य पैगम्बर के समान, ख़ुदा के पैगंबर और दूत हैं। मुहम्मद ने शुरुआत में कुछ अनुयायियों को प्राप्त किया,और मक्का में अविश्वासियों से शत्रुता का अनुभव किया। चल रहे उत्पीड़न से बचने के लिए,उन्होंने कुछ अनुयायियों को 615 ई में अबीसीनिया भेजा, इससे पहले कि वह और उनके अनुयायियों ने मक्का से मदीना (जिसे यस्रीब के नाम से जाना जाता था)से पहले 622 ई में हिजरत (प्रवास या स्थानांतरित)किया। यह घटना हिजरा या इस्लामी कैलेंडर की शुरुआत को चिह्नित करता है,जिसे हिजरी कैलेंडर के रूप में भी जाना जाता है। मदीना में,मुहम्मद साहब ने मदीना के संविधान के तहत जनजातियों को एकजुट किया। दिसंबर 622 में,मक्का जनजातियों के साथ आठ वर्षों के अंतराल युद्धों के बाद,मुहम्मद साहब ने 10,000 मुसलमानों की एक सेना इकट्ठी की और मक्का शहर पर चढ़ाई की। विजय बहुत हद तक अनचाहे हो गई, 632 में विदाई तीर्थयात्रा से लौटने के कुछ महीने बाद, वह बीमार पड़ गए और वह इस दुनिया से विदा हो गए। रहस्योद्घाटन (प्रत्येक को आयह के नाम से जाना जाता है, (अल्लाह के इशारे), जो मुहम्मद सल्लल्लाहु तआला अलैही वसल्लम ने दुनिया से जाने तक प्राप्त करने की सूचना दी, कुरान के छंदों का निर्माण किया, मुसलमानों द्वारा शब्द\" अल्लाह का वचन \"के रूप में माना जाता है और जिसके आस-पास धर्म आधारित है। कुरान के अलावा, हदीस और सीरा (जीवनी) साहित्य में पाए गए मुहम्मद साहब की शिक्षाओं और प्रथाओं (सुन्नत) को भी इस्लामी कानून के स्रोतों के रूप में उपयोग किया जाता है, मुहम्मद 2 वक्त का…"} {"text": "[EN Wikipedia] Aztlan Underground\n\nAztlan Underground is a band from Los Angeles, California that combines Hip-Hop, Punk Rock, Jazz, and electronic music with Chicano and Native American themes, and indigenous instrumentation. They are often cited as progenitors of Chicano rap. Background The band traces its roots to the late-1980s hardcore scene in the Eastside of Los Angeles. They have played rapcore, with elements of punk, hip hop, rock, funk, jazz, indigenous music, and spoken word. Indigenous drums, flutes, and rattles are also commonly used in their music. Their lyrics often address the family and economic issues faced by the Chicano community, and they have been noted as activists for that community. As an example of the politically active and culturally important artists in Los Angeles in the 1990s, Aztlan Underground appeared on Culture Clash on Fox in 1993; and was part of Breaking Out, a concert on pay per view in 1998, The band was featured in the independent films Algun Dia and Frontierland in the 1990s, and on the upcoming Studio 49. The band has been mentioned or featured in various newspapers and magazines: the Vancouver Sun, New Times, BLU Magazine (an underground hip hop magazine), BAM Magazine, La Banda Elastica Magazine, and the Los Angeles Times calendar section. The band is also the subject of a chapter in the book It's Not About a Salary, by Brian Cross. Aztlan Underground remains active in the community, lending their voice to annual events such as The Farce of July, and the recent movement to recognize Indigenous People's Day in Los Angeles and beyond. In addition to forming their own label, Xicano Records and Film, Aztlan Underground were signed to the Basque record label Esan Ozenki in 1999 which enabled them to tour Spain extensively and perform in France and Portugal. Aztlan Underground have also performed in Canada, Australia, and Venezuela. The band has been recognized for their music with nominations in the New Times 1998 \"Best Latin Influenced\" category, the BAM Magazine 1999 \"Best Rock en Español\" category, and the LA Weekly 1999 \"Best Hip Hop\" category. The release of their eponymous third album on August 29, 2009 was met with positive reviews and earned the band four Native American Music Award (NAMMY) nominations in 2010. Discography Decolonize Year:1995 \"Teteu Innan\" \"Killing Season\" \"Lost Souls\" \"My Blood Is Red\" \"Natural Enemy\" \"Sacred Circle\" \"Blood On Your Hands\" \"Interlude\" \"Aug 2 the 9\" \"Indigena\" \"Lyrical Drive By\" Sub-Verses Year:1998 \"Permiso\" \"They Move In Silence\" \"No Soy Animal\" \"Killing Season\" \"Blood On Your Hands\" \"Reality Check\" \"Lemon Pledge\" \"Revolution\" \"Preachers of the Blind State\" \"Lyrical Drive-By\" \"Nahui Ollin\" \"How to Catch a Bullet\" \"Ik Otik\" \"Obsolete Man\" \"Decolonize\" \"War Flowers\" Aztlan Underground Year: 2009…"} {"instruction": "Using the provided data, generate a linear regression model using Python.", "input": "x | y\n----------------\n1 | 1\n2 | 2\n3 | 4\n4 | 8\n5 | 16", "output": "import numpy as np\n\ndef generate_model(data):\n x = np.array([data[0], data[1], data[2], data[3], data[4]])\n y = np.array([data[5], data[6], data[7], data[8], data[9]])\n A = np.vstack([x, np.ones(len(x))]).T\n m, c = np.linalg.lstsq(A, y)[0]\n return m, c\n\nx = [1, 2, 3, 4, 5]\ny = [1, 2, 4, 8, 16]\nm, c = generate_model((x, y))\nprint(\"m = {}, c = {}\".format(m, c))"} {"instruction": "Add a function to this Python program to maximize the accuracy of the output", "input": "def classify_numbers(numbers):\n if len(numbers) == 0:\n return 0\n total = 0\n for n in numbers:\n total += n\n if total / len(numbers) > 5:\n return 1\n else:\n return 0", "output": "def classify_numbers(numbers):\n if len(numbers) == 0:\n return 0\n total = 0\n for n in numbers:\n total += n\n if total / len(numbers) > 5:\n return 1\n else:\n return 0\ndef check_input(numbers):\n for n in numbers:\n if not isinstance(n, int):\n raise ValueError(\"Input must be a list of integers.\")"} {"instruction": "Create a regular expression to validate a URL string.", "input": "", "output": "# Regular expression to validate a URL string ^(http:\\/\\/|https:\\/\\/|ftp:\\/\\/)?(www\\.)?([a-zA-Z0-9]+(-?[a-zA-Z0-9])*\\.)+[\\w]{2,5}(\\/\\S*)?$"} {"instruction": "Write a JavaScript program to replace all the vowels in a given string with '*'.", "input": "", "output": "function replaceVowels(str) { return str.replace(/[aeiou]/gi, '*'); }"} {"text": "[HI Wikipedia] क़ल्यूबीया मुहाफ़ज़ाह\n\nक़ल्यूबीया मुहाफ़ज़ाह (अरबी: , अंग्रेज़ी: Qalyubia) मिस्र का एक मुहाफ़ज़ाह (उच्च-स्तरीय प्रशासनिक विभाग) है। यह राष्ट्रीय राजधानी क़ाहिरा से उत्तर में मिस्र के उत्तरी भाग में नील नदी के नदीमुख (डॅल्टा) क्षेत्र में स्थित है। इसके कुछ हिस्से क़ाहिरा के बाहरी मोहल्लों से मिले-जुले हैं इसलिए इसे अक्सर बृहत-क़ाहिरा महानगरीय क्षेत्र का भाग माना जाता है। नाम का उच्चारण 'क़ल्यूबीया' में 'क़' अक्षर के उच्चारण पर ध्यान दें क्योंकि यह बिना बिन्दु वाले 'क' से मिलता-जुलता लेकिन ज़रा भिन्न है। इसका उच्चारण 'क़ीमत' और 'क़ुरबानी' 'क़' से मिलता है। इन्हें भी देखें मिस्र के मुहाफ़ज़ात‎ सन्दर्भ क़ल्यूबीया मुहाफ़ज़ाह मिस्र के मुहाफ़ज़ात मिस्र"} {"text": "[EN Wikipedia] Port Olímpic\n\nThe Port Olímpic () is a marina located in Barcelona, Catalonia. Located east of the Port of Barcelona, it hosted the sailing events for the 1992 Summer Olympics. It will also be the main venue for the 2024 Americas Cup. The venue was opened in 1991. Gallery References 1992 Summer Olympics official report. Volume 2. pp. 255–8. Port de Barcelona/El Port/Portada Official website. Buildings and structures completed in 1991 Venues of the 1992 Summer Olympics Olympic sailing venues Sports venues in Barcelona Ports and harbours of Catalonia Marinas in Spain Buildings and structures in Barcelona 1991 establishments in Spain"} {"instruction": "Write a jQuery script to display a popup box when a web page is loaded.", "input": "", "output": "$(document).ready(function(){ alert(\"Popup box!\"); });"} {"instruction": "Write a Python program that takes a list of strings as input and returns a string containing all the strings joined together in alphabetical order.", "input": "['apple', 'banana', 'orange']", "output": "def alphabetize_list(arr):\n arr.sort()\n return ' '.join(arr)\n\ndata = ['apple', 'banana', 'orange']\nresult = alphabetize_list(data)\nprint(result)"} {"instruction": "Write a SQL query to join two tables on a specified conditions.", "input": "Table 1: id name age 1 a 15 2 b 18 3 c 20 Table 2: id class marks 1 10 80 2 10 75 3 11 70", "output": "SELECT table1.id, table1.name, table1.age, table2.class, table2.marks FROM table1 INNER JOIN table2 ON table1.id = table2.id WHERE table1.age > 18;"} {"instruction": "Write a function to check whether a number is a prime number in JavaScript.", "input": "let num = 7;", "output": "function isPrime(num) { // Edge cases: if (num <= 1) return false; if (num === 2) return true; if (num % 2 === 0) return false; for (let i=3; i<=Math.sqrt(num); i+=2) { if (num % i === 0) return false; } return true; }"} {"instruction": "Find the probability of a random variable following a normal distribution with a mean of 10 and a standard deviation of 2.", "input": "x = 12", "output": "# Find the probability of a random variable following a normal distribution with a mean of 10 and a standard deviation of 2. from scipy.stats import norm prob = norm.pdf(x, 10, 2) print(prob) # Output: 0.17603266338214976"} {"text": "[EN Wikipedia] 2016–17 Pepperdine Waves men's basketball team\n\nThe 2016–17 Pepperdine Waves men's basketball team represented Pepperdine University during the 2016–17 NCAA Division I men's basketball season. This was head coach Marty Wilson's sixth full season at Pepperdine. The Waves played their home games at the Firestone Fieldhouse in Malibu, California as members of the West Coast Conference. They finished the season 9–22, 5–13 in WCC play to finish in eighth place. They lost in the first round of the WCC tournament to Pacific. Previous season The Waves finished the 2015–16 season 18–14, 10–8 in WCC play to finish in fourth place. They defeated San Francisco in the WCC tournament to advance to the semifinals where they lost to Saint Mary's. The received an invitation to the College Basketball Invitational tournament where they lost in the first round to Eastern Washington. Departures Incoming transfers Recruiting Class of 2016 Roster Schedule and results |- !colspan=9 style=| Non conference regular season |- !colspan=9 style=| WCC regular season |- !colspan=9 style=| WCC tournament References Pepperdine Waves men's basketball seasons Pepperdine Pepperdine Pepperdine"} {"instruction": "Create a SQL query to find the average length of time for all purchases.", "input": "Table structure: Purchase (Customer_ID, Purchase_Date, Purchase_Length)", "output": "SELECT AVG(Purchase_Length) as Average_Purchase_Length FROM Purchase;"} {"instruction": "Create a simple Python program that prints the characters of a string in reverse order.", "input": "String to be printed: \"Hello\"", "output": "string = \"Hello\" revString = \"\" for i in range(len(string)-1,-1,-1): revString = revString + string[i] print(revString)"} {"text": "[HI Wikipedia] जनकला\n\nजनकला (public art) किसी भी माध्यम में रची हुई कला की उन कृतियों को बोलते हैं जिन्हें ऐसे खुले वातावरण में प्रदर्शित करने की नियत से बनाया गया हो जहाँ जन-साधारण का बहुत आना-जाना रहे, मसलन किसी नगर का कोई मार्ग, चौराहा या चौक। इसमें मूर्तिकला व ग्रफ़ीटी जैसी कलाएँ शामिल हैं। अक्सर संग्रहालय में रखी हुई कला-कृतियों के विपरीत जनता को जनकला की कृतियों को छूने और पास से देखने के लिये प्रोत्साहित किया जाता है। इन्हें भी देखें कला सन्दर्भ जनकला कला"} {"instruction": "Print out the number of items in the following list.", "input": "my_list = [1, 2, 3, 4, 5, 6, 7]", "output": "7"} {"instruction": "Flatten this nested list into a single list.", "input": "nested_list = [[1,2], [3,4], [5,6]]", "output": "import itertools flattened_list = list(itertools.chain.from_iterable(nested_list)) print(flattened_list) # Output: [1, 2, 3, 4, 5, 6]"} {"instruction": "Create a Python program to replace all instances of a specific character in a string.", "input": "string = \"Hello World!\" character = \"o\" replacement_character = \"_\"", "output": "def replace_character(string, character, replacement_character): new_string = \"\" for c in string: if c == character: new_string += replacement_character else: new_string += c return new_string"} {"instruction": "Write a Python program to get the size of an object in bytes", "input": "", "output": "import sys\n\ndef get_object_size(obj):\n #Return the size of the object in bytes\n return sys.getsizeof(obj)"} {"text": "[EN Wikipedia] Badminton at the 2011 SEA Games – Men's team\n\nThese are the results of the men's team competition in badminton at the 2011 SEA Games in Jakarta. Medalists Draw First round Quarterfinal Semifinal Final References Badminton at the 2011 SEA Games"} {"instruction": "Transform the following code written in Java to code written in Python.", "input": "public static int largest(int[] array) {\n int largest = array[0];\n for (int i = 1; i < array.length; i++) {\n if (array[i] > largest) {\n largest = array[i];\n }\n }\n return largest;\n}", "output": "def largest(array):\n largest = array[0]\n for i in range(1, len(array)):\n if array[i] > largest:\n largest = array[i]\n return largest"} {"instruction": "Create a HTML page with 4 divs, one of them should have text aligned in the center.", "input": "", "output": " 4 Divs
    This div does not contain any special styling
    This div is colored red
    This div is colored blue
    This div has the text aligned in the center
    "} {"instruction": "Write a Python program to find the closest next lower value of a given number in an array of integers.", "input": "Array of Numbers: [1, 3, 8, 9, 10, 11, 12]", "output": "# Function to find the closest next lower value of a given number in an array\ndef get_next_lower(arr, num):\n # Initialise a dummy variable to store the closest next lower value\n closest_low = 0\n # Iterate through the array\n for i in range(len(arr)):\n # Check if the current number is less than the given number and greater than the current closest number\n if num > arr[i] > closest_low:\n closest_low = arr[i]\n \n # Return the closest next lower value\n return closest_low\n\n# Initialize the array of numbers\narr = [1, 3, 8, 9, 10, 11, 12]\n# Initialize the given number\nnum = 9\n\n# Find the closest next lower value\nclosest_low = get_next_lower(arr, num)\nprint(\"Closest next lower value of\", num, \"is\", closest_low)"} {"instruction": "Create a function that takes a list of strings as an argument and returns a list containing only non-duplicate strings.", "input": "my_list = [\"Apple\", \"Orange\", \"Grapes\", \"Apple\", \"Watermelon\"]", "output": "def remove_duplicates(arr): final_list = [] for i in arr: if i not in final_list: final_list.append(i) return final_list"} {"instruction": "This code generates rooted trees and writes their adjacency and gamma matrices to files. To use it, run the script with the maximum number of nodes as the first argument and the maximum branching factor (optional) as the second argument. The code will output the number of trees for each number of nodes and write the matrices to files in the GammaAdjMatrices directory. If the number of trees is greater than 100,000, the code will abort.", "input": "", "output": "import sys\n\n# G is the gamma matrix\n# par is the parent array\n# n is the number of nodes\ndef writeGammaMatrix(gammaFile, G, par, n):\n\tfor i in range(n):\n\t\tfor j in range(n):\n\t\t\tG[i][j] = 0\n\n\tfor i in range(n):\n\t\tG[i][i] = 1\n\t\tj = par[i]-1\n\t\twhile j > -1:\n\t\t\tG[j][i] = 1\n\t\t\tj = par[j]-1\n\n\tfor i in range(n):\n\t\tfor j in range(n):\n\t\t\tgammaFile.write(str(G[i][j]) + ' ')\n\t\tgammaFile.write('\\n')\n\n\tgammaFile.write('\\n')\n\n\n# par is the parent array\n# n is the number of nodes\ndef writeAdjMatrix(adjFile, par, n):\n\tadjFile.write(str(n-1)) # number of edges\n\tfor i in range(1, n):\n\t\tadjFile.write(' ' + str(par[i]-1) + ' ' + str(i) + ' ')\n\tadjFile.write('\\n');\n\n\n# writes a dot file to be processed with Graphviz\ndef writeDotFile(par, n, num):\n\tdotFile = open('./GammaAdjMatrices/dotFile' + str(n) + '_' + str(num-1) + '.dot', 'w')\n\tdotFile.write('digraph G { \\n')\n\tfor i in range(1, n):\n\t\tdotFile.write(str(par[i]-1) + ' -> ' + str(i) + ';\\n')\n\tdotFile.write('}\\n')\n\tdotFile.close()\n\n\n# n is the number of nodes\n# k is the max number of children allowed per node\ndef getRootedTrees(adjFile, gammaFile, n, k, writeDots):\n\tnum = 0\n\tL = []\n\tpar = []\n\tlevels = []\n\tchildren = []\n\tG = []\n\n\tp = n-1\n\tq = 0\n\n\tfor i in range(n):\n\t\tL.append(i)\n\t\tpar.append(i)\n\t\tlevels.append(i+1)\n\t\tchildren.append(0)\n\t\tG.append([])\n\t\tfor j in range(n):\n\t\t\tG[i].append(0)\n\n\twhile (p > 0):\n\t\tfor i in range(n):\n\t\t\tchildren[i] = 0\n\t\tfor i in range(n):\n\t\t\tchildren[par[i]] += 1\n\n\t\tif max(children) <= k:\n\t\t\tnum += 1\n\t\t\twriteAdjMatrix(adjFile, par, n)\n\t\t\twriteGammaMatrix(gammaFile, G, par, n)\n\t\t\tif writeDots:\n\t\t\t\twriteDotFile(par, n, num)\n\n\t\tp = 0\n\t\tfor i in range(n-1, -1, -1):\n\t\t\tif L[i] > 1:\n\t\t\t\tp = i\n\t\t\t\tbreak\n\n\t\tif p == 0:\n\t\t\tbreak\n\n\t\tfor i in range(p-1, -1, -1):\n\t\t\tif L[i] == L[p] - 1:\n\t\t\t\tq = i\n\t\t\t\tbreak\n\n\t\tfor i in range(p, n):\n\t\t\tL[i] = L[i-p+q]\n\n\t\tfor i in range(1, n):\n\t\t\tx = L[i]\n\t\t\tpar[i] = levels[x-1]\n\t\t\tlevels[x] = i+1\n\n\n# n is the number of nodes\n# k is the max number of children allowed per node\ndef getNumTrees(n, k):\n\tnum = 0\n\tL = []\n\tpar = []\n\tlevels = []\n\tchildren = []\n\n\tp = n-1\n\tq = 0\n\n\tfor i in range(n):\n\t\tL.append(i)\n\t\tpar.append(i)\n\t\tlevels.append(i+1)\n\t\tchildren.append(0)\n\n\twhile (p > 0):\n\t\tfor i in range(n):\n\t\t\tchildren[i] = 0\n\t\tfor i in range(n):\n\t\t\tchildren[par[i]] += 1\n\n\t\tif max(children) <= k:\n\t\t\tnum += 1\n\n\t\tp = 0\n\t\tfor i in range(n-1, -1, -1):\n\t\t\tif L[i] > 1:\n\t\t\t\tp = i\n\t\t\t\tbreak\n\n\t\tif p == 0:\n\t\t\tbreak\n\n\t\tfor i in range(p-1, -1, -1):\n\t\t\tif L[i] == L[p] - 1:\n\t\t\t\tq = i\n\t\t\t\tbreak\n\n\t\tfor i "} {"text": "[EN Wikipedia] 1849 in Denmark\n\nEvents from the year 1849 in Denmark. Incumbents Monarch – Frederick VII Prime minister – Adam Wilhelm Moltke Events 12 January – General conscription is introduced in Denmark a few weeks after the First Schleswig War has been resumed after a winter break. 3 February – The Danish Veterinary Association is founded. 5 June – The Constitution of Denmark is signed by King Frederik VII. First Schleswig War 5 April – Battle of Eckernförde 12 April – Battle of Kolding 31 May – Skirmish of Århus 4 June – Battle of Heligoland 6 July – Battle of Fredericia Date unknown The requirement for passports for journeys inside Denmark is abolished. The Danish West Indian daler replaces the rigsdaler as the currency of the Danish West Indies. Births JanuaryMarch 16 January – Hans Ole Brasen, painter (died 1930) 19 February – Ida Falbe-Hansen, educator and women's activist (died 1922) 27 March – Albert Schou, photographer (died 1900) AprilJune 26 April – Olaf Poulsen, comedic stage actor (died 1923) 9 June – Michael Ancher, painter (died 1927) JulySeptember 5 July – Anthonore Christensen, painter (died 1926) 19 July – Louise Ravn-Hansen, painter (died 1909 in Germany) 21 July – Leopold Rosenfeld, composer (died 1909) 24 July – J. A. D. Jensen, naval officer and Arctic explorer (died 1936) 3 August – Axel Liebmann, composer (died 1876) 6 August – Gustav Frederik Holm, naval officer and Arctic explorer (died 1940) 14 August – Aksel Mikkelsen, educator (died 1929) 15 August – Frida Schmidt, suffragist (died 1934) 16 August – Johan Kjeldahl, chemist (died 1900) 27 September – Nanna Liebmann, composer and music critic (died 1935) OctoberDecember 27 October – Søren Anton van der Aa Kühle, brewer and businessman (died 1906) 5 November – Emil Blichfeldt, architect (died 1908) 11 November – Martin Nyrop, architect (died 1921) Deaths 3 May – Catharine Simonsen, soprano (born 1816) 27 May – Frederik Michael Ernst Fabritius de Tengnagel, military officer and landscape painter (born 1781) 19 July – Christian Tuxen Falbe, naval officer and explorer (born 1791) 15 August – Christopher Friedenreich Hage, merchant (born 1759) 4 December – Georg Frederik Ursin, mathematician and astronomer (born 1797) 2 December – Poul Elias Windtmil Schlegel, physician (born 1784 References 1840s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Design a function with two inputs that returns the maximum of the two.", "input": "", "output": "def maximum(a, b): if a > b: return a else: return b"} {"instruction": "Create a SQL query to sort data from highest to lowest in the column ‘age’.", "input": "", "output": "SELECT * FROM table_name ORDER BY age DESC;"} {"instruction": "Write a POST request to update a user's name in the following JSON format.", "input": "{ \"id\": \"123456\", \"name\": \"John Doe\" }", "output": "import requests data = { \"id\": \"123456\", \"name\": \"John Doe\" } url = \"http://example.com/update-user-name\" response = requests.post(url, json=data)"} {"instruction": "Create a XML document to store information about books.", "input": "Book Title: \"The Adventures of Tom Sawyer\" Book Author: Mark Twain Book Year: 1876 The Genre: Fiction", "output": " The Adventures of Tom Sawyer Mark Twain 1876 Fiction "} {"instruction": "Write the following into python code", "input": "for i = 1 to 10\n print(i)", "output": "for i in range(1,11):\n print(i)"} {"instruction": "Edit the following Java code to round a number to two decimal places.", "input": "double num = 3.14159;", "output": "double num = 3.14159; num = Math.round(num * 100.0) / 100.0; System.out.println(num); // Output: 3.14"} {"text": "[DE Wikipedia] Artem Wedel\n\nArtem Wedel (, * 1770 in Kiew; † 14. Juli 1808 ebenda) war ein ukrainischer Komponist und Sänger. Seine Eltern waren Kiewer Bürger Lukian und Olena Wedelskij. Sein Vater war Ikonostase-Bauer. Die Familie wohnte in einem Kiewer Vorort. Artem Wedel benutzte die abgekürzte Form des Familiennamens „Wedel“. Er studierte Philosophie und Musik an der Kiew-Mohyla-Akademie. Schon als Student begann er Musik zu komponieren, wurde Dirigent des Studentenchores und -orchesters, trat auch als Violinist auf. 1788 kam er nach Moskau, wo er die Leitung des Musikensembles des Generalgouverneurs Jeropkin übernahm, formell war er als Kanzleibeamte der Senatskanzlei angestellt. Nach dem Tode seines Förderers kam er 1794 nach Kiew zurück und übernahm die Leitung der Kapelle des Generals Lewanidow. Er wurde zum Kapitän befördert. In dieser Zeit schuf er viele Kompositionen, u. a. 6 Instrumentalkonzerte. 1796 wurde Wedel mit General Lewanidow nach Charkiw versetzt. Dort organisierte er einen neuen Chor und Orchester. Er unterrichtete auch Gesang und Instrumentalmusik im dortigen Collegium. Er schuf kirchliche Musikwerke, wie „Herr, höre meine Stimme“. Auf Verordnung des Zaren Paul I. wurde 1797 der Korps des Generals Lewanidow aufgelöst. Wedel wurde vom Militärdienst entlassen und verließ Charkiw. 1798 kam Wedel nach Kiew zurück und ließ sich im Haus seiner Eltern nieder. Er gab alle Ämter auf, verschenkte sein ganzes Vermögen, versank in religiösen Gedanken und trat in das Kiewer Höhlenkloster ein. Er komponierte nur noch religiöse Chorwerke. Am späten Frühling 1799 wurde bei ihm das Buch „Das Leben des ehrwürdigen Nil Stolobensky, Wundertäter von Novgorod“ gefunden, in das Wedel angeblich handschriftlich eine Voraussage des Attentats auf den Zaren Paul I. engetragen hatte. Unter diesem Vorwurf übergab der Kiewer Metropolit und Archimandrit Ierofej Malizkij am 25. Mai 1799 den Mönch Artem Wedel dem Stadtkommandanten von Kiew. Es fehlen sichere Nachrichten über das weitere Leben des Komponisten. Am 10. Juli 1799 wurde er als Geisteskranker unter die Obhut seines Vaters übergeben. Am 1. August 1799 kam er in ein Irrenhaus, wo er die nächsten acht Jahre, bis zu seinem Tod, verbrachte. Er starb im Alter von 38 Jahren. Die Werke Wedels sind hauptsächlich in Handschriften erhalten geblieben. Trotz des Ausführungsverbotes wurden sie doch weiterhin aufgeführt. Bekannt sind 80 Werke, darunter 31 Chorkonzerte, 6 Kammertrios, zwei Liturgien des heiligen Johannes Chrysostomos. Bibliografie Соневицький І. Артем Ведель і його музична спадщина. (Artem Wedel und sein musikalischer Nachlaß) — Українська Вільна Академія Наук у США, New York, 1966. Komponist (Klassik) Komponist (Ukraine) Komponist (Kirchenmusik) Ukrainer Geboren 1770 Gestorben 1808 Mann"} {"text": "[DE Wikipedia] Reimschema\n\nEin Reimschema ist in der Verslehre eine spezifische Form metrischer Notation und beschreibt in abstrahierender Form die Reimfolge, das heißt die Abfolge und Art der Korrespondenzen in einer Strophe oder einem Gedicht. Dabei entspricht jedem Vers ein (Klein-)Buchstabe, für reimende Verse werden gleiche Buchstaben verwendet. Beispiel: Das Reimschema beschreibt eine Gedichtform aus drei vierzeiligen Strophen mit drei je viermal erscheinenden Reimen (Verse 1.1, 1.3, 2.1 und 2.3), (1.2, 1.4, 3.1 und 3.2) und (Verse 2.2, 2.4, 3.3 und 3.4). Nicht reimende Verse werden als Waisen bezeichnet. Im Reimschema werden solche Verse, die sich mit keiner anderen Zeile reimen, häufig mit oder notiert. Besondere Reimformen werden durch die Verwendung von Großbuchstaben angezeigt, insbesondere ein Refrain oder Kehrreim: wäre eine Reimfolge für vierzeilige Strophen, wobei in jeder Strophe der vierte Vers sich identisch wiederholt und mit dem ersten Vers reimt. Gelegentlich wird außer der reinen Reimfolge auch noch Silbenzahl und Reimgeschlecht notiert. Beispiel: wäre die Beschreibung einer vierzeiligen Strophe mit umarmendem Reim, wobei der 1. und 4. Vers Siebensilbler mit weiblichem Reim und der 2. und 3. Vers Sechssilbler mit männlichem Reim sind. Literatur Dieter Burdorf, Christoph Fasbender, Burkhard Moennighoff (Hrsg.): Metzler Lexikon Literatur. Begriffe und Definitionen. 3. Auflage. Metzler, Stuttgart 2007, ISBN 978-3-476-01612-6, S. 640. Gero von Wilpert: Sachwörterbuch der Literatur. 8. Auflage. Kröner, Stuttgart 2013, ISBN 978-3-520-84601-3, S. 675. Weblinks Reim"} {"instruction": "Create a Python program that searches for a given string in a database and displays the result.", "input": "Database: {\n \"users\": [\n {\n \"name\": \"John\",\n \"age\": 26\n },\n {\n \"name\": \"Mark\",\n \"age\": 32\n },\n {\n \"name\": \"Alice\",\n \"age\": 21\n }\n ]\n}\n\nSearch term: Alice", "output": "import json\n\nusers = {\n \"users\": [\n {\n \"name\": \"John\",\n \"age\": 26\n },\n {\n \"name\": \"Mark\",\n \"age\": 32\n },\n {\n \"name\": \"Alice\",\n \"age\": 21\n }\n ]\n}\n\nsearch_term = \"Alice\"\n\nfor user in users[\"users\"]:\n if user[\"name\"] == search_term:\n print(\"Found user with name '{}' and age {}\".format(user[\"name\"], user[\"age\"]))"} {"instruction": "Write a Python code to sort a 5x5 numpy matrix from the lowest to highest values.", "input": "np.array([[8, 2, 6, 7, 4],\n [7, 9, 5, 4, 6],\n [2, 3, 7, 1, 4],\n [5, 8, 4, 9, 6],\n [4, 7, 8, 2, 1]])", "output": "import numpy as np\n\n# The given array\narr = np.array([[8, 2, 6, 7, 4],\n [7, 9, 5, 4, 6],\n [2, 3, 7, 1, 4],\n [5, 8, 4, 9, 6],\n [4, 7, 8, 2, 1]])\n\n# Sort the array in ascending order\nsorted_arr = arr.reshape(arr.shape[0] * arr.shape[1]).argsort() # new added line\n\n# Get the sorted array\nsorted_arr = arr.reshape(arr.shape[0] * arr.shape[1])[sorted_arr].reshape(arr.shape[0], arr.shape[1])\n\nprint(sorted_arr)"} {"instruction": "Write an SQL query to select all rows from a table where a given column value is higher than 10.", "input": "Table: users", "output": "SELECT * FROM users WHERE column_name > 10;"} {"instruction": "Write a SQL query to list all unique departments from the employee table.", "input": "", "output": "SELECT DISTINCT department FROM employee"} {"text": "[DE Wikipedia] Radeck (Gemeinde Bergheim)\n\nRadeck ist ein im österreichischen Bundesland Salzburg liegendes, zur Gemeinde Bergheim im Bezirk Salzburg-Umgebung (Flachgau) gehörendes Dorf. Der Ort hatte im Spätmittelalter und in der Neuzeit Bedeutung durch das dort befindliche Schloss Radeck, das längere Zeit als Pfleggericht diente. Als Ortsteil der Gemeinde Bergheim wird Radeck zusammen mit dem angrenzenden Bergheimer Anteil von Kasern als Radeck-Kasern bezeichnet. Geographie Die amtlich als Dorf kategorisierte Ansiedlung Radeck befindet sich im Südosten des Gemeindegebietes von Bergheim. Es liegt bezüglich der Umgebung leicht erhöht am Osthang des Plainbergs auf rund und ist Teil der Bergheimer Ortschaft Plain und Katastralgemeinde Bergheim I. Getrennt von Radeck liegt östlich der vorbeiführenden Lamprechtshausener Straße der nur wenige Gebäude umfassende und zu Bergheim gehörende Teil von Kasern. Er umfasst die geraden Hausnummern Carl-Zuckmayr-Straße 4–18 sowie die Adressen Moosfeldstraße 1, 2, 2a und 2b. Dieses Gebiet, im Norden begrenzt durch den Plainbach, bildet zusammen mit Radeck den Bergheimer Ortsteil Radeck-Kasern. Nördlich des Plainbachs schließt unmittelbar die Lengfeldensiedlung an. Kultur Das heutige Schloss Radeck befindet sich in Privatbesitz. Die Prangerstutzenschützen Radeck sind ein 1965/66 gebildeter Brauchtumsverein. Die Vereinsfahne trägt auf der einen Seite das Wappen der ehemaligen Herren von Radeck und auf der anderen Seite eine Abbildung der Radecker Schlosskapelle. Jährlich am Dienstag vor Pfingsten gibt es in Bergheim eine Sternwallfahrt nach Maria Plain, ausgehend von der Pfarrkirche Bergheim, von Lengfelden sowie von der Schlosskapelle Radeck. Verkehr Radeck hat Anschluss an die Lamprechtshausener Straße (B 156) und ist von dieser auf einer Zufahrtsstraße erreichbar. Unweit befindet sich die Autobahnausfahrt Salzburg Nord der Westautobahn (A 1). Jenseits der Lamprechtshausener Straße gibt es Haltestellen der Salzburger Autobuslinie 21. Weblinks Einzelnachweise Bergheim (Flachgau) Ort im Bezirk Salzburg-Umgebung"} {"text": "[HI Wikipedia] रशीद उद-दीन हमदानी\n\nरशीद उद-दीन (फ़ारसी: , अंग्रेज़ी: Rashīd al-Dīn Tabīb; जन्म: १२४७; मृत्यु: १३१८), जिन्हें रशीद उद-दीन फ़ज़्ल-उल्लाह​ हमदानी (फ़ारसी: , अंग्रेज़ी: Rashīd al-Dīn Fadhl-allāh Hamadānī) भी कहते हैं, एक मध्यकालीन ईरानी चिकित्सक, गणितज्ञ और लेखक थे। उन्होंने इस्लामी इतिहास पर 'जामी अल-तवारीख़' (यानि 'इतिहासों का जमावड़ा') नामक एक बहुत विस्तृत ग्रन्थ लिखा था। इसे विशेषकर १३वीं और १४वीं शताब्दियों के इल्ख़ानी साम्राज्य के इतिहास का एक आधिकारिक दस्तावेज़ माना जाता है। इसमें मंगोलिया और चीन से लेकर स्तेपी क्षेत्र, मध्य यूरेशिया, अरबी प्रायद्वीप और यूरोप तक का विवरण दिया गया था। वे यहूदी-धर्मी थे लेकिन जीवन में आगे चलकर उन्होंने इस्लाम में धर्म-परिवर्तन कर लिया। इन्हें भी देखें इल्ख़ानी साम्राज्य सन्दर्भ इलख़ानी साम्राज्य ईरान का इतिहास इस्लाम का इतिहास मंगोल इतिहास इस्लाम में परिवर्तित लोगों की सूची यहूदी धर्म से इस्लाम में परिवर्तित लोगों की सूची"} {"instruction": "Develop a shell script to display the information of the current logged in user.", "input": "", "output": "#!/bin/bash echo \"The username is: $(whoami)\" echo \"The home directory is: $HOME\" echo \"The current shell is: $SHELL\""} {"instruction": "Design a Java class for a Car which has the following attributes: name, model, year, and price.", "input": "", "output": "class Car { private String name; private String model; private int year; private double price; //constructor to initialize Car object public Car(String name, String model, int year, double price) { this.name = name; this.model = model; this.year = year; this.price = price; } //getters and setters public String getName() { return name; } public void setName(String name) { this.name = name; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } @Override public String toString() { return \"Car: \" + this.name + \" \" + this.model + \" (\" + this.year + \"), \" + this.price; } }"} {"instruction": "Write code to print out the numbers up to and including the provided number, starting at 1.", "input": "number = 10", "output": "\"\"\" Write code to print out the numbers up to and including the provided number, starting at 1. \"\"\" def print_numbers_up_to(n): for i in range(1, n+1): print(i) if __name__ == '__main__': print_numbers_up_to(10)"} {"instruction": "Create a Python program that will print the current date and time in the following format:", "input": "", "output": "import datetime\ndate = datetime.datetime.now()\nprint(\"{:0>2}/{:0>2}/{} {:0>2}:{:0>2}\".format(date.day, date.month, date.year, date.hour, date.minute))"} {"text": "[EN Wikipedia] Lionel Chee\n\nLionel Chee (born 4 August 1931) is a Singaporean water polo player. He competed in the men's tournament at the 1956 Summer Olympics. He was given the honour of carrying the national flag of Singapore at the opening ceremony of the 1956 Summer Olympics in Melbourne, becoming the eighth water polo player to be a flag bearer at the opening and closing ceremonies of the Olympics. References External links 1931 births Living people Singaporean male water polo players Olympic water polo players for Singapore Water polo players at the 1956 Summer Olympics Place of birth missing (living people) Asian Games medalists in swimming Asian Games medalists in water polo Asian Games gold medalists for Singapore Asian Games silver medalists for Singapore Asian Games bronze medalists for Singapore Swimmers at the 1951 Asian Games Swimmers at the 1954 Asian Games Water polo players at the 1951 Asian Games Water polo players at the 1958 Asian Games Water polo players at the 1962 Asian Games Medalists at the 1951 Asian Games Medalists at the 1954 Asian Games Medalists at the 1958 Asian Games Medalists at the 1962 Asian Games 20th-century Singaporean people"} {"text": "[CS Wikipedia] Ingrid Spieglová\n\nIngrid Spieglová, provdaná Holásková (* 6. srpna 1960 Opava), je bývalá československá krasobruslařka, která spolu se svým bratrem Alanem Spieglem (* 7. srpna 1959) soutěžila v kategorii sportovních dvojic. Sourozenci se stali šestinásobnými mistry Československa a v krasobruslení reprezentovali Československo na Zimních olympijských hrách 1976 v Innsbrucku. Osobní život Ingrid Spieglová se narodila v Opavě, jejím starším sourozencem je Alan Spiegl, s kterým tvořili krasobruslařskou sportovní dvojici. V roce 1984 oba dokončili studium na Pedagogické fakultě Masarykovy univerzity v Brně. Po provdání přijala příjmení Holásková. Žije a pracuje v Brně. Kariéra Dosažené sportovní výkony V roce 1973 se spolu s bratrem přestěhovali z Opavy do Brna, kde se jich ujal trenér Ivan Rezek. Sourozenci reprezentovali Československo v krasobruslení, v kategorii sportovních dvojic. Postupně se zařadili mezi světovou špičku. V letech 1975–1980 byli ve své kategorii mistry Československa v krasobruslení, čímž získali šest zlatých medailí. Na mezinárodní úrovni poprvé startovali v roce 1975, kdy na Mistrovství Evropy v krasobruslení v Kodani skončili na 12. pozici. Následující sezonu v roce 1976 se na Mistrovství Evropy v krasobruslení v Ženevě umístili znovu na 12. místě. V témže roce na XII. Zimních olympijských hrách v Innsbrucku vybojovali 13. místo. Na závěr sezóny se umístili na 10. místě na Mistrovství světa v krasobruslení v Göteborgu. Na celosvětové úrovni dosáhli sourozenci nejlepších sportovních výsledků v roce 1977 na Mistrovství světa v krasobruslení v Tokiu a v roce 1978 na Mistrovství světa v krasobruslení v Ottawě. Nejlepšího výsledku na evropských soutěžích dosáhli v roce 1978 na Mistrovství Evropy v krasobruslení ve Štrasburku, kde se umístili na 5. místě. V roce 1977 na Golden Spin v Záhřebu získali stříbrné medaile. Tutéž medaili získali i v letech 1978 a 1979 na Pražské brusli. Bronz obdrželi na soutěži Ennia Challenge Cup v roce 1979. V roce 1980 se měli zúčastnit Zimních olympijských her v Lake Placid, ale tehdejší komunistický režim se rozhodl dát své místo někomu jinému. Sourozenci ukončili svoji sportovní kariéru na konci sezóny v roce 1980. Období po ukončení závodní činnosti Po skončení závodní činnosti vystupovali sedm let v profesionální revui Holiday on Ice. Poté se Ingrid Holásková vrátila k vystudovanému oboru a vyučuje tělesnou výchovu a zeměpis na základní škole v Brně. Sportovní úspěchy Společně s bratrem Alanem Spieglem Odkazy Reference Externí odkazy Československé krasobruslařky Českoslovenští olympionici Mistryně Československa v krasobruslení Absolventi Pedagogické fakulty Masarykovy univerzity Narození v roce 1960 Narození 6. srpna Narození v Opavě Žijící lidé Ženy"} {"instruction": "Calculate the sum of a given list of integers in Python.", "input": "[ 7, 15, 23, 5, 9 ]", "output": "def sum_list(my_list):\n total = 0\n for num in my_list:\n total += num\n return total\n\nprint(sum_list([7, 15, 23, 5, 9]))"} {"instruction": "Write a Python program that generates a series of Fibonacci numbers.", "input": "", "output": "def fibonacci(n):\n a = 0\n b = 1\n for _ in range(n):\n a, b = b, a + b\n return a\n\nprint(fibonacci(10))"} {"instruction": "Create an array with 3 strings, \"John\", \"Sam\" and \"Anna\".", "input": "", "output": "string names[] = {\"John\", \"Sam\", \"Anna\"};"} {"instruction": "Create a Bash script to find the sum of all the numbers divisible by 3 and 5 in a given list.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "#!/bin/bash arr=(1 2 3 4 5 6 7 8 9 10) sum=0 for n in ${arr[@]} do if [ $(($n%3)) -eq 0 -o $(($n%5)) -eq 0 ];then let sum=$sum+$n fi done echo $sum"} {"instruction": "Create a loop using Python to print the numbers 1 to 10.", "input": "", "output": "for i in range(1,11):\n print(i)"} {"instruction": "Can you explain the bubble sort algorithm?", "input": "", "output": "Bubble sort is a simple sorting algorithm which iterates through a list and compares adjacent elements, swapping them if they are in the incorrect order. This process is repeated until the list is sorted in its correct order. It is a slow algorithm as it requires multiple iterations of the list, but it is simple to understand and implement."} {"instruction": "Create a Python script to generate a report of top 5 companies by total revenue.", "input": "List of current companies with their respective revenue and profit information", "output": "import pandas as pd\n\n# Read the input data\ndf = pd.read_csv('company_data.csv')\n\n# Select the top 5 companies by total revenue\ntop_5 = df.sort_values(by='revenue', ascending=False).head(5)\n\n# Generate the report\nprint(\"Top 5 Companies by Total Revenue\")\nprint(\"-------------------------------\")\nfor index, row in top_5.iterrows():\n print(\"Company name: {}, Total Revenue: {:.2f}, Total Profit: {:.2f}\".format(\n row['name'], row['revenue'], row['profit']\n ))"} {"instruction": "Write a loop to iterate through all elements in an array in JavaScript.", "input": "", "output": "for (let i = 0; i < array.length; i++) { const element = array[i]; // perform operations on element }"} {"instruction": "Write an assembly language program to check if a given number is least in its sequence.", "input": "", "output": ".model small .stack 100h .data num dw 5 .code start: mov ax, @data mov ax, num cmp ax, [num+2] ; compare current number with the next number jbe least ; if current number is lesser or equal jump to least ;code to print least number least: mov ah, 9 mov dx, offset num int 21h mov ah, 4Ch int 21h end start"} {"instruction": "Generate a correct Python program to calculate the linear regression line of a dataset", "input": "x_data: [1, 2, 3, 4, 5]\ny_data: [2, 4, 5, 4, 5]", "output": "import numpy as np \n\ndef linear_reg(x_data, y_data):\n\n x_mean = np.mean(x_data)\n y_mean = np.mean(y_data)\n\n numerator = 0\n denominator = 0\n for i in range(len(x_data)):\n numerator += (x_data[i] - x_mean) * (y_data[i] - y_mean)\n denominator += (x_data[i] - x_mean) ** 2\n\n slope = numerator/denominator\n intercept = y_mean - (slope * x_mean)\n return slope, intercept"} {"instruction": "Display the multiplication table for a given number.", "input": "num = 6", "output": "def num_mult_table(num): # Iterate through the numbers from 1 to 10 for i in range(1,11): # Print the multiplication table for the given number print(\"{} x {} = {}\".format(num, i, num*i)) num_mult_table(num) # Output # 6 x 1 = 6 # 6 x 2 = 12 # 6 x 3 = 18 # 6 x 4 = 24 # 6 x 5 = 30 # 6 x 6 = 36 # 6 x 7 = 42 # 6 x 8 = 48 # 6 x 9 = 54 # 6 x 10 = 60 #"} {"text": "[CS Wikipedia] La Roux\n\nLa Roux je synthpopové duo, pocházející z Velké Británie. Ve své tvorbě se inspirovali především hudbou z 80. let 20. století (respektive elektronickou hudbou). Byli ovlivněni hudebními skupinami jako například Human League, Depeche Mode, Heaven 17 a Yazoo. Členové Ačkoliv se skupina tváří jako jednotlivec, ve skupině jsou dva lidi. Ellie Jackson se narodila v roce 1988 jako dcera herečky Trudie Goodwinové. V La Roux působí jako vokálistka a někdy i jako hráč na syntezátor. Ben Lagmaid - skladatel, producent. Diskografie Studiová alba La Roux (2009) Singly Quicksand (2008) In For The Kill (#2, 2009) Bulletproof (#1, 2009) I'm Not Your Toy (2009) Videoklipy Quicksand (2008, Kinga Burza) In For The Kill (2009, Kinga Burza) Bulletproof (2009, The Holograms@UFO) Reference Externí odkazy Britské hudební skupiny Držitelé ceny Grammy Dvojice v hudbě"} {"text": "[HI Wikipedia] झारखण्ड\n\nझारखण्ड भारत का एक राज्य है। राँची इसकी राजधानी है। झारखण्ड की सीमाएँ पूर्व में पश्चिम बंगाल, पश्चिम में उत्तर प्रदेश एवं छत्तीसगढ़, उत्तर में बिहार, और दक्षिण में ओड़िशा को छूती हैं। लगभग सम्पूर्ण प्रदेश छोटानागपुर के पठार पर अवस्थित है। सम्पूर्ण भारत में वनों के अनुपात में प्रदेश एक अग्रणी राज्य माना जाता है। बिहार के दक्षिणी भाग को विभाजित कर झारखण्ड प्रदेश का सृजन किया गया था। इस प्रदेश के अन्य बड़े शहरों में धनबाद, बोकारो एवं जमशेदपुर शामिल हैं। नामांकरण विभिन्न इंडो-आर्यन भाषाओं में \"झार\" शब्द का अर्थ है 'जंगल' और \"खण्ड\" का अर्थ 'भूमि' है, इस प्रकार \"झारखण्ड\" का अर्थ वन भूमि है। \"छोटानागपुर पठार\" में बसा होने के कारण इसे \"छोटानागपुर प्रदेश\" भी बोलते हैं। झारखण्ड को \"जंगलों का प्रदेश\" भी कहा जाता है। मुग़ल काल में इस क्षेत्र को कुकरा नाम से जाना था। झारखण्ड के आदिवासियों के अनुसार, झारखण्ड दो शब्द \"जाहेर\" (सारना स्थल) और \"खोण्ड\" (वेदी) शब्दों से मिलकर बना है। प्राचीन काल में, सुतिया नामक मुण्डा के शासनकाल में इसे \"जाहेरखोण्ड\" नाम से जाना जाता था। मध्यकाल में, इस क्षेत्र को झारखण्ड के नाम से जाना जाता था। भविष्य पुराण (1200 CE) के अनुसार, झारखण्ड सात पुण्ड्रा देश में से एक था। यह नाम पहली बार पूर्वी गंगवंश के नरसिंह देव द्वितीय के शासनकाल से ओडिशा क्षेत्र के केन्द्रपाड़ा में 13 वीं शताब्दी की ताम्बे की प्लेट पर पाया गया है। बैधनाथ धाम से पुरी तक की वन भूमि झारखण्ड के नाम से जानी जाती थी। अकबरनामा में, पूर्व में पंचेत से लेकर पश्चिम में रतनपुर तक, उत्तर में रोहतासगढ़ और दक्षिण में ओडिशा की सीमा को झारखण्ड के रूप में जाना जाता था। इतिहास प्राचीन काल झारखण्ड के हजारीबाग जिले में लगभग 5000 साल पुराना गुफा चित्र मिला है। इस राज्य में ईसा पूर्व 1400 काल के लोहे के औज़ार और मिट्टी के बर्तन के अवशेष मिले हैं। 325 ईसा पूर्व में भारत के उत्तरी इलाके बिहार से उत्पन्न मौर्य साम्राज्य का हिस्सा हुआ करता था। झारखण्ड में राज्य निर्माण की प्रक्रिया मुण्डा और भूमिज जनजातियों द्वारा शुरू किया गया था। छोटानागपुर में रिसा मुण्डा प्रथम मुण्डा जनजातीय नेता था, जिसने राज्य निर्माण की प्रक्रिया शुरू की। उसने सुतिया पाहन को मुण्डाओं का शासक चुना और सुतिया नागखण्ड नामक नये राज्य की स्थापना की। भूमिज जनजाति ने धालभूम, बड़ाभूम, पंचेत, सिंहभूम और मानभूम में भूमिज साम्राज्य की स्थापना की थी, जो झारखंड, पश्चिम बंगाल और ओडिशा के कुछ हिस्सों तक फैली थी। भूमिजों ने ब्रिटिश शासन के आगमन तक शासन किया। मुण्डा सम्राज्य के अंतिम शासक मदरा मुण्डा थे, जिन्होंने फणि मुकुट राय को गोद लिया था। फणि मुकुट राय ने छोटानागपुर में नागवंशी वंश की स्थापना की थी। मध्यकाल मध्यकाल में इस क्षेत्र में चेरो राजवंश और नागवंशी राजवंश राजाओं का शासन था। मुगल प्रभाव इस क्षेत्र में सम्राट अकबर के शासनकाल के दौरान पहुंचा जब 1574 में राजा मानसिंह ने इस पर आक्रमण किया था। दुर्जन साल मध्य काल में छोटानागपुर महान नागवंशी राजा थे, उनके शासन काल में वे मुगल शासक जहांगीर के समकालीन के सेनापति ने इस क्षेत्र में आक्रमण किया था। राजा मेदिनी राय ने, 1658 से 1674 तक पलामू क्षेत्र पर शासन किया। आधुनिक काल 1765 के बाद…"} {"text": "[CS Wikipedia] Dvořan (Castiglione)\n\nDvořan (, plným názvem Il Libro del Cortegiano) je kniha italského renesančního autora Baldassara Castigliona, kterou napsal, když byl v diplomatických službách na urbinském dvoře v letech 1504–1518. V renesanci byl tento dvůr považován za nejdokonalejší. V roce 1507 se tu uskutečnily rozhovory autorových významných přátel, které zaznamenal ve čtyřech knihách. V první a druhé hledá společnost dokonalého dvořana, ve třetí dokonalou dvorní dámu, ve čtvrté dokonalého vládce. Podle Castigliona je dokonalost jen idea, o kterou ale stojí usilovat, protože kdo se jí přiblíží nejvíce, ten je nejdokonalejší. Sám autor se o to pokoušel. Třetí kniha je výjimečná v názorech na ženu. Do té doby byly názory na ženu nesmyslné a bezcitné. To dokazuje postava knihy, literát Gaspare Pallavicino. který tvrdí, co učenci o ženě psali: že její narození je chybou a omylem přírody,nebo že je bytostí vzešlou z rozmaru přírody a náhody. Finská spisovatelka Kaari Utrio ve své knize \"Dcery Eviny\" uvádí příklady takových nepochopení i od obdivovaných slavných duchů doby. Ve třetí knize o dvořanovi Giuliano de Medici dostává za úkol vytvořit k dokonalému dvořanovi dokonalou dvorní dámu. Ženy jen chválí, vyzdvihuje jejich stálost a počestnost a přesvědčuje druhé, že se žena ve všem muži vyrovná. Uvádí i mnohé příklady statečnosti žen od starověku. A jako dvořan se vyzná i v písemnictví, hudbě, malířství a sochařství. Zná jména takových žen, ale nechce je jmenovat, když je každý zná. Jaká byla jména těchto žen? Sám Giuliano Medici měl babičku Lukrécii Tornabuoni, básnířku a dramatičku. Castiglione znal Vittorii Colonnu, básnířku, které půjčil svůj rukopis. V mládí, když studoval v Miláně, mohl poznat na dvoře Lodovica Sforza Cecili Gallerani, která psala i básně. V Římě potom Thulii d Aragonu, filozofku a básnířku. V klášteře ve Ferraře malovala miniatury Caterina da Bologna a v samotné Bologni Properzia de Rossi vytvořila v mramoru čtyři reliéfy pro kostel San Petronio. Castiglione zemřel v roce 1529. Po jeho smrti se narodily ženy ještě významnější a popřely názor řeckých a římských filosofů, že žena nemá rozum na stejné úrovni jako muž. Překlady knihy \"Dvořan\" byly pořízeny nejdříve ve Španělsku, Francii a Anglii. Na šlechtických dvorech těchto zemí se staly normou dokonalého chování pro šlechtické dvory a inspirací pro spisovatele. Reference Externí odkazy Literatura Baldassare Castiglione, Dvořan, Odeon Praha, 1978 Kaari Utrio: Dcery Eviny, nakl. Hejka, Havlíčkův Brod, 1999 Jan Vladislav: Navštívení krásy, MF,Praha, 1964 Peter Burke: Italská renesance, MF, Praha, 1996 Christopher Herbert: Vzestup a pád rodu Medici, nakl. Lidové noviny,Praha 1997 Knihy ze 16. století Renesanční spisovatelé Italští spisovatelé"} {"instruction": "Create a Python program to optimize the running time of a program using memoization.", "input": "# k: as an input parameter\n# f: a recursive function", "output": "def memoize(f, k):\n memo = dict()\n \n def helper(x):\n if x not in memo: \n memo[x] = f(x)\n return memo[x]\n \n return helper(k)"} {"instruction": "Use the given dictionary to find the value for the key \"city\".", "input": "{\"name\": \"John Smith\", \"age\": 42, \"city\": \"Los Angeles\"}", "output": "#Use the given dictionary to find the value for the key \"city\" dictionary = {\"name\": \"John Smith\", \"age\": 42, \"city\": \"Los Angeles\"} city = dictionary[\"city\"] print(\"The value for the key city is: \" + city)"} {"instruction": "Can you design an algorithm in Python that takes a string and returns all its possible permutations?", "input": "", "output": "def permutations(string):\n # base case\n if len(string) <= 1:\n return set([string])\n\n # recursive case\n else:\n perms = permutations(string[1:])\n char = string[0]\n result = set()\n for perm in perms:\n for i in range(len(perm)+1):\n result.add(perm[:i] + char + perm[i:])\n return result\n\nprint(permutations(\"ABC\"))"} {"text": "[DE Wikipedia] Lighter\n\nLighter ist ein Lied der US-amerikanischen Sängerin Miley Cyrus, welches auf ihrem fünften Studioalbum Miley Cyrus & Her Dead Petz am 30. August 2015 auf SoundCloud erschien. Am 21. November 2015 wurde ein Musikvideo zu dem Lied veröffentlicht. Cyrus trat mit Lighter bei ihrer Milky Milky Milk Tour auf. Komposition Das Lied wurde von Miley Cyrus geschrieben und von Mike Will Made It und A+ produziert. Der Text handelt von zwei Personen, die mit einem Auto fahren und zusammen Marihuana rauchen. Die Ich-Person beschreibt dabei die andere Person als ihr Feuerzeug, wenn sie Feuer braucht. Außerdem werden die Gedanken und Gefühle der Person gegenüber ihrem Partner aufgezeigt. Liveauftritte Cyrus sang das Lied bei ihrer Milky Milky Milk Tour im November und Dezember 2015 in den Vereinigten Staaten und Kanada. Musikvideo Das Musikvideo zu Lighter wurde am 21. November 2015 auf Cyrus' Facebook-Seite veröffentlicht. Regie führten Cyrus und Wayne Coyne von The Flaming Lips. Im Video ist Cyrus vor einer Wand zu sehen, die, ebenso wie sie selbst, mit buntem Licht bestrahlt wird, welches verschiedene Formen darstellt, die sich verändern. Cyrus wird sowohl mit ihrem ganzen Körper, als auch mit einer Nahaufnahme ihres Gesichts gezeigt. Weblinks Lighter Musikvideo auf YouTube Einzelnachweise Lied 2015 R&B-Song Miley-Cyrus-Lied Lied von Miley Cyrus"} {"instruction": "Develop a Python program to insert a given element into a specific position in a list", "input": "2, [1, 3, 4]", "output": "# Create a function\ndef insert_element(el, lst):\n # Insert the element into the specific position\n lst.insert(2, el)\n return lst\n\n# Test the function\nprint(insert_element(2, [1,3,4]))\n\n# Output\n[1, 3, 2, 4]"} {"instruction": "Design a MySQL Table to store company employees.", "input": "", "output": "CREATE TABLE `employee` ( `employee_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` varchar(255) NOT NULL, `dob` datetime NOT NULL, `salary` decimal(10,2) NOT NULL, `address` varchar(255) );"} {"instruction": "Write a Python program to automatically format a given source code in standardized way.", "input": "", "output": "import ast\nimport autopep8\n\n# astunparse: https://docs.python.org/3/library/ast.html#ast.unparse\ndef format_source_code(code):\n root = ast.parse(code)\n code_ast = ast.unparse(root)\n code_formatted = autopep8.fix_code(code_ast, options={'aggressive': 1})\n return code_formatted"} {"text": "[DE Wikipedia] -leben\n\n-leben ist ein in Deutschland vorkommender Bestandteil von Ortsnamen, der besonders im östlichen Niedersachsen, Sachsen-Anhalt und Thüringen gehäuft auftritt. Der hochdeutsche Ortsnamenteil -leben hatte im Mittelniederdeutschen meist die Form -leve, im Ostfälischen gibt es die Varianten -lewwe/-lebbe und -lä/-lee (vgl. Harrislee). Bedeutungsgleiche Ortsnamenendungen gibt es auch in Skandinavien. Im Dänischen lautet der Namensbestandteil -lev und im Schwedischen -löv. Bedeutung Die Grundbedeutung von -lev oder -löv ist „etwas Überlassenes, Zurückgelassenes“ (urgerm. *laiba-, vgl. englisch to leave), woraus sich dann die Bedeutung „Erbe“ entwickelte. In den meisten Fällen bezeichnet der erste Teil des Ortsnamens einen Mann, der etwas hinterlassen, sprich vererbt hat. So ist bspw. das 937 erstmals als Fridumaresleba bezeugte Fermersleben als „Erbe (d.h. Erbhof o.ä.) des Fridumar“ zu deuten. Eindeutschung ursprünglich slawischer Ortsnamen Im sorbischen Sprachraum wurde eine slawische Endung -slav’ oft sekundär an die bestehende mittelniederdeutsche Endung -leve oder an die mittelhochdeutsche Endung -leibe(n) angepasst. So gehen die Ortsnamen Blattersleben, Jersleben (Kreis Wolmirstedt) und Pripsleben (Kreis Demmin, Vorpommern) aus den rekonstruierten Ortsnamen *Bratroslav’, *Jaroslav’ und *Pribyslav’ zurück. Verbreitung Die ältesten Ortsnamen mit der Endung -lev oder -löv könnten aus der Zeit der Völkerwanderung stammen. Dass die beiden Verbreitungsgebiete in Mitteldeutschland und Skandinavien auf gemeinsame kulturelle Ursprünge zurückgehen, gilt heute als unwahrscheinlich. Denkbar sind hier parallele Bildungen auf der Grundlage eines gemeinsamen Etymons. In der älteren Forschung wurden völkerwanderungszeitliche Bevölkerungsbewegungen aus Skandinavien in das spätere Thüringer-Reich vermutet, die mit weiteren Wortverteilungen und Siedlern der Angeln und Warnen in Verbindung gebracht wurde. Deutschland Die -leben-Namen häufen sich in zwei miteinander verbundenen Gebieten, einerseits im mittleren Sachsen-Anhalt links der Elbe und der unteren Saale, andererseits in den westlichen, zentralen und nördlichen Teilen Thüringens. In der Altmark tauchen sie nur ganz vereinzelt auf; im ehemals slawischen Siedlungsgebiet östlich von Elbe und Saale gar nicht (abgesehen von wenigen Ausnahmen nahe dieser Flüsse). Letzteres weist darauf hin, dass dieses Suffix bereits bei Einsetzen der Ostsiedlung veraltet war und nicht mehr für neue Ortsnamen genutzt wurde. Die etwas schwächere und stärker mit anderen Ortsnamen gemischte Verbreitung in Thüringen weist Karl Bischoff zufolge auf eine spätere Besiedlung aus dem älteren, dichteren Kerngebiet im Norden hin. Er vermutete ein sehr hohes Alter, da die Dörfer häufig in Haufen gebaut sind; da sie abseits von Wäldern und Gebirgen…"} {"instruction": "Write a regular expression to validate a given string of IP addresses.", "input": "", "output": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"} {"instruction": "Write a Python program to parse a given XML document and insert it into a SQL database.", "input": "Not applicable", "output": "import xml.etree.ElementTree as et\nimport mysql.connector\n\n# Connect to the MySQL database\ndb = mysql.connector.connect(\n host=\"localhost\",\n user=\"yourusername\",\n passwd=\"yourpassword\",\n database=\"mydatabase\"\n)\n\n# Parse the XML\ntree = et.parse('mytest.xml')\nroot = tree.getroot()\n\n# Iterate over each element and add to database\nfor element in root:\n sql = \"INSERT INTO mytable (\"\n columns = []\n values = []\n for child in element:\n columns.append(child.tag)\n values.append(\"'\"+child.text+\"'\")\n sql += \", \".join(columns)\n sql += \") VALUES (\"\n sql += \", \".join(values)\n sql += \")\"\n cursor = db.cursor()\n cursor.execute(sql)\n\n# Commit changes\ndb.commit()"} {"instruction": "Write a Regular Expression that matches all strings starting with a lowercase 'a' and ending with an uppercase 'Z'.", "input": "", "output": "^a.*Z$"} {"instruction": "Analyze and explain the output of the following C program.", "input": "#include int main(){ int x,y; x=2; y=++x*5; printf(\"%d\\n\",y); }", "output": "The output of this program is \"15\". This is because the pre-increment operator (++) is used in the statement \"y=++x*5\". This means that the value of x is first incremented by 1 and then used in the statement. Therefore, the value of x is 3 and y is assigned the value 3*5 which is 15."} {"instruction": "Write a Python program to check if a list contains a specific item.", "input": "data = [3, 4, 5, 6, 7]", "output": "def contains_item(data, item): return item in data"} {"instruction": "Create a Python class called \"Person\" with attributes \"name\" and \"age\".", "input": "", "output": "class Person:\n def __init__(self, name, age):\n self.name = name\n self.age = age"} {"instruction": "Write a Python script to compute the mean of a given set of numbers.", "input": "[78.3, 75.1, 76.7, 78.2]", "output": "def mean(list_of_numbers):\n total = 0\n for num in list_of_numbers:\n total += num\n return total / len(list_of_numbers)\n\nlist_of_numbers = [78.3, 75.1, 76.7, 78.2]\nmean_of_list = mean(list_of_numbers)\nprint(mean_of_list)"} {"instruction": "Write a Python function to check if a given number is an Armstrong number.", "input": "Not applicable", "output": "def is_armstrong_number(num): \n \n # Calculate the number of digits \n n = len(str(num)) \n \n # Check whether is an armstrong number \n sum = 0 \n temp = num \n while temp > 0: \n digit = temp % 10\n sum += digit ** n \n temp //= 10\n \n if num == sum: \n return True\n else: \n return False"} {"instruction": "Create a list comprehension to convert each element to its square root.", "input": "my_list = [1, 4, 9, 16, 25]", "output": "squared_list = [x**0.5 for x in my_list]"} {"instruction": "Write a SQL query to group the data based on 'category' and counting the number of entries in each category.", "input": "", "output": "SELECT category, COUNT(*) FROM table_name GROUP BY category;"} {"instruction": "Write a lambda expression to select all the strings from a given array whose length is less than 5.", "input": "arr = [\"Hello\", \"Bye\", \"Morning\", \"Evening\", \"Hi\", \"Bye Bye\"]", "output": "filtered = list(filter(lambda x : len(x) < 5, arr))"} {"instruction": "Create a JavaScript function that can convert miles to kilometers.", "input": "", "output": "function convertMilesToKilometers(miles) { return miles * 1.60934; }"} {"instruction": "Generate a Markov chain model that can generate text. This model should be able to generate realistic natural language sentences when given an input text.", "input": "Not applicable", "output": "from markov_python.cc_markov import MarkovChain\n\n#Creating a Markov Chain\nmc = MarkovChain()\n\n# Generate text\ntext_file = open('input.txt', 'r')\nmc.add_file(text_file)\nprint(mc.generate_text())"} {"instruction": "Write an HTML web page from scratch that displays a list of 10 different CSS colors randomly.", "input": "", "output": " Random Colors

    Random Colors

    • #9b024a
    • #f06f56
    • #ffb003
    • #37478d
    • #82e3d3
    • #2e2fbb
    • #b82da9
    • #0093fa
    • #4dadf4
    • #ee2f88
    "} {"instruction": "Design a program in Python to delete an element from the give list.", "input": "List: [1,2,3,4,5]\nElement to delete: 3", "output": "def delete_element(arr, element): \n new_arr = [i for i in arr if i!=element]\n return new_arr"} {"instruction": "Edit the following Python program to accept a list of numbers as input and find the second largest number from the list.", "input": "[12, 23, 45, 22, 50]", "output": "# Find the second largest number from a given list\n\nnumbers = [12, 23, 45, 22, 50]\n\n# Sort the list in ascending order\nnumbers.sort()\n\n# Get the second largest number\nsecond_largest_num = numbers[-2]\n\nprint('The second largest number in the list is:', second_largest_num)"} {"instruction": "Write a Python function that takes a list of numbers and prints out a list of their squares.", "input": "[1, 2, 3]", "output": "def squares(arr):\n res = []\n for i in arr:\n res.append(i**2)\n return res\n\narr = [1, 2, 3]\nres = squares(arr)\nprint(res)"} {"instruction": "Generate a random code string with each character from A-Z and 0-10.", "input": "", "output": "import random def random_code_string(length): chars = [chr(i) for i in range(65, 91)] + [str(digit) for digit in range(10)] code_string = \"\" for _ in range(length): random_char = random.choice(chars) code_string += random_char return code_string"} {"text": "[EN Wikipedia] Klíčany\n\nKlíčany is a municipality and village in Prague-East District in the Central Bohemian Region of the Czech Republic. It has about 600 inhabitants. References Villages in Prague-East District"} {"instruction": "Create a PHP script to store data in a MySQL database.", "input": "", "output": ""} {"text": "[DE Wikipedia] Middleton Island\n\nMiddleton Island ist der Name mehrerer Inseln Middleton Island (Alaska), Insel in Alaska, Vereinigte Staaten Middleton Island (Illinois), Insel in den Vereinigten Staaten Middleton Island (Nunavut), Insel in Kanada Middleton Island (Saskatchewan), Insel in Kanada Middleton Island (Manitoba), Insel in Kanada"} {"instruction": "Use PHP to create a web page redirect script.", "input": "", "output": ""} {"text": "[EN Wikipedia] Bill Carr (American football)\n\nWilliam Curtis Carr, III (born November 29, 1945) is an American retired college football player, coach, and athletics administrator. Carr was born in Gainesville, Florida, raised in Pensacola, Florida, and attended the University of Florida, where he was an All-American center for the Florida Gators football team in the mid-1960s. He served in the United States Army for two years, and after an unsuccessful attempt to make a National Football League roster, Carr returned to UF as an assistant football coach. He soon moved into sports administration at the school, and in 1979, he became the athletic director at the University of Florida at the age of 33, making him the youngest athletic director among major universities at the time. He later served as the athletic director at the University of Houston and has been involved in college sports consulting since the late 1990s. Early life Carr was born in Gainesville, Florida, the son of a Baptist minister. He grew up in Vero Beach and Pensacola, Florida. Carr attended Pensacola High School, and was a standout high school football player for the Pensacola Tigers. Following his senior season, he was recognized as a first-team all-state selection. College years Carr accepted an athletic scholarship to attend the University of Florida in Gainesville, where he was the center for coach Ray Graves' Florida Gators football team from 1964 to 1966. Carr was the roommate of the Gators' Heisman Trophy-winning quarterback Steve Spurrier before Spurrier's marriage in September 1966, and was a team captain his senior year. He was named a first-team All-Southeastern Conference selection and a first-team All-American in 1966. Carr and the Gators concluded the 1966 season with a 27–12 victory over the Georgia Tech Yellow Jackets in the 1967 Orange Bowl. Carr graduated from Florida with a bachelor's degree in Spanish in 1968, and was later inducted into the University of Florida Athletic Hall of Fame as a \"Gator Great.\" Professional football and military service The New Orleans Saints selected Carr in the fourth round (106th pick overall) of the 1967 NFL Draft. Carr signed with the Saints in , but had to fulfill his military service obligation before he could play. When he returned to the Saints after two years in the U.S. Army, he did not make the final roster cut in the preseason. Coach, athletic director and consultant Carr retired as a player and returned to the University of Florida in 1970 to serve as a football graduate assistant under head coach Doug Dickey while earning a master's degree in education. He then served as an assistant junior varsity coach and academic advisor while studying sports administration, and in 1974, he became an assistant to Florida athletic director Ray Graves. Carr was promoted to the…"} {"instruction": "Write a Python program to create a function that takes two numbers as arguments and returns a list of all odd numbers between them.", "input": "start_range = 2 end_range = 10", "output": "def get_odds(start_range, end_range): return [num for num in range(start_range, end_range+1) if num % 2 != 0]"} {"instruction": "Write a Python program to shuffle the items of a given list in random order.", "input": "list_elements = [1, 2, 3, 4, 5]", "output": "from random import shuffle def shuffle_list(list_elements): shuffle(list_elements) return list_elements"} {"instruction": "Create a CSS class with border radius and a background colour.", "input": "", "output": ".rounded-box { border-radius: 8px; background-color: #f5f5f5; }"} {"instruction": "Write a function in Python that will take two integers as inputs and compute their average.", "input": "int1 = 10 int2 = 15", "output": "def calculate_average(int1, int2): return (int1 + int2) / 2 print(calculate_average(int1, int2))"} {"instruction": "Extract words starting with 's' in this sentence.", "input": "Sentence: I send a package to Steve.", "output": "send, Steve."} {"text": "[HI Wikipedia] जॉर्जिया (देश)\n\nजॉर्जिया (საქართველო, \"साखार्थ्वेलो\") — पूर्वी यूरोप में स्थित एक देश है। ट्रांसकाकेशिया क्षेत्र के केंद्रवर्ती तथा पश्चिमी अंश में कृष्ण सागर के दक्षिण-पूर्वी तट पर स्थित एक राज्य है। सन् 1991 तक यह जॉर्जियाई सोवियत समाजवादी गणतंत्र के रूप में सोवियत संघ के 15 गणतंत्रों में से एक था। जॉर्जिया की सीमा उत्तर में रूस से, पूर्व में अज़रबैजान से और दक्षिण में आर्मीनिया तथा तुर्की से मिलती है। यह भी देखिए जॉर्जिया (विक्षनरी) सन्दर्भ Georgia TVNews (english, german, russian, georgian) बाहरी कड़ियाँ जॉर्जिया के राष्ट्रपति जॉर्जिया की सरकार जॉर्जिया के विदेश मामलों के मंत्रालय जॉर्जिया के पर्यटन विभाग और रिसॉर्ट्स जॉर्जिया में अमेरिकी वाणिज्य मंडल राज्य और कैबिनेट सदस्यों के चीफ सामान्य जानकारी Georgia पर UCB Libraries GovPubs जॉर्जिया प्रोफ़ाइल से BBC News आधुनिक वैज्ञानिक जांच की एसोसिएशन – (AMSI) यूरोप के देश नैऋत्य जंबुद्वीप एशिया के देश जॉर्जिया स्थलरुद्ध देश"} {"text": "[EN Wikipedia] Governor Rodrigues\n\nGovernor Rodrigues may refer to: Diogo Rodrigues (died 1577), Governor of Salsette from 1535 to 1548 Sarmento Rodrigues (1899–1979), Governor of Portuguese Guinea from 1946 to 1949, Governor General of Salazar from, 1950 to 1951, Governor General of Portuguese Mozambique from 1961 to 1964"} {"text": "[HI Wikipedia] वेनेरा 3\n\nवेनेरा 3 (Venera 3), शुक्र ग्रह के लिए सोवियत संघ का एक लैंडर था। हालांकि शुक्र के वायुमंडलीय मापन के अपने अभियान मे यह विफल हो गया, पर किसी अन्य ग्रह की धरती को छुने वाली यह पहली मानव निर्मित वस्तुं बन गई। दुर्भाग्य से, एक खराबी ने इसे शुक्र के किसी भी वैज्ञानिक डेटा को प्रेषित करने से रोक दिया | यह 15 नवम्बर,1965 को बैकोनुर, कज़ाख़िस्तान से रवाना हुआ, और 1 मार्च 1966 को शुक्र से टकराया | सन्दर्भ अंतरिक्ष यान"} {"instruction": "Design a Python class that represents a car.", "input": "", "output": "class Car:\n def __init__(self, make, model, year, color, mileage):\n self.make = make\n self.model = model\n self.year = year\n self.color = color\n self.mileage = mileage\n \n def get_make(self):\n return self.make\n \n def get_model(self):\n return self.model\n \n def get_year(self):\n return self.year\n \n def get_color(self):\n return self.color\n \n def get_mileage(self):\n return self.mileage\n \n def set_mileage(self, new_mileage):\n self.mileage = new_mileage"} {"instruction": "Create a command-line program in Python which takes in three command-line arguments. The program should add the three arguments and print the result in the console.", "input": "1 6 3", "output": "import sys\n\nif __name__ == '__main__':\n args = sys.argv[1:]\n if len(args) != 3:\n print('Error: Not enough arguments provided')\n else:\n result = int(args[0]) + int(args[1]) + int(args[2])\n print('Result: ' + str(result))"} {"instruction": "Create a function to evaluate a mathematical expression like \"3 + 5 * 4\".", "input": "", "output": "def evaluate(expression): result = None try: result = eval(expression) except: pass return result"} {"instruction": "Create a SQL query to get the names and ages of all the users with an age greater than 25.", "input": "", "output": "SELECT name, age FROM users WHERE age > 25;"} {"instruction": "Create a web service in Python that can generate random numbers.", "input": "", "output": "from flask import Flask\nimport random\n\n# Create a Flask object\napp = Flask(__name__)\n\n@app.route(\"/random//\")\ndef generate_random_number(min, max):\n # Generate a random number between min and max\n random_number = random.randint(min, max)\n return str(random_number)\n\nif __name__ == \"__main__\":\n app.run()"} {"instruction": "Estimate the power demand of a computer system using the given time and CPU utilization information using Python.", "input": "Utilization = 10%\nOperating Time = 10 hours\nPower Consumption = 100 Watts", "output": "def calculatePowerDemand(util, time, power):\n return util * time * power\n\nPowerDemand = calculatePowerDemand(0.1, 10, 100)\nprint(PowerDemand)"} {"instruction": "Determine the output of this code snippet in C++: int x = 7; x = x + x + 2;", "input": "", "output": "The output of the code snippet is 22, since the value of x will be incremented twice, from 7 to 16 and then again from 16 to 22."} {"text": "[CS Wikipedia] Barometr\n\nBarometr (tlakoměr) je přístroj k měření atmosférického tlaku (tlaku vzduchu), používaný k určování stavu a předpovědi počasí (při vyšším tlaku bývá obvykle jasno, při nízkém tlaku lze očekávat změnu jasného počasí na deštivé). Barometry mohou být založeny na různém principu: Rtuťový barometr se skládá z trubice na jednom konci zatavené, naplněné rtutí, na kterou na druhém zahnutém konci působí atmosférický tlak. Podle výšky rtuti pod zataveným koncem lze určit velikost atmosférického tlaku (čím výš rtuť vystoupí, tím větší tlak). Rtuťový barometr vynalezl Evangelista Torricelli (1608-1647) v roce 1643. Aneroid (pérový barometr) pracuje na základě měření deformace plechové krabičky, která je uvnitř vzduchoprázdná. Aneroid vynalezl v roce 1843 Lucien Vidie. Barometry se druhotně používají k fyzikálnímu měření výšky v geodézii nebo v letectví. Související články Aneroid Barograf Barometrické měření výšky Mechanika Mechanika tekutin Výškoměr Externí odkazy Mechanika tekutin Měřicí přístroje"} {"instruction": "Create an if-else statement in C++ to check if an integer number is greater than 0.", "input": "", "output": "if (number > 0) cout << number << \" is greater than 0\" << endl; else cout << number << \" is not greater than 0\" << endl;"} {"instruction": "Edit the following Python code to sort a list of numbers in reversed order.", "input": "numbers = [15, 2, 5, 12, 8]", "output": "numbers.sort(reverse=True)"} {"instruction": "Write an API endpoint to get the average annual temperature of a given city.", "input": "", "output": "@app.route(\"/get_average_annual_temp/\", methods=['GET']) def get_average_annual_temp(city): # Get the average annual temperature of the given city temp = get_average_annual_temperature(city) # Return the average temperature in json format return jsonify({'temp': temp})"} {"instruction": "Change the following code to an ES6 arrow function.", "input": "function addTwo(num) { var result; result = num + 2; return result; }", "output": "const addTwo = num => num + 2;"} {"instruction": "Write a SQL query to find the most popular product by category.", "input": "Table name: Products Columns: category (String), product_id (Integer), rating (Integer)", "output": "SELECT category, product_id, MAX(rating) FROM Products GROUP BY category ORDER BY rating DESC"} {"instruction": "Create a neural network in Python to classify crime-related data.", "input": "Dataset with 10 variables and 500 observations.", "output": "# Import libraries necessary for building the neural network \nimport numpy as np \nimport pandas as pd\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Dropout\n\n# Read in the dataset\ndataset = pd.read_csv('dataset.csv')\nX = dataset.iloc[:,:-1].values\ny = dataset.iloc[:,-1].values\n\n# Building the neural network\nmodel = Sequential()\n\n# First layer with input dimensions\nmodel.add(Dense(32, activation='relu', input_dim=X.shape[1]))\nmodel.add(Dropout(0.2))\n\n# Second layer\nmodel.add(Dense(64, activation='relu'))\nmodel.add(Dropout(0.2))\n\n# Output layer\nmodel.add(Dense(1, activation='sigmoid'))\n\n# Compile the model \nmodel.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])\n\n# Fit the model\nmodel.fit(X, y, epochs=100, batch_size=32, validation_split=.2)"} {"instruction": "Generate a function to flatten a nested list.", "input": "list = [1, 2, [3, 4, [5]], [[6], 7]]", "output": "def flatten_list(list): s=[] for v in list: if isinstance(v, list): s+=flatten_list(v) else: s.append(v) return s"} {"instruction": "Create a program in Python for generating a Fibonacci sequence.", "input": "", "output": "# Generate a Fibonacci sequence\n\n# Function to generate Fibonacci sequence\ndef Fibonacci(n):\n if n < 0:\n print(\"Incorrect input\")\n elif n == 1:\n return 0\n elif n == 2:\n return 1\n else:\n return Fibonacci(n-1) + Fibonacci(n-2)\n\n# Print the sequence upto n terms\nterms = 10\nprint(\"Fibonacci sequence:\")\nfor num in range(1, terms + 1):\n print(Fibonacci(num))"} {"instruction": "Given an array of strings, write a code snippet in Python that finds the longest string and prints its length.", "input": "arr = [\"Dog\",\"Cat\",\"Mouse\"]", "output": "arr = [\"Dog\",\"Cat\",\"Mouse\"] longest_str = max(arr, key=len) print(len(longest_str))"} {"instruction": "Write a code snippet to display the Fibonacci sequence up to 50 numbers.", "input": "", "output": "def Fibonacci(n): a = 0 b = 1 if n < 0: print(\"Incorrect input\") elif n == 0: return a elif n == 1: return b else: for i in range(2,n): c = a + b a = b b = c return b # Driver Code print(\"Fibonacci Sequence:\") for i in range(50): print(Fibonacci(i), end = ' ')"} {"text": "[EN Wikipedia] Waiatoto River\n\nThe Waiatoto River is a river of the West Coast of New Zealand's South Island. Formed from several small rivers which are fed by glaciers surrounding Mount Aspiring, it flows north along a valley flanked in the west by the Haast Range before turning northwest to reach the Tasman Sea southwest of Haast. Much of the river's length is within Mount Aspiring National Park. The New Zealand Ministry for Culture and Heritage gives a translation of \"water of blood\" for . Gallery See also List of rivers of New Zealand References Rivers of the West Coast, New Zealand Mount Aspiring National Park Rivers of New Zealand"} {"instruction": "How is the Julia dynamic programming technique different from bottom-up dynamic programming?", "input": "", "output": "Julia's dynamic programming technique uses memoization, which is a method of storing and reusing the result of previous computations. Bottom-up dynamic programming is a type of dynamic programming that begins with the solution to small problem instances and gradually builds up towards larger problem instances. Julia's dynamic programming approach does not necessarily build up from solution to small problem to larger problems and therefore may provide a more efficient solution for certain problems."} {"instruction": "Create a function in Python that takes in a list of words and a target word, and prints out the first word that is alphabetically larger than the target.", "input": "words = [\"Bob\", \"Cat\", \"Happy\", \"Lemon\", \"Texas\", \"Zebra\"], target = \"Lemon\"", "output": "# Function to find the first word alphabetically larger than the target\ndef find_next_word(words, target):\n for word in words:\n if word > target:\n return word\n return None"} {"text": "[CS Wikipedia] Královské hrobky dynastie Čoson\n\nKrálovské hrobky dynastie Čoson slouží jako místo odpočinku příslušníků tohoto panovnického korejské rodu. Z dynastie Čoson pochází 27 korejských panovníků, kteří se na trůně vystřídali mezi roky 1392 a 1910. V souhrnu čítá tato skupina celkem 42 hrobek (+ přilehlé stavby). Čtyřicet z nich se nachází v Soulu a jeho okolí (provincie Kjonggi a Kangwon) a od roku 2009 jsou součástí světového kulturního dědictví UNESCO. Zbývající dvě (královny Sineui a krále Taejo) se nacházejí v blízkosti severokorejského města Kesong. Během vlády čosonské dynastie byl státním náboženstvím konfucianismus, v němž je hluboce zakořeněná tradice uctívání předků. I proto byly hrobky pečlivě opatrovány a do současnosti se zachovaly ve výborném technickém stavu. Pohřebiště byla budována v pečlivě vybíraných lokalitách, které byly považovány za božské místo. Zároveň se přihlíželo k principům geomantie. Kamenné stavby a předměty obklopující jednotlivé mohyly stejně jako jejich dekorativní a stylistické ztvárnění nabízejí informace o uměleckých trendech období, ve kterém vznikaly (rozmezí více než 500 let). Fotogalerie Externí odkazy Official Site of Korean Tourism Office - Cultural Heritage Sites: Royal Tombs of the Joseon Dynasty (Designated 2009) Cultural Heritage Administration - National Symbols of Republic of Korea - Royal Tombs Světové dědictví (Jižní Korea) Kangwon (Jižní Korea) Kjonggi Soul"} {"instruction": "Edit the following C++ code to print the prime numbers between 1 and 100.", "input": "#include using namespace std; int main() { int i, j; cout << \"The prime numbers between 1 and 100 are:\"; for (i = 1; i <= 100; i++) { for (j = 2; j <= (i / 2); j++) { if (i % j == 0) break; } // If the prime number is found if (j > (i / 2)) cout << i << \" \"; } return 0; }", "output": "#include using namespace std; int main() { int i, j; cout << \"The prime numbers between 1 and 100 are:\"; for (i = 1; i <= 100; i++) { int isPrime = 1; for (j = 2; j <= (i / 2); j++) { if (i % j == 0) { isPrime = 0; break; } } if(isPrime == 1) cout << i << \" \"; } return 0; }"} {"instruction": "Is a valid ISBN-10 number?", "input": "isbn = \"0478156686\"", "output": "import re def is_valid_isbn(isbn): pattern = r\"^\\d{9}[\\d|X]$\" # ISBN is a string with 10 digits return True if re.match(pattern, isbn) else False is_valid_isbn(isbn) # Returns True"} {"text": "[DE Wikipedia] Yasir Subaşı\n\nKarahan Yasir Subaşı (* 1. Januar 1996 in Sakarya) ist ein türkischer Fußballspieler. Karriere Verein Subaşı kam in Sakarya auf die Welt und begann 2008 in der Nachwuchsabteilung von Sakaryaspor mit dem Vereinsfußball. Nach drei Jahren wechselte er in die Jugend von Fenerbahçe Istanbul. Zur Saison 2015/16 erhielt er von Fenerbahçe einen Profivertrag und wurde neben seinen Tätigkeiten in der Reservemannschaft auch im Profikader berücksichtigt. So gab er sein Profidebüt in der Pokalbegegnung vom 16. Dezember 2015 gegen Tuzlaspor. Für die Rückrunde der Saison 2016/17 wurde er an den Viertligisten Üsküdar Anadolu 1908 SK und für die Saison 2017/18 an den Drittligisten Sakaryaspor ausgeliehen. Im Sommer 2018 wurde er ab den Istanbuler ZweitligistenÜmraniyespor verliehen. Im Sommer 2019 wechselte er innerhalb der Süper Lig zu Kayserispor. Nationalmannschaft Subaşı startete seine Nationalmannschaftskarriere im 2012 mit einem Einsatz für die türkische U-16-Nationalmannschaft. Weblinks Fußballspieler (Kayserispor) Fußballspieler (Fenerbahçe Istanbul) Fußballspieler (Sakaryaspor) Fußballspieler (Ümraniyespor) Fußballspieler (Üsküdar Anadolu 1908 SK) Türke Geboren 1996 Mann"} {"instruction": "Generate a Python program to convert a string of text into a list where each word is lowercased and each punctuation character is removed.", "input": "Not applicable", "output": "def textToList(string):\n words = []\n\n for char in string:\n if char.isalpha():\n words[-1] += char\n else:\n words.append('')\n \n words = [word.lower() for word in words if word]\n return words\n\nprint(textToList('Hi there, how are you?')) # returns ['hi', 'there', 'how', 'are', 'you']"} {"text": "[EN Wikipedia] Donald R. Herriott\n\nDonald R. Herriott (February 4, 1928 – November 8, 2007) was an American physicist who is known for his contributions to interferometry, and for his efforts towards perfecting the techniques of high-resolution lithography. Herriott also helped bring the first helium-neon laser into operation. He was the president of the Optical Society of America in 1984. Life and career Herriott was born in Rochester, New York to William and Lois (née Denton) Herriott. During 1945–49, Herriott completed his undergraduate studies in physics at Duke University, and later studied optics at the University of Rochester, followed by electrical engineering at the Polytechnic Institute of Brooklyn (now part of New York University). From 1949 to 1956 he worked at the Bausch & Lomb Optical Company, while still attending the University of Rochester. His research involved thin films, interferometry, and measurement of the modulation transfer function of lenses. In 1956, Herriott joined Bell Telephone Laboratories as an optical consultant in the research department. Here, he was involved in development of the flying-spot store, used in the first electronic switching system. He later collaborated with Ali Javan and his colleagues in the development of the first gas laser. Javan had enlisted Herriott specifically to design a resonator for his helium-neon laser. On 12 December 1960, Herriott was adjusting the mirrors of the Fabry-Perot structure he had designed, when the group obtained the first spike indicating lasing on the oscilloscope. In 1965 he proposed the concept of the Herriott cell. In 1968, while at Bell Labs, he became head of the lithographic systems development department. In this post, he worked on electron beam, optical and X-ray lithography systems for integrated circuit fabrication. Herriott retired from Bell Labs in 1981, and began to consult as the senior scientific adviser at the Perkin Elmer Corporation. He served on the Board of Directors of The Optical Society of America from 1968-1970, and was subsequently elected as its 1982 vice-president and 1984 president. Herriott died on 8 November 2007 following a long illness. He had three daughters and a son with his wife Karis Smith Herriott. See also Optical Society of America#Past Presidents of the OSA References External links Articles Published by early OSA Presidents Journal of the Optical Society of America Presidents of Optica (society) American physicists 2007 deaths 1928 births Duke University alumni University of Rochester alumni New York University alumni"} {"instruction": "Can you make the following string lowercase using Python?", "input": "\"This is a TEST string!\"", "output": "\"\"\"\nMake the given string lowercase using Python\n\"\"\"\n\ntest_string = \"This is a TEST string!\"\n\nlowercase_string = test_string.lower()\n\nprint(lowercase_string) # prints \"this is a test string!\""} {"instruction": "Write an SQL query to select all entries from the \"Users\" table.", "input": "", "output": "SELECT * FROM Users;"} {"text": "[HI Wikipedia] पिरिडीन\n\nपिरिडीन (C5 H5 N) एक विषमचक्रीय कार्बनिक यौगिक है, जिसके चक्र में कार्बन के पाँच और नाइट्रोजन का एक परमाणु रहता है। इसके संरचनासूत्र का प्रतिपादनKorner ने १८६९ ई. में किया था। इस सूत्र से पिरिडीन के रासायनिक व्यवहार की व्याख्या ढंग से हो जाती है। परिचय कोयला, पीट-कोयला, काठ और अन्य बिटॅमिनी पदार्थों को तपाने से पिरिडीन बनता है और उनके भंजक आसवन से जो अलकतरा प्राप्त होता है, उसी में यह रहता है। अस्थि के भंजक आसवन से जो अस्थि तेल प्राप्त होता है, उसमें भी पिरिडीन रहता है। कोयले के अलकतरे के प्रभाजित आसवन से जो उत्पाद ८० डिग्री C और १७० डिग्री C के बीच प्राप्त होता है, उसी हलके तेल में बेंज़ीन के साथ-साथ पिरिडीन रहता है। इस हलके तेल पर तनु सल्फ्यूरिक अम्ल को क्रिया से तथा फिर चूना द्वारा पृथक् कराकर यह प्राप्त होता है। इसके पुन: आसवन से परिष्कृत पिरिडीन प्राप्त होता है। पिरिडीन रंगरहित द्रव है, जिसका घनत्व ० डिग्री सें. पर १.००३३ है। इसका क्वथनांक १४४.५ डिग्री सें. है। इसकी गंध बड़ी तीखी और अरुचिकर होती है। यह जल, ऐल्कोहल और ईथर में सब अनुपात में विलेय है और अम्लों से लवण बनाता है। यह तृतीयक क्षारक है और स्थायी यौगिक बनाता है। ऑक्सीकारकों का इसपर कोई प्रभाव नहीं पड़ता। हैलोजन की क्रियाएँ इस पर कठिनता से होती हैं। अपचयन से यह अपचित होकर पिपेरिडीन बन जाता है। प्रयोगशालाओं में भी इसका संश्लेषण हुआ है। पिरिडीन महत्वपूर्ण यौगिक है। मेथिलेटेड स्पिरिट के निर्माण में इसका उपयोग एक समय व्यापक रूप में होता था। विलायक के रूप में इसका उपयोग अब भी होता है। अनेक रासायनिक अभिक्रियाओं में अल्प मात्रा में उपस्थित रहकर भी यह उच्च कोटि का उत्प्रेरक सिद्ध हुआ है। कार्बनिक यौगिक"} {"instruction": "Write a SQL query to find all employees over the age of 30.", "input": "", "output": "SELECT * FROM Employees WHERE age > 30;"} {"instruction": "Modify the following HTML to apply an external style sheet.", "input": " This Is a Test

    Hello World!

    ", "output": " This Is a Test

    Hello World!

    "} {"instruction": "Uses a loop to create a list with the squares of the numbers from 0 to 5.", "input": "", "output": "list1 = [] for i in range(6): list1.append(i**2) print(list1) # Output: [0, 1, 4, 9, 16, 25]"} {"text": "[HI Wikipedia] आल्कुबियेर इंजन\n\nआल्कुबियेर​ इंजन (Alcubierre drive) एक प्रस्तावित वैज्ञानिक युक्ति है जिसमें भौतिकशास्त्री मिगेल आल्कुबियेर​ ने आइनस्टाइन​ क्षेत्र समीकरण (फ़ील्ड इक्वेशन​) का एक संभव हल देते हुए यह दिखाया था कि कुछ परिस्थितियों में किसी यान को प्रकाश की गति से भी तेज़ चलाया जा सकता है। सामान्य सापेक्षता सिद्धांत किसी भी वस्तु को साधारण दिक्-काल (स्पेसटाइम) में प्रकाश से तेज़ जाने की अनुमति नहीं देता। लेकिन सन् १९९४ में आल्कुबियेर​ ने दिखाया कि ऋणात्मक घनत्व की ऊर्जा (negative density of energy) के प्रयोग से यान के पीछे के दिक्-काल को फैलाया जा सकता है और उसके आगे के दिक्-काल को सिकोड़ा जा सकता है। इस से यान इस मरोड़े हुए दिक्-काल में प्रकाश की गति से कम चलकर भी साधारण दिक्-काल के हिसाब से प्रकाश की गति से कहीं अधिक वेग पर चल सकता है। भौतिकी के नियमों के अनुसार ऐसी ऋणात्मक घनत्व की ऊर्जा उत्पन्न करने वाला विचित्र पदार्थ (exotic matter) वर्जित तो नहीं है लेकिन यह न तो कभी देखा गया है और न ही वैज्ञानिक इसे बनाने में अभी सक्षम हैं। इन्हें भी देखें विचित्र पदार्थ सामान्य सापेक्षता रौशनी-से-तेज़ वार्प इंजन सन्दर्भ सामान्य आपेक्षिकता वार्प इंजन सिद्धांत अंतरतारकीय यात्रा विज्ञान कथा प्रसंग परिकल्पित प्रौद्योगिकी"} {"instruction": "Generate a dynamic HTML table displaying 10 random numbers from 1 to 100.", "input": "", "output": "
    Random Numbers
    "} {"instruction": "Compile the given C++ code.", "input": "#include using namespace std; int main() { cout << \"Hello World!\"; return 0; }", "output": "g++ file.cpp -o file"} {"text": "[DE Wikipedia] Paris–Luxemburg 1965\n\nParis–Luxemburg 1965 war die 3. Austragung von Paris–Luxemburg, einem mehrtägigen Etappenrennen. Das Rennen wurde von Jean Stablinski vor Guido Reybrouck und Edward Sels gewonnen. Teilnehmende Mannschaften Etappenübersicht Ergebnisse Gesamtwertung Weblinks Paris–Luxembourg 1965 Einzelnachweise Radrennen 1965"} {"instruction": "Create a HTML page to show user data from a REST API.", "input": "{ \"name\": \"John\", \"age\" : 25, \"address\" : \"123 Main Street\" }", "output": " User Data

    User Data

    Name: John

    Age: 25

    Address: 123 Main Street

    "} {"instruction": "Create an algorithm in any language (Python, JavaScript, etc.) that searches for a given value in a binary search tree.", "input": "tree = {value: 24, left: {value: 19, left: {value: 12, left: None, right: None}, right: None}, right: {value: 38, left: None, right: None}}\nsearch_term = 12", "output": "def search(tree, searchTerm):\n if tree['value'] == searchTerm:\n return True\n \n if tree['left'] != None:\n if search(tree['left'], searchTerm):\n return True\n \n if tree['right'] != None:\n if search(tree['right'], searchTerm):\n return True\n \n return False\n\ntree = {value: 24, left: {value: 19, left: {value: 12, left: None, right: None}, right: None}, right: {value: 38, left: None, right: None}}\nsearch_term = 12\n\nif search(tree, search_term):\n print(\"Value found\")\nelse:\n print(\"Value not found\")"} {"instruction": "Create a Python program to take a float input and output its binary equivalent.", "input": "25.68", "output": "def floatToBin(num): whole, decimal = str(num).split(\".\") whole = int(whole) decimal = int (decimal) res = bin(whole).lstrip(\"0b\")+\".\" for x in range(10): decimal *= 2 res += str(decimal//1) decimal %= 1 return res # Driver code number = 25.68 print(floatToBin(number)) # returns '11001.1011'"} {"text": "[EN Wikipedia] Slovenian Book Agency\n\nThe Slovenian Book Agency ( often abbreviated to JAK or JAKRS) is an autonomous government agency in Slovenia that was created to promote the importance of books and reading in Slovenia and beyond. The Agency was created in 2008 and began to function on 1 January 2009, fulfilling the provisions of a presidential decree signed in December 2007. Its main aims are to provide the necessary conditions for top quality creativity in the field of literature and scientific publications, for greater accessibility to Slovene books, for raising the awareness of the importance of books and reading in the development of the individual and society and for increasing the international presence of authors of literary and scientific publications from Slovenia. The agency provides funds for a variety of literary projects and authors, promotes Slovene literature and the publication of quality literary and scientific works. It also promotes Slovene literature internationally through encouraging cooperation, assisting with representation at international book fairs and funding translations for publications abroad. From 2009 to 2012 its director was Slavko Pregl. References External links Slovenian Book Agency site Slovenian literature Culture of Slovenia Book 2008 establishments in Slovenia Organizations established in 2008"} {"instruction": "Replace the following line of Javascript to appy the data-attribute to the element.", "input": "document.getElementById(\"message\").append(\"My Message\");", "output": "document.getElementById(\"message\").setAttribute(\"data-text\", \"My Message\");"} {"instruction": "Perform a search operation to find all the words starting with \"th\".", "input": "Sentence: The big cat ate the small mouse.", "output": "['The', 'the', 'that']"} {"text": "[EN Wikipedia] Guy Lafond\n\nGuy Lafond was a research scientist for over 30 years with Agriculture and Agri-Food Canada at the Indian Head Research Farm in Saskatchewan. He was instrumental in establishing the Indian Head Agricultural Research Foundation (IHARF) in the early 1990s and had a major impact on cropping practices and soil conservation. Early life and education Lafond grew up in St. Jean Baptiste, Manitoba, and obtained his bachelor's and master’s degrees from the University of Manitoba. He then obtained his Ph.D. from the University of Saskatchewan and worked at their Crop Development Centre in 1984 before settling his family at Agriculture Canada’s research farm in Indian Head. After working with Agriculture and Agri-Food Canada for over 30 years, he died in April 2013 in Regina, Saskatchewan, after battling cancer. Career Lafond began his career with Agriculture and Agri-Food Canada in 1985, where he provided strong leadership and conducted research aimed at soil conservation and sustainable agriculture practices. His career started during the no-till farming revolution, which he had closely tracked ever since. His areas of research at the Indian Head Research Farm included agronomy of no-till, cropping systems, precision farming, cereal, oilseed and pulse production, soil, fertilizer, and land management. Lafond changed the face of agriculture in Western Canada with his pioneering research in no-till farming and contributions to the adoption of direct seeding. He was one of the most distinguished conservation researchers in Canada and shared his knowledge with researchers and producers around the world, including in the United States, China, Russia, Ukraine, Kazakhstan, Australia, and across Europe. In Canada and internationally, many profited from his expertise and tireless unbiased research. Lafond’s research in precision agriculture helped farmers change how they work and learn new information about their land. With GPS technology and earth observation satellites, farmers can acquire insightful data on soil and crop health, and farm machinery is able to have navigational abilities and auto-steering. This information and technology from precision agriculture can help farmers tailor their practices to maximize yield and sustainability by applying seed, fertilizer, and pesticides in the right amounts, at the right time in the right place. In the early 1990s, Lafond played a leading role in establishing the Indian Head Agricultural Research Foundation (IHARF) that continues to conduct applied research for farmers. IHARF is a non-profit organization that aims to promote sustainable and profitable agriculture and benefit the agricultural community by facilitating research and technology transfer activities. It is widely recognized as an innovative leader in…"} {"instruction": "Create a Python script to print out only the even numbers from a list of numbers.", "input": "list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "for num in list: \n if (num % 2 == 0):\n print(num, end = ' ')"} {"text": "[EN Wikipedia] Thomas Einwaller\n\nThomas Einwaller (born 25 April 1977) is an Austrian football referee. He has been a FIFA international referee since 2005. He lives in Scheffau am Wilden Kaiser and works as a bank clerk. He has refereed games at the 2008 Olympics (including a bronze medal game), UEFA Champions League, UEFA Cup and qualifiers for the UEFA Euro 2008 and 2010 FIFA World Cup. He was preselected as a referee for the 2010 FIFA World Cup. References 1977 births Living people Austrian football referees"} {"instruction": "Create a method to generate a random integer between 1 and 10 in Python.", "input": "", "output": "import random def random_int(): return random.randint(1, 10)"} {"text": "[DE Wikipedia] Tiberius Iulius Candidus Capito\n\nTiberius Iulius Candidus Capito war ein im 2. Jahrhundert n. Chr. lebender römischer Politiker. In den Militärdiplomen wird sein Name als Tiberius Iulius Capito angegeben. Durch Militärdiplome, die auf den 17. Juli 122 datiert sind, ist belegt, dass Capito 122 zusammen mit Lucius Vitrasius Flamininus Suffektkonsul war; die beiden übten dieses Amt vermutlich vom 1. Juli bis zum 30. September aus. Siehe auch Liste der römischen Konsuln Weblinks Einzelnachweise Konsul (Römische Kaiserzeit) Römer Mann Geboren im 1. Jahrhundert Gestorben im 2. Jahrhundert"} {"text": "[DE Wikipedia] Thomas Oppermann\n\nThomas Oppermann ist der Name folgender Personen: * Thomas Oppermann (Jurist) (1931–2019), deutscher Rechtswissenschaftler Thomas Oppermann (Politiker) (1954–2020), deutscher Politiker (SPD)"} {"text": "[EN Wikipedia] Dick Stevens\n\nDick Stevens (born February 23, 1948) is a former American football offensive tackle who played five seasons in the National Football League (NFL). Early life and high school Stevens \"Tuck\" was born and raised in Dublin, Texas, where he attended Dublin High School. He was named All-District at both end and defensive tackle for three consecutive seasons and was named All-State and an All-American as a senior. Stevens was recruited by every school in the Southwest Conference and opted to play at Baylor where his uncle, Gordon Hollon, had played. College career Stevens played defensive tackle on Baylor's freshman team before moving to offensive tackle. In his three years as a letterman, the Bears won four total games. Stevens was a unanimous All-SWC selection as a junior and was named a preseason All-American going into his senior year. He missed part of his senior season sue to a knee injury. Stevens was inducted into the Baylor Athletic Hall of Fame in 2014. Professional career Stevens was selected in the 13th round of the 1970 NFL Draft by the Philadelphia Eagles. He was a member of the team for five seasons before retiring due to knee injuries. References 1948 births Living people American football offensive tackles Baylor Bears football players Philadelphia Eagles players Players of American football from Texas"} {"instruction": "Create an algorithm that checks if a given String is a valid identifier in Python.", "input": "", "output": "def is_valid_identifier(string):\n if string.isidentifier():\n return True\n else:\n return False"} {"instruction": "Find the minimum number from the given array in Java.", "input": "int arr[]={10, 50, 18, 63, 27};", "output": "int min = arr[0]; for (int i = 1; i < arr.length; i++) if (arr[i] < min) min = arr[i]; System.out.println(min);"} {"text": "[EN Wikipedia] Anicet Turinay\n\nAnicet Turinay (born 18 April 1945) is a conservative politician from Martinique who served in the French National Assembly from 1993 to 2002. References Anicet Turinay page on the French National Assembly website 1945 births Living people People from Gros-Morne, Martinique Martiniquais politicians Rally for the Republic politicians Deputies of the 10th National Assembly of the French Fifth Republic Deputies of the 11th National Assembly of the French Fifth Republic Black French politicians"} {"instruction": "Write a Python program to check if a given list of strings consists only of unique elements.", "input": "my_list = ['cat', 'dog', 'cat']", "output": "def check_unique_list(my_list):\n unique_list =[]\n for i in my_list:\n if i not in unique_list:\n unique_list.append(i)\n if len(unique_list) == len(my_list):\n return True\n else:\n return False"} {"instruction": "Create an HTML form that can process the user's email address.", "input": "", "output": "
    "} {"instruction": "Create a python function to extract the largest DNA sequence from a list of sequences.", "input": "sequences = [\"ATGATATCATCGATTGTA\",\n\"ATGCGATATACGATGAT\",\n\"ATGGATCGATTATATTA\"]", "output": "def longest_sequence(sequences):\n longest_sequence = sequences[0]\n\n for sequence in sequences:\n if len(sequence) > len(longest_sequence):\n longest_sequence = sequence\n\n return longest_sequence\n\nprint(longest_sequence(sequences)) # ATGATATCATCGATTGTA"} {"text": "[DE Wikipedia] Aleksander Fredro\n\nAleksander Fredro (* 20. Juni 1793 in Surochów bei Jarosław; † 15. Juli 1876 in Lemberg) war ein polnischer Dramatiker und gilt als einer der bedeutendsten Komödienautoren seines Landes. Leben Aleksander Fredro wurde in der Familie eines polnischen Adligen geboren und trug deshalb den Titel Graf. In den Napoleonischen Kriege diente Fredro in der französischen Armee. Gleichzeitig engagierte er sich im polnischen Widerstand gegen die Zugehörigkeit Galiziens zur Habsburgermonarchie. Er schrieb humorvolle Komödien, in denen häufig politische Pointen versteckt sind, und seine Figuren zeigen die vielen Charaktereigenschaften der Polen auf. Große Popularität erreichten die Stücke allerdings erst nach seinem Tode, sie fehlen bislang auf keinem Spielplan der polnischen Theater. Die Art der Darstellung vergleichen Fachleute mit dem bekannten französischen Komödiendichter Molière. Außerdem verfasste er zahlreiche Gedichte und Märchen. Als die beste Komödie Fredros und ein Meisterwerk der polnischen Literatur gilt die Zemsta (dt.: Die Rache). Zum 220. Geburtstag Fredros wurde die Komödie im Frühjahr 2013 gleichzeitig durch zwei Warschauer Theater aufgeführt. Werke (Auswahl) – chronologisch – Damy i huzary (dt.: Damen und Husaren) Pan Geldhab (1818) (dt.: Herr Geldhab) Mąż i żona (1822) (dt.: Mann und Frau) Pan Jowialski (1832) (dt.: Herr Jowialski) Śluby panieńskie, czyli Magnetyzm serca (1833) (dt.: Mädchenschwüre) Zemsta (1834) (dt.: Die Rache) 1956 durch Bohdan Korzeniewski und 2002 durch Andrzej Wajda verfilmt Dożywocie (1835) (dt.: Die Lebensrente) Obszöne Werke, die Alexander Fredro zugeschrieben werden: XIII Księga Pana Tadeusza (dt.: Das XIII. Buch des Pan Tadeusz), eine erotisch-satirische Fortsetzung des in zwölf Kapitel eingeteilten Werkes Pan Tadeusz von Adam Mickiewicz Baśń o trzech braciach i królewnie(dt.: Die Geschichte von drei Brüdern und einer Prinzessin) Literatur Weblinks Aleksander Fredro bei poezja.org Autor Literatur (19. Jahrhundert) Literatur (Polnisch) Drama Person in den Koalitionskriegen (Polen) Person in den Koalitionskriegen (Frankreich) Landtagsabgeordneter (Galizien) Revolutionär 1848/49 Freimaurer (19. Jahrhundert) Freimaurer (Polen) Mitglied der Ehrenlegion Träger des Ordens Virtuti Militari Ehrenbürger von Lwiw Adliger Geboren 1793 Gestorben 1876 Mann"} {"instruction": "Break the following string into two pieces.", "input": "\"HelloWorld\"", "output": "String s1 = \"Hello\"; String s2 = \"World\";"} {"instruction": "Create a program in Python that classifies French text using a pre-trained model.", "input": "Not applicable", "output": "import torch\nfrom transformers import BertTokenizer, BertForMaskedLM\n\ntokenizer = BertTokenizer.from_pretrained('bert-base-french-cased')\nmodel = BertForMaskedLM.from_pretrained('bert-base-french-cased')\n\ntext = \"J'aime aller au cin_ma.\"\ninput_ids = tokenizer.encode(text, return_tensors='pt')\n\nprediction = model(input_ids)[0] \npredicted_index = torch.argmax(prediction[0, tokenizer.mask_token_id]).item()\npredicted_token = tokenizer.convert_ids_to_tokens([predicted_index])[0]\n\nprint(f\"The word 'cin_ma' is {predicted_token}\")"} {"instruction": "Create a Python web Crawler to parse a web page and extract the textual content only.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = 'https://example.com'\nresponse = requests.get(url)\nsoup = BeautifulSoup(response.text, 'html.parser')\ntext = soup.find_all(text=True)\n\ndef visible_text(elements):\n for element in elements:\n if element.parent.name in ['style', 'script', '[document]', 'head', 'title']:\n continue\n if isinstance(element, Comment):\n continue\n return element.strip()\n\ntext = filter(visible_text, text)\nprint(*text, sep=\"\\n\")"} {"instruction": "Create a Python program to generate a report of a user's sales data.", "input": "A list of dictionaries containing sales data.", "output": "import csv\n\n# A list of dictionaries containing sales data\nsales_data = [\n { 'name': 'John', 'quantity': 2, 'price': 10.0 },\n { 'name': 'Jane', 'quantity': 3, 'price': 15.0 },\n { 'name': 'Mike', 'quantity': 4, 'price':"} {"instruction": "Create a program to parse a given string and return a dictionary with all the words and their frequency", "input": "\"this is a practice string to learn the parsing of strings\"", "output": "\"\"\" Create a program to parse a given string and return a dictionary with all the words and their frequency \"\"\" def parse_string(string): words = string.split() word_dict = {} for word in words: if word in word_dict: word_dict[word] += 1 else: word_dict[word] = 1 return word_dict if __name__ == '__main__': print(parse_string(\"this is a practice string to learn the parsing of strings\"))"} {"instruction": "Write a Python program that implements gradient descent to find the minimum of a function.", "input": "function = 3x² + 2x - 10", "output": "import numpy as np\n\n# Define the function\ndef f(x):\n return (3 * (x**2)) + (2 * x) - 10\n\ndef grad_f(x):\n return (6 * x) + 2\n\n# Gradient Descent\nx_old = 0\nx_new = 4 # Arbitrary initial value\nepsilon = 0.01 # Stop criteria\nprecision = 0.00001\n\nmax_iters = 1000 # Maximum number of iterations\niters = 0\n\nwhile abs(x_new - x_old) > epsilon and iters < max_iters:\n x_old = x_new\n\n # Calculate the gradient\n grad = grad_f(x_old)\n\n # Calculate the step size\n alpha = 0.01\n\n # Take a step in the opposite direction of the gradient\n x_new = x_old - (alpha * grad)\n\n # Update iteration counter\n iters += 1\n\nprint(\"Minimum at: \", x_new)"} {"instruction": "Parse a JSON response into a Python dictionary.", "input": "{ \"name\": \"John Doe\", \"age\": \"35\" }", "output": "import json def parse_json(json_data): data = json.loads(json_data) return data if __name__ == '__main__': json_data = '{\"name\": \"John Doe\", \"age\": \"35\"}' print(parse_json(json_data))"} {"instruction": "Evaluate the following line of code written in Python and explain what it does.", "input": "not any(map(lambda k,v: k in d or v in d, x))", "output": "This line of code is written in Python and is using the built-in \"any\" and \"map\" functions. The code is checking if none of the key-value pairs in the map \"x\" are in the dictionary \"d\". It does so using a lambda function to check if either the key or the value is present in the dictionary. If none are present, it will return True, otherwise it will return False."} {"instruction": "Update a Python program which constructs a list of prime numbers using the Sieve of Eratosthenes algorithm. The program should improve its performance by using an efficient implementation of the algorithm.", "input": "Not applicable", "output": "def sieve_of_eratosthenes(n):\n primes = [True for i in range(n+1)]\n p = 2\n \n while (p * p <= n):\n \n if (primes[p] == True):\n \n for i in range(p *2, n+1, p):\n primes[i] = False\n p += 1\n \n primes[0] = False\n primes[1] = False\n \n prime_numbers = []\n \n for i in range(n+1):\n if primes[i]:\n prime_numbers.append(i)\n \n return prime_numbers\n\nprint(sieve_of_eratosthenes(20))"} {"text": "[DE Wikipedia] Rolf Storm (Politiker)\n\nRolf Storm (* 10. August 1945 in Kiel) ist ein Kaufmann und war ein Politiker (FDP, LD) und für die FDP Mitglied der Bremischen Bürgerschaft. Biografie Familie, Beruf Storm war als kaufmännischer Angestellter und ab 1995 bis 2013 als Geschäftsführer in der C. Melchers GmbH in Bremen tätig. 1995 zog er nach Lilienthal um. Er hat zwei Mal geheiratet und mehrere Kinder. Politik Storm war seit den 1960er Jahren Mitglied der FDP und der Deutschen Jungdemokraten, wo er seit 1968 im Kreisvorstand Bremen aktiv war (stellv. Vorsitzender und Vorsitzender). Von 1971 bis 1976 war er Mitglied im Stadtteilbeirat Bremen - Östliche Vorstadt sowie Vorsitzender des FDP-Ortsvereins Östliche Vorstadt. Im Beirat - Mitte war er von 1980 bis 1984; als stellv. Sprecher trat er im Oktober 1980 aus Solidarität zurück, nach der Abwahl der Beiratssprecherin Ursula Voigts (SPD). Um 1980 bis 1982 war er im Vorstand des FDP-Kreisverbandes Mitte/West. Der Verband forderte 1982 für Europa ein eigenes Sicherheitssystem. Storm vertrat 1981 die Jungdemokraten im Landesvorstand der FDP. Beim Bundesparteitag der FDP von 1981 in Köln gehörte er zu den 27 Prozent der Delegierten, die den NATO-Doppelbeschluss ablehnten und zu den 40 Prozent derer, die als Kompromiss lediglich eine Mittelstrecken-Stationierung auf See für erwägenswert ansahen. Er war von 1976 bis 1979 für Wolf Traugott Kruse Mitglied der 9. Bremischen Bürgerschaft und Mitglied verschiedener Deputationen u. a. für Jugendhilfe. Storm wurde Mitglied der 1982 gegründeten Liberalen Demokraten (LD) und war von 1983 bis 1984 Bremer Landesvorsitzender. Weitere Mitgliedschaften Storm war von 1972 bis 1975 im Vorstand der Friedensgemeinschaft. 1976 wirkte er beim Aufbau des Bürgerhauses Weserterrassen mit. Nach 2013 ist er aktiv tätig für die Weiterbildung von Senioren bei der Universität Bremen. Einzelnachweise Mitglied der Bremischen Bürgerschaft (ab 1945) FDP-Mitglied LD-Mitglied Politiker (20. Jahrhundert) Person (Östliche Vorstadt) Deutscher Geboren 1945 Mann"} {"text": "[CS Wikipedia] Klín\n\nKlín je jednoduchý stroj, jehož jedinou částí je těleso s průřezem ve tvaru trojúhelníku (trojboký hranol, kužel, jehlan). Jedná se o jeden z nejstarších předmětů používaných lidmi. Síla, která působí na podstavu klínu, se rozloží ve směru kolmém na boční stěny, přitom tyto složky jsou větší než původní síly. Velikost silových složek závisí na úhlu, který svírají boční stěny, čím je tento úhel menší (klín je ostřejší), tím jsou síly větší. Klín je základem např. sekery, nože, špičky hřebíku, vrutu (společně se šroubem). Související články Mechanika Jednoduchý stroj Klínový prostor Mnohostěn Prismatoid Externí odkazy Jednoduché stroje Tělesa"} {"text": "[HI Wikipedia] कटहरी चम्पा\n\nकटहरी चम्पा एनोनेसिई (Annonaceae) कुल का पौधा है। इसे हरा, अथवा कटहरी, चंपा कहते हैं। इसका वानस्पतिक नाम चंपा आर्टाबोट्रिस ओडोराटिसियम (Artabotrys odoratissimus) है। यह अरटाबोट्रिस वर्ग के पौधे अफ्रीका तथा पूर्वी एशिया के देशों में पाए जाते हैं। भारत में इस वर्ग की १० जातियाँ पाई जाती हैं। इसका पेड़ झाड़ी जैसा, तीन से लेकर पाँच मीटर तक ऊँचा होता है। पत्तियाँ सरल तथा चमकीली हरी होती हैं। फूल अर्धवृत्ताकार डंठल पर लगते हैं। ये डंठल अन्य वृक्षों की डालियों के ऊपर चढ़ने में उपयोगी होते हैं। शुरू में फूल हरे होते हैं, परंतु बाद में इनका रंग हलका पीला हो जाता है। इन फूलों से पर्याप्त सुगंध निकलती है, जो पके कटहल के गंध जैसी होती है। इससे इनका पता पेड़ पर आसानी से लग जाता है। चंपा के पेड़ सजावट एवं सुगंध के लिये बगीचों में प्राय: लगाए जाते हैं। इन्हें भी देखें चंपा पौधे फूलों वाले वृक्ष उद्यान विज्ञान और बाग़बानी"} {"instruction": "Implement a queue data structure.", "input": "", "output": "class Queue: def __init__(self): self.data = [] def is_empty(self): return not self.data def enqueue(self, element): self.data.append(element) def dequeue(self): return self.data.pop(0) def peek(self): if not self.is_empty(): return self.data[0]"} {"text": "[CS Wikipedia] Kurtzkeho stupnice postižení\n\nKurtzkeho stupnice postižení, známá také jako rozšířená stupnice stavu invalidity (: Expanded Disability Status Scale, EDSS), či také jako Kurtzkeho škála, je metoda kvantifikace zdravotního postižení u pacientů s roztroušenou sklerózou (RS). Stupnice byla vyvinuta americkým neurologem Johnem F. Kurtzkem. Kurtzkeho stupnice kvantifikuje postižení u sedmi funkčních systémů. Podle MUDr. Dany Horákové se jedná o zrak, motoriku, kmenové a mozečkové funkce, sfinktery (svěrače), senzitivní obtíže a orientační hodnocení kognitivního postižení a únavy. Stupně Stupnice má rozpětí 0–10 a šířka každého intervalu je 0,5 bodu. MUDr. Petr Lenský v knize Roztroušená skleróza mozkomíšní uvádí následující stupně: 0 – bez potíží, neurologický nález normální 1 – potíže mírné nebo jen anamnestické, výkonnost intaktní, nepatrné odchylky v neurologickém nálezu 2 – potíže jen lehké, výkonnost dotčena minimálně, malý neurologický nález 3 – postižení výraznější, hybnost a výkonnost dotčena, pracovní schopnost zachována; neurologicky vyjádřeny základní příznaky nebo kombinace více lehčích příznaků 4 – postižení těžší, hybnost, výkonnost a pracovní schopnost omezeny, normální způsob života možný bez závislosti na pomoci druhé osoby 5 – postižení značné, pracovní neschopnost, chůze na kratší vzdálenost (500 metrů) samostatně možná 6 – hybnost omezená s pomocí hole, berle, opěrného aparátu, přesuny na krátké vzdálenosti, doma s přidržováním se o předměty, schopnost výkonu drobných prací a) bez pomoci druhé osoby, b) s pomocí druhé osoby 7 – hybnost velmi obtížná až nemožná, osoba je závislá na invalidním vozíku, přesuny do vozíku a jeho ovládání bez cizí pomoci, základní soběstačnost zachována 8 – ležící, závislost na invalidním vozíku s cizí pomocí, soběstačnost 9 – zcela ležící, nesoběstačný, bezmocný 10 – úmrtí v důsledku RS Odkazy Reference Externí odkazy Multiple Sclerosis Society - FSS and EDSS Online kalkulačka EDSS Roztroušená skleróza Stupnice Neurologie"} {"text": "[EN Wikipedia] Fabio Fognini career statistics\n\nThis is a list of main career statistics of Italian professional tennis player Fabio Fognini. All statistics are according to the ATP World Tour and ITF websites. Performance timelines Only main-draw results in ATP Tour, Grand Slam tournaments, Davis Cup/ATP Cup/Laver Cup and Olympic Games are included in win–loss records. Singles Current through the 2023 Italian Open. Doubles Significant finals Grand Slam finals Doubles: 1 (1 title) Masters 1000 finals Singles: 1 (1 title) Doubles: 3 (3 runner-ups) ATP career finals Singles: 19 (9 titles, 10 runner-ups) Doubles: 20 (8 titles, 12 runner-ups) ATP Challenger Tour and ITF Futures finals Singles: 13 (9 titles, 4 runner–ups) Doubles: 3 (1 titles, 2 runner–ups) Grand Slam seedings Record against other players Record against top 10 players |- |align=left colspan=7|Number 1 ranked players |- |align=left colspan=7|Number 2 ranked players |- |align=left colspan=7|Number 3 ranked players |- |align=left colspan=7|Number 4 ranked players |- |align=left colspan=7|Number 5 ranked players |- |align=left colspan=7|Number 6 ranked players |- |align=left colspan=7|Number 7 ranked players |- |align=left colspan=7|Number 8 ranked players |- |align=left colspan=7|Number 9 ranked players |- |align=left colspan=7|Number 10 ranked players Record against players ranked No. 11–20 Active players are in boldface. Albert Ramos Viñolas 9–2 Andreas Seppi 5–4 Pablo Cuevas 4–2 Viktor Troicki 4–2 Marcel Granollers 4–4 Paul-Henri Mathieu 3–1 Marco Cecchinato 3–1 Guido Pella 3–3 Benoît Paire 3–3 Philipp Kohlschreiber 3–7 Borna Ćorić 2–0 Kyle Edmund 2–0 Sam Querrey 2–0 Reilly Opelka 2–1 Bernard Tomic 2–2 Juan Ignacio Chela 1–0 Hyeon Chung 1–0 Alex de Minaur 1–0 Dominik Hrbatý 1–0 Jerzy Janowicz 1–0 Aslan Karatsev 1–0 Nikoloz Basilashvili 1–1 Jarkko Nieminen 1–1 Fabrice Santoro 1–1 Dmitry Tursunov 1–1 Feliciano López 1–3 Alexandr Dolgopolov 1–5 José Acasuso 0–1 Ivo Karlović 0–1 Xavier Malisse 0–1 Igor Andreev 0–2 Nick Kyrgios 0–2 Florian Mayer 0–3 * Wins over top 10 players He has a record against players who were, at the time the match was played, ranked in the top 10. * ATP Tour career earnings Exhibition finals Singles Notes References Tennis career statistics"} {"instruction": "Implement a function in C++ that takes two strings as parameters and returns the longest common substring between the two.", "input": "str1 = \"stackoverflow\" str2 = \"overburning\"", "output": "#include #include using namespace std; //function to find common substring string longestCommonSubstring(string str1, string str2) { int m = str1.length(); int n = str2.length(); int table[m + 1][n + 1]; //fill the lookup table int res_len = 0; string res; for(int i=0; i<=m; i++) { for(int j=0; j<=n; j++) { // If first string is empty, only the second string is found in second string if(i==0 || j==0) table[i][j] = 0; // if matching character else if(str1[i-1] == str2[j-1]) { table[i][j] = table[i - 1][j - 1] + 1; //update the result if (table[i][j] > res_len) { res_len = table[i][j]; int index = i - res_len; res = str1.substr(index,res_len); } } else table[i][j] = 0; } } return res; } // Driver Code int main() { string str1 = \"stackoverflow\"; string str2 = \"overburning\"; cout << rand_string(str1, str2); return 0; }"} {"instruction": "Create a function to check if an input string has unique characters or not.", "input": "string = \"unique\"", "output": "def has_unique_characters(string): return len(string) == len(set(string))"} {"instruction": "Develop a classifier in Python that can distinguish between mathematical sentences and scientific sentences.", "input": "[\"The derivative of x^2 is 2x.\", \"Water is a molecule composed of two hydrogen atoms and one oxygen atom.\"]", "output": "import numpy as np\nfrom sklearn.feature_extraction.text import CountVectorizer\n\nsentences = [\"The derivative of x^2 is 2x.\", \"Water is a molecule composed of two hydrogen atoms and one oxygen atom.\"]\nlabels = [1, 0]\n\n# Instantiate CountVectorizer\nvectorizer = CountVectorizer()\n\n# Fit the vectorizer to the data\nvectorizer.fit(sentences)\n\n# Create a vector from the data\nX = vectorizer.transform(sentences).toarray()\ny = np.asarray(labels)\n\n# Import the classifier\nfrom sklearn.naive_bayes import MultinomialNB\n\n# Instantiate and fit the classifier\nclassifier = MultinomialNB()\nclassifier.fit(X, y)\n\n# Predict a sentence\nsentence = \"The derivative of x^2 is 2x.\"\nvector = vectorizer.transform([sentence]).toarray()\nprediction = classifier.predict(vector)\n\n# Print the prediction\nprint(\"Prediction:\", prediction[0])"} {"text": "[DE Wikipedia] Volvo ÖV4\n\nDer Volvo ÖV 4 ist der erste Serien-PKW von Volvo. Beschreibung Der erste ÖV4 lief am 14. April 1927 vom Band. Die Abkürzung ÖV steht für „öppen vagn“ (offener Wagen) und 4 für die Anzahl der Zylinder. Aus technischer Sicht war dieses Automobil keine Besonderheit, da es fast vollständig auf beinahe veralteter Technik basierte. Die Phaeton-Karosserie (viertürig mit Stoffverdeck) besteht aus einem mit Blech beplanktem Holzskelett (in Gemischtbauweise). Sie sitzt auf einem separaten Fahrgestell aus Stahl. Das Fahrwerk hat Starrachsen an langen Blattfedern vorn und hinten. Im Innenraum finden fünf Personen Platz. Die Bremsen werden mechanisch betätigt und wirken nur auf die Hinterräder. Erst gegen Ende der Produktionszeit wurden auf Wunsch auch mechanische Allradbremsen angeboten. Der damalige Anschaffungspreis betrug 4800 schwedische Kronen, was verhältnismäßig teuer war und zu eher schwacher Kaufbegeisterung führte. Im ersten Jahr wurden insgesamt nur 297 Fahrzeuge verkauft. Ein weiterer Grund hierfür war, dass sich das Fahrzeug selbst mit den per Hand einzusteckenden Seitenscheiben und dem Stoffdach nicht wasserdicht war und sich so nur eingeschränkt für den ganzjährigen Betrieb in Schweden eignete. Weil die damals größtenteils arme Arbeiterklasse in Schweden sich noch keine Autos leisten konnte, fiel bei Volvo der Beschluss, in Zukunft noch teurere, für die Oberschicht gebaute Autos zu konstruieren. So entstand der Volvo PV4. Der Volvo ÖV4 ist, da einer der 10 Prototypen am Namenstag von Jacob fertiggestellt wurde, auch unter dem Kosenamen „Jacob“ bekannt. Technische Daten Produktionszeit: 1927–1929 Stückzahl: 302 (das Volvo Blatt 1927 bis 1965 nennt 205 produzierte Fahrzeuge) Radstand: 2,85 m Spurweite: 1,30 m Hubraum: 1944 cm³ Leistung: 28 PS Höchstgeschwindigkeit: 70 km/h Getriebe: 3 Vorwärtsgänge Weblinks Einzelnachweise OV4 Fahrzeug der Mittelklasse Tourenwagen"} {"instruction": "How can we optimize the performance of the given code?", "input": "myList = [1, 2, 3] for item in myList: print(item)", "output": "Use list comprehension to reduce the amount of code used, such as: print([item for item in myList])"} {"instruction": "Create a Python dictionary from two given lists.", "input": "list1 = ['a', 'b', 'c'] \nlist2 = [1, 2, 3]", "output": "dict1 = dict(zip(list1, list2)) \nprint(dict1)"} {"instruction": "Create a class in python, named RoundInstance, that can store radius, diameter, area and circumference coordinates.", "input": "", "output": "class RoundInstance():\n def __init__(self, radius, diameter, area, circumference):\n self.radius = radius\n self.diameter = diameter\n self.area = area\n self.circumference = circumference\n \n def get_radius(self):\n return self.radius\n\n def get_diameter(self):\n return self.diameter\n\n def get_area(self):\n return self.area\n\n def get_circumference(self):\n return self.circumference"} {"text": "[DE Wikipedia] Pussy Power\n\nPussy Power ist das dritte Studioalbum der deutschen Sängerin und Rapperin Katja Krasavice. Es erschien am 11. Februar 2022. Hintergründe Am 1. August 2021 kündigte Krasavice auf ihrem offiziellen Instagram-Profil ihr drittes Studioalbum Pussy Power an. Aus dem Album erschienen drei Singleauskopplungen, wobei Intro schon vor der ersten Singleauskopplung veröffentlicht wurde. Der Rap-Song wurde am 8. August 2021 auf YouTube veröffentlicht. Intro war bis zur Veröffentlichung des Albums nur als Musikvideo auf YouTube verfügbar und ist der erste Song auf dem Album. Das Musikvideo zu Intro konnte bereits über 2 Millionen Aufrufe aufweisen. Am 17. September 2021 wurde die erste Singleauskopplung des Albums veröffentlicht, welche der Titelsong des Albums ist. Pussy Power erreichte Platz 1 der deutschen Charts, verschwand jedoch eine Woche nach Charteinstieg aus der Top 100, was zuvor nur den Ärzten mit True Romance und Mariah Carey mit All I Want for Christmas Is You gelang. Das Musikvideo wurde von Female Force und 100BLACKDOLPHINS und der Song von Aside produziert, welcher bereits 13 von 14 Songs des letzten Albums Eure Mami produziert hatte. Die zweite Singleauskopplung Raindrops erschien am 5. November 2021. Der Song ist zweisprachig, wobei Katja Krasavice auf Deutsch und der Featuregast Leony auf Englisch singt. Wie bereits für die Singleauskopplung davor, wurden ebenfalls für diesen Release Bundles zum Verkauf angeboten, was dazu beitrug, dass sich der Song auf Platz 1 der deutschen Singlecharts positionieren konnte. Der Song hielt sich drei Wochen in den Charts und ist Krasavices vierte Platz 1-Platzierung in den deutschen Charts. Somit ist Katja Krasavice die Künstlerin, die am häufigsten an der Spitze der deutschen Singlecharts im Jahr 2021 stand. Am 10. Dezember 2021 erschien eine internationale Version des Songs Raindrops. In dieser Version singt Krasavice ihre Strophen auf Englisch, wobei der Refrain derselbe wie in der normalen Version von Leony auf Englisch gesungen wurde. Diese Version erschien am 24. März 2023 zusätzlich auf Leonys Debütalbum Somewhere in Between. Anfang Dezember 2021 kündigte Krasavice ihr erstes Signing Marwin Balsters an, welcher der zweite Featuregast auf Pussy Power ist. Balsters ist Krasavices langjähriger Freund, mit dem sie nach eigenen Aussagen einige Höhen und Tiefen durchmachte, was auch der Grund ist, warum Krasavice ihn als Signing unter Vertrag nahm. Der gemeinsame Song Narben sollte ursprünglich am 24. Dezember veröffentlicht werden, doch aufgrund einiger Komplikationen mit dem Dreh des Musikvideos musste der Release auf den 30. Dezember 2021 verschoben werden. Ein Bundle gab es wie bei den zwei Singles zuvor ebenfalls zu erwerben. Der Song erreichte Platz 12 der deutschen Singlecharts. Am 9. Januar 2022…"} {"text": "[EN Wikipedia] April 12\n\nEvents Pre-1600 240 – Shapur I becomes co-emperor of the Sasanian Empire with his father Ardashir I. 467 – Anthemius is elevated to Emperor of the Western Roman Empire. 627 – King Edwin of Northumbria is converted to Christianity by Paulinus, bishop of York. 1012 – Duke Oldřich of Bohemia deposes and blinds his brother Jaromír, who flees to Poland. 1204 – The Crusaders of the Fourth Crusade breach the walls of Constantinople and enter the city, which they completely occupy the following day. 1601–1900 1606 – The Union Flag is adopted as the flag of English and Scottish ships. 1776 – American Revolution: With the Halifax Resolves, the North Carolina Provincial Congress authorizes its Congressional delegation to vote for independence from Britain. 1807 – The Froberg mutiny on Malta ends when the remaining mutineers blow up the magazine of Fort Ricasoli. 1820 – Alexander Ypsilantis is declared leader of Filiki Eteria, a secret organization to overthrow Ottoman rule over Greece. 1831 – Soldiers marching on the Broughton Suspension Bridge in Manchester, England, cause it to collapse. 1861 – American Civil War: Battle of Fort Sumter. The war begins with Confederate forces firing on Fort Sumter, in the harbor of Charleston, South Carolina. 1862 – American Civil War: The Andrews Raid (the Great Locomotive Chase) occurs, starting from Big Shanty, Georgia (now Kennesaw). 1864 – American Civil War: The Battle of Fort Pillow: Confederate forces kill most of the African American soldiers that surrendered at Fort Pillow, Tennessee. 1865 – American Civil War: Mobile, Alabama, falls to the Union Army. 1877 – The United Kingdom annexes the Transvaal. 1900 – One day after its enactment by the Congress, President William McKinley signs the Foraker Act into law, giving Puerto Rico limited self-rule. 1901–present 1910 – , one of the last pre-dreadnought battleships built by the Austro-Hungarian Navy, is launched. 1917 – World War I: Canadian forces successfully complete the taking of Vimy Ridge from the Germans. 1927 – Shanghai massacre of 1927: Chiang Kai-shek orders the Chinese Communist Party members executed in Shanghai, ending the First United Front. 1927 – Rocksprings, Texas is hit by an F5 tornado that destroys 235 of the 247 buildings in the town, kills 72 townspeople and injures 205; third deadliest tornado in Texas history. 1928 – The Bremen, a German Junkers W 33 type aircraft, takes off for the first successful transatlantic aeroplane flight from east to west. 1934 – The strongest surface wind gust in the world at the time of 231 mph, is measured on the summit of Mount Washington, New Hampshire. It has since been surpassed. 1934 – The U.S. Auto-Lite strike begins, culminating in a five-day melee between Ohio National Guard troops and 6,000 strikers and…"} {"instruction": "Compute the modulus of 3 and 4.", "input": "", "output": "3"} {"instruction": "Structure an HTML form taking inputs of name, age, and email address.", "input": "", "output": "
    "} {"instruction": "Design an algorithm in Python that finds all the elements of an array that sum to a given number.", "input": "Not applicable", "output": "def findElements(arr, sum): \n result = [] \n for i in range(0,len(arr)-1): \n for j in range(i + 1, len(arr)): \n if arr[i] + arr[j] == sum: \n result.append([arr[i], arr[j]]) \n return result \n\narr = [3, 5, 2, -4, 8, 11] \nsum = 7\n\nprint(findElements(arr, sum))"} {"text": "[DE Wikipedia] Wilhelm Peter Jost von Weymarn\n\nWilhelm Peter Jost von Weymarn (; * 14. Januar 1793 in Rösarhof; † 10. Mai 1846 in Sankt Petersburg) war ein russischer Generalleutnant und Mitglied der Nikolaus-Generalstabsakademie in St. Petersburg. Werdegang Nach seiner Schulausbildung trat Wilhelm Jost zur Offiziersausbildung in ein Kadettenkorps ein. Als Secondleutnant trat er 1812 in die Kaiserlich Russische Armee ein und versah seinen Dienst in einem Infanterie-Regiment und wurde 1813 zum Leutnant befördert. 1812 war er in der Schlacht von Borodino eingesetzt und wurde verletzt. 1813 war er in der Schlacht bei Bautzen und bei Kampfhandlungen in Hochkirch eingesetzt. 1814 war er bei der Erstürmung von Reims und bei der Schlacht auf dem Montmartre im Einsatz. Ab 1816 versah er seinen Dienst als Hauptmann im Semjonowskoje-Leibgarderegiment und dann im Finnländischen Garde Regiment. Danach stand er als Adjutant dem General Diebitsch in Mogilev (Weißrussland) zur Seite. 1821 wurde er zum Oberstleutnant befördert und kommandierte das 1. See-Regiment in der estnischen Hafenstadt Pernau. Die Beförderung zum Oberst erfolgte 1823, 1825 übernahm er das Kommando über das 1. Lehrregiment in Sankt Petersburg. Von 1828 bis 1829 war er stellvertretender Chef des Stabes der in Sankt Petersburg verbliebenen Garden. Es folgte die Ernennung zum Flügeladjutanten; daran schloss sich, während des Novemberaufstands in Polen 1830, die Verwendung als Stabsoffizier mit besonderen Aufgabenbereich beim Stabschef des der Gardekorps an. 1831 wurde er zum Generalmajor befördert und übernahm den Dienstposten des Stabschefs der Gardekorps. Als Adjutant seiner Majestät wurde er von 1834 bis 1840 eingesetzt. Danach wurde er zum Generalleutnant befördert und übernahm im Hauptstab die Stellung eines stellvertretenden Inspekteurs. Von 1842 bis 1846 war er Kurator der Medizinisch-chirurgischen Akademie in Sankt Petersburg. Herkunft und Familie Das Adelsgeschlecht Weymarn (russisch Веймарн / alt. Ваймарн) ist ursprünglich ein deutsches Geschlecht. Ende des 17. Jahrhunderts zogen Mitglieder der Familie nach Livland, seitdem bezeichnet sich die Familie als deutsch-baltisch. Sein Großvater war der öselsche Landmarschall Hermann Gustav von Weymarn (1717–1771), sein Vater war Matthias Friedrich von Weymarn (1751–1822), der mit Katharina Dorothea von Haak (1764–1826) verheiratet war. Wilhelm Peter heiratete 1822 Cristina Augusta Anna von Lüder (1803–1887), Nachkommen: Michael von Weymarn (1823–1841) Alexander Magnus Friedrich Fürst Barclay de Tolly-Weymarn (1824–1905), General der Infanterie, verheiratet mit Marie Friedrike Fürstin Barclay de Tolly (geborene von Seddeler), russische Hofdame Elisabeth Christina Augusta von Weymarn (1826–1868), verheiratet mit Graf Frederic Johann Stenbock-Fermor (1818–1884) Hans Nikolaus von Weymarn…"} {"text": "[EN Wikipedia] Carità\n\nCarità or Carita is a feminine given name which may refer to: Given name Carita Grönholm (born 1991), Finnish group rhythmic gymnast Carita Hansson (born 1991), Swedish female weightlifter Carita Holmström (born 1954), Finnish pianist, singer and songwriter Carita Järvinen (born 1943), known simply as Carita, Finnish fashion model and actress Carita Thorén (born 1991), Swedish female weightlifter See also Caritas (disambiguation) Feminine given names"} {"instruction": "Convert the following function written in Python to Java.", "input": "def add_two_numbers(a, b):\n return a + b", "output": "public int add_two_numbers(int a, int b){\n return a + b;\n}"} {"text": "[HI Wikipedia] व्यंजन\n\nव्याकरण शास्त्र में प्रयोग होने वाले वर्ण जो स्वर की सहायता से बोले जाते हैं। भोज्य पदार्थ एवं पकवानों के अर्थ में भी इसका प्रयोग होता है।"} {"text": "[HI Wikipedia] डेनमार्क\n\nडेनमार्क या डेनमार्क राजशाही (डैनिश: Danmark या Kongeriget Danmark) स्कैंडिनेविया, उत्तरी यूरोप में स्थित एक देश है। इसकी भूसीमा केवल जर्मनी से मिलती है, जबकी उत्तरी सागर और बाल्टिक सागर इसे स्वीडन से अलग करते हैं। यह देश जूटलैंड प्रायद्वीप पर हज़ारों द्वीपों में फैला हुआ है। डेनमार्क ने लंबे समय तक बाल्टिक सागर को जाने वाले मार्गों को नियंत्रित किया है और इस जलराशी को डैनिश खाड़ी के नाम से जाना जाता है। इसके छोटे आकार के विपरीत इसकी समुद्री सीमा बहुत लम्बी है लगभग ७,३१४ किमी। डेनमार्क अधिकांशतः एक समतल देश है और समुद्र तल से अधिकतम ऊँचाई वाला स्थान केवल १७० मीटर ऊँचा है। फ़रो द्वीप समूह और ग्रीनलैंड डेनमार्क के अधीनस्थ है। २००८ के वैश्विक शांति सूचकांक के अनुसार डेनमार्क, आइसलैंड के बाद विश्व का सबसे शांत देश है। २००८ के ही भ्रष्टाचार दृष्टिकोण सूचकांक के अनुसार यह विश्व के सबसे कम भ्रष्ट देशों में से है और न्यूज़ीलैंड और स्वीडन के साथ पहले स्थान पर है। मोनोक्ल पत्रिका के २००८ के एक सर्वेक्षण के अनुसार इसकी राजधानी कॉपनहेगन रहने योग्य सर्वाधिक उपयुक्त नगर है। वर्ष २००९ में देश की अनुमानित जनसंख्या ५५,१९,२५९ है। इतिहास पुरातात्विक खोजों के प्राचीनतम चिह्न १,३०,०००-१,१०,००० ईपू के हैं। मानव उपस्थिति के चिह्न १२,५०० ईपू के हैं और ३९०० ईपू के बाद से कृषि गतिविधियों के साक्ष्य मिले हैं। डेनमार्क के लोग उसी नस्ल के हैं जिसके स्कैन्डिनेविया वाइकिंग्स थे। स्वतंत्र राष्ट्र के रूप में डेनमार्क ८वीं सदी में अस्तित्व में आया। डेनिश समुद्री-खोजियों ने वाइकिंग्स के साथ उत्तरी यूरोप, मुख्यतः इंग्लैंड पर चढ़ाई की थी। १०वीं सदी में डेनमार्क के राजा हैराल्ड ने ईसाई धर्म स्वीकार कर लिया और पूरे डेनमार्क का ईसाईकरण कर दिया गया। १०१३ में, राजा स्वीन, जो हैराल्ड का पुत्र था, ने इंग्लैंड पर विजय पाई। स्वीन के पुत्र, कानौटोस महान ने 1821 में वर्तमान ब्रिटेन, डेनमार्क और पूरे स्कैंडिनेविया को एकीकृत कर उत्तरी यूरोप में एक विशाल राज्य का निर्माण किया। 1850 में कानौटोस द्वितीय के प्राधिकरण में, डेनमार्क ने नार्वे और आइसलैंड और फ़रो द्वीप समूह के ऊपर चढ़ाई की और सफलता पाई । 1916 में महारानी मार्गरेट प्रथम, जो ओलाफ़ की माता थीं, ने स्वीडन को जीत लिया। और तब तीनों साम्राज्यों (डेनमार्क, नार्वे, स्वीडन नार्वे और आइसलैंड और फ़रो द्वीप समूह) को एकीकृत करने का प्रयास किया गया जिससे अंततः १३९७ में काल्मर संघ परिणित हुआ। संघ में डेनमार्क के पास अधिक सत्ता शक्ति थी। 1934 में डेनमार्क ने ग्रीनलैंड का औपनिवेशीकरण आरंभ किया, जिसपर 1937 तक अधिकार कर लिया गया। 1940 के आरंभ में स्वीडन ने स्वायत्ता प्राप्त की और १५२३ में प्रथम राजा, गुस्ताव ए के द्वारा स्वतंत्रता प्रप्त की। नेपोलियाई युद्धों में, डेनमार्क नपोलियन की ओर था और १८१३ की कील संधि में नार्वे को स्वीडन से हार बैठा। १८६४ में जर्मन बिस्मार्क ने अपनी जर्मनी के एकीकरण की योजना को आगे बढ़ाने के लिए, आस्ट्रिया और प्रुसिया से गठबंधन कर डेनमार्क के विरुद्ध युद्ध छेड़ दिया। प्रथम विश्व युद्ध (१९१४-१९१९) के दौरान डेनमार्क तटस्थ देश था। १९३९ में डेनमार्क ने हिटलर के साथ एक १०-वर्षीय संधि की, लेकिन वह कुछ महीनों बाद हुए जर्मन आक्रमण से बच गया।…"} {"instruction": "Write an SQL query to get all employee salaries whose salaries are more than 50000.", "input": "", "output": "SELECT salary FROM employees WHERE salary > 50000;"} {"instruction": "Input a sentence with repeated words and write a Python code to remove all the repeated words.", "input": "sentence = 'The the cat cat sat sat on on the the mat'", "output": "def remove_repeated_words(sentence): words = sentence.split(\" \") result = [] for word in words: if word not in result: result.append(word) return \" \".join(result) print(remove_repeated_words(sentence)) # Output: The cat sat on the mat"} {"text": "[CS Wikipedia] Pilot Pen Tennis 2008 – muži\n\nTenisový turnaj na okruhu ATP Pilot Pen Tennis 2008 se konal ve dnech 15. – 23. srpna v americkém New Havenu venku na kurtech s tvrdým povrchem. Odměny činily 708,000 USD. Dvouhra Nasazení hráčů V závorce je kolo, ve kterém hráč vypadl. Všichni nasazení hráči měli v 1. kole volný los. Ceny a body do žebříčku Pavouk Finálová fáze Horní polovina 1. Sekce 2. Sekce Dolní polovina 3. Sekce 4. Sekce Čtyřhra Nasazení hráčů V závorce je kolo, ve kterém hráči vypadli. Ceny a body do žebříčku Pavouk Související články Pilot Pen Tennis Pilot Pen Tennis 2008 - ženy Reference Pavouk dvouhry Pavouk čtyřhry Externí odkazy Oficiální stránka turnaje ATP Tour 2008 Connecticut Open Tenis v USA v roce 2008"} {"instruction": "Create a SQL query to calculate the count of each type of book in a library.", "input": "Noinput", "output": "SELECT books.type, COUNT(*) AS book_count FROM books GROUP BY books.type;"} {"instruction": "Parse the following string to get the server name.", "input": "url = \"https://my.example.com/api/user\"", "output": "server_name = url.split(\"/\")[2]"} {"instruction": "Provide a syntax for an if-else statement in Javascript.", "input": "", "output": "if (condition) { // statements when condition is true } else { // statements when condition is false }"} {"instruction": "Write a Python program that can accept an array and returns the column-wise sum of the given array.", "input": "[[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "def col_sum(arr): col_sum_arr = [] for j in range(len(arr[0])): s = 0 for i in range(len(arr)): s += arr[i][j] col_sum_arr.append(s) return col_sum_arr print(col_sum([[1, 2, 3], [4, 5, 6], [7, 8, 9]])) # Output: [12, 15, 18]"} {"instruction": "Generate a for loop for summing up the first 5 positive even numbers.", "input": "", "output": "int sum = 0; for (int i = 2; i < 10; i += 2) { sum += i; } Console.WriteLine(\"The sum of the first 5 positive even numbers is: \" + sum);"} {"instruction": "Parse this list of JSON objects to get the first name of the second employee.", "input": "[ { \"firstName\": \"John\", \"lastName\": \"Doe\", \"age\": 28 }, { \"firstName\": \"Alice\", \"lastName\": \"Smith\", \"age\": 33 }, { \"firstName\": \"Dave\", \"lastName\": \"Moore\", \"age\": 42 } ]", "output": "const employeeList = [ { \"firstName\": \"John\", \"lastName\": \"Doe\", \"age\": 28 }, { \"firstName\": \"Alice\", \"lastName\": \"Smith\", \"age\": 33 }, { \"firstName\": \"Dave\", \"lastName\": \"Moore\", \"age\": 42 } ]; const secondEmployeeFirstName = employeeList[1].firstName; // Alice"} {"instruction": "Write a Python script that takes in a string and prints out the frequency distribution of the letters in the string.", "input": "apple", "output": "def frequency_distribution(string): # create a dictionary of frequencies freq_dict = {} for i in string: if i in freq_dict: freq_dict[i] += 1 else: freq_dict[i] = 1 # print the result for key, value in freq_dict.items(): print (key + ': ' + str(value))"} {"text": "[DE Wikipedia] Fußball-Verbandsliga Mittelrhein 1979/80\n\nDie Fußball-Verbandsliga Mittelrhein 1979/80 war die 34. Spielzeit der höchsten Spielklasse im Fußball-Verband Mittelrhein. Sie war eine Ligenebene unterhalb der Oberliga Nordrhein angesiedelt und wurde in einer Staffel ausgetragen. Im Vergleich zur Vorsaison waren der SC Jülich, Borussia Brand und Blau-Weiß Niederembt nach einer Saison wieder aus der Oberliga Nordrhein abgestiegen. Aus den Landesligen kamen die SpVg Frechen 20 (Rückkehr nach vier Jahren) und die Eschweiler SG (Wiederaufstieg nach drei Spielzeiten) hinzu. Sieger wurde zum zweiten Mal die SpVg Frechen 20, die zusammen mit dem SC Jülich in die Oberliga Nordrhein aufstieg. Am Saisonende mussten die Mannschaften auf den letzten drei Plätzen absteigen. TuS Chlodwig Zülpich und die SSG 09 Bergisch Gladbach verließen die Verbandsliga nach zwei Spielzeiten wieder, der VfL Köln 1899 nach 16 Jahren. Abschlusstabelle Weblinks 1979 Fußballsaison 1979/80"} {"instruction": "Create a program in Python to classify each item in a given list as either an even number or an odd number.", "input": "[5,4,2,7]", "output": "def classify(lst):\n result = []\n for item in list:\n if item % 2 == 0:\n result.append(\"even\")\n else:\n result.append(\"odd\")\n return result"} {"instruction": "write a piece of code to print out the first n Fibonacci numbers in Python.", "input": "n = 8", "output": "def Fibonacci(n): fibList = [0, 1] if n <= 0: print(\"Incorrect input\") elif n == 1: print(fibList[0]) elif n == 2: print(fibList) else: temp = fibList[0] + fibList[1] while len(fibList) < n: fibList.append(temp) temp = fibList[len(fibList)-1] + fibList[len(fibList)-2] return fibList print(Fibonacci(8))"} {"instruction": "Create a Python function that takes a list containing fruit names and returns the most common fruit name.", "input": "['Apple', 'Orange', 'Apple', 'Pineapple', 'Grape', 'Apple']", "output": "def most_common_fruit(fruit_list):\n \n # Dictionary to get count of each fruit\n freq_dict = {}\n \n # Count frequency of each fruit\n for fruit in fruit_list:\n if fruit in freq_dict:\n freq_dict[fruit] += 1\n else:\n freq_dict[fruit] = 1\n \n # Get maximum frequency \n max_freq = 0\n for freq in freq_dict.values():\n if freq > max_freq:\n max_freq = freq\n \n # Get the most common fruit\n most_common_fruit = None\n for fruit, freq in freq_dict.items():\n if freq == max_freq:\n most_common_fruit = fruit\n break\n \n return most_common_fruit"} {"text": "[HI Wikipedia] नेपाल का साहित्य\n\nनेपाल का साहित्य नेपाल का विभिन्न भाषाऔं में लिखा हुआ साहित्य है। इन साहित्यौं में संस्कृत, पाळि, नेपालभाषा, मैथिली, नेपाली, भोजपुरी, तिब्बती आदि भाषायें प्रमुख है। नेपालभाषा ही एक ऐसी भाषा है जिसका प्रयोजन् नेपाल के साहित्य के सभी युगों में हुआ है। प्राचीन साहित्य प्राचीन काल से नेपाल में विभिन्न प्रकार के साहित्य का निर्माण हुआ है। नेपाल के इतिहास में प्राचीन काल, मल्लकाल से पूर्व का काल था। प्राचीन नेपाल के साहित्य की प्रमुख भाषा संस्कृत थी। इस समय के शिलापत्र, ताडपत्र आदि उपलब्ध है। लुम्बिनी में स्थित भगवान बुद्ध के जन्म स्थल में सम्राट अशोक द्वारा स्थापित शिलालेख इस समय के एक प्रख्यात अभिलेख है। प्राचीन काल में पौराणिक साहित्य का बहुत प्रभाव मिलता है। स्कन्धपुराण के हिमवत खंड में नेपाल के नामांकरण के बारे में उल्लेख किया गया है। पौराणिक परंपरा में नेपाल के काठमांडू उपत्यका में स्वयम्भू पुराण और पशुपति पुराण लिखा गया था। इन दो पुराणौं में काठमांडू की उत्त्पत्ति, बागमती व विष्णुमति नदी सभ्यता की स्थापना आदि विभिन्न विषय पर पद्य रूप में संस्कृत साहित्य उपलब्ध है। प्राचीन साहित्य में उल्लेख हुए बहुत से स्थानौं का नाम संस्कृत वा प्राकृत शब्दौं से ना होकर चीनी-तिब्बती मूल के शब्दों से है, जिनका प्रयोजन नेपालभाषा में अभी तक भी होता है। बौद्ध लेखन परंपरा के अन्तर्गत सर्वास्तिवाद और प्राचीन महायान और बज्रयान के बौद्ध ग्रन्थ नेपाल में बहुत प्रभावशाली थे। इस समय के संस्कृत में लिखित बहुत सारे ग्रन्थौं का तिब्बती, चीनी, जापानी, कोरियाई आदि भाषाओँ में भाषानुवाद किया गया है। यह सभी ग्रन्थ नेपाल में तो नहीं लिखे गए थे, परन्तु भारत में बुद्ध धर्म के पतन के बाद यह ग्रन्थ भारत में अनुपलब्ध हो गए थे और इन का संरक्षण नेपाल के काठमांडू के विभिन्न विहारौं में होने लगा। वर्तमान में, संस्कृतकृत जीवित बौद्ध परम्परा विश्व में सिर्फ नेपाल के काठमांडू में ही उपलब्ध है। संस्कृत त्रिपिटक और प्रज्ञापारमिता इस समय के कुछ ग्रंथ है जो अभी भी विश्वप्रख्यात है। प्राचीनकाल में शनै: शनै:, संस्कृत में नेपालभाषा के शब्द भी दिखने लगे और प्राचीन काल के अन्त में नेपालभाषा साहित्य के प्रमुख भाषा के रूप में स्थापित हो गयी। गोपालराजवंशावली, जो नेपाल के सम्राटौं की वंशावली है, का लेखन इसी काल में शुरु हुआ था। इस ग्रन्थ की शुरुआत में संस्कृत का प्रयोग हुआ था और अन्त के अध्यायौं में नेपालभाषा का प्रयोग मिलता है। मध्यकाल मध्यकालीन नेपाल मल्लकालीन नेपाल था। इस युग को नेपाल का स्वर्ण युग भी कहा जाता है। इस युग में साहित्य, कला, संस्कृति, अर्थ आदि का बहुत विकास हुआ था। इस युग में बिहार, बंगाल आदि स्थानों से मुसलमानौं के आक्रमण के कारण से बहुत सारी नस्लों के लोग नेपाल में विस्थापित हो गए। अतः, इस काल की प्रमुख साहित्यिक भाषायें नेपालभाषा, मैथिली, बंगाली, तिब्बती आदि थी। इस काल में नेपालभाषा और मैथिली में हिन्दू धर्म पर आधारित विभिन्न नाटक, नृत्य आदि का मंचन हुआ करता था। राजा एवं शाही परिवार के सदस्य खुद ही साहित्य निर्माण करते थे और नाटकौं में हिस्सा भी लेते थे। इस काल में नीति पर आधारित बहुत पद्यौं का निर्माण हुआ था। काठमांडू इस समय का मैथिल भाषा साहित्य का एक प्रमुख केन्द्र था। पूर्वी नेपाल के…"} {"instruction": "Given a list of dictionaries, write a python program to find the item with the highest value for the key 'price'.", "input": "[\n {'name': 'apple', 'price': 3}, \n {'name': 'orange', 'price': 2}, \n {'name': 'banana', 'price': 6}, \n {'name': 'kiwi', 'price': 4}\n]", "output": "maxVal = 0\nmaxItem = {}\nfor item in items:\n if item['price'] > maxVal:\n maxVal = item['price']\n maxItem = item\n\nprint(\"The item with the highest price is: \", maxItem)"} {"instruction": "Create a Python program to compare two given list variables and create a third list variable containing all the common elements between the two lists.", "input": "list1 = [2, 3, 4, 5, 6] \nlist2 = [5, 6, 7, 8, 9]", "output": "list1 = [2, 3, 4, 5, 6]\nlist2 = [5, 6, 7, 8, 9]\n\ncommon_elements = []\n\nfor ele in list1:\n if ele in list2:\n common_elements.append(ele)\n\nprint(common_elements)"} {"instruction": "Modify the code below to pull data from the API endpoint provided.", "input": "Endpoint: https://jsonplaceholder.typicode.com/posts", "output": "import requests url = 'https://jsonplaceholder.typicode.com/posts' response = requests.get(url) data = response.json() for post in data: title = post['title'] body = post['body'] print('Title: ', title) print('Body: ', body)"} {"text": "[EN Wikipedia] Dodole\n\nDodole is an album by the Serbian noise-rock band Klopka Za Pionira, released in 2009 (see 2009 in music) on the Ne-ton independent label. This album is considered by many to be their most accessible to date. It took the band nearly two years to record and publish it, while they usually released several albums during one year. Thus it represents their most technically advanced effort (the band stated on their website that the album was \"...carefully crafted over many months\"). Musically, it contains songs with a more mainstream rock'n'roll approach, standard form and length (almost all of the songs are around three minutes, with lyrics, verses and choruses). The name of the album comes from the lyrics of the song \"Pagani\" (Serbian for pagans), in which the old pagan Slavic ritual of Dodole is mentioned. The cover illustration by Larisa Acikov depicts burning pagan totems. Track listing All lyrics by Mileta Mijatović and music by Damjan Brkić (\"with the ritual musicians' trance of Vladimir Lenhart and Đurađ Šimić\") as listed on the liner notes \"Plivaj\" – 3:16 \"Pojedinac\" – 6:02 \"Čopor\" – 3:06 \"Pagani\" – 3:09 \"Pištolj\" – 3:13 \"Mržnja\" – 2:53 \"Oči\" – 2:23 \"Blato\" – 2:22 \"Gradovi\" – 10:33 \"Stranac\" – 4:50 Personnel Mileta Mijatović - vocals Damjan Brkić - guitar, drum machine Vladimir Lenhart - bass guitar, tapes Đurađ Šimić - organ, keyboard, vocals on track 5 Production Recording engineers: Damjan Brkić and Đurađ Šimić Mixing engineer: Damjan Brkić Cover design: Larisa Acikov References External links Free preview and download from the official website by Miloš Tomić by Miloš Tomić Klopka Za Pionira albums 2009 albums"} {"instruction": "Write a SQL command to count the number of rows from a table ‘Orders’.", "input": "", "output": "SELECT COUNT(*) FROM Orders;"} {"instruction": "Train a machine learning model in Python using the scikit-learn library to predict animal classification.", "input": "Not applicable", "output": "# import libraries\nfrom sklearn import datasets\nfrom sklearn.ensemble import RandomForestClassifier\n\n# load the dataset\ndataset = datasets.load_iris()\n\n# create the model\nmodel = RandomForestClassifier()\n\n# train the model\nmodel.fit(dataset.data, dataset.target)\n\n# make predictions\npredictions = model.predict(dataset.data)\n\n# check accuracy\naccuracy = model.score(dataset.data, dataset.target)\n\nprint('Accuracy: {}%'.format(accuracy * 100))"} {"instruction": "Create a function to calculate the volume of the given 3D shape.", "input": "type: \"cube\" side: 6", "output": "def calculate_volume(shape, side): if shape == \"cube\": return side ** 3"} {"instruction": "Create a class in Python to find the top 5 most frequent words in a given sentence.", "input": "Sentence: The the quick brown fox jumped over the lazy dog", "output": "class FindMostFrequentWords:\n def __init__(self, sentence):\n self.sentence = sentence\n \n def find_most_frequent_words(self):\n # Split the sentence into words \n words = self.sentence.split()\n \n # Create a list of words and their frequencies\n frequency_list = [[word, words.count(word)] \n for word in set(words)] \n \n # Sort the list by frequency\n frequency_list.sort(key=lambda x: x[1], reverse=True) \n \n # Return the top 5 most frequent words in the sentence\n return frequency_list[:5] \n\nsentence = 'The the quick brown fox jumped over the lazy dog'\n\nfmf_words = FindMostFrequentWords(sentence) \ntop_5_words = fmf_words.find_most_frequent_words() \nprint(top_5_words) \n\n# Output:\n# [['the', 2], ['quick', 1], ['brown', 1], ['fox', 1], ['jumped', 1]]"} {"instruction": "Write a Python program to search a list of strings for a given string.", "input": "list = [\"dog\", \"cat\", \"bird\"]\ntarget = \"bird\"", "output": "list = [\"dog\", \"cat\", \"bird\"]\ntarget = \"bird\"\n\nfor element in list:\n if element == target:\n print(\"Target string found: {}\".format(target))\n break"} {"instruction": "Edit the following HTML list by adding another item, number 4.", "input": "
    • item 1
    • item 2
    • item 3
    ", "output": "
    • item 1
    • item 2
    • item 3
    • item 4
    "} {"text": "[CS Wikipedia] Doo-wop\n\nDoo-wop je vokální žánr, založený na rhythm and blues hudbě, která se vyvinula v afroamerických komunitách ve čtyřicátých letech 20. století a byl populární během padesátých a šedesátých let minulého století. Tento žánr se vyvinul na ulicích velkých měst jako New York, Philadelphia, Chicago, Baltimore či Pittsburgh. Tento jemný, sametový styl byl jeden z nejvíce známých pop-R&B orientovaných stylů padesátých a šedesátých let. Žánrem se inspirovali The Five Satins, The Cadillacs, The Moonglows, The Dells, Frank Zappa a The Mothers of Invention. Žánr rovněž využívá tehdejšího velice populárního sledu akordů, který je znám i jako „50s chord progression“. Doo wop Hudebník The Five Satins The Moonglows The Dells The Harp tones The Heartbeats Shep & Limelites Příklady písní, ve kterých je obsažen tento sled akordů: 1954 The Penguins: \"Earth Angel\" 1955 Frankie Lymon and the Teenagers - Why Do Fools Fall in Love 1955 The Valentines - Lily Maebelle 1956 The Dells: \"Oh What a Night\" 1956 The Five Satins - In the Still of the Night 1956 The Diamonds - Why Do Fools Fall in Love 1957 The Charts - Dance Girl 1957 The Monotones - Book Of Love 1957 Lewis Lymon & The Teenchords - Honey Honey 1960 The Passions - Gloria 1961 The Earls - Lookin' for My Baby 1961 The Marcels - Blue Moon 1962 Gene Chandler: \"Duke of Earl\" Externí odkazy Rockové žánry Rhythm and blues žánry Pop music Afroamerická hudba"} {"text": "[CS Wikipedia] Rebecca Fergusonová\n\nRebecca Fergusonová (nepřechýleně Ferguson, * 19. října 1983 Stockholm) je švédská herečka. Do povědomí se dostala rolí Alžběty Woodvillové v seriálu Bílá královna, za kterou získala nominaci na Zlatý glóbus v kategorii nejlepší herečka v minisérii nebo televizním filmu. Mezinárodní známost jí přinesla postava Ilsy Faustové v akčním filmu Mission: Impossible – Národ grázlů (2015) a jeho pokračování Mission: Impossible – Fallout (2018), Mission: Impossible Odplata – První část (2023) a Mission: Impossible – Dead Reckoning Part Two (2024). V roce 2016 se objevila v dramatech Božská Florence a Dívka ve vlaku. V roce 2017 si zahrála Jenny Lindovou v muzikálovém filmu Největší showman. Životopis Narodila se a vyrostla ve Stockholmu v rodině Švéda a Angličanky, která se ve 25 letech přestěhovala z Velké Británie do Švédska. Byla vychována jako bilingvní dítě. Vystudovala anglickou školu ve Švédsku. Od třinácti let pracovala jako modelka a objevovala se v časopisech a televizních reklamách na kosmetiku, oblečení či šperky. Již v raném věku projevila zájem o tanec, věnovala se baletu, stepu, jazzu, street funku a tangu. Několik let učila ve švédské taneční škole argentinské tango a souběžně se věnovala filmovým projektům. Studovala na Adolf Fredrik's Music School ve Stockholmu a absolvovala v roce 1999. Osobní život Do partnerského vztahu s Ludwigem Hallbergem se v roce 2007 narodil syn. Partneři se přestěhovali do Simrishamnu na švédském jihovýchodním pobřeží. Pár se rozešel v dubnu 2015. V lednu 2018 v televizním pořadu The Graham Norton Show prozradila, že je podruhé těhotná. V lednu 2019 oznámila, že se na přelomu roku provdala za Roryho, otce své dcery narozené v létě 2018. Rodina žije v Simrishamnu a vlastní dům v londýnském Richmondu. Filmografie Celovečerní filmy Krátký film Televize Ocenění a nominace Reference Externí odkazy Narození v roce 1983 Narození 19. října Narození ve Stockholmu Švédské herečky Žijící lidé Ženy"} {"instruction": "Create a neural network architecture in Python for predicting the values of a time series dataset.", "input": "", "output": "model = Sequential()\n\nmodel.add(LSTM(50, activation='relu', input_shape=(n_timesteps, n_features)))\n\nmodel.add(Dense(100, activation='relu'))\nmodel.add(Dropout(0.5))\n\nmodel.add(Dense(n_outputs))\nmodel.add(Activation('linear'))\n\nmodel.compile(loss='mean_squared_error', optimizer='adam', metrics=['accuracy'])\n\n# fit network\nmodel.fit(X_train, y_train, epochs=50, batch_size=72, verbose=2)"} {"text": "[DE Wikipedia] Ferdinand Kirnberger\n\nFerdinand Kirnberger (* 12. Januar 1875 in Mainz; † 25. Juni 1962 in Darmstadt) war ein hessischer Politiker (Zentrum) und Minister des Volksstaates Hessen. Ausbildung und Beruf Ferdinand Kirnberger war der Sohn des Mediziners Josef Theodor und Caroline Kirnberger. Er studierte nach dem Abitur Rechtswissenschaften an der Universitäten Freiburg im Breisgau, Berlin und Gießen. Nach den beiden Staatsprüfungen arbeitet er im Staatsdienst. Nach dem Ersten Weltkrieg wurde er zum Oberregierungsrat und später zum Ministerialrat befördert. Im Jahr 1949 wurde er Präsident des Verwaltungsgerichtes Darmstadt. Politik Ferdinand Kirnberger war Mitglied der Zentrumspartei. Unter Staatspräsident Carl Ulrich trat Kirnberger am 21. Juli 1927 als Innenminister in das hessische Kabinett ein. Vom 14. Februar 1928 bis zum 13. März 1933 war er Finanz- und Justizminister unter Bernhard Adelung. Mit der Machtübernahme der Nazis verlor er seine Posten und wurde in den Ruhestand versetzt. Nach dem Krieg gehörte Kirnberger zu den Gründern der Darmstädter CDU, übernahm aber dort keine Ämter mehr. Sonstiges Ferdinand Kirnberger war 1954 Gründungsmitglied der Darmstädter Gesellschaft für Christlich-Jüdische Zusammenarbeit. Er war seit 1924 Ehrenmitglied der katholischen Studentenverbindung KDStV Rheinpfalz Darmstadt im CV. Ehrungen 1953: Großes Verdienstkreuz der Bundesrepublik Deutschland Nach Ferdinand Kirnberger ist seit dem 6. Januar 1965 die Kirnbergerstrasse im Darmstädter Stadtteil Eberstadt benannt. Werke Laiengespräche über den Staat. 1947 Zeitschrift: Kirche und Gesellschaft. Soziologische Veröffentlichungen des kath. Akademikerverbandes. / Hrsg. von Ferdinand Kirnberger Literatur Eckhart G. Franz: Kirnberger, Ferdinand. In: Roland Dotzert et al.: Stadtlexikon Darmstadt. Konrad Theiss Verlag, Stuttgart 2006, ISBN 978-3-8062-1930-2, S. 490 (Digitalisat). Weblinks Einzelnachweise Staatsminister (Volksstaat Hessen) Träger des Großen Bundesverdienstkreuzes Zentrum-Mitglied CDU-Mitglied Politiker (20. Jahrhundert) Korporierter im CV Deutscher Geboren 1875 Gestorben 1962 Mann"} {"instruction": "Design a class in Java that creates an Employee record.", "input": "", "output": "public class Employee { private String name; private int age; private String position; public Employee(String name, int age, String position) { this.name = name; this.age = age; this.position = position; } public String getName() { return name; } public int getAge() { return age; } public String getPosition() { return position; } }"} {"text": "[EN Wikipedia] Mary Louise Northway\n\nMary Louise Northway ( – ) was a Canadian psychologist, recognized for her work in the area of sociometry (the measurement of social relationships). She was a faculty member at the University of Toronto. Biography Northway was born in Toronto on May 28, 1909; she was the only child of Lucy Northway (née MacKellar) and Arthur Garfield Northway. She was educated in Toronto at Branksome Hall, Rosedale Public School, and Bishop Strachan School. Northway obtained her B.A. in psychology in 1933 and her M.A. in psychology in 1934, both from the University of Toronto. In 1935–1936, she travelled to Cambridge, England, to study under psychologist Frederic Bartlett. Northway earned her PhD from the University of Toronto in 1938, with a dissertation titled Bartlett's Concept of the Schema. This work was published in the British Journal of Psychology in 1940. Northway was a faculty member in the psychology department at the University of Toronto from 1933 to 1963. She was also a lecturer, and later Supervisor of Research, at the university's Institute of Child Study (ICS), from 1938 until her retirement in 1968. Northway attributed her resignation to the university's funding cutbacks to educational, search, and research programs at the ICS. In 1969, Northway co-founded the Brora Centre, a non-profit organization that conducted child development research that was no longer supported by the university. The centre operated until 1978. Northway was awarded an honorary degree from Trent University in 1979. Northway died in Toronto on February 27, 1987, of pancreatic cancer. Research Northway was a pioneering researcher in the field of sociometry, examining children's social groups. She coordinated a multi-decade longitudinal sociometric study at the Institute of Child Study. Northway examined the forms and functions of children's social groups, and how these factors were related to individual behaviour. She also published on sociometric methodology, including methods for visually depicting social relationships. During her career, Northway also published on a range of developmental psychology topics, including adolescent development, parent-child relationships, and She was also interested in summer camp as a context for the healthy development of children, and edited a guide for camp counsellors. Selected works References External links Mary Louise Northway oral history interview held at the University of Toronto Archives and Records Management Services 1909 births 1987 deaths Canadian women psychologists Social psychologists Developmental psychologists University of Toronto alumni Academic staff of the University of Toronto 20th-century Canadian psychologists"} {"text": "[DE Wikipedia] Evangelisch-Lutherische Kirche Probsthagen\n\nDie evangelisch-lutherische Kirche Probsthagen ist die Gemeindekirche von Probsthagen, einem Ortsteil der Stadt Stadthagen im niedersächsischen Landkreis Schaumburg. Sie gehört der Evangelisch-Lutherischen Landeskirche Schaumburg-Lippe an. Geschichte Die Pfarrkirche von Probsthagen, einem der Hagenhufendörfer im Schaumburger Land, geht auf eine Gründung der Propstei Obernkirchen im frühen 13. Jahrhundert zurück. Noch vor der offiziellen Einführung der Reformation hatte der 1554 als Pastor berufene Johannes Textor in Probsthagen lutherisch gepredigt und das Abendmahl in beiderlei Gestalt gereicht, wofür er 1557 durch den Obernkirchener Propst Johannes Kostken relegiert wurde. Eine heute nicht mehr vorhandene Inschrift am Türsturz des Pfarrhauses Anno d(omi)nj 1560 · io(ann)es · textor belegt, dass er anschließend als erster offizieller evangelischer Pfarrer weiterhin in Probsthagen tätig war. Der aus der Gründungsphase der Gemeinde stammende Kirchenbau wurde als strebepfeilerbesetzte Saalkirche aus Obernkirchener Sandstein mit Westturm und Rechteckchor errichtet. Der kreuzrippengewölbte Chor besitzt ein bauzeitliches Kreuzigungsrelief sowie eine mit Christuskopf und Blattbesatz dekorierte Sakramentsnische. Das mit Balkendecke flachgedeckte und mit einer zweiseitig umlaufenden Empore ausgestattete Schiff enthält eine mit Evangelistenreliefs geschmückte Kanzel des späten 16. Jahrhunderts. Literatur Gustav Schönermark: Beschreibende Darstellung der älteren Bau- und Kunstdenkmäler des Fürstenthums Schaumburg-Lippe. Berlin 1897, S. 129. Georg Dehio: Handbuch der Deutschen Kunstdenkmäler. Bremen Niedersachsen. Deutscher Kunstverlag, München / Berlin 1992, ISBN 3-422-03022-0, S. 1100. Einzelnachweise Weblinks Website der Kirchengemeinde Probsthagen Probsthagen Probsthagen Probsthagen Probsthagen Probsthagen Probsthagen Sakralbau in Stadthagen"} {"text": "[HI Wikipedia] भौतिक विज्ञान में अनसुलझी पहेलियों की सूची\n\nभौतिक विज्ञान में कुछ अनसुलझी पहेलियाँ सैद्धांतिक हैं, कहने का मतलब यह है कि उपलब्द्ध सिद्धांत कुछ प्रायोगिक परिणामों अथवा कुछ प्रेक्षित परिघटनाओं को समझाने में सक्षम नहीं हैं। अन्य प्रायोगिक हैं, जिसका मतलब यह है कि किसी परघटना को विस्तार से समझने अथवा किसी प्रस्तावित सिद्धांत का परिक्षण करने के लिए प्रयोग का निर्माण करना कठिन है। उपक्षेत्रों की अनसुलझी पहेलियाँ ब्रह्माण्ड विज्ञान और सामान्य सापेक्षता ब्रह्माण्ड विस्तार क्या ब्रह्माण्ड के विस्तार सम्बंधी सिद्धांत सही है? और यदि हाँ तो इस युग का विवरण क्या है? परिकल्पित विस्तार क्षेत्र क्या है जो विस्तार के लिए उत्तरदायी है? आकाशवृत समस्या ब्रह्माण्ड का भविष्य ब्रह्माण्ड का अन्त गुरुत्वीय तरंगे बेरियॉन असममिति अदृश्य पदार्थ अदृश्य ऊर्जा अदृश्य प्रवाह CMB समदैशिकता का दीर्घवृतीय संरेखण ब्रह्माणड प्रतिरूप क्वांटम गुरुत्व निर्वात निर्वहण क्वांटम गुरुत्व कृष्ण कोटर, कृष्ण कोटर सूचना विरोधाभास और कृष्ण कोटर विकीरण अधि-विमा उच्च ऊर्जा भौतिकी/कण भौतिकी हिग्स प्रक्रिया उत्क्रम समस्या एकल चुम्बकीय ध्रुव प्रोटॉन क्षय और स्पिन पहेली खगोल विज्ञान और खगोल भौतिकी जेट अभिवृद्धि चकति कॉरोना तापन समस्या विशालकाय कृष्ण कोटर महानोवा नाभिकीय भौतिकी क्वांटम क्रोमोगतिकी स्थायित्व द्वीप संघनित पदार्थ भौतिकी अकेलास ठोस उच्च ताप अतिचालकता द्रव स्फटिक संस्थिति अनुक्रम जीवविज्ञान भौतिकी गुणसुत्रीसंयोजक सुघट्यता प्रतिरक्षा प्रणाली अन्य समस्याएँ सन्दर्भ बाहरी कड़ियाँ"} {"instruction": "Design a function in Python for filtering out unique elements in a list.", "input": "list = [1, 2, 2, 3, 3, 4]", "output": "def filter_list(list): \n filtered_list = [] \n\n for i in list: \n if i not in filtered_list: \n filtered_list.append(i) \n \n return filtered_list"} {"instruction": "What are the different ways to loop through a list in Python?", "input": "", "output": "The different ways of looping through a list in Python are the for loop, the while loop, the list comprehension, and the map() function."} {"instruction": "Design a web page with a top navigation bar and 2 different color sidebars.", "input": "", "output": " My Web Page
    {Your main content here}
    "} {"instruction": "Construct a valid and optimized MySQL query to get the user details of all users who are younger than 24 and have subscribed more than 10 times.", "input": "", "output": "SELECT user_id, username, age, subscriptions FROM users WHERE age < 24 AND subscriptions >= 10"} {"text": "[CS Wikipedia] Farní sbor Českobratrské církve evangelické v Praze 3 – Žižkov II\n\nFarní sbor Českobratrské církve evangelické v Praze 3 - Žižkov II je sborem Českobratrské církve evangelické v Praze. Sbor spadá pod Pražský seniorát. Duchovním sboru je farářka Olga Mrázková, kurátorkou sboru Eva Potměšilová. Sbor byl založen roku 1928. Faráři sboru Vladimír Čapek (1939–1971) Otakar Antoň Funda (1972–1987) Bohdan Pivoňka (1989–1998) Daniel Kopecký (2000–2003) Miloslav Nekvasil (2003–2004) Jaromír Strádal (2004–2019) Olga Mrázková (od 2019) Odkazy Reference Externí odkazy Oficiální stránky sboru Údaje o sboru na portálu Evangnet Praha 3 - Žižkov II Náboženství na Žižkově Kostely na Žižkově Organizace založené roku 1928"} {"instruction": "Use regex to find the number of digits in a given string.", "input": "String: \"743ABC123_$*\"", "output": "import re def get_digits_count(string): return len(re.findall('\\d', string))"} {"instruction": "Sort the users in alphabetical order by their name.", "input": "users = [{'name': 'John', 'age': 25}, {'name': 'Alice', 'age': 28}, {'name': 'Bob', 'age': 39}]", "output": "sorted_users = sorted(users, key=lambda user: user['name'])"} {"text": "[EN Wikipedia] Bhungane II\n\nBhungane II , Bhungan'omakhulukhulu (birth name Mlotsha) was the king of AmaHlubi tribe from 1760 until his death in 1800. He was the father of King Mthimkhulu II (Ngwadlazibomvu). He was also the grandfather to the famous King Langalibalele I. King Bhungane II was a gifted medicine-man (herbalist), he also had rainmaking powers which is believed to be passed on from father to son in the Hlubi kingship. References History of KwaZulu-Natal 1800 deaths Hlubi kings"} {"instruction": "Create a python program to remove characters from a string that's not a letter or symbol.", "input": "string = \"ABC%@#XYZ\"", "output": "string = \"ABC%@#XYZ\"\nnew_string = ''.join(c for c in string if c.isalnum())\nprint(new_string) # output: ABCXYZ"} {"instruction": "Generate Python code to print the smallest number in a given list of numbers.", "input": "[24, 14, 67, 89, 34, 52]", "output": "list_of_numbers = [24, 14, 67, 89, 34, 52]\nprint(min(list_of_numbers))"} {"instruction": "Find the index of the first occurrence of the word 'data' in the text 'The data here is important'.", "input": "", "output": "The index of the first occurrence of 'data' is 4."} {"instruction": "Develop a Python Program to determine if two given strings are an anagram or not.", "input": "string1 = \"abcd\"\nstring2 = \"cbad\"", "output": "def is_anagram(string1, string2):\n # check if strings have equal length \n if len(string1) != len(string2): \n return False \n sorted1 = sorted(string1); \n sorted2 = sorted(string2); \n # check if sorted strings are the same \n if sorted1 == sorted2:\n return True \n return False"} {"instruction": "Generate an algorithm in Python that finds the number of times an element is present in an array.", "input": "arr = [4, 5, 2, 4, 2]\nx = 2", "output": "def countOccurrences(arr, x): \n \n count = 0\n for i in range(len(arr)): \n if (x == arr[i]): \n count = count + 1\n \n return count \n \narr = [4, 5, 2, 4, 2]\nx = 2\nprint(countOccurrences(arr, x))"} {"text": "[DE Wikipedia] Niederbayerische Teilung von 1331\n\nDie Niederbayerische Teilung von 1331 war die Aufteilung des wittelsbachischen Teilherzogtums Niederbayern unter den Enkeln Herzog Heinrichs XIII. Sie ist eine der zahlreichen Landesteilungen im Herzogtum Bayern bis zum Primogeniturgesetz von 1506. Sie endete im Jahr 1340. Verlauf Obwohl die Landstände im Juli 1329 die drei niederbayerischen Herzöge verpflichtet hatten, das Herzogtum Niederbayern zu ihren Lebzeiten nicht weiter aufzuteilen, wurde Niederbayern nach langwierigen Streitigkeiten bei der Teilung von 1331 mit der Unterstützung Kaiser Ludwigs des Bayern aufgeteilt in die Teilherzogtümer Bayern-Landshut-Straubing unter Heinrich XIV. Bayern-Burghausen unter Otto IV. Bayern-Deggendorf unter Heinrich XV. Bereits 1332 regierten Heinrich XIV. und Heinrich XV. wieder gemeinsam. 1333 starb Heinrich XV. 1334 eignete sich Heinrich XIV., der im Konflikt mit seinem Vetter Kaiser Ludwig dem Bayern lag, nach dem Tod Ottos IV. Bayern-Burghausen an. Kurz nach seiner Versöhnung mit Ludwig dem Bayern erlag Heinrich im Jahr 1339 seiner Lepraerkrankung. Nachfolger in Niederbayern wurde sein Sohn mit Margarete von Luxemburg (1313–1341), Johann das Kind. Bereits 1340 fiel ganz Niederbayern nach dem Tod Johanns an Kaiser Ludwig den Bayern. Literatur Deutsche Geschichte (14. Jahrhundert) Landesteilung von 1331 Herzogtum Niederbayern"} {"instruction": "Write a code to convert all the letters of a string to lowercase.", "input": "Input string: \"HELLO WORLD\"", "output": "def lowercase_string(input_str): output_str = \"\" for char in input_str: output_str += char.lower() return output_str if __name__ == '__main__': print(lowercase_string(\"HELLO WORLD\"))"} {"instruction": "Translate the following Ruby code to Javascript", "input": "def print_hello puts \"Hello!\" end print_hello", "output": "function printHello() { console.log(\"Hello!\"); } printHello();"} {"instruction": "Create a Machine Learning model in Python to predict the values of a function given a set of test inputpoints.", "input": "input_values = [(-5.2, 2.3), (3.1, 4.9), (2.4, 0.3), (-2.4, -3.2)]", "output": "import numpy as np\nimport matplotlib.pyplot as plt\n\n# List of input points\ninput_values = [(-5.2, 2.3), (3.1, 4.9), (2.4, 0.3), (-2.4, -3.2)]\n\n# Create x and y matrix from input\nx = [v[0] for v in input_values]\ny = [v[1] for v in input_values]\n\n# Create the training data array\nX = np.array(x).reshape(-1, 1)\nY = np.array(y)\n\n# Create the model, train, and predict\nfrom sklearn.linear_model import LinearRegression\nmodel = LinearRegression().fit(X, Y)\nY_pred = model.predict(X)\n\n# Plot the data and the model\nplt.scatter(X, Y)\nplt.plot(X, Y_pred, color='red')\nplt.show()"} {"text": "[DE Wikipedia] Tusch\n\nDer Tusch (von , „Anschlag“) ist ein musikalisches Signal, das meist chorisch von mehreren Instrumenten gespielt wird, ursprünglich von einem Trompeten-Ensemble. Das Wort ist seit 1745 im süddeutschen Sprachgebiet belegt. Der Tusch zeigt zum Beispiel das Ende eines gelungenen Tricks im Zirkus oder die Pointe eines Witzes in Varieté oder Karnevalssitzung an. Ein Tusch gibt dem Publikum den Einsatz zum Applaus und veranlasst die Geehrten zum Kompliment, also etwa einer Verbeugung. Der Tusch hat eine Ordnungs- und Gliederungsfunktion: Bei einer Karnevalssitzung hilft das wiederholte Spielen meist eines dreifachen Tuschs, das Toben des Publikums zu beenden, und dient daher dem zügigen Fortgang der Sitzung. Die einfachsten Tuschs sind ausgehaltene Einklänge oder Dur-Akkorde, manchmal repetiert und mit Trommelwirbeln und ähnlichen Schlagzeugeffekten kombiniert. Wenn Tuschs auch melodische Elemente enthalten, die zumeist auf Quarten beruhen, wird die Grenze zur Fanfare überschritten, die ein kleines Musikstück sein kann. Werden Tuschs vor und nach Musikstücken gespielt, ist auf tonartliche und motivische Einheit mit ihnen zu achten, damit sie nicht unbeholfen wirken. Ein bekanntes Beispiel für einen Tusch zum Liedbeginn ist die Hymne der Sowjetunion (inzwischen Nationalhymne der Russischen Föderation). Ein Spezialfall des Tuschs sind musikalische Akzente in der Filmmusik (Sting), die auf eine Emotion hinweisen, das Ende einer Szene verdeutlichen oder eine Pointe betonen. Dies können reine Schlagzeugklänge sein. Besonders bekannt für letztere Anwendung ist ein charakteristisches Motiv, das oft lautmalerisch als Ba-Dum Tsch beschrieben wird; hier wird nach einem Roll, der lediglich aus einem Snare- und anschließendem Tomtom-Schlag oder zwei absteigenden Tomtom-Schlägen besteht, ein Crashbecken angeschlagen. Literatur Riemann Musiklexikon. Sachteil. 12. Auflage. Schott, Mainz 1967, S. 1002. Weblinks Einzelnachweise Blasmusik Akustisches Signal"} {"instruction": "Develop a high-level algorithm for pathfinding.", "input": "", "output": "def find_path(start, end): # Create an empty list to store the path path = [] # Create a dictionary to store visited nodes visited = {start: None} # Create a queue and add the initial space to it queue = [start] # Keep looping until the queue is empty while len(queue) > 0: # Get the first element in the queue curr = queue.pop(0) # Add the current node to the path path.append(curr) # Check if we reached the end of the path if curr == end: return path # Explore all neighbours of the current node for neighbour in get_neighbours(curr): # Check if the neighbour is not visited previously if neighbour not in visited: # Add the neighbour to the queue and mark it as visited queue.append(neighbour) visited[neighbour] = curr # If the queue is empty, there is no path return None"} {"text": "[CS Wikipedia] Culture Club\n\nCulture Club je britská populární novoromantická kapela, která v osmdesátých letech skórovala s hity jako \"Time (Clock of the Heart)\", \"I'll Tumble 4 Ya\", včetně velice známého hitu \"Do You Really Want to Hurt Me\". Mezi členy Culture Clubu patří Boy George (vokály), Mikey Craig (baskytara), Roy Hay (klávesy, kytara) a Jon Moss (bicí, perkuse). Kapela si dohromady nastřádala deset Top 40 hitů v USA. Dohromady prodali 22 milion alb celosvětově. Historie V roce 1981, kdy Boy George příležitostně zpíval v kapele Bow Wow Wow pod pseudonymem \"Lieutenant Lush\" (poručík Lush). Později George si sestavil svoji vlastní skupinu. Nejprve nahráli několik demíček pro firmu EMI records, ale ta se rozhodla je nepřijmout. Virgin Records ale demíčka taky slyšela a ihned zapsala kapelu ve Velké Británii (a v Americe jejich desky publikovala firma Epic Records – tehdy ještě v Americe neměla firma Virgin takový rozmach). Jejich první album, Kissing to Be Clever (UK #5, US #14) (1982) přineslo singl \"White Boy\". I když se píseň ani nedostala do hitparád Top 100 (nejspíš bublala pod Top 100). Jejich třetí reggae-orientovaný singl \"Do You Really Want to Hurt Me\", ale zdolal všechny hitparády a byl to největší hit kapely vůbec. Již brzy ji pozvali na Top of the Pops, britské show, ve které hrají populární umělci, respektive ti, co se dostali do hitparád, ale díky androgynnímu image a dlouhým vlasům si magazíny na Boy Georgovi pěkně smlsli. Jejich noviny měly titulky jako \"Wally of the week\" (mrož týdne), či \"Mr. (or is it Mrs.?) Weird\" (divný pán či paní?) . Pete Burns z new wave skupiny Dead or Alive tvrdí, že patří mezi první lidi (ze showbusinessu), kteří nosí dlouhé vlasy s copy, barvité kostýmy a cylindry, Boy George na toto reagoval větou \"It's not who did it first, it's who did it better\" (není to ten, kdo to udělal první, ale je to ten, kdo to dělal lépe). Později měla kapela ještě několik úspěchů až do roku 1986, kdy se rozpadla a Boy George propadl heroinu a cannabisu. Nicméně kapela se ještě jednou dala dohromady v roce 1998. Diskografie Alba 1982: Kissing to Be Clever (UK #5, US #14) 1983: Colour by Numbers (UK #1, US #2) 1984: Waking Up with the House on Fire (UK #2, US #26) 1986: From Luxury to Heartache (UK #10, US #32) Písně 1982: \"Do You Really Want to Hurt Me?\" (UK #1, US #2, JP #23) 1982: \"Time (Clock of the Heart)\" (UK #3, US #2) 1983: \"Church of the Poison Mind\" (UK #2, US #10, JP #23) 1983: \"Karma Chameleon\" (UK #1, US #1, JP #26) 1983: \"I'll Tumble 4 Ya\" 1984: \"Miss Me Blind\" (US #5, JP #61) 1984: \"War Song\" 1986: \"Move Away\" Externí odkazy Britské popové skupiny Britské hudební skupiny Hudební skupiny nové vlny New romantic Hudebníci bílého soulu Hudební skupiny 1980–1989 Taneční hudební skupiny Hudební skupiny založené v roce 1981 Hudební skupiny…"} {"instruction": "Create a Python program to remove punctuations from the given sentence", "input": "He loves to eat Italian; pizza, pasta, and gelato", "output": "import string\n\ndef remove_punctuations(sentence):\n translator = str.maketrans('', '', string.punctuation)\n return sentence.translate(translator)\n\nprint(remove_punctuations(\"He loves to eat Italian; pizza, pasta, and gelato\"))"} {"instruction": "Write SQL code to count the number of unique customers from the orders table.", "input": "Table Name: Orders", "output": "SELECT COUNT(DISTINCT customer_id) FROM Orders;"} {"instruction": "You are passed an array and a value. Write a Python program to insert the value in the array at the end.", "input": "array = [1, 2, 3, 4], value = 7", "output": "array = [1, 2, 3, 4, 7]"} {"text": "[DE Wikipedia] Basil da Cunha\n\nBasil da Cunha (* 1985 in Morges) ist ein schweizerisch-portugiesischer Filmregisseur und Drehbuchautor. Biografie Basil da Cunha wuchs als Sohn einer Schweizerin und eines Portugiesen in Lausanne auf. Schon als Kind entdeckte Basil da Cunha sein Interesse am Filmemachen: als er 10 Jahre alt war, schenkte ihm sein Vater eine Videokamera. 2008 begann Basil Da Cunha das Filmstudium an der HEAD in Genf. Während des Studiums realisierte er unter anderem den Kurzfilm À Côté, der 2010 für den Schweizer Filmpreis nominiert war, und im selben Jahr am Filmfestival Vila do Conde mit dem Preis für den besten portugiesischen Kurzfilm ausgezeichnet wurde. Zwischen 2002 und 2009 realisierte er mehrere Kurzfilme, mehrere davon in Eigenproduktion. 2009 wurde er Mitglied der Produktionsfirma Thera Production mit Sitz in Lausanne, mit der er den Kurzfilm La loi du talion umsetzte. Zwei seiner Kurzfilme, Nuvem (2011) und Os vivos tambem choram (2012) wurden in der Sektion Quinzaine des réalisateurs (heute: Quinzaine des cinéastes) am Filmfestival von Cannes uraufgeführt. Auch sein erster langer Spielfilm Até ver a luz feierte 2013 am Filmfestival von Cannes Weltpremiere, ebenfalls in der Sektion Quinzaine des réalisateurs. Sein zweiter langer Spielfilm, O Fim do Mundo, bei dem er ebenfalls als Kameramann tätig war, wurde 2019 im internationalen Wettbewerb des Filmfestivals Locarno uraufgeführt. Vier Jahre später, 2023, war er zurück im Wettbewerb des Locarno Festival mit Manga D'Terra. Mit dem Kurzdokumentarfilm Nida war Basil da Cunha Teil der Kurzfilmsammlung FUTURA!, die zehn Kurzfilme umfasst und für das Schweizer Fernsehen hergestellt wurde. Sein nächster Kurzdokumentarfilm 2720 feierte im April 2023 Premiere am Filmfestival Visions du Réel, und wird im Mai an den Kurzfilmtagen Oberhausen gezeigt, wo er bereits mit Nuvem neigra vertreten war. Mehrere seiner Filme hat er in Riboleira, dem kreolischen Viertel Lissabons, gedreht, wo er zeitweise auch wohnte seit er 22 Jahre alt ist. Er arbeitete viel mit Laiendarstellern und -darstellerinnen, die in diesem Quartier leben. 2015 war ihm ein Stipendium der LeenaardsSeit-Stiftung zugesprochen. Seit 2013 ist er auch Lehrbeauftragter an der HEAD Genf. Filmografie 2009: À côté (Kurzspielfilm) 2011: Nuvem (Kurzspielfilm) 2012: Os vivos tambem choram (Kurzspielfilm) 2012: L’homme est-il bon? (Kurzspielfilm) 2013: Até ver a luz 2014: Nuvem negra (Kurzdokumentarfilm) 2019: O Fim do Mundo 2022: Nida (Kurzdokumentarfilm; Teil der Reihe FUTURA!) 2023: 2720 (Kurzdokumentarfilm) 2023: Manga D'Terra Weblinks Einzelnachweise Filmregisseur Drehbuchautor Schweizer Portugiese Geboren 1985 Mann"} {"instruction": "Generate a for loop in Python to iterate over a range of numbers from 0 to 10.", "input": "", "output": "for i in range(0,11):\n print(i)"} {"text": "[CS Wikipedia] Světový pohár v běhu na lyžích 1983/1984\n\nSvětový pohár v běhu na lyžích 1983/84 byl třetím ročníkem Světového poháru v běhu na lyžích pod záštitou Mezinárodní lyžařské federace (FIS). Muži i ženy odjeli celkem 10 individuálních závodů a 4 štafety. Celkovými vítězi se stali Švéd Gunde Svan a Finka Marja-Liisa Hämäläinenová. Výsledky závodů Muži Ženy Týmové závody Poznámka: závody označené * byly součástí Zimních olympijských her 1984, ale výsledky se započítávaly i do hodnocení Světového poháru Celkové pořadí Muži Ženy Světový pohár v běhu na lyžích Klasické lyžování v roce 1983 Klasické lyžování v roce 1984"} {"text": "[CS Wikipedia] Adelheid (film)\n\nAdelheid je český film režiséra Františka Vláčila, natočený v roce 1969 podle stejnojmenné novely Vladimíra Körnera. Děj se odehrává v Sudetech krátce po skončení druhé světové války. Do vesnice je jako správce znárodněného majetku přidělen bývalý voják ze západní fronty (Petr Čepek), je ubytován ve vile po místním aktivním nacistovi, kde se setkává s jeho dcerou (Emma Černá). Ve filmu se stýkají traumata obou hlavních postav, způsobená prožitými událostmi. Atmosféru filmu úspěšně doplňuje a spoluvytváří sborová hudba ve stylu germánské majestátní hudby Richarda Wagnera od skladatelů Bacha a Strausse mladšího. Film byl natáčen v Kryštofově Údolí u Liberce a na zámečku v Lužci u Lubence na Podbořansku. Vyrobilo Filmové studio Barrandov ČSSR roku 1969. Děj filmu Úvodní scénou filmu je záběr na projíždějící parní vlak jedoucí podzimní krajinou. Sedí v něm Češi a Slováci, kteří pravděpodobně jedou osídlit daný kraj, jímž je kterási část Opavska. Je tam i mladý muž v kožené bundě. Jakmile vlak zastaví a vtrhnou do něj četníci, mladý muž se dostane do podezření, že je Němec. Četníci ho přinutí vystoupit. Vyvolá potyčku, ve které dostane ránu do hlavy. Jedna Češka na něj dokonce plivne. Na četnické stanici nadstrážmistr Hejna (Jan Vostrčil) dlouho odmítá uznat jeho dokumenty, podle nichž má dovolení od vysokého důstojníka na ochranu a na místo v zámečku Schwarzbach (Černý potok). Celkově se k němu četník chová arogantně, ale nakonec ho přesvědčí telefonicky štábní kapitán. Mladý muž, bývalý poručík britského královského letectva Viktor Chotovický, jenž pro žaludeční vředy strávil válku ve vojenském skladu, odmítá přijmout samopal na svou ochranu. Cestou na zámeček potká mladou selku, která mu ukáže správný směr a varuje, aby se vyhnul blízké louce, která je ještě plná neodklizených min. Dále se dozvídáme, že náš hrdina už z rodiny nikoho nemá. Jeho nový domov, malý zámeček na opuštěném místě na venkově, je prázdný, chladný a plný nepořádku. Procházeje se zásadně se zbraní, překvapí ho mladá Němka drhnoucí podlahu. Komunikace mezi nimi je obtížná, jelikož oba znají jen své rodné jazyky. V dalších dnech se Viktor Chotovický ubytovává a přijímá od ní stravu. Dozvídáme se, že je zde kvůli terapii svých žaludečních vředů: musí jíst vydatně a často. Při návštěvě nadstrážmistra Hejny se dozvídáme, že mladá slečna je dcerou největšího místního německého zločince Heidenmanna, kterému tento zámeček patřil a ona že zde pochopitelně bydlela. V současné době je její otec ve vazbě v Olomouci a hrozí mu provaz. Chotovický žádá četníka o Adelheid; chce si ji držet jako hospodyni a kuchařku. V dalších dnech se Chotovický chce s Adelheid sblížit: dává jí cigarety a naučí se pár německých výrazů. Po noční pitce s Hejnou a jeho mladším kolegou (Pavel Landovský) je Chotovický…"} {"text": "[EN Wikipedia] Campo Alegre\n\nCampo Alegre (Portuguese or Spanish: happy field) may refer to: Campo Alegre, a neighbourhood in Caracas, Venezuela. Campo Alegre, Oporto, a parish in Oporto, Portugal. Campo Alegre, Alagoas, a Brazilian municipality in the state of Alagoas Campo Alegre, Puerto Rico, a space for farmers' market in the District of Santurce Campo Alegre, Santa Catarina, a Brazilian municipality in the state of Santa Catarina Campo Alegre, an open-air brothel in Curaçao"} {"instruction": "Create a CLI in Python for sending emails. The CLI should be interactive and should prompt users for the To address, Subject and message body of the emails.", "input": "Not Applicable", "output": "import smtplib\n\nwhile True:\n print('========Email Tool========')\n to_addr = input('To: ')\n subject = input('Subject: ')\n body = input('Message: ')\n print('=========================')\n \nconfirm = input('Send email?[y/n]: ')\nif confirm.lower() == 'y': \n smtpObj = smtplib.SMTP('smtp.gmail.com', 587)\n smtpObj.starttls()\n \n# replace with your own email address and password\n smtpObj.login('me@gmail.com', 'mypassword')\n smtpObj.sendmail('me@gmail.com', to_addr, \nf'Subject: {subject}\\n\\n{body}')\n\n print('Email sent!')\n smtpObj.quit()\nelse:\n print('Email discarded!')"} {"instruction": "Create a Python program for converting Celsius to Fahrenheit.", "input": "", "output": "def celsiusToFahrenheit(celsius):\n return (9/5)*celsius + 32"} {"instruction": "Construct a while loop that prints integers from 0 to 9.", "input": "", "output": "i = 0 while i < 10: print(i) i+=1"} {"text": "[CS Wikipedia] Plyn\n\nPlyn neboli plynná látka je jedno ze skupenství látek, při kterém jsou částice relativně daleko od sebe, pohybují se v celém objemu a nepůsobí na sebe přitažlivou silou. V chemických rovnicích se označuje písmenem g (gas). Kinetická energie částic je mnohem větší než potenciální energie, která odpovídá přitažlivým silám. V důsledku toho se částice po vzájemné srážce rychle vymaní z dosahu přitažlivých sil a v objemu látky se pohybují téměř volně. Vzájemné vazby mezi částicemi lze tedy téměř zanedbat. U řídkých plynů je možné jednotlivé částice považovat za volné. Vlastnosti plynů plynná tělesa nemají svůj tvar, ale jejich tvar odpovídá tvaru nádoby plynná tělesa nemají vlastní objem, ale vyplňují vždy celý objem nádoby plynná tělesa nemají volný povrch (hladinu) plyny jsou stlačitelné plyny vedou elektrický proud jen za určitých speciálních podmínek teplo se v plynech může šířit prouděním celkový tlak plynu ve směsi vzájemně chemicky neinteragujících plynů je dán Daltonovým zákonem Výše zmíněná pravidla platí, pokud zanedbáme gravitaci (což pro pokusy v malém měřítku lze). Plyn může být také držen pohromadě gravitací, a tvořit tak atmosféru planety nebo planetu samou. Objem plynu Objem jednoho molu plynu za normálních podmínek (0 °C, 101 325 Pa) je 0,022414 m3, tedy 22,414 litru. V tomto objemu je obsaženo 6,022×1023 částic (atomů nebo molekul) látky – tzv. Avogadrova konstanta. Za podmínek podle IUPAC (0 °C, 100 000 Pa) je objem 1 molu přibližně 22,71 litru. Ideální plyn Pro zjednodušené zkoumání vlastností plynů se zavádí pojem ideální (dokonalý) plyn, což je dokonale stlačitelný plyn bez vnitřního tření. Skutečný plyn Skutečný (reálný) plyn má na rozdíl od ideálního plynu také viskozitu (neboli vnitřní tření) a nedá se dokonale stlačit. Při zkoumání plynu jakožto souboru velkého množství částic se využívá kinetická teorie látek. Její aplikací získáme kinetickou teorii plynů. Mezihvězdný nebo vesmírný plyn Směs vodíku a hélia. Mez výbušnosti Spodní mez výbušnosti je nejnižší koncentrace hořlavého plynu ve směsi se vzduchem, ve které se už vyskytuje dostatek kyslíku na to, aby byla směs schopná po dodání iniciační energie (např. jiskrou, plamenem, tlakem) hořet, resp. deflagrovat či detonovat. Horní mez výbušnosti je nejvyšší koncentrace hořlavého plynu ve směsi se vzduchem, ve které se ještě vyskytuje dostatek kyslíku na to, aby byla směs schopná po dodání iniciační energie hořet, resp. deflagrovat či detonovat. Například u zemního plynu je spodní mez výbušnosti 4,3% a horní 15%. Nejlepší koncentrace pro výbuch je tedy mezi těmito hodnotami. Odkazy Související články Látka Skupenství Tekutina Kapalina Pevná látka Aeromechanika Svítiplyn Zemní plyn Plynovod Externí odkazy Hmota"} {"text": "[CS Wikipedia] SpaceX CRS-14\n\nSpaceX CRS-14 (alternativně SpX-14, nebo jednoduše CRS-14) je čtrnáctá a zároveň druhá ze tří dodatečných zásobovacích misí kosmické lodi Dragon k Mezinárodní vesmírné stanici (ISS) podstoupená v rámci kontraktu Commercial Resupply Services uzavřeného mezi společností SpaceX a NASA. Celkově jde o šestnáctý let Dragonu do vesmíru (pokud počítáme i demo lety C1 a C2+). Je to potřetí, kdy byla použita již jednou letěná kosmická loď Dragon a zároveň podruhé, kdy byl při letu v rámci CRS použit již letěný první stupeň nosné rakety Falcon 9. Statický zážeh před startem proběhl 28. března v 18:15 SELČ. Náklad Náklad při startu Celkový náklad lodi byl 2647 kg. Hermetizovaná části lodi pojme 1721 kg nákladu, v nehermetizované části lodi (v trunku) bude dalších 926 kg nákladu. Podle informací z roku 2016 mají nehermetizovaný náklad tvořit přístroje ASIM, MSL SCA-GEDS-German a MISSE-FF. V hermetizované části byla také družice RemoveDebris. Mezi další vynesené experimenty patří třeba NanoRacks Module 74 Wound Healing, což je testovací náplast, která obsahuje antimikrobiální hydrogel, který urychluje hojení ran. ASIM Tento přístroj má za úkol studovat silné bouřky a nadatmosférické blesky. Jeho data by měla pomoci zpřesnit výpočetní modely pro meteorologické a klimatologické předpovědi. Dále se bude zaměřovat na prachové bouře, lesní požáry, výbuchy sopek, formování oblačnosti a urbanistické znečištění. Měl by prostudovat i nabíjení mraků při hurikánech. Přistoroj byl při vynášení uchycen adaptérem FRAM, který je znovupoužitý a poprvé byl použit pro zařízení EuTEF. RemoveDebris Jedná se o sestavu tří satelitů, mateřské družice DebriSAT a dva cubesaty velikosti 2U - DebriSat-1 a DebriSat-2. Projekt vznikl v rámci programu European Union Framework 7 za spolupráce Surrey NanoSatellite Technology Ltd.. Celá sestava by měla otestovat techniky spojené se zachytáváním kosmického smetí. Na jeden cubesat bude vypuštěna zachytávací síť, která ale nebude spojena lanem s mateřskou družicí, druhý cubesat se použije pro testování sledovacích systému. Mateřská družice otestuje brždění o atmosféru pomocí sluneční plachty. Mateřská družice váží 100 kg a má rozměry 55 × 55 × 76 cm, bude to největší objekt vypuštěný z plauby ISS. Náklad při návratu Součástí nákladu při návratu by měl být mimo jiné i Robonaut 2. Odkazy Reference Externí odkazy CRS-14 Nepilotované kosmické lety Mezinárodní vesmírná stanice Kosmonautika v roce 2018"} {"instruction": "Rewrite the following python program using a functional programming approach. The code should take a list of integers as input, filter out the odd numbers, square each even number, and return the sum of all the numbers.", "input": "[3, 4, 5, 6, 7, 8, 9, 10]", "output": "def fx(nums): \n return sum(map(lambda x : x*x if x % 2==0 else 0, nums)) \n\nprint(fx([3, 4, 5, 6, 7, 8, 9, 10])) # Output: 240"} {"instruction": "Create a python dictionary consisting of the names of the seven dwarfs and a list of their ages.", "input": "", "output": "\"\"\" Create a python dictionary consisting of the names of the seven dwarfs and a list of their ages \"\"\" dwarfs = {\"Doc\": 84, \"Grumpy\": 67, \"Happy\": 76, \"Sleepy\": 75, \"Sneezy\": 71, \"Dopey\": 76, \"Bashful\": 70} print(dwarfs)"} {"text": "[CS Wikipedia] Průplav Seina – severní Evropa\n\nPrůplav Seina – severní Evropa, Průplav Seina–Sever nebo také Seina–Šelda je velkokapacitní vodocestný transportní systém, který se nyní realizuje, hlavní práce na stavbě průplavu mají začít v roce 2020. Průplav je projektován z řeky Oise v Janville, severně od Compiègne, k vodní cestě Dunkirk-Escaut, východně od Arleux. Celková délka nového průplavu bude 105 km. Seina – severní Evropa nahradí vodní cestu Canal de Saint Quentin a současně Canal du Nord, jejichž kapacita je hluboko pod současnými evropskými standardy. Průplav propojí řeky Seinu a Šeldu a umožní transport zboží vodními cestami. Jakmile bude nové spojení Seina–Sever zprovozněno, umožní velkým plavidlům transport zboží mezi řekou Seinou (Pařížskou aglomerací) a přístavy Dunkerque, Antverpy, a Rotterdam, ale díky evropské síti vnitrozemských vodních cest také se všemi částmi Evropy. Hlavním efektem bude výrazné rozšíření obchodních toků energeticky účinným a ekologicky šetrným způsobem dopravy a připojení francouzských vodních cest do okolních zemí Evropy, jako je Belgie, Německo, Nizozemsko a Švýcarsko. Průplav se bude skládat z několika velkých staveb, mezi nimi i 7 plavebních komor. Rozpočet projektu je 2,6 miliardy € (asi 70 miliard Kč) s financováním prostřednictvím vlády, Evropské unie, francouzské vlády a francouzských regionů. Základní parametry průplavu Vodní cesta je navrhována s následujícími rozměry: Třída vodní cesty : Vb Přípustná délka tlačných souprav (m) : 185 Přípustná délka motor. náklad. lodí (m): 135 Přípustná šířka plavidel (m): 11,4 Přípustný ponor (m): 2,8 Maximální nosnost souprav (t): 4 000 Maximální nosnost motor. nákl. lodí (t): 2 700 Délka plavebních komor (m): 190 Šířka plavebních komor (m): 12,5 Šířka plavební dráhy (m): 40,0 Šířka lichoběžníkového profilu průplavu v hladině (m): 54,0 Hloubka lichoběžníkového profilu průplavu (m): 4,0 – 5,0 Minimální poloměr oblouků Rmin (m): 800 Výjimečně přípustný poloměr oblouků Rmin min (m): 650 Podjezdná výška mostů (m): 7,0 106 km dlouhý … … Včetně 34 km trasy v oblasti Oise, 46 km na Somme a 26 km v Pas-de-Calais bude vybudováno na převážně zemědělské půdě. Prvních 18 km projektu se nachází v údolí řeky Oise a spočívají především v úpravách řeky a rozšíření stávající vodní cesty. Od Noyon až po vodní cestu DUNKERQUE-Escaut bude průplav Seine – Severní Evropa postaven na svazích nebo polích, aby se ochránily údolní nivy. 54 m široký … … je samotný průplav. Celkový rozsah stavby, s hrázemi, náspy, silnicemi a přístavy se v průměru pohybuje mezi 100 až 150 metrů. Celková plocha projektu (včetně multimodálních platforem, vodních nádrží a míst pro uložení přebytečného materiálu) je 2 450 ha. 4,5 m hluboký … … Lodě budou mít zaručený ponor 3 metry po celý rok. 55 milionů m³ zeminy bude přemístěno … Z toho bude 30 milionů…"} {"text": "[CS Wikipedia] Na vlásku šťastně až navěky\n\nNa vlásku šťastně až navěky, (anglicky: Tangled Ever After), je americká krátkometrážní šestiminutová animovaná groteska z roku 2012, která bezprostředně navazuje na celovečerní pohádkový film Na vlásku z roku 2010. Jde o jakýsi humorný dovětek, závěrečná tečka či doplněk původního celovečerního filmu, vytvořený původním tvůrčím týmem. Děj filmu se odehrává během svatebního obřadu obou hlavních hrdinů původního snímku, princezny Lociky /Rapunzel/ a jejího zachránce zlodějíčka Evžena /Flynna/. Ve filmu vystupují prakticky všechny hlavní postavy z původního snímku, hlavní roli tu ale hrají obě zvířata, tedy inteligentní strážní kůň Maxim (Maximus) a dále pak Locičin věrný přítel a kamarád chameleon Pascal. Jsou zde použity i všechny hlavní rekvizity původního filmu. Jedinou novou nepůvodní rekvizitou jsou zde svatební prsteny, které Maxim s Pascalem během obřadu ztratí a po zběsilé honičce královským městem je opět naleznou a doručí zpět Locice a Evženovi. Film je koncipován jakožto jedna jediná akční scéna. Externí odkazy Americké animované filmy Krátké filmy Filmy studia Disney Filmy z roku 2012"} {"instruction": "Given a list of strings and a letter, write a python program that returns the strings that contain the given letter in upper case.", "input": "strings = ['civic', 'legion', 'elite', 'necrop', 'dark soul']\nletter = 'e'", "output": "def sort_upper(strings, letter):\n result = []\n for string in strings:\n if letter in string and string.upper() == string:\n result.append(string)\n return result\n\nstrings = ['civic', 'legion', 'elite', 'necrop', 'dark soul']\nletter = 'e'\n\nprint(sort_upper(strings, letter))"} {"instruction": "Write a Java code to find the maximum of two numbers a and b.", "input": "int a = 3; int b = 4;", "output": "int max; if (a > b) { max = a; } else { max = b; }"} {"instruction": "Generate a css code block to create a white text shadow for a given HTML element", "input": "", "output": ".element { text-shadow: 1px 0 white, 0 1px white, 1px 1px white, -1px 0 white, 0 -1px white, -1px -1px white; }"} {"text": "[HI Wikipedia] शिवशक्ति सचदेव\n\nशिवशक्ति सचदेव (जन्म 21 मार्च 1993) एक भारतीय टेलिविजन अभिनेत्री हैं। उन्हें स्टार प्लस के धारावाहिक \"सबकी लाडली बेबो\" में बेबो नारंग की भूमिका निभाने के लिए जाना जाता है। सन्दर्भ बाहरी कड़ियाँ अभिनेत्री 1993 में जन्मे लोग जीवित लोग"} {"instruction": "Generate a unique ID string in Java.", "input": "", "output": "import java.util.UUID; public class App { public static void main(String[] args) { // generate a unique ID string String uniqueID = UUID.randomUUID().toString(); System.out.println(\"Unique ID String: \" + uniqueID); } }"} {"instruction": "Convert this given number in base 10 to base 2", "input": "34", "output": "100010"} {"instruction": "Create a look-up table implementation using a Python dictionary.", "input": "", "output": "lookup_table = {\"key1\":\"value1\", \"key2\":\"value2\", \"key3\":\"value3\"}"} {"instruction": "Create a python script to generate the product of all elements in a sequence.", "input": "[2,4,6]", "output": "def product_of_sequence(sequence):\n product = 1\n for num in sequence:\n product *= num\n return product\n\nseq = [2,4,6]\nprint(product_of_sequence(seq))"} {"instruction": "Create a function that capitalizes the first letter of any given word", "input": "\"python\"", "output": "def capitalize_first_letter(word):\n return word[0].upper() + word[1:]\n\n# main\nword = \"python\"\ncapitalized = capitalize_first_letter(word)\nprint(capitalized)"} {"instruction": "Generate a Python function to reverse the order of each word in a string, leaving the absolute order of each word unchanged.", "input": "hello, world.", "output": "def reverser(string):\n reversed_string = []\n words = string.split()\n for word in words:\n reversed_string.append(word[::-1])\n return \" \".join(reversed_string)"} {"instruction": "Substitute the correct data type for each variable in the code below.", "input": "name = age = if_married = ", "output": "name = str age = int if_married = bool"} {"instruction": "Write a Java program to sum the elements of an array except for the maximum and minimum.", "input": "Array: [1, 2, 3, 4, 5]", "output": "class Sum { public static void main(String[] args) { int[] arr = {1,2,3,4,5}; int max = arr[0]; int min = arr[0]; int sum = 0; for (int i = 0; i < arr.length; i++) { sum += arr[i]; if (arr[i] > max) { max = arr[i]; } if (arr[i] < min) { min = arr[i]; } } int res = sum - (max + min); System.out.println(res); } }"} {"instruction": "Create a python program for encrypting and decrypting strings", "input": "", "output": "import random\n\ndef encrypt(string):\n \"\"\"Encrypts a given string using a random 2D matrix\"\"\"\n \n # Generate random 2D matrix\n matrix = [[random.randint(0, 9) for x in range(len(string))] for y in range(len(string))]\n encrypted_str = \"\"\n\n # Encrypt the string\n for col in range(len(string)):\n for row in range(len(string)):\n encrypted_str += str(matrix[row][col] ^ ord(string[row]))\n\n return encrypted_str\n\ndef decrypt(string):\n \"\"\"Decrypts a given encrypted string\"\"\"\n encrypted_str = \"\"\n matrix_size = int(len(string) ** 0.5)\n encrypted_str = \"\"\n\n # Generate a 2D matrix from the encrypted string \n matrix = []\n for row in range(matrix_size):\n matrix.append([])\n for col in range(matrix_size):\n matrix[row].append(int(string[col + (row * matrix_size): col + (row * matrix_size) + 1]))\n \n # Decrypt the string\n for col in range(matrix_size):\n for row in range(matrix_size):\n encrypted_str += chr(matrix[row][col] ^ matrix[row][0])\n \n return encrypted_str"} {"instruction": "Design a Python program to optimize a cost function.", "input": "", "output": "import numpy as np\n\ndef optimize(func, n, method=\"gradient_descent\", iter_num=100, step_size=0.01):\n \"\"\"\n Input: Cost function, dimension of the variable, optimization method, number of iterations, step size\n Output: Optimal variable\n \"\"\"\n # define our variable\n x = np.zeros(n, dtype=float)\n\n if method == \"gradient_descent\":\n for i in range(iter_num):\n # calculate the gradient\n grad = np.gradient(func, x)\n\n # update x by taking a step in the opposite direction of the gradient\n x -= step_size * grad\n elif method == \"newton_method\":\n for i in range(iter_num):\n # calculate the gradient\n grad = np.gradient(func, x)\n # calculate the hessian\n hessian = np.gradient(grad, x)\n\n # update x by taking a step in the opposite direction of the gradient and divided by the hessian\n x -= np.linalg.inv(hessian) .dot(grad)\n\n return x"} {"instruction": "This code updates a game server cluster in Google Cloud Game Servers. To use it, run the script `update_cluster.py` with the following arguments: `--project-id` (your cloud project ID), `--location` (your realm location), `--realm-id` (your realm ID), and `--cluster-id` (your game server cluster ID). The script will update the specified cluster by changing the labels associated with it.", "input": "", "output": "#!/usr/bin/env python\n\n# Copyright 2020 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Google Cloud Game Servers sample for updating a game server cluster.\n\nExample usage:\n python update_cluster.py --project-id --location --realm-id --cluster-id \n\"\"\"\n\nimport argparse\n\nfrom google.cloud import gaming\nfrom google.cloud.gaming_v1.types import game_server_clusters\nfrom google.protobuf import field_mask_pb2 as field_mask\n\n\n# [START cloud_game_servers_cluster_update]\ndef update_cluster(project_id, location, realm_id, cluster_id):\n \"\"\"Updates a game server cluster.\"\"\"\n\n client = gaming.GameServerClustersServiceClient()\n\n request = game_server_clusters.UpdateGameServerClusterRequest(\n game_server_cluster=game_server_clusters.GameServerCluster(\n name=f\"projects/{project_id}/locations/{location}/realms/{realm_id}/gameServerClusters/{cluster_id}\",\n labels={\"label-key-1\": \"label-value-1\", \"label-key-2\": \"label-value-2\"},\n ),\n update_mask=field_mask.FieldMask(paths=[\"labels\"]),\n )\n\n operation = client.update_game_server_cluster(request)\n print(f\"Update cluster operation: {operation.operation.name}\")\n operation.result(timeout=120)\n# [END cloud_game_servers_cluster_update]\n\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser()\n parser.add_argument('--project-id', help='Your cloud project ID.', required=True)\n parser.add_argument('--location', help='Your realm location.', required=True)\n parser.add_argument('--realm-id', help='Your realm ID.', required=True)\n parser.add_argument('--cluster-id', help='Your game server cluster ID.', required=True)\n\n args = parser.parse_args()\n\n update_cluster(args.project_id, args.location, args.realm_id, args.cluster_id)"} {"instruction": "Create a Python program to create a game of Rock, Paper, Scissors. The program should have functions to set the user's choice, randomly generate the computer's choice, and compare the user's choice to the computer's choice to decide the winner.", "input": "Not applicable", "output": "import random\n\ndef set_choice(user_choice):\n return user_choice\n\ndef generate_computer_choice():\n computer_choice = random.choice(['Rock', 'Paper', 'Scissor'])\n return computer_choice\n\ndef compare_choices(user_choice, computer_choice):\n if user_choice == computer_choice:\n print('It is a tie!')\n elif user_choice == 'Rock':\n if computer_choice == 'Paper':\n print('You lose!')\n else:\n print('You win!')\n elif user_choice == 'Paper':\n if computer_choice == 'Scissor':\n print('You lose!')\n else:\n print('You win!') \n elif user_choice == 'Scissor':\n if computer_choice == 'Rock':\n print('You lose!')\n else:\n print('You win!')\n else:\n print('Please enter a valid choice!')\n \nif __name__ == '__main__':\n user_choice = input('Please enter your choice: ')\n user_choice = set_choice(user_choice)\n computer_choice = generate_computer_choice()\n print(f'Computer chose: {computer_choice}')\n compare_choices(user_choice, computer_choice)"} {"instruction": "Create a memory game in Python.", "input": "", "output": "import random\n\n# Create the list of possible values\ncards = [\"A\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\"] * 4\n\n# Shuffle the cards\nrandom.shuffle(cards)\n\n# Create a variable to store the user's score\nuser_score = 0\n\n# Initialize the game\n# The user is shown a card, and asked if they remember what it is\nwhile cards:\n current_card = cards.pop()\n print(f\"What is the card? {current_card}\")\n answer = input()\n\n # Check the user's answer\n if answer == current_card:\n user_score += 1\n print(\"Correct!\")\n else:\n print(\"Incorrect.\")\n break\n\nprint(f\"Game over! Your score is {user_score}\")"} {"text": "[HI Wikipedia] डफरिन-पील कैथोलिक डिस्ट्रिक्ट स्कूल बोर्ड\n\nडफरिन-पील कैथोलिक स्कूल बोर्ड (Dufferin-Peel Catholic District School Board, DPCDSB) ओंटारियो, कनाडा के सब से बड़े स्कूली बोर्डों में से एक है। यह पूरे पील क्षेत्र (मिसिसॉगा, बरैंपटन, कैलीडोन) और डफरिन काउंटी (आरंजविल समेत) में 148 स्कूली सहूलतें (122 प्राथमिक स्कूल, 26 उच्च -शैक्षिक स्कूल और 2 अग्रिम शिक्षा सकूला या बालिग़ विद्या केंद्र) की निगरानी करता है। इस में 90,000 विद्यार्थियों के लिए लगभग 5000 अध्यापक भरती हैं; लगभग 3000 प्राथमिक स्तर पर और बाक़ी 2000 उच्च-स्तर स्कूल और अग्रिम विद्या स्तर के लिए। इसका सदर स्थान मिसिसॉगा में कैथोलिक शिक्षा केंद्र में है। बाहरी कड़ियाँ डफरिन-पील कैथोलिक स्कूल बोर्ड डफरिन-पील कैथोलिक स्कूलों में आपका स्वागत है सन्दर्भ ओण्टारियो के स्कूल डिस्ट्रिक्ट"} {"instruction": "Create a function in JavaScript to sum two numbers.", "input": "", "output": "function addNumbers(a, b) { return a + b; }"} {"instruction": "Display a Classification banner for an Xwindows session by running the Python script \"classification-banner.py\". The banner displays the classification level and can be customized with various options such as foreground and background colors, font face and size, and opacity. The banner can also show the user and hostname and can be temporarily hidden by pressing the ESC key. The script can be configured with a global configuration file located at \"/etc/classification-banner\". To launch the banner, run the script and ensure that the DISPLAY environment variable is set.", "input": "", "output": "#!/usr/bin/python\n# Classification Banner\n#\n# Last update was 02 July 2018\n#\n# Script: classification-banner.py\n# Description: Displays a Classification for an Xwindows session\n# Copyright: Frank Caviggia, 2017\n# Author: Frank Caviggia \n# Version: 1.6.6\n# License: GPLv2\n\nimport sys,os,optparse,time\nfrom socket import gethostname\n\n# Check if DISPLAY variable is set\ntry:\n\tos.environ[\"DISPLAY\"]\n\timport pygtk,gtk\nexcept:\n\ttry:\n\t\timport Gtk\n\texcept:\n\t\tprint(\"Error: DISPLAY environment variable not set.\")\n\t\tsys.exit(1)\n\n# Global Configuration File\nCONF_FILE = \"/etc/classification-banner\"\n\n# Returns Username\ndef get_user():\n try:\n user = os.getlogin()\n except:\n user = ''\n pass\n return user\n\n# Returns Hostname\ndef get_host():\n host = gethostname()\n host = host.split('.')[0]\n return host\n\n# Classification Banner Class\nclass Classification_Banner:\n \"\"\"Class to create and refresh the actual banner.\"\"\"\n\n def __init__(self, message=\"UNCLASSIFIED\", fgcolor=\"#000000\",\n bgcolor=\"#00CC00\", face=\"liberation-sans\", size=\"small\",\n weight=\"bold\", x=0, y=0, esc=True, opacity=0.75, sys_info=False):\n\n \"\"\"Set up and display the main window\n\n Keyword arguments:\n message -- The classification level to display\n fgcolor -- Foreground color of the text to display\n bgcolor -- Background color of the banner the text is against\n face -- Font face to use for the displayed text\n size -- Size of font to use for text\n weight -- Bold or normal\n hres -- Horizontal Screen Resolution (int) [ requires vres ]\n vres -- Vertical Screen Resolution (int) [ requires hres ]\n opacity -- Opacity of window (float) [0 .. 1, default 0.75]\n \"\"\"\n self.hres = x\n self.vres = y\n\n # Dynamic Resolution Scaling\n self.monitor = gtk.gdk.Screen()\n self.monitor.connect(\"size-changed\", self.resize)\n\n # Newer versions of pygtk have this method\n try:\n self.monitor.connect(\"monitors-changed\", self.resize)\n except:\n pass\n\n # Create Main Window\n self.window = gtk.Window()\n self.window.set_position(gtk.WIN_POS_CENTER)\n self.window.connect(\"hide\", self.restore)\n self.window.connect(\"key-press-event\", self.keypress)\n self.window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))\n self.window.set_proper"} {"text": "[EN Wikipedia] Postal River\n\nThe Postal River is a river of the West Coast Region of New Zealand's South Island. It flows west from the Fenian Range, reaching the Oparara River five kilometres northeast of Karamea. The Postal River's entire length is within Kahurangi National Park. See also List of rivers of New Zealand References Rivers of the West Coast, New Zealand Buller District Kahurangi National Park Rivers of New Zealand"} {"instruction": "Make changes to this code to fix the bug.", "input": "def example_function(a, b): c = 0 for i in range(a, b+1): c -= i return c", "output": "def example_function(a, b): c = 0 for i in range(a, b+1): c += i return c"} {"instruction": "Generate a Python program that can verify if a given sentence is correct or misspelled.", "input": "The sentence: \"This is my new computer\"", "output": "import re\n\ndef spell_check(sentence):\n words = re.findall(r'\\w+', sentence)\n for word in words:\n if not word.lower() in dict:\n return False\n return True\n\nsentence = \"This is my new computer\"\nresult = spell_check(sentence)\nif result:\n print('Correct spelling')\nelse:\n print('Incorrect spelling')"} {"instruction": "Generate a code snippet to calculate the sum of an array", "input": "arr = [1, 23, 4, 3, 5]", "output": "def summation(arr): sum = 0 for i in arr: sum += i return sum print(summation(arr)) # Output: 36"} {"instruction": "Using python, implement a method to find the longest common subsequence in two strings", "input": "str1 = \"AGGTAB\" str2 = \"GXTXAYB\"", "output": "def lcs(str1, str2, n, m): if n == 0 or m == 0: return 0 elif str1[n-1] == str2[m-1]: return 1 + lcs(str1, str2, n-1, m-1) else: return max(lcs(str1, str2, n, m-1), lcs(str1, str2, n-1, m))"} {"instruction": "Design a data structure for efficiently finding the closest input to a given input in a set of inputs.", "input": "", "output": "An efficient data structure for finding the closest element to a given element in a set of elements is the KD Tree. The KD Tree is a space-partitioning data structure for organizing points in a k-dimensional space and taking advantage of their spacial locality. A KD Tree is a binary tree with each node containing a set of coordinates, or an element, and the corresponding subtree referring to elements closer to the coordinates of the current node in the tree. By recursively dividing the space into smaller parts, the search time for a specific element or coordinates can be significantly reduced, making finding the closest element a much faster process."} {"text": "[CS Wikipedia] Cesta do hlubin študákovy duše\n\nCesta do hlubin študákovy duše je česká filmová komedie režiséra Martina (Maca) Friče z roku 1939 natočená v prostředí českého gymnázia. Film ukazuje komické příhody vyplývající z různosti studentů (Ladislav Pešek, Rudolf Hrušínský, František Filipovský, Richard Strejka, Vladimír Salač), jejich zájmů a libůstek na jedné straně, a jejich pedagogů (Jaroslav Marvan, Jindřich Plachta, Miloš Nedbal, František Kreuzmann, František Vnouček) a zájmů a libůstek těchto na straně druhé. Základní údaje Námět: Jaroslav Žák Scénář: Martin Frič, Jaroslav Žák, Jan Kaplan Hudba: Roman Blahník Kamera: Ferdinand Pečenka Režie: Martin Frič Hrají: Ladislav Pešek, Rudolf Hrušínský, Jaroslav Marvan, Jindřich Plachta, František Filipovský, Vladimír Salač, Richard Strejka, Zbyšek Olšovský, Miloš Nedbal, Jaroslav Průcha, František Kreuzmann, Ferenc Futurista, František Vnouček, Antonín Novotný Další údaje: černobílý, 88 min, komedie Výroba: Elekta, 1939 Děj Profesor na zdejším gymnáziu, pan Rabiška (Jaroslav Průcha) už několik let zapisuje události, které se na škole odehrají a sbírá kuriózní předměty, které učitelé studentům při výuce zabaví. V septimě se sešly různé typy studentů: nadaný, ale pro učení špatný student Kulík (Ladislav Pešek), snaživý a podlézavý Mazánek (František Filipovský), premiantka třídy Chalupová (Jana Ebertová) a další. Septimán Vaněk (Rudolf Hrušínský), jenž je nadaný muzikant, ale učení mu moc nejde, přijde po špatném pololetním vysvědčení o klavír, který je prodán jeho otcem (Gustav Hilmar). Podle něj ho klavír odhání od učení. Na gymnázium nastoupí nový latinář a češtinář, profesor Petr Voříšek (František Vnouček), bývalý student profesora přírodopisu Matulky (Jindřich Plachta). Právě Matulku v hodině rozzlobí studentská klukovina, až se zhroutí. Všechny studenty jeho zhroucení zasáhne. Navíc zjistí, že kvůli trémě ještě nesložil státnice a proto je špatně placen. A tak vymyslí plán, jak mu pomoci. Pod záminkou nákupu hmyzí sbírky pro školu předvede výkon znalostí, jako nikdo jiný, což je uznáno jako státní zkouška. Štěstím zářící Matulka je ve velkém nadšení přivítán studenty. Rabiška do knihy může zapsat, že študák nemá jen duši, ale i srdce. Obsazení Jindřich Plachta - profesor přírodopisu Matulka Jaroslav Marvan - profesor matematiky Vobořil František Vnouček - profesor češtiny Petr Voříšek Miloš Nedbal - profesor francouzštiny Šeda Jaroslav Průcha - profesor fyziky Rabiška Ladislav Pešek - septimán Vojtěch Kulík Richard Antonín Strejka - septimán Antonín Peterka Související články Škola základ života – podobný film z roku 1938 Externí odkazy České filmové komedie Filmy z roku 1939 Československé černobílé filmy Filmy Martina Friče"} {"instruction": "Given a string, convert it to a list of words.", "input": "The quick brown fox jumped over the lazy dog", "output": "string = \"The quick brown fox jumped over the lazy dog\" words_list = string.split()"} {"text": "[EN Wikipedia] Alf Brown (footballer, born 1907)\n\nAlfred Brown (22 February 1907 – 1994) was an English professional footballer who played in the Football League for Mansfield Town, Northampton Town, Oldham Athletic. References 1907 births 1994 deaths English men's footballers Men's association football wing halves English Football League players Oldham Athletic A.F.C. players Northampton Town F.C. players Mansfield Town F.C. players People from Chadderton Footballers from Greater Manchester Sportspeople from the Metropolitan Borough of Oldham"} {"instruction": "Generate a script in Python that takes a list of numbers and prints out the smallest number in the list.", "input": "[5, 12, 3, 1, 8]", "output": "# Function to print the minimum number in a list \ndef min_in_list(list): \n # Inialise minimum to first element in the list \n min = list[0] \n \n # Traverse through the list from 1st index \n # and update minimum if found \n for i in range(len(list)): \n if list[i] < min: \n min = list[i] \n \n return min\n \n# Driver Code \nlist = [5, 12, 3, 1, 8] \nprint (\"Minimum in the list is \", min_in_list(list))"} {"instruction": "Write a Python program that multiplies all even numbers in a given list.", "input": "", "output": "def multiplyEvens(numbers):\n # Initialize result \n result = 1\n \n # Multiply all even elements \n for x in numbers: \n if x % 2 == 0: \n result = result * x \n return result \n \n# Driver code \nassert multiplyEvens([2, 3, 4, 5, 6]) == 48"} {"instruction": "Write MySQL code to create a table with the following columns", "input": "", "output": "CREATE TABLE table_name ( id INT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, age INT NOT NULL );"} {"instruction": "Default a neural network architecture to classify the handwritten digit from 0 to 9.", "input": "", "output": "# Define the architecture def model(input_shape): model = tf.keras.Sequential([ tf.keras.layers.Flatten(input_shape=input_shape), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dense(10, activation='softmax') ]) model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) return model"} {"instruction": "Calculate the total sum of a given list using an accumulator pattern.", "input": "numbers = [2, 3, 4]", "output": "numbers = [2, 3, 4] total_sum = 0 # iterate through the list and add each element to the total sum for n in numbers: total_sum += n print(total_sum)"} {"instruction": "Write a function that collects elements from two given arrays and creates a new array.", "input": "array1 = [1, 2, 3] array2 = [4, 5, 6]", "output": "def collect(array1, array2): result = array1 + array2 return result"} {"instruction": "Write a Python function to detect patterns in a sequence of numbers.", "input": "sequence = [8, 5, 6, 4, 9, 3, 7, 8, 5, 6, 4, 9]", "output": "def detect_patterns(sequence):\n distinct_numbers = set(sequence) # Distinct sequence numbers\n \n # Initialize variables\n count_flag = 0 # Number of instances for a certain consecutive sequence\n max_seq_len = 0 # Max length of a consecutive sequence\n max_seq_number = 0 # The number which had the max consecutive sequence\n \n # Loop through each distinct number to track its consecutive sequence \n for number in distinct_numbers:\n # Initialize flag variables\n current_count_flag = 0\n current_seq_len = 0\n \n # Begin tracking the number's consecutive sequence \n for num in sequence:\n if number == num:\n current_count_flag += 1\n current_seq_len += 1\n # Check if current count flag is greater than max count flag\n if current_count_flag > count_flag: \n count_flag = current_count_flag\n max_seq_len = current_seq_len\n max_seq_number = number\n \n # Return the maximum sequence length and corresponding number \n return max_seq_len, max_seq_number"} {"instruction": "Write a Python program to randomly select a number of elements from a list without any repeat", "input": "[1,2,3,4,5]", "output": "import random\n\ndef random_select(arr, k):\n new_arr = random.sample(arr,k)\n return new_arr"} {"instruction": "Rewrite the code to be more concise and efficient.", "input": "def find_min(arr): min_val = float('inf') for i in arr: if i < min_val: min_val = i return min_val", "output": "def find_min(arr): return min(arr)"} {"instruction": "Create a program that takes in a numeric value, X, and prints all the positive divisors of that number.", "input": "X = 8", "output": "def print_divisors(x): divisors = [] for i in range(1, x + 1): if(x % i == 0): divisors.append(i) print(divisors)"} {"instruction": "How to reverse a list in C++?", "input": "", "output": "You can reverse a list in C++ using the std::reverse algorithm. To reverse the list, pass the list as the first parameter and the beginning and end of the list as the second and third parameter, respectively. Alternatively, you can also reverse the list using a for loop and the operator [] to access each element of the list."} {"instruction": "Create a program in python to fulfill the following requirement:", "input": "Given a binary tree, print it in level order (also known as breadth-first search).", "output": "def levelOrder(node): \n # Base Case \n if node is None: \n return\n \n # Create an empty queue for level order tarversal \n queue = [] \n \n # Enqueue Root and initialize height \n queue.append(node) \n \n while(len(queue) > 0): \n # Print front of queue and remove it from queue \n print(queue[0].data), \n node = queue.pop(0) \n \n #Enqueue left child \n if node.left is not None: \n queue.append(node.left) \n \n # Enqueue right child \n if node.right is not None: \n queue.append(node.right)"} {"text": "[DE Wikipedia] Byhleguhrer See\n\nDer Byhleguhrer See, , ist ein natürlich entstandener See im gleichnamigen Naturschutzgebiet in der Gemeinde Byhleguhre-Byhlen im Landkreis Dahme-Spreewald in Brandenburg. Der See ist Teil des Biosphärenreservats Spreewald. Der See liegt nördlich von Byhleguhre und südwestlich von Byhlen. Neben dem See befindet sich die Siedlung Am See. Südwestlich des Sees liegt die Landesstraße 51 und nördlich die Kreisstraße 6108. Östlich schließt sich die Lieberoser Heide an den See an. Der Zufluss erfolgt über den Byhleguhrer Seegraben, der zum Flusssystem der Spree gehört. Der Byhleguhrer See ist Teil des gleichnamigen FFH-Gebietes. An seiner längsten Stelle hat der Byhleguhrer See eine Länge von etwa 1590 Metern, die maximale Breite des Sees beträgt etwa 560 Meter. Der Byhleguhrer See hat einen Umfang von 4199 Metern, die Fläche liegt bei 82,1619 ha. Der See weist flächendeckend eine vergleichsweise geringe Tiefe von höchstens 2,00 Metern auf. Siehe auch Liste der Seen in Brandenburg Einzelnachweise See in Brandenburg Gewässer im Landkreis Dahme-Spreewald Geographie (Spreewald) Byhleguhre-Byhlen SByhleguhrer"} {"instruction": "Write code to find the longest word in the given list and output it.", "input": "words_list = [\"apple\", \"mango\", \"banana\", \"blueberry\"]", "output": "def find_longest_word(lst): longest_word = \"\" for word in lst: if len(word) > len(longest_word): longest_word = word return longest_word"} {"instruction": "Change the following Java code to Swift.", "input": "public static int addTwoIntegers(int a, int b) { return a+b; }", "output": "func addTwoIntegers(a: Int, b: Int) -> Int { return a + b }"} {"instruction": "How would you design a system to store and access the stored data when a user makes a request?", "input": "", "output": "To design a system to store and access the stored data when a user makes a request, we could use a client-server model, where the server provides the user with the requested data. The server would use a database to store the data, and when a user makes a request, the server would retrieve the requested data from the database and send it back to the user."} {"instruction": "Implement an algorithm in Python to find the GCD (Greatest Common Divisor) of two numbers", "input": "", "output": "def gcd(a, b): if (a == 0): return b if (b == 0): return a if (a == b): return a if (a > b): return gcd(a-b, b) return gcd(a, b-a)"} {"instruction": "Create an AI agent in Python that learns to play Tetris and maximizes its score.", "input": "Not applicable", "output": "import gym\nimport numpy as np\n\nfrom stable_baselines.common.policies import MlpPolicy\nfrom stable_baselines.common.vec_env import DummyVecEnv\nfrom stable_baselines import PPO2\n\n# Training hyperparameters\nn_timesteps = 500000\n\n# Create the environment\nenv = gym.make('Tetris-v0')\nenv = DummyVecEnv([lambda: env])\n\n# Create the agent\nmodel = PPO2(MlpPolicy, env, n_timesteps=n_timesteps)\n\n# Train the agent\nmodel.learn(total_timesteps=n_timesteps)\n\n# Test the agent\nenv.reset()\nstate, done = env.reset(), False\ntotal_reward = 0\n\nwhile not done:\n action, _states = model.predict(state)\n state, reward, done, info = env.step(action)\n total_reward += reward # accumulate the reward\n\nprint('Total Reward: ', total_reward)"} {"instruction": "Debug the following code for finding the median of three numbers.", "input": "def find_median(a, b, c): if a > b: if b > c: return b elif a > c: return c else: return a elif b > c: return b elif a > c: return a else: return c", "output": "def find_median(a, b, c): # Calculate the maximum of the three numbers max_num = max(a, b, c) # Calculate the minimum of the three numbers min_num = min(a, b, c) # Calculate the median value as the sum of the three numbers minus the maximum and minimum median = a + b + c - max_num - min_num return median median_value = find_median(2, 3, 5) print(median_value) # 3"} {"instruction": "Implement a neural network for regression", "input": "", "output": "import tensorflow as tf # create input layer inputs = tf.keras.Input(shape=(2,)) # create the first layer of the network with 16 neurons fc1 = tf.keras.layers.Dense(16, activation=\"relu\")(inputs) # create the second layer of the network with 8 neurons fc2 = tf.keras.layers.Dense(8, activation=\"relu\")(fc1) # create the output layer of the network with 1 neuron (for regression) outputs = tf.keras.layers.Dense(1, activation=\"sigmoid\")(fc2) # create the model and compile it. model = tf.keras.Model(inputs=inputs, outputs=outputs) model.compile(optimizer='Adam', loss='mse')"} {"text": "[EN Wikipedia] Muscari macrocarpum\n\nMuscari macrocarpum is a perennial bulbous flowering plant in the asparagus family Asparagaceae. It is one of a number of species known as Grape Hyacinth, in this case Yellow Grape Hyacinth. Originally from eastern Crete, Amorgos and south-west Turkey, where it grows in rocky places, it is sometimes grown as an ornamental plant. M. macrocarpum resembles M. racemosum (with which it has been placed in the Muscarimia group of the genus Muscari). It is a robust plant, with large bulbs which have thick fleshy roots. Each bulb produces several greyish-green leaves. Flowers are borne in a spike or raceme on a stem 10–15 cm high. Individual flowers are may be over 1 cm long, violet in bud and yellow when fully open; they have a distinct scent resembling bananas. Cultivars include 'Golden Fragrance'. References macrocarpum Plants described in 1827"} {"instruction": "Write a short class in Python that will print a custom message when created.", "input": "", "output": "class CustomMessage: def __init__(self): print(\"This is a custom message!\")"} {"instruction": "Write a PHP script to fetch data from an API.", "input": "", "output": " \"http://path.to/api/\", CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array(\"Content-type: application/json\") )); //Execute cURL $response = curl_exec($curl); //Close cURL curl_close($curl); //Decode the response $data = json_decode($response); //Do something with the data foreach ($data as $obj) { echo $obj->name; echo $obj->price; } ?>"} {"instruction": "Create a Node.js server that responds with \"Hello World!\" when the URL \"/\" is accessed.", "input": "", "output": "const http = require('http'); const server = http.createServer(function (req, res) { if(req.url == '/'){ res.writeHead(200); res.end('Hello World!'); } }); server.listen(3000);"} {"instruction": "Find any two numbers in an array such that their sum is equal to a given value.", "input": "array = [3, 4, 5, 6, 7, 8] value = 11", "output": "for i in range(len(array)): for j in range(i+1, len(array)): if array[i] + array[j] == value: print(array[i], array[j])"} {"text": "[CS Wikipedia] Oblastní hokejové soutěže 1955/1956\n\nČeskoslovenské oblastní soutěže ledního hokeje 1955/1956 byla třetí nejvyšší hokejovou soutěží na území Československa. Systém soutěže Soutěž se měla skládat ze 6 skupin po 4 účastnících. Ve skupinách se všechny kluby utkaly každý s každým (celkem 6 kol). Vítězové jednotlivých skupin se následně utkaly ve 2 skupinách o postup do Celostátní soutěže (postoupil vždy nejlepší ze dvou skupin). Nejhorší tým z každé skupiny sestoupil do krajského přeboru. Tabulky nejsou úplné. Skupina A Skupina B Skupina C Skupina D DSO Spartak Hradec Králové \"B\" sestoupil z důvodu sestupu A-týmu do Oblastní soutěže. Skupina E Skupina F Kvalifikace o 2. ligu Skupina A Skupina B Týmy DSO Spartak Olomouc Moravia a DSO Jiskra Litvínov SZ postoupily do 2. ligy Externí odkazy Historie československého a českého hokeje hockeyarchives.info Přehled sezón Reference Lední hokej v roce 1950 Lední hokej v roce 1951"} {"instruction": "Edit a JavaScript function to perform an action based on another action in the code.", "input": "function myFunction(arr) { return arr.reverse(); }", "output": "function myFunction(arr) { arr.reverse(); return arr; }"} {"instruction": "Create a TensorFlow program to implement a multi-layer neural network", "input": "", "output": "import tensorflow as tf # create the model model = tf.keras.models.Sequential() # add layers to the model model.add(tf.keras.layers.Dense(128, activation='relu')) model.add(tf.keras.layers.Dense(64, activation='relu')) model.add(tf.keras.layers.Dense(32, activation='relu')) model.add(tf.keras.layers.Dense(16, activation='relu')) model.add(tf.keras.layers.Dense(8, activation='sigmoid')) model.add(tf.keras.layers.Dense(4, activation='softmax')) # compile the model model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])"} {"instruction": "Using the Java collections API, create a data structure such as a HashMap to store key-value pairs.", "input": "", "output": "import java.util.HashMap; HashMap myMap = new HashMap<>(); // adding key-value pairs to the HashMap myMap.put(\"Key1\", 5); myMap.put(\"Key2\", 8); myMap.put(\"Key3\", 10); // retrieving values by keys int val1 = myMap.get(\"Key1\"); int val2 = myMap.get(\"Key2\"); int val3 = myMap.get(\"Key3\"); // etc."} {"instruction": "Create a function to print out the Fibonacci numbers starting from 0 to the nth number.", "input": "n = 7", "output": "def print_fibonacci(n): a = 0 b = 1 for i in range(n): print(a, end=' ') temp = a a = b b = temp + b # The output of the function would be # 0 1 1 2 3 5 8"} {"instruction": "Which sorting algorithm should you use for a nearly sorted array?", "input": "", "output": "For a nearly sorted array, insertion sort is the best sorting algorithm because it only shifts elements up to one position and has a best-case time complexity of O(n) which makes it suitable for nearly sorted arrays."} {"text": "[DE Wikipedia] Liste der Wappen im Kreis Nordfriesland\n\nDiese Liste zeigt die Wappen des Kreises Nordfriesland (Schleswig-Holstein) mit seinen Städten, Gemeinden und Ämtern. Kreiswappen Amtsfreie Städte und Gemeinden Ämter Amt Eiderstedt Amt Föhr-Amrum Amt Landschaft Sylt Amt Mittleres Nordfriesland Amt Nordsee-Treene Amt Pellworm Amt Südtondern Amt Viöl Ehemalige Ämter Ehemalige Gemeinden Blasonierungen Literatur Martin Reißmann: Die Wappen der Kreise, Ämter, Städte und Gemeinden in Schleswig-Holstein / bearb. von Martin Reißmann unter Mitw. von Uta Heß. Husum: Husum; Schleswig: Landesarchiv Schleswig-Holstein, 1997 (Veröffentlichungen der Schleswig-Holsteinischen Landesarchivs; 49) Hans Schlothfeldt: Schleswig-Holsteinische Kreis- und Ortswappen Neumünster: Wachholtz, 1964 (Hrsg.: Der Schleswig-Holsteinische Heimatbund e. V.) Klemens Stadler: Deutsche Wappen – Bundesrepublik Deutschland, Band 5 – Die Gemeindewappen der Bundesländer Niedersachsen und Schleswig-Holstein Bremen: Angelsachsen, 1970 Weblinks Landesarchiv Schleswig-Holstein Kommunale Wappenrolle Schleswig-Holstein Nordfriesland Wappen Nordfriesland Wappen Nordfriesland"} {"instruction": "Create a Python program to generate a random password which satisfies the following criteria: \n• Must contain 8 – 16 characters. \n• Must contain upper and lowercase letters, numbers, and special characters such as *, #, @, etc", "input": "", "output": "import random \nimport string\n\ndef generate_random_password(length):\n # String of characters to choose from\n chars = string.ascii_letters + string.digits + '!@#$%^&*()'\n # Randomly choose 4 characters from the list of characters\n random_chars = ''.join(random.choice(chars) for i in range(length)) \n # Generate password\n password = ''.join(random.sample(random_chars, length))\n return password"} {"text": "[CS Wikipedia] Roger Bernard\n\nRoger Bernard (10. srpna 1907 – 10. srpna 1997) byl francouzský spisovatel a stylista. Psal v esperantu, jeho původní díla jsou básně Almenaŭ bukedeto a další původní dílo Raymond Schwartz, lia vivo kaj verkaro. Dále přeložil Bela la indiferentulo a Homa voĉo od Jeana Cocteaua, a komedie La ŝipego tenacity od Charlese Vildraca a Topaze od M. Pagnola. Od J. P. Sartra přeložil La naŭzo, sen eliro a La respektema P. Související články Esperantská literatura Francouzští spisovatelé 20. století Francouzští esperantisté Narození v roce 1907 Úmrtí v roce 1997 Muži"} {"instruction": "Create a C# method that takes a string and counts the number of times a given character appears.", "input": "\"Mississippi\", 'i'", "output": "public static int countCharacter(string text, char character) { int count = 0; foreach (char c in text) { if(c == character) { count++; } } return count; }"} {"text": "[HI Wikipedia] हँस\n\nहंस एक पक्षी का नाम है। हंस पक्षी देखें। हंस जिसके संपादक राजेन्द्र यादव हैं। हंस ऐतिहासिक पत्रिका जिसके संपादक प्रेमचंद थे।"} {"instruction": "Write a Python program to add two matrices.", "input": "matrix1 = [[3, 5], [6, 2]] matrix2 = [[1, 2], [3, 4]]", "output": "def add_matrices(mat1, mat2): \"\"\" This function takes two 2D matrices and adds them, returning a new 2D matrix. \"\"\" output = [] for i in range(len(mat1)): row_m1 = mat1[i] row_m2 = mat2[i] row_sum = [] for j in range(len(row_m1)): row_sum.append(row_m1[j] + row_m2[j]) output.append(row_sum) return output result = add_matrices(matrix1, matrix2)"} {"instruction": "Create a Python program that accepts an integer and displays its factorial.", "input": "num=5", "output": "def factorial(num):\n result = 1\n for i in range(1, num+1):\n result *= i\n return result\n\nn = int(input(\"Enter an Integer: \"))\nprint(factorial(n))"} {"instruction": "Write a Node.js program to create a server.", "input": "", "output": "const http = require('http'); const hostname = '127.0.0.1'; const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World\\n'); }); server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`); });"} {"text": "[CS Wikipedia] Socialistická republika Slovinsko\n\nSocialistická republika Slovinsko (zkráceně SR Slovinsko; slovinsky Socialistična republika Slovenija, SR Slovenija) byla socialistickou republikou, jež byla součástí Socialistické federativní republiky Jugoslávie. Součástí AVNOJské Jugoslávie se země stala v roce 1944. 25. června 1991 vyhlásilo Slovinsko samostatnost, která byla Brionskou deklarací odložena o tři měsíce. Vývoj názvu 1945 – 14. února 1946: Federální (jednotka) Slovinsko () jako součást Demokratické federativní Jugoslávie 14. února 1946 – 9. dubna 1963: Lidová republika Slovinsko () jako součást Demokratické federativní Jugoslávie, resp. Federativní lidové republiky Jugoslávie 9. dubna 1963 – 7. března 1990: Socialistická republika Slovinsko () jako součást Socialistické federativní republiky Jugoslávie 7. března 1990 – 25. června/8. října 1991: Republika Slovinsko jako součást Socialistické federativní republiky Jugoslávie Historie V září 1943 se Antifašistická rada národního osvobození Jugoslávie usnesla o obnovení Jugoslávie na federálním základě. Jednou z federálních jednotek se mělo stát i Slovinsko. Od počátku roku 1944 se začali komunisté připravovat na převzetí politické moci v poválečném Slovinsku. Aby se zabránilo návratu vícestranického systému, bylo rozhodnuto o vytvoření lidové vlády, jež bude právě pod vedením komunistů. 19. února 1944 se v Črnomelju Slovinský národněosvobozenecký výbor přejmenoval na Slovinskou národněosvobozeneckou radu a současně se prohlásil za nejvyšší zákonodárný a zastupitelský orgán ve Slovinsku. V roce 1945 bylo Slovinsko poprvé v historii uznáno za státní útvar. V roce 1947 získalo Slovinsko část západních území, která po první světové válce připadla Itálie. V roce 1954 pak bylo mezi Itálii a Jugoslávii rozděleno i sporné území v okolí Terstu. Slovinsko v rámci jugoslávské federace bylo nejprve lidovou republikou a od roku 1963 socialistickou. V průběhu šedesátých let se začaly objevovat rozpory s centrem (např. Silniční aféra), které skončily odstavením reformních komunistů (Stane Kavčič) a upevněním pozic konzervativců. Rozklad Jugoslávie začal smrtí maršála Tita v květnu 1980. Na jaře 1987 vyšlo další číslo časopisu , v němž byly zveřejněny příspěvky France Bučara, Petera Jambreka, Tine Hribara, Ivana Urbančiče a Jože Pučnika, ve kterých napadli vedoucí úlohu komunistů, centralistické vedení jugoslávské politiky a formulovali cíl slovinského národa, kterým má být samostatný slovinský stát jako součást jugoslávské konfederace. Přišli s názorem, že Jugoslávie omezuje jak ekonomický, tak i kulturní, či politický rozvoj Slovinska. Následný demokratizační proces prováděný především formou ústavních dodatků realizovali sami slovinští komunisté. V květnu 1989 zveřejnila slovinská opozice Májovou deklaraci, v níž požadovala ustavení suverénního…"} {"instruction": "Create a program to print a binary tree in reverse level order.", "input": "", "output": "# Python program to print reverse level \n# order traversal\n \n# Binary Tree Node\nclass Node: \n def __init__(self, data): \n self.data = data\n self.left = None\n self.right = None\n \n#reverse Level Order Traversal \ndef reverseLevelOrder(root): \n # Base Case \n if root is None: \n return\n \n # Create an empty queue for level order \n # traversal \n q = []\n \n # Enqueue Root and initialize height \n q.append(root) \n \n # Loop while there is at least one \n # discovered node \n while(len(q) > 0): \n # Print front of queue and remove it from queue \n print(q[len(q)-1].data) \n node = q.pop(len(q)-1) \n \n # Insert right child first \n if node.right is not None: \n q.append(node.right) \n \n # Insert left child \n if node.left is not None: \n q.append(node.left) \n \n#Driver Program\nroot = Node(1)\nroot.left = Node(2)\nroot.right = Node(3)\nroot.left.left = Node(4)\nroot.left.right = Node(5)\n \n# Function Call \nreverseLevelOrder(root)"} {"text": "[EN Wikipedia] Motor neuron diseases\n\nMotor neuron diseases or motor neurone diseases (MNDs) are a group of rare neurodegenerative disorders that selectively affect motor neurons, the cells which control voluntary muscles of the body. They include amyotrophic lateral sclerosis (ALS), progressive bulbar palsy (PBP), pseudobulbar palsy, progressive muscular atrophy (PMA), primary lateral sclerosis (PLS), spinal muscular atrophy (SMA) and monomelic amyotrophy (MMA), as well as some rarer variants resembling ALS. Motor neuron diseases affect both children and adults. While each motor neuron disease affects patients differently, they all cause movement-related symptoms, mainly muscle weakness. Most of these diseases seem to occur randomly without known causes, but some forms are inherited. Studies into these inherited forms have led to discoveries of various genes (e.g. SOD1) that are thought to be important in understanding how the disease occurs. Symptoms of motor neuron diseases can be first seen at birth or can come on slowly later in life. Most of these diseases worsen over time; while some, such as ALS, shorten one's life expectancy, others do not. Currently, there are no approved treatments for the majority of motor neuron disorders, and care is mostly symptomatic. Signs and symptoms Signs and symptoms depend on the specific disease, but motor neuron diseases typically manifest as a group of movement-related symptoms. They come on slowly, and worsen over the course of more than three months. Various patterns of muscle weakness are seen, and muscle cramps and spasms may occur. One can have difficulty breathing with climbing stairs (exertion), difficulty breathing when lying down (orthopnea), or even respiratory failure if breathing muscles become involved. Bulbar symptoms, including difficulty speaking (dysarthria), difficulty swallowing (dysphagia), and excessive saliva production (sialorrhea), can also occur. Sensation, or the ability to feel, is typically not affected. Emotional disturbance (e.g. pseudobulbar affect) and cognitive and behavioural changes (e.g. problems in word fluency, decision-making, and memory) are also seen. There can be lower motor neuron findings (e.g. muscle wasting, muscle twitching), upper motor neuron findings (e.g. brisk reflexes, Babinski reflex, Hoffman's reflex, increased muscle tone), or both. Motor neuron diseases are seen both in children and adults. Those that affect children tend to be inherited or familial, and their symptoms are either present at birth or appear before learning to walk. Those that affect adults tend to appear after age 40. The clinical course depends on the specific disease, but most progress or worsen over the course of months. Some are fatal (e.g. ALS), while others are not (e.g. PLS). Patterns of weakness Various patterns of…"} {"instruction": "Create a class in C++ to store the rolling average of a stream of numbers.", "input": "", "output": "class RollingAverage { private: int windowSize; int currentIndex; double total; std::vector data; public: RollingAverage(int windowSize) : windowSize(windowSize) , currentIndex(0) , total(0.0) , data(windowSize) { for (int i = 0; i < windowSize; ++i) { data.push_back(0.0); } } void add(double value) { int prevIndex = (currentIndex - 1 + windowSize) % windowSize; total -= data[prevIndex]; total += value; data[currentIndex] = value; currentIndex = (currentIndex + 1) % windowSize; } double getAverage() { return total / windowSize; } };"} {"instruction": "Design a function in Python to find the most repeated character in a string.", "input": "my_string=\"Hello world\"", "output": "def most_repeated_character(my_string):\n counts = Counter(my_string)\n max_char = max(counts, key=counts.get)\n return max_char\n\nprint(\"Most repeated character:\", most_repeated_character(my_string))"} {"instruction": "Design and implement a Bubble Sort algorithm for sorting an array of numbers in Python.", "input": "[64, 34, 25, 12, 22, 11, 90]", "output": "def bubble_sort(l):\n for i in range(len(l)):\n for j in range(0, len(l)-i-1):\n if l[j] > l[j+1]:\n l[j], l[j+1] = l[j+1], l[j]\n\n# Test code\nl = [64, 34, 25, 12, 22, 11, 90]\nbubble_sort(l)\nprint(l)"} {"instruction": "Write a shell command to switch to a given directory", "input": "Dirpath=/Users/username/Documents", "output": "cd /Users/username/Documents"} {"instruction": "Create a class in Python that calculates the total and average of 3 numbers.", "input": "", "output": "class Calculator:\n def __init__(self, num1, num2, num3):\n self.num1 = num1\n self.num2 = num2\n self.num3 = num3\n\n def total(self):\n return self.num1 + self.num2 + self.num3\n\n def average(self):\n return self.total() / 3"} {"instruction": "Create a recursive algorithm to sum the numbers between 1 and n (inclusive).", "input": "n = 5", "output": "function recSum(n) { if (n === 1) return 1; return n + recSum(n-1); } // Usage console.log(recSum(5)); // 15"} {"instruction": "Create a program to subtract the two numbers from the following input.", "input": "first_num = 4 second_num = 2", "output": "first_num = 4 second_num = 2 # Program to subtract two numbers diff = first_num - second_num print(f\"The difference between {first_num} and {second_num} is {diff}.\")"} {"instruction": "Using any programming language, write a program which takes a number as an input and outputs the first two prime numbers after it.", "input": "7", "output": "def find_next_prime_numbers(num): \"\"\"This function takes a number as an input and returns the first two prime numbers after it\"\"\" prime_numbers = [] # Increment num to the first prime number while not is_prime(num): num += 1 # Append num to prime_numbers (first prime after input) prime_numbers.append(num) # Increment num to the second prime number num += 1 while not is_prime(num): num += 1 # Append num to prime_numbers (second prime after input) prime_numbers.append(num) # Return the list of prime numbers return prime_numbers def is_prime(num): \"\"\"Returns True if number is prime\"\"\" if num <= 1: return False for i in range(2, num): if num % i == 0: return False return True print(find_next_prime_numbers(7)) # Output: [11, 13]"} {"text": "[HI Wikipedia] माथेरान\n\nमाथेरान (Matheran) भारत के महाराष्ट्र राज्य के रायगढ़ ज़िले की कर्जत तालुका में स्थित एक नगर और हिल स्टेशन है। परिचय माथेरान मुंबई से मात्र ११० किलोमीटर दूर प्राकृतिक खूबसूरती से भरा छोटा-सा हिल स्टेशन है। यह पश्चिमी घाट पर्वत शृंखला में समुद्र तल से ८०० मीटर (२६२५ फीट) की उँचाई पर बसा है। मुंबई और पुणे से इसकी दूरी क्रमशः ९० और १२० किलो मीटर है। बड़े शहरोंसे इसकी निकटता के कारण माथेरान शहरी नागरिकों के लिए एक सप्ताहांत बिताने के लिए लोकप्रिय स्थल है। यहाँ की खासियत है कि यहां किसी भी प्रकार के वाहन का प्रवेश वर्जित है। मुंबई, पुणे, नाशिक और सूरत के लोगों की तो यह पसंदीदा जगह है ही लेकिन अब उत्तर और दक्षिण भारत के लोगों को भी यह स्थान अपनी ओर आकर्षित करने लगा है। समुद्र तल से ८०० मीटर की ऊँचाई पर स्थित देश के इस सबसे छोटे हिल स्टेशन की खोज मई १८५० में ठाणे जिले के कलेक्टर ह्यूज पोयन्ट्‌स मलेट ने की थी। मुंबई के तत्कालीन गवर्नर लॉर्ड एल्फिंस्टोन ने यहां भविष्य के हिल स्टेशन की नींव रखी और गर्मी के दिनों में वक्त गुजारने की दृष्टि से इसे विकसित किया गया। माथेरान का शाब्दिक अर्थ होता है माथे (पर्वत के) पर स्थित अरन्य। माथेरान का सबसे नजदीकी रेलवे स्टेशन नेरल स्टेशन है, जो यहां से ९ किलोमीटर दूर है। इसके आगे वाहनों का प्रवेश वर्जित है। आगे जाने के लिए या तो पैदल जाना होगा, या बग्गी, रिक्शे या घोड़ों का प्रयोग करना होगा। लेकिन यहां पहुंचने का सबसे अच्छा साधन है यहां की टॉय ट्रेन जिसके हाल ही में १०० साल पूरे हुए हैं। पहाड़ों पर चढ़ती उतरती इस ट्रेन में बैठकर ढाई घंटे की यात्रा में खूबसूरत प्राकृतिक नजारों का आनंद उठाया जा सकता है। इसके अलावा ट्रॉली से भी यहां तक पहुंचा जा सकता है। यहाँ साल भर पर्यटकों का तांता लगा रहता है और मॉनसून यहाँ आने का सबसे अच्छा मौसम है। उस समय घाटियों में फैला कोहरा, हवा में तैरते बादल और भीगा-भीगा मौसम होते हैं। माथेरान में प्राकृतिक नजारों का आनंद लेने के लिए ३८ दृश्य बिंदु (व्यू पॉइंट्‌स) हैं। इसके अलावा माउंट बेरी और शारलॉट लेक भी यहां के मुख्य आकर्षण हैं। माउंट बेरी से नेरल से आती हुई ट्रेन का दृश्य देखा जा सकता है। शारलॉट लेक के दायीं ओर पीसरनाथ का प्राचीन मंदिर है। वहीं बायीं और दो पिकनिक स्पॉट लुईस पॉइंट और इको पॉइंट हैं। हनीमून पॉइंट पर रस्सी के द्वारा घाटी को पार करने का साहसिक और रोमांचक कार्य का भी अनुभव यहां किया जा सकता है। इसके अलावा एलेक्जेंडर पॉइंट, रामबाग पॉइंट, लिटिल चौक पॉइंट, चौक पॉइंट, वन ट्री हिल पॉइंट, ओलंपिया रेसकोर्स, लॉर्डस पॉइंट, सेसिल पॉइंट, पनोरमा पॉइंट इत्यादि अनेक स्थानों पर पर्यटक आते हैं। माथेरान में पनोरमा पॉइंट सहित लगभग ३६ पूर्व निस्चित लुक-आउट पायंट्स हैं जहाँ से सारे क्षेत्र के अलावा नेरल शाहर का भी विहंगम दृश्य प्राप्त कर सकते है। पनोरमा पॉइंट से सूर्योदय और सूर्यास्त देखा जा सकता है। लूयीसा पॉइंट के प्रबल फ़ोर्ट का सुस्पष्ट दर्शन होता है। वन ट्री हिल पॉइंट, हार्ट पॉइंट, मंकी पॉइंट, पोर्क्युपाइन पॉइंट, रामबाघ पॉइंट इत्यादि यहाँ के अन्य मुख्य पॉइंट हैं। इतिहास माथेरान की खोज १८५० में थाने जिले के तत्कालीन डिस्ट्रिक्ट कलेक्टर ह्यू पायंट्ज़ मेल्ट द्वारा की गयी थी। उस समय के बंबई के गवर्नर…"} {"instruction": "Which CSS style would you use to center align a
    element?", "input": "", "output": "div { margin: 0 auto; }"} {"instruction": "Write an SQL query to update the column 'name' to 'John' in the table 'employees'.", "input": "", "output": "UPDATE employees SET name = 'John';"} {"instruction": "Compute the sum of two integers without using the \"+\" operator.", "input": "x = 5 y = 7", "output": "sum = x ^ y + (x & y) << 1 # using bitwise operators"} {"instruction": "Perform a linear search in a list named 'mylist' and return the index of the first occurrence of a target value.", "input": "mylist = [1, 2, 3, 4, 5, 6, 7] target = 4", "output": "def linear_search(mylist, target): for i in range(len(mylist)): if mylist[i] == target: return i return -1"} {"instruction": "Write a SQL query that selects a specific name from user table.", "input": "User table has columns (id, name, age)", "output": "SELECT name FROM user WHERE id = "} {"text": "[CS Wikipedia] Amerika\n\nAmerika je souvislá pevnina na Zemi, která se skládá ze tří patrných částí – Severní Ameriky, Střední Ameriky a Jižní Ameriky. Severní a Jižní Amerika jsou považovány za dva samostatné kontinenty, zatímco Střední Amerika je považována za součást kontinentu Severní Ameriky. Z geomorfologického hlediska je Amerika jako celek souvislou pevninskou masou, která se nachází na třech litosférických deskách – Severoamerické, Karibské (Středoamerické) a Jihoamerické. Celé území Ameriky leží na západní polokouli a zároveň na jižní i severní zemské polokouli. Tradičním datem objevení Ameriky Evropany je rok 1492, kdy k břehům tohoto světadílu pod španělskými vlajkami přirazila flotila vedená Kryštofem Kolumbem. Z Evropy však s velkou pravděpodobností vstoupil na americkou půdu jako první Viking Leif Erikson kolem roku 1000. Z fyzicko-geografického hlediska se rozlišuje Severní, Střední a Jižní Amerika, které od sebe dělí Tehuantepecká, resp. Panamská šíje. Západní pobřeží Ameriky omývá Tichý oceán, východní Atlantský oceán, na severu světadíl zasahuje též do Severního ledového oceánu. Amerika pokrývá 8,3 % povrchu Země (28,4 % pevniny, 42,5 milionů km²) a žije v ní okolo 13 % lidské populace (1002 milionů). Název Po objevení Ameriky Kolumbem se nově nalezenému světadílu začalo říkat Nový svět. Dnešní název je odvozen od jména italského obchodníka a mořeplavce Ameriga Vespucciho, který mezi lety 1499 a 1502 podnikl dvě plavby podél východního pobřeží Jižní Ameriky. Německý kartograf Martin Waldseemüller vydal roku 1507 mapu světa, v níž nově objevený kontinent (Jižní Ameriku) nazval podle Vespucciho křestního jména – America (Severní Ameriku Waldseemüllerova mapa označuje jako Parias). Tento akt vyvolal protesty veřejnosti, že se Vespucci snaží uzurpovat Kolumbovi jeho prvenství. Vespucci však – jak se později ukázalo z dobové korespondence – označení Amerika nijak neprosazoval. Totéž označení pro Severní Ameriku se vyskytuje prvně až na mapě (Gerhard Mercator) roku 1538. Dějiny Dějiny Ameriky začínají s příchodem prvních obyvatel z Asie, resp. možná i Oceánie, který se odehrál v několika vlnách. Kdy na půdě kontinentu stanuli první lidé, je ovšem předmětem sporů. Prakticky všichni akceptují existenci migrační vlny předků dnešních Indiánů probíhající okolo 13 500 let př. n. l., avšak někteří vědci se domnívají, že nebyla první. Za pravděpodobně prvního evropského objevitele Ameriky se považuje norský viking Leifr Eiríksson, který tak měl učinit kolem roku 1000. Italové americkou půdu znali patrně již ve 14. století pod názvem Markland či Marckalada. Roku 1492 přistál u břehů Ameriky italský mořeplavec Kryštof Kolumbus (Cristóbal Colón). Krátce poté španělští conquistadoři (dobyvatelé) Hernán Cortés a Francisco Pizarro vyvrátili říše Aztéků a Inků, jejichž území…"} {"instruction": "Create a class in Python that implements the __len__ method to return the length of a given string.", "input": "", "output": "class StringLength: def __len__(self, string): return len(string)"} {"instruction": "Write a query in MySQL to display the top 3 highest salaries.", "input": "", "output": "SELECT salary FROM employees ORDER BY salary DESC LIMIT 3"} {"text": "[DE Wikipedia] William Stukeley\n\nWilliam Stukeley, FRS, FRCP, FSA, (* 7. November 1687 in Holbeach, Lincolnshire; † 3. März 1765 in London) war ein britischer Altertumsforscher („Antiquar“) aus Yorkshire. Leben Er wurde in Stukeley Hall in Holbeach in Lincolnshire als Sohn eines Rechtsanwalts geboren. Er erhielt seinen M. B. von Corpus Christi College, Cambridge und studierte anschließend Medizin am St Thomas’ Hospital in London. 1710 gründete er eine Praxis in Boston, Lincolnshire, siedelte aber 1717 nach London über. 1717 wurde er zum Mitglied der Royal Society gewählt, 1718 zum Mitglied der Society of Antiquaries of London, deren Schriftführer er neun Jahre lang war. 1719 erhielt er den M. D. und 1720 wurde er Mitglied des Royal College of Physicians. Stukeley war ein Freund von Isaac Newton und veröffentlichte 1752 dessen Biographie. Auf diese geht die berühmte, später ausgeschmückte Apfelanekdote zurück. Stukeley berichtet in Memoirs of Sir Isaac Newton's life von einem Gespräch mit Newton im Jahr 1722: Nach dem Abendessen, das Wetter war warm, gingen wir in den Garten und tranken Tee im Schatten einiger Apfelbäume, nur er und ich. Mitten in einem anderen Diskurs, sagte er mir, habe er sich gerade in der gleichen Situation befunden, als ihm die Idee der Gravitation in den Sinn kam. „Warum sollte dieser Apfel immer senkrecht zu Boden fallen“, dachte er bei sich selbst: Anlass war der Fall eines Apfels, als er in nachdenklicher Stimmung war: „Warum sollte er nicht seitwärts oder aufwärts gehen, sondern beständig zum Erdzentrum? Sicher, der Grund ist, dass die Erde ihn anzieht, es muss eine Anziehungskraft der Materie geben, und die Summe der Anziehungskraft der Materie der Erde muss im Erdzentrum liegen, nicht an irgendeiner Seite. Deshalb fällt dieser Apfel senkrecht oder gegen das Zentrum, wenn Materie Materie anzieht, muss sie proportional zu ihrer Quantität sein, darum zieht der Apfel die Erde und die Erde den Apfel an.“ Methoden Stukeley führte Ausgrabungen durch, er scheint dabei als erster Profile angelegt und dokumentiert zu haben. Er beschrieb und dokumentierte den Stonehenge-cursus und interpretierte ihn als römische Wagenrennbahn. Zwar zeigen seine Zeichnungen ein gerades Ende, doch beschreibt er es als konvex, „wie das Ende eines römischen Zirkus’“. Das Langbett am Ende des Cursus interpretierte er als Richtertribüne. Stonehenge selber übersah die Mitte der Rennbahn und bot einen guten Aussichtspunkt auf „[…] die weite Ebene und die Masse der Rennwagen, Reiter und Fußgänger […]“. Auch Dyke Hills (Dorchester) und Raw Dykes (Leics.) sah er als Rennbahnen an, sie werden heute als Wälle eines Oppidums bzw. römische Wasserleitung interpretiert. Einige der von ihm eingeführten Begriffe, wie „cursus“ und „cove“ sind heute noch in der britischen Archäologie gebräuchlich.…"} {"instruction": "What data structure could you use to keep track of the list of items purchased by each customer?", "input": "", "output": "A dictionary is a suitable data structure for keeping track of the list of items purchased by each customer. The key would be the customer name and the value would be a list of items purchased by the customer."} {"text": "[EN Wikipedia] Islands Regulation of the Netherlands Antilles\n\nThe Islands Regulation of the Netherlands Antilles (, ERNA; , RIAH) described the autonomy of the island territories of the Netherlands Antilles. It was enacted on 3 March 1951 by royal decree and remained in force, in a consolidated form, until the dissolution of the Netherlands Antilles on 10 October 2010. Together with the Constitution of the Netherlands Antilles, the Islands Regulation described the foundation of the government of the Netherlands Antilles. The fact that the Constitution depended on the Islands Regulation led many scholars to regard the Netherlands Antilles as a federal arrangement. References Government of the Netherlands Antilles 1951 in law"} {"instruction": "Design a SQL query to get the salary of employee who has the maximum salary in each department.", "input": "", "output": "SELECT emp.name, emp.salary FROM employees emp JOIN (SELECT dept, MAX(salary) max_salary FROM employees GROUP BY dept) temp ON emp.dept = temp.dept AND emp.salary = temp.max_salary;"} {"instruction": "Create a c++ class to store data for a student including their name, age, and address.", "input": "", "output": "class Student { private: string name; int age; string address; public: void setName(string name); void setAge(int age); void setAddress(string address); string getName(); int getAge(); string getAddress(); };"} {"instruction": "Create a function in R to get the last seven characters of a string.", "input": "", "output": "substr_last7 <- function(string) { return (substr(string, nchar(string)-6, nchar(string))) }"} {"text": "[CS Wikipedia] Anderson Paak\n\nAnderson Paak, rodným jménem Brandon Paak Anderson, (* 8. února 1986) je americký rapper a zpěvák. Hudbu začal produkovat ze svého domova v době, kdy docházel na střední školu. Později hrál na bicí v kostele, kde potkal svou budoucí manželku. Jejich manželství se po několika letech rozpadlo a Anderson se věnoval vyučování na hudební škole, kde potkal svou druhou manželku. Později pracoval na farmě s marihuanou a později žil se svou ženou a dítětem na ulici. Později pracoval v Los Angeles na svém debutovém albu a také byl bubeníkem v kapele zpěvačky Haley Reinhart. V roce 2013 vydal EP nazvané Cover Art, které bylo složené z coververzí starších písní. Zpočátku vystupoval pod pseudonymem Breezy Lovejoy, později si jej změnil na Anderson Paak (často stylizováno jako Anderson .Paak). Své první album pod tímto jménem, které dostalo název Venice, vydal v roce 2014. Spolu s producentem Knxwledgem působí v duu NxWorries. Během své kariéry spolupracoval s mnoha hudebníky, mezi něž patří například Eminem, Snoop Dogg, Kendrick Lamar, Mac Miller, Bruno Mars, Dr. Dre, André 3000, Rick Ross, Nas, Pusha T, The Game, Busta Rhymes, Cordae, Q-Tip, ScHoolboy Q, Domo Genesis a Chance the Rapper. Odkazy Reference Externí odkazy Američtí rappeři Američtí bubeníci Narození v Kalifornii Narození 8. února Narození v roce 1986 Žijící lidé Muži Držitelé ceny Grammy"} {"text": "[EN Wikipedia] Thomas Mathis (sport shooter)\n\nThomas Mathis (born 25 April 1990) is an Austrian sports shooter. He competed in the men's 50-metre rifle prone event at the 2016 Summer Olympics. References External links 1990 births Living people Austrian male sport shooters Olympic shooters for Austria Shooters at the 2016 Summer Olympics ISSF rifle shooters Sportspeople from Feldkirch, Vorarlberg European Games competitors for Austria Shooters at the 2015 European Games 21st-century Austrian people"} {"instruction": "Create a function in C to replace all the given characters in a string with a given character.", "input": "String1 = \"Hello World\", Character1 = 'o', Character2 = '*'", "output": "char *replaceCharacter(char *str, char o, char *) { int i = 0; while (str[i] != '\\0') { if (str[i] == o) str[i] = *; i++; }return str; } // Driver Program int main() { char str[] = \"Hello World\"; printf(\"%s\", replaceCharacter(str, 'o', '*')); return 0; }"} {"instruction": "Write a Python program to print a Welcome message for the user.", "input": "Username: John", "output": "print(\"Welcome John!\")"} {"instruction": "Suggest a Python code for sorting a list of dictionaries based on ascending order of a given key.", "input": "original_list = [{'name':'John', 'age': 25}, {'name':'Jim', 'age': 18}, {'name':'Lisa', 'age': 20}]", "output": "def sort_by_age(original_list): Return sorted(original_list, key = lambda i: i['age'])"} {"instruction": "In CSS, how can the width of a div element be set to 100% of its parent's width?", "input": "", "output": "In CSS, the width of a div element can be set to 100% of its parent's width by using the \"width: 100%;\" property."} {"text": "[EN Wikipedia] WRGN\n\nWRGN (88.1 FM) is a Christian radio station licensed to Sweet Valley, Pennsylvania, serving Northeastern Pennsylvania. The station is owned by Good News for Life. WRGN's programming includes Christian Talk and Teaching and Christian music. Christian Talk and Teaching shows heard on WRGN include; Insight For Living with Chuck Swindoll, Turning Point with David Jeremiah, Love Worth Finding with Adrian Rogers, Joni and Friends, The Urban Alternative with Tony Evans, Focus On The Family, and In The Market with Janet Parshall. Translators WRGN: The Good News Network is also heard on translators throughout Northeastern Pennsylvania. References External links WRGN's official website RGN Radio stations established in 1984 1984 establishments in Pennsylvania"} {"text": "[CS Wikipedia] Dietrich Ziemssen\n\nDietrich Ziemssen (26. srpna 1911–17. března 1978) byl důstojník Waffen-SS v hodnosti SS-Obersturmbannführer (podplukovník) za druhé světové války. Mimo jiné byl držitelem německého kříže ve zlatě. Narodil 26. srpna roku 1911 v Heilbronnu v Württembersku. Absolvoval pět tříd lidové školy a poté začal studovat na gymnáziu, kde roku 1929 maturoval. Poté krátce studoval zemědělství na odborné škole a nakonec roku 1933 vstoupil do SA a sloužil u SA-Standarte 125. V březnu roku 1934 přestoupil do SS a byl zařazen ke III. praporu ze 7.SS-Standarte. V říjnu téhož roku přestoupil do SS-Verfügungstruppe (předchůdce Waffen-SS), kde byl zařazen k Politische-Bereitschaft (oddělení politické pohotovosti) v Ellwangenu. V létě roku 1935 nastoupil na důstojnickou školu SS (SS-Junkerschule) v bavorském Bad Tölzu a po jejím dokončení v zimě roku 1936 zahájil s ním související důstojnický kurz pro velitele čety v Dachau. Po jeho dokončení mu byla na začátku dubna 1936 udělena hodnost SS-Untersturmführer (poručík). Jeho novou služebním funkcí se mu nyní stal štáb hlavního úřadu pro rasu a osídlování (RuSHA). K počátku března roku 1937 byl však převelen k SS-Standarte „Deutschland”, kde sloužil u roty z II. praporu jako velitel čety. O rok později byl převelen k pluku SS „Der Führer“ a s ním se zúčastnil invaze do Polska a následně i bitvy o Francii, kde byl raněn a vysloužil si zde železný kříž II. třídy. V červnu roku 1939 se oženil, vzal si svoji přítelkyni Freyu. Po svém zotavení v červenci roku 1940 byl zařazen k pěšímu pluku SS „Westland” a s ním sloužil až do dubna roku 1943. Při těžkých bojích na východní frontě si vysloužil železný kříž I. třídy a útočný odznak pěchoty v bronzu. Následně byl již v hodnosti SS-Sturmbannführer (Major) převelen ke 4. dobrovolnické granátnické brigády „Nederland“, kde se stal velitelem jejího štábu pod velením SS-Brigadeführera Jürgena Wagnera. V této funkci se mu podařilo získat druhé nejvyšší německé vojenské vyznamenání a to německý kříž ve zlatě, který mu byl udělen 16. června roku 1944 na Wagnerovo doporučení. Od konce května roku 1944 byl povolán na kurz pro štábní důstojníky na vojenské akademii v Hirschbergu (dnešní Jelení Hora) a po jeho dokončení v září téhož roku byl jmenován náčelníkem štábu u 1. tankové divize SS „Leibstandarte SS Adolf Hitler“. V této funkci sloužil až do konce války v květnu roku 1945, kdy byl s celým štábem divize zajat americkými jednotkami v Rakousku. Zemřel 17. března roku 1978 v Duisburgu. Shrnutí vojenské kariéry Datum povýšení SS-Anwärter – 15. březen, 1934 SS-Mann – 27. srpen, 1934 SS-Unterscharführer – 1. duben, 1935 SS-Junker – 1. duben, 1935 SS-Standartenjunker – 9. listopad, 1935 SS-Standartenoberjunker – 25. únor, 1936 SS-Untersturmführer – 20. duben, 1936 SS-Obersturmführer – 12. září,…"} {"instruction": "Compose a code in Python that counts the number of positive integers in a list.", "input": "numbers = [1, -2, 3, -4, 5]", "output": "def count_positive_numbers(numbers):\n count = 0\n for num in numbers:\n if num > 0:\n count += 1\n return count"} {"instruction": "Rewrite the following code so that it is easier to read and understand.", "input": "def is_string_palindrome(str): revstr=str[::-1] if revstr==str: return true else: return false", "output": "def is_string_palindrome(str): reverse_str = str[::-1] if reverse_str == str: return True else: return False"} {"instruction": "Develop a function in Python that sorts a dictionary by value in descending order.", "input": "dictionary = {'a': 10, 'b': 20, 'c': 5}", "output": "def sort_dict_by_value(dict): \n sorted_dict = dict(sorted(dict.items(), key = lambda kv: kv[1], reverse = True)) \n return sorted_dict\n\nsorted_dict = sort_dict_by_value(dictionary)\nprint(sorted_dict)"} {"text": "[DE Wikipedia] Liste der Monuments historiques in Puyrolland\n\nDie Liste der Monuments historiques in Puyrolland führt die Monuments historiques in der französischen Gemeinde Puyrolland auf. Liste der Bauwerke |} Liste der Objekte |} Literatur Le Patrimoine des Communes de la Charente-Maritime. Flohic Editions, Band 2, Paris 2002, ISBN 2-84234-129-5, S. 1106. Weblinks Monuments historiques (Bauwerke) in Puyrolland in der Base Mérimée des französischen Kultusministeriums Monuments historiques (Objekte) in Puyrolland in der Base Palissy des französischen Kultusministeriums Puyrolland"} {"text": "[EN Wikipedia] String bag\n\nA string bag, net bag, or mesh bag is an open netted bag. Mesh bags are constructed from strands, yarns, or non-woven synthetic material into a net-like structure. String bags are used as reusable shopping bags and as packaging for produce. History Bags of net-like material have been used by many cultures in history. For example, Japanese divers have used string bags to collect items to bring to the surface. Czechoslovakia In Czechoslovakia, the production of string bags dates back to 1920s to the town of Žďár nad Sázavou in former Czechoslovakia, present day Czech Republic, when a salesman Vavřín Krčil, representing Jaro J. Rousek company, began to produce string bags under the trademark Saarense (EKV) at the local chateau Žďár. They formerly made hair nets, which had become obsolete due to shorter hairstyles coming into fashion. This led to years of prosperity for the company. The hand made shopping bags were made of artificial silk yarn, woven by women working at home (this was often their second job) or by using child labour, the finished bags were then given to Vavřín Krčil. The bags quickly became very popular due to their low price, light weight, and compactness. Krčil soon extended the range of designs, including bags to be carried at the elbow or on the shoulder, and bags for sporting equipment. In the late 1920s string bags were being produced in Switzerland and Italy, and were distributed around the world. Krčil himself exported the bags to Canada, France, Switzerland, Germany, Austria, and North African countries. East Germany (German Democratic Republic) The classic East German Einkaufsnetz (shopping net) has leather handles and multicoloured netting made from Eisengarn, a strong, starched and waxed cotton thread. Due to shortages of many types of raw materials in the GDR, recycling and reusing were the norm; plastic one-use shopping bags were rarely available in shops. The bags took up very little space when not in use and therefore could be carried around in case one serendipitously came across something useful for sale. In West Germany use of net shopping bags declined from the early 1980s due to single-use plastic bags becoming common in shops and supermarkets, but they continued to be used in the GDR. In the 1960s and 1970s net bags were also made out of Dederon, the East German trade name for Nylon 6. The oil crisis of the mid-1970s meant that GDR could no longer produce Dederon in such large quantities and Eisengarn was then more often used for the manufacture of net bags. Environmental concerns, Ostalgie (nostalgia for East Germany), and a general fashion for retro products from the mid-20th Century have led to the resurgence, in all parts of Germany, of what was once considered the frumpy Omas Einkaufsnetz (Grandma's shopping…"} {"instruction": "In MongoDB, what does the command 'db.collection.aggregate()' do?", "input": "", "output": "The aggregate command in MongoDB is used to group values from multiple documents together and perform a variety of aggregate operations such as computing averages, sums of values, finding distinct values, etc. It takes an array of aggregation pipeline stages as its first argument and outputs an array of computed results."} {"instruction": "Develop a Python program to find the maximum sum of a subarray of size K.", "input": "arr = [100, 200, 300, 400]\nK = 2", "output": "def maximum_sum_subarray(arr, K): \n max_sum = 0\n window_sum = 0 \n \n # Compute the window sum \n for i in range(K): \n window_sum += arr[i] \n \n # Replace max_sum if current window sum is greater \n max_sum = max(window_sum, max_sum) \n \n # Slide the window \n for i in range(K, len(arr)): \n window_sum += arr[i] - arr[i - K] \n \n # Replace max_sum if current window sum is greater \n max_sum = max(window_sum, max_sum) \n \n return max_sum"} {"instruction": "Write a Python program that calculates the monthly payments of a loan given its amount, interest rate, and term.", "input": "Amount = 2000, interest rate = 10%, term = 3 years", "output": "def calculate_monthly_payment(amount, interest, term): \n monthly_interest_rate = interest / 12 \n number_of_payments = term * 12\n\n monthly_payment = (amount * monthly_interest_rate) / (1 - pow((1 + monthly_interest_rate), (-number_of_payments)))\n \n return monthly_payment\n\namount = 2000\ninterest_rate = 10\nterm = 3\npayment = calculate_monthly_payment(amount, interest_rate, term)\nprint(f'The monthly payment is {payment:.2f}')"} {"instruction": "Format this JSON data as per a specific schema.", "input": "{ \"name\": \"John\", \"age\": 20, \"height_cm\": 178, \"weight_kg\": 73 }", "output": "{ \"name\": \"John\", \"age\": 20, \"info\": { \"height_cm\": 178, \"weight_kg\": 73 } }"} {"instruction": "Write a Python code snippet to calculate the sum of the first 100 prime numbers.", "input": "", "output": "def is_prime(num):\n for i in range(2, num):\n if num % i == 0:\n return False\n return True\n\nprime_sum = 0 \ncount = 0\nnum = 2\n\nwhile count < 100:\n if is_prime(num):\n prime_sum += num\n count += 1\n num += 1\n\nprint(prime_sum)"} {"instruction": "Create an object that adds two integers and returns their sum.", "input": "", "output": "const adder = { add: (a, b) => a + b };"} {"instruction": "Write a code to create a FizzBuzz game, that prints the numbers from 1 to 50, replacing all the numbers divisible by 3 with the word \"Fizz\" and the numbers divisible by 5 with the word \"Buzz\".", "input": "", "output": "\"\"\" Write a code to create a FizzBuzz game \"\"\" def fizz_buzz(): for i in range(1, 51): if i % 3 == 0 and i % 5 == 0: print(\"FizzBuzz\") elif i % 3 == 0: print(\"Fizz\") elif i % 5 == 0: print(\"Buzz\") else: print(i) if __name__ == '__main__': fizz_buzz()"} {"text": "[DE Wikipedia] Wycoller Beck\n\nDer Wycoller Beck ist ein Wasserlauf in Lancashire in England. Er entsteht aus dem Zusammenfluss von Smithy Clough und Turnhole Clough südlich des Ortes Wycoller, fließt in nördlicher Richtung und bildet bei seinem Zusammentreffen mit dem River Laneshaw das Colne Water. Weblinks Gewässer in Lancashire"} {"instruction": "Write code using Python to generate a random password of given length.", "input": "Length: 8", "output": "import string\nimport random\n\ndef generate_password(length):\n chars=string.ascii_uppercase + string.ascii_lowercase + string.digits\n return ''.join(random.choice(chars) for i in range(length))\n\nprint(generate_password(8))"} {"instruction": "Design a function in Python that takes a list of strings as input and returns a new list of strings that contains only the string with the longest length.", "input": "['cat', 'kitten', 'puppy']", "output": "def get_longest_strings(string_list):\n longest_strings = []\n longest_length = 0\n for string in string_list:\n if len(string) > longest_length:\n longest_length = len(string)\n \n for string in string_list:\n if len(string) == longest_length:\n longest_strings.append(string)\n \n return longest_strings\n\nlongest_strings = get_longest_strings(['cat', 'kitten', 'puppy'])\nprint(longest_strings)"} {"instruction": "Add a class attribute to the given Python class.", "input": "class Student: def __init__(self, name, age): self.name = name self.age = age", "output": "class Student: def __init__(self, name, age): self.name = name self.age = age self.grade = None"} {"text": "[DE Wikipedia] Deutsche Gesellschaft für Klinische Neurophysiologie und Funktionelle Bildgebung\n\nDie Deutsche Gesellschaft für Klinische Neurophysiologie und Funktionelle Bildgebung (DGKN) e. V. ist eine medizinische Fachgesellschaft für Ärzte und Wissenschaftler auf dem Gebiet der klinischen und experimentellen Neurophysiologie. Mit mehr als 4.000 Mitgliedern ist sie die zweitgrößte Fachgesellschaft für Neuromediziner in Deutschland. Tätigkeiten und Ziele Die DGKN e. V. fördert die Erforschung von Gehirn und Nerven, sichert die Qualität von Diagnostik und Therapie neurologischer Krankheiten und treibt Innovationen auf diesem Gebiet voran. Die DGKN richtet den jährlichen Kongress für Klinische Neurowissenschaften mit Fortbildungsakademie aus. Darüber hinaus entwickelt und publiziert die DGKN medizinische Leitlinien, Richtlinien und Empfehlungen für die Diagnosemethoden der Neurophysiologie sowie deren Ausbildung. Hierbei besitzt die DGKN eine besondere Relevanz für die Feststellung des Hirntodes, da die Empfehlungen der DGKN zur technischen Durchführung von der Bundesärztekammer übernommen werden und somit deutschlandweit verpflichtend gültig sind, beispielsweise im Rahmen der Hirntodiagnostik für Organtransplantationen. Die Zertifizierung von Anwendungs- und Ausbildungskompetenzen in den neurophysiologischen Methoden, u. a. Elektroenzephalografie (EEG), Elektromyografie (EMG), Elektroneurografie (ENG) und Evozierte Potenziale (EP), stellt eine der Hauptaufgaben der DGKN dar. Mit ihrer Fortbildungsakademie betreibt die DGKN Aus-, Weiter- und Fortbildung. Ebenso unterstützt die Fortbildungsakademie die Organisation von externen Fortbildungsveranstaltungen und zertifiziert diese. Die Nachwuchsorganisation der DGKN sind die Jungen Klinischen Neurophysiologen (JKN). Die Zeitschrift Klinische Neurophysiologie ist das Mitteilungsorgan der DGKN. Sie erscheint viermal jährlich. Die DGKN ist Mitglied der Arbeitsgemeinschaft der Wissenschaftlichen Medizinischen Fachgesellschaften (AWMF) und die Deutsche Sektion der International Federation of Clinical Neurophysiology (IFCN). Organisationsstruktur Zentrale Organe der DGKN sind die Mitgliederversammlung und der Vorstand. In Fachkommissionen findet die Facharbeit statt, d. h. administrative und klinische Aufgaben. Die DGKN kooperiert u. a. mit folgenden Organisationen: Deutsche Gesellschaft für Neurologie Deutsche Gesellschaft für Epileptologie Berufsverband Deutscher Neurologen Deutsche Gesellschaft für Ultraschall in der Medizin Vorstand Der Vorstand der DGKN besteht aus dem Präsidenten, dem 1. und 2. Vizepräsidenten, dem Past-Präsidenten, dem 1. und 2. Sekretär sowie dem Schatzmeister und dem IFCN-Delegate. Geschichte Die Geschichte der DGKN begann 1924 mit der Erfindung des EEG durch Hans Berger. In den 1930er- und 40er-Jahren entstand ein erster Vorreiter der DGKN: eine neurophysiologische und eine…"} {"text": "[DE Wikipedia] Delicate\n\nDelicate steht für: Delicate (Taylor-Swift-Lied) Delicate (Terence-Trent-D’Arby-Lied) Delicate Arch, Felsbogen in den USA Siehe auch Delicata Delikat Violently Delicate The Delicate Prey Delicate Sound of Thunder"} {"text": "[HI Wikipedia] विशनसर\n\nविशनसर (Vishansar, ) भारत के जम्मू व कश्मीर राज्य के गान्दरबल ज़िले के सोनमर्ग क़स्बे के पास स्थित एक स्वच्छ पर्वतीय झील है। ३,७१० मीटर पर स्थित यह झील प्रसिद्ध किशनगंगा नदी का स्रोत है। इसकी लम्बाई १.० किमी और चौड़ाई ०.६ किमी है। विवरण विशनसर श्रीनगर से २०० किमी पूर्वोत्तर में और सोनमर्ग से २० किमी दूर स्थित है। यह एक सुंदर पर्वतीय झील है जिसके पीछे विष्णु पर्वत खड़ा हुआ है। इसकी तुलना अक्सर पास की कृशनसर (झील) से की जाती है क्योंकि जहाँ कृशनसर का रंग कुछ हरा नज़र आता है वहाँ विशनसर का बहुत नीला है। दोनों झीलों में ट्राउट मछली मिलती है। यह उत्तरी यूरोप की निवासी है लेकिन इसे कश्मीर की कई नदी-झीलों में लाकर छोड़ा गया था ताकि लोग इन्हें पकड़ने-खाने का आनंद ले सकें। विशनसर के आसपास मर्ग (घास के खुले मैदान) फैले हुए हैं जहाँ चरवाहे अपनी भेड़-बकरियाँ लेकर आते हैं। सर्दियों में यहाँ भारी बर्फ़बारी होती है और झील भी जम जाती है। कृशनसर से एक धारा निकलकर विशनसर में जाती है। विशनसर में पिघलती हिमानियों (ग्लेशियरों) का पानी भी आता है। विशनसर से एक धारा बाहर बहती है। यह आगे चलकर दो धाराओं में बंट जाती है। एक दक्षिण की तरफ़ जाकर सिन्द नदी (सिन्धु नदी से भिन्न) की उपनदी बन जाती है जबकि दूसरी उत्तर को जाकर किशनगंगा नदी आरम्भ करती है। गाडसर झील विशनसर से ९ किमी पश्चिम में है। झील के कुछ नज़ारे इन्हें भी देखें कृशनसर किशनगंगा नदी सिन्द नदी सन्दर्भ जम्मू और कश्मीर की झीलें भारत की झीलें गान्दरबल ज़िला"} {"instruction": "Implement a priority queue.", "input": "", "output": "class PriorityQueue(): def __init__(self): self.elements = [] def is_empty(self): return len(self.elements) == 0 def enqueue(self, item, priority): self.elements.append((item, priority)) def dequeue(self): max_priority_index = 0 for index, element in enumerate(self.elements): if element[1] > self.elements[max_priority_index][1]: max_priority_index = index element = self.elements[max_priority_index] del self.elements[max_priority_index] return element"} {"text": "[HI Wikipedia] रूस के नगरों की सूची\n\nयह सूची रूस के नगरों की है। 2002 रूसी जनगणना के आंकड़ों के अनुसार, रूस में शहरों और कस्बों की कुल संख्या 1,108 हैं। मास्को लेनिनग्राद सेंट पीट्सबर्ग वोल्गाग्राद रूस के नगर"} {"instruction": "Construct a regular expression to match strings containing only alphabets.", "input": "", "output": "/^[a-zA-Z]+$/"} {"text": "[HI Wikipedia] बरगुज़ीन नदी\n\nबरगुज़ीन नदी (रूसी: Баргузи́н; अंग्रेज़ी: Barguzin) रूस के साइबेरिया क्षेत्र के बुर्यातिया गणतंत्र की एक प्रमुख नदी है। यह 480 किमी लम्बी नदी बयकाल झील के बरगुज़ीन नामक भाग में ख़ाली हो जाती है। सेलेन्गा नदी और ऊपरी अंगारा नदी के बाद बयकाल झील में जल ले जाने वाली यह तीसरी सबसे बड़ी नदी है। इसका जलसम्भर क्षेत्र 21,000 वर्ग किमी है और बयकाल से लेकर उस से 204 किमी ऊपर तक इस नदी पर नावी यातायात चलता है। इसकी मुख्य उपनदियाँ गागरा, अरगादा, इना और उल्युन नदियाँ हैं। इन्हें भी देखें बुर्यातिया सन्दर्भ रूस की नदियाँ साइबेरिया बुर्यातिया"} {"instruction": "Create a new folder called 'data' within the current working directory.", "input": "", "output": "import os # create 'data' folder in the current working directory current_directory = os.getcwd() new_directory = os.path.join(current_directory, 'data') os.mkdir(new_directory)"} {"instruction": "Concatenate the elements of the list into a string.", "input": "list_of_strings = ['I', 'am', 'a', 'string']", "output": "list_of_strings = ['I', 'am', 'a', 'string'] concat = ' '.join(list_of_strings) print(concat)"} {"instruction": "Provide a solution using Python to capitalize the first letter of each word in a given phrase.", "input": "the quick brown fox", "output": "def capitalize(phrase):\n words = phrase.split(\" \")\n capitalized_words = [word.capitalize() for word in words]\n capitalized_phrase = \" \".join(capitalized_words)\n return capitalized_phrase\n\ncapitalized_phrase = capitalize(\"the quick brown fox\")\nprint(capitalized_phrase)"} {"instruction": "Analyze the time complexity of an algorithm written in Python.", "input": "def bubble_sort(arr):\n n = len(arr)\n \n # Traverse through all array elements\n for i in range(n):\n \n # Last i elements are already in place\n for j in range(0, n-i-1):\n \n # traverse the array from 0 to n-i-1\n # Swap if the element found is greater\n # than the next element\n if arr[j] > arr[j+1]:\n arr[j], arr[j+1] = arr[j+1], arr[j]", "output": "This algorithm has a time complexity of O(n2). This is due to the nested for loop which means that the runtime of the algorithm is proportional to the square of the size of the input. Consequently, the time complexity increases exponentially with the input size."} {"instruction": "Edit the following code to register an account on a website.", "input": "import requests url = \"www.example.com/register\" data = \"username=myname\"", "output": "import requests url = \"www.example.com/register\" data = { \"username\" : \"myname\", \"password\" : \"secret_password\", \"email\" : \"myname@example.com\" } response = requests.post(url, data=data)"} {"instruction": "Create a Python script that extracts the text from a webpage", "input": "URL: https://www.example.com", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = \"https://www.example.com\"\n\npage = requests.get(url)\n\nsoup = BeautifulSoup(page.content, 'html.parser')\n\ntext = soup.find_all(text=True)\n\nfor t in text:\n print(t.strip())"} {"instruction": "Design a class in Java to build a Binary Search Tree.", "input": "", "output": "public class BST { /* Class containing left and right child of current node and key value*/ class Node { int key; Node left, right; public Node(int item) { key = item; left = right = null; } } // Root of BST Node root; // Constructor BST() { root = null; } // This method mainly calls insertRec() void insert(int key) { root = insertRec(root, key); } // A recursive function to insert a new key in BST Node insertRec(Node root, int key) { // If the tree is empty, return a new node if (root == null) { root = new Node(key); return root; } // Otherwise, recur down the tree if (key < root.key) root.left = insertRec(root.left, key); else if (key > root.key) root.right = insertRec(root.right, key); // return the (unchanged) node pointer return root; } }"} {"instruction": "Create a list comprehension expression for adding two lists in Python.", "input": "list1 = [1, 2, 3]\nlist2 = [4, 5, 6]", "output": "list3 = [list1[i] + list2[i] for i in range(len(list1))]"} {"instruction": "In Python, write a program to remove all duplicates from a given list of integers.", "input": "", "output": "def remove_duplicates(arr): result = [] seen = set() for item in arr: if item not in seen: result.append(item) seen.add(item) return result"} {"instruction": "Code a React component that renders a button with a given text.", "input": "Text of the button: Submit", "output": "import React from 'react'; import { Button } from 'react-native'; const SubmitButton = ({ text }) => { return ( "} {"instruction": "Create a list of 5 integers and print out their product.", "input": "", "output": "\"\"\" Create a list of 5 integers and print out their product \"\"\" list_of_ints = [1, 2, 3, 4, 5] product = 1 for i in list_of_ints: product *= i print(product)"} {"instruction": "Generate a python program that takes two strings and outputs the longest common substring", "input": "", "output": "def longestCommonSubstring(s1, s2): \n m = [[0] * (1 + len(s2)) for i in range(1 + len(s1))] \n longest, x_longest = 0, 0\n for x in range(1, 1 + len(s1)): \n for y in range(1, 1 + len(s2)): \n if s1[x - 1] == s2[y - 1]: \n m[x][y] = m[x - 1][y - 1] + 1\n if m[x][y] > longest: \n longest = m[x][y] \n x_longest = x \n else: \n m[x][y] = 0\n return s1[x_longest - longest: x_longest]"} {"instruction": "Create a CSS class to make all the text in the body of the page blue.", "input": "", "output": "body { font-color: blue; }"} {"instruction": "Edit the following JavaScript code to remove any warnings given by the linter.", "input": "let favoriteNumber = [7,9,42]; const printNumber = (number) => console.log(number); for (let idx = 0; idx < favoriteNumber.length; idx +=1) { printNumber(favoriteNumber[idx]) }", "output": "let favoriteNumber = [7, 9, 42]; const printNumber = (number) => console.log(number); for (let idx = 0; idx < favoriteNumber.length; idx += 1) { printNumber(favoriteNumber[idx]); }"} {"instruction": "Convert a LinkedList to an array of objects", "input": "", "output": "Object[] array = linkedList.toArray();"} {"text": "[EN Wikipedia] Terry Lowe\n\nTerence John Lowe (born 27 May 1943) is an English former footballer who played at right-back for Port Vale between 1960 and 1966. Career In his youth, Lowe played for Stoke City before joining Port Vale in June 1960. His debut came in the Potteries derby 1–0 win over Stoke in the Supporters' Clubs' Trophy final on 24 April 1961, at the end of the 1960–61 season. He made his debut in the Football League in the 1961–62 season, making six appearances in the Third Division. Manager Norman Low was replaced by Freddie Steele in October 1962, and Lowe established himself in Steele's first team plans with 40 league and cup appearances in the 1962–63 campaign. However he featured only three times in the 1963–64 season, as Selwyn Whalley firmly established himself in the right-back slot. Lowe played only twice in 1964–65 as the \"Valiants\" were relegated into the Fourth Division under Jackie Mudie's stewardship. He played 13 matches in the 1965–66 season, and was handed a free transfer away from Vale Park in May 1966. Career statistics Source: References 1943 births Living people People from Cheadle, Staffordshire Footballers from Staffordshire English men's footballers Men's association football fullbacks Stoke City F.C. players Port Vale F.C. players English Football League players"} {"instruction": "Write a function that takes in two strings, compares them, and returns the longer string.", "input": "String 1: Python\nString 2: C++", "output": "def compareLongestString(str1, str2):\n \n if len(str1) > len(str2):\n longestString = str1\n elif len(str2) > len(str1):\n longestString = str2\n else:\n longestString = \"Strings have the same length\"\n\n return longestString\n\nprint(compareLongestString(\"Python\", \"C++\"))"} {"instruction": "Write a Python program that sorts a list of integers in ascending order without using the built-in sort() method.", "input": "[4, 5, 13, 2, 9, 7]", "output": "def selection_sort(arr):\n n = len(arr)\n for i in range(n):\n min_idx = i\n for j in range(i+1, n):\n if arr[min_idx] > arr[j]:\n min_idx = j\n arr[i], arr[min_idx] = arr[min_idx], arr[i]\n\narr = [4, 5, 13, 2, 9, 7]\nselection_sort(arr)\nprint(arr)\n# Output: [2, 4, 5, 7, 9, 13]"} {"instruction": "Code a program in PHP to swap the values of two variables.", "input": "a = 10 b = 15", "output": "$a = 10; $b = 15; list($a, $b) = array($b, $a); echo $a; // Outputs 15 echo $b; // Outputs 10"} {"text": "[HI Wikipedia] वाले कैन्टन\n\nवाले कैन्टन (फ़्रान्सीसी: Valais) या वालिस कैन्टन (जर्मन: Wallis) स्विट्ज़रलैंड के दक्षिण-पश्चिमी भाग में स्थित एक कैन्टन (प्रान्त से मिलता-जुलता प्रशासनिक विभाग) है। यह कैन्टन सन् १८१५ में स्विस परिसंघ का हिस्सा बना था। हालाँकि अधिकतर स्विस कैन्टोनों एकभाषीय होते हैं, वाले कैन्टन में फ़्रान्सीसी और जर्मन भाषाएँ दोनों प्रचलित हैं। इस कैन्टन के दो-तिहाई लोग फ़्रान्सीसी भाषी हैं और अधिकतर कैन्टन के पश्चिमी भाग में बसते हैं, जबकी एक-तिहाई वाल्सर जर्मन नामक जर्मन की एक उपभाषा बोलते हैं और इनका जमावड़ा कैन्टन के पूर्वी भाग में है। इन्हें भी देखें स्विट्ज़रलैंड के कैन्टन सन्दर्भ वाले कैन्टन स्विट्ज़रलैंड के कैन्टन"} {"instruction": "Write a Python script to implement a linear search algorithm.", "input": "lst = [1, 2, 3, 4, 5, 6]\ntarget = 4", "output": "def linearSearch(lst, target):\n for i in range(len(lst)):\n if lst[i] == target:\n return i\n return -1\n\nlst = [1, 2, 3, 4, 5, 6]\ntarget = 4\nresult = linearSearch(lst, target)\n\nif result == -1:\n print(\"Element is not present in the list\")\nelse:\n print(\"Element is present at index\", result)"} {"instruction": "Write a code snippet in Python to compute the maximum of an array of numbers.", "input": "[2, 4, 6, 8]", "output": "def find_max(nums): \n max_num = nums[0] \n for num in nums: \n if num > max_num: \n max_num = num \n return max_num \n\nprint(find_max([2, 4, 6, 8]))"} {"instruction": "Write a Python script to generate a random password of 8 characters with at least 2 letters, 2 numbers, and 2 symbols.", "input": "Not applicable", "output": "import random\nimport string\n\ndef generate_password():\n letter_lowercase = string.ascii_lowercase\n letter_uppercase = string.ascii_uppercase\n numbers = string.digits\n symbols = string.punctuation\n all_chars = letter_lowercase + letter_uppercase + numbers + symbols\n \n password = \"\"\n \n for i in range(2):\n password += random.choice(letter_lowercase)\n password += random.choice(letter_uppercase)\n password += random.choice(numbers)\n password += random.choice(symbols)\n \n for i in range(2):\n password += random.choice(all_chars)\n \n password_list = list(password)\n random.shuffle(password_list)\n password = ''.join(password_list)\n \n return password"} {"instruction": "Create a Ruby code to remove all items that starts with the letter 'a' from a given array.", "input": "arr: [apple, banana, avocado, orange]", "output": "arr = arr.reject {|element| element.start_with?('a') }"} {"instruction": "Create a HTML page with a fixed header bar and a scrolling content area.", "input": "", "output": "
    "} {"instruction": "Create a class in Python with all five common inheritance options (parent class, subclasses, multiple inheritance, abstract class, etc).", "input": "", "output": "class Parent:\n \n # Constructor\n def __init__(self):\n self.value = 'parent'\n\n def parent_method(self):\n # Parent method here\n return self.value\n\nclass ChildOne(Parent):\n \n # Constructor\n def __init__(self):\n Parent.__init__(self)\n self.value = 'child one'\n\nclass ChildTwo(Parent):\n \n # Constructor\n def __init__(self):\n Parent.__init__(self)\n self.value = 'child two'\n\n# Multiple Inheritance\nclass Other(ChildOne, ChildTwo):\n\n # Constructor\n def __init__(self):\n ChildOne.__init__(self)\n ChildTwo.__init__(self)\n self.value = 'other'\n\n# Abstract Class\nclass AbstractParent:\n\n # Constructor\n def __init__(self):\n self._value = 'abstract'\n\n # Abstract Methods\n def calculate(self, x, y):\n pass\n\n def abstract_method(self):\n pass"} {"instruction": "Create a function in Python that takes two strings as inputs and prints out the longer of the two strings.", "input": "Hello\nWorld", "output": "def longestString(str1, str2):\n if len(str1) > len(str2):\n return str1\n else:\n return str2\n\nprint(longestString(\"Hello\", \"World\"))"} {"text": "[EN Wikipedia] Hercule Poirot\n\nHercule Poirot (, ) is a fictional Belgian detective created by British writer Agatha Christie. Poirot is one of Christie's most famous and long-running characters, appearing in 33 novels, two plays (Black Coffee and Alibi), and 51 short stories published between 1920 and 1975. Poirot has been portrayed on radio, in film and on television by various actors, including Austin Trevor, John Moffatt, Albert Finney, Peter Ustinov, Ian Holm, Tony Randall, Alfred Molina, Orson Welles, David Suchet, Kenneth Branagh, and John Malkovich. Overview Influences Poirot's name was derived from two other fictional detectives of the time: Marie Belloc Lowndes' Hercule Popeau and Frank Howel Evans' Monsieur Poiret, a retired French police officer living in London. Evans' Jules Poiret \"was small and rather heavyset, hardly more than five feet, but moved with his head held high. The most remarkable features of his head were the stiff military moustache. His apparel was neat to perfection, a little quaint and frankly dandified.\" He was accompanied by Captain Harry Haven, who had returned to London from a Colombian business venture ended by a civil war. A more obvious influence on the early Poirot stories is that of Arthur Conan Doyle. In An Autobiography, Christie states, \"I was still writing in the Sherlock Holmes tradition – eccentric detective, stooge assistant, with a Lestrade-type Scotland Yard detective, Inspector Japp\". For his part, Conan Doyle acknowledged basing his detective stories on the model of Edgar Allan Poe's C. Auguste Dupin and his anonymous narrator, and basing his character Sherlock Holmes on Joseph Bell, who in his use of \"ratiocination\" prefigured Poirot's reliance on his \"little grey cells\". Poirot also bears a striking resemblance to A. E. W. Mason's fictional detective Inspector Hanaud of the French Sûreté, who first appeared in the 1910 novel At the Villa Rose and predates the first Poirot novel by 10 years. Christie's Poirot was clearly the result of her early development of the detective in her first book, written in 1916 and published in 1920. The large number of refugees in the country who had fled the German invasion of Belgium in August to November 1914 served as a plausible explanation of why such a skilled detective would be available to solve mysteries at an English country house. At the time of Christie's writing, it was considered patriotic to express sympathy towards the Belgians, since the invasion of their country had constituted Britain's casus belli for entering World War I, and British wartime propaganda emphasised the \"Rape of Belgium\". Popularity Poirot first appeared in The Mysterious Affair at Styles (published in 1920) and exited in Curtain (published in 1975). Following the latter, Poirot was the only fictional character…"} {"instruction": "Write a JavaScript function that takes a string argument and returns a count of all the times the letter 'a' appears in the string.", "input": "", "output": "function countA(str) { let count = 0; for (let i=0; i 5: long_words_list.append(word) return long_words_list"} {"instruction": "Create a for loop that prints the contents of a list of strings.", "input": "list_of_strings = [\"John\", \"Bob\", \"Jill\", \"Sara\"]", "output": "list_of_strings = [\"John\", \"Bob\", \"Jill\", \"Sara\"] for name in list_of_strings: print(name)"} {"instruction": "Create a function that returns the sum of two numbers passed as arguments.", "input": "", "output": "def add_numbers(a,b): return a + b # Testing x = 3 y = 4 sum = add_numbers(x, y) print(\"Sum of {0} and {1} is {2}\".format(x, y, sum))"} {"instruction": "Write a Python program to calculate the entropy of a given dataset.", "input": "Dataset: [1,1,1,1,1,1,2,2,2,2,3,3]", "output": "def entropy(dataset):\n counts = {}\n entropy = 0\n for i in dataset:\n if i in counts:\n counts[i] += 1\n else:\n counts[i] = 1\n for i in counts:\n p = counts[i]/len(dataset)\n entropy -= p*np.log2(p)\n return entropy\n\nentropy([1,1,1,1,1,1,2,2,2,2,3,3])"} {"instruction": "Design a game controller class that stores and updates game state in Python", "input": "", "output": "class GameController:\n def __init__(self):\n self.state = {'lives': 3, 'score': 0, 'level': 1}\n \n def update_game_state(self, lives, score, level):\n self.state['lives'] = lives\n self.state['score'] = score\n self.state['level'] = level\n\n def get_game_state(self):\n return self.state"} {"text": "[EN Wikipedia] Atlas (disambiguation)\n\nAn atlas is a collection of maps. Atlas may also refer to: Mythology Atlas (mythology), an Ancient Greek Titanic deity Atlas, the first legendary king of Atlantis Atlas of Mauretania, a legendary king Places United States Atlas, California Atlas, Illinois Atlas, Texas Atlas, West Virginia Atlas, Wisconsin Atlas District, in Washington, D.C. Atlas Peak AVA, a California wine region Atlas Township, Michigan Other places Atlas Cinema, a historic movie theatre in Istanbul, Turkey Atlas Mountains, a set of mountain ranges in northwestern Africa Atlas, Nilüfer, a village in Bursa Province, Turkey People with the name Atlas (given name) Atlas (graffiti artist) Atlas DaBone, American wrestler and football player Charles Atlas (1892–1972), Italian-American bodybuilder Charles Atlas (artist) David Atlas (born 1924), American meteorologist James Atlas (1949-2019), American writer, editor and publisher Meir Atlas (1848–1926), Lithuanian rabbi Natacha Atlas (born 1964), Belgian singer Nava Atlas, American book artist and author Omar Atlas (born 1938), former Venezuelan professional wrestler Scott Atlas (born 1955), American conservative health care policy advisor Teddy Atlas (born 1956), American boxing trainer and commentator Tony Atlas (born 1954), American wrestler and bodybuilder Arts, entertainment, and media Comics Atlas (comic book series), by Dylan Horrocks Agents of Atlas, a Marvel Comics mini-series Atlas Comics (1950s), a publisher Atlas/Seaboard Comics, a 1970s line of comics Fictional characters Atlas (DC Comics), any of several fictional characters Atlas (Teen Titans) Atlas, an Astro Boy (1980) character Atlas (BioShock) Atlas, a BattleMech in the BattleTech universe Atlas, an antagonist in Mega Man ZX Advent Atlas, a Portal 2 character Atlas, a PS238 character Erik Josten, a.k.a. Atlas, a Marvel Comics supervillain The Atlas, a strong driving force from No Man's Sky Literature Atlas, a photography book by Gerhard Richter ATLAS of Finite Groups, a group theory book Atlas Shrugged, a novel by Ayn Rand The Atlas (novel), by William T. Vollmann Music Groups Atlas (band), a New Zealand rock band Atlas Sound, the solo musical project of Deerhunter lead singer and guitarist Bradford Cox Musicians Black Atlass, a Canadian musician Albums Atlas (Kinky album) Atlas (Laurel Halo album) Atlas (Parkway Drive album) Atlas (Real Estate album) Atlas (RÜFÜS album) Atlas, by The Score, 2017 Operas Atlas (opera), 1991, by Meredith Monk Atlas: An Opera in Three Parts, a 1993 recording of Monk's opera Songs \"Atlas\" (Battles song), 2007 \"Atlas\" (Bicep song), 2020 \"Atlas\" (Coldplay song), 2013 \"Atlas\", a song by Caligula's Horse from the album The Tide, the Thief & River's End \"Atlas\", by Parkway Drive \"Atlas\", a song by Man Overboard from Man Overboard \"Atlas\", a song…"} {"text": "[CS Wikipedia] Mistrovství světa v atletice 2009 – Muži hod diskem\n\nZávod v hodu diskem mužů na Mistrovství světa v atletice 2009 se uskutečnil 18. a 19. srpna. Zvítězil v něm německý diskař Robert Harting výkonem 69,43 m. Mezi 30 startujícími nechyběl žádný z aktuálně nejvýkonnějších diskařů. Do finálové dvanáctky z kvalifikace neprošli mimo jiné bronzový olympijský medailista z Athén Alexander Tammert z Estonska či pátý z OH v Pekingu Španěl Frank Casañas. Finále znamenalo ukončení série 29 vítězných závodů úřadujícího olympijského vítěze a mistra světa Gerda Kantera. Estonec předvedl sérii vyrovnyných hodů, všechny však o několik metrů zaostávaly za výkony, které v uplynulé sezóně opakovaně podával. Impozantní vstup do soutěže měl v novém polském národním rekordu stříbrný medailista z Pekingu Piotr Małachowski a tento výkon potvrzoval i dalšími pokusy. Za Polákem jen nepatrně zaostával vítěz kvalifikace a obhájce stříbra z MS v Ósace Robert Harting. Když v páté sérii Małachowski svůj čerstvý rekord dále vylepšil, zdálo se být o vítězi rozhodnuto; domácím publikem bouřlivě povzbuzovaný a v euforii házející Harting však svým posledním hodem strhl vítězství na německou stranu. Těsně pod stupni vítězů skončil dvojnásobný olympijský šampion Virgilijus Alekna. Výsledky Externí odkazy výsledky na oficiálním webu MS Disk"} {"instruction": "Write a Python program to determine if a number provided by the user is prime or not.", "input": "17", "output": "# Ask the user for a number\nnum = int(input('Enter a number: '))\n\n# Set initial values\nis_prime = True\n\n# Check for prime\nfor i in range(2, num):\n if num % i == 0:\n is_prime = False\n break\n\n# Output result\nif is_prime:\n print(f'{num} is a prime number.')\nelse:\n print(f'{num} is not a prime number.')"} {"instruction": "Using regular expressions, separate the below string into three parts.", "input": "\"a=1,b=2,c=3\"", "output": "regex = \"\\w=(\\d+)\" a, b, c = re.findall(regex, \"a=1,b=2,c=3\")"} {"instruction": "Suggest an efficient way to find the longest word in a string.", "input": "", "output": "The most efficient way to find the longest word in a string is to use the split() method to convert the string into a list of words, then use the max() method to find the longest word in the list. For example: string = \"The quickest way to find the longest word\" longest_word = max(string.split(), key=len)"} {"instruction": "Create two classes, \"Animal\" and \"Dog\", in which the \"Dog\" class inherits from the \"Animal\" class.", "input": "", "output": "class Animal: pass class Dog(Animal): pass"} {"text": "[HI Wikipedia] युक्रेन\n\n{{ज्ञानसन्दूक देश | native_name = युक्रेन | conventional_long_name = | common_name = युक्रेन | image_flag = Flag of Ukraine.svg | image_coat = Lesser Coat of Arms of Ukraine.svg | image_map = Europe-Ukraine (disputed territory).svg | map_caption = | national_anthem = (Ukrainian) युक्रेन पूर्वी यूरोप में स्थित एक देश है। इसकी सीमा पूर्व में रूस, उत्तर में बेलारूस, पोलैंड, स्लोवाकिया, पश्चिम में हंगरी, दक्षिणपश्चिम में रोमानिया एवं मॉल्डोवा और दक्षिण में काला सागर और अजोव सागर से मिलती है। देश की राजधानी होने के साथ-साथ सबसे बड़ा नगर भी कीव है। युक्रेन का आधुनिक इतिहास ९वीं शताब्दी में तब से प्रारम्भ होता है जब यह 'कीवियन रुुस' के नाम से एक बड़ा और शक्तिशाली राज्य बनकर खड़ा हुआ। परन्तु १२वीं शताब्दी में यह महान उत्तरी लड़ाई के बाद क्षेत्रीय शक्तियों में विभाजित हो गया। १९वीं शताब्दी में इसका बड़ा भाग रूसी साम्राज्य का और बाकी का भाग आस्ट्रो-हंगेरियन नियंत्रण में आ गया। बीच के कुछ वर्षो के उथल-पुथल के पश्चात १९२२ में सोवियत संघ के संस्थापक सदस्यों में से एक बना। १९४५ में यूक्रेनियाई एसएसआर संयुक्त राष्ट्रसंघ का सह-संस्थापक सदस्य बना। सोवियत संघ के विघटन के बाद युक्रेन पुनः स्वतंत्र देश बना। नाम की उत्पत्ति यूक्रेन के नाम की व्युत्पत्ति के बारे में अलग अलग परिकल्पनाये हैं। सबसे व्यापक और पुरानी परिकल्पना के अनुसार इसका अर्थ \"परदेश\" है, जबकि हाल ही के कुछ अध्ययन में इसका एक अलग ही अर्थ \"मातृभूमि\" या \"क्षेत्र, देश\" का दावा किया जा रहा है। अधिकतर इंग्लिश बोलने बाले देशों में इसे \"द यूक्रेन\" के नाम से ही जाना जाता है। इतिहास १९वी शताब्दी,प्रथम विश्व युद्ध, और क्रांति १९वीं सदी में, ऑस्ट्रिया और रूस के बीच में यूक्रेन की स्थिति एक ग्रामीण क्षेत्र जैसी ही थी। इन देशो में होते तेजी से शहरीकरण और आधुनिकीकरण के बीच यूक्रेन में भी राष्ट्रवाद, बुद्धिजीवीवर्ग का उदय हुआ जिनमे प्रमुख नाम राष्ट्रीय कवि तारस शेवचेन्को (1814-1861) तथा राजनीतिक विचारक मिखाइलो द्राहोमनोव (1841-1895) का रहा। रूस-तुर्की युद्ध (1768-1774) के बाद, रूस के शासको ने यूक्रेन में रह रहे तुर्कीयों की जन्संख्या में कमी लाने के लिए, विशेष कर क्रीमिया में जर्मन आव्रजन को प्रोत्साहित किया, जिसका लाभ आगे चल कर कृषिक्षेत्र में हुआ १९वीं सदी के आरम्भ में, यूक्रेन से रूसी साम्राज्य के सुदूर क्षेत्रों में लोगो का पलायन किया गया था। १८९७ की जनगणना के अनुसार, साइबेरिया में 223,000 और मध्य एशिया में 102,000 यूक्रेनियन थे। जबकि 1906 में ट्रांस-साइबेरियन रेलवे के उद्घाटन के बाद अतिरिक्त 1.6 मिलियन लोगो को यूक्रेन के बाहर बसाया गया। यूक्रेन के बाहर यूक्रेनी की इतनी बड़ी जनसँख्या के कारण, सुदूर पूर्वी क्षेत्र, \"ग्रीन यूक्रेन\" के रूप में जाना जाने लगा। १९वीं सदी में राष्ट्रवादी और समाजवादी पार्टियों का उदय हुआ। ऑस्ट्रियन गैलिसिया, हैब्सबर्ग्ज़ की अपेक्षाकृत उदार नियम के तहत, राष्ट्रवादी आंदोलन का केंद्र बन गया। प्रथम विश्व युद्ध में यूक्रेन ने केन्द्रीय शक्तियों, की ओर से ऑस्ट्रिया के तहत, तथा ट्रिपल इंटेंट, की ओर से रूस के तहत में प्रवेश किया। 35 लाख यूक्रेनियन, इम्पीरियल रूसी सेना के साथ लड़ाई लड़ी है, जबकि…"} {"instruction": "Create a function to print a multiline message in Python", "input": "message = \"This is a multiline message.\"", "output": "def print_multiline_message(message): print(message)"} {"instruction": "Create a Python function to print out a string in reverse order.", "input": "\"This is a string\"", "output": "def reverse_string(input_str): return input_str[::-1] print(reverse_string(\"This is a string\"))"} {"instruction": "Develop a code that implements linear regression in Python.", "input": "", "output": "import numpy as np\n\n# define the data\n# X = [1, 2, 3, 4, 5]\n# Y = [2, 4, 5, 4, 5]\nX = np.array([1, 2, 3, 4, 5])\nY = np.array([2, 4, 5, 4, 5])\n\n# calculate the mean of x and y\nxmean = np.mean(X)\nymean = np.mean(Y)\n\n# calculate the equations\nnum = 0\nden = 0\n\nfor i in range(len(X)):\n num += (X[i] - xmean)*(Y[i] - ymean)\n den += (X[i] - xmean)**2\n\n# calculate m and c \nm = num/den\nc = ymean - m*xmean\n\n# display the line equation \nprint(\"Regression line equation:\")\nprint(\"y = {}x + {}\".format(m, c))"} {"instruction": "Create an HTML page demonstrating the application of \"for\" loop in JavaScript", "input": "", "output": " "} {"instruction": "Correct the following code and generate an output:", "input": "list_of_ints = [2, 3, 4, 8] for x in list_of_ints print(x)", "output": "list_of_ints = [2, 3, 4, 8] for x in list_of_ints: print(x) # Output: 2 3 4 8"} {"instruction": "Generate a random string with 10 characters.", "input": "", "output": "let randomString = Math.random().toString(36).substring(2, 12);"} {"text": "[EN Wikipedia] HD 111395\n\nHD 111395 is a single, variable star in the northern constellation of Coma Berenices. It has the variable star designation LW Com, short for LW Comae Berenices; HD 111395 is the Henry Draper Catalogue designation. The star has a yellow hue and is just bright enough to be barely visible to the naked eye with an apparent visual magnitude that fluctuates around 6.29. Based upon parallax measurements, it is located at a distance of 55.8 light years from the Sun. The star is drifting closer with a radial velocity of −8.9 km/s. It is a member of the Eta Chamaeleontis stellar kinematic group. This object is a G-type main-sequence star with a stellar classification of G7V. It is a BY Draconis variable that varies in brightness by about 0.10 magnitude over a period of 15.8 days, which is interpreted as the rotation period of the star. (Messina et al. (2003) suspect the actual rotation period may be half that: 7.9 days.) It has an active chromosphere and is a source for X-ray emission. The star is around a billion years old with a projected rotational velocity of 3.8 km/s. It has slightly above solar metallicity − the term astronomers use for the relative abundance of elements other than hydrogen and helium. The mass of the star is 8% greater than the Sun, but it has 93% of the Sun's radius. It is radiating 80% of the luminosity of the Sun from its photosphere at an effective temperature of 5649 K. An infrared excess indicates a cold debris disk is orbiting the star at a distance of with a mean temperature of 60 K. The disk has an estimated mass of . References G-type main-sequence stars BY Draconis variables Circumstellar disks Coma Berenices 4864 Durchmusterung objects Gliese and GJ objects 111395 62523 Comae Berenices, LW"} {"instruction": "Generate a classifier in Python using the Random Forest algorithm.", "input": "Features: Weight, Size\nLabel: Type", "output": "from sklearn.ensemble import RandomForestClassifier\n\nX = [[Weight, Size]]\ny = [Type]\n\nmodel = RandomForestClassifier(random_state=0)\nmodel.fit(X, y)"} {"instruction": "Create a Bash script to print the argument provided.", "input": "", "output": "echo \"This is the argument: $1\""} {"instruction": "Convert the given JSON data into Python dictionary.", "input": "{\"name\": \"John\", \"age\": 30, \"hobby\": \"running\"}", "output": "import json\n\ndata = '{\"name\": \"John\", \"age\": 30, \"hobby\": \"running\"}'\ndict_data = json.loads(data)\n\nprint(dict_data)"} {"instruction": "Write a Java program to find the element that appears maximum number of times in an array.", "input": "int [] arr1 = {2, 8, 7, 2, 8, 2, 6}", "output": "public class MaxElement { public static void main(String[] args) { int[] arr1 = {2, 8, 7, 2, 8, 2, 6}; int count = 1; int max_element=arr1[0]; int temp_count; for (int i = 0; i < arr1.length; i++) { temp_count = 1; for (int j = i+1; j < arr1.length; j++) { if(arr1[i] == arr1[j]){ temp_count++; } } if(temp_count > count){ count = temp_count; max_element=arr1[i]; } } System.out.println(\"Max Element : \"+max_element); } }"} {"instruction": "Given an array of numbers, write a Python function to remove even numbers from the array.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "def remove_even_numbers(arr): return [x for x in arr if x % 2 != 0]"} {"instruction": "Develop a function in Python to calculate the circumference of a circle.", "input": "", "output": "def calculate_circumference(radius):\n circumference = 2 * 3.14 * radius\n return circumference\n\nif __name__ == '__main__':\n radius = 10\n circumference = calculate_circumference(radius)\n print(circumference)"} {"instruction": "Generate prime numbers between two given numbers", "input": "start = 8 end = 20", "output": "The prime numbers between 8 and 20 are 11, 13, 17, 19"} {"text": "[CS Wikipedia] Na samotě u lesa\n\nNa samotě u lesa je česká komedie režiséra Jiřího Menzela z roku 1976. Byla natáčena poblíž Radešic (chalupa) a ve Svatém Janu (pohřeb, rvačka v hospodě) v okrese Příbram. Obsah Film vypráví o obyčejné pražské rodince Lavičkových a její snaze výhodně získat domek na venkově. Lavičkovi se domluví se svérázným starým panem Komárkem (Josef Kemr), že si pronajmou místnost v jeho chaloupce a on tam bude bydlet až do jara, kdy se odstěhuje za synem na Slovensko a dům jim prodá. Jak ale čas plyne, nevypadá to, že by se pan Komárek chystal k odchodu, a zatímco Věra Lavičková naléhá na svého muže, aby panu Komárkovi připomněl jeho záměr se odstěhovat, Oldřich se k tomu nemá a naopak se s dobráckým dědou spřátelí... Zajímavosti V 3. díle zábavného pořadu Veselé příhody z natáčení vyprávějí Ladislav Smoljak a Zdeněk Svěrák mystifikační historky ze zákulisí vzniku filmu. Externí odkazy Na samotě u lesa na serveru Filmová místa České filmové komedie Filmy Jiřího Menzela Filmy z roku 1976"} {"instruction": "Create a class in Python named \"MyCalculator\" with a method \"sum\" that calculates the sum of two numbers.", "input": "", "output": "class MyCalculator:\n def __init__(self):\n pass\n \n def sum(self, a, b):\n return a + b"} {"instruction": "Determine the type of an object.", "input": "\"Hello\"", "output": "type(“Hello”)"} {"instruction": "Modify the following CSS code to change the background color of the element to \"#FFC0CB\"", "input": ".main-page { background-color: #FFF; }", "output": ".main-page { background-color: #FFC0CB; }"} {"instruction": "Create a SELECT query in MySQL to find the records in a given table that satisfy a certain condition.", "input": "Table Name: orders Condition: quantity > 20", "output": "SELECT * FROM orders WHERE quantity > 20;"} {"instruction": "Construct a deep neural network in Python to perform sentiment analysis on a collection of movie reviews.", "input": "", "output": "import tensorflow as tf\nfrom tensorflow.keras.layers import Embedding, Dense, Dropout, LSTM\nfrom tensorflow.keras.models import Sequential\n\n#Create the network\nmodel = Sequential()\n\n#Add embedding layer\nmodel.add(Embedding(1000, 64))\n\n#Add two LSTM layers\nmodel.add(LSTM(32, return_sequences = True))\nmodel.add(LSTM(32))\n\n#Add two dense layers\nmodel.add(Dense(64, activation='relu'))\nmodel.add(Dense(1, activation='sigmoid'))\n\n#Compile\nmodel.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])"} {"instruction": "Create a question-answering system using Python and Natural Language Processing.", "input": "", "output": "import nltk, numpy\nfrom nltk.stem.lancaster import LancasterStemmer\nstemmer = LancasterStemmer()\n \n# importing our intents file\nimport json\nwith open('intents.json') as json_data:\n intents = json.load(json_data)\n \n# tokenizing patterns\nwords = []\nclasses = []\ndocuments = []\nignore_words = ['?']\n# loop through each sentence in our intents patterns\nfor intent in intents['intents']:\n for pattern in intent['patterns']:\n # tokenize each word in the sentence\n w = nltk.word_tokenize(pattern)\n # add to our words list\n words.extend(w)\n # add to documents in our corpus\n documents.append((w, intent['tag']))\n # add to our classes list\n if intent['tag'] not in classes:\n classes.append(intent['tag'])\n \n# stem and lower each word and remove duplicates\nwords = [stemmer.stem(w.lower()) for w in words if w not in ignore_words]\nwords = sorted(list(set(words)))\n \n# remove duplicates\nclasses = sorted(list(set(classes)))\n \n# create our training data\ntraining = []\noutput = []\n# create an empty array for our output\noutput_empty = [0] * len(classes)\n# training set, bag of words for each sentence\nfor doc in documents:\n # initialize our bag of words\n bag = []\n # list of tokenized words for the pattern\n pattern_words = doc[0]\n # stem each word\n pattern_words = [stemmer.stem(word.lower()) for word in pattern_words]\n # create our bag of words array\n for w in words:\n bag.append(1) if w in pattern_words else bag.append(0)\n \n training.append(bag)\n # output is a '0' for each tag and '1' for current tag\n output_row = list(output_empty)\n output_row[classes.index(doc[1])] = 1\n output.append(output_row)\n \n# sample training/output\ni = 0\nw = documents[i][0]\nprint ([stemmer.stem(word.lower()) for word in w])\nprint (training[i])\nprint (output[i])\n\n# import tensorflow\nimport numpy\nimport tflearn\nimport tensorflow as tf\nimport random \n \n# seed\nrandom.seed(1) \n# transform as a numpy array\ntraining = numpy.array(training)\noutput = numpy.array(output)\n \n# build deep neural network \nnet = tflearn.input_data(shape=[None, len(training[0])])\nnet = tflearn.fully_connected(net, 8)\nnet = tflearn.fully_connected(net, 8)\nnet = tflearn.fully_connected(net, len(output[0]), activation=\"softmax\")\nnet = tflearn.regression(net)\n \n# define model and setup tensor board\nmodel = tflearn.DNN(net, tensorboard_dir='tflearn_logs')\n# start training (apply gradient descent algorithm)\nmodel.fit(traini"} {"text": "[DE Wikipedia] Stéphane Simian\n\nStéphane Simian (* 8. Juni 1967 in Le Pontet, Département Vaucluse) ist ein ehemaliger französischer Tennisspieler. Karriere Simian wurde 1991 Tennisprofi und stand bereits im darauf folgenden Jahr in seinem ersten Einzelfinale auf der ATP World Tour. In Tel Aviv unterlag er jedoch in drei Sätzen Jeff Tarango. Seine größten Erfolge hatte er im Jahr 1994, als er in Doha und Seoul jeweils den Turniersieg erringen konnte sowie zusammen mit Ken Flach im Finale von Delray Beach stand. Sein zweites und zugleich letztes Finale im Einzel erreichte er 1996 in Rosmalen; dort unterlag er Richey Reneberg glatt in zwei Sätzen. Auf der ATP Challenger Tour gewann er fünf Doppel- und zwei Einzeltitel. Seine höchsten Notierungen in der ATP-Weltrangliste erreichte er 1993 mit Position 41 im Einzel sowie 1994 mit Position 56 im Doppel. Sein bestes Einzelergebnis bei einem Grand-Slam-Turnier war das Erreichen der dritten Runde der Australian Open und der French Open. In der Doppelkonkurrenz stand er 1994 an der Seite von Jean-Philippe Fleurian im Achtelfinale der French Open. Turniersiege Doppel Weblinks Tennisspieler (Frankreich) College-Tennis-Spieler Franzose Geboren 1967 Mann"} {"instruction": "Generate a Python class to define a complex number and an operator overloading function to add two complex numbers.", "input": "", "output": "class ComplexNumber:\n def __init__(self, real, imaginary):\n self.real = real\n self.imaginary = imaginary\n \n def __add__(self, other):\n return ComplexNumber(self.real + other.real, \n self.imaginary + other.imaginary)"} {"instruction": "Write a function to remove a given element from an array of integers.", "input": "arr = [2, 3, 4, 5, 6] remove_element = 4", "output": "def remove_element(arr, remove_element): new_arr = [] for item in arr: if item != remove_element: new_arr.append(item) return new_arr"} {"instruction": "Write a code to extract data from a web page using python requests.", "input": "", "output": "\"\"\"\nExtract data from a web page using python requests\n\"\"\"\n\nimport requests\n\n# Define the url\nurl = 'https://example.com'\n\n# Get the data from the url\nresponse = requests.get(url)\n\n# Extract the data\ndata = response.text # or response.json() for JSON data\n\n# Print the data\nprint(data)"} {"instruction": "Code a function that takes a dictionary as a parameter and prints out the key-value pairs.", "input": "", "output": "def print_dict(dictionary): for key, value in dictionary.items(): print(f\"{key}: {value}\")"} {"instruction": "Develop a Python script to generate an array of given size filled with random numbers.", "input": "int size = 10", "output": "import random\n\ndef arr_of_random_numbers(size):\n arr = []\n for i in range(size):\n arr.append(random.randint(1, 100))\n return arr\n\nsize = 10\narr = arr_of_random_numbers(size)\nprint(arr)"} {"text": "[EN Wikipedia] E.J. White\n\nElyse White is an English professor at Stony Brook University, and author of You Talkin' to Me?: The Unruly History of New York English. White is a Fellow of the Society for the Humanities. During an interview on WSHU about her 2020 book You Talkin' To Me?: The Unruly History of New York English, White confessed that when she first arrived at a New York City airport to take up her new position at a New York City University, she was surprised to hear a New York City accent. She said she thought the accent was an invention of television writers. In its review, The Economist quotes White explaining that New Yorkers regard what outsiders see as aggressiveness as merely a flattering sign of engagement and interest. In its review, The Wall Street Journal quoted White's comments of the influence the New York accent had on the lyrics of the popular songs or Ira Gershwin and Cole Porter. Publications References Living people Stony Brook University faculty Year of birth missing (living people)"} {"instruction": "Write a Python program to find the nth term of Fibonacci Series.", "input": "", "output": "def nth_term_fibonacci(n): \n a = 0\n b = 1\n if n < 0: \n print(\"Incorrect input\") \n elif n == 0: \n return a \n elif n == 1: \n return b \n else: \n for i in range(2,n): \n c = a + b \n a = b \n b = c \n return b"} {"text": "[HI Wikipedia] उशोजी भाषा\n\nउशोजी (Ushoji, ), जिसे उशोजो (Ushojo, ) भी कहते हैं, शीना शाखा की एक दार्दी भाषा है जो पाकिस्तान के ख़ैबर​-पख़्तूनख़्वा प्रान्त के कोहिस्तान और स्वात ज़िलों में बोली जाती है। सन्दर्भ हिन्द-आर्य भाषाएँ दार्दी भाषाएँ पाकिस्तान की भाषाएँ"} {"instruction": "Implement a Java class that encapsulates a basic for loop.", "input": "", "output": "public class loop { public void forLoop(int start, int end){ for(int i=start; i\"Political Process in Uttar Pradesh: Identity, Economic Reforms, and Governance ,\" Sudha Pai (editor), Centre for Political Studies, Jawaharlal Nehru University, Pearson Education India, 2007, ISBN 9788131707975< मथुरा की अवस्थिती मथुरा, भगवान कृष्ण की जन्मस्थली और भारत की प्राचीन नगरी है। हालांकि उत्खनन द्वारा प्राप्त इस नगर का साक्ष्य कुषाण कालीन है। पुराण कथा अनुसार शूरसेन देश की यहाँ राजधानी थी। पौराणिक साहित्य में मथुरा को अनेक नामों से संबोधित किया गया है जैसे- शूरसेन नगरी, मधुपुरी, मधुनगरी, मधुरा आदि। भारतवर्ष का वह भाग जो हिमालय और विंध्याचल के बीच में पड़ता है, जो प्राचीनकाल में आर्यावर्त कहलाता था। यह यमुना नदी के किनारे बसा हुआ है। यह आगरा से दिल्ली की ओर और दिल्ली से आगरा की ओर क्रमश: 58 किलोमीटर उत्तर-पश्चिम एवं 145 किलोमीटर दक्षिण-पश्चिम में यमुना के किनारे राष्ट्रीय राजमार्ग 2 पर स्थित है। वाल्मीकि रामायण में मथुरा को मधुपुर या मधुदानव का नगर कहा गया है तथा यहाँ लवणासुर की राजधानी बताई गई है। इस नगरी को इस प्रसंग में मधुदैत्य द्वारा बसाई, बताया गया है। लवणासुर, जिसको शत्रुघ्न ने युद्ध में हराकर मारा था इसी…"} {"instruction": "Explain how to use functions in Python to perform operations on dictionaries.", "input": "", "output": "Python dictionaries are mappings between keys and values, allowing for efficient retrieval of values using its associated key. Various functions can be used to manipulate the data in the dictionaries, such as the get() function to retrieve the value for a given key, the clear() function to delete all values, the keys() and values() functions to retrieve all keys and values respectively, and the items() function to retrieve a list of key-value pairs."} {"instruction": "Write a function to validate an email address in Python.", "input": "", "output": "def validate_email(email):\n \"\"\"This function validates an email address.\n\n It returns True if the email address is valid, False otherwise.\n \"\"\"\n\n if len(email) > 7:\n if re.match('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$', email) is not None:\n return True\n return False"} {"instruction": "Create an Android function to get the current battery level.", "input": "", "output": "public float GetBatteryLevel(Context context){ Intent batteryIntent = context.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); int level = batteryIntent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); int scale = batteryIntent.getIntExtra(BatteryManager.EXTRA_SCALE, -1); if(level == -1 || scale == -1){ return 50.0f; } return ((float)level / (float)scale) * 100.0f; }"} {"instruction": "Create a Java program that prints out the sum of the numbers in the array.", "input": "int[] numbers = {1, 2, 3 , 4, 5};", "output": "public class SumOfArray { public static void main(String[] args) { int[] numbers = {1, 2, 3 , 4, 5}; int sum = 0; for(int i=0; i < numbers.length;i++) { sum = sum + numbers[i]; } System.out.println(\"The sum of numbers in the given array is: \" + sum); } }"} {"instruction": "Write a code in which the values in the dictionaries will be swapped.", "input": "dic = {'x': 10, 'y': 20}", "output": "def swap_dictionary_values(dic): \"\"\"Function to swap the values in the dictionaries\"\"\" dic['x'], dic['y'] = dic['y'], dic['x'] return dic if __name__ == '__main__': dic = {'x': 10, 'y': 20} swapped_dic = swap_dictionary_values(dic) print(swapped_dic) # {'x': 20, 'y': 10}"} {"text": "[CS Wikipedia] Senoni\n\nSenoni (starořecky: Σήνωνες) byl starověký keltský kmen, který v druhé polovině tisíciletí př. n. l. obýval Apeninský poloostrov a je známý také z období galských válek. Senoni v Itálii Podle legendy se tento kmen připojil k Bellovesově migraci do Itálie, společně s Aedui, Ambarry, Arverny, Aulerky a Carnuty. V roce 400 př. n. l. překročili Alpy a postupovali na jih k území kmene Umbrů, aby se usadili na východním pobřeží Itálie mezi městy Forlì, Ancona a Terni, kde založili město Sena Gallica, které se stalo jejich hlavním městem. V roce 391 př. n. l. pod vedením Brennuse napadli území Etrusků a obléhali Clusium. Obyvatelé města apelovali na Řím, jehož zásah posléze vedl ke konfliktu, který vyvrcholil 18. července 390 př. n. l. porážkou Římanů v bitvě na řece Allia. Po více než 100 let mezi Senony s Římany vznikaly konflikty, až v roce 283 př. n. l. byli z Apeninského poloostrova vyhnáni konzulem Corneliem Dolabellou. V Itálii již o nich nebyla zmínka. Je možné, že se stali součástí galských gangů, které pobývaly v Podunají, Makedonii a Malé Asii. Senoni v Galii Část kmene Senonů (nebo jiný kmen stejného jména) byl usazený v okolí dnešních francouzských departementů Seine-et-Marne, Loiret a Yonne. V letech 54–51 př. n. l. byli zapojeni do galských válek Julia Caesara, v nichž spolu s treverským vůdcem Indutiomarem obléhali zimní tábory Tita Labiena a následující rok se angažovali v bitvě u Lutetie. Po galských válkách Senoni zmizeli z dějin. V pozdější době se pravděpodobně smísili s obyvateli římské provincie Gallia Lugdunensis. Jejich hlavním městem bylo Agedincum (později Senones a dnes Sens), dalšími založenými městy byly Metiosedum, (dnešní Melun, podle A. Holdera spíše Meudon) a Vellaunodunum, jehož lokace je nejistá (pravděpodobně Château-Landon). Založili i Senj v dnešním Chorvatsku. Reference Externí odkazy Keltské kmeny"} {"instruction": "Write a JavaScript function for finding the biggest element in an array.", "input": "[2, 4, 5, 6, 8, 10]", "output": "function findMax(arr) { let max = arr[0]; for (let i = 0; i < arr.length; i++) { if (arr[i] > max) max = arr[i]; } return max; }"} {"instruction": "Can you generate a sytax tree of a given Python statement?", "input": "statement = \"x = 5;\"", "output": "Syntax Tree: \n\nAssign(targets=[Name(id='x', ctx=Store())], value=Num(n=5))"} {"text": "[DE Wikipedia] Reichsgerichtsgebäude\n\nDas Reichsgerichtsgebäude ist als Gerichtsgebäude für das Reichsgericht entworfen und gebaut worden und dient seit 2002 dem Bundesverwaltungsgericht als Sitz. Es liegt in unmittelbarer Nähe des Neuen Rathauses im Leipziger Musikviertel. Architektur Dem Bau ging 1884/1885 ein Architektenwettbewerb voraus, über den die Fachzeitschrift Centralblatt der Bauverwaltung im Frühjahr 1885 sehr ausführlich berichtete. Errichtet wurde das Reichsgerichtsgebäude in siebenjähriger Bauzeit von 1888 bis 1895 nach dem überarbeiteten Wettbewerbsentwurf der Architekten Ludwig Hoffmann und Peter Dybwad. Dybwad überwachte die Ausführungsplanung und die Bauausführung, er blieb nach der Fertigstellung in Leipzig und war dort als selbständiger Architekt erfolgreich. Die Architektur des Gerichtsgebäudes knüpft an die italienische Spätrenaissance (und damit an die römische Antike) sowie an Bauten des französischen Barock an. Die lange Zeit übliche Einordnung in den späten Historismus erwies sich im Rahmen einer kunsthistorischen Analyse des Gebäudes als problematisch. Das Reichsgerichtsgebäude ähnelt in der Grundkonzeption dem Reichstagsgebäude in Berlin. Die Bauten wurden zur ungefähr gleichen Zeit errichtet und orientieren sich an historischen Schloss- und Museumsbauten. Auf dem imposanten Gebäude thront eine hohe Kuppel, die von der Skulptur Die Wahrheit bekrönt wird. Das Hauptportal des Gebäudes an der Ostfassade liegt am heute nach dem ersten Präsidenten des Reichsgerichts Eduard von Simson (1810–1899) benannten Platz. Die Nordseite schmücken Skulpturen von Persönlichkeiten der deutschen Rechtsgeschichte: Eike von Repgow (Sachsenspiegel), Johann von Schwarzenberg (Constitutio Criminalis Bambergensis), Johann Jacob Moser, Carl Gottlieb Svarez (Allgemeines Landrecht), Anselm von Feuerbach und Friedrich Carl von Savigny. Das Innere des Gebäudes ist sowohl funktional als auch gestalterisch eng auf die ursprüngliche Nutzung bezogen. Die Skulpturen, Plastiken und aufwändigen Wandmalereien beschäftigen sich mit den Themen Untersuchung, Urteil, Vollstreckung und Gnade. Besonders repräsentativ gestaltet ist der Große Sitzungssaal, an dessen Wänden Sinnbilder und Wappen aller Bundesstaaten des Deutschen Reichs angebracht sind. Die Bleiglasfenster des Raums zeigen die Wappen aller Städte, die Sitz eines Oberlandesgerichts waren. Sämtliche figürlichen und ornamentalen Glasmalereien in dem Gebäude schuf Alexander Linnemann in Frankfurt am Main. Nutzung Das Gebäude diente von 1895 bis 1945 seiner eigentlichen Bestimmung als Sitz des Reichsgerichts. Außerdem hatte hier die Reichsanwaltschaft ihren Sitz, die als oberste Anklagebehörde historische Vorläuferin der Bundesanwaltschaft war. Im Zweiten Weltkrieg wurde das Gebäude zu einem Drittel zerstört. Nach der Sanierung zog im Mai 1952…"} {"instruction": "Format the following code according to PEP 8 style guidelines.", "input": "def function1( a, b, c): d = a+b*c return d", "output": "def function1(a, b, c): d = a + b * c return d"} {"instruction": "Construct a Python code to combine the elements of two given list and return a sorted union list.", "input": "input_list_1: [4, 10, 2]\ninput_list_2: [10, 2, 15]", "output": "def union_list(list1, list2): \n list3 = list1 + list2 \n list3.sort() \n return list3 \n \nunion_list(input_list_1, input_list_2)"} {"instruction": "Given the following array, delete all occurrences of the number 4.", "input": "list1 = [4, 3, 4, 2, 3, 4, 4]", "output": "list1 = [4, 3, 4, 2, 3, 4, 4] def delete_four(arr): \"\"\"This function deletes all occurrences of the number 4 in the given array\"\"\" for i in range(len(arr)): if arr[i] == 4: arr.pop(i) i -= 1 return arr print(delete_four(list1))"} {"instruction": "Write a Python program to create a Caesar Cipher encryption for a given string.", "input": "", "output": "def encrypt(text,s): \n result = \"\" \n \n # traverse text \n for i in range(len(text)): \n char = text[i] \n \n # Encrypt uppercase characters \n if (char.isupper()): \n result += chr((ord(char) + s-65) % 26 + 65) \n \n # Encrypt lowercase characters \n else: \n result += chr((ord(char) + s - 97) % 26 + 97) \n \n return result"} {"instruction": "Develop a Python Class that retrieves and displays web page content.", "input": "", "output": "import requests\n\nclass WebPageContent:\n def __init__(self, url):\n self.url = url\n\n def get_content(self):\n response = requests.get(self.url)\n if response.status_code == 200:\n return response.text\n \n def display_content(self):\n content = self.get_content()\n if content is not None:\n print(content)\n\n# Usage\nurl = \"https://www.example.com\"\nweb_page = WebPageContent(url)\nweb_page.display_content()"} {"instruction": "Create a linked list from the given array of numbers.", "input": "[2, 4, 5, 6, 7]", "output": "Head -> 2 -> 4 -> 5 -> 6 -> 7 -> None"} {"instruction": "Create a Python program to tokenize a sentence and calculate the frequency of each word in the sentence.", "input": "The quick brown fox jumps over the lazy dog", "output": "import nltk\n\nsentence = \"The quick brown fox jumps over the lazy dog\"\n\nwords = nltk.word_tokenize(sentence)\n\nword_freq = {}\n\nfor word in words:\n if word in word_freq:\n word_freq[word] += 1\n else:\n word_freq[word] = 1\n\nprint(word_freq)"} {"instruction": "Write a Python program to find the four letter words from a given list.", "input": "[\"tree\", \"door\", \"apple\", \"ball\", \"house\", \"cat\", \"wood\"].", "output": "\"\"\" A Python program to find the four letter words from a given list \"\"\" # Initializing the list words = [\"tree\", \"door\", \"apple\", \"ball\", \"house\", \"cat\", \"wood\"] # Using list comprehension to extract four letter words four_letter_words = [word for word in words if len(word) == 4] # Printing the four letter words print(\"Four letter words:\", four_letter_words)"} {"instruction": "Write an algorithm to calculate the average of a list of integers given as input.", "input": "", "output": "def average(nums): \"\"\" Takes a list of numbers and returns the average. \"\"\" total = 0 for num in nums: total += num return total / len(nums)"} {"instruction": "Split the following string into words in Python", "input": "string = 'this_is_a_string_in_python'", "output": "# Split the string by '_' separator\nwords = string.split('_')\n\n# Print each word separately\nfor word in words:\n print(word)"} {"instruction": "Create a basic graphical user interface in Python using tkinter.", "input": "Not applicable", "output": "import tkinter as tk\n\nroot = tk.Tk()\nframe = tk.Frame(root)\nframe.pack()\n\nbutton = tk.Button(frame, \n text=\"Click Me!\", \n fg=\"blue\",\n command=lambda: print(\"Hello World!\"))\nbutton.pack(side=tk.LEFT)\n\nclose = tk.Button(frame, \n text=\"Exit\", \n fg=\"red\",\n command=quit)\nclose.pack(side=tk.LEFT)\n\nroot.mainloop()"} {"instruction": "Generate a python class for a linked list.", "input": "", "output": "class LinkedList:\n def __init__(self, value=None):\n self.value = value\n self.next = None\n \n def append(self, value):\n if self.value is None:\n self.value = value\n return\n temp = self\n while temp.next is not None:\n temp = temp.next\n temp.next = LinkedList(value)"} {"instruction": "Develop a machine learning model in Python to predict the survival rate of a passenger in the Titanic dataset.", "input": "Not applicable", "output": "import pandas as pd\nimport matplotlib.pyplot as plt\nfrom matplotlib import style\nfrom sklearn import preprocessing\nfrom sklearn.model_selection import cross_validate, train_test_split\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.metrics import accuracy_score\n\nstyle.use(\"seaborn-whitegrid\")\n\n# Load the dataset\ndf = pd.read_csv(\"dataset.csv\")\n\n# Preprocess the data\nle = preprocessing.LabelEncoder()\ndf['Sex'] = le.fit_transform(df['Sex'])\n\n# Feature selection\nX = df[['Pclass','Sex','Age','SibSp','Parch','Fare']]\ny = df['Survived']\n\n# Split into training and test sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3)\n\n# Create the model\nmodel = LogisticRegression()\nmodel.fit(X_train, y_train)\n\n# Make predictions\ny_pred = model.predict(X_test)\n\naccuracy = accuracy_score(y_test, y_pred)\nprint('Accuracy: ', accuracy)"} {"instruction": "Write a Python program that takes two strings and returns the longest common subsequence between the two strings.", "input": "String1 = \"ABCDAF\"\nString2 = \"ACBCF\"", "output": "def lcs(string1, string2):\n n = len(string1)\n m = len(string2)\n\n dp = [[0 for x in range(m + 1)] for x in range(n + 1)] \n\n# fill dp table in bottom up manner \nfor i in range(n + 1): \n for j in range(m + 1): \n if i == 0 or j == 0: \n dp[i][j] = 0\n elif string1[i-1] == string2[j-1]: \n dp[i][j] = dp[i-1][j-1] + 1\n else: \n dp[i][j] = max(dp[i-1][j], dp[i][j-1]) \n\n index = dp[n][m] \n\n# Create an array of size of lcs \nlongest_common_subsequence = [\"\"] * (index + 1) \nlongest_common_subsequence[index] = \"\" \n\n# Start from the right-most-bottom-most corner and \n# one by one store characters in lcs[] \ni = n \nj = m \nwhile i > 0 and j > 0: \n\n\t# If current character in X[] and Y are same, then \n\t# current character is part of LCS \n\tif string1[i-1] == string2[j-1]: \n\t\tlongest_common_subsequence[index - 1] = string1[i-1] \n\t\ti-=1\n\t\tj-=1\n\t\tindex-=1\n\n\t# If not same, then find the larger of two and \n\t# go in the direction of larger value \n\telif dp[i-1][j] > dp[i][j-1]: \n\t\ti-=1\n\telse: \n\t\tj-=1\n\nreturn \"\".join(longest_common_subsequence)"} {"instruction": "Explain the difference between .push(), .pop(), .shift() and .unshift() methods in JavaScript arrays.", "input": "", "output": "The .push() method adds an element to the end of an existing array. It takes a single argument, the element to be added, and returns the new length of the array. The .pop() method removes an element from the end of an existing array. It does not take any arguments and returns the element that was removed. The .shift() method removes an element from the beginning of an existing array. It does not take any arguments, and returns the element that was removed. The .unshift() method adds an element to the beginning of an existing array. It takes a single argument, the element to be added, and returns the new length of the array."} {"instruction": "Write a JavaScript expression to generate a random integer between 1 and 25.", "input": "", "output": "var randNumber = Math.floor(Math.random() * 25) + 1;"} {"instruction": "Write a Ruby function that reverses a string.", "input": "", "output": "def reverse_string(str) return str.reverse end"} {"text": "[HI Wikipedia] यूनिकोड\n\nयूनिकोड प्रत्येक अक्षर के लिए एक विशेष संख्या प्रदान करता है, चाहे कोई भी कम्प्यूटर प्लेटफॉर्म, प्रोग्राम अथवा कोई भी भाषा हो। यूनिकोड स्टैंडर्ड को एपल, एच.पी., आई.बी.एम., जस्ट सिस्टम, माइक्रोसॉफ्ट, ऑरेकल, सैप, सन, साईबेस, यूनिसिस जैसी उद्योग की प्रमुख कम्पनियों और कई अन्य ने अपनाया है। यूनिकोड की आवश्यकता आधुनिक मानदंडों, जैसे एक्स.एम.एल, जावा, एकमा स्क्रिप्ट (जावास्क्रिप्ट), एल.डी.ए.पी., कोर्बा ३.०, डब्ल्यू.एम.एल के लिए होती है और यह आई.एस.ओ/आई.ई.सी. १०६४६ को लागू करने का अधिकारिक तरीका है। यह कई संचालन प्रणालियों, सभी आधुनिक ब्राउजरों और कई अन्य उत्पादों में होता है। यूनिकोड स्टैंडर्ड की उत्पति और इसके सहायक उपकरणों की उपलब्धता, हाल ही के अति महत्वपूर्ण विश्वव्यापी सॉफ्टवेयर प्रौद्योगिकी रुझानों में से हैं। यूनिकोड को ग्राहक-सर्वर अथवा बहु-आयामी उपकरणों और वेबसाइटों में शामिल करने से, परंपरागत उपकरणों के प्रयोग की अपेक्षा खर्च में अत्यधिक बचत होती है। यूनिकोड से एक ऐसा अकेला सॉफ्टवेयर उत्पाद अथवा अकेला वेबसाइट मिल जाता है, जिसे री-इंजीनियरिंग के बिना विभिन्न प्लेटफॉर्मों, भाषाओं और देशों में उपयोग किया जा सकता है। इससे आँकड़ों को बिना किसी बाधा के विभिन्न प्रणालियों से होकर ले जाया जा सकता है। यूनिकोड क्या है? यूनिकोड प्रत्येक अक्षर के लिए एक विशेष नम्बर प्रदान करता है, चाहे कोई भी प्लैटफ़ॉर्म हो, चाहे कोई भी प्रोग्राम हो, चाहे कोई भी भाषा हो। कम्प्यूटर, मूल रूप से, नम्बरों से सम्बन्ध रखते हैं। ये प्रत्येक अक्षर और वर्ण के लिए एक नम्बर निर्धारित करके अक्षर और वर्ण संग्रहित करते हैं। यूनिकोड का आविष्कार होने से पहले, ऐसे नम्बर देने के लिये सैंकड़ों विभिन्न संकेत लिपि प्रणालियाँ थीं। किसी एक संकेत लिपि में पर्याप्त अक्षर नहीं हो सकते हैं : उदाहरण के लिए, यूरोपीय संघ को अकेले ही, अपनी सभी भाषाओं को कवर करने के लिये अनेक विभिन्न संकेत लिपियों की आवश्यकता होती है। अंग्रेजी जैसी भाषा के लिये भी, सभी अक्षरों, विरामचिह्नों और सामान्य प्रयोग के तकनीकी प्रतीकों हेतु एक ही संकेत लिपि पर्याप्त नहीं थी। ये संकेत लिपि प्रणालियाँ परस्पर विरोधी भी हैं। इसीलिए, दो संकेत लिपियाँ दो विभिन्न अक्षरों के लिए, एक ही नम्बर प्रयोग कर सकती हैं, अथवा समान अक्षर के लिए विभिन्न नम्बरों का प्रयोग कर सकती हैं। किसी भी कम्प्यूटर (विशेष रूप से सर्वर) को विभिन्न संकेत लिपियाँ संभालनी पड़ती है; फिर भी जब दो विभिन्न संकेत लिपियों अथवा प्लेटफ़ॉर्मों के बीच डाटा भेजा जाता है तो उस डाटा के हमेशा खराब होने का जोखिम रहता है। यूनिकोड से यह सब कुछ बदल रहा है! यूनिकोड की विशेषताएँ (1) यह विश्व की सभी लिपियों से सभी संकेतों के लिए एक अलग कोड बिन्दु प्रदान करता है। (2) यह वर्णों (कैरेक्टर्स) को एक कोड देता है, न कि ग्लिफ (glyph) को। (3) जहाँ भी सम्भव यूनिकोड होता है, यह भाषाओं का एकीकरण करने का प्रयत्न करता है। इसी नीति के अन्तर्गत सभी पश्चिम यूरोपीय भाषाओं को लैटिन के अन्तर्गत समाहित किया गया है; सभी स्लाविक भाषाओं को सिरिलिक (Cyrilic) के अन्तर्गत रखा गया है; हिन्दी, संस्कृत, मराठी, नेपाली, सिन्धी, कश्मीरी आदि के लिये 'देवनागरी' नाम से एक ही खण्ड दिया गया है; चीनी, जापानी, कोरियाई, वियतनामी…"} {"instruction": "Create a function in HTML to display a blinking text on the webpage.", "input": "", "output": " Text to blink"} {"instruction": "Write a loop in Python that accumulates the sum of the numbers in an array.", "input": "[1, 2, 3]", "output": "sum = 0\n\nfor num in [1, 2, 3]:\n sum += num\n\nprint(sum)"} {"instruction": "Write a CSS rule to center a container with class \"main\".", "input": "", "output": ".main { margin: 0 auto; width: 100%; display: block; text-align: center; }"} {"instruction": "Create an PHP script to display the current date and day.", "input": "", "output": ""} {"text": "[DE Wikipedia] Val Trebbia\n\nDas Val Trebbia ist ein Tal in den norditalienischen Regionen Ligurien, Lombardei und Emilia-Romagna. Vom gleichnamigen Fluss geformt, erstreckt es sich vom Monte Prelà in der Metropolitanstadt Genua bis in die Provinz Piacenza und das Oltrepò Pavese bei Brallo di Pregola. Nach einem Verlauf von ungefähr 118 Kilometern mündet die Trebbia bei Rottofreno in den Po. Das im Apenningebirge liegende Tal grenzt im Osten an das Val d’Aveto und das Val Nure, im Westen an das Val Borbera, Val Boreca, Valle Staffora, Val Tidone und Val Luretta. Erschlossen wird es von der Staatsstraße SS45. Weblinks Museo Etnografico Val Trebbia Trebbia Trebbia Tal in der Emilia-Romagna Trebbia Provinz Pavia"} {"instruction": "Build a Python function that normalizes a given array.", "input": "array = [4, 8, 15, 23, 42]", "output": "def normalize(array): min_val = min(array) max_val = max(array) normalized = [ (x-min_val) / (max_val-min_val) for x in array] return normalized"} {"instruction": "Suggest a programming language and a library for text classification.", "input": "", "output": "Python is a great language for text classification tasks and there are several libraries that could be used, including scikit-learn and NLTK. Additionally, pytorch provides a number of utilities for text classification."} {"instruction": "Create a binary search tree in JavaScript.", "input": "", "output": "class Node { constructor(data) { this.data = data; this.left = null; this.right = null; } } class BinarySearchTree { constructor() { this.root = null; } insert(data) { let newNode = new Node(data); if(this.root === null) { this.root = newNode; } else { this.insertNode(this.root, newNode); } } insertNode(node, newNode) { if(newNode.data < node.data) { if(node.left === null) { node.left = newNode; } else { this.insertNode(node.left, newNode); } } else { if(node.right === null) { node.right = newNode; } else { this.insertNode(node.right,newNode); } } } }"} {"text": "[DE Wikipedia] SMAW\n\nDie SMAW (Shoulder-Launched Multipurpose Assault Weapon, deutsch: schultergestützte Mehrzwecksturmwaffe) ist eine amerikanische Panzerabwehrhandwaffe, die vom United States Marine Corps verwendet wird und eine Weiterentwicklung der israelischen B-300 darstellt. Sie wird von einem Infanteristen auf die Schulter aufgelegt und feuert dann eine panzerbrechende Rakete auf ihr Ziel. Diese Waffe ist vor allem in unwegsamem Gelände von Vorteil und wird gegen Panzer und sonstige Fahrzeuge eingesetzt. Die Waffe besteht aus einem glatten Rohr, das die Abfeuerungsvorrichtung und die Zieleinrichtung aufnimmt. Der Flugkörper wird in einem Wegwerf-Rohr transportiert, das mit einem Bajonettverschluss am hinteren Ende des Startrohres befestigt wird, um die Waffe feuerbereit zu machen. Dabei wird die Steuerung des Flugkörpers mit der Waffenanlage gekoppelt. Eine Besonderheit dieser Waffe ist eine spezielle Zielvorrichtung. Diese besteht aus einer rechts am Startrohr angebrachten Einschießwaffe im Kaliber 9 × 51 mm. Das Leuchtspurgeschoss hat dieselben ballistischen Eigenschaften wie die 83-mm-Rakete, sodass der Schütze Ziel- bzw. Probeschüsse abgeben kann, bis er Wind und Entfernung richtig bestimmt hat. Sollte ein solches Geschoss das Ziel treffen, feuert der Schütze die 83-mm-Rakete im selben Winkel ab. Die Vorrichtung zum Abschießen dieser Spezialpatrone hat ein fünfschüssiges Stangenmagazin. Technische Daten Hersteller: McDonnell Douglas Gewicht: 7,54 kg ungeladen (13,85 kg geladen und feuerbereit) Länge: 75,95 cm ungeladen zum Transportieren (137,16 cm geladen und feuerbereit) Effektive Wirkung: Auf ein Ziel von ein bis zwei Meter Größe bis 250 Meter wirkungsvoll Auf ein Ziel in Panzergröße auf 500 Meter wirkungsvoll Durchschlagsleistung: HEAA ca. 600 mm Panzerstahl Kosten: pro Stück 13.000 US-Dollar Munitionsarten: HEDP („high explosive dual purpose“: Mehrzweckgeschoss) HEAA („high explosive anti-armor“: Panzerbrechendes Geschoss) Weblinks Einzelnachweise Panzerabwehrrakete Abkürzung Militärische Ausrüstung (Vereinigte Staaten) he:מטול B-300 שיפון"} {"text": "[DE Wikipedia] George R. Lawrence\n\nGeorge Raymond Lawrence (* 24. Februar 1868 in Ottawa, Illinois; † 15. Dezember 1938) war ein Fotograf aus Nordillinois. Er wuchs auf im Kankakee County und zog 1890 nach Chicago, wo er bei seinem Arbeitgeber eine Erfindung bezüglich Befestigung von eisernen Felgen auf Holzrädern machte. 1891 begann er als Porträt-Fotograf zu arbeiten. Ab 1896 hatte er das zuvor mit einem Geschäftspartner geteilte Studio für sich. Er verbesserte die Mischung des Leuchtpulvers für Blitzlampen auf Magnesiumbasis derart, dass es heller leuchtend und mit weniger Rauch abbrannte, so dass er auch Vater der Blitzlicht-Fotografie genannt wurde. Um 1900 baute er in Chicago die größte Kamera der Welt. Die „Mammut“ wog 600 kg und wurde von 15 Leuten bedient. Er schuf sie, um ein Bild für die Chicago & Alton Railroad Co. zu machen, das auf der Weltausstellung in Paris gezeigt wurde. Des Weiteren machte er Luftbilder von Heißluftballonen aus und mittels elektrisch fernausgelösten Kameras von Drachen aus. Berühmt wurde er durch sein Panoramabild vom erdbebenzerstörten San Francisco aus dem Jahre 1906. Für diese Aufnahme wurde Kamera durch eine Drachenkette auf eine Flughöhe von etwa 600 m angehoben. Lawrence nannte seine Drachenkette \"Captive Airship\", wörtlich übersetzt: Fessel-Luftschiff. Weblinks Biografie von George R. Lawrence auf den Webseiten der Library of Congress Sven Stillich: Extrem-Fotograf George Lawrence: Der Mann mit der Riesenknipse, auf einestages, Zeitgeschichte-Portal von Spiegel Online, 11. April 2013 George Raymond Lawrence in camera-wiki.org Einzelnachweise Fotograf (Vereinigte Staaten) Erfinder Fotograf (19. Jahrhundert) Fotograf (20. Jahrhundert) US-Amerikaner Geboren 1868 Gestorben 1938 Mann"} {"instruction": "Explain how a quicksort algorithm works.", "input": "", "output": "Quicksort is an efficient comparison-based sorting algorithm that works by taking a pivot element and partitioning the list/array into two parts: elements smaller than the pivot element and elements larger than the pivot element. The quicksort algorithm then sorts both sublists recursively until the list is fully sorted. As such, quicksort has a best case complexity of O(nlogn) and a worst case complexity of O(n^2)."} {"instruction": "Program a function in Python that will recognize if a given number is even.", "input": "", "output": "def is_even(num):\n    if num % 2 == 0:\n        return True\n    else:\n        return False"} {"instruction": "To create a Reddit bot that scans a subreddit for new posts containing a specific string in the title, and sends a welcome message to new users who have not posted before, follow the steps below:\n\n1. Install the PRAW library and import it into your Python script.\n2. Import the datetime and sqlite3 libraries.\n3. Define the user configuration variables at the beginning of your script, including your Reddit app ID, secret, URI, refresh token, user agent, subreddit name, maximum number of posts to retrieve at once, wait time between cycles, the string to look for in post titles, and the time limit between a user's posts.\n4. Create a SQL database to store user and post information.\n5. Use the PRAW library to authenticate your bot with Reddit using your app information and refresh token.\n6. Define a function to get the current time in UTC and convert it to a Unix timestamp if needed.\n7. Define a function to scan the subreddit for new posts and check if they contain the specified string in the title.\n8. If the post is from a new user, add them to the database and send them a welcome message.\n9. If the post is from a known user, check if they have exceeded the time limit between posts. If they have, reset their database information. If they have not, remove their post and send them a message indicating how long they must wait before posting again.\n10. Add the post ID to the list of old posts to prevent duplicates.\n11. Run the scan function in a loop with a wait time between cycles.", "input": "", "output": "#/u/GoldenSights\nimport praw\nimport time\nimport datetime\nimport sqlite3\n\n'''USER CONFIGURATION'''\n\nAPP_ID = \"\"\nAPP_SECRET = \"\"\nAPP_URI = \"\"\nAPP_REFRESH = \"\"\n# https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/\nUSERAGENT = \"\"\n#This is a short description of what the bot does. For example \"/u/GoldenSights' Newsletter Bot\"\nSUBREDDIT = \"GoldTesting\"\n#This is the sub or list of subs to scan for new posts. For a single sub, use \"sub1\". For multiple subreddits, use \"sub1+sub2+sub3+...\"\nMAXPOSTS = 30\n#This is how many posts you want to retrieve all at once. PRAW can download 100 at a time.\nWAIT = 20\n#This is how many seconds you will wait between cycles. The bot is completely inactive during this time.\nTSTRING = \"[request]\"\n#This is the part of the title that you want to look for\nDELAY = 172800\n#This is the time limit between a user's posts, IN SECONDS. 1h = 3600 || 12h = 43200 || 24h = 86400 || 144h = 518400\n\n'''All done!'''\n\n\n\nWAITS = str(WAIT)\ntry:\n import bot\n USERAGENT = bot.aG\nexcept ImportError:\n pass\nsql = sqlite3.connect('sql.db')\nprint('Loaded SQL Database')\ncur = sql.cursor()\ncur.execute('CREATE TABLE IF NOT EXISTS users(name TEXT, lastpost TEXT)')\nprint('Loaded Users')\ncur.execute('CREATE TABLE IF NOT EXISTS oldposts(id TEXT)')\nprint('Loaded Oldposts')\nsql.commit()\n\nr = praw.Reddit(USERAGENT)\nr.set_oauth_app_info(APP_ID, APP_SECRET, APP_URI)\nr.refresh_access_information(APP_REFRESH)\n\ndef getTime(bool):\n\ttimeNow = datetime.datetime.now(datetime.timezone.utc)\n\ttimeUnix = timeNow.timestamp()\n\tif bool == False:\n\t\treturn timeNow\n\telse:\n\t\treturn timeUnix\n\ndef scan():\n\tprint('Scanning ' + SUBREDDIT)\n\tsubreddit = r.get_subreddit(SUBREDDIT)\n\tposts = subreddit.get_new(limit=MAXPOSTS)\n\tfor post in posts:\n\t\ttry:\n\t\t\tpauthor = post.author.name\n\t\texcept Exception:\n\t\t\tpauthor = '[deleted]'\n\t\tpid = post.id\n\t\tplink = post.short_link\n\t\tptime = post.created_utc\n\t\tptitle = post.title.lower()\n\t\tif TSTRING.lower() in ptitle:\n\t\t\tcur.execute('SELECT * FROM oldposts WHERE id=?', [pid])\n\t\t\tif not cur.fetchone():\n\t\t\t\tcur.execute('SELECT * FROM users WHERE name=?', [pauthor])\n\t\t\t\tif not cur.fetchone():\n\t\t\t\t\tprint('Found new user: ' + pauthor)\n\t\t\t\t\tcur.execute('INSERT INTO users VALUES(?, ?)', (pauthor, pid))\n\t\t\t\t\tr.send_message(pauthor, 'Welcome to /r/pkmntcgtrades!','Dear ' + pauthor + ',\\n\\n Our bot has determined that this is your first time posting in /r/pkmntcgtrades. Please take the time to read [the guidelines](http://www.reddit.com/r/pkmntcgtr"} {"instruction": "Create a basic Python application to fetch data from an SQL database and display it in the console.", "input": "Not applicable", "output": "import sqlite3\n\nconn = sqlite3.connect('example.db')\n\ncursor = conn.cursor()\n\ncursor.execute('SELECT * FROM users')\nrows = cursor.fetchall()\n\nfor row in rows:\n print(row)\n\nconn.close()"} {"instruction": "पायथन में लिस्ट क्या होती है?", "input": "", "output": "पायथन में लिस्ट एक क्रमबद्ध, परिवर्तनशील (mutable) संग्रह है जो विभिन्न प्रकार के तत्वों को रख सकती है, जैसे [1, 'a', 3.5]।"} {"instruction": "Create a Python program to generate a new dictionary from an existing dictionary given a set of key-pair values.", "input": "dct = {\n \"name\": \"John\",\n \"age\": 20,\n \"species\": \"Human\"\n}\ndesired_pairs = {\"name\": \"Alex\", \"species\": \"AI\"}", "output": "dct = {\n \"name\": \"John\",\n \"age\": 20,\n \"species\": \"Human\"\n}\ndesired_pairs = {\"name\": \"Alex\", \"species\": \"AI\"}\n\n# Generate the new dictionary\nnew_dct = {**dct, **desired_pairs}\n\nprint(new_dct)\n\n# Output: {'name': 'Alex', 'age': 20, 'species': 'AI'}"} {"instruction": "Create a function in JavaScript that takes a string as an argument and returns the number of times that string is repeated in the input string.", "input": "string = \"HelloHello\"", "output": "function countString(str) { let count = 0; for (let i = 0; i < str.length; i++) { if (str.substring(i, i + 5) == \"Hello\") { count++; } } return count; }"} {"instruction": "Suggest a way of preserving the order of elements in a JavaScript array using a set data structure.", "input": "", "output": "A Set data structure can be used for preserving the order of elements in a JavaScript array. To achieve this, the Set can be initialized with an array which contains the elements in the desired order. When adding elements to the Set, they will be added in the same order as they appear in the original array. This ensures the order of elements is preserved."} {"instruction": "Edit the code to make sure that the sum is printed in the console.", "input": "function add(a, b) { let result = a+b; return result; }", "output": "function add(a, b) { let result = a+b; console.log('The sum is: ', result); return result; }"} {"text": "[DE Wikipedia] One Ok Rock/Diskografie\n\nDiese Diskografie ist eine Übersicht über die musikalischen Werke der japanischen Band One Ok Rock. Den Schallplattenauszeichnungen zufolge hat sie bisher mehr als 2,5 Millionen Tonträger verkauft. Ihre erfolgreichsten Veröffentlichungen sind die Studioalben Niche Syndrome, Jinsei×Boku=, 35xxxv, Ambitions und Eye of the Storm mit jeweils über 250.000 verkauften Einheiten. Alben Studioalben EPs Singles Digitale Singles 2012: No Scared (Yokohama Arena, 2012 Live) 2012: the same as... 2014: Mighty Long Fall 2015: Cry out 2015: The Way Back -Japanese ver.- 2016: Always coming back 2016: Taking Off 2016: Bedroom Warfare 2016: I was King 2018: Change 2018: Stand Out Fit In 2019: Wasted Nights 2021: Renegades (JP: , JP: ) Sonderveröffentlichungen 2017: Skyfall (nur bei der Ambitions Japan Tour erhältlich) Videoalben Statistik Chartauswertung Auszeichnungen für Musikverkäufe Weblinks Chartquellen: JP DE AT US One Ok Rock"} {"text": "[EN Wikipedia] Ignas Budrys\n\nIgnas Budrys (1933, Grigaičiai – 1999) was a Lithuanian painter. See also List of Lithuanian painters References 1933 births 1999 deaths People from Vilnius District Municipality 20th-century Lithuanian painters"} {"instruction": "Generate a valid C++ code to implement a linked list with basic operations.", "input": "", "output": "#include using namespace std; class Node { public: int data; Node* next; }; class LinkedList { Node* head; public: LinkedList(){ head = NULL; } void append(int data) { Node* newNode = new Node; newNode->data = data; newNode->next = NULL; if (head == NULL) { head = newNode; } else { Node* temp = head; while (temp->next != NULL) { temp = temp->next; } temp->next = newNode; } } void deleteNodeByData(int data) { if (head == NULL) { return; } if (head->data == data) { Node *temp = head; head = head->next; delete temp; return; } Node *prev; Node *curr = head; while(curr != NULL && curr->data != data) { prev = curr; curr = curr->next; } prev->next = curr->next; delete curr; return; } void printList() { Node* temp = head; while (temp != NULL) { cout << temp->data << endl; temp = temp->next; } } };"} {"text": "[EN Wikipedia] Legson Kayira\n\nLegson Didimu Kayira ( – 14 October 2012) was a Malawian novelist. An ethnic Tumbuka, he received an education at Skagit Valley College, University of Washington and St Catharine's College, Cambridge. His early works focused on Malawi's rural life, while his later writings satirised the Hastings Banda regime. Biography Kayira was born in Mpale, a village in northern Nyasaland (now Malawi); the precise date was not recorded. Soon after his birth, his mother threw him into the Didimu River as she could not afford to feed him. He was rescued and acquired the name \"Didimu\". He himself added the English-sounding name \"Legson\" when he was in primary school. From primary school, Kayira was awarded a place at Livingstonia Secondary School, whose school motto was \"I Will Try\" (a phrase he used as the title of his most famous book). On graduating from this school in 1958 at about the age of 16, he decided that the only way to achieve a college degree was to go to the US, and he set out on foot to do so. When he reached Kampala in Uganda he saw the name of Skagit Valley College, Washington state, in a US Information service directory, so he applied and was awarded a place and a scholarship. Kayira then embarked on a journey of more than 3000 kilometres and walked to Khartoum, Sudan, where he obtained a visa, and people from Skagit Valley raised the money to bring him over to Washington. He arrived at Skagit Valley two years after setting out. After graduating from Skagit Valley, he went on to study Political Science at the University of Washington in Seattle, and then read History at Cambridge University in the UK. Subsequently he worked as a probation officer and was the author of several novels. His autobiography, I Will Try, was on the New York Times bestseller list for 16 weeks after its publication in 1965. He made his home in England, and died in London on 14 October 2012. In October, 2014, an American charitable organization called \"Youth of Malawi\" built a primary school in the rural Malawian village of Chimphamba and named it after Legson Kayira. The Legson Kayira Primary School and Community Center is solar-powered, rainwater harvesting, and boasts an outdoor movie projecter. On October 13, 2016, Legson's ashes were to be interred in Chimphamba Village, during a memorial ceremony attended by his children. Selected writings Fiction The Looming Shadow, Doubleday, 1967. Jingala, Doubleday, 1969. Things Black and Beautiful, Doubleday, 1970. The Civil Servant, Longman, 1971. \"Homecoming\", in Young and Black in Africa anthology, Random House, 1971. The Detainee, Heinemann, 1974. Nonfiction I Will Try (autobiography), Doubleday, 1965 – awarded Northwest Non-Fiction Prize. Further reading Thomas H. Jackson, \"Legson Kayira and the Uses of the Grotesque\",…"} {"instruction": "Create a program in Python to detect outlier points within an array of data.", "input": "A numpy array of numerical data\n`[-6.2, 11.9, 5.7, 7.3, 2.5, 8.4, 14.0, 9.2, 7.4, 11.6]`", "output": "import numpy as np\n\ndef detect_outlier(data):\n # Calculate the median and the inter-quartile range\n q75, q25 = np.percentile(data, [75 ,25])\n iqr = q75 - q25\n \n # Calculate the upper and lower bound\n lower_bound = q25 - (iqr * 1.5)\n upper_bound = q75 + (iqr * 1.5)\n \n # Calculate outlier points\n outlier_points = []\n \n for element in data:\n if element < lower_bound or element > upper_bound:\n outlier_points.append(element)\n \n return outlier_points\n\n# Input array\ndata = np.array([-6.2, 11.9, 5.7, 7.3, 2.5, 8.4, 14.0, 9.2, 7.4, 11.6])\n\n# Call function\noutliers = detect_outlier(data)\n\n# Print outliers\nprint(outliers)\n\n# Output:\n# [-6.2, 14.0]"} {"instruction": "Implement a function in Python that generates a random password with a minimum length of 10 characters.", "input": "No input", "output": "import random\nimport string\n\ndef generate_random_password(n=10):\n chars = string.ascii_uppercase + string.ascii_lowercase + string.digits\n return ''.join(random.choice(chars) for _ in range(n))"} {"instruction": "Write a C++ function that takes two strings as parameters and returns the length of the longest common subsequence between them.", "input": "string1 = \"python\"\nstring2 = \"honor\"", "output": "#include \n#include \n\nint longestCommonSubsequence(std::string s1, std::string s2)\n{\nint s1len = s1.length(); \nint s2len = s2.length(); \n \nint LCS[s1len+1][s2len+1]; \n \nfor (int i = 0; i <= s1len; i++) \n{ \n for (int j = 0; j <= s2len; j++) \n { \n if (i == 0 || j == 0) \n LCS[i][j] = 0; \n \n else if (s1[i - 1] == s2[j - 1]) \n LCS[i][j] = LCS[i - 1][j - 1] + 1; \n \n else\n LCS[i][j] = std::max(LCS[i - 1][j], LCS[i][j - 1]); \n } \n} \n \n \n// returns length of the longest common subsequence \nreturn LCS[s1len][s2len]; \n} \n\nint main() \n{ \n std::string str1 = \"python\"; \n std::string str2 = \"honor\"; \n \n std::cout << longestCommonSubsequence(str1, str2); \n return 0; \n} \n\n// Output: 3"} {"instruction": "What is the result of x = 2 and y = 3 in this function, f(x,y) = x^3 + 2y^2?", "input": "", "output": "The result of x = 2 and y = 3 in the function f(x,y) = x^3 + 2y^2 is 19."} {"text": "[CS Wikipedia] SC Herisau\n\nSC Herisau (celým názvem: Schlittschuhclub Herisau) je švýcarský klub ledního hokeje, který sídlí v obci Herisau v kantonu Appenzell Ausserrhoden. Založen byl v roce 1942. Poslední účast v nejvyšší soutěži je datováno k sezóně 1997/98. Od sezóny 2017/18 působí v 1. lize, čtvrté švýcarské nejvyšší soutěži ledního hokeje. Klubové barvy jsou modrá, červená a bílá. Své domácí zápasy odehrává ve Sportzentrum Herisau s kapacitou 3 152 diváků. Přehled ligové účasti Zdroj: 1961–1962: 2. Liga (4. ligová úroveň ve Švýcarsku) 1975–1976: 2. Liga (4. ligová úroveň ve Švýcarsku) 1980–1981: 1. Liga (3. ligová úroveň ve Švýcarsku) 1981–1984: National League B Ost (2. ligová úroveň ve Švýcarsku) 1984–1985: National League B (2. ligová úroveň ve Švýcarsku) 1985–1986: 1. Liga (3. ligová úroveň ve Švýcarsku) 1986–1997: National League B (2. ligová úroveň ve Švýcarsku) 1997–1998: National League A (1. ligová úroveň ve Švýcarsku) 1998–1999: National League B (2. ligová úroveň ve Švýcarsku) 1999–2000: 1. Liga (3. ligová úroveň ve Švýcarsku) 2000–2001: National League B (2. ligová úroveň ve Švýcarsku) 2001–2002: 2. Liga (4. ligová úroveň ve Švýcarsku) 2002–2005: 1. Liga (3. ligová úroveň ve Švýcarsku) 2005–2010: 2. Liga (4. ligová úroveň ve Švýcarsku) 2010–2014: 1. Liga (3. ligová úroveň ve Švýcarsku) 2014–2017: 2. Liga (4. ligová úroveň ve Švýcarsku) 2017– : 1. Liga (4. ligová úroveň ve Švýcarsku) Odkazy Reference Literatura Merz, Hans Rudolf: 40 Jahre SC Herisau 1942 - 1982 - Bis zur Nationalliga. Vlg. Schlaepfer + Co., Herisau 1982. Werner Schweizer, Jürg Vogel, Klaus Zaugg: Eiszeiten: Das Jahrhundert des Schweizer Eishockeys. Schwanden, Kilchberg 1999, . Externí odkazy Oficiální stránky Švýcarské kluby ledního hokeje Kluby ledního hokeje založené v roce 1942 SC"} {"instruction": "How can we use the set() method to find the unique elements in a given list of integers in C#?", "input": "", "output": "var listOfIntegers = [1,2,3,3,2,2,3]; var uniqueElements = new HashSet(listOfIntegers); foreach (var element in uniqueElements) { Console.WriteLine(element); }"} {"instruction": "Write Python code to fill missing values in a Pandas dataframe with a given value.", "input": "import pandas as pd df = pd.DataFrame([ [8, 'B', 'G'], [28, 'B', np.nan], [22, np.nan, 'G'], [2, 'A', np.nan] ])", "output": "import pandas as pd df = pd.DataFrame([ [8, 'B', 'G'], [28, 'B', np.nan], [22, np.nan, 'G'], [2, 'A', np.nan] ]) df.fillna(value='NA', inplace=True)"} {"instruction": "Design a chaos-based Python program to simulate the predator–prey interactions between a fox and a rabbit.", "input": "Two species: fox and rabbit\nNumber of rabbits: 10\nNumber of foxes: 3", "output": "import random \n \ndef fox_and_rabbit_simulator(num_of_rabbits, num_of_fox): \n \n # Initialize the population \n rabbit_population = [num_of_rabbits] \n fox_population = [num_of_fox] \n \n # Simulation of Fox and Rabbit interaction \n for i in range(365): \n # For every day, the numbers of rabbits and foxes are calculated \n rabbit_pop = rabbit_population[i] * random.uniform(0.9, 1.1) \n fox_pop = fox_population[i] * random.uniform(1.01, 1.2) \n # Calculate the number of foxes and rabbits for next day \n rabbit_population.append(rabbit_pop) \n fox_population.append(fox_pop) \n \n print(\"Rabbit population after 365 days :\", round(rabbit_population[-1])) \n print(\"Fox population after 365 days :\", round(fox_population[-1])) \n \n# Driver Code \nif __name__ == \"__main__\": \n fox_and_rabbit_simulator(10, 3)"} {"instruction": "Use NLP techniques in Python to generate a tagline from a sample text", "input": "Sample text: this painting is an amazing representation of the beauty of nature.", "output": "import nltk\nfrom nltk.tokenize import word_tokenize\n\nsample_text = \"This painting is an amazing representation of the beauty of nature.\"\nwords = word_tokenize(sample_text)\ntags = nltk.pos_tag(words)\n\ngenerator_words = [\"Explore\",\"Discover\",\"Witness\",\"Captivate\", \"Embrace\"]\n\nfor tag in tags:\n if tag[1] == 'JJ':\n print(f'{tag[0]}, {generator_words[random.randint(0,4)]} the Wonder of Nature')"} {"instruction": "Edit the given HTML code so that the header of the web page is centered.", "input": " Centering a header

    This header is not centered

    ", "output": " Centering a header

    This header is now centered

    "} {"instruction": "Create a function to extract the first key of a given dictionary in Python.", "input": "", "output": "def get_first_key(d):\n if d:\n return next(iter(d))\n return None"} {"instruction": "Create an object-oriented Python program to model a Vehicle.", "input": "", "output": "class Vehicle:\n def __init__(self, capacity, speed):\n self.capacity = capacity\n self.speed = speed\n \n def increase_speed(self):\n self.speed += 10\n \n def decrease_speed(self):\n if self.speed > 0:\n self.speed -= 10"} {"instruction": "Write a Java program to find the sum of two arrays of length 10", "input": "", "output": "public static int[] sumArrays(int[] arr1, int[] arr2){ int[] result = new int[arr1.length]; for(int i=0; i max_len: max_len = len(elem) max_string = elem print(max_string)"} {"instruction": "Write an SQL script to list all items with a price greater than 10$.", "input": "Table Name = Item", "output": "SELECT * FROM Item WHERE price > 10;"} {"instruction": "Suggest a plugin or software that can be used to debug a React application.", "input": "", "output": "React's official debugging tool, the React Developer Tools, is a great plugin for debugging React applications. It is available for both Chrome and Firefox, and provides detailed information about the component hierarchy, current props and state of the application, and detailed performance metrics. Additionally, React's Error Boundary feature can be used to detect and debug errors and issues in the React application."} {"instruction": "Given two numbers, find their LCM.", "input": "a = 15 b = 10", "output": "30"} {"instruction": "Create an automation script using Python Selenium to navigate to a web page, click a link, and take a screenshot of the page.", "input": "Input: URL:\nhttps://www.example.com", "output": "from selenium import webdriver\nfrom selenium.webdriver.support.ui import WebDriverWait\nfrom selenium.webdriver.support import expected_conditions as EC\n\n# initialise the driver\ndriver = webdriver.Chrome()\n\n# go to the given URL\ndriver.get(\"https://www.example.com\")\n\n# wait for the page to load\nwait = WebDriverWait(driver, 10)\nwait.until(EC.visibility_of_element_located(driver.find_element_by_xpath('//a[@href=\"link\"]')))\n\n# click the given link\nlink = driver.find_element_by_xpath('//a[@href=\"link\"]')\nlink.click()\n\n# wait for the new page to load\nwait.until(EC.visibility_of_element_located(driver.find_element_by_tag_name('body')))\n\n# take a screenshot of the current page\ndriver.save_screenshot(\"example.png\")\n\n# close the driver\ndriver.quit()"} {"instruction": "Develop a Python program that calculates the mean of list of numbers.", "input": "[1, 5, 2, 4, 9]", "output": "def calculate_mean(nums):\n total = 0\n for n in nums:\n total += n\n mean = total / len(nums)\n return mean\n\nmean = calculate_mean([1, 5, 2, 4, 9])"} {"instruction": "Describe how reinforcement learning works.", "input": "", "output": "Reinforcement learning is a type of machine learning algorithm that allows an agent to learn from its environment through trial and error. The agent takes an action within a given environment and receives a reward or punishment based on its performance. The agent uses this feedback to adjust its actions over time in order to maximize its future reward. Reinforcement learning works by interacting with the environment in a loop, taking actions, observing the results, updating the agent's estimates of its values and adjusting its behavior."} {"instruction": "Write a python code that takes the starting and ending numbers of a range, and returns the largest prime within that range.", "input": "3, 22", "output": "def largest_prime_in_range(start, end):\n largest_prime = 0\n # Iterate over the range\n for i in range(start, end + 1):\n # Check if number is prime\n is_prime = True\n if i > 1:\n for j in range(2, ceil(sqrt(i))+ 1):\n if i % j == 0:\n is_prime = False\n break\n # Check if number is the largest prime\n if is_prime and i > largest_prime:\n largest_prime = i\n\n return largest_prime\n\nif __name__ == '__main__':\n output = largest_prime_in_range(3, 22)\n print(output)"} {"instruction": "Generate a JavaScript object with two properties.", "input": "", "output": "const myObject = { name: 'John', age: 25 };"} {"text": "[HI Wikipedia] गोविन्द शंकर कुरुप\n\nगोविन्द शंकर कुरुप या जी शंकर कुरुप (५ जून १९०१-२ फरवरी १९७८) मलयालम भाषा के प्रसिद्ध कवि हैं। उनका जन्म केरल के एक गाँव नायतोट्ट में हुआ था। ३ साल की उम्र से उनकी शिक्षा आरंभ हुई। ८ वर्ष तक की आयु में वे 'अमर कोश' 'सिद्धरुपम' 'श्रीरामोदन्तम' आदि ग्रन्थ कंठस्थ कर चुके थे और रघुवंश महाकाव्य के कई श्लोक पढ चुके थे। ११ वर्ष की आयु में महाकवि कुंजिकुट्टन के गाँव आगमन पर वे कविता की ओर उन्मुख हुये। तिरुविल्वमला में अध्यापन कार्य करते हुये अँग्रेजी भाषा तथा साहित्य का अध्यन किया। अँग्रेजी साहित्य इनको गीति के आलोक की ओर ले गया। उनकी प्रसिद्ध रचना ओटक्कुष़ल अर्थात बाँसुरी भारत सरकार द्वारा दिए जाने वाले साहित्य के सर्वोच्च पुरस्कार ज्ञानपीठ द्वारा सम्मानित हुई। इनके द्वारा रचित एक कविता–संग्रह विश्वदर्शनम् के लिये उन्हें सन् 1963 में साहित्य अकादमी पुरस्कार से सम्मानित किया गया। जीवन परिचय नायतोट्ट के सरलजीवी वातावरण में गोविन्द शंकर कुरुप का जन्म शंकर वारियर के घर में हुआ। उनकी माता का नाम लक्ष्मीकुट्टी अम्मा था। बचपन में ही पिता का देहांत हो जाने के कारण उनका लालन-पालन मामा ने किया। उनके मामा ज्योतिषी और पंडित थे जिसके कारण संस्कृत पढ़ने में उनकी सहज रुचि रही और उन्हें संस्कृत काव्य परंपरा के सुदृढ़ संस्कार मिले। आगे की पढ़ाई के लिए वे पेरुमपावूर के मिडिल स्कूल में पढ़ने गए। सातवीं कक्षा के बाद वे मूवाट्टुपुपा मलयालम हाई स्कूल में पढ़ने आए। यहाँ के दो अध्यापकों श्री आर.सी. शर्मा और श्री एस.एन. नायर का उनके ऊपर गहरा प्रभाव पड़ा। उन्होंने कोचीन राज्य की पंडित परीक्षा पास की, बांग्ला और मलयालम के साहित्य का अध्ययन किया। उनकी पहली कविता 'आत्मपोषिणी' नामक मासिक पत्रिका में प्रकाशित हुई और जल्दी ही उनका पहला कविता संग्रह 'साहित्य कौतुमकम' प्रकाशित हुआ। इस समय वे तिरुविल्वामला हाई स्कूल में अध्यापक हो गए। १९२१ से १९२५ तक श्री शंकर कुरुप तिरुविल्वामला रहे। १९२५ में वे चालाकुटि हाई स्कूल आ गए। इसी वर्ष साहित्य कौतुकम का दूसरा भाग प्रकाशित हुआ। उनकी प्रतिभा और प्रसिद्धि चारों ओर फैलने लगी थी। १९३१ में नाले (आगामी कल) शीर्षक कविता से वे जन-जन में पहचाने गए। १९३७ से १९५६ तक वे महाराजा कॉलेज एर्णाकुलम में प्राध्यापक के पद पर कार्य करते रहे। प्राध्यापकी से अवकाश लेने के बाद वे आकाशवाणी के सलाहकार बने। १९६५ में ज्ञानपीठ के बाद उन्हें १९६७ में सोवियतलैंड नेहरू पुरस्कार प्राप्त हुआ। गोविंद शंकर कुरुप को साहित्य एवं शिक्षा के क्षेत्र में सन १९६८ में भारत सरकार ने पद्म भूषण से सम्मानित किया था, तथा उसी वर्ष राष्ट्रपति ने उन्हें राज्य सभा का सदस्य भी मनोनीत किया जिस पर वे १९६८ से १९७२ तक बने रहे। १९७८ में उनकी मृत्यु के समय केरल में राजकीय अवकाश की घोषणा की गई। प्रकाशित कृतियाँ कविता संग्रह - साहित्य कौतुकम् - चार खंड (१९२३-१९२९), सूर्यकांति (१९३२), नवातिथि (१९३५), पूजा पुष्पमा (१९४४), निमिषम् (१९४५), चेंकतिरुकल् मुत्तुकल् (१९४५), वनगायकन् (१९४७), इतलुकल् (१९४८), ओटक्कुष़ल्(१९५०), पथिकंटे पाट्टु (१९५१), अंतर्दाह (१९५५), वेल्लिल्प्परवकल् (१९५५), विश्वदर्शनम् (१९६०), जीवन संगीतम् (१९६४), मून्नरुवियुम् ओरु पुष़युम् (१९६४), पाथेयम् (१९६१), जीयुहे तेरंजेटुत्त कवितकल् (१९७२),…"} {"text": "[CS Wikipedia] The Weather Girls\n\nThe Weather Girls je americké dívčí pěvecké duo, které bylo založeno v roce 1982. Skupina se zviditelnila díky klubovému hitu \"It's Raining Men\". Tato dívčí formace je známa i jako Two Tons O' Fun . Historie Skupinu tvoří Martha Washová a Izora Armsteadová. I když Weather Girls byla ten typ skupin, které mají ve své kariéře jen jeden pořádný popový hit (umělec jednoho hitu), skórovala především v klubech (respektive v klubové hitparádě). Všechny následující skladby se umístily na 2. příčce Hot Dance Club Play hitparády: Hi-NRG skladba \"I Got the Feeling\" (1981), \"Just Us\", \"Earth Can Be Just Like Heaven\" (1980)\". Tato skupina, mimo jiné, vytvořila i vokály v pozadí zpěvákovi Sylvesterovi a Bobu Segerovi. Skupina je populární především mezi homosexuální komunitou. Diskografie Externí odkazy R&B hudební skupiny Dívčí hudební skupiny Dvojice v hudbě Taneční hudební skupiny Hudební skupiny založené v roce 1982"} {"instruction": "Create a classification model using the SciKit-Learn library in Python to predict if a given email is a spam email or not.", "input": "Example training data of emails and their label (\"spam\" or \"not spam\")", "output": "from sklearn.model_selection import train_test_split\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.naive_bayes import MultinomialNB\n\n# load the data\nlabels = ['spam', 'not spam']\ndata = [...] # example data of emails and labels\n\n# convert the text to a bag of words model\nvectorizer = CountVectorizer()\nX = vectorizer.fit_transform(data)\n\n# split the data into train and test sets\nX_train, X_test, y_train, y_test = train_test_split(X, labels, test_size=0.2)\n\n# fit the classification model\nmodel = MultinomialNB()\nmodel.fit(X_train, y_train)\n\n# evaluate the model\nscore = model.score(X_test, y_test)\nprint('Test score: ', score)"} {"instruction": "Create a for-loop in Python to print a list of strings that contain only the vowels from a given list of strings.", "input": "words = [\"apple\", \"bear\", \"cat\", \"dog\"]", "output": "for word in words:\n vowels = \"\"\n for x in word:\n if x in ('a', 'e', 'i', 'o', 'u'):\n vowels += x\n print(vowels)"} {"instruction": "Create a Python script that takes a list of strings as an input and prints the length of each string in the list.", "input": "words = ['dog', 'cat', 'spring', 'summer']", "output": "words = ['dog', 'cat', 'spring', 'summer']\nfor word in words:\n print(len(word))"} {"instruction": "Generate an HTML select element containing the names of all continents.", "input": "", "output": ""} {"instruction": "Create a Python Program to sort a list of strings according to the length of their elements.", "input": "list = [\"apple\", \"cat\", \"banana\", \"dog\"]", "output": "def ascending_sort(list):\n list.sort(key=len)\n return list\n\nlist = [\"apple\", \"cat\", \"banana\", \"dog\"]\nresult = ascending_sort(list)\nprint(result)"} {"text": "[DE Wikipedia] Bernie Plain\n\nBernie Plain (eigentlich Bernard John Plain; * 3. Dezember 1946) ist ein ehemaliger britischer Langstreckenläufer. Bei den British Commonwealth Games 1970 in Edinburgh wurde er für Wales startend Elfter über 10.000 m und kam über 5000 m auf den 13. Platz. 1971 siegte er bei den Walisischen Meisterschaften im Marathon, und 1972 wurde er Siebter beim Maxol Marathon. 1973 belegte er bei den Crosslauf-Weltmeisterschaften in Waregem für Wales startend den 33. Platz und wurde Vierter beim Boston-Marathon. 1974 wurde er bei den British Commonwealth Games in Christchurch Siebter im Marathon und Elfter über 10.000 m. Beim Polytechnic Marathon wurde er Zweiter und beim Marathon der Leichtathletik-Europameisterschaften in Rom Vierter. Bei den Crosslauf-Weltmeisterschaften 1975 in Rabat lief er auf den 35. Platz. 1976 wurde er Fünfter bei den Englischen Marathonmeisterschaften und gewann den Polytechnic Marathon. 1977 kam er bei den Crosslauf-Weltmeisterschaften 1977 in Düsseldorf auf Rang 60 und siegte bei den Walisischen Marathonmeisterschaften. Je zweimal wurde er Walisischer Meister über 10.000 m (1969, 1970) sowie im Marathon (1971, 1977) und je einmal über 5000 m (1969) sowie im Crosslauf (1976). Persönliche Bestzeiten 5000 m: 13:38,6 min, 6. Juni 1973, Helsinki 10.000 m: 28:14,89 min, 1. August 1975, London Marathon: 2:14:57 h, 31. Januar 1974, Christchurch Weblinks Athletenporträt bei The Power of Ten Athletenporträt bei der ARRS 5000-Meter-Läufer (Vereinigtes Königreich) 10.000-Meter-Läufer (Vereinigtes Königreich) Marathonläufer (Vereinigtes Königreich) Crossläufer (Vereinigtes Königreich) Teilnehmer an den Commonwealth Games (Wales) Brite Mann Geboren 1946"} {"instruction": "Write an SQL query to list all customers who are over the age of 25.", "input": "", "output": "SELECT * FROM customers WHERE age > 25;"} {"instruction": "JAVA code to calculate the Fibonacci number at a given position.", "input": "", "output": "public class Fibonacci { public static long Fibonacci(int n) { if (n <= 1) { return n; } return Fibonacci(n - 1) + Fibonacci(n - 2); } }"} {"instruction": "Create a Python program that reads in a list of strings from the keyboard and sorts them alphabetically.", "input": "", "output": "sorted_list = []\ninput_strings = input(\"Enter a list of strings, separated by spaces: \")\n\ninput_strings = input_strings.split()\nfor string in input_strings:\n sorted_list.append(string)\n\nsorted_list.sort()\n\nprint(sorted_list)"} {"text": "[HI Wikipedia] जॉर्ज सुदर्शन\n\nएन्नाक्कल चांडी जॉर्ज सुदर्शन () (ई॰ सी॰ जी॰ सुदर्शन के नाम से भी जाने जाते थे; जन्म १६ सितम्बर १९३१ - १३ मई २०१८) टेक्सास विश्वविद्यालय, ऑस्टिन में प्रोफेसर, लेखक और भारतीय वैज्ञानिक थे। पूर्व जीवन जॉर्ज सुदर्शन का भारत में केरल राज्य के कोट्टायम जिले के पल्लम नामक ग्राम में जन्म सैंट थॉमस क्रिस्टिंस परिवार में हुआ था। एक ईसाई परिवार में पालन पोषण के बावजूद उन्होनें धर्म छोड़ कर और वेदान्ती बन गये तथा एक सर्वात्मवादी (सभी देवताओं को मानने वाला) बने। उन्होनें धर्म छोड़ने का कारण चर्च का भगवान के प्रति दर्शन और चर्च में आध्यात्मिक अनुभव की कमी जैसे कारणों से असहमति का उल्लेख किया। उनकी प्रारम्भिक शिक्षा सीएमएस कॉलेज कोट्टायम में हुई, और मद्रास क्रिश्चियन कॉलेज से १९५१ में अपनी स्नातक की पढ़ाई पूर्ण की। उन्होनें १९५२ में मद्रास विश्वविद्यालय से स्नातकोत्तर किया। उसके बाद वे टाटा मूलभूत अनुसंधान संस्थान संस्थान में चले गए जहाँ उन्होनें कुछ समय के लिए होमी भाभा व अन्यों के साथ कार्य किया। तत्पश्चात वे रोचेस्टर विश्वविद्यालय, न्यूयॉर्क चले गए जहाँ उन्होंने रॉबर्ट मर्शक के साथ स्नातक (पीएचडी) छात्र के रूप में कार्य किया। १९५८ में उन्होंने रोचेस्टर विश्वविद्यालय से पीएचडी की उपाद्धि प्राप्त की। उसके पश्चात पोस्ट डॉक्टरेट के रूप में जुलियन श्विंगर के साथ काम करने के लिए हार्वर्ड विश्वविद्यालय चले गए। पुरस्कार केरल सस्त्र पुरस्कार, द स्टेट अवार्ड फॉर लाइफटाइम अकोमप्लिशमेंट्स इन साइंस, 2013. ICTP का दिराक पदक, 2010. पद्म विभूषण, भारत सरकार की ओर से दूसरा सर्वोच्च नागरिक सम्मान, 2007. मायोराना पदक, 2006. First Prize in Physics, Third World Academy of Sciences, 1985. बोस पदक, 1977. भारत के राष्ट्रपति द्वारा पद्म भूषण से सम्मनित, 1976. सी॰ वी॰ रमन, 1970. संदर्भ-ग्रंथसूची Doubt and Certainty with Tony Rothman Classical Dynamics with N. Mukunda Fundamentals of Quantum Optics with John R. Klauder Introduction to Elementary Particle Physics with Robert Marshak From Classical to Quantum Mechanics: An Introduction to the Formalism, Foundations and Applications with Giampiero Esposito and Giuseppe Marmo '' Pauli and the Spin-Statistics Theorem by Ian Duck, E. C. G. Sudarshan, and Wolfgang Pauli (Jan 1998) ये भी देखें दुर्बल अन्योन्य क्रिया सन्दर्भ Phys. Rev. Lett. 10, 277-279 (1963) बाहरी कड़ियाँ A LOOK-BACK AT FOUR DECADES OF RESEARCH By ECG SUDARSHAN Seven Science Quests, Uni. Texas, Austin Home page with vita and publications Publications on ArXiv Collected works ECG Sudarshan on Keral.com Sudarshan's letter to Nobel Committee Lecture- Perspectives And Perceptions: Causality And Unpredictability भारतीय वैज्ञानिक 1931 में जन्मे लोग केरल के लोग २०१८ में निधन विज्ञान और इंजीनियरिंग में पद्म विभूषण के प्राप्तकर्ता"} {"instruction": "Create a script in Python that calculates the average length of a given list of strings", "input": "list_of_strings = [\"cat\", \"dog\", \"mouse\", \"elephant\"]", "output": "def calculate_avg_string_length(string_list):\n total_length = 0\n\n for item in string_list:\n total_length += len(item)\n \n return total_length / len(string_list)\n\nlist_of_strings = [\"cat\", \"dog\", \"mouse\", \"elephant\"]\n\nresult = calculate_avg_string_length(list_of_strings)\nprint(result)"} {"instruction": "Create a SQL query to find all users from the “users” table who have a last name of “Smith”.", "input": "", "output": "SELECT * FROM users WHERE lastName = 'Smith';"} {"instruction": "Construct a Python class that takes a given number and calculates the sum of the digits.", "input": "6342", "output": "class SumOfDigits:\n \n def __init__(self, num):\n self.num = num\n \n def calculate_sum_of_digits(self):\n total = 0\n for ch in str(self.num):\n total += int(ch)\n return total\n\ndigit_sum = SumOfDigits(6342)\nresult = digit_sum.calculate_sum_of_digits()\nprint(result)"} {"instruction": "Develop a kNN model in Python to predict the type of wine based on the features and the data listed in the input.", "input": "Input:\nData:\nType | Alk | Res | Mal\nRed | 11 | 0.3 | 6.8\nWhite | 12 | 0.5 | 5.3\n\nFeatures: Alk, Res, Mal", "output": "import pandas as pd\nfrom sklearn.neighbors import KNeighborsClassifier\n\n# Data\ndata = [['Red', 11, 0.3, 6.8],\n ['White', 12, 0.5, 5.3]]\ndf = pd.DataFrame(data, columns=['Type', 'Alk', 'Res', 'Mal'])\n\n# Feature and target\nX = df.drop('Type', axis=1)\ny = df['Type']\n\n# Model development\nknn = KNeighborsClassifier(n_neighbors=3)\nknn.fit(X, y)\n\n# Predicting\npredictions = knn.predict([[11.4, 0.3, 6.6]\n ])\nprint(predictions)"} {"instruction": "Create an array of descending numbers starting from 10 to 1 using a for loop.", "input": "", "output": "numberArray = [] for x in range(10, 0, -1): numberArray.append(x) print(numberArray) # [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]"} {"text": "[EN Wikipedia] Bangalore Muslims FC\n\nBangalore Muslims Football Club is a professional football club based in Bangalore, Karnataka, that emerged as one of the strongest football teams during the 1930s, 40s and 50s. History Bangalore Muslims became the first Indian club to win Rovers Cup in 1937, the second oldest football tournament in India, defeating Mohammedan SC 1–0 in the final. The club again emerged champions winning the title in 1938, becoming the first civilian team to defeat a British regimental side in the final. In that edition, they defeated the Argyll and Scottish Highlanders by 3–2. In 1941, the club clinched Stafford Challenge Cup title and became first Indian club to do so. Ahmed Khan, Mohammad Abdus Sattar, Mariappa Kempaiah, have played for the club. It was Bangalore Muslims that challenged the hegemony of Hyderabad City Police achieving success continuously as a non-Kolkata club. In the 1960s, the trust that ran the team sold its share of the club to Mumtaz Ali Khan whose trust, the Al-Ameen trust took over the club. During the 1960s and 1970s, domestic football in Bangalore was dominated by the PSU teams such as Hindustan Aeronautics Limited (HAL), Indian Telephone Industries (ITI), Electronic Radar Development Establishment (ERDE) and thus drew over the talent from the rest of the clubs. This led to the decline of the football clubs in Bangalore, which also affected Bangalore Muslims. The team continues to exist in the lower divisions of the Bangalore Football League. It participates in the Bangalore District Football Association C Division Championship. The Al-Ameen college football team also participates as the Bangalore Muslims team. Honours Rovers Cup Champions (3): 1937, 1938, 1948 Runners-up (2): 1940, 1953 Stafford Challenge Cup Champions: 1941 See also List of football clubs in India History of Indian football References Further reading Bibliography Others Football clubs in Bangalore Organizations with year of establishment missing Organizations with year of disestablishment missing"} {"instruction": "Construct a function to print out the odd numbers in a given array", "input": "", "output": "def odd_numbers(arr): for i in range(len(arr) ): if arr[i] % 2 != 0: print(arr[i])"} {"text": "[EN Wikipedia] Albert Weinert\n\nAlbert Weinert (June 13, 1863 – November 29, 1947) was a German-American sculptor. Born in Leipzig, Kingdom of Saxony, Weinert attended the Royal Academy of Art and Applied Art there and then the Académie Royale des Beaux-Arts in Brussels, Belgium. In 1886, he emigrated to the United States, working first in San Francisco before moving to Chicago in 1892 to work on the World's Columbian Exposition where he met fellow sculptor Karl Bitter. After the fair, Weinert traveled with Bitter to New York City where he worked in Bitter's studio. He later relocated to Washington, D.C. where, in April 1894, he was hired to work on the design of the Thomas Jefferson Building of the Library of Congress. He was paid $10 per day () to oversee a crew of modelers and carvers. He died on November 29, 1947, in his home studio on Grand Concourse in the Bronx. Work Haymarket Martyrs' Monument, German Waldheim Cemetery, Chicago, 1893 The Court of Neptune Fountain, Library of Congress, Washington, D.C. He produced the granite dolphins carved on the spandrels behind the bronze groups by Perry 1898 Numerous details in the Library of Congress, notably in the Reading Room. The Battle of Lake George, Lake George Battlefield Park, Lake George, New York 1903 William McKinley Monument, Toledo, Ohio, 1903 Stevens T. Mason, Detroit, 1908 Cecil Calvert Monument, Baltimore, 1908 References 1863 births 1947 deaths 20th-century American sculptors 20th-century American male artists 19th-century American sculptors American male sculptors National Sculpture Society members 19th-century American male artists Artists from the Kingdom of Saxony Emigrants from the German Empire to the United States"} {"instruction": "Write a module in Rust to identify palindromic strings.", "input": "", "output": "fn is_palindrome(target: &str) -> bool { let mut char_vec: Vec = target.chars().collect(); char_vec.reverse(); let reversed_target: String = char_vec.into_iter().collect(); if target == reversed_target { return true; } return false; }"} {"instruction": "Print a multiplication table of a given number", "input": "num = 5", "output": "for i in range(1,11): print(f'{num} x {i} = {num * i}')"} {"instruction": "Write a Python script to process user input and generate a response according to the user's query.", "input": "Sample queries:\n\n\"Give me the weather in New York\"\n\n\"What is the population of China?\"", "output": "# Libraries\nimport requests\nimport json\n\n# Get user input\nuser_input = input('Please enter your query: ')\n\n# Process user input\nif 'weather' in user_input:\n # Get weather data\n city = user_input.split()[-1] # extract city from user query \n r = requests.get(f'http://api.openweathermap.org/data/2.5/weather?q={city}&units=metric&appid=YOUR_API_KEY')\n data = json.loads(r.text) \n\n# Output response\n if data['cod'] == '404':\n print('City not found!')\n else:\n print(f'The temperature in {city} is: {data[\"main\"][\"temp\"]} °C')\n\nelif 'population' in user_input:\n # Get population data\n country = user_input.split()[-1] # extract country from user query\n r = requests.get(f'https://restcountries.eu/rest/v2/name/{country}')\n data = json.loads(r.text)[0] # extract population from API response\n\n# Output response\n print(f'The population of {country} is: {data[\"population\"]}')\n\nelse:\n print(\"I'm sorry, I don't understand.\")"} {"instruction": "Using the following HTML, add an id attribute to the
    element.", "input": "
    Hello
    ", "output": "
    Hello
    "} {"text": "[HI Wikipedia] नेल्सन मंडेला\n\nनेल्सन ख़ोलीह्लह्ला मंडैला (ख़ोसा: Nelson Rolihlahla Mandela; 18 जुलाई 1918 – 5 दिसम्बर 2013) दक्षिण अफ्रीका के प्रथम अश्वेत भूतपूर्व राष्ट्रपति थे। राष्ट्रपति बनने से पूर्व वे दक्षिण अफ्रीका में सदियों से चल रहे रंगभेद का विरोध करने वाले अफ्रीकी नेशनल कांग्रेस और इसके सशस्त्र गुट उमखोंतो वे सिजवे के अध्यक्ष रहे। रंगभेद विरोधी संघर्ष के कारण उन्होंने 27 वर्ष रॉबेन द्वीप के कारागार में बिताये जहाँ उन्हें कोयला खनिक का काम करना पड़ा था। 1990 में श्वेत सरकार से हुए एक समझौते के बाद उन्होंने नये दक्षिण अफ्रीका का निर्माण किया। वे दक्षिण अफ्रीका एवं समूचे विश्व में रंगभेद का विरोध करने के प्रतीक बन गये। संयुक्त राष्ट्रसंघ ने उनके जन्म दिन को नेल्सन मंडेला अन्तर्राष्ट्रीय दिवस के रूप में मनाने का निर्णय लिया। प्रारम्भिक जीवन मंडेला का जन्म 18 जुलाई 1918 को म्वेज़ो, ईस्टर्न केप, दक्षिण अफ़्रीका संघ में गेडला हेनरी म्फ़ाकेनिस्वा और उनकी तीसरी पत्नी नेक्यूफी नोसकेनी के यहाँ हुआ था। वे अपनी माँ नोसकेनी की प्रथम और पिता की सभी संतानों में 13 भाइयों में तीसरे थे। मंडेला के पिता हेनरी म्वेजो कस्बे के जनजातीय सरदार थे। स्थानीय भाषा में सरदार के बेटे को मंडेला कहते थे, जिससे उन्हें अपना उपनाम मिला। उनके पिता ने इन्हें 'रोलिह्लाला' प्रथम नाम दिया था जिसका खोज़ा में अर्थ \"उपद्रवी\" होता है। उनकी माता मेथोडिस्ट थी। मंडेला ने अपनी प्रारम्भिक शिक्षा क्लार्कबेरी मिशनरी स्कूल से पूरी की। उसके बाद की स्कूली शिक्षा मेथोडिस्ट मिशनरी स्कूल से ली। मंडेला जब 12 वर्ष के थे तभी उनके पिता की मृत्यु हो गयी। राजनीतिक संघर्ष 1941 में मंडेला जोहन्सबर्ग चले गये जहाँ इनकी मुलाकात वॉल्टर सिसुलू और वॉल्टर एल्बरटाइन से हुई। उन दोनों ने राजनीतिक रूप से मंडेला को बहुत प्रभावित किया। जीवनयापन के लिये वे एक कानूनी फ़र्म में क्लर्क बन गये परन्तु धीर-धीरे उनकी सक्रियता राजनीति में बढ़ती चली गयी। रंग के आधार पर होने वाले भेदभाव को दूर करने के उन्होंने राजनीति में कदम रखा। 1944 में वे अफ़्रीकन नेशनल कांग्रेस में शामिल हो गये जिसने रंगभेद के विरूद्ध आन्दोलन चला रखा था। इसी वर्ष उन्होंने अपने मित्रों और सहयोगियों के साथ मिल कर अफ़्रीकन नेशनल कांग्रेस यूथ लीग की स्थापना की। 1947 में वे लीग के सचिव चुने गये। 1961 में मंडेला और उनके कुछ मित्रों के विरुद्ध देशद्रोह का मुकदमा चला परन्तु उसमें उन्हें निर्दोष माना गया। 5 अगस्त 1962 को उन्हें मजदूरों को हड़ताल के लिये उकसाने और बिना अनुमति देश छोड़ने के आरोप में गिरफ़्तार कर लिया गया। उन पर मुकदमा चला और 12 जुलाई 1964 को उन्हें उम्रकैद की सजा सुनायी गयी। सज़ा के लिये उन्हें रॉबेन द्वीप की जेल में भेजा गया किन्तु सजा से भी उनका उत्साह कम नहीं हुआ। उन्होंने जेल में भी अश्वेत कैदियों को लामबन्द करना शुरू कर दिया था। जीवन के 27 वर्ष कारागार में बिताने के बाद अन्ततः 11 फ़रवरी 1990 को उनकी रिहाई हुई। रिहाई के बाद समझौते और शान्ति की नीति द्वारा उन्होंने एक लोकतान्त्रिक एवं बहुजातीय अफ्रीका की नींव रखी। 1994 में दक्षिण अफ़्रीका में रंगभेद रहित चुनाव हुए। अफ़्रीकन नेशनल कांग्रेस ने 62 प्रतिशत मत प्राप्त किये और बहुमत के साथ उसकी सरकार बनी। 10 मई 1994 को मंडेला अपने…"} {"instruction": "Create a REST API using Python and Flask for a blog post. This API should provide endpoints to create a new post, update an existing post, delete a post, and list all posts.", "input": "Not applicable", "output": "from flask import Flask, request \nfrom flask_restful import Resource, Api \n \napp = Flask(__name__) \napi = Api(app) \n \n# creating the necessary dictionaries to store blog posts\nblog_posts = {}\n\nclass BlogPost(Resource):\n # endpoint to create a blog post \n def post(self, post_id):\n post_data = request.get_json()\n post_title = post_data['title']\n post_content = post_data['content']\n blog_posts[post_id] = {\n 'title': post_title,\n 'content': post_content\n }\n return blog_posts[post_id], 201\n \n # endpoint to update a blog post \n def put(self, post_id):\n post_data = request.get_json()\n post_title = post_data['title']\n post_content = post_data['content']\n blog_posts[post_id]['title'] = post_title\n blog_posts[post_id]['content'] = post_content\n return blog_posts[post_id], 200\n \n # endpoint to delete a blog post\n def delete(self, post_id):\n del blog_posts[post_id]\n return 'Post deleted', 200\n \n # endpoint to list all blog posts\n def get(self):\n return blog_posts, 200\n \napi.add_resource(BlogPost, '/') \n \nif __name__ == '__main__': \n app.run(debug = True)"} {"text": "[DE Wikipedia] Traralgon International 2022/Herren\n\nDas Traralgon International 2022 war ein Tennisturnier, das vom 3. bis 9. Januar 2022 in Traralgon stattfand. Es war Teil der ATP Challenger Tour 2022 und wurde im Freien auf Hartplatz ausgetragen. Das Teilnehmerfeld der Einzelkonkurrenz bestand aus 48 Spielern, jenes der Doppelkonkurrenz aus 14 Paaren. Qualifikation Die Qualifikation fand am 2. Januar 2022 statt. Ausgespielt wurden vier Qualifikantenplätze, die zur Teilnahme am Hauptfeld des Turniers berechtigten. Hinzu kamen zwei Lucky Loser. Folgende Spieler hatten die Qualifikation überstanden und spielten im Hauptfeld des Turniers: Einzel Setzliste Ergebnisse Halbfinale, Finale Obere Hälfte Obere Hälfte 1 Obere Hälfte 2 Untere Hälfte Untere Hälfte 1 Untere Hälfte 2 Doppel Setzliste Ergebnisse Weblinks Offizielle Homepage des Turniers Turnier der ATP Challenger Tour 2022 Tennisturnier in Traralgon"} {"instruction": "Calculate the area of a triangle with base b=4 and height h = 5.", "input": "", "output": "The area of the triangle is 10 square units."} {"text": "[CS Wikipedia] TG3\n\nTG3 (celým názvem Telegiornale Tre) je zpravodajská relace vysílaná na programu Rai 3 od roku 1979. Celosvětově se vysílá na Rai Italia. Historie TG3 se začal vysílat v roce 1979, společně s TGR, které bylo až do reformy v roce 1987 s TG3 úzce spjato. Vysílala se dvě vydání, v 19.00 a 22.00 hod. Obsahovalo 10 minut národních zpráv a 20 minut zpráv zahraničních. Reforma v roce 1987 Reforma znamenala velikou změnu pro agendu TG3 i pro diváky. Zahrnovala mimo jiné osamostatnění TGR od hlavního vydání v 19.00, od té doby vydání trvá půl hodiny a založení rubriky o počasí Meteo 3. 90. léta V devadesátých letech TG3 zaznamenal velký nárůst sledovanosti. Po válce v Perském zálivu se také přidaly tři nová vydání, ve 14.20, 22.30(současně vysíláno z Říma a New Yorku) a v noci. V roce 1999 se změnil název na Telegiornale 3(T3) a pod tuto hlavičku se opět sjednotil s regiony. Název se vrátil zpět na TG3 v roce 2000 a regiony se osamostatnily v roce 2003. Politická orientace V roce 1987 sem společně s novým šéfredaktorem Sandrem Curzim nepřišla nejen rozsáhlá reforma, ale i politická orientace TG3 a to konkrétně ke Partito Comunista Italiano. Se změnou šéfredaktora částečně zmizely sympatie ke komunistům, ale levicové zaměření zůstalo. Tvořila tedy určitou opozici ke křesťanskodemokratickým TG1 a GR2 a ke sociálnědemokratickým TG2 a GR1. Vysílací časy Pondělí - Pátek 11.25 (3 min.), v letních měsících od 11.10 (5 min.) - TG3 Minuti 12.00 (25 min.) - TG3 Mezzogiorno 14.20 (25 min.) - TG3 Giorno 14.55 (5 min.) - TG3 L.I.S.(ve znakovém jazyce) 19.00 (30 min.) - TG3 Sera 0.00 (60 min.) - TG3 Linea Notte Přerušeno mezi 0.10 - 0.13 přehledem zpráv TGR Sobota 12.00 (25 min.) - TG3 Notizie 14.20 (25 min.) - TG3 Giorno 16.55 (5 min.) - TG3 L.I.S. 19.00 (30 min.) - TG3 Sera mezi 23.00-23.30 (15 min.) - TG3 Mezzasera mezi 0.00-0.30 (10 min.) - TG3 Linea Notte Délka a čas vysílání se zkracuje podle potřeby Neděle 12.00 (25 min.) - TG3 Mezzogiorno 14.15 (15 min.) - TG3 Giorno 15.00 (5 min.) - TG3 L.I.S. 19.00 (30 min.) - TG3 Sera mezi 23.00-23.30 (10 min.) - TG3 Mezzasera mezi 0.00-0.30 (10 min.) - TG3 Linea Notte Délka a čas vysílání se zkracuje podle potřeby Externí odkazy Oficiální stránky TG3 RAI Zpravodajské televizní pořady Televizní pořady vysílané od roku 1979"} {"instruction": "Given a string s, determine if it is an isogram.", "input": "\"isogram\"", "output": "bool isIsogram(string s) { int count[256] = {0}; int length = s.length(); for (int i=0; i longest_substring_length: longest_substring_length = len(tmp_str) longest_substring = tmp_str return longest_substring print(find_longest_substring(string)) # 'brownfoxjump'"} {"instruction": "Develop a recursive solution in Python to calculate the Fibonacci sequence up to the nth term.", "input": "n = 7", "output": "def fibonacci_sequence(n): \n if n <= 1: \n return n \n else: \n return(fibonacci_sequence(n-1) + fibonacci_sequence(n-2)) \n\nprint(\"The Fibonacci sequence up to the nth term:\") \nfor i in range(7): \n print(fibonacci_sequence(i))"} {"instruction": "Write a code to reverse a sentence word by word.", "input": "This is a sentence", "output": "def reverse_words(sentence): words = sentence.split(' ') reversed_words = [word[::-1] for word in words] return ' '.join(reversed_words) print(reverse_words('This is a sentence')) # Output: sihT si a ecnetnes"} {"text": "[HI Wikipedia] बरेली\n\nभारत के सबसे बड़े राज्य उत्तर प्रदेश में स्थित बरेली जनपद राष्ट्रीय राजधानी दिल्ली और उत्तर प्रदेश की राजधानी लखनऊ तक के राष्ट्रीय राजमार्ग के बीचों-बीच स्थित है। प्राचीन काल से इसे बोलचाल में बांस बरेली का नाम दिया जाता रहा और अब यह बरेली के नाम से ही पहचाना जाता है। इस जनपद का शहर महानगरीय है। यह उत्तर प्रदेश में आठवां सबसे बड़ा नगर और भारत का ५०वां सबसे बड़ा शहर है। बरेली उत्तराखंड राज्य से सटा जनपद है। इसकी बहेड़ी तहसील उत्तराखंड के ऊधमसिंह नगर की सीमा के निकट है।रामगंगा नदी के तट पर बसा यह शहर प्राचीन रुहेलखंड का राजधानी मुख्यालय रहा है। बरेली का राज्य दर्जा प्राप्त महात्मा ज्योतिबा फूले रुहेलखंड विश्विद्यालय होने की वजह से उच्च शिक्षा के लिए इस विश्वविद्यालय का अधिकार क्षेत्र बरेली और मुरादाबाद मंडल के जिन नौ जिलों तक विस्तारित है, वे जिले ही प्रथम स्वतंत्रता संग्राम के दौर में रुहेलखंड का हिस्सा रहे। ऐसे में आज भी बरेली को रुहेलखंड का मुख्यालय ही माना जाता है।महाभारत काल में बरेली जनपद की तहसील आंवला का हिस्सा पांचाल क्षेत्र हुआ करता था। ऐसे में इस शहर का ऐतिहासिक महत्व भी है। धार्मिक महत्व के चलते बरेली का खास स्थान है। नाथ सम्प्रदाय के प्राचीन मंदिरों से आच्छादित होने के कारण बरेली को नाथ नगरी भी कहा जाता है। शहर में विश्व प्रसिद्ध दरगाह आला हजरत स्थापित है,जो सुन्नी बरेलवी मुसलमानों की आस्था का प्रमुख केंद्र है।इसलिए बरेली को \"बरेली शरीफ\"/शहर ए आला हज़रत भी कहते हैं।ख्वाजा क़ुतुब भी यहीँ है। और खानकाह नियाजिया भी इसी शहर में है। राधेश्याम रामायण के प्रसिद्ध रचयिता पंडित राधेश्याम शर्मा कथावाचक इसी शहर के थे। मठ तुलसी स्थल भी इसी शहर में है। देश-प्रदेश के प्राचीन और प्रमुख महाविद्यालयों में शुमार बरेली कॉलेज का भी ऐतिहासिक महत्व है। देश के भारतीय पशु चिकित्सा अनुसंधान संस्थान और भारतीय पक्षी अनुसंधान संस्थान इस शहर के इज्जतनगर में बड़े कैंपस में स्थापित हैं। बॉलीवुड फिल्मों की मशहूर अभिनेत्री प्रियंका चौपड़ा और पर्दे की कलाकर दिशा पाटनी बरेली से ही हैं।चंदा मामा दूर के...जैसी बाल कविता के रचयिता साहित्यकार निरंकार देव सेवक भी बरेली के ही थे। बरेली पत्रकारिता के शीर्ष स्तम्भ चन्द्रकान्त त्रिपाठी की कर्मस्थली है। वर्तमान में बरेली से संतोष गंगवार सांसद है। संतोष गंगवार 8वी बार सांसद बने है। वही आंवला से विधायक धर्मपाल सिंह यूपी की योगी सरकार में पशुधन कल्याण मंत्री है। इसके अलावा धर्मपाल जी के पास अल्पसंख्यक और हज विभाग भी है। यहां मान्यता प्राप्त वरिष्ठ पत्रकार अनूप कुमार मिश्रा है जो पिछले 16 सालो से एबीपी नेटवर्क में कार्य कर रहे है। बरेली में प्रमुख समाचार पत्रों में अमर उजाला, दैनिक जागरण, हिंदुस्तान, अमृत विचार, आज, जनमोर्चा है। इसके अलावा डिजिटल प्लेटफार्म में दैनिक भास्कर, राजस्थान पत्रिका, स्वाभिमान टीवी, डेली इनसाइडर, न्यूज टुडे नेटवर्क है। बरेली में कई निजी मेडिकल कालेज है। जिसमे श्री राम मूर्ति मेडिकल कालेज, रुहेलखंड मेडिकल कालेज, राजश्री मेडिकल कालेज, गंगाचरण आयुर्वेदिक मेडिकल कालेज के अलावा बांस मंडी में।सरकारी मेडिकल कालेज भी है। इसके अलावा यहां के मेयर डॉ उमेश गौतम है, जिनका अपना मिशन अस्पताल है और इनवर्तिज यूनिवर्सिटी है। आने…"} {"text": "[DE Wikipedia] Agnes-Bernauer-Straße\n\nDie Agnes-Bernauer-Straße ist eine 3,2 km lange Straße und verbindet den Münchner Stadtteil St. Ulrich in Laim mit Pasing. Beschreibung Sie verläuft südlich parallel zur Landsberger Straße. An ihr liegen das Westbad, das Eis- und Funsportzentrum West, St. Ulrich (104), St. Willibald, das Laimer Schlössl (112), der Laimer Anger, das Interim-Theater sowie die Villenkolonie Schlosspark Laim. Auf der Agnes-Bernauer-Straße läuft die Trambahnlinie 19. An der Agnes-Bernauer-Straße 1/3/5/7/9, 84, 86, 97, 101, 102, 104, 106, 112, 124/126, 128/139, 132, 134, 148/150, 152–158 und 181 liegen Baudenkmäler, siehe auch: Liste der Baudenkmäler in Laim bzw. Liste der Baudenkmäler in Pasing. Sie wurde 1901 nach Agnes Bernauer benannt. Ihr gehörte im 15. Jahrhundert das an der heutigen Agnes-Bernauer-Straße gelegene Grundstück des Laimer Schlössls. Weblinks Einzelnachweise Innerortsstraße in München Bauwerk in Laim Bauwerk in Pasing Straße in Europa"} {"instruction": "Use a loop to print out each element of the list.", "input": "list = [1, 2, 3, 4]", "output": "for element in list: print(element)"} {"text": "[CS Wikipedia] Danny Ecker\n\nDanny Ecker (* 21. července 1977, Leverkusen) je bývalý německý sportovec, atlet, jehož specializací byl skok o tyči. Závodil za atletický oddíl TSV Bayer Leverkusen. V roce 2007 se stal v Birminghamu halovým mistrem Evropy a vybojoval bronzovou medaili na světovém šampionátu v Ósace. Již dříve získal bronzové medaile na halovém ME 1998 ve Valencii a na halovém MS 1999 v japonském Maebaši. Kariéra Je trojnásobným finalistou letních olympijských her. Na olympiádě v Sydney skončil osmý, v Athénách za výkon 575 cm získal páté místo a v roce 2008 se umístil v Pekingu na šestém místě. Je čtvrtým nejlepším tyčkařem německé historie na dráze, jeho osobním maximem je 593 cm, které skočil v Ingolstadtu. Drží národní rekord v hale. Je jedním z osmi tyčkařů, kteří dokázali v hale překonat hranici šesti metrů. 11. února 2001 v Dortmundu zdolal 600 cm. Atletickou kariéru ukončil v červnu roku 2012. Kvůli zranění se nemohl zúčastnit domácího šampionátu v Bochumi a tím přišel o možnost bojovat o účast na letních olympijských hrách v Londýně. Úspěchy Rodina Sportovní geny zdědil po rodičích. Jeho matka Heide Rosendahlová byla všestranná atletka, která získala na olympiádě v Mnichově v roce 1972 zlato v dálce a štafetě na 4×100 metrů a stříbrnou medaili v pětiboji (100 m přek., vrh koulí, skok do výšky, skok daleký, běh na 800 m). Otec John Ecker býval hráčem basketbalu. Odkazy Reference Externí odkazy Profil na Leichtathletik.de Oficiální webové stránky Leverkusen who's who Narození v roce 1977 Němečtí tyčkaři Němečtí olympionici Žijící lidé Muži Narození v Leverkusenu Narození 21. července"} {"instruction": "Write a function to query a database table 'trips' and return a list of all trips made over the past three months.", "input": "", "output": "def query_trips(): start_date = datetime.datetime.now() - datetime.timedelta(days=90) end_date = datetime.datetime.now() sql = 'SELECT * FROM trips WHERE date_of_trip >= %s AND date_of_trip <= %s' try: conn = connect_to_database() cur = conn.cursor() cur.execute(sql, (start_date, end_date)) trips = cur.fetchall() cur.close() conn.close() return trips except Exception as e: raise e"} {"instruction": "Describe a use case of the ternary operator in Python.", "input": "", "output": "The ternary operator can be used to conditionally assign a value. For example, the following code assigns max to the larger value of x and y: max = x if x > y else y"} {"text": "[EN Wikipedia] Arithmetic mean\n\nIn mathematics and statistics, the arithmetic mean ( ), arithmetic average, or just the mean or average (when the context is clear) is the sum of a collection of numbers divided by the count of numbers in the collection. The collection is often a set of results from an experiment, an observational study, or a survey. The term \"arithmetic mean\" is preferred in some mathematics and statistics contexts because it helps distinguish it from other types of means, such as geometric and harmonic. In addition to mathematics and statistics, the arithmetic mean is frequently used in economics, anthropology, history, and almost every academic field to some extent. For example, per capita income is the arithmetic average income of a nation's population. While the arithmetic mean is often used to report central tendencies, it is not a robust statistic: it is greatly influenced by outliers (values much larger or smaller than most others). For skewed distributions, such as the distribution of income for which a few people's incomes are substantially higher than most people's, the arithmetic mean may not coincide with one's notion of \"middle\". In that case, robust statistics, such as the median, may provide a better description of central tendency. Definition Given a data set , the arithmetic mean (also mean or average), denoted (read bar), is the mean of the values . The arithmetic mean is a data set's most commonly used and readily understood measure of central tendency. In statistics, the term average refers to any measurement of central tendency. The arithmetic mean of a set of observed data is equal to the sum of the numerical values of each observation, divided by the total number of observations. Symbolically, for a data set consisting of the values , the arithmetic mean is defined by the formula: (For an explanation of the summation operator, see summation.) For example, if the monthly salaries of employees are , then the arithmetic mean is: If the data set is a statistical population (i.e., consists of every possible observation and not just a subset of them), then the mean of that population is called the population mean and denoted by the Greek letter . If the data set is a statistical sample (a subset of the population), it is called the sample mean (which for a data set is denoted as ). The arithmetic mean can be similarly defined for vectors in multiple dimensions, not only scalar values; this is often referred to as a centroid. More generally, because the arithmetic mean is a convex combination (meaning its coefficients sum to ), it can be defined on a convex space, not only a vector space. Motivating properties The arithmetic mean has several properties that make it interesting, especially as a measure of central tendency. These include: If numbers…"} {"instruction": "Create a program to print all prime numbers from 1 to a given number.", "input": "", "output": "def print_prime_numbers(n): for num in range(2,n+1): if is_prime(num): print(num)"} {"instruction": "Design a function in Python to find all the elements in an array that are divisible by 3.", "input": "arr = [3, 8, 15, 20, 7]", "output": "arr = [3, 8, 15, 20, 7] def divisible_by_3(arr): result = [] for element in arr: if element % 3 == 0: result.append(element) return result print(divisible_by_3(arr)) # Output: [3, 15, 20]"} {"instruction": "Add code to a Python program that will print a multiplication table of numbers from 1 to 5.", "input": "", "output": "for i in range(1,6):\n for j in range(1,6):\n print(i*j,end=\"\\t\")\n print(\"\\n\")\n\n# Output:\n1\t2\t3\t4\t5\t\n2\t4\t6\t8\t10\t\n3\t6\t9\t12\t15\t\n4\t8\t12\t16\t20\t\n5\t10\t15\t20\t25"} {"instruction": "Create a Python library to manipulate 2D matrices. The library should include functions for creating matrices, multiplying matrices, and analyzing the elements of matrices.", "input": "Not applicable", "output": "from collections import defaultdict\n\nclass Matrix:\n def __init__(self, rows, cols):\n self.rows = rows\n self.cols = cols\n self.matrix = [[0 for i in range(cols)] for j in range(rows)]\n\ndef create_matrix(rows, cols, values): \n m = Matrix(rows, cols)\n for i in range(rows):\n for j in range(cols):\n m.matrix[i][j] = values[i][j]\n return m\n\ndef mult_matrix(m1, m2): \n m = Matrix(m1.rows, m2.cols)\n for i in range(m1.rows):\n for j in range(m2.cols):\n for k in range(m1.cols):\n m.matrix[i][j] += m1.matrix[i][k] * m2.matrix[k][j]\n return m\n\ndef analyze_matrix(m):\n stats = defaultdict(int)\n for row in range(m.rows):\n for col in range(m.cols):\n stats[m.matrix[row][col]] += 1\n return stats"} {"instruction": "Create a program that adds up 11 numbers.", "input": "11 numbers: 3, 6, 8, 12, 4, 19, 23, 12, 15, 10, 20", "output": "# defining a function def add_ele(numbers): # Initialize result result = 0 i = 0 # Iterating elements in list for i in range(len(numbers)): result += numbers[i] return result # Driver code numbers = [3, 6, 8, 12, 4, 19, 23, 12, 15, 10, 20] print(add_ele(numbers))"} {"instruction": "Create a Python module to analyze SQL database tables and return meta information like number of rows, column names and data types.", "input": "", "output": "import sqlite3\n\ndef get_table_meta_info(db_name, table_name):\n conn = sqlite3.connect(db_name)\n \n cur = conn.cursor()\n cur.execute(\"SELECT * FROM \"+ table_name)\n col_names = [tuple[0] for tuple in cur.description]\n row_length = len(col_names) \n \n cur.execute(\"PRAGMA table_info(\"+ table_name +\")\")\n table_info = cur.fetchall()\n \n data_types = []\n \n for row in table_info:\n data_types.append(row[2])\n \n meta_info = {\n 'table_name': table_name,\n 'row_length': row_length,\n 'column_names': col_names,\n 'data_types': data_types\n }\n return meta_info"} {"instruction": "Explain the concept of assembly language.", "input": "", "output": "Assembly language is a low-level programming language that provides a symbolic representation of the machine instructions for a specific processor or family of processors. It is typically used when writing code for embedded systems, or when the target processor and/or instruction set of the program is not well-known. Assembly language is generally used when more control over the memory management and data layout of a program is desired. It also allows for generating more efficient code since the code can be tailored for the target processor and instruction set."} {"instruction": "Create an HTML page with a layout consisting of 3 containers: one on the left and two on the right.", "input": "", "output": "
    "} {"instruction": "Find the index of the element that occurs only once in the array.", "input": "arr = [1, 1, 5, 5, 6, 8];", "output": "def find_unique_element(arr): index = -1 for i in range(len(arr)): freq = 0 for j in range(len(arr)): if arr[i] == arr[j]: freq += 1 if freq == 1: index = i break return index # Testing arr = [1, 1, 5, 5, 6, 8] index = find_unique_element(arr) print(\"Index of the unique element is: \", index)"} {"instruction": "Write a function in Python to optimize a given objective function using gradient descent.", "input": "", "output": "def gradient_descent(lr, x, y):\n m_curr = b_curr = 0 \n iterations = 10000\n n = len(x)\n\n for i in range(iterations): \n y_predicted = m_curr*x + b_curr\n cost = (1/n) * sum([val**2 for val in (y-y_predicted)]) \n md = -(2/n)*sum(x*(y-y_predicted)) \n bd = -(2/n)*sum(y-y_predicted) \n m_curr = m_curr - lr * md \n b_curr = b_curr - lr * bd \n\n return m_curr, b_curr"} {"instruction": "Using C#, write a method that returns a list of strings containing only elements of an input string array containing the letter 'a'.", "input": "string[] s = {\"apple\", \"banana\", \"cat\"};", "output": "public static List FilterByLetterA(string[] s) { List list = new List(); foreach (string item in s) { if (item.Contains(\"a\")) { list.Add(item); } } return list; }"} {"instruction": "Write a SQL query to find all records from the table 'products' with a price equal to 10.", "input": "", "output": "SELECT * FROM products WHERE price = 10;"} {"instruction": "Write a Python program to find all palindromic words in a given list.", "input": "words = [\"word\", \"racecar\", \"level\", \"pop\", \"mom\", \"nursesrun\"]", "output": "def palindrome_words(words): \n \"\"\"This function takes in a list of words and returns a list of palindromic words\"\"\"\n\n palindrome_words = []\n\n for word in words:\n if word == word[::-1]:\n palindrome_words.append(word)\n\n return palindrome_words"} {"instruction": "Write an SQL query that displays a table of the ten most commonly used words in the given article.", "input": "Today, I climbed the tallest mountain in the world. It was an incredible experience with stunning views and a sense of accomplishment at the top.", "output": "SELECT word, COUNT(*) AS occurrence FROM article GROUP BY word ORDER BY occurrence DESC LIMIT 10;"} {"instruction": "You are given a list of float numbers. Write a code to sort them in ascending order.", "input": "arr = [2.5, 3.2, 2.1, 4.6, 1.6]", "output": "def bubbleSort(arr): n = len(arr) for i in range(n): for j in range(0, n-i-1): if arr[j] > arr[j+1] : arr[j], arr[j+1] = arr[j+1], arr[j] return arr sorted_arr = bubbleSort(arr) print(sorted_arr) // Output: [1.6, 2.1, 2.5, 3.2, 4.6]"} {"instruction": "Write an R command to sort the data in a data frame based on the values of one column.", "input": "df <- data.frame(A = c(4, 5, 11, 8), B = c(13, 12, 6, 11), C = c(4, 5, 7, 3))", "output": "df <- df[order(df$A),]"} {"instruction": "Rewrite the following code in the form of list comprehension.", "input": "names = [\"Max\",\"John\",\"Monica\",\"Harry\",\"Steve\"] upper_names = [] for name in names: upper_names.append(name.upper())", "output": "upper_names = [name.upper() for name in names]"} {"instruction": "Create an algorithm for finding the minimum element in an array of integers.", "input": "[3, 7, 14, 2, 11]", "output": "def find_min(array): min_element = array[0] for i in range(1, len(array)): if array[i] < min_element: min_element = array[i] return min_element"} {"text": "[DE Wikipedia] Anthony Zambrano\n\nAnthony José Zambrano de la Cruz (* 17. Januar 1998 in Maicao) ist ein kolumbianischer Leichtathlet, der sich auf den 400-Meter-Lauf spezialisiert hat. 2019 wurde er bei den Weltmeisterschaften in Doha mit Südamerikarekord Vizeweltmeister. 2021 gewann er bei den Olympischen Sommerspielen in Tokio die Silbermedaille. Herkunft und Leben Anthony Zambrano stammt aus dem Norden Kolumbiens. 2012 fing er mit der Leichtathletik an, zunächst in Schulwettkämpfen. Sportliche Laufbahn Anthony Zambrano trat erstmals 2014 an nationalen Jugendmeisterschaften, also bei den Unter-18-Jährigen, an, startete allerdings auch bereits gegen Athleten der Altersklasse U23. In seiner kolumbianischen Heimat fanden 2014 die U18-Südamerikameisterschaften statt. Dort startete Zambrano über seine Spezialdisziplin, die 400 m. Im Finale belegte er in 48,17 s den fünften Platz, die damals eine neue Bestzeit für ihn bedeuteten. Ein Jahr später fanden, ebenfalls in Cali, die U18-Weltmeisterschaften in Kolumbien an. Nachdem Zambrano souverän Vor- und Halbfinallauf überstand, wurde er im Finale in 46,57 s Siebter. Mit der 4-mal-400-Meter-Staffel wurde er im Vorlauf disqualifiziert. 2016 trat er im Juli bei den U20-Weltmeisterschaften im polnischen Bydgoszcz an. Im Finale wurde er in 46,50 s Sechster. Einen Monat später nahm er mit 18 Jahren als Teil der Staffel auch an den Olympischen Spielen, und damit seinen ersten internationalen Titelkämpfen bei den Erwachsenen, teil. Zusammen mit seinen Mannschaftskollegen scheiterte die 4-mal-400-Meter-Staffel als Sechste in ihrem Vorlauf. Die zwei folgenden Saison warfen ihn Verletzungen immer wieder zurück. 2018 gewann er schließlich dennoch bei den U23-Südamerikameisterschaften drei Goldmedaillen. Über 400 m gewann er in 45,19 s. Zudem siegte er mit der 4-mal-100- und mit der 4-mal-400-Meter-Staffel. Im Mai 2019 wurde Zambrano über 400 m und mit der Staffel Südamerikameister bei den Meisterschaften in Lima. Dort fanden im August auch die Panamerikanischen Spiele statt, bei denen er über die gleichen Distanzen ebenfalls zweimal triumphierte. Seinen bislang größten sportlichen Erfolg stellte er dann mit dem Gewinn der Silbermedaille bei den Weltmeisterschaften in Doha auf. In 44,15 s stellte er im Finale dabei auch einen neuen Südamerikarekord über die 400 m auf. Dieser hatte zuletzt seit 1999 bestanden und wurde vom Brasilianer Sanderlei Claro Parrela gehalten. Die Silbermedaille bedeutete zudem die erste WM-Medaille in einem Laufwettbewerb für Zambranos Heimatland. Zwei Tage nach dem Gewinn der Silbermedaille, lief er auch im Finale als Teil der kolumbianischen 4-mal-400-Meter-Staffel. Das Quartett erreichte dabei in einer Zeit von 2:59,50 min auf dem vierten Platz das Ziel und stellte damit ebenfalls einen neuen Nationalrekord auf. 2021…"} {"instruction": "Generate a valid SQL query to select data from table 'user_accounts'", "input": "", "output": "SELECT * FROM user_accounts;"} {"instruction": "Write a function that takes in a string of text and counts the number of times each letter appears in the string", "input": "text = \"The quick brown fox jumps over the lazy dog\"", "output": "def count_letters(text): letter_count = {} for character in text: if character not in letter_count: letter_count[character] = 1 else: letter_count[character] += 1 return letter_count print(count_letters(text))"} {"instruction": "Construct a SQL query to find all the authors whose book titles contain \"python\" in a given database.", "input": "", "output": "SELECT author \nFROM books \nWHERE title LIKE '%python%';"} {"text": "[CS Wikipedia] Volby v Monaku\n\nVolby v Monaku jsou svobodné. Volí se pouze do jednokomorového parlamentu 24 členů na pětileté volební období. Volit mohou občané nad 18 let. Dominantní politické strany Monacká unie Obzor Monaka Obnova Reference"} {"instruction": "Create a program in Python that computes the n-th Fibonacci number.", "input": "15", "output": "def calculate_fibonacci(n):\n \"\"\"\n Calculates the n-th Fibonacci number.\n Args:\n n: the n-th Fibonacci number.\n Returns:\n The Fibonacci number at a given index.\n \"\"\"\n # Base cases\n if n == 0:\n return 0\n elif n == 1:\n return 1\n\n # Calculate n-th Fibonacci number\n return calculate_fibonacci(n-1) + calculate_fibonacci(n-2)\n\nfib = calculate_fibonacci(15)\nprint(fib)"} {"text": "[CS Wikipedia] Seemann\n\nSeemann (česky Námořník) je druhý singl skupiny Rammstein. Byl vydán 8. ledna 1996. Na obalu singlu je vyobrazena loď z videoklipu k songu Seemann, jenž byl natočen roku 1996 v berlínských ateliérech. Na singlu se nenachází remixy, kromě skladby Seemann obsahuje také píseň „Wollt ihr das Bett in Flammen Sehen?“ z alba Herzeleid (1995). Sehnat tento singl je již dnes velice obtížné, koupit ho jednotlivě je prakticky nemožné. Seemann je součástí singlové kolekce \"Original single Kollektion\" z roku 1998, která obsahuje všechny singly z prvních dvou alb (Herlzeleid a Sehnsucht). Píseň se v roce 2003 dočkala coververze kterou nahrála finská skupina Apocalyptica spolu s německou zpěvačkou Ninou Hagen. Seznam skladeb „Seemann“ – 05:00 „Der Meister“ – 04:10 „Rammstein In The House“ (Timewriter remix) – 06:24 Písně z roku 1996 Singly z roku 1996 Písně Rammstein Písně v němčině"} {"instruction": "Write a Python function to check if two given strings are anagrams or not. An anagram is two phrases or sentences that use the same exact letters and line up one letter to another.", "input": "", "output": "def is_anagram(str1, str2): \n \n\t# Get oder of the strings \n\tstr1_order = sorted(str1) \n\tstr2_order = sorted(str2) \n\t \n\t# Compare the order of strings \n\tif (str1_order == str2_order): \n\t\treturn True \n\treturn False"} {"instruction": "Using a for loop, print out a countdown from 10 to 1.", "input": "", "output": "for i in range(10, 0, -1): print(i)"} {"text": "[EN Wikipedia] Henrikas Natalevičius\n\nHenrikas Natalevičius (born 1953 in Vilnius) is a Lithuanian painter. Henrikas is a Lithuanian artist. His works have been displayed in galleries all over Lithuania, in Vilnius, the Lithuanian Art Museum and the National M. K. Čiurlionis Museum of Art in Kaunas. See also List of Lithuanian painters References Lithuanian painters 1953 births Living people Artists from Vilnius"} {"instruction": "Modify the following Python program to explore and retrieve data from a dataset using Pandas.", "input": "import pandas as pd\n\ndf = pd.read_csv('data.csv')\n\nprint(df)", "output": "import pandas as pd\n\ndf = pd.read_csv('data.csv')\n\nprint(df.head())\nprint(df.info())\nprint(\"Average age of passengers:\", df['Age'].mean())\nprint(\"Number of female passengers:\", df[df['Sex'] == 'female'].shape[0])\nprint(\"Oldest passenger:\", df.loc[df['Age'].idxmax()])"} {"instruction": "Analyze the given HTML code.", "input": "

    Title

    paragraph

    ", "output": "This code creates a div element which contains an h3 for a title, a p for a paragraph, and a button element. It will be rendered as a box with the title at the top, followed by the paragraph and button below it."} {"instruction": "Create a python function to calculate the BMI of a person given the person's weight and height in 'Metric' unit.", "input": "weight = 80 (kg)\nheight = 180 (cm)", "output": "def calculateBMI(weight, height):\n # convert height from cm to m\n height = height/100\n \n # calculate BMI\n BMI = weight / (height*height)\n \n return BMI\n \nif __name__ == '__main__':\n weight = 80 # in kg\n height = 180 # in cm\n BMI = calculateBMI(weight, height)\n print(f'The BMI of the person is {BMI}')"} {"text": "[CS Wikipedia] György Sárosi\n\nGyörgy Sárosi, rodným jménem György Stefanicsics (5. srpen 1912 – 20. červen 1993), byl maďarský fotbalista. Hrával na pozici útočníka či záložníka. S maďarskou reprezentací vybojoval stříbrnou medaili na mistrovství světa roku 1938. Na tomto šampionátu byl kapitánem svého týmu, vstřelil 5 branek, byl federací FIFA zpětně zařazen do all-stars a vyhlášen třetím nejlepším hráčem turnaje. Hrál i na mistrovství světa roku 1934. V národním týmu celkem odehrál 62 utkání a vstřelil 42 gólů. Celou svou kariéru strávil v jediném klubu, ve Ferencvárosi Budapešť. Roku 1937 s ním vybojoval Středoevropský pohár, tehdy nejprestižnější klubovou mezinárodní soutěž v Evropě. Je pětinásobným mistrem Maďarska (1932, 1934, 1938, 1940, 1941). Za celou kariéru nastřílel 351 branek v 383 ligových zápasech. Časopis World Soccer ho roku 1999 vyhlásil 87. nejlepším fotbalistou 20. století. Po skončení hráčské kariéry se stal trenérem, vedl řadu italských mužstev, včetně Juventusu, Bari či AS Řím. Reference Externí odkazy Statistiky na RSSSF.com Portrét na World Football Legends Portrét na stránkách FIFA Maďarští fotbalisté Maďarští fotbaloví reprezentanti Fotbaloví útočníci Fotbaloví záložníci Fotbalisté Ferencvárose Maďarští fotbaloví trenéři Trenéři FC Bari Trenéři Juventusu Trenéři Janova CFC Trenéři AS Řím Trenéři Bologna FC Trenéři FC Lugano Narození 16. září Úmrtí 20. června Narození v Budapešti Narození v roce 1912 Úmrtí v roce 1993 Úmrtí v Janově (Itálie) Muži Hráči Mistrovství světa ve fotbale 1938 Hráči Mistrovství světa ve fotbale 1934"} {"instruction": "Develop a Python function for validating email addresses according to RFC2822.", "input": "", "output": "import re\n\ndef is_valid_email(email):\n # Making sure it contains an @ and at least one '.'\n if re.match(\"^.+@[^.].*\\.[a-z]{2,10}$\", email) is None:\n return False\n return True"} {"instruction": "Identify all the variables in this C++ program.", "input": "#include int main() { int number = 10; std::cout << number; return 0; }", "output": "The variable in the above program is 'number'."} {"instruction": "Create a command line application in Python that takes two numbers as arguments and prints the addition of them.", "input": "Not applicable", "output": "import sys\n\ndef add(num1, num2):\n return num1 + num2\n\nif __name__ == '__main__':\n num1 = int(sys.argv[1])\n num2 = int(sys.argv[2])\n print(add(num1, num2))"} {"instruction": "Create an object with two fields, a name and an id.", "input": "", "output": "var obj = { name: 'John', id: '12345' };"} {"instruction": "Generate a four-line Python program that uses a loop to add all the integers from 1 to 10 and print the result.", "input": "", "output": "n = 0\nfor i in range(1,11):\n n = n + i\nprint(\"The sum of all the numbers between 1 and 10 is:\", n)"} {"instruction": "Extract the common key words from the given two strings using a Python script.", "input": "String 1: This programming language is easy to learn String 2: Comparing to other languages, this language is simpler", "output": "common_key_words = [\"language\", \"easy\", \"learn\", \"comparing\", \"other\", \"simpler\"]"} {"instruction": "Given a tree, traverse it in the pre-order manner.", "input": "", "output": "def pre_order_traversal(tree): # Visit the root print(tree.value) # Traverse the left subtree, if it exists if tree.left: pre_order_traversal(tree.left) # Traverse the right subtree, if it exists if tree.right: pre_order_traversal(tree.right)"} {"instruction": "Write a function that returns the sum of all the elements of a list in Python.", "input": "", "output": "def mySum(list):\n total = 0\n for num in list:\n total += num\n return total"} {"instruction": "Evaluate the given algebraic expression by substituting 4 for x.", "input": "expression = 2x + 6", "output": "expression = 2 * 4 + 6 = 14"} {"instruction": "Reorder a given array in specialized order", "input": "", "output": "def reorder_array(arr): \"\"\" Reorder a given array in specialized order :param arr: the input array to reorder :return: the reordered array \"\"\" # determine the size of the array n = len(arr) # create a new array to store the reordered results reordered = [0] * n # loop through the array for i in range(n): # calculate the position of the current element pos = 2 * (arr[i] % (1 + n // 2)) # find the first vacant position in the new array while reordered[pos] != 0: pos += 1 # assign the current element to the vacant position reordered[pos] = arr[i] return reordered"} {"instruction": "Write a Python program to find the maximum number in a list of numbers.", "input": "[1, 9, 5, 18, 21, 2]", "output": "def find_max(nums):\n max_num = nums[0]\n for x in nums:\n if x > max_num:\n max_num = x\n return max_num\n\nprint(find_max([1,9,5,18,21,2]))"} {"text": "[EN Wikipedia] Anatomy\n\nAnatomy () is the branch of biology concerned with the study of the structure of organisms and their parts. Anatomy is a branch of natural science that deals with the structural organization of living things. It is an old science, having its beginnings in prehistoric times. Anatomy is inherently tied to developmental biology, embryology, comparative anatomy, evolutionary biology, and phylogeny, as these are the processes by which anatomy is generated, both over immediate and long-term timescales. Anatomy and physiology, which study the structure and function of organisms and their parts respectively, make a natural pair of related disciplines, and are often studied together. Human anatomy is one of the essential basic sciences that are applied in medicine. Anatomy is a complex and dynamic field that is constantly evolving as new discoveries are made. In recent years, there has been a significant increase in the use of advanced imaging techniques, such as MRI and CT scans, which allow for more detailed and accurate visualizations of the body's structures. The discipline of anatomy is divided into macroscopic and microscopic parts. Macroscopic anatomy, or gross anatomy, is the examination of an animal's body parts using unaided eyesight. Gross anatomy also includes the branch of superficial anatomy. Microscopic anatomy involves the use of optical instruments in the study of the tissues of various structures, known as histology, and also in the study of cells. The history of anatomy is characterized by a progressive understanding of the functions of the organs and structures of the human body. Methods have also improved dramatically, advancing from the examination of animals by dissection of carcasses and cadavers (corpses) to 20th-century medical imaging techniques, including X-ray, ultrasound, and magnetic resonance imaging. Etymology and definition Derived from the Greek anatomē \"dissection\" (from anatémnō \"I cut up, cut open\" from ἀνά aná \"up\", and τέμνω témnō \"I cut\"), anatomy is the scientific study of the structure of organisms including their systems, organs and tissues. It includes the appearance and position of the various parts, the materials from which they are composed, and their relationships with other parts. Anatomy is quite distinct from physiology and biochemistry, which deal respectively with the functions of those parts and the chemical processes involved. For example, an anatomist is concerned with the shape, size, position, structure, blood supply and innervation of an organ such as the liver; while a physiologist is interested in the production of bile, the role of the liver in nutrition and the regulation of bodily functions. The discipline of anatomy can be subdivided into a number of branches, including gross or macroscopic…"} {"instruction": "Develop a unit test in Python to verify correctness of an algorithm.", "input": "def algorithm(arr):\n\tsum = 0\n\tfor i in range(len(arr)):\n\t\tsum += arr[i]\n\treturn sum", "output": "import unittest\n\nclass TestAlgorithm(unittest.TestCase):\n \n def test_algorithm(self):\n 10 = algorithm([1, 2, 3, 4])\n self.assertEqual(10, 10)\n \n 40 = algorithm([10, 10, 10, 10])\n self.assertEqual(40, 40)\n\nif __name__ == '__main__':\n unittest.main()"} {"instruction": "Compose a program to reverse a list of numbers", "input": "", "output": "def reverse_nums(num_list): n = len(num_list) for i in range(n//2): num_list[i], num_list[n-i-1] = num_list[n-i-1], num_list[i] return num_list"} {"text": "[DE Wikipedia] Olympische Winterspiele 2022/Eisschnelllauf – 3000 m (Frauen)\n\nDie 3000 m im Eisschnelllauf der Frauen bei den Olympischen Winterspielen 2022 wurden am 5. Februar in der Nationalen Eisschnelllaufhalle in Peking ausgetragen. Für Claudia Pechstein war es die achte Teilnahme an Olympischen Winterspielen. Sie zog damit mit dem bisherigen Rekordhalter Noriaki Kasai gleich. Zugleich verlor sie den von ihr 2002 aufgestellten Rekord an die Olympiasiegerin Irene Schouten. Rekorde Vor dem Wettkampf hatten folgende Rekorde Bestand: Folgende neue Rekorde wurden während des Wettkampfs aufgestellt: Ergebnisse Weblinks Offizielle Ergebnisse des IOC (PDF; 10 MB) Einzelnachweise 03000 m (Frauen) Fraueneisschnelllaufwettbewerb"} {"instruction": "Softmax a list of numbers and then sum the output.", "input": "[1, 2, 3]", "output": "def softmax(arr): a = np.exp(arr) return a / np.sum(a) def sum_softmax(arr): return np.sum(softmax(arr))"} {"instruction": "Write a Swift code to print out the signature of a function.", "input": "func addNumbers(a: Int, b: Int) -> Int { return a + b }", "output": "print(addNumbers.signature) // prints: func addNumbers(a: Int, b: Int) -> Int"} {"instruction": "Modify the given Python program to optimize the memory allocation and improve the execution time of the program", "input": "import pandas as pd\ndata = pd.read_csv('dataset.csv')", "output": "import pandas as pd\n\n# Load the dataset with memory optimization\ndata = pd.read_csv('dataset.csv', low_memory=True)\n\n# Optimize the data to reduce the size \ndata = data.drop_duplicates(keep=False)\n\n# Optimize the data to increase the performance \ndata = data.apply(pd.to_numeric, errors='coerce')"} {"instruction": "Create a Python program to display the calendar of a given year.", "input": "", "output": "import calendar\n\ndef show_calendar(year):\n return calendar.calendar(year)"} {"instruction": "Configure a Python program to calculate the sum of all integers from 1 to 100.", "input": "", "output": "def calculate_sum():\n sum = 0\n for i in range(1, 101):\n sum += i\n return sum"} {"instruction": "Create a Python code to check if a single integer is a prime number", "input": "int number = 11", "output": "def is_prime(number):\n if number <= 1:\n return False\n\n for i in range(2, number):\n if number % i == 0:\n return False\n return True"} {"text": "[CS Wikipedia] Stavová veličina\n\nStavová veličina neboli veličina kvality je veličina, která popisuje stav termodynamického systému. Stavové veličiny se dělí na vnější (extenzivní) a vnitřní (intenzivní). Vnější veličiny závisí na velikosti termodynamického systému, vnitřní veličiny jsou na velikosti termodynamického systému nezávislé. Mezi stavové veličiny vnější patří: Objem Hmotnost Látkové množství Vnitřní energie, entalpie a další termodynamické potenciály Entropie Mezi stavové veličiny vnitřní patří: Tlak Teplota Hustota Stavovou veličinu lze uvést do kontrastu s tokovou veličinou. Stavová funkce Veličina, popisující stav soustavy, která během termodynamického děje při přechodu z jednoho stavu do druhého nezávisí na způsobu přechodu mezi těmito stavy, bývá označována jako stavová funkce. Stavová funkce tedy závisí pouze na počátečním a konečném stavu, ale nikoliv na způsobu, jakým se systém dostal z počátečního stavu do stavu konečného. Odkazy Externí odkazy Související články Stav soustavy Termodynamická veličina Termodynamická soustava Termodynamika Statistická mechanika"} {"instruction": "Create a Python program to perform Bubble Sort on an unsorted list.", "input": "[2, 4, 9, 5, 1]", "output": "# Bubble Sort Algorithm\ndef bubbleSort(lst):\n n = len(lst) \n \n # Traverse through all array elements \n\tfor i in range(n): \n \n\t\t# Last i elements are already in place \n\t\tfor j in range(0, n-i-1): \n \n\t\t\t# traverse the array from 0 to n-i-1 \n\t\t\t# Swap if the element found is greater \n\t\t\t# than the next element\n\t\t\tif lst[j] > lst[j+1] : \n\t\t\t\tlst[j], lst[j+1] = lst[j+1], lst[j]\n \n# Driver code to test above\nlst = [2, 4, 9, 5, 1]\nbubbleSort(lst)\n\nprint (\"Sorted array is:\")\nfor i in range(len(lst)):\n\tprint (\"%d\" %lst[i])"} {"instruction": "Calculate the frequency of occurrence of each letter in a word.", "input": "word = \"programming\"", "output": "def frequency_count(word): # dictionary to store the frequency of occurrence frequency = {} # iterate through each character for char in word: # if the character is present in the frequency dictionary if char in frequency: # increase the count of the character frequency[char] += 1 else: # add the character to the dictionary and set its count to 1 frequency[char] = 1 return frequency # Calculate the frequency of occurrence frequencies = frequency_count(word) print(frequencies) # Output: {'p': 1, 'r': 2, 'o': 2, 'g': 2, 'a': 1, 'm': 1, 'i': 1, 'n': 1}"} {"instruction": "Implement a recursive binary search on a given sorted list.", "input": "[-4, -2, 0, 6, 7, 8]", "output": "def binary_search(arr, num, start, end): if start >= end: return None mid = start + (end - start)//2 if arr[mid] == num: return mid if arr[mid] < num: return binary_search(arr, num, mid+1, end) else: return binary_search(arr, num, start, mid-1)"} {"text": "[CS Wikipedia] Patrik Dressler\n\nPatrik Dressler (* 30. října 1990 v Ostravě) je český fotbalový obránce, od ledna 2018 působící v FK Viktoria Žižkov. Klubová kariéra Svoji fotbalovou kariéru začal v Baníku Ostrava, kde prošel všemi mládežnickými kategoriemi. V roce 2010 se propracoval do prvního týmu. V červenci 2012 přestoupil do Hlučína. Před jarní částí ročníku 2012/13 zamířil do Viktorie Žižkov. V létě 2015 na Žižkově skončil. Byl na testech v Baníku Ostava, ale nakonec přestoupil do Teplic. Externí odkazy Profil hráče na transfermarkt.co.uk Čeští fotbalisté Fotbaloví obránci Fotbalisté FC Baník Ostrava Fotbalisté FC Hlučín Fotbalisté FK Viktoria Žižkov Fotbalisté FK Teplice Narození v Ostravě Narození v roce 1990 Žijící lidé Muži Narození 30. října"} {"instruction": "Create a function to find cube of any number", "input": "", "output": "def cube(n): return n**3"} {"text": "[DE Wikipedia] Stade Soussien\n\nStade Soussien () ist ein tunesischer Fußballverein aus der Küstenstadt Sousse. Der Verein spielt in der dritthöchsten Spielklasse Tunesiens. Die Heimspiele werden im Stade Mustapha Amara ausgetragen. Wichtige Spiele, zu denen hoher Zuschauerandrang erwartet wird, finden im Stade Olympique de Sousse statt. Geschichte Der Stade Soussien hat seine Wurzeln in der Medina von Sousse und wurde 1949 gegründet. Die Grün-Weißen waren von 1958 bis 1967 und in den Saisons 1983/84 und 1996/97 Erstligist. Die größten Erfolge feierte der Verein in den Sechzigern. Ganz besonders in Erinnerung bleibt die Saison 1961/62, in welcher man es nur knapp verpasste, die Saison mit einem Double zu beenden. In der tunesischen Meisterschaft landete die Mannschaft nach Ende der Saison mit 56 Punkten auf dem zweiten Platz. Der Meister Stade Tunisien beendete die Saison mit 58 Punkten. Im Finale des tunesischen Pokals 1962 scheiterte man ebenfalls an Stade Tunisien. Das Hinspiel ging torlos aus, das Wiederholungsspiel gewann der Verein aus Le Bardo mit 1:0. Als Finalist qualifizierte man sich für den mittlerweile nicht mehr ausgetragenen Coupe Hédi Chaker und revanchierte sich mit einem 2:0-Sieg im Endspiel bei Stade Tunisien. Erfolge Championnat de Tunisie Vizemeister: 1962 Coupe de Tunisie Finalist: 1962 Coupe Hédi Chaker (1) Sieger: 1962 Einzelnachweise Sousse Sport (Sousse) Gegründet 1949"} {"instruction": "Customize a WordPress theme to ensure its compatibility with the latest version of the WordPress software.", "input": "", "output": "Update the functions.php file of your WordPress theme to use the latest functions, classes, constants, and APIs supplied by WordPress. Also, delete any deprecated code and features that are not supported in the latest version of WordPress. Using the WordPress Theme Check plugin is highly recommended to check the compatibility of any WordPress theme with the newest version of WordPress."} {"text": "[EN Wikipedia] Linda Winstead Jones\n\nLinda Winstead Jones is an American author who has written more than fifty romance books in several subgenres, including Paranormal Romance,Historical Romance, Fairy Tale Romance, and Romantic Suspense. Biography Jones has published many of her novels under various pseudonyms including Linda Jones, Linda Fallon and Linda Devlin. Jones's September 1996 time-travel, Desperado's Gold was the winner of the Colorado Award of Excellence in the paranormal division. She was nominated for a Romantic Times Career Achievement Award for Innovative Historical Romance, and her book Someone's Been Sleeping In My Bed was nominated in their Best Historical Love and Laughter category for 1996. She has won the Colorado Romance Writers Award of Excellence twice, is a three time RITA Award finalist, and (writing as Linda Fallon) winner of the 2004 Rita for paranormal romance. Bibliography Series Sinclair Connection Madigan's Wife (2001) Hot on His Trail (2001) Capturing Cleo (2002) In Bed with Boone (2002) Wilder Days (2003) Clint's Wild Ride (2003) On Dean's Watch (2003) Last Chance Heroes Running Scared (2004) Truly, Madly, Dangerously (2005) One Major Distraction (2005) Lucky's Woman (2006) The Guardian (2006) Stories of Columbyana Fyne sisters The Sun Witch (2004) The Moon Witch (2005) The Star Witch (2006) Children of the Sun Prince of Magic (2007) Prince of Fire (2007) Prince of Swords (2007) Emperor's Bride Untouchable (2008) 22 Nights (2008) Bride By Command (2009) Novels Every Little Thing (2000) West Wind (2004) Omnibus Christmas Spirit (1997) (with Elaine Fox, Leigh Greenwood) Love Is Murder (2003) (with Rebecca Brandewyne, Maureen Child) Fever / Billionaire Drifter (2004) (with Beverly Bird) One Major Distraction / Melting Point (2005) (with Debra Cowan) Beyond the Dark (2005) (with Evelyn Vaughn, Karen Whiddon) In His Bed (2007) (with Barbara McCauley) Guardian / Black Sheep P.I. (2008) (with Karen Whiddon) Romancing the Crown (2008) (with Marie Ferrarella) Sweet Dreams in The Magical Christmas Cat (2008) (with Lora Leigh, Erin McCarthy, Nalini Singh) and Paranormal Holiday Anthology Trio (2010) Series contributed to Men in Blue Bridger's Last Stand (1999) Romancing the Crown Secret-agent Sheikh (2002) Romancing the Crown Secret-agent Sheikh (2002) Family Secrets Fever (2004) Family Secrets : The Next Generation A Touch of the Beast (2004) Capturing the Crown The Sheikh and I (2006) Raintree Raintree: Haunted (2007) Raintree (omnibus) (2008) (with Beverly Barton, Linda Howard) Sources Fantastic Fiction. 2009. Fantastic Fiction. 7 February 2009 Alabama Bound. 2004. Alabama Bound. 2100 Park Place, Birmingham, Alabama, 35203-2974. 7 February 2009. Linda Jones. 1998– 2009. Fictionwise.com, Ereader.com. 7 February 2009. Linda Winstead Jones.2008 Penguin Group…"} {"instruction": "Given the following array, remove all duplicates and return a new array with the remaining elements.", "input": "arr = [1, 2, 4, 3, 3, 2]", "output": "new_arr = list(set(arr)) # [1, 2, 3, 4]"} {"instruction": "Write a Python script that mines data from Twitter and displays the latest tweets for a keyword.", "input": "Not applicable", "output": "import tweepy\n\nconsumer_key = ''\nconsumer_secret = ''\naccess_token = ''\naccess_token_secret = ''\n\nauth = tweepy.OAuthHandler(consumer_key, consumer_secret)\nauth.set_access_token(access_token, access_token_secret)\n\napi = tweepy.API(auth)\n\npublic_tweets = api.search('python')\nfor tweet in public_tweets:\n print(tweet.text)"} {"instruction": "Generate a Python script to find the most frequently used word in a given text.", "input": "text.txt", "output": "# import Counter and open file\nfrom collections import Counter\nwith open('text.txt','r') as file:\n # split file into words\n words = file.read().split()\n \n # count and sort words\n count_words = Counter(words)\n sorted_count_words = count_words.most_common()\n \n # get the most frequent word\n most_frequent_word = sorted_count_words[0][0]\n number_of_occurences = sorted_count_words[0][1]\n \n # print results\n print('The most frequently used word is \"{}\" with {} occurence(s).'.format(most_frequent_word, number_of_occurences))"} {"text": "[EN Wikipedia] Pairatahi River\n\nThe Pairatahi River is a river of the Northland Region of New Zealand's North Island. It flows generally north to reach Rangaunu Harbour to the northeast of Awanui. See also List of rivers of New Zealand References Rivers of the Northland Region Rivers of New Zealand"} {"instruction": "Write a function in Python to detect duplicate elements in an array.", "input": "[3, 5, 6, 7, 3, 5]", "output": "def find_duplicates(arr):\n seen = set()\n duplicates = []\n for x in arr:\n if x in seen:\n duplicates.append(x)\n else:\n seen.add(x)\n return duplicates\n\nprint(find_duplicates([3, 5, 6, 7, 3, 5]))"} {"instruction": "Modify the following JavaScript code to alert \"Thanks for visiting!\" when the page is loaded.", "input": "", "output": "window.onload = function() { alert(\"Thanks for visiting!\"); }"} {"instruction": "To set up the Mission Pinball Framework (mpf), create a setup.py file with the given code and run it. The setup.py file includes dependencies and entry points for console scripts.", "input": "", "output": "\"\"\"Mission Pinball Framework (mpf) setup.py.\"\"\"\nimport re\nfrom setuptools import setup\n\n# http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package\nVERSIONFILE = \"mpf/_version.py\"\nVERSION_STRING_LONG = open(VERSIONFILE, \"rt\").read()\nVSRE = r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\"\n_MO = re.search(VSRE, VERSION_STRING_LONG, re.M)\nif _MO:\n VERSION_STRING = _MO.group(1)\nelse:\n raise RuntimeError(\"Unable to find version string in %s.\" % (VERSIONFILE,))\n\npin2dmd_requires = [\n 'pyusb==1.1.0'\n]\n\nlinux_i2c_requires = [\n 'smbus2_asyncio==0.0.5'\n]\n\nrpi_requires = [\n 'apigpio-mpf==0.0.3'\n]\n\ncli_requires = [\n 'prompt_toolkit==3.0.8',\n 'asciimatics==1.12.0',\n 'terminaltables==3.1.0',\n]\n\nosc_requires = [\n 'python-osc==1.7.4'\n]\n\nirc_requires = [\n 'irc==19.0.1'\n]\n\nvpe_requires = [\n 'grpcio_tools==1.34.0',\n 'grpcio==1.34.0',\n 'protobuf==3.14.0',\n]\n\ncrash_reporter_requires = [\n 'requests==2.22.0'\n]\n\n\nall_requires = (pin2dmd_requires + cli_requires + linux_i2c_requires + rpi_requires + osc_requires + irc_requires +\n vpe_requires + crash_reporter_requires)\n\nsetup(\n\n name='mpf',\n version=VERSION_STRING,\n description='Mission Pinball Framework',\n long_description='''Let's build a pinball machine!\n\nThe Mission Pinball Framework (MPF) is an open source, cross-platform,\nPython-based software framework for powering real pinball machines.\n\nMPF is written in Python. It can run on Windows, OS X, and Linux\nwith the same code and configurations.\n\nMPF interacts with real, physical pinball machines via modern pinball\ncontroller hardware such as a Multimorphic P-ROC or P3-ROC, a FAST Pinball\ncontroller, or Open Pinball Project hardware controllers. You can use MPF to\npower your own custom-built machine or to update the software in existing\nWilliams, Bally, Stern, or Data East machines.\n\nMPF is a work-in-progress that is not yet complete, though we're actively\ndeveloping it and checking in several commits a week. It's MIT licensed,\nactively developed by fun people, and supported by a vibrant, pinball-loving\ncommunity.''',\n\n url='https://missionpinball.org',\n author='The Mission Pinball Framework Team',\n author_email='brian@missionpinball.org',\n license='MIT',\n\n classifiers=[\n 'Development Status :: 3 - Alpha',\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Python :: 3.6',\n 'Programming "} {"instruction": "Write a Python program to turn a string into Pig Latin.", "input": "string = \"Hello World\"", "output": "def toPigLatin(s):\n vowels = ('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U')\n if s[0] in vowels:\n return s + 'way'\n else:\n return s[1:] + s[0] + 'ay'\n \nprint(toPigLatin(\"Hello World\"))"} {"text": "[DE Wikipedia] Thiergarten (Beuron)\n\nThiergarten ist ein Ortsteil der Gemeinde Beuron im Landkreis Sigmaringen in Baden-Württemberg. Geographie Geographische Lage Thiergarten liegt im Tal der Oberen Donau, rund zehn Kilometer westlich von Sigmaringen. Geologie Westlich von Thiergarten befindet sich zwischen Falkenstein und Mittelberg, als Umlaufberg, der frühere Donauverlauf – das „Buttenloch“ auf (heutiges Donauniveau ) – an dessen Ostteil im Anschluss an das Ortsende sich ein offen gelassener Steinbruch aus dem 19. Jahrhundert befindet. Dieser wurde später durch die „Karlsruhe Steinwerke“ und in der Nachfolge durch die Firma „Schotterteufel“ betrieben. In den Nachkriegsjahren arbeiteten hier italienische Gastarbeiter. Geschichte In der Falkensteinhöhle wurden 1933 durch Eduard Peters aus der mesolithischen Kulturschicht rund 9000 Werkzeuge, Geräte und Schmuck, sowie die Skelettreste eines etwa 30 bis 40 Jahre alten Mannes mit mehr als 1,70 Meter Körpergröße aus der Mittelsteinzeit (vor etwa 8000 bis 5000 v. Chr.) ausgegraben. Im Zuge von Grabungen konnte nachgewiesen werden, dass sich die mittelsteinzeitlichen Jäger hier auch vom Fischfang ernährten. So fanden sich neben einer Reihe typischer Fischarten der Donau wie Nerfling, Aitel, Hecht und Huchen auch Perlfische. Das kleine Dorf trägt seinen Namen von einem Wildgehege, das Graf Wilhelm von Zimmern zu Meßkirch 1575 bei seiner Burg Falkenstein anlegen ließ. Der frühere Ort „Weiler“, er wurde 1138 erstmals urkundlich erwähnt, aus dem Jahre 1275 liegt ein weiteres Zeugnis vor, verschwand bereits vor dem Dreißigjährigen Krieg (1618–1648) wieder, wurde in „Thiergarten“ umbenannt.siehe auch Burg Unterfalkenstein Nach dem Aussterben der Herren von Zimmern fiel das Gebiet an das Fürstenhaus Fürstenberg. Diese ließen hier 1670 ein Schmelz- und Hammerwerk mit einer Arbeiterkolonie errichten, deren Häuser zum Teil heute noch stehen. Auch die Kohlenscheuer und das Gasthaus zum Hammer von 1789 erinnern noch an die Zeit, das Werk wurde 1863 stillgelegt. Zur Verhüttung dienten die in der Umgebung gewonnenen Bohnerze, eisenhaltige Verwitterungsprodukte des Jurakalks. Thiergarten wurde im Jahr 1806 aufgeteilt: Der links der Donau gelegene Teil kam zu Hohenzollern-Sigmaringen. Am 1. April 1901 wurde das Dorf der Gemeinde Vilsingen zugeordnet. Im Zuge der Gemeindegebietsreform in Baden-Württemberg wurde Thiergarten zusammen mit Vilsingen am 1. Januar 1975 in die Gemeinde Inzigkofen umgegliedert. Der rechts der Donau gelegene Teil kam zu Baden. Im Jahr 1890 wurde er der Gemeinde Gutenstein zugeordnet. Diese wurde am 1. Juli 1974 in die Kreisstadt Sigmaringen eingegliedert. Nach Anhörung der Einwohner wurde Thiergarten (beide Gebietsteile) am 1. Januar 1977 in die Gemeinde Beuron umgegliedert. Einwohnerentwicklung In Thiergarten gibt es heute deutlich…"} {"instruction": "Write a Python program to format a given string with a coefficient of over 66%.", "input": "s = \"Hello World\"", "output": "def format_string(s):\n return s.upper() if (s.count(\" \")+1) / len(s) > 0.66 else s\n\ns = \"Hello World\"\nprint(format_string(s))\n# Output: HELLO WORLD"} {"instruction": "Using the provided Python code, optimize the code to be as efficient as possible.", "input": "x = 0\ny = 0\n\ndef func():\nglobal x\nglobal y\nx += 1\ny += 2\n\nfor i in range(10000):\nfunc()", "output": "x = 0\ny = 0\n\ndef func():\nglobal x, y\nx, y = x+1, y+2\n\nfunc()\nx += 9999\ny += 19998"} {"instruction": "Generate a Python code that flattens a two-dimensional array.", "input": "[[1, 2], [3, 4]]", "output": "def flatten_2d_array(arr): flat_arr = [] for subarr in arr: flat_arr += subarr return flat_arr # Driver code input_list = [[1, 2], [3, 4]] print(flatten_2d_array(input_list))"} {"instruction": "Create a Python program that counts how many times each word appears in a given sentence.", "input": "The quick brown fox jumps over the lazy dog", "output": "sentence = 'The quick brown fox jumps over the lazy dog'\n\n# Split the sentence into individual words\nwords = sentence.split(' ')\n\n# Create an empty dictionary\nword_count = {}\n\n# Count the number of times each word appears\nfor word in words:\n if word in word_count:\n word_count[word] += 1\n else:\n word_count[word] = 1\n\n# Print the results\nfor word in word_count:\n print(\"{}: {}\".format(word, word_count[word]))"} {"instruction": "Write HTML code to create a webpage that has two paragraphs and a header.", "input": "", "output": " Two Paragraphs & a Header

    Header

    Paragraph 1

    Paragraph 2

    "} {"instruction": "Write Python code to print the most frequent characters in a given string.", "input": "String: I love apples", "output": "def most_frequent_char(s): count = [0] * 256 max_count = 0 max_id = 0 for i in range(len(s)): count[ord(s[i])] += 1 if count[ord(s[i])] > max_count: max_count = count[ord(s[i])] max_id = i return s[max_id]"} {"instruction": "Develop a program in Python to compute the sum of integers in a given range?", "input": "", "output": "def sum_range(start, end):\n total = 0\n for i in range(start,end + 1):\n total += i\n return total\n\n# Test the function\nprint(sum_range(1, 10)) # Output: 55"} {"text": "[CS Wikipedia] Seznam poslanců Českého zemského sněmu (1895–1901)\n\nToto je seznam poslanců Českého zemského sněmu ve volebním období 1895–1901. Zahrnuje všechny členy Českého zemského sněmu ve funkčním období od zemských voleb roku 1895 až do voleb roku 1901. Odkazy Reference Literatura Almanach zemského sněmu 1896 Seznamy poslanců Českého zemského sněmu"} {"text": "[CS Wikipedia] Listy (časopis)\n\nListy jsou kulturní a společenský dvouměsíčník vycházející v Olomouci. Jeho součástí jsou texty o domácí a zahraniční politice, fejetony, informace z kultury, v každém čísle publikuje autorské fejetony, fotografie a poezii. Časopis každoročně uděluje Cenu Pelikán „za zásluhy o politickou kulturu a občanský dialog“. Historie Listy založil v roce 1971 v římském exilu novinář a reformně komunistický politik Jiří Pelikán, mezi jeho spolupracovníky patřili mimo jiné Dušan Havlíček, Zdeněk Hejzlar nebo Vladimír Tosek. Po roce 1991 vycházel časopis v Praze, od roku 2003 vychází v Olomouci, nyní s podtitulem Dvouměsíčník pro kulturu a dialog. Vydavatelem je Nakladatelství Burian a Tichák. Kromě časopisu vydává nakladatelství také knihy věnované olomouckému místopisu a poezii a biografické práce s tematikou střední Evropy. Výkonnými redaktory časopisu byli od roku 2003 Václav Burian (zemřel v r. 2014) a Tomáš Tichák, od roku 2015 je redaktorem časopisu novinář Patrik Eichler. Šéfredaktorem časopisu je od roku 2021 Tomáš Tichák. Předchůdci Na přelomu let 1968–1969 vycházel pod názvem Listy týdeník Svazu československých spisovatelů (předtím pod názvem Literární noviny a Literární listy). Na tuto tradici exilové Listy navázaly. Odkazy Reference Literatura Francesco Caccamo: Jiří Pelikán a jeho cesta socialismem 20. století, Brno 2008 Dušan Havlíček, Listy v exilu: Obsahová analýza časopisu Listy, který v letech 1971-1989 vydával v Římě Jiří Pelikán, Olomouc 2008 Dušan Havlíček – Jiří Pelikán: Psáno z Říma, psáno ze Ženevy: Výběr ze vzájemné korespondence v letech exilu 1969 až 1989, Olomouc 2013 František Janouch – Jiří Pelikán, Korespondence, Praha 2015 Externí odkazy Listy Digitální studovna ÚSTR – digitalizovaná verze časopisu (1970-1989) Listy Záznam v databázi SLK Národní knihovny ČR Záznam v databázi AUT Národní knihovny ČR Časopisy v češtině Časopisy ve slovenštině Československé časopisy Český exil"} {"text": "[DE Wikipedia] Kebse\n\nKebse, Kebsfrau und Kebsweib sind veraltete, heute allenfalls noch dialektal verwendete Bezeichnungen für eine Nebenfrau oder eine Konkubine. Das Bürgertum des 19. Jahrhunderts, dem dieser Ausdruck zu derb erschien, sprach stattdessen lieber von Maitresse. In der Lutherschen Bibelübersetzung dagegen wurde Kebse noch wertfrei und häufig in der Bedeutung „Nebenfrau“ verwendet. Siehe auch Kebsehe Bastard Pilegesch (hebräisch für Konkubine) Weblinks Einzelnachweise Eheform"} {"text": "[HI Wikipedia] सुंग वंश\n\nthumb|320 × 226px|शुंग वंश| शुंगवंश मौर्य वंश के अंतिम सम्राट् बृहद्रथ के प्रधान सेनापति पुष्यामित्र द्वारा प्रतिष्ठित एक प्राचीन राजवंश। ईसा से १८४ वर्ष पूर्व पुष्यमित्र शुंग ने बृहद्रथ को मारकर मौर्य साम्राज्य पर अपना अधिकार जमाया। यह राजा वैदिक या सनातनी धर्म का पक्का अनुयायी था, जिस समय पुष्यमित्र मगध के सिंहासन पर बैठा, उस समय साम्राज्य नर्मदा के किनारे तक था और उसके अंतर्गत आधुनिक बिहार, संयुक्त प्रदेश, मध्य प्रदेश आदि थे। कलिंग के राजा खारवेल्ल तथा पंजाब और काबुल के यवन (यूनानी) राजा मिनांडर (बौद्ध मिलिंद) ने सुंग राज्य पर कई बार चढ़ाइयाँ की, पर वे हटा दिए गए। यवनों का जो प्रसिद्ध आक्रमण साकेत (अयोध्या) पर हुआ था, वह पुष्यामित्र के ही राजत्व काल में हुआ। पुष्यमित्र के समय का उसी के किसी सामंत या कर्मचारी का एक शिलालेख अभी हाल में अयोध्या में मिला है जो पालि लिपि में होने पर भी मुुुुख्यतया संस्कृत में है, यह लेख नागरीप्रचारिणी पत्रिका में प्रकाशित हो चुका है इससे जान पड़ता है कि पुष्यामित्र कभी कभी साकेत (अयोध्या) में भी रहता था और वह उस समय एक समृद्धिशाली नगर था। पुष्यमित्र के पुत्र अग्निमित्र ने विदर्भ के राजा को परास्त करके दक्षिण में वरदा नदी तक अपने पिता के राज्य का विस्तार बढ़ाया। जैसा कालिदास के मालविकाग्निमित्र नाटक से प्रकट है, अग्निमित्र ने विदिशा को अपनी राजधानी बनाया था जो वेत्रवती और विदिशा नदी के संगम पर एक अत्यंत सुंदर पुरी थी। इस पुरी के खँडहर भिलसा (ग्वालियर) से थोड़ी दूर पर दूर तक फैले हुए हैं। चक्रवर्ती सम्राट् बनने की कामना से पुष्यामित्र ने इसी समय बड़ी धूमधाम से अश्वमेध यज्ञ का अनुष्ठान किया। इस यज्ञ के समय महाभाष्यकार पतंजलि जी विद्यमान थे। अश्वरक्षा का भार पुष्यामित्र के पौत्र (अग्निमित्र के पुत्र) वसुमित्र को सौंपा गया जिसने सिंधु नदी के किनारे यवनों को परास्त किया। पुष्यमित्र के समय में वैदिक या सनातन धर्म का फिर से उत्थान हुआ और बौद्ध धर्म दबने लगा। बौद्ध ग्रंथों के अनुसार पुष्यमित्र ने बौद्धों पर उनकी यवन प्रेमी राजद्रोही , देशद्रोही एवं जनद्रोही प्रवृत्तियों के कारण बड़ा अत्याचार किया और वे देेेेशद्रोही धर्मद्रोही विलासी बौद्ध राज्य छोड़कर भागने लगे। ईसा से १४८ वर्ष पहले पुष्यमित्र की मृत्यु हुई और उसका पुत्र अग्निमित्र सिंहासन पर बैठा। उसके पीछे पुष्यमित्र का भाई सुज्येष्ठ और फिर अग्निमित्र का पुत्र वसुमित्र गद्दी पर बैठा। फिर धीरे धीरे इस वंश का प्रताप घटता गया और वसुदेव ने विश्वासघात करके 'कण्व' नामक ब्राह्मण राजवंश की प्रतिष्ठा की। भारत का प्राचीन इतिहास भारत के राजवंश"} {"text": "[EN Wikipedia] Dendrosporobacter\n\nDendrosporobacter is a genus in the phylum Bacillota (Bacteria). Members of the class Negativicutes, stain gram negative, despite being firmicutes Etymology The name Dendrosporobacter derives from:Greek noun dendron, tree; Greek noun spora (σπορά), a seed, and in biology a spore; Neo-Latin noun, a rod bacter, nominally meaning \"a rod\", but in effect meaning a bacterium, rod, staff; Neo-Latin masculine gender noun Dendrosporobacter, a spore-bearing rod from a tree. Species The genus contains a single species, namely D. quercicolus ( (Stankewich et al. 1971) Strömpl et al. 2000, (Type species of the genus).; Latin noun quercus, oak; Neo-Latin masculine gender adjective quercicolus, intended to mean associated with oak trees). See also Bacterial taxonomy Microbiology List of bacterial orders List of bacteria genera References Bacteria genera Taxa described in 2000 Negativicutes Monotypic bacteria genera Bacteria described in 1971"} {"instruction": "Fill in the missing code so that it prints the second element of each list.", "input": "my_list = [[1,2,3],[4,5,6],[7,8,9]]", "output": "for lst in my_list: print(lst[1])"} {"instruction": "Given an input string, write a function that will remove all non-alphanumeric characters.", "input": "Hello World!", "output": "def remove_non_alphanumeric_chars(input): output = \"\" for char in input: if char.isalnum(): output += char return output"} {"instruction": "Reverse this array in-place using Python.", "input": "arr = [4, 2, 8, 6]", "output": "arr.reverse() # arr is now [6, 8, 2, 4]"} {"instruction": "Write a piece of python code to multipy each element in a list by 10.", "input": "[1,2,3,4]", "output": "lst=[1,2,3,4]\nfor i in range(len(lst)):\n lst[i] = lst[i]*10\nprint(lst)"} {"instruction": "Write a JavaScript function to perform a binary search.", "input": "let array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; let x = 5;", "output": "let binarySearch = (array, x) => { let start = 0; let end = array.length - 1; while (start <= end) { let middle = Math.floor((start + end) / 2); if (array[middle] === x) { return middle; } else if (x < array[middle]) { end = middle - 1; } else { start = middle + 1; } } return -1; }"} {"instruction": "Design an algorithm in Python to find all unique combinations of three numbers that sum to a given value.", "input": "Target Sum: 6", "output": "def findUniqueCombos(targetSum): \n result = []\n for i in range(targetSum+1): \n for j in range(i+1): \n for k in range(j+1): \n if i + j + k == targetSum: \n uniqueCombo = [i, j, k] \n result.append(uniqueCombo) \n \n return result"} {"instruction": "If a given string contains four consecutive identical characters, write a code to print the string and the count of the consecutive characters.", "input": "String: aaaagood", "output": "def four_consecutive_chars(input_string): count = 1 prev_char = \"\" result = \"\" for char in input_string: if prev_char == char: count += 1 if count == 4: result += char + \" : \" + str(count) else: result += char + \" : \" + str(count) count = 1 prev_char = char print(input_string) print(result)"} {"instruction": "Define a function in R which takes two arguments and finds their average.", "input": "", "output": "find_average <- function(x, y){ avg <- (x + y) / 2 return(avg) }"} {"text": "[CS Wikipedia] Kondenzace\n\nKondenzace (též kondensace) je termín z latiny používaný ve významu: zahuštění, zhuštění (např. kondenzované mléko) Kapalnění – změna skupenství z plynného na kapalné Kondenzace (chemie) – reakce organických sloučenin, jejímž produktem je větší molekula a nízkomolekulární sloučenina Reference Externí odkazy"} {"instruction": "Writing a function to calculate the area of a triangle where the three sides are given.", "input": "side1 = 5, side2 = 6, side3 = 7", "output": "function triangleArea(side_1, side_2, side_3) { var s = (side_1 + side_2 + side_3) / 2; var area = Math.sqrt(s * (s - side_1) * (s - side_2) * (s - side_3)); return area; } console.log(triangleArea(5,6,7)); // 14.697"} {"instruction": "Create a Python function which takes an integer as input and prints it in binary.", "input": "", "output": "def int_to_binary(n):\n if n == 0:\n return '0'\n bin_string = \"\"\n while n > 0:\n bin_string = str(n%2) + bin_string\n n = n // 2\n return bin_string"} {"text": "[DE Wikipedia] Anarchie\n\nAnarchie ( „Herrschaftslosigkeit“, von „Herrschaft“ mit verneinendem Alpha privativum) bezeichnet einen Zustand der Abwesenheit von Herrschaft. Er findet hauptsächlich in der politischen Philosophie Verwendung, wo der Anarchismus für eine solche soziale Ordnung wirbt. Anarchisten wollen die Gesellschaft sich selbst regeln lassen, etwa über Räte, freie Übereinkunft oder rein funktionale Entscheidungen, mit den Worten von Pierre-Joseph Proudhon: Eine zentrale Person des neuzeitlichen Anarchismus im deutschsprachigen Raum, Horst Stowasser, bezog sich ebenfalls auf diese programmatische Definition Proudhons. Landläufig wird Anarchie auch mit einem durch die Abwesenheit von Staat und institutioneller Gewalt bedingten Zustand gesellschaftlicher Unordnung, Gewaltherrschaft und Gesetzlosigkeit angenommen und vor allem in vielen Medien häufig den eigentlichen Sinn verfälschend im Schlagwort „Chaos und Anarchie“ verwendet. Die tatsächliche Bezeichnung für einen solchen Zustand ist jedoch Anomie. Übersicht Die ursprüngliche Bedeutung des Begriffs in der Antike wurde im Laufe der letzten Jahrhunderte in verschiedenartigen philosophischen und humanwissenschaftlichen Denkschulen überformt, die vielgestaltige Gesellschaftsordnungen mit dem Wort „Anarchie“ benennen. Hier sind vor allem die Denkschulen des Anarchismus, in der Anarchie als politische Utopie entwickelt und umzusetzen versucht wird, sowie Vertreter der Sozialanthropologie und der politischen Anthropologie zu nennen, die Gesellschaftsordnungen von bestimmten indigenen Völkern als Anarchien charakterisieren. Entsprechende Kulturen indigener Völker werden von Ethnologen wie Marshall Sahlins als gleichwertig zur westlichen Kultur angesehen. Allen obigen Anarchien gemeinsam ist per Definitionem die Abwesenheit von Herrschaft, die als repressiver Modus von Macht verstanden werden kann. Demnach sind bestimmte Machtverhältnisse wie die Beeinflussung durch freiwillig angenommene Autoritäten (Mentoren, Trainer, Berater etc.) mit Anarchie vereinbar, werden aber nicht durch Repression erzwungen. Insbesondere existiert in Anarchien keine lenkende Zentralgewalt, also kein Staat. Bekannte Anarchien sind dennoch von sozialen Normen und Regeln geprägt, unter anderem zur institutionalisierten Abwehr der Entstehung von Herrschaft. Neben der Politischen Theorie ist der Begriff der Anarchie als Beschreibung in die Internationalen Beziehungen eingegangen. Alle Metatheorien dieser Disziplin nehmen in unterschiedlichem Maße an, dass Anarchie in den Internationalen Beziehungen bestehe, da es keine weltweite Regulierungsinstanz gebe. Begriffsgeschichte Im Laufe der Zeit wurde das Wort „Anarchie“ neutral zur Beschreibung eines Zustandes und zuweilen abwertend zur Beschreibung eines unerwünschten Sachverhaltes verwendet, bevor es…"} {"instruction": "Generate a sum of square numbers from 1 to 5.", "input": "", "output": "Sum of squares of all numbers from 1 to 5 is 55 (1^2 + 2^2 + 3^2 + 4^2 +5^2)."} {"instruction": "Write an SQL query to find the average salary of all the employees with 10 years of experience.", "input": "", "output": "SELECT AVG(salary) FROM employees WHERE experience = 10;"} {"text": "[DE Wikipedia] Quickborn-Bücher\n\nDie Quickborn-Bücher sind eine von der 1904 gegründeten Sprachgesellschaft Quickborn. Vereinigung für Niederdeutsche Sprache und Literatur e.V. in Hamburg herausgegebene niederdeutsche Buchreihe, deren Ziel die Förderung und Pflege der niederdeutschen Sprache ist. Die Reihe erscheint seit 1913 bis in die neuere Zeit, in etwa jährlich in einem Band. Die meisten Bände der Reihe erschienen im Quickborn-Verlag in Hamburg, dessen früherer Eigentümer bzw. Geschäftsführer der Hamburger Kaufmann und Schriftsteller Paul Wriede (1870–1926) war. Bis heute sind insgesamt über hundert Bände erschienen. Übersicht Bd. 1: Johann Hinrich Fehrs: Holstenart. - Hamburg : Quickborn-Verl., 1913 Bd. 2: Von alten hamburgischen Speichern und ihren Leuten / hrsg. von Johs. E. Rabe. Hamburg : Janssen, 1913. Bd. 3: Friedrich Wilhelm Lyra: Schnack und Schnurren. - Hamburg : Quickborn-Verl., 1913 Bd. 4: Theodor Dirks: Van Jadestrand und Werserkant. - Hamburg : Quickborn-Verl., 1913 Bd. 5: Gorch Fock: Cili Cohrs / Hinrich Wriede: Leege Lüd. - Hamburg : Quickborn-Verl., 1914 Bd. 6: Klaus Groth: Briefe über Hochdeutsch und Plattdeutsch. - Hamburg : Janssen, 1914 Bd. 7: Plattdeutsche Straßennamen in Hamburg. . Hamburg : Janssen, 1915. Bd. 8: Johannes E. Rabe: Sönd ji all dor?. - Hamburg : Quickborn-Verl., 1915 Bd. 9: Gustav Goedel: Klar Deck überall! Deutsch-Seemännisches. - Hamburg : Quickborn-Verl., 1916. Bd. 10: Johannes E. Rabe: Vivat Putschenelle! - Hamburg : Quickborn-Verl., 1916 Bd. 11/12: Georg Droste: Slusohr. - Hamburg : Quickborn-Verl., 1916 Bd. 13: Hinrich Wriede: Leege Lüd. - Hamburg : Quickborn-Verl., 1916 Bd. 14: Gorch Fock: Plattdütsche Jungs in `n Krieg. - Hamburg : Quickborn-Verl., 1917 Bd. 15: Rudolf Kinau: Steernkiekers. - Hamburg : Quickborn-Verl., 1917 Bd. 16: Gustav Stille: Osterworth. - Hamburg : Quickborn-Verl., 1917 Bd. 17: Felix Stillfried: Fritz Stoppsack un anner Geschichten. - Hamburg : Quickborn-Verl., 1918 Bd. 18/19: Wilhelm Zierow: Minschen un Vöss. - Hamburg : Quickborn-Verl., 1918 Bd. 20: Otto Garber: Stina Dreews. - Hamburg : Quickborn-Verl., 1918 Bd. 21: Oscar Ortlepp: De wunnerbare Regenschörm. - Hamburg : Quickborn-Verl., 1919 Bd. 22/23: Anna Schütze: Mamsell. - Hamburg : Quickborn-Verl., 1919 Bd. 24: Paul Wriede: Plattdeutsche Kinder- und Volksreime. - Hamburg : Quickborn-Verl., 1919 Bd. 25: Hermann Boßdorf: Dat Schattenspel. - 1.–4. Tsd.. - Hamburg : Quickborn-Verl., 1919 Bd. 26: August Heinrich Grimm: De Füerböter. - Hamburg : Quickborn-Verl., 1920 Bd. 27: Johannes E. Rabe: Kasper to Hus. - Hamburg : Quickborn-Verl., 1921 Bd. 28: Hinrich Wriede: Lüd van`n Neß. - Hamburg : Quickborn-Verl., 1921 Bd. 29: Dat Wihnachsbook. - Hamburg : Quickborn-Verl., 1923 Bd. 30: Paul Wriede: Hamburger Volkshumor in Redensarten und Döntjes. - Hamburg :…"} {"instruction": "Find the maximum and minimum number in the following array with JavaScript.", "input": "[20, 40, 10, 30, 50]", "output": "let numbers = [20, 40, 10, 30, 50]; let minNumber = Math.min(...numbers); let maxNumber = Math.max(...numbers);"} {"instruction": "Output the output of this C++ program.", "input": "#include using namespace std; int main() { int x, y; cin >> x >> y; cout << x + y; return 0; }", "output": "Input: 5 6 Output: 11"} {"instruction": "Calculate the volume of a cuboid given the edges.", "input": "Length = 4 Width = 5 Height = 2", "output": "def volume_of_cuboid(length, width, height): volume = length * width * height return volume"} {"instruction": "Create an implementation of Quick Sort in Python which does not repeat elements.", "input": "Not applicable", "output": "def quickSort(v, low, high):\n if low < high:\n # Get the partition index using partition()\n pi = partition(v, low, high)\n\n # Sort the elements before the partition\n quickSort(v, low, pi - 1)\n \n # Sort the elements after the partition\n quickSort(v, pi + 1, high)\n\ndef partition(v, low, high):\n # Select the pivot element\n pivot = v[high]\n i = low - 1\n\n # Iterate over the list of integers\n for j in range(low, high):\n # Accept the element as part of the partition if it is not repeated\n if v[j] != pivot:\n i = i + 1\n v[i], v[j] = v[j], v[i]\n\n v[i + 1], v[high] = v[high], v[i + 1]\n return i + 1\n\n# Main function\nif __name__ == \"__main__\":\n v = [9, 5, 7, 4, 3, 10]\n n = len(v)\n quickSort(v, 0, n - 1)\n print(\"Sorted array is:\")\n for i in range(n):\n print(v[i], end=\" \")"} {"instruction": "Create a Python script that will automatically detect the largest number in a given list.", "input": "[7, 2, -4, 5, 8, 1]", "output": "def find_largest_number(list):\n largest = list[0]\n for number in list:\n if number > largest:\n largest = number\n return largest\n\nlist = [7, 2, -4, 5, 8, 1]\nprint(find_largest_number(list))\n# Output: 8"} {"instruction": "Given the following 2D array. Create a function to find the sum of each row.", "input": "Array = [[2, 5, 6], [4, 1, 3], [5, 9, 0]]", "output": "def sum_row(arr): total = [] for row in arr: total.append(sum(row)) return total"} {"instruction": "Write an HTML code snippet for a form to get two inputs: name and email.", "input": "", "output": "
    "} {"instruction": "Retrieve data from an SQL database.", "input": "Table name: users", "output": "SELECT * FROM users;"} {"instruction": "Read the code and determine all the variables that have been declared or used.", "input": "def func(x, y, z): a = x + y + z b = x * y * z c = a / b", "output": "The variables are x, y, z, a, b, and c."} {"text": "[DE Wikipedia] Meisenthal\n\nMeisenthal () ist eine französische Gemeinde mit Einwohnern (Stand ) im Département Moselle in der Region Grand Est (bis 2015 Lothringen). Sie gehört zum Arrondissement Sarreguemines und zum Kanton Bitche. Geografie Meisenthal liegt etwa 15 Kilometer südlich von Bitsch an der Grenze zum Département Bas-Rhin im Herzen des Regionalen Naturparks Vosges du Nord (Parc naturel régional des Vosges du Nord) und ist Teil des grenzübergreifenden Biosphärenreservates Pfälzerwald-Nordvogesen. Nach Saarbrücken sind es ungefähr 40 Kilometer, nach Kaiserslautern etwa 60 Kilometer. Geschichte Der Name Meisenthal ist eine Verballhornung des Namens Mäusenthal (lateinisch Murumvallis). Symbolisiert wird dies im Gemeindewappen durch die Pelzwerktinktur und die V-Form für den Wortteil Thal. Der Pokal steht für die Tradition der Glasherstellung. 1704 wurde erstmals eine Glashütte Meisenbach erwähnt, 1711 dann unter dem aktuellen Namen. Das Dorf entstand im 16. Jahrhundert um eine frühere Glashütte namens Glasthal, die im folgenden Jahrhundert wieder aufgegeben wurde. Die Glashütte ist Grund für den Glaspokal im Wappen der Gemeinde. Die Glashütte stellte ihren Betrieb 1969 ein, es blieben zwei Thermometerfabriken und eine Spiegelproduktion. Bevölkerungsentwicklung Kultur und Sehenswürdigkeiten Der bekannte Jugendstil-Künstler Émile Gallé hat in Meisenthal gearbeitet und hier Objekte aus Glas hergestellt. Heute gibt es in Meisenthal ein Museum sowie ein Internationales Zentrum für Glaskunst (Centre International d’Art Verrier, CIAV), das u. a. mit der Hochschule der Bildenden Künste Saar zusammenarbeitet. Das CIAV ist insbesondere für den dort hergestellten Christbaumschmuck aus Glas berühmt. Jedes Jahr kreieren die Künstler eine neue Weihnachtskugel als Sammlerstück. Angeblich geht diese Erfindung auf die Gegend von Meisenthal zurück, als im 19. Jahrhundert eine Ernte schlecht ausfiel und die bis dahin zum Schmuck des Weihnachtsbaums verwendeten Früchte knapp waren. Das Museum befindet sich im Maison du Verre et du Cristal (Haus des Glases und des Kristalls), wo man auch Glasbläser bei der Arbeit beobachten kann. In dem ehemaligen Fabrikgebäude der Gold- und Silberschmiede Manulor wurde das Zentrum ARToPie für Workshops verschiedener Kunstrichtungen gegründet, in dem junge Künstler aus den Bereichen Theater, Bildhauerei und Musik gemeinsam arbeiten können. Mitbegründer war Stephan Balkenhol. ARToPie veranstaltet Ausstellungen, Theateraufführungen und Konzerte. In der alten Fabrikhalle entstand ein Veranstaltungsort für moderne Pop-Musik, zwei Glasöfen blieben als Dekoration erhalten. Ab 2020 wurden die alten Industriegebäude vollständig renoviert und umgebaut für ihre neue kulturelle Nutzung. Für das Glasmuseum wurde ein Neubau erstellt. Die Eröffnung erfolgte am 1. Mai…"} {"instruction": "Write a Python function that takes a list of words as input and capitalizes the first character of each element in the list.", "input": "[\"apple\", \"banana\", \"strawberry\"]", "output": "def capitalize(words):\n return [word.capitalize() for word in words]\n\ninput_words = [\"apple\", \"banana\", \"strawberry\"]\ncapitalized_words = capitalize(input_words)\nprint(capitalized_words)"} {"instruction": "Write a function that takes a string and returns the letter which appears most frequently.", "input": "s = \"apple\"", "output": "def most_frequent_letter(s): # get the letter frequency letter_frequency = {} for ch in s: if ch in letter_frequency: letter_frequency[ch] += 1 else: letter_frequency[ch] = 1 # find the letter with the max frequency max_frequency = 0 max_frequency_letter = '' for letter, frequency in letter_frequency.items(): if frequency > max_frequency: max_frequency = frequency max_frequency_letter = letter return max_frequency_letter print(most_frequent_letter(\"apple\")) # 'p'"} {"text": "[EN Wikipedia] F. O. Alexander\n\nFranklin Osborne Alexander (November 3, 1897 – January 17, 1993), known professionally as F. O. Alexander, was a comic strip artist and editorial cartoonist. He is credited for having designed the board game Monopoly, including the iconic mascots and characters. Biography A native of St. Louis, Missouri, Alexander studied at the Chicago Academy of Fine Arts, taking several courses in cartooning and also attended Northwestern University. In World War I he served with the Camouflage Engineers in Europe. During the mid-1920s, Alexander launched two comic strips, Finney of the Force (1925–31) and The Featherheads (1926–36), but he is best known for the comic strip Hairbreadth Harry, which he took over in 1931 after the death of its creator, C. W. Kahles. Alexander did this strip for eight years and then dropped it in 1939. Alexander also drew editorial cartoons for United Features Syndicate and, in 1941, he became the staff political cartoonist for the Philadelphia Bulletin. Alexander's career at the Bulletin spanned 26 years. According to Smithsonian Magazine, Alexander designed the famous board game Monopoly for Parker Brothers in 1935, including creating the \"Go to Jail\" Officer Edgar Mallory, Jake the Jailbird, and mascot Milburn Pennybags characters. Alexander was the designer of the 1952 U.S. commemorative postage stamp honoring newspaper boys. In 1966, Alexander donated more than 1000 of his cartoon originals to Syracuse University. The art is housed in the university's Special Collections Research Center. F. O. Alexander retired in 1967. Awards His work was recognized by the Freedoms Foundation and the National Safety Council. In 1945 he received a National Headliners Award. References External links Billy Ireland Cartoon Library & Museum Art Database 1897 births 1993 deaths American comics artists American editorial cartoonists American comic strip cartoonists Artists from St. Louis Board game designers"} {"instruction": "We have a json object containing a list of words. Create a program in Python that returns all the words that are longer than 7 characters.", "input": "{\n \"words\": [ \"abide\", \"absolve\", \"catastrophe\", \"accelerate\", \"capable\"]\n}", "output": "import json\n\ndef findLongWords(words):\n result = []\n for word in words:\n if len(word) > 7:\n result.append(word)\n return result\n\ndata = json.loads(input_data)\nwords = data[\"words\"]\n\nprint(findLongWords(words)) // [\"catastrophe\", \"accelerate\"]"} {"text": "[HI Wikipedia] गुरुत्वाकर्षण\n\nगुरुत्वाकर्षण (gravitation) पदार्थो द्वारा एक दूसरे की ओर आकर्षित होने की प्रवृति है। गुरुत्वाकर्षण के बारे में पहली बार कोई गणितीय सूत्र देने की कोशिश आइजक न्यूटन द्वारा की गयी जो आश्चर्यजनक रूप से सही था। उन्होंने गुरुत्वाकर्षण सिद्धांत का प्रतिपादन किया। न्यूटन के सिद्धान्त को बाद में अलबर्ट आइंस्टाइन द्वारा सापेक्षता सिद्धांत से बदला गया। बहुत कम ही लोग जानते है कि इससे पूर्व भारतीय और ग्रीक महान पंडित अरस्तु, ब्रह्मगुप्त और भास्कराचार्य ने कहा था कि किसी प्रकार की शक्ति ही वस्तुओं को पृथ्वी पर चिपकाए रखती है। गुरुत्वीय त्वरण:- गुरुत्वाकर्षण के कारण त्वरण, जिसे अक्सर \"जी\" के रूप में दर्शाया जाता है, एक वस्तु द्वारा अनुभव किया जाने वाला त्वरण है क्योंकि यह पृथ्वी के केंद्र की ओर गिरता है। पृथ्वी की सतह पर g का मान लगभग 9.8 m/s^2 या 1 g (जहाँ 1 g = 9.8 m/s^2) होता है। यह ऊंचाई और पृथ्वीहै।गुरुत्वाकर्षण के कारण त्वरण भौतिकी में एक मौलिक अवधारणा है और किसी वस्तु पर गुरुत्वाकर्षण बल के कार्य से संबंधित है। गुरुत्वाकर्षण बल वह है जो वस्तुओं को पृथ्वी के केंद्र की ओर गिरने का कारण बनता है, और गुरुत्वाकर्षण के कारण त्वरण वह दर है जिस पर इस बल के परिणामस्वरूप वस्तु का वेग बदल जाता है। गुरुत्वाकर्षण के कारण त्वरण किसी वस्तु के वजन के लिए भी जिम्मेदार होता है, जो गुरुत्वाकर्षण के कारण वस्तु पर लगाया गया बल है। किसी वस्तु का वजन उसके द्रव्यमान के गुरुत्वाकर्षण के कारण त्वरण के गुणनफल के बराबर होता है। सतह पर स्थान के आधार पर थोड़ा भिन्न हो सकता ह गुरुत्वाकर्षण के कारण त्वरण भौतिकी में एक मौलिक अवधारणा है और किसी वस्तु पर गुरुत्वाकर्षण बल के कार्य से संबंधित है। गुरुत्वाकर्षण बल वह है जो वस्तुओं को पृथ्वी के केंद्र की ओर गिरने का कारण बनता है, और गुरुत्वाकर्षण के कारण त्वरण वह दर है जिस पर इस बल के परिणामस्वरूप वस्तु का वेग बदल जाता है। गुरुत्वाकर्षण के कारण त्वरण किसी वस्तु के वजन के लिए भी जिम्मेदार होता है, जो गुरुत्वाकर्षण के कारण वस्तु पर लगाया गया बल है। किसी वस्तु का वजन उसके द्रव्यमान के गुरुत्वाकर्षण के कारण त्वरण के गुणनफल के बराबर होता है। गुरुत्वाकर्षण सिद्धांत का इतिहास प्राचीन काल चौथी शताब्दी ईसा पूर्व में ग्रीक दार्शनिक अरस्तू ने गुरुत्वाकर्षण को एक भारी वस्तु की गति के रूप में वर्णित किया जो पृथ्वी के केंद्र की ओर बढ़ती है।ग्रीक दार्शनिक, प्लूटार्क ने सुझाव दिया कि गुरुत्वाकर्षण का आकर्षण पृथ्वी के लिए अद्वितीय नहीं था|रोमन इंजीनियर और वास्तुकार विटरुवियस ने अपने डी आर्किटेक्चर में तर्क दिया कि गुरुत्वाकर्षण किसी पदार्थ के वजन पर निर्भर नहीं है बल्कि इसकी 'प्रकृति' पर निर्भर करता है।भारतीय गणितज्ञ/खगोलविद ब्रह्मगुप्त ( 598 - सी। 668 CE) ने \"गुरुत्वाकर्षणम् (गुरुत्वाकर्षणम्)\" शब्द का उपयोग करते हुए गुरुत्वाकर्षण को एक आकर्षक बल के रूप में वर्णित किया। भारतीय गणितज्ञ और खगोलशास्त्री भास्कराचार्य द्वितीय (c. 1114 - c. 1185) अपने ग्रंथ सिद्धांत शिरोमणि के गोलाध्याय (गोलाकार पर) खंड में गुरुत्वाकर्षण को पृथ्वी की एक अंतर्निहित आकर्षक संपत्ति के रूप में वर्णित करते हैं|| इस्लामी दुनिया 11वीं सदी के फ़ारसी बहुश्रुत, अल-बिरूनी ने प्रस्तावित किया कि…"} {"instruction": "Calculate the sum of the following numbers using JavaScript.", "input": "[1, 4, 8, 10]", "output": "let sum = 0; for(i = 0; i < arr.length; i++){ sum += arr[i]; } console.log(sum); // Output: 23"} {"text": "[CS Wikipedia] Square Gaston-Baty\n\nSquare Gaston-Baty je square v Paříži ve 14. obvodu. Jeho rozloha činí 1035 m2. Poloha Trojúhelníkovité square se nachází mezi ulicemi Rue Poinsot, Rue du Maine a Rue Jolivet. Historie Square bylo zřízeno v roce 1929 a bylo pojmenováno po francouzském divadelníkovi Gastonovi Batym (1885-1852), který ve čtvrti Montparnasse provozoval Théâtre Montparnasse. V parku byla instalována bronzová socha malíře Chaïma Soutina, kterou v roce 1963 vytvořil sochař Arbit Blatas (1908-1999), který je pohřben na nedalekém hřbitově Montparnasse. Externí odkazy Square na stránkách města Paříže Gaston-Baty Vzniklo 1929"} {"instruction": "Design a stack using a dynamic array in Java.", "input": "", "output": "class MyStack { int top; int capacity; int stack[]; // Creating stack MyStack(int capacity) { this.capacity = capacity; stack = new int[capacity]; top = -1; } // Adding an element on top of the stack public void push(int item) { if (top == capacity - 1){ System.out.println(\"Stack overflow\"); } else{ stack[++top] = item; System.out.println(item + \" pushed into stack\"); } } // Removing an element from the stack public int pop() { if (top == -1) { System.out.println(\"Stack underflow\"); return 0; } else { int item = stack[top--]; return item; } } }"} {"instruction": "Re-implement this Ruby code in Python", "input": "def fibonacci(n) return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2) end", "output": "def fibonacci(n): if n < 2: return n return fibonacci(n - 1) + fibonacci(n - 2) print(fibonacci(7)) # Outputs: 13"} {"instruction": "Create a class in Python that can generate a new instance of itself given a list of arguments", "input": "list = [\"name\", \"age\", \"gender\"]", "output": "class Student():\n def __init__(self, name, age, gender):\n self.name=name\n self.age=age\n self.gender=gender\n def generate(self, args):\n return Student(*args)"} {"text": "[DE Wikipedia] Max Hobrecht\n\nMaximilian „Max“ Hobrecht (* 13. Dezember 1827 in Königsberg, heute Kaliningrad; † 1. September 1899 in Rathenow) war ein deutscher Dichter und Politiker. Max Hobrecht war der Sohn von Ludolf Hobrecht, einem ostpreußischen Gutsbesitzer, königlichen Ökonom und Commissionsrat (gestorben 1866), sowie Isabella Hobrecht, geb. Johnson (gestorben 1891). Sein älterer Bruder Arthur Hobrecht wurde Oberbürgermeister von Berlin und später preußischer Finanzminister, sein zweiter Bruder James Hobrecht war ein preußischer Stadtplaner und Stadtbaurat in Berlin. Nach dem Studium an der Königlichen Albertus-Universität in Königsberg und später an der Friedrich-Wilhelms-Universität in Breslau arbeitete er als Journalist für Die Grenzboten in Dresden. 1848 bis 1850 lebte er, um den Revolutionswirren zu entgehen, in den USA. Nach seiner Rückkehr heiratete er 1865 Marie Helene Hübener, Tochter des Rathenower Dampfmühlen- und Ziegelei-Besitzers Carl Hübener. Nach dem Tod seines Schwiegervaters führte er mit seinem Schwager Karl Hübener die Dampfmühle als Teilhaber weiter. Er war Mitglied der Nationalliberalen Partei in Rathenow. Im Rathenower Stadtparlament war er 32 Jahre Stadtverordneter. Das Amt des Vorstehers der Stadtverordnetenversammlung übte er 22 Jahre aus. Vom 12. November 1873 bis 30. Juni 1876 war er auch Abgeordneter im Preußischen Abgeordnetenhaus für den Wahlbezirk Wahlkreis Potsdam VII (Westhavelland-Zauch-Belzig). Am 13. Dezember 1897 wurde er vom Rathenower Stadtparlament anlässlich seines 70. Geburtstages zum Ehrenbürger der Stadt Rathenow ernannt. Bis nach 1945 war in Rathenow die Hobrechtstraße (heute Teil des Friedrich-Ebert-Ringes) nach ihm benannt. Schriftstellerisches Wirken Max Hobrecht veröffentlichte Novellen und Gedichte. Seine bekanntesten Werke sind „Hutten in Rostock“ (über seine biographischen Forschungen zu Ulrich von Hutten in Rostock) und „Luther auf der Koburg“. In der Novelle „Der Triumph“ machte er den Abriss des Jederitzer Tors in Rathenow zum Thema. Mit dem Gedicht „Die Linde“ setzte er dem Baum, der vor seinem Rathenower Wohnhaus in der Steinstraße 17 stand, ein literarisches Denkmal. In der Novelle „Untertor in Archenau“ beschreibt er das Leben der Rathenower um 1886. Die Bücher Hobrechts erschienen zumeist im Rathenower Babenzien-Verlag. Werke „Altpreußische Geschichten“, 1882 (zusammen mit seinem Bruder Arthur Hobrecht) „Von der Ostgrenze“, 1885, drei Novellen („Feiertage“, „Marienburg“, „Vis Maior“) „Zwischen Judica und Palmarum“, 1885, Novellensammlung (vier Novellen) „Hutten in Rostock“, 1886, Erzählung „Neue Novellen“, 1890, Novellensammlung („Der Triumph“, „Frühlingsidyll“, „Im Spiel der Wellen“, „Telemaque“) „Luther auf der Koburg 1530“, Frankfurt am Main 1892, Versepos Literatur Biografie von Max Hobrecht, Heinz-Walter…"} {"instruction": "Make a function that accepts 2 numbers and return the largest one.", "input": "2, 3", "output": "def largest(x, y): if (x > y): return x else: return y"} {"text": "[DE Wikipedia] Waldblick\n\nWaldblick ist der Name folgender Orte: Waldblick (Blankenfelde-Mahlow), Siedlung in Blankenfelde-Mahlow, Landkreis Teltow-Fläming, Land Brandenburg Waldblick (Wachau), Siedlung in Wachau, Landkreis Bautzen, Sachsen Okna (Baruchowo), Teil der Gmina Baruchowo, Powiat Włocławski, Woiwodschaft Kujawien-Pommern; deutsch Waldblick"} {"text": "[DE Wikipedia] Museumsgesellschaft Tübingen\n\nDie Museumsgesellschaft Tübingen e. V. entstand 1818/20 aus der Vereinigung mehrerer Lesegesellschaften in der Stadt Tübingen, die sich seit 1774 entwickelt hatten und von akademischen, studentischen und bürgerlichen Kreisen getragen wurden. Im Jahre 1821 ließ die Gesellschaft mit finanzieller Unterstützung durch Mitglieder und Aktionäre durch den Hofbaumeister Gottlob Georg Barth (1777–1848) aus Stuttgart ein repräsentatives Gebäude beim Lustnauer Tor (Ecke Graben- und Wilhelmstraße), das „Museum“, errichten. Es diente mit seiner kontinuierlich erweiterten Bibliothek der Bildung und Erbauung vor allem der akademisch gebildeten Kreise der Stadt, aber auch der Geselligkeit in Form von Konversation, Bällen oder Spiel (Billard) sowie der Veranstaltung von Vorträgen und Konzerten. Auch eine Gastwirtschaft gehörte dazu. Die erste Satzung der Gesellschaft erschien 1838 im Druck („Geseze des Museums zu Tübingen“). Am 27. Juli 1829 gründete der Universitätsmusikdirektor Friedrich Silcher hier die „Akademische Liedertafel“. Für die Veranstaltungen dienten der Silchersaal und der Uhlandsaal. 1886 wurde das „Museum“ baulich erweitert und ein neuer größerer Festsaal (Schillersaal) errichtet, der etwa 800 Personen Platz bot. Er wurde 1914 umgebaut und stark erweitert. Seit 1933 wird er an einen Betreiber vermietet, der hierin ein Kino betreibt. Zwischen 1993 und 1997 wurde das Gebäude umfassend saniert. Bis heute organisiert die Museumsgesellschaft in enger Zusammenarbeit mit dem Kulturreferat der Universität Tübingen und der Stadt Tübingen in eigenen Räumen und im Festsaal der Universität Konzertreihen mit namhaften Künstlern und Ensembles, Theaterabende, Autorenlesungen oder Rezitationen. Gesellschaft und Gebäude gehören zum Kulturerbe der Stadt. Die etwa 25.000 Bände umfassende Museumsbibliothek ist der allgemeinen Öffentlichkeit zugänglich. Etwa 9.000 Bände gehören zum historischen Bestand, der zur Hälfte aus belletristischer Literatur besteht. Auch historisch-politische und biografische Literatur ist stark vertreten. Die Bibliothek bietet einen repräsentativen Querschnitt solcher Literatur, die in vielen Fällen nicht von streng wissenschaftlichen Einrichtungen erworben wurde und der Unterhaltung und Weiterbildung des Bildungsbürgertums diente. Das Archiv der Museumsgesellschaft für den Zeitraum von 1813 bis 1969 befindet sich im Universitätsarchiv Tübingen. Vorsitzender der Museumsgesellschaft war zuletzt der Tübinger Informatiker Prof. Dr. Wolfgang Rosenstiel. Nach dessen Tod im August 2020 übernahm im September 2020 das Vorstandsmitglied Prof. Dr. Heinz-Dieter Assmann, em. Ordinarius der Juristischen Fakultät der Universität Tübingen sowie Rechtsanwalt und Of Counsel bei Gleiss Lutz Rechtsanwälte in Stuttgart, den Vorsitz. Literatur Peter Michael Ehrle:…"} {"instruction": "Create an algorithm that takes in two sorted arrays and merges them together.", "input": "arr1 = [1,3,5,7,9] arr2 = [2,4,6,8,10]", "output": "def merge_arrays(arr1, arr2): merged = [] i, j = 0, 0 while i < len(arr1) and j < len(arr2): if arr1[i] < arr2[j]: merged.append(arr1[i]) i += 1 else: merged.append(arr2[j]) j += 1 while i < len(arr1): merged.append(arr1[i]) i += 1 while j < len(arr2): merged.append(arr2[j]) j += 1 return merged"} {"instruction": "Create a functional HTML form using the following attributes.", "input": "name, email, country", "output": "
    "} {"instruction": "Write a Python function that takes an integer as an argument and returns the square of that number", "input": "", "output": "def square(n): return n ** 2"} {"instruction": "edit the given Python program to delete an elements at a given position", "input": "def delete(list,N):\n first_part = list[:N] \n last_part = list[N+1:]\n list = first_part + last_part\n return list", "output": "def delete(list,N):\n first_part = list[:N] \n last_part = list[N+1:]\n list = first_part + last_part\n return list\n \nlist1 = [1,2,3,4,5]\nN = int(input('Enter the index of the element to be deleted: '))\nlist1 = delete(list1,N)\nprint(list1)"} {"instruction": "How to check if a list contains any None value in it?", "input": "", "output": "any(x is None for x in my_list)"} {"instruction": "Write an algorithm to find the longest sub string without repeating characters.", "input": "string = 'abcabcbb'", "output": "def length_longest_substring(string): start = 0 max_length = 0 seen = {} for end in range(len(string)): # Check if the character has been previously seen. if string[end] in seen: # Move the starting point of the substring to the index after the last seen character of this character. start = max(start, seen[string[end]] + 1) # Update the index value of the last seen character. seen[string[end]] = end # Calculate the length of the current substring. max_length = max(max_length, end - start + 1) # Return the maximum length of the substring. return max_length"} {"instruction": "Generate a function in Python that finds the maximum element in an array of integers using a linear search.", "input": "[3, 17, 5, 19, 10]", "output": "# Function to find the maximum element in an array of integers\ndef findMax(arr): \n maxEle = arr[0] \n \n # Iterate through the array and find the maximum element \n for i in range(1, len(arr)): \n if arr[i] > maxEle: \n maxEle = arr[i] \n \n return maxEle \n\n# Driver code \narr = [3, 17, 5, 19, 10] \nmaxEle = findMax(arr) \n\nprint(\"The maximum element in the given array is:\", maxEle)"} {"instruction": "Write a Python script that will take in a user's input in a textbox and return the most frequent words, in descending order.", "input": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", "output": "import re \nimport operator\n\nuser_input = input(\"Please enter a sentence: \\n\")\nwords = re.findall(r'\\w+', user_input) \nword_frequency = {} \n\nfor word in words: \n\tif word in word_frequency: \n\t\tword_frequency[word] += 1 \n\telse: \n\t\tword_frequency[word] = 1\n\n# Sort words by frequency in descending order\nsorted_words = sorted(word_frequency.items(), key=operator.itemgetter(1), reverse=True) \n\nprint(\"Most Frequent Words: \\n\")\nfor k,v in sorted_words:\n\tprint(k + \": \" + str(v))"} {"instruction": "Create a game of rock-paper-scissors using functions and conditionals.", "input": "", "output": "def play_game(): \"\"\" This function is a game of rock-paper-scissors. \"\"\" import random player_input = input(\"Choose rock(r), paper(p) or scissors(s): \") computer_choice = random.choice([\"r\", \"p\", \"s\"]) if player_input == computer_choice: return \"It is a draw\" elif player_input == \"r\": if computer_choice == \"p\": return \"Computer Wins!\" else: return \"Player Wins!\" elif player_input == \"p\": if computer_choice == \"s\": return \"Computer Wins!\" else: return \"Player Wins!\" elif player_input == \"s\": if computer_choice == \"r\": return \"Computer Wins!\" else: return \"Player Wins!\" else: return \"Invalid input\" print(play_game())"} {"instruction": "Build an HTML table with 3 columns and 5 rows using JavaScript.", "input": "", "output": "var htmlTable = ''; // Create the table rows for (var i = 0; i < 5; i++){ htmlTable += ''; // Create the table columns for (var j = 0; j < 3; j++){ htmlTable += \"\"; } htmlTable += \"\"; } htmlTable += \"
    \";"} {"instruction": "Develop a for loop in Javascript to output integers from 0 to 10", "input": "", "output": "for (let i = 0; i < 11; i++) { console.log(i); }"} {"instruction": "Create an object to store the variables that are necessary for the following code snippet.", "input": "x = 10 y = 20 z = 30", "output": "class Coordinates: def __init__(self, x, y, z): self.x = x self.y = y self.z = z coordinates = Coordinates(x=10, y=20, z=30)"} {"instruction": "Create a function which adds two strings together.", "input": "", "output": "def add_strings(s1, s2): return s1 + s2"} {"text": "[DE Wikipedia] Plan A\n\nPlan A steht für: Plan A!, Studioalbum von Graham Candy Plan A (2021), Thrillerdrama von Yoav und Doron Paz Plan A (Lied), Lied von The Dandy Warhols Plan A Entertainment, ehemaliger Name eines südkoreanischen Medienkonzerns"} {"instruction": "Edit the given code to add a new element to the list.", "input": "list = [1, 2, 3]", "output": "list = [1, 2, 3] list.append(4) # Adding new element"} {"instruction": "Write a Python program that checks if a given number is prime.", "input": "7", "output": "def is_prime(n):\n if n == 2 or n == 3:\n return True\n if n < 2 or n%2 == 0:\n return False\n if n < 9:\n return True\n if n%3 == 0:\n return False\n\n r = int(n**0.5)\n f = 5\n while f <= r:\n if n%f == 0:\n return False\n if n % (f+2) == 0:\n return False\n f += 6\n return True\n\nnum = 7\nprint(\"Is\", num, \"prime?: \", is_prime(num))"} {"instruction": "Write a Python program to calculate the sum of the first 10 prime numbers.", "input": "Not applicable", "output": "# Calculate the sum of the first 10 prime numbers\n \n# Variable to store the sum\nsum = 0\n \n# Iterate over the first 10 prime numbers and add them to the sum \nfor i in range(2,37):\n # Check for Prime number\n if all(i % j != 0 for j in range(2, i)):\n sum += i\n \n# Output the result \nprint(\"Sum of the first 10 prime numbers is\",sum)"} {"text": "[CS Wikipedia] Fly-by-wire\n\nFly-by-wire (FBW) je systém, který umožnil nahradit konvenční systém ovládání řídicích ploch letounů pomocí táhel, lanek, hydromechanických převodů systémem elektrickým. Řídicí signály (například pohyb kniplu) jsou v tomto případě snímány a převáděny do elektronické podoby, které následně může vyhodnotit palubní počítač. Pomocí elektronických signálů jsou pak ovládány akční členy (např.: servomotory), které vychylují řídicí plochy. Výrobci dopravních letadel Boeing a Airbus se liší v přístupu a nasazení fly-by-wire systému. V letadlech Airbus tento systém nedovolí pilotovi přebrat úplnou kontrolu nad letadlem (dodržení koridoru, ovládání výkonu). V Boeingu 777 mohou piloti převzít nad letadlem úplnou kontrolu. Odkazy Reference Externí odkazy Fly By Wire - systém nepřímého řízení letadla (PDF) Letecká terminologie Automatizace"} {"instruction": "Using conditional statements, print out whether a given number is odd or even.", "input": "number = 7", "output": "if(number % 2 == 0){ console.log('`number` is even') } else { console.log('`number` is odd') }"} {"instruction": "Write a Java method to check if a numerical value is within a specified range.", "input": "", "output": "public static boolean isWithinRange(int val, int min, int max) { return (val >= min && val <= max); }"} {"instruction": "Suggest a name for a new string variable.", "input": "", "output": "The name for the new string variable could be \"nameString\"."} {"instruction": "Given a string, concatenate the first and last character of the string together.", "input": "String: Grass", "output": "gs"} {"instruction": "Generate a function to return the all the vowels from a string in Python.", "input": "Not applicable", "output": "def get_vowels(string):\n vowels = 'aeiou'\n return [char for char in string if char in vowels]"} {"instruction": "How can you generate a random number between 1 to 10 using Python?", "input": "", "output": "import random\n\nrandom.seed()\n\nprint(random.randint(1, 10))"} {"instruction": "Create a basic REST API endpoint with Python's Flask-Restful library that returns the sum of two numbers when the endpoint is visited.", "input": "Not applicable", "output": "from flask import Flask\nfrom flask_restful import Resource, Api\n\napp = Flask(__name__)\napi = Api(app)\n\nclass Sum(Resource):\n def get(self, a, b):\n return {'sum': a + b}\n\napi.add_resource(Sum, '/sum//')\n\nif __name__ == '__main__':\n app.run()"} {"instruction": "What data structure do you choose to represent a sparse matrix in programming?", "input": "", "output": "A sparse matrix can be represented using a hashmap (dictionary) data structure. The hashmap will contain the non-zero elements of the matrix, where each entry will include the row index, column index and the value at that location. This helps in storing and retrieving massive amounts of data in an efficient manner."} {"instruction": "This code creates archives compatible with ESP32-S* ROM DFU implementation. To use it, run the script with the \"write\" command and provide the following arguments:\n- \"-o/--output-file\": the filename for storing the output DFU image (required)\n- \"--pid\": the hexadecimal product identifier (required)\n- \"--json\": an optional file for loading a \"flash_files\" dictionary with
    items\n- \"--part-size\": the partition size for larger files (default is 512KB)\n- \"files\": a list of
    pairs to be added to the DFU image. The files are split up into smaller partitions of size \"part-size\" to avoid timing-out during erasing large regions.", "input": "", "output": "#!/usr/bin/env python\n#\n# Copyright 2020-2021 Espressif Systems (Shanghai) CO LTD\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# This program creates archives compatible with ESP32-S* ROM DFU implementation.\n#\n# The archives are in CPIO format. Each file which needs to be flashed is added to the archive\n# as a separate file. In addition to that, a special index file, 'dfuinfo0.dat', is created.\n# This file must be the first one in the archive. It contains binary structures describing each\n# subsequent file (for example, where the file needs to be flashed/loaded).\n\nfrom __future__ import print_function, unicode_literals\n\nimport argparse\nimport hashlib\nimport json\nimport os\nimport struct\nimport zlib\nfrom collections import namedtuple\nfrom functools import partial\n\nfrom future.utils import iteritems\n\ntry:\n import typing\nexcept ImportError:\n # Only used for type annotations\n pass\n\ntry:\n from itertools import izip as zip # type: ignore\nexcept ImportError:\n # Python 3\n pass\n\n# CPIO (\"new ASCII\") format related things\nCPIO_MAGIC = b'070701'\nCPIO_STRUCT = b'=6s' + b'8s' * 13\nCPIOHeader = namedtuple(\n 'CPIOHeader',\n [\n 'magic',\n 'ino',\n 'mode',\n 'uid',\n 'gid',\n 'nlink',\n 'mtime',\n 'filesize',\n 'devmajor',\n 'devminor',\n 'rdevmajor',\n 'rdevminor',\n 'namesize',\n 'check',\n ],\n)\nCPIO_TRAILER = 'TRAILER!!!'\n\n\ndef make_cpio_header(\n filename_len, file_len, is_trailer=False\n): # type: (int, int, bool) -> CPIOHeader\n \"\"\" Returns CPIOHeader for the given file name and file size \"\"\"\n\n def as_hex(val): # type: (int) -> bytes\n return '{:08x}'.format(val).encode('ascii')\n\n hex_0 = as_hex(0)\n mode = hex_0 if is_trailer else as_hex(0o0100644)\n nlink = as_hex(1) if is_trailer else hex_0\n return CPIOHeader(\n magic=CPIO_MAGIC,\n ino=hex_0,\n mode=mode,\n uid=hex_0,\n gid=hex_0,\n nlink=nlink,\n "} {"instruction": "Write a function in Python that takes a set of numbers and prints the sum, mean and standard deviation of the numbers.", "input": "[1, 2, 3, 4, 5]", "output": "def print_stats(numbers):\n sum = 0\n for i in numbers:\n sum = sum + i\n mean = sum / len(numbers) \n\n ssd = 0\n for i in numbers:\n ssd = ssd + (i-mean)**2\n ssd = ssd / len(numbers)\n standard_dev = sqrt(ssd)\n \n print(\"Sum = \", sum)\n print(\"Mean = \", mean)\n print(\"Standard Deviation = \", standard_dev)"} {"instruction": "Create a Python program to build a language model. The model should take a sequence of words as input and predict the next word in the sequence.", "input": "Not applicable", "output": "import numpy as np\nfrom keras.preprocessing.text import Tokenizer\nfrom keras.layers import Embedding, LSTM\nfrom keras.models import Sequential\n\n# tokenizing the text\ntokenizer = Tokenizer()\ntokenizer.fit_on_texts()\nsequences = tokenizer.texts_to_sequences()\n\nvocab_size = len(tokenizer.word_index) + 1\n\n# create the language model\nmodel = Sequential()\nmodel.add(Embedding(vocab_size, 50, input_length=3))\nmodel.add(LSTM(100, return_sequences=True))\nmodel.add(LSTM(100))\nmodel.add(Dense(vocab_size, activation='softmax'))\n\n# compile the model\nmodel.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])\n\n# fit the model\nmodel.fit(sequences, X, epochs=100, verbose=2)\n\n# evaluate the model\nloss, accuracy = model.evaluate(sequences, X, verbose=0)"} {"instruction": "Use Python to solve the following equation: y = x^2 - x + 1", "input": "", "output": "def solve_equation(x):\n return x**2 - x + 1"} {"instruction": "Create a basic search engine in Python using a TF-IDF algorithm. The search engine should take a query and a set of documents as input and return the document most relevant to the query.", "input": "Query: \"running shoes\"\nDocuments:\nDocument 1: \"New running shoes perfect for running\"\nDocument 2: \"The best fitting shoes for running\"\nDocument 3: \"Running is a great way to exercise\"", "output": "from sklearn.feature_extraction.text import TfidfVectorizer\n\n# documents to be indexed\ndocuments = ['New running shoes perfect for running',\n 'The best fitting shoes for running',\n 'Running is a great way to exercise']\n\n# query\nquery = 'running shoes'\n\n# vectorizer object\nvectorizer = TfidfVectorizer()\n\n# transform documents\nX = vectorizer.fit_transform(documents)\n\n# query vector\nquery_vector = vectorizer.transform([query])\n\n# compute similarity score between query and documents\nscores = np.dot(query_vector, X.T).toarray()\n\n# get most relevant document\nrelevant_document = documents[np.argmax(scores)]\n\nprint(relevant_document)"} {"text": "[CS Wikipedia] Kamila Chudziková\n\nKamila Chudziková (* 12. září 1986, Kielce) je polská atletka, která se věnuje halovému pětiboji a sedmiboji na dráze. Na berlínském mistrovství světa 2009 získala bronzovou medaili, ke které ji pomohly i dva nové osobní rekordy, v běhu na 200 metrů a kouli. Jejím osobním rekordem v sedmiboji je 6 494 bodů, v pětiboji 4 537 bodů. Úspěchy Externí odkazy Narození v roce 1986 Polští vícebojaři Polští olympionici Žijící lidé Ženy Narození 12. září Narození v Kielcích"} {"instruction": "Create an HTML form to allow the user to register an account with an email address and a password.", "input": "", "output": "




    "} {"text": "[DE Wikipedia] Going Upriver\n\nGoing Upriver: The Long War of John Kerry ist eine Dokumentation des US-amerikanischen Regisseurs George Butler über den Militärdienst des US-Präsidentschaftskandidaten John Kerry in Vietnam und seine anschließende Beteiligung in der Friedensbewegung und dem Protest gegen den Vietnamkrieg. Der Film erschien am 1. Oktober 2004. Inhalt Der Film beschreibt die Entwicklung John Kerry von seiner Jugend an, über seine Ausbildung, seine freiwillige Meldung zum Dienst in Vietnam, seinen Aufenthalt in Vietnam, seine Rückkehr und seine aktive Führungsrolle im Protest von Vietnamveteranen gegen die Fortführung des Krieges. Der Fokus der Dokumentation liegt auf den Erfahrungen Kerrys in Vietnam und seiner Rolle im Protest. Seine darauffolgende politische Karriere bis hin zur Präsidentschaftskandidatur werden nicht beleuchtet. Der Film dokumentiert deutlich Kerrys Dienst auf den sog. Swift-Boats (Patrouillenbooten), u. a. auch die im Jahre 2004 in Frage gestellten Ereignisse rund um Kerrys Medaillen. Der Film beleuchtet auch die frühe Konfrontation Kerrys mit John P. O’Neill, einem der Gründer der Gruppe Swiftboat Veterans for Truth. Weblinks Filmtitel 2004 Dokumentarfilm"} {"instruction": "Given a Python script,rewrite it in Java.", "input": "def add(x, y):\n z = x + y\n return z", "output": "public int add(int x, int y) {\n int z = x + y;\n return z;\n}"} {"instruction": "Create a function that takes two numbers and returns their greatest common divisor in Python.", "input": "", "output": "\"\"\" Create a function that takes two numbers and returns their greatest common divisor in Python. \"\"\" def greatest_common_divisor(a, b): if a == 0: return b if b == 0: return a if a == b: return a if a > b: return greatest_common_divisor(a - b, b) return greatest_common_divisor(a, b - a) if __name__ == '__main__': print(greatest_common_divisor(20, 25)) # 5"} {"text": "[CS Wikipedia] Vnitřní energie\n\nVnitřní energie (též termodynamická energie) tělesa (termodynamického systému) je extenzivní veličina představující v makroskopickém popisu souhrn energií všech částic, z nichž se těleso skládá. Jde především o jejich kinetickou a potenciální energii, ale může jít také o elektrickou či chemickou energii, apod. Kinetická a potenciální energie, kterou má těleso (soustava) jako celek, se do vnitřní energie nezahrnuje. Jedná se o jeden ze základních termodynamických potenciálů, z ní vycházejí definice všech ostatních. Vnitřní energie ovlivňuje vlastnosti a stav látky. Např. kinetická energie částic se projevuje jako teplota tělesa, tzn. čím rychlejší pohyb částic, tím vyšší je teplota tělesa. Polohová energie částic se projevuje ve vlastnostech tělesa jako skupenství, stlačitelnost/pružnost či pevnost. Značení Symbol veličiny: U Hlavní jednotka v SI (řazená mezi odvozené jednotky): joule, značka jednotky: J; Rozměr: [J]=[m]2·[kg]·[s]−2 Další jednotky: viz energie Výpočet Tepelnému pohybu částic přísluší určitá kinetická energie. Pokud látka obsahuje částic o stejné hmotnosti a velikost rychlosti -té částice je , pak celková kinetická energie takovéto soustavy pak bude Je třeba si uvědomit, že těleso jako celek zůstává v klidu. Rychlosti jednotlivých částic odpovídají jejich mikroskopickému pohybu. Pokud by se těleso pohybovalo, např. rychlostí , pak pro určení vnitřní energie -té částice se uvažuje s rychlostí . Kdyby měly všechny částice stejnou rychlost , byla by celková energie soustavy Má-li být celková energie v obou případech stejná, pak musí z předchozích vztahů platit Rychlost se nazývá střední kvadratickou rychlostí. Kinetická energie určená pomocí střední kvadratické rychlosti se nazývá střední kinetická energie. Vzájemná soudržnost částic, kterou lze pozorovat u pevných látek a kapalin, vede k závěru, že mezi molekulami musí působit určité síly. Tyto síly se projevují tím, že při vzdálenostech menších než je rozměr atomu se projevují jako odpudivé, a při vzdálenostech větších jako přitažlivé. Tyto síly se nazývají molekulárními (popř. kohezními) silami. Původ těchto sil lze částečně vysvětlit elektrostatickým přitahováním a odpuzováním molekul, avšak plný výklad podává až kvantová fyzika. Kohezní síly způsobují, že dvě blízké molekuly mají určitou potenciální energii. Odpudivým silám přísluší kladná potenciální energie a přitažlivým silám přísluší záporná potenciální energie , přičemž hladinu nulové potenciální energie klademe do nekonečna. Celková potenciální energie je pak součtem těchto složek . Celková vnitřní energie soustavy se určí jako suma kinetických a potenciálních energií jednotlivých částic, tzn. Vlastnosti Vnitřní energie určuje tepelný stav a skupenství látky. Vnitřní energii lze měnit konáním práce – Při konání práce dochází…"} {"instruction": "Write a Python program to print the number of prime numbers that exist within a given range.", "input": "", "output": "def primeCounet(start, end):\n count = 0\n for num in range(start, end + 1): \n if num > 1: \n for i in range(2, num): \n if (num % i) == 0: \n break \n else: \n count = count + 1\n return count\n\nif __name__ == \"__main__\":\n start = 10\n end = 30\n print(primeCounet(start, end))"} {"text": "[HI Wikipedia] फ्लिपकार्ट\n\nफ्लिपकार्ट भारत में स्थित एक ई-कॉमर्स कम्पनी है, जिसका मुख्यालय बंगलौर में स्थित है। इसकी शुरुआत 2007 में सचिन बंसल और बिनी बंसल ने एक ऑनलाइन स्टोर के रूप में की थी, जिसमें मूल रूप से पुस्तकें बेची जाती थी। बाद में इसमें अन्य कई तरह के वस्तुओं को बेचा जाने लगा। 2018 में अमेरीकी कंपनी वॉलमार्ट ने फ्लिपकार्ट की 77 फीसदी हिस्सेदारी ₹1.07 लाख करोड़ में खरीद कर इसका अधिग्रहण किया। इतिहास इसकी शुरुआत 2007 में भारतीय प्रौद्योगिकी संस्थान दिल्ली के स्नातक की उपाधि प्राप्त सचिन बंसल और बिनी बंसल ने की थी। कंपनी द्वारा शुरुआत में ऑनलाइन पुस्तकें बेचे जाते थे और इसकी पूरे देश में डिलिवरी भी की जाती थी। धीरे धीरे इन्हें कामयाबी मिलती गई और 2008 में इन्हें हर दिन 100 से ज्यादा ऑर्डर आने लगे थे। इसके बाद 2010 में फ्लिपकार्ट ने बैंगलोर में स्थित पुस्तक ढूँढने वाली सेवा \"वीरीड\" को लूलू.कॉम से खरीद लिया। 9 मई 2018 को अमेरिका की बहुराष्ट्रीय खुदरा कंपनी वॉलमार्ट ने फ्लिपकार्ट की 77 फीसदी हिस्सेदारी, ₹1.07 लाख करोड़ रूपये में खरीद कर उसका अधिग्रहण कर लिया है। साउथ अफ्रीका की इंटरनेट और एंटरटेनमेंट कंपनी नैसपर्स ने भी फ्लिपकार्ट में अपनी कुल 11.18 फीसदी हिस्सेदारी को वॉलमार्ट को बेच दिया है। नैसपर्स ने यह सौदा ₹14,740 करोड़ रुपये में किया है। इन्हें भी देखें भारत में इलेक्ट्रानिक वाणिज्य सन्दर्भ बाहरी कड़ियाँ भारतीय कंपनियाँ ई-कॉमर्स"} {"instruction": "Write a JavaScript code snippet to toggle a div's visibility.", "input": "", "output": "const toggleDiv = () => { const div = document.querySelector('.div'); if (div.style.display === 'none') { div.style.display = 'block'; } else { div.style.display = 'none'; } }"} {"text": "[DE Wikipedia] Lisboa-Insel\n\nDie Lisboa-Insel () ist eine Insel im Wilhelm-Archipel vor der Graham-Küste des Grahamlands im Norden der Antarktischen Halbinsel. Sie ist die südlichste der kleinen Inseln vor dem südlichen Ende der Petermann-Insel. Teilnehmer der Fünften Französischen Antarktisexpedition (1908–1910) kartierten sie. Expeditionsleiter Jean-Baptiste Charcot benannte sie nach dem brasilianischen Politiker Henrique Carlos Ribeiro Lisboa (1849–1920), Minister seines Heimatlands für die Beziehungen zu Uruguay, der die Forschungsreise in Montevideo unterstützt hatte. Weblinks (englisch) Lisboa Island auf geographic.org (englisch) Insel (Südlicher Ozean) Insel im Wilhelm-Archipel Insel (Antarktika)"} {"text": "[CS Wikipedia] Třetí vláda Viliama Širokého\n\nTřetí vláda Viliama Širokého existovala v období 11. července 1960 – 20. září 1963. Seznam členů vlády Předseda vlády: Viliam Široký od 21. 3. 1953 Místopředseda vlády: Jaromír Dolanský Václav Kopecký, do 5. 8. 1961 (zemřel) Otakar Šimůnek Rudolf Barák, do 9. 2. 1962 Rudolf Strechaj, do 28. 7. 1962 (zemřel) Ludmila Jankovcová Jan Piller, od 9. 2. 1962 František Krajčír, od 5. 1. 1963 Ministr zahraničních věcí: Václav David Ministr národní obrany: Bohumír Lomský Ministr vnitra: Rudolf Barák, do 23. 6. 1961 Lubomír Štrougal, od 23. 6. 1961 Ministr dopravy a spojů: František Vlasák, do 5. 1. 1963 František Vokáč, od 5. 1. 1963 Ministr financí: Július Ďuriš Ministr hutního průmyslu a rudných dolů: Miroslav Šmok, do 10. 3. 1962 Josef Krejčí, od 10. 3. 1962 Ministr chemického průmyslu: Jozef Púčik Ministr paliv a energetiky (od 5. 1. 1963 paliv): Oldřich Černík Ministr potravinářského průmyslu: Jindřich Uher, do 23. 6. 1961 Josef Krosnář, od 23. 6. 1961 Ministr spotřebního průmyslu: Božena Machačová-Dostálová Ministr spravedlnosti: Alois Neuman (ČSS) Ministr státní kontroly (od 23. 6. 1961 Úřad kontroly a statistiky): Josef Krosnář Ministr školství a kultury: František Kahuda Ministr těžkého strojírenství: Josef Reitmajer, do 6. 1. 1963 Josef Pešl, od 6. 1. 1963 Ministr vnitřního obchodu: Ladislav Brabec, do 23. 6. 1961 Jindřich Uher, od 23. 6. 1961 Ministr všeobecného strojírenství: Karel Poláček Ministr výstavby: Oldřich Beran, do 9. 2. 1962 Josef Korčák, od 9. 2. 1962 do 5. 1. 1963 Samuel Takáč, od 5. 1. 1963 Ministr zahraničního obchodu: František Krajčír, do 5. 1. 1963 František Hamouz, od 5. 1. 1963 Ministr zdravotnictví: Josef Plojhar (ČSL) Ministr zemědělství, lesního a vodního hospodářství: Lubomír Štrougal, do 23. 6. 1961 Vratislav Krutina, od 23. 6. 1961 Ministr - předseda Vládní komise pro národní výbory (5. 1. 1963 zrušena): Rudolf Barák, od 13. 7. 1961 do 9. 2. 1962 Ministr - předseda Státní plánovací komise: Otakar Šimůnek, do 11. 7. 1962 Alois Indra, od 11. 7. 1962 Ministr - pověřen vedením Ústřední správy energetiky: Josef Korčák, od 5. 1. 1963 Ministr - předseda Ústředního úřadu státní kontroly a statistiky: Pavol Majling, od 27. 6. 1961 Ministr bez portfeje: Vasil Biľak, do 5. 1. 1963 Zdeněk Nejedlý, do 9. 3. 1962 (zemřel) Pavol Majling, do 27. 6. 1961 Stanislav Vlna, do 11. 7. 1962 Odkazy Literatura Milan Churaň a kol.: Kdo byl kdo v našich dějinách ve 20. století, 1. díl (A–M), 2. díl (N-Ž), Libri, Praha 1998 (2. vydání), (1. díl), (2. díl), (soubor) Externí odkazy Vláda České republiky Široký Široký Široký Široký"} {"instruction": "Create an HTML table that contains 10 rows and 3 columns.", "input": "", "output": "
    Column A Column B Column C
    "} {"instruction": "Write a Python program to find the most popular item purchased by customers.", "input": "Table = customers\n\n| customer_id | month | city | item | amount |\n|-------------|-------|-------|---------|--------|\n| 1 | 1 | LA | pen | 500 |\n| 2 | 2 | NY | pencil | 600 |\n| 3 | 3 | LA | pen | 700 |\n| 4 | 4 | SF | eraser | 800 |\n| 5 | 5 | LA | notebook| 900 |", "output": "from collections import Counter\n\ncustomers = [\n {'customer_id': 1, 'month': 1, 'city': 'LA', 'item': 'pen', 'amount': 500},\n {'customer_id': 2, 'month': 2, 'city': 'NY', 'item': 'pencil', 'amount': 600},\n {'customer_id': 3, 'month': 3, 'city': 'LA', 'item': 'pen', 'amount': 700},\n {'customer_id': 4, 'month': 4, 'city': 'SF', 'item': 'eraser', 'amount': 800},\n {'customer_id': 5, 'month': 5, 'city': 'LA', 'item': 'notebook', 'amount': 900},\n]\n\nitems = [customer['item'] for customer in customers]\n\npop_item = Counter(items).most_common(1)[0]\n\nprint('Most Popular Item:', pop_item[0])"} {"instruction": "Generate the MD5 hash of the given string.", "input": "Hello World", "output": "a7ad492532f2f806e140722d00453901"} {"instruction": "Generate a valid SQL query to get the total number of people in each job type", "input": "", "output": "SELECT job_type, COUNT(*) FROM table_name GROUP BY job_type;"} {"instruction": "Given an array of integers, write an algorithm to find the maximum difference between any two elements in the array.", "input": "nums = [3, 2, 7, 1, 4]", "output": "def find_max_difference(nums): # Initialize a max difference max_diff = float('-inf') # Iterate through the array for i in range(1, len(nums)): diff = nums[i] - nums[i-1] if diff > max_diff: max_diff = diff return max_diff # Call the function find_max_difference([3, 2, 7, 1, 4]) # returns 6"} {"text": "[CS Wikipedia] Seznam esperantských organizací\n\nMimo velkých vyjmenovaných svazů, existuje řada mezinárodních esperantských svazů, jako je mj. automobilový, nevidomých esperantistů, filatelistů, filologie, matematiků, hudebníků, ornitologů, radioamatérů, skautů, šachistů, turistů, vegetariánů, poštovních a telegrafních zaměstnanců. Většina svazů vydává svůj vlastní časopis. A Akademio de Esperanto je esperantistická organizace zabývající se jazykem. I Internacia Fervojista Esperanto-Federacio (IFEF) Mezinárodní železničářská esperantská federace. Jejím cílem je šířit užívání esperanta mezi železničáři, u železničářských organizací a institucí. Pořádá každoroční mezinárodní sjezdy, vydává odborné slovníky. Orgánem federace je: Internacia Fervojisto. Internacia Ligo de Esperantistaj Instruistoj (Mezinárodní svaz esperantských učitelů vydává časopis Internacia Pedagogia Revuo a byl přijat do Unesca v kategorii C. Internacia Scienca Asocio Esperantista. Mezinárodní vědecký svaz esperantský (ISAE). Má sekce: astronomickou, ekologickou, filologickou, geologickou, chemickou, informatickou a matematickou. Oficiálním orgánem je SCIENCA REVUO. Internacia Katolika Unuiĝo Esperantista (IKUE), Mezinárodní katolický svaz esperantistů, užívá esperanto v liturgii a misijní činností; spolupracuje s různými církevními organizacemi, institucemi a duchovními, aby je podnítil k užívání esperanta. Časopis: Espero Katolika. Spolupracuje a pořádá střídavě společné kongresy s Kristana Esperantista ligo (KELI), Křesťanskou ligou esperantistů. Cílem je vytvořit účinné vztahy mezi křesťany v různých zemích. M Mondpaca Esperanto-Movado (MEM), Světové mírové esperantské hnutí. Vysoce uznávaná organizace. Pracuje pro mír a odzbrojení. Jejím orgánem je revue Paco (Mír). S Sennacieca Asocio Tutmonda (SAT) byl založen v roce 1921 v Praze při příležitosti 13. světového esperantského sjezdu. Zakladatelem byl E. Lanti. Vydává časopisy: Sennaciulo a Sennacieca Revuo. Cílem tohoto svazu je prakticky užívat esperanto pro třídní cíle světového dělnictva; usnadnit styky mezi svými členy, vyučovat a vzdělávat své členstvo. SAT je významné nakladatelství a vyšla v něm díla: Kandido od Voltaira, Komunista Manifesto od K. Marxe a B. Engelse, Fausto od Goetha v překladu N. Barthelmesse, Stato kaj Revolucio od V. I. Lenina, a vydal v několika vydáních velký slovník Plena Vortaro de Esperanto a v poslední době dílo PleneaIlustrita Vortaro de Esperanto (1400 stran). Mezi čestnými předsedy byl: H. Barbusse, Romain Rolland, Albert Einstein, Lunačarskij aj. SAT má rovněž síť delegátů, vydává vlastní ročenku a pořádá každoročně svůj světový sjezd. T Tutmonda Esperantista Junulara Organizo (TEJO), Celosvětová esperantská mládežnická organizace. Jejím orgánem je revue Kontakto a „TEJO-pago“ v revui Esperanto. Cílem je budovat solidaritu a přátelství…"} {"instruction": "Construct a python program to capture a user’s input and print the input back out to the console.", "input": "", "output": "# Accepting user input\nname = input(\"Please enter your name: \")\n\n# Printing out the user input\nprint(\"Hello, \", name, \"!\")"} {"text": "[DE Wikipedia] Stefan Bogoridi\n\nStefan Bogoridi (, gr. Στέφανος Βογορίδης/Stefanos Vogoridis, türk. Stefanaki Bey, rum. Ştefan Vogoride), geboren als Stojko Zonkow Stojkow (bulg. ; * 1775 in Kotel, Osmanisches Reich; † 1. August 1859 in Istanbul/Zarigrad) war ein bulgarisch-osmanischer Beamter, außenpolitischer Berater von zwei Sultanen und Mitglied des Tanzimat-Rats. Er war Phanariot, bulgarischer Herkunft, ein Enkel von Sophronius von Wraza, Bruder von Atanas Bogoridi und Vater von Aleksandar und Nikola Bogoridi. Leben Als kleiner Junge wurde er von seiner Familie nach Bukarest in das berühmte griechische, phanariotische Colegiul Sfântul Sava geschickt, wo er in einer hellenisierten Umgebung seinen Geburtsnamen Stojko durch Stefan ersetzte. Als Nachnamen gab er sich den Namen Bogoridi, der bereits seinen Großvater Sophronius um den Zaren Boris I. der Täufer zu ehren annahm. Nach der Beendigung des Kollegs siedelte Bogoridi in die osmanische Hauptstadt Zarigrad/Istanbul um, wo er auf Vorschlag seines Großvaters Sophronius einige Jahre als Privatlehrer für Französische Sprache bei griechischen, phanariotischen Familien arbeitete, darunter die Mourousis. Bogoridi trat 1799 als Dragoman (Übersetzer) in die osmanische Marine ein, für die er an den englisch-türkischen Kämpfe gegen Napoleon in Ägypten 1799 teilnahm und dadurch das Wohlwollen des ersten Dragomanen der Hohen Pforte Scarlat Callimachi gewann. 1812 heiratete Bogoridi Ralou (oder Raluca) aus Moldau. Ihren Eltern entstammten aus zwei bedeutsamen phanariotischen Häusern Skilitza und Scanava. Als im selben Jahr Scarlat Callimachi Fürst von Moldau in Iași wurde, nahm er Stefan Bogoridi mit sich mit. Er vertraute ihm als Präfekten die Verwaltung der größten moldawischen Provinz mit Galați an der unteren Donau als Hauptstadt. In Galați selbst lebte eine der größten bulgarischen Exilgemeinschaften. Mit dem Ausbruch der von der Filiki Eteria vorbereiteten Griechischen Revolution von 1821 marschierte ein griechisches Heer in den Donaufürstentümer unter Alexander Ypsilantis ein. Als jedoch die Rumänen unter Tudor Vladimirescu nicht die Osmanen, sondern die Häuser der verhassten griechischen Phanarioten angriffen, zog Bogoridi mit seiner Familie nach Nikomedia, da die osmanische Hauptstadt ebenfalls Schauplatzt der Revolution war. Nachdem osmanische Truppen im Sommer des gleichen Jahres die Walachei und Moldau zurückeroberten, wurde Bogoridi zunächst vom Herbst 1821 bis zum Juli 1822 Kaymakam (eine Art Statthalter) der Walachei und danach Kaymakam des Fürstentums Moldau. Zwischen 1823 und 1825 war er erneut Dragoman in der osmanischen Flotte und nahm an mehrere Diplomatische Missionen teil. Als jedoch die Spannungen zwischen den Zarigrader Phanarioten und die osmanischen Machthabern zunahmen und es zu Christenverfolgungen kam, wurde…"} {"instruction": "Create a SQL query that returns the average number of orders per month for customers in California.", "input": "", "output": "SELECT AVG(NumOrders) FROM (SELECT COUNT(OrderId) AS NumOrders FROM Orders WHERE State = 'CA' GROUP BY MONTH(OrderDate)) AS TotalOrders;"} {"instruction": "Create a python script that takes three required parameters 'x', 'y' and 'z' and prints the result of x * y * z", "input": "x=4 y=3 z=2", "output": "def multiply(x, y, z): return x * y * z print(multiply(4, 3, 2)) //output 24"} {"text": "[EN Wikipedia] Jawahar Navodaya Vidyalaya Medak\n\nJawahar Navodaya Vidyalaya Medak ( Telugu: జవహర్ నవోదయ విద్యాలయము, వర్గల్ ) (Hindi: जवाहर नवोदया विद्यलया ) known as JNV Wargal or JNV Medak is a central government co-education school located in Wargal, Medak. The School is an autonomous body under the Ministry of Education, Government of India. Navodaya Vidyalayas are funded by the Indian Ministry of Human Resources Development and administered by Navodaya Vidyalaya Smiti, an autonomous body under the ministry. History Jawahar Navodaya Vidyalaya Medak was established in the year 1987 following the National Policy of Education : 1986. Admissions Admissions to JNV Medak are made through Jawahar Navodaya Vidyalaya Selection Test (JNVST). The test is conducted for class 6 and 9 admissions. This test contains reasoning, math and Hindi. Earlier the entrance form was available on every 'Navodaya Vidyalaya' free of cost mostly in month of October. But from a few years, Navodaya Vidyalaya Samiti has started taking online applications. While applying for admissions in Jawahar Navodaya Vidyalayas, the student must be studying in 5th standard in a school affiliated by central or state government. There is also a provision of lateral entry for students who want to join JNV's from 9th standards. The students must be studying in 8th class while applying to appear in the entrance exam, which is similar to that of JNVST for 6th admissions, however syllabus will be of difficulty level of 8th standard. See also Navodaya Vidyalaya Samiti References Co-educational schools in India Government schools in India Schools in Telangana"} {"instruction": "Generate a program in Python to classify a series of numbers into even or odd.", "input": "[4, 7, 9, 11, 12]", "output": "def classify_numbers(nums):\n for num in nums:\n if (num % 2) == 0:\n print(str(num) + \" is even\")\n else:\n print(str(num) + \" is odd\")\n\nnums = [4, 7, 9, 11, 12]\nclassify_numbers(nums)\n\n# Output:\n# 4 is even\n# 7 is odd\n# 9 is odd\n# 11 is odd\n# 12 is even"} {"instruction": "How would you modify the following code to print the square of each number in the given list?", "input": "nums = [1, 2, 3, 4]", "output": "nums = [1, 2, 3, 4] for i in range(len(nums)): nums[i] = nums[i] * nums[i] print(nums) # [1, 4, 9, 16]"} {"instruction": "Make a class called 'Car' that stores information about a car and contains a function called 'start' which when called, prints out \"Car has started\".", "input": "", "output": "class Car: def __init__(self): self.model = \"\" self.year = 0 def start(self): print(\"Car has started\")"} {"text": "[HI Wikipedia] संजय गांधी थर्मल पावर स्टेशन\n\nसंजय गांधी थर्मल पावर प्लांट दक्षिण पूर्व रेलवे (एसईआर) के बिलासपुर - कटनी अनुभाग के बिरसिंहपुर रेलवे स्टेशन पर स्थित है। जो मध्य प्रदेश, भारत के उमरिया जिले का हिस्सा है। बिजली घर संजय गांधी थर्मल पावर प्लांट की 1,340.00 मेगावाट की स्थापित क्षमता है। इस बिजली घर की पहली इकाई को मार्च 1993 में चालू किया गया था। संयंत्र के लिए पानी पास के जोहिला बांध जो जोहिला नदी पर निर्मित तथा 1810 हेक्टेयर में फैला हुआ है से लिया जाता है। संयंत्र के लिए कोयले की साउथ इस्टर्न कोलफील्ड्स लिमिटेड की खानों से रेल द्वारा आपूर्ति की जाती है। संस्थापित क्षमता इन्हें भी देखें अमरकंटक थर्मल पावर स्टेशन सतपुड़ा थर्मल पावर स्टेशन बरौनी थर्मल पावर स्टेशन सन्दर्भ भारत के ताप विद्युत संयंत्र"} {"instruction": "Extract all the words that begin with 's' from the given list.", "input": "list_of_strings = ['stack', 'super', 'stone', 'sit']", "output": "list_of_strings = ['stack', 'super', 'stone', 'sit'] words_start_s = [word for word in list_of_strings if word.startswith('s')] print(words_start_s)"} {"text": "[CS Wikipedia] Archeologické muzeum (Košice)\n\nArcheologické muzeum v Košicích je muzeum košického městského opevnění, konkrétně jeho Dolní brány. Areál byl odkryt během rekonstrukce Hlavní ulice (1995–1996) za primátora Rudolfa Schustera. Archeologický průzkum vedli košičtí památkáři Marcela Ďurišová a Jozef Duchoň. Projekt muzea je dílem Ing. Alexandra Lamiho. Muzeum bylo veřejnosti zpřístupněno roku 1998. Odkazy Externí odkazy Podzemní Archeologické muzeum pod Hlavní ulicí v Košicích. Reference Muzea na Slovensku Košice Muzea založená roku 1998 Archeologická muzea"} {"instruction": "Create a Regex pattern to validate mobile phone numbers.", "input": "", "output": "^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$"} {"instruction": "Write a pseudocode to compare two strings and determine which is longer.", "input": "", "output": "Function CompareStrings(str1, str2) if Length(str1) > Length(str2) return str1 else return str2 End Function"} {"text": "[DE Wikipedia] Rheinisches Braunkohlerevier\n\nDas Rheinische Braunkohlerevier, oft auch kurz Rheinisches Revier genannt, ist ein Bergbaurevier in der Kölner Bucht, am Nordwestrand des Rheinischen Schiefergebirges. Der Abbau der Braunkohle im Tagebauverfahren wirkte hier maßgeblich landschaftsverändernd und führte zur Ausbildung einiger bedeutender Industriestandorte. Das Revier umfasst die Zülpicher und Jülicher Börde, die Erftniederung und die Ville und ist damit das größte Braunkohlerevier in Europa. In geringerem Maße werden hier Ton, Quarzsand und Löss abgebaut. Die industrielle Nutzung des Reviers mit der kompletten Wertschöpfungskette von Kohleabbau bis zur elektrischen Energieerzeugung erfolgt heute ausschließlich durch den RWE-Konzern (über seine Tochter RWE Power). Nach derzeitiger Planung ist der Abbau im Rheinischen Braunkohlerevier bis 2030 gesichert. Prognosen über die zukünftige Entwicklung sind schwierig, da ein zentraler Pfeiler der deutschen Energiewende ein Kohleausstieg ist. Grenzen und Einteilung Südrevier Das Südrevier um Brühl beginnt südlich von Brühl in der Ville, dort nördlich einer Linie Brühl–Eckdorf/ Erftstadt-Bliesheim. Das Südrevier reicht etwa bis zum Verlauf der Luxemburger Straße B 265 bei Hürth und Liblar und schließt die ehemalige Grube Gewerkschaft Hürtherberg sowie das jetzige Naherholungsgebiet Hürtherberg ein. Auf der Südseite umgreift es die Konzessionen von Carl Brendgen und seiner Firmen um Kierdorf. Dieses Gebiet kleinräumiger Gruben war bis Mitte der 1960er Jahre bereits ausgekohlt und rekultiviert worden. Die Tagebaue sind einem bewaldeten Naherholungsgebiet mit einer Vielzahl von kleinen und mittelgroßen Seen gewichen. Mittleres Revier Das Mittlere Revier umfasst den Villerücken westlich des Frechener Sprungs (Linie Frechen–Oberaußem–Niederaußem) von der Luxemburger Straße im Süden bis zur Linie Bergheim–Oberaußem im Norden. Es ist heute weitgehend ausgekohlt und rekultiviert, die Braunkohleindustrie mit Großkraftwerken und Nachfolgeindustrien prägt aber immer noch die Landschaft. Nordrevier Das Nordrevier schließt sich nördlich des flözfreien Kasterer Horstes und der Erft-Umbiegung nach Osten an und reicht mit den Tagebaugebieten Garzweiler I und II bis Jüchen und Erkelenz, wobei die Braunkohle-Flöze sich in noch größerer Tiefe bis unter Niers und Schwalm erstrecken. Es umfasst ferner mit dem Tieftagebau Hambach bei Jülich Teile der Erftscholle. Hier werden Abraum und Kohle mit Großgeräten wie Schaufelradbaggern gefördert, die Gruben werden dann mit großdimensionierten Bandanlagen und Absetzern wieder verfüllt. Die Kohle wird durch ein eigenes Bahnnetz (Nord-Süd-Bahn (Garzweiler) und Hambachbahn) zu den Werken im Süden gebracht. Die Abraumhalde Sophienhöhe (290 m. ü. N.N.) überragt weithin sichtbar die Jülicher Börde. Westrevier Das Westrevier…"} {"instruction": "Write a Python program to convert a given string to one of its equivalent shell script command", "input": "string = \"copy file1.txt file2.txt\"", "output": "def string_to_shell_command(string):\n split_string = string.split()\n command_name = split_string[0]\n input_args = split_string[1:]\n command_args = ''\n for arg in input_args:\n command_args += f'\"{arg}\"' + ' '\n return f'{command_name} {command_args}'"} {"instruction": "Critique the given code for best coding practices.", "input": "def calculate_total_sum(list_num):\n total_sum = 0\n for num in list_num:\n total_sum += num\n return total_sum", "output": "The code could improve by using the built-in sum() from the Python library. Also, you should use a more meaningful variable name instead of list_num to better explain the intent of the code. Lastly, you could use type hinting to specify the type of variables passed into the function."} {"text": "[EN Wikipedia] Eduardo Amorim (politician)\n\nEduardo Amorim (born March 17, 1963) is a Brazilian politician. He has represented Sergipe in the Federal Senate since 2011. Previously he was a deputy from Sergipe from 2007 to 2011 and secretary of state of Sergipe from 2003 to 2004. He is a member of the Brazilian Social Democracy Party (PSDB). References Living people 1963 births Members of the Federal Senate (Brazil) Brazilian Social Democracy Party politicians People from Sergipe"} {"instruction": "Create a Python program that calculates the total cost of an online purchase.", "input": "ProductName: Powerbank, Quantity: 3, PriceEach: $15", "output": "def calculate_total_cost(product_name, quantity, price):\n return quantity * price\n\ntotal_cost = calculate_total_cost(\"Powerbank\", 3, 15)\nprint(\"Total cost of the purchase is $\" + str(total_cost))"} {"instruction": "Create a web application usingPython and Flask that displays a simple \"Hello World\" page.", "input": "Not applicable", "output": "from flask import Flask\n\napp = Flask(__name__)\n\n@app.route(\"/\")\ndef hello():\n return \"Hello World!\"\n\nif __name__ == '__main__':\n app.run()"} {"instruction": "Create a code snippet in Python that calculates the sum of the digits of a number.", "input": "123", "output": "def sum_of_digits(number):\n sum_digits = 0\n while number > 0:\n sum_digits += (number % 10)\n number //= 10\n return sum_digits\n \nprint(sum_of_digits(123))"} {"instruction": "Construct a for loop to access each element of the given array.", "input": "[1, 2, 3, 4]", "output": "arr = [1, 2, 3, 4] for i in range(len(arr)): print(arr[i])"} {"instruction": "Combine the two objects with the same property value.", "input": "obj1 = { \"name\": \"John\", \"age\": 22 } obj2 = { \"name\": \"John\", \"location\": \"New York\" }", "output": "obj3 = { \"name\": \"John\", \"age\": 22, \"location\": \"New York\" }"} {"instruction": "Modify the following Python code to handle errors.", "input": "def read_data_from_json(filename):\n with open(filename, 'r') as f:\n data = json.load(f)\n return data", "output": "def read_data_from_json(filename):\n try:\n with open(filename, 'r') as f:\n data = json.load(f)\n return data\n except FileNotFoundError:\n print(\"The file specified does not exist.\")\n except json.decoder.JSONDecodeError:\n print(\"The file specified is not in a valid JSON format.\")"} {"instruction": "Correct the error in the given SQL query.", "input": "SELECT * FROM Student st INNERJOIN School sc ON st.schoolID = sc.student", "output": "SELECT * FROM Student st INNER JOIN School sc ON st.schoolID = sc.schoolID"} {"instruction": "Suggest a code segment to generate a random integer in the range of 0 to 100 using Python.", "input": "", "output": "import random random_int = random.randint(0, 100)"} {"instruction": "Edit a given Python program to optimize the time complexity.", "input": "def get_maximum_item(arr):\n maximum_number = float('-infinity')\n\n for item in arr:\n if item > maximum_number:\n maximum_number = item\n\n return maximum_number", "output": "def get_maximum_item(arr):\n if len(arr) == 0:\n return float('-infinity')\n \n maximum_number = arr[0]\n\n for item in arr[1:]:\n if item > maximum_number:\n maximum_number = item \n \n return maximum_number"} {"instruction": "Write an SQL query to retrieve all rows in a table that match a certain criteria.", "input": "Table: Users name | age ------|------ John | 20 Pete | 22 Alex | 18", "output": "SELECT * FROM Users WHERE age > 20;"} {"text": "[CS Wikipedia] Gravitační potenciální energie\n\nGravitační potenciální energie je jeden z druhů mechanické energie, kterou má těleso v gravitačním poli. Jedná se o druh potenciální energie. Značení Značka: Ep Jednotka SI: joule, značka: J Další jednotky: viz Energie Výpočet Homogenní gravitační pole V homogenním gravitačním poli je velikost gravitační potenciální energie závislá na hmotnosti tělesa, na výšce, do které bylo zvednuto, a na gravitačním zrychlení. Velikost potenciální energie se rovná mechanické práci, která je na těleso vykonána při zvedání, přičemž nulová hodnota potenciální energie je kladena na povrch zdroje gravitačního pole. Hodnota potenciální energie je určena vztahem , kde m je hmotnost tělesa, ag je gravitační zrychlení, h je výška nad povrchem. Potenciální energie homogenního pole je tedy nulová na povrchu, s výškou roste a v nekonečnu dosahuje nekonečně velké (kladné) hodnoty. Radiální gravitační pole I v radiálním gravitačním poli je gravitační síla závislá pouze na vzdálenosti od centra gravitačního působení. Radiální gravitační pole je tedy polem centrálních sil a jedná se tedy o konzervativní pole, což umožňuje definovat v tomto poli potenciál a potenciální energii. Pro práci sil v radiálním gravitačním poli platí výraz , kde je gravitační konstanta, je hmotnost zdroje gravitačního pole, je hmotnost tělesa a označují vzdálenosti od středu gravitačního působení, ve kterých se nachází sledované těleso. Vzhledem k tomu, že přírůstek potenciální energie je roven záporné hodnotě vykonané práce, lze potenciální energii v radiální poli zapsat jako , kde je konstanta, která se určí vhodnou volbou hodnoty potenciální energie v některém bodě prostoru. Je zvykem volit potenciální energii tak, aby její hodnota v nekonečnu byla nulová, tzn. Z této podmínky pak pro potenciální energii radiálního gravitačního pole platí Pro potenciál gravitačního pole lze pak psát kde představuje hmotnost zdroje gravitačního pole. Potenciální energie radiálního pole je tedy nulová v nekonečnu, se zmenšující se vzdáleností od centra gravitačního působení její hodnota klesá (do záporných hodnot) a pro dosahuje nekonečně velké (záporné) hodnoty. Zobecnění V obecnějším případě je potenciální energie tělesa důsledkem působení (a prostorového rozložení) ostatních těles, která na sebe působí gravitační silou. Nulovou hladinu potenciální energie je vhodné klást do nekonečna, kde se předpokládá nulová hodnota gravitační síly. Přibližováním těles se energie snižuje (do záporných hodnot). Zvedání tělesa v gravitačním poli Země odpovídá oddalování těles, a tedy potenciální energie stoupne o hodnotu m . ag . h, kde výška h odpovídá vzdálenosti, o kterou se zvětší vzdálenost těles. Praktické použití Gravitační potenciální energie (fyzikálně přesněji potenciální energie tíhová, neboť při běžném pozemském využití…"} {"text": "[DE Wikipedia] Der Sechs-Millionen-Dollar-Mann\n\nDer Sechs-Millionen-Dollar-Mann (Originaltitel: The Six Million Dollar Man) ist eine US-amerikanische Fernsehserie. Zwischen 1973 und 1978 wurden 106 Episoden in 5 Staffeln für den US-Sender ABC produziert. Im deutschsprachigen Fernsehen war sie erstmals beim Privatsender RTLplus zu sehen. Inhalt Der Astronaut und Testpilot Colonel Steve Austin wird bei einem Flugzeugabsturz lebensgefährlich verletzt. Nur eine sechs Millionen US-Dollar teure Operation rettet ihn, bei der ein Auge, ein Arm und beide Beine durch bionische Körperteile ersetzt werden. Mit seiner dadurch erlangten enormen Kraft arbeitet er fortan als Agent für das „Office of Scientific Intelligence“ und trifft auf gefährliche Wissenschaftler, Cyborgs, Außerirdische und sogar Bigfoot. Der Pilotfilm basiert auf dem Buch Cyborg von Martin Caidin und war als eigenständiger Film geplant. Aufgrund des großen Erfolges wurde die Geschichte um Colonel Steve Austin jedoch als Fernsehserie weitergeführt. Die Hauptrolle spielte der US-amerikanische Schauspieler Lee Majors, der zuvor durch Serien wie Big Valley, Die Leute von der Shiloh Ranch (The Virginian) und Owen Marshall – Strafverteidiger bekannt geworden war. Auch danach war er mit der Serie Ein Colt für alle Fälle (The Fall Guy) weiterhin erfolgreich. Aufgrund des Erfolges der Serie und der Beliebtheit der Figur Jaime Sommers (Lindsay Wagner), die einen Gastauftritt als Steves Schulfreundin hatte, wurde der Ableger Die Sieben-Millionen-Dollar-Frau (The Bionic Woman) produziert und von 1976 bis 1978 mit 58 Episoden parallel ausgestrahlt. Zunächst war die Geschichte um Steves Jugendliebe, die bei einem Fallschirmabsprung schwer verletzt und schließlich in eine bionische Frau umgewandelt wird, nur als Doppelfolge für Der-Sechs-Millionen-Dollar-Mann geplant. Nachdem Lee Majors und Lindsay Wagner nach Ausstrahlung dieser Doppelfolge zum Traumpaar wurden, beugten sich die Drehbuchautoren den Fans und die bereits verstorbene Jaime wurde in einer weiteren Doppelfolge durch eine erneute komplizierte Operation wiederbelebt. Jaime verliert durch diesen Eingriff allerdings ihr Gedächtnis und ist zunächst traumatisiert, sodass sich das Paar vorerst trennt und Lindsay Wagner als Jaime Sommers in ihrer eigenen Serie Missionen für Oscar Goldman erfüllt. Es gab allerdings weitere wechselseitige Gastauftritte und Handlungsstränge, die in der einen Serie begannen und in der anderen abgeschlossen wurden (Kampf der Außerirdischen). In den drei Spielfilmen, von denen der erste neun Jahre nach Abschluss der beiden Serien gedreht wurde, finden Jaime (die ihre Erinnerung inzwischen komplett zurückgewonnen hat) und Steve jedoch schließlich wieder zusammen. Trotz erneuter Komplikationen heiraten die beiden schließlich am Ende des dritten Spielfilms. Die letzten beiden…"} {"instruction": "In Python, write a function that takes two integers a, b and returns a*b.", "input": "", "output": "def multiply(a, b): return a * b"} {"instruction": "How to generate all permutations of a given list of items?", "input": "", "output": "def permutation(lst): if len(lst) == 0: return [] if len(lst) == 1: return [lst] l = [] for i in range(len(lst)): m = lst[i] remLst = lst[:i] + lst[i+1:] for p in permutation(remLst): l.append([m] + p) return l"} {"text": "[CS Wikipedia] Square Jules-Ferry\n\nSquare Jules-Ferry je square v Paříži v 11. obvodu. Historie Square bylo založeno v roce 1924 na ploše 5830 m2 uprostřed Boulevardu Jules-Ferry. Náměstí bylo pojmenováno po pařížském starostovi Julesovi Ferrym. V roce 1909 zde byla instalována kamenná socha, kterou vytvořil sochař Jean-Bernard Descomps (1872-1948). Představuje tzv. Grisette (tj. Šedivka), označení, které vzniklo na konci 19. století pro mladé dívky, které pracovaly v oděvních dílnách oblečené v šedé halence. Externí odkazy Square na stránkách města Paříže Jules-Ferry Vzniklo 1924"} {"text": "[DE Wikipedia] Liste der Wappen im Kreis Segeberg\n\nDiese Liste zeigt die Wappen des Kreises Kreises Segeberg (Schleswig-Holstein) mit seinen Städten, Gemeinden und Ämtern. Kreiswappen Amtsfreie Städte und Gemeinden Ämter Amt Auenland Südholstein Amt Bad Bramstedt-Land Amt Boostedt-Rickling Amt Bornhöved Amt Itzstedt Siebente amtsangehörige Gemeinde ist Tangstedt aus dem Kreis Stormarn. Amt Kisdorf Amt Leezen Amt Trave-Land Ehemalige Ämter Blasonierungen Literatur Martin Reißmann: Die Wappen der Kreise, Ämter, Städte und Gemeinden in Schleswig-Holstein / bearb. von Martin Reißmann unter Mitw. von Uta Heß. Husum: Husum; Schleswig: Landesarchiv Schleswig-Holstein, 1997 (Veröffentlichungen der Schleswig-Holsteinischen Landesarchivs; 49). ISBN 978-3-88042-815-7 Hans Schlothfeldt: Schleswig-Holsteinische Kreis- und Ortswappen Neumünster: Wachholtz, 1964 (Hrsg.: Der Schleswig-Holsteinische Heimatbund e. V.) Klemens Stadler: Deutsche Wappen – Bundesrepublik Deutschland, Band 5 – Die Gemeindewappen der Bundesländer Niedersachsen und Schleswig-Holstein Bremen: Angelsachsen, 1970 Weblinks Landesarchiv Schleswig-Holstein Kommunale Wappenrolle Schleswig-Holstein Segeberg Wappen Segeberg Wappen Segeberg"} {"instruction": "Design an algorithm in Python to estimate future house prices.", "input": "", "output": "import pandas as pd\nfrom sklearn.linear_model import LinearRegression\n\n# Read the data\ndata = pd.read_csv('housing.csv')\n# Split into X and y\nX = data.drop('price', axis=1)\ny = data['price']\n# Initialize the model\nmodel = LinearRegression()\n# Fit the model to the training data\nmodel.fit(X, y)\n# Estimate future prices using the model\npredictions = model.predict(X)"} {"instruction": "Generate a python program to simulate a simple dice game between two players.", "input": "Player-1: Alice\nPlayer-2: Bob", "output": "import random \n\n# initialise the scores\nAlice_score = 0\nBob_score = 0\n\nwhile (Alice_score < 10 and Bob_score < 10): \n \n# generate dice numbers for both players\nAlice_val = random.randint(1,6)\nBob_val = random.randint(1,6)\n\n# check if Alice wins\nif Alice_val > Bob_val:\n Alice_score += 1\n\n# check if Bob wins\nif Bob_val > Alice_val:\n Bob_score += 1\n\n# print scores after the round\nprint(\"Alice: {0}, Bob: {1}\".format(Alice_score, Bob_score))\n\nif Alice_score == 10:\n print(\"Alice wins!\")\nelif Bob_score == 10:\n print(\"Bob wins!\")"} {"instruction": "Identify the purpose of the given lines of code.", "input": "# Create a boolean variable is_valid = True", "output": "The given code creates a boolean variable called is_valid and assigns it the value of True."} {"instruction": "Write a function to determine if a given number is prime and returns true or false.", "input": "", "output": "def is_prime(num): if num <= 1: return False for i in range(2, num): if num % i == 0: return False return True"} {"text": "[CS Wikipedia] Erzberg\n\nErzberg je hora ve Štýrsku v Rakousku. Jedná se o významné naleziště železné rudy. Současná výška hory je 1 466 metrů nad mořem, před začátkem těžby to bylo 1 532 metrů nad mořem. Každoročně se v činném povrchovém dole a jeho blízkém okolí pořádá Erzbergrodeo – závod na terénních motocyklech v disciplíně enduro. Externí odkazy Hory a kopce ve Štýrsku Hory a kopce v Ennstalských Alpách Tisícovky v Rakousku Těžba železné rudy v Rakousku"} {"instruction": "Write a python program to automatically extract the following grade scores from the given text.", "input": "Text: “Johnny got 85 in Maths and 63 in English”", "output": "maths_score = 85\nenglish_score = 63"} {"instruction": "Write a Python program to optimize a given mathematical expression.", "input": "x - 5 + (y * (1 + (z / 2)))", "output": "def optimize_expression(expr):\n expr_tree = ast.parse(expr, mode='eval')\n \n # transform expression\n expr_tree = ast.fix_missing_locations(ast.optimize_expression(expr_tree)) \n ast.increment_lineno(expr_tree, 1)\n\n # compile ast to python code\n compiled_expr = compile(expr_tree, '', 'eval') \n \n return eval(compiled_expr)"} {"text": "[HI Wikipedia] डाइप्रोटोडान्शिया\n\nडाइप्रोटोडान्शिया या द्वि-आदिदन्ती (Diprotodontia) धानीप्राणी (मारसूपियल​) जानवरों का एक बड़ा जीवविज्ञानिक गण है जिसमें लगभग १२० जातियाँ आती हैं। इनमें कंगारू, वॉलाबी, कोआला, पॉस्सम और वोम्बैट शामिल हैं। कुछ विलुप्त जातियाँ भी इसमें आती हैं, जैसे कि गेंडे के आकार वाला डाएप्रोटोडोन और 'मारसूपियल​ सिंह' का उपनाम पाने वाला थायलाकोलेओ। नामोत्पत्ति यूनानी भाषा में 'डाएप्रोटोस' (διπρωτός) का मतलब 'आगे के दो' और 'ओडोंटोस​' (οδοντος) का मतलब 'दाँत' होता है। इस गण के जानवरों के निचले जबड़े में दो बड़े काटने वाले दाँत होते हैं। इन्हें भी देखें मारसूपियल सिंह धानीप्राणी सन्दर्भ डाएप्रोटोडोन्ट​"} {"instruction": "Convert the following if-else block of code into a ternary expression.", "input": "if (condition){ do_something(); } else { do_something_else(); }", "output": "condition ? do_something() : do_something_else();"} {"text": "[EN Wikipedia] Pararrhaptica sublichenoides\n\nPararrhaptica sublichenoides is a moth of the family Tortricidae. It was first described by Otto Swezey in 1913. It is endemic to the island of Hawaii. External links Archipini Endemic moths of Hawaii"} {"instruction": "Write a Python program to automatically format and validate user input.", "input": "Not applicable", "output": "import re\n\ndef validate_input(input):\n # validate pattern:\n pattern = r\"^[a-zA-Z]*$\"\n # compile regex\n regex = re.compile(pattern)\n\n # check if input matches pattern\n if(regex.match(input)):\n # format the input\n input = input.lower().capitalize()\n # return formatted input\n return input\n else:\n # return error\n return \"Error: Invalid input\""} {"instruction": "Write a Python function that accepts a list and returns the sum of the numbers present in the list.", "input": "list = [1, 2, 3, 4, 5]", "output": "def list_sum(lst): result = 0 for num in lst: result += num return result"} {"instruction": "Generate a set of Python classes for a game application. The classes should include a main Character class with fields for name, health, and inventory, and a Monster class with fields for name, health, and type (e.g. dragon, ogre, goblin).", "input": "Not applicable", "output": "class Character:\n def __init__(self, name, health=100):\n self.name = name\n self.health = health\n self.inventory = []\n\n def add_item(self, item):\n self.inventory.append(item)\n\n def remove_item(self, item):\n self.inventory.remove(item)\n\nclass Monster:\n def __init__(self, name, health=100, type=\"Monster\"):\n self.name = name\n self.health = health\n self.type = type\n\n def attack(self, character):\n pass"} {"text": "[DE Wikipedia] Schwedenkiste\n\nDie sogenannte Schwedenkiste ist ein zwanzig Foliobände umfassender Dokumentenbestand, in dem die Papiere von Ernst II. von Sachsen-Gotha-Altenburg, Johann Joachim Christoph Bode und anderen bedeutenden Freimaurern und Illuminaten überliefert sind. Der Name leitet sich von dem Umstand ab, dass die Materialien auf testamentarischen Wunsch des Herzogs nach dessen Tod an die Großloge von Schweden in Stockholm übersandt wurden. Von dort kehrten sie im Januar 1881 nach Gotha zurück. Die aus dem Nachlass Bodes stammenden Papiere enthalten eine bedeutende Sammlung an Protokollen, Präfekturberichten und Logenreden aus dem Zeitraum zwischen 1776 und 1787. Für die prosopografische Forschung ist insbesondere der zehnte Band von Bedeutung, der Namenslisten und Beitrittserklärungen enthält und die Mitgliedschaft einer Reihe bedeutender Persönlichkeiten der zweiten Hälfte des 18. Jahrhunderts – darunter auch Johann Wolfgang von Goethe – im Illuminatenorden dokumentiert. 1934 wurden die Materialien von der Gestapo beschlagnahmt und von Gotha nach Berlin verbracht. 1945 erbeuteten die Sowjets die Schwedenkiste und überführten sie nach Moskau. Im Jahr 1957 wurden neunzehn der zwanzig Bände an das Zentrale Staatsarchiv der DDR in Merseburg übergeben; allein der zehnte Band mit den Namenslisten und Beitrittserklärungen verblieb in Moskau. Seit 1991 sind die Materialien wieder frei für die Forschung zugänglich. Sie werden als Depositum der Großloge „Zu den drei Weltkugeln“ im Geheimen Staatsarchiv Preußischer Kulturbesitz in Berlin-Dahlem aufbewahrt. Literatur Quellen Geheimes Staatsarchiv Preußischer Kulturbesitz Berlin-Dahlem, Freimaurer 5.2. G 39 JL Ernst zum Kompaß, Nr. 100–119 (sogenannte Schwedenkiste) Bestandsaufschlüsselung Schwedenkiste Aufstellung mit Zugriff auf die einzelnen Dokumente Darstellungen Renate Endler: Zum Schicksal der Papiere von Johann Joachim Christoph Bode, in: Quatuor Coronati Jahrbuch 27 (1990), , S. 9–35. Hermann Schüttler: Die Mitglieder des Illuminatenordens, 1776–1787/93, München 1991, ISBN 3-89391-018-2. Renate Endler: Band X der Schwedenkiste aufgefunden, in: Quatuor Coronati Jahrbuch 31 (1994), , S. 189–197. Renate Endler, Elisabeth Schwarze-Neuß: Die Freimaurerbestände im Geheimen Staatsarchiv Preußischer Kulturbesitz. Bd. 1: Großlogen und Protektor; Bd. 2: Tochterlogen (= Schriftenreihe der internationalen Forschungsstelle Demokratische Bewegungen in Mitteleuropa 1770–1850, Bände 13 und 18), Frankfurt am Main u. a. 1994, 1996. Historisches Dokument Geschichte der Freimaurerei Illuminatenorden"} {"instruction": "Can you develop a Python class to calculate the cross entropy loss between two probability distributions?", "input": "", "output": "import numpy as np\n\nclass CrossEntropy:\n def __init__(self):\n pass\n \n def loss(self, p, q):\n return - np.sum(p * np.log(q))"} {"instruction": "Given the HTML structure below, add a red background to the

    tag.", "input": "

    This is a heading

    ", "output": "

    This is a heading

    "} {"instruction": "Create a Python program that takes a sentence as input and returns a dictionary of the words and their frequencies", "input": "This is a sample sentence.", "output": "def word_frequency(sentence):\n words = sentence.split()\n freq = {word: words.count(word) for word in words}\n return freq\n\nsentence = 'This is a sample sentence.'\nresult = word_frequency(sentence)\nprint(result)"} {"instruction": "Calculate the average of the given two integers.", "input": "Integer 1: 2 Integer 2: 5", "output": "The average of 2 and 5 is 3.5."} {"text": "[DE Wikipedia] Liste der Kurzgeschichten von Roald Dahl\n\nDie Liste der Kurzgeschichten von Roald Dahl führt in der chronologischen Reihenfolge der Erstveröffentlichungen alle bekannten Kurzgeschichten von Roald Dahl auf. Enthalten sind auch diejenigen Kurzgeschichten, die aus unterschiedlichen Gründen unveröffentlicht geblieben sind. Manche Kurzgeschichten wurden in verschiedenen Publikationen unter verschiedenen Titeln veröffentlicht. Die Tabelle enthält als erste Titelangabe die allgemein am weitesten verbreitete Titelbezeichnung der jeweiligen Geschichte. Auf Alternativtitel wird in den Bemerkungen der Tabelle verwiesen. Literatur Biographien Jeremy Treglown: Roald Dahl. A Biography. New York 1994. Tom Solomon: Roald Dahl’s Marvellous Medicine. Liverpool 2016. Donald Sturrock: Storyteller. The Authorized Biography of Roald Dahl. New York/London 2010. Autobiographien Boy. Schönes und Schreckliches aus meiner Kinderzeit. Reinbek 1986. Im Alleingang. Meine Erlebnisse in der Fremde. Reinbek 1988. Deutschsprachige Sammlungen von Kurzgeschichten (Auswahl) ...steigen aus...Maschine brennt... 10 Fliegergeschichten. Reinbek 1966 Küßchen, Küßchen! Elf ungewöhnliche Geschichten. Reinbek 1966 ...und noch ein Küßchen! Weitere ungewöhnliche Geschichten. Reinbek 1967 Lammkeule und andere Geschichten. Berlin 1977 Kuschelmuschel. Vier erotische Überraschungen. Reinbek 1978 Ich sehe was, was du nicht siehst. Acht unglaubliche Geschichten. Reinbek 1984 Konfetti. Ungemütliches + Ungezogenes. Reinbek 1987 Die Prinzessin und der Wilderer. Vier Geschichten. Reinbek 1989 Mein Freund Claud. Erzählungen. Reinbek 1990 Englischsprachige Sammlungen von Kurzgeschichten (Auswahl – nach Veröffentlichungsjahr angeordnet) Over to You. Ten Stories of Flyers and Flying. New York 1946 Someone Like You. New York 1953 und London 1961 (revidierte und erweiterte Auflage) Kiss Kiss. New York 1960 Collected Stories of Roald Dahl from Someone Like You and Kiss Kiss. Chosen by the author, Modern Library of the World’s Best Books, New York 1968 Twenty-Nine Kisses from Roald Dahl. London 1969 – enthalten sind alle 29 Kurzgeschichten aus Someone Like You und Kiss Kiss Switch Bitch. (London) 1974 The Wonderful Story of Henry Sugar and six more. (London) 1977 More Tales of the Unexpected. (London) 1980 Two Fables. Harmondsworth 1986 Ah, Sweet Mystery of Life. London 1989 A Taste of the Unexpected. London 2005 The Complete Short Stories. Band 1, 1944 – 1953, London 2013 The Complete Short Stories. Band 2,1954 – 1988, London 2013 Deception. Tales of Intrigue and Lies. London 2016 Lust. Tales of Craving and Desire. London 2016 Madness. Tales of Fear and Unreason. London 2016 Innocence. Tales of Youth and Guile. London 2017 Trickery. Tales of Deceit and Cunning. London 2017 War. Tales of Conflict and Strife. London 2017 Cruelty. Tales of Malice and Greed.…"} {"instruction": "The given code provides a set of functions and classes for testing in Python. To use this code, you can import the necessary functions and classes into your Python script. To run tests, you can create instances of the TestSuiteResult class and add instances of the TestModuleResult, TestClassResult, and TestResult classes to it. You can then call the get_status() method on the TestSuiteResult instance to get the overall status of the tests. The code also provides various error classes for handling test failures and exceptions. You can use these error classes to create instances of the corresponding result classes and add them to the appropriate TestResult instance.", "input": "", "output": "\"\"\"\nCopyright (c) 2012-2013, Austin Noto-Moniz (metalnut4@netscape.net)\n\nPermission to use, copy, modify, and/or distribute this software for any purpose\nwith or without fee is hereby granted, provided that the above copyright notice\nand this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\nOF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\nTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\nTHIS SOFTWARE.\n\"\"\"\n\nfrom pyinq.results import *\n\n\n##### TEST ASSERT RESULTS #####\n\nLINENO = 12\nCALL = \"assert_true(True)\"\nFAIL = \"FAIL\"\nTRACE = \"TRACE\"\nEXPECTED = IOError\n\ndef test_Result_true():\n check_Result(True)\n \ndef test_Result_false():\n check_Result(False)\n\ndef test_AssertResult_true():\n check_AssertResult(True)\n\ndef test_AssertResult_false():\n check_AssertResult(False)\n\ndef test_AssertEqualsResult_true():\n check_AssertEqualsResult(True,4,4)\n\ndef test_AssertEqualsResult_false():\n check_AssertEqualsResult(False,4,5)\n\ndef test_AssertInResult_true():\n check_AssertInResult(True,4,[1,2,4,8,16,32,64])\n\ndef test_AssertInResult_false():\n check_AssertInResult(False,4,[1,1,2,3,5,8,13])\n\ndef test_AssertInstanceResult_true():\n check_AssertInstanceResult(True,IOError,Exception)\n\ndef test_AssertInstanceResult_false():\n check_AssertInstanceResult(False,IOError,WindowsError)\n\ndef test_AssertRaisesResult_true():\n check_AssertRaisesResult(True,TRACE)\n\ndef test_AssertRaisesResult_false():\n check_AssertRaisesResult(False,\"\")\n\ndef test_ExpectedErrorResult_true():\n check_ExpectedErrorResult(True,LINENO)\n\ndef test_ExpectedErrorResult_false():\n check_ExpectedErrorResult(False,None)\n\ndef test_FailResult():\n result = FailResult(LINENO,FAIL)\n assert result.lineno == LINENO\n assert result.mess == FAIL\n assert result.result == False\n\ndef test_AssertError():\n result = AssertError(TRACE)\n assert result.trace == TRACE\n assert result.result is None\n\n\n##### TEST RESULTS #####\n\nNAME = \"FOO\"\n\ndef test_TestResult():\n test_result = TestResult(NAME)\n\n assert test_result.name == NAME\n assert not test_result.before\n assert not test_result.after\n\ndef test_TestResult_true():"} {"text": "[HI Wikipedia] कार्बन मोनोक्साइड\n\nकार्बन मोनोक्साइड (CO) (अंग्रेजी:Carbon monoxide) एक रंगहीन गैस है। यह गैस हवा से थोड़ी हल्की होती है। ऊँची सांद्रता में यह मनुष्यों और जानवरों के लिए विषाक्त होती है, हालाँकि कम मात्रा में यह कुछ सामान्य जैविक कार्यों के लिए उपयोगी साबित होती है। ढांचा कार्बन मोनोऑक्साइड एक कार्बन परमाणु और एक ऑक्सीजन परमाणु के त्रि-आबंध से बनता है। इसका अणु सूत्र CO है। क्योंकि इसमें जैव बल (Vital Force) नहीं होता, इसके गुण अजैविक यौगिकों से ज्यादा समानता रखते है। शरीर पर असर इसकी अधिक मात्रा शरीर के अंदर जाने पर पहले दम घुटता है, बाद में बेहोशी आती है और मृत्यु तक हो सकती है। अकार्बनिक यौगिक"} {"instruction": "Train a machine learning model in Python to predict the COVID-19 fatalities in a given region.", "input": "", "output": "import pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.linear_model import LinearRegression\n\n# Load data\ndata = pd.read_csv('data.csv')\n\n# Split data into features and targets\nX = data.drop(['Fatalities'], axis=1).values\ny = data['Fatalities'].values\n\n# Split data into train and test sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.20, \n random_state=42)\n\n# Normalize data\nscaler = StandardScaler()\nX_train = scaler.fit_transform(X_train)\nX_test = scaler.transform(X_test)\n\n# Train machine learning model\nmodel = LinearRegression()\nmodel.fit(X_train, y_train)\n\n# Predict fatalities in given region\npredictions = model.predict(X_test)"} {"instruction": "Create a Python script to extract the temperature from a JSON object.", "input": "{\n \"location\": \"Berlin\",\n \"weather\": {\n \"temperature\": 17.6\n }\n}", "output": "import json\n\njson_string = '''\n{\n \"location\": \"Berlin\",\n \"weather\": {\n \"temperature\": 17.6\n }\n}\n'''\n\ndata = json.loads(json_string)\n\ntemperature = data[\"weather\"][\"temperature\"]\nprint(temperature) => 17.6"} {"instruction": "Can you build an algorithm in Python to sort an array with the Bubble Sort technique?", "input": "[2, 7, 4, 1, 5, 3]", "output": "def bubble_sort(arr): \n \n n = len(arr) \n \n # Traverse through all array elements \n for i in range(n): \n \n # Last i elements are already in place \n for j in range(0, n-i-1): \n \n # traverse the array from 0 to n-i-1 \n # Swap if the element found is greater \n # than the next element \n if arr[j] > arr[j+1] : \n arr[j], arr[j+1] = arr[j+1], arr[j] \n \n# Driver code to test above \narr = [2, 7, 4, 1, 5, 3] \n \nbubble_sort(arr) \n \nprint (\"Sorted array is:\") \nfor i in range(len(arr)): \n print (\"%d\" %arr[i]),"} {"instruction": "Explain what overfitting is, in the context of machine learning.", "input": "", "output": "Overfitting is a phenomenon in which a machine learning model performs better on training data than on new data. This occurs when a model is excessively complex and able to learn the underlying noise of the training data. As a result, the model doesn’t generalize well on previously unseen data and does not perform as expected. Overfitting is typically the result of the model having too many features or parameters relative to the amount of training data available."} {"instruction": "Develop a Python program that takes a list of numbers as an input and outputs the numbers in the list sorted in ascending order.", "input": "[5, 3, 7, 2, 4, 9, 1]", "output": "def sortAscending(list): \n list.sort() \n return list\n \n# Driver Code \nlist = [5, 3, 7, 2, 4, 9, 1] \nprint(sortAscending(list)) \n\n# Output: [1, 2, 3, 4, 5, 7, 9]"} {"instruction": "Develop a machine learning algorithm in Python that can classify an email as either spam or ham.", "input": "", "output": "from sklearn.naive_bayes import MultinomialNB\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.metrics import accuracy_score\n\n# Load the data\nX_train = [...]\ny_train = [...]\nX_test = [...]\ny_test = [...]\n\n# Create the count vectorizer\nvectorizer = CountVectorizer()\nX_train_vectors = vectorizer.fit_transform(X_train)\nX_test_vectors = vectorizer.transform(X_test)\n\n# Create the Multinomial Naive Bayes classifier\nclf = MultinomialNB()\nclf.fit(X_train_vectors, y_train)\n\n# Make predictions\npredictions = clf.predict(X_test_vectors)\n\n# Print accuracy\nprint(accuracy_score(y_test, predictions))"} {"instruction": "Write a python program to create a histogram of the given list elements", "input": "list: [1, 2, 4, 5, 6, 3, 2]", "output": "def create_histogram(list):\n hist = dict()\n \n for i in list:\n if i not in hist:\n hist[i] = 1\n else:\n hist[i] += 1\n \n return hist"} {"text": "[CS Wikipedia] French Open 2013 – čtyřhra juniorek\n\nObhájcem titulu ve čtyřhře juniorek na pařížském French Open 2013 byl ruský pár Darja Gavrilovová a Irina Chromačovová, který se čtyřhry nezúčastnil. Gavrilovová již nemohla startovat pro věkové omezení a Chromačovová nastoupila do kvalifikace ženské dvouhry, kde byla ve druhém kole vyřazena. Vítězem čtyřhry juniorek se stala druhá nasazená dvojice sedmnáctiletých Češek Barbora Krejčíková a Kateřina Siniaková, která ve finále přehrála ekvádorsko-brazilský pár Doménica Gonzálezová a Beatriz Haddad Maiová ve dvou setech 7–5 a 6–2. Obě české tenistky tak získaly premiérový grandslamový titul. Nasazené páry Belinda Bencicová / Antonia Lottnerová (čtvrtfinále) Barbora Krejčíková / '''Kateřina Siniaková (vítězky) Ana Konjuhová / Carol Zhaová (semifinále) Darja Kasatkinová / Veronika Kuděrmetovová (1. kolo) Katie Boulterová / Katy Dunneová (1. kolo) Anett Kontaveitová / Petra Uberalová (1. kolo) Alejandra Cisnerosová / Victoria Rodríguezová (1. kolo) Alice Matteucciová / Nina Stojanovićová ''(semifinále) Pavouk Finálová fáze Horní polovina Dolní polovina Odkazy Reference Externí odkazy Pavouk čtyřhry juniorek French Open 2013 na stránkách Mezinárodní tenisové federace French Open 2013 Juniorský tenis v roce 2013"} {"instruction": "Implement a solution for an online reservation system in Python. The system should allow for users to register and make reservations for products.", "input": "Sample product list:\n[ \n { id: 1, name: 'Sofa', price: 499.99 }, \n { id: 2, name: 'Table', price: 149.99 }, \n { id: 3, name: 'Chair', price: 79.99 } \n]", "output": "import sqlite3\nconn = sqlite3.connect('reservation_system.db')\n\nconn.execute(''' CREATE TABLE IF NOT EXISTS products\n(\nproduct_id INTEGER PRIMARY KEY,\nproduct_name VARCHAR(20) NOT NULL, \nprice DECIMAL NOT NULL\n)''')\n\nconn.execute(\"INSERT INTO products VALUES(1, 'Sofa', 499.99)\")\nconn.execute(\"INSERT INTO products VALUES(2, 'Table', 149.99)\")\nconn.execute(\"INSERT INTO products VALUES(3, 'Chair', 79.99)\")\n\nconn.execute(''' CREATE TABLE IF NOT EXISTS reservations\n(\nreservation_id INTEGER PRIMARY KEY,\nproduct_id INTEGER NOT NULL,\nuser_name VARCHAR(20) NOT NULL,\nreservation_date DATETIME NOT NULL\n)''')\n\ndef register_user(username):\n conn.execute(\"INSERT into users (username) VALUES (?)\", (username,))\n\ndef make_reservation(product_id, username, date):\n conn.execute(\"INSERT into reservations (product_id, user_name, reservation_date) VALUES (?, ?, ?)\", (product_id, username, date))\n\nconn.commit()\nconn.close()"} {"instruction": "Create an API endpoint in Python with Flask that requires authentication.", "input": "users = {\"John\": \"123456\", \"Jenny\": \"456789\"}", "output": "from flask import Flask, request app = Flask(__name__) users = {\"John\": \"123456\", \"Jenny\": \"456789\"} @app.route('/', methods=['GET']) def root(): if request.authorization and request.authorization.username in users \\ and request.authorization.password == users[request.authorization.username]: return 'Authentication successful!' else: return 'Authentication failed!' if __name__ == '__main__': app.run(debug=True)"} {"instruction": "Create an API in Python using Flask that takes an input string and returns a list of synonyms and antonyms for the input string.", "input": "Not applicable", "output": "from flask import Flask\nfrom flask_restful import Resource, Api\nfrom nltk.corpus import wordnet\n\napp = Flask(__name__)\napi = Api(app)\n\nclass SynAntonyms(Resource):\n def get(self, word):\n syns = wordnet.synsets(word)\n synonyms = []\n antonyms = []\n for s in syns:\n for l in s.lemmas():\n synonyms.append(l.name())\n if l.antonyms():\n antonyms.append(l.antonyms()[0].name())\n return {\n 'synonyms': list(set(synonyms)),\n 'antonyms': list(set(antonyms))\n }\n\napi.add_resource(SynAntonyms, '/synantonyms/')\n\nif __name__ == '__main__':\n app.run(debug=True)"} {"instruction": "Write a Java function to find out if a string contains any vowels.", "input": "", "output": "public static boolean containsVowels(String input) { for (int i = 0; i < input.length(); i++) { char ch = input.charAt(i); if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') { return true; } } return false; }"} {"instruction": "Write a Python script to train a sentiment classifier on a given dataset.", "input": "Dataset containing sentences and labels, where each label represents the sentiment of the associated sentence.", "output": "import pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.linear_model import LogisticRegression\n\ndf = pd.read_csv('dataset.csv')\n\nX_train, X_test, y_train, y_test = train_test_split(df['text'], df['label'], random_state=0)\n\nvectorizer = TfidfVectorizer().fit(X_train)\nX_train_vectorized = vectorizer.transform(X_train)\n\nmodel = LogisticRegression(max_iter=1000).fit(X_train_vectorized, y_train)\n\ny_pred = model.predict(vectorizer.transform(X_test))"} {"instruction": "Design a Python program to read numbers from a given array and determine if all numbers are divisible by 5.", "input": "array = [10, 15, 20, 25, 30]", "output": "def checkDivisible(array):\n for num in array:\n if num % 5 != 0:\n return False\n return True\n\narray = [10, 15, 20, 25, 30]\n\nif checkDivisible(array):\n print('All numbers are divisible by 5')\nelse:\n print('Not all numbers are divisible by 5')"} {"instruction": "Write a Python program to generate a 3x4 matrix containing random numbers.", "input": "", "output": "import random\n\ndef generate_random_matrix():\n matrix = [[random.randint(1, 10) for col in range(4)] for row in range(3)]\n return matrix"} {"instruction": "Create a JavaScript class that allows the user to choose the size, position and color of a textbox.", "input": "", "output": "class Textbox { constructor(size, position, color) { this.size = size; this.position = position; this.color = color; } showTextbox() { const textbox = document.createElement(\"div\"); textbox.style.width = this.size + \"px\"; textbox.style.position = this.position; textbox.style.background = this.color; document.body.appendChild(textbox); } }"} {"instruction": "Develop a class in Python to optimize the existing code.", "input": "def display_message(message):\n print(message)\n\ndisplay_message('Hello World!')", "output": "class Display():\n def __init__(self, message):\n self.message = message\n \n def display_message(self):\n print(self.message)\n \nmessage = input('Enter a message: ')\ndisplay_obj = Display(message)\ndisplay_obj.display_message()"} {"instruction": "Generate a Python function to generate prime numbers in a given range of numbers.", "input": "", "output": "def generate_primes(start, end):\n # A list to store prime numbers\n primes = []\n \n # Iterate from start to end and\n # check if number is prime or not\n for num in range(start, end + 1):\n isPrime = True\n for i in range(2, num):\n if (num % i == 0):\n isPrime = False\n if isPrime:\n primes.append(num)\n \n return primes"} {"instruction": "Create a Python class to represent a bank account.", "input": "", "output": "class BankAccount:\n def __init__(self, owner, balance):\n self.owner = owner\n self.balance = balance\n \n def deposit (self, amount):\n self.balance += amount\n return self.balance\n \n def withdraw (self, amount):\n self.balance -= amount\n return self.balance"} {"instruction": "Write a script in python to print the first 10 Fibonacci numbers.", "input": "", "output": "# Initialise the first two numbers of the sequence\nprev, nxt = 0, 1\n\n# Iteratively compute and print out the Fibonacci numbers \nfor i in range(10):\n #Print the current number in the sequence\n print(prev) \n #Compute the next number in the sequence\n prev, nxt = nxt, prev + nxt"} {"text": "[CS Wikipedia] Sipleův ostrov\n\nSipleův ostrov (Siple Island) je ostrov u pobřeží Antarktidy. Nachází se ve Wrigleyho zálivu u pobřeží Země Marie Byrdové a je obklopen Getzovým ledovým šelfem. Je dlouhý 110 km a má rozlohu 6390 km². Ostrov je pokrytý sněhem a ledem, nejvyšším vrcholem je neaktivní štítová sopka Mount Siple, která měří 3110 m. Sipleův ostrov je tak patnáctým nejvyšším ostrovem světa. Ostrov byl pojmenován v roce 1967 podle amerického polárníka Paula Siplea. Reference Externí odkazy Ostrovy země Marie Byrdové Ostrovy Amundsenova moře"} {"instruction": "Generate a Python script to detect if a linked list contains a loop", "input": "", "output": "def contains_loop(head):\n slow_pointer = head\n fast_pointer = head\n\n while slow_pointer and fast_pointer and fast_pointer.next:\n slow_pointer = slow_pointer.next\n fast_pointer = fast_pointer.next.next\n if slow_pointer == fast_pointer:\n return True\n\n return False"} {"instruction": "Construct a Python program to sort a list of strings by their length in ascending order.", "input": "", "output": "def sort_by_length(string_list):\n return sorted(string_list, key=len)"} {"text": "[DE Wikipedia] Les Collières\n\nLes Collières, im Oberlauf Torrent de Combet, im Unterlauf Les Claires, ist ein kleiner Nebenfluss der Rhône von 21,7 km Länge im französischen Département Drôme. Zwei Kilometer vor der Mündung nimmt er den über 60 km langen Wasserlauf aus Rival, Raille und Oron auf. Verlauf Der als Oberlauf der Collières definierte Torrent de Combet kommt aus einem Waldtal im nördlichen Randbereich des Chambaran-Plateaus und führt nur nach Niederschlägen kurzzeitig Wasser. Er erreicht den Rand des Urstromtals, das bei Voreppe nach rechts vom Tal der Isère abzweigt und im oberen Teil auch Plaine de Bièvre genannt wird. Das Gewässernetz in dessen breitem Talboden dient vor allem der Bewässerung. Dort trifft er knapp 230 m über dem Meer auf die Veuze (IGN) bzw. Grande Veuse (SANDRE V3430540), die einen halben Kilometer östlich aus Karstquellen entspringt. Am gegenüberliegenden Ufer geht als kleiner Graben, der erst noch die Verbindung aus einer Fischzuchtanlage zu einem Staubecken kreuzt, les Collières ab. Eine Trennung in zwei Ebenen in Form eines kleinen Aquäduktes oder eines Dükers gibt es nach örtlicher Auskunft (Gendarmeriestation Moras-en-Valloire) nicht. Der Graben führt nördlich um das Staubecken herum und dann parallel zur Veuze nach Westen. In der Nähe der kreuzenden TGV-Strecke gelangt die Collières durch einen Versatz in einen Graben, der weiter unten in spitzem Winkel von der Veuze abzweigt. 5,24 km nach der Gewässerkreuzung mündet von rechts der Bach Dolure (SANDRE V3430500), der 17,9 km lang ist und im Oberlauf „le Rif“ heißt. Auf den nächsten 2,5 km nimmt die Collières das restliche Wasser aus den Bewässerungsgräben auf, in die sich die Grande Veuse in Saint-Sorlin-en-Valloire aufzweigt. Zwei Kilometer vor der Mündung schließlich nimmt die Collières einen über 60 km langen Zulauf auf, bestehend aus den Bächen Rival, Raille und Oron. Für den Gewässerabschnitt zwischen diesem Zusammenfluss und der Mündung in den Rhone-Seitenkanal namens Dérivation de Péage-de-Roussillon wird auch der Name Les Claires verwendet. Gemeinden Lens-Lestang Manthes (Westgrenze) Moras-en-Valloire Saint-Sorlin-en-Valloire Épinouze (Südgrenze) Anneyron Saint-Rambert-d’Albon Zuflüsse le (der) Dolure von rechts (SANDRE V3430500 aber als Zufluss der Collières vergessen), 17,9 km, im Oberlauf le Rif, mit den von links zufließenden Bächen: Ruisseau Combeau (SANDRE V3431020 in Marcollin) Ruisseau des Chansons (SANDRE V3431060 in Marcollin) Ruisseau de Combeau (SANDRE V3430520 in Marcollin) Ruisseau de Lentiol (Sandre V3430520 in Lens-Lestang) Die Balme (siehe IGN: Carte IGN) oder Petite Veuse (SANDRE V3431140) Oberlauf der Grande Veuse von rechts (Man könnte hier auch den Torrent de Combet als Zufluss der Grande Veuse betrachten. Anderswo betrachtet SANDRE ein nur zeitweise…"} {"instruction": "What command should be added to the function to make sure the input list is sorted?", "input": "def remove_duplicates(list): # TODO: add command new_list = [] for element in list: if element not in new_list: new_list.append(element) return new_list", "output": "def remove_duplicates(list): # sort the list list.sort() new_list = [] for element in list: if element not in new_list: new_list.append(element) return new_list"} {"text": "[DE Wikipedia] Susanne Hartmann (Filmeditorin)\n\nSusanne Hartmann (* vor 1970 in Bad Kissingen) ist eine deutsche Filmeditorin. Seit Ende der 1970er-Jahre ist sie als Editorin tätig und war inzwischen bei mehr als 40 Langfilmen sowie einigen Serien-Episoden für die Montage verantwortlich. Ihr Schwerpunkt liegt dabei auf Fernsehproduktionen; zu ihrem Schaffen gehören u. a. mehr als 15 Folgen der Tatort-Reihe. Filmografie 1979: Die Fluchtlinie 1979: 1001 Meile Eifel 1980: Ein Stück Himmel 1981: Der Fall Maurizius 1983 Schlossherren 1983 Der ganz normale Wahnsinn 1986: Tatort: Freunde 1988: Tatort: Einzelhaft 1988–1992: Die zweite Heimat 1994: Radetzkymarsch 1995: Kaspar Hauser (zweiteilige TV-Fassung) 1997: Das ewige Lied 2000: Der Bulle von Tölz: Mord im Chor 2000: Der Bulle von Tölz: Rote Rosen 2000: Der Bulle von Tölz: www.mord.de 2000: Der Bulle von Tölz: Tödliches Dreieck 2001: Tatort: Im freien Fall 2004: Heimat 3 – Chronik einer Zeitenwende 2005: 3° kälter 2006: Wer früher stirbt ist länger tot 2007: Tatort: Der Traum von der Au 2008: Tatort: Liebeswirren 2009: Tatort: Gesang der toten Dinge 2009: Tatort: Wir sind die Guten 2009: Pizza und Marmelade 2010: Tatort: Die Heilige 2011: Das Meer am Morgen (La Mer à l’aube) 2011: Polizeiruf 110: Denn sie wissen nicht, was sie tun 2012: Tatort: Ein neues Leben 2012: Polizeiruf 110: Schuld 2013: Tatort: Aus der Tiefe der Zeit 2014: Tatort: Am Ende des Flurs 2014: Polizeiruf 110: Smoke on the Water 2015: Tatort: Die letzte Wiesn 2015: Tatort: Einmal wirklich sterben 2016: Tatort: Mia san jetz da wo’s weh tut 2016: Tatort: Klingelingeling 2017: Tatort: Hardcore 2018: Tatort: Ich töte niemand Auszeichnungen Deutscher Filmpreis 2007 – Bester Schnitt – Wer früher stirbt ist länger tot (nominiert) Weblinks Filmeditor Deutscher Geboren im 20. Jahrhundert Frau"} {"instruction": "Modify the given HTML code to create a form element with two text boxes and a submit button.", "input": "

    My Form

    ", "output": "

    My Form





    "} {"instruction": "Re-write this algorithm in pseudo-code.", "input": "def checkEven(number): if(number % 2 == 0): return True else: return False", "output": "function checkEven(number) if number modulo 2 = 0 return true else return false end function"} {"instruction": "Edit the given SQL statement to select the top 3 entries with lowest price.", "input": "SELECT * FROM products", "output": "SELECT * FROM products ORDER BY price ASC LIMIT 3;"} {"instruction": "Rewrite the following code snippet in PHP.", "input": "def find_max(arr): max = arr[0] for i in range(1, len(arr)): if arr[i] > max: max = arr[i] return max", "output": "function find_max($arr) { $max = $arr[0]; for ($i = 1; $i < count($arr); $i++) { if ($arr[$i] > $max) { $max = $arr[$i]; } } return $max; }"} {"instruction": "Given a function to calculate the distance between two points, how would you write a Python program to compute the closest pair of points from a set?", "input": "Set of 7 points:\n[ (-2.2, 12.5), (-8.7, 8.6), (1.1, 10.1), (2.2, 4.2), (-7.3, 5.4), (-3.4, 2.2), (0.4, 9.1) ]", "output": "def findClosestPoints(points):\n # initialize the distance\n closest_distance = float('inf')\n closest_points = None\n \n for i, point1 in enumerate(points):\n for j, point2 in enumerate(points):\n if i != j:\n distance = calculateDistance(points[i], points[j])\n if distance < closest_distance:\n closest_distance = distance\n closest_points = [points[i], points[j]]\n \n return closest_points\n \n# calculate the Euclidean distance between two points\ndef calculateDistance(point1, point2):\n x1, y1 = point1\n x2, y2 = point2\n return math.sqrt((x2 - x1)**2 + (y2 - y1)**2)\n\n\nif __name__ == '__main__':\n points = [ (-2.2, 12.5), (-8.7, 8.6), (1.1, 10.1), (2.2, 4.2), (-7.3, 5.4), (-3.4, 2.2), (0.4, 9.1) ]\n closest_points = findClosestPoints(points)\n print(\"Closest points: {}\".format(closest_points))\n\nOutput: Closest points: [(-2.2, 12.5), (-3.4, 2.2)]"} {"instruction": "Find all character positions in the given string", "input": "String: abracadabra", "output": "Character Positions: a: 0, 3, 5, 7, 10 b: 1, 8 c: 2 d: 4 r: 6, 9"} {"instruction": "Create an array of numbers using python, only using the number 0", "input": "", "output": "# Create an array of 10 zeros\narr = [0 for i in range(10)]\n\n# Create an array of 20 zeros\narr = [0 for i in range(20)]\n\n# Create a 3x3 array of zeros\narr = [[0 for i in range(3)] for j in range(3)]\n\n# Create a 5x5 array of zeros\narr = [[0 for i in range(5)] for j in range(5)]"} {"instruction": "Create an array of strings containing the names of your relatives", "input": "", "output": "relatives = ['John', 'Adam', 'Sarah', 'Paul', 'Emily']"} {"instruction": "Create a CSS class that changes font color to blue.", "input": "", "output": ".blue-text { color: blue; }"} {"instruction": "Given a list of integers, write a Python program to find the maximum value in the array and display its index.", "input": "[3, 2, 5, 8, 6]", "output": "mylist = [3, 2, 5, 8, 6]\n\n# initialize maximum value and index\nmaxval = 0\nmaxindex = 0\n\n# iterate through list\nfor i, val in enumerate(mylist):\n # check if the current value is greater than the maximum value\n if val > maxval:\n maxval = val\n maxindex = i\n\n# print the result\nprint('Maximum value:', maxval)\nprint('Index of maximum value:', maxindex)"} {"text": "[HI Wikipedia] पियेर सिमों लाप्लास\n\nपियेर सिमों लाप्लास (Pierre Simon Laplace, १७४९ ई. - १८२७ ई.) फ्रांसीसी गणितज्ञ, भौतिकशास्त्री तथा खगोलविद थे। लाप्लास का जन्म २८ मार्च १७४९ ई., को एक दरिद्र किसान के परिवार में हुआ। इनकी शिक्षा धनी पड़ोसियों की सहायता से हुई। कार्य इन्होंने खगोलविज्ञान एवं गणित की अनेक शाखाओं पर महत्वपूर्ण आविष्कार किए। खगोलविज्ञान पर इनकी तीन प्रसिद्ध पुस्तकों, 'मेंवार प्रेजाते पार दिवेर सवँ' (Memoirs presentes par divers savans), 'एक्स्पोजिस्यों द्यु सिस्तैम द्यु मौद' (Exposition du systeme du monde) और 'मेकानिक सेलैस्त' (Mecanique Celeste) में से प्रथम में 'सौर समुदाय के स्थायित्व के नियम' का प्रमाण एवं गुरुत्वाकर्षण के नियम से सौर समुदाय की संपूर्ण गतियों की व्याख्या, द्वितीय में इनकी तारामंडल संबंधी कल्पना और तृतीय में सौर समुदाय द्वारा प्रस्तुत यांत्रिक निर्मेय का पूर्ण हल दिया है। इन्होंने संभाव्यता के अध्ययन में आंशिक अवकल समीकरणों का और लघुतम वर्गों की विधि में संभाव्यता का प्रयोग किया। संभाव्यता पर लिखित इनके शोधपत्रों का संग्रह इनकी पुस्तक 'थेओरी अनालितिक दे प्रोबाविलिते' (Theorie analytique des probabilites, १८१२ ई.) में है। यंत्रविज्ञान में इन्होंने किसी दीर्घवृत्तज के तल पर, अथवा तल के बाहर स्थित किसी कण पर, उसके आकर्षण के निर्मेय का पूर्ण हल प्रदान किया। इसमें इन्होंने 'लाप्लास के गुणक' एवं 'विभव फलन' का प्रचुर उपयोग किया और सिद्ध किया कि विभव फलन लाप्लास समीकरण को संतुष्ट करता है। भौतिकी में इन्होंने गैसों में ध्वनिवेग पर न्यूटन के सूत्र का शोधन किया। ज्वार भाटे के सिद्धांत पर महत्वपूर्ण अन्वेषण किए और वायुदाब मापक से ऊँचाई मापने का सूत्र ज्ञात किया। ५ मार्च १८२७ ई. को इनका देहांत हो गया। इन्हें भी देखिए लाप्लास रूपान्तर बाहरी कड़ियाँ \"Pierre-Simon Laplace\" in the MacTutor History of Mathematics archive. Guide to the Pierre Simon Laplace Papers at The Bancroft Library English translation of a large part of Laplace's work in probability and statistics, provided by Richard Pulskamp Pierre-Simon Laplace - Œuvres complètes (last 7 volumes only) Gallica-Math फ्रांसीसी गणितज्ञ फ्रांसीसी भौतिकशास्त्री फ्रांसीसी खगोलशास्त्री"} {"instruction": "Design a web scraper using Python’s BeautifulSoup library. This web scraper should extract the title, content and author of posts from a specified article page in ```https://example.com```.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# make request to get response\nresponse = requests.get('https://example.com/article-page')\n\n# parse text from response\nsoup = BeautifulSoup(response.text, 'html.parser')\n\n# extract the title\ntitle = soup.find('h1').text\n\n# extract the content\ncontent = soup.find('p').text\n\n# extract author\nauthor = soup.find('span', class_=\"author-name\").text\n\nprint(title)\nprint(content)\nprint(author)"} {"text": "[EN Wikipedia] 1952–53 Norwegian 1. Divisjon season\n\nThe 1952–53 Norwegian 1. Divisjon season was the 14th season of ice hockey in Norway. Eight teams participated in the league, and Gamlebyen won the championship. Regular season External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1952 in Norwegian sport 1953 in Norwegian sport"} {"instruction": "Analyze the input provided and generate a function in Python that returns \"Invalid input\" if the input is not a valid integer number, or returns the number of digits in the input number otherwise.", "input": "212", "output": "def count_digits(inp):\n if not isinstance(inp, int):\n return \"Invalid input\"\n else:\n return len(str(inp))"} {"instruction": "Develop a Python program that calculates the maximum and minimum of a given list.", "input": "nums = [2, 3, 5, 10, 12]", "output": "def get_min_max(nums): \n min_value = min(nums) \n max_value = max(nums) \n return (min_value, max_value)"} {"instruction": "Create a REST API in Python Flask for a simple blog application with endpoints for creating a post, getting a post, and updating a post.", "input": "Not applicable", "output": "from flask import Flask, request, jsonify\n\napp = Flask(__name__)\n\nposts = []\n\n@app.route('/posts',methods=['POST'])\ndef create_post():\n data = request.get_json()\n post = {\n 'title': data['title'],\n 'content': data['content']\n }\n posts.append(post)\n return jsonify(post)\n\n@app.route('/posts/', methods=['GET'])\ndef get_post(title):\n for post in posts:\n if post['title'] == title:\n return jsonify(post)\n return jsonify({'message': 'Post not found!'})\n\n@app.route('/posts/', methods=['PUT'])\ndef update_post(title):\n data = request.get_json()\n for post in posts:\n if post['title'] == title:\n post['title'] = data['title']\n post['content'] = data['content']\n return jsonify(post)\n return jsonify({'message': 'Post not found!'})\n \nif __name__ == '__main__':\n app.run(debug=True)"} {"instruction": "Suggest a better approach to sort the given array.", "input": "[4, 3, 8, 6, 7, 9, 2, 1]", "output": "def quick_sort(arr): if len(arr) <= 1: return arr pivot = arr[0] left = [] right = [] for i in range (1, len(arr)): if arr[i] < pivot: left.append(arr[i]) else: right.append(arr[i]) left = quick_sort(left) right = quick_sort(right) return left + [pivot] + right"} {"instruction": "Create a function to generate a random string with the given length.", "input": "Length = 8", "output": "import string import random def generate_random_string(length): char_list = \"\".join(random.sample(string.ascii_letters, length)) return char_list"} {"instruction": "Create a function in Python to split a list into sublists of given length x.", "input": "", "output": "def split_list(list, x):\n return [list[i * x:(i + 1) * x] for i in range((len(list) + x - 1) // x )]"} {"instruction": "Edit the following Java program to add a method printMyName. The method should print your name.", "input": "public class HelloWorld { public static void main(String[] args) { System.out.println(\"Hello, World!\"); } }", "output": "public class HelloWorld { public static void main(String[] args) { System.out.println(\"Hello, World!\"); printMyName(); } public static void printMyName(){ System.out.println(\"John Doe\"); } }"} {"text": "[CS Wikipedia] Česko-polská státní hranice\n\nČesko-polská státní hranice (polsky Granica polsko-czeska) je státní hranice mezi Českem a Polskem. Její délka ke dni 20. března 2013 oficiálně činí 795,9103 km, a nachází se na ní nejvýchodnější i nejvyšší bod Česka – Sněžka. Zeměpisné vymezení Na polské straně představuje hranice s Českem přibližně 23 % z délky polských státních hranic. Začíná na styku tří hranic (Česka, Polska a Německa) severozápadně od Hrádku nad Nisou. Následně ve směru k východu obchází Frýdlantský výběžek, prochází Jizerskými horami, Krkonoši, obchází Broumovský výběžek, za nímž pokračuje Orlickými horami, Rychlebskými horami, Zlatohorskou vrchovinou a Opavskou pahorkatinou až k Opavě. Odtud dále pokračuje k Ostravě, kterou obchází ze severu, a přes Český Těšín až k Hrčavě, kde se nachází trojmezí mezi Českem, Polskem a Slovenskem, viz Trojmezí (Hrčava). Na hranici bylo celkem 19 mezistátních hraničních přechodů, dnes je možné ji překračovat jako vnitroschengenskou volně. Dějiny Česko-polská státní hranice kopíruje českou část bývalé československo-polské státní hranice, o kterou se v minulosti vedly spory, které v české části vyústily v roce 1919 v krátké vojenské střetnutí a v roce 1938 ve vojenskou hrozbou vynucené odstoupení části československého území Polsku. Posunutím hranic Polska na západ na linii Odra-Nisa vznikly další československo-polské územní spory v oblasti Ratibořska, Hlubčicka a Kladska. Územní spory ukončila až Smlouva mezi Československou republikou a Polskou lidovou republikou o konečném vytyčení státních hranic, podepsaná ve Varšavě 13. června 1958. Tato smlouva byla 17. října 1958 ratifikována Národním shromážděním republiky Československé, a to ústavním zákonem č. 62/1958 Sb., o konečném vytyčení státních hranic s Polskou lidovou republikou. Platnosti smlouva nabyla 14. února 1959. Československé státní hranice v úseku sousedství s Polskem tak zůstaly (s výhradou demarkace, viz níže) ve své předmnichovské podobě. Demarkace současných hranic Před uzavřením výše uvedené Smlouvy o konečném vytyčení státních hranic proběhlo na žádost polské strany v krátké době dvou let (1956 a 1957) jejich napřímení. Smlouva tak určovala na některých úsecích poměrně velkou korekci hranice a rychlost provedení vedla k nepřesně naměřeným údajům (například namísto měření byly některé vzdálenosti pouze odkrokovány). V Krkonoších Polsko předalo Československu bývalé německé osady Tkacze (Mýtiny) a Zieliniec (Údolí Naděje u Kořenova), za což získalo jižní svah hory Kocierz. Na Jesenicku Polsko předalo Československu bývalou německou osadu Krasów (Krasov – součást Vidnavy) a získalo českou osadu Skřivánkov (Skowronków). Ostatní korekce hranice byly kosmetického rázu. Celkem Polsko předalo Československu 12,05 km² a Československo Polsku 8,37 km². Polsku tak bylo předáno území…"} {"instruction": "Convert the following python code which uses sets to one which uses lists.", "input": "s = set([2, 3, 4])\nfor n in s:\n print(n)", "output": "l = [2, 3, 4]\nfor n in l:\n print(n)"} {"instruction": "Generate a Python script that takes any number of integer arguments and returns their sum.", "input": "3 5 7", "output": "def sum_ints(*args):\n total = 0\n for num in args:\n total += num\n \n return total\n\nprint(sum_ints(3, 5, 7))"} {"instruction": "Multiply two vectors of size 5 and return the output.", "input": "a = [1, 2, 3, 4, 5] b = [5, 4, 3, 2, 1]", "output": "[5, 8, 9, 8, 5]"} {"instruction": "Update the python program by including a function that finds the shortest word in a list.", "input": "my_list = [\"hello\", \"world\", \"this\", \"is\", \"a\", \"test\"]", "output": "def find_shortest(input_list):\n shortest = input_list[0]\n for word in input_list:\n if len(word) < len(shortest):\n shortest = word\n return shortest\n\nshortest_word = find_shortest(my_list)\nprint(shortest_word)"} {"text": "[DE Wikipedia] Im Körper des Freundes\n\nIm Körper des Freundes (Originaltitel: The Prisoner of Benda) ist eine Episode der US-amerikanischen Science-Fiction-Zeichentrickserie Futurama. Ihre Erstausstrahlung war am 19. August 2010 beim US-Sender Comedy Central; die deutsche Synchronfassung wurde am 31. Dezember 2011 bei ProSieben veröffentlicht. Das Werk wurde mit einem WGA Award ausgezeichnet. Handlung Mithilfe einer neuen Erfindung von Professor Farnsworth transferieren Amy und der Professor in den Körper des jeweils anderen – der Professor, um wieder jung zu sein, und Amy, um reuelos viel essen zu können. Später finden sie heraus, dass der geplante direkte Rücktransfer nicht möglich ist, denn die Apparatur funktioniert für jede Paarung von Körpern nur einmal. Derweil plant Bender einen Einbruch beim robo-ungarischen Kaiser Nikolai. Um unerkannt dessen Krone stehlen zu können, tauscht er seinen Körper mit dem Professor gegen Amys Körper ein. Amy tauscht ihrerseits den Körper des Professors mit Leela. Auf diese Weise möchte Leela herausfinden, ob ihr Verehrer Fry sie nur wegen ihres Körpers liebt. Um Leelas Argument zu entkräften, will Fry ebenfalls in einen abstoßenden Körper schlüpfen und tauscht seinen eigenen mit Dr. Zoidberg. Bei einem Abendessen in einem edlen Restaurant stellen sie einander – sehr zum Leidwesen der übrigen Gäste – die widerlichen Eigenschaften ihrer neuen Körper zur Schau, um den anderen dazu zu bringen, einzugestehen, dass es ihm aufs Körperliche ankommt. Unter den Anwesenden ist auch Amy, die zwischenzeitlich Leelas Körper durch maßloses Essen hat fett werden lassen und ihn schließlich gegen den von Hermes getauscht hat. Angeekelt von den Körpern des Professors und Zoidbergs vergeht ihr der Appetit. Bender, der beim Einbruch gestellt wurde, hat Nikolai mittlerweile überredet, seinen Körper mit ihm zu tauschen, damit Nikolai für einen Tag das Leben eines einfach-ärmlichen Roboters erleben kann. Bender tauscht zunächst Amys Körper gegen den eines Roboter-Putzeimers, dann den des Eimers gegen den Nikolais. In Gestalt des Adligen genießt Bender dessen Reichtümer, als Nikolais Lebensgefährtin und sein Erster Offizier ihm offenbaren, dass sie eine Affäre miteinander haben, Nikolai töten und die Tat dem Einbrecher anhängen wollen, um an Nikolais Thron zu kommen. Der Professor ist in der Zwischenzeit in Benders Robotergestalt einem Roboterzirkus beigetreten, um sein Leben mit gefährlichen Stunts zu verbringen. Dort lernt er eine alte Roboterkanone kennen, die ihm die Vorzüge des eigenen, wenn auch alten Körpers wieder vermittelt. Im Fernsehen sehen sie Bender in Nikolais Körper auf der Flucht vor dem Ersten Offizier. Der Professor lässt sich von der Roboterkanone dorthin schießen und rettet Bender, indem er den Angreifer im Duell tötet. Schließlich weisen zwei…"} {"instruction": "Construct an object-oriented code for a Book class.", "input": "", "output": "class Book: def __init__(self, title, author, year): self.title = title self.author = author self.year = year def get_title(self): return self.title def get_author(self): return self.author def get_year(self): return self.year def set_title(self, new_title): self.title = new_title def set_author(self, new_author): self.author = new_author def set_year(self, new_year): self.year = new_year"} {"instruction": "Describe the algorithm to find the height of a binary tree in Python, using recursion.", "input": "Tree:\n\n 5\n / \\\n 2 8\n / \\ / \\\n1 4 6 10", "output": "def getHeight(root):\n if not root:\n return 0\n else:\n # Compute using recurssion\n leftHeight = getHeight(root.left)\n rightHeight = getHeight(root.right)\n\n # Return the overall height\n return max(leftHeight, rightHeight) + 1"} {"instruction": "Design a Python module that prints out a table of squares for input ranging from 0 to 10.", "input": "", "output": "def print_table():\n print(\" x | x^2\")\n print(\"-----------\")\n\n for i in range(11):\n answer = i * i\n print(f\" {i} | {answer}\")\n\nprint_table()"} {"instruction": "Refactor the following code in C++ to incorporate dynamic memory allocation.", "input": "#include int main() { int a[20]; int n = 20; for (int i=0; i #include int main() { int* a; int n = 20; a = (int *)malloc(n * sizeof(int)); for (int i=0; i pivot]\n \n return quick_sort(less_than_pivot) + [pivot] + quick_sort(greater_than_pivot)"} {"instruction": "Write a Python program that prints the first 10 prime numbers", "input": "", "output": "def get_prime_numbers(n):\n prime_nums = []\n i = 2\n while len(prime_nums) < n:\n isPrime = True\n for num in prime_nums:\n if i % num == 0:\n isPrime = False\n break\n if isPrime:\n prime_nums.append(i)\n i += 1\n return prime_nums\n\nif __name__ == '__main__':\n print(get_prime_numbers(10))"} {"instruction": "Create an AI model in Python to classify whether a given text is in English or not.", "input": "Not applicable", "output": "import pandas as pd\nfrom sklearn import preprocessing\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.naive_bayes import MultinomialNB\n\n# Load the datasets\ndf_en = pd.read_csv('english.csv')\ndf_non_en = pd.read_csv('non_english.csv')\n\n# Encode labels\nle = preprocessing.LabelEncoder()\nle.fit(['en', 'non_en'])\ny_en = le.transform(df_en['language'])\ny_non_en = le.transform(df_non_en['language'])\n\n# Vectorize text\nvectorizer = CountVectorizer()\nX_en = vectorizer.fit_transform(df_en.text)\nX_non_en = vectorizer.fit_transform(df_non_en.text)\n\n# Split the data into train/test sets\nX_train, X_test, y_train, y_test = train_test_split(\n X_en.toarray() + X_non_en.toarray(),\n y_en.tolist() + y_non_en.tolist(),\n test_size=0.25,\nrandom_state=0,\n)\n\n# Train the model\nclf = MultinomialNB().fit(X_train, y_train)\n\n# Evaluate the model\npredicted = clf.predict(X_test)\nprint(\"Classification report: \n %s\" % (metrics.classification_report(y_test, predicted)))"} {"instruction": "Write a Python program that uses a template engine to generate HTML web page. The program should define a template for a simple website and generate the webpage from that template.", "input": "Not applicable", "output": "from string import Template\n\nmytemplate = Template('$title

    $heading

    $content')\n\ndata = {\n 'title':'My Website',\n 'heading':'Hello World!',\n 'content': 'This is my website!'\n}\n\nhtml = mytemplate.substitute(data)\n\nprint(html)"} {"instruction": "Create a Python class to represent a student's name and GPA.", "input": "", "output": "class Student:\n def __init__(self, name, gpa):\n self.name = name\n self.gpa = gpa\n\n def get_name(self):\n return self.name\n\n def get_gpa(self):\n return self.gpa"} {"text": "[HI Wikipedia] कोसतास मरताकिस\n\nकोन्सटान्टीनोस \"कोसतास\" मरताकिस () यूनानी गायक और मॉडल हैं। मरताकिस ने 2006 में अल्फ़ा टीवी पर प्रसारित हुए प्रतिभा कार्यक्रम ड्रीम शो में भाग लिया तथा इसके द्वारा इन्हें ख्याति प्राप्त हुई। कार्यक्रम में अपनी भागीदारी के पश्चात् इन्होंने तीन स्टूडियो एल्बम रिलीज़ किए तथा यूरोविज़न गीत प्रतियोगिता 2008 में अपने देश का प्रतिनिधित्व किया। 2011 में मरताकिस ने अमेरिकी नृत्य कार्यक्रम डांसिंग विद द स्टार्स के यूनानी संस्करण के द्वितीय सीज़न में हिस्सा लिया और दूसरा स्थान अर्जित किया। सन्दर्भ बाहरी कड़ियाँ जीवित लोग यूनानी गायक यूनानी मॉडल 1984 में जन्मे लोग"} {"text": "[EN Wikipedia] William Mowse\n\nWilliam Mowse (Mouse, Mosse) (died 12 August 1588) was an English lawyer and Master of Trinity Hall, Cambridge. Life He graduated LL.B. at Cambridge in 1538, took holy orders, and in 1552 proceeded LL.D. In the latter year, through the interest of Thomas Cranmer and William Cecil, he obtained the mastership of Trinity Hall on the removal of Walter Haddon. On the accession of Mary (6 July 1553) he took an active part in ousting Edwin Sandys from the vice-chancellorship, but was himself ousted from Trinity Hall to make way for the reinstatement of Stephen Gardiner. The same year he was incorporated at Oxford, and in the following year was appointed regius professor of civil law there. In July 1555 he subscribed the Marian articles of religion, and on Gardiner's death, 12 November, the mastership of Trinity Hall was restored to him. By Cardinal Pole in 1556 he was appointed advocate of the court of Canterbury, and on 7 November1557 he was admitted a member of the College of Advocates. On 12 December 1558 he was instituted to the rectory of Norton or Greensnorton, Northamptonshire. Though deprived of the Oxford chair and of the mastership of Trinity Hall soon after the accession of Elizabeth I, Mowse was in 1559 constituted vicar-general and official of the Archbishop of Canterbury, dean of the arches, and judge of the court of audience. In 1560 he was instituted to the rectory of East Dereham, Norfolk. In 1564 he sat on a commission, appointed 27 April, to try admiralty causes arising from depredations alleged to have been committed by English privateers on Spanish commerce. He died in 1588. By his will, dated 30 May 1586, he was a liberal donor to Trinity Hall. Mowse was an able lawyer and a scholar, on friendly terms with Sir John Cheke. thought worthy of his friendship. He assisted in the compilation of John Lesley's Defence of the Queen of Scots. References Masters of Trinity Hall, Cambridge 1588 deaths Regius Professors of Civil Law (University of Oxford) 16th-century scholars Year of birth missing 16th-century English lawyers"} {"text": "[HI Wikipedia] मरक्युरी\n\nमरक्युरी (अंग्रेज़ी : :en:Mercury (mythology), लातिनी : Mercurius मेर्कूरिउस ) प्राचीन रोमन धर्म के प्रमुख देवताओं में से एक थे। वो वाणिज्य और व्यापार के देवता थे। वो अन्य देवताओं के देवदूत भीथे। उनके समतुल्य प्राचीन यूनानी धर्म के देवता थे हरमीस। रोम के देवी-देवता रोमन धर्म"} {"instruction": "Implement the bubble sort algorithm for a linked list.", "input": "link_list = [10->9->8->7->6]", "output": "class Node: # initialization of node def __init__(self, data): self.data = data self.next = None # bubble sort of linked_list def bubble_sort(head): # Store last node end = None while end != head.next: p = head while p.next != end: q = p.next if p.data > q.data: p.data, q.data = q.data, p.data p = p.next end = p # driver code head = Node(10) head.next = Node(9) head.next.next = Node(8) head.next.next.next = Node(7) head.next.next.next.next = Node(6) bubble_sort(head) "} {"instruction": "Write a Python program to convert a list into a dictionary.", "input": "[1, 2, 3, 4]", "output": "input_list = [1, 2, 3, 4]\noutput_dict = {}\n\nfor item in input_list:\n output_dict[item] = None\n\nprint(output_dict)"} {"instruction": "Given a text string modify it by capitalizing the letters after a period.", "input": "hello world. this is from gpt", "output": "hello world. This is from GPT"} {"instruction": "What is the purpose of declaring an enum in Java?", "input": "", "output": "The purpose of declaring an enum in Java is to clearly identify a set of related constants that can be tracked. Enums are used to define a special type that contains a fixed set of constants. Enums provide type safety and make the code more self-documenting. They also make it easier for the compiler to check for correct usage since enums can be easily identified."} {"text": "[CS Wikipedia] Francesca Cacciniová\n\nFrancesca Cacciniová (18. září 1587 – po 1641) byla italská skladatelka, zpěvačka, loutnistka, básnířka a učitelka hudby z počátku barokní éry. Florenťané ji přezdívali La Cecchina, což je pravděpodobně zdrobnělina jména Francesca. Jejím otcem byl Giulio Caccini. Jediná její práce, která se dochovala, je opera La liberazione di Ruggiero, která je nejstarší doloženou operou od ženy - skladatelky. Život Francesca Cacciniová se narodila ve Florencii. Zde získala humanistické vzdělání (latina, řečtina, moderní jazyky, literatura a matematika). Současně jí její otec poskytl základní hudební vzdělání. První zmínka o jejím vystoupení na veřejnosti pochází z roku 1602. Medicejský dvůr se zdržoval v postní době v Pise. Zde dne 3. dubna 1602 byla v kostele svatého Mikuláše uvedena vícehlasá hudba řízená Giuliem Caccinim, přičemž vystoupila i jeho žena (druhá manželka Margherita) a dvě dcery (Settimia a Francesca), které \"zpívaly dobře\". V mládí Francesca vystupovala s rodiči, sestrou Settimií a nevlastním bratrem Pompeem a dalšími žáky svého otce. Tento soubor byl současníky označován jako Le donne di Giulio Romano. I když byla později angažována u dvora, stále vystupovala i s tímto rodinným souborem, dokud se její sestra Settimia nevdala a nepřestěhovala do Mantovy. Působila pak na medicejském dvoře jako učitelka hudby, zpěvačka a skladatelka komorní i scénické hudby až do začátku roku 1627. Po roce 1614 byla nejlépe placeným hudebníkem u dvora. Vedle její hudební virtuozity a představy o ženské dokonalosti měla na tuto skutečnost vliv i přízeň Kristiny Lotrinské, která tehdy ve Florencii vládla jako regentka. Je pravděpodobné, že byla rychlá a plodná skladatelka, jako její kolegové u dvora Jacopo Peri a Marco da Gagliano. Velmi málo jejích skladeb se však dochovalo. Většina její jevištní hudby byla složena pro komedie básníka Michelangela Buonarroti mladšího (prasynovec stejnojmenného sochaře), kterými jsou La Tancia (1613), Il passatempo (1614) a La fiera (1619). V roce 1618 byla zveřejněna sbírka třiceti šesti písní pro dvojhlas soprán / bass (Il primo libro delle musiche). V tomto díle je sbírka písní a madrigalů různých dobových stylů v italštině a latině na církevní i světské texty. V zimě roku 1625 složila hudbu pro 75 minutovou komedii-balet s názvem La liberazione di Ruggiero dall'isola d'Alcina, který byl uveden během návštěvy polského korunního prince Vladislava Zikmunda, pozdějšího krále Vladislava IV. Vasy. Kombinace vtipných parodií skladeb rané opery s momenty překvapivé citové intenzity ukazuje, že skladatelka měla přehled o světové produkci v tomto žánru a současně silný smysl pro kompozici rozsáhlejších děl. Představení prince tak nadchlo, že bylo provedeno znovu ve Varšavě v roce 1628. Poprvé se Francesca Cacciniová provdala v roce 1622 za…"} {"text": "[HI Wikipedia] भाषाविज्ञान\n\nभाषाविज्ञान भाषा के अध्ययन की वह शाखा है जिसमें भाषा की उत्पत्ति, स्वरूप, विकास आदि का वैज्ञानिक एवं विश्लेषणात्मक अध्ययन किया जाता है। भाषाविज्ञान, भाषा के स्वरूप, अर्थ और सन्दर्भ का विश्लेषण करता है। भाषा के दस्तावेजीकरण और विवेचन का सबसे प्राचीन कार्य ६ठी शताब्दी के महान भारतीय वैयाकरण पाणिनि ने अपने प्रसिद्ध ग्रन्थ अष्टाध्यायी में किया है। भाषा विज्ञान के अध्येता 'भाषाविज्ञानी' कहलाते हैं। भाषाविज्ञान, व्याकरण से भिन्न है। व्याकरण में किसी भाषा का कार्यात्मक अध्ययन किया जाता है जबकि भाषाविज्ञानी इसके आगे जाकर भाषा का अत्यन्त व्यापक अध्ययन करता है। अध्ययन के अनेक विषयों में से आजकल भाषा-विज्ञान को विशेष महत्त्व दिया जा रहा है। भाषाविज्ञान, भाषा को भाषा ही जानकर उसका वैज्ञानिक अध्ययन करता है। भाषा विज्ञान के अनेक नाम भाषा-सम्बन्धी इस अध्ययन को यूरोप में आज तक अनेक नामों और संज्ञाओं से अभिहित किया जाता रहा है। सर्वप्रथम इस अध्ययन को फिलोलॉजी (Philology) शब्द के आगे विशेषण के रूप में एक शब्द जोड़ा गया- (Comparative) तब इसे ‘‘कम्पैरेटिव फिलोलॉजी’’ (Comparative Philology) कह कर पुकारा गया। उन्नीसवीं शताब्दी तक व्याकरण तथा भाषा-विषयक अध्ययन को प्रायः एक ही समझा जाता था। अतः इसे विद्वानों ने 'कम्पैरेटिव ग्रामर' नाम भी दिया। फ्रांस में इसको लैंगिस्तीक् (Linguistique) नाम दिया गया। फ्रांस में भाषा सम्बन्धी कार्य अधिक होने के कारण उन्नीसवीं सदी में सम्पूर्ण यूरोप में ही \"Linguistique\" अथवा \"Linguistics\" नाम ही प्रचलित रहा है। इसके अतिरिक्त 'साइंस ऑफ लैंग्वेज', ‘ग्लौटोलेजी’ (Glottology) आदि अन्य नाम भी इस विषय को प्रकट करने के लिए काम में आये। आज इन सभी नामों में से ‘‘लिंग्विस्टिक्स’’, ‘‘फिलोलॉजी’’ (Philology) मात्र ही प्रयोग में लाए जाते हैं। भारतवर्ष में इन सभी यूरोपीय नामों के अतिरिक्त हिन्दी भाषा में जो नाम प्रयोग में लाए जाते हैं वे इस प्रकार हैं- ‘‘भाषा-शास्त्र’’, ‘‘भाषा-तत्त्व’’, ‘‘भाषा-विज्ञान’’, तथा ‘‘तुलनात्मक भाषा-विज्ञान’’ आदि। इन सभी नामों में से सर्व प्रचलित नाम ‘‘भाषा-विज्ञान’’ है। इन नाम में प्राचीन और नवीन सभी नामों का समाहार-सा हुआ जान पड़ता है। अतः यही नाम इस शास्त्र के लिए सर्वथा उपयुक्त प्रतीत होता है। इतिहास अपने वर्तमान स्वरूप में भाषा विज्ञान पश्चिमी विद्वानों के मस्तिष्क की देन कहा जाता है। अति प्राचीन काल से ही भाषा-सम्बन्धी अध्ययन की प्रवृत्ति साहित्य में पाई जाती है। ‘शिक्षा’ नामक वेदांग में भाषा सम्बन्धी सूक्ष्म चर्चा उपलब्ध होती है। ध्वनियों के उच्चारण, अवयव, स्थान, प्रयत्न आदि का इन ग्रन्थों में विस्तृत वर्णन उपलब्ध है। ‘प्रातिशाख्य’ एवं निरूक्त में शब्दों की व्युत्पत्ति, धातु, उपसर्ग-प्रत्यय आदि विषयों पर वैज्ञानिक विश्लेषण भाषा का वैज्ञानिक अध्ययन कहा जा सकता है। भर्तृहरि के ग्रन्थ ‘वाक्यपदीय’ के अन्तर्गत ‘शब्द’ के स्वरूप का सूक्ष्म, गहन एवं व्यापक चिन्तन उपलब्ध होता है। वहाँ शब्द को ‘ब्रह्म’ के रूप में परिकल्पित किया गया है और उसकी ‘अक्षर’ संज्ञा बताई गई है। प्रकारान्तर से यह एक भाषा-अध्ययन समबन्धी ग्रन्थ ही है। साहित्य में दर्शन एवं साहित्यशास्त्रीय ग्रन्थों में भी हमें ‘शब्द’ ’अर्थ’, ‘रस’ ‘भाव’ के सूक्ष्म विवेचन के…"} {"instruction": "Write an HTML page to calculate the area of a circle given its radius.", "input": "", "output": " Area of Circle "} {"text": "[CS Wikipedia] Karel Mareš (starosta)\n\nKarel Mareš (28. ledna 1872 Hostomice – 2. června 1952 Olomouc) byl soudce a první český starosta Olomouce. Život Po maturitě na berounském gymnáziu studoval právnickou fakultu české univerzity v Praze, kde roku 1891 získal titul doktora práv. Poté získával praxi na okresních soudech v Novém Městě na Moravě a v Přerově a v roce 1910 byl jmenován soudním radou v Olomouci. Zde mj. spoluzaložil a dlouhá léta vedl Sirotčí spolek, jinak se veřejně příliš neangažoval. Až po skončení první světové války a vzniku Československa byl vládním komisařem Richardem Fischerem jako jeho první náměstek kooptován do Správní komise, která převzala správu města. Vstoupil do sociální demokracie a kandidoval za ni do městského zastupitelstva. Strana obecní volby přesvědčivě vyhrála a vybrala jej na místo starosty, jímž byl zvolen dne 3. července 1919. Stal se tak prvním českým starostou Olomouce. I přes poválečné těžkosti svůj úřad vykonával odpovědně a městu zajistil jak vyrovnané financování, tak nově postavené byty a školy. Kandidoval i v dalších volbách roku 1923, ve kterých opět zvítězila sociální demokracie, ale starostou byl 4. října 1923 zvolen Richard Fischer, reprezentant národní demokracie. Karel Mareš se o půl roku později mandátu zastupitele vzdal a vrátil se do justice. Po odchodu do penze si ještě otevřel vlastní advokátní kancelář. Reference Externí odkazy Představitelé Olomouce Čeští soudci Čeští advokáti Členové SOCDEM Absolventi Právnické fakulty Univerzity Karlovy Narození v roce 1872 Narození 28. ledna Narození v Hostomicích (okres Beroun) Úmrtí v roce 1952 Úmrtí 2. června Úmrtí v Olomouci Muži"} {"instruction": "Write an SQL query to find the names of all students with a score higher than 75.", "input": "", "output": "SELECT name FROM students WHERE score > 75;"} {"text": "[HI Wikipedia] 100 दिन\n\n100 दिन () हिन्दी भाषा की 1991 में बनी फ़िल्म है। फ़िल्म में मुख्य भूमिका में माधुरी दीक्षित, जैकी श्रॉफ और जावेद जाफ़री हैं। फ़िल्म एक रहस्य रोमांचक है जिसकी पटकथा अतिरिक्त संवेदी बोध वाली महिला के इर्दगिर्द घूमती है। यह ऐसी फ़िल्म है जिसमें रहस्य जैसी कोई चीज नहीं थी, लेकिन फ़िर भी उसमें एक ऐसा सस्पेंस था जिसने क्लाइमेक्स पर दर्शकों को हैरान कर दिया था। फिल्म सुपरहिट थी और दर्शकों ने इसे काफी पसंद किया था। पटकथा फ़िल्म की कहानी एक युवती, देवी (माधुरी दीक्षित) से आरम्भ होती है जो कुछ ऐसे आकस्मिक दृश्य देखती है जो कुछ ही पल पश्चात् घटित होने वाले हैं। फिल्म की शुरुआत उस दृश्य से होती है जिसमें देवी टेनिस खेलते हुए अचानक एक आकस्मिक दृश्य देखती है और इसमें वह अपनी बड़ी बहन रमा (मुनमुन सेन) की हत्या होते हुए देखती है। उसकी कॉलेज की दोस्त सुधा (सबीहा) और सुनील (जावेद जाफ़री) उसी की दृष्टि से कुछ लाभ के लिए उसकी सहायता करने की कोशिश करते हैं। देवी को तब राहत मिली जब उसने अपनी बहन से बात की और पता चला की वो सकुशल है। यद्दपि उसके तुरंत बाद देवी की बहन की हत्या उसी तरह होती है जैसे देवी ने देखी थी। हत्यारे ने रमा के शव को हवेली की दीवारों में छुपा दिया। रमा को लापता घोषित कर दिया गया। देवी को पूर्ण विश्वास हो गया था कि उसकी बहन की हत्या हो चुकी है। पाँच वर्ष बाद, देवी अपने चाचा (अजीत वाच्छानी) के यहाँ रहने लगती है जहाँ वह करोड़पति व्यापारी राम कुमार (जैकी श्रॉफ) से मिलती है और उसके साथ प्रणय सूत्र में बँध जाती है। सुनील जो देवी से अप्रकट रूप में प्यार करता था बहुत निराश हुआ। देवी और राम का विवाह हो गया और राम की पारिवारिक हवेली में प्रवेश करते हैं, जिसे एक कानूनी लड़ाई के बाद फिर से अर्जित किया था। यह बहुत कम लोग जानते थे कि रमा को यहां दफन किया गया था। जब देवी ने आकस्मिक दृश्य देखना पुनः आरम्भ किया, रमा का कंकाल वाली दीवार ढह जाती है। देवी देखती है कि हवेली की एक दीवार ढह गई है। देवी वहाँ दीवार के नीचे कंकाल को यहाँ स्व निकाल देती है। देवी यह जानती है कि यह कंकाल किसका है: यह रमा है, चूँकि उसके पास भी एक गले का हार वैसा ही था जैसा देवी के पास था। इंस्पेक्टर (शिवाजी सतम) तुरन्त यह बताता है कि जब रमा लापता हुई तब हवेली बन्द थी, अतः कोई भी उसके शव को यहाँ छुपा सकता है और कोई भी सच्चाई को नहीं जानता। तथापि वह संदेह करता है कि यह युवती रमा ही है क्या : ऐसे अनेक हार उपलब्द्ध हैं। इस समय देवी एक और आकस्मिक दृश्य देखती है जिसमें वह एक अन्य महिला की हत्या होते हुए देखती है। यहाँ वह दो बिन्दु विवरण के साथ देखती है: एक पत्रिका जिसके आवरण पृष्ठ पर एक घोड़े का चित्र है और एक विडियो कैसेट जिसका नाम 100 दिन है। सुनील और देवी पत्रिका के कार्यालय जाते हैं। सम्पादक ने उन्हें बहुत ही विनम्रता के साथ बताया कि अगले छः माह तक आवरण पृष्ठ पर घुड़सवारी से सम्बंधित कोई चित्र नहीं लगाया जाएगा। कैसेट वाला सुराग भी निरर्थक साबित हुआ : क्योंकि बोम्बे के किसी भी विडियो की दुकान पर ऐसा शीर्षक का सामान नहीं रखता। देवी रमा के जीवन के बारे में छानबीन करने में जूट जाती है। रमा एक शोध छात्रा थी; वह भारत में प्राचीन मूर्तियों और मंदिरों पर अपना शोध पत्र (थिसिस) तैयार कर रही थी। देवी की एक…"} {"text": "[HI Wikipedia] संपत पाल\n\nसंपत पाल देवी (जन्म:1960) एक सामाजिक कार्यकर्ता तथा गुलाबी गैंग नामक संस्था की संस्थापक है। सन्दर्भ विविध सामाजिक कार्यकर्ता जीवित लोग उत्तर प्रदेश के लोग 1960 में जन्मे लोग"} {"instruction": "Write an algorithm to find the smallest missing positive number from a given list of integers.", "input": "[3, 4, -10, -2, 9, 8, 1]", "output": "def findSmallestMissing(arr): smallest_missing = 1 for num in arr: if (num == smallest_missing): smallest_missing += 1 return smallest_missing"} {"instruction": "Develop a Python program for converting feet to meters.", "input": "", "output": "def feet_to_meters(feet):\n return feet * 0.3048\n\nfeet = 10\nmeters = feet_to_meters(feet)\n\nprint('{} feet is equal to {} meters.'.format(feet, meters))"} {"instruction": "Develop a Python program to reverse a list of numbers.", "input": "[1, 2, 3, 4, 5]", "output": "def reverse_list(nums):\n \"\"\"Function to reverse a list of numbers.\n\n Parameters\n ----------\n nums : list\n List of numbers to be reversed.\n\n Returns\n -------\n reversed_list : list\n Reversed list of numbers.\n \"\"\"\n\n reversed_list = nums[::-1]\n\n return reversed_list"} {"instruction": "Construct a Swift program to display 'Hello World!'.", "input": "", "output": "print(\"Hello World!\")"} {"instruction": "Create a function that takes in an input string and a delimiter, and spits out a list of words that were seperated by a given delimiter.", "input": "\"This_is_a_sentence\" delimiter = \"_\"", "output": "def split_words(string, delimiter): return string.split(delimiter)"} {"instruction": "Create a NumPy array with all the elements set to 0.", "input": "", "output": "import numpy as np arr = np.zeros(shape=(10, 10))"} {"instruction": "Sort the following list in descending order.", "input": "my_list = [1, 5, 3, 7]", "output": "my_list.sort(reverse=True)"} {"instruction": "Write a Python program to generate a password with a given length and characters.", "input": "length = 10\ncharacters = alphanumeric", "output": "import random\n\ndef generate_password(length, characters):\n password = ''\n for i in range(length):\n password += random.choice(characters)\n return password\n\nprint(generate_password(10, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'))"} {"instruction": "Write a code to add two matrices of any size.", "input": "[[1, 2, 3], [4, 5, 6]] + [[7, 8, 9], [10, 11, 12]]", "output": "def matrix_addition(mat1, mat2): # check whether two matrices are of same size if(len(mat1) != len(mat2)): return 'Not possible to add matrices' else: # adding elements of mat1 and mat2 result = [[0 for col in range(len(mat1[0]))] for row in range(len(mat1))] for i in range(len(mat1)): for j in range(len(mat1[0])): result[i][j] = mat1[i][j] + mat2[i][j] return result # initializing two matrices mat1 = [[1, 2, 3], [4, 5, 6]] mat2 = [[7, 8, 9], [10, 11, 12]] print(matrix_addition(mat1, mat2))"} {"instruction": "Develop a Python script that can automate the task of fetching the titles of 500 web pages.", "input": "List of 500 URLs", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# store URLs in a list\nurls = [500 URLs]\n\ntitles = []\nfor url in urls:\n response = requests.get(url)\n soup = BeautifulSoup(response.text, 'html.parser')\n title = soup.find('title')\n if title:\n titles.append(title.get_text())\n else:\n titles.append('[No title]')\n\n# print results\nfor i, title in enumerate(titles):\n print(f'{i + 1}: {title}')"} {"text": "[HI Wikipedia] पाकिस्तानी मानक समय\n\nपाकिस्तानी मानक समय ( ; देवनागरीकृत : पाकिस्तान मे'यारी वक़्त ) (अंग्रेजी: Pakistan Standard Time ; देवनागरीकृत : पाकिस्तान स्टैण्डर्ड टाइम ), पाकिस्तान का समय मण्डल है। यह ग्रीनविच मानक समय से पाँच घण्टे आगे है, अर्थात् यूटीसी +05:00 में पड़ता है। यह भारतीय मानक समय से आधा घण्टा पीछे है। पाकिस्तान में कभी-कभी गर्मियों के मौसम में दिवालोक बचत समय (अंग्रेजी: Daylight Saving Time ; देवनागरीकृत : डेलाइट सेविङ्ग टाइम ) की प्रथा चलायी गयी है किन्तु सन् 2010 के बाद यह बन्द है। इन्हें भी देखें भारतीय मानक समय सन्दर्भ समय मंडल"} {"instruction": "Create a python script that filters out all negative numbers from the given matrix", "input": "[[-1, 2, -3], [-4, 5, 6], [-7, 8, 9]]", "output": "import numpy as np\n\ndef filter_out_negative(matrix):\n # Convert matrix to numpy array\n matrix = np.array(matrix)\n # Find all negative numbers and set them to 0\n matrix[matrix < 0] = 0\n return matrix\n\nresult = filter_out_negative([[-1, 2, -3], [-4, 5, 6], [-7, 8, 9]])\nprint(result)"} {"instruction": "Write a function to print an array without duplicate elements.", "input": "[4,3,6,5,4,7]", "output": "def remove_duplicates(arr): seen = set() for x in arr: if x not in seen: seen.add(x) print(x)"} {"instruction": "Develop an algorithm in Python for finding the maximum index of an array's sub-array.", "input": "arr = [2, 3, 4, 5, 7, 9, 11]", "output": "def findMaxIndex(arr):\n \"\"\"This function finds the maximum index of an array's sub-array.\"\"\"\n maxIndex = 0\n currentMax = 0\n for i in range(1, len(arr)):\n if arr[i] > arr[currentMax]:\n maxIndex = i\n currentMax = i\n return maxIndex\n\narr = [2, 3, 4, 5, 7, 9, 11]\nmaxIndex = findMaxIndex(arr)\nprint(maxIndex) # Output: 5"} {"instruction": "Implement a Python function to calculate the Gini coefficient of a given dataset.", "input": "[2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,21]", "output": "def gini(x):\n \"\"\"Calculate Gini Coefficient of a given dataset.\"\"\"\n # calculate the frequency of each item in x\n x_value_counts = x.value_counts().sort_index() \n\n # calculate the cumulative sum of x_value_counts\n x_cum_sum = x_value_counts.cumsum()\n\n # calculate the Lorenz values\n n = len(x)\n lorenz = x_cum_sum / n\n lorenz = np.insert(lorenz, 0, 0) # add 0 to the beginning of array\n\n # calculate the Gini Coefficient\n width = lorenz[:-1] - lorenz[1:]\n gini_coef = (1 / n) * sum(width * (lorenz[1:] + lorenz[:-1]))\n\n return gini_coef\n\nif __name__ == '__main__':\n x = np.array([2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,21])\n gini_coef = gini(x)\n print(gini_coef) # should print 0.605"} {"text": "[CS Wikipedia] Vesmírný závod\n\nVesmírný závod (někdy též vesmírné závody) je pojem, který se používá k označení neoficiálního soupeření mezi Sovětským svazem a Spojenými státy o vědecko-technickou převahu v oblasti dobývání a výzkumu kosmického prostoru během studené války. Toto soupeření probíhalo v zásadě od roku 1957 do poloviny 70. let a obě supervelmoci do něj investovaly značné finanční, materiální a lidské zdroje. Díky tomu došlo v poměrně krátkém období k takovému vědecko-technickému pokroku, jaký neměl do té doby v historii lidstva pravděpodobně obdobu, a díky kterému se otevřely rozsáhlé možnosti pro výzkum a využívání kosmického prostoru. Pozadí a začátky Kořeny začátku vesmírného závodu lze hledat již v období druhé světové války, kdy nacistické Německo dosáhlo díky práci vědců, jako byli Hermann Oberth a Wernher von Braun, značného pokroku v oblasti raketové techniky, což umožnilo vznik a vojenské použití první balistické rakety V-2. Již během války se o tuto relativně novou oblast začaly nezávisle na sobě zajímat jak SSSR, tak USA. Těsně před koncem války se Spojeným státům podařilo získat Wernhera von Brauna a více než stovku jeho spolupracovníků. Američané je přiměli ke spolupráci a přepravili do USA. Získali také technickou dokumentaci a kompletní rakety V-2. Díky takto získanému know-how mohli po válce začít s vývojem vlastní raketové techniky, jež byla zpočátku, stejně jako v SSSR, určena téměř výhradně pro vojenské účely. Sovětský svaz získal z německa 170 raketových odborníků, navíc již během války obsadil Peenemünde, kde probíhal vývoj raket V-2, a toto výzkumné centrum následně patřilo do Sovětské okupační zóny. Toto jim umožnilo velmi rychlý rozvoj raketové techniky, z počátku založené na kopiích německých konstrukcí (raketa R-1). V polovině 50. let tak SSSR vlastnil výkonnější balistické rakety než USA. Mezi hlavní postavy Ruského raketového průmyslu patřili především konstruktéři, jako byli Sergej Koroljov a Valentin Gluško. O začátku vesmírného závodu lze prakticky hovořit už od tohoto období, zejména poté, co Američané v roce 1955 ohlásili svůj záměr vypustit v rámci Mezinárodního geofyzikálního roku v letech 1957–1958 první umělou družici Země. Krátce nato oznámili stejný záměr i Sověti, kteří už měli rozpracovanou mezikontinentální balistickou raketu R-7, o níž věděli, že je silnější než připravovaná americká nosná raketa Vanguard a že po menší úpravě dokáže tuto úlohu bez problémů splnit. Američané však v té době neměli o výkonu sovětských raket žádné informace a zpočátku vůbec nepředpokládali, že by je Rusové mohli předběhnout. Průběh vesmírného závodu Rusové však dokázali svůj záměr úspěšně uskutečnit. Stalo se tak 4. října 1957, kdy se jim podařilo vypustit první umělou družici Země Sputnik 1. Tím byl definitivně odstartován vesmírný závod.…"} {"instruction": "Create a class in Python to extend object class", "input": "", "output": "class MyClass(object):\n pass"} {"instruction": "How can we use try…except blocks in Python to handle errors?", "input": "", "output": "Try...except blocks are used in Python to handle errors gracefully. They provide a way for Python to execute a code block and gracefully handle any errors that may occur. The code block inside the try is executed first and if an error occurs, it will be caught by the except block and handled. For example, if we have a function that might generate an error, we can use a try...except block to gracefully handle the error and prevent the program from crashing. The try...except block allows us to execute the code and gracefully handle any errors that may occur."} {"instruction": "Implement a class-level decorator in Python to time the execution of a method.", "input": "", "output": "class timed_method(object):\n def __init__(self,func):\n self.func = func\n \n def __call__(self, *args, **kwargs):\n start_time = time.time()\n try:\n result = self.func(*args, **kwargs)\n except Exception as e:\n raise e\n \n end_time = time.time()\n print('Total elapsed time for method %s: %2.2f seconds' % (self.func.__name__, end_time - start_time))\n return result"} {"instruction": "Create an array from elements 0 to 10 in JavaScript.", "input": "", "output": "const array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];"} {"instruction": "Convert the given expression from infix notation to postfix notation.", "input": "A + B * (C - D)", "output": "ABCD-*+"} {"instruction": "Create a Python program to parse a given XML document and extract specific elements.", "input": "XML Document:\n\n \n The Hobbit\n J.R.R Tolkein \n \n \n Harry Potter and the Sorcerers Stone\n J.K Rowling \n \n", "output": "import xml.etree.ElementTree as ET \n\nxml_file_path = 'books.xml'\n\ntree = ET.parse(xml_file_path) \nroot = tree.getroot() \n\nfor book in root.findall('book'):\n title = book.find('title').text \n author = book.find('author').text \n \n print('Title: ', title) \n print('Author: ', author)"} {"instruction": "Write a JavaScript program to calculate the sum of each individual index value from two given arrays of equal length.", "input": "let array1 = [1, 0, 2, 3, 4]; let array2 = [3, 5, 2, 1, 4];", "output": "let sumArray = []; for (let i = 0; i < array1.length; i++) { sumArray.push(array1[i] + array2[i]); } console.log(sumArray); // Output: [4, 5, 4, 4, 8]"} {"text": "[EN Wikipedia] Leightonite\n\nLeightonite is a rare sulfate mineral with formula of K2Ca2Cu(SO4)4•2H2O. Crystal class Leightonite forms flattened to elongated bladed crystals of variously interpreted crystal structure. Its crystal system is reported as triclinic morphologically, but also as pseudo-orthorhombic due to intricate lamellar twinning that mimics orthorhombic symmetry. Because it is triclinic, the crystal is represented by a system of three unequal vectors with corresponding unequal angles between them. Optical class Leightonite is anisotropic, meaning it has more than one refractive index, in this case three as it is biaxial. The mineral can split polarized light into two rays with different direction and velocity, resulting in the appearance of interference colors when recombined and viewed under polarized light. Discovery and occurrence It was first described in 1938 for an occurrence in the Chuquicamata Mine, Colama, El Loa Province, Antofagasta Region, Chile, and named in honor of Tomas Leighton Donoso (1896–1967), Professor of Mineralogy at the University of Santiago, Chile. It occurs in alkali oxidized zones of copper deposits and is associated with natrochalcite, blodite, atacamite, bellingerite, kröhnkite, gypsum and quartz in the discovery location at Chuquicamata, Chile, along with chalcanthite, anhydrite and lammerite in Tsumeb, Namibia. It has also been reported from the Schwaz area of North Tyrol, Austria, and the Visdalen Soapstone Quarry, Lom, Norway. At the mining site of Chuquicamata, Chile, Leightonite is not found in rich ore; rather it only appears in borderland material within of the surface, acting as a cement between rock fragments as it fills in cracks and cross-fiber veins in surfaces as a network of crystals. Although a hydrous sulfate of copper, it is not a major source of the element. Because of its rare nature, it is valued by mineral collectors. References Potassium minerals Calcium minerals Copper(II) minerals Sulfate minerals Monoclinic minerals Minerals in space group 15 Minerals described in 1938"} {"instruction": "Write a function that takes a list of numbers and returns their sum.", "input": "", "output": "def sum_list(list_nums): total = 0 for num in list_nums: total += num return total"} {"instruction": "Code a Python program to calculate the permutation of a given string.", "input": "String = \"ABC\"", "output": "def permutations(string):\n if len(string) == 0:\n return []\n\n if len(string) == 1:\n return [string]\n\n perm_list = []\n for c in string:\n for perm in permutations(string.replace(c, '')):\n perm_list.append(c + perm)\n return perm_list\n\nstring = \"ABC\"\nprint(permutations(string))"} {"instruction": "Create a SQL query to find the names of all students who have scored at least 80 points in Maths and Science.", "input": "", "output": "SELECT s.name FROM student s WHERE s.math > 80 AND s.science > 80"} {"instruction": "You need to write a script in Java to reverse a given list of Strings.", "input": "list = [\"John\", \"Alice\", \"Bob\"]", "output": "public class ReverseList { public static void reverseList(List list) { if (list.size() > 1) { String temp = list.get(0); list.remove(0); reverseList(list); list.add(temp); } } public static void main(String[] args) { List list = new ArrayList(Arrays.asList(\"John\", \"Alice\", \"Bob\")); reverseList(list); System.out.println(list); } }"} {"text": "[CS Wikipedia] Aigrefeuille-d'Aunis\n\nAigrefeuille-d'Aunis je francouzská obec v departementu Charente-Maritime v regionu Poitou-Charentes. V roce 2010 zde žilo 3 707 obyvatel. Je centrem kantonu Aigrefeuille-d'Aunis. Vývoj počtu obyvatel Související články Seznam obcí v departementu Charente-Maritime Externí odkazy Reference Obce v departementu Charente-Maritime"} {"text": "[CS Wikipedia] Římskokatolická farnost Odry\n\nŘímskokatolická farnost Odry je farnost Římskokatolické církve v děkanátu Bílovec ostravsko-opavské diecéze. Historie farnosti Farnost v Odrách je zmiňována poprvé roku 1373; tehdy se připomíná jako svědek v listině olomoucké biskupské kanceláře oderský farář Jan, zřejmě šlechtického původu, neboť je v letech 1373 a 1381 jmenován i v zemských deskách jako majitelé dvora v Dubanech. Z roku 1374 je – jako nepřímý doklad existence kostela – i nejstarší oderský zvon, druhý nejstarší na Moravě. Další zvon je z roku 1499, další zpráva o faráři je pak až z roku 1509, kdy jím byl Vojtěch Četka z Bílovce. Ten roku 1512 odstoupil a novým „rektorem a farářem“ byl na přímluvu oderské vrchnosti bratrů Jaroslava a Petra z Lideřova 5. června 1512 jmenován olomoucký kněz Jakub z Jičína. S podporou vrchnosti se na oderském panství brzy rozšířilo luteránství a roku 1553 je zmiňován první jmenovitě známý evangelický pastor v Odrách jménem Bonaventura již jako „starý farář“. Do třicetileté války zde pak působilo třináct pastorů, často vzdělaných duchovních, kteří udržovali široké styky s kazateli a evangelickými šlechtici v okolí. V duchovní správě jim pomáhala pomocní duchovní (kaplani, jáhni). V roce 1628 byl poslední oderský pastor Daniel Philomates vyhnán a dožil ve slovenské Modré. Ještě roku 1635 zde byli po ústupu protestantských vojsk císařskými lapeni dva protestantští kazatelé. První katolický farář byl Johann Friedrich Hlasnig, působící v Odrách od roku 1629. Pro nedostatek věřících byly z Oder zprvu spravovány, vedle rozsáhlé farnosti oderské, i farnosti Mankovice a Vražné (do 1638), Suchdol nad Odrou (do 1631) a Spálov (1631–1634). Pod vedením nové katolické vrchnosti Oppersdorfů bylo oderské panství postupně rekatolizováno. Ve 40. letech 17. století vznikla tradice cechovního procesí o Božím Těle; od roku 1635 zde rovněž byla obnovena katolická škola. Protože obvod oderské farnosti byl velký, museli v duchovní službě vykonávat kapucíni z Fulneka, což však snižovalo farní příjmy. Roku 1697 proto majitel panství baron Hoffmann nadal místo stálého městského kaplana a od roku 1723 zde působil navíc kooperátor placený obcemi Heřmanice, Véska a Kamenka. 23. února 1709 se stal v oderském kostele údajně zázrak, při kterém kopie obrazu Panny Marie Čenstochovské potila krev. V letech 1718–1719 byl převážně z odkazu měšťanky Marie Brumovské postaven u Oder hřbitovní kostelík s oltářem Ježíše, Marie a Josefa. V roce 1731 byl do Oder přeložen nedávno zřízený potštátský děkanát. Z josefinských církevních reforem se Oder nedotklo rušení klášterů, zato s tím spojený vznik náboženské matice a nových duchovních správ. V rámci velké oderské farnosti bylo původně plánováno zřídit nové farnosti ve Vésce, Vlkovicích a Heřmánkách, nakonec se roku 1784 uskutečnil jen první…"} {"text": "[EN Wikipedia] Badminton at the 2019 SEA Games – Women's team\n\nThe badminton women's team tournament at the 2019 SEA Games in Manila will be held from 1 to 3 December at the Muntinlupa Sports Complex, Metro Manila, Philippines. Schedule All times are Philippines Standard Time (UTC+08:00) Results Quarter-finals Semi-finals Final See also Men's team tournament Individual event References Women's team"} {"instruction": "Generate a predictive model in Python to predict the number of employees will leave in a given year based on the age, job position and current salary.", "input": "", "output": "\"\"\"\nGenerate a predictive model in Python to predict the number of employees will leave in a given year based on the age, job position and current salary.\n\"\"\"\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\n\n# Load the data\ndata = pd.read_csv(\"data.csv\")\n\n# Convert categorical variables to dummy variables\ndata = pd.get_dummies(data, columns=['position'])\n\n# Split the data into independent and dependent variables\nx = data.iloc[:, :-1] #Independent Variables\ny = data.iloc[:, -1] #Dependent Variable\n\n# Build the linear regression model\nmodel = LinearRegression().fit(x, y)\n\n# Make predictions\npredictions = model.predict(x)\n\n# Evaluate the model\nprint(\"Model score:\", model.score(x, y))"} {"text": "[CS Wikipedia] Avon\n\nAvon je kosmetická společnost ze Spojených států amerických, která se řadí k největším světovým firmám v tomto oboru. Své zboží prodává formou přímého prodeje, kdy se o zákazníky stará konkrétní zaměstnanec společnosti. Společnost pořádá také Avon pochody, jež mají podporovat boj proti rakovině prsu. Účastní se jich i společensky významné osobnosti, například modelky Adriana Sklenaříková Karembeu a Daniela Peštová, zpěvačky Lucie Bílá či Monika Absolonová, ale také muži jako například Paľo Habera nebo Dan Bárta. Pochody se konají v asi šedesáti zemích světa. V roce 2017 se pražského pochodu účastnilo asi 30 tisíc lidí, kteří si jako vstupenku zakoupili tričko v růžové barvě. Výsledky hospodaření 2019 Společnost Avon Products, Inc. (NYSE: AVP) oznámila své výsledky za druhé čtvrtletí roku 2019. Výnosy poklesly o 12 %. Globální aktivity, události, informace Rok 2019 V srpnu bylo v Mexiku otevřeno nové výzkumné centrum. Ředitel společnosti Jan Zijderveld zveřejnil 13. srpna zprávu o odpovědném podnikání společnosti. Mimo jiné řekl: „Jsem nadšený z role Avon při pozitivním dopadu na svět.\" Od září společnost Avon India zařadila do svého sortimentu spodní prádlo pro ženy. Toto prádlo bude mít dvě řady: Body Illusion a Shapermakers Plus. Firma představila v průběhu svého 25. výročí Far Away Glamour, nejnovější parfém v nejprodávanější kolekci Far Away. Společnost Avon Products, Inc. vydala knihu „Beauty, Happiness and the Rise of the 'Perfectly Me'.\". Vydání roční bílé knihy se zaměřovalo na oslavu individualismu a „důraz, který se změnil z toho, že jste spokojeni s vaším vzhledem, k štěstí, které zažíváme při vytváření vašeho vzhledu.“ Podle Louise Scottové, hlavní vědecké referentky v Avonu, „Je to výsledek toho, že chcete být„ v míru se sebou, svým vzhledem, svým životem, místo neustálého usilování o něco, o čem si myslíte, že toho bude více nebo„ to bude lepší.\" Brazilská společnost přímého prodeje Natura Holding S.A. oznámila záměr koupit většinový balík akcií společnosti Avon Products, Inc. 18. září společnost Avon Products, Inc. oznámila uvedení značky Distillery, která je zaměřena na péči o pleť a make-up. Dvě bývalé zaměstnankyně společnosti podaly na společnost Avon žalobu, pro diskriminaci v období jejich těhotenství. 4. října oznámila společnost Natura Holding S.A. změnu akviziční smlouvy, resp. změnu přepočítávacího koeficientu akcií z 0,3 na 0,6. Společnost Avon Products, Inc., která již 27 let podporuje kampaň Breast Cancer Awareness Month (česky Měsíc povědomí o rakovině prsu), a ohlásila program „Take a #BreastBreak”, který budou propagovat její obchodní partneři. 7. října bylo oznámeno, že ve věci akvizice společnosti Avon Products, Inc. společností Natura Holding S.A. byly dokončeny důležité kroky k uzavření transakce. 11. října…"} {"instruction": "Generate a Python Fibonacci sequence of length n", "input": "n = 7", "output": "def fibonacci_sequence(n): nums = [] a, b = 0,1 for i in range(n): nums.append(a) a, b = b, a + b return nums print(fibonacci_sequence(7))"} {"text": "[DE Wikipedia] Kim Jong-boo\n\nKim Jong-boo (* 13. Januar 1965 in Tongyeong, Gyeongsangnam-do) ist ein ehemaliger südkoreanischer Fußballspieler und heutiger -trainer. Er verbrachte seine Karriere in Südkorea, zuletzt spielte er bei Daewoo Royals. Als Trainer war er von 1997 bis 2015 in verschiedenen Positionen bei verschiedenen Vereinen aktiv gewesen. Zurzeit steht er als Trainer bei Gyeongnam FC unter Vertrag. Karriere als Spieler Jugendzeit Jong-boo ging erst zur Joongdong High School und ging 1983 zur Korea University. Er beendete sein Studium 1987. Vereine Kim Jong-boo ging 1988 zu den Pohang POSCO Atoms. Dort erhielt er einen Zwei-Jahres-Vertrag. In seiner ersten Saison als Profi-Spieler gewann er mit Pohang die K League 1988. Das war somit sein erster Titel in seiner Karriere. 1989 konnte er mit seinen Mitspielern den Titel nicht verteidigen. Nach Ende seiner zweiten Saison wechselte er zu den Daewoo Royals. Er absolvierte für Pohang 33 Spiele und schoss ein Tor dabei. 1991 konnte er mit den Royals die K League gewinnen. Dies wurde sein letzter Titel als Spieler. Bei Daewoo Royals schaffte er es dennoch nie über die Reservistenrolle hinaus, sodass er 1993, nach 37 Einsätzen und fünf Toren zu Ilhwa Chunma wechselte. Dort bekam er ebenfalls einen Zwei-Jahres-Vertrag. Dort kam er allerdings kaum zum Zug. Er absolvierte nur drei Spiele und schoss dabei keine Tore. Dennoch gewann er die Saison 1993 und 1994. Ende 1994 wechselte er zurück zu den Daewoo Royals. In seiner letzten Saison kam er ebenfalls nur auf drei Einsätze und konnte dabei keine Tore schießen. Ende 1995 beendete er seine Karriere. Nationalmannschaft Zwischen 1982 und 1983 absolvierte er sechs Spiele für die U-20-Nationalmannschaft und erzielte dabei zwei Tore. Ab 1983 war er für die 1. Nationalmannschaft Südkoreas aufgelaufen. Dabei erzielte er in 25 Spielen acht Tore. Ab 1991 wurde er nicht mehr in die Nationalmannschaft einberufen. Karriere als Trainer Nachdem seine Karriere als Spieler vorbei war, ging er zwei Jahre später, 1997 zu der Geoje High School. Dort sollte er die Nachwuchsmannschaft betreuen. Bis Ende 2001 blieb er dort. 2002 ging er zur Dong-Eui University, wurde allerdings wegen ausbleibenden Erfolgs im selben Jahr wieder entlassen. 2006 unterschrieb er einen Vertrag bei der Joongdong High School. Dort blieb er vier Jahre bis Ende 2010. Anfang 2011 gab er bekannt, zu Yangju Citizen FC zuwechseln. Dort bekam er einen Zwei-Jahres-Vertrag. Dort schaffte er in seiner ersten Saison die Qualifizierung zu den Meisterschaftsspielen. Im Finale unterlag er allerdings mit seinem Team gegen Gyeongju Citizen FC mit 2:3. In der darauffolgenden Saison verpasste er mit seinem Team knapp die Meisterschaftsspiele. Anfang 2013 wechselte er zu Hwaseong FC. Mit den Hwaseong FC konnte er 2014 die K3 Challengers League…"} {"text": "[HI Wikipedia] राजमहल\n\nमहल या प्रासाद, भव्य गृह को कहते हैं। किन्तु विशेष रूप से राजा या राज्य के सर्वोच्च सत्ताधीश के गृह को महल कहा जाता है। बहुत से ऐतिहासिक महलों का उपयोग आजकल संसद, संग्रहालय, होटल या कार्यालय के रूप में किया जा रहा है। भारत की प्राचीन वास्तुविद्या के अनुसार 'प्रासाद' लंबा, चौड़ा, ऊँचा और कई भूमियों का पक्का या पत्थर का घर को कहते हैं जिसमें अनेक शृंग, शृंखला, अंडकादि हों तथा अनेक द्वारों और गवाक्षों से युक्त त्रिकोश, चतुष्कोण, आयत, वृत्त शालाएँ हों। पुराणों में केवल राजाओं और देवताओं के गृह को प्रासाद कहा है। आकृति के भेद से पुराणों में प्रासाद के पाँच भेद किए गए हैं— चतुरस्र, चतुरायत, वृत्त, पृत्ताय और अष्टास्र। इनका नाम क्रम से वैराज, पुष्पक, कैलास, मालक और त्रिविष्टप है। भूमि, अण्डक, शिखर आदि की न्यूनाधिकता के कारण इन पाँचों के नौ-नौ भेद माने गए हैं। जैसे- वेराज : मेरु, मन्दर, विमान, भद्रक, सर्वतोभद्र, रुचक, नन्दन, नन्दिवर्धन, श्रीवत्स; पुष्पक : वलभी, गृहराज, शालागृह, मन्दिर, विमान, ब्रह्ममन्दिर, भवन, उत्तम्भ, शिविकावेश्म; कैलास : वलय, दुन्दुभि, पद्म, महापद्म, भद्रक सर्वतोभद्र, रुचक, नन्दन, गुवाक्ष या गुवावृत्त; मालव : गज, वृषभ, हंस, गरुड़, सिंह, भूमुख, भूवर, श्रीजय, पृथिवीधर; त्रिविष्टप : वज्र, चक्र, मुष्टिक या वभ्रु, वक्र, स्वस्तिक, खड्ग, गदा, श्रीवृक्ष, विजय। इन्हें भी देखें राजमहलों की सूची किला"} {"instruction": "Can you write a Python3 program to calculate the number of times a character appears in a given string?", "input": "\"Hello World!\"", "output": "str1 = \"Hello World!\"\n\nchar = 'l'\ncount = 0\n\nfor i in str1:\n if i == char:\n count = count + 1\n\n# Print the result \nprint (f'The character {char} appears {count} times in the string {str1}')"} {"instruction": "Write a Python program to remove all instances of a given value from a given list.", "input": "[1, 2, 3, 2, 3, 4], 2", "output": "def remove_value(nums, val): res = [] for num in nums: if num != val: res.append(num) return res"} {"instruction": "Make a function \"convert_time\" that would convert seconds to minutes", "input": "", "output": "def convert_time(seconds): minutes = seconds / 60 return minutes"} {"instruction": "Classify the following sentence into one of the seven categories.", "input": "Sentence: My cat came home late last night", "output": "Animal"} {"instruction": "Create a JavaScript class for a circle that calculates its area and returns the result.", "input": "", "output": "class Circle { constructor(radius) { this.radius = radius; } get area() { return Math.PI * this.radius * this.radius; } }"} {"text": "[CS Wikipedia] Hans Getzinger\n\nHans Getzinger, také Hanns Gezinger, Hanuš Götzinger (15. století, Haslach, Rakouské arcivévodství – 1512) byl rakouský stavitel, kameník, architekt a mistr jihočeské pozdní gotiky. Původem byl z hornorakouského Haslachu, kde jako člen kamenické a stavitelské rodiny zřejmě vedl stavbu městského farního kostela. Činný byl především v Českém Krumlově, kde vedl stavební huť rodu Rožmberků, i na dalších jihočeských stavbách. Připisuje se mu nebo je doloženo jeho autorství kostelů (nebo jejich částí) v Rožmberku, Zátoni a Chvalšinách. Reference Externí odkazy Rožmberská stavební huť Mgr. Hynek Látal, Ph.D., Disertační práce: Transformace klenebních figurací v širším okruhu podunajské pozdně gotické architektury, str. 203 - 219 Narození v 15. století Úmrtí v roce 1512 Muži Gotičtí architekti Rakouští architekti Kameníci Rakouští stavitelé"} {"instruction": "Create a Python script that connects to a MySQL database. The script should query the database for the list of available tables and print them out.", "input": "Not applicable", "output": "import pymysql\n\n# Connect to the database\nconn = pymysql.connect(host='localhost',\n user='username', password='password',\n db='my_database')\n\n# Create a cursor\ncursor = conn.cursor()\n\n# Execute the query\ncursor.execute('SHOW TABLES')\n\n# Fetch and print out the list of tables\ntables = cursor.fetchall()\nfor table in tables:\n print(table)\n\n# Close the connection\nconn.close()"} {"instruction": "Write a Python program to print all integer numbers from a given range.", "input": "from 1 to 10", "output": "for i in range(1, 11): print(i)"} {"instruction": "Create a Python program that adds logic programming (Prolog) syntax and resolution into Python. Define a Struct class that takes a database, head, and subs as input and adds it to the database. Implement unary + to insert into the database as fact, unary ~ to insert into the database as a query, and << to add a conditional. Define a Symbol class that takes a name and database as input and returns a Variable or Constant object. Implement a Database class that stores facts, conditionals, and queries. Implement a solve method that extends valuations in V satisfying the last query. Implement a unify method that finds one valuation extending v and unifying x with y. Define a LogicalFunction class that replaces a logical function once it has been consulted.", "input": "", "output": "#\n# pythologic2.py\n#\n# Add logic programming (Prolog) syntax and *resolution* into Python.\n# \n# (c) 2004 Francisco Coelho\n# after (c) 2004 Shai Berger\n# and AIMA examples\n#\n\nimport string\nimport copy\n \nclass Struct:\n def __init__(self, database, head, subs):\n \"\"\"\n The head and subs are essential - what makes this struct.\n The database should only be used while structs are constructed,\n and later removed.\n \"\"\"\n self.database = database\n self.head = head\n self.subs = subs\n\n def __pos__(self):\n \"\"\"\n unary + means insert into database as fact\n \"\"\"\n self.database.add_fact(self)\n\n def __invert__(self):\n \"\"\"\n unary ~ means insert into database as query\n \"\"\"\n self.database.add_query(self)\n\n def __lshift__(self, requisites):\n \"\"\"\n The ideal is\n consequent(args) << cond1(args1),...\n for now we must do with\n consequent(args) << [cond1(args1),...]\n \"\"\"\n self.database.add_conditional(self, requisites)\n\n def __str__(self):\n subs = map (str, self.subs)\n return str(self.head) + \"(\" + string.join(subs,',') + \")\"\n\nclass Symbol:\n def __init__ (self, name, database):\n self.name = name\n self.database = database\n \n def __call__(self, *args):\n return Struct(self.database, self, args)\n \n def __str__(self):\n return self.name\n\nclass Constant(Symbol):\n \"\"\"\n A constant is a name. Its value is its name too.\n \"\"\"\n def value(self): return self.name\n\nclass Variable(Symbol):\n pass\n\n\ndef symbol(name, database):\n if (name[0] in string.uppercase):\n return Variable(name,database)\n else:\n return Constant(name, database)\n\t\nclass Database:\n def __init__(self, name):\n self.name= name\n self.facts = []\n self.conditionals = []\n self.queries = []\n \n def add_fact(self, fact):\n self.facts.append(fact)\n\n def add_query(self, query):\n self.queries.append(query)\n \n def add_conditional(self,head,requisites):\n if not(isinstance(requisites, list)):\n requisites = [requisites]\n self.conditionals.append((head,requisites))\n\n def __str__(self):\n factsStr= string.join(map(str, self.facts),'\\n')\n condsStr= ''\n for (h,r) in self.conditionals:\n condsStr = condsStr + \"%s << %s\\n\"%(h,string.join( map(str, r"} {"instruction": "Sort the array of strings lexicographically.", "input": "arr = [\"james\", \"john\", \"bob\", \"michelle\"]", "output": "def sort_strings_lexicographically(arr): return sorted(arr)"} {"text": "[EN Wikipedia] Modern Art (Matthew Sweet album)\n\nModern Art is the eleventh studio album by alternative rock musician Matthew Sweet. It was released on Missing Piece Records in 2011. Release The album, available as a CD, 2-LP vinyl set, and digital download, was met with little commercial success, but with favorable reviews. Amazon.com wrote, \"Defiantly unorthodox, but often playfully so, Modern Art features 12 new compositions of Sweet's trademark wistful, yearning pop that recall some of Sweet s touchstones: the Beatles, Beach Boys and Big Star\", and even notes the work of Sweet's side-players: \"Longtime musical cohort Ric Menck (Velvet Crush) does all the drumming on the album (except for \"Ivory Tower\", which is built on a random drum pattern supplied by Sweet's friend, actor/musician Fred Armisen). Dennis Taylor's deft and urgent guitar lines serve as a running commentary to Sweet's introspective singing. Finished by mastering engineer Glenn Schick, Modern Art promises to be another trend-setting release by Sweet.\" Track listing Personnel Matthew Sweet – vocals, pianos, Mellotron, organ, guitars, bass, percussion Dennis Taylor – lead guitars Ric Menck – drums, percussion Fred Armisen – drums (2) Production Matthew Sweet – producer, recording, mixing Glenn Schick – mastering at Glenn Schick Mastering (Atlanta, Georgia) Alex Viau – graphic design Russell Carter Artist Management Ltd. – management References 2011 albums Albums produced by Matthew Sweet Matthew Sweet albums"} {"instruction": "Write a Python program convert a list with nested levels of tuples and lists into a list of strings.", "input": "input_list = [('a', 'b', ('c', ['d', 'e', 'f'])), 'g', ['h', ['i', 'j']]]", "output": "output_list = []\n\ndef flatten_list(my_list):\n for item in my_list:\n if isinstance(item, list):\n flatten_list(item)\n elif isinstance(item, tuple):\n flatten_list(list(item))\n else:\n output_list.append(item)\n\nflatten_list(input_list)\n\nprint(output_list)"} {"instruction": "Construct a function in Java that takes a sequence of numbers and finds the maximum value in the sequence.", "input": "", "output": "public static int findMax(int[] sequence) { int maxVal = Integer.MIN_VALUE; for (int val : sequence) { if (val > maxVal) { maxVal = val; } } return maxVal; }"} {"instruction": "Create a list of HTML tags using the Python language.", "input": "", "output": "html_tags = [\"a\", \"abbr\", \"acronym\", \"address\", \"applet\", \"area\", \"article\", \"aside\", \"audio\", \"b\", \"base\", \"basefont\", \"bdi\", \"bdo\", \"big\", \"blockquote\", \"body\", \"br\", \"button\", \"canvas\", \"caption\", \"center\", \"cite\", \"code\", \"col\", \"colgroup\", \"data\", \"datalist\", \"dd\", \"del\", \"details\", \"dfn\", \"dialog\", \"dir\", \"div\", \"dl\", \"dt\", \"em\", \"embed\", \"fieldset\", \"figcaption\", \"figure\", \"font\", \"footer\", \"form\", \"frame\", \"frameset\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"head\", \"header\", \"hgroup\", \"hr\", \"html\", \"i\", \"iframe\", \"img\", \"input\", \"ins\", \"kbd\", \"keygen\", \"label\", \"legend\", \"li\", \"link\", \"main\", \"map\", \"mark\", \"menu\", \"menuitem\", \"meta\", \"meter\", \"nav\", \"noframes\", \"noscript\", \"object\", \"ol\", \"optgroup\", \"option\", \"output\", \"p\", \"param\", \"picture\", \"pre\", \"progress\", \"q\", \"rp\", \"rt\", \"ruby\", \"s\", \"samp\", \"script\", \"section\", \"select\", \"small\", \"source\", \"span\", \"strike\", \"strong\", \"style\", \"sub\", \"summary\", \"sup\", \"table\", \"tbody\", \"td\", \"textarea\", \"tfoot\", \"th\", \"thead\", \"time\", \"title\", \"tr\", \"track\", \"tt\", \"u\", \"ul\", \"var\", \"video\", \"wbr\"]"} {"instruction": "Create a program in Python to generate a list of prime numbers up to N", "input": "", "output": "def prime_list(N):\n isPrime = [True for i in range(N + 1)]\n p = 2\n while p * p <= N:\n if isPrime[p]:\n for i in range(p * p, N + 1, p):\n isPrime[i] = False\n p += 1\n prime_nums = []\n for p in range(2, N):\n if isPrime[p]:\n prime_nums.append(p)\n return prime_nums"} {"text": "[HI Wikipedia] सिलीगुड़ी\n\nसिलीगुड़ी (Siliguri) भारत के पश्चिम बंगाल राज्य के जलपाईगुड़ी ज़िले और दार्जीलिंग ज़िले (दोनों) में स्थित एक शहर है। इस से 35 किमी पूर्व में जलपाईगुड़ी बसा हुआ है, और दोनों शहरों में विस्तार के कारण इनका एक बृहत-नगरीय क्षेत्र में विलय होता जा रहा है। विवरण रेल और राजपथ का अंतस्थ होने के कारण, सिलीगुड़ी नगर दार्जिलिंग एवं सिक्किम के व्यापार का केंद्र है। जूट व्यवसाय नगर का प्रमुख व्यवसाय है। यह महानन्दा नदी के किनारे हिमालय के चरणों में स्थित है और जलपाईगुड़ी से ४२ किमी दूरी पर स्थित है। यह उत्तरी बंगाल का प्रमुख वाणिज्यिक, पर्यटक, आवागमन, तथा शैक्षिक केन्द्र है।२०११ में इसकी जनसंख्या ७ लाख थी। गुवाहाटी के बाद यह पूर्वोत्तर भारत का दूसरा सबसे बड़ा नगर है। यह पश्चिम बंगाल का महत्वपूर्ण व्यापार केन्द्र बन चुका है। इस नगर में लगभग २० हजार देसी और १५ हजार विदेशी पर्यटक प्रतिवर्ष आते हैं। नेपाल, भूटान तथा बांग्लादेश आदि पड़ोसी देशों और अन्य पूर्वोत्तर राज्यों के लोगों के लिये भी यह वायु, सड़क तथा रेल यात्रा का पड़ाव बिन्दु है। यह चाय, आवागमन, पर्यटन तथा इमारती लकड़ी के लिये प्रसिद्ध है। इन्हें भी देखें जलपाईगुड़ी ज़िला जलपाईगुड़ी सन्दर्भ पश्चिम बंगाल के शहर जलपाईगुड़ी ज़िला जलपाईगुड़ी ज़िले के नगर दार्जीलिंग ज़िला दार्जीलिंग ज़िले के नगर"} {"instruction": "Create a bash shell script that assigns two variables with values of 4 and 2 and prints the sum of the two variables.", "input": "", "output": "#!/bin/bash a=4 b=2 echo 'the sum is' $(($a + $b))"} {"instruction": "Suggest an approach to debug a function written in Javascript that is not returning the expected result.", "input": "", "output": "One approach to debug the function would be to use console.log statements to print out the values of the variables inside the function. This would help identify where the problem is and what needs to be changed in order to get the expected result."} {"instruction": "Create a Python function to shuffle a list of numbers.", "input": "[1, 2, 3, 4, 5]", "output": "import random\n\ndef shuffle_list(nums):\n random.shuffle(nums)\n return nums\n\nshuffled_list = shuffle_list([1, 2, 3, 4, 5])\nprint(shuffled_list) #[3, 5, 2, 4, 1]"} {"instruction": "Find the Fibonacci number for a given number using a for loop.", "input": "", "output": "def fibonacci(n): fibonacci_numbers = [0,1] for i in range(2, n+1): fibonacci_numbers.append(fibonacci_numbers[i-1] + fibonacci_numbers[i-2]) return fibonacci_numbers[n]"} {"instruction": "Write a C++ program that takes two 2D arrays and compares them for equality.", "input": "arr1 = [[1,2], [2,4]] arr2 = [[1,2], [2,4]]", "output": "#include #include bool areEqual (std::array,2> first, std::array,2> second ) { if( first.size() != second.size() ) return false; for(int i = 0; i < first.size(); i++) { for(int j = 0; j < first[i].size(); j++) { if( first[i][j] != second[i][j] ) return false; } } return true; } int main() { std::array,2> arr1 = {{{1,2}, {2,4}}}, arr2 = {{{1,2}, {2,4}}}; std::cout << isEqual(arr1, arr2); }"} {"instruction": "Program a function to add three integers and return the sum.", "input": "2, 3 and 6", "output": "def addThree(a, b, c): return a + b + c sum = addThree(2, 3, 6)"} {"instruction": "Using the list and additional libraries, write a python program to calculate the sum of all elements in the list.", "input": "list = [2, 3, 5, 8, 9]", "output": "#Importing the libraries\nimport numpy as np\n\n#Defining the list\nlist = [2, 3, 5, 8, 9]\n\n#Calculating the sum\nsum = np.sum(list)\n\n#Printing the result\nprint(sum)"} {"instruction": "Write a function in Python to generate a random integer between two numbers, a and b.", "input": "a = 4\nb = 15", "output": "import random\n\ndef random_int_generator(a, b):\n return random.randint(a, b)"} {"instruction": "Suggest a regex pattern to match a valid alphanumeric string.", "input": "", "output": "^[a-zA-Z0-9]+$"} {"instruction": "Write an SQL query to select the first five items from a table called 'products' sorted by price in descending order.", "input": "", "output": "SELECT * FROM products ORDER BY price DESC LIMIT 5;"} {"text": "[HI Wikipedia] कीवू झील\n\nकीवू झील (अंग्रेज़ी: Lake Kivu) महान अफ़्रीकी झीलों में से एक है। यह कांगो लोकतान्त्रिक गणराज्य और रवाण्डा की अंतरराष्ट्रीय सीमा पर स्थित है। दृश्य इन्हें भी देखें महान अफ़्रीकी झीलें सन्दर्भ महान अफ़्रीकी झीलें अफ़्रीका की झीलें कांगो लोकतान्त्रिक गणराज्य की झीलें रुआण्डा की झीलें"} {"text": "[DE Wikipedia] Key Pittman\n\nKey Pittman (* 19. September 1872 in Vicksburg, Mississippi; † 10. November 1940 in Reno, Nevada) war ein US-amerikanischer Politiker. Biografie Frühes Leben Key Pittman wuchs in privilegierten Verhältnissen auf, der unter anderem von Privatlehrern erzogen wurde, und später die Southwestern Presbyterian University in Clarksville (Tennessee) absolvierte. Nach seinem Studium der Rechtswissenschaften zog er Anfang der 1890er Jahre nach Seattle (Washington) wo er als Anwalt praktizierte. Abenteurer Wie viele abenteuerlustige Männer zog es Pittman 1897 an den Klondike River, als dort Ende des 19. Jahrhunderts der bekannte Goldrausch ausbrach. Er selbst erwarb eine Goldmine, die er bis 1901 leitete. 1902 verließ Pittman die Region und ließ sich in der wirtschaftlich florierenden Stadt Tonopah (Nevada) nieder, wo er seine Arbeit als Rechtsanwalt wieder aufnahm. Auch nahm Pittman von 1904 bis 1906 als Repräsentant von Nevada an der Lewis and Clark Centennial Exposition in Portland teil. Politische Karriere 1911 kandidierte der Parteiangehörige der Demokraten erstmals für das Amt des US-Senators, unterlag jedoch seinem unmittelbaren Amtsvorgänger William Massey. Zwei Jahre später hatte er mehr Erfolg, und zog am 29. Januar 1913 als US-Senator von Nevada nach Washington. Er wurde viermal wiedergewählt und gehörte dem Senat bis zu seinem Tod 27 Jahre lang an. Damit war er einer der am längsten amtierenden US-Senatoren. Im Lauf seiner Amtszeit übernahm er mehrere Funktionen, darunter von 1933 bis 1940 jene des Präsidenten pro tempore. Im selben Zeitraum war er Vorsitzender des United States Senate Committee on Foreign Relations. Tod und Kontroverse 1940 kandidierte er erneut für das Senatorenamt, jedoch erlag er während des Wahlkampfs im Washoe General Hospital einem Herzinfarkt. Lange Zeit wurde vermutet, dass Pittmans Leichnam von Parteikollegen in einer Badewanne tiefgefroren wurde, bis seine Wahl bestätigt worden sei, um erst danach seinen Tod zu verkünden. Somit hätte die Demokratische Partei einen Senatssitz im 77. Kongress mehr gehabt. Allerdings wurde dieses Gerücht nie bestätigt. Sonstiges Vail Montgomery Pittman folgte seinem um acht Jahre älteren Bruder in die Politik und war von 1945 bis 1951 Gouverneur von Nevada. Weblinks Senator der Vereinigten Staaten aus Nevada Mitglied der Demokratischen Partei (Vereinigte Staaten) Rechtsanwalt (Vereinigte Staaten) US-Amerikaner Geboren 1872 Gestorben 1940 Mann Präsident pro tempore des Senats der Vereinigten Staaten"} {"instruction": "Write a python program to return the average value of numbers in the given list.", "input": "numbers = [2, 4, 6, 8]", "output": "def avg_list(numbers): \n total = 0\n for x in numbers: \n total += x \n return total / len(numbers)"} {"instruction": "Explain what a stack overflow is and how to try to avoid it.", "input": "", "output": "A stack overflow is an error condition in which the program attempts to use more memory space than the stack can hold. It occurs when a program pushes more data onto the stack than the maximum limit (e.g., when a recursive function recurses too many times), or when the recursive calls are too deeply nested. To avoid stack overflows, you should use a modular approach when writing code, set realistic limits for the depth of recursion, and opt for an iterative solution rather than a recursive one whenever possible."} {"text": "[HI Wikipedia] शिक्षा\n\nशिक्षा का मतलब ज्ञान,सदाचार,उचित आचरण,तकनीकी शिक्षा तकनीकी दक्षता,विद्या आदि को प्राप्त करने की प्रक्रिया को कहते हैं। शिक्षा में ज्ञान, उचित आचरण और तकनीकी दक्षता, शिक्षण और विद्या प्राप्ति आदि समाविष्ट हैं। इस प्रकार यह कौशलों (skills), व्यापारों या व्यवसायों एवं [[तंत्रिका विकास|मानसिक]Kartikkumawat], नैतिक और सौन्दर्यविषयक के उत्कर्ष पर केंद्रित है। शिक्षा, समाज एक पीढ़ी द्वारा अपने से निचली पीढ़ी को अपने ज्ञान के हस्तांतरण का प्रयास है। इस विचार से शिक्षा एक संस्था के रूप में काम करती है, जो व्यक्ति विशेष को समाज से जोड़ने में महत्त्वपूर्ण भूमिका निभाती है तथा समाज की संस्कृति की निरंतरता को बनाए रखती है। बच्चा शिक्षा द्वारा समाज के आधारभूत नियमों, व्यवस्थाओं, समाज के प्रतिमानों एवं मूल्यों को सीखता है। बच्चा समाज से तभी जुड़ पाता है जब वह उस समाज विशेष के इतिहास से अभिमुख होता है। शिक्षा व्यक्ति की अंतर्निहित क्षमता तथा उसके व्यक्तित्त्व का विकसित करने वाली प्रक्रिया है। यही प्रक्रिया उसे समाज में एक वयस्क की भूमिका निभाने के लिए समाजीकृत करती है तथा समाज के सदस्य एवं एक जिम्मेदार नागरिक बनने के लिए व्यक्ति को आवश्यक ज्ञान तथा कौशल उपलब्ध कराती है। शिक्षा शब्द संस्कृत भाषा की ‘शिक्ष्’ धातु में ‘अ’ प्रत्यय लगाने से बना है। ‘शिक्ष्’ का अर्थ है सीखना और सिखाना। ‘शिक्षा’ शब्द का अर्थ हुआ सीखने-सिखाने की क्रिया। जब हम शिक्षा शब्द के प्रयोग को देखते हैं तो मोटे तौर पर यह दो रूपों में प्रयोग में लाया जाता है, व्यापक रूप में तथा संकुचित रूप में। व्यापक अर्थ में शिक्षा किसी समाज में सदैव चलने वाली सोद्देश्य सामाजिक प्रक्रिया है जिसके द्वारा मनुष्य की जन्मजात शक्तियों का विकास, उसके ज्ञान एवं कौशल में वृद्धि एवं व्यवहार में परिवर्तन किया जाता है और इस प्रकार उसे सभ्य, सुसंस्कृत एवं योग्य नागरिक बनाया जाता है। मनुष्य क्षण-प्रतिक्षण नए-नए अनुभव प्राप्त करता है व करवाता है, जिससे उसका दिन-प्रतिदन का व्यवहार प्रभावित होता है। उसका यह सीखना-सिखाना विभिन्न समूहों, उत्सवों, पत्र-पत्रिकाओं, रेडियो, टेलीविजन आदि से अनौपचारिक रूप से होता है। यही सीखना-सिखाना शिक्षा के व्यापक तथा विस्तृत रूप में आते हैं। संकुचित अर्थ में शिक्षा किसी समाज में एक निश्चित समय तथा निश्चित स्थानों (विद्यालय, महाविद्यालय) में सुनियोजित ढंग से चलने वाली एक सोद्देश्य सामाजिक प्रक्रिया है जिसके द्वारा विद्यार्थी निश्चित पाठ्यक्रम को पढ़कर संबंधित परीक्षाओं को उत्तीर्ण करना सीखता है। शिक्षा पर विद्वानों के विचार समाजशास्त्रियों, मनोवैज्ञानिकों व नीतिकारों ने शिक्षा के सम्बन्ध में अपने विचार दिए हैं। शिक्षा के अर्थ को समझने में ये विचार भी हमारी सहायता करते हैं। कुछ शिक्षा सम्बन्धी मुख्य विचार यहाँ प्रस्तुत किए जा रहे हैंः - शिक्षा से मेरा तात्पर्य बालक और मनुष्य के शरीर, मन तथा आत्मा के सर्वांगीण एवं सर्वोत्कृष्ट विकास से है। (महात्मा गांधी) मनुष्य की अन्तर्निहित पूर्णता को अभिव्यक्त करना ही शिक्षा है। (स्वामी विवेकानंद) शिक्षा व्यक्ति की उन सभी भीतरी शक्तियों का विकास है जिससे वह अपने वातावरण पर नियंत्रण रखकर अपने उत्तरदायित्त्वों का निर्वाह कर सके। (डॉ लवी गौतम प्रदेश संयोजक उत्तर प्रदेश…"} {"instruction": "Create a program to detect plagiarism using Python.", "input": "", "output": "import difflib\n\ndef detect_plagiarism(text1, text2):\n sequenceMatcher = difflib.SequenceMatcher(None, text1, text2)\n matchPercentage = sequenceMatcher.ratio() * 100\n return matchPercentage\n\ndetect_plagiarism(\"This is a sample text\", \"This is a sample text.\")"} {"instruction": "Edit the given Python code to format the output as a table using tabulate.", "input": "fruits = [\"apple\", \"orange\", \"pineapple\", \"melon\"]\nfor fruit in fruits:\n print(fruit)", "output": "import tabulate\n\nfruits = [\"apple\", \"orange\", \"pineapple\", \"melon\"] \ntable = [(fruit,) for fruit in fruits] \nprint(tabulate.tabulate(table, headers=[\"Fruits\"])) \n# Output: \n# Fruits\n# apple\n# orange\n# pineapple\n# melon"} {"text": "[HI Wikipedia] जर्नल ऑफ़ हाई एनर्जी फिजिक्स\n\nजर्नल ऑफ़ हाई एनर्जी फिजिक्स उच्च ऊर्जा भौतिकी के क्षेत्र को समाविष्ट करने वाला सहकर्मी समीक्षा वैज्ञानिक पत्रिका है। यह इंटरनेशनल स्कूल फॉर एडवांस्ड स्टडीज की ओर से स्प्रिंगर विज्ञान + व्यापार मीडिया द्वारा प्रकाशित होता है। बाहरी कड़ियाँ पत्रिका पृष्ठ नाभिकीय भौतिकी भौतिकी कण भौतिकी भौतिकी पत्रिका अंग्रेजी भाषा पत्रिका 1997 में स्थापित प्रकाशन स्प्रिंगर अकादमिक पत्रिका विज्ञान एवं प्रौद्योगिकी के जर्नल"} {"instruction": "Design a Python program to print all prime numbers between 0 and a given number.", "input": "30", "output": "def is_prime(num):\n #Ignore negative numbers and zero\n if num < 2:\n return False\n \n #Return true if num is prime\n for i in range(2, num):\n if num % i == 0:\n return False\n return True\n\n#Print all prime numbers between 0 and a given number\nnum_input = int(input(\"Enter a number: \"))\nfor i in range(num_input):\n if is_prime(i):\n print(i, \"is a prime number\")"} {"instruction": "Create a JavaScript function to validate if a given string is a valid URL.", "input": "", "output": "function isValidUrl(url) { const regex = new RegExp(\"^(http|https)://\"); return regex.test(url); } // Example Usage let url = \"https://example.com\"; let result = isValidUrl(url); console.log(result); // should be true"} {"text": "[CS Wikipedia] Židovský hřbitov v Trhovém Štěpánově\n\nŽidovský hřbitov se nachází jižně od města Trhový Štěpánov v okrese Benešov ve Středočeském kraji od roku 1434. Od 3. května 1958 je chráněnou kulturní památkou České republiky. Historie a popis Areál hřbitova je podélného tvaru se vstupem ze západní a východní strany. U hlavního vstupu je umístěna pamětní deska s informacemi o hřbitově v letech 1989–1992 a rodině Dubových, jež byla umučena během 2. světové války. Ačkoli je hřbitov doložen od 17. století, pochází zřejmě z doby dřívější, snad už z roku 1434. Dochovalo se přibližně 300 stél včetně několika cenných z doby baroka. Nejstarší náhrobní kameny (mazevot) pocházejí z roku 1711. V roce 1915 zde byla pohřbena dvojice uprchlíků z Haliče a v roce 1916 Alois Kraus, pradědeček spisovatele Františka R. Krause. Poslední pohřeb zde proběhl před rokem 1943. Další cenné náhrobky byly do areálu přemístěny ze zrušeného hřbitova v Dolních Kralovicích, nejcennější datované rokem 1644. Už v 80. letech 20. století proběhla za finanční pomoci z Rakouska rekonstrukce, od devadesátých let 20. století je hřbitov udržován pravidelně. V roce 2005 byly vztyčeny povalené náhrobky. Přístup Hřbitov je přístupný po cestě odbočující na západ ze silnice vedoucí od Trhového Štěpánova na jih ke vsi Chlum. Fotogalerie Odkazy Reference Související články Seznam židovských památek ve Středočeském kraji Externí odkazy Popis (citováno dne 30. ledna 2015) Židovské hřbitovy v okrese Benešov Kulturní památky v okrese Benešov Stavby v Trhovém Štěpánově"} {"instruction": "Develop a Python program to decrypt the given messages using a key?", "input": "message: \"AB cDE@5sfg90~!\", key: 6", "output": "def decrypt(message, key):\n decrypted_message = \"\"\n \n for char in message:\n ascii_value = ord(char)\n decrypted_char = chr(ascii_value - key)\n decrypted_message += decrypted_char\n \n return decrypted_message\n\nmessage = \"AB cDE@5sfg90~!\"\nkey = 6\n\ndecrypted_message = decrypt(message, key)\nprint(decrypted_message)"} {"instruction": "Generate Python code to print the first 10 numbers from 10 to 19, seperated by commas.", "input": "", "output": "for i in range(10,20):\n if i == 19:\n print(i, end = '')\n else:\n print(i, end = ', ')"} {"instruction": "Build a REST API with Python and Flask. The API should include the following endpoints: POST /users, GET /users/{userId}, GET /users/{userId}/posts, POST /posts", "input": "Not applicable", "output": "# Importing libraries\nimport flask\nfrom flask import Flask, request, jsonify\n\n# Creating the application instance\napp = Flask(__name__)\n\n# A list to store users data temporarily\nusers = []\n\n@app.route('/users', methods=['POST'])\ndef add_user():\n data = request.get_json()\n users.append(data)\n return jsonify({'message': 'User added successfully'})\n\n@app.route('/users/', methods=['GET'])\ndef get_user(userId):\n user = [user for user in users if user['userId'] == userId]\n if len(user) == 0:\n return jsonify({'message': 'No user found'})\n return jsonify({'user': user[0]})\n\n@app.route('/users//posts', methods=['GET'])\ndef get_user_posts(userId):\n posts = [post for post in posts if post['userId'] == userId]\n return jsonify({'posts': posts})\n\n@app.route('/posts', methods=['POST'])\ndef add_post():\n data = request.get_json()\n posts.append(data)\n return jsonify({'message': 'Post added successfully'})\n\n# Driver code \nif __name__ == '__main__':\n app.run(debug=True)"} {"text": "[EN Wikipedia] Talbot River (New Zealand)\n\nThe Talbot River is a river in northern Fiordland, New Zealand. A tributary of Joes River, it rises west of Gulliver Peak. See also List of rivers of New Zealand References Rivers of Fiordland"} {"text": "[CS Wikipedia] Pieter Anthonisz. van Groenewegen\n\nPieter Anthonisz. van Groenewegen (1590/1600–1658) byl nizozemský malíř krajinář. Narodil se v nizozemském městě Delft. Věnoval se především krajinomalbě. Odcestoval do Itálie, kde žil někdy mezi roky 1615–1623 na Via Bocca de Leone v Římě. Stal se členem uměleckého spolku Bentvueghels s přezdívkou Leeuw (Lev). Vrátil se do Delft, kde se stal v roce 1626 členem spolku Cech svatého Lukáše, ale poslední roky svého života strávil v Haagu, kde se v roce 1657 připojil ke spolku Confrerie Pictura, což byl více či méně akademický klub umělců založený v roce 1656 v Haagu místními umělci, kteří nebyli spokojeni s Cechem svatého Lukáše. Zemřel tam v následujícím roce. Mnoho jeho prací vlastní Rijksmuseum Amsterdam. Odkazy Reference Externí odkazy Nizozemští malíři Bentvueghels Umělecké spolky Úmrtí v roce 1658 Osoby s nejistým datem narození Muži"} {"text": "[EN Wikipedia] Sarah Lindsay Schmidt\n\nSarah Lindsay Schmidt (August 24, 1877 – January 31, 1965) was an American writer of children's literature. Her book New Land was a Newbery Honor recipient in 1934. Biography Sarah Lindsay was born in Chicago, Illinois, on August 24, 1877. Her grandfather, Thomas Milner, had been the city's first Methodist minister. Lindsay attended the University of Chicago, and began writing stories for children after graduation. She would later study at both Northwestern University and Columbia University While teaching at a high school in Sterling, Illinois, she met a fellow teacher, G.A. Schmidt; they were married in 1910. The couple spent a few years farming, but Sarah returned to teaching in 1914, at the Whitewater Normal School (now the University of Wisconsin–Whitewater). In 1919, the Schmidts moved to Fort Collins, Colorado, where Sarah began teaching English at Colorado State University. She continued her employment at CSU until 1935, when she ceased teaching in order to focus on her writing. New Land was published in 1933, and was named one of eight Newbery Honor titles in 1934. Schmidt's later books included Ranching on Eagle Eye (1936), Shadow over Winding Ranch (1940), and The Hurricane Mystery (1943); Kirkus Reviews consistently praised Schmidt's novels for the accuracy of their information on farming, ranching, and mining. Schmidt suffered a serious fall in the autumn of 1961, and never regained full health. She died in a rest home in Fort Collins on January 31, 1965. References 1877 births 1965 deaths American children's writers Newbery Honor winners American women children's writers"} {"instruction": "Suggest a completion to the following React component.", "input": "import React from 'react'; class MyComponent extends React.Component { constructor(props) { super(props); this.state = {", "output": "import React from 'react'; class MyComponent extends React.Component { constructor(props) { super(props); this.state = { name: '', age: 0 }; } }"} {"text": "[DE Wikipedia] Corruption\n\nCorruption (engl. „Korruption“) ist ein politischer Porno-Thriller. Die Produktion des Films kostete mehr als 150.000 US-Dollar; damit zählt Corruption zu den teureren Produktionen der Branche. Bryn Pryor wird in den Sexszenen von Chris Cannon gedoubelt. Inhalt Der Film wird mit einem Zitat von Caligula eröffnet. David Walker Helms ist Kaliforniens erster republikanischer Senator seit langer Zeit und eine einflussreiche öffentliche Figur sowie der kommende Star seiner Partei. Helms hat Ambitionen auf das Weiße Haus, welche jedoch durch einen Machtkampf zwischen seiner machthungrigen Frau Catherine (Kylie Ireland) und seiner Sexsklavin Natasha (Hillary Scott) bedroht sind. Auszeichnungen 2007: AVN Award: Best Video Feature 2007: AVN Award: Best Actress Video (Hillary Scott) 2007: AVN Award: Best Director Video (Eli Cross) 2007: AVN Award: Best Solo Sex Scene (Alana Evans) 2007: AVN Award: Best Non-Sex Performance (Bryn Pryor) 2007: AVN Award: Best Screenplay – Video (Alvin Edwards & Eli Cross) 2007: AVN Award: Best Editing – Video (Robin Dyer & Mark Logan) Weblinks Filmtitel 2006 US-amerikanischer Film Pornofilm Thriller"} {"instruction": "Modify the existing Python code below so that it returns the sum of odd numbers less than the input n.", "input": "n = 10\n\ndef sum_odd_numbers(n):\n result = 0", "output": "def sum_odd_numbers(n):\n result = 0\n for i in range(n):\n if i % 2 != 0:\n result += i\n return result"} {"instruction": "Implement a search algorithm in Java.", "input": "", "output": "public class SearchAlgorithm { public int search(int[] array, int target) { int left = 0; int right = array.length - 1; while (left <= right) { int mid = (left + right) / 2; if (target == array[mid]) { return mid; } if (target < array[mid]) { right = mid - 1; } else { left = mid + 1; } } return -1; } }"} {"instruction": "Assign a variable 'name' with a value of your choice in JavaScript.", "input": "", "output": "let name = \"John\";"} {"instruction": "Generate a Python script to classify emails into spam/ham categories.", "input": "", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn.model_selection import train_test_split\n\n# Read the data\ndf = pd.read_csv('data.csv')\n\n# Split the data into features and labels\nfeatures = df['text']\nlabels = df['label']\n\n# Extract features\nvectorizer = TfidfVectorizer()\nfeatures_transformed = vectorizer.fit_transform(features)\n\n# Split into train and test datasets\nx_train, x_test, y_train, y_test = train_test_split(features_transformed, labels, test_size = 0.2)\n\n# Build the classification model\nmodel = MultinomialNB()\nmodel.fit(x_train, y_train)\n\n# Make predictions\ny_pred = model.predict(x_test)\n\n# Calculate the accuracy\naccuracy = np.mean(y_pred == y_test)\n\n# Print the accuracy\nprint(\"Model accuracy: {}%\".format(accuracy*100))"} {"instruction": "This code audits a user table and compares the current date to the last password update. If the last update exceeds the threshold, it sends a notice to the users. To use this code, define the imported libraries, turn the mail function on or off, define today and lookback day, define msg as multipart, application, and message to be sent to listed users, connect to the MySQL database, query the user table, format the data so it is in readable columns, send an email to the users displayed, close the database connection, and print the done message.", "input": "", "output": "#!/usr/bin/python2.7 -Wd\n'''\nfile:user_audit.py\nuse: audits users table and compares current date to last password update\n\t if last update exceeds threshold send a notice to users\nauthor: ty.talmadge@gmail.com\ndate: 20131002\nconnector: mysqldb because the SQL only changes per table layout\n'''\n# define imported libraries\nimport datetime,MySQLdb,smtplib\n# import mimetext if you want to include a copy of the password update policy\nfrom email.mime.text import MIMEText\n\n# turn mail function off and on\n# 0 is off 1 is on\nmail_on=0\n\n# define today and lookback day\nlookback_days=90\ntoday_day=datetime.datetime.today()\ntoday_holdout=datetime.date.today()\nday_format=\"%Y-%m-%d\"\nhour_format=\"%H:%M:%S\"\nthis_day=today_day.strftime(day_format)\nthis_hour=today_day.strftime(hour_format)\ntoday=\"%s %s\" % (this_day,this_hour)\nlookback=datetime.timedelta(days=lookback_days)\nholdout=today_holdout-lookback\nthreshhold_d=\"%s %s\" % (holdout,this_hour)\nthreshhold=str(threshhold_d)\n\n# define msg as multipart, application and message to be sent to listed users\naudit_file=\"/path/to/audit_message.txt\"\nap=open(audit_file, 'rb')\nmsg=MIMEText(ap.read())\nap.close()\nme='application_name@mycompany.com'\napplication_name='Your_Application'\n\n#connect to mysql database\naudit_db = MySQLdb.connect(host=\"localhost\",user=\"some_user\",passwd=\"some_password\",db=\"some_db_schema\")\n# create cursor object\ncursor = audit_db.cursor() \n# query user table\ncursor.execute(\"select name,full_name,password_created,email from users where password_created < '%s' order by name asc\" % threshhold)\nprint \"Auditing users starting %s and looking back %s days to %s.\\n\" % (today,lookback_days,threshhold)\nprint \"The following users have not updated their passwords in the last %s days.\\n \" % lookback_days\n# echo results if running in a scheduler, i.e. Control-M, Open-Scheduler, etc. so they will appear in sysout\n# format the data so it is in readable columns\nfor row in cursor.fetchall():\n pw_format=str(row[2])\n if mail_on == '0':\n\t# send an email to the users displayed\n\tmsg['Subject']='Password update reminder from %s' % application_name\n\tmsg['From']=me\n\tmsg['To']=row[3]\n\tsendme=smtplib.SMTP('mail_server')\n\tsendme=sendmail(me,[row[3]], msg.as_string())\n\tsendme.quit()\n else:\n\tprint row[0].ljust(30), \"\t \", row[1].ljust(30), \" \",pw_format.ljust(30), \" \", row[3].ljust(30)\n \n# close the database connection\naudit_db.close()\n# print the done message\nprint \"\\nFinished auditing user table.\\n\""} {"instruction": "Write a python program to classify a given sentence into positive or negative", "input": "", "output": "\"\"\"\nProgram to classify a sentence into positive or negative\n\"\"\"\n\ndef classify_sentence(sentence):\n \"\"\"Classifies a given sentence into positive or negative\n\n Args:\n sentence (str): The sentence to be classified\n\n Returns:\n str: 'positive' or 'negative'\n \"\"\"\n tokenized_sentence = sentence.split()\n num_positive = 0\n num_negative = 0\n for word in tokenized_sentence:\n if word in positive_words:\n num_positive += 1\n elif word in negative_words:\n num_negative += 1\n if num_positive > num_negative:\n return \"positive\"\n elif num_negative > num_positive:\n return \"negative\"\n else:\n return \"neutral\"\n\nif __name__ == '__main__':\n sentence = input()\n print(classify_sentence(sentence))"} {"instruction": "Write a REST API endpoint handler to get the latest books from a database.", "input": "", "output": "@app.route(\"/books/latest\", methods=[\"GET\"]) def get_latest_books(): cursor = conn.cursor() query = \"SELECT * FROM books ORDER BY id DESC LIMIT 10;\" cursor.execute(query) books = cursor.fetchall() return jsonify(books)"} {"instruction": "Generate a Python program to print out all possible permutation of a given list of elements.", "input": "[1, 2, 3]", "output": "def permutations(input_list):\n if len(input_list) == 1:\n return input_list\n output_list = []\n for value in input_list:\n temp_list = input_list[:]\n temp_list.remove(value)\n permutations_list = permutations(temp_list)\n for sub_list in permutations_list:\n output_list.append([value] + sub_list)\n return output_list"} {"instruction": "Given input strings s and t, find the length of the longest common substring.", "input": "s = \"abcde\" t = \"acfgh\"", "output": "The length of the longest common substring of s and t is 2, since the characters \"a\" and \"c\" are the longest common substring."} {"instruction": "Edit the following code such that output is an array of objects of key value pairs.", "input": "let fruit = [\"apple\", \"banana\", \"orange\"]; let colors = [\"red\", \"yellow\", \"orange\"];", "output": "let fruits = [\"apple\", \"banana\", \"orange\"]; let colors = [\"red\", \"yellow\", \"orange\"]; let fruitObj = []; for (let i = 0; i < fruits.length; i++) { let obj = {}; obj.name = fruits[i]; obj.color = colors[i]; fruitObj.push(obj); }"} {"instruction": "Create a function to sort an array of objects by the value of a certain key.", "input": "arr = [{'name': 'john', 'age': 20}, {'name': 'tim', 'age': 25}, {'name': 'mike', 'age': 30}];", "output": "def sort_by_key(arr, key): sorted_arr = sorted(arr, key=lambda k: k[key]) return sorted_arr # Testing arr = [{'name': 'john', 'age': 20}, {'name': 'tim', 'age': 25}, {'name': 'mike', 'age': 30}] sorted_arr = sort_by_key(arr, 'age') print(\"Sorted array by age: \", sorted_arr)"} {"instruction": "Write a function to parse a query string into its components in JavaScript.", "input": "query = \"name=John&age=30\"", "output": "function parseQueryString(query) { let components = query.split(\"&\"); let data = {}; for (let c of components) { let pair = c.split(\"=\"); data[pair[0]] = pair[1]; } return data; } console.log(parseQueryString(query)); // {name: 'John', age: '30'}"} {"instruction": "Create a JavaScript function to merge two variables into a single object.", "input": "var a = {name: 'John', age: 21}; var b = {surname: 'Doe', gender: 'male'};", "output": "function merge(a, b) { return Object.assign({}, a, b); } let result = merge(a, b); console.log(result); // {name: 'John', age: 21, surname: 'Doe', gender: 'male'}"} {"instruction": "Formulate a regex expression in JavaScript to verify if a given string contains only numbers.", "input": "", "output": "const isOnlyNumbers = (str) => { let regex = /^[0-9]+$/; return regex.test(str); };"} {"text": "[EN Wikipedia] Esther Shumiatcher-Hirschbein\n\nEsther Shumiatcher-Hirschbein (Yiddish: אסתר שומיאַטשער־הירשבײן) was a Belarusian-born Canadian and American Yiddish poet and screenwriter. Biographical details Shumiatcher was born on October 21, 1896, in Gomel to parents Judah and Chasia as one of eleven siblings. (Katz gives her birth year as 1899.) She and her family emigrated to Calgary, Alberta, Canada in 1911. All members of the family worked to support the household; they also had boarders in their house. Shumiatcher worked as a waitress and at a meat-packing plant until 1918, when she met and married Peretz Hirschbein, a Yiddish playwright from New York City, when he was on tour in Calgary. Shumiatcher had her son, Omus, in 1934 in New York. He would grow to become a prominent concert producer. Shumiatcher moved to Los Angeles in 1940 where her husband had an offer to write film scripts, of which one was produced. Her husband died in 1948 from lateral sclerosis, after which Shumiatcher primarily gave lectures. She eventually moved back to New York City, where she died in 1985. Career Herschbein exposed Shumiatcher to the Yiddish literary community, which inspired her to start writing in Yiddish as well. The couple settled in New York, but traveled extensively around the world, going through places such as the South Pacific, Asia, and Eastern Europe. In the 1920s they lived in Warsaw, Poland, where Shumiatcher's poetry was well received and published in modernist journals of the time. One such journal based in Berlin took its name, Albatros, from one of her poems. Shumiatcher wrote groundbreaking poems addressing pregnancy and motherhood following the birth of Omus. She also wrote about widowhood and grief following her husband's death. Other themes reflected eros, nature, and politics. Although she did not write much after 1956, her later works are more highly regarded. Some of her poetry has been translated by Myra Mniewski. She appears in Ezra Kerman's anthology of Yiddish female poets and is included among a group of Litvak women poets whom Dovid Katz credits with \"building\" Yiddish poetry outside Eastern Europe. Selected works In Tol (1920) Pasn Likht (1925) In Shoen Fun Libshaft (1930) Ale Tog (1939) Lider (1956) References Jewish women writers 20th-century Canadian poets American poets in Yiddish Canadian poets by language Canadian women screenwriters Canadian women poets 1896 births 1985 deaths People from Gomel Writers from Calgary Belarusian emigrants to Canada Jewish Canadian writers 20th-century Canadian women writers 20th-century Canadian screenwriters"} {"text": "[DE Wikipedia] Percee P\n\nPercee P, eigentlich John Percy Simon (* 9. Juli 1969 in der Bronx, New York) ist ein US-amerikanischer Underground Hip-Hop-Künstler. Nach über 14 Jahren mit zahlreichen viel beachteten Gastauftritten, bekam er 2003 einen Vertrag beim Plattenlabel Stones Throw. Leben 1988 wurde seine erste Single Let The Homicides Begin veröffentlicht. Durch seine Zusammenarbeit mit Lord Finesse hatte er die Möglichkeit, eine Unterrubrik des Radiosenders WKCR 89.9 FM zu moderieren. Percee P fiel vor allem auf Grund seiner außergewöhnlichen Sammlung von Oldschool-Hip-Hop-Mixtapes auf. 1992 wurde auf dem Label Big Beat Now They Wanna See Me herausgebracht. In den 1990er-Jahren hörte man wenig von ihm, nur die beiden 12 inches (Lung Collapsing Lyrics/1992 und Nowhere Near Simple/1996) kamen heraus und er hatte einige Gastauftritte. Darüber hinaus wurde er von DJ Shadow in Napalm Brain, Scatter Brain (auf dem Album Endtroducing/1996), gesamplet, was ihn schließlich bekannt machte (Napalm! When the bombs activated it mutilates your legs and arms!). Zu der Zeit verkaufte er seine Platten noch auf der Straße und in Clubs, 2003 bekam er dann seinen Vertrag bei Stones Throw. Diskographie Bei Stones Throw Perseverance, CD/LP 2007 Put It On The Line (Ox Remix/BX Remix), 12\" Single 2005 Untitled from Stones Throw 100, 12\" EP 2004 Jaylib - The Exclusive from Champion Sound, CD/LP 2003 Wildchild - Knicknack 2002 from Secondary Protocol, CD/LP 2003 Artist Releases Legendary Status, CD Compilation. 2005 (MTA) The One And Only: Greatest Hits, LP (Bootleg) Nowhere Near Simple, 12\" Single 1996 (Vmax) Percee-P & Ekim - Lung Collapsing Lyrics, 12\" Single 1992 (Big Beat) Percee P & D-Nique - Let the Homicides Begin Top Priority \"BQ In Full Effect\", 12\" EP 1988 (Gotham City) Literatur Juice (Ausgabe 6-2004) Weblinks HipHop.de stonesthrow.com Hip-Hop-Produzent US-Amerikaner Pseudonym Geboren 1969 Mann"} {"instruction": "Update the following code to sum the elements in a given list", "input": "list = [1,3,4,5]", "output": "sum = 0 for elem in list: sum += elem"} {"instruction": "Create a function in Python that sorts the elements of a given list.", "input": "[5, 7, 2, 3, 4, 1]", "output": "def sort_list(numbers):\n numbers.sort()\n return numbers\n\nresult = sort_list([5, 7, 2, 3, 4, 1])\nprint(result)"} {"instruction": "What is an object in object-oriented programming?", "input": "", "output": "In object-oriented programming, an object is a self-contained entity that contains both data and code, which together define and control its behavior. Objects can communicate with one another by sending messages and receiving data in response. Objects are used to represent real-world concepts, such as people, places, and things."} {"instruction": "Write a python script to detect duplicate words in a sentence.", "input": "Sentence: \"She was driving, driving down the road.\"", "output": "sentence = 'She was driving, driving down the road.'\nlist_words = sentence.split(\" \")\nduplicates = {i for i, x in enumerate(list_words) if list_words.count(x) > 1}\nprint(\"Duplicate words in the sentence are: \", end=\"\")\nfor duplicate in duplicates:\n print(list_words[duplicate], end=\" \")"} {"instruction": "Craft an algorithm in Python to move all zeroes in a list to the end of the list.", "input": "[3, 0, 1, 0, 5, 0, 2]", "output": "def move_zeroes(lst):\n # Count the number of non-zero elements\n num_non_zeroes = 0\n for num in lst:\n if num != 0:\n num_non_zeroes += 1\n \n # Initialize the new list\n new_lst = []\n \n # Move all non-zeroes to the beginning of the new list\n for i in range(num_non_zeroes):\n new_lst.append(lst[i])\n \n # Append 0's to the end\n for _ in range(len(lst)-num_non_zeroes):\n new_lst.append(0)\n \n # Return the new list\n return new_lst\n\nlst = [3, 0, 1, 0, 5, 0, 2]\nresult = move_zeroes(lst)\nprint(result)"} {"text": "[DE Wikipedia] Aileu (Mau-Nuno)\n\nAileu ist eine osttimoresische Aldeia im Suco Mau-Nuno (Verwaltungsamt Ainaro, Gemeinde Ainaro). 2015 lebten in der Aldeia 443 Menschen. Geographie und Einrichtungen Die Aldeia Aileu bildet den Mittelteil des Sucos Mau-Nuno. Westlich befindet sich die Aldeia Mama-Lau und östlich die Aldeia Mau-Suca. Im Norden grenzt Aileu an den Suco Mau-Ulo, im Süden an den Suco Cassa und im Südwesten an das Verwaltungsamt Zumalai (Gemeinde Cova Lima) mit seinem Suco Ucecai. Der Sarai, ein Nebenfluss des Belulik, folgt der Grenze im Norden und Osten. Einen Teil der Grenze im Westen bildet ein Zufluss des Molas. Der Mola ist auch der Grenzfluss zu Cova Lima. Der Ort Aileu wurde in der indonesischen Besatzungszeit aufgelöst und die Bewohner an der Stelle des heutigen Hauptortes Mau-Nuno umgesiedelt, wo auch die anderen Bewohner des Sucos hinkamen. Das Dorf Mau-Nuno erstreckt sich über alle drei Aldeias des Sucos in dessen Norden. Eine kleine Straße führt von hier in den Süden der Aldeia, wo sich das Dorf Lait befindet. Hier gibt es eine Grundschule. Einzelnachweise Aldeia in Ainaro (Gemeinde)"} {"instruction": "Write a function in JavaScript to reorder the given list in ascending order.", "input": "[3, 1, 2]", "output": "function sortAscending(list) { list.sort(function (a, b) { return a - b; }); return list; }"} {"instruction": "Identify and explain a memory leak in the following Python code.", "input": "def getData():\n data = []\n while True:\n val = input(\"Enter a value: \")\n if val == \"done\":\n break\n data.append(val)\n return data", "output": "The code in question contains a memory leak due to an infinite loop. Inside the loop, a new value is continuously added to the list ‘data’ without ever being removed. This will result in the list growing without bounds, resulting in the memory associated with the list being allocated indefinitely but never freed. To fix this memory leak, the list should be cleared or removed after each iteration of the loop. This can be done by simply setting the list to an empty list or by simply deleting the list."} {"text": "[CS Wikipedia] Luke Grimes\n\nLuke Timothy Grimes (* 21. ledna 1984) je americký herec, známý například svými rolemi ve filmech Americký sniper (2014) nebo v třídílné sérii Padesát odstínů. Objevil se však také ve dvou televizních seriálech. Externí odkazy Američtí herci Narození v roce 1984 Narození 21. ledna Narození v Daytonu Žijící lidé Muži"} {"text": "[HI Wikipedia] हैरी पॉटर और हाफ़-ब्लड प्रिंस (फ़िल्म)\n\nहैरी पॉटर और हाफ़-ब्लड प्रिंस () हॉलिवुड फ़िल्म, जो इसी नाम के उपन्यास पर आधारित है। यह हैरी पॉटर फिल्म श्रृंखला में छठी फिल्म है। सारी श्रंखला के डिस्ट्रिब्यूटर है वॉर्नर ब्रदर्स। पात्र राजेश काव प्रतिस्थापित करण त्रिवेदी जैसा हिन्दी डबिंग आवाज़ के लिए डैनियल रैड्क्लिफ़ जैसा हैरी पॉटर, पिछले तीन फिल्मों के लिए। हिन्दी डबिंग कर्मचारी डब वर्ष रिहाई: २००९ मीडिया: सिनेमा/वीसीडी/डीवीडी/ब्लू-रे डिस्क/टेलीविज़न द्वारा निर्देशित: एलिज़ा लुईस अनुवाद: अनजान समायोजन: अनजान उत्पादन: मेन फ़्रेम सॉफ्टवेयर कम्युनिकेशंस सन्दर्भ बाहरी कड़ियाँ 2009 की फ़िल्में ब्रिटिश फ़िल्में अमेरिकी फ़िल्में फ़िल्म आधार"} {"instruction": "Create a function that will accept a list and return the sum of all elements in the list", "input": "", "output": "def sum_list(mylist): s = 0 for x in mylist: s += x return s"} {"text": "[EN Wikipedia] Ada\n\nAda may refer to: Places Africa Ada Foah, a town in Ghana Ada (Ghana parliament constituency) Ada, Osun, a town in Nigeria Asia Ada, Urmia, a village in West Azerbaijan Province, Iran Ada, Karaman, a village in Karaman Province, Turkey Europe Ada, Bosnia and Herzegovina, a village Ada, Croatia, a village Ada, Serbia, a town and municipality Ada Ciganlija or Ada, a river island artificially turned into a peninsula in Belgrade, Serbia United States Ada, Alabama, an unincorporated community Ada County, Idaho Ada, Kansas, an unincorporated community Ada Township, Michigan Ada, Minnesota, a city Ada Township, Dickey County, North Dakota Ada, Ohio, a village Ada, Oklahoma, a city Ada, Oregon, an unincorporated community Ada Township, Perkins County, South Dakota Ada, West Virginia, an unincorporated community Ada, Wisconsin, an unincorporated community Other Ada River (disambiguation), various rivers 523 Ada, an asteroid Film and television Ada TV, a television channel in the Turkish Republic of Northern Cyprus Ada (1961 film), a 1961 film by Daniel Mann Ada (2019 film), a short biopic about Ada Lovelace Ada... A Way of Life, a 2008 Bollywood musical by Tanvir Ahmed Ada (dog actor), a dog that played Colin on the sitcom Spaced Ada, one of the main characters in 1991 movie Armour of God II: Operation Condor Biology Ada (plant), a genus of orchids Adenosine deaminase, an enzyme involved in purine metabolism Ada (protein), an enzyme induced by treatment of bacterial cells Computer science Ada (programming language), programming language based on Pascal Ada (computer virus) Air travel Ada Air, a regional airline based in Tirana, Albania Francisco C. Ada Airport, Saipan Island, Northern Mariana Islands Schools Ada, the National College for Digital Skills, a further education college in Tottenham Hale, London Ada High School (Ohio) Ada Independent School District, Oklahoma People Ada (name), a feminine given name and a surname, including a list of people and fictional characters Ada Lovelace (1815–1852), computer scientist sometimes regarded as the first computer programmer Ada of Caria (fl. 377 – 326 BCE), satrap of ancient Caria and adoptive mother of Alexander the Great Other uses List of tropical storms named Ada Ada (food), a traditional Kerala delicacy Ada, the cryptocurrency of the Cardano blockchain platform Ada Bridge, Belgrade, Serbia , a cargo vessel built for the London and South Western Railway Ada (ship), a wooden ketch, wrecked near Newcastle, New South Wales, Australia Ada class, a class of anti-submarine corvettes developed by Turkey Ada or Ardor: A Family Chronicle, novel by Vladimir Nabokov Dangme language, spoken in Ghana (ISO 639-2 and 639-3 code \"ada\") Ada Health GmbH, a symptom checker app See also ADA (disambiguation) Ada regulon, an…"} {"instruction": "Create a function to make a pyramid in Python with a given height.", "input": "", "output": "def pyramid(height): \n \n # Dot symbol for each row\n dots = \".\"\n \n # loop for printing the pyramid\n for i in range(height): \n # insert spaces\n for j in range(height-i-1): \n print(\" \", end='') \n for j in range(i+1): \n # print dots and concatenate\n print(dots + \" \", end='') \n dots += \"..\"\n \n # moving to the new line \n print(\"\\r\")"} {"instruction": "Devise a Python code to make a pyramid of stars.", "input": "", "output": "def stars(n): \n for i in range(1, n + 1): \n for j in range(1, i + 1): \n print(\"* \", end=\"\") \n print()"} {"instruction": "Write a Python program to calculate the median of three given numbers.", "input": "", "output": "def median_num(n1, n2, n3): if n1 > n2 and n2 > n3: return n2 elif n3 > n2 and n2 > n1: return n2 elif n1 > n3 and n3 > n2: return n3 elif n2 > n3 and n3 > n1: return n3 elif n2 > n1 and n1 > n3: return n1 else: return n1"} {"instruction": "Create a function in JavaScript to convert a number to its equivalent string format.", "input": "123", "output": "function numberToString(num){ return num.toString(); }"} {"text": "[CS Wikipedia] Kam, pánové, kam jdete?\n\nKam, pánové, kam jdete? je československý barevný film natočený režisérem Karlem Kachyňou v roce 1987 na námět Milana Ležáka ve Filmovém studiu Barrandov. V hlavní roli architekta procházejícího krizí středního věku se představí Karel Heřmánek. Filmová alegorie reflektuje náladu v československé společnosti 80. let 20. století stižené tehdejší šedou realitou a bezútěšností. V úvodu filmu (a pak ještě dále v ději) hraje na koncertě skladba Co s tím sklem hudební skupiny Tango, ve filmu se objeví i část videoklipu Karel nese asi čaj od Jiřího Korna. Děj Architekt ve středních letech Jan Kolvara se potýká s krizí středního věku, odcizením od manželky a klade si otázku, jak naložit se životem, který jej nutí k mnoha kompromisům. Jeho nejbližší okolí ho považuje za dobráka a slušného člověka. Společně s mladším kolegou Robertem dostal před časem od svého šéfa Vladimíra Crhy nabídku na projekt rehabilitačního sanatoria. Oba na tom tvrdě pracovali, ale postupně zjišťovali, že odvést kvalitní práci, navíc ve výsledku nepředraženou, je z mnoha důvodů nemožné. Crha ani nemá zájem je nechat projekt dokončit podle jejich představ a za jejich zády ho svěří své milence a podřízené Šárce Vaňkové, která jde na ruku dodavatelům a investorům. Kolvara se neshodne ani doma s manželkou Madlou. Jednoho dne se rozhodne vzepřít a vydá se v nevhodném oblečení a obuvi na stokilometrový dálkový pochod, kterého se účastní i Robert s přítelkyní Eliškou a Crha se svou milenkou a Kolvarovou kolegyní Vaňkovou. Během pouti, která je metaforou jeho dosavadního života, se mu vynořují vzpomínky na rodinu, zaměstnání, dokončenou rekonstrukci vilky ke spokojenosti majitele i jeho invalidní paní. Na 85. kilometru mu docházejí síly. Srovnává své účty s Crhou, když si na něm vybije svou naštvanost. Během odpočinku v oné vilce, kde Kolvarova rekonstrukce napomohla k zotavení manželce majitele, která již ztrácela smysl života, Crha slíbí, že bude své architekty podporovat. Celá skupinka přítomných lidí se baví, když se Jan objeví v televizi, kde ho reportéři zachytili vysíleného během pochodu. Ten mezitím nepozorován odchází rozhodnutý dosáhnout svého cíle... Obsazení Odkazy Reference Externí odkazy České hořké filmové komedie Filmy z roku 1987 Filmy Karla Kachyni"} {"instruction": "Write a code in Python to generate unique random numbers between 1 and 100", "input": "", "output": "import random\n\ndef generate_unique_randoms(n):\n res = [] \n while len(res) < n: \n x = random.randint(1, 100 )\n if x not in res: \n res.append(x) \n return res"} {"text": "[DE Wikipedia] Ángel Espinosa\n\nÁngel Espinosa Capó (* 2. Oktober 1966 in Holguín, Kuba; † 12. April 2017 in Hialeah Gardens, Florida, Vereinigte Staaten) war ein kubanischer Amateurboxer. Karriere Der hart schlagende Rechtsausleger war einer der überragenden Halbmittel- und Mittelgewichtler der 1980er Jahre und Angstgegner der Deutschen. Er schlug Sven Ottke, Henry Maske (drei Siege in drei Begegnungen), Enrico Richter und Michael Timm. Auch den US-amerikanischen Amateurweltmeister Darin Allen schlug er dreimal. Im Jahr 1983 wurde er in Santo Domingo Juniorenweltmeister im Halbweltergewicht, er besiegte dort im Finale den späteren Olympiasieger und Profiweltmeister Meldrick Taylor durch k. o. in der zweiten Runde. Bei den Senioren wurde er 1986 in Reno als Halbmittelgewichtler Amateurweltmeister. Bei der Weltmeisterschaft 1989 gewann er im Mittelgewicht in Moskau nur Silber, er besiegte dort im Halbfinale Sven Ottke, unterlag aber im Endkampf gegen Andrei Kurnjawka aus der Sowjetunion. Weitere Erfolge gelangen ihm unter anderem beim Chemiepokal in Halle (Saale), den er zwischen 1986 und 1988 dreimal gewann. 1987 setzte er sich auch beim Weltcup-Turnier in Belgrad mit einem Finalsieg über Maske durch und gewann die Panamerikanischen Spiele in Indianapolis mit einem Finalsieg gegen Darin Allen. Zwischen 1984 und 1991 gewann er siebenmal den kubanischen Meistertitel. Da Kuba aus politischen Gründen die Olympischen Spiele 1984 in Los Angeles boykottierte, organisierte man als Ersatz in Havanna ein „Freundschaftsturnier“ für die boykottierenden Nationen, das Espinosa in seiner Gewichtsklasse, unter anderem mit einem Sieg über Michael Timm, gewinnen konnte. Die Enttäuschung über die wegen des erneuten kubanischen Olympiaboykottes (Seoul 1988) verpasste Chance auf eine olympische Goldmedaille 1988 (die der zuvor dreimal gegen Espinosa unterlegene Henry Maske gewann), Eheprobleme sowie eine zunehmende Trunksucht führten dazu, dass Espinosa ab 1988 in eine persönliche Abwärtsspirale geriet, die auch seine Trainingsaktivitäten negativ beeinflusste. Ein ganzes Jahr lang stellte er das Training sogar vollständig ein und konnte auch nach dessen Wiederaufnahme nie mehr an seine früheren Erfolge anknüpfen, obwohl er 1991 nochmals kubanischer Meister im Halbschwergewicht wurde. Infolge von Differenzen mit dem kubanischen Boxsportverband beendete er kurz darauf im Zorn wiederum seine Karriere, nahm sie allerdings erneut auf, als er die Chance für sich sah, bei den Olympischen Spielen 1992 in Barcelona endlich doch noch die ersehnte Goldmedaille zu erringen. Dort zeigte er sich aber als schlecht vorbereitet und nur noch ein Schatten vergangener Zeiten. Er erreichte das Viertelfinale und verlor dort nach Punkten gegen den Polen Wojciech Bartnik. Dies war sein letzter von insgesamt über 300 Kämpfen.…"} {"instruction": "Generate a Python function that takes a string and returns the longest substring without repeating characters.", "input": "", "output": "def longestSubstringWithoutRepeatingCharacters(string):\n longest = \"\"\n current = \"\"\n for c in string:\n if c not in current:\n current += c\n else:\n if len(current) > len(longest):\n longest = current\n current = c\n if len(current) > len(longest):\n longest = current\n return longest"} {"instruction": "Add a function to implement a basic calculator in C++.", "input": "", "output": "#include using namespace std; int addition(int a, int b){ return (a+b); } // Subtraction function int subtraction(int a, int b){ return (a-b); } // Multiplication function int multiplication(int a, int b){ return (a*b); } // Division function int division(int a, int b){ return (a/b); } // Function to perform basic calculator operations int calculate(int a, int b, char c){ int result; switch (c){ case '+': result = addition(a, b); break; case '-': result = subtraction(a, b); break; case '*': result = multiplication(a, b); break; case '/': result = division(a, b); break; default: break; } return result; } int main(){ int x, y; char a; cout << \"Please enter two numbers: \"; cin >> x >> y; cout << \"Please enter an operator: \"; cin >> a; int result = calculate(x, y, a); cout << \"The result is: \" << result; return 0; }"} {"instruction": "Write a Python program to create a dictionary with values being doubled for every key.", "input": "{'a':4, 'b':7}", "output": "my_dict = {'a': 4, 'b': 7} double_dict = {k : 2*v for (k,v) in my_dict.items()} print(double_dict)"} {"instruction": "Edit the following code to generate a list of the vowels in a given string.", "input": "", "output": "def get_vowels(str): vowels = ['a', 'e', 'i', 'o', 'u'] res = [] for letter in str: if letter.lower() in vowels: res.append(letter) return res"} {"text": "[DE Wikipedia] Banjarnegara (Regierungsbezirk)\n\nBanjarnegara ist ein indonesischer Regierungsbezirk (Kabupaten) in der Provinz Jawa Tengah, im Zentrum der Insel Java. Mitte 2022 lebten hier über eine Million Menschen. Die Hauptstadt und Regierungssitz des Verwaltungsbezirks ist die Stadt Banjarnegara. Die Stadt liegt ca. 95 km südwestlich der Provinzhauptstadt Semarang. Geografie Der langgestreckte Regierungsbezirk (Entfernung vom Nordosten zum Südwesten ca. 70 km) erstreckt sich zwischen 7°12′ und 7°31′ s. Br. sowie zwischen 109°20′ und 109°45′ ö. L. Er hat im Westen den Kabupaten Purbalingga, im Norden Pekalongan, im Osten/Südosten Wonosobo, im Süden Kebumen und im Südwesten Banyumas als Nachbarn. Verwaltungsgliederung Der Regierungsbezirk wird administrativ in 20 Kecamatan (Distrikte) unterteilt. Eine weitere Unterteilung erfolgt in 290 Dörfer (davon 12 Kelurahan mit urbanem Charakter) sowie 979 Dusun mit 1.335 Rukun Warga (RW, Weiler) und 5.459 Rukun Tetangga (RT, Nachbarschaften). Demographie Zur Volkszählung im September 2020 lebten im Kabupaten Banjarnegara 1.017.767 Menschen, davon 500.711 Frauen (49,20 %) und 517.056 Männer. Gegenüber dem letzten Census (2010) sank der Frauenanteil um 0,60 Prozent. 68,95 % (701.767) gehörten 2020 zur erwerbsfähigen Bevölkerung; 22,62 % waren Kinder (bis 14 Jahre) und 8,43 % im Rentenalter (ab 65 Jahren). Mitte 2022 bekannten sich 99,48 Prozent der Einwohner zum Islam, Christen waren mit 0,45 % (3.554 ev.-luth. / 1.123 röm.-kath.) vertreten und 0,05 % waren Buddhisten. Zur gleichen Zeit waren von der Gesamtbevölkerung 39,83 % ledig; 54,36 % verheiratet; 2,00 % geschieden und 3,81 % verwitwet. Bevölkerungsentwicklung Bevölkerungsentwicklung des Kabupaten Banjarnegara von 1971 bis 2020 Ergebnisse der Volkszählungen Nr. 3 bis 8 – Sensus Penduduk (SP) Ergebnisse von drei intercensalen Bevölkerungsübersichten (1995, 2005, 2015) – Survei Penduduk Antar Sensus (SUPAS) Bevölkerungsfortschreibung Endjährliche Fortschreibung der Einwohnerzahlen auf Basis der lokalen Meldebehörden. {| class=\"wikitable\" | 2010 || 870.528 || rowspan=\"6\"| || 2016 || 907.410 |- | 2011 || 877.201 || 2017 || 912.917 |- | 2012 || 883.710 || 2018 || 918.219 |- | 2013 || 889.894 || 2019 || 923.192 |- | 2014 || 896.038 || 2020 || 1.017.767 |- | 2015 || 901.826 || 2021 || 1.026.865 |} Weblinks mannigfaltige Publikationen im PDF-Format auf der Statistikseite des Kabupaten Banjarnegara (indonesisch/englisch) Bevölkerung der Kecamatan 2021 (Grafik und Tabelle) (indonesisch) Einzelnachweise Kabupaten in Jawa Tengah Geographie (Java)"} {"instruction": "Write a C# program to sort a given array using the Quick Sort algorithm.", "input": "array = [8, 4, 1, 9, 6]", "output": "using System; namespace QuickSortExample { class Program { static void Main(string[] args) { int[] array = { 8, 4, 1, 9, 6 }; int left = 0; int right = array.Length - 1; quickSort(array, left, right); Console.WriteLine(\"Sorted array is:\"); foreach (int val in array) { Console.WriteLine(val); } } static void quickSort(int[] array, int left, int right) { if (left < right) { int pivotIndex = partition(array, left, right); quickSort(array, left, pivotIndex - 1); quickSort(array, pivotIndex + 1, right); } } static int partition(int[] array, int left, int right) { int pivot = array[right]; int pivotIndex = left; for (int i = left; i < right; i++) { if (array[i] <= pivot) { swap(array, i, pivotIndex); pivotIndex++; } } swap(array, right, pivotIndex); return pivotIndex; } static void swap(int[] array, int i, int j) { int temp = array[i]; array[i] = array[j]; array[j] = temp; } } }"} {"text": "[HI Wikipedia] रदरफोर्ड प्रकीर्णन\n\nरदरफोर्ड प्रकीर्णन अर्नेस्ट रदरफोर्ड द्वारा 1911 में प्रतिपादित भौतिक परिघटना है, जिसे बाद में परमाणु का रदरफोर्ड मॉडल (प्रतिमान) नाम से जाना जाने लगा और बाद में बोर मॉडल। रदरफोर्ड प्रकीर्णन को कई बार कुलाम्ब प्रकीर्णन की विशेष अवस्था भी कहा जाता है क्योंकि यह केवल स्थैतिक (कुलाम्ब) बलों पर लागू होता है और कणों के मध्य न्यूनतम दूरी इसके विभव द्वारा निर्धारित होती है। सोने के नाभिक (gold nuclie) व अल्फा कणों के मध्य चिरसम्मत रदरफोर्ड प्रकीर्णन प्रत्यास्थ प्रकीर्णन का एक उदाहरण है क्योंकि इसमें आपतित कण व प्रकीर्णित कण के ऊर्जा व वेग समान होते हैं। व्युत्पत्ति अनुप्रस्थ काट अवकलज केन्द्रीय बल के अधीन एक कण की अन्योन्य क्रिया को गति के समीकरणों से व्युत्पन्न किया जा सकता है। व्यापक रूप में गति की समीकरण के अनुसार यदि कोई दो कण किसी केन्द्रीय बल के अधीन अन्योन्य क्रिया करते हैं तो उन्हें द्रव्यमान केंद्र व उन कणों की पारस्परिक गति से अप-युग्मित किया जा सकता है। बिनट समीकरण के अनुसार जहाँ , नाभिक से अनन्त दूरी (जहाँ नाभिक के विद्युत क्षेत्र का प्रभाव नगण्य हो) और संघट्ट प्राचल है। उपरोक्त समीकरण का व्यापक हल निम्न है और सीमा शर्तें निम्न हैं माना तब प्रकीर्णन कोण θ का मान, समीकरण में लिखने पर इसे हल करने पर b का निम्न मान प्राप्त होता है- प्रकीर्णन अनुप्रस्थ काट ज्ञात करने के लिए, इसे निम्न प्रकार से परिभाषित किया जाता है सन्दर्भ भौतिक शब्दावली"} {"instruction": "Create a Python program to generate a random password at least eight characters long.", "input": "", "output": "import string\nimport random\n\ndef gen_password(length):\n all_chars = string.ascii_letters + string.digits + string.punctuation\n generated_password = ''.join(random.choice(all_chars) for _ in range(length))\n return generated_password\n\nif __name__ == '__main__': \n password = gen_password(8)\n print(password)"} {"text": "[HI Wikipedia] दरभंगा\n\nदरभंगा (𑂠𑂩𑂦𑂁𑂏𑂰) भारत के बिहार राज्य के मिथिला क्षेत्र में दरभंगा ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। विवरण दरभंगा बागमती नदी के किनारे बसा हुआ है। यह ज़िले एवं प्रमंडल का मुख्यालय है। दरभंगा प्रमंडल के अंतर्गत तीन जिले दरभंगा, मधुबनी एवं समस्तीपुर आते हैं। दरभंगा के उत्तर में मधुबनी, दक्षिण में समस्तीपुर, पूर्व में सहरसा एवं पश्चिम में मुजफ्फरपुर तथा सीतामढ़ी जिला है। दरभंगा शहर के बहुविध एवं आधुनिक स्वरुप का विकास सोलहवीं सदी में मुग़ल व्यापारियों तथा ओईनवार शासकों द्वारा विकसित किया गया। दरभंगा 16वीं सदी में स्थापित दरभंगा राज की राजधानी था। अपनी प्राचीन संस्कृति और बौद्धिक परंपरा के लिये यह शहर विख्यात रहा है। इसके अलावा यह जिला आम और मखाना के उत्पादन के लिए प्रसिद्ध है। नामकरण दरभंगा शब्द संस्कृत भाषा के शब्द 'द्वार-बंग' या फारसी भाषा के 'दर-ए-बंग' यानी बंगाल का दरवाजा का मैथिली भाषा में कई सालों तक चलनेवाले स्थानीयकरण का परिणाम है। ऐसा कहा जाता है कि मुगल काल में दरभंगी खां ने शहर बसाया था। दरभंगी खां स्वेत ब्राह्मण थे उन्होने कालांतर मे इस्लाम कबुल किया था। जिन्हें महराज दरभंगा के द्वारा \"खां\" की उपाधि मिली थी। आज भी खां वंसज दरभंगा में निवास करते हैं'। दरभंगा की स्थापना 1 जनवरी 1875 को हुई थी। इतिहास वैदिक स्रोतों के मुताबिक आर्यों की विदेह शाखा ने अग्नि के संरक्षण में सरस्वती तट से पूरब में सदानीरा (गंडक) की ओर कूच किया और विदेह राज्य की स्थापना की। विदेह के राजा मिथि के नाम पर यह प्रदेश मिथिला कहलाने लगा। रामायणकाल में मिथिला के एक राजा जो जनक कहलाते थे, सिरध्वज जनक की पुत्री सीता थी। विदेह राज्य का अंत होने पर यह प्रदेश वैशाली गणराज्य का अंग बना। इसके पश्चात यह मगध के मौर्य, शुंग, कण्व और गुप्त शासकों के महान साम्राज्य का हिस्सा रहा। १३ वीं सदी में पश्चिम बंगाल के मुसलमान शासक हाजी शम्सुद्दीन इलियास के समय मिथिला एवं तिरहुत क्षेत्रों का बँटवारा हो गया। उत्तरी भाग जिसके अंतर्गत मधुबनी, दरभंगा एवं समस्तीपुर का उत्तरी हिस्सा आता था, सुगौना के ओईनवार राजा कामेश्वर सिंह के अधीन रहा। ओईनवार राजाओं को कला, संस्कृति और साहित्य का बढ़ावा देने के लिए जाना जाता है। कुमारिल भट्ट, मंडन मिश्र, गदाधर पंडित, शंकर, वाचास्पति मिश्र, विद्यापति, नागार्जुन,चन्द्र मोहन पोद्दार आदि महान विद्वानों के लेखन से इस क्षेत्र ने प्रसिद्धि पाई। ओईनवार राजा शिवसिंह के पिता देवसिंह ने लहेरियासराय के पास देवकुली की स्थापना की थी। शिवसिंह के बाद यहाँ पद्मसिंह, हरिसिंह, नरसिंहदेव, धीरसिंह, भैरवसिंह, रामभद्र, लक्ष्मीनाथ, कामसनारायण राजा हुए। शिवसिंह तथा भैरवसिंह द्वारा जारी किए गए सोने एवं चाँदी के सिक्के यहाँ के इतिहास ज्ञान का अच्छा स्रोत है। दरभंगा शहर १६ वीं सदी में दरभंगा राज की राजधानी थी। १८४५ इस्वी में ब्रिटिश सरकार ने दरभंगा सदर को अनुमंडल बनाया और १८६४ ईस्वी में दरभंगा शहर नगर निकाय बन गया। १८७५ में स्वतंत्र जिला बनने तक यह तिरहुत के साथ था। १९०८ में तिरहुत के प्रमंडल बनने पर इसे पटना प्रमंडल से हटाकर तिरहुत में शामिल कर लिया गया। स्वतंत्रता के पश्चात १९७२ में दरभंगा को प्रमंडल का दर्जा देकर मधुबनी तथा समस्तीपुर को इसके अंतर्गत रखा गया। भौगोलिक…"} {"text": "[EN Wikipedia] Waiaruhe River\n\nThe Waiaruhe River is a river of the Northland Region of New Zealand's North Island. It flows northeast from its origins close to Ngawha Springs to reach the northern Waitangi River ten kilometres south of Kerikeri. See also List of rivers of New Zealand References Rivers of the Northland Region Rivers of New Zealand"} {"text": "[HI Wikipedia] पॉस्सम\n\nपॉस्सम (Possum) ऑस्ट्रेलिया, नया गिनी और सुलावेसी पर पाए जाने वाले ७० धानीप्राणी (मारसूपियल) जातियों के एक समूह का नाम है। आधुनिक युग में मानवीय गतिविधियों से यह न्यू ज़ीलैंड और चीन में भी विस्तृत हो गए हैं। यह छोटे और मध्यम आकारों के होते हैं। विवरण पॉस्सम चार पाँव पर चलने वाले और अधिकतर वृक्षों पर रहने वाले प्राणी हैं। इनकी दुमें लम्बी और मोटी होती हैं। इनकी सबसे छोटी जाति 'नन्हा पिग्मी पॉस्सम' (Little Pygmy Possum) केवल ७ सेमी लम्बा और 10 ग्राम से भी कम वज़न वाला होता है। इसके विपरीत इनकी सबसे बड़ी जाति 'भालू कुसकुस' (Bear Cuscus) ७ किलो से भी ज़्यादा भार रख सकता है। पॉस्सम रात को सक्रीय होते हैं और शाकाहारी या सर्वाहारी होते हैं। कुछ पॉस्सम बहुत ही विशेष ख़ुराक रखते हैं। उदाहरण के लिए 'पहाड़ी पिग्मी पॉस्सम' (Mountain Pygmy Possum) केवल कीट खाता है जबकि 'शहदी पॉस्सम' (Honey Possum) शहद पर गुज़ारा करता है। इन्हें भी देखें धानीप्राणी सन्दर्भ पॉस्सम ऑस्ट्रेलिया के धानीप्राणी न्यू गिनी के स्तनधारी"} {"instruction": "Create a SQL query to get the total count of the employees in the team that have the job title of \"software engineer\".", "input": "Table: Employees Columns: id (int), name (string), job_title (string), team (string)", "output": "SELECT COUNT(*) AS total_count FROM Employees WHERE job_title=\"software engineer\""} {"instruction": "Replace words with corresponding synonyms in the given text", "input": "text: \"The cat is lazy and likes to sleep.\" word: \"sleep\" synonym: \"nap\"", "output": "# Replace words with corresponding synonyms in the given text text = \"The cat is lazy and likes to sleep.\" # Replace the word text = text.replace(\"sleep\", \"nap\") print(text) # \"The cat is lazy and likes to nap.\""} {"instruction": "Generate a Python class for storing employee information. The class should include properties for name, age, salary, and role as well as methods for getting, setting, and displaying information for an employee.", "input": "Not applicable", "output": "class Employee:\n def __init__(self, name, age, salary, role):\n self.name = name\n self.age = age\n self.salary = salary\n self.role = role\n \n def get_name(self):\n return self.name\n \n def set_name(self, name):\n self.name = name\n \n def get_age(self):\n return self.age\n \n def set_age(self, age):\n self.age = age\n \n def get_salary(self):\n return self.salary\n \n def set_salary(self, salary):\n self.salary = salary\n \n def get_role(self):\n return self.role\n \n def set_role(self, role):\n self.role = role\n \n def display_employee_info (self):\n print(\"Name:\",self.name,\"\\nAge:\",self.age,\"\\nSalary:\",self.salary,\"\\nRole:\",self.role)"} {"instruction": "Given a string, write a code that counts the number of alphabets in it.", "input": "input_string = \"Hello World!\"", "output": "input_string = \"Hello World!\" # Count the number of alphabets num_alphabets = sum(c.isalpha() for c in input_string) print(\"Number of alphabets in the string:\", num_alphabets)"} {"instruction": "Write a Python program to fill a dictionary with key as a number and value as a string for square with {1: \"1\", 2: \"4\", 3: \"9\", ...}.", "input": "", "output": "dic = {} for i in range (1,11): dic[i] = str(i ** 2) print(dic)"} {"text": "[DE Wikipedia] Suaman District\n\nDer Suaman District ist der kleinste der neun Distrikte der Western North Region des Staates Ghana. Er grenzt im mittleren Westen an das Nachbarland Elfenbeinküste. Der waldreiche Distrikt liegt in der Zone des tropischen Regenwaldes. Der größte Fluss ist der Bia. Die Nationalstraße 12 führt auf der Strecke von Elubo nach Sunyani von Süd nach Nordost durch den Distrikt. Weblinks Suaman District. In: ghanadistricts.com, abgerufen am 3. Januar 2022. Populations of Regions and Districts, General Report Volume 3A Statistical Service Ghana, Zensus 2021, abgerufen am 11. Dezember 2021. (PDF-Datei; 4,8 MB)"} {"instruction": "Develop a program in Python that implements Binary Search tree.", "input": "", "output": "class Node: \n def __init__(self, key): \n self.key = key \n self.left = None\n self.right = None\n \ndef insert(root, key): \n \n if root is None: \n return Node(key) \n \n if root.key < key: \n root.right = insert(root.right, key) \n else: \n root.left = insert(root.left, key) \n \n return root"} {"instruction": "Modify the given program so that it can output the average of numbers a,b, and c.", "input": "a = 2 b = 5 c = 7", "output": "def average(a, b, c): return (a + b + c) / 3 a = 2 b = 5 c = 7 average = average(a, b, c) print(\"Average of a, b and c is:\", average)"} {"instruction": "How do you create a MySQL query to find a specific employee by their name in a table named 'employees'?", "input": "", "output": "SELECT * FROM employees WHERE name = '';"} {"instruction": "Create a program in Python that takes a list of words and an integer n and returns a list of words that appear at least n times in the given list.", "input": "words =['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd']\nn = 3", "output": "from collections import Counter\n\ndef frequent_words(words, n):\n counts = Counter(words)\n return [word for word, count in counts.items() if count >= n]\n\nresult = frequent_words(words, n)\n\nprint(result) # prints ['a', 'd']"} {"instruction": "Describe the action taken by the following code snippet and provide a sample output", "input": "def format_string(x): return \"The output is: {}\".format(x)", "output": "The code snippet takes an input string, ``x``, and formats it by adding a prefix of \"The output is: \" to it and returns the formatted string. For example, if the input string is \"Hello\", the output string will be \"The output is: Hello\"."} {"instruction": "Write a Python program to remove the nth index character from a nonempty string.", "input": "var_str = Python, n = 0", "output": "def remove_character(var_str, n): first_part = var_str[:n] last_part = var_str[n+1:] return first_part + last_part print(remove_character('Python', 0)) Output: ython"} {"text": "[EN Wikipedia] Alexis Carrel\n\nAlexis Carrel (; 28 June 1873 – 5 November 1944) was a French surgeon and biologist who was awarded the Nobel Prize in Physiology or Medicine in 1912 for pioneering vascular suturing techniques. He invented the first perfusion pump with Charles Lindbergh opening the way to organ transplantation. Carrel was also a pioneer in transplantology and thoracic surgery. He is known for his leading role in implementing eugenic policies in Vichy France. Biography Born in Sainte-Foy-lès-Lyon, Rhône, Carrel was raised in a devout Catholic family and was educated by Jesuits, though he had become an agnostic by the time he became a university student. He was a member of learned societies in the U.S., Spain, Russia, Sweden, the Netherlands, Belgium, France, Vatican City, Germany, Italy, and Greece, and was elected twice, in 1924 and 1927, as an honorary member of the Academy of Sciences of the USSR. He also received honorary doctorates from Queen's University of Belfast, Princeton University, California, New York, Brown University, and Columbia University. In 1902, he was claimed to have witnessed the miraculous cure of Marie Bailly at Lourdes, which became famous in part because she named Carrel as a witness of her cure. After the notoriety surrounding the event, Carrel could not obtain a hospital appointment because of the pervasive anticlericalism in the French university system at the time. In 1903, he emigrated to Montreal, Canada, but soon relocated to Chicago, Illinois, to work for Hull Laboratory. While there he collaborated with American physician Charles Claude Guthrie in work on vascular suture and the transplantation of blood vessels and organs as well as the head, and Carrel was awarded the 1912 Nobel Prize in Physiology or Medicine for these efforts. In 1906, he joined the newly formed Rockefeller Institute of Medical Research in New York where he spent the rest of his career. There he did significant work on tissue cultures with pathologist Montrose Thomas Burrows. In the 1930s, Carrel and Charles Lindbergh became close friends not only because of the years they worked together but also because they shared personal, political, and social views. Lindbergh initially sought out Carrel to see if his sister-in-law's heart, damaged by rheumatic fever, could be repaired. When Lindbergh saw the crudeness of Carrel's machinery, he offered to build new equipment for the scientist. Eventually they built the first perfusion pump, an invention instrumental to the development of organ transplantation and open heart surgery. Lindbergh considered Carrel his closest friend, and said he would preserve and promote Carrel's ideals after his death. Due to his close proximity with Jacques Doriot's fascist Parti Populaire Français (PPF) during the 1930s and his role in…"} {"text": "[EN Wikipedia] Gmina Wilga\n\nGmina Wilga is a rural gmina (administrative district) in Garwolin County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Wilga, which lies approximately 17 kilometres (10 mi) south-west of Garwolin and 49 km (30 mi) south-east of Warsaw. The gmina covers an area of , and as of 2006 its total population is 5,262. Villages Gmina Wilga contains the villages and settlements of Celejów, Cyganówka, Goźlin Górny, Goźlin Mały, Holendry, Malinówka, Mariańskie Porzecze, Nieciecz, Nowe Podole, Nowy Żabieniec, Ostrybór, Ruda Tarnowska, Skurcza, Stare Podole, Stary Żabieniec, Tarnów, Trzcianka, Uścieniec-Kolonia, Wicie, Wilga, Wólka Gruszczyńska and Zakrzew. Neighbouring gminas Gmina Wilga is bordered by the gminas of Garwolin, Łaskarzew, Maciejowice, Magnuszew, Sobienie-Jeziory and Warka. References Polish official population figures 2006 Wilga Garwolin County"} {"instruction": "Given a string, find the longest palindrome within it.", "input": "string = \"ananabay\"", "output": "def longest_palindrome(string): \"\"\" Find the longest palindrome within a given string \"\"\" start, end, max_len = 0, 0, 0 for i in range(len(string)): # Odd length of palindrome left, right = i, i while left >= 0 and right < len(string) and string[left] == string[right]: length = right - left + 1 if max_len < length: max_len = length start = left end = right left -= 1 right += 1 # Even length of palindrome left, right = i, i+1 while left >= 0 and right < len(string) and string[left] == string[right]: length = right - left + 1 if max_len < length: max_len = length start = left end = right left -= 1 right += 1 return string[start:end+1]"} {"instruction": "Create a while loop that prints the numbers 1-10", "input": "", "output": "i = 1 while i <= 10: print(i) i += 1"} {"instruction": "Propose a solution to fetch an online catalog of products and display them in a tabular format using Python.", "input": "Catalog consisting of 1000 products", "output": "import requests\nimport pandas as pd\n\n# Set the request URL\nurl = \"http://example.com/products\"\n\n# Send the request and retrieve the data\ndata = requests.get(url).json()\n\n# Convert the data into a pandas DataFrame\ndf = pd.DataFrame(data)\n\n# Print the resulting table\nprint(df)"} {"instruction": "Write a code that uses a for-loop to print out the elements of the following array:", "input": "my_list = [1,2,3,4]", "output": "for element in my_list: print(element)"} {"text": "[EN Wikipedia] The Sketch\n\nThe Sketch was a British illustrated weekly journal. It ran for 2,989 issues between 1 February 1893 and 17 June 1959. It was published by the Illustrated London News Company and was primarily a society magazine with regular features on royalty, aristocracy and high society, as well as theatre, cinema and the arts. It had a high photographic content with many studies of society ladies and their children as well as regular layouts of point to point racing meetings and similar events. Clement Shorter and William Ingram started The Sketch in 1893. Shorter was the first editor, from 1893 to 1900, succeeded by John Latey (until his death in 1902) and then Keble Howard. Bruce Ingram was editor from 1905 to 1946. The magazine is remembered for first publishing the illustrations of Bonzo the dog by George E. Studdy (from 1921). It featured series of short stories within its pages, one per issue, with authors such as Walter de la Mare and Algernon Blackwood. Under the editorship of Bruce Ingram, it was also the first magazine to publish short stories by Agatha Christie, starting with \"The Affair at the Victory Ball\" in issue 1571 on 7 March 1923. Altogether, Christie wrote 49 stories for The Sketch between 1923 and 1924 (just under a third of her total output of short stories) which were later collected into some or all of the contents of the volumes Poirot Investigates (1924), The Big Four (1927), Partners in Crime (1929), Poirot's Early Cases (1974), and While the Light Lasts and Other Stories (1997). Christie dedicated the 1953 novel A Pocket Full of Rye to Ingram. The Sketch printed photographs by Howard Coster, and illustrations by H. M. Bateman, Max Beerbohm, Edmund Blampied, Percy Venner Bradshaw (1877–1965), Thomas Arthur Browne, Hilda Cowham, Annie Fish, John Hargrave, John Hassall, Phil May, Bernard Partridge, Melton Prior, W. Heath Robinson, Josep Segrelles, Sidney Sime, Olive Snell, Bert Thomas, and Thomas Downey. Writers included Carleton Allen, Lucie Armstrong, Nora Hopper, William Robertson Nicoll and John Courtenay Trewin. Keble Howard, editor until 1905, continued to contribute a column titled Motley Notes until two-weeks prior to his death, his final piece appearing on 14 March 1928. The British Library holds a complete run of The Sketch. References External links Online Archives of The Sketch 1893 establishments in the United Kingdom 1959 disestablishments in the United Kingdom Visual arts magazines published in the United Kingdom Weekly magazines published in the United Kingdom Defunct magazines published in the United Kingdom Magazines established in 1893 Magazines disestablished in 1959"} {"instruction": "Create a web scraper in Python to scrape the content from a website", "input": "Website URL: https://www.example.com", "output": "import requests\nfrom bs4 import BeautifulSoup\n\ndef scraper(url):\n response = requests.get(url)\n soup = BeautifulSoup(response.content, 'html.parser')\n for article in soup.find_all('article'):\n print(article.text)\n\nif __name__ == \"__main__\":\n scraper(\"https://www.example.com\")"} {"text": "[HI Wikipedia] पुणे\n\nपुणे भारत के महाराष्ट्र राज्य का एक महत्त्वपूर्ण शहर है। पुणे भारत का छठवां सबसे बड़ा शहर व महाराष्ट्र का दूसरा सबसे बड़ा शहर है।. यह शहर महाराष्ट्र के पश्चिम भाग, मुला व मुठा इन दो नदियों के किनारे बसा है और पुणे जिला का प्रशासकीय मुख्यालय है। सार्वजनिक सुखसुविधा व विकास के हिसाब से पुणे महाराष्ट्र मे मुंबई के बाद अग्रसर है। )अनेक नामांकित शिक्षणसंस्थायें होने के कारण इस शहर को 'पूरब का ऑक्सफोर्ड' भी कहा जाता है। पुणे में अनेक प्रौद्योगिकी और ऑटोमोबाईल उपक्रम हैं, इसलिए पुणे भारत का ”डेट्राइट” जैसा लगता है। काफी प्राचीन ज्ञात इतिहास से पुणे शहर महाराष्ट्र की 'सांस्कृतिक राजधानी' माना जाता है। मराठी भाषा इस शहर की मुख्य भाषा है। पुणे शहर मे लगभग सभी विषयों के उच्च शिक्षण की सुविधा उपलब्ध है। पुणे विद्यापीठ, राष्ट्रीय रासायनिक प्रयोगशाला, आयुका, आगरकर संशोधन संस्था, सी-डैक जैसी आन्तरराष्ट्रीय स्तर के शिक्षण संस्थान यहाँ है। पुणे फिल्म इन्स्टिट्युट भी काफी प्रसिद्ध है। पुणे महाराष्ट्र व भारत का एक महत्त्वपूर्ण औद्योगिक केन्द्र है। टाटा मोटर्स, बजाज ऑटो, भारत फोर्ज जैसे उत्पादनक्षेत्र के अनेक बड़े उद्योग यहाँ है। 1990 के दशक मे इन्फोसिस, टाटा कंसल्टंसी सर्विसे, विप्रो, सिमैंटेक, आईबीएम जैसे प्रसिद्ध सॉफ्टवेअर कंपनियों ने पुणे मे अपने केन्द्र खोले और यह शहर भारत का एक प्रमुख सूचना प्रौद्योगिकी उद्योगकेन्द्र के रूप मे विकसित हुआ। नाम पुणे यह नाम 'पुण्यनगरी' नाम से आया समझा जाता है। यह शहर ई.स. 8 के शतक मे 'पुन्नक' (या 'पुण्यक') नाम से जाना जाता था, ऐसा सन्दर्भ मिलता है। ई.स. 11 के शतक मे 'कसबे पुणे' या 'पुनवडी' नाम से जाना जाने लगा। मराठा साम्राज्य के काल खण्ड मे शहर का नाम 'पुणे' मे रूप मे उपयोग मे लाया जाने लगा। ब्रिटिश ने उसे 'पूना' कह कर सम्बोधित करने की शुरूवात की। अब यह पुणे, इस आधिकारिक नाम से जाना जाता है। इतिहास आठवी शताब्दी मे पुणे को \"पुन्नक \" नाम से जाना जाता था। शहर का सबसे पुराना वर्णन ई.स. 758 का है, जब उस काल के राष्ट्रकूट राज मे इसका उल्लेख मिलता है। मध्ययुग काल का एक प्रमाण जंगली महाराज मार्ग पर पाई जाने वाली पातालेश्वर गुफा है, जो आठ्वी सदी की मानी जाती है। 17वीं शताब्दी मे यह शहर निजामशाही, आदिलशाही, मुगल ऐसे विभिन्न राजवंशो का अंग रहा। सतरहवी शताब्दी में शहाजीराजे भोसले को निजामशाहा ने पुणे की जमीनदारी दी थी। इस जमींदारी मे उनकी पत्नी जिजाबाई ने ई.स. 1627 में शिवनेरी किले पर छत्रपति शिवाजीराजे भोसले को जन्म दिया। शिवाजी महाराज ने अपने साथियों के साथ पुणे परिसर में मराठा साम्राज्य की स्थापना की। इस काल मे पुणे में शिवाजी महाराज का वर्चस्व था। आगे पेशवा के काल मे ई.स. 1749 सातारा को छत्रपति की गद्दी और राजधानी बना कर पुणे को मराठा साम्राज्य की 'प्रशासकीय राजधानी' बना दी गई। पेशवा के काल मे पुणे की काफी तरक्की हुई। ई.स. 1818 तक पुणे मे मराठों का राज्य था। मराठा साम्राज्य पुणे छत्रपति शिवाजी महाराज के जीवन व मराठा साम्राज्य के इतिहास का एक महत्वपूर्ण अंग है। ई.स. 1635-36 के दरमयान जब जिजाबाई व शिवाजी महाराज पुणे आवास के लिए आए, तबसे पुणे के इतिहास में एक नए पर्व का जन्म हुआ। शिवाजी महाराज व जिजामाता पुणे में लाल महल मे रहते थे। पुणे के…"} {"instruction": "Write a HTML tag that creates a hyperlink to a given URL.", "input": "https://www.example.com", "output": "[Link text]"} {"instruction": "Create a Python function to calculate the sum of the list elements.", "input": "[1, 3, 4, 7, 9]", "output": "def list_sum(list_in):\n return sum(list_in)\n\n# or\ndef list_sum(list_in):\n total_sum = 0\n \n for num in list_in:\n total_sum += num\n \n return total_sum"} {"instruction": "Construct a SQL query to list the unique countries from table countries.", "input": "", "output": "SELECT DISTINCT country FROM countries;"} {"instruction": "Write a code which generates the Fibonacci sequence.", "input": "", "output": "\"\"\" Write a code which generates the Fibonacci sequence \"\"\" def generate_fibonacci_sequence(n): a = 0 b = 1 if n == 1: print(a) else: print(a) print(b) for i in range(2,n): c = a + b a = b b = c print(c) if __name__ == '__main__': n = 9 generate_fibonacci_sequence(n)"} {"instruction": "Write a PHP program to build a dynamic HTML table with the details of 10 students.", "input": "", "output": "$students = [ [ 'name' => 'John Doe', 'age' => 22, 'marks' => 91 ], [ 'name' => 'Jane Doe', 'age' => 21, 'marks' => 87 ], // ... ]; $html = \"\"; foreach ($students as $student) { $html .= \"\"; } $html .= \"
    Name Age Marks
    {$student['name']} {$student['age']} {$student['marks']}
    \"; echo $html;"} {"instruction": "Explain how to implement a heap sort algorithm in Java.", "input": "", "output": "// To implement a heap sort algorithm in Java: // 1. Build a min heap from the input data. // 2. At the top of the heap, obtain the minimum element. // 3. Exchange the minimum element with the last element of the heap. // 4. Reduce the size of the heap by one and heapify the root of the heap. // 5. Repeat steps 2-4 until all the elements are sorted. // 6. Return the sorted array."} {"text": "[DE Wikipedia] Ernst-Volker Staub\n\nErnst-Volker Wilhelm Staub (* 30. Oktober 1954 in Hamburg; Aliasnamen: Robert Hagen, Rolf Krause, Ulrich Schulte und weitere) ist ein Terrorist der Rote Armee Fraktion (RAF). 1986 wurde er zu einer Freiheitsstrafe von vier Jahren verurteilt. Nach Staub wird wegen Beteiligung an dem Sprengstoffanschlag gegen die JVA Weiterstadt, Mitgliedschaft in einer terroristischen Vereinigung und mehrerer Raubüberfälle nach Auflösung der RAF gefahndet. Leben Staub bestand sein Abitur am Gymnasium Farmsen und studierte ab 1975 Sprachwissenschaften, Phonetik und ab Sommer 1976 auch Rechtswissenschaft an der Universität Hamburg. Mit seiner Exmatrikulation 1982 verlor sich seine Spur; er ging laut Butz Peters spätestens im Juni 1983 in den Untergrund. Im Juli 1984 wurde er gemeinsam mit Helmut Pohl aus der Kommandoebene der RAF und weiteren Mitgliedern der „Ebene der Militanten“ in einer konspirativen Wohnung in Frankfurt am Main verhaftet und am 5. Februar 1986 vom Bayerischen Obersten Landesgericht wegen Mitgliedschaft in einer terroristischen Vereinigung, unerlaubten Waffenbesitzes und Urkundenfälschung (eines Reisepasses) zu einer Freiheitsstrafe von vier Jahren verurteilt. Während seiner Haft beteiligte sich Staub am Hungerstreik 1984/85. Nach dem Ende der Haftstrafe zog er im Juli 1988 nach Hamburg und unterhielt Kontakte zu Hamburger und Wiesbadener Unterstützern der RAF. Er tauchte im Frühjahr 1990 unter und schloss sich offenbar erneut der RAF an. Seit 1991 wurde daher wieder nach ihm gefahndet. Damals wurden laut Bundeskriminalamt Haarreste von ihm an einem Motorradhelm gefunden. Über die mutmaßliche Zugehörigkeit Staubs zur Kommandoebene der dritten RAF-Generation sind die Erkenntnisse der Ermittlungsbehörden unzureichend. Auf einem Brief der damaligen RAF-Leitfigur Birgit Hogefeld, der nach dem GSG-9-Einsatz in Bad Kleinen bei ihr sichergestellt wurde, fand man Staubs Fingerabdrücke. Die ebenfalls als mutmaßliches RAF-Mitglied geltende Daniela Klette wird als „Gefährtin“ oder „Freundin“ Staubs bezeichnet; bei einem verdächtig wirkenden, nicht überprüften Pärchen, das beim Einsatz von Bad Kleinen auf dem Bahnhofsvorplatz anwesend war, vermuten die Ermittlungsbehörden, es könne sich um Klette und Staub gehandelt haben (siehe Bad Kleinen/Auswirkungen). Laut einer Stilanalyse der im April 1998 veröffentlichten Auflösungserklärung der RAF lassen sich mehrere Formulierungen des Schreibens Staub als Autor zuordnen. Im Oktober 2007 bestätigte die Bundesanwaltschaft, sie halte Staub, Klette und Burkhard Garweg für drei der fünf Täter beim Sprengstoffanschlag gegen die JVA Weiterstadt im Jahr 1993. Sie seien durch DNA-Spuren vom Tatort identifiziert worden. Auch nach der Auflösung der RAF werden Staub, Klette und Garweg vom Bundeskriminalamt wegen Mitgliedschaft in…"} {"text": "[DE Wikipedia] Katharinenkloster\n\nEin Katharinenkloster, das auf eine der Heiligen Katharinas zurückgeht, gibt es in: Deutschland Katharinenkloster Augsburg, ehemaliges Dominikanerinnenkloster Kloster Sankt Katharinen (bei Bad Kreuznach) St.-Katharinen-Kloster (Bremen) ehemaliges Katharinenkloster Dortmund Katharinenkloster (Eisenach) Katharinenkloster Flensburg, ehemals Kloster der Franziskaner in Flensburg St. Katharinen (Mainau), ehemaliges Augustiner-Eremitinnenkloster in Litzelstetten nahe der Insel Mainau Kloster St. Katharinen (Linzer Höhe), ehemaliges Zisterzienserinnenkloster Katharinenkloster (Lübeck) Katharinenkloster Nürnberg ehemaliges Katharinenkloster Regensburg. Siehe auch: Katharinenspital Katharinenkloster (Rostock) Katharinenkloster (Stendal) Katharinenkloster (Stralsund) ehemaliges Kloster St. Katharina (Trier) Schweiz St. Katharinenkloster in Diessenhofen TG, heute Klinik St. Katharinental Kloster St. Katharina (St. Gallen), ehemaliges Dominikanerinnenkloster Frankreich St.-Katharinen-Kloster in Straßburg, Elsass Litauen Katharinenkloster Krakės in Krakės, Bezirk Kaunas Tschechien Kloster St. Katharina (Prag), ehemaliges Augustiner-Eremitinnenkloster Ägypten Katharinenkloster (Sinai) Siehe auch Katharinenkirche Sankt Kathrein – Ortskirchen St. Catherine, Santa Catalina u. a."} {"instruction": "Implement a sorting algorithm for a given array in Python.", "input": "[3, 2, 1, 4]", "output": "sorted_array = [1, 2, 3, 4] def SortArray(array): for i in range(len(array)): for j in range(len(array) - i - 1): if array[j] > array[j + 1]: array[j], array[j + 1] = array[j + 1], array[j] return array sorted_array = SortArray(array)"} {"instruction": "Construct an SQL query to select all the unique values of one column from a table that appear more than twice.", "input": "column_name: 'gender'", "output": "SELECT gender FROM table_name GROUP BY gender HAVING COUNT(*) > 2;"} {"instruction": "Modify the following function to print out the 'type' of each argument.", "input": "def print_args(arg1, arg2): print(\"Arg 1: %s\" % arg1) print(\"Arg 2: %s\" % arg2)", "output": "def print_args(arg1, arg2): print(\"Arg 1: %s\" % str(type(arg1))) print(\"Arg 2: %s\" % str(type(arg2))) print(\"Arg 1: %s\" % arg1) print(\"Arg 2: %s\" % arg2)"} {"text": "[HI Wikipedia] भूटान के १० बड़े नगरों की सूची\n\nयह भूटान के नगरों की सूची है। 1-नगर :थिम्फू नगर की जनसंख्या :98,676 जिले का नाम:थिम्फू 2-नगर :पुनाखा नगर की जनसंख्या :21,500 जिले का नाम :पुनाखा 3-नगर :तसिरंग (Tsirang) नगर की जनसंख्या :18,667 जिले का नाम:चिरांग 4-नगर :फुंतशोलिंग नगर की जनसंख्या :17,043 जिले का नाम: चूखा 5-नगर :पेमागटशेल नगर की जनसंख्या :13,864 जिले का नाम: पेमागटशेल 6-नगर :सर्पांग नगर की जनसंख्या :10,416 जिले का नाम : गेलेजफुग 7-नगर : वांग्दी फोडरंग ( Wangdi Phodrang) नगर की जनसंख्या :7,507 जिले का नाम : वांग्दी फोडरंग 8-नगर : सामद्रूप जोंगखार नगर की जनसंख्या :7,507 जिले का नाम: सामद्रूप जोंगखार 9-नगर :समतसे (Samtse ) नगर की जनसंख्या:5,479 जिले का नाम: सांची ( , Samchi) 10-नगर :जकर (Jakar) नगर की जनसंख्या:4,829 जिले का नाम: बुमथांग सन्दर्भ भूटान श्रेणी :भूटान के नगर"} {"instruction": "Create a Python function to search for a substring in a string. The function should take two arguments, the haystack string and the needle string, and should return a boolean indicating whether the substring was found or not.", "input": "haystack: \"This is a string\" \nneedle: \"is\"", "output": "def contains_substring(haystack, needle): \n return needle in haystack\n\n# Usage example\ncontains_substring(\"This is a string\", \"is\") # returns True \ncontains_substring(\"This is a string\", \"xyz\") # returns False"} {"text": "[EN Wikipedia] Army Institute of Business Administration, Sylhet\n\nArmy Institute of Business Administration (Army IBA), Sylhet, is a government military business school run by the Bangladesh Army located at Jalalabad Cantonment, Sylhet. As the institute is affiliated with the Bangladesh University of Professionals (BUP), the academic curriculum is approved and regulated by the BUP academic council and the syndicate. History Army Institute of Business Administration, Sylhet was established on January 15, 2015, at Jalalabad Cantonment, Sylhet. Brigadier General Md. Zahirul Islam, NDC, PSC, G (Retd) is the institute's founding director. Location The institute is located at Jalalabad Cantonment, around eight kilometers northwest of Sylhet, beside the Sylhet - Tamabil Highway, and is temporarily set up at the campus of Jalalabad Cantonment Public School and College (JCPSC), Sylhet. The development plan of the permanent campus is under process now. Administration Army IBA, Sylhet is administered by Bangladesh Army through the Area Headquarters, Sylhet. The Area Commander of Sylhet area is the Chief Patron of Army IBA, Sylhet. The institute is governed by an eighteen-member governing body consisting of representatives of the army, faculty members, administrative personnel, students, and parents representatives. Academic curriculum The Bangladesh University of Professionals administers the academic curriculum in accordance with the rules of the University Grants Commission of Bangladesh. The current curriculum of Army IBA, Sylhet, consists of Bachelor of Business Administration (BBA) and Master of Business Administration (MBA) programs. Major areas of specialization include Operations Management, Accounting, Finance, Marketing, Human Resource Management, and Supply Chain Management. The current intake for BBA is one per year, and for MBA, three intakes per year. See also Army Institute of Business Administration, Savar Bangladesh University of Professionals (BUP) Military Institute of Science and Technology (MIST) Armed Forces Medical College (AFMC) References Bangladesh University of Professionals Bangladesh Army Education in Sylhet 2015 establishments in Bangladesh"} {"instruction": "Write a SQL command to get a list of customers with order total greater than 500.", "input": "TABLE customers { id INT, name VARCHAR(90), orders TOTAL DEC(10,2) }", "output": "SELECT name FROM customers WHERE orders > 500;"} {"instruction": "Design a function in Python that takes a string, replaces all occurrences of the word \"dog\" with \"cat\" and returns the modified string.", "input": "\"I love my dog\"", "output": "def replace_word(string):\n modified_string = string.replace(\"dog\", \"cat\")\n return modified_string\n\nresult = replace_word(\"I love my dog\")\nprint(result)"} {"instruction": "Write an HTML tag for a hyperlink pointing to https://www.example.com", "input": "", "output": "Link"} {"text": "[HI Wikipedia] हम होंगे कामयाब\n\nहम होंगे कामयाब ( का गिरिजा कुमार माथुर द्वारा किया गया हिंदी भावानुवाद) एक प्रतिरोध गीत है। यह गीत बीसवीं सदी में नागरिक अधिकार आंदोलन का प्रधान स्वर बना। इस गीत को आमतौर पर \"I'll Overcome Some Day\" (\"आई विल ओवरकम सम डे\") से काव्यावतरित माना जाता है, जो चार्ल्स अल्बर्ट टिंडले द्वारा गाया गया था और जिसे 1900 में पहली बार प्रकाशित किया गया था। सन्दर्भ Hum Honge Kamyab Lyrics नागरिक अधिकार आंदोलन देशभक्ति के गीत आधार"} {"text": "[DE Wikipedia] Johann Wilhelm Neumann\n\nJohann Wilhelm Neumann (* 25. Februar 1797 in Lübben; † 16. April 1870 ebenda) war ein deutscher Jurist, Kommunalpolitiker und Historiker. Leben und Werk Der älteste Sohn des Lübbener Bürgermeisters Martin Karl Andreas Neumann (* 23. Juli 1755; † 12. April 1824) besuchte ab 1809 das Lyzeum seiner Geburtsstadt und studierte Rechtswissenschaften ab 1817 an der Universität Leipzig und ab 1819 in Berlin. 1820 bestand er die erste juristische Prüfung und trat als Auskultator beim Stadtgericht Berlin in den preußischen Staatsdienst ein. Im November 1821 wurde er Referendar beim Kammergericht. Ein Schlaganfall seines Vaters zwang ihn 1823 – noch vor Ablegen des Staatsexamens – zur Rückkehr nach Lübben. Dort wurde er Justizkommissar und Notar. Durch den Einfluss von Johann Gottlob Worbs und Friedrich August Süßmilch (1770–1854) wandte er sich der Geschichtsforschung zu und wurde 1832 Mitglied der Oberlausitzischen Gesellschaft der Wissenschaften, deren Ehrenmitglied er 1857 wurde. 1836 wurde er zum Bürgermeister von Lübben gewählt und blieb es bis 1852. In seiner Amtszeit konnten die Schulden der Stadt verringert werden, ein neues Schulhaus wurde erbaut und die Paul-Gerhardt-Kirche erhielt eine neue Orgel. Er nahm an den Beratungen der Vereinigten Ausschüsse teil und wurde 1847 Abgeordneter des Vereinigten Landtags. Er vertrat progressive Auffassungen und befürwortet die Abschaffung der Todesstrafe. 1847 wurde er mit dem Roten Adlerorden 3. Klasse mit Schleife geehrt. 1851 wurde er zum Landesbestallten gewählt und wirkte im Auftrag der Niederlausitzer Stände. Am 18. April 1848 heiratete er Minna Gutzkow (* 4. Juli 1824; † 11. Juni 1859), mit der er einen Sohn (Karl, * 31. Dezember 1854; † 1904, Rechtsanwalt und Notar in Lübben) und eine Tochter (Marie; * 25. August 1850; † 7. November 1935) hatte. Werke Die wahre Kirche und deren Wunder. Hartung, Königsberg 1828 Versuch einer Geschichte der Niederlausitzischen Land-Vögte. Zwei Bände. Band 1, Lübben 1832 (Digitalisat von Band 1 und Band 2) Band 2, Lübben 1833 (Digitalisat, zur Titelseite: bitte zurückblättern) Das Niederlausitzische Lehnrecht. Ein Beitrag zum Provinzialrechte dieses Landestheils. Starcke, Berlin 1834 mit C. S. G. Gallus: Beiträge zur Geschichts- und Alterthumskunde der Nieder-Lausitz. Band 1, Gotsch, Lübben 1835 Die Verhältnisse der Niederlausitzischen Landbewohner und ihrer Güter von den frühesten bis auf die neuesten Zeiten. Gotsch, Lübben 1835 Die Patrimonial-Gerichtsbarkeit im Lichte unserer Zeit. Johann Friedrich Hartknoch, Leipzig 1836 (Digitalisat) Ueber Gewerbe-Freiheit und deren Gränzen im Staate. Mittler, Berlin [u. a.] 1837 Das Provinzial-Recht des Markgrafthums Niederlausitz. Trowitzsch, Frankfurt a. d. Oder 1837; Nachdruck: Adamant Media Corporation, 2001, ISBN 1421211815…"} {"text": "[CS Wikipedia] Farní sbor Českobratrské církve evangelické v Moravči\n\nFarní sbor Českobratrské církve evangelické v Moravči je sborem Českobratrské církve evangelické v Moravči. Sbor spadá pod Horácký seniorát. Farářem sboru je Daniel Matějka ml. a kurátorem Daniel Trefil. Faráři sboru Jan Szalatnay st. (1783–1827) Jan Szalatnay ml. (1827–1874) Josef Toul (1874–1909) František Eliáš (1909–1947) Bohuslav Holý (1948–1952 a 1970–1981) Pravdomil Brchaň (1953–1970) Ester Čašková (1984–2007) Daniel Matějka ml. (od 2008) Externí odkazy Oficiální stránky sboru Údaje o sboru na portálu Evangnet Moraveč"} {"instruction": "Generate a Python source code to print the last element from a given list.", "input": "['Apple', 'Orange', 'Banana']", "output": "arr = ['Apple', 'Orange', 'Banana']\nlast_element = arr[-1]\nprint(last_element) # Result: Banana"} {"instruction": "Create a function in Python that takes a list of strings and replaces each string with its length.", "input": "[\"apple\", \"banana\", \"mango\"]", "output": "def length_strings(string_list):\n new_list = []\n for string in string_list:\n new_list.append(len(string))\n return new_list\n\nprint(length_strings([\"apple\", \"banana\", \"mango\"])) # [5, 6, 5]"} {"instruction": "Add 10 to the last element of a given array.", "input": "[1, 2, 3, 4]", "output": "arr = [1, 2, 3,4] arr[-1] += 10 print(arr)"} {"instruction": "Build a machine learning model in Python to classify animals.", "input": "", "output": "#import libraries \nfrom sklearn.ensemble import RandomForestClassifier \nfrom sklearn.datasets import load_iris \nfrom sklearn.model_selection import train_test_split \n \n#import dataset \ndata = load_iris() \n \n#divide the data into independent and dependent variables \nX = data.data \ny = data.target \n \n# Split the data into training and test set \nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) \n \n#Define the model \nmodel = RandomForestClassifier(n_estimators=100) \n \n#Train the model \nmodel.fit(X_train, y_train) \n \n# Test the model \nmodel.score(X_test, y_test)"} {"instruction": "Create a Python function that reorders an integer array using the Bubble Sort algorithm.", "input": "arr = [2, 3, 1, 5, 9]", "output": "def bubble_sort(arr):\n\t# Traverse through all array elements \n\tfor i in range(len(arr)):\n\t\t# Last i elements are already in place \n\t\tfor j in range(0, len(arr)-i-1):\n\t\t\t# traverse the array from 0 to n-i-1 \n\t\t\t# Swap if the element found is greater \n\t\t\t# than the next element \n\t\t\tif arr[j] > arr[j+1] :\n\t\t\t\tarr[j], arr[j+1] = arr[j+1], arr[j]\n\n# Driver code to test above \narr = [2, 3, 1, 5, 9]\n\nbubble_sort(arr) \n\n# Prints the sorted array \nprint (\"Sorted array list is:\" ,arr)"} {"instruction": "Write a JavaScript code to filter an array of strings that begin with the letter `A` and have a length of 5.", "input": "let arr = [\"Apple\", \"Banana\", \"Ant\", \"Cat\", \"Arson\"];", "output": "let result = arr.filter(str => str[0] === 'A' && str.length === 5);"} {"text": "[CS Wikipedia] Delegace pro přijetí mezinárodního jazyka\n\nDelegaci pro přijetí mezinárodního jazyka založili 17. ledna 1901 v Paříži francouzští profesoři Louis Couturat a Léopold Leau. Cílem Delegace byl výběr nejperspektivnějšího z tehdy již více než tří set projektů mezinárodního jazyka. Mezinárodní svaz akademií tento úkol odmítl jako nekompetentní a Delegace zvolila 18členný výbor, který se sešel v Paříži v říjnu 1907. Zasedání se mohli zúčastnit také autoři různých projektů (Spokil, Lingua Blua, Parla, Idiom Neutral aj.) a hájit je. Závěrečná zpráva konstatovala, že jediným jazykem, který se může rychle šířit, je esperanto, ale je nutno ho „zdokonalit“ a „reformovat“. Tento reformovaný jazyk byl předložen pod názvem Ido a vytvořil ho zřejmě zejména Couturat za pomoci Louise de Beaufronta, který před komisí předtím hájil esperanto. To mezi esperantisty způsobilo velké rozhořčení, bylo také poukazováno na to, že Delegace, která ostatně neměla veřejnoprávní ráz, překročila svůj rámec, měla za úkol jen vybrat některé z existujících jazyků, ale ne reformovat. Jazykový výbor esperanta z větší části rozhodnutí Delegace odmítl, k Idu nakonec přešlo 3-4 % esperantistů. Esperantské organizace Ido"} {"instruction": "Create a 3x3 rotation matrix with an angle of 45 degrees.", "input": "", "output": "[[0.7071, -0.7071, 0.0], [0.7071, 0.7071, 0.0], [0.0, 0.0, 1.0]]"} {"text": "[HI Wikipedia] मिताक्षरा\n\nमिताक्षरा याज्ञवल्क्य स्मृति पर विज्ञानेश्वर की टीका है जिसकी रचना 11वीं शताब्दी में हुई। यह ग्रन्थ 'जन्मना उत्तराधिकार' (inheritance by birth) के सिद्धान्त के लिए प्रसिद्ध है। हिंदू उत्तराधिकार संबंधी भारतीय कानून को लागू करने के लिए मुख्य रूप से दो मान्यताओं को माना जाता है- पहला है दायभाग मत, जो बंगाल और असम में लागू है। दूसरा है मिताक्षरा, जो शेष भारत में मान्य है। मिताक्षरा के अनुसार, प्रत्येक व्यक्ति को जन्म से ही अपने पिता की संयुक्त परिवार सम्पत्ति में हिस्सेदारी हासिल हो जाती है। इसमें 2005 में कानून में हुए संशोधन के बाद लड़कियों को भी शामिल किया गया। मिताक्षरा विधि की शाखा पांच उप-शाखाओं में विभाजित है। दत्तकग्रहण तथा दाय के संबंध में परस्पर मतभेद होने के कारण इन उपशाखाओं की उत्पत्ति हुई। ये सभी उप-शाखाएं मिताक्षरा को ही सर्वोपरि प्रमाण मानते हैं, परन्तु कुछ परिस्थितियों में मतभेद होने पर किसी मूल भाष्य या ग्रंथ विशेष को प्राथमिकता देते हैं। ये पांच उप-शाखाएं है- (१) बनारस शाखा (२) मिथिला शाखा (३) मद्रास शाखा (४) बम्बई शाखा (५) पंजाब शाखा सन्दर्भ इन्हें भी देखें दायभाग (जीमूतिवाहन द्वारा रचित ग्रन्थ) याज्ञवल्क्य स्मृति हिन्दू उत्तराधिकार (संशोधन) अधिनियम, २००५ रघुनन्दन भट्टाचार्य्य बाहरी कड़ियाँ The Importance of Mitakshara in the 21st century by Justice Markandey Katju वसीयत सम्बन्धी हिन्दू विधि बेटा-बेटी को समान अधिकार (पाञ्चजन्य) याज्ञवल्क्य स्मृति, मिताक्षरा सहित (संस्कृत विकिस्रोत) हिन्दू विधि की शाखाएँ तथा मिताक्षरा और दायभाग में अन्तर हिन्दू विधि प्राचीन भारतीय नियम"} {"instruction": "Build a sentiment analysis system in Python. The system should take an input text and return its positivity, negativity, or neutral score.", "input": "Not applicable", "output": "import nltk\nfrom nltk.sentiment.vader import SentimentIntensityAnalyzer\n\ndef sentiment_analysis(text):\n # split the sentences \n sentences = nltk.sent_tokenize(text)\n # create a sentiment analyzer object\n sid = SentimentIntensityAnalyzer()\n sentiment_scores = []\n for sentence in sentences:\n # get the sentiment scores for the sentence \n ss = sid.polarity_scores(sentence)\n sentiment_scores.append(ss)\n # get overall sentiment of the text\n compound_score = 0\n for score in sentiment_scores:\n compound_score += score['compound']\n if compound_score >= 0.05:\n return f\"The sentiment score of the text is Positive with {compound_score}.\"\n elif compound_score <= -0.05:\n return f\"The sentiment score of the text is Negative with {compound_score}.\"\n else:\n return f\"The sentiment score of the text is Neutral with {compound_score}.\""} {"instruction": "Create a MySQL table with three columns containing values from a given list.", "input": "List: Tom, 14, 80 Mary, 27, 96 John, 8, 75", "output": "CREATE TABLE my_table ( name TEXT NOT NULL, age INT NOT NULL, score INT NOT NULL ); INSERT INTO my_table (name, age, score) VALUES ('Tom', 14, 80), ('Mary', 27, 96), ('John', 8, 75);"} {"instruction": "Write a Python program to find all numbers divisible by 5 but not a multiple of 7, between 1500 and 2700 (both included).", "input": "", "output": "result = [] for i in range(1500, 2701): if i % 5 == 0 and i % 7 != 0: result.append(i) print(result) # [1505, 1540, 1575, 1610, 1645, 1680, 1715, 1750, 1785, 1820, 1855, 1890, 1925, 1960, 1995, 2030, 2065, 2100, 2135, 2170, 2205, 2240, 2275, 2310, 2345, 2380, 2415, 2450, 2485, 2520, 2555, 2590, 2625, 2660, 2695]"} {"text": "[DE Wikipedia] Reinhold Köhler\n\nReinhold Köhler (* 24. Juni 1830 in Weimar; † 15. August 1892 ebenda; auch Reinhold Koehler) war ein deutscher Literaturhistoriker und Bibliothekar. Köhler war der oberste Bibliothekar an der Großherzoglichen Bibliothek in Weimar. Leben Köhler war der Sohn des Hofpredigers Ernst Friedrich Köhler (1788–1851); seine Mutter war eine Försterstochter aus der Nähe von Ilmenau. Nach seiner Schulzeit am Wilhelm-Ernst-Gymnasium Weimar besuchte er ab Ostern 1848 die Universität und studierte dreieinhalb Jahre in Jena, Leipzig und Bonn klassische Altertumswissenschaft. 1851 starb sein Vater und ließ die Witwe mit fünf Kindern in sehr beschränkten Verhältnissen zurück. Köhler blieb seitdem zu Hause, verdiente den Lebensunterhalt der Familie als Angestellter an der Bibliothek und erteilte Privatunterricht. Das Staatsexamen legte er im Mai 1852 in Berlin ab; seine Promotion auf Grund einer gelehrten mythologischen und quellengeschichtlichen Studie über die Dionysiaka des Nonnos von Panopolis erfolgte 1853 in Jena. Köhler war seit 1856 Bibliothekar an der Herzoglichen Bibliothek in Weimar – erst neben Ludwig Preller, dann neben Adolf Schöll. 1881 wurde er deren Leiter. Nach fünf Jahren wurde er zum „Oberbibliothekar“ ernannt. Er trat dem Verein „Neuweimar“ bei und schloss mit Peter Cornelius Freundschaft. 1886 wurde er als ordentliches Mitglied in die Königlich Sächsische Gesellschaft der Wissenschaften aufgenommen. Seine Beiträge reichten vom Mittelalter über Hans Sachs, dessen Prosadialoge er herausgab, bis zu den englischen Komödianten, zu den Klassikern und ins 19. Jahrhundert. Er arbeitete am Grimmschen Wörterbuch mit und trug zahlreiche Bausteine zur englischen und zur romanischen Literaturgeschichte bei: Shakespeare und Dante, besonders in ihrem deutschen Nachleben, Chaucer und Boccaccio. Köhler befasst e sich besonders viel mit den Märchen. Er schrieb aber ganz kurze Texte, Notizen und viele Anmerkungen. Er gab nur einmal einen abgerundeten Aufsatz heraus, nämlich gerade über Märchen: „Ueber die europäischen Volksmärchen“ 1865. Er schrieb Anmerkungen zu den Sizilianischen Märchen von Laura Gonzenbach (1870), später arbeitete er zusammen an den Anmerkungen zu den Märchen der Brüder Grimm von Johannes Bolte und Georg Polívka. Er verfasste auch Alte Bergmannslieder (1858) und Aufsätze über Märchen und Volkslieder (1894). Am 11. Oktober 1890 stürzte er und brach sich den Oberschenkel. Nach langem Leiden starb er am 15. August 1892. Schriften Kleinere Schriften, gesammelt und herausgegeben von Johannes Bolte I. Zur Märchenforschung, 1898, online II. Zur erzählenden Dichtung des Mittelalters, 1900, Porträt, online III. Zur neueren Literaturgeschichte, Volkskunde und Wortforschung, 1900, Porträt, online Literatur Ingrid Tomkowiak, Rudolf Schenda: Istorie…"} {"text": "[HI Wikipedia] गिस्बॉर्न\n\nगिस्बॉर्न न्यूज़ीलैण्ड के उत्तर-पूर्व में स्थित एक शहर है। यह गिस्बॉर्न क्षेत्र का सबसे बड़ा शहर है। इसकी आबादी 34,400 है। शहर को अपना यह नाम औपनिवेशिक सचिव विलियम गिस्बॉर्न के नाम से मिला है। इन्हें भी देखें गिस्बॉर्न क्षेत्र उत्तर द्वीप सन्दर्भ न्यूज़ीलैण्ड के आबाद स्थान गिस्बॉर्न क्षेत्र"} {"instruction": "Test if a given number is a Prime or not using Python.", "input": "number = 32", "output": "if number<=1: \n print(\"Number is not a prime number.\") \nfor i in range(2,int(number**0.5)+1):\n if(number % i == 0):\n print(\"Number is not a prime number.\")\n break\nelse: \n print(\"Number is a prime number.\")"} {"text": "[CS Wikipedia] Teplota tání\n\nTeplota tání je teplota, při níž krystalická pevná látka přechází ze skupenství pevného do skupenství kapalného. U amorfních látek (sklo, parafín) nelze tuto hranici určit přesně (teplota tuhnutí). Značení Značka: tt Základní jednotka: kelvin, značka K Další jednotky: viz teplota Příklady teploty tání Tabulka uvádí teploty tání vybraných látek ve stupních Celsia a v kelvinech za normálního tlaku. Teplota tání některých prvků Nejvyšší teplotu tání mají některé sloučeniny uhlíku. Teplota tuhnutí Teplota tuhnutí je teplota, při níž se kapalina mění na pevnou látku. Hodnota teploty tuhnutí krystalických látek je stejná jako hodnota teploty tání. U čisté vody se teplota tuhnutí označuje běžným pojmem bod tuhnutí či bod mrazu (tj. teplota, při níž voda mrzne či zamrzává, ta činí za normálních atmosférických podmínek přibližně nula stupňů Celsia). Odkazy Reference Související články Skupenské teplo tání Tání Teplota varu Tuhnutí Externí odkazy Fázové přeměny Teplota Materiálové konstanty"} {"instruction": "Create a function to check if a given triangle is an equilateral triangle.", "input": "a = 5, b = 5, c = 5", "output": "def isEquilateral(a, b, c): if (a == b == c): return True else: return False isEquilateral(a, b, c) # returns True"} {"text": "[HI Wikipedia] मोनोट्रीम\n\nमोनोट्रीम (monotreme, अर्थ: एकविदर) या अंडजस्तनी स्तनधारी प्राणियों का एक जीववैज्ञानिक गण (ऑर्डर) है, जिसमें अब दो ही प्रकार के जंतु जीवित हैं। यह अण्डे देते हैं लेकिन फिर जन्मने वाले शिशु को माता के स्तन से दूध पिलाते हैं। आधुनिक जगत में मोनोट्रीम की पाँच जातियाँ अस्तित्व में हैं जिनमें से एक प्लैटीपुस और चार एकिडना की जातियाँ हैं। नामार्थ लातीनी भाषा में इस गण का नाम मॉनोट्रीमैटा है, जिसका अर्थ है एकविदर, अर्थात् एक छिद्रवाले जंतु (मॉनो = एक + ट्रीमा = छिद्र, विद्र)। संभवत: इन्हें अंडजस्तनी कहना अधिक उचित होगा, क्योंकि बच्चे अंडे से निकलते हैं और निकलने पर माता के स्तन से दूध पीते हैं। परिचय अंडजस्तनी प्राणी अन्य सभी स्तनधारियों से कुछ इतने भिन्न हैं कि इनके लिए प्रोटोथीरिया नामक एक अलग उपवर्ग की कल्पना करनी पड़ी है जिसमें केवल वरटचंच (डक बिल, ऑरनिथोरिंकस) तथा सकंटी (स्पाइनी ऐंट-ईटर, टैकीग्लॉसस तथा ज़ैग्लॉसस) नामक प्राणी रखे जाते हैं। ये स्तनधारी प्राणी (मैमाल) हैं, क्योंकि इनके सारे शरीर पर बाल, पूर्ण विकसित उर:प्राचीर (डायफ्राम), चार वेश्मोंवाला हृदय, केवल बायाँ ही महाधमनी चाप (एऑटिक आर्च), केवल दंतास्थि की ही बनी अधोहन्वस्थि (मैंडिबिल), शिशुओं के पोषण के लिए नारी के उदर पर उपस्थित स्तनग्रंथियाँ, शरीर का एकसम ताप, त्वचा में स्वेद ग्रंथियाँ तथा तैल ग्रंथियाँ, तीन कर्णस्थिकाएँ तथा (संकटियों में) परिवलित (कनवोल्यूटेड) मस्तिष्क और बाहरी कान तथा कर्णपल्लव (पिना) होते हैं। विकास की दृष्टि से वर्तमान स्तनधारियों में इनकी स्थिति सबसे निम्नकोटि की है, क्योंकि इनमें अनेक लक्षण सरीसृपों के से पाए जाते हैं, जैसे अंसमेखला (पेक्टोरल गर्डिल) में उरोंस्यास्थि (कोराकॉयड), पुर:उरोंस्यास्थि (प्रिकोराकॉयड) तथा अंतराक्षकास्थि (इंटरक्लैविकिल) का अलग अलग होना, ग्रैव पर्शुकाओं (सर्विकल रिब्स) की उपस्थिति, कपाल की अनेक अस्थियों का सरीसृपों की ही भाँति का होना, डिंबवाहिनियों का आरंभ से अंत तक अलग अलग होना और अवस्कर वेश्म (क्लोएकल चेंबर) में अलग अलग जनन रध्रों द्वारा खुलना, आदि। सबसे प्रमुख तथा सबसे अधिक महत्त्वपूर्ण सरीसृपी लक्षण है, चर्मसदृश तथा आनम्य (लचीला) आवरण तथा पर्याप्त अंडपीत से युक्त अंडे देना, जैसा अन्य किसी भी उन्नत स्तनधारी में नहीं पाया जाता। इनके इस लक्षण के कारण ही हम इन्हें अंडजस्तनी कहते हैं। इन प्राणियों के सिर का अगला भाग तुंड के रूप का होता है और प्रौढ़ावस्था में दाँत अनुपस्थित रहते हैं। स्तनग्रंथियों में चूचुक नहीं होते। नारी में न तो गर्भाशय ही होता है और न योनि ही। नर में वृषण उदर में ही स्थित रहते हैं तथा शिश्न से केवल शुक्राणु बाहर आते हैं, मूत्र नहीं। पाचन तथा जननतंत्र अलग अलग छिद्रों द्वारा बाहर न खुलकर केवल एक अवस्कर (गुदा) द्वार ही बाहर खुलते हैं। स्तनियों में एक यही ऐसे हैं जिनमें क्रव्यांगक (कैरंकल) तथा अंडदंत (एग टूथ) पाए जाते हैं। जीवाश्मों (फ़ॉसिल्स) की अनुपस्थिति में इनके प्राचीन इतिहास के विषय में ऐसा अनुमान है कि इनका उद्भव संभवत: रक्ताश्म (ट्रायसिक) युग में (या इससे भी पूर्व) हुआ था। ये प्राणी आज आस्ट्रेलिया, तस्मानिया, न्यू गिनी तथा पापुआ में ही शेष रह गए हैं और वहाँ भी संवभत: इसलिए कि एक तो भौगोलिक दृष्टि से इनका निवासस्थल अन्य…"} {"text": "[DE Wikipedia] Splint-Boots\n\nSplint-Boots sind „Schoner“ für die Beine von Pferden. Die deutsche Bezeichnung ist Gamaschen. Splint-Boots werden besonders im Westernreitsport verwendet, damit die Pferde bei Übungen wie z. B. Sliding Stops (das Pferd bremst abrupt mit den Hinterbeinen aus vollem Galopp ab) keine Verletzungen erleiden und die Beine bei dieser außerordentlichen Beanspruchung gestützt werden. Splint-Boots können aus robustem Kunststoff oder Leder gefertigt sein. Innen sollten sie weich ausgepolstert und außen mit einem flexiblen „Glattlederlöffel“ versehen sein. Einzelnachweise Westernreiten Ausrüstung im Pferdesport"} {"instruction": "Write a code to return the list of integers between two given numbers.", "input": "start = 5 end = 9", "output": "def get_integer_between(start, end): return list(range(start, end + 1)) print(get_integer_between(start, end))"} {"instruction": "Generate a list of prime numbers from 1 to N in Python.", "input": "", "output": "def generate_primes(n): \n primes = [] \n for num in range(2, n+1): \n prime = True \n for i in range(2, num): \n if (num % i) == 0: \n prime = False\n if prime: \n primes.append(num) \n return primes"} {"text": "[DE Wikipedia] Ahmed Jan Thirakwa\n\nAhmed Jan Thirakwa (* 1892 in Muradabad; † 13. Januar 1976 in Lakhnau, Uttar Pradesh) war ein indischer Tablaspieler. Er galt zu seinen Lebzeiten als bedeutendster Tablaspieler und gehörte zur Farukhabad-Gharana (Lehrtradition). Leben Er war der Sohn des Sarangi-Spielers Hussain Baksh, der drei Söhne hatte: Miyan Jan Khan, Ahmed Jan Khan und Mohammed Jan Khan. Ahmed Jans Großvater mütterlicherseits Kalandar Baksh und Sher Khan, der Bruder von Ahmad Jans Vater, galten zu dieser Zeit als angesehene Tablaspieler in Muradabad im Gebiet des heutigen Bundesstaats Uttar Pradesh. Bereits als Kind schickten ihn seine Eltern mit seinem Bruder Miyan Jan nach Bombay, wo die beiden dem Munir Khan anvertraut wurden. Mehr als zwei Jahrzehnte lang dauerte Ahmed Jans Lehrzeit bei Munir Khan, da er während dieser Zeit eine übermütige Wesensart an den Tag legte, bekam Ahmed Jan von Munir Khan den Scherznamen „Thirakwa“ verpasst und ihm sein Leben lang erhalten blieb. Thirakwa galt als bescheidener Mann, er hatte sich seiner Kunst ganz geöffnet. Niemals erging er sich in Streitgespräche über Musik. Auf der Bühne war er meistens in einen dunkelseidenen Sherbani-Mantel gekleidet, mit schwarzsamtener Topi-Kappe, silbernem Krückstock und reich bestickten Pantoffeln. Später diente Ahmed Jan knapp 30 Jahre unter der Aufsicht des Herrschers Reza Ali Khan am Hofe von Rampur als Hofmusiker. Ab 1971 war er Lehrer im „National Centre of Performing Arts“, in Bombay. Ahmed Jan Thirakwa erhielt 1954 einen Sangeet Natak Akademi Award und wurde 1970 mit dem Padma Bhushan ausgezeichnet. Weblinks Biography of Tabla Master Ahmed Jahn Thirakwa. Chandrakantha.com Biography of Ahmed Jan Thirakwa. Incredible People Tabla Solo (1936) bei YouTube Ustad Ahmedjan Thirakwa zusammen mit Ustad Habib Khan (1937) bei YouTube Tabla Spiel mit unbekannter Begleitung (1961) bei YouTube Tabla Solo (ca. 1960 - 1965) bei YouTube Tablaspieler Interpret klassischer indischer Musik Komponist (Indien) Träger des Padma Bhushan Inder Geboren 1892 Gestorben 1976 Mann"} {"instruction": "Generate a class that manages the customer data", "input": "The class should have attributes of customer name, address, phone number, and email address.", "output": "class CustomerData: def __init__(self, name, address, phone_number, email_address): self.name = name self.address = address self.phone_number = phone_number self.email_address = email_address def get_name(self): return self.name def get_address(self): return self.address def get_phone_number(self): return self.phone_number def get_email_address(self): return self.email_address"} {"instruction": "Create a Python program that uses the NumPy library to generate a series of random numbers.", "input": "Not applicable", "output": "import numpy as np\n\n# Generate random integers within a specified range\nx = np.random.randint(0, 10, size=(3, 3))\n\n# Generate random floats within a specified range\ny = np.random.uniform(low=0.0, high=10.0, size=(3, 3))\n\n# Generate random numbers with numpy\nz = np.random.rand(3,3)\n\nprint('Random integers:', x, '\\n') \nprint('Random floats:', y, '\\n') \nprint('Random numbers:', z)"} {"instruction": "Write a web scraper using Python", "input": "", "output": "import requests from bs4 import BeautifulSoup # Function to scrape for the specified HTML elements def scrape(url): response = requests.get(url) soup = BeautifulSoup(response.content, 'html.parser') # Use the .find, .find_all, .select and .select_one methods to scrape website titles = soup.find_all(\"title\") content = soup.find_all(\"p\") headings = soup.find_all(\"h1\") links = soup.find_all(\"a\") # Extract text from each element and store in variables title = titles[0].text content_p = [p.text for p in content] headings_h1 = [h1.text for h1 in headings] link_urls = [a.get(\"href\") for a in links] # Print out each element print(title) print(\"\\n\") print(\"Content paragraphs:\") for paragraph in content_p: print(paragraph) print(\"\\n\") print(\"Headings:\") for heading in headings_h1: print(heading) print(\"\\n\") print(\"Links and URLs:\") for link in link_urls: print(link) # Scrape the website below scrape('https://en.wikipedia.org/wiki/Python_(programming_language)')"} {"instruction": "Automate a process using an AI model in Python to determine if an email is spam or not.", "input": "", "output": "import numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split \nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn.metrics import confusion_matrix\n\n# Load data \ndata = pd.read_csv('data.csv')\n\n# Separate labels and features\nX = data.iloc[:, :-1].values\ny = data.iloc[:, -1].values\n\n# Split the dataset into training and test set\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Train the model\nmodel = MultinomialNB()\nmodel.fit(X_train, y_train)\n\n# Test the model\ny_pred = model.predict(X_test)\n\n# Calculate accuracy\naccuracy = model.score(X_test, y_test)\nprint('Model accuracy is:', round(accuracy*100, 2), '%', sep='')\n\n# Print confusion matrix\ncm = confusion_matrix(y_test, y_pred)\nprint('Confusion matrix:')\nprint(cm)"} {"instruction": "Sort a list of 5 numbers in descending order.", "input": "[123, 45, 287, 398, 135]", "output": "[398, 287, 135, 123, 45]"} {"instruction": "Write a Python script to generate a list of random numbers with specified length.", "input": "", "output": "import random\nlength = 5\n\nrand_nums = [random.randint(0,100) for i in range(length)]\nprint(rand_nums)"} {"instruction": "Create a Python function that takes two numbers and returns the biggest of them.", "input": "x = 3, y = 6", "output": "def max_of_two(x, y):\n if x > y:\n return x\n else:\n return y\n \nx = 3\ny = 6\nmaximum = max_of_two(x, y)\nprint('The maximum of', x, 'and', y, 'is', maximum)"} {"instruction": "Provide an input to the following code so that it prints out the sum of all numbers between 1 and 5.", "input": "", "output": "# initialise sum sum = 0 # loop over given range for i in range(1, 6): sum += i print(sum) # Output: 15"} {"instruction": "Suggest an efficient algorithm for sorting an array of integers in Python.", "input": "[1, 5, 3, 8, 4, 2]", "output": "def sort_array(array):\n for i in range(len(array)):\n lowest = i\n for j in range(i + 1, len(array)):\n if array[lowest] > array[j]:\n lowest = j\n array[i], array[lowest] = array[lowest], array[i]\n return array\n\nresult = sort_array([1, 5, 3, 8, 4, 2])\nprint(result)"} {"instruction": "Generate a unique and random password for a user using python.", "input": "", "output": "import random characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+-=[ ]{}:' password = random.choices(characters, k = 16) print(\"\".join(password))"} {"text": "[CS Wikipedia] Minestrone\n\nMinestrone (z italského minestra – polévka, s augmentativní příponou -one, tedy ve významu „velká polévka“) je italská hustá zeleninová polévka. Mezi obvyklé ingredience patří především rajčata, dále fazole, cibule, celer, mrkev a případně další zelenina. Neexistuje žádný pevně daný recept, většinou se prostě uvaří zelenina, jaká je v daném ročním období k dispozici, někdy navíc těstoviny či rýže. Detaily receptu se liší i krajově. Většinou je vegetariánská, někdy se přidává maso nebo se jako základ použije masový vývar. Minestrone je jedno z nejoblíbenějších jídel italské kuchyně. Původně to byla součást tzv. cucina povera, tedy chudé kuchyně. Šlo o velice skromný pokrm, většinou podávaný jako hlavní jídlo. Odkazy Reference Externí odkazy Italská kuchyně Polévky Bezmasá jídla Italská slova a fráze Zeleninové pokrmy"} {"instruction": "Write a recursive Python function to generate a Fibonacci sequence given a lower and upper limit.", "input": "", "output": "def generate_fibonacci_sequence(low, up):\n \"\"\"\n Generate a Fibonacci sequence\n \n Args:\n low (int): lower limit\n up (int): upper limit\n\n Returns:\n list: list with Fibonacci sequence\n \"\"\"\n if low == up: \n return [low] \n else: \n fib_list = generate_fibonacci_sequence(low, up - 1) \n fib_list.append(fib_list[-1] + fib_list[-2]) \n return fib_list"} {"instruction": "Create a Python dictionary with three keys named \"Name\", \"Address\" and \"Phone\".", "input": "Name = 'John';\nAddress = '212 Smith Street';\nPhone = '732-123-4567';", "output": "info = {\n 'Name':Name,\n 'Address':Address,\n 'Phone':Phone\n}"} {"instruction": "Construct an algorithm to find all possible combinations of a string of characters.", "input": "", "output": "A possible algorithm is to use a recursive approach. The algorithm would start from the beginning of the string and for each character, generate all possible combinations for the rest of the string. Then, for each combination, the character can either be included or excluded from the combination. Finally, return the list of all possible combinations. def find_combinations(string): if len(string) == 0: return [] result = [] for i in range(len(string)): prefix = string[i] suffix = string[i+1:] combinations = find_combinations(suffix) if len(combinations) == 0: result.append(prefix) else: for combination in combinations: result.append(prefix + combination) result.append(combination) return result"} {"instruction": "Design a function in a Python program to calculate the area of a circle with a given radius.", "input": "", "output": "def get_circle_area(radius):\n \"\"\"Calculate and return the area of a circle with a given radius.\n \n Args:\n radius (float): The radius of the circle\n \n Returns:\n float: The area of the circle\n \"\"\"\n return 3.14 * (radius * radius)"} {"instruction": "Explain the benefits of using the OOP approach in programming.", "input": "", "output": "Using the Object-Oriented Programming (OOP) approach in programming offers a number of advantages such as increased code reusability, easier maintenance, data hiding, and better performance. OOP makes it easier to model real-world objects and their relationships, allowing developers to reduce complexity by breaking programs down into smaller parts. This makes it easier to identify, debug and modify code. Additionally, OOP promotes the development of extensible and reusable code, cutting down on the cost and time of development. Finally, OOP allows for better tracking of data and control over which elements outside the program can modify the data."} {"text": "[EN Wikipedia] Go Back (Chalee Tennison song)\n\n\"Go Back\" is a song recorded by American country music artist Chalee Tennison. It was released in November 2000 as the first single from the album This Woman's Heart. The song reached No. 36 on the Billboard Hot Country Singles Tracks chart. The song was written by Jeremy Campbell and Donny Hackett. Content The song is a ballad where a trucker is being told on three separate occasions to \"go back\" to someone important. In the last verse, he is in an accident while on the way to visit his daughter, and has a near-death experience where angels to tell him \"go back\". Critical reception A review in Billboard praised the song's \"affecting lyric\", Tennison's singing voice, and the \"pretty melody\". Chart performance References 2000 singles 2000 songs Chalee Tennison songs Asylum Records singles Songs about truck driving"} {"instruction": "Write a query in MySQL to delete all rows with a given ID.", "input": "", "output": "DELETE FROM table_name WHERE ID = 'given_id';"} {"text": "[HI Wikipedia] मैतै लोग\n\nमैतै या मणिपुरी पूर्वोत्तर भारत के मणिपुर राज्य का बहुसंख्यक समुदाय है। वे मणिपुर के मूल निवासी हैं इसलिए उन्हें मणिपुरी भी कहा जाता है। धर्मिक दृष्टि से अधिकतर मैतै हिन्दू हैं। इनकी मान्यताओं में 'सनमाही' नामक विश्वास-पद्धति भी शामिल है जिसमें ओझाप्रथा के कुछ तत्त्व हैं। मैतै समुदाय के एक महत्वपूर्ण पूर्वज के बारे में मान्यता है कि वे पाखंगबा (अझ़दहा-रूपी देवता) के रूप में प्रकट हुए थे। भाषा मैतै लोग मणिपुरी भाषा बोलते हैं जो तिब्बती-बर्मी भाषा-परिवार की सदस्य है। इन्हें भी देखें पाखंगबा मणिपुर सन्दर्भ मणिपुर भारत की मानव जातियाँ मणिपुर के लोग"} {"instruction": "Construct an HTTP request to fetch the HTML of a given web page.", "input": "url = \"example.com\"", "output": "GET / HTTP/1.1 Host: example.com User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 Connection: keep-alive"} {"instruction": "Write a Python program to implement an algebraic equation.", "input": "Equation: 3x2 + 7x -4", "output": "def evaluate_eq(x):\n return 3*x*x + 7*x - 4"} {"instruction": "Construct an SQL query to find all records where the column ‘department’ equals ‘sales’.", "input": "", "output": "SELECT * FROM table WHERE department = 'sales';"} {"instruction": "Write a HTML code to show a table with 2 columns and 4 rows.", "input": "", "output": "
    Column 1 Column 2
    Row 1 Row 1
    Row 2 Row 2
    Row 3 Row 3
    Row 4 Row 4
    "} {"instruction": "Optimize a code snippet in Python for maximum performance.", "input": "import time\n \ndef sleep_for_the_ night():\n time.sleep(5)\n \nwhile True:\n sleep_for_the_ night()", "output": "import time\n\ndef sleep_for_the_night():\n while True:\n start_time = time.time()\n time.sleep(5)\n end_time = time.time()\n elapsed_time = end_time - start_time\n if elapsed_time < 5:\n time.sleep(5-elapsed_time)\n\nwhile True:\n sleep_for_the_night()"} {"text": "[DE Wikipedia] Clorox\n\nDie Clorox Company ist ein Haushaltswaren- und Chemieunternehmen aus den Vereinigten Staaten mit Hauptsitz in Oakland, Kalifornien. Das Unternehmen ist im Aktienindex S&P 500 gelistet. Das Unternehmen ist insbesondere für das Bleichmittel der Marke Clorox bekannt. Unternehmensgeschichte Das Unternehmen wurde am 3. Mai 1913 durch Archibald Taft, Edward Hughes, Charles Husband, Rufus Myers und William Hussey gegründet. Das Unternehmen hatte anfangs den Firmennamen Electro-Alkaline Company. 1928 ging das Unternehmen an die Börse in San Francisco und änderte den Firmennamen zu Clorox Chemical Company. 1957 wurde das Unternehmen von dem Konkurrenten Procter & Gamble gekauft. Der Kauf wurde jedoch von der US-amerikanischen Federal Trade Commission (FTC) untersagt, da die FTC im Haushaltswarenmarkt der Vereinigten Staaten eine Monopolstellung von Procter & Gamble befürchtete. Die FTC gewann diesen Streit und 1969 wurde Clorox wieder ein unabhängiges Unternehmen. Verbraucherschutz 2011 gab Clorox bekannt, sämtliche Inhaltsstoffe seiner Produkte, einschließlich verwendeter Konservierungs-, Farb- und Duftstoffe, zu veröffentlichen. Geschäftszahlen Im Geschäftsjahr 2016, das bei Clorox am 30. Juni 2016 endete, erzielte das Unternehmen einen Umsatz von 5,76 Mrd. Clorox beschäftigt ca. 8.000 Mitarbeiter. Produktmarken Zu Clorox gehören mehrere in den Vereinigten Staaten bekannte Haushaltsmarken verschiedener Produktrichtungen, unter anderem: Brita-Wasserfiltersysteme (Nord- und Südamerikageschäft) Burt’s Bees (Naturkosmetik) Clorox, Reinigungsmittel Glad Hidden Valley Ranch, Kitchen Bouquet und KC Masterpiece (Salatdressings und Soßen) Kingsford (Holzkohle) Lestoil, Pine-Sol, Tilex und S.O.S. (Reinigungsprodukte) Liquid-Plumr Formula 409 Fresh Step, EverClean, Scoop Away Weblinks offizielle Website von Clorox Clorox (Konsumenten-Produktportal) Einzelnachweise Produzierendes Unternehmen (Oakland) Chemieunternehmen (Vereinigte Staaten) Lebensmittelhersteller (Vereinigte Staaten) Haushaltswarenhersteller Drogerieartikelhersteller Hersteller von Basischemikalien Gegründet 1913"} {"instruction": "Generate C code to swap two integers without using a third variable.", "input": "", "output": "void swap_int(int * x, int * y) { *x = *x ^ *y; *y = *x ^ *y; *x = *x ^ *y; }"} {"instruction": "Produce a problem solving algorithm in Python to find the number of possible anagrams of a given word.", "input": "", "output": "def anagrams_count(word):\n if len(word) <= 1:\n return 1\n else:\n c = word[0]\n rem_let = word[1:]\n ret = anagrams_count(rem_let)\n for i in range(len(rem_let)):\n if c == rem_let[i]:\n continue\n rem_let_i = rem_let[:i] + rem_let[i+1:]\n ret += anagrams_count(rem_let_i)\n return ret"} {"instruction": "In Python, how can you iterate a list in reverse order?", "input": "", "output": "We can use the reversed() function to iterate a list in reverse order in Python. For example: my_list = [1, 2, 3, 4] for element in reversed(my_list): print(element)"} {"text": "[HI Wikipedia] वरुण (ग्रह)\n\nवरुण, (अंग्रेजी : नॅप्टयून या नॅप्चयून; प्रतीक: ) हमारे सौर मण्डल में सूर्य से आठवाँ ग्रह है। व्यास के आधार पर यह सौर मण्डल का चौथा बड़ा और द्रव्यमान के आधार पर तीसरा बड़ा ग्रह है। वरुण का द्रव्यमान पृथ्वी से १७ गुना अधिक है और अपने पड़ौसी ग्रह अरुण (युरेनस) से थोड़ा अधिक है। खगोलीय इकाई के हिसाब से वरुण की कक्षा सूरज से ३०.१ ख॰ई॰ की औसत दूरी पर है, यानि वरुण पृथ्वी के मुक़ाबले में सूरज से लगभग तीस गुना अधिक दूर है। वरुण को सूरज की एक पूरी परिक्रमा करने में १६४.७९ वर्ष लगते हैं, यानि एक वरुण वर्ष १६४.७९ पृथ्वी वर्षों के बराबर है। हमारे सौर मण्डल में चार ग्रहों को गैस दानव कहा जाता है, क्योंकि इनमें मिटटी-पत्थर की बजाय अधिकतर गैस है और इनका आकार बहुत ही विशाल है। वरुण इनमे से एक है - बाकी तीन बृहस्पति, शनि और अरुण (युरेनस) हैं। इनमें से अरुण की बनावट वरुण से बहुत मिलती-जुलती है। अरुण और वरुण के वातावरण में बृहस्पति और शनि के तुलना में बर्फ़ अधिक है - पानी की बर्फ़ के अतिरिक्त इनमें जमी हुई अमोनिया और मीथेन गैसों की बर्फ़ भी है। इसलिए कभी-कभी खगोलशास्त्री इन दोनों को \"बर्फ़ीले गैस दानव\" नाम की श्रेणी में डाल देते हैं। खोज और नामकरण वरुण पहला ग्रह था जिसकी अस्तित्व की भविष्यवाणी उसे बिना कभी देखे ही गणित के अध्ययन से की गयी थी और जिसे फिर उस आधार पर खोजा गया। यह तब हुआ जब अरुण की परिक्रमा में कुछ अजीब गड़बड़ी पायी गयी जिनका अर्थ केवल यही हो सकता था के एक अज्ञात पड़ौसी ग्रह उसपर अपना गुरुत्वाकर्षक प्रभाव डाल रहा है। खगोल में खोजबीन करने के बाद यह अज्ञात ग्रह २३ सितम्बर १८४६ को पहली दफ़ा दूरबीन से देखा गया और इसका नाम \"नॅप्टयून\" रख दिया गया। \"नॅप्टयून\" प्राचीन रोमन धर्म में समुद्र के देवता थे, जो स्थान प्राचीन भारत में \"वरुण\" देवता का रहा है, इसलिए इस ग्रह को हिन्दी में वरुण कहा जाता है। रोमन धर्म में नॅप्टयून के हाथ में त्रिशूल होता था इसलिए वरुण का खगोलशास्त्रिय चिन्ह ♆ है। रंग-रूप और मौसम जहाँ अरुण ग्रह सिर्फ एक गोले का रूप दिखता है जिसपर कोई निशान या धब्बे नहीं हैं, वहाँ वरुण पर बादल, तूफ़ान और मौसम का बदलाव साफ़ नज़र आता है। माना जाता है के वरुण पर तूफ़ानी हवा सौर मण्डल के किसी भी ग्रह से ज़्यादा तेज़ चलती है और २,१०० किमी प्रति घंटा तक की गतियाँ देखी जा चुकी हैं। जब १९८९ में वॉयेजर द्वितीय यान वरुण के पास से गुज़रा तो वरुण पर एक \"बड़ा गाढ़ा धब्बा\" नज़र आ रहा था, जिसकी तुलना बृहस्पति के \"बड़े लाल धब्बे\" से की गयी है। क्योंकि वरुण सूरज से इतना दूर है, इसलिए उसका ऊपरी वायुमंडल बहुत ही ठंडा है और वहाँ का तापमान -१२८ °सेंटीग्रेड (५५ कैल्विन) तक गिर सकता है। इसके बड़े अकार की वजह से इस ग्रह के केंद्र में इसके गुरुत्वाकर्षण के भयंकर दबाव से तापमान ५,००० °सेंटीग्रेड तक पहुँच जाता है। वरुण के इर्द-गिर्द कुछ छितरे-से उपग्रही छल्ले भी हैं जिन्हें वॉयेजर द्वितीय ने देखा था। वरुण का हल्का नीला रंग अपने ऊपरी वातावरण में मौजूद मीथेन गैस से आता है। परिक्रमा एवं घूर्णन नेप्च्यून एवं सूर्य के बीच की औसत दूरी 4.50 अरब किमी (लगभग 30.1 एयू) है, एवं यह औसतन हर 164.79 ± 0.1 वर्षों में सूर्य की परिक्रमा पूरी करता है। 11 जुलाई 2011 को नेप्च्यून ने 1846 में इसकी खोज के बाद…"} {"instruction": "Construct a Python script to print a specific character from a string.", "input": "str = \"Hello world!\" index = 5", "output": "testString = \"Hello world!\" print(testString[index]) # Output will be: w"} {"instruction": "Write a loop to iterate through the following array and prints each element.", "input": "arr = [1, 2, 3, 4, 5]", "output": "arr = [1, 2, 3, 4, 5]; for (let i = 0; i < arr.length; i++) { console.log(arr[i]); }"} {"instruction": "You need to write code for adding a column to a pandas DataFrame.", "input": "import pandas as pd df = pd.DataFrame({'A': [12, 4, 5, None, 1], 'B': [7, 2, 54, 3, None], 'C': [20, 16, 11, 3, 8], 'D': [14, 3, 17, 2, 6]}) new_col_data = [1, 1, 15, 6, 96]", "output": "import pandas as pd df = pd.DataFrame({'A': [12, 4, 5, None, 1], 'B': [7, 2, 54, 3, None], 'C': [20, 16, 11, 3, 8], 'D': [14, 3, 17, 2, 6]}) new_col_data = [1, 1, 15, 6, 96] df['new_col'] = new_col_data"} {"text": "[EN Wikipedia] Marinobacter persicus\n\nMarinobacter persicus is a Gram-negative, non-spore-forming, strictly aerobic and moderately halophilic bacterium from the genus of Marinobacter which has been isolated from the Aran-Bidgol Lake from the central desert of Iran. References External links Type strain of Marinobacter persicus at BacDive - the Bacterial Diversity Metadatabase Alteromonadales Bacteria described in 2013 Halophiles"} {"instruction": "Write a SQL query to select all employees from the department with the code 'IT'.", "input": "", "output": "SELECT * FROM Employees WHERE departmentCode = 'IT';"} {"text": "[CS Wikipedia] Vůz BDbmsee447 ČD\n\n{{DISPLAYTITLE:Vůz BDbmsee447 ČD}} Vozy řady BDbmsee447 (původně dodány jako BDmeer, potom do prosince 2010 označeny BDbmrsee), očíslované v intervalu 51 54 82-70, jsou jednou z řad osobních vozů Českých drah přizpůsobených pro přepravu vozíčkářů . Všechny tyto vozy (075–100) byly vyrobeny pro tehdejší Československé státní dráhy ve VEB Waggonbau Bautzen v letech 1987–1988. Po rozpadu Československa připadlo Českým drahám 16 těchto vozů. Všechny vozy vyjma vozu č. 100 byly zmodernizovány na řadu Bbdgmee236. Technický popis Jsou to neklimatizované vozy typu UIC-Z délky 26 400 mm. Mají podvozky GP 200 S 25 vybavené kotoučovými brzdami. Jejich nejvyšší povolená rychlost je 160 km/h. Vnější nástupní dveře těchto vozů jsou předsuvné, ovládané pákou a vybavené posilovačem. Dveře jsou vybaveny pneumatickým dálkovým zavíráním, a za jízdy jsou blokovány. Mezivozové přechodové dveře jsou manuálně posuvné do strany. Vozy mají polospouštěcí okna. Mají celkem sedm oddílů – pět klasických, oddíl číslo šest je pro vozíčkáře a sedmý, na druhém konci vozu, je služební. Původně měly vozy osmimístné oddíly a oddíl pro vozíčkáře byl kvůli zúžení trojmístný (sedačky byly jen na jedné straně oddílu). Vozy tedy měly celkem 40 + 3 polohovatelných sedaček. Při úpravách vozů byly mj. běžné oddíly změněny na šestimístné, ale jsou již bez polohovatelných sedaček. Tyto vozy mají celkem 30 + 3 míst k sezení. Vytápění vozů je realizováno pomocí elektrického ohřívače vzduchu s automatickou regulací teploty. Provozní osvětlení vozů je řešeno zářivkami, nouzové a noční je provedeno pomocí žárovek. Vozy jsou vybaveny centrálním zdrojem energie (CZE), který umožňuje napájet elektrická zařízení (např. osvětlení) z topného kabelu namísto nápravového generátoru. CZE může být napájen nejen z topného kabelu, ale i z trojfázové veřejné sítě 380 V / 220 V. Ve vozech se nachází i zásuvky 230 V, po jedné v každé umývárně a další na chodbičce, ale ty jsou aktivní jen pokud je vůz napájen z veřejné sítě. Původní nátěr vozů byl tmavě zelený se žlutým pruhem pod okny. Byl řešen pomocí polyuretanových barev. Nynější nátěr je přes okna zelený a zbytek je bílý, případně je proveden v korporátním stylu Českých drah od studia Najbrt. Přeprava tělesně postižených Vozy jsou vybaveny pro přepravu cestujících na vozíku, a na rozdíl od vozů BDhmsee451, 448 mají i plošinu k jejich nakládání. Vůz má ve střední části dveře pro nástup cestujících na invalidním vozíku a také je zde pro ně vyhrazený oddíl. Prostorné WC uzpůsobené pro pohyb s invalidním vozíkem se proto nachází také uprostřed vozu. Vůz má rozšířenou chodbičku tak, aby vozík mohl pohodlně zajet od vnějších širokých dveří kolem WC až do šestého oddílu. Vozy jsou v oddíle pro vozíčkáře a na WC vybaveny SOS tlačítkem, kterým může být přivolána vlaková…"} {"instruction": "Introduce a condition to change the background color of a given HTML page to green when the user clicks a button.", "input": "", "output": " "} {"text": "[HI Wikipedia] चंदन दास\n\nचंदन दास मशहूर गज़ल गायक हैं।ुन्के प्रमुख गाने इस प्रकार है--आ भी जाओ के जिन्दगी कम है, कल खाब मे देखा सखी मैने पिया का गाओ रे, जब मेरी हकीकत जा जा कर, जब कोइ फैसला कीजिये, साथ छूटेगा कैसे मेरा आपका। सन्दर्भ गायक"} {"instruction": "Build a simple chatbot using Python and nltk library. The chatbot should read a given set of strings as input and generate an appropriate response.", "input": "Hello, how are you?", "output": "import nltk\n\n# sample input\ninput = 'Hello, how are you?'\n\n# list of tokenized words\nwords = nltk.word_tokenize(input)\n\n# list of part-of-speech tagged words\nwords_tagged = nltk.pos_tag(words)\n\n# defining chatbot's greeting response \ngreeting_response = 'Hi there! How can I help you?'\n\n# defining chatbot's response to a question\nif words_tagged[1][1] == \"WP\":\n response = 'I am sorry, I can not answer this question.'\n \n# checking for greeting in input\nif words_tagged[0][1] == 'UH':\n response = greeting_response\n\n# printing the chatbot response\nprint(response)\n# Hi there! How can I help you?"} {"instruction": "Write a C++ code to perform selection sort on a given array of numbers.", "input": "[2, 6, 4, 1, 7, 9, 8]", "output": "void selectionSort(int arr[], int n) { int i, j, min_idx; // One by one move boundary of unsorted subarray for (i = 0; i < n-1; i++) { // Find the minimum element in unsorted array min_idx = i; for (j = i+1; j < n; j++) { if (arr[j] < arr[min_idx]) { min_idx = j; } } // Swap the found minimum element with the first // element swap(&arr[min_idx], &arr[i]); } } // Output // [1, 2, 4, 6, 7, 8, 9]"} {"instruction": "Write a code to multiply two matrices, assuming the two matrices can be multiplied.", "input": "A = [[1, 2], [3, 4]] B = [[5, 6], [7, 8]]", "output": "def multiply_matrices(A, B): if len(A[0]) != len(B): raise ValueError(\"Matrices cannot be multiplied\") rows_A = len(A) columns_A = len(A[0]) rows_B = len(B) columns_B = len(B[0]) result = [[0 for column in range(columns_B)] for row in range(rows_A)] for row in range(rows_A): for column in range(columns_B): for k in range(columns_A): result[row][column] += A[row][k] * B[k][column] return result"} {"text": "[DE Wikipedia] Edmund Weaver\n\nEdmund Weaver (* um 1683; † 27. Dezember 1748) war ein englischer Astronom, Vermessungsingenieur und Freund von William Stukeley. Weaver's The British Telescope Ephemeriden (astronomische Tabellen) gilt als eine wichtige Publikation des 18. Jahrhunderts über die Bewegung der Planeten. Leben Edmund Weaver wurde um 1683 geboren und lebte in Frieston in Lincolnshire. Er starb am 27. Dezember 1748 und wurde in der St. Vinzenz-Kirche, Caythorpe begraben, dem Dorf nördlich seines Wohnsitzes in Frieston. Im südlichen Altarraum der St. Vincent's Church befindet sich ein Denkmal für ihn. Astronomie Als Autodidakt schrieb Weaver The British Telescope, was den Antiquar William Stukeley dazu veranlasste, ihn als „ein sehr ungewöhnliches Genie“ zu bezeichnen, „das sich selbst zum Meister der Astronomie gemacht hatte und kaum für den zweiten im Königreich gehalten werden konnte“. Durch die Zusammenarbeit mit Weaver entwickelte Stukeley ein Interesse an der Astronomie. Weavers Schriften über Astronomie und Astrologie wurden auch von Martin Folkes, dem Präsidenten der Society of Antiquaries, geschätzt. Weaver unterstützte das heliozentrische Weltbild. Er wandte sich gegen die Kritik an der Genauigkeit der von Edmond Halley, dem Astronomer Royal, formulierten Ephemeriden, insbesondere gegen die von Tycho Wing (Astrologe und Instrumentenbauer 1726 - 1776). In seiner 1741 erschienenen Ausgabe von The British Telescope beschrieb er die Bahn des bevorstehenden Venustransits von 1769 als gekrümmt und die Planetenbewegung als elliptisch, was die Aufmerksamkeit der Zeitschrift Royal Astronomer auf sich zog. Landvermessung 1734 druckte Weaver Proposals for making and publishing for Subscription an actual Survey of the County of Lincoln. Das Projekt wurde begonnen, aber nicht vollendet, so dass nur eine Karte und Messungen bestimmter Straßen und Peilungen zwischen Orten übrig blieben. Ein Korrespondent des The Gentleman's Magazine beschrieb Weaver, nachdem er das Projekt in seinem Besitz gesehen hatte, als „einen bekannten Astrologen, Almanach-Macher, Quacksalber und Landvermesser“. Die vorgeschlagene Vermessung von Lincolnshire sollte alle Wapentakes (Verwaltungsgliederung des Danelag), Kirchen, Kapellen, religiöse Häuser, Schlösser und Parks, bemerkenswerte Häuser, Schlösser und den Adel umfassen. Es würde alle Gemeinden, Siedlungen, Wasserwege, Brücken und Straßen umfassen, mit zeitgenössischer technischer Ausrüstung durchgeführt und vollständig indexiert werden. Weitere Informationen Weaver, Edmund: The British Telescope: Being an Ephemeris of the Coelestial Motions with an Almanack for the Year of Our Lord 1741. Nachdruck: Gale Ecco (2010). Auch gedruckt 1725 und 1731 Einzelnachweise Astronom (18. Jahrhundert) Engländer Brite Geboren im 17. Jahrhundert Gestorben 1748…"} {"instruction": "Write a SQL query to find the books in the library whose title included the word \"Science\".", "input": "", "output": "SELECT * FROM books WHERE title LIKE '%Science%';"} {"text": "[DE Wikipedia] Vessel (Struktur)\n\nVessel (TKA) ist eine etwa 46 Meter hohe Struktur und Besucherattraktion und Teil des Städtebauprojektes Hudson Yards auf der West Side von Manhattan in New York City. Sie ist eine Mischung zwischen Gebäude, Kunstwerk und Monument und wurde nach Plänen des britischen Designers und Architekten Thomas Heatherwick erbaut. Beschreibung Das Städtebauprojekt Hudson Yards befindet sich im gleichnamigen Viertel Hudson Yards im Stadtteil Chelsea am Ufer des Hudson Rivers. Vessel ist der gestalterische Mittelpunkt im zwei Hektar großen Park „Public Square and Gardens at Hudson Yards“, der von den Wolkenkratzern der Hudson Yards umgeben ist. Die aufwändige wabenartige Struktur ist 45,7 m (150 Fuß) hoch, besitzt 16 Stockwerke und besteht aus 154 Treppen, 2500 Stufen und 80 Podesten, die die Besucher besteigen können. An der Basis beträgt der Durchmesser etwa 15 m und erweitert sich nach oben allmählich auf 46 m. Für mobilitätseingeschränkte Menschen verfügt die Struktur nach ADA-Richtlinien über Rampen und einen Aufzug. Das Projekt Vessel wurde am 14. September 2016 vorgestellt. Der Bau begann im April 2017 und Vessel wurde am 15. März 2019 eröffnet. Die einzelnen kupferverkleideten Teile wurden in Italien gefertigt und per Schiff nach New York transportiert. Die endgültigen Kosten, die vom Hudson Yards-Entwickler Related Companies finanziert wurden, belaufen sich geschätzt auf 200 Millionen US-Dollar. Schließungen Im Januar 2021 musste die Struktur nach drei Selbstmorden vorerst geschlossen werden. Die Betreiber berieten zunächst ohne konkrete Lösung, wie man hier Suizide verhindern kann. Im Mai 2021 hatte man es unter den Bedingungen wiedereröffnet, dass die Besucher mindestens einen Begleiter haben und Besucher ab fünf Jahren 10 Dollar für ein Ticket bezahlen mussten. Nachdem zwei Monate später ein weiterer Selbstmord geschah, als ein Teenager im Beisein seiner Familie in die Tiefe sprang, wurde Vessel auf unbestimmte Zeit geschlossen. Anschließend testete man verschiedene Sicherheitskonzepte, vorerst ohne befriedigendes Ergebnis. Inzwischen ist Vessel an der Basis auf der untersten Ebene wieder für Besucher kostenlos zugänglich, während die Treppen und der Lift weiterhin gesperrt sind. Galerie Weblinks Hudson Yards New York Vessel. Meine Stadt New York Vessel – Kunstwerk zum Anfassen. Einzelnachweise Bauwerk in Manhattan Bildende Kunst (New York City) Erbaut in den 2010er Jahren"} {"text": "[EN Wikipedia] Horace C. Spencer\n\nHorace C. Spencer (July 1832 – November 1, 1926) was a Michigan politician. Early life In 1832, Spencer was born in Springville, Erie County, New York or possibly Coutland, New York. In 1853, he married Catherine Morris. Traveling to Michigan in 1866, he entered the hardware business until 1880. In 1877, he invested his money as one of the original stockholders in the Second National Bank of Bay City, Michigan. With the Genesee County Savings Bank in 1885, he served as a director then later as a vice-president and a chairman of the board of directors. From 1891 to 1903, Spencer served as the first cashier of Citizens Commercial and Savings Bank. He was also an initial member of the Board of Director. Political life Elected to the Michigan State Senate twice, Spencer served during Governor Alger's term and was a redistricting committee member. He was elected as the mayor of the City of Flint in 1908 for a single 1-year term defeating the incumbent. He serve several terms on the Flint City park board. Post-political life Horace C. Spencer died November 1, 1926 at his home in Flint, Michigan. References Mayors of Flint, Michigan 1832 births 1926 deaths Republican Party Michigan state senators 19th-century American politicians 20th-century American politicians"} {"instruction": "Create a Python program to find and remove the longest string from a given list of strings.", "input": "list_strings = [\"string1\", \"string2\", \"string3\", \"longeststring\"]", "output": "def remove_longest_string(list_strings):\n longest_string = \"\"\n for string in list_strings:\n if len(string) > len(longest_string):\n longest_string = string\n list_strings.remove(longest_string)\n return list_strings\n\nprint(remove_longest_string(list_strings))"} {"text": "[HI Wikipedia] नुआपड़ा\n\nनुआपड़ा भारत के ओड़ीसा प्रान्त का एक शहर है। यह नुआपड़ा जिला मुख्यालय है। विवरण पश्चिमी ओड़ीशा का नुआपड़ा जिला मध्य प्रदेश के रायपुर और ओड़ीशा के बरगढ़, बलांगिर व कालाहांडी जिलों से घिरा हुआ है। 3407.05 वर्ग किलोमीटर में फैला यह जिला 1993 तक कालाहांडी का हिस्सा था, लेकिन प्रशासनिक सुविधा के लिहाज से इसे कालाहांडी से अलग एक नए जिले के रूप में गठित कर दिया गया। पतोरा जोगेश्वर मंदिर, राजीव उद्यान, पातालगंगा, योगीमठ, बूढ़ीकोमना, खरीयार, गौधस जलप्रताप आदि यहां के प्रमुख पर्यटन स्थल हैं। प्रमुख आकर्षण पतोरा जोगेश्वर मंदिर यह पश्चिमी ओड़ीसा और छत्तीसगढ़ के लोकप्रिय शिव पीठों में एक है। मारागुडा घाटी के मारागुडा गांव में स्थित इस मंदिर में 6 फीट ऊंचा शिवलिंग स्थापित है। इसके निकट ही राम मंदिर भी बना हुआ है। 40 फीट ऊंची हनुमान की मूर्ति यहां का मुख्य आकर्षण है। पातालगंगा हिन्दुओं का यह पवित्र तीर्थस्थान खरियार से 41 किलोमीटर और बोडेन से 6 किलोमीटर की दूरी पर स्थित है। माना जाता है कि जो व्यक्ति इसके गर्म जल में स्नान करता है, उसे मुक्ति मिलती है। पातालगंगा में स्नान करने को पवित्र गंगा नदी में स्नान करने के बराबर माना जाता है। कहा जाता है कि जब भगवान राम अपने वनवास के दौरान इस क्षेत्र से गुजर रहे तो सीता को प्यास लगी है। सीता की प्यास बुझाने के लिए राम ने धरती पर बाण चलाया और पातालगंगा की उत्पत्ति हुई। योगीमठ योगीमठ लोकप्रिय प्रागैतिहासिक कालीन गुफा है। इस गुफा में पुरापाषाण काल के अनेक चित्र पत्थरों पर बने हुए हैं। यहां बनी सांड की आकृति काफी आकर्षक है। कृषि और पशुओं के चित्र आज भी उस काल के जीवन आंखों के सामने उपस्थित कर देते हैं। बूढ़ीकोमना बूढ़ीकोमना खरियार से 73 किलोमीटर की दूरी पर स्थित है। इस स्थान की लोकप्रियता यहां बने भगवान पातालेश्वर शिव के मंदिर के कारण है। त्रिरथ शैली में बने इस मंदिर के निर्माण में ईंटों का प्रयोग किया गया है। वर्तमान में यह मंदिर क्षतिग्रस्त अवस्था में है। खरियार खरियार नगर के बीचों बीच बना प्राचीन दधीबामन मंदिर बना हुआ है। इस मंदिर को स्थानीय लोग बडागुडी नाम से भी पुकारते हैं। इसके अलावा भगवान जगन्नाथ मंदिर, हनुमान मंदिर, देवी लक्ष्मी मंदिर और रक्तांबरी मंदिर यहां के अन्य लोकप्रिय आकर्षण हैं। खरियार में अमेरिकन इवेन्जलिकल मिशन की गतिविधियों होती रहती हैं। गौधस जलप्रपात नुआपड़ा से 30 किलोमीटर दूर स्थित इस जलप्रपात की कुल ऊंचाई 30 मीटर है। यह झरना गर्मियों के दिनों में सूख जाता है। इसके निकट ही भगवान शिव का मंदिर देखा जा सकता है। बैसाखी पर्व के मौके पर यहां दूर-दूर से भक्तों का आगमन होता है। सुनादेब वन्यजीव अभयारण्य 600 वर्ग किलोमीटर में फैला यह अभयारण्य नुआपड़ा जिले में छत्तीसगढ़ की सीमा के निकट स्थित है। इसे बारहसिंहा का आदर्श स्थान माना जाता है। साथ ही टाईगर, तेंदुए, हेना, बार्किंग डीयर, चीतल, गौर, स्लोथ बीयर और पक्षियों की विविध प्रजातियां देखी जा सकती हैं। आवागमन वायु मार्ग नूआपाडा का नजदीकी एयरपोर्ट रायपुर विमानक्षेत्र में है। यह एयरपोर्ट 120 किलोमीटर की दूरी पर है और देश के अनेक बड़े शहरों से वायुमार्ग द्वारा जुड़ा है। रेल मार्ग नुआपड़ा रोड रेलवे स्टेशन यहां का करीबी रेलवे स्टेशन है, जो नुआपड़ा नगर से 3 किलोमीटर दूर है।…"} {"text": "[HI Wikipedia] पानीपत\n\nपानीपत (अँग्रेज़ी: Panipat) भारत के हरियाणा राज्य के पानीपत ज़िले में स्थित एक ऐतिहासिक नगर है। यह ज़िले का मुख्यालय भी है। कोरवो और पांडुवो में मध्य महाभारत का युद्ध पानीपत के लिए हुआ था , पांडुवों ने चार अन्य गांवों के साथ पानीपत की मांग कौरवों से की थी पर कौरवों ने सुई की नोक के बराबर भी हिस्सा देने से मना कर दिया था l सन् 1526, 1556 और 1761 में तीन महत्वपूर्ण युद्ध लड़े गए थे। पानीपत की भाषा हरियाणवी हैं। पानीपत राष्ट्रीय राजधानी क्षेत्र का एक हिस्सा हैं। विवरण पानीपत एक प्राचीन और ऐतिहासिक शहर है। पानीपत का प्राचीन नाम 'पाण्डवप्रस्थ' था। यह दिल्ली-चंडीगढ राष्ट्रीय राजमार्ग संख्या-१ पर स्थित है। यह राष्ट्रीय राजधानी क्षेत्र, दिल्ली के अन्तर्गत आता है और दिल्ली से ९० किलोमीटर की दूरी पर स्थित है। पानीपत को पांडवों ने इंद्रप्रस्थ के साथ ही बसाया था, पानीपत का किला अर्जुन द्वारा बनवाया गया था (एच ए बरारी) तब पानीपत को पनप्रस्त या पांडवप्रस्त के नाम से जाना जाता था । पानीपत को दोबारा राजा दंडपाणी ने ईसा से 707 साल पहले फिर बसाया इसका नाम पानीपथ पड़ा (सर सैय्यद अहमद खान) । पांडवों का पानीपत में लिखा है कि पानीपत नगर पहले सिर्फ किले के अंदर बसा था । यह किला पांडवों द्वारा निर्मित था जो 1857 तक मौजूद था । जिसे 1857 की क्रांति के बाद ढाया गया जिसके अवशेष आज भी मौजूद है । किले पर एक तोप भी थी जिसे बाद में दिल्ली ले जाया गया । Asiatic society of india बंगाल के 1868 के रिसर्च पेपर में पानीपत हस्तीनापुर और अन्य कई महाभारतकालीन किलो की ईंटो की बनावट पर शोध करके लिखा है कि ईंटों के साइज माप और बनावट से यह किला भी महाभारत काल का बना हुआ है। कुछ इतिहासकारों के अनुसार पानीपत के किले पर भगवान हरिहर का मंदिर था जिसे गुलाम वंश का शासन होने पर तोड़ा गया था, बाद में भगवान हरिहर की प्रतिमा देवी मंदिर के पास सरोवर से खुदाई में मिली । किले पर कई जैन मंदिर भी थे । जैन धर्म के संबंधित साहित्य के अनुसार उस समय पानीपत को पानीपथ दुर्ग भी कहा जाता था । पानीपत के लिए एक ही लड़ाई हुई जिसे महाभारत का युद्ध कहा जाता है । पानीपत के आखिरी हिंदू राजा जो तोमर (तंवर) वंश का था को परिवार सहित बलबन के समय धोखे से मार दिया गया । किले में काम करने वाले कुम्हारों ने जो परिवार सहित किले में थे राजा की गर्भवती पोत्रवधु को छिपा लिया इस कारण उसकी जान बच गई यह ज्वालापुर (हरिद्वार के पास) के राजा की बेटी थी जिसे कुछ समय बाद किसी तरह से कुम्हारों ने उसके मायके ज्वालापुर पहुंचा दिया । वहां उसने एक पुत्र को जन्म दिया जिसका नाम अमर सिंह था । जिसे किशोर अवस्था में पता चला कि वह तो पानीपत के राजा का पौत्र है तो वह पानीपत आया । जहां पर उसे उसकी अपनी जायदाद लौटने का लालच दिया या जान का हवाला, पानीपत के शेख सरफुद्दीन कलंदर ने अमर सिंह को कलमा पढ़वा कर धर्म परिवर्तन कर दिया और उसे नया नाम अमीरुल्ला खान दिया और बल्बन के नाम उसकी जमीन उसे देने का परवाना लिख दिया । पर बलबन तो पहले ही अमर सिंह के परिवार की जमीन पानीपत पर कब्जा करने में सहायता करने वाले तीन परिवारों के दे चुका था तो अमर सिंह के हाथ पूरा पानीपत न आकर सिर्फ चौथा भाग से भी कम ही आया । आज भी पानीपत में राजस्व विभाग के अनुसार जमीन की चार पट्टियाँ…"} {"instruction": "Given a JSON document, write a Python code to query for all records with a price value greater than 5.", "input": "{\n \"id\": \"0001\",\n \"type\": \"donut\",\n \"name\": \"Cake\",\n \"price\": 5.99\n},\n{\n \"id\": \"0002\",\n \"type\": \"donut\",\n \"name\": \"Chocolate\",\n \"price\": 3.99\n}", "output": "import json\n\ndef query_price(data):\n # Load data from string \n records = json.loads(data) \n # Query for all records with a price value greater than 5.\n return [record for record in records if record['price'] > 5]"} {"instruction": "Write a python program that takes in 2 parameters, a list and a number, and returns a dictionary with the words in the list and the number of characters in each word as its value.", "input": "['the', 'cat', 'in', 'the', 'hat']", "output": "my_list = ['the', 'cat', 'in', 'the', 'hat']\n\ndef get_word_length_dict(my_list):\n my_dict = {}\n for word in my_list:\n my_dict[word] = len(word)\n return my_dict\n\nprint(get_word_length_dict(my_list))"} {"instruction": "Create a lambda function in Python that collects all the numbers between 0 and 10 that are divisible by 3.", "input": "", "output": "lambda x: [x for x in range(0, 11) if x % 3 == 0]"} {"instruction": "Create a C++ program that finds the first 8 prime numbers.", "input": "", "output": "#include using namespace std; int main() { int n, i, c; for (n = 2; n <= 16; n++) { c = 0; for (i = 1; i <= n; i++) { if (n % i == 0) { c++; } } if (c == 2) { cout << n << endl; } } return 0; }"} {"instruction": "Modify the existing Python code to generate a Fibonacci series.", "input": "def generate_fibonacci_series(n):\n print(\"0\")\n current = 0\n next = 1\n for i in range(0, n-1):\n current, next = next, current + next\n print(next)", "output": "def generate_fibonacci_series(n):\n print(\"0\")\n current = 0\n next = 1\n for i in range(0, n):\n print(current)\n temp = current\n current = next\n next = temp + next"} {"instruction": "Create a Python web scraper for extracting data from TripAdvisor. The scraper should scrape reviews and ratings for all restaurants and hotels within 5 miles of a given geolocation.", "input": "Location coordinates - (43.626074, -79.491644)", "output": "import requests\nfrom bs4 import BeautifulSoup\n\ncoords = (43.626074, -79.491644)\nurl = 'https://www.tripadvisor.com/Search?geo={},{}&q=restaurants+and+hotels&distance=5mi'.format(*coords)\nresponse = requests.get(url).text\nsoup = BeautifulSoup(response, 'html.parser')\n\nrating_nodes = soup.find_all('span', class_='ui_bubble_rating')\nreview_nodes = soup.find_all('div', class_='review-container')\n\nreviews = []\n\nfor rating_node, review_node in zip(rating_nodes, review_nodes):\n rating = int(float(rating_node.attrs['class'][1][7:]))\n text = review_node.find('span', class_='noQuotes').text\n reviews.append((rating, text))\n\nprint(reviews)"} {"instruction": "Trace the recursive Fibonacci algorithm in Python and test its execution time for different values of n.", "input": "num = 10", "output": "import time \n\ndef fib(n): \n if n<0: \n print(\"Incorrect input\") \n elif n==1: \n return 0\n elif n==2: \n return 1\n else: \n return fib(n-1)+fib(n-2) \n\nstart = time.time() \n\nnum = 10 \nprint(fib(num))\n\nprint(\"Time taken:\", time.time()-start)"} {"text": "[EN Wikipedia] Cinema of South Sudan\n\nCinema is a newly developing industry in South Sudan. History The history of cinema in what is now South Sudan started during the Anglo-Egyptian colonial period in Sudan. In Juba, as in other parts of the country, mobile cinema shows were announced by loudspeakers on the roof of a Landcruiser driving around town. These movie shows were held in the open, often introduced by short speeches that began at sunset. Audiences sat in front of a white piece of cloth, presenting a programme of American comedies and Westerns, short documentaries made by the mobile Sudanese filmmaking unit for a Sudanese public, and feature films made in India, Kenya, and Britain. South Sudan gained independence in 2011; six years after the conclusion of the Second Sudanese Civil War which led to the closure of Juba's only cinema. In 2011, Daniel Danis directed the first South Sudanese feature film, Jamila. , South Sudan did not have a single movie theatre, and most citizens relied on South Sudan Television what was locally called as SSTV. According to the manager of the South Sudanese Government Agency which promotes filming and arts of creativity, Elfatih Majok Atem, \"Many local filmmakers have never had any training so they could teach themselves on the job of filmmaking. Those who are experts face the challenge of accessing good equipment and tools and are affected by the lack of support and encouragement from its citizens\". Film festival In 2016, South Sudan hosted its first film festival, the Juba Film Festival. The festival included a film industry conference, and the second scheduled to be held in South Sudan. Founded by Simon Bingo, the festival was intended to alleviate the negative image of South Sudan as a war-torn country as well as to promote South Sudanese culture and art. Groups Several groups in the country seek to promote filmmaking by local filmmakers: Woyee Film and Theatre Industry, a filmmaking collective. The Cinematography and Film Industry Section of the Ministry of Culture, Youth and Sports. Movie and TV Academy, a private school in Juba. Nyakuron Cultural Center, the host for the 2016 Juba Film Festival. References Mass media in South Sudan"} {"instruction": "Generate a Python program to print the most popular item in a list.", "input": "A list of integers [1, 5, 9, 1, 4, 5, 9]", "output": "from collections import Counter\n\ndef most_popular(arr):\n cnt = Counter()\n for number in arr:\n cnt[number] += 1\n return cnt.most_common(1)[0][0]\n\nresult = most_popular([1, 5, 9, 1, 4, 5, 9])\nprint(result)"} {"instruction": "Find an example of a sorting algorithm in Python.", "input": "", "output": "Example of a sorting algorithm in Python: def selection_sort(arr): for i in range(len(arr)): # Find the minimum element in remaining # unsorted array min_idx = i for j in range(i + 1, len(arr)): if arr[min_idx] > arr[j]: min_idx = j # Swap the found minimum element with # the first element arr[i], arr[min_idx] = arr[min_idx], arr[i]"} {"instruction": "Construct an IF-ELSE statement that test for a given condition and prints result based on that.", "input": "to_test = 5", "output": "if to_test < 10: print(\"Less than 10\") else: print(\"Greater than 10\")"} {"instruction": "This code is a Python module for a Rapidgator.net hoster plugin. To use it, import the necessary modules and classes, and then create an instance of the `RapidgatorNet` class. The class has methods for handling premium and free downloads, as well as handling captchas. The `getInfo` function is used to create an instance of the `RapidgatorNet` class.", "input": "", "output": "# -*- coding: utf-8 -*-\n\nimport pycurl\nimport re\n\nfrom module.common.json_layer import json_loads\nfrom module.network.HTTPRequest import BadHeader\nfrom module.plugins.internal.AdsCaptcha import AdsCaptcha\nfrom module.plugins.internal.ReCaptcha import ReCaptcha\nfrom module.plugins.internal.SolveMedia import SolveMedia\nfrom module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo\n\n\nclass RapidgatorNet(SimpleHoster):\n __name__ = \"RapidgatorNet\"\n __type__ = \"hoster\"\n __version__ = \"0.34\"\n\n __pattern__ = r'http://(?:www\\.)?(rapidgator\\.net|rg\\.to)/file/\\w+'\n __config__ = [(\"use_premium\", \"bool\", \"Use premium account if available\", True)]\n\n __description__ = \"\"\"Rapidgator.net hoster plugin\"\"\"\n __license__ = \"GPLv3\"\n __authors__ = [(\"zoidberg\", \"zoidberg@mujmail.cz\"),\n (\"chrox\", None),\n (\"stickell\", \"l.stickell@yahoo.it\"),\n (\"Walter Purcaro\", \"vuolter@gmail.com\")]\n\n\n API_URL = \"http://rapidgator.net/api/file\"\n\n COOKIES = [(\"rapidgator.net\", \"lang\", \"en\")]\n\n NAME_PATTERN = r'Download file (?P<N>.*)'\n SIZE_PATTERN = r'File size:\\s*(?P[\\d.,]+) (?P[\\w^_]+)'\n OFFLINE_PATTERN = r'>(File not found|Error 404)'\n\n JSVARS_PATTERN = r'\\s+var\\s*(startTimerUrl|getDownloadUrl|captchaUrl|fid|secs)\\s*=\\s*\\'?(.*?)\\'?;'\n\n PREMIUM_ONLY_PATTERN = r'You can download files up to|This file can be downloaded by premium only<'\n ERROR_PATTERN = r'You have reached your (?:daily|hourly) downloads limit'\n WAIT_PATTERN = r'(Delay between downloads must be not less than|Try again in).+'\n\n LINK_FREE_PATTERN = r'return \\'(http://\\w+.rapidgator.net/.*)\\';'\n\n RECAPTCHA_PATTERN = r'\"http://api\\.recaptcha\\.net/challenge\\?k=(.*?)\"'\n ADSCAPTCHA_PATTERN = r'(http://api\\.adscaptcha\\.com/Get\\.aspx[^\"\\']+)'\n SOLVEMEDIA_PATTERN = r'http://api\\.solvemedia\\.com/papi/challenge\\.script\\?k=(.*?)\"'\n\n\n def setup(self):\n if self.account:\n self.sid = self.account.getAccountInfo(self.user).get('sid', None)\n else:\n self.sid = None\n\n if self.sid:\n self.premium = True\n\n self.resumeDownload = self.multiDL = self.premium\n self.chunkLimit = 1\n\n\n def api_response(self, cmd):\n try:\n json = self.load('%s/%s' % (self.API_URL, cmd),\n get={'sid': self.sid,\n '"} {"text": "[HI Wikipedia] वीर विक्रम गुरुङ\n\nवीर विक्रम गुरुङ का जन्म 27 अगस्त 1927 को दार्जिलिंग में हुआ। कहानियों में 'बुद्ध भरिया', 'टाइफाइड', 'ठेठ नेपाली कथा', आदि चर्चित। समाज के विभिन्न पक्षों को लेकर कहानी लिखने के लिए ये विख्यात हैं। 'अमर क्षण' कहानी संग्रह प्रकाशित। सन्दर्भ नेपाली साहित्यकार 1927 में जन्मे लोग जीवित लोग"} {"instruction": "Develop a Python program for solving a quadratic equation.", "input": "Not applicable", "output": "import cmath\n\ndef quadratic_equation(a, b, c):\n # calculate the discriminant\n d = (b**2) - (4*a*c)\n \n # find two solutions\n sol1 = (-b-cmath.sqrt(d))/(2*a)\n sol2 = (-b+cmath.sqrt(d))/(2*a)\n \n return sol1, sol2\n \nif __name__ == \"__main__\":\n a = 1\n b = 5\n c = 6\n \n solutions = quadratic_equation(a, b, c)\n \n print('The solution are {0} and {1}'.format(solutions[0],solutions[1]))"} {"instruction": "Write a SQL query to summarize the sales of each product.", "input": "Table: Sales Columns: product, quantity", "output": "SELECT product, SUM(quantity) AS total_sales FROM Sales GROUP BY product;"} {"text": "[CS Wikipedia] Urmi\n\nUrmi () je řeka v Chabarovském kraji v Rusku. Je dlouhá 458 km. Plocha povodí měří 15 000 km². Průběh toku Pramení na jižním svahu Badžalského hřbetu a teče podél Burejinského hřbetu. Na dolním toku protéká Dolnoamurskou nížinou. Je pravou zdrojnicí řeky Tungusky v povodí Amuru. Vodní režim Zdrojem vody jsou převážně dešťové srážky. Průměrný roční průtok vody ve vzdálenosti 204 km od ústí činí 170 m³/s. Zamrzá v listopadu a rozmrzá na konci dubna až na začátku v května. Využití Řeka je splavná v délce 260 km a je na ní rozvinutá vodní doprava prostřednictvím kutrů. Literatura Řeky v Chabarovském kraji Povodí Amuru"} {"instruction": "Write a Python program to convert ratings in a list of strings to a float.", "input": "['4.5', '3.0', '2.5', '4.0']", "output": "def str_to_float(ratings):\n return [float(x) for x in ratings]"} {"instruction": "Write an SQL query to count the number of books of each genre.", "input": "Table Name: books Attributes: id, title, author, genre", "output": "SELECT genre, COUNT(*) AS \"Number Of Books\" FROM books GROUP BY genre;"} {"instruction": "Write a code that takes a number and prints it out in words.", "input": "25", "output": "def number_to_word(n): tens_words = { 0: '', 2: 'twenty', 3: 'thirty', 4: 'forty', 5: 'fifty', 6: 'sixty', 7: 'seventy', 8: 'eighty', 9: 'ninety', } ones_words = { 1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five', 6: 'six', 7: 'seven', 8: 'eight', 9: 'nine', } tens = n // 10 ones = n % 10 return tens_words[tens] + ' ' + ones_words[ones] print(number_to_word(25))"} {"instruction": "Write an algorithm in Python to find the average value in an array of integers.", "input": "[4, 10, 6, 8]", "output": "def avg(arr): \n \n # calculating length of array \n n = len(arr) \n total_sum = 0\n\n for i in range(0, n): \n total_sum += arr[i] \n \n return total_sum / n \n\n# Driver code \narr = [4, 10, 6, 8] \nassert avg(arr) == 7.0"} {"instruction": "Develop a jQuery program to toggle the visibility of a div.", "input": "", "output": "$(document).ready(function () { $(\"#toggleBtn\").click(function () { $(\"#toggleDiv\").toggle(); }); });"} {"instruction": "Optimize a function in Python.", "input": "def sum_of_list(lst): \n sum = 0\n for n in lst: \n sum += n \n return sum", "output": "def sum_of_list(lst): \n return sum(lst)"} {"instruction": "Develop a regex pattern to match email addresses.", "input": "", "output": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"} {"text": "[DE Wikipedia] Hans Schmitt\n\nHans Schmitt ist der Name folgender Personen: * Hans Schmitt (Pianist, 1835) (1835–1907), österreichischer Musikpädagoge, Pianist und Komponist Hans Schmitt (Bildhauer) (1912–1996), deutscher Bildhauer Hans Schmitt (1924–1995), deutscher Pianist und Hochschullehrer, siehe Hans und Kurt Schmitt Hans Schmitt (Maler) (1930–1993), deutscher Maler Hans Schmitt (Fußballspieler) (* 1946), deutscher Fußballspieler Hans Schmitt-Lermann (1911–1994), deutscher Versicherungshistoriker und -funktionär Hans Schmitt-Rost (1901–1978), deutscher Journalist, Schriftsteller und Herausgeber Hans Adolf Schmitt (1921–2006), US-amerikanischer Historiker und Hochschullehrer deutscher Herkunft Hans-Christoph Schmitt (1941–2020), deutscher Theologe Hans Jürgen Schmitt (1930–2014), deutscher Physiker und Hochschullehrer Hans-Jürgen Schmitt (* 1938), Übersetzer, Publizist, Literaturkritiker und Herausgeber Hans Karl Schmitt (1927–1991), deutscher Bildhauer Hans-Klaus Schmitt (1900–1982), deutscher Bankkaufmann und Heimatforscher Hans-Michael Schmitt (* 1956), Landschaftsarchitekt und Hochschullehrer Hanspeter Schmitt (* 1959), deutscher katholischer Theologe und Hochschullehrer Hans-Walter Schmitt (* 1952), deutscher Unternehmer, Manager und Schachorganisator Siehe auch: Hans Schmid Hans Schmidt Hans Schmitz Johann Schmid Johann Schmidt Johann Schmitt Johann Schmitz Johannes Schmid Johannes Schmidt Johannes Schmitt Johannes Schmitz Hansl Schmid (1897–1987), österreichischer Sänger"} {"instruction": "Parse a given XML element.", "input": "Python for Dummies", "output": "def parse_xml(element): root = element.find('root') book = root.find('book').text return book"} {"instruction": "Write a Python script to remove all repeated characters from a string.", "input": "string = \"aaabbccddeeff\"", "output": "def removeRepeatedChars(str):\n result = \"\"\n for c in str:\n if c not in result:\n result += c\n return result\n\nprint(removeRepeatedChars(\"aaabbccddeeff\"))"} {"instruction": "Design a MongoDB collection Schema for stores' inventory records.", "input": "", "output": "db.inventoryRecords.insert({ storeName: String, itemName: String, quantity: Number, unitPrice: Number })"} {"instruction": "Format the following HTML tags correctly.", "input": " hello world", "output": " Hello World "} {"instruction": "Print the sum of the first ten natural numbers.", "input": "", "output": "def sum_of_first_ten(): \"\"\"Print the sum of the first ten natural numbers.\"\"\" total = 0 for i in range(1, 11): total += i return total if __name__ == '__main__': print(sum_of_first_ten())"} {"instruction": "Generate a random list of 20 unique numbers from 0 to 30.", "input": "", "output": "[3, 5, 12, 11, 14, 0, 22, 19, 10, 6, 1, 25, 18, 27, 24, 16, 17, 21, 20, 15]"} {"instruction": "Given a linked list, write a python program to reverse the linked list.", "input": "", "output": "# A Node class \nclass Node: \n \n # Constructor to initialize the node object \n def __init__(self, data): \n self.data = data \n self.next = None\n \nclass LinkedList: \n \n # Function to initialize head \n def __init__(self): \n self.head = None\n \n # A function to reverse the linked list \n def reverse(self):\n prev = None\n current = self.head\n while current is not None:\n next = current.next\n current.next = prev\n prev = current\n current = next\n self.head = prev\n \n def push(self, new_data): \n new_node = Node(new_data) \n new_node.next = self.head \n self.head = new_node"} {"instruction": "Use Python to build a random number generator in the range [0, 10).", "input": "", "output": "import random\n \nx = random.randint(0, 9)\nprint(x)"} {"text": "[EN Wikipedia] 1939–40 Norwegian Ice Hockey Championship season\n\nThe 1939–40 Norwegian Ice Hockey Championship season was the sixth season of ice hockey in Norway. 14 teams participated in the league, and Grane won the championship. Results First round Grane Stabekk - Forward 3:1 Bygdø - Ready 2:6 B14 - Frisk 1:2 Frogner - Holmen 1:3 Gjøa - Furuset 0:4 Strong - Heming 1:0 Hasle Second round Grane - Stabekk 5:1 Ready - Frisk 4:3 Holmen - Furuset 5:2 Strong - Hasle 0:2 Semifinals Grane - Ready 4:0 Holmen - Hasle 1:3 Final Grane - Hasle 1:0 External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1939–40 in Norwegian ice hockey"} {"text": "[EN Wikipedia] 1860 in Denmark\n\nEvents from the year 1860 in Denmark. Incumbents Monarch – Frederick VII Prime minister – Carl Edvard Rotwitt (until 8 February), Carl Christian Hall (from 24 February) Events 8–14 July – The 8th Scandinavian Scientist Conference is held in Copenhagen. 20 November – The frigate Jylland is launched at Holmen in Copenhagen. Births 22 July – Paul Gustav Fischer, painter (died 1944) 23 July – Georg Achen, painter (died 1912) 13 September – Jens Jensen, landscape architect (died 1951 in USA) 15 December – Niels Ryberg Finsen, Nobel Prize-winning physician (died 1904) Deaths 30 January – Jørgen Hansen Koch, architect (born 1787) 1 May – Anders Sandøe Ørsted, jurist and politician, Prime Minister of Denmark (born 1778) References 1860s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Write a script to iterate over all elements in a list, and sum up all integers greater than 5.", "input": "var myList = [3, 7, 5, 6, 1]", "output": "function sumOfInt(arr) { var sum = 0; for (var i = 0; i < arr.length; i++) { if (arr[i] > 5) { sum += arr[i]; } } return sum; } sumOfInt(myList); // Returns 13"} {"instruction": "Generate a simple python function to concatenate two lists.", "input": "", "output": "def concatenate_lists(list1, list2): return list1 + list2"} {"instruction": "Compare two lists to find missing numbers.", "input": "list1 = [1, 2, 3, 4, 5] list2 = [2, 3, 4]", "output": "# Create a new set to store the missing numbers missing_numbers = set(list1).difference(set(list2)) # Print the missing numbers print(\"Missing numbers:\", *missing_numbers)"} {"instruction": "Generate a Python script to calculate the total cost of items in a grocery list.", "input": "list = {\"banana\": 2.5, \"apple\": 3.7, \"orange\": 4.2, \"tomato\": 1.2}", "output": "# Calculating the total cost of items in a grocery list\n\nlist_cost = 0\nlist_items = {\"banana\": 2.5, \"apple\": 3.7, \"orange\": 4.2, \"tomato\": 1.2}\n\nfor item, price in list_items.items():\n list_cost += price\n \nprint('The total cost of the items in the list is {}'.format(list_cost)"} {"instruction": "Create a class with two methods, one to return the name and the other to return the age.", "input": "", "output": "class Person: def __init__(self, name, age): self.name = name self.age = age def get_name(self): return self.name def get_age(self): return self.age"} {"text": "[HI Wikipedia] आरगाउ कैन्टन\n\nआरगाउ कैन्टन (जर्मन व अंग्रेज़ी: Aargau) स्विट्ज़रलैंड के उत्तर में स्थित एक् कैन्टन (प्रान्त से मिलता-जुलता प्रशासनिक विभाग) है। इस कैन्टन को सन् १८०३ में नेपोलियन बोनापार्ट ने स्विट्ज़रलैंड में हस्तक्षेप करते हुए अपने 'मध्यस्थता विधेयक' (Act of Mediation) के तहत स्विस परिसंघ का हिस्सा बना दिया था। इस का नाम यहाँ से गुज़रने वाली 'आर नदी' (Aare) पर पड़ा है (जर्मन में 'आरगाउ' का मतलब 'आर-ज़िला' होता है)। इन्हें भी देखें स्विट्ज़रलैंड के कैन्टन सन्दर्भ आरगाउ कैन्टन स्विट्ज़रलैंड के कैन्टन"} {"text": "[CS Wikipedia] Vladimír Váňa\n\nVladimír Váňa (15. února 1932 – 25. března 2000) byl český esperantista. Dílo Vynikající je jeho překlad J. Otčenáška: Romeo, Julia Kaj Tenebro (Romeo, Julie a tma) Jaroslav Hašek – Povídky, Osudy dobrého vojáka Švejka Jiří Haussmann – Danoj en Praha''' (Dánové v Praze) Karel Poláček – Joakimo kaj la parencaro (Jáchym a příbuzenstvo); La kompensa komerco I'' (Kompenzační obchod) Čeští esperantisté Čeští překladatelé Narození v roce 1932 Úmrtí v roce 2000 Muži"} {"instruction": "Generate a Python code to find the power of a number.", "input": "base = 2\nexponent = 4", "output": "# Calculate power of a number \ndef power(base, exponent):\n # Initialize result\n result = 1\n # Multiply result with base\n # until exponent becomes 0\n while exponent != 0:\n result *= base\n exponent -= 1\n \n # Return result\n return result\n\n# Print the power\nprint(power(base, exponent))"} {"text": "[HI Wikipedia] मोज़ाम्बीक\n\nमोज़ाम्बीक (अंग्रेजी: Mozambique, पुर्तगाली: Moçambique) दक्षिणपूर्वी अफ़्रीका में स्थित एक देश है जो पूर्व में हिन्द महासागर से, उत्तर में तंज़ानिया से, पश्चिमोत्तर में मालावी और ज़ाम्बिया से. पश्चिम में ज़िम्बाब्वे से और दक्षिण में स्वाज़ीलैंड और दक्षिण अफ़्रीका से बंधा हुआ है। पहली से पांचवी सदी ईसवी में यहाँ उत्तर और पश्चिम से बांटू-भाषी लोग आ बसे, जिसके बाद स्वाहिली-भाषी और फिर अरब लोगों का प्रभाव रहा। सन् १४९८ में पुर्तगाली खोजयात्री वास्को दा गामा जो अपनी नौकाएँ लेकर भारत जा रहा था रास्ते में यहाँ आ धमका। १५०५ में पुर्तगाल ने मोज़ाम्बीक पर अपना राज घोषित कर दिया और मोज़ाम्बीक उसका उपनिवेश (कोलोनी) बन गया। पुर्तगाली ज़माने में बहुत से भारतीय मूल के लोग भी मोज़ाम्बीक जा बसे और वे २००७ में आबादी का ०.०८% थे। १९७५ में मोज़ाम्बीक आज़ाद हुआ। १९७७ से १९९२ में यहाँ एक ज़बरदस्त गृह युद्ध चला। इन्हें भी देखें दक्षिण अफ़्रीका सन्दर्भ मोज़ाम्बीक अफ़्रीका के देश भूतपूर्व पुर्तगाली उपनिवेश १९७५ में स्थापित देश या क्षेत्र पुर्तगाली-भाषी देश व क्षेत्र"} {"instruction": "Construct a query in SQL to select users from the \"Users\" table aged between 30 and 40.", "input": "// Table Name Users", "output": "SELECT * FROM Users WHERE age BETWEEN 30 AND 40;"} {"text": "[HI Wikipedia] ऋषभदेव तहसील\n\nऋषभदेव राजस्थान, भारत में उदयपुर जिले की एक तहसील है। तहसील में 125 राजस्व गांव और एक शहर शामिल है। तहसील मुख्यालय ऋषभदेव में स्थित है। सन्दर्भ राजस्थान की तहसीलें उदयपुर जिले की तहसीलें"} {"instruction": "Create a set of classes in Python to represent a school database.", "input": "", "output": "class Student:\n def __init__(self, name, grade):\n self.name = name\n self.grade = grade\n\n \nclass Course:\n def __init__(self, name, teachers):\n self.name = name\n self.teachers = teachers\n \n \nclass School:\n def __init__(self, name):\n self.name = name\n self.students = []\n self.courses = []"} {"instruction": "Design an algorithm in Python to detect duplicate elements in an array.", "input": "[1, 2, 3, 4, 2]", "output": "def find_duplicates(lst):\n seen = set()\n duplicates = []\n for item in lst:\n if item in seen:\n duplicates.append(item)\n else:\n seen.add(item)\n \n return duplicates"} {"instruction": "Output a list of all even numbers between two given positive integers m and n.", "input": "m=2, n=10", "output": "def evenNumbers(m,n): evenNum=[] for i in range(m,n+1): if i%2 == 0: evenNum.append(i) return evenNum"} {"instruction": "Explain how to use Binary Search in Python?", "input": "", "output": "Binary search is an efficient search algorithm for sorted arrays. In Python, the bisect module can be used for binary search. The bisect.bisect() function finds the position of the number in the list or a place for the number if it is not present. The bisect.bisect_left() function does the same, but carefully chooses its insertion point to the left of any existing entries of the same value. For example, to search for an element in a list, one can use the following code: import bisect def binary_search(list, item): pos = bisect.bisect_left(list, item) if pos != len(list) and list[pos] == item: return pos else: return -1 list = [1, 2, 4, 7, 8] print(binary_search(list, 2)) # Outputs 1"} {"text": "[EN Wikipedia] 1937–38 Hovedserien season\n\nThe 1937–38 Hovedserien season was the fourth season of ice hockey in Norway. Eight teams participated in the league, and Ski- og Fotballklubben Trygg won the championship. First round Group A Group B Final Ski- og Fotballklubben Trygg - Grane 2:0 Relegation First round Sportsklubben Strong - Stabæk Idrettsforening Second round B.14 - Stabæk Idrettsforening External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1937–38 in Norwegian ice hockey"} {"text": "[EN Wikipedia] Southampton, Nova Scotia\n\nSouthampton is a community in the Canadian province of Nova Scotia, located in Cumberland County . It has two roads leading up to it, Route 2 and Route 302. In Southampton, Nova Scotia there is the Elizabeth House General Store, which opened in 1923. References Southampton on Destination Nova Scotia Communities in Cumberland County, Nova Scotia General Service Areas in Nova Scotia"} {"instruction": "Create a Python script that takes a string of comma-separated temperatures and returns a minimum, maximum, and median value.", "input": "Input String: 82.0, 84.3, 69.6, 78.2", "output": "input_string = '82.0, 84.3, 69.6, 78.2'\n\ntemperatures = [float(temp) for temp in input_string.split(',')]\n\nmin_temp = min(temperatures)\nmax_temp = max(temperatures)\nmedian_temp = statistics.median(temperatures)\n\nprint(f'Minimum temperature: {min_temp}, Maximum temperature: {max_temp}, Median temperature: {median_temp}')"} {"instruction": "What is the syntax to print out the following string?", "input": "string = \"Hello World!\"", "output": "print(string)"} {"instruction": "Create a JSON object to represent an address.", "input": "", "output": "{ \"houseNumber\": \"20\", \"streetName\": \"Main Street\", \"city\": \"Anytown\", \"state\": \"AL\", \"zip\": \"12345\" }"} {"instruction": "Construct a Python function to redesign a given list to meet a given sorting criteria.", "input": "my_list = [31, 5, 42, 69, 20]", "output": "def sort_list(my_list):\n return sorted(my_list)"} {"instruction": "Design a program to find the nth Fibonacci number.", "input": "n: 10", "output": "def nth_fibonacci(n): if n == 0 or n == 1: return 1 else: n1, n2 = 1, 1 for i in range(2, n): n1, n2 = n2, n1 + n2 return n2"} {"instruction": "Create a Python-Flask application for managing a library book catalog. The application should have routes for listing books, adding new books, and deleting books.", "input": "Not applicable", "output": "# Import Flask and other necessary libraries\nfrom flask import Flask, render_template, request, jsonify\n\n# Create a Flask app\napp = Flask(__name__)\n\n# Create a books list in memory\nbooks = [\n { 'name': 'Python Crash Course', 'author': 'Eric Matthes', 'read': False },\n { 'name': 'Fluent Python', 'author': 'Luciano Ramalho', 'read': False }\n]\n\n# Create app routes\n\n@app.route('/')\ndef index():\n return render_template('index.html')\n\n@app.route('/books', methods=['GET', 'POST'])\ndef all_books():\n if request.method == 'GET':\n return jsonify({'books': books})\n\n elif request.method == 'POST':\n new_book = {'name': request.form.get('name'), 'author': request.form.get('author'), 'read': False}\n books.append(new_book)\n return jsonify({'books': books})\n\n@app.route('/books/', methods=['PUT', 'DELETE'])\ndef single_book(index):\n if request.method == 'PUT':\n book = books[index]\n book['name'] = request.form.get('name')\n book['author'] = request.form.get('author')\n\n return jsonify({'book': book})\n\n elif request.method == 'DELETE':\n books.pop(index)\n return jsonify({'books': books})"} {"text": "[DE Wikipedia] US Marosticense\n\nDie Unione Sportiva Marosticense ist ein italienischer Fußballverein aus der Kleinstadt Marostica. Die erste Mannschaft spielt aktuell in der 6. Liga Italiens, der Campionato di Eccellenza. Geschichte Die Gründung von U.S. Marosticense erfolgte 1900 von Mitarbeitern eines Unternehmens in Marostica, welches Strohhüte herstellte. Für die bevorstehende Reise nach Genua, von wo aus die Strohhüte in alle Welt verschifft wurden, wurde von Carl Serafini und Francisco Blows eine Fußballmannschaft organisiert, um sich bei dieser Gelegenheit mit einem genuesischen Team zu messen. Auch nach diesem Spiel wurden von den aktiven Mitgliedern verschiedene Veranstaltungen durchgeführt. 1909 wurde von einer Gruppe junger Männer um Gianno Cecchin, welcher für seine Verdienste während des Ersten Weltkriegs mit einer Ehrenmedaille ausgezeichnet werden sollte, der Verein reorganisiert und neu aufgestellt. Im Januar 1919 wurde Lorenzo Padovan der neue Präsident des Vereins. Mit ihm wurden im Verein U.S. Marosticense neben Fußball auch weitere Sportarten mitaufgenommen und aktiv betrieben. Dank einer Spende von Cavaliere Joseph Rubbi konnte 1927 ein eigener Fußballplatz mit Umkleideräumen und Erdhügeln als Zuschauertribünen an der Via Campo Sportivo erstellt werden. Jahre später wurde aufgrund des aufkommenden Faschismus und dem Zweiten Weltkrieg der Spielbetrieb eingestellt. Nach Kriegsende wurden am 15. Mai 1945 die Aktivitäten des Vereins wieder aufgenommen. Die damals neu erstellten Vereinsstatuten sind bis heute nahezu unverändert geblieben. In der Saison 1945/1946 gewann die U.S. Marosticense die Meisterschaft in der 1. Division, was den Aufstieg in die Serie C bedeutete. Aus wirtschaftlichen Gründen wurde jedoch auf die Promotion verzichtet. 1952/53 gewann man die Meisterschaft in der Campionato di 1ª Categoria. Als einer der ersten Amateur-Vereine in Italien begann die U.S. Marosticense ab 1967 eigene Fußballmannschaften für den Nachwuchs (damals NAGS genannt) zu unterhalten. In den folgenden Jahrzehnten pendelte die erste Mannschaft zwischen den Ligen Campionato di 2ª Categoria (9. Liga), Campionato di 1ª Categoria (8.), Campionato di Promozione (7.) und Campionato di Eccellenza (6.). In der Saison 2010/2011 spielte die U.S. Marosticense in der Campionato di Eccellenza und erreichte den 14. Rang. In den folgenden Relegationsspielen unterlag man Romano D'Ezzelino mit 0:1 im Heimspiel und erreichte auswärts ein 1:1, wodurch der Abstieg in die Campionato di Promozione Tatsache wurde. In der Saison 2011/2012 wurde bereits am 25. von insgesamt 30 Spieltagen mit einem Unentschieden auswärts gegen Vedelago-ElleEsse der Wiederaufstieg in die Campionato di Eccellenza sichergestellt. In der folgenden Saison etablierte sich die U.S. Marosticense erfolgreich in der Campionato…"} {"text": "[HI Wikipedia] वोपदेव\n\nवोपदेव विद्वान्, कवि, वैद्य और वैयाकरण ग्रंथाकार थे। इनके द्वारा रचित व्याकरण का प्रसिद्ध ग्रंथ 'मुग्धबोध' है। इनका लिखा कविकल्पद्रुम तथा अन्य अनेक ग्रंथ प्रसिद्घ हैं। ये 'हेमाद्रि' के समकालीन थे और देवगिरि के यादव राजा के दरबार के मान्य विद्वान् रहे। इनका समय तेरहवीं शती का पूर्वार्ध मान्य है। ये देवगिरि के यादव राजाओं के यहाँ थे। यादवों के प्रसिद्ध विद्वान् मंत्री हेमाद्रि पंत (हेमाड पंत) का उन्हें आश्रय था। \"मुक्ताफल\" और \"हरिलीला\" नामक ग्रंथों की इन्होंने रचना की। हरिलीला में संपूर्ण भागवत संक्षेप में आया है। बोपदेव यादवों के समकालीन, सहकारी, पंडित और भक्त थे। कहते हैं, वे विदर्भ के निवासी थे। उन्होंने प्रचुर और बहुविध ग्रंथों की रचना की। उन्होंने व्याकरण, वैद्यशास्त्र, ज्योतिष, साहित्यशास्त्र और अध्यात्म पर उपयुक्त ग्रंथों का प्रणयन करके अपनी बहुमुखी प्रतिभा का परिचय दिया। उन्होंने भागवत पर हरिलीला, मुक्ताफल, परमहंसप्रिया और मुकुट नामक चार भाष्यग्रंथों की सरस रचना की। उन्होंने मराठी में भाष्यग्रंथ लेखनशैली का श्रीगणेश किया। बाहरी कड़ियाँ मुग्धबोध संस्कृत व्याकरण वैयाकरण मराठी संस्कृत ग्रन्थकार संस्कृत साहित्यकार"} {"instruction": "Create a basic game in Python using Pygame.", "input": "Not applicable", "output": "import pygame\nimport time\n \n# defines the size of the window\nWINDOW_SIZE = (400, 400)\n \n# initializes pygame\npygame.init()\nscreen = pygame.display.set_mode(WINDOW_SIZE)\n \n# game parameters\ndone = False\nclock = pygame.time.Clock()\n\n# game loop\nwhile not done:\n # gets all events\n for event in pygame.event.get():\n if event.type == pygame.QUIT:\n done = True\n \n if event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE:\n done = True \n\n # draw something\n pygame.draw.rect(screen, (255, 20, 147), pygame.Rect(30, 30, 60, 60))\n \n # updates the display\n pygame.display.flip()\n \n # delays the loop iteration\n time.sleep(1/30)\n \n# terminate pygame\npygame.quit()"} {"text": "[CS Wikipedia] Stříbrná (rozcestník)\n\nPojem Stříbrná má více významů: stříbrná - barva název sídla Stříbrná - obec v okrese Sokolov Stříbrná Skalice - obec v okrese Praha-Východ název ulice Stříbrná (Praha) - ulice v Praze 1-Starém Městě jiné Stříbrná Huť - přírodní památka v okrese Tábor Stříbrná studánka (Křemešník) související Stříbrný"} {"instruction": "Generate an array of the first 10 Fibonacci numbers using any programming language.", "input": "", "output": "let fib = [0, 1]; while (fib.length < 10) { fib.push(fib[fib.length - 1] + fib[fib.length - 2]); } console.log(fib); // [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]"} {"instruction": "Write a Python program to implement a decision tree classifier to classify iris flowers into three categories (setosa, versicolor and virginica).", "input": "The iris dataset consists of 50 samples from each of three species of Iris (Iris setosa, Iris virginica and Iris versicolor). Four features were measured from each sample: the length and the width of the sepals and petals, in centimeters.", "output": "import numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.datasets import load_iris\n\n# load data\niris = load_iris()\nX = iris.data\ny = iris.target\n\n# split data into train and test sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=0)\n\n# Training\ndtree_model = DecisionTreeClassifier(max_depth=2).fit(X_train, y_train)\n\n# Testing\ndtree_predictions = dtree_model.predict(X_test)\n\n# Checking accuracy\nprint(\"Accuracy:\",np.mean(dtree_predictions==y_test))"} {"text": "[CS Wikipedia] Zizinho\n\nZizinho, původním jménem Thomaz Soares da Silva (14. října 1921 – 8. února 2002) byl brazilský fotbalista. Hrával na pozici útočníka. S brazilskou reprezentací získal stříbrnou medaili na mistrovství světa roku 1950, kde se rovněž dostal do all-stars týmu a poté co FIFA začala roku 1950 vyhlašovat nejlepšího hráče mistrovství, byl zpětně označen právě za nejlepšího fotbalistu tohoto šampionátu a dostal tzv. Zlatý míč. Celkem za národní tým odehrál 53 utkání, v nichž vstřelil 30 branek. Mezinárodní federace fotbalových historiků a statistiků (IFFHS) ho vyhlásila 4. nejlepším brazilským fotbalistou 20. století. Pelé ho několikrát označil za svůj největší vzor. Externí odkazy Nekrolog v britském deníku Guardian Portrét na World Football Legends Statistiky RSSSF Statistiky FIFA Fotbaloví útočníci Fotbalisté Clube de Regatas do Flamengo Fotbalisté São Paulo FC Narození v Riu de Janeiru Úmrtí v roce 2002 Muži Narození v roce 1921 Narození 14. září Úmrtí 8. února Brazilští fotbaloví trenéři Trenéři CR Vasco da Gama Hráči Mistrovství světa ve fotbale 1950 Fotbalisté Audax Italiano Vítězové Copa América"} {"instruction": "Using the .sort() method, sort an array in ascending order.", "input": "[5, 3, 9, 1]", "output": "arr.sort()"} {"instruction": "Create a C program to print the numbers from 1 to 100, except for any number divisible by 3.", "input": "", "output": "#include int main() { for (int i = 1; i <= 100; i++) { if (i % 3 != 0) printf(\"%d\\n\", i); } return 0; }"} {"instruction": "Create a Python program that takes in text input from the user and searches a given list of strings to find any matches.", "input": "strings = [\"First\",\"Second\",\"Third\"]", "output": "import re \n \n# input string \nstrings = [\"First\",\"Second\",\"Third\"]\n\n# Get the string \ninp_str = input(\"Please enter your string :\") \n\n# Initialize the flag \nfound = False\n \n# Search the string \nfor i in strings: \n if re.search(i, inp_str):\n found = True\n\n# Print result \nif found == True: \n print(\"String matches\") \nelse: \n print(\"String doesn't matches\")"} {"instruction": "Describe the Pandas feature \"DataFrame\"", "input": "", "output": "Pandas DataFrame is a two-dimensional data structure, i.e. data is aligned in a tabular fashion in rows and columns. It is a widely used tool for data manipulation and analysis in Python. It offers a variety of features such as filtering, sorting, adding/removing columns, updating the data, indexing, and many others."} {"text": "[HI Wikipedia] दस सर्वकालीन सर्वश्रेष्ठ चलचित्र\n\nदस सर्वकालीन सर्वश्रेष्ठ हिंदी चलचित्र कुछ लोग इन्हें मानते हैं : मदर इन्डिया दो बीघा ज़मीन मुगल-ए-आज़म आवारा गाइड प्यासा शोले जाने भी दो यारों बन्दिनी जागते रहो हिन्दी सिनेमा"} {"instruction": "Create a processing sketch that can randomly generate 500 circles.", "input": "", "output": "// Setup a canvas of 500x500 void setup() { size(500, 500); } // Randomly draw 500 circles in the canvas void draw() { for (int i=0; i<500; i++) { float x = random(0, 500); float y = random(0,500); float rand = random(0, 100); fill(rand, rand, rand); ellipse(x, y, 20, 20); } }"} {"instruction": "Write C++ code to find the maximum subarray sum", "input": "", "output": "int maxSubarraySum(int arr[], int n) { int max_so_far = 0, max_ending_here = 0; for (int i = 0; i < n; i++) { max_ending_here = max_ending_here + arr[i]; if (max_so_far < max_ending_here) max_so_far = max_ending_here; if (max_ending_here < 0) max_ending_here = 0; } return max_so_far; }"} {"text": "[EN Wikipedia] Stanislav Sukhina\n\nStanislav Valeryevich Sukhina (; born August 16, 1968, in Cherkasy, Ukraine, Soviet Union) is a Russian football official and a former referee and player. As a player, he played in the lower leagues for FC Avangard Kolomna (1989), FC Saturn Ramenskoye (1990) and FC Gigant Voskresensk (1994). He has been a FIFA international referee since 2003. He lives in Malakhovka and works as a university teacher. He has refereed games in 2010 World Cup qualifiers, the UEFA Champions League qualification rounds, and the UEFA Cup. He retired as a referee in 2012. After retirement as a referee, he worked as the team director for FC Lokomotiv Moscow until June 2021. He was appointed team director of FC Fakel Voronezh in 2022. References 1968 births Footballers from Cherkasy Living people Russian football referees Men's association football defenders Russian men's footballers FC Leon Saturn Ramenskoye players Soviet men's footballers"} {"text": "[EN Wikipedia] Acer washingtonense\n\nAcer washingtonense is an extinct maple species in the family Sapindaceae described from one fossil leaf and four fossil samaras. The species is solely known from the Early Eocene sediments exposed in northeast Washington state, United States. It is one of three species belonging to the extinct section Torada. History and classification Acer washingtonense was described from a lone leaf specimen and four complete fruit specimens which were recovered from three different locations. The lone leaf and two of the samara's were found in an outcrop of shale on Knob Hill north of Republic, Washington identified as Burke Museum of Natural History and Culture location UWBM B2737. The third samara fossil is from the Burke Museum location UWBM A0307 located within the town of Republic itself and the last samara was recovered from Resner Canyon, National Museum of Natural History location USNM 11018. Both UWBM B2737 and UWBM A0307 are in the Republic Graben while USNM 11018 is in the Toroda Creek Graben. Each of the sites are considered outcroppings of early Eocene, Ypresian, shale belonging to the Klondike Mountain Formation. The Klondike Mountain Formation, along with site of the same age in British Columbia preserve upland temperate floras which were first interpreted as being Microthermal, however further study has shown them to be more mesothermal in nature. The plant community preserved in the Klondike Mountain formation is a mixed conifer-broad leaf forest with large pollen elements of birch and golden larch, but also having notable traces of fir, spruce, cypress, and palm. The species was described from a group of specimens, the holotype, number \"UWBM 56253 A,B\" and the paratypes \"UWBM 56255\", \"UWBM 71135 A,B\" and \"UWBM 54308\" are currently preserved in the paleobotanical collections housed at the Burke Museum, part of the University of Washington in Seattle while the paratype, \"USNM 396011\", is in the paleobotanical collections of the National Museum of Natural History, part of the Smithsonian Institution in Washington, D.C. The specimens were studied by paleobotanists Jack A. Wolfe of the United States Geological Survey, Denver office and Toshimasa Tanai of Hokkaido University. Wolfe and Tanai published their 1987 type description for A. toradense in the Journal of the Faculty of Science, Hokkaido University. The etymology of the chosen specific name washingtonense is in recognition of the type locality in Northeastern Washington State. A. washingtonense is one of three species assigned to the extinct section Torada and is designated the type species for the section. The three members of the section A. stonebergae, A. toradense, and A. washingtonense were known only from the Republic and Princeton fossil localities when first described. Of the three…"} {"instruction": "Update the given CSS class statement.", "input": ".red_box { background-color: #AAFF00; margin: 10px; width: 20px; }", "output": ".red_box { background-color: #AAFF00; margin: 10px; padding: 15px; width: 20px; border-radius: 10px; }"} {"instruction": "How many continuous substrings are there in the string \"Geeks\"?", "input": "", "output": "15"} {"instruction": "Read the following code and identify the type of loop it is.", "input": "for a in range(0, 10): print(a)", "output": "for loop."} {"instruction": "Design a web page to display the first ten elements of a given 2D array.", "input": "A 2D array [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]", "output": "
    1 2 3
    4 5 6
    7 8 9
    10 11 12
    "} {"instruction": "Write the code to print a given table format in Python.", "input": "Table with 4 columns and 5 rows", "output": "for i in range(1,6): print('{:<10}{:<10}{:<10}{:<10}'.format(i, i**2, i**3, i**4))"} {"instruction": "Build a neural network using Python", "input": "import numpy as np # Sample data X = np.array([[0, 0], [0, 1], [1, 0], [1, 1]]) y = np.array([[0, 1, 1, 0]]).T", "output": "import keras # Create a neural network model = keras.Sequential([ keras.layers.Dense(2, activation='sigmoid'), keras.layers.Dense(1, activation='sigmoid') ]) # Compile the model model.compile(optimizer='adam', loss='mean_squared_error') # Train the model model.fit(X, y, epochs=1000)"} {"instruction": "Generate a code to create a Pyramid of stars with the given height.", "input": "", "output": "def print_pyramid(height): for row in range(1, height + 1): for col in range(1, row + 1): print('*', end=\" \") print('\\n')"} {"text": "[DE Wikipedia] Beiseker\n\nBeiseker ist eine Gemeinde im südlichen Alberta, Kanada, mit dem Status eines Dorfes (). Geschichte Beiseker, das in einem fruchtbaren Gebiet liegt, wurde 1908 auf Bestreben der Calgary Colonization Company als landwirtschaftliches Zentrum gegründet. Aus Deutschland stammende Siedler, die zunächst nach Dakota ausgewandert waren, waren die ersten Einwohner Beisekers, was sich heute noch in der auffallenden Häufigkeit deutscher Familiennamen widerspiegelt. 1910 bekam Beiseker Anschluss an die Canadian Pacific Railway, zwei Jahre später auch an die neugebaute Canadian National Railway. Auch die Kreuzung der Highways 9, 27 und 806 nordöstlich des Dorfes verschaffte Beiseker eine vorteilhafte infrastrukturelle Lage und schließlich 1921 auch den Status eines Dorfes. Wirtschaft Der ertragreiche Weizenanbau in der Umgebung führte zur Entwicklung der Industrie für landwirtschaftliche Produkte wie zum Beispiel Düngemittel. Des Weiteren wird dort auch Erdöl und Erdgas gewonnen, weshalb Beiseker von verschiedenen große Pipelines bedient wird. Das kanadische Hauptbüro von Lampson International, einem internationalen Hersteller von Baukränen befindet sich in Beiseker, so auch eine Verbrennungsanlage für biomedizinische Abfälle aus ganz Kanada. Demografie Das auf 915 m Höhe gelegene Dorf hatte 2006 eine Bevölkerung von 804, die sich auf 318 Haushalte verteilte. Bei einer Fläche von 2,84 km² ergibt sich eine Bevölkerungsdichte von 283,5 Einwohnern pro Quadratkilometer. Weblinks Offizielle Website von Beiseker Quellen Ort in Alberta"} {"text": "[EN Wikipedia] Purakaunui River\n\nThe Purakaunui River is a river in the western Catlins, New Zealand. It rises west of Houipapa and flows through the Pūrākaunui Bay Scenic Reserve into the Pacific Ocean at Pūrākaunui Bay. The river is best known for Purakaunui Falls. See also List of rivers of New Zealand References Rivers of Otago Rivers of New Zealand"} {"instruction": "Write a JavaScript program to check if two numbers are equal.", "input": "3 and 5", "output": "function areEqual(x, y){ if (x === y){ return true; } else{ return false; } }"} {"instruction": "Create a Python script that generates a random password.", "input": "Not applicable", "output": "import random\nimport string\n\ndef generate_password():\n characters = string.ascii_letters + string.digits + string.punctuation\n password = ''.join(random.choice(characters) for _ in range(15))\n return password\n\nprint(generate_password())"} {"instruction": "Write a Bash script to check if a given password matches the given regular expression.", "input": "Regular expression: ^[0-9][A-Z]+$ Password: 123ABC", "output": "#!/bin/bash if [[ \"$1\" =~ ^[0-9][A-Z]+$ ]]; then echo \"Password matches the regular expression\" else echo \"Password does not match the regular expression\" fi"} {"text": "[HI Wikipedia] गान्दरबल ज़िला\n\nगान्दरबल​ ज़िला भारत के जम्मू व कश्मीर राज्य का एक ज़िला है। यह पहले श्रीनगर ज़िले का हिस्सा हुआ करता था जिसकी दो तहसीलों (गान्दरबल​ और कंगन) को मिलाकर ६ जुलाई २००६ को इस ज़िले का गठन किया गया। तहसीलें ज़िले के गठन के बाद इसमें छह तहसीलें निर्धारित की गई- गान्दरबल तुलमुल, जहाँ खीर भवानी मंदिर स्थित है वाकूरा लार, गान्दरबल कंगन, गान्दरबल गुंड, गान्दरबल इन्हें भी देखें सोनमर्ग श्रीनगर ज़िला खीर भवानी मंदिर सन्दर्भ गान्दरबल ज़िला जम्मू और कश्मीर के ज़िले"} {"instruction": "Generate a random string of length 5 with only lowercase alphabetic characters.", "input": "", "output": "import string import random def generate_random_string(length): allowed_characters = string.ascii_lowercase return ''.join(random.choices(allowed_characters, k=length)) random_string = generate_random_string(5) print(random_string)"} {"instruction": "Create a function named `parse_file` that takes a parameter named `datafile`. The function should read the input `datafile` line by line, and for the first 10 lines (not including the header) split each line on \",\" and then for each line, create a dictionary where the key is the header title of the field, and the value is the value of that field in the row. The function should return a list of dictionaries, each data line in the file being a single list entry. Field names and values should not contain extra whitespace, like spaces or newline characters. You can use the Python string method `strip()` to remove the extra whitespace. The returned list should have 10 entries. Finally, write a test function named `test` that tests the implementation of the `parse_file` function.", "input": "", "output": "# Your task is to read the input DATAFILE line by line, and for the first 10 lines (not including the header)\n# split each line on \",\" and then for each line, create a dictionary\n# where the key is the header title of the field, and the value is the value of that field in the row.\n# The function parse_file should return a list of dictionaries,\n# each data line in the file being a single list entry.\n# Field names and values should not contain extra whitespace, like spaces or newline characters.\n# You can use the Python string method strip() to remove the extra whitespace.\n# You have to parse only the first 10 data lines in this exercise,\n# so the returned list should have 10 entries!\nimport os\n\nDATADIR = \"\"\nDATAFILE = \"beatles-diskography.csv\"\n\n\n# -*- coding: utf-8 -*-\n\ndef parse_file(datafile):\n data = []\n with open(datafile, \"r\") as f:\n cnt = 0\n key_list = []\n value_list = []\n for line in f:\n #print line\n if cnt == 0:\n key_list = line.strip().split(',')\n else:\n value_list = line.strip().split(',')\n if cnt != 0:\n data_dict = {}\n for i in xrange(len(key_list)):\n data_dict[key_list[i]] = value_list[i]\n data.append(data_dict)\n cnt += 1\n if cnt > 10:\n break\n return data\n\n\ndef test():\n # a simple test of your implemetation\n datafile = os.path.join(DATADIR, DATAFILE)\n d = parse_file(datafile)\n firstline = {'Title': 'Please Please Me', 'UK Chart Position': '1', 'Label': 'Parlophone(UK)', 'Released': '22 March 1963', 'US Chart Position': '-', 'RIAA Certification': 'Platinum', 'BPI Certification': 'Gold'}\n tenthline = {'Title': '', 'UK Chart Position': '1', 'Label': 'Parlophone(UK)', 'Released': '10 July 1964', 'US Chart Position': '-', 'RIAA Certification': '', 'BPI Certification': 'Gold'}\n\n assert d[0] == firstline\n assert d[9] == tenthline\n\n \ntest()"} {"instruction": "Given a list of lists, generate a single flattened list.", "input": "lst = [[1, 2], [3, 4], [5, 6]]", "output": "lst = [[1, 2], [3, 4], [5, 6]] flattened = [item for sublist in lst for item in sublist] print(flattened)"} {"instruction": "Generate a code to reverse a string without using any loop.", "input": "Input String = \"Hello World!\"", "output": "input_string = 'Hello World!' def reverse_string(input_string): if len(input_string) == 0: return \"\" else: return reverse_string(input_string[1:]) + input_string[0] res = reverse_string(input_string) print(res)"} {"instruction": "Create a python program that takes a keyword as an input and prints the top 10 relevant Wikipedia articles for that keyword", "input": "", "output": "import wikipedia def get_top_ten_results(keyword): results = wikipedia.search(keyword, results=10) for result in results: print(result)"} {"instruction": "Edit the following Python code such that the function produces output in the format \" said: ''.", "input": "def generate_message(name, message):\n print(name + ' said: ' + message)", "output": "def generate_message(name, message):\n print(name + ' said: ' + \"'\" + message + \"'\")"} {"instruction": "Write a regex expression to validate a username containing only letters, numbers, underscores, and hyphens.", "input": "", "output": "/^[a-zA-Z0-9_\\-]+$/"} {"text": "[HI Wikipedia] दार्दिस्तान\n\nदार्दिस्तान (पारसी-अरबी : داردستان) जी डब्ल्यू लिटनर द्वारा दिया गया एक भौगोलिक नाम है जो भारतीय कश्मीर, उत्तरी पाकिस्तान तथा उत्तर-पूर्वी अफगानिस्तान को सूचित करता है। इस भूभाग के निवासी दार्दी भाषाएँ बोलते हैं और 'दार्द' कहलाते हैं। इसके अंतर्गत चित्राल, यासिन, पेंन्याल, गिलगिट घाटी, हुजा एवं नागार बुंजी से वातेरा तक की सिंधु घाटी अस्तोर घाटी तथा कोहिस्तान मालाजाई क्षेत्र थे। इसका उल्लेख प्लिनी एवं टालिमी नामक इतिहासवेत्ताओं ने भी किया है। दार्द लोग 'आर्य जाति' के माने गए हैं। वे चौदहवीं शती में मुसलमान बन गए थे। सन्दर्भ कश्मीर भारत के क्षेत्र"} {"instruction": "Create a _JSON serializer_ for a given Python data structure.", "input": "data = {\n 'name': 'Alice',\n 'age': 22,\n 'hobbies': ['coding', 'guitar']\n}", "output": "import json\n\ndata = {\n 'name': 'Alice',\n 'age': 22,\n 'hobbies': ['coding', 'guitar']\n}\n\njson_data = json.dumps(data)\n\nprint(json_data)"} {"instruction": "The given code is a Python implementation of kNN algorithm for classification. It includes functions for reading data from a file, normalizing the data, and implementing the kNN algorithm. To use this code, call the \"datingClassTest\" function, which reads data from a file, normalizes it, and tests the kNN algorithm on the data. The function prints the classifier's results and the true classification for each test case, as well as the total error rate.", "input": "", "output": "#-*- coding: utf-8 -*-\n\nfrom numpy import *\nimport operator\n\n# 读取数据到矩阵\ndef file2matrix(filename):\n\n # 打开数据文件,读取每行内容\n fr = open(filename)\n arrayOLines = fr.readlines()\n\n # 初始化矩阵\n numberOfLines = len(arrayOLines)\n returnMat = zeros((numberOfLines,3))\n\n # 初始化类标签向量\n classLabelVector = []\n\n # 循环读取每一行数据\n index = 0\n for line in arrayOLines:\n # 去掉回车符\n line = line.strip()\n # 提取4个数据项\n listFromLine = line.split('\\t')\n # 将前三项数据存入矩阵\n returnMat[index,:] = listFromLine[0:3]\n # 将第四项数据存入向量\n classLabelVector.append(int(listFromLine[-1]))\n index += 1\n return returnMat,classLabelVector\n\n\n# 数据归一化\ndef autoNorm(dataSet):\n # 读取矩阵中数据项的最大和最小值\n minVals = dataSet.min(0)\n maxVals = dataSet.max(0)\n\n # 获得最大和最小值间差值\n ranges = maxVals - minVals\n\n # 初始化输出结果\n normDataSet = zeros(shape(dataSet))\n\n # 获取矩阵的行数\n m = dataSet.shape[0]\n\n # 矩阵运算:实现归一化公式中的 oldValue - min 一步\n normDataSet = dataSet - tile(minVals, (m,1))\n\n # 矩阵除法:实现归一化公式中的除法\n normDataSet = normDataSet/tile(ranges, (m,1))\n\n # 返回归一化后的数据,数据范围及最小值矩阵\n return normDataSet, ranges, minVals\n\n\n# kNN算法实现\ndef classify0(inX, dataSet, labels, k):\n # 获取样本数据数量\n dataSetSize = dataSet.shape[0]\n\n # 矩阵运算,计算测试数据与每个样本数据对应数据项的差值\n diffMat = tile(inX, (dataSetSize,1)) - dataSet\n\n # sqDistances 上一步骤结果平方和\n sqDiffMat = diffMat**2\n sqDistances = sqDiffMat.sum(axis=1)\n\n # 取平方根,得到距离向量\n distances = sqDistances**0.5\n\n # 按照距离从低到高排序\n sortedDistIndicies = distances.argsort()\n classCount={}\n\n # 依次取出最近的样本数据\n for i in range(k):\n # 记录该样本数据所属的类别\n voteIlabel = labels[sortedDistIndicies[i]]\n classCount[voteIlabel] = classCount.get(voteIlabel,0) + 1\n\n # 对类别出现的频次进行排序,从高到低\n sortedClassCount = sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True)\n\n # 返回出现频次最高的类别\n return sortedClassCount[0][0]\n\n# 算法测试\ndef datingClassTest():\n # 设定测试数据的比例\n hoRatio = 0.10\n\n # 读取数据\n datingDataMat,datingLabels = file2matrix('datingTestSet2.txt')\n\n # 归一化数据\n normMat, ranges, minVals = autoNorm(datingDataMat)\n\n # 数据总行数\n m = normMat.shape[0]\n\n # 测试数据行数\n numTestVecs = int(m*hoRatio)\n\n # 初始化错误率\n errorCount = 0.0\n\n # 循环读取每行测试数据\n for i in range(numTestVecs):\n\n # 对该测试人员进行分类\n classifierResult = classify0(normMat[i,:],normMat[numTestVecs:m,:],datingLabels[numTestVecs:m],3)\n\n # 打印KNN算法分类结果和真实的分类\n print \"the classif"} {"instruction": "Create a while loop using the given conditions.", "input": "counter = 0 max_count = 5", "output": "while counter < max_count: counter += 1"} {"instruction": "Develop a Python web-crawler that takes a URL as input and returns the number of words on the page.", "input": "url = http://example.com", "output": "import requests\nfrom bs4 import BeautifulSoup\n \ndef get_page_word_count(url):\n r = requests.get(url)\n soup = BeautifulSoup(r.content, 'html.parser')\n words = soup.find_all(text=True)\n count = 0 \n for w in words:\n count += len(w.split())\n return count\n \nurl = \"http://example.com\"\nword_count = get_page_word_count(url)\nprint(\"word count = \", word_count)"} {"text": "[DE Wikipedia] Arnold Cramer\n\nArnold Cramer (* 2. Oktober 1941; † 26. August 2010) war ein deutscher Fußballspieler. Der Verteidiger hat in der Saison 1960/61 beim FC Schalke 04 in der damals erstklassigen Fußball-Oberliga West zehn Ligaspiele absolviert. Schalke belegte am Rundenende den dritten Platz. Spielerlaufbahn Der Defensivspieler überzeugte mit seinem Talent insbesondere im Jugendbereich. Über Spiele in der Jugendauswahl von Westdeutschland schaffte er die Aufnahme in die DFB-Jugendnationalmannschaft. Die Nachwuchshoffnung aus Schalke bestritt im Jahr 1960 alle sechs vom DFB ausgetragenen A-Juniorenländerspiele. Er gehörte im April 1960 dem Aufgebot für das UEFA-Juniorenturnier in Österreich an. In allen drei Gruppenspielen gegen die Türkei (1:0), Ungarn (1:1) und die DDR (1:1) bildete er dabei mit Dieter Kurrat das Verteidigerpaar. Weitere Mannschaftskameraden beim UEFA-Juniorenturnier waren unter anderem Spieler wie Hermann Marchl, Jürgen Neumann, Stefan Reisch, Kurt Haseneder, Karl-Heinz Bente, Hans-Otto Peters, Gerhard Elfert und Jürgen Koch. Zur Saison 1960/61 wurde der vormalige Jugendspieler in den Oberligakader von Schalke 04 übernommen. Der Kader von Trainer Georg Gawliczek wurde auch noch durch Ernst Kuster, Egon Horst und Willi Schulz aufgefrischt. Bereits am fünften Spieltag, den 11. September 1960, debütierte der noch 18-jährige Cramer, bei einem 3:1-Auswärtserfolg gegen den VfL Bochum, in der Oberliga West. Vor Torhüter Josef Broden bildete er als rechter Verteidiger zusammen mit Helmut Laszig, Willi Schulz, Egon Horst und Günter Karnhof die Abwehr der Schalker im damals gebräuchlichen WM-System. Bis einschließlich des zwölften Spieltages am 6. November 1960, gehörte er dann der Stammbesetzung an. Herausragend waren dabei einmal das Spiel am 2. Oktober gegen Borussia Dortmund, in dem Schalke 04 vor 40.000-Zuschauern sich ein 0:0-Remis im Stadion Rote Erde erkämpfte. (Cramer hatte sich in erster Linie um den BVB-Linksaußen Hans Cieslarczyk zu kümmern) sowie das Heimspiel am 16. Oktober gegen Westfalia Herne (1:1), in dem Cramer vor 35.000-Zuschauern auf seinen vormaligen Jugendnationalmannschaftskollegen Jürgen Koch in der Elf von Trainer Fritz Langner traf. In der Rückrunde hatte er noch in zwei Begegnungen im April 1961 gegen den TSV Marl-Hüls (1:2) und Hamborn 07 (2:0) auf und beendete mit zehn Oberligaeinsätzen seine erste Runde im Seniorenbereich. Mit Günter Brocker, Heinz Kördell, Helmut Laszig und Walter Zastrau waren noch weitere Verteidigeranwärter im Kader von Schalke 04 versammelt gewesen. Als mit Hans Nowak in der Saison 1961/62 ein vormaliger Offensivspieler erfolgreich zum Verteidiger umgeschult worden war und mit Hans-Jürgen Becher ein weiteres Talent auf sich aufmerksam machte, kam Cramer zu keinem weiteren Oberligaeinsatz mehr. Zur Saison…"} {"instruction": "Create a function in Python that takes a string and returns a new string with the characters in reverse order.", "input": "\"Hello World!\"", "output": "def reverse_string(input_str):\n reversed_str = \"\"\n for i in range(len(input_str)-1,-1,-1):\n reversed_str += input_str[i]\n return reversed_str\n\nprint (reverse_string(\"Hello World!\"))"} {"instruction": "Use recursion to construct a list of the first 10 powers of two (1, 2, 4, 8, ...).", "input": "", "output": "[1, 2, 4, 8, 16, 32, 64, 128, 256, 512]"} {"instruction": "Write a Python program to return the first prime number greater than 5.", "input": "", "output": "def prime_number(num):\n while True:\n is_prime = True\n for i in range(2,num):\n if (num % i == 0):\n is_prime = False\n if is_prime:\n return num\n num += 1\n\nx = prime_number(5)\nprint(x)"} {"instruction": "Write a Python program that takes in a list and outputs the sum of the elements in the list.", "input": "[1, 2, 3, 4, 5]", "output": "sum = 0\nfor x in [1,2,3,4,5]:\n sum += x\nprint(sum)"} {"instruction": "Modify the given Python code to be more efficient.", "input": "def my_function(N):\n list1 = []\n for i in range(N):\n list2 = []\n for j in range(N):\n list2.append(i+j)\n list1.append(list2)\n return", "output": "def my_function(N):\n list1 = [[i+j for j in range(N)] for i in range(N)]\n return list1"} {"instruction": "Given a string s, write a program to classify it as a palindrome or not.", "input": "s = “malayalam”", "output": "def is_palindrome(s): n = len(s) for i in range(n//2): if s[i] != s[n-1-i]: return False return True"} {"instruction": "Create a web scraper in Python that extracts data from a given website.", "input": "Website URL: \"https://www.example.com\"", "output": "# Importing necessary modules\nimport requests\nfrom bs4 import BeautifulSoup\n\n# The URL to get data from\nurl = \"https://www.example.com\"\n\n# Making a request to the website and getting the response\nresponse = requests.get(url)\nsoup = BeautifulSoup(response.content, 'html.parser')\n\n# Extracting the required data\ndata = soup.find_all('p')\n\n# Looping through the data and printing it out\nfor item in data:\n print(item.text)"} {"instruction": "Create a basic Java program that implements a binary search tree.", "input": "", "output": "class BinarySearchTree { Node root; /* Class containing left and right child of current node and key value*/ class Node { int key; Node left, right; public Node(int item) { key = item; left = right = null; } } // Constructor BinarySearchTree() { root = null; } // This method mainly calls insertRec() void insert(int key) { root = insertRec(root, key); } /* A recursive function to insert a new key in BST */ Node insertRec(Node root, int key) { /* If the tree is empty, return a new node */ if (root == null) { root = new Node(key); return root; } /* Otherwise, recur down the tree */ if (key < root.key) root.left = insertRec(root.left, key); else if (key > root.key) root.right = insertRec(root.right, key); /* return the (unchanged) node pointer */ return root; } // This method mainly calls InorderRec() void inorder() { inorderRec(root); } // A utility function to do inorder traversal of BST void inorderRec(Node root) { if (root != null) { inorderRec(root.left); System.out.println(root.key); inorderRec(root.right); } } // Driver Program to test above functions public static void main(String[] args) { BinarySearchTree tree = new BinarySearchTree(); /* Let us create following BST 50 / \\ 30 70 / \\ / \\ 20 40 60 80 */ tree.insert(50); tree.insert(30); tree.insert(20); tree.insert(40); tree.insert(70); tree.insert(60); tree.insert(80); // print inorder traversal of the BST tree.inorder(); } }"} {"instruction": "Design a function in Java that takes in a string and returns true if the string contains the letter \"a\" and false otherwise.", "input": "", "output": "public static boolean hasLetterA(String s){ return s.contains(\"a\"); }"} {"text": "[HI Wikipedia] खोरठा भाषा\n\nखोरठा (खोरथा या खोट्टा) एक ऐसी भाषा है जिसे भारतीय राज्य झारखंड में बोली जाता है , मुख्यतः दो डिवीजनों के 13 जिलों में: उतरी छोटानागपुर प्रमण्डल और संथाल परगना । खोरठा न केवल सदानों द्वारा बोली जाती है बल्कि आदिवासी द्वारा एक संपर्क भाषा के रूप में भी प्रयोग की जाती है। यह झारखंड की सबसे अधिक बोली जाने वाली भाषा है। खोरठा भाषा झारखंड के दो प्रमंडलों (उत्तरी छोटानागपुर और संथाल परगना) के अधिकांश की मातृभाषा होने के साथ-साथ झारखंड के चौबीस जिलों मे से पंद्रह जिलों की पूणतः और अंशतः संपर्क भाषा है। सन्दर्भ बाहरी कड़ियाँ खोरठा भाषा-परिचय भारत की भाषाएँ झारखंड की भाषाएँ‎"} {"text": "[DE Wikipedia] Konstantinas Bogdanas\n\nKonstantinas Bogdanas (* 4. Februar 1926 in Žeimiai, Bezirk Kėdainiai; † 26. September 2011 in Vilnius) war ein litauischer Bildhauer, Hochschullehrer und Ehrenbürger der Rajongemeinde Jonava. Leben Konstantinas Bogdanas ist im Gutshof Žeimiai geboren. Er lernte an der Grundschule Paežeriai (bei Biržai) und von 1939 bis 1944 am Gymnasium Biržai. Von 1944 bis 1945 studierte er am Lehrerseminar Panevėžys. Von 1947 bis 1951 arbeitete er als Lehrer in Kaunas. 1951 absolvierte er mit Auszeichnung das Institut für angewandte und dekorative Kunst Kaunas (seine Lehrer waren Robertas Antinis, Bronius Pundzius, Juozas Mikėnas). Von 1951 bis 1993 (mit Pause von 1953 bis 1956) war er Hochschullehrer am Vilniaus dailės institutas. Von 1953 bis 1956 war er Aspirant an der Kunstakademie UdSSR von I. Repin in Leningrad. 1956 promovierte er und wurde zum Kandidaten der Kunstwissenschaft. Später wurde er zum Professor. Von 1985 bis 1989 war er Deputierter des Obersten Rats Sowjetlitauens. Sein Grab befindet sich im Friedhof Saltoniškės, Vilnius. Werke Rusų skulptorius R. R. Bachas (monografija, 1954 m.) Juozas Mikėnas (rusų kalba, 1961 m.) Lietuvos dailė (rusų kalba, su Svetlana Červonaja, 1972 m.) Konstantinas Bogdanas: skulptorius (sud. Irena Račkauskaitė-Petraitienė). – Vilnius: Vilniaus dailės akademijos leidykla, 2009. – 232 p.: iliustr. – ISBN 978-9955-854-45-6 Einzelnachweise Abgeordneter (Oberster Sowjet der Litauischen Sozialistischen Sowjetrepublik) KPdSU-Mitglied Hochschullehrer (Kunstakademie Vilnius) Bildhauer (Vilnius) Ehrenbürger der Rajongemeinde Jonava Künstler (Rajongemeinde Jonava) Person (Žeimiai) Sowjetbürger Litauer Geboren 1926 Gestorben 2011 Mann"} {"instruction": "Tell me how to print an IMDB movie rating using Python", "input": "", "output": "import imdb # create an instance of the IMDb class ia = imdb.IMDb() # get the movie movie = ia.get_movie('tt0111161') # The Shawshank Redemption # get the rating rating = movie['rating'] # print the rating print(f\"Rating for the movie 'The Shawshank Redemption': {rating}\")"} {"text": "[CS Wikipedia] Hybnost\n\nHybnost je fyzikální veličina, která je mírou posuvného pohybu tělesa a je součinem jeho hmotnosti a rychlosti. Hybnost ve své podstatě popisuje pohybový stav tělesa. Hybnost je vektorová veličina, stejně jako rychlost, a má stejný směr. Hybnost tělesa je rovná impulzu síly, který je potřeba na jeho uvedení z klidu do pohybu odpovídající rychlostí; na zastavení je potřeba impulz opačný. Hybnost je zachovávající se veličina. To znamená, že celková hybnost izolované soustavy se nemůže změnit, což je obsahem zákona zachování hybnosti. Značení Symbol veličiny: Odvozená jednotka SI: kilogram krát metr za sekundu, značka jednotky: kg·m·s−1 Definice Klasická mechanika Vektor hybnosti je v klasické mechanice určen vztahem kde je hmotnost tělesa, je rychlost tělesa. Relativistická mechanika Relativistická hybnost je definována stejným vztahem avšak je relativistická hmotnost, která závisí na velikosti rychlosti vztahem kde je klidová hmotnost tělesa, je rychlost světla. Dosazením získáme vztah Kvantová mechanika V kvantové mechanice je hybnost určena operátorem hybnosti, který má v souřadnicové reprezentaci tvar kde je imaginární jednotka, je redukovaná Planckova konstanta, je operátor nabla. Vlastnosti V izolovaných mechanických dějích platí zákon zachování hybnosti. Změna hybnosti způsobená silou za čas je rovna impulzu síly. Časová změna hybnosti je tedy rovna působící síle, tzn. . Zákon zachování celkové hybnosti izolované soustavy těles:Celková hybnost izolované soustavy těles je rovna vektorovému součtu hybností jednotlivých těles tvořících izolovanou soustavu v daném okamžiku a s časem se nemění. Zákon o změně hybnosti tělesa:Impulz síly je časový účinek síly působící na těleso a rovná se změně hybnosti tělesa za dobu působení síly. Související články Abrahamův-Minkowského spor Čtyřhybnost Impulz síly Moment hybnosti Pohybová rovnice Zákon zachování hybnosti Externí odkazy Dynamika Fyzikální veličiny Pohyb"} {"instruction": "You are given an array of integers and you need to find three numbers such that the sum of the three numbers is 0.", "input": "nums = [-40, 40, -20, 60, 10, -80]", "output": "// Use a brute-force approach to find the three numbers for (let i = 0; i < nums.length; i++) { for (let j = i+1; j < nums.length; j++) { for (let k = j+1; k < nums.length; k++) { if (nums[i] + nums[j] + nums[k] === 0) { console.log(nums[i], nums[j], nums[k]) } } } } // Output -40, 40, -80"} {"text": "[EN Wikipedia] Mike Imber\n\nMichael John Imber (November 1940 – 28 April 2011) was a New Zealand ornithologist known for his research work and expertise on petrels. Imber completed a Master's thesis in 1965 at Massey University, on population density and reproduction in mice. Imber worked for the New Zealand Department of Conservation for 40 years, (including 21 years with its predecessor, the Wildlife Service) as a seabird and waterfowl biologist, retiring in 2006. One of his main early areas of research was on the cephalopod diets of petrels and albatrosses, using regurgitated squid beaks to identify prey taxa. He also travelled extensively, to seabird islands in the course of his research, as well as to seabird conferences and symposia around the world. As well as islands around New Zealand, he visited the subantarctic Prince Edward Islands in the southern Indian Ocean and Gough Island in the South Atlantic. In 2015, the Imber's petrel (Pterodroma imberi), a newly described extinct gadfly petrel from the Chatham Islands was named in his honour. Publications Imber authored or co-authored more than 50 scientific papers and contributed to several books, including the Reader's Digest Book of Zealand Birds, the Handbook of Australian, New Zealand and Antarctic Birds, and the Checklist of New Zealand Birds. References Sources 1940 births 2011 deaths New Zealand ornithologists Massey University alumni"} {"text": "[CS Wikipedia] Muzeum porcelánu v Klášterci nad Ohří\n\nMuzeum porcelánu v Klášterci nad Ohří se nachází v budově kláštereckého zámku. U příležitosti 140. výročí založení thunské porcelánky zde roku 1954 byla instalována dlouhodobá expozice evropského, zvláště českého, porcelánu ze sbírek Uměleckoprůmyslového muzea v Praze a při oslavách 200. výročí byla obnovena a publikována v katalogu. Umístění muzea v Klášterci nad Ohří bylo zvoleno, protože zde roku 1794 vznikla třetí nejstarší a druhá dosud činná porcelánka v Česku. Historie porcelánky Zakladatel porcelánky Johann Nikolaus Weber (1734–1801) přišel na klášterecké panství roku 1784 jako hraběcí lesmistr na pozvání Františka Josefa Thuna z rodného Alsaska. Po svém penzionování se roku 1793 rozhodl založit porcelánku. Podnět mu dal pracovník saské porcelánky Kastner, který objevil při své cestě na kláštereckém panství u Černic hlínu podobnou kaolinu. Hrabě Thun poskytl Weberovi grottu v zámeckém parku, aby zbudoval první pec ke zkušebnímu výpalu nádobí. Za první úspěch se považuje dochovaný koflík s miskou s nápisem Vivat Böhmen. Další zdokonalení výroby zaznamenali až jeho následovníci poté, co byla postavena v pořadí třetí pec a 22. listopadu 1794 české zemské gubernium oficiálně povolilo výrobu kameniny. Teprve v letech 1797–1803 pod vedením durynského obchodníka Christiana Nonne (* 1751) se podařilo dosáhnout určité kvality šedého porcelánu s modrým dekorem. Jako točíř a dílovedoucí tehdy působil Josef Habertitzel (1774–1849), syn zakladatele slavkovské porcelánky, který si kláštereckou porcelánku najal od roku 1805. Od roku 1801 se na doporučení mineraloga Františka Ambrože Reusse začala dovážet hlína z okolí Kadaně. Kolem roku 1805 se podařilo vypálit tak kvalitní bílý střep, že se jím cítila být ohrožena i vídeňská manufaktura. Kolem roku 1815 se začaly vyrábět úspěšné kávové i čajové servisy, a lázeňské koflíky, jimiž byla zásobována lázeňská centra severních a západních Čech. První vrcholné období porcelánu stylově empirového nastalo v letech 1820–1835 pod vedením Josefa Matyáše Thuna, který dal postavit novou budovu porcelánky a značně rozšířil produkci nádobí. Dosavadní stylový a dekorační vliv durynských porcelánek vystřídaly vzory míšeňské a vídeňské. Malíře porcelánu tehdy v Klášterci vedl Augustin Gruber. Pod vedením Johanna Hillardta v letech 1835–1850 navázalo další úspěšné období. Sortiment zahrnoval kromě souprav stolního nádobí také vázy, svícny, mycí – toaletní soupravy, kuřácké pomůcky, ale také chrámové vybavení jako kropenky. Ve čtyřicátých letech byli zaměstnanci posílení o osmdesát malířů. Pod vedením Karla Verniera v letech 1850–1872 klášterecká porcelánka dosáhla druhého asi nejvýznamnějšího období, éry velkých souprav čajových, kávových i jídelních servisů, označovaných jako formy francouzské nebo anglické. Současně se…"} {"instruction": "Write Python code to implement a class like this.", "input": "class Employee: \n def __init__(self, name, age): \n self.name = name \n self.age = age", "output": "class Employee: \n def __init__(self, name, age):\n self.name = name \n self.age = age \n \n def __str__(self): \n return \"Employee({0}, {1})\".format(self.name,self.age) \n \nemp = Employee(\"John\", 24) \nprint(emp)"} {"instruction": "Design a Python script that converts Miles/hour to Kilometers/hour.", "input": "Speed in Miles/hour: 60", "output": "def mph_to_kph(speed):\n kph = speed * 1.609\n return kph"} {"instruction": "Write a Python loop that prints out a list of random numbers between 0 and 100.", "input": "Number of random numbers: 5", "output": "import random\n\nrandom_numbers = []\n\nfor i in range(5):\n number = random.randint(0,100)\n random_numbers.append(number)\n print(random_numbers)"} {"instruction": "Write a Python script to sort a given list of numbers in ascending order.", "input": "[3, 7, 1, 5, 4]", "output": "def sort_numbers_ascending(numbers): # Sort the list numbers.sort() return numbers # Driver code nums = [3, 7, 1, 5, 4] print(sort_numbers_ascending(nums))"} {"instruction": "Create a program in Python to calculate the average word length in a given title.", "input": "\"The Cat in the Hat\"", "output": "def calculate_average_word_length(title):\n words = title.split()\n total_length = 0\n for word in words:\n total_length += len(word)\n return total_length / len(words)\n\nresult = calculate_average_word_length(\"The Cat in the Hat\")\nprint(result)"} {"text": "[CS Wikipedia] Julien Simon-Chautemps\n\nJulien Simon-Chautemps (* 14. května 1978 Francie) je francouzský inženýr pracující pro tým formule 1 Sauber. Je absolventem Polytechnického ústavu vyšších věd. V roce 2007 začal pracovat pro týmy ve Formuli 1. V letech 2007–2010 byl závodním inženýrem v týmu Toyota a Lotus Jarna Trulliho. V roce 2011 přešel do týmu Renault, kde připravoval vozy pro Vitalije Petrova, Kimi Räikkönena, Pastora Maldonada, Romaina Grosjeana a Jolyona Palmera. Reference Francouzští manažeři Osobnosti Formule 1 Narození v roce 1978 Narození 14. května Žijící lidé Muži"} {"instruction": "Construct a C++ code snippet to create a basic class named 'Person' with 2 fields: 'name' and 'age'.", "input": "", "output": "class Person { string name; int age; public: Person(string n, int a) { name = n; age = a; } };"} {"instruction": "Create a Python program that prints out the words in a sentence in reverse order.", "input": "I love programming.", "output": "def reverse_words(sentence):\n words = sentence.split()\n words.reverse()\n return \" \".join(words)\n\nprint(reverse_words(\"I love programming.\"))"} {"instruction": "Retrieve the company name from the following object", "input": "const user = { name: 'John Doe', company: 'Google' }", "output": "user.company"} {"text": "[CS Wikipedia] Dániel Berzsenyi\n\nDániel Berzsenyi (7. května 1776, Egyházashetye – 24. února 1836, Nikla) byl maďarský básník. Život Byl luterán, pocházel ze starého šlechtického rodu. Celý život strávil na svém panství. Žil v Zadunají jako statkář a zároveň byl literárně činný. Ve své tvorbě usiloval o harmonické spojení života a poezie v duchu antických ideálů životní moudrosti; jeho velikým vzorem byl Horatius. Jeho poezie je silně vlastenecká, Berzsenyi byl průkopníkem a stoupencem reformních idejí Istvána Széchenyiho. Berzsenyi byl vynikající mistr formy, jeho dílo tvoří přechod od klasicismu k romantismu. Psát začal kolem r. 1797, poslední báseň je pravděpodobně A poézis hajdan és most (Poezie kdysi a nyní). V prvním období své tvorby psal klasicisticko-rokokovou poezii ve stylu německého sentimentalismu a klasicistických nápodob antiky a stavovského patriotismu uherské šlechty (např. óda A felkölt nemességhez, K povstalé šlechtě z r. 1719). Ve vrcholném období 1808 až 1817 se seznámil s ideami osvícenství a intenzívně se zajímal o další osud národa. Nejcennější jsou vlastenecké ódy a elegie, např. óda A magyarokhoz (K Maďarům, 1810), epigramy jako Napoleónhoz (K Napoleonovi, 1814), který oslavuje vítězství svobody nad tyranií, básnické epištoly Vandal bölcsesség (Vandalská moudrost, 1813-1815), Dukai Takács Judithoz (1815) a jiné, stavějící proti všem druhům útlaku vzdělání a humanitu. Zároveň psal nábožensky laděné básně spojující požadavky křesťanství s antickou moudrostí horatiovskou, jako jsou óda Fohászkodás (Povzdech, 1810) a Életfilozófia (Životní filosofie, 1811). Tento humanistický ideál převládl i v závěrečném období Berzsenyiho tvorby po roce 1817, kdy po odmítavé Kölcseyově kritice svých básní ve své činnosti ochabl. K významným básním tohoto období náleží Szilágyi (1825) a óda Gróf Mailáth Jánoshoz (1813). Za jeho života vyšlo jen jedno vydání jeho veršů (1813, 2. vydání 1816). Dílo Poezie A poézis hajdan és most (Poezie kdysi a nyní) A felkölt nemességhez (1719, K povstalé šlechtě) A magyarokhoz (1810, K Maďarům) Napoleónhoz (1814, K Napoleonovi) Vandal bölcsesség (1813 - 1815, Vandalská moudrost) Dukai Takács Judithoz (1815) Fohászkodás (1810, Povzdech) Életfilozófia (1811, Životní filosofie) Ostatní Kupa támadása (1816 Útok Kupův) Észrevételek Kölcsey recensiójára (1825, Poznámky k recenzi Kölcseyově) Poétai harmonisztika (1831, Harmonie poezie) A kritikárol (1835, O kritice'') aj. Odkazy Literatura Externí odkazy Maďarští básníci Narození v roce 1776 Úmrtí v roce 1836 Muži Narození 7. května Úmrtí 24. února"} {"instruction": "Write a Python program that takes in two lists and returns a merged list with unique elements.", "input": "list1 = [1, 2, 3]\nlist2 = [2, 3, 4]", "output": "list1 = [1, 2, 3]\nlist2 = [2, 3, 4]\n\nmerged_list = list(set(list1 + list2))\nprint(merged_list) #Output: [1, 2, 3, 4]"} {"instruction": "Develop an algorithm in Python to compute the intersection of two lists.", "input": "list_a = [3, 5, 6, 9]\nlist_b = [4, 5, 8, 9]", "output": "def findIntersection(list_a, list_b):\n intersection_list = []\n\n for element in list_a:\n if element in list_b:\n intersection_list.append(element)\n \n return intersection_list\n \n# Main\nlist_a = [3, 5, 6, 9]\nlist_b = [4, 5, 8, 9]\nintersection_list = findIntersection(list_a, list_b)\n\nprint('Intersection of list_a and list_b:', intersection_list)"} {"text": "[DE Wikipedia] Ankasa-Nini-Suhien-Nationalpark\n\nDer Ankasa-Nini-Suhien-Nationalpark ist ein Nationalpark in Ghana mit einer Fläche von insgesamt etwa 510 km². Dieser Park ist in der Western Region an der Grenze zur Elfenbeinküste gelegen. Dieser Nationalpark zeichnet sich durch seinen insgesamt auf einer Fläche von 175 km² unberührten tropischen Primärwald aus. Im Ankasa-Nini-Suhien-Nationalpark sind noch geringe Bestände von Waldelefanten zu finden. Auch Wildschweine, Antilopen, Riesenschlangen und ca. zwanzig Primaten- und viele Vogelarten sind in diesem Nationalpark zu finden. Der WWF hat sich in der Vergangenheit erfolgreich für eine Aufwertung dieses Parks zu einem Nationalpark eingesetzt. Siehe auch Nationalparks in Ghana Nationalpark in Ghana Nationalpark in Afrika Western Region (Ghana)"} {"instruction": "Create a program to detect the type of a given character.", "input": "", "output": "def detect_char_type(ch): char_type = \"\" if ch.isalpha(): char_type = \"Letter\" elif ch.isdigit(): char_type = \"Digit\" elif ch.isspace(): char_type = \"Space\" elif ch in string.punctuation: char_type = \"Punctuation\" else: char_type = \"Special Character\" return char_type"} {"text": "[HI Wikipedia] ग़िज़र ज़िला\n\nग़िज़र​ पाक-अधिकृत कश्मीर के गिलगित-बलतिस्तान क्षेत्र का पश्चिमतम ज़िला है। इसकी राजधानी गाहकूच शहर है। यहाँ कई जातियाँ रहती हैं और तीन मुख्य भाषाएँ बोली जाती हैं - खोवार, शीना और बुरूशसकी। इनके अलावा इस ज़िले के इश्कोमन क्षेत्र में कुछ वाख़ी और ताजिक बोलने वाले भी यहाँ रहते हैं। कुछ गुज्जर लोग भी इस जिले में बसे हुए हैं। नाम का अर्थ और उच्चारण चित्राल ज़िले की खोवार भाषा में 'ग़ेरज़​' का मतलब 'शरणार्थी' होता है। चित्राल का मेहतर (यानि राजा) जब भी कुछ लोगों पर अत्याचार करता था, वे गुपिस की तरफ़ भागकर शरण लेते थे। चित्राल और गुपिस के बीच बसे हुए लोगों को समय के साथ 'ग़ेरज़ी' कहा जाने लगा। १९७०-८० काल में जब यहाँ ज़िला बनाया गया तो उसका नाम इसी के विकृत रूप 'ग़िज़र​' पर रख दिया गया। 'ग़िज़र​' में बिंदु-वाले 'ग़' अक्षर के उच्चारण पर ध्यान दें क्योंकि यह बिन्दु-रहित 'ग' से ज़रा भिन्न है। इसका उच्चारण 'ग़लती' और 'ग़रीब' शब्दों के 'ग़' से मिलता है। लोग ग़िज़र​ ज़िले की सभी मुख्य वादियों में इस्माइली शिया लोगों की बहुसंख्या है और सुन्नी लोग अल्पसंख्यक हैं। यहाँ इस्माइली शिया आबादी का ८७% हैं और सुन्नी १३% हैं। तहसीलें ग़िज़र​ ज़िले में चार तहसीलें आती हैं - पुनियाल - ज़िले की राजधानी गाहकूच इसी तहसील में स्थित है। यहाँ शीना भाषा बोली जाती है जो कश्मीरी भाषा से सम्बंधित दार्दी भाषा है। इश्कोमन - जिसमें खोवार, वाख़ी और कुछ हद तक ताजिक भाषाएँ बोली जाती हैं। यासीन - यहाँ बुरूशसकी और खोवार भाषाएँ बोली जाती हैं। गुपिस - यहाँ शीना और खोवार भाषाएँ बोली जाती हैं। भूगोल ग़िज़र​ ज़िला भूराजनैतिक दृष्टि से बहुत ही महत्वपूर्ण जगह स्थित है। इसके उत्तर में अफ़ग़ानिस्तान का वाख़ान गलियारा है जिसकी छोटी सी चौड़ाई के पार ताजिकिस्तान आता है। अगर पाक-अधिकृत कश्मीर भारत के नियंत्रण में होता तो यही वह इलाका है जहाँ भारत की सीमाएँ सीधी अफ़ग़ानिस्तान को छूतीं। पूर्वोत्तर में ग़िज़र ज़िला चीन द्वारा नियंत्रित शिंजियांग क्षेत्र को छूता है। पश्चिम में इसकी सीमाएँ पाकिस्तान के ख़ैबर​-पख़्तूनख़्वा प्रान्त के चित्राल ज़िले से लगती हैं। दर्रे ग़िज़र​ ज़िले में कुछ महत्वपूर्ण पर्वतीय दर्रे आते हैं - शन्दूर दर्रा (१२,२०० फ़ुट​) - जो ग़िज़र​ ज़िले को चित्राल ज़िले से जोड़ता है चिलिन्जी दर्रा (१७,५०३ फ़ुट​) - जो ग़िज़र​ ज़िले की इश्कोमान तहसील को हुन्ज़ा-नगर ज़िले की गोजाल तहसील से जोड़ता है हायल दर्रा और नलतर दर्रा जो ग़िज़र​ और गिलगित ज़िलों की सरहद पर हैं बिछार​ दर्रा (१४,८७० फ़ुट​) - जो ग़िज़र​ ज़िले के गिलगित नदी पर स्थित शेरक़िला गाँव को गिलगित ज़िले की नलतर वादी में स्थित बिछारी गाँव से जोड़ता है थोई दर्रा (१६,४२० फ़ुट​) - जो ग़िज़र​ ज़िले में यासीन वादी में थोई नदी के किनारे बसे नियाल्थी गाँव को चित्राल ज़िले में यरख़ुन नदी की घाटी में स्थित गज़ीन गाँव से जोड़ता है दरकोट दर्रा (१५,४३० फ़ुट​) - जो ग़िज़र​ ज़िले की रावत वादी को चित्राल ज़िले की बरोग़िल​ वादी से जोड़ता है। इसे 'दरकूट दर्रा' भी कहते हैं। इन्हें भी देखें चित्राल ज़िला गिलगित-बल्तिस्तान सन्दर्भ ग़िज़र​ ज़िला पाकिस्तान प्रशासित कश्मीर कश्मीर गिलगित-बल्तिस्तान भारतीय उपमहाद्वीप के ज़िले"} {"instruction": "Using jQuery, design an effect to fade out an element when clicked on.", "input": "", "output": "$(function() { $('#myElement').on('click', function(e) { $(this).fadeOut(300); }); });"} {"instruction": "Generate a correct Python program to print out the sequence of numbers in ascending order from a given list.", "input": "[10, 5, 2, 8, 12]", "output": "for i in sorted([10, 5, 2, 8, 12]):\n print(i)"} {"text": "[CS Wikipedia] Lucas Hedges\n\nLucas Hedges (* 12. prosince 1996 New York) je americký herec, pocházející z Brooklynu. Proslavil se rolí Patricka Chandlera ve filmu Místo u moře, který byl nominován na Oscara, udělovaného americkou Akademií filmového umění a věd. Život Lucas Hedges se narodil v New Yorku, ve čtvrti Brooklyn Height. Je druhým synem básnířky a spisovatelky Susan Bruceové a spisovatele, romanopisce, dramatika a na Oscara nominovaného scenáristy a režiséra Petera Hedgese. Základní školu absolvoval v brooklynské „Saint Ann's School“. Obor divadlo a dramatické umění studoval na univerzitě v Severní Karolíně. V současné době žije v New Yorku. Má staršího bratra Simona. V roce 2007, když mu bylo jedenáct let se poprvé objevil na filmovém plátně ve filmu, který režíroval jeho otec. Hrál ve dvou filmech uznávaného hollywoodského režiséra Wese Andersona vedle herců Edwarda Nortona, Billa Murray, Frances McDormandové nebo Ralpha Fiennese a Sama Rockwella. V dalších filmech hrál po boku Josha Brolina, Kate Winsletové, Jeremy Rennera, Colina Firtha nebo Emily Bluntové. Do roku 2018 hrál ve čtyřech filmech, které byly nominovány na Oscara a to Grandhotel Budapešť, Místo u moře, Lady Bird a Tři billboardy kousek za Ebbingem. Na televizních obrazovkách byl obsazen v seriálu televizní stanice NBC The Slap spolu s herci: Zachary Quintem nebo Umou Thumanovou. Je prvním nominovaným mužem ve věku do 25 let. Hranici 25. let dosáhl jako první Jake Gyllenhaal filmem Zkrocená hora. Lucas Hedges byl nominován na Oscara za svou roli ve filmu Místo u moře (2016) 13 let poté, kdy byl nominován na Oscara jeho otec Peter Hedges za scénář k filmu Jak na věc. Jazykově vyniká v mateřské angličtině, dále v němčině a v jazyku se skotsko-irským přízvukem. Divadelní kariéru zahájil na začátku roku 2017 ve hře Yen v režii Tripa Cullmana v divadle Lucille Lortel Theatre na Christopher Street ve West Village v New Yorku. Za tuto roli byl nominován na cenu Lucille Lortel za nejlepší hlavní roli v inscenaci a současně získal cenu za nejlepší debut v hlavní roli v divadle mimo divadelní Broadway. Filmografie 2007: Život podle Dana – role: taneční partner Lilly 2012: Až vyjde měsíc – role: Redford 2012: Arthur Newman – role: Kevin Avery 2013: Prodloužený víkend – role: Richard 2013: The Zero Theorem – role: Bob 2014: Grandhotel Budapešť – role: Pump Attendant 2014: Kill the Messenger – role: Ian Webb 2015: The Slap, TV seriál – role: Ritchie 2015: Anesthesia – role: Greg 2016: Místo u moře – role: Patrick 2017: Lady Bird – role: Danny O'Neill 2017: Tři billboardy kousek za Ebbingem – role: Robbie 2018: Devadesátky – role: Ian 2018: Vymazaný kluk – role: Jared Eamons 2018: Ben is Back – role: Ben Burns 2019: Honey Boy – role: Otis Lort 2019: Waves – role: Luke 2020: French Exit – role: Malcolm Price 2020:…"} {"text": "[EN Wikipedia] Gmina Sanniki\n\nGmina Sanniki is a rural gmina (administrative district) in Gostynin County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Sanniki, which lies approximately east of Gostynin and west of Warsaw. The gmina covers an area of , and as of 2006 its total population is 6,542. Villages Gmina Sanniki contains the villages and settlements of Aleksandrów, Brzezia, Brzeziny, Czyżew, Działy, Krubin, Lasek, Lubików, Lwówek, Mocarzewo, Nowy Barcik, Osmolin, Osmólsk Górny, Sanniki, Sielce, Staropol, Stary Barcik, Szkarada, Wólka Niska and Wólka Wysoka. Neighbouring gminas Gmina Sanniki is bordered by the gminas of Gąbin, Iłów, Kiernozia, Pacyna and Słubice. References Polish official population figures 2006 External links Sanniki Gostynin County"} {"instruction": "Find all the multiples of a number in between two given numbers.", "input": "", "output": "def find_multiples(base, lower, upper): output = [] for i in range(lower, upper+1): if i % base == 0: output.append(i) return output"} {"text": "[DE Wikipedia] Froreich\n\nFroreich steht für: Froreich (Adelsgeschlecht), deutsch-baltisches, später pommersches Adelsgeschlecht Froreich ist der Familienname folgender Personen: Karl von Froreich (1790–1867), preußischer Generalmajor Ulrich Karl von Froreich (1739–1801), preußischer Generalmajor Wilhelm Leopold von Froreich (1748–1808), preußischer Generalmajor"} {"instruction": "Construct a decision tree classifier in Python, to classify an animal based on body characteristics.", "input": "Not applicable", "output": "from sklearn import tree\n\n# features (characteristicsof animals)\n# 0 for false, 1 for true\nfeatures = [[1, 0], [1, 1], [0, 1], [0, 0]]\n\n# labels of features (types of animals)\nlabels = [0, 0, 1, 1]\n\n# decision tree classifier\nclf = tree.DecisionTreeClassifier()\n\n# train the classifier with the data\nclf = clf.fit(features, labels)\n\n# test a prediction\nprediction = clf.predict([[1, 0]])\n\n# print the result\nprint(prediction) # [0]"} {"text": "[DE Wikipedia] Cat5\n\nCAT5 steht für: CAT Testsystem 5 („Computer-assistiertes Testen“), fünfte Generation des durch den Psychologischen Dienst der Bundeswehr initiierten Testsystems zur computerunterstützten Psychodiagnostik Cat-5 steht für: Cat-5-Kabel, Kategorie 5 von Twisted-Pair-Kabeln zur Datenübertragung CAT5"} {"instruction": "Given an input sentence with 4 different words, create a python program that phrases each word with the same first letter.", "input": "Hello World Goodbye Mars", "output": "\"\"\"\nGiven an input sentence with 4 different words, create a python program that phrases each word with the same first letter\n\"\"\"\n\nwords = 'Hello World Goodbye Mars'.split()\n\nfor word in words:\n print(word[0] + word[1:])"} {"instruction": "Create an AI game in Python for the user to guess a number between 1 and 10.", "input": "", "output": "import random\n\n# set the maximum number of guess\nmax_guesses = 5\n\n# generate a random number\ntarget_num = random.randint(1, 10)\n\n# initialize number of guesses\nnum_guesses = 0\n\n# prompt user for a guess\nwhile num_guesses < max_guesses:\n user_guess = int(input(\"Guess a number between 1 and 10: \"))\n \n # check if user guess is correct\n if user_guess == target_num:\n print(\"You have guessed the number correctly\")\n break\n # check if user guess is greater or lesser\n elif user_guess > target_num:\n print(\"Your guess is greater than the target number\")\n else:\n print(\"Your guess is lesser than the target number\")\n num_guesses += 1\n\nif num_guesses == max_guesses:\n print(\"You have reached your maximum number of guesses\")"} {"instruction": "Given a string and a character, write a program that counts the number of occurrences of the character in the string.", "input": "string = 'Hello World!' character = 'l'", "output": "def count_occurrences(string, character): count = 0 for i in range(len(string)): if string[i] == character: count += 1 return count"} {"text": "[EN Wikipedia] List of Israeli films of 1977\n\nA list of films produced by the Israeli film industry in 1977. 1977 releases See also 1977 in Israel References External links Israeli films of 1977 at the Internet Movie Database Israeli Film 1977"} {"text": "[HI Wikipedia] ईरान का परमाणु कार्यक्रम\n\nईरान का परमाणु कार्यक्रम 1950 के दशक में संयुक्त राज्य अमेरिका की मदद से शांति के लिए परमाणु कार्यक्रम (Atoms for Peace program) के रूप में शुरू किया गया था। ईरान के परमाणु कार्यक्रम में संयुक्त राज्य अमेरिका और पश्चिमी यूरोपीय देशों की भागीदारी 1979 ईरानी क्रांति (ईरान के शाह की विदाई) तक जारी रही। 1979 की क्रांति के बाद, एक गुप्त परमाणु हथियार अनुसन्धान कार्यक्रम जो अयातुल्ला रूहोल्लाह खोमैनी ने भंग कर दिया। क्योंकि वह मानता था कि इस तरह के हथियार मुस्लिम नैतिकता और न्यायशास्त्र के तहत वर्जित माने जाते हैं। परमाणु हथियारों में छोटे पैमाने पर अनुसन्धान ईरान-इराक युद्ध के दौरान फिर से आरम्भ हुआ और 1989 में अयातुल्ला की मौत के बाद इसमें महत्वपूर्ण विस्तार किया गया। ईरान के परमाणु कार्यक्रम में कई अनुसन्धान स्थल, दो यूरेनियम खानें, एक अनुसन्धान रिएक्टर और यूरेनियम प्रसंस्करण सुविधाएँ जिसमें तीन ज्ञात यूरेनियम संवर्धन संयन्त्रों को शामिल किया जाता है, को शामिल किया गया है। सन्दर्भ परमाणु कार्यक्रम परमाणु कार्यक्रम"} {"instruction": "Write a HTML page to set a background color for a table with the color code '#e6e6fa'.", "input": "", "output": " Table with Background Color

    Table with Background Color

    Name Age Occupation
    "} {"instruction": "Create a function that produces input strings for a calculator.", "input": "", "output": "def create_input_string(nums, ops): input_str = \"\" for i in range(len(nums)): if i == 0: input_str += str(nums[i]) else: input_str += ops[i - 1] + str(nums[i]) return input_str"} {"text": "[HI Wikipedia] इण्डिया टुडे\n\nइंडिया टुडे एक भारतीय पत्रिका है। यह पत्रिका अंग्रेज़ी ओर हिंदी दोनों भाषाओं में प्रकाशित होती है। इतिहास इंडिया टुडे की स्थापना 1975 में विद्या विलास पुरी (थॉम्पसन प्रेस के मालिक) द्वारा की गई थी, जिसमें उनकी बेटी मधु त्रेहन संपादक और उनके बेटे अरुण पुरी इसके प्रकाशक थे। . वर्तमान में, इंडिया टुडे हिंदी , तमिल , मलयालम और तेलुगु में भी प्रकाशित होता है। इंडिया टुडे न्यूज चैनल 22 मई 2015 को लॉन्च किया गया था। अक्टूबर 2017 में, अरुण पुरी ने इंडिया टुडे ग्रुप का नियंत्रण अपनी बेटी, कली पुरी को सौंप दिया। सन्दर्भ बाहरी कड़ियाँ हिन्दी पत्रिकाएँ अंग्रेजी पत्रिकाएँ पत्रिकाएँ"} {"instruction": "Parse and save the following article in a dataset.", "input": "\"The Boston Celtics have signed forward Gordon Hayward to a four-year deal. Good move from the Celtics, who are coming off of a teams worst record since 2007? The 29-year-old Hayward has averaged 10.7 points and 5 rebounds per game in his eight-year career\"", "output": "{ \"team\": \"Boston Celtics\", \"player\": \"Gordon Hayward\", \"contract\": \"Four-year deal\", \"recent_record\": \"teams worst record since 2007\", \"average_points\": 10.7, \"average_rebounds\": 5 }"} {"instruction": "Develop a function in Python for analyzing a given text and generating a statistical report for finding the word frequencies in the text.", "input": "", "output": "def generate_freq_report(text):\n words = {} # to store the word frequencies\n text = text.lower()\n text = text.replace('\\n', ' ')\n text = text.split(' ')\n for word in text:\n if word in words:\n words[word] += 1\n else:\n words[word] = 1\n return words"} {"instruction": "Design an API endpoint in Python which obtains current weather information based on a user's location.", "input": "", "output": "@app.route('/weather', methods=['GET'])\ndef get_weather():\n lat = request.args.get('latitude')\n lon = request.args.get('longitude')\n if lat is None or lon is None:\n abort(400)\n else:\n try:\n data = requests.get('http://api.openweathermap.org/data/2.5/weather?lat=' + lat + '&lon=' + lon)\n return data.json()\n except requests.exceptions.ConnectionError:\n abort(500)"} {"text": "[CS Wikipedia] Členský stát Evropské unie\n\nEvropská unie (EU) se skládá z 27 členských států. Každý členský stát je smluvní stranou zakládajících smluv unie, čímž jako subjekt má výsady a povinnosti vyplývající z členství. Na rozdíl od členů většiny mezinárodních organizací podléhají členské státy EU společným předpisům z důvodu jejich zastoupení ve společných legislativních a soudních institucích. Členské státy se musí vždy jednomyslně dohodnout, když má EU přijmout rozhodnutí týkající se obrany nebo zahraniční politiky. Subsidiarita je základním principem EU. Plnoprávným členským státem Evropské unie se kandidátská země může stát po splnění Kodaňských kritérií: politická kritéria: kandidátská země musí mít stabilní instituce zajišťující demokracii, právní stát, dodržování lidských práv a práv menšin ekonomická kritéria: země musí mít fungující tržní ekonomiku schopnou se vypořádat s konkurenčními tlaky uvnitř Unie kritéria přijetí acquis communautaire: země musí být schopná přijmout závazky vyplývající z členství, včetně cílů politické, hospodářské a měnové unie. Rozšiřování EU Zakládajícími členy předchůdce EU – Evropského společenství uhlí a oceli byly v roce 1952 Belgie, Francie, Itálie, Lucembursko, Německo a Nizozemsko – takzvaná „šestka“. V roce 1957 pak bylo ustaveno Evropské hospodářské společenství a Euroatom. V roce 1967 byly tyto tři organizace sloučeny v Evropská společenství. K prvnímu rozšíření tehdejších Evropských společenství došlo až o 21 let později, v roce 1973. V tomto roce byly za členy přijaty Dánsko, Irsko a Spojené království. V roce 1981 se Evropská společenství rozšířila o Řecko, které bylo v roce 1986 následováno Portugalskem a Španělskem – rozšíření druhé a třetí, takzvané jižní. V roce 1985 ES opustilo Grónsko po referendu. V roce 1993 Maastrichtská smlouva ustavila Evropskou unii. Znovusjednocení Německa 3. října 1990 zvětšilo tehdejší ES o šest spolkových zemí na území bývalé NDR. Oficiálně nešlo o rozšíření ES, nové země Spolkové republiky Německo převzaly její právní řád a i mezinárodní status. Čtvrté rozšíření – zvané severní – v roce 1995 přidalo k EU další tři země: Finsko, Rakousko a Švédsko. Společně s těmito zeměmi vyjednávalo o členství v EU také Norsko, jehož obyvatelé ale nakonec vstup odmítli v referendu. Šlo již o jeho druhé odmítnutí členství v Unii – poprvé norští voliči zamítli členství v roce 1973. Norsko ale zůstává členem Evropské sdružení volného obchodu (ESVO). Páté rozšíření EU – zvané východní – proběhlo 1. května 2004, kdy se Unie rozšířila o 10 zemí: Česko, Estonsko, Kypr, Litva, Lotyšsko, Maďarsko, Malta, Polsko, Slovensko a Slovinsko. Šesté rozšíření – Od 1. ledna 2007 jsou členy EU Rumunsko a Bulharsko. Sedmé rozšíření proběhlo dne 1. července 2013, kdy se součástí EU stalo Chorvatsko. Kandidátské země jsou Severní Makedonie,…"} {"instruction": "Create a function in Python to generate a 5x5 two-dimensional array with random integers between 0 and 9.", "input": "Not applicable", "output": "import random\n\ndef generateArray():\n arr = [[0 for i in range(5)] for j in range(5)]\n \n for i in range (5):\n for j in range (5):\n arr[i][j] = random.randint(0,9)\n \n return arr\n\nprint(generateArray())"} {"text": "[HI Wikipedia] लखनऊ\n\nलखनऊ भारतीय राज्य उत्तर प्रदेश का सबसे बड़ा शहर, राजधानी और दूसरा सबसे बड़ा शहरी समूह है। यह प्रशासनिक मुख्यालय के रूप में भी कार्य करता है। 2011 की जनगणना के अनुसार 2.8 मिलियन की आबादी के साथ, यह भारत का ग्यारहवां सबसे अधिक आबादी वाला शहर और बारहवां सबसे अधिक आबादी वाला शहरी समूह है। यह हमेशा एक बहुसांस्कृतिक शहर रहा है जो उत्तर भारतीय सांस्कृतिक और कलात्मक केंद्र और 18वीं और 19वीं शताब्दी में नवाबों की सत्ता की सीट के रूप में विकसित हुआ। लखनऊ शासन, प्रशासन, शिक्षा, वाणिज्य, एयरोस्पेस, वित्त, फार्मास्यूटिकल्स, प्रौद्योगिकी, डिजाइन, संस्कृति, पर्यटन, संगीत और कविता का एक महत्वपूर्ण केंद्र बना हुआ है। लखनऊ समुद्र तल से लगभग 123 मीटर (404 फीट) की ऊंचाई पर स्थित है। शहर का क्षेत्रफल 402 किमी.वर्ग था। (155 वर्ग मील) दिसंबर 2019 तक, जब 88 गांवों को नगरपालिका सीमा में जोड़ा गया और क्षेत्रफल बढ़कर 631 किमी.वर्ग हो गया। (244 वर्ग मील)। लखनऊ, गोमती नदी के उत्तर-पश्चिमी तट पर स्थित है, जो पूर्व में बाराबंकी, पश्चिम में उन्नाव, दक्षिण में रायबरेली और उत्तर में सीतापुर और हरदोई से घिरा है। 2008 तक शहर में 110 वार्ड थे। रूपात्मक रूप से, तीन स्पष्ट सीमांकन मौजूद हैं: केंद्रीय व्यापार जिला, जो पूरी तरह से निर्मित क्षेत्र है, में हजरतगंज, अमीनाबाद और चौक शामिल हैं। एक मध्य क्षेत्र आंतरिक क्षेत्र को सीमेंट घरों से घिरा हुआ है जबकि बाहरी क्षेत्र में झुग्गियां हैं। ऐतिहासिक रूप से, लखनऊ अवध क्षेत्र की राजधानी थी, जिस पर दिल्ली सल्तनत और बाद में मुगल साम्राज्य का नियंत्रण था। इसे अवध के नवाबों को हस्तांतरित कर दिया गया। 1856 में, ब्रिटिश ईस्ट इंडिया कंपनी ने स्थानीय शासन को समाप्त कर दिया और शेष अवध के साथ-साथ शहर पर भी पूर्ण नियंत्रण कर लिया। 1857 में इसने यह नियंत्रण ब्रिटिश क्राउन को हस्तांतरित कर दिया। आजादी के बाद से, इसे भारत में 17वें और दुनिया में 74वें सबसे तेजी से बढ़ते शहर के रूप में सूचीबद्ध किया गया है। व्युत्पत्तिशास्त्र \"लखनऊ\" स्थानीय उच्चारण \"लखनऊ\" की अंग्रेजी वर्तनी है। एक किंवदंती के अनुसार, शहर का नाम हिंदू महाकाव्य रामायण के नायक लक्ष्मण के नाम पर रखा गया है। किंवदंती में कहा गया है कि लक्ष्मण के पास उस क्षेत्र में एक महल या संपत्ति थी, जिसे लक्ष्मणपुरी (संस्कृत: लक्ष्मणपुरी, शाब्दिक रूप से लक्ष्मण का शहर) कहा जाता था। 11वीं शताब्दी तक इस बस्ती को लखनपुर (या लछमनपुर) और बाद में लखनऊ के नाम से जाना जाने लगा। इसी तरह के एक सिद्धांत में कहा गया है कि शहर को लक्ष्मण के बाद लक्ष्मणावती (संस्कृत: लक्ष्मणवती, सौभाग्यशाली) के नाम से जाना जाता था। नाम बदलकर लखनावती, फिर लखनौती और अंत में लखनऊ कर दिया गया। एक अन्य सिद्धांत में कहा गया है कि शहर का नाम धन की हिंदू देवी लक्ष्मी से जुड़ा है। समय के साथ, नाम बदलकर लक्ष्मनौति, लक्ष्मणौत, लक्ष्नौत, लक्ष्नौ और अंत में, लखनौ हो गया। एक अन्य मत यह है कि लखनऊ का नाम लखना अहीर नामक एक बहुत प्रभावशाली वास्तुकार के नाम पर रखा गया था, जिसने किला लखना का निर्माण किया था। विवरण लखनऊ शहर में लखनऊ जिले और लखनऊ मंडल के प्रशासनिक मुख्यालय भी स्थित हैं। लखनऊ शहर अपनी खास नज़ाकत और तहजीब वाली बहुसांस्कृतिक खूबी, दशहरी आम के बाग़ों…"} {"text": "[DE Wikipedia] Purbalingga (Regierungsbezirk)\n\nPurbalingga ist ein indonesischer Regierungsbezirk (Kabupaten) in der Provinz Jawa Tengah, im Zentrum der Insel Java. Mitte 2020 lebten hier über eine Million Menschen. Hauptstadt und Regierungssitz des Verwaltungsdistrikts ist die Stadt Purbalingga. Sie liegt etwa 120 km Luftlinie von Semarang in südwestlicher Richtung. Geografie Lage Der Kabupaten erstreckt sich zwischen 7°10′ und 7°29′ s. Br. sowie zwischen 101°11′ und 109°35′ ö. L. Er hat nur drei Regierungsbezirke als Nachbarn: Baynumas im Südwesten, Pemalang im Norden und Banjarnegara im Südosten. Verwaltungsgliederung Der Regierungsbezirk wird administrativ in 18 Kecamatan (Distrikte) unterteilt. Eine weitere Unterteilung erfolgt in 239 Dörfer, von denen 15 Kelurahan (Dörfer urbanen Charakters) sind. Weiterhin existieren noch 1.558 Rukun Warga (RW, Weiler) und 5.092 Rukun Tetangga (RT, Nachbarschaften). Demographie Zur Volkszählung im September 2020 lebten im Kabupaten Purbalingga 998.561 Menschen, davon 493.280 Frauen (49,40 %) und 505.281 Männer. Gegenüber dem letzten Census (2010) sank der Frauenanteil um 1,10 Prozent. 68,32 % (682.205) gehörten 2020 zur erwerbsfähigen Bevölkerung; 23,36 % waren Kinder (bis 14 Jahre) und 8,32 % im Rentenalter (ab 65 Jahren). Mitte 2022 bekannten sich 99,28 Prozent der Einwohner zum Islam, Christen waren mit 0,71 % (5.011 ev.-luth. / 2.234 röm.-kath.) vertreten. Zur gleichen Zeit waren von der Gesamtbevölkerung 40,97 % ledig; 52,27 % verheiratet; 2,15 % geschieden und 4,61 % verwitwet. Bevölkerungsentwicklung Bevölkerungsentwicklung des Kabupaten Purbalingga von 1971 bis 2020 Ergebnisse der Volkszählungen Nr. 3 bis 8 – Sensus Penduduk (SP) Ergebnisse von drei intercensalen Bevölkerungsübersichten (1995, 2005, 2015) – Survei Penduduk Antar Sensus (SUPAS) Geschichte Der Begriff Purbalingga stammt von den Sanskrit-Wurzelwörtern hinduistischen Ursprungs, purba (Osten) und linga (eine abstrakte Darstellung der Hindu-Gottheit Shiva), und bedeutet somit Shiva des Ostens. Dies spiegelt den historischen Ursprung des Ortes wider, da die Srivijaya-Ära oder frühere Gründer des Ortes hier einen Hindu-Tempel für Shiva errichtet hatten, zu dessen Ehren der Ort von der Gründer-Herrscherdynastie benannt wurde. Purbalingga ist durchdrungen von der alten Geschichte der Hindu-Reiche der Srivijaya- und Majapahit-Ära, mit mehreren alten Hindu-Tempeln in und um den Regierungsbezirk. Weblinks mannigfaltige Publikationen im PDF-Format auf der Statistikseite des Kabupaten Purbalingga (indonesisch/englisch) Satu Data Purbalingga – OPen Data (indonesisch) Einzelnachweise Kabupaten in Jawa Tengah Geographie (Java)"} {"instruction": "Create a program that draws a triangle with stars (*) with a given height.", "input": "", "output": "def draw_triangle(n): for i in range(0, n): for j in range(0, i+1): print(\"*\",end=\"\") print(\"\\r\")"} {"instruction": "Generate a unique 8 digit alphanumeric ID using Java.", "input": "", "output": "String alphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" + \"0123456789\" + \"abcdefghijklmnopqrstuvxyz\"; StringBuilder sb = new StringBuilder(8); for (int i = 0; i < 8; i++) { int index = (int)(alphaNumericString.length() * Math.random()); sb.append(alphaNumericString.charAt(index)); } String generatedID = sb.toString();"} {"text": "[HI Wikipedia] ट्रफ़ैलगर कब्रिस्तान\n\nट्रफ़ैलगर कब्रिस्तान () ब्रिटिश प्रवासी शासित प्रदेश जिब्राल्टर में स्थित एक कब्रिस्तान है। पहले इसका नाम साउथपोर्ट डिच कब्रिस्तान () था। यह शहर की रक्षक दीवार के एकदम दक्षिण में भूमि के छोटे से टुकड़े पर बना हुआ है, जहाँ स्पेनी शासन के दौरान रक्षात्मक खाई थी। हालांकि इस कब्रिस्तान का नाम 21 अक्टूबर 1805 के दिन हुए ट्रफ़ैलगर के युद्ध पर रखा गया था परन्तु यहाँ युद्ध के केवल दो पीड़ितो को ही दफनाया गया है। बाकि की कब्रे मुख्यतः अन्य समुंद्री युद्धों में मारे गए सैनिकों और 1804 से 1814 के बीच जिब्राल्टर में महामारी का रूप ले चुके पीतज्वर में मरने वाले नागरिकों की हैं। इसके आलावा कई समाधि पत्थर सेंट जेगोस कब्रिस्तान और अलामिडा गार्डन्स से ट्रफ़ैलगर कब्रिस्तान में स्थान्तरित किए गए थे। कब्रिस्तान को अब किसी शव को दफनाने के लिए प्रयोग में नहीं लाया जाता है तथा इसे कई वर्षों तक परित्यक्त रखा गया था परन्तु 1980 के दशक में इसकी बहाली की गई। वर्ष 1992 में ट्रफ़ैलगर के युद्ध से सम्बंधित एक विशेष स्मारक को कब्रिस्तान में लगाया गया। कब्रिस्तान ट्रफ़ैलगर दिवस के दिन आयोजित होने वाले वार्षिक संस्मारक समारोह आ आयोजन स्थल है। यह दिवस ट्रफ़ैलगर युद्ध की सालगिरह के सबसे नजदीक के रविवार को मनाया जाता है। ट्रफ़ैलगर कब्रिस्तान जिब्राल्टर हेरिटेज ट्रस्ट में सूचिबद्ध है। स्थिति ट्रफ़ैलगर कब्रिस्तान इबेरिया प्रायद्वीप के दक्षिणी सिरे पर स्थित ब्रिटिश प्रवासी शासित प्रदेश जिब्राल्टर में स्थित है। यह भूमि का त्रिकोणीय खंड है जिसकी सीमाएँ उत्तर में चार्ल्स पंचम दीवार, पूर्व में प्रिंस एडवर्ड्स सड़क और दक्षिण-पश्चिम में ट्रफ़ैलगर सड़क से बनी हुई हैं। प्रिंस एडवर्ड्स दरवाज़ा कब्रिस्तान के उत्तर-पूर्वी कोने पर स्थितहै तथा साउथपोर्ट दरवाज़े इसके उत्तर-पश्चिमी कोने पर हैं। कब्रिस्तान शहर की पुरानी रक्षात्मक दीवारों के एकदम बहार निकलते ही है, जहाँ यह साउथपोर्ट डिच (साउथपोर्ट खाई) के अनुभाग का हिस्सा है। साउथपोर्ट खाई शहर के दक्षिणी बचाव गढ़ का भाग है। साउथपोर्ट डिच एक विशाल खाई थी चार्ल्स पंचम दीवार के दक्षिणी हिस्से में दक्षिण बैस्टियन से फ़्लैट बैस्टियन फ़ैली हुई थी। यह स्पेनी अभियंता लुईस ब्रावो डे अक्युना द्वारा 1627 में बनाए गए मानचित्र में दर्शाई गई थी था। यह मानचित्र अब ब्रिटिश संग्रहालय के पास है जिसमें इसे स्पेनिश भाषा के फोसो शाब्द के साथ अंकित किया गया है। इतिहास कब्रिस्तान का निर्माण साउथपोर्ट डिच कब्रिस्तान (साउथपोर्ट खाई कब्रिस्तान) के रूप में हुआ था। इसे ट्रफ़ैलगर के युद्ध से सात वर्ष पहले जून 1798 में प्रतिष्ठित किया गया था। एक दिवसीय ट्रफ़ैलगर का युद्ध 21 अक्टूबर 1805 के दिन लड़ा गया था। कभी-कभी कब्रिस्तान को इस से अपेक्षाकृत विशाल सेंट जेगोस कब्रिस्तान का हिस्सा माना जाता था, जो इसके नजदीक ही उत्तर में स्थित है तथा चार्ल्स पंचम दीवार की विपरीत दिशा में है। सेंट जेगोस कब्रिस्तान जिसे डैडमैंस कब्रिस्तान के नाम से भी जाना जाता है एक समय में जिब्राल्टर शहर की रक्षात्मक दीवारों के अंदर बना एकमात्र कब्रिस्तान था। 1932 में कई समाधि पत्थर सेंट जेगोस कब्रिस्तान और अलामिडा गार्डन्स से ट्रफ़ैलगर कब्रिस्तान में स्थान्तरित किए गए थे। दीर्घा सन्दर्भ बाहरी कड़ियाँ कब्रिस्तान का…"} {"instruction": "Create a Python script to parse the given HTML page.", "input": "\n \n Parsing example\n \n \n

    Heading

    \n
      \n
    • Item 1
    • \n
    • Item 2
    • \n
    \n

    This is a paragraph.

    \n \n", "output": "from bs4 import BeautifulSoup\n\nhtml_doc = \"\"\"\n\n \n Parsing example\n \n \n

    Heading

    \n
      \n
    • Item 1
    • \n
    • Item 2
    • \n
    \n

    This is a paragraph.

    \n \n\n\"\"\"\n\nsoup = BeautifulSoup(html_doc, 'html.parser')\n\nheading = soup.find(\"h1\").get_text()\nitems = soup.find_all(\"li\")\npara = soup.find(\"p\").get_text()\n\nprint(\"Heading: \" + heading)\nprint(\"Items:\")\nfor item in items:\n print(\"- \" + item.get_text())\nprint(\"Paragraph: \" + para)"} {"text": "[DE Wikipedia] Horsey Island\n\nHorsey Island ist eine Gezeiteninsel im Parish Thorpe-le-Soken in Essex, England. Sie liegt im Hamford Water, einer Bucht südlich von Harwich, und ist Teil der Hamford Water National Nature Reserve, die unter Aufsicht von Natural England und dem Essex Wildlife Trust steht. Man braucht eine Erlaubnis, um die Insel zu besuchen. Geographie Im westlichen Teil der Insel gibt es einen Tümpel mit Süßwasser, der von Bäumen eingerahmt wird. Es gibt eine Reihe von Austernbänken hier und an der Nordseite der Insel. Einige Farmgebäude befinden sich im Zentrum der Insel. Im 19. Jahrhundert wurde Land gewonnen, wofür einige Deiche gebaut wurden. Gemeinsam mit den umfangreichen Salzablagerungen um die Inseln bot dies einen teilweisen Schutz gegen Überflutung der Insel. Zu jener Zeit war Horsey Island teilweise verbunden mit der benachbarten Hedge End Island; dieser Plan, beide Inseln vollständig miteinander zu verbinden, wurde wegen finanzieller Schwierigkeiten nicht vollendet. Die Insel ist mit dem Festland über einen rund tausend Meter langen Damm verbunden, der durch das Watt führt und bei Flut überspült wird; er führt von Kirby-le-Soken zur Insel und kann bei Ebbe von Fußgängern passiert werden. Horsey Island ist eine von 43 Gezeiteninseln in Großbritannien, die man bei Ebbe von der britischen Hauptinsel aus zu Fuß erreichen kann. Siedlungsgeschichte Die früheste schriftliche Erwähnung von Horsey Island stammt aus dem Jahr 1212, als die Insel als Horse Hey bekannt war. Sie wurde nicht ununterbrochen bewohnt, aber es gibt Spuren von Bauwerken aus dem Jahr 1536, und sie erscheint auf einer Karte aus dem Jahr 1594 als Horsey Illande. Bei großen Sturmfluten wurde Horsey Island regelmäßig überschwemmt, so etwa 1691, 1896, 1949 und bei der Flutkatastrophe von 1953. Der Deich aus dem 19. Jahrhundert wurde um 1897 zerstört und das davon zuvor geschützte Land wurde aufgegeben. Die auf der Insel befindliche Farm wird noch betrieben, womit die Insel eine der am längsten bewohnten Inseln im Osten der Britischen Inseln ist – diesen Anspruch verbindet man oft mit der stärker bebauten Insel Mersea Island weiter westlich. Die Insel ist noch immer in Privatbesitz. Rezeption in der Kultur In Arthur Ransomes Kinderbuch Secret Water wird die Insel als „Swallow Island“ beschrieben. Die reiche Vogelwelt am südöstlichen Rand der Insel hat Paul Gallico inspiriert, die BBC-Adaptation seines Buches Die Schneegans hier zu drehen. Literatur Belege Insel (England) Insel (Europa) Insel (Nordsee) Geographie (Essex) Tendring District Privatinsel"} {"instruction": "Using DOM manipulation, replace the paragraph text with \"Hello World\".", "input": "

    My first web page

    ", "output": "document.querySelector('p').innerHTML = 'Hello World';"} {"instruction": "How would you construct a for loop to print out the contents of an array?", "input": "arr=[1,3,5,7,9]", "output": "for i in range(len(arr)): print(arr[i])"} {"instruction": "Improve the performance of the following Python code.", "input": "def find_max(a, b):\n max_val = a\n if b > a:\n max_val = b\n return max_val", "output": "def find_max(a, b):\n return max(a, b)"} {"instruction": "Create a CSS stylesheet for a webpage that centers the heading and makes the background color gray.", "input": "", "output": "body { background-color: gray; } h1 { text-align: center; }"} {"instruction": "Generate an array of increasing numbers beginning from 1 of length n.", "input": "n=5", "output": "def generate_array(n): \"\"\" Generate an array of increasing numbers beginning from 1 of length n \"\"\" return [i for i in range(1, n+1)] print(generate_array(5))"} {"instruction": "Create a Python function that takes a list of strings and returns a dict with the strings grouped by the length of the strings.", "input": "['word', 'sentence', 'hello', 'programming']", "output": "def group_by_length(lst):\n res = {}\n for x in lst:\n length = len(x)\n if length not in res:\n res[length] = [x]\n else:\n res[length].append(x)\n return res\n \ninput = ['word', 'sentence', 'hello', 'programming']\noutput = group_by_length(input)\nprint(output) // {4: ['word', 'hello'], 8: ['sentence'], 11: ['programming']}"} {"text": "[CS Wikipedia] Skupenské teplo tání\n\nSkupenské teplo tání je (celkové) teplo, které přijme pevná látka při přechodu na kapalinu během tání. Teplo, které přijme 1 kilogram látky se nazývá měrné skupenské teplo tání. Značení Značka: Lt Jednotka SI: joule, značka: J Používané násobky: kilojoule kJ, megajoule MJ Výpočet Hodnotu skupenského tepla tání lze určit ze vztahu , kde m je hmotnost a lt je měrné skupenské teplo tání. Související články Tání Měrné skupenské teplo tání Skupenské teplo tuhnutí Skupenské teplo Skupenské teplo"} {"text": "[CS Wikipedia] Fritování\n\nFritování je tepelná úprava pokrmu podobná smažení. Na rozdíl od smažení je pokrm při fritování celý ponořen do horkého oleje, jeho příprava je proto rychlejší a rovnoměrnější. Rovněž teplotu oleje lze regulovat, a tak nemusí docházet k nezdravému přepálení oleje. Optimální teplota je 180 °C. Je-li teplota nižší, fritované potraviny se nasáknou tukem. Proto zahajujeme fritování až v momentě, kdy je olej zahřátý na předepsanou teplotu. Nenecháváme však fritovací olej zahřívat příliš dlouho, protože tím by se snížila jeho kvalita. Ke fritování se nejčastěji používá fritovací hrnec. Fritují se hranolky, potraviny v trojobalu (např. řízky), ryby atd. Ke fritování by se měly používat jen fritovací oleje, které mají vyšší tepelnou odolnost a delší trvanlivost. Můžeme také fritovat na ztuženém tuku, který se před použitím nakrájí na kousky. Nikdy by se nemělo míchat více druhů oleje a tuku dohromady. Fritovací olej je nutné po čase vyměnit, signálem by měla být změna barvy oleje a přítomnost nečistot. Zdraví Některé druhy takto připravovaného jídla mohou být velmi nezdravou stravou vedoucí ke špatné životosprávě, obezitě, celulitidě a dalším zdravotním problémům a rizikům. Vědci z Technické univerzity v Mnichově poprvé prokázali přítomnost rakovinotvorné látky – glycidamidu – ve smažených hranolcích a chipsech. Glycidamid je látka, jež vzniká při zahřívání produktů z brambor a je daleko nebezpečnější než v hranolcích v květnu 2002 objevený akrylamid. Glycidamid byl při tomto testu prokázán ve výrobcích ve velmi malém množství, od 0,3 do 1,5 mikrogramu na kilogram v deseti vzorcích bramborových lupínků a ve třech druzích hranolků. Glycidamid i akrylamid se uvolňují ve vysokých teplotách při tepelném zpracování bramborových produktů. K tomu dochází při 120 stupních Celsia. Daleko nebezpečnější látky vznikají při teplotách nad 180 °C. Studie dále odhalila, že nejnižší koncentrace látky akrylamidu byla po smažení na palmovém oleji a nejvyšších hodnot dosahovaly potraviny po fritování na slunečnicovém oleji. Reference Externí odkazy Příprava jídla"} {"instruction": "Given a string of words, what is the most efficient way to replace the word \"a\" with \"the\"?", "input": "word_string = \"I am learning a lot of new things!\"", "output": "# Using the replace method new_string = word_string.replace('a', 'the') print(new_string)"} {"instruction": "Using the following data, generate a random string in Python", "input": "data = [“H”, “e”, “l”, “l”, “o”]", "output": "import random random_string = \"\".join(random.choices(data, k=5)) print(random_string) #helll or olleh or leloh or any other combination"} {"instruction": "Create an algorithm to reverse a given string without using the built-in python reverse function", "input": "", "output": "\"\"\"\nReverse a given string without using the built-in python reverse function.\n\"\"\"\n\ndef reverse_string(in_str):\n rev_str = ''\n for i in range(len(in_str) - 1, -1, -1):\n rev_str += in_str[i]\n return rev_str\n\nif __name__ == '__main__':\n in_str = 'reverse me'\n rev_str = reverse_string(in_str)\n print(rev_str)"} {"instruction": "Create a python function to parse a character-separated string", "input": "Parse a string \"Harry,30,England\" using comma as separator", "output": "def parse_str(str, separator):\n strList = str.split(separator) \n return strList"} {"instruction": "Explain how to convert an expression from postfix notation to infix notation", "input": "", "output": "Infix notation is a way of writing an expression in which the operators are placed between the operands, such as 2 + 5, whereas postfix notation is a way of writing an expression in which the operators are placed after the operands, such as 2 5 +. To convert an expression from postfix notation to infix notation, scan the expression from left to right. If an operand is encountered, simply push it onto a stack. If an operator is encountered, pop two operands from the stack and place the operator in between them. Finally, push the resulting expression back onto the stack and repeat this until the end of the expression is reached."} {"instruction": "Design an interface for a Python program that parses HTML documents.", "input": "Not applicable", "output": "from bs4 import BeautifulSoup\n\n\nclass HTMLParser:\n def __init__(self, html_doc):\n self.html_doc = html_doc\n\n def parse(self):\n soup = BeautifulSoup(self.html_doc, 'html.parser')\n return soup"} {"instruction": "Create a list containing the even numbers from #1 to #10.", "input": "", "output": "[2, 4, 6, 8, 10]"} {"instruction": "Determine whether a given number is divisible by 3.", "input": "n = 15", "output": "if n % 3 == 0: print(str(n) + \" is divisible by 3.\") else: print(str(n) + \" is not divisible by 3.\")"} {"instruction": "Sort an array of integers in ascending order by implementing a Bubble Sort algorithm.", "input": "unsorted_list = [8, 5, 3, 1, 9, 6, 0, 7, 4, 2, 5]", "output": "def bubble_sort(nums): # Traverse through all array elements for i in range(len(nums)): # Last i elements are already in place for j in range(0, len(nums)-i-1): # traverse the array from 0 to n-i-1 # Swap if the element found is greater # than the next element if nums[j] > nums[j+1] : nums[j], nums[j+1] = nums[j+1], nums[j] # Print the sorted array if __name__ == '__main__': bubble_sort(unsorted_list) print (\"Sorted array is:\") print(unsorted_list)"} {"text": "[EN Wikipedia] Abatement\n\nAbatement refers generally to a lessening, diminution, reduction, or moderation; specifically, it may refer to: 421-a tax abatement, property tax exemption in the U.S. state of New York Abatement of debts and legacies, a common law doctrine of wills Abatement in pleading, a legal defense to civil and criminal actions Abatement (heraldry), a modification of the shield or coat of arms imposed by authority for misconduct Asbestos abatement, removal of asbestos from structures Bird abatement, driving or removing undesired birds from an area Dust abatement, the process of inhibiting the creation of excess soil dust Graffiti abatement, a joint effort between groups to eliminate graffiti Marginal abatement cost, the marginal cost of reducing pollution Noise abatement, strategies to reduce noise pollution or its impact Nuisance abatement, regulatory compliance methodology Tax abatement, temporary reduction or elimination of a tax See also Abate (disambiguation)"} {"instruction": "Write a code in Java for finding the factorial of a number.", "input": "5", "output": "public class Factorial { public static int calcFactorial(int number){ int factorial; if(number == 0 || number == 1){ factorial = 1; } else { factorial = number * calcFactorial(number-1); } return factorial; } public static void main(String[] args){ System.out.println(calcFactorial(5)); } }"} {"instruction": "Create a web server in Node.js.", "input": "", "output": "const http = require('http'); const hostname = '127.0.0.1'; const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World\\n'); }); server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`); });"} {"instruction": "Write Python code to find the nth element of a Fibonacci sequence.", "input": "", "output": "def Fibonacci(n): if n<0: print(\"Incorrect input\") elif n==1: return 0 elif n==2: return 1 else: return Fibonacci(n-1)+Fibonacci(n-2)"} {"text": "[HI Wikipedia] संयुक्त राष्ट्र\n\nसंयुक्त राष्ट्र एक अन्तर्राष्ट्रीय संगठन है, संक्षिप्त रूप से इसे कई समाचार पत्र संरा भी लिखते हैं। जिसके उद्देश्य में उल्लेख है कि यह अन्तर्राष्ट्रीय कानून को सुविधाजनक बनाने के सहयोग, अन्तर्राष्ट्रीय सुरक्षा, आर्थिक विकास, सामाजिक प्रगति, मानव अधिकार और विश्व शान्ति के लिए कार्यरत है। संयुक्त राष्ट्र की स्थापना २४ अक्टूबर १९४५ को संयुक्त राष्ट्र अधिकारपत्र पर ५० देशों के हस्ताक्षर होने के साथ हुई। द्वितीय विश्वयुद्ध के विजेता देशों ने मिलकर संयुक्त राष्ट्र को अन्तरराष्ट्रीय संघर्ष में हस्तक्षेप करने के उद्देश्य से स्थापित किया था। वे चाहते थे कि भविष्य में फिर कभी द्वितीय विश्वयुद्ध की तरह के युद्ध न उभर आए। संयुक्त राष्ट्र की संरचना में सुरक्षा परिषद वाले सबसे शक्तिशाली देश (संयुक्त राज्य अमेरिका, फ़्रांस, रूस और यूनाइटेड किंगडम) द्वितीय विश्वयुद्ध में बहुत बहुत राष्ट्र थे। वर्तमान में संयुक्त राष्ट्र में १९५ राष्ट्र हैं, विश्व के लगभग सारे अन्तरराष्ट्रीय मान्यता प्राप्त राष्ट्र शामिल हैं। इस संस्था की संरचना में महासभा, सुरक्षा परिषद, आर्थिक व सामाजिक परिषद, सचिवालय, अन्तरराष्ट्रीय न्यायालय और संयुक्त राष्ट्र न्यास परिषद सम्मिलित है। इतिहास प्रथम विश्वयुद्ध के बाद 1929 में राष्ट्र संघ का गठन किया गया था। राष्ट्र संघ बहुत हद तक प्रभावहीन था और संयुक्त राष्ट्र का उसकी जगह होने का यह बहुत बड़ा लाभ है कि संयुक्त राष्ट्र अपने सदस्य देशों की सेनाओं को शान्ति संभालने के लिए तैनात कर सकता है। संयुक्त राष्ट्र के बारे में विचार पहली बार द्वितीय विश्वयुद्ध के दौरान उभरे थे। द्वितीय विश्व युद्ध में विजयी होने वाले देशों ने मिलकर प्रयास किया कि वे इस संस्था की संरचना, सदस्यता आदि के बारे में कुछ निर्णय कर पायें। 24 अप्रैल 1945 को, द्वितीय विश्वयुद्ध के समाप्त होने के बाद, अमेरिका के सैन फ्रैंसिस्को में अन्तराष्ट्रीय संस्थाओं की संयुक्त राष्ट्र सम्मेलन हुई और यहाँ सारे 40 उपस्थित देशों ने संयुक्त राष्ट्र संविधा पर हस्ताक्षर किया। पोलैण्ड इस सम्मेलन में उपस्थित तो नहीं था, पर उसके हस्ताक्षर के लिए विशेष स्थान रखा गया था और बाद में पोलैण्ड ने भी हस्ताक्षर कर दिया। सुरक्षा परिषद के पाँच स्थायी देशों के हस्ताक्षर के बाद संयुक्त राष्ट्र अस्तित्व में आया। सदस्य वर्ग 2006 तक संयुक्त राष्ट्र में 192 सदस्य देश है। विश्व के लगभग सभी मान्यता प्राप्त देश सदस्य है। कुछ विषेश उपवाद तइवान (जिसका स्थान चीन को 1971 में दे दिया गया था), वैटिकन, फ़िलिस्तीन (जिसको पर्यवेक्षक का स्थान प्राप्त है) , तथा और कुछ देश। सबसे नए सदस्य देश है दक्षिणी सूडान, जिसको 11 जुलाई, 2011 को सदस्य बनाया गया। मुख्यालय संयुक्त राष्ट्र का मुख्यालय अमेरिका के न्यूयॉर्क नगर में पचासी लाख डॉलर में खरीदी गयी भूसंपत्ति पर स्थापित है। इस इमारत की स्थापना का प्रबन्ध एक अन्तरराष्ट्रीय शिल्पकारों के समूह द्वारा हुआ। इस मुख्यालय के अलावा और अहम संस्थाएँ जिनेवा, कोपनहेगन आदि में भी है। यह संस्थाएँ संयुक्त राष्ट्र से स्वतन्त्र तो नहीं हैं, परन्तु उनको बहुत हद तक स्वतन्त्रताएँ दी गयी हैं। भाषाएँ संयुक्त राष्ट्र ने 6 भाषाओं को \"राजभाषा\" के तौर पर स्वीकृत किया है (अरबी, चीनी, अंग्रेजी, फ़्रांसीसी, रूसी और स्पेनी),…"} {"text": "[DE Wikipedia] Beach Point\n\nDer Beach Point ( für Strandspitze) bildet die nordöstliche Spitze von Thule Island im Archipel der Südlichen Sandwichinseln. Sie ist gekennzeichnet durch einen blanken Gebirgsrücken und einen schmalen Strandsaum aus Felsbrocken und Kieseln. Wissenschaftler der britischen Discovery Investigations landeten hier 1930 an, nahmen eine Kartierung und die deskriptive Benennung vor. Weblinks (englisch) Beach Point auf geographic.org (englisch) Kap (Südgeorgien und die Südlichen Sandwichinseln) Südliche Sandwichinseln"} {"text": "[HI Wikipedia] श्री विद्या\n\nश्री विद्या देवी ललिता त्रिपुरसुन्दरी से सम्बन्धित तन्त्र विद्या का हिन्दू सम्प्रदाय है। ललितासहस्रनाम में इनके एक सहस्र (एक हजार) नामों का वर्णन है। ललितासहस्रनाम में श्रीविद्या के संकल्पनाओं का वर्णन है। श्रीविद्या सम्प्रदाय आत्मानुभूति के साथ-साथ भौतिक समृद्धि को भी जीवन के लक्ष्य के रूप में स्वीकार करता है। श्रीविद्या का साहित्य विशाल है। ऋग्वेद मैं श्रीसूक्त मैं श्रीदेवी मतलब महालक्ष्मी जो परमेश्वरि के उपासना किया जाता हैं। ए ही वैदिक श्रीविद्या हैं। श्रीविद्या के भैरव हैं- त्रिपुर भैरव (देव शक्ति संगमतंत्र)। महाशक्ति के अनन्त नाम और अनन्त रूप हैं। इनका परमरूप एक तथा अभिन्न हैं। त्रिपुरा उपासकों के मतानुसार ब्रह्म आदि देवगण त्रिपुरा के उपासक हैं। उनका परमरूप इंद्रियों तथा मन के अगोचर है। एकमात्र मुक्त पुरूष ही इनका रहस्य समझ पाते हैं। यह पूर्णाहंतारूप तथा तुरीय हैं। देवी का परमरूप वासनात्मक है, सूक्ष्मरूप मंत्रात्मक है, स्थूलरूप कर-चरणादि-विशिष्ट है। श्रीविद्या के उपासकों में प्रथम स्थान काम (मन्मथ) का है। यह देवी गुह्य विद्या प्रवर्तक होने के कारण विश्वेश्वरी नाम से प्रसिद्ध हैं। देवी के बारह मुख और नाम प्रसिद्ध हैं, यथा- मनु, चंद्र, कुबेर, लोपामुद्रा, मन्मथ, अगस्त्य, अग्नि, सूर्य, इंद्र, स्कंद, शिव, क्रोध भट्टारक (या दुर्वासा)। इन लोगों ने श्रीविद्या की साधना से अपने अधिकार के अनुसार पृथक् फल प्राप्त किया था।श्री विद्या के जो प्रायः लुप्तप्राय मत है वो आज भी प्राचीनतम आगम मठ में पूर्णतः प्रचलित है ऐसा भी कहा जाता है कि भारत के पाँच भागो में पाँच मठ पूर्व में असम और अरूणाचल पश्चिम मे गुजरात उत्तर मे हिमालय दक्षिण मे कन्याकुमारी और मध्य मे मध्य प्रदेश में है सम्प्रदाय श्रीविद्या के मुख्य 12 संप्रदाय हैं। इनमें से बहुत से संप्रदाय लुप्त हो गए है, केवल मन्मथ और कुछ अंश में लोपामुद्रा का संप्रदाय अभी जीवित है। कामराज विद्या (कादी) और पंचदशवर्णात्मक तंत्रराज और त्रिपुरोपनिषद के समान लोपामुद्रा विद्या आदि भी पंचदशवर्णात्मक हैं। कामेश्वर अंकस्थित कामेश्वरी की पूजा के अवसर पर इस विद्या का उपयोग होता है। लोपामुद्रा अगस्त्य की धर्मपत्नी थीं। वह विदर्भराज की कन्या थीं। पिता के घर में रहने के समय पराशक्ति के प्रति भक्तिसंपन्न हुई थीं। त्रिपुरा की मुख्य शक्ति भगमालिनी है। लोपामुद्रा के पिता भगमालिनी के उपासक थे। लोपामुद्रा बाल्यकाल से पिता की सेवा करती थी। उन्होंने पिता की उपासना देखकर भगमालिनी की उपासना प्रारंभ कर दी। देवी ने प्रसन्न होकर जगन्माता की पदसेवा का अधिकार उन्हें दिया था। त्रिपुरा विद्या का उद्धार करने पर उनके नाम से लोपामुद्रा ने ऋषित्व प्राप्त किया। अगस्त्य वैदिक ऋषि थे। बाद में अपनी भार्या से उन्होंने दीक्षा ली। दुर्वासा का संप्रदाय भी प्राय: लुप्त ही है। श्रीविद्या, शक्ति चक्र सम्राज्ञी है और ब्रह्मविद्या स्वरूपा है। यही आत्मशक्ति है। ऐसी प्रसिद्धि है कि - यत्रास्ति भोगो न च तत्र मोझो यत्रास्ति भोगे न च तत्र भोग:। श्रीसुंदरीसेवनतत्परानां, भोगश्च मोक्षश्च करस्थ एव। अगस्त्य केवल तंत्र में ही सिद्ध नहीं थे, वे प्रसिद्ध वैदिक मंत्रों के द्रष्टा थे। श्री शंकरमठ में भी बराबर श्रीविद्या की उपासना और पूजा होती चली आ रही है। त्रिपुरा की स्थूलमूर्ति…"} {"text": "[CS Wikipedia] Toni Sailer\n\nAnton Engelbert „Toni“ Sailer (17. listopadu 1935 Kitzbühel – 24. srpna 2009 Innsbruck) byl rakouský lyžař, herec a zpěvák. V letech 1972–1976 byl technickým ředitelem a hlavním trenérem rakouské lyžařské federace a v letech 1986–2006 ředitelem sjezdovky Hahnenkamm. Byl zároveň technickým ředitelem závodů FIS a čestným členem různých sportovních organizacích. V rodném Kitzbühelu vedl přes 30 let lyžařskou školu pro děti. Rodina Sourozenci Toniho Sailera, sestra Rosi Sailerová a bratr Rudolf Sailer závodili také ve sjezdovém lyžování, ale výrazných úspěchů nedosáhli. Sailer byl dvakrát ženatý. Od r. 1976 s Gaby Rummenyovou († 2000) spolu měli syna Floriana. A poté od r. 2006 s Hedwigou Fischerovou. Další Navštěvoval berlínskou divadelní školu a hrál ve více než 20 filmech. Působil také jako zpěvák. Ocenění Rakouský Sportovec roku 1956, 1957 a 1958 Olympijský řád 1985 Rakouský Sportovec století 1999 Externí odkazy idnes.cz Narození v roce 1935 Úmrtí v roce 2009 Rakouští olympijští vítězové v alpském lyžování Mistři světa v alpském lyžování Rakouští herci Muži Úmrtí 24. srpna Narození 17. listopadu Mistři Rakouska v alpském lyžování Úmrtí v Innsbrucku"} {"text": "[CS Wikipedia] Metelka\n\nMetelka je české příjmení, jež vzniklo zdrobněním ze slova metela, metelice = vánice, nebo ze slovesa metelit = utíkat (podobně vznikla příjmení Metel, Metelák, Metelec). Ženskou variantou je Metelková. Příjmení Metelka nosí více osobností: Bohuslav Metelka (1885–1960) – jihlavský malíř, kreslíř, loutkář a pedagog Bohuslav Metelka (* 1959) – zlínský sochař František Metelka (* 1980) – český fotbalista Jaroslav Metelka (1918–1975) – český regionální historik Úpicka Jáchym Metelka (1853–1940) – učitel, ředitel, muzikant, tvůrce mechanického betlému v Jilemnici Jindřich Metelka (1854–1921) – český geograf a školský pracovník Josef Metelka (1912–1979) – český vysokoškolský pedagog, rektor olomoucké univerzity Ladislav Metelka (* 1958) – český klimatolog Tamara Metelka (* 1972) – rakouská herečka Taťána Metelková (* 1972) – česká sportovkyně, běžkyně Věnceslav Metelka (1807–1867) – český houslař a písmák Vojtěch Metelka (1902–1962) – český římskokatolický kněz, děkan v Dobrovici jiné významy Jarka Metelka – literární postava z Rychlých šípů Jaroslava Foglara Reference Česká příjmení"} {"text": "[EN Wikipedia] Lactarius chrysorrheus\n\nLactarius chrysorrheus (sometimes spelt Lactarius chrysorheus) is a member of the genus Lactarius, whose many members are commonly known as milkcaps. It has recently been given the English (common) name of the yellowdrop milkcap. It is pale salmon in color, poisonous, and grows in symbiosis with oak trees. Despite being reported as toxic, its toxicity can be reduced and eliminated by soaking is in brine (REF https://sdelai-lestnicu.ru/griby/gruzd-zolotisto-zeltyj-lactarius-chrysorrheus-foto-i-opisanie). Taxonomy First described by the Swedish father of modern mycology Elias Magnus Fries. The specific epithet is derived from the Ancient Greek words \"golden\", and \"stream\". Common names include yellow milkcap, and yellowdrop milkcap. Description The cap is in diameter. It is pale salmon, or rosy, with darker markings arranged in rough rings, or bands. At first it is convex, but later flattens, and eventually has a small central depression. It is often somewhat lobed at the edge, and is smooth, with a hairless margin. The whitish to pale buff stipe sometimes has a pink flush on the lower half. It is hollow, cylindrical, or with a slightly swollen base. The gills are decurrent, crowded, and have a pinkish buff tinge, giving a spore print that is creamy white, with a slight salmon tinge. They are quite closely spaced initially. The flesh is white and tastes hot, but is coloured by the copious amounts of milk exuded. This milk is initially white, but when exposed to the air turns bright sulphur yellow in five to fifteen seconds. Many Lactarius species are similarly coloured, but not too many exude white milk that turns sulphur yellow. However, those that do include Lactarius maculatipes, and Lactarius croceus which are found with hardwoods in the north eastern United States, and Lactarius vinaceorufescens is locally abundant with both hard and soft woods there too. None of these can be found in Britain; Lactarius decipiens is on the British checklist, but is smaller than L. chrysorrheus, and grows with Hornbeam. Distribution and habitat Lactarius chrysorrheus appears in summer and autumn. It is frequent in the northern temperate zones, Europe, North America, and also North Africa. It is mycorrhizal with oak trees in Britain. Toxicity This mushroom contains toxins, and is considered poisonous (although it has sometimes been listed as edible). In some parts of Russia is consumed after soaking it in cold brine for a few days (however, its bitter taste render it no appetible to everyone - ref: https://sdelai-lestnicu.ru/griby/gruzd-zolotisto-zeltyj-lactarius-chrysorrheus-foto-i-opisanie ). Consumption of the several species of poisonous milkcaps results in predominantly acute gastrointestinal symptoms, which can be severe. The milk is extremely acrid. See also…"} {"instruction": "Create an HTML page to display the employee details.", "input": "Employee Name: Oliver Smith Age: 35 Role: Marketing Executive", "output": " Employee Details

    Employee Details

    Name: Oliver Smith

    Age: 35

    Role: Marketing Executive

    "} {"instruction": "Create a Python program to die arbitary shape black and white using matplotlib", "input": "Not applicable", "output": "import matplotlib.pyplot as plt\n\n# Generating random coordinates\nx = np.random.randint(0,100,100)\ny = np.random.randint(0,100,100)\n\n# Use the coordinates to plot a black and white shape\nplt.scatter(x, y, c='black')\nplt.fill_between(x, y, color='white')\nplt.show()"} {"instruction": "Generate code in Python to convert an infix expression into a postfix expression.", "input": "", "output": "# Function to convert Infix expression to Postfix \ndef infixToPostfix(expression): \n\n# empty list that will store the postfix expression \npostfix = [] \n\n# dictionary containing the precedence value of operators \nprecedence = {'^':3, '*':3, '/':3, '+':2, '-':2, '(':1} \n\n# Stack to store operators \nstack = [] \n\n# Iterate over the expression for conversion \nfor char in expression: \n\n# If an operand is encountered, add it to the list postfix \nif char not in precedence.keys(): \n postfix.append(char) \n\n# If left parenthesis is encountered, push it onto the stack \nelif char == '(': \n stack.append(char) \n\n# If right parenthesis is encountered, pop from the \n# stack, till the corresponding left parenthesis is not found \n# and append all operators to postfix expression \nelif char == ')': \n temp = stack.pop() \n while(temp != '('): \n postfix.append(temp) \n temp = stack.pop() \n\n# If an operator is encountered, check which operator \n# has higher precedence, then pop the higher precedence \n# operator and add it to the postfix expression, then \n# push the lower precedence operator onto the stack \nelse: \n while(len(stack) != 0 and precedence[char] <= precedence[stack[-1]]): \n postfix.append(stack.pop()) \n stack.append(char) \n\n# Pop the remaining operators from the stack and add them \nwhile len(stack) != 0: \n postfix.append(stack.pop()) \n\nreturn \"\".join(postfix)"} {"instruction": "Write a C++ code to generate a random number in the range 0 - 1000.", "input": "", "output": "#include #include //Generating random number int random_number = rand() % 1001; // Print the random number cout << random_number;"} {"text": "[CS Wikipedia] Intimní osvětlení\n\nIntimní osvětlení je český film, natočený v roce 1965 režisérem Ivanem Passerem jako jeho dlouhometrážní debut. Film byl natáčen v reálných interiérech s hrajícími neherci, což mu přineslo velkou míru autentičnosti. Postupně se stal význačným filmem české nové vlny, byl přijat pozitivně domácí i zahraniční odbornou kritikou. Děj ukazuje dva dny běžného života obyčejné rodiny na vesnici, kde žije pospolu několik generací, které staví dům, amatérsky muzicírují a vedou hovory o všem, během kterých rodinu navštíví otcův starý přítel. Tato návštěva dává možnost k bilancování života. Film byl digitálně zrestaurován za podpory Nadace české bijáky. Uveden byl v obnovené premiéře v roce 2015 na MFF v Karlových Varech. Externí odkazy Intimní osvětlení: komika a lyrika banality – text Jiřího Voráče ve formátu PDF Filmy Ivana Passera České filmové komedie České dramatické filmy Československé černobílé filmy Československé filmy Filmy z roku 1965"} {"instruction": "Construct a Python program to find the difference between the maximum and minimum values in a given array of integers.", "input": "[1, 8, 4, 5, 9]", "output": "def diffMaxMin(arr):\n maxVal = arr[0]\n minVal = arr[0]\n \n for num in arr:\n if num > maxVal:\n maxVal = num\n elif num < minVal:\n minVal = num\n \n return maxVal - minVal\n\narr = [1, 8, 4, 5, 9]\nresult = diffMaxMin(arr)\nprint(result)"} {"text": "[CS Wikipedia] Mutaz Essa Baršim\n\nMutaz Essa Baršam (, ; * 24. června 1991 Dauhá) je katarský atlet, jehož specializací je skok do výšky, mistr světa z roku 2017, 2019 a 2022 . Sportovní kariéra Začínal s během a se skokem do dálky. Své nynější disciplíně se věnuje od 15 let. V roce 2009 ho začíná trénovat Polák Stanislaw \"Stanley\" Szczyrba, který kdysi vedl islandskou tyčkařku Valu Flosadóttir či švédského výškaře Linuse Thörnblada. Výrazný progres zaznamenal v roce 2010, kdy si vylepšil osobní rekord o 17 centimetrů až na 231. Na halovém MS 2010, které se konalo v jeho rodném městě nepostoupil z kvalifikace. V letní sezóně nejprve vybojoval zlato na juniorském Mistrovství Asie v Hanoji, poté se stal v kanadském Monctonu juniorským mistrem světa a třetí zlatou medaili získal na Asijských hrách v čínském Kuang-čou. Na Mistrovství světa v atletice 2011 v jihokorejském Tegu obsadil ve finále výkonem 232 cm 7. místo. Stejným výkonem vybojoval Trevor Barry z Baham bronzovou medaili. Výšku však překonal napoprvé. 19. února 2012 na halovém mistrovství Asie v Chang-čou vylepšil kontinentální rekord na 237 centimetrů. Na halovém světovém šampionátu v Istanbulu v témže roce postoupil do finále, kde zdolal 228 cm a podělil se s Němcem Raúlem Spankem o 9. místo. Na Letních olympijských hrách 2012 v Londýně vybojoval výkonem 229 cm bronzovou medaili. Společně s ním bronz získali také Kanaďan Derek Drouin a Robert Grabarz ze Spojeného království. Olympijským vítězem se stal Rus Ivan Uchov, jenž ve finále zdolal 238 cm. V halové sezóně roku 2013 se zúčastnil tzv. Moravské výškařské tour. V prvním závodě v Hustopečích obsadil 2. místo, avšak překonal stejně jako vítěz Ivan Uchov 230 cm. Na Beskydské laťce ve Vendryni u Třince zvítězil výkonem 234 cm a stal se celkovým vítězem tour. Dne 1. června 2013 na mítinku Diamantové ligy v Eugene ve státě Oregon překonal pod širým nebem výšku 240 cm. Naposledy takto vysoko skočil Rus Vjačeslav Voronin 5. srpna 2000 v Londýně. Od roku 2000 se jedná o třetí podobný výkon. 240 cm překonal také další ruský výškař Ivan Uchov, výšku však překonal v roce 2009 v hale. V roce 2014 se stal halovým mistrem světa v skoku do výšky. Na olympiádě v Rio de Janeiro o dva roky později vybojoval stříbrnou medaili. V srpnu 2017 se v Londýně stal mistrem světa v této disciplíně. Při startu na světovém halovém šampionátu v roce 2018 vybojoval stříbrnou medaili. V roce 2014, 2015 a 2027 se stal celkovým vítězem Diamantové ligy ve skoku do výšky. Osobní rekordy hala – 241 cm – 17. února 2015, Athlone (asijský rekord) venku – 243 cm – 5. září 2014, Diamantová liga 2014 Brusel (asijský rekord) Osobní život Má dohromady pět sourozenců, čtyři bratry a jednu sestru. Jeho o tři roky mladší bratr Moamar se rovněž věnuje výšce. Atletice se věnoval také jeho otec, který se specializoval na…"} {"instruction": "Read the given code block and debug it.", "input": "def main(): print(\"Hey I'm here\") if n == 0: print(\"Hey I'm there\") main()", "output": "Error: n is not defined. The given code is trying to use the variable n, which is not declared. To fix this, it should be declared before the if statement. The modified code is as follows: def main(): print(\"Hey I'm here\") n = 0 if n == 0: print(\"Hey I'm there\") main()"} {"text": "[EN Wikipedia] Alaigal (film)\n\nAlaigal () is a 1973 Indian Tamil-language film written, produced and directed by Sridhar. The film, released on 13 January 1973, stars Vishnuvardhan and Chandrakala. It was the first Tamil film of Vishnuvardhan. Plot Cast Vishnuvardhan as Inspector Raju Chandrakala as Lakshmi Cho Manorama as Nalina Dhulipala Selvakumar Thengai Srinivasan Suruli Rajan Rama Rao Typist Gopu Sundari Bai Kumudhini Seethalakshmi Production After the average response to his previous film Avalukendru Or Manam (1971), Sridhar decided to make a Tamil-Telugu bilingual titled Thulasi () with A. V. M. Rajan starring in Tamil and Sobhan Babu in Telugu. Sridhar developed a story from the Hindi film Aadmi (1939) and the American film Waterloo Bridge (1931), retaining only the basic premise. However, after canning , he decided to drop the film, uncertain whether the audience would accept a film with anti-sentimental elements. Sridhar restarted the same film with changes in the script and cast. The title was changed to Alaigal, with Kannada actor Vishnuvardhan in the lead which marked his debut in Tamil cinema. Soundtrack The music was composed by M. S. Viswanathan, while the lyrics were written by Kannadasan. Release and reception Alaigal was released on 13 January 1973. Kumudham called the story ordinary, criticising it for lack of originality. Kalki praised Sridhar for directing a film with a different kind of plot without including any cinematic elements. However the film failed at the box office. References External links 1970s Tamil-language films 1973 films Films directed by C. V. Sridhar Films scored by M. S. Viswanathan Films with screenplays by C. V. Sridhar Indian black-and-white films Indian police films"} {"text": "[CS Wikipedia] Brasil Open 2018\n\nBrasil Open 2018 byl tenisový turnaj pořádaný jako součást mužského okruhu ATP World Tour, který se odehrával v hale Ginásio do Ibirapuera na antukových dvorcích, kam se po dvou letech vrátil z otevřeného areálu Esporte Clube Pinheiros. Probíhal mezi 26. únorem až 4. březnem 2018 v brazilském městě São Paulo jako osmnáctý ročník turnaje. Turnaj s rozpočtem 582 870 dolarů patřil do kategorie ATP World Tour 250. Nejvýše nasazeným v singlové soutěži se stal devatenáctý tenista světa Albert Ramos-Viñolas ze Španělska. Posledním přímým účastníkem v hlavní singlové soutěži se stal portugalský 113. hráč žebříčku Gastão Elias. Šestou singlovou trofej na okruhu ATP Tour vybojoval 30letý Ital Fabio Fognini, jenž všechny tituly vyhrál na antuce. Premiérovou společnou trofej ze čtyřhry si odvezl argentinský pár Federico Delbonis a Máximo González. Rozdělení bodů a finančních odměn Rozdělení bodů Mužská dvouhra Nasazení Jiné formy účasti Následující hráči obdrželi divokou kartu do hlavní soutěže: Thiago Monteiro Corentin Moutet Thiago Seyboth Wild Následující hráči postoupili z kvalifikace: Guilherme Clezar João Domingues Sebastian Ofner Renzo Olivo Odhlášení před začátkem turnaje Cedrik-Marcel Stebe → nahradil jej Gastão Elias Jiří Veselý → nahradil jej Carlos Berlocq Mužská čtyřhra Nasazení Jiné formy účasti Následující páry obdržely divokou kartu do hlavní soutěže: Thomaz Bellucci / André Sá Dorian Descloix / Gaël Monfils Následující pár nastoupil z pozice náhradníka: Pedro Bernardi / Thiago Monteiro Fabrício Neis / Renzo Olivo Odhlášení před začátkem turnaje Nicolás Jarry Gerald Melzer v průběhu turnaje Pablo Cuevas Skrečování Fabrício Neis Přehled finále Mužská dvouhra Fabio Fognini vs. Nicolás Jarry, 1–6, 6–1, 6–4 Mužská čtyřhra Federico Delbonis / Máximo González vs. Wesley Koolhof / Artem Sitak, 6–4, 6–2 Reference Brasil Open Tenis v Brazílii v roce 2018 ATP World Tour 2018"} {"instruction": "Write a SQL query that finds the average of a given table's \"Salary\" column.", "input": "", "output": "SELECT AVG(Salary) FROM Employees;"} {"instruction": "Create a function in Python that takes two strings and combines the characters of each string keeping the order of the characters.", "input": "foo\nbar", "output": "def combine(s1, s2):\n result = \"\" \n for i in range(max(len(s1), len(s2))):\n if i < len(s1):\n result += s1[i]\n if i < len(s2):\n result += s2[i]\n return result"} {"instruction": "Create a Python function to calculate the maximum subarray sum.", "input": "[2, -5, 4, -2, 7, -1]", "output": "def max_subarray_sum(arr):\n # Keep track of the current sum and the maximum sum \n current_sum = 0\n max_sum = float('-inf')\n \n # Iterate over the array and update the current/max sum\n for num in arr:\n current_sum += num\n max_sum = max(max_sum, current_sum)\n current_sum = max(current_sum, 0)\n \n return max_sum\n\nif __name__ == '__main__':\n arr = [2, -5, 4, -2, 7, -1]\n result = max_subarray_sum(arr)\n print(result)"} {"instruction": "Create a class in Java that will print the two integers added together.", "input": "", "output": "public class Addition { public static int add(int x, int y) { return x + y; } public static void main(String[] args) { System.out.println(add(5,7)); } }"} {"instruction": "Convert a Python program to handle multiple input threads simultaneously.", "input": "def function(x): \n\ttime.sleep(1) \n\treturn x * x \n\nfor i in range(5): \n\tx = int(input()) \n\tresult = function(x) \n\tprint(result)", "output": "import threading \nimport time \n\t\ndef function(x): \n\ttime.sleep(1) \n\treturn x * x \n\ndef worker(x, i): \t\n\tresult = function(x) \n\tprint(\"Result of\", i, \"is\", result) \n\n# main \ni = 0\n\nwhile i < 5: \n\tt = threading.Thread(target=worker, args=(int(input()), i)) \n\tprint(\"Started thread\", i) \n\tt.start() \n\ti += 1"} {"instruction": "Write a function in Python that chooses a random element from a list.", "input": "[1, 2, 3, 4, 5]", "output": "import random \n \ndef randomElement(list): \n return random.choice(list) \n\nprint(randomElement([1,2,3,4,5]))"} {"instruction": "Generate an optimized Python code that computes the product of two numbers without using the multiplication operator.", "input": "The numbers are 3 and 7", "output": "def product_without_mul(x, y): \n result = 0\n while (y > 0): \n partial_result = 0\n for i in range(y): \n partial_result += x\n result += partial_result\n y -= 1\n \nreturn result \n\nx = 3\ny = 7\n\nprint(\"Product of two numbers without using \nmultiplication operator is \", product_without_mul(x, y))"} {"text": "[CS Wikipedia] Laura Tamminenová\n\nLaura Tamminenová byla finská rychlobruslařka. Od roku 1933 se pravidelně účastnila finských šampionátů. Při svém premiérovém startu se umístila na druhém místě, o rok později byla třetí. V letech 1935 a 1936 si shodně dobruslila pro druhou příčku. Třetího místa dosáhla v letech 1937 a 1939. Zúčastnila se Mistrovství světa 1939, kde vybojovala bronzovou medaili, což byl její největší úspěch. Téhož roku ukončila svoji sportovní kariéru. Externí odkazy Finské rychlobruslařky Narození ve 20. století Ženy"} {"instruction": "Select all the records from a SQL table where the `name` column contains the value `John`.", "input": "", "output": "SELECT * FROM table_name WHERE `name` LIKE '%John%';"} {"instruction": "Create a Python program to fetch a book from the Open Library API given its ISBN. The program should return the following information about the book: title, author, and description.", "input": "ISBN: 9781400079170", "output": "import requests\n\nISBN = '9781400079170'\nparams = {'bibkeys': ISBN, 'format': 'json', 'jscmd': 'details'}\n\nrequest = requests.get('https://openlibrary.org/api/books', params=params)\ndata = request.json()\n\nbook = data[f'OLID:{ISBN}']\ntitle = book['title']\nauthor = book['authors'][0]['name']\ndescription = book['description'][0]\n\nprint(f'Title: {title}')\nprint(f'Author: {author}')\nprint(f'Description: {description}')"} {"instruction": "Edit the following Python code to re-rank the numbers in descending order.", "input": "numbers = [4, 7, 2, 3]", "output": "numbers = [4, 7, 2, 3]\nnumbers.sort(reverse=True)\nprint(numbers)"} {"instruction": "Create an HTML element, a div with an ID of \"content\".", "input": "", "output": "
    "} {"instruction": "Convert this Python data structure into a valid JSON string.", "input": "data = { \"key1\" : [1,2,3], \"key2\" : { 'subkey1' : True, 'subkey2' : 'Hello World' } }", "output": "json_string = json.dumps(data)"} {"instruction": "Generate all possible strings of length n using A, B and C", "input": "3", "output": "['AAA', 'AAB', 'AAC', 'ABA', 'ABB', 'ABC', 'ACA', 'ACB', 'ACC', 'BAA', 'BAB', 'BAC', 'BBA', 'BBB', 'BBC', 'BCA', 'BCB', 'BCC', 'CAA', 'CAB', 'CAC', 'CBA', 'CBB', 'CBC', 'CCA', 'CCB', 'CCC']"} {"instruction": "Create a SQL query to find the 3 oldest employees in the 'employees' table.", "input": "", "output": "SELECT * FROM employees ORDER BY date_of_birth LIMIT 3;"} {"instruction": "What is a use case for the switch statement in C++?", "input": "", "output": "A switch statement in C++ is used to execute a statement or group of statements for a given value. This is particularly useful when dealing with a large number of cases. The switch statement evaluates an expression and compares the result with different case labels, and executes the code associated with the matching case label."} {"instruction": "Create a function which determines if a given number is a palindrome.", "input": "7337", "output": "def palindrome(num): # convert the number to a string num_str = str(num) # Reverse the string using slicing rev_str = num_str[::-1] # check if the given number is equal to the reversed string if num_str == rev_str: return True else: return False if __name__ == \"__main__\": num = 7337 print(palindrome(num))"} {"instruction": "Write a regular expression that extracts all numbers from the given text.", "input": "Text: \"The total number of students is 50 and the average score is 78 out of 100.\"", "output": "\\d+"} {"instruction": "How many islands of Scotland are there?", "input": "", "output": "There are over 700 islands in Scotland, with approximately 150 of them being inhabited."} {"text": "[EN Wikipedia] Anatol Grinţescu\n\nAnatol Grinţescu (1 August 1939 – 2 June 2014) was a Romanian water polo player. He competed at the 1960 Summer Olympics and the 1964 Summer Olympics. References External links 1939 births 2014 deaths Romanian male water polo players Olympic water polo players for Romania Water polo players at the 1960 Summer Olympics Water polo players at the 1964 Summer Olympics Sportspeople from Chișinău"} {"text": "[DE Wikipedia] Andrea de’ Bartoli\n\nAndrea de’ Bartoli (oder Andrea da Bologna) (* 1349 in Bologna; † 1369) war ein italienischer Maler. Nach Meinung der Kunstkritiker R. Longhi (1934/35) und Francesco Arcangeli (1971) arbeitete Andrea de’ Bartoli im Stil des Vitale da Bologna und war daher vermutlich dessen Schüler. Die ältesten schriftlichen Dokumente zu seinem Leben sind Kontoeinträge aus dem Jahr 1359. Danach hat ihn das Collegio di Spagna in Bologna, das vom päpstlichen Legaten Kardinal Egidio Albornoz (von 1350 bis 1367 im Amt) gegründet worden war, für den Kauf von Pigmenten bezahlt. Im Jahr 1365 malte er im Auftrag von Albornoz’ Nachfolger, Kardinal Androine de Rocha, für zwei Monate den Palast von Galeazzo Visconti in Pavia aus. Dabei wurde er von Jacopino Bavosi und dessen Sohn Pietro Bavosi unterstützt. Im Jahre 1368 erhielt ein Andreas pictor de Bononia (Andrea da Bologna) die große Summe von 450 Florentinern für die Fertigstellung der Fresken in der Seitenkapelle von Albornoz in der Unterkirche der Basilika San Francesco, die der heiligen Katharina von Alexandrien geweiht war. Zusätzlich wurden diesem Maler 10 Florentiner ausbezahlt, um die Grabstätte Albornoz’ in ebendieser Kapelle auszumalen. Es ist naheliegend, diese Fresken dem Hofmaler von Albornoz zuzuschreiben, nämlich Andrea de’ Bartoli, und nicht Andrea dei Bruni, einem anderen Maler, Namensvetter und Zeitgenossen, der ebenfalls aus Bologna stammte. Auch die Fresken einer weiteren Seitenkapelle der gleichen Basilika, die dem heiligen Laurentius geweiht ist, werden Andrea de’ Bartoli zugeschrieben. Sie zeigen fein ausgearbeitete Architekturelemente, Landschaften mit detaillierten Darstellungen von Wäldern, Hecken, Vögeln und jagenden Tieren, die für jene Zeit untypisch sind. Stilistisch werden dem Künstler auch Illustrationen in den Handschriften (Manuskripten) seines Bruders Bartolomeo de’ Bartoli zugeordnet, der der berühmteste und bestbezahlte Schreiber im Bologna seiner Zeit war. Literatur Meissner, Günther (Hrsg.): Allgemeines Künstlerlexikon. Die Bildenden Künstler aller Zeiten und Völker, Band 3 (Alvarez-Angelin), K.G.Saur, München, Leipzig, 1992. S. 510–511, ISBN 3598227434 Maler (Italien) Mann Geboren 1349 Gestorben 1369 Künstler (Bologna)"} {"instruction": "Write a Python program to fliter a list of strings and return a new list containing only the strings containing the letter 'a'.", "input": "['ant', 'bar', 'cat', 'dog', 'eel']", "output": "list_strings = ['ant', 'bar', 'cat', 'dog', 'eel']\n\n# using list comprehension\nfiltered_list = [x for x in list_strings if 'a' in x]\n \nprint(filtered_list)\n# output: ['ant', 'bar', 'cat']"} {"instruction": "Create a matrix in R and fill it with random numbers.", "input": "Size: 4 x 5", "output": "matrix2 <- matrix(runif(n = 20, min = 0, max = 10), nrow = 4, ncol = 5)"} {"instruction": "Create a randomized password of 10 characters.", "input": "", "output": "F8a_3q4*f2"} {"text": "[DE Wikipedia] Kurt von Buchau\n\nFreiherr Hans Kurt Wilhelm Prinz von Buchau (* 25. April 1863 in Neisse; † 29. Mai 1918 bei Cierges, Frankreich) war ein preußischer Generalmajor. Leben Herkunft Kurt entstammte dem 2. Ast (Nieder-Kühschmalz) der I. Linie des Adelsgeschlechts Prinz von Buchau. Er war der jüngste Sohn des preußischen Oberst Theodor Freiherr Prinz von Buchau (1811–1871) und dessen Ehefrau Ernestine, geborene Koschny (1827–1907). Militärkarriere Aus dem Kadettenkorps kommend, wurde Prinz von Buchau am 16. April 1881 als charakterisierter Portepeefähnrich dem 4. Niederschlesischen Infanterie-Regiment Nr. 51 der Preußischen Armee überwiesen und avancierte bis Mitte September 1882 zum Sekondeleutnant. Zum 1. April 1887 folgte seine Versetzung in das neuerrichtete Infanterie-Regiment Nr. 138 nach Straßburg. Dort war er ab Januar 1889 Adjutant des III. Bataillons, rückte Ende März 1891 zum Premierleutnant auf und fungierte vom 3. Oktober 1892 bis zum 13. November 1895 als Regimentsadjutant. Anschließend wurde Prinz von Buchau als Adjutant der 37. Infanterie-Brigade nach Oldenburg kommandiert und mit der Beförderung zum Hauptmann am 19. März 1896 unter Belassung in seinem Kommando in das 2. Hannoversche Infanterie-Regiment Nr. 77 versetzt. Mit der Ernennung zum Kompaniechef im Grenadier-Regiment „Kronprinz Friedrich Wilhelm“ (2. Schlesisches) Nr. 11 kehrte er am 27. Januar 1898 in den Truppendienst zurück. Als Major war Prinz von Buchau vom 22. April 1905 bis zum 17. Oktober 1908 Adjutant beim Generalkommando des VI. Armee-Korps in Breslau und wurde anschließend Kommandeur des I. Bataillons im Colbergschen Grenadier-Regiment „Graf Gneisenau“ (2. Pommersches) Nr. 9 in Stargard. Am 22. April 1912 folgten seine Beförderung zum Oberstleutnant und Versetzung zum Stab des 7. Thüringischen Infanterie-Regiments Nr. 96 in Gera. Zugleich war er im Herbst 1913 kurzzeitig als Führer des 1. Reserve-Infanterie-Regiments im Bereich des XI. Armee-Korps kommandiert. Am 4. April 1914 beauftragte man Prinz von Buchau zunächst mit der Führung des Infanterie-Regiments „Großherzog Friedrich Franz II. von Mecklenburg-Schwerin“ (4. Brandenburgisches) Nr. 24 und ernannte ihn Ende des Monats unter Beförderung zum Oberst zum Regimentskommandeur. In dieser Eigenschaft marschierte Prinz von Buchau nach Ausbruch des Ersten Weltkriegs im Verbund mit der 6. Infanterie-Division in das neutrale Belgien ein und nahm an den Schlachten bei Mons und Frameries teil. Es folgten Kämpfe in Frankreich an der Marne und der Aisne. Von Ende Januar bis Anfang März 1915 führte er zugleich die 33. Reserve-Infanterie-Brigade und war mit seinem Regiment in die Frühjahrsschlacht bei La-Bassée und Arras eingebunden. Im Herbst wurde Prinz von Buchaus Verband auf den Balkan verlegt, um sich hier am Feldzug gegen Serbien zu…"} {"instruction": "Create a k-means clustering algorithm in Python to cluster a given dataset.", "input": "", "output": "from sklearn.cluster import KMeans\n\ndef k_means_clustering(data, num_clusters):\n kmeans = KMeans(n_clusters=num_clusters, random_state=0).fit(data)\n labels = kmeans.labels_\n return labels"} {"text": "[HI Wikipedia] कश्मीर\n\nकाश्मीर (कश्मीरी : (नस्तालीक़), कऺशीर (देवनागरी)) जम्मू - कश्मीर का उत्तरी भौगोलिक क्षेत्र है। 1846 में, पहले एंग्लो-सिख युद्ध में सिख की हार के बाद, और अमृतसर की सन्धि के तहत ब्रिटिश से क्षेत्र की खरीद पर, जम्मू के राजा, गुलाब सिंह, कश्मीर के नए शासक बने। उनके वंशजों का शासन, ब्रिटिश क्राउन की सर्वोपरि (अधिराजस्व) के तहत हुआ जो 1947 में भारत के विभाजन तक चला। ब्रिटिश भारतीय साम्राज्य की पूर्व रियासत अब एक विवादित क्षेत्र बन गया, जिसे अब तीन देशों द्वारा प्रशासित किया जाता है: भारत, पाकिस्तान और चीन। कश्मीर का नाम और व्युत्पत्ति सप्तर्षि महर्षि कश्यप से जुड़ा है। कश्मीर एक मुस्लिमबहुल क्षेत्र है। व्युत्पत्ति निलामाता पुराण घाटी के जल से उत्पत्ति का वर्णन करता है, एक प्रमुख भू-भूवैज्ञानिकों द्वारा पुष्टि की गई तथ्य, और यह दर्शाता है कि जमीन का नाम कितना परिशोध की प्रक्रिया से लिया गया था - का का मतलब है \"पानी\" और शमीर का मतलब है \"शुष्क करना\"। इसलिए, कश्मीर \"पानी से निकलने वाला देश\" के लिए खड़ा है एक सिद्धान्त भी है जो कश्मीर को कश्यप-मीरा या कश्यमिरम या कश्यममरू, \"कश्यप के समुद्र या पर्वत\" का संकुचन लेता है, ऋषि जो प्राच्य झील सट्सार के पानी से निकलने के लिए श्रेय दिया जाता है, कि कश्मीर से पहले इसे पुनः प्राप्त किया गया था। निलामाता पुराण काश्मीरा (कश्मीर घाटी में वालर झील मीरा \"का नाम देता है जिसका अर्थ है कि समुद्र झील या ऋषि कश्यप का पहाड़।\" संस्कृत में 'मीरा' का अर्थ है महासागर या सीमा, इसे उमा के अवतार के रूप में मानते हुए और यह कश्मीर है जिसे आज विश्व को पता है। हालाँकि, कश्मीरियों ने इसे 'काशीर' कहते हैं, जो कश्मीर से ध्वन्यात्मक रूप से प्राप्त हुए हैं। प्राचीन यूनानियों ने इसे ' कश्पापा-पुर्का, जो कि हेकाटेयस के कस्पेरियोस (बायज़ांटियम के एपड स्टेफेनस) और हेरोडोटस के कस्तुतिरोस (3.102, 4.44) से पहचाने गए हैं। कश्मीर भी टॉलेमी के कस्पीरीया के द्वारा देश माना जाता है। कश्मीरी वर्तमान-कश्मीर की एक प्राचीन वर्तनी है, और कुछ देशों में यह अभी भी इस तरह की वर्तनी है। सेमीट जनजाति का एक गोत्र 'काश' (जिसका अर्थ है देशी में एक गहरा स्लेश माना जाता है कि यह कशान और कशगर के शहरों की स्थापना कर रहा है, कश्यपी जनजाति से कैस्पियन से भ्रमित नहीं होना चाहिए। भूमि और लोगों को 'काशीर' के नाम से जाना जाता था, जिसमें से 'कश्मीर' भी उसमें से प्राप्त किया गया था। इसे प्राचीन ग्रीस के प्राचीन ग्रीक कास्पीरिया कहा जाता है शास्त्रीय साहित्य में हेरोडोटस इसे \"कस्पातिरोल\" कहते हैं जुआनज़ांग, चीन - चीनी भिक्षु ने 631 एडी को कश्मीर का दौरा किया यह क्या-शि-मी-लो तिब्बत एह ने इसे खाचा कहा, जिसका अर्थ है \"बर्फ वाई पहाड़\" यह है और नदी, झील और वन्य फ्लावर एस की भूमि रही है। झेलम नदी घाटी की पूरी लम्बाई चलाती है इतिहास बुर्ज़होम पुरातात्विक स्थल (श्रीनगर के उत्तरपश्चिम में 16 किलोमीटर (9.9 मील) स्थित) में पुरातात्विक उत्खनन ने 3,000 ईसा पूर्व और 1,000 ईसा पूर्व के बीच सांस्कृतिक महत्त्व के चार चरणों का खुलासा किया है। अवधि I और II नवपाषाण युग का प्रतिनिधित्व करते हैं; अवधि ईएलआई मेगालिथिक युग (बड़े पैमाने पर पत्थर के मेन्शर और पहिया लाल मिट्टी के बर्तनों में बदल गया); और अवधि…"} {"instruction": "Create a function in Python that takes a string as an argument and capitalizes the first letter of each word.", "input": "String s = \"hello world\"", "output": "def capitalize(s):\n return ' '.join(w.capitalize() for w in s.split())"} {"instruction": "Create a function in Python that takes two dates as parameters and calculates the number of days between them.", "input": "", "output": "def date_difference(date1, date2):\n diff = date2 - date1\n return diff.days"} {"instruction": "Design a SQL query to retrieve data from multiple tables.", "input": "", "output": "SELECT t1.col1, t1.col2, t2.col1, t2.col2 FROM table1 t1 INNER JOIN table2 t2 ON t1.col1 = t2.col1"} {"text": "[HI Wikipedia] हैमिल्टन, न्यूज़ीलैण्ड\n\nहैमिल्टन न्यूज़ीलैण्ड के चौथे सबसे बड़े नगरीय क्षेत्र हैमिल्टन नगरीय क्षेत्र के केंद्र में स्थित है। हैमिल्टन शहर देश का चौथा सबसे बड़ा प्रादेशिक प्राधिकरण है। यह उत्तर द्वीप के वाइकाटो क्षेत्र में है, ऑक्लैण्ड से लगभग 130 किलोमीटर (80 मील) दक्षिण में। शुरुआत में यह कृषि सेवा केन्द्र था, परन्तु अब इसकी विविध और बढ़ती हुई अर्थव्यवस्था है और यह सम्पूर्ण न्यूज़ीलैण्ड में दूसरा सबसे तेजी से उन्नति करता नगरीय क्षेत्र है। शिक्षा और अनुसंधान एवं विकास हैमिल्टन की अर्थव्यवस्था का महत्वपूर्ण हिस्सा है। इन्हें भी देखें वाइकाटो क्षेत्र उत्तर द्वीप सन्दर्भ न्यूज़ीलैण्ड के आबाद स्थान वाइकाटो क्षेत्र"} {"text": "[DE Wikipedia] Flinderskette\n\nDie Flinderskette () ist ein Gebirgszug im Norden des australischen Bundesstaates South Australia (Südaustralien), der sich fast 500 km in nordsüdliche Richtung erstreckt. In dieser Region liegen drei Nationalparks: Mount-Remarkable-Nationalpark im Süden, den Vulkathunha-Gammon-Ranges-Nationalpark im Norden und im Zentrum ist die Flinderskette namensgebend für den Ikara-Flinderskette-Nationalpark (engl. Ikara-Flinders Ranges National Park), ein 912 km² großes Naturschutzgebiet. Die Flinders Ranges haben ihren Namen nach Captain Matthew Flinders (1774 - 1814), der in Lincolnshire geboren wurde. Der Britischen Marine trat er 1789 bei. Unter Captain Bligh erreichte er 1795 Sydeney. Von 1801 bis 1803 umrundete er Australien und hat die Küstenlinien kartographiert. 1810 kam er nach England zurück, wo er kurz nach der Veröffentlichung seines Buches über Australien verstarb. Seine Gebeine waren zuerst verschollen wurden jedoch 2019 in London gefunden. Geologie und Landschaft Geologisch besteht die Kette aus Gesteinen des Präkambriums, die ein Alter von bis zu einer Milliarde Jahren haben. Geologische Untersuchungen wurden vom australischen Geologen und Polarforscher Sir Douglas Mawson geleitet. Sie erbrachten Hinweise darauf, dass auch Australien im Präkambrium von einer Eiszeit betroffen war, die vielleicht den gesamten Erdball erfasst hatte (Schneeball Erde). Die Ediacara-Hügel sind eine bedeutende Fundstätte präkambrischer Fossilien, der Ediacara-Fauna. Wichtige Erhebungen sind der Devil’s Peak, Mount Remarkable und St. Mary’s Peak. Die Landschaft ist durch schroffe Mittelgebirgskämme, tiefe Schluchten und sonnenverbrannte Talflächen gekennzeichnet. Die Flinders Ranges gelten als riesiges natürliches Amphitheater. Leicht zu besteigen ist der Mt. Ohlssen Bagge. Der St. Mary Peak mit 1435 m gilt als heiliger Berg und heißt Ngarri Mudlanha, für die Besteigung braucht man einen Tag. Rawnsley Bluff und Pugilist Hill Lookout sind neben Mt. Chambers Gorge weitere Erhebungen. Der Mt. Emily ist mit 707 m die höchste Erhebung der Great Wall of China in SA. Im Mt. Remarkable-Nationalpark sind zu erwandern der Mt. Remarkable, Hancock's Lookout und Alligator Gorge. Flora und Fauna Für die Flora des Parks ist der Rote Eukalyptus typisch. Die gesamte Pflanzenwelt hat sich hervorragend an die unregelmäßigen Regenfälle in der Region angepasst. Die inneren Wände des Wilpena Pound sind mit üppiger Vegetation ausgestattet, die sonst eher im Süden vorkommt. Die geschützte Lage und das mildere Klima machen dies möglich. 33 von 93 in Südaustralien vorkommenden Akazienarten gedeihen in den Flinders Ranges. In den südlichen Flinders ist die Vegetation üppiger, denn die relativ hohen Niederschlagsmengen und das abwechslungsreiche Gelände bescheren der Region eine Pflanzenwelt,…"} {"instruction": "What is the significance of include guard in C++?", "input": "", "output": "Include guards are used to prevent multiple declarations of the same header file. They are typically used to ensure that a header file is included only once in a project. This helps to avoid potential conflicts between different declarations of the same header file in different places."} {"text": "[DE Wikipedia] Lars Charbonnier\n\nLars Charbonnier (* 21. November 1977 in Uelzen) ist ein deutscher evangelischer Theologe. Leben Nach seinem Studium der Evangelischen Theologie und Soziologie in Bethel, Heidelberg, Nijmegen (NL) und Berlin arbeitete er von 2006 bis 2014 als Wissenschaftlicher Assistent am Lehrstuhl für Praktische Theologie der Humboldt-Universität zu Berlin mit den Schwerpunkten Homiletik, Kybernetik und Religionssoziologie bei Wilhelm Gräb. Er wurde in dieser Zeit zweimal mit dem Lehrpreis der Theologischen Fakultät ausgezeichnet. Von 2005 bis 2008 leitete er außerdem das Projekt „Diakonie-Atlas“ im Rahmen des Religionsunterrichts der Evangelischen Kirche Berlin-Brandenburg-schlesische Oberlausitz (EKBO). Seine 2012 mit „summa cum laude“ bewertete Dissertation über Religion im Alter. Eine empirische Studie zur Erforschung religiöser Kommunikation wurde mit dem Hans-Werner-Surkau-Preis des Fachgebiets Praktische Theologie der Philipps-Universität Marburg sowie dem Willi-Abts-Preis der Albert und Loni Simon Stiftung Mainz ausgezeichnet. Von 2013 bis 2021 war er Mitglied und von 2018 bis 2021 Schriftleiter der Redaktion der Zeitschrift Praxis Gemeindepädagogik. Von 2011 bis 2013 war er berufsbegleitend Vikar an der St.-Nikolai-Gemeinde in Berlin-Spandau. Nach der Ordination arbeitete er seit 2014 als Studienleiter an der Führungsakademie für Kirche und Diakonie in Berlin und zeitgleich von 2014 bis 2017 als Pfarrer im Probedienst in der Christophorusgemeinde in Berlin-Friedrichshagen. Seit dem 1. Januar 2022 ist er Geschäftsführer der Akademien für Kirche und Diakonie gGmbH mit den Marken Bundesakademie für Kirche und Diakonie (bakd), Führungsakademie für Kirche und Diakonie (fakd) sowie dem Akademiehotel samt Tagungshaus in Berlin-Pankow. Charbonnier ist zertifizierter Coach (GwG), CAI-Online Coach sowie systemischer Berater (IWSP) und als Gemeindeberater in der Evangelischen Kirche Berlin-Brandenburg-schlesische Oberlausitz (EKBO) tätig. Er lebt mit seiner Familie in Berlin. Veröffentlichungen (Auswahl) Religion im Alter. Eine empirische Studie zur Erforschung religiöser Kommunikation. (=Praktische Theologie im Wissenschaftsdiskurs 14), Berlin/Boston 2014 mit Dietrich Korsch (Hrsg.): Der verborgene Sinn. Religiöse Dimensionen im Alltag: Göttingen 2008 mit Wilhelm Gräb (Hrsg.): Individualisierung – Spiritualität – Religion. Transformationsprozesse auf dem religiösen Feld in interdisziplinärer Perspektive. Münster 2008 mit Wilhelm Gräb (Hrsg.): Secularization Theories, Religious Identities and Practical Theology. Developing International Practical Theology for the 21st Century. International Academy of Practical Theology Berlin 2007, Zürich/Berlin/Münster 2009 mit Wilhelm Gräb: Individualität. Genese und Konzeption einer Leitkategorie humaner Selbstdeutung. Berlin…"} {"instruction": "Write a predicate function to check whether the given string is palindrome.", "input": "", "output": "function isPalindrome(str) { str = str.toLowerCase(); for (let i = 0; i < str.length / 2; i++) { if (str[i] !== str[str.length - 1 - i]) return false; } return true; }"} {"instruction": "How would you design the data structure to store and process results from a 5-choice multiple choice test.", "input": "", "output": "class TestResults { // A map containing the question id as key and the selected answer as value Map answers; // A map containing the question id as key and a boolean indicating whether the answer was correct or not as value Map scores; // A map containing the question id as key and a list of all the possible answers as value Map> questions; public TestResults(Map answers, Map scores, Map> questions) { this.answers = answers; this.scores = scores; this.questions = questions; } public Map getAnswers() { return answers; } public Map getScores() { return scores; } public Map> getQuestions() { return questions; } }"} {"instruction": "Design a python program to generate a binary tree", "input": "", "output": "class Node:\n def __init__(self, data):\n self.data = data\n self.left = None\n self.right = None\n\nclass BinaryTree:\n def __init__(self):\n self.root = None\n\n def insert(self, data):\n new_node = Node(data)\n if self.root is None:\n self.root = new_node\n else:\n current = self.root\n while current is not None:\n if data < current.data:\n if current.left is None:\n current.left = new_node\n break\n else:\n current = current.left\n elif data > current.data:\n if current.right is None:\n current.right = new_node\n break\n else:\n current = current.right"} {"instruction": "Parse the following HTML code to get all the hyperlinks in the page.", "input": "About Products", "output": "import re html_code = ''' About Products ''' links = re.findall(r'href=\"(.*?)\"', html_code) print(links) # Output: ['https://example.com/about', 'https://example.com/products']"} {"instruction": "Create a basic program to demonstrate a conditional statement", "input": "", "output": "num = int(input(\"Please enter a number: \")) if (num % 2) == 0: print(\"The number is even\") else: print(\"The number is odd\")"} {"instruction": "Wrap the given text in a tag.", "input": "Hello World", "output": "

    Hello World

    "} {"text": "[HI Wikipedia] मंगल के चतुष्कोणों की सूची\n\nमंगल ग्रह के भूपृष्ठ को संयुक्त राज्य भूगर्भ सर्वेक्षण द्वारा 30 चतुष्कोणों में विभाजित किया गया है, ऐसा नाम इसलिए क्योंकि उनकी सीमाएं अक्षांश और देशांतर रेखाओं के साथ-साथ स्थित है, इसलिए नक्शे आयताकार दिखाई देते हैं। मंगल चतुष्कोणों के नाम स्थानीय भूआकृतियों पर रखे गए है, और \"मार्स चार्ट\" के लिए उपसर्ग \"MC\" के साथ क्रमांकित है। पश्चिम देशांतर का प्रयोग किया जाता है। चतुष्कोणों के मानचित्र मंगल ग्रह के निम्न छवि-नक्शे आपस मे सटे 30 चतुष्कोणों में विभाजित है। चतुष्कोण पर क्लिक करें और आप इसी लेख के पृष्ठों पर ले जाए जाएंगे। उत्तर दिशा शीर्ष पर है, भूमध्य रेखा के एकदम बांये है। नक्शों की तस्वीरें मार्स ग्लोबल सर्वेयर द्वारा ली गई थी। चतुष्कोणों की सूची सन्दर्भ खगोलशास्त्र मंगल ग्रह"} {"instruction": "Calculate the total surface area of a rectangular prism with length 10 cm, width 8 cm, and height 5 cm.", "input": "", "output": "Total surface area of a rectangular prism = 2(lw + lh + wh) = 2(10 x 8 + 10 x 5 + 8 x 5) = 2(80 + 50 + 40) = 220 cm2"} {"instruction": "Implement a basic version control system in Python that keeps track of changes in the code.", "input": "", "output": "class VersionControl:\n def __init__(self, lines):\n self.lines = lines\n self.mark = 0\n \n def commit(self):\n self.mark += 1\n log_file = open(\"log_file.txt\", \"a+\")\n log_file.write(str(self.mark) + \": \" + str(self.lines))\n log_file.close()\n \n def restore(self):\n log_file = open(\"log_file.txt\", \"r\")\n lines = log_file.readlines()\n to_mark = self.mark-1\n \n self.lines = lines[to_mark]\n log_file.close()"} {"instruction": "Create a Python function to remove all the characters of a specified string that appear more than once.", "input": "", "output": "def remove_duplicates(string):\n result = \"\"\n for char in string:\n if string.count(char) == 1:\n result += char\n return result"} {"instruction": "Write a SQL query to find all students who have a GPA greater than 3.0", "input": "", "output": "SELECT * FROM students WHERE GPA > 3.0"} {"text": "[HI Wikipedia] निकोलो द कोंटी\n\nनिकोलो दे कोंटी (1395-1474) एक इतालवी देशाटक और अन्वेषी था जो मध्य युग में मुस्लिम व्यापारी के वेष में इटली से लेकर भारत, दक्षिण-पूर्व एशिया और संभवतः चीन तक का भ्रमण किया। ध्यान रहे कि इन देशों और इटली के बीच उस समय मुस्लिम शासकों का राज था (और आज भी है) और ईसाईयों का इस प्रदेश से होकर गुजरना बहुत मुश्किल था। भारत और पूर्व के अन्य देशों की खोज में इस भ्रमण का बहुत योगदान था। उस समय के चीन नौवाहक कप्तान जांग जे ने भी भारत की नौयात्रा की थी। दोनों के दिए विवरण मेल खाते हैं। इटली का यात्री निकोलो कांटी विजयनगर की यात्रा पर देवराय प्रथम के शासनकाल में आया। इसने दास प्रथा के बारे में विस्तृत विवरण किया है। यूरोपीय अन्वेषक इस में बुक का नाम डाले और इस में में सुधार करे जल्दी से जल्दी"} {"instruction": "Re-structure the following code so that it can be written using a for loop in Python.", "input": "i = 1\nwhile i < 5:\n print(i)\n i += 1", "output": "for i in range(1, 5):\n print(i)"} {"instruction": "Produce an algorithm to reverse the elements of an array.", "input": "Array: [1, 2, 3, 4, 5]", "output": "Algorithm: // Step 1: Set two pointers, start and end initially pointing to 0 and the last element respectively. start = 0; end = arr.length - 1; // Step 2: Swap the elements at pointer start and end. swap(arr[start], arr[end]); // Step 3: Increment start pointer and decrement end pointer. start++; end--; // Step 4: Repeat steps 2 and 3 until start and end pointers cross each other. while (start < end) { swap(arr[start], arr[end]); start++; end--; }"} {"text": "[CS Wikipedia] Boeing C-137 Stratoliner\n\nBoeing C-137 Stratoliner je VIP transportní letoun odvozený z dopravního letounu Boeing 707, používaný americkým letectvem. Ostatní státy také pořídily jak nové, tak i použité Boeingy 707 pro vojenskou službu, především jako VIP letouny nebo létající cisterny. Navíc model 707 posloužil jako základ pro několik specializovaných verzí, jako je např. letadlo včasné výstrahy E-3 Sentry. Verze VC-137C Stratoliner byla mezi lety 1967 a 2001 používána jako stroj Air Force One. Označení C-18 zahrnuje několik pozdějších variant založených na sérii 707-320B/C. Uživatelé Brazilské letectvo Íránské vojenské letectvo Letectvo Spojených států amerických Specifikace (VC-137C) Technické údaje Posádka: 2 piloti Délka: 46,61 m Výška: 12,93 m Rozpětí: 44,42 m Plocha křídel: 279,63 m² Hmotnost prázdného stroje: 44 663 kg Vzletová hmotnost: 135 000 kg Maximální vzletová hmotnost: 148 352 kg Pohonné jednotky: 4× dvouproudový motor Pratt & Whitney TF-33-PW-102-P-7 každý o tahu 80 kN Výkony Maximální rychlost: 1009 km/h Cestovní rychlost: 966 km/h Dolet: 12 247 km Dostup: 15 200 m Počáteční stoupavost: 1 490 m/min Externí odkazy Americká transportní letadla C-137"} {"instruction": "Implement a solution to mark the middle element in a singly linked list in Python.", "input": "Not applicable", "output": "class Node:\n def __init__(self, data):\n self.data = data\n self.next = None\n\nclass SinglyLinkedList:\n def __init__(self):\n self.head = None\n self.tail = None\n self.middle = None\n\n def addNode(self, node):\n if self.head is None:\n self.head = node\n self.tail = node\n self.middle = node\n else:\n self.tail.next = node\n self.tail = node\n # To mark the middle node\n if self.head.next is self.middle:\n self.middle = node\n\n def mark_middle(self):\n if self.middle is None:\n return\n self.middle.data = 'Middle Node'"} {"text": "[EN Wikipedia] List of Liverpool Docks\n\nTable of docks (past and present) in the Port of Liverpool, Liverpool, England. The table can be sorted on each of its columns by clicking the small box in the header. The sequence runs from North (N01) to South (S19). (Using references: .) References External links Port of Liverpool Official Website Liverpool North Docks Diagram, archived from the original on 30 March 2007. (retrieved 20 February 2015) Liverpool South Docks Diagram, archived from the original on 30 March 2007. (retrieved 20 February 2015) Docks Liverpool docks"} {"instruction": "So you need to design a class for a Linked List.", "input": "", "output": "class ListNode: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def is_empty(self): return self.head == None # Other method implementations go here"} {"instruction": "Write a function to convert a Roman numeral to an integer.", "input": "", "output": "def roman_to_integer(numeral): romans = {\"I\": 1, \"V\": 5, \"X\": 10, \"L\": 50, \"C\": 100, \"D\": 500, \"M\": 1000 } num = 0 i = 0 while i < len(numeral): if i+1 < len(numeral): if romans[numeral[i]] >= romans[numeral[i+1]]: num = num + romans[numeral[i]] else : num = num + romans[numeral[i+1]] - romans[numeral[i]] i+=1 else: num = num + romans[numeral[i]] i+=1 return num"} {"text": "[DE Wikipedia] Hase (Mondkrater)\n\nHase ist ein Einschlagkrater im Osten der Mondvorderseite, südöstlich des Mare Fecunditatis, südlich des Kraters Petavius und östlich von Snellius. Der stark erodierte Krater wird in seinem südlichen Teil von dem großen Nebenkrater Hase D überlagert. Beginnend südlich von Hase verläuft das Mondrillensystem der Rimae Hase vom Krater aus in südöstlicher Richtung. Der Krater wurde 1935 von der IAU nach dem deutschen Mathematiker Johann Matthias Hase offiziell benannt. Weblinks Hase auf The-Moon Wiki Einzelnachweise Einschlagkrater (Mond)"} {"text": "[DE Wikipedia] Liste der Monuments historiques in Mathons\n\nDie Liste der Monuments historiques in Mathons führt die Monuments historiques in der französischen Gemeinde Mathons auf. Liste der Immobilien |} Liste der Objekte |} Weblinks Mathons Mathons !"} {"instruction": "Construct a program to parse a JSON array.", "input": "[{\"name\":\"John\", \"age\":30},{\"name\":\"Alice\", \"age\":25}]", "output": "import json data = [{\"name\":\"John\", \"age\":30},{\"name\":\"Alice\", \"age\":25}] for entry in data: name = entry['name'] age = entry['age'] print(f'The name is {name} and age is {age}')"} {"instruction": "Using HTML and CSS, create a web page that lists all of the fruits in the given array.", "input": "fruits = [\"apple\", \"orange\", \"banana\", \"pear\", \"mango\"]", "output": " Fruit List
    • Apple
    • Orange
    • Banana
    • Pear
    • Mango
    "} {"text": "[DE Wikipedia] John Kirkbride\n\nJohn Kirkbride ist der Name folgender Personen: * John Kirkbride (Musiker) (* 1946), britischer Sänger, Gitarrist und Songwriter John Kirkbride (Leichtathlet) (* 1947), britischer Mittelstreckenläufer"} {"text": "[HI Wikipedia] किशोरी आमोनकर\n\nकिशोरी आमोनकर (जन्म: 10 अप्रैल, 1931) (मृत्यु :3 अप्रेल 2017 - 84 वर्ष) हिंदुस्तानी संगीत की विख्यात गायिका थीं जिनका सम्बन्ध अतरौली जयपुर घराने से हैं। इनकी माता श्रीमती मोगुबाई कुर्डीकर भी इसी घराने की मशहूर शास्त्रीय गायिका थीं।। इनको[पद्म विभूषण]] से सम्मनित किया गया है। सन्दर्भ बाहरी कड़ियाँ किशोरी अमोनकर के शास्त्रीय संगीत में भारतीय संस्कृति की आत्मा बसती थी श्रीमती आमोनकर के गाने के कई नमूने यहाँ उपलब्ध हैं- हिन्दुस्तानी संगीत पद्म भूषण सम्मान प्राप्तकर्ता 1932 में जन्मे लोग २०१७ में निधन पद्म विभूषण धारक भारतीय शास्त्रीय गायिका"} {"instruction": "Create a HTML page to display information about a group of users.", "input": "User details: John – Age: 24, Profession: Developer Mark – Age: 26, Profession: Designer", "output": "

    User Details

    John – Age: 24, Profession: Developer

    Mark – Age: 26, Profession: Designer

    "} {"instruction": "Create a web page using HTML and CSS where the font size of the content increases with the screen size.", "input": "", "output": "

    My Title

    "} {"instruction": "Create a function to scale a number by the given factor.", "input": "factor = 0.5", "output": "def scale_value(x, factor): '''This function will scale the given number by the given factor.''' return x * factor"} {"text": "[DE Wikipedia] La Reina del Sur\n\nLa Reina del Sur steht für: La Reina del Sur (dt. Königin des Südens (Roman)), spanischer Roman (2002) von Arturo Pérez-Reverte La Reina del Sur, Album (2002) von Los Tigres del Norte La Reina del Sur (Telenovela) (2011) Siehe auch: Queen of the South Queen of the South (Fernsehserie) Königin des Südens"} {"text": "[DE Wikipedia] Johann Adam Hoffmann\n\nJohann Adam Hoffmann (* 7. Mai 1707 in Schönfeld, Fürstentum Schwarzburg; † 7. Januar 1781 in Herborn) war ein deutscher Mediziner und Botaniker. Leben Johann Adam Hoffmann war der Sohn eines in Schönfeld im Schwarzburgischen tätigen Apothekers, dem er den ersten Unterricht verdankte. Seine spätere Bildung erwarb er im Seminar von Erlangen und der Lateinschule in Heidelberg. In der letztgenannten Stadt begann er auch seine akademische Laufbahn. Aus Neigung zur Naturgeschichte widmete er sich der Medizin, verband jedoch mit diesem Studium Philosophie und Geschichte. Durch seine unter Wilhelm Bernhard Nebels Vorsitz verteidigte Inauguraldissertation De corticis peruviani modo operandi erwarb er sich 1740 die medizinische Doktorwürde. Der ebengenannte Gelehrte erweiterte und berichtigte seine Kenntnisse vor allem dadurch, dass er ihm seine treffliche Bibliothek zur Verfügung stellte. Nebel weckte auch sein großes Interesse an der Botanik. Aus Heidelberg begab sich Hoffmann nach Würzburg, wo er sich besonders mit anatomischen Studien beschäftigte. In Heidelberg, wohin er wieder zurückkehrte, zeigte er sich als geschickter praktischer Arzt durch mehrere geglückte Kuren. 1743 folgte er einem Ruf des Markgrafen Friedrich von Brandenburg nach Erlangen. Er wurde an der dortigen Universität fünfter ordentlicher Professor der Medizin, ging aber bereits 1747 in gleicher Eigenschaft und als Landphysikus nach Herborn und eröffnete seine dortige Stelle mit der Antrittsrede De usu et virtute aquae simplicis. Gelegenheit, seine Welt- und Menschenkenntnis zu erweitern, bot sich ihm 1748 auf einer Reise nach Holland, die auch durch die angeknüpfte Bekanntschaft mit Gaub, Schultens und anderen Gelehrten seinen Bildungsgrad erhöhte. Er studierte in den Niederlanden Chirurgie, Augenheilkunde sowie Geburtshilfe, besuchte die Botanischen Gärten in Leiden und Amsterdam und nahm Samen von ausländischen Gewächsen mit, die er später in den durch ihn neu angelegten Botanischen Garten in Herborn verpflanzte. Während seiner über 30-jährigen Lehrtätigkeit an der Hohen Schule in Herborn hielt er u. a. Vorlesungen über allgemeine und spezielle Pathologie, Physiologie, Botanik, forensische Medizin und Geburtshilfe. Mit seinen Studenten führte er botanische Exkursionen durch. Als er am 7. Januar 1781 im Alter von 73 Jahren in Herborn starb, hinterließ er ein reiches Naturalienkabinett. Als praktischer Arzt fand er wenig Muße zu schriftstellerischen Arbeiten, doch verfasste er die Abhandlung De salubritate aquae fontanae (Herborn 1752). Literatur Heinrich Döring: Hoffmann (Johann Adam). In: Johann Samuel Ersch, Johann Gottfried Gruber (Hrsg.): Allgemeine Encyclopädie der Wissenschaften und Künste, 2. Sektion, 9. Teil (1832), S. 269. Mediziner (18. Jahrhundert) Botaniker (18.…"} {"instruction": "Write a Java program to sort the following array of integers using Quick Sort.", "input": "int arr[] = {4, 3, 6, 2, 5, 1};", "output": "public class QuickSort { // Method to implement quick sort public static void quickSort(int[] arr, int low, int high) { if (low < high) { /* pi is partitioning index, arr[pi] is now at right place */ int pi = partition(arr, low, high); // Recursively sort elements before // partition and after partition quickSort(arr, low, pi-1); quickSort(arr, pi+1, high); } } // Method to find partition index public static int partition(int arr[], int low, int high) { int pivot = arr[high]; int i = (low-1); // index of smaller element for (int j=low; j Member Contact Information

    Member Contact Information

    Name
    Phone
    Address
    John123-456-7890123 Main Street
    Sarah098-765-4321456 Ocean Drive
    "} {"instruction": "Create a basic web scraper in Python that takes a URL as input and returns the text content of that URL.", "input": "https://www.example.com", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = 'https://www.example.com'\nresponse = requests.get(url)\nsoup = BeautifulSoup(response.text, 'html.parser')\n\ntext = soup.get_text()\n\nprint(text)"} {"instruction": "Using the turtle module, create a drawing of a triangle.", "input": "import turtle ", "output": "import turtle # create an instance of Turtle class my_turtle = turtle.Turtle() my_turtle.speed(0) # draw a triangle my_turtle.forward(100) my_turtle.left(120) my_turtle.forward(100) my_turtle.left(120) my_turtle.forward(100) # finish the drawing my_turtle.done()"} {"instruction": "Implement an algorithm in Python to find the mode of the given array", "input": "arr = [2, 4, 3, 3, 5, 3, 7]", "output": "def findMode(arr): \n max_count = 1 \n mode = arr[0] \n count = 1 \n \n for i in range(1,len(arr)): \n if (arr[i] == arr[i - 1]): \n count = count + 1 # increment count\n if (count > max_count): \n max_count = count # update max_count \n mode = arr[i] \n else: \n count = 1 # reset count \n \n return mode \n\n# Driver program \narr = [2, 4, 3, 3, 5, 3, 7] \nprint(findMode(arr)) # prints 3"} {"instruction": "Write a Python function that takes an array of numbers and returns an array with the greatest and smallest values.", "input": "[3, 4, 2, 8, 15, 6]", "output": "def min_max(arr):\n min_val = min(arr)\n max_val = max(arr)\n return [min_val, max_val]\n\nresult = min_max([3, 4, 2, 8, 15, 6])\nprint(result)"} {"instruction": "Construct an algorithm in Python for calculating the median of a given list of numbers.", "input": "[2, 4, 3, 5, 7]", "output": "def calculateMedian(numbers):\n n = len(numbers)\n if n % 2 == 0:\n num1 = numbers[n//2]\n num2 = numbers[n//2 - 1]\n median = (num1 + num2)/2\n else: \n median = numbers[n//2]\n return median\n \nnumbers = [2, 4, 3, 5, 7]\nmedian = calculateMedian(numbers)\nprint(\"Median of list is:\", median)"} {"instruction": "Modify the following code to make it more efficient by using a while loop.", "input": "num = 10 i = 1 while i <= 10: print(i * num) i += 1", "output": "num = 10 i = 0 while i < 10: i += 1 print(i * num)"} {"instruction": "Design a program in Python to find all words present in a string.", "input": "", "output": "def find_words(s):\n words = []\n word = []\n for char in s:\n if char.isalpha():\n word.append(char)\n else:\n if word:\n words.append(\"\".join(word))\n word = []\n if word:\n words.append(\"\".join(word))\n return words\n\nif __name__ == '__main__':\n print(find_words(\"This is a sample string\"))"} {"instruction": "Given two strings, create a function to find the total number of occurrences of the second string in the first string.", "input": "str1 = \"Hello World!\" str2 = \"lo\"", "output": "def count_string_occurrences(str1, str2): \"\"\"This function takes in two strings and returns the total number of occurrences of the second string in the first string.\"\"\" count = 0 for i in range(len(str1) - len(str2) + 1): if str1[i:i + len(str2)] == str2: count += 1 return count"} {"instruction": "Write a python script to generate a dictionary containing numbers from 1 to n as keys and their square as values.", "input": "", "output": "def generate_dict(n):\n d = {}\n for i in range(1, n+1):\n d[i] = i*i\n return d"} {"instruction": "Use a regular expression to find all emails in a given string in Python.", "input": "myString = \"my name is Joe and my email is joe@example.com\"", "output": "import re \n\npattern = \"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+\"\n\nresult = re.findall(pattern, myString)\n\nprint(result) # Output will be [\"joe@example.com\"]"} {"text": "[HI Wikipedia] दादोजी कोंडदेव\n\nदादोजी कोंडदेव (१५७७ - १६४९) महाराज शिवाजी के पिता शाहजी के विश्वसनीय ब्राह्मण क्लार्क (कारकुन) थे। पूना में रहनेवाले शाहजी के कुटुंब और वहाँ की उनकी जागीर की देखभाल करने के लिए इनकी नियुक्ति सन् १६३७ ई. में हुई थी। ये इसलिये प्रसिद्ध हैं कि युवा शिवाजी का प्रशिक्षण इनकी ही देखरेख में हुआ था, जो आगे चलकर मराठा साम्राज्य के संस्थापक बने। ये चकबंदी के काम में बड़े ही निपुण थे। इनकी देखभाल से पूना प्रांत की खेती में बहुत से सुधार हुए। पूना की आबादी बढ़ी। हर साल जो फसल होती थी उसमें से कुछ न कुछ हिस्सा लगान के रूप में लेने की पद्धति ही दादाजी ने रूढ़ की थी। उनके समय मावला लोगों की आर्थिक दशा निकृष्ट हो गई थी। अत: इन्होंने उनका सारा लगान माफ कर दिया था। इन्होंने उसमें से कुछ लोगों को दूसरी ओर का लगान वसूल करने के लिए अपने यहाँ रखकर उनकी स्थिति सुधारने की भरसक चेष्टा की। इन्होंने बाल शिवाजी और माता जीजाबाई के रहने के लिए पूना में एक लालमहल बनवा दिया और बाल शिवाजी को आवश्यक सैनिक तथा धार्मिक शिक्षा दी। शिवाजी के मन में अपने धर्म के प्रति स्वाभिमान जगाया जिससे प्रसन्न होकर शिवाजी के पिता शाहजी ने दादाजी की सेना बढ़ाई और उनको ऊँचा अधिकारी बनाया। युवक शिवाजी ने सन् १६४६ ई. में तोरणा किला जीत लिया अत: बीजापुर के दरबार में शिवाजी के विषय में प्रतिकूल चर्चा हुई और पिता शाहजी ने शिवाजी को समझाने को काम दादाजी का सौंपा। दादाजी ने शिवाजी को अपने कार्यों से परावृत्त करने का भरसक प्रयत्न किया किंतु व्यर्थ हुआ अत: स्वामिभक्त दादाजी को शिवाजी के संबंध में बड़ी चिंता हुई। इतिहासकार कहते हैं कि स्वराज स्थापना का जो कार्य छिपकर होता था उसमें भी दादाजी का हाथ था। मावल प्रदेश के देशमुख, देशपांडे आदि दंगा मचाते थे, उनको उन्होंने शांत किया और उनको स्वराज्य स्थापना के अनुकूल बनाया। शिवापुर नामक गाँव में इन्होंने सरकारी उद्यान बनवाए। न्याय में वे अत्यंत निष्ठुर थे। यहाँ तक कि एक बार शिवाजी की आज्ञा के बिना उन्होंने आम का फल तोड़ लिया जिसके दंड स्वरूप उन्होंने अपना हाथ काट डालने का निश्चय किया किंतु शिवाजी के मना करने पर जिंदगी भर अपने कुर्ते की एक बाँह अधूरी ही रखी। महाराज शिवाजी द्वारा की गई स्वराज्य स्थापना की नींव पक्की करनेवाले इस स्वामिभक्त की मृत्यु सन् १६४९ में हुई। बाहरी कड़ियाँ A Note on the 'Twelve Mavals' of Poona District - Modern Asian Studies, Vol. 12, No. 3 (1978), pp. 393–417 भारतीय शिक्षाविद"} {"text": "[HI Wikipedia] ऍड्वर्ड झील\n\nऍड्वर्ड झील (अंग्रेज़ी: Lake Edward) या रुतनज़िगे (Rutanzige) या ऍड्वर्ड न्यान्ज़ा (Edward Nyanza) महान अफ़्रीकी झीलों की सबसे छोटी झील है। यह कांगो लोकतान्त्रिक गणराज्य और युगान्डा की अंतरराष्ट्रीय सीमा पर स्थित है और इसका उत्तरी छोर भूमध्य रेखा (इक्वेटर) से कुछ ही किलोमीटर दक्षिण में पड़ता है। यह अफ़्रीका की १५वीं सबसे बड़ी झील है। इस से कुछ दूरी पर जॉर्ज झील स्थित है और इन दोनों झीलों के बीच में काज़िन्गा नहर की धारा चलती है। दृश्य इन्हें भी देखें महान अफ़्रीकी झीलें सन्दर्भ महान अफ़्रीकी झीलें अफ़्रीका की झीलें युगांडा की झीलें कांगो लोकतान्त्रिक गणराज्य की झीलें"} {"instruction": "Write a shell script to find the most used command.", "input": "", "output": "#!/bin/bash #Store the output of command history into an array historyArray=($(history)) #Declare a Map declare -A wordCount #Loops through the history commands for word in \"${historyArray[@]}\"; do wordCount[\"$word\"]=$((wordCount[\"$word\"] + 1 )) done #Counter for tracking the most used command maxCount=0 #Loop through the Map for key in \"${!wordCount[@]}\" do #Keeps track of the most used command if [ ${wordCount[$key]} -gt $maxCount ] then maxCount=\"${wordCount[$key]}\" mostUsed=\"$key\" fi done echo The Most Used Command is $mostUsed"} {"text": "[HI Wikipedia] नैनी\n\nनैनी (नैनी औद्योगिक क्षेत्र के रूप में भी जाना जाता है) प्रयागराज का पड़ोसी और जुड़वां शहर है। इतिहास नैनी शहर शिक्षा उद्योग इलाहाबाद में शीशा और तार कारखाने काफी हैं। यहां केमुख्य औद्योगिक क्षेत्र हैं नैनी और फूलपुर, जहां कई सार्वजनिक और निजी क्षेत्र की कंपनियों की इकाइयां, कार्यालय और निर्माणियां स्थापित हैं। इनमें अरेवा टी एण्ड डी इण्डिया (बहुराष्ट्रीय अरेवा समूह का एक प्रभाग), भारत पंप्स एण्ड कंप्रेसर्स लि. यानी बीपीसीएल) जिसे जल्दी ही मिनिरत्न घोषित किया जाने वाला है, इंडियन टेलीफोन इंडस्ट्रीज (आई.टी.आई), रिलायंस इंडस्ट्रीज़-इलाहाबाद निर्माण प्रखंड, हिन्दुस्तान केबल्स, त्रिवेणी स्ट्रक्चरल्स लि. (टी.एस.एल. भारत यंत्र निगम की एक गौण इकाई), शीशा कारखाना, इत्यादि। बैद्यनाथ की नैनी में एक निर्माणी स्थापित है, जिनमें कई कुटीर उद्योग जैसे रसायन, पॉलीयेस्टर, ऊनी वस्त्र, नल, पाईप्स, टॉर्च, कागज, घी, माचिस, साबुन, चीनी, साइकिल एवं पर्फ़्यूम आदि निर्माण होते हैं। इंडीयन फार्मर्स फर्टिलाइजर्स को-ऑपरेटिव इफको फूलपुर क्षेत्र में स्थापित है। यहाम इफको की दो इकाइयां हैं, जिनमें विश्व का सबसे बड़ा नैफ्था आधारित खाद निर्माण परिसर स्थापित है। इलाहाबाद में पॉल्ट्री और कांच उद्योग भी बढ़ता हुआ है। राहत इंडस्ट्रीज़ का नूरानी तेल, काफी अच्छा और पुराना दर्दनिवारक तैल है, जिसकी निर्माणी नैनी में स्थापित है। तीन विद्युत परियोजनाएं मेजा, बारा और कर्चना तहसीलों में जेपी समूह एवं नेशनल थर्मल पावर कार्पोरेशन द्वारा तैयार की जा रही हैं। सन्दर्भ प्रयागराज ज़िला प्रयागराज_जिला"} {"instruction": "Develop a Python program for generating a random number between given limits.", "input": "", "output": "import random\n\ndef random_number(start, end):\n return random.randint(start, end)"} {"instruction": "Create a function to filter out elements in an array that meet a given criteria.", "input": "lst = [2, 3, 4, 5, 6, 7, 8, 9] criteria = lambda x: x % 2 == 0", "output": "def filter_by(lst, criteria): \"\"\"This function takes an array of elements and a criteria and returns an array of elements filtered by the criteria.\"\"\" return [x for x in lst if criteria(x)]"} {"instruction": "Create an automated program to check if an employee works more than 8 hours a day with Python.", "input": "Dataframe of employee working hours:\n\nName | Hours\n-------- | -----\nJohn | 8\nNick | 10\nSamantha | 7", "output": "import pandas as pd\n\n# Read the employee working hours dataset\ndf = pd.read_csv(\"working_hours_data.csv\")\n\n# Define a function to check if an employee is working more than 8 hours\ndef check_hours(hours):\n if hours > 8:\n return True\n else:\n return False\n\n# Add a new column that stores the results of the check\ndf['More than 8 hours?'] = df['Hours'].apply(check_hours)\n\n# Print the updated dataframe\nprint(df)"} {"text": "[CS Wikipedia] Aféra Agrokomerc\n\nAféra Agrokomerc představovala rozsáhlý hospodářský skandál, který se odehrál v roce 1987 v Bosně a Hercegovině a poukázala na propletenost jugoslávského hospodářství s politikou, stejně jako na neschopnost a horšící se situaci v celé zemi. Poprvé se začalo diskutovat o nelegálních praktikách, které byly po nějaký čas v SFRJ v hospodářství běžné, a odpovědné osoby byly postaveny před soud. Jednalo se o největší skandál od druhé světové války, do kterého bylo zapojeno celkem 63 bank. V narážce na americkou kauzu Watergate dostal název Agrogate. Průběh V lednu 1987 došlo ve skladu závodu Agrokomerc, velkého potravinářského výrobce, sídlícího v západobosenské Velké Kladuši k požáru Škoda byla vyčíslena ve výši pěti milionů amerických dolarů. Vzhledem k tomu, že příčinou požáru mohlo být i lidské zavinění, vyvstala obava, že by byl požár vyvolán úmyslně. Následné rozkrývání příčin celé události, které doprovázela jen malá spolupráce místních manažerů, zmobilizovalo sarajevský Sekretariát vnitřních záležitostí. Ten proto nařídil důkladné vyšetřování celého Agrokomercu, které vedlo k odhalení skutečnosti – firma podepisovala nekryté směnky v hodnotě 400 milionů USD. V srpnu 1987 vydala nejvyšší rada Bosny a Hercegoviny (republiková vláda) veřejné prohlášení, ve kterém uvedla, že ve firmě Agrokomerc došlo k značným finančním podvodům. Nedlouho poté, začaly o kauze obšírně informovat i další jugoslávské deníky. Deník Borba, který byl ústředním orgánem SKJ uvedl, že Agrokomer vydal směnky v hodnotě 400 milionů USD u 63 jugoslávských bank. Následující skandál ukončil politickou kariéru Hamdiji Pozderace, kandidáta na funkci předsedy předsednictva SFRJ a jednoho z vůdčích politiků Bosny a Hercegoviny. Pozderacův bratr byl rovněž účastníkem tohoto případu, což donutilo Hamidiju k rezignaci. Na lavici obžalovaných stanul rovněž i Fikret Abdić, ředitel společnosti. Oficiálně byl obžalován z \"kontrarevoluce a ohrožování společenského zřízení\" podle článku 114. tehdejšího trestního zákona. Abdić díky nekrytým směnkám získal značné prostředky, které pomohly rozvíjet Agrokomerc a celé okolí Veliké Kladuši a Cazinu. V rukou měl velkou moc, ovládal fakticky celé okolí, kde Agrokomerc sídlil, značně ovlivňoval i místní správu. Lidé z oblasti ho respektovali. Agrokomerc, který byl kdysi typickou ukázkou socialistického zemědělství a zaměstnával ještě v 50.-60. letech pouhých 30 lidí, se stal v 80. letech velkým závodem s 13,5 tisíci zaměstnanci a výkonem, který se značně blížil produktivitě celé SR Bosny a Hercegoviny. Dopady kauzy Během medializace celé události, ke které značně přispěl bělehradský deník Borba, se objevily rozporuplné názory v těch oblastech Jugoslávie, která se týkala. V Bosně a Hercegovině zavládlo znepokojení a začaly se ozývat hlasy, že celá kauza…"} {"instruction": "Design a genetic algorithm in Python to find the optimal value for a given function.", "input": "", "output": "import numpy as np\n\n# Define the target function\ndef f(x): \n return x**3 - 6 * x**2 + 4 * x + 12\n\n# Set the population size\nPOP_SIZE = 10\n\n# Generate random population of points\nnp.random.seed(42)\npopulation = np.random.uniform(-10, 10, (POP_SIZE, 2))\n\n# Evaluation\nfitness = [f(x) for x in population]\n\n# Selection \nparents = np.array(list(zip(population, fitness)))\nparents = parents[ parents[:,-1].argsort()]\n\n# Crossover \ncrossed_points = np.array(list(zip(parents[0:5,0], parents[5:,0])))\ncrossover_points = []\nfor pair in crossed_points:\n x1 = np.mean(pair, axis=0)[0]\n x2 = np.mean(pair, axis=0)[1]\n crossover_points.append([x1, x2])\n\n# Mutation\nmutation = np.random.uniform(-10, 10, (POP_SIZE, 2))\n\n# Generate new population\nnew_population = np.array(list(zip(crossover_points, mutation)))\nnew_population = np.concatenate([crossover_points,mutation],axis=0)\n\n# Evaluation\nfitness = [f(x) for x in new_population]\n\n# Selection\nfinal = np.array(list(zip(population, fitness)))\nfinal = final[ final[:,-1].argsort()]\n\n# Define the optimal point\noptimal_point = final[0,0]"} {"instruction": "Create a ML model in Python to classify different types of fruits.", "input": "Dataset containing images of fruits", "output": "import matplotlib.pyplot as plt\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Conv2D, MaxPool2D, Dense, Flatten\nfrom tensorflow.keras.utils import to_categorical\n\n# Load the dataset\nX = np.load('fruits-images.npy')\ny = np.load('fruits-labels.npy')\ny = to_categorical(y)\n\n# Split the dataset into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)\n\n# Create the model\nmodel = Sequential()\nmodel.add(Conv2D(32, kernel_size=(3,3), activation='relu', input_shape=(100,100,3)))\nmodel.add(MaxPool2D(pool_size=(2,2)))\nmodel.add(Flatten())\nmodel.add(Dense(128, activation='relu'))\nmodel.add(Dense(y_train.shape[1], activation='softmax'))\n\n# Compile and fit\nmodel.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])\nhistory = model.fit(X_train, y_train, epochs=15, batch_size=32, validation_data=(X_test, y_test))\n\n# Plot the accuracy\nplt.plot(history.history['accuracy'])\nplt.plot(history.history['val_accuracy'])\nplt.title('Model accuracy')\nplt.ylabel('Accuracy')\nplt.xlabel('Epoch')\nplt.legend(['Train', 'Test'], loc='upper left')\nplt.show()"} {"instruction": "Implement an algorithm in Java to count the number of ones in a binary number", "input": "", "output": "public static int countOnes(int num) { int count = 0; while (num != 0) { num = num & (num - 1); count++; } return count; }"} {"instruction": "Create a React component with two TextInputs.", "input": "", "output": "import React from 'react'; const TwoTextInputsForm = () => { return ( <> ); }; export default TwoTextInputsForm;"} {"instruction": "Create a machine learning program in Python for binary classification.", "input": "Not applicable", "output": "import numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.naive_bayes import GaussianNB\n\n# Read dataset\nX = np.loadtxt('./data.txt', delimiter=',')\ny = np.loadtxt('./labels.txt')\n\n# Split the dataset\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\n\n# Train the model\nclassifier = GaussianNB()\nclassifier.fit(X_train, y_train)\n\n# Test the model\nscore = classifier.score(X_test, y_test)\nprint(\"Model accuracy:\", score)"} {"instruction": "Create a data frame in R with 3 columns and 10 rows of randomly generated numerical data.", "input": "", "output": "dataFrame <- data.frame(V1 = sample(1:100, 10, replace=FALSE), V2 = sample(1:100, 10, replace=FALSE), V3 = sample(1:100, 10, replace=FALSE))"} {"instruction": "Create a JavaScript constant to define a tax rate.", "input": "", "output": "const TAX_RATE = 0.2;"} {"text": "[EN Wikipedia] Stockley, Devon\n\nStockley is a hamlet on the eastern outskirts of Okehampton, in Devon, England. It lies just north of the A30. References Hamlets in Devon"} {"text": "[CS Wikipedia] Mortagne-au-Perche\n\nMortagne-au-Perche je francouzská obec v departementu Orne v regionu Normandie. V roce 2010 zde žilo 4 093 obyvatel. Je centrem arrondissementu Mortagne-au-Perche a kantonu Mortagne-au-Perche. Vývoj počtu obyvatel Související články Seznam obcí v departementu Orne Externí odkazy Reference Obce v departementu Orne Francouzské podprefektury"} {"text": "[DE Wikipedia] Thomas Hölck\n\nThomas Hölck (* 21. September 1962 in Hamburg) ist ein deutscher Politiker (SPD), Diplom-Bauingenieur, und seit 2005 Mitglied des Schleswig-Holsteinischen Landtages. Leben und Beruf Nach der Mittleren Reife 1979 machte Hölck bis 1982 eine Lehre zum Maurer und besuchte anschließend die Fachoberschule für Bautechnik, wo er 1983 die Fachhochschulreife erwarb. Anschließend leistete er seinen Zivildienst ab und begann 1984 ein Studium des Bauingenieurwesens an der Fachhochschule Hamburg, welches er 1990 als Diplom-Bauingenieur (FH) beendete. Seitdem ist er als Projektmanager für Industrie- und Gewerbebauten tätig. Thomas Hölck ist verheiratet und hat zwei Töchter. Er ist evangelischer Konfession. Partei Hölck trat 1979 in die SPD ein und engagierte sich zunächst bei den Jusos, deren Kreisvorstand in Hamburg-Altona er von 1981 bis 1983 angehörte. Seit 2006 ist er Mitglied im Vorstand des SPD-Kreisverbandes Pinneberg, seit 2012 zudem SPD-Kreisvorsitzender. Abgeordneter Hölck gehört seit 1994 der Gemeindevertretung von Haseldorf an. Von 2005 bis 2009 war er Mitglied des Landtages von Schleswig-Holstein als direkt gewählter Abgeordneter des Wahlkreises Pinneberg-Elbmarschen, in dem er bei der Landtagswahl 2005 42,7 % der Erststimmen erzielte. Er war Mitglied im Innen- und Rechtsausschuss, im Petitionsausschuss und im Richterwahlausschuss. Bei der Landtagswahl 2009 trat er erneut als Direktkandidat in seinem Wahlkreis an, verlor diesen aber mit 30,7 Prozent der Erststimmen deutlich an seine CDU-Kontrahentin Barbara Ostmeier, die 40,8 % erzielte. Bei der Landtagswahl 2012 kandidierte Hölck wieder im Wahlkreis Pinneberg-Elbmarschen, unterlag aber mit 37,3 % erneut gegen Barbara Ostmeier, die 39,5 % erreichte. Am 3. November 2014 zog er als Nachrücker für Gitta Trauernicht über die Liste wieder in den Landtag ein. Hölck war in der vorangegangenen Legislaturperiode wohnungsbau- und energiepolitischer Sprecher der SPD-Landtagsfraktion sowie Mitglied im Umwelt- und Agrarausschuss. Bei der Landtagswahl 2017 zog er erneut er über die Landesliste in den Kieler Landtag ein. Für die SPD-Fraktion war er in der 19. Wahlperiode Leiter des Arbeitskreises Wirtschaft sowie wirtschafts- und energiepolitischer Sprecher. Des Weiteren war Mitglied im Wirtschaftsausschuss. Auch bei der Landtagswahl 2022 wurde er erneut über die SPD-Landesliste in den Landtag gewählt. Öffentliche Ämter Von 1998 bis 2003 war Hölck stellvertretender Bürgermeister der Gemeinde Haseldorf. Weblinks Website von Thomas Hölck Einzelnachweise Landtagsabgeordneter (Schleswig-Holstein) Kommunalpolitiker (Kreis Pinneberg) SPD-Mitglied Deutscher Geboren 1962 Mann"} {"instruction": "Write a function in Python to delete duplicates from a list.", "input": "[1,1,3,4,4,5]", "output": "def remove_duplicates(lst): \n\treturn list(set(lst)) \nremove_duplicates([1,1,3,4,4,5])"} {"text": "[HI Wikipedia] अरविन्द घोष\n\nअरविन्द घोष या श्री अरविन्द (बांग्ला: শ্রী অরবিন্দ, जन्म: १८७२, मृत्यु: १९५०) एक योगी एवं दार्शनिक थे। वे १५ अगस्त १८७२ को कलकत्ता में जन्मे थे। इनके पिता एक डाक्टर थे। इन्होंने युवा अवस्था में स्वतन्त्रता संग्राम में क्रान्तिकारी के रूप में भाग लिया, किन्तु बाद में यह एक योगी बन गये और इन्होंने पांडिचेरी में एक आश्रम स्थापित किया। वेद, उपनिषद ग्रन्थों आदि पर टीका लिखी। योग साधना पर मौलिक ग्रन्थ लिखे। उनका पूरे विश्व में दर्शन शास्त्र पर बहुत प्रभाव रहा है और उनकी साधना पद्धति के अनुयायी सब देशों में पाये जाते हैं। यह कवि भी थे और गुरु भी। प्रारम्भिक शिक्षा अरविन्द के पिता डॉक्टर कृष्णधन घोष उन्हें उच्च शिक्षा दिला कर उच्च सरकारी पद दिलाना चाहते थे, अतएव मात्र ७ वर्ष की उम्र में ही उन्होंने इन्हें इंग्लैण्ड भेज दिया। उन्होंने केवल १८ वर्ष की आयु में ही आई० सी० एस० की परीक्षा उत्तीर्ण कर ली थी। इसके साथ ही उन्होंने अंग्रेजी, जर्मन, फ्रेंच, ग्रीक एवं इटैलियन भाषाओँ में भी निपुणता प्राप्त की थी। युवावस्था देशभक्ति से प्रेरित इस युवा ने जानबूझ कर घुड़सवारी की परीक्षा देने से इनकार कर दिया और राष्ट्र-सेवा करने की ठान ली। इनकी प्रतिभा से बड़ौदा नरेश अत्यधिक प्रभावित थे अत: उन्होंने इन्हें अपनी रियासत में शिक्षा शास्त्री के रूप में नियुक्त कर लिया। बडौदा में ये प्राध्यापक, वाइस प्रिंसिपल, निजी सचिव आदि कार्य योग्यता पूर्वक करते रहे और इस दौरान हजारों छात्रों को चरित्रवान देशभक्त बनाया। 1896 से 1905 तक उन्होंने बड़ौदा रियासत में राजस्व अधिकारी से लेकर बड़ौदा काॅलेज के फ्रेंच अध्यापक और उपाचार्य रहने तक रियासत की सेना में क्रान्तिकारियों को प्रशिक्षण भी दिलाया था। हजारों युवकों को उन्होंने क्रान्ति की दीक्षा दी थी। वे निजी रुपये-पैसे का हिसाब नहीं रखते थे परन्तु राजस्व विभाग में कार्य करते समय उन्होंने जो विश्व की प्रथम आर्थिक विकास योजना बनायी उसका कार्यान्वयन करके बड़ौदा राज्य देशी रियासतों में अन्यतम बन गया था। महाराजा मुम्बई की वार्षिक औद्योगिक प्रदर्शनी के उद्धाटन हेतु आमन्त्रित किये जाने लगे थे। लार्ड कर्जन के बंग-भंग की योजना रखने पर सारा देश तिलमिला उठा। बंगाल में इसके विरोध के लिये जब उग्र आन्दोलन हुआ तो अरविन्द घोष ने इसमे सक्रिय रूप से भाग लिया। नेशनल लाॅ कॉलेज की स्थापना में भी इनका महत्वपूर्ण योगदान रहा। मात्र ७५ रुपये मासिक पर इन्होंने वहाँ अध्यापन-कार्य किया। पैसे की जरूरत होने के बावजूद उन्होंने कठिनाई का मार्ग चुना। अरविन्द कलकत्ता आये तो राजा सुबोध मलिक की अट्टालिका में ठहराये गये। पर जन-साधारण को मिलने में संकोच होता था। अत: वे सभी को विस्मित करते हुए 19/8 छक्कू खानसामा गली में आ गये। उन्होंने किशोरगंज (वर्तमान में बंगलादेश में) में स्वदेशी आन्दोलन प्रारम्भ कर दिया। अब वे केवल धोती, कुर्ता और चादर ही पहनते थे। उसके बाद उन्होंने राष्ट्रीय विद्यालय से भी अलग होकर अग्निवर्षी पत्रिका बन्दे मातरम् (पत्रिका) का प्रकाशन प्रारम्भ किया। ब्रिटिश सरकार इनके क्रन्तिकारी विचारों और कार्यों से अत्यधिक आतंकित थी अत: २ मई १९०८ को चालीस युवकों के साथ उन्हें गिरफ्तार कर लिया गया। इतिहास में इसे 'अलीपुर षडयन्त्र केस' के नाम से जानते हैं। उन्हें एक वर्ष तक…"} {"instruction": "Create a function in Python to extract the substring from the given string between the two key words, ``start`` and ``end``", "input": "string = \"This is a test string and the key words are start and end\"\nstart = \"start\"\nend = \"end\"", "output": "def extract_substring(string, start, end):\n '''This function will extract the substring between two given key words'''\n \n if start in string and end in string:\n start_index = string.find(start) + len(start)\n end_index = string.find(end)\n extracted_string = string[start_index:end_index]\n return extracted_string"} {"instruction": "Create a CSS class named 'main-section' with a width of 700px and a margin of 0 auto.", "input": "", "output": ".main-section { width: 700px; margin: 0 auto; }"} {"instruction": "Find the position of a string within another string.", "input": "haystack = \"This is a sample string with the word 'sample' in it\" needle = \"sample\"", "output": "const position = haystack.indexOf(needle) console.log(position) // 15"} {"instruction": "Modify the given code to accept input in Celsius and convert it to Fahrenheit.", "input": "def c2f(): return ((9/5)*temp + 32)", "output": "def c2f(temp): return ((9/5)*temp + 32)"} {"instruction": "Write a python code snippet to square the number 12.", "input": "", "output": "x = 12 y = x**2 print(y)"} {"text": "[HI Wikipedia] मानस\n\nमानस अथवा मनास () का सन्दर्भ निम्न से हो सकता हैं: सांस्कृतिक मानवशास्त्र मनास की दास्तान (एपिक ऑफ़ मनास), ५००,००० वाक्यों वाली एक किरगिज़ महाकाव्य मन के लिए पाली और संस्कृत शब्द; देखें\" मानस (प्रारम्भिक बौद्ध धर्म) मानस-विज्ञान, योगाचार बौद्ध धर्म में सिखाई गई आठ चेतनाओं में से एक रामचरित मानस लोग Achero Mañas (जन्म 1966), स्पेनी फ़िल्म निर्देशक एडगर Manas (1875–1964), तुर्की-आर्मेनियाई composer, conductor और musicologist Fernando Llorente Mañas (जन्म 1990), स्पेनी फुटबॉलर José Ángel Mañas (जन्म 1971), स्पेनी लेखक मानस कुमार मंडल, दिल्ली के एक वैज्ञानिक और मनोवैज्ञानिक मानस मादरेचा, भारतीय कवि और ब्लॉगर मानस मुखर्जी, बंगाली संगीत निर्देशक मानस दास, भारतीय फुटबॉलर Manas परिवार, एक ऑटोमन-आर्मेनियाई परिवार स्थाननाम भौगोलिक स्थान रॉयल मानस राष्ट्रीय उद्यान, भूटान में एक राष्ट्रीय उद्यान मनास ज़िला, Talas प्रांत, किर्गिज़स्तान का एक ज़िला मनास अन्तरराष्ट्रीय हवाईअड्डा, किर्गिज़स्तान में Bishkek के पास एक अन्तरराष्ट्रीय हवाईअड्डा Transit Center at Manas, उपर्युक्त हवाईअड्डे के यहाँ एक संयुक्त राज्य एयर फोर्स बेस मानस राष्ट्रीय उद्यान, भारत में असम राज्य में एक राष्ट्रीय उद्यान मानस अन्तरराष्ट्रीय लोक विद्यालय, जेहेनाबाद, भारत में Manas, Drôme, a commune in Drôme département in France Manas-Bastanous, a commune in the Gers department in southwestern France Manas ज़िला, Peru, in the Peruvian province of Cajatambo Manas काउंटी, in the Xinjiang Uighur Autonomous Region, China Manas Urban Settlement, a municipal formation which Manas Settlement in Karabudakhkentsky District of the Republic of Dagestan, Russia is incorporated as Manas (urban-type settlement), an urban-type settlement in Karabudakhkentsky District of the Republic of Dagestan, Russia भूवैज्ञानिक गुणविशेष मानस या मानसी नदी, चीन के Xinjiang Uighur Autonomous क्षेत्र में एक नदी मानस झील, चीन के Xinjiang Uighur Autonomous क्षेत्र में एक झील मानस नदी, भारतीय राज्य असम में एक नदी मानसरोवर झील, तिब्बत में एक झील विश्विद्यालय मनास विश्विद्यालय, किरगिज़ तुर्की मनास विश्विद्यालय, किरगिज़स्तान इन्हें भी देखें"} {"instruction": "Write a Python program to find the sum of all the divisors of a given integer.", "input": "90", "output": "def calculate_sum_divisors(n):\n total_sum = 0\n for i in range(1, n + 1):\n if n % i == 0:\n total_sum += i\n return total_sum\n \nprint(calculate_sum_divisors(90))"} {"instruction": "Generate a Python class to represent a car. The class should include attributes for make, model, year, and color.", "input": "Not applicable", "output": "class Car:\n def __init__(self, make, model, year, color):\n self.make = make\n self.model = model\n self.year = year\n self.color = color\n \n def get_info(self):\n return f'This car is a {self.color} {self.year} {self.make} {self.model}.'"} {"instruction": "Create a Python class to represent a bank account, with appropriate methods and fields for holding the balance", "input": "No input.", "output": "class BankAccount:\n def __init__(self):\n self._balance = 0\n\n def get_balance(self):\n return self._balance\n\n def deposit(self, amount):\n if amount < 0:\n raise ValueError(\"Amount must be greater than 0\")\n\n self._balance += amount\n\n def withdraw(self, amount):\n if amount < 0:\n raise ValueError(\"Amount must be greater than 0\")\n if amount > self._balance:\n raise ValueError(\"Insufficient funds\")\n\n self._balance -= amount"} {"instruction": "Write a JavaScript program to remove all the occurrences of a specified character from a string.", "input": "The quick brown fox", "output": "function removeChar(str, char){ return str.replace(new RegExp(char, 'g'), ''); }"} {"instruction": "Write a Python program to create a dictionary with numbers from 0 to 4 as keys and corresponding values as given below.", "input": "[1, 2, 3, 4]", "output": "d = {0:1, 1:2, 2:3, 3:4, 4:4}"} {"instruction": "Construct a Python program to split a string at a given character occurrence index.", "input": "Input String: Hello World\nIndex: 6", "output": "def split_string(string, index):\n return string[:index] + \",\" + string[index+1:]\n\ns = \"Hello World\"\nindex = 6\n\nnew_string = split_string(s, index)\nprint(new_string)\n\nOutput:\nHello,World"} {"instruction": "Create a program in Python that can extract data from an HTML page.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# Get the specified URL\nurl = 'https://example.com/'\nresponse = requests.get(url)\n\n# Parse the response\nsoup = BeautifulSoup(response.text, 'html.parser')\n\n# Extract the desired data\ntitle = soup.find('title').text\nbody = soup.find('body').text\n\n# Print the extracted data\nprint(title)\nprint(body)"} {"instruction": "Create a SQL query to get the list of employees working in the IT department.", "input": "", "output": "SELECT e.name FROM employees e JOIN departments d on e.department_id = d.id WHERE d.name = 'IT'"} {"text": "[CS Wikipedia] EUR\n\nZkratka EUR může znamenat: Euro – společná evropská měnová jednotka Esposizione Universale di Roma – městská čtvrť v Římě"} {"text": "[HI Wikipedia] मलावी झील\n\nमलावी झील (अंग्रेज़ी: Lake Malawi) या न्यासा झील (अंग्रेज़ी: Lake Nyasa) महान अफ़्रीकी झीलों में से एक है और पूर्वी अफ़्रीकी दरार की दक्षिणतम झील है। यह मलावी, मोज़ाम्बीक और तान्ज़ानिया के बीच स्थित है। यह अफ़्रीका की तीसरी सबसे बड़ी और दूसरी सबसे गहरी झील है। यह पूरे विश्व की नौवीं सबसे बड़ी झील है। कुछ स्रोतों के अनुसार इस झील में दुनिया की किसी भी अन्य झील से ज़्यादा मछलियों की जातियाँ रहती हैं। यहाँ १,००० से अधिक तो सिर्फ़ सिक्लिडों की ही जातियाँ रहती है। १० जून २०११ को मोज़ाम्बीक ने इसे संरक्षित क्षेत्र धोषित कर दिया। इन्हें भी देखें महान अफ़्रीकी झीलें सन्दर्भ महान अफ़्रीकी झीलें अफ़्रीका की झीलें तंज़ानिया की झीलें"} {"instruction": "Create an artificial neural network in PyTorch to predict the next word in a sentence.", "input": "", "output": "import torch import torch.nn as nn class ANN(nn.Module): def __init__(self, vocab_size, embedding_dim, hidden_dim): super().__init__() self.embedding = nn.Embedding(vocab_size, embedding_dim) self.fc1 = nn.Linear(embedding_dim, hidden_dim) self.fc2 = nn.Linear(hidden_dim, vocab_size) def forward(self, x): embedded = self.embedding(x) out = self.fc1(embedded) out = self.fc2(out) return out"} {"instruction": "Given a numeric array and a length, find the longest increasing subsequence in the array.", "input": "Array: [3, 4, 1, 5, 10, 9, 8, 11] Length: 8", "output": "[3, 4, 5, 10, 11]"} {"instruction": "Write a Python program to generate a list of the first 10 Fibonacci numbers, starting from 0.", "input": "", "output": "def generate_fibonacci_list(n):\n fibonacci = [0, 1]\n for _ in range(2, n):\n fibonacci.append(fibonacci[-2] + fibonacci[-1])\n return fibonacci\n\nfibonacci_list = generate_fibonacci_list(10)\nprint(fibonacci_list)"} {"text": "[HI Wikipedia] भूटान\n\nभूटान का राजतंत्र (भोटान्त) हिमालय पर बसा दक्षिण एशिया का एक छोटा और महत्वपूर्ण देश है। यह चीन (तिब्बत) और भारत के बीच स्थित भूमि आबद्ध देश है। इस देश का स्थानीय नाम ड्रुग युल है, जिसका अर्थ होता है अझ़दहा का देश। यह देश मुख्यतः पहाड़ी है और केवल दक्षिणी भाग में थोड़ी सी समतल भूमि है। यह सांस्कृतिक और धार्मिक तौर से तिब्बत से जुड़ा है, लेकिन भौगोलिक और राजनीतिक परिस्थितियों के मद्देनजर वर्तमान में यह देश भारत के करीब हैतथा भारत के परम् -मित्रों में से एक है। भूटान का धरातल विश्व के सबसे ऊबड़ खाबड़ धरातलों में से एक है, जो 100 किमी की दूरी के बीच में 150 से 7000मी की ऊँचाई पायी जाती है ! भूटान पहले भारत, पाकिस्तान, बांग्लादेश तथा मालदीव से कोई प्रवेश कर नहीं लेता था, पर अब लेना शुरू कर दिया है। नाम कुछ लोगों के अनुसार भूटान संस्कृत के भू-उत्थान से बना शब्द है जिसका शाब्दिक अर्थ है ऊंची भूमि. कुछ के अनुसार यह भोट-अन्त (भोटान्त) (यानि तिब्बत का अन्त) का बिगड़ा रूप है। यहां के निवासी भूटान को ड्रुग-युल (अझ़दहा का देश) तथा इसके निवासियों को ड्रुगपा कहते हैं। इसके अलावा भी भूटान के कई नाम रहे हैं पूर्व में। इतिहास सत्रहवीं सदी के अंत में भूटान ने बौद्ध धर्म को अंगीकार किया। 1865 में ब्रिटेन और भूटान के बीच सिनचुलु संधि पर हस्ताक्षर हुआ, जिसके तहत भूटान को सीमावर्ती कुछ भूभाग के बदले कुछ वार्षिक अनुदान के करार किए गए। ब्रिटिश प्रभाव के तहत 1907 में वहाँ राजशाही की स्थापना हुई। तीन साल बाद एक और समझौता हुआ, जिसके तहत ब्रिटिश इस बात पर राजी हुए कि वे भूटान के आंतरिक मामलों में हस्त्क्षेप नहीं करेंगे लेकिन भूटान की विदेश नीति इंग्लैंड द्वारा तय की जाएगी। बाद में 1947 के पश्चात यही भूमिका भारत को मिली। दो साल बाद 1949 में भारत भूटान समझौते के तहत भारत ने भूटान की वो सारी जमीन उसे लौटा दी जो अंग्रेजों के अधीन थी। इस समझौते के तहत भारत का भूटान की विदेश नीति एवं रक्षा नीति में काफी महत्वपूर्ण भूमिका दी गई। राजनीति भूटान का राजप्रमुख राजा अर्थात द्रुक ग्यालपो होता है, जो वर्तमान में जिग्मे खेसर नामग्याल वांग्चुक हैं। हालांकि यह पद वंशानुगत है लेकिन भूटान के संसद शोगडू के दो तिहाई बहुमत द्वारा हटाया जा सकता है। शोगडू में 154 सीटे होते हैं, जिसमे स्थानीय रूप से चुने गए प्रतिनिधि (105), धार्मिक प्रतिनिधि (12) और राजा द्वारा नामांकित प्रतिनिधि (37) और इन सभी का कार्यकाल तीन वर्षों का होता है। राजा की कार्यकारी शक्तियाँ शोगडू के माध्यम से चुने गए मंत्रिपरिषद में निहित होती हैं। मंत्रिपरिषद के सदस्यों का चुनाव राजा करता है और इनका कार्यकाल पाँच वर्षों का होता है। सरकार की नीतियों का निर्धारण इस बात को ध्यान में रखकर किया जाता है कि इससे पारंपरिक संस्कृति और मूल्यों का संरक्षण हो सके। हालांकि भूटान में रहने वाले नेपाली मूल के अल्पसंख्यक समुदायों में कुछ असंतोष है, जो अपनी संस्कृति पर भूटानी संस्कृति लादे जाने के खिलाफ हैं। इस व्यवस्था का विरोध करने वाले नेपाली भूटानी नेपाल तथा भारत के विभिन्न हिस्सों में शरणार्थी बनने को विवश हैं। पूर्वी नेपाल में करीब एक लाख से ज्यादा व भारत में ३० हजार के करीब भूटानी नेपाली शरणार्थी के तौर पर रह रहे हैं। उनकी देखभाल शरणार्थी संबंधी…"} {"instruction": "Create a regex expression in Python that finds all numbers from 1 to 100 inclusive.", "input": "", "output": "import re regex = re.compile('[1-9]|[1-9][0-9]|100')"} {"instruction": "Find the most frequent integer in the list: [3, 5, 2, 3, 1, 5, 3, 3, 2].", "input": "", "output": "my_list = [3, 5, 2, 3, 1, 5, 3, 3, 2] max_freq = 0 max_num = 0 # Use a dictionary to store the frequence of each number dict = { i : my_list.count(i) for i in my_list } for num, freq in dict.items(): if freq > max_freq: max_freq = freq max_num = num print(max_num) # Output: 3"} {"instruction": "Using Python, create a basic web application for a Contact List. The application should include a form for adding, editing, and deleting contacts.", "input": "Not applicable", "output": "import os\n\nfrom flask import Flask, render_template, request\n\napp = Flask(__name__)\n\ncontact_list = [\n {'name': 'John Doe', 'email': 'john@example.com'},\n {'name': 'Jane Doe', 'email': 'jane@example.com'},\n]\n\n@app.route('/')\ndef index():\n return render_template('index.html', contacts=contact_list)\n\n@app.route('/add', methods=['POST'])\ndef add():\n if request.form['name'] and request.form['email']:\n contact_list.append((request.form['name'], request.form['email']))\n\n return redirect(url_for('index'))\n\n@app.route('/edit/', methods=['GET', 'POST'])\ndef edit(key):\n if request.method == 'POST':\n contact_list[key] = (request.form['name'], request.form['email'])\n return redirect(url_for('index'))\n\n return render_template('edit.html', key=key, contact=contact_list[key])\n\n@app.route('/delete/', methods=['GET', 'POST'])\ndef delete(key):\n if request.method == 'POST':\n del contact_list[key]\n return redirect(url_for('index'))\n\n return render_template('delete.html', key=key, contact=contact_list[key])\n\nif __name__ == '__main__':\n app.run(host=os.environ.get('IP'),\n port=os.environ.get('PORT'),\n debug=True)"} {"text": "[CS Wikipedia] Národní park Noel Kempff Mercado\n\nNárodní park Noel Kempff Mercado je rozlehlé chráněné území na východě Bolívie v departementu Santa Cruz na hranicích s Brazílií. Byl založen roku 1979 a od roku 2000 je zapsán na seznamu světového přírodního dědictví UNESCO. Svůj název nese na počest významného bolivijského přírodovědce Noela Mercado. Rozkládá se na ploše 15 230 km² (pro srovnání: cca 1/5 rozlohy České republiky) a patří mezi nejvíce nedotčené a panenské regiony Amazonie. Rozprostírá se v nadmořské výšce od 200 m n. m. až do 1 000 m n. m. a zasahuje do několika rozdílných druhů přírodního biomu (např. Cerrado, Gran Chaco či amazonské deštné lesy). Park je na západě ohraničen řekou Paraguá, na východě pak Este. Externí odkazy Národní parky v Bolívii Světové dědictví (Bolívie) Chráněná území vyhlášená roku 1979"} {"instruction": "Write a code to select records from a database where the country name is identical to the input.", "input": "Australia", "output": "\"\"\" Select records from the database where the country name is identical to the input \"\"\" import sqlite3 country = 'Australia' conn = sqlite3.connect('database.db') c = conn.cursor() query = \"SELECT * FROM countries WHERE name = ?\" c.execute(query, (country,)) data = c.fetchall() conn.close()"} {"instruction": "Write a Python program to test if the inputs are equal and return a boolean value.", "input": "28, 48", "output": "def equals(a, b):\n return a == b\n\nequal = equals(28, 48)\nprint(equal)"} {"instruction": "Construct a switch statement to return either \"Nick\" or \"Jack\" base on the value of the input", "input": "Input: \"Nick\"", "output": "switch (input) { case \"Nick\": return \"Nick\"; break; case \"Jack\": return \"Jack\"; break; default: return \"Invalid Input\"; }"} {"instruction": "Write a lambda expression to select all records from a list of dictionaries with the name \"John\".", "input": "", "output": "selected_records = list(filter(lambda x:x['name']=='John', records))"} {"instruction": "Create a Python serverless function that takes in a JSON payload and performs the appropriate action based on the payload content.", "input": "Payload Example:\n{\n action: “send_email”,\n recipient: “jane@example.com”,\n subject: “Hello!”,\n message: “This is a message from Jane.”\n}", "output": "import json\nimport boto3\n\ndef send_email(event, context):\n recipient = event['recipient']\n subject = event['subject']\n message = event['message']\n\n #send email here\n\n client = boto3.client('ses')\n\n response = client.send_email(\n Source='sender@example.com',\n Destination={\n 'ToAddresses': [recipient,],\n },\n Message={\n 'Subject': {'Data': subject},\n 'Body': {'Text': {'Data': message}},\n },\n )\n\ndef handler(event, context):\n event = json.loads(event)\n response = send_email(event, context)\n return json.dumps(response)"} {"instruction": "Rewrite the following Java program in Python.", "input": "public class QuadraticEquation {\n private double a;\n private double b;\n private double c;\n \n QuadraticEquation(double a, double b, double c) {\n this.a = a;\n this.b = b;\n this.c = c;\n }\n \n public double getDiscriminant() {\n return (this.b*this.b) - 4*this.a*this.c;\n }\n \n public double getRoot1() {\n if (this.getDiscriminant() >= 0) {\n return ((-this.b + Math.sqrt(this.getDiscriminant()))/(2*this.a));\n }\n else {\n return 0;\n }\n }\n \n public double getRoot2() {\n if (this.getDiscriminant() >= 0) {\n return ((-this.b - Math.sqrt(this.getDiscriminant()))/(2*this.a));\n }\n else {\n return 0;\n }\n }\n}", "output": "class QuadraticEquation:\n def __init__(self, a, b, c):\n self.a = a\n self.b = b\n self.c = c\n \n def getDiscriminant(self):\n return (self.b**2) - 4*self.a*self.c\n \n def getRoot1(self):\n if self.getDiscriminant() >= 0:\n return ((-self.b + (self.getDiscriminant() ** 0.5))/(2*self.a))\n else:\n return 0\n \n def getRoot2(self):\n if self.getDiscriminant() >= 0:\n return ((-self.b - (self.getDiscriminant() ** 0.5))/(2*self.a))\n else:\n return 0"} {"instruction": "Create a Python function to replace all the vowels in a string with 'x'.", "input": "", "output": "def replace_vowels(s):\n vowels = ['a', 'e', 'i', 'o', 'u']\n for char in s:\n if char in vowels:\n s = s.replace(char, 'x')\n return s"} {"text": "[HI Wikipedia] मेरठ\n\nमेरठ भारत के उत्तर प्रदेश राज्य के मेरठ ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय और पश्चिमी उत्तर प्रदेश का एक बड़ा शहर है। मेरठ दिल्ली से 72 किमी (44 मील) उत्तर पूर्व में स्थित है। मेरठ राष्ट्रीय राजधानी क्षेत्र (ऍन.सी.आर) का हिस्सा है। यहाँ भारतीय सेना की एक छावनी भी है। यह उत्तर प्रदेश के सबसे तेजी से विकसित और शिक्षित होते क्षेत्रों में से एक है। इतिहास सन् १९५० में यहाँ से २३ मील उत्तर-पूर्व में स्थित एक स्थल विदुर का टीला की पुरातात्विक खुदाई से ज्ञात हुआ, कि यह शहर प्राचीन नगर हस्तिनापुर का अवशेष है, जो महाभारत काल मे कौरव राज्य की राजधानी थी।, यह बहुत पहले गंगा नदी की बाढ़ में बह गयी थी। एक अन्य किवंदती के अनुसार रावण के श्वसुर मय दानव के नाम पर यहाँ का नाम मयराष्ट्र पड़ा, जैसा की रामायण में वर्णित है। मेरठ मौर्य सम्राट अशोक के काल में (273 ईसा पूर्व से 232 ईसा पूर्व) बौद्ध धर्म का केन्द्र रहा, जिसके निर्माणों के अवशेष जामा मस्जि़द के निकट वर्तमान में मिले हैं। दिल्ली के बाड़ा हिन्दू राव अस्पताल, दिल्ली विश्वविद्यालय के निकट अशोक स्तंभ, फिरोज़ शाह तुगलक (1351 – 1388) द्वारा दिल्ली लाया गया था।, बाद में यह 1713 में, एक बम धमाके में ध्वंस हो गया, एवं 1867 में जीर्णोद्धार किया गया। बाद में मुगल सम्राट अकबर के काल में, (1556-1605), यहाँ तांबे के सिक्कों की टकसाल थी। ग्यारहवीं शताब्दी में, जिले का दक्षिण-पश्चिमी भाग, बुलंदशहर के दोर –राजा हर दत्त द्वारा शासित था, जिसने एक क़िला बनवाया, जिसका आइन-ए-अकबरी में उल्लेख भी है, तथा वह अपनी शक्ति हेतू प्रसिद्ध रहा। बाद में वह महमूद गज़नवी द्वारा 1018 में पराजित हुआ। हालाँकि शहर पर पहला बड़ा आक्रमण मोहम्मद ग़ौरी द्वारा 1192 में हुआ, किन्तु इस शहर का इससे बुरा भाग्य अभी आगे खड़ा था, जब तैमूर लंग ने 1398 में आक्रमण किया, उसे राजपूतों ने कड़ी टक्कर दी। यह लोनी के किले पर हुआ, जहाँ उन्होंने दिल्ली के सुल्तान मुहम्मद बिन तुग़लक़ से भी युद्ध किया। परंतु अन्ततः वे सब हार गये, यह तैमूर लंग के अपने उल्लेख तुज़ुक-ए-तैमूरी में मिलता है।. उसके बाद, वह दिल्ली पर आक्रमण करने आगे बढ़ गया, व वापस मेरठ पर हमला बोला, जहाँ तब एक अफ़गान मुख्य का शासन था। उसने नगर पर दो दिनों में कब्ज़ा किया, जिसमें विस्तृत विनाश सम्मिलित था और फिर वह आगे उत्तर की ओर बढ़ गया। प्रथम स्वतंत्रता संग्राम मेरठ का नाम ब्रिटिश ईस्ट इंडिया कंपनी के विरुद्ध 1857 के प्रथम स्वतंत्रता संग्राम के लिये भी प्रसिद्ध है। इस हिसाब से जनसंख्या अनुसार मेरठ शहरी क्षेत्र भारत के शहरी क्षेत्रों में 33वे स्थान पर है और भारत के शहरों में 26वे स्थान पर है। मेरठ में लिंग अनुपात 888 है, राज्य औसत 908 से कम; बाल लिंग अनुपात 847 है, राज्य औसत 899 से कम। 12.41% जनसंख्या 6 साल की उम्र से छोटी है। साक्षरता दर 78.29% है, राज्य औसत 69.72% से अधिक। 2012 अनुसार मेरठ में अपराध दर (भारतीय दंड संहिता के अंतर्गत कुल संज्ञेय अपराध प्रति लाख जनसंख्या) 309.1 है, राज्य औसत 96.4 और राष्ट्रीय औसत 196.7 से अधिक। 2001 की राष्ट्रीय जनगणना अनुसार शहर राष्ट्रीय राजधानी क्षेत्र में जनसंख्या अनुसार दूसरे स्थान पर है और राष्ट्र में 25वे स्थान पर। मेरठ में भारत के मुख्य शहरों में, सर्वाधिक…"} {"instruction": "Create a website for the company ACME with all the following pages: Home, About Us, Contact Us, FAQ and Privacy Policy.", "input": "", "output": " ACME

    ACME

    "} {"instruction": "Implement an R program to calculate the median of an integer array.", "input": "[2, 3, 4, 5]", "output": "calculate median <- function(arr){ sorted <- sort(arr) n <- length(arr) if(n%%2 == 0){ mid <- n/2 median <- (sorted[mid] + sorted[mid + 1] ) / 2 } else { mid <- (n + 1) / 2 median <- sorted[mid] } return(median) } calculate_median(c(2, 3, 4, 5))"} {"instruction": "Compute the modulo of following two numbers", "input": "56 % 7", "output": "0"} {"instruction": "Use HTML and CSS to format a page with three columns, two of which contain two paragraphs each and the last containing a list of 10 items.", "input": "", "output": " 3 Column Layout

    Paragraph 1

    Paragraph 2

    Paragraph 3

    Paragraph 4

    • Item 1
    • Item 2
    • Item 3
    • Item 4
    • Item 5
    • Item 6
    • Item 7
    • Item 8
    • Item 9
    • Item 10
    "} {"instruction": "Write a SQL query to get the employee ID, first name and last name of the all employees with the last name starting with 'G'", "input": "", "output": "SELECT employee_id, first_name, last_name FROM employees WHERE last_name LIKE 'G%';"} {"instruction": "Construct a class in Java that creates methods for finding the area and circumference of a circle.", "input": "", "output": "public class Circle { double radius; public Circle(double radius) { this.radius = radius; } public double getArea(){ return Math.PI * Math.pow(radius, 2); } public double getCircumference(){ return 2 * Math.PI * radius; } }"} {"instruction": "Develop a Python script that prints the unique words in a string, along with their respective counts.", "input": "\"The quick brown fox jumped over the lazy dog.\"", "output": "from collections import Counter\n\nstring = \"The quick brown fox jumped over the lazy dog.\"\nwords = string.split()\nword_counts = Counter(words)\n\nunique_words = set(words)\n\nfor word in unique_words:\n print(f\"{word:15} {word_counts[word]:3}\")"} {"instruction": "Create a Python script to interact with a PostgreSQL database. The script should be able to add new entries to the database.", "input": "Not applicable", "output": "import psycopg2\n\ntry:\n connection = psycopg2.connect(\n user = \"postgres\",\n password = \"your_password\",\n host = \"localhost\",\n port = \"5432\",\n database = \"your_database\"\n )\n\n cursor = connection.cursor()\n postgreSQL_select_Query = \"select * from table_name\"\n \n cursor.execute(postgreSQL_select_Query)\n \n print(\"Table Before inserting a record\")\n records = cursor.fetchall() \n \n postgres_insert_query = \"\"\" INSERT INTO table_name (column_1, column_2, colum_n) VALUES (%s,%s,%s)\"\"\"\n record_to_insert = ('value1', 'value2', 'value3')\n cursor.execute(postgres_insert_query, record_to_insert)\n connection.commit()\n\n print(\"Table After inserting a record\")\n cursor.execute(postgreSQL_select_Query)\n records = cursor.fetchall() \n\nexcept (Exception, psycopg2.Error) as error :\n print (\"Error while connecting to PostgreSQL\", error)\nfinally:\n if(connection):\n cursor.close()\n connection.close()\n print(\"PostgreSQL connection is closed\")"} {"instruction": "Write a python program to repeatedly ask the user for a string and print the number of vowels in the string.", "input": "Example string: hello", "output": "while True:\n s = input(\"Enter a string: \")\n count = 0\n for i in s:\n if(i=='a' or i=='e' or i=='i' or i=='o' or i=='u'):\n count+=1\n print(\"The number of vowels in the string:\", count)"} {"instruction": "Write a PHP code for finding the longest word in an array of strings.", "input": "$arr = [\"Hello\", \"World\", \"My\", \"Name\", \"Is\"];", "output": " strlen($longestWord)) { $longestWord = $word; } } echo \"The longest word is: \" . $longestWord; ?>"} {"text": "[DE Wikipedia] Pacific Remote Islands Marine National Monument\n\nDas Pacific Remote Islands Marine National Monument ist ein US-amerikanisches National Monument westlich und südlich von Hawaii. Es liegt in einem sogenannten „nicht-inkorporierten Territorium“ der Vereinigten Staaten, das zu statistischen Zwecken den United States Minor Outlying Islands zugeordnet wird. Das Pacific Remote Islands Marine National Monument wurde am 6. Januar 2009 von Präsident George W. Bush durch eine Presidential Proclamation mit einer Fläche von 86,888 km² ausgewiesen. Die Betreuung erfolgt durch den United States Fish and Wildlife Service (USFWS) und die National Oceanic and Atmospheric Administration. Am 25. September 2014 wurde es durch Präsident Barack Obama durch eine weitere Presidential Proclamation auf eine Fläche von 313.818.892 acres (1.269.980 km²) vergrößert. Das Schutzgebiet umfasst die Inseln und Atolle Kingmanriff, Palmyra Atoll, Howlandinsel, Bakerinsel, Jarvisinsel, Johnston-Atoll und Wake mit umgebenden Wasserflächen. Bereits vor der Ausweisung als Marine National Monument waren die meisten Inseln und Teile der Gewässer als National Wildlife Refuge ausgewiesen. Natur Im Pacific Remote Islands Marine National Monument gibt es Bäume, Gräser und Vögel die weltweit nur dort vorkommen. Es befinden sich große Seevogelbrutkolonien auf den Inseln. Meeresschildkröten, Wale, Hawaii-Mönchsrobbe und andere Meeresbewohner kommen in den Gewässern vor. Es befinden sich große Korallenriffe im Schutzgebiet. Im gesamten Pacific Remote Islands Marine National Monument ist kommerzieller Fischfang und andere Ressourcengewinnungsaktivitäten wie Tiefseebergbau verboten. Im Marine National Monument ist nur Forschung, freie Passage und Erholung erlaubt. Menschen Die Inseln haben keine Ureinwohner. Auf dem Johnston-Atoll befinden sich fünf Biologen. Noch im Jahr 2000 befanden sich 1.100 Soldaten und zivile Mitarbeiter von Bauunternehmern dort. Das US-Militär zog 2007 ab. Das Johnston-Atoll wurde von 1958 bis 1975 als Raketenstartplatz genutzt. Vom Atoll wurden auch Raketen für hochatmosphärische Tests von Wasserstoffbomben gestartet. Hier kam es zur Operation Hardtack und zur Operation Starfish Prime. Auf dem Atoll wurden Sand Island und Johnstoninsel durch radioaktiven Niederschlag kontaminiert, weil Raketen ungeplant explodierten. Nachdem es zum Verbot oberirdischen Kernwaffentests gekommen war, wurden von der Johnstoninsel bis 1975 zahlreiche Forschungsraketen gestartet. Die Johnstoninsel diente ab 1971 auch als Lager für chemische Kampfstoffe wie Sarin und Agent Orange. Ende der 1980er Jahre wurde auf der Insel eine Anlage, das Johnston Atoll Chemical Agent Disposal System (JACADS), für die Verbrennung chemischer Kampfstoffe errichtet. Anfang der 1990er Jahre wurden hier beispielsweise im Zuge der Aktion Lindwurm zuvor in der Pfalz…"} {"text": "[HI Wikipedia] जावास्क्रिप्ट\n\nजावास्क्रिप्ट, संक्षेप में जेएस, एचटीएमएल और सीएसएस के साथ, वर्ल्ड वाइड वेब की एक मुख्य भाषा है। 2022 तक, 98% वेबसाइट क्लाइंट साइट में जावास्क्रिप्ट का इस्तेमाल करती है। ज़्यादातर ब्राउज़र में यूज़र के तरफ से कोड चालू करने के लिए कोई जावास्क्रिप्ट इंजन है। प्रमुख विशेषताएं जाल पृष्ठों के गत्यात्मक (dynamic) बनाने में उपयोगी क्लाएंट साइड में (प्रयोक्ता के कम्प्यूटर पर) चलती है। यह एक इन्टरप्रिटेड भाषा है। आब्जेक्ट ओरिएन्टेड भाषा है। इसमें प्रथम श्रेणी के फंशन हैं। जावास्क्रिप्ट का सिन्टैक्स, सी के सिन्टैक्स से प्रभावित है। जावास्क्रिप्ट का वास्तविक नाम \"ECMAScript\" है। यद्यपि इसके नाम में जावा शब्द आया हुआ है, तथापि इसका जावा नामक प्रोग्रामन भाषा से कोई सम्बन्ध नही है। हाँ, जावा तथा जावास्क्रिप्ट दोनो का सिन्टैक्स, सी के सिन्टैक्स से प्रभावित है। जावास्क्रिप्ट की डिजाइन के मुख्य सिद्धान्त सेल्फ (Self) नामक प्रोग्रामिंग भाषा से लिये गये हैं। जावास्क्रिप्ट के विभिन्न उपयोग जावास्क्रिप्ट, एचटीएमएल डिजाइनरों के लिये प्रोग्रामिंग की सुविधा प्रदान करती है। जावास्क्रिप्ट, एचटीएमएल पृष्ठों में गतिशील टेक्स्ट (dynamic text) डालने की सुविधा देती है। उदाहरणः document.write(\"

    \" + name + \"

    \") उपरोक्त जावास्क्रिप्ट स्टेटमेन्ट, किसी HTML पेज में चर-पाठ (variable text) लिखने के लिये प्रयोग किया जा सकता है। जावास्क्रिप्ट, घटनाओं (events) के अनुसार वांछित प्रतिक्रिया करने के लिये उपयोग की जाती है। उदाहरण के लिये किसी एचटीएमएल पेज के किसी बटन पर क्लिक करने पर कोई पूर्व-निर्धारित कार्य करने के लिये। जावास्क्रिप्ट, elements को पढ़ या लिख सकती है। इसका अर्थ यह हुआ कि किसी HTML पेज के किसी अवयव के बारे में जानकारी प्राप्त करके उसे बदला या हटाया जा सकता है। इस तरह उस पेज को परिवर्तित कर सकते हैं। जावास्क्रिप्ट, आंकड़ों की जाँच-परख कर सकती है। किसी फार्म के प्रयोक्ता द्वारा उस फार्म में भरे गये आंकडों को पहले जाँच लेने के बाद सर्वर के पास भेजने से सुविधा हो जाती है। इससे सर्वर का समय बचता है और प्रयोक्ता को भी त्रुटियों की जानकारी जल्दी हो जाती है। जावास्क्रिप्ट, किसी पेज पर आये आगन्तुक () के ब्राउजर के बारे में जानकारी प्राप्त कर सकती है। इसका उपयोग करके उस ब्राउजर के अनुकूल समुचित व्यवहार कर सकती है ताकि वह पेज सभी ब्राउजरों में ठीक से दिखाया जा सके। जावास्क्रिप्ट का प्रयोग कुक्की (cookies) के निर्माण में किया जा सकता है। जावास्क्रिप्ट के अवयव ऑब्जेक्ट जावास्क्रिप्ट में हर चीज या तो मूल मान (primitive value) होता है या ऑब्जेक्ट। जाल पृष्ठों के निर्माण में जावास्क्रिप्ट जावास्क्रिप्ट का मुख्य उपयोग ऐसे फंशन लिखने में होता है जो HTML पेजों में अन्तर्निहित (embedded) होते हैं। नीचे एक उदाहरण दिया गया है जो दर्शाता है कि HTML में जावास्क्रिप्ट किस प्रकार समाहित (include) करते हैं। simple page बाहरी कड़ियाँ Javascript क्या है? यह HTML और CSS से कैसे अलग है? जावास्क्रिप्ट ट्यूटोरिअल…"} {"text": "[CS Wikipedia] Vražda Jána Kuciaka a Martiny Kušnírové\n\nVražda Jána Kuciaka a Martiny Kušnírové byla spáchána 21. února 2018 v západoslovenské obci Veľká Mača nedaleko Trnavy. Slovenský investigativní novinář Ján Kuciak byl zastřelen ve věku 27 let i se svou partnerkou Martinou Kušnírovou. Byl usmrcen dvěma střelami do srdce, jeho partnerka střelou do hlavy. K vraždě se později přiznal bývalý profesionální voják Miroslav Marček a jako zprostředkovatel Zoltán Andruskó. Specializovaný trestní soud v Pezinku v září 2020 prozatím nepravomocně potvrdil vinu spolupachatele, bývalého policisty a Marčekova bratrance Tomáše Szabóa, zprostil však viny podnikatele Mariána Kočnera, který byl obžalovaný z objednání vraždy, i jeho asistentku a údajně zprostředkovatelku Alenu Zsuzsovou. Vyšetřování Velitel elitní policejní jednotky NAKA Peter Hraško uvedl pro deník Sme, že bude případ vyšetřovat jako úkladnou vraždu. Slovenský policejní prezident Tibor Gašpar na tiskové konferenci 26. února uvedl, že vražda zřejmě souvisí s Kuciakovou prací novináře; uvedl také, že policie nabídla vybraným žurnalistům ochranu jejich obydlí a zařízení pro rychlé přivolání pomoci, tzv. „panic button“. Slovenská vláda následně vyhlásila odměnu 1 milion Eur za informace vedoucí k dopadení pachatele. Během prvního dne vyšetřování slovenská policie vyslechla asi 20 lidí. Policejní prezident Gašpar uvedl, že pracuje s několika vyšetřovacími verzemi a sama oslovila nebo byla kontaktována zahraničními bezpečnostními sbory a agenturami z Česka, Itálie i Europolem. Zmínil, že případ má svou českou stopu. Ve čtvrtek 1. března slovenská policie zadržela italského podnikatele Antonina Vadalu, jeho bratra i bratrance a provedla razie v domě a objektech spojených s jeho aktivitami v Michalovcích a v Trebišově; všech sedm zadržených Italů bylo propuštěno v noci na sobotu 3. března. V úterý 13. března zadržela slovenská policie Vadalu znovu, a to na základě evropského zatýkacího rozkazu, vydaného italským soudem kvůli drogové trestné činnosti. V pátek 16. března byl zadržen i Vadalův bratr. V srpnu 2018, půl roku po dvojnásobné vraždě, skupina zhruba 300 slovenských novinářů publikovala otevřený dopis zpochybňující nezávislost policejního vyšetřování. V polovině září 2018 slovenská speciální prokuratura oznámila, že motivem vraždy byla skutečně Kuciakova novinářská práce, a zveřejnila identikit muže, který se měl údajně pohybovat v okolí místa činu. Před koncem září již slovenská média informovala o tom, že policie zadržela osm osob podezřelých z vraždy, mezi nimi také bývalého policejního vyšetřovatele z Komárna Tomáše Szabó či jeho bratrance; objednavatel vraždy však ještě nebyl znám. Obviněna byla i Alena Zsuzsová, pracující jako tlumočnice italštiny pro podnikatele Mariána Kočnera, která měla zprostředkovat objednání. Vedle střelce Tomáše Szabó měl…"} {"text": "[DE Wikipedia] Mącze\n\nMącze () ist ein Dorf in der polnischen Woiwodschaft Ermland-Masuren, der zur Gmina Ełk (Landgemeinde Lyck) im Powiat Ełcki (Kreis Lyck) gehört. Geographische Lage Mącze liegt südlich der beiden kleinen Seen Jezioro Mącze Duże und Jezioro Mącze Małe im südlichen Osten der Woiwodschaft Ermland-Masuren, sieben Kilometer südwestlich der Kreisstadt Ełk (Lyck). Geschichte Um das Jahr 1539 wurde das vor 1785 Holtunien, nach 1785 Montschen, nach 1818 Moncien und bis 1938 Monczen genannte Dorf gegründet. Von 1874 bis 1945 war das Dorf in den Amtsbezirk Lyck-Land mit Sitz in Neuendorf () eingegliedert, der zum Kreis Lyck im Regierungsbezirk Gumbinnen (ab 1905: Regierungsbezirk Allenstein) der preußischen Provinz Ostpreußen gehörte. Im Jahr 1910 waren in Monczen 106 Einwohner registriert. Aufgrund der Bestimmungen des Versailler Vertrags stimmte die Bevölkerung im Abstimmungsgebiet Allenstein, zu dem Monczen gehörte, am 11. Juli 1920 über die weitere staatliche Zugehörigkeit zu Ostpreußen (und damit zu Deutschland) oder den Anschluss an Polen ab. In Monczen stimmten 80 Einwohner für den Verbleib bei Ostpreußen, auf Polen entfielen keine Stimmen. Die Einwohnerzahl betrug im Jahre 1933 103 und belief sich – nachdem das Dorf am 3. Juni 1938 die Umbenennung in „Montzen“ erhalten hatte – im Jahr 1939 auf 115. In Kriegsfolge kam das Dorf 1945 mit dem gesamten südlichen Ostpreußen zu Polen und trägt seither die polnische Namensform „Mącze“. Heute ist es Sitz eines Schulzenamtes () und gehört somit zum Verbund der Gmina Ełk (Landgemeinde Lyck) im Powiat Ełcki (Kreis Lyck), vor 1998 der Woiwodschaft Suwałki, seither der Woiwodschaft Ermland-Masuren zugehörig. Religionen Bis 1945 war Monczen in die evangelische Pfarrkirche Lyck in der Kirchenprovinz Ostpreußen der Kirche der Altpreußischen Union sowie in die katholische St.-Adalbert-Kirche Lyck im Bistum Ermland eingepfarrt. Auch heute noch besteht für Mącze die kirchliche Verbindung zur Kreisstadt. Verkehr Mącze ist von Talusy (Thalussen, 1938 bis 1945 Talussen) an der polnischen Landesstraße 16 (einstige deutsche Reichsstraße 127) aus über eine – zum Teil recht unwegsame – Nebenstraße in Richtung Szarejki (Sareyken, 1938 bis 1945 Sareiken) zu erreichen. Einzelnachweise Ort der Woiwodschaft Ermland-Masuren Ełk (Landgemeinde)"} {"text": "[CS Wikipedia] Rolls-Royce Derwent\n\nRolls-Royce RB.37 Derwent je britský proudový motor ze 40. let s odstředivým kompresorem a druhý proudový motor firmy Rolls-Royce Limited, který vstoupil do výroby. V podstatě jde o vylepšenou verzi motoru Rolls-Royce Welland, který byl přejmenovanou verzí motoru W.2B firmy Franka Whittla Power Jets. Rolls Royce zdědil návrh Derwentu od firmy Rover, když v roce 1943 převzali vývoj proudových motorů. Derwent byl výkonnější než Welland a také spolehlivější, takže byl Derwent zvolen jako motor pro Gloster Meteor a mnoho dalších britských poválečných proudových letounů. Několik motorů Derwent a Nene bylo tehdejší labouristickou vládou prodáno Sovětskému svazu, což způsobilo politický poprask, neboť Nene byl v té době nejvýkonnějším proudovým motorem na světě. Sověti okamžitě konstrukci modelu Derwent V okopírovali a vyrobili vlastní nelicenční verzi – Klimov RD-500. Nene byl také okopírován a vytvořil pohonnou jednotku pro slavnou stíhačku MiG-15. Derwent Mk.V byl také použit na kanadském stroji Avro Jetliner, ale ten se do výroby nedostal. 7. listopadu 1945 Gloster Meteor s motorem Derwent V ustanovil světový rychlostní rekord 975 km/h TAS. Varianty Derwent I – první verze, tah 2 000 lbf (8,9 kN) Derwent II – tah zvýšen na 2 200 lbf (9,8 kN) Derwent III – experimentální varianta Derwent IV – tah zvýšen na 2 400 lbf (10,7 kN) Derwent 5 – zmenšená verze motoru Rolls-Royce Nene s tahem 3 500 lbf (15,6 kN) Derwent 8 – vývojová verze s tahem 3 600 lbf (16,0 kN) Použití Avro 707 Avro Canada C102 Jetliner Fairey Delta 1 Fokker S.14 Machtrainer Gloster Meteor Nord 1601 FMA I.Ae. 27 Pulqui I Specifikace (Derwent I) Technické údaje Typ: proudový motor Průměr: 1 092,2 mm Délka: 2 133,6 mm, Derwent V 2 247.9 mm Hmotnost suchého motoru: 442,3 kg, Derwent V 567 kg Součásti Kompresor: jednostupňový oboustranný radiální kompresor Spalovací komora: trubková Turbína: jednostupňová axiální Palivo: Kerosin (R.D.E.F./F/KER) Výkony Maximální tah: 2 000 lbf (8,90 kN) při 16 000 rpm na úrovni mořské hladiny, Derwent V 4 000 lbf (17,79 kN) při 15,000 rpm na úrovni mořské hladiny Celkový poměr stlačení: 3.9:1 Teplota plynů před turbínou: 849 °C Měrná spotřeba paliva: 119,25 kg/(kN h), Derwent V 103,97 kg/(kN h) Poměr tah/hmotnost: 0,0199 kN/kg, Derwent V 0,0316 kN/kg Externí odkazy Derwent Proudové motory"} {"instruction": "Create a web page with a form for user input of a modified text.", "input": "", "output": "

    "} {"instruction": "Given a valid XML string, write an XPath query to retrieve all the elements", "input": " subchild ", "output": "// XPath query to retrieve all elements from the given XML string /root/child"} {"instruction": "Generate a sentence using GPT-3.", "input": "GPT-3 is an AI language model developed by OpenAI.", "output": "GPT-3 is an advanced AI language model that can generate sentences and paragraphs of text that are relevant and coherent to a given context."} {"instruction": "Can you design a Python program that evaluates the following formula?", "input": "\"2*x + 4*y - z = 10\"", "output": "def evaluate_formula(x, y, z):\n return 2*x + 4*y - z == 10"} {"text": "[EN Wikipedia] Pararrhaptica perkinsiana\n\nPararrhaptica perkinsiana is a moth of the family Tortricidae. It was first described by Lord Walsingham in 1907. It is endemic to the Hawaiian islands of Molokai and Maui. It is the type species of the genus Pararrhaptica. External links Archipini Endemic moths of Hawaii Biota of Molokai Biota of Maui"} {"instruction": "Write a code to fetch the contents of a website using Python", "input": "", "output": "# Import the necessary packages \nimport requests \n \n# Make an API call and store the response \nurl = 'https://example.com/'\nr = requests.get(url) \n \n# Extract the content of the response \nhtml_content = r.content \n \n# Print the response \nprint(html_content)"} {"instruction": "Develop a Python3 program to extract the words of length 3 from a given sentence.", "input": "\"The quick brown fox jumped over the lazy dog\"", "output": "def extract_words(s): words = s.split() length_3_words = [] for word in words: if len(word) == 3: length_3_words.append(word) return length_3_words s = \"The quick brown fox jumped over the lazy dog\" print(extract_words(s))"} {"instruction": "Write a code to print out an array of the first ten positive even numbers.", "input": "", "output": "def printEvenNumbers(): my_list = [] for item in range(2,21,2): my_list.append(item) print(my_list) printEvenNumbers() # prints [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]"} {"instruction": "Submit a valid Ruby program to remove special characters from a given string", "input": "Hello$#@World!", "output": "def remove_special_chars(str) str = str.gsub(/[^a-zA-Z0-9\\s]/, '') return str end puts remove_special_chars(\"Hello$#@World!\")"} {"instruction": "Create a function in Python which takes a string and reverses it.", "input": "", "output": "def reverse_string(my_string): return my_string[::-1]"} {"instruction": "Write a Python program to sort a list of dictionaries by a key in each dictionary.", "input": "my_list = [{'name': 'Tom', 'age': 25}, {'name': 'John', 'age': 21}, {'name': 'Adam', 'age': 26}]", "output": "def sort_list_of_dicts_by_key(my_list, key):\n return sorted(my_list, key=lambda k: k[key])"} {"text": "[DE Wikipedia] Razorworks\n\nRazorworks war ein Entwicklerstudio von Videospielen mit Sitz in Oxfordshire, Großbritannien. Es wurde im August 1996 gegründet und gehörte seit 2000 dem Videospiel-Hersteller Empire Interactive. Das Razorworks-Studio wurde im Juli 2008 aufgrund der schlechten finanziellen Situation von Empire Interactive vom britischen Entwickler Rebellion aufgekauft. Geschichte Das Unternehmen entwickelte zunächst Kampfflugsimulatoren und verlagerte schließlich seinen Schwerpunkt auf Autorennspiele. Das Entwicklerstudio hat insgesamt vierzehn Spiele auf verschiedenen Plattformen veröffentlicht, darunter PC, PlayStation 2, PSP, Xbox, Xbox 360, Wii, Nintendo DS und für Sega-Arcade-Machines. Razorworks wurde im Jahr 2000 von Empire Interactive übernommen. Die Muttergesellschaft Empire Interactive geriet Ende der 2000er Jahre in ernste finanzielle Schwierigkeiten. Am 11. Juni 2008 wurde bekanntgegeben, dass Razorworks geschlossen wird, um Kosten zu senken. Am 19. Juli 2008 gaben die britischen Entwickler von Rebellion bekannt, dass sie die Vermögenswerte und den größten Teil der Mitarbeiter von Razorworks erworben haben. Das Team wurde in das eigene Oxford-Studio von Rebellion integriert, operierte aber nicht mehr unabhängig und das Branding wurde eingestellt. Die Schwierigkeiten von Empire Interactive setzten sich fort und das Unternehmen kündigte am 4. Mai 2009 seine eigene Schließung und Liquidation an. Spiele Einzelnachweise Spielesoftwareunternehmen (Vereinigtes Königreich) Unternehmen (Oxfordshire) Gegründet 1996 Aufgelöst 2008"} {"instruction": "Build a Python program to find the maximum element in a list of numbers.", "input": "[4, 9, 10, 11, 12]", "output": "def maxNum(numsList):\n maxNum = numsList[0]\n for num in numsList:\n if num > maxNum:\n maxNum = num\n return maxNum\n\nnumList = [4, 9, 10, 11, 12]\nprint(\"The maximum number in the list is:\", maxNum(numList))"} {"text": "[CS Wikipedia] Åke Johansson\n\nÅke „Bajdoff“ Johansson (19. března 1928, Norrköping, Švédsko – 21. prosince 2014) byl švédský fotbalista, který hrával na pozici záložníka. V roce 1957 získal ve Švédsku ocenění Guldbollen pro nejlepšího fotbalistu roku. Klubová kariéra Celou svou kariéru strávil v klubu IFK Norrköping, se kterým vyhrál šestkrát titul ve švédské první lize Allsvenskan. Bylo to v letech 1952, 1956, 1957, 1960, 1962 a 1963. Za klub odehrál 321 zápasů, což je k roku 2012 stále klubový rekord. Reprezentační kariéra Nastupoval za švédskou fotbalovou reprezentaci. Celkem odehrál v národním týmu 53 zápasů, vstřelil jednu branku. Účast Åke Johanssona na vrcholových turnajích: Mistrovství světa 1958 ve Švédsku (2. místo po finálové porážce 2:5 s Brazílií, zisk stříbrných medailí, byl pouze náhradníkem a nenastoupil do žádného zápasu) Reprezentační góly Góly Åke Johanssona za A-tým Švédska Odkazy Reference Externí odkazy Profil hráče, reprezentační zápasy na eu-football.info Švédští fotbalisté Fotbalisté IFK Norrköping Narození v roce 1928 Muži Fotbaloví záložníci Úmrtí v roce 2014 Narození 19. března Úmrtí 21. prosince Švédští fotbaloví reprezentanti Hráči Mistrovství světa ve fotbale 1958"} {"instruction": "Find all substrings of a string that are palindromes in Python.", "input": "", "output": "def get_all_palindromes(input_string): palindromes = [] for substring_length in range(len(input_string)): for i in range(len(input_string) - substring_length + 1): sub_string = input_string[i: i + substring_length] if sub_string == sub_string[::-1]: palindromes.append(sub_string) return palindromes # Usage palindromes = get_all_palindromes(\"banana\") print(palindromes) # ['a', 'ana', 'anana', 'b', 'na', 'nana']"} {"instruction": "Create a SQL statement that updates a table called 'students' with a new entry.", "input": "name = \"John Doe\" age = 21", "output": "INSERT INTO students (name, age) VALUES (\"John Doe\", 21);"} {"instruction": "Generate all possible permutations of the characters in a given string", "input": "", "output": "def permutations(string): \"\"\" Function to generate all possible permutations of a given string \"\"\" if len(string) == 0: return [''] prev_list = permutations(string[1:len(string)]) next_list = [] for i in range(0,len(prev_list)): for j in range(0,len(string)): new_string = prev_list[i][0:j]+string[0]+prev_list[i][j:len(string)-1] if new_string not in next_list: next_list.append(new_string) return next_list if __name__ == '__main__': string = 'abcd' print(permutations(string)) # should print ['abcd', 'bacd', 'bcad', 'bcda', 'acbd', 'cabd', 'cbad', 'cbda', 'acdb', 'cadb', 'cdab', 'cdba', 'dabc', 'dbac', 'bdac', 'bdca', 'dacb', 'dcab', 'dcba', 'adbc', 'dbca', 'dcab', 'dcba']"} {"instruction": "Write a python function to compare two strings and return 1 if the strings are anagrams, 0 if not.", "input": "\"bob\", \"bob\"", "output": "def is_anagram(string1, string2):\n string1 = sorted(string1.replace(\" \", \"\").lower())\n string2 = sorted(string2.replace(\" \", \"\").lower())\n \n if string1 == string2:\n return 1\n else:\n return 0"} {"text": "[EN Wikipedia] Aristotle\n\nAristotle (; Aristotélēs, ; 384–322 BC) was an Ancient Greek philosopher and polymath. His writings cover a broad range of subjects spanning the natural sciences, philosophy, linguistics, economics, politics, psychology and the arts. As the founder of the Peripatetic school of philosophy in the Lyceum in Athens, he began the wider Aristotelian tradition that followed, which set the groundwork for the development of modern science. Little is known about Aristotle's life. He was born in the city of Stagira in northern Greece during the Classical period. His father, Nicomachus, died when Aristotle was a child, and he was brought up by a guardian. At 17 or 18 he joined Plato's Academy in Athens and remained there till the age of 37 (). Shortly after Plato died, Aristotle left Athens and, at the request of Philip II of Macedon, tutored his son Alexander the Great beginning in 343 BC. He established a library in the Lyceum which helped him to produce many of his hundreds of books on papyrus scrolls. Though Aristotle wrote many elegant treatises and dialogues for publication, only around a third of his original output has survived, none of it intended for publication. Aristotle provided a complex synthesis of the various philosophies existing prior to him. His teachings and methods of inquiry have had a significant global impact, and as a result, his philosophy has exerted an influence across the world and it continues to be a subject of contemporary philosophical discussion. Aristotle's views profoundly shaped medieval scholarship. The influence of his physical science extended from late antiquity and the Early Middle Ages into the Renaissance, and was not replaced systematically until the Enlightenment and theories such as classical mechanics were developed. Some of Aristotle's zoological observations found in his biology, such as on the hectocotyl (reproductive) arm of the octopus, were disbelieved until the 19th century. He influenced Judeo-Islamic philosophies during the Middle Ages, as well as Christian theology, especially the Neoplatonism of the Early Church and the scholastic tradition of the Catholic Church. Aristotle was revered among medieval Muslim scholars as \"The First Teacher\", and among medieval Christians like Thomas Aquinas as simply \"The Philosopher\", while the poet Dante called him \"the master of those who know\". His works contain the earliest known formal study of logic, and were studied by medieval scholars such as Peter Abelard and Jean Buridan. Aristotle's influence on logic continued well into the 19th century. In addition, his ethics, though always influential, gained renewed interest with the modern advent of virtue ethics. Life In general, the details of Aristotle's life are not well-established. The biographies written in…"} {"text": "[DE Wikipedia] Samuele Sangalli\n\nSamuele Sangalli (* 10. September 1967 in Lecco) ist ein italienischer römisch-katholischer Geistlicher und Kurienbeamter. Leben Samuele Sangalli empfing am 8. Juni 1996 das Sakrament der Priesterweihe für das Erzbistum Mailand. Er erlangte an der Universität Rom III einen Abschluss in Erziehungswissenschaft und wurde an der Päpstlichen Universität Gregoriana in Philosophie promoviert. An der Päpstlichen Fakultät Teresianum erwarb er zudem ein Lizenziat in spiritueller Theologie. Sangalli war Mitarbeiter des Dikasteriums für die Bischöfe und lehrt als Professor an der Päpstlichen Universität Gregoriana sowie an der Libera Università Internazionale degli Studi Sociali. Am 25. April 2023 ernannte ihn Papst Franziskus zum Untersekretär der zweiten Sektion des Dikasteriums für die Evangelisierung für die Erstevangelisierung und die neuen Teilkirchen. Weblinks Einzelnachweise Römisch-katholischer Geistlicher (20. Jahrhundert) Römisch-katholischer Geistlicher (21. Jahrhundert) Person (Römische Kurie) Hochschullehrer (Päpstliche Universität Gregoriana) Absolvent der Päpstlichen Universität Gregoriana Italiener Geboren 1967 Mann"} {"instruction": "Using the provided input, write a Python program to calculate the sum of the digits of a given number.", "input": "number = 123", "output": "def sum_of_digits(number):\n result = 0\n while number > 0:\n result += number % 10\n number = number // 10\n return result\n \nif __name__ == '__main__':\n number = 123\n print(sum_of_digits(number))"} {"instruction": "Create an automated bot in Python Selenium to fill out a web form with the provided data.", "input": "Name: Joseph Smith \nAddress: 123 Main Street\nCity, State Zip : New York, NY 12345\nCountry : United States", "output": "from selenium import webdriver\n\n# open web browser\ndriver = webdriver.Chrome()\ndriver.get(\"https://example.com/form\")\n\n# fill out form\nname_field = driver.find_element_by_id(\"name\")\nname_field.send_keys(\"Joseph Smith\")\n\naddress_field = driver.find_element_by_id(\"address\")\naddress_field.send_keys(\"123 Main Street\")\n\ncity_field = driver.find_element_by_id(\"city\")\ncity_field.send_keys(\"New York\")\n\nstate_field = driver.find_element_by_id(\"state\")\nstate_field.send_keys(\"NY\")\n\nzip_field = driver.find_element_by_id(\"zip\")\nzip_field.send_keys(\"12345\")\n\ncountry_field = driver.find_element_by_id(\"country\")\ncountry_field.send_keys(\"United States\")\n\n# submit form\nsubmit_button = driver.find_element_by_id(\"submit\")\nsubmit_button.click()"} {"instruction": "Generate a sequence of instructions to debug a Python Program.", "input": "", "output": "1. Check your syntax − Check if there is any syntax error in your program. \n2. Check for runtime errors − Check if the program can be compiled without errors.\n3. Check the logic − Check if your program follows the intended logic and produces desired output. \n4. Add logging and debugging statements − Use print statements or logging functions for trace debugging and test the program execution.\n5. Use a debugger − A debugger allows you to step through the execution of a program and inspect the values of variables at each step."} {"instruction": "What would be the resulting string after executing this code?", "input": "a = \"Hello\" b = \"World\" c = a + \" \" + b c = f\"{c}!\"", "output": "c = \"Hello World!\""} {"text": "[DE Wikipedia] Rakovo\n\nRakovo (ungarisch Nagyrákó) ist eine Gemeinde im Norden der Slowakei mit Einwohnern (Stand ), die zum Okres Martin, einem Teil des Žilinský kraj, gehört und zur traditionellen Landschaft Turz gezählt wird. Geographie Die Gemeinde befindet sich im Mittelteil des Turzbeckens (slowakisch Turčianska kotlina) am rechten Ufer des Turiec, knapp oberhalb der Mündung dessen rechtsufrigen Zuflusses Blatnický potok. Das Ortszentrum liegt auf einer Höhe von und ist 10 Kilometer von Martin entfernt. Nachbargemeinden sind Príbovce im Norden, Ďanová im Osten, Karlová und Laskár im Süden, Ležiachov im Südwesten und Benice im Westen. Geschichte Rakovo wurde zum ersten Mal 1244 in einem Schenkungsakt von Béla IV. an den Kaplan Martin als Rakouch schriftlich erwähnt. Weitere historische Namensformen sind unter anderen Rakouch (1351), Rakov (1489), Rakowfalwa (1543), Rakowa (1622), Nagy Rokó alias Rakowo (1736) und Welke Rakowo (1773) Vom 16. bis zum 20. Jahrhundert war das Dorf Besitz des Turzer Geschlechts Rakovský, das maßgeblich an der Geschichte des Ortes beteiligt ist. 1785 hatte die Ortschaft 35 Häuser und 237 Einwohner, 1828 zählte man 32 Häuser und 204 Einwohner, die als Landwirte beschäftigt waren. 1902 wurde der bisher selbständige Ort Lehôtka eingemeindet. Bis 1918 gehörte der im Komitat Turz liegende Ort zum Königreich Ungarn, kam danach zur Tschechoslowakei beziehungsweise heute Slowakei. Bevölkerung Nach der Volkszählung 2011 wohnten in Rakovo 311 Einwohner, davon 299 Slowaken und ein Tscheche. Ein Einwohner gab eine andere Ethnie an und 10 Einwohner machten keine Angabe zur Ethnie. 138 Einwohner bekannten sich zur römisch-katholischen Kirche, 76 Einwohner zur Evangelischen Kirche A. B. sowie jeweils ein Einwohner zur evangelisch-methodistischen Kirche und zur jüdischen Gemeinde. 73 Einwohner waren konfessionslos und bei 22 Einwohnern wurde die Konfession nicht ermittelt. Bauwerke Landsitz im Barockstil aus dem Jahr 1763, in der ersten Hälfte des 19. Jahrhunderts klassizistisch gestaltet Friedhofskapellen aus der zweiten Hälfte des 19. Jahrhunderts Verkehr In Rakovo befindet sich der Bahnhof Príbovce-Rakovo an der Bahnstrecke Salgótarján–Vrútky (Teilstrecke Diviaky–Vrútky). Östlich am Ort vorbei verläuft die Straße 1. Ordnung 65 zwischen Martin und Turčianske Teplice. Söhne und Töchter der Gemeinde Martin Rakovský (1535?–1579), Dichter und humanistischer Gelehrter Tido J. Gašpar (1893–1972), Schriftsteller Einzelnachweise Weblinks Eintrag auf e-obce.sk (slowakisch) Ort in der Slowakei Ersterwähnung 1244"} {"instruction": "Classify the following text as valid or invalid python code", "input": "sum = 0\nsum = sum + 2", "output": "Valid"} {"text": "[EN Wikipedia] Azariah S. Partridge\n\nAzariah S. Partridge (December 19, 1834April 28, 1901) was a Michigan politician. Early life Partridge was born on December 19, 1834 in Saratoga County, New York. Around 1856, Partridge moved to Flushing Township, Michigan. Partridge worked as a teacher for several years. Political career Partridge was a farmer and a fruit grower. In 1874, Partridge served as drain commissioner for Flushing Township. On January 5, 1881, Partridge was elected as a member of the Michigan House of Representatives from the Genesee County 1st district as a Republican. He held this seat until 1882. In 1886, Partridge ran unsuccessfully as a Prohibitionist candidate for the position of United States Representative from Michigan's 6th District. Partridge became a member of the Michigan Prohibition Party State Central Committee in 1887. Partridge ran unsuccessfully as a Prohibitionist candidate in the 1890 Michigan gubernatorial election. Henry I. Allen, of Schoolcraft, Michigan, ran as the Prohibitionist candidate for lieutenant governor alongside Partridge. In 1894, Partridge ran unsuccessful once again for the position of United States Representative from Michigan's 6th District as a Populist candidate. Around 1898, Partridge moved to Mount Clemens, Michigan. Personal life Partridge had a stroke on the Partridge married Lura Penoyer on February 7, 1862. She was the first white woman to be born in the Flushing area. Together they had four children. Lura died on May 11, 1892. Partridge was a Freemason. Partridge was Baptist. Death Partridge had a stroke of paralysis on April 23, 1901. On April 27, he had another stroke. On April 28, Partridge died in his home in Mount Clemens. He is interred at Flushing City Cemetery. References 1834 births 1901 deaths American Freemasons Baptists from Michigan Farmers from Michigan People from Saratoga County, New York People from Genesee County, Michigan Republican Party members of the Michigan House of Representatives Michigan Prohibitionists Michigan Populists Burials in Michigan 19th-century American politicians"} {"instruction": "Create an API endpoint for handling user authentication.", "input": "Endpoint URL: www.example.com/auth", "output": "@app.route(\"/auth\", methods=['POST']) def auth(): data = request.get_json() username = data.get(\"username\") password = data.get(\"password\") user = User.check_user_auth(username, password) if user: session['username'] = username return jsonify(success=True) else: return jsonify(success=False)"} {"instruction": "Create a SQL query to insert sample data into an 'employees' table.", "input": "", "output": "INSERT INTO employees (id, first_name, last_name, age, email) VALUES (1, 'John', 'Doe', 25, 'john.doe@example.com'), (2, 'Jane', 'Doe', 30, 'jane.doe@example.com'), (3, 'Jim', 'Smith', 32, 'jim.smith@example.com');"} {"instruction": "Write an algorithm in C++ for linear search.", "input": "", "output": "// C++ implementation of the linear search #include using namespace std; // A iterative linear search function to search 'x' in arr[] // of size 'n' int search(int arr[], int n, int x) { int i; for (i = 0; i < n; i++) if (arr[i] == x) return i; return -1; } int main() { int arr[] = { 2, 3, 4, 10, 40 }; int x = 10; int n = sizeof(arr) / sizeof(arr[0]); int result = search(arr, n, x); (result == -1) ? cout<<\"Number not found\" : cout<<\"Number found at index \"< 0:\n binary = n % 2\n binString = str(binary) + binString\n n = n//2\n \n return binString\n \n# Driver Code \nn = int(input(\"Enter a number: \"))\n \nresult = decToBin(n)\nprint(\"The binary representation is \", result)"} {"instruction": "Write a generative program in Python to generate a sentence of text.", "input": "Noun and verb list:\nNouns: car, cat, dog, woman\nVerbs: drove, meowed, barked, laughed", "output": "import random \n \nnouns = [\"car\", \"cat\", \"dog\", \"woman\"]\nverbs = [\"drove\", \"meowed\", \"barked\", \"laughed\"]\n\ndef generate_sentence():\n random_int1 = random.randint(0, 3)\n random_int2 = random.randint(0, 3)\n sentence = f\"The {nouns[random_int1]} {verbs[random_int2]}.\"\n return sentence\n\ngenerate_sentence() #returns e.g. \"The car meowed.\""} {"instruction": "Write a script in Python which takes a two-dimensional array as input and finds the smallest number in the array.", "input": "array = [[2,3,4], [5,6,7], [-1,2,0]]", "output": "def find_smallest(array):\n smallest_item = array[0][0]\n for row in array:\n for item in row:\n if item < smallest_item:\n smallest_item = item\n return smallest_item"} {"instruction": "Write a JavaScript function to check if a number is a whole number or has decimals.", "input": "", "output": "const isWholeNumber = (num) => { if (num % 1 === 0) return true return false }"} {"instruction": "Write a function that takes two strings as parameters and returns whether they are an anagram of each other or not.", "input": "string1 = \"abcde\" string2 = \"edcba\"", "output": "def is_anagram(string1, string2): if sorted(string1) == sorted(string2): return True else: return False if __name__ == '__main__': string1 = \"abcde\" string2 = \"edcba\" result = is_anagram(string1, string2) print(result)"} {"instruction": "What type of search algorithm is used to find the shortest path between two points?", "input": "", "output": "The type of search algorithm used to find the shortest path from two points is called Dijkstra's Algorithm."} {"text": "[CS Wikipedia] Berounka\n\nBerounka () je významná česká řeka v západní části republiky (Plzeňský, Středočeský kraj a Praha) a největší levostranný přítok Vltavy. Vzniká v Plzni soutokem Mže a Radbuzy, je dlouhá 139,1 km, s nejdelší zdrojnicí (Radbuza-Úhlava) 252 km. Povodí má rozlohu 8 855,47 km², z čehož se 35,96 km² (29,23 km² Mže a 6,73 km² Úhlava) nachází na území Bavorska. Prameny zdrojnic se nacházejí v pohořích Český les a Šumava. Nejvyšších průtoků dosahuje řeka na jaře. Ústí do Vltavy na území Prahy u Lahovic. Pojmenování řeky Pojmenování řeky historicky Dle historických studií o geografii Čech se v mapě od Cirigingerově z r. 1568 vyskytuje název pro spojený tok čtyř řek, které se sbíhají v plzeňské pánvi jméno »Watto« nebo »Watta« (možná záměna s Otavou). Původně se celý tok řeky nazýval Mže. Název Berounka je doložen od 17. století, kdy byl úsek řeky na berounském panství nazýván tehdy obvyklým způsobem jako řeka berounských. Podle Ottova slovníku naučného se na konci 17. století začal užívat název Berounka pro dolní tok, poprvé je uváděna plzeňským kronikářem J. Tanerem jako tok za městem Berounem. V 18. století používali někteří autoři název Berounky i pro střední tok od Plzně. Za počátek Berounky byl postupně považován soutok Mže a Rakovnického potoka, později se začátek Berounky posunul na soutok se Střelou a ještě později na soutok s Úslavou. Ottův slovník z roku 1901 přesto ještě uváděl Mži jako řeku ústící do Vltavy. Dříve se tento název uváděl až po soutoku s Úslavou u kostela sv. Jiří v Doubravce, ale v současnosti je tento název posunut do centra Plzně v sousedství pivovaru po soutoku s Radbuzou. Není bez zajímavosti, že na název Mže poukazuje také zkomolený německý název hradu Nižbor-Mies/en/burg, tedy hrad nade Mží. Ten byl vybudován ve 13. století za vlády Přemysla Otakara II. a tím potvrzuje informaci o tom, že název Berounka vznikl mnohem později. Pojmenování řeky v současnosti V současnosti (2013) podle vodoprávních předpisů začíná Berounka soutokem Mže s Radbuzou v centru Plzně. Její jméno je standardizováno zákonem stanovenou autoritou od toho soutoku až po její zaústění do Vltavy. Plzeňští zastupitelé z iniciativy historika Jana Anderleho rozhodli 7. září 2006 o přejmenování Berounky na území města zpět na původní název (podle ustanovení zákona o obcích o pojmenovávání veřejných prostranství). Zároveň chtěli jednat s vedením Plzeňského kraje o jejím přejmenování na celém území kraje a o naprostém vymazání Berounky z map. Rozhodnutí však nic nezměnilo na oficiálním názvu a vymezení řeky, jak jsou stanoveny vyhláškou ministerstva zemědělství. V červnu 2011 město Plzeň své usnesení z roku 2006 zrušilo kvůli nepříznivému postoji některých obcí a státních úřadů. Od roku 2013 nese jméno Berounka i pár rychlíků Českých drah, a.s. jezdících mezi Prahou…"} {"instruction": "Given a list of numbers, create a function in JavaScript to return the sum of all its elements.", "input": "[1,2,3,4]", "output": "const sumArray = arr => arr.reduce((acc,cur) => acc + cur, 0);"} {"text": "[EN Wikipedia] Atom\n\nAn atom is a particle that consists of a nucleus of protons and neutrons surrounded by an electromagnetically-bound cloud of electrons. The atom is the basic particle of the chemical elements, and the chemical elements are distinguished from each other by the number of protons that are in their atoms. For example, any atom that contains 11 protons is sodium, and any atom that contains 29 protons is copper. The number of neutrons defines the isotope of the element. Atoms are extremely small, typically around 100 picometers across. A human hair is about a million carbon atoms wide. This is smaller than the shortest wavelength of visible light, which means humans cannot see atoms with conventional microscopes. Atoms are so small that accurately predicting their behavior using classical physics is not possible due to quantum effects. More than 99.94% of an atom's mass is in the nucleus. Each proton has a positive electric charge, while each electron has a negative charge, and the neutrons, if any are present, have no electric charge. If the numbers of protons and electrons are equal, as they normally are, then the atom is electrically neutral. If an atom has more electrons than protons, then it has an overall negative charge, and is called a negative ion (or anion). Conversely, if it has more protons than electrons, it has a positive charge, and is called a positive ion (or cation). The electrons of an atom are attracted to the protons in an atomic nucleus by the electromagnetic force. The protons and neutrons in the nucleus are attracted to each other by the nuclear force. This force is usually stronger than the electromagnetic force that repels the positively charged protons from one another. Under certain circumstances, the repelling electromagnetic force becomes stronger than the nuclear force. In this case, the nucleus splits and leaves behind different elements. This is a form of nuclear decay. Atoms can attach to one or more other atoms by chemical bonds to form chemical compounds such as molecules or crystals. The ability of atoms to attach and detach from each other is responsible for most of the physical changes observed in nature. Chemistry is the discipline that studies these changes. History of atomic theory In philosophy The basic idea that matter is made up of tiny indivisible particles is an old idea that appeared in many ancient cultures. The word atom is derived from the ancient Greek word atomos, which means \"uncuttable\". This ancient idea was based in philosophical reasoning rather than scientific reasoning. Modern atomic theory is not based on these old concepts. In the early 19th century, the scientist John Dalton noticed that chemical elements seemed to combine with each other by discrete units of weight, and he decided to use the…"} {"text": "[CS Wikipedia] FROG\n\nFROG (z angl. Free Rocket Over Ground) je v kódovém označení NATO pro sovětské rakety. Od nápadu že by mohla nést jadernou hlavici se upustilo kvůli malé šanci zásahu. Rakety FROG používaly armády země Varšavské smlouvy, Sovětského svazu, v současnosti řada arabských zemí. FROG-1 Střela 3R2 (3Р2) komplexu taktických raket 2K4 Filin byla označena jako FROG-1. Raketa nese jadernou hlavici s dosahem 25,7 km a CEP 1 000 m. Systém, který byl v malých počtech vyroben v letech 1957/58, nebyl vojáky používán. FROG-2 Střela 3R1 (3Р1) komplexu taktických raket 2K1 Mars byla označena jako FROG-2. Raketa nese jadernou hlavici s dosahem 17,5 km a přesností zásahu 770 m. Z výzbroje sovětské armády bylo do roku 1970 vyčleněno 25 nosných raket vyrobených v letech 1959/60. FROG-3 Střela 3R9 (3Р9) taktického raketového komplexu 2K6 Luna se nazývá FROG-3. Raketa nese konvenční tříštivou hlavici s dosahem až 44,5 km a přesností zásahu 1200-2000 m. Zbraňový systém se vyráběl ve velkém množství, používal se v sovětské armádě až do roku 1982 a vyvážel se do řady zemí. FROG-4 Geofyzikální výzkumná raketa vyvinutá na základě rakety 3R9 byla identifikována jako FROG-4. FROG-5 Střela 3R10 (3Р10) taktického raketového komplexu 2K6 Luna se nazývá FROG-5. Střela nese jadernou hlavici s dosahem 32,2 km a přesností zásahu 1200-2000 m. Zbraňový systém se vyráběl ve velkých počtech a sovětská armáda ho používala do roku 1982. Zbraňové systémy 2K6 Luna exportované do jiných zemí mohou až na výjimky odpalovat i rakety 3R10, ale jaderné hlavice zůstaly pod kontrolou sovětských vojsk. Cvičná raketa 3R11, která má místo hlavice imitaci zařízení, je navenek podobná raketě 3R10. FROG-6 Cvičný systém byl identifikován jako FROG-6. Dosud byla známa pouze jediná fotografie takového vozidla. Podle ruských autorů se však jedná o prototyp odpalovací rampy Br-226 (Бр-226) komplexu taktických raket 2K6 Luna. Vývoj byl zastaven a zařízení se do služby u vojska nedostalo. FROG-7 Střely 9M21 (9М21) a 3R11 (3Р11) taktického raketového komplexu 9K52 Luna-M jsou označeny jako FROG-7. Exportní označení zbraňového systému je R-65 (Р-65) nebo R-70 (Р-70). Název „FROG-7A“ se vztahuje na střelu 3R11 (3Р11) a „FROG-7B“ na střelu 9M21 (9М21). Pro raketu 9M21 jsou k dispozici různé konvenční a jaderné hlavice. Zbraňový systém byl přijat sovětskou armádou v roce 1964 a exportován do mnoha zemí. Odkazy Reference Literatura Zbraně 20. století : 600 nejznámějších zbraní světa. Praha : Ottovo nakladatelství, 1997. . Externí odkazy Sovětské a ruské raketové zbraně"} {"instruction": "Explain the function of a variable in programming.", "input": "", "output": "In programming, a variable is a named storage location that can hold a value. Variables are used to store values that can be manipulated or referenced in a program. Variables can be used to hold numbers, text, or other types of data. They can also be used to store values or objects that are accessed or changed by a program. This allows a program to be dynamic and adaptable to ever-changing inputs and data."} {"instruction": "Create a Python program to calculate the electric bill for a customer based on kilowatt hour of electricity used.", "input": "x = 500", "output": "def calculate_electric_bill(kw_usage):\n rate = 0.15\n bill = kw_usage * rate\n return bill\n\nx = 500\nbill = calculate_electric_bill(x)\nprint(\"Your bill is:\", str(bill))"} {"text": "[EN Wikipedia] Arabic\n\nArabic (, ; , or ) is a Semitic language spoken primarily across the Arab world. Having emerged in the 1st century AD, it is named after the Arab people; the term \"Arab\" was initially used to describe those living in the Arabian Peninsula, as perceived by geographers from ancient Greece. Since the 7th century, Arabic has been characterized by diglossia, with an opposition between a standard prestige language—i.e., Literary Arabic: Modern Standard Arabic (MSA) or Classical Arabic—and diverse vernacular varieties, which serve as mother tongues. Colloquial dialects vary significantly from MSA, impeding mutual intelligibility. MSA is only acquired through formal education and is not spoken natively. It is the language of literature, official documents, and formal written media. In spoken form, MSA is used in formal contexts, news bulletins and for prayers. This variety is the lingua franca of the Arab world and the liturgical language of Islam. It is an official language of 26 states and 1 disputed territory, the third most after English and French. It is also one of six official languages of the United Nations. Spoken varieties are the usual medium of communication in all other domains. They are not standardized and vary significantly, some of them being mutually unintelligible. The International Organization for Standardization assigns language codes to 33 varieties of Arabic, including MSA. Arabic vernaculars do not descend from MSA or Classical Arabic. Combined, Arabic dialects have 362 million native speakers, while MSA is spoken by 274 million L2 speakers, making it the sixth most spoken language in the world, and the most spoken that is neither Chinese nor Indo-European. Arabic is traditionally written with the Arabic alphabet, a right-to-left abjad and the official script for MSA. Colloquial varieties were not traditionally written; however, the emergence of social media has seen a significant increase in dialects written online. Besides the Arabic alphabet, dialects are also often written in Latin script from left to right or in Hebrew characters (in Israel) with no standardized orthography. Hassaniya is the only variety officially written in a Latin alphabet (in Senegal).; Maltese also uses a Latin script, though it is widely classified as distinct from Arabic dialects. Classification Arabic is usually classified as a Central Semitic language. Linguists still differ as to the best classification of Semitic language sub-groups. The Semitic languages changed significantly between Proto-Semitic and the emergence of Central Semitic languages, particularly in grammar. Innovations of the Central Semitic languages—all maintained in Arabic—include: The conversion of the suffix-conjugated stative formation (jalas-) into a past tense. The conversion of…"} {"instruction": "Write a code to get the IP address of a system.", "input": "", "output": "import socket hostname = socket.gethostname() IPAddr = socket.gethostbyname(hostname) print(\"The IP address of the system is:\" + IPAddr)"} {"text": "[EN Wikipedia] Dibujando el cielo\n\nDibujando el cielo () is a 2018 Mexican romantic comedy film directed by Ana Laura Calderón. The film premiered on 31 August 2018, and is stars Maite Perroni, Iván Sánchez, and Christian Vázquez. Plot Throughout her life, Sofía (Maite Perroni) has tried to stay away from commitments and routines. As one of the youngest and most successful astrophysicists, she has dedicated her attention and energy in space and the sky, without paying attention to things like love or company. Among her various investigations, Sofia begins to identify chaotic elements of space and its operation with her own personal and professional life. The situation will get complicated when she meet Gerardo (Christian Vásquez), a colleague from the institute who seems to have the opposite elements to her. However, understanding the laws of the universe, Sofia will begin to want to solve her life and her new relationship with Gerardo following the same principles she uses to solve her work. Gradually, the girl's attention will move away from space and focus on what is around her. And although everything looks like a fairy tale, she won't be able to decide between two loves that could balance her life and her work. Cast Maite Perroni as Sofía Iván Sánchez as Raúl Christian Vásquez as Gerardo Claudia Ramírez as Marifer Ximena Romo as Marla Ana Layevska as Silvia References External links 2018 romantic comedy films 2018 films Mexican romantic comedy films 2010s Spanish-language films 2010s Mexican films"} {"instruction": "Write a MySQL query to find the highest salary of each department.", "input": "", "output": "SELECT d.name, MAX(e.salary) FROM Department d INNER JOIN Employee e ON d.department_id = e.department_id GROUP BY d.name;"} {"text": "[EN Wikipedia] Leadership Conference of Women Religious\n\nThe Leadership Conference of Women Religious (LCWR) is one of two associations of the leaders of congregations of Catholic women religious in the United States (the other being the Council of Major Superiors of Women Religious). LCWR includes over 1300 members, who are members of 302 religious congregations that include 33,431 women religious in the United States as of 2018. Founded in 1956, the conference describes its charter as assisting its members to \"collaboratively carry out their service of leadership to further the mission of the Gospel in today's world.\" The canonically-approved organization collaborates in the Catholic Church and in society to \"influence systemic change, studying significant trends and issues within the church and society, utilizing our corporate voice in solidarity with people who experience any form of violence or oppression, and creating and offering resource materials on religious leadership skills.\" The conference serves as a resource both to its members and to the public who are seeking resources on leadership for religious life. In April 2015 the Vatican closed a controversial, multi-year investigation initiated in 2012 by Gerhard Ludwig Müller of the Congregation for the Doctrine of the Faith (CDF). J. Peter Sartain, archbishop of Seattle, was appointed to work with the conference. According to Associated Press Vatican correspondent, Nicole Winfield, the investigation \"embittered many American Catholics against what they perceive as heavy-handed tactics by Rome.\" While Pope Francis reaffirmed the canonical investigation and the organization's members were ordered to review their statutes and reassess their plans and programs, the Holy See in its conclusion praised the nuns' work. The joint final report of both the Vatican and the LCWR stated that the conference is \"a public juridic person centered on Jesus Christ and faithful to the teachings of the Church,\" its publications \"need a sound doctrinal foundation,\" and \"when exploring contemporary issues, particularly those which, while not explicitly theological nevertheless touch upon faith and morals, LCWR expects speakers and presenters to have due regard for the Church's faith\" Mission and purpose According to its official website, the LCWR serves as a resource to its members and to others seeking information on leadership for religious life and living religious life. Its mission is to \"promote a developing understanding and living of religious life by\": \"Assisting its members personally and communally to carry out more collaboratively their service of leadership in order to accomplish further the mission of Christ in today's world.\" \"Fostering dialogue and collaboration among religious congregations within the church and in the larger society.\" \"Developing…"} {"instruction": "Create a method that parses the provided HTML and returns a list of all the

    tags.", "input": "

    This is a test.

    link

    Another test.

    ", "output": "#Create a method to parse the HTML def getPTags(html): #Create an empty list pTags = [] #Iterate over the HTML for line in html.split(\"\\n\"): #Check if the line is a

    tag if \"

    \" in line: #Add the tag to the list pTags.append(line) #Return the list return pTags #Print the list print(getPTags(html))"} {"instruction": "Write an SQL query that finds the total revenue for each month.", "input": "Table name: orders", "output": "SELECT MONTH(order_date) AS month, SUM(total_price) total_revenue FROM orders GROUP BY MONTH(order_date)"} {"instruction": "Create a virtual environment in Python to manage project dependencies.", "input": "", "output": "\"\"\"\nCreate a virtual environment in Python to manage project dependencies\n\"\"\"\n\n# Create the virtual environment\npython3 -m venv env\n\n# Activate the virtual environment\nsource env/bin/activate\n\n# Install project requirements\npip install -r requirements.txt"} {"instruction": "Write a JavaScript code snippet to check if a given string contains the substring 'hello'.", "input": "", "output": "if (str.indexOf('hello') !== -1) { console.log('The string contains the substring hello'); }"} {"instruction": "Design and code an entry-level language interpreter in Python.", "input": "", "output": "class Interpreter:\n \n def __init__(self):\n self.opeartors = {\n '+': self.add,\n '-': self.sub,\n '/': self.div,\n '*': self.mul,\n }\n \n def parse(self, text):\n expressions = text.split(' ')\n return expressions\n \n def evaluate(self, expressions):\n operator = self.opeartors.get(expressions[1])\n if not operator:\n raise Exception('Invalid operator')\n return operator(expressions[0], expressions[2])\n \n def add(self, a, b):\n return int(a) + int(b)\n \n def sub(self, a, b):\n return int(a) - int(b)\n \n def div(self, a, b):\n return int(a) / int(b)\n \n def mul(self, a, b):\n return int(a) * int(b)"} {"instruction": "How do you create a new list in Python from a given list that contains the square of each element?", "input": "", "output": "The following code creates a new list from the given list by squaring each element using a list comprehension: new_list = [el**2 for el in original_list]"} {"instruction": "Write pseudocode to sort a given list of integers using bubble sort.", "input": "", "output": "# Set a swap flag to true swap = true # While the flag is true while swap # Set the swap flag to false swap = false # Iterate through the list for i in range(len(list) - 1): # Swap adjacent element if they are out of order if list[i] > list[i + 1]: temp = list[i] list[i] = list[i + 1] list[i + 1] = temp # Set the flag back to true swap = true"} {"instruction": "Create a data structure to store records of students' attendance.", "input": "", "output": "struct StudentAttendance { int studentId; // Unique identifier for each student int classId; // Unique identifier for each class int year; // Year of the class string month; // Month of the class int attendance; // Number of attendances };"} {"text": "[HI Wikipedia] मॉरिशस\n\nमॉरीशस गणराज्य (अंग्रेज़ी: Republic of Mauritius, फ़्रांसीसी : République de Maurice), अफ्रीकी महाद्वीप के तट के दक्षिणपूर्व में लगभग 900 किलोमीटर की दूरी पर हिंद महासागर में और मेडागास्कर के पूर्व में स्थित एक द्वीपीय देश है। मॉरीशस में हिंदुओं की आबादी तीसरे नंबर पर है दुनिया में मॉरीशस द्वीप के अतिरिक्त इस गणराज्य मे, सेंट ब्रेंडन, रॉड्रीगज़ और अगालेगा द्वीप भी शामिल हैं। दक्षिणपश्चिम में 200 किलोमीटर पर स्थित फ्रांसीसी रीयूनियन द्वीप और 570 किलोमीटर उत्तर पूर्व में स्थित रॉड्रीगज़ द्वीप के साथ मॉरीशस मस्कारेने द्वीप समूह का हिस्सा है। मारीशस की संस्कृति, मिश्रित संस्कृति है, जिसका कारण पहले इसका फ्रांस के आधीन होना तथा बाद में ब्रिटिश स्वामित्व में आना है। मॉरीशस द्वीप विलुप्त हो चुके डोडो पक्षी के अंतिम और एकमात्र घर के रूप में भी विख्यात है। इतिहास मॉरीशस के सबसे पुराने अभिलेख लगभग 10 वीं शताब्दी की शुरुआत के हैं जो द्रविड़ (तमिल) और औस्ट्रोनेशी नाविकों के संदंर्भ से आते है। पुर्तगाली नाविकों पहले पहल यहाँ 1507 में आये और उन्होने इस निर्जन द्वीप पर एक यात्रा अड्डा स्थापित किया और फिर इस द्वीप को छोड़ कर चले गये। सन् 1598 में हॉलैंड के तीन पोत जो मसाला द्वीप (स्पाइस आइलैंड) की यात्रा पर निकले थे एक चक्रवात के दौरान रास्ता भटक कर यहाँ पहुँच गये। उन्होने इस द्वीप का नाम अपने नासाओ के युवराज मॉरिस के सम्मान में मॉरिशस रख दिया। सन्1638 में, डच लोगों ने यहाँ पहली स्थायी बस्ती बसाई। चक्रवातों वाली कठोर जलवायु परिस्थितियों और बस्ती को होने वाले लगातार नुक्सान के कारण डचो ने कुछ दशकों बाद इस द्वीप को छोड़ दिया। फ्रांस, जिसका पहले से ही इसके पड़ोसी आइल बॉरबोन (अब रीयूनियन) द्वीप पर नियंत्रण था ने सन् 1715 में मॉरीशस पर कब्ज़ा कर लिया और इसका नाम बदलकर – आइल दे फ्रांस (फ्रांस का द्वीप) रख दिया। फ्रांस के शासन मे, यह द्वीप एक समृद्ध अर्थव्यवस्था के रूप में विकसित हुआ जो चीनी उत्पादन पर आधारित थी। यह आर्थिक परिवर्तन गवर्नर (राज्यपाल) फ्रेंकॉएस माहे दे लेबॉर्डॉनाइस के द्वारा शुरू किया गया था। ब्रिटेन के साथ अपने कई सैन्य संघर्षों के दौरान, फ्रांस ने गैरकानूनी घोषित जलदस्युओं \"कोर्सेर्स\" को शरण दी, जो अक्सर ब्रिटिश जहाजो, जिन पर मूल्यवान व्यापार का माल लदा होता था को उनकी भारत और ब्रिटेन के मध्य होने वाली यात्राओं के दौरान लूट लेते थे। सन् 1803-1815 के दौरान हुए नेपोलियन युद्धों में ब्रिटिश इस द्वीप का नियंत्रण पाने में सफल हो गये। ग्रांड पोर्ट की लड़ाई जीतने के बावजूद, जो कि नेपोलियन की ब्रिटिशों पर एकमात्र समुद्री विजय थी, फ्रांसीसी, तीन महीने बाद, केप मैलह्युरॉ में ब्रिटेन से हार गये। उन्होनें औपचारिक रूप से 3 दिसम्बर 1810 को कुछ शर्तों के साथ समर्पण कर दिया, ये शर्तें थीं, कि द्वीप पर फ्रांसीसी भाषा का प्रयोग जारी रहेगा और आपराधिक मामलों में नागरिकों पर फ्रांस का कानून लागू होगा। ब्रिटिश शासन के अंतर्गत, इस द्वीप का नाम बदलकर वापस मॉरीशस कर दिया गया। सन् 1965 में, ब्रिटेन (यूनाइटेड किंगडम) ने चागोस द्वीपसमूह को मॉरीशस से अलग कर दिया। उन्होने ऎसा ब्रिटिश हिंद महासागर क्षेत्र स्थापित करने के लिये किया जिससे वे सामरिक महत्व के द्वीपों का प्रयोग संयुक्त…"} {"instruction": "How would you output the average value of a given list of numbers?", "input": "list_int = [2, 7, 15, 25]", "output": "avg = sum(list_int) / len(list_int) # avg = 11.5"} {"text": "[DE Wikipedia] Atsushi Inaba\n\nAtsushi Inaba (jap. 稲葉 敦志 Inaba Atsushi; * 28. August 1971 in Kanazawa, Präfektur Ishikawa) ist ein japanischer Spieleentwickler, bekannt für mehrere populäre Videospiele. Heute arbeitet er für das unabhängige Entwicklerstudio Platinum Games (ehemals Seeds), welches er mit Shinji Mikami und Hideki Kamiya gründete. Überblick Atsushi Inaba begann seine Karriere bei Capcom. Im Jahre 2003 eröffnete er unter seiner Führung das Studio Clover, welches komplett zu Capcom gehört. Als Capcom im Oktober 2006 beschlossen hat das Clover-Studio wegen nicht zufriedenstellender Verkaufszahlen im April 2007 schließen zu lassen, plante er mit Kollegen ein eigenes unabhängiges Studio zu gründen, welches am 15. Februar 2007 unter dem Namen Seeds vorgestellt, mittlerweile jedoch in Platinum Games umbenannt wurde. Seither strebt Atsushi Inaba zusammen mit 85 Mitarbeitern (Stand: 2008) die Arbeit an Original-Entwicklungen an. Spiele von Atsushi Inaba 2001 Resident Evil Code: Veronica X 2002 Steel Battalion 2003 Viewtiful Joe 2004 Viewtiful Joe 2 2005 Viewtiful Joe: Battle Carnival 2006 Ōkami 2006 God Hand 2017 NieR: Automata Weblinks Interview mit Atsushi Inaba Spieleentwickler Unternehmer (Japan) Japaner Geboren 1971 Mann"} {"instruction": "Write a Python script to find the area of a triangle with sides 18, 24, and 30.", "input": "", "output": "def triangle_area(a, b, c): '''This function computes the area of a triangle given its side lengths.''' # Calculate semi-perimeter s = (a + b + c) / 2 # Calculate the area area = (s * (s - a) * (s - b) * (s - c)) ** 0.5 return area print(\"The area of the triangle is:\", triangle_area(18, 24, 30))"} {"instruction": "How can you use a for loop to traverse a dictionary?", "input": "", "output": "You can use a for loop to traverse a dictionary by iterating over the dictionary's keys or key-value pairs. For example, you can loop through all the keys of a dictionary like this: dictionary = { 'a':1, 'b':2, 'c':3 } for key in dictionary: print(key) Or you can loop through all the key-value pairs like this: dictionary = { 'a':1, 'b':2, 'c':3 } for key, value in dictionary.items(): print(key, ':', value)"} {"text": "[CS Wikipedia] Farní sbor Českobratrské církve evangelické v Sedlci-Prčicích\n\nFarní sbor Českobratrské církve evangelické v Sedlci-Prčicích je sborem Českobratrské církve evangelické v Sedlci-Prčicích. Sbor spadá pod Pražský seniorát. Farářem sboru je Josef Bartošek, kurátorem sboru Jindřich Souček. Faráři sboru Jaroslav Timoteus Kučera (1932-1933, výpomocný kazatel) Karel Loveček (1946, diakon) Arnold Gruhn (1961, diakon) jáhenka Pavla Jandečková (2009-2022) Josef Bartošek (2023-) Externí odkazy Oficiální stránky sboru Údaje o sboru na portálu Evangnet Sedlec-Prčice Sedlec-Prčice Náboženství v okrese Příbram"} {"instruction": "Convert the following SQL query to Python.", "input": "SELECT * \nFROM `employee_table`\nWHERE `salary` < 10000", "output": "import sqlite3\n\ndb = sqlite3.connect(\"employee_table.db\") # Assumes the table is in a file named employee_table.db\ncur = db.cursor()\n\n# Execute the SQL command\ncur.execute(\"SELECT * FROM employee_table WHERE salary < 10000\")\n\n# Commit your changes\ndb.commit()\n\n# Get the results\nresults = cur.fetchall()\n\n# Print the results\nfor row in results:\n print(row)"} {"text": "[CS Wikipedia] Claude Piron\n\nClaude Piron (26. února 1931 Namur – 22. ledna 2008 Gland) byl přední švýcarský lingvista, docent psychologie na ženevské univerzitě, spisovatel a esperantista, v letech 1956–1961 překládal pro OSN. Pro svou uměleckou tvorbu v esperantu používá pseudonym Johán Valano. Esperantskou literaturu obohatil řadou původních děl: romány Ĉu vi kuiras ĉine? (Vaříte po čínsku?) Ĉu li bremsis sufiĉe? (Brzdil dostatečně?) Ĉu li venis trakosme? (Přišel z vesmíru?) Ĉu ŝi mortis tra-fike? (Zemřela při souloži?) Ĉu ni kunvenis vane? (Sešli jsme se zbytečně?) Kiel personeco sin strukturas sbírka básní Malmalice (Dobromyslně) Externí odkazy https://web.archive.org/web/20040211061849/http://www.claude-piron.ch/Claude-Piron.html http://claudepiron.free.fr/ https://web.archive.org/web/20050519055719/http://www.geocities.com/c_piron/ – anglicky http://dotsub.com/films/thelanguage/index.php?autostart=true&language_setting=cs_1683 Švýcarští psychologové Švýcarští esperantisté Spisovatelé píšící esperantem Muži Narození v roce 1931 Narození 26. února Narození v Namuru Úmrtí v roce 2008 Úmrtí 22. ledna Úmrtí v Glandu"} {"instruction": "Generate a HTML layout to make a basic website page.", "input": "", "output": " My Website

    Welcome to My Website!

    Content goes here.

    "} {"text": "[DE Wikipedia] Ivo Zen\n\nIvo Zen (1970 in Santa Maria im Münstertal) ist ein Schweizer Dokumentarfilmregisseur. Biografie Ausbildung Ivo Zen wuchs als Sohn eines italienischen Einwanderers und einer Bündnerin im Münstertal auf. 1992–1996 studierte er Architektur an der Eidgenössischen Technischen Hochschule ETH Zürich, bevor er an der École supérieure des beaux-arts Genève Film studierte. Filme für das Fernsehen 2004 war er Mitbegründer der Produktionsfirma Alva Film, mit der er mehrere seiner eigenen Filme umsetzt. Sein Abschlussfilm Pizzet wurde 2004 am Filmfestival Visions du Réel in Nyon uraufgeführt, gefolgt von einer Vielzahl weiteren Festivals. Es war seine erste Co-Produktion mit dem Rätoromanischen Fernsehen RTR. Es folgten weitere Dokumentarfilme für RTR, darunter Mes emprim onn en il convict (2008), Films d’amaturs – Amaturs da films (2010), In’experientscha musicala (2014) und Esser da chasa – quatter dunnas da Sent (2015). Die Filme sind alle in rätoromanischer Sprache gehalten. Kinofilme 2016 erschien sein erster langer Kinodokumentarfilm Zaunkönig – Tagebuch einer Freundschaft, in dem er dem Tagebuch eines an Drogen verstorbenen Jugendfreundes nachgeht. Der Film wurde am Visions du réel uraufgeführt. Seine deutsche Uraufführung erfolgte im Januar 2017 im Rahmen des Max Ophüls Preises in Saarbrücken, wo der Film mit dem Preis für die beste Musik ausgezeichnet wurde. Suot tschêl blau, sein nächster Film, kam 2020 in die Schweizer Kinos. Ivo Zen verfolgt darin weiter die Geschichte des Drogenkonsums und seiner Auswirkungen im Graubünden der 1980er Jahre, diesmal mit dem Fokus auf das Oberengadin. Ivo Zen erhielt bereit zweimal ein Werkstipendium des Kantons Graubünden. Gemeinsam mit dem Filmemacher Mischa Hedinger war er 2017 Preisträger der ersten Runde des CH-Dokfilm-Wettbewerbs des Migros-Kulturprozents, mit dem Projekt Security. Filmpolitisches Engagement Er ist seit 2018 Vorstandsmitglied des Verbands Filmregie und Drehbuch Schweiz, wo er unter anderem auch die Interessen der romanischen Filmschaffenden vertritt. Filmografie 2004: Pizzet 2008: Mes emprim onn en il convict (TV-Film) 2009: Maurus, Nadia, Flurina (TV-Film) 2010: Films d’amaturs – Amaturs da films (TV-Film) 2014: In’experientscha musicala (TV-Film) 2015: Esser da chasa – quatter dunnas da Sent (TV-Film) 2016: Zaunkönig – Tagebuch einer Freundschaft 2020: Suot tschêl blau Weblinks Einzelnachweise Filmregisseur Schweizer Geboren 1970 Mann"} {"instruction": "Generate a Python class with a constructor that initializes two variables - a list and a dictionary.", "input": "", "output": "class MyClass:\n def __init__(self):\n self.list = []\n self.dictionary = {}"} {"instruction": "Write a code to generate a random password with a given length.", "input": "", "output": "import random import string def generate_password(length): chars = string.ascii_letters + string.digits + '!@#$%^&*()' random.seed = (random.SystemRandom().random()) return ''.join(random.choice(chars) for i in range(length)) print(generate_password(10)) # Output is an alphanumeric string of length 10"} {"text": "[CS Wikipedia] Václav Drchal\n\nVáclav Drchal (* 25. července 1999 České Budějovice) je český profesionální fotbalista, který hraje na pozici útočníka za český klub FK Jablonec. Mezi jeho přednosti patří rychlost. Klubová kariéra AC Sparta Praha Do sparťanské juniorky přestoupil v červenci 2016. V sezoně 2017/18 v juniorce nastřílel 25 gólů a během zimní přestávky byl povolán do A-týmu Sparty. První utkání za A-tým odehrál v přípravě proti FC MAS Táborsko a v zápase si připsal hattrick. Ligovou premiéru zažil proti Slovácku pod trenérem Stramaccionim, ve stejném zápase také poprvé skóroval. V utkání se Zlínem (4. května 2018) si přetrhl vaz v koleni a rekonvalescence si vyžádala půl roku. Poprvé od zranění hrál 15. prosince proti Příbrami. V květnu 2019 si v zápase s Libercem znovu poranil již jednou operované koleno a zpět do hry se dostal až na jaře 2020. Pod trenérem Kotalem však nedostával mnoho příležitostí a rozhodl se proto na sezónu 2020/21 odejít na hostování do Mladé Boleslavi. FK Mladá Boleslav (hostování) O mladého Drchala stála před sezónou řada ligových klubů, mimo jiné Liberec či Olomouc, on si však vybral roční hostování v FK Mladá Boleslav. Přesvědčil ho velký zájem a styl fotbalu, který tým trenéra Webera předváděl. Před sezónou Václav vyhlásil, že by rád skončil v tabulce před Spartou. Debuty Klubové 1. česká liga – 18 let 6 měsíců 30 dní, 24. února 2018, 1.FC Slovácko – AC Sparta Praha 1:1 (18. kolo), 90 minut, 1 gól, trenér Andrea Stramaccioni Český pohár – 19 let 8 měsíců 8 dní, 2. dubna 2019, FK Teplice – AC Sparta Praha 2:3 na penalty (čtvrtfinále), 74 minut, 1 gól, trenér Zdeněk Ščasný Reprezentační Reprezentace do 17 let – 16 let 6 měsíců 16 dní, 10. února 2016, Česko U17 - Norsko U17 2:1, 15 minut, trenér Aleš Čvančara Reprezentace do 18 let – 17 let 10 měsíců 13 dní, 7. června 2017, Česko U18 - Slovinsko U18 1:1, 45 minut, trenér Luboš Kozel Reprezentace do 19 let – 18 let 16 dní, 10. srpna 2017, Japonsko U18 - Česko U18 1:2, 59 minut, 1 gól, trenér Jan Suchopárek Reprezentace do 21 let – 19 let 7 měsíců 25 dní, 22. března 2019, Česko U21 - Island U21, 66 minut, trenér Karel Krejčí Odkazy Reference Externí odkazy Žijící lidé Muži Narození 25. července Narození v roce 1999 Čeští fotbalisté Fotbaloví útočníci Fotbalisté AC Sparta Praha"} {"instruction": "Create a Python script which takes a list containing items and their prices and calculates the total cost.", "input": "[('Bread', 5.99), ('Cheese', 4.99), ('Milk', 2.99)]", "output": "total = 0\nitems_with_price = [('Bread', 5.99), ('Cheese', 4.99), ('Milk', 2.99)]\n\nfor item, price in items_with_price:\n total += price\n\nprint(f'The total cost is ${total}')"} {"instruction": "Fix the following code so that it works without errors.", "input": "``` def remove_characters(name, characters): for c in characters: name.replace(c, '') return name name = \"Alice\" characters = [\"A\", \"e\"] ```", "output": "``` def remove_characters(name, characters): for c in characters: name = name.replace(c, '') return name name = \"Alice\" characters = [\"A\", \"e\"] ```"} {"instruction": "Create a Python program to replace all occurance of a target string in a sentence with a replacement string.", "input": "Sentence: “Hello world, this is a sample text. We needed to replace the word “world” with “Earth”\nTarget: world\nReplacement: Earth", "output": "sentence = \"Hello world, this is a sample text. We needed to replace the word “world' with “Earth”\"\ntarget = \"world\"\nreplacement = \"Earth\"\n\ndef replace_string(sentence, target, replacement):\n return sentence.replace(target, replacement)\n \nupdated_sentence = replace_string(sentence, target, replacement)\n \nprint(updated_sentence) \n\n# Output: Hello Earth, this is a sample text. We needed to replace the word “world' with “Earth”"} {"instruction": "Create a Base64 encoder/decoder function in Python.", "input": "Not applicable", "output": "import base64\n\ndef encode(string):\n encoded = base64.b64encode(string.encode())\n return encoded.decode('utf-8')\n\ndef decode(encoded_string):\n decoded = base64.b64decode(encoded_string.encode())\n return decoded.decode('utf-8')\n\nif __name__ == \"__main__\":\n original_string = \"Hello World!\"\n encoded_string = encode(original_string)\n decoded_string = decode(encoded_string)\n print(f'Original string: {original_string}\n Encoded string: {encoded_string}\n Decoded string: {decoded_string}\n ')"} {"instruction": "Write a SQL query to list the name of customers and associated shipping addresses.", "input": "", "output": "SELECT c.name, s.address FROM customers c INNER JOIN shipping_address s ON c.id = s.customer_id"} {"instruction": "Write a script that prints out the current value of environment variables", "input": "", "output": "For example, using Node.js: Object.keys(process.env).forEach(key => { console.log(`${key}: ${process.env[key]}`); });"} {"instruction": "Name the grammar that is used to identify data in a Javascript string.", "input": "", "output": "The grammar used to identify data in a JavaScript string is JSON (JavaScript Object Notation)."} {"instruction": "Can you build a linear regression model to predict the housing prices in the given dataset?", "input": "The dataset contains 15 columns with 3,000 records.", "output": "Yes, it is possible to build a linear regression model to predict the housing prices in the given dataset. You will have to split the dataset into a training and testing set and then use the training set to build a linear regression model. Once the model is built, use it to predict labels on the test set and then evaluate the model performance with relevant metrics."} {"instruction": "Generate a python script to calculate the standard deviation of a given data set.", "input": "data_set = [2,4,4,4,5,5,7,9]", "output": "import statistics\n\ndata_set = [2,4,4,4,5,5,7,9]\nprint(round(statistics.stdev(data_set),2))"} {"instruction": "Write CSS code to style a web page with a white background and black text.", "input": "", "output": "body { background-color: white; color: black; }"} {"text": "[CS Wikipedia] TJ Cement Hranice\n\nTJ Cement Hranice je klub házené z Hranic, účastník české nejvyšší soutěže – STRABAG RAIL Extraligy mužů. Národní házená se v hranickém Sokole provozovala od roku 1923. V roce 1957 byl založen klub TJ Tatran Hranice, hrající pod patronátem místní cementárny. V roce 1962 se tým přeorientoval na házenou podle mezinárodních pravidel a stal se účastníkem druhé ligy. V sezóně 1969/70 byl účastníkem nejvyšší československé soutěže. V roce 1993 se stal jedním ze zakládajících účastníků české extraligy, v letech 2002 až 2004 hrál i mezinárodní interligu. Největšího úspěchu dosáhl roku 2013, kdy skončil na stříbrné příčce v extralize a vyhrál Český pohár. Mezi další úspěchy se řadí obhájení stříbrných medailí v sezóně 2013/14. O dva roky později klub získal bronzovou medaili, když v zápase o 3. místo porazil Karvinou. Bohužel v posledních letech se klubu příliš nedaří - 3x se neprobojovali do play-off. Externí odkazy Oficiální stránky Czech Handball Server Hranice Hranice Sportovní kluby v Hranicích (okres Přerov) Házená v Olomouckém kraji"} {"instruction": "How would you form a list from two lists by taking elements at same index from both the lists?", "input": "", "output": "def form_list_from_list(list1, list2): return [list1[i] + list2[i] for i in range(len(list1))] if __name__ == '__main__': list1 = [1, 2, 3] list2 = [4, 5, 6] print(form_list_from_list(list1, list2))"} {"instruction": "Write a Python function to identify the longest word in a given list of strings.", "input": "", "output": "def longest_word(word_list):\n longest_word = word_list[0]\n for word in word_list:\n if len(word) > len(longest_word):\n longest_word = word\n return longest_word"} {"instruction": "Write a SQL query to get the titles and release dates of all the movies from the Movies table released in the year 2019.", "input": "", "output": "SELECT title, release_date FROM Movies WHERE YEAR(release_date) = 2019"} {"instruction": "Generate a list containing all multiples of 3 from 0 to 30.", "input": "", "output": "multiples_of_3 = [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30]"} {"text": "[CS Wikipedia] Azua\n\nAzua je provincie Dominikánské republiky, ležící na jihozápadě krajiny. Rozlohou je to pátá největší provincie; Azua zabírá z celkové rozlohy státu 5,2 %. Počtem obyvatel je Azua desátý největší region a počet obyvatel Azuy k celkovému obyvatelstvu Dominikánské republiky je 2,4 %. Provincie Azua má 10 obcí: Azua de Compostela Estebanía Guayabal Las Charcas Las Yayas de Viajama Padre Las Casas Peralta Sabana Yegua Pueblo Viejo Tabara Arriba Odkazy Externí odkazy Informace o provincii Azua (španělsky) Provincie v Dominikánské republice"} {"instruction": "Write a Python program to read a list of numbers and print them as a single string without any space.", "input": "[34, 32, 67, 85]", "output": "my_list = [34, 32, 67, 85] # using join() print(''.join(str(n) for n in my_list))"} {"instruction": "Create a Python program to parse data from an XML web service.", "input": "\n\n \n John Smith\n john@example.com\n \n \n Jane Doe\n jane@example.com\n \n", "output": "import xml.etree.ElementTree as ET\n\ndata = '''\n\n \n John Smith\n john@example.com\n \n \n Jane Doe\n jane@example.com\n \n'''\n\nroot = ET.fromstring(data)\n\nfor customer in root.findall('customer'):\n name = customer.find('name').text\n email = customer.find('email').text\n print(f'Name: {name}, Email: {email}')\n\n# Output\n# Name: John Smith, Email: john@example.com\n# Name: Jane Doe, Email: jane@example.com"} {"text": "[HI Wikipedia] चौराई\n\nचौराई (Chorai) भारत के राजस्थान राज्य के उदयपुर ज़िले में स्थित एक गाँव है। यह समुद्र तल से 540 मीटर ऊपर पहाड़ी क्षेत्र में स्थित है। विवरण चौराई गाँव ऋषभदेव तहसील में है जो उदयपुर जिले में स्थित है चौराई गाँव के पास कल्याणपुर, भगोर, बिच्छिवाडा, मसारों की ओबरी स्थित है। इस गाँव के मध्य एक वराई माता का मंदिर है। यह गाँव बिच्छिवाडा पंचायत के अंतर्गत आता है। यहाँ पर हनुमान जी का मंदिर भी स्थित है। इन्हें भी देखें उदयपुर ज़िला सन्दर्भ राजस्थान के गाँव उदयपुर ज़िला उदयपुर ज़िले के गाँव"} {"instruction": "Create a HTML form with two input fields called 'name' and 'age'.", "input": "", "output": "
    "} {"instruction": "Determine the number of columns and rows in a given 2D array.", "input": "The given 2D array is [[1,2,3], [4,5,6]].", "output": "// Function to determine the // number of columns and rows in a 2D array void getSize(int matrix[2][3]) { int row = sizeof(matrix) / sizeof(matrix[0]); int column = sizeof(matrix[0]) / sizeof(matrix[0][0]); // Print the number of rows and columns cout << \"The number of rows is : \" << row << endl; cout << \"The number of columns is : \" << column; }"} {"instruction": "Generate a list of all possible combinations of the given set of numbers.", "input": "Set of numbers: [1,2,3]", "output": "[[1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]]"} {"text": "[CS Wikipedia] Tíhové zrychlení\n\nTíhové zrychlení je zrychlení volného pádu těles zanedbatelných rozměrů (hmotných bodů) v dané vztažné soustavě a představuje superpozici gravitačních a setrvačných zrychlení působících na tělesa v této soustavě. Nejčastěji se tíhovým zrychlením míní speciální případ zrychlení volného pádu v soustavě spojené s povrchem kosmického tělesa (například Země); hlavní složkou tíhového zrychlení je gravitační zrychlení vyvolané tímto tělesem, ale pokud se jedná o rotující těleso (a tedy i Zemi), působí kromě gravitační síly také odstředivá síla, což je setrvačná síla vznikající v důsledku otáčení tělesa kolem jeho osy. Proto je tíhové zrychlení na rovníku menší než na pólech. Beztížný stav nastává ve vztažných soustavách, ve kterých je tíhové zrychlení nulové, tedy skládající se setrvačné a gravitační síly se vzájemně vektorově odečítají. Typickým příkladem je kabina pohybující se se zrychlením rovným zrychlení vnějšího gravitačního pole – volně se pohybující družice, padající kabina výtahu apod. Značka, jednotka Značka: g Jednotka: m/s2 Tíhové zrychlení na Zemi Hodnota tíhového zrychlení na Zemi činí v českých zeměpisných šířkách (49° až 51°) přibližně 9,81 m/s². Tíhové zrychlení se ve zrychlení padajících těles plně projeví ve vakuu, kde nepůsobí odporové síly a pád je možno považovat za volný. V atmosféře je pohyb těles brzděn odporem vzduchu. Působení tíhového zrychlení poprvé přesně popsal Galileo Galilei, který vyslovil a experimentálně ověřil jeho závislost na geografické šířce, nadmořské výšce a nepatrně i na lokální hustotě hornin pod povrchem. Pro fyzikální a technické použití je vhodné stanovit univerzální standardní hodnotu. Ta se nazývá normální tíhové zrychlení, značí g0 nebo gn a její hodnota vychází z tíhového zrychlení na 45° zeměpisné šířky u hladiny moře: g0 = gn = 9,80665 m/s² (přesně). Pro výšky zanedbatelné vzhledem k průměru Země se g snižuje na jeden metr nadmořské výšky přibližně o 3×10−6 m/s2. Tíhové zrychlení je mírně ovlivňováno i pozicí Měsíce vůči Zemi, což se projevuje např. přílivem a odlivem hladiny moře. Tíhové zrychlení na povrchu obecného kosmického tělesa Tíhové zrychlení lze definovat jako zvýšení rychlosti tělesa působením pouze gravitačních a setrvačných sil působících na povrchu kosmického tělesa za jednu sekundu při volném pádu ve vakuu. Jednotkou tíhového zrychlení je m/s2. Tíhové zrychlení definujeme na konkrétním místě povrchu konkrétního kosmického tělesa, může být proměnlivé i časově. Pokud se výrazněji projevují vlivy rotace, okolních těles, nebo při nepravidelném tvaru kosmického tělesa, měli bychom tíhové zrychlení definovat jako vektor. Tíhové zrychlení tedy obecně závisí na gravitačním poli kosmického tělesa – gravitační zrychlení na pohybu (trajektorii) kosmického tělesa – např. na Zemi se projevuje…"} {"instruction": "Write a function to check if a string contains either 'a' or 'e' or 'i' or 'o' or 'u'.", "input": "", "output": "def contains_vowel(string): vowels = ['a', 'e', 'i', 'o', 'u'] for char in string.lower(): if char in vowels: return True return False"} {"text": "[HI Wikipedia] मुसलमान\n\nमुसलमान (अरबी: مسلم، مسلمة फ़ारसी: مسلمان،, अंग्रेजी: Muslim) का मतलब वह व्यक्ति है जो इस्लाम में विश्वास रखता हो। हालाँकि मुसलमानों की आस्था के अनुसार इस्लाम ईश्वर का धर्म है और यह धर्म हज़रत मुहम्मद से पहले मौजूद था। जो लोग अल्लाह के धर्म का पालन करते रहे वह मुसलमान हैं। जैसे कुरान के अनुसार हज़रत इब्राहीम अलैहिस्सलाम भी मुसलमान थे। मगर आजकल मुसलमान का मतलब उसे लिया जाता है जो हज़रत मुहम्मद लाए हुए दीन का पालन करता हो और विश्वास रखता हो। मध्यकालीन मुस्लिम इतिहासकारों ने भारत को हिन्द अथवा हिन्दोस्ताँ कहा है। मुख्य इस्लामी धर्म मुसलमान यह स्वीकार करते हैं कि अल्लाह अकेला परवरदिगार है और हज़रत मुहम्मद (स) अल्लाह के प्रेषित (रसूल) हैं। इस तरीके से कोई भी व्यक्ति इस्लाम में जाता है। जब हज़रत मोहम्मद(स) को अल्लाह का रसूल मान ले तो उस पर वाजिब हो जाता है कि उनकी हर बात पर विश्वास रखे और अमल करने की कोशिश करे। जैसे उन्होंने कहा कि मेरे बाद कोई नबी नहीं और वे परमेश्वर के अन्तिम रसूल हैं तो इस बात पर विश्वास रखना इस्लाम के एकाधिकार में है। इस्लाम के मुख्य धर्म जिन पर मुसलमानों के किसी समुदाय में कोई मतभेद नहीं, निम्नलिखित हैं अल्लाह एकमात्र परमेश्वर है। इसके अलावा कोई पूजा के योग्य नहीं। हज़रत मुहम्मद (स) अल्लाह के सबसे प्यारे और अन्तिम रसूल हैं। नमाज़, रोज़ा, ज़कात, हज,कलमा कुरान अल्लाह की किताब है और उसका हर शब्द और अक्षर अल्लाह से है। क़यामत और हिसाब और किताब यानी हयात बाद (बाद अल मौत) पर विश्वास। फ़रिशतों, पूर्व अम्बिया (नबी का बहुवचन) और पुस्तकों पर विश्वास। उपरोक्त बातों पर विश्वास करने को मुसलमान कहते हैं। उनके अलावा अन्य मतभेद फरोइई और राजनीतिक हैं। इन्हें भी देखें इस्लामी दुनिया सन्दर्भ बाहरी कड़ियाँ इस्लाम जाति इस्लामी संगठन"} {"instruction": "Develop a Python program to print the following pattern.", "input": "", "output": "for i in range(1, 6):\n for j in range(5-i):\n print(\" \", end=\"\")\n for j in range(2*i-1):\n print(\"*\", end=\"\")\n print()"} {"instruction": "Analyze the following data in R and identify the mean, median and mode of the data.", "input": "[Data] [2, 3, 5, 6, 4, 1, 3, 6, 4]", "output": "The mean of the data is 3.77, the median is 4 and the mode is 3."} {"instruction": "Find the area of the following circle", "input": "Radius: 8 cm", "output": "Area = pi * r^2 Area = 3.14 * 8^2 Area = 201.06 cm^2"} {"instruction": "Create a hashmap (a key-value pair data structure) in Python that stores two values, \"name\" and \"age\".", "input": "", "output": "dict = {\n 'name': 'John',\n 'age': 30\n}"} {"text": "[EN Wikipedia] Mansur ibn Jumhur al-Kalbi\n\nMansur ibn Jumhur al-Kalbi () was an 8th-century Arab commander and one of the main and most fanatical leaders of the south Arab (\"Yaman\") tribes in the Qays–Yaman rivalry of the period, playing a major role during the Third Fitna civil war. Patricia Crone describes Mansur as \"a coarse soldier equally devoid of nobility and piety\" who was \"shunned by devout contemporaries\" as he disregarded religion and was motivated solely by his desire to avenge the torture and murder of the Yaman champion, Khalid al-Qasri, by the ardently pro-Qays governor of Iraq, Yusuf ibn Umar al-Thaqafi, in 743. A member of the Amir branch of the Banu Kalb tribe, he began his career possibly in Iraq, where the tribe had settled, but appears for the first time in Syria as a member of the plot to overthrow Caliph al-Walid II in early 744. After Walid's murder, his successor Yazid III favoured the Yaman faction, and appointed Mansur as governor of Iraq in succession to Yusuf al-Thaqafi, perhaps as a deputy of al-Harith ibn al-Abbas ibn al-Walid. His tenure was brief, as he was soon replaced by the son of Caliph Umar II, Abdallah ibn Umar ibn Abd al-Aziz. During his governorship, Mansur tried to dismiss the governor of Khurasan, Nasr ibn Sayyar, nominating his own brother Manzur as replacement, but Nasr managed to hold out and maintain his post until Mansur's replacement. Mansur returned to Syria, but soon returned to Iraq, where he fought against the Kharijite rebels under al-Dahhak ibn Qays al-Shaybani. As the Kharijites proved successful, he embraced their doctrine and converted to save his life. He continued fighting alongside the Kharijites until Marwan II's general Yazid ibn Hubayra defeated them in 747. Like many opponents of Marwan, he fled to Fars and joined the forces of the Alid rebel Abdallah ibn Mu'awiya. When Ibn Hubayra defeated Ibn Mu'awiya shortly after, Mansur fled to India, where he managed to become governor of Sind, and even obtained recognition of this post from the nascent Abbasid Caliphate. In 751, however, the Abbasids sent Musa ibn Ka'b al-Tamimi against him. Defeated in battle, Mansur fled to the desert, where he died. References Sources Date of birth unknown 751 deaths Generals of the Umayyad Caliphate Umayyad governors of Iraq Arab generals People of the Third Fitna Abbasid governors of Sind Arab rebels Kharijites 8th-century Arab people Banu Kalb"} {"text": "[CS Wikipedia] Běh na 3000 metrů\n\nBěh na 3000 metrů je atletická disciplína, patřící mezi střední tratě. Tato vzdálenost je pak považována za nejdelší střední trať. Je odvozena od 2 anglosaských mil, vzdálenosti rovné 3218,70 m. Patří mezi méně vypisované a běhané tratě, není součástí olympijských her ani atletických mistrovství pod otevřeným nebem. Venku se běhá na 7,5 okruzích, v hale pak na rovných 15 kolech. Současní světoví rekordmani Současné rekordy – dráha Současné rekordy podle kontinentů Současní světoví rekordmani v hale Současné rekordy – hala Top 10 atletů Muži - dráha Ženy - dráha Muži - hala Ženy - hala Průměrná rychlost Daniel Komen běžel při mužském SR průměrnou rychlostí 6,808 m/s (24,51 km/h), každých 400 metrů tak urazil v průměru za 58,76 s. a každých 1000 metrů za 2:26,89 min. Při ženském SR běžela Wang Ťün-sia průměrnou rychlostí 6,171 m/s (22,22 km/h), což odpovídá každému úseku 400 metrů za 64,81 s. a každému kilometru za 2:42,04 min. Reference Externí odkazy Článek o Komenově rekordním běhu s videem (česky) Běh"} {"instruction": "Explain the following Python code", "input": "def fun(a,b):\n return a+b", "output": "The given code defines a function named 'fun' which accepts two arguments, 'a' and 'b'. The function returns the sum of 'a' and 'b'."} {"instruction": "Implement a Python program for the 0/1 knapsack problem.", "input": "weights = [10, 30, 20] \nvalues = [30, 90, 60]\ncapacity = 50", "output": "def knapsack_0_1(weights, values, capacity):\n n = len(values)\n matrix = [ [0]*(capacity+1) for _ in range(n+1) ]\n \n for i in range(1, n+1):\n for c in range(capacity+1):\n if weights[i-1] > c:\n matrix[i][c] = matrix[i-1][c]\n else:\n matrix[i][c] = max(matrix[i-1][c],\n values[i-1] + matrix[i-1][c-weights[i-1]])\n return matrix[i][c]"} {"instruction": "Create a dictionary from two lists with the same length.", "input": "mylist1 = [\"a\", \"b\", \"c\", \"d\"] mylist2 = [\"1\", \"2\", \"3\", \"4\"]", "output": "mydict = dict(zip(mylist1, mylist2)) print(mydict)"} {"instruction": "Create an HTML page that displays \"Hello World!\" when opened in a web browser.", "input": "", "output": " Hello World!

    Hello World!

    "} {"instruction": "Construct the code which will generate addition equations with randomized numbers ranging from 0 to 5.", "input": "", "output": "import random def generate_addition_equation(): a = random.randrange(0, 6) b = random.randrange(0, 6) equation = str(a) + \" + \" + str(b) + \" = \" return equation"} {"instruction": "Rewrite the following code using the try-catch statement", "input": "if (num!=0) result = 1/num; else result = 0;", "output": "try { result = 1 / num; } catch (err) { result = 0; }"} {"instruction": "Create a python program to fetch data from the website http://example.com", "input": "", "output": "import requests\n\nurl = 'http://example.com'\nresp = requests.get(url)\ndata = resp.json()\nprint(data)"} {"text": "[HI Wikipedia] लाल गलियारा\n\nलाल गलियारा भारत के पूर्वी भाग का एक क्षेत्र है जहाँ नक्सलवादी (साम्यवाद) उग्रवादी संगठन सक्रीय हैं। आंध्र प्रदेश, छत्तीसगढ़, उड़ीसा, झारखंड, मध्य प्रदेश, पश्चिम बंगाल और उत्तर प्रदेश के कुछ भागों पर विस्तृत इस क्षेत्र में आधुनिक भारत के सबसे ऊँचे निरक्षरता, निर्धनता और अतिजनसंख्या के दर मिलते हैं। भारतीय सरकारी स्रोतों के अनुसार जुलाई २०११ में ८३ ज़िले इस लाल गलियारे में आते थे। फरवरी २०१९ तक, ११ राज्यों के ९० जिले वामपंथी उग्रवाद से प्रभावित हैं। अर्थव्यवस्था लाल गलियारे के क्षेत्रों की अर्थव्यवस्था अक्सर कृषि जैसे प्राथमिक व्यवसायों पर ही टिकी होती है और उसमें विविधता नहीं होती। किसी-किसी इलाक़े में खनिकर्म और वन-सम्पदा से सम्बंधित व्यवसाय भी चलते हैं, लेकिन उद्योग और अन्य विकसित कार्य नहीं हैं। यह अविकसित अर्थव्यवस्था इस क्षेत्र की तेज़ी से बढ़ती आबादी का पोषण करने में अक्षम है। इसके बावजूद इस क्षेत्र में भारत की प्राकृतिक सम्पदा का एक बड़ा भाग स्थित है, मसलन उड़ीसा में 'भारत का ६०% बॉ​क्साइट, २५% कोयला, २८% लौह खनिज​, ९२% निकल और २८% मैन्गनीज़​ स्थित है'। सन्दर्भ भारत के क्षेत्र"} {"instruction": "Write a function to calculate the average score of a list of numbers.", "input": "", "output": "def get_average(numbers): \"\"\" Calculate and return the average of a list of numbers :param numbers: the list of numbers :return: the average of the numbers \"\"\" total = 0 for number in numbers: total += number return total / len(numbers)"} {"instruction": "Create a function in Python that takes an integer input and prints all combinations of the numbers.", "input": "4", "output": "def permutations(n):\n for i in range(n+1):\n for j in range(n+1):\n for k in range(n+1):\n for l in range(n+1):\n print(i,j,k,l)\n\n# Calling the function\npermutations(4)"} {"instruction": "Create a Python script to count the frequencies of each letter in a given string.", "input": "text = \"Hello, World!\"", "output": "def count_letter_frequency(text): \n frequency = {} \n for letter in text: \n if letter in frequency: \n frequency[letter] += 1\n else: \n frequency[letter] = 1\n return frequency \n \ntext = \"Hello, World!\"\nprint(count_letter_frequency(text))"} {"text": "[DE Wikipedia] Vilablareix\n\nVilablareix ist eine katalanische Gemeinde in der Provinz Girona im Nordosten Spaniens. Sie liegt in der Comarca Gironès. Einzelnachweise Weblinks Information der Generalitat de Catalunya zu Vilablareix Ort in Katalonien"} {"instruction": "Create a Python code for printing the following pattern.", "input": "", "output": "# Pattern for i in range(1,6): for j in range(1,i+1): print(i,end=\"\") print(\"\")"} {"instruction": "Generate a correct Python program that implements a depth-first search algorithm.", "input": "", "output": "def dfs(graph, node, visited):\n if node not in visited:\n visited.append(node)\n for n in graph[node]:\n dfs(graph, n, visited)\n return visited"} {"instruction": "Write a Python function to predict the sentiment of a given text.", "input": "text = ‘I love this film’", "output": "import nltk\nimport numpy as np\nfrom nltk.sentiment.vader import SentimentIntensityAnalyzer\n\ndef sentiment_score(text): \n \"\"\"\n Computes the sentiment score of a given text.\n \"\"\"\n sid = SentimentIntensityAnalyzer()\n scores = sid.polarity_scores(text)\n sentiment = np.argmax(list(scores.values()))\n return sentiment \n\nif __name__ == '__main__':\n text = 'I love this film'\n print(sentiment_score(text))"} {"text": "[HI Wikipedia] ऊष्मा इंजन\n\nजो इंजन ऊष्मा को यांत्रिक ऊर्जा में बदलते हैं उन्हें ऊष्मा इंजन (थर्मल इंजन) कहते हैं। ये इंजन ऊष्मा के उच्च ताप से निम्न ताप पर प्रवाहित होने के गुण का उपयोग करके बनाए जाते हैं। इसके विपरीत वे इंजन जो यांत्रिक ऊर्जा की सहायता से ऊष्मा को अधिक ताप से कम ताप पर ले जाते हैं उन्हें 'ऊष्मा पम्प' या 'प्रशीतक' (रेफ्रिजिरेटर) कहते हैं। उच्च ताप से निम्न ताप पर ऊष्मा किसी तरल के सहारे स्थानान्तरित होती है। ऊष्मा मशीनें प्रायः किसी ऊष्मा चक्र में काम करती हैं। इसीलिए इन्हें सम्बन्धित ऊष्मागतिकीय चक्र (थर्मोडाइनेमिक सायकिल) के नाम से जाना जाता है। उदाहरण के लिए कर्ना चक्र पर काम करने वाला ऊष्मा इंजन 'कर्ना इंजन' कहलाता है। ऊष्मा इंजन अन्य इंजनों से इस मामले में भिन्न हैं कि इनकी अधिकतम दक्षता कर्ना के प्रमेय से निर्धारित होती है जो अपेक्षाकृत बहुत कम होती है। किन्तु फिर भी ऊष्मा इंजन सर्वाधिक प्रचलित इंजन है क्योंकि लगभग सभी प्रकार की उर्जाओं को ऊष्मा में बहुत आसानी से बदला जा सकता है और ऊष्मा इंजन द्वारा इस ऊष्मा को यांत्रिक ऊर्जा में। वर्गीकरण अन्तर्दहन इंजन बहिर्दहन इंजन बाहरी कड़ियाँ Video of Stirling engine running on dry ice Heat Engine भौतिकी के कांसेप्ट इंजन ऊष्मागतिकी ऊर्जा रूपान्तरण"} {"instruction": "Create a for loop in Python to iterate through a given list of numbers and find the sum.", "input": "[11, 12 , 15, 20, 56]", "output": "nums = [11, 12, 15, 20, 56]\n\ntotal = 0\nfor num in nums:\n total += num\n \nprint(total) # 110"} {"text": "[HI Wikipedia] ईद उल-फ़ित्र\n\nईद उल-फ़ित्र या ईद उल-फितर (अरबी: عيد الفطر) मुस्लमान रमज़ान उल-मुबारक के एक महीने के बाद एक मज़हबी ख़ुशी का त्यौहार मनाते हैं। जिसे ईद उल-फ़ित्र कहा जाता है। ये यक्म शवाल अल-मुकर्रम्म को मनाया जाता है। ईद उल-फ़ित्र इस्लामी कैलेण्डर के दसवें महीने शव्वाल के पहले दिन मनाया जाता है। इसलामी कैलंडर के सभी महीनों की तरह यह भी नए चाँद के दिखने पर शुरू होता है। मुसलमानों का त्योहार ईद मूल रूप से भाईचारे को बढ़ावा देने वाला त्योहार है। इस त्योहार को सभी आपस में मिल के मनाते है और खुदा से सुख-शांति और बरक्कत के लिए दुआएं मांगते हैं। पूरे विश्व में ईद की खुशी पूरे हर्षोल्लास से मनाई जाती है। इतिहास मुसलमानों का त्यौहार ईद रमज़ान का चांद डूबने और ईद का चांद नज़र आने पर उसके अगले दिन चांद की पहली तारीख़ को मनाया जाता है। इस्लाम में दो ईदों में से यह एक है (दुसरी ईद उल जुहा या कुरबानी की ईद कहलाती है)। पहली ईद उल-फ़ितर पैगम्बर मुहम्मद ने सन 624 ईसवी में जंग-ए-बदर के बाद मनायी थी। ईद उल फित्र के अवसर पर पूरे महीने अल्लाह के मोमिन बंदे अल्लाह की इबादत करते हैं रोज़ा रखते हैं और क़ुआन करीम कुरान की तिलावत (इबादत) करके अपनी आत्मा को शुद्ध करते हैं जिसका अज्र या मजदूरी मिलने का दिन ही ईद का दिन कहलाता है जिसे उत्सव के रूप में पूरी दुनिया के मुसलमान बड़े हर्ष उल्लास से मनाते हैं ईद उल-फितर का सबसे अहम मक्सद एक और है कि इसमें ग़रीबों को फितरा देना वाजिब है जिससे वो लोग जो ग़रीब हैं मजबूर हैं अपनी ईद मना सकें नये कपड़े पहन सकें और समाज में एक दूसरे के साथ खुशियां बांट सकें फित्रा वाजिब है उनके ऊपर जो 52.50 तोला चाँदी या 7.50 तोला सोने का मालिक हो अपने और अपनी नाबालिग़ औलाद का सद्कये फित्र अदा करे जो कि ईद उल फितर की नमाज़ से पहले करना होता है। ईद भाई चारे व आपसी मेल का तयौहार है ईद के दिन लोग एक दूसरे के दिल में प्यार बढाने और नफरत को मिटाने के लिए एक दूसरे से गले मिलते हैं उपवास की समाप्ति की खुशी के अलावा इस ईद में मुसलमान अल्लाह का शुक्रिया अदा इसलिए भी करते हैं कि अल्लाह ने उन्हें महीने भर के उपवास रखने की शक्ति दी। हालांकि उपवास से कभी भी मोक्ष संभव नहीं क्योंकि इसका वर्णन पवित्र धर्म ग्रन्थो में नहीं है। पवित्र कुरान शरीफ भी बख्बर संत से इबादत का सही तरीका लेकर पूर्ण मोक्ष प्राप्त करने के लिए सर्वशक्तिमान अल्लाह की पूजा करने का निर्देश देता है। ईद के दौरान बढ़िया खाने के अतिरिक्त नए कपड़े भी पहने जाते हैं और परिवार और दोस्तों के बीच तोहफ़ों का आदान-प्रदान होता है। सिवैया इस त्योहार का सबसे मत्वपूर्ण खाद्य पदार्थ है जिसे सभी बड़े चाव से खाते हैं। ईद के दिन मस्जिदों में सुबह की प्रार्थना से पहले हर मुसलमान का फ़र्ज़ होता है कि वो दान या भिक्षा दे। इस दान को ज़कात उल-फ़ितर कहते हैं। यह दान दो किलोग्राम कोई भी प्रतिदिन खाने की चीज़ का हो सकता है, मिसाल के तौर पे, आटा, या फिर उन दो किलोग्रामों का मूल्य भी। से पहले यह ज़कात ग़रीबों में बाँटा जाता है। उपवास की समाप्ति की खुशी के अलावा इस ईद में मुसलमान अल्लाह का शुक्रिया अदा इसलिए भी करते हैं कि अल्लाह ने उन्हें पूरे महीने के उपवास रखने की शक्ति दी। ईद के दौरान बढ़िया खाने के अतिरिक्त नए कपड़े भी पहने जाते हैं और परिवार…"} {"text": "[CS Wikipedia] Odstředivá síla\n\nOdstředivá síla (nebo také centrifugální) je síla působící na těleso resp. hmotný bod směrem od středu křivosti trajektorie. V případě pohybu po kružnici jde o střed této kružnice. V obecnějším případě pohybu po hladké křivce jde o střed oskulační kružnice. Existují dva odlišné typy sil, které mají odstředivý směr. Prvním je reakce na dostředivou sílu v inerciální vztažné soustavě, což je síla skutečná. Druhým typem je setrvačná odstředivá síla, kterou zavádíme v otáčející se vztažné soustavě, má charakter zdánlivé síly, a proto k ní neexistuje žádná reakce. Zaměňování těchto dvou druhů sil je běžné, ale nesprávné a často zavádějící. Reakce na dostředivou sílu Těleso A, které se v inerciální vztažné soustavě pohybuje po zakřivené trajektorii, má dostředivé zrychlení. Podle druhého Newtonova zákona (zákon síly) musí být toto zrychlení způsobeno silou, kterou nějaké jiné těleso B působí na těleso A. Tato síla má stejný směr jako zrychlení, to znamená do středu, a proto se nazývá dostředivou silou. Podle třetího Newtonova zákona (akce a reakce) musí také těleso A působit stejně velkou silou na těleso B, ale opačným směrem. To znamená, že tato reakce má směr od středu otáčení a lze ji označovat jako odstředivou sílu. Příklad: průjezd obloukem. Aby železniční vůz projel levým obloukem a nepokračoval v pohybu přímým směrem (zákon setrvačnosti), musí na něj působit síla směrem doleva. Na železnici tuto dostředivou sílu zajišťuje kolej a můžeme ji nazvat akcí. Zároveň s ní vzniká reakce, takže vůz působí na kolej stejně velkou silou, ale směrem doprava. Kdyby nebyla kolej dobře uložena, tato síla by s ní pohnula (což se občas i stane, zejména při spolupůsobení pnutí v extrémních vedrech). Míří směrem od středu oblouku, takže jí můžeme říkat odstředivá síla. Je to síla skutečná, ale působí na kolej, nikoli na jedoucí vůz. Nemá tedy význam sčítat ji se silami působícími na vůz. Situaci jsme popsali v inerciální vztažné soustavě spjaté se Zemí. V této soustavě není žádná odstředivá síla, která by působila na vůz. Velikost odstředivé síly působící na kolej je stejná jako velikost dostředivé síly , kterou působí kolej na vůz. To znamená kde je hmotnost vozu, je okamžitá rychlost jízdy, je dostředivé zrychlení, je poloměr křivosti oblouku a je úhlová rychlost. Terminologie Příručka pro učitele fyziky na SŠ doporučuje používat pojem odstředivá síla pouze pro tuto skutečnou sílu v inerciální vztažné soustavě, nikoli pro setrvačnou, tedy zdánlivou sílu v neinerciálních soustavách, která je popsána v následující sekci. Aby nemohlo dojít k záměně, používá se ve středoškolských učebnicích a dalších textech pro zdánlivou sílu v otáčející se soustavě přesnější označení setrvačná odstředivá síla. Naopak v publikacích zaměřených teoretičtěji se pojem odstředivá síla…"} {"instruction": "Generate an artificial neural network algorithm in Python for classification.", "input": "", "output": "import numpy as np\nfrom keras.models import Sequential\nfrom keras.layers import Dense\n\n# Generate data\nX, y = np.random.rand(1000, 10), np.random.randint(2, size = (1000, 1))\n\n# Define model\nmodel = Sequential()\nmodel.add(Dense(64, input_dim=10, activation='relu'))\nmodel.add(Dense(64, activation='relu'))\nmodel.add(Dense(1, activation='sigmoid'))\n\n# Compile model\nmodel.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])\n\n# Fit model\nmodel.fit(X, y, epochs=20, batch_size=32)"} {"instruction": "What is the maximum value of a byte in a binary system?", "input": "", "output": "The maximum value of a byte in a binary system is 255. This is because there are 8 bits in a byte, and the maximum value each bit can have is 1, giving a maximum value of 8 ones, or 255 in the denary system."} {"instruction": "Create a Python list in which each element is a dictionary containing customer data.", "input": "[\n {\n 'name': 'John',\n 'age': 21\n },\n {\n 'name': 'Minh',\n 'age': 24\n },\n {\n 'name': 'Linda',\n 'age': 18\n }\n]", "output": "customers = [\n {\n 'name': 'John',\n 'age': 21\n },\n {\n 'name': 'Minh',\n 'age': 24\n },\n {\n 'name': 'Linda',\n 'age': 18\n }\n]"} {"instruction": "How to find the minimum number in an array of integers in Java?", "input": "", "output": "We can find the minimum number in an array of integers in Java using the Arrays.stream() method. The Arrays.stream() method takes an array and returns a stream of its elements. We can then use the Stream.min() function to find the minimum element in the array. Example: int[] arr = {2, 4, 6, 8, 10}; int min = Arrays.stream(arr).min().getAsInt(); System.out.println(min); Output: 2"} {"instruction": "Create a command line tool in Python that takes a numerical input (e.g. from user input) and prints out all prime numbers up to that number.", "input": "50", "output": "import sys\n\ndef main():\n try:\n number = int(sys.argv[1])\n except (IndexError, ValueError):\n number = int(input('Please enter a number: '))\n\n prime_list = []\n for num in range(2, number + 1):\n for i in prime_list:\n if num % i == 0:\n break\n else:\n prime_list.append(num)\n\nprint(prime_list)\n\nif __name__ == '__main__':\n main()"} {"instruction": "Using HTML, write a code to display a table with two columns and three rows.", "input": "", "output": "
    Column 1 Column 2
    Row 1 Row 1
    Row 2 Row 2
    Row 3 Row 3
    "} {"instruction": "Design a function 'sortString' which takes a string of words and sorts each word alphabetically.", "input": "string = \"zebra cat dog\"", "output": "def sortString(string): words = string.split(\" \") sortedWords = [word for word in words] for i in range(len(sortedWords)): sortedWords[i] = \"\".join(sorted(sortedWords[i])) return \" \".join(sortedWords) print(sortString(\"zebra cat dog\")) OUTPUT: abcerz cdgot"} {"text": "[EN Wikipedia] Trichostegia (caddisfly)\n\nTrichostegia is a genus of insects belonging to the family Phryganeidae. The species of this genus are found in Europe and Northern America. Species: Trichostegia minor (Curtis, 1834) References Phryganeidae Trichoptera genera"} {"instruction": "How to write a CSS style to make a text larger?", "input": "", "output": ".className { font-size: larger; }"} {"instruction": "Create a class in Python for creating a currency converter that can convert between any currencies.", "input": "Not applicable", "output": "import requests\n\nclass CurrencyConverter:\n def __init__(self, source_currency, target_currency, amount):\n self.source_currency = source_currency\n self.target_currency = target_currency\n self.amount = amount\n\n def convert(self):\n \"\"\"\n This method returns the converted amount\n \"\"\"\n url = f\"https://api.exchangeratesapi.io/latest?base={self.source_currency}&symbols={self.target_currency}\"\n response = requests.get(url)\n data = response.json()\n rate = data[\"rates\"][self.target_currency]\n\n return rate * self.amount\n\n\n# Usage sample\nconverter = CurrencyConverter(\"USD\", \"EUR\", 100)\nprint(converter.convert())"} {"instruction": "Design a Python program that accepts an integer greater than 1 as input and prints out all prime numbers up to the given number.", "input": "Number = 10", "output": "def is_prime(num):\n prime = True\n if num <= 1:\n prime = False\n else: \n for i in range(2, num):\n if num % i == 0:\n prime = False\n return prime\n\ndef main():\n num = 10\n print(\"All prime numbers up to\", num, \"are:\")\n for i in range(2, num+1):\n if is_prime(i):\n print(i)\n\nmain()\n\n# Outputs: 2 3 5 7"} {"instruction": "Generate a short HTML div element.", "input": "", "output": "
    "} {"instruction": "Create a JavaScript array and add the following items: \"dog\", \"cat\", \"mouse\", \"bird\".", "input": "", "output": "let animals = [\"dog\", \"cat\", \"mouse\", \"bird\"];"} {"instruction": "Write a code to generate all possible binary strings of length 5.", "input": "", "output": "def gen_binary_strings(n): result = [] for i in range(2**n): s = bin(i)[2:] s = s.zfill(n) result.append(s) return result print(gen_binary_strings(5)) # Output: ['00000', '00001', '00010', '00011', '00100', '00101', '00110', '00111', '01000', '01001', '01010', '01011', '01100', '01101', '01110', '01111', '10000', '10001', '10010', '10011', '10100', '10101', '10110', '10111', '11000', '11001', '11010', '11011', '11100', '11101', '11110', '11111']"} {"instruction": "Create a C# program to sort a given array of integers.", "input": "int[] nums = {8, 5, 1, 3, 9};", "output": "int[] sorted = nums.OrderBy(n => n).ToArray();"} {"instruction": "Create a function in Python to apply a discount rate to a given price. This should accept two parameters, a float for the discount rate between 0 and 1 and the price. The function should return the discounted price.", "input": "discountRate = 0.9\nprice = 200", "output": "def applyDiscount(discountRate, price):\n discountedPrice = discountRate * price\n return discountedPrice\n\nprint(applyDiscount(discountRate, price)) # 180"} {"instruction": "Suggest a function name for a function that reverses a string.", "input": "", "output": "function reverseString(str) {...} or function reverseWord(str) {...}"} {"instruction": "Write a MySQL query to find all records whose name starts with 'A'.", "input": "", "output": "SELECT * FROM tableName WHERE name LIKE 'A%';"} {"instruction": "Create a regular expression that matches the email address with the domain gmail.com", "input": "", "output": "\\S+@gmail\\.com$"} {"instruction": "How do you retrieve the 3rd element of a set in Python?", "input": "", "output": "In Python, you can retrieve the 3rd element of a set by using the index operator []. The 3rd element of a set can be accessed by using the syntax set[2]. Note that the indexing in Python starts from 0, so the 3rd element will have index 2."} {"text": "[HI Wikipedia] इंडोनेशिया\n\n{{ज्ञानसन्दूक देश |native_name = इंडोनेशिया गणराज्य का एकात्मक राज्य |conventional_long_name = Negara Kesatuan Republik Indonesia |common_name = Indonesia |image_flag = Flag of Indonesia.svg |image_coat = National emblem of Indonesia Garuda Pancasila.svg |image_map = LocationIndonesia.svg |national_motto = Bhinneka Tunggal Ika(पुरानी जावा)अनेकता में एकता | national_anthem = \"इंडोनेशिया राया(इण्डोनेशिया राया)\"{{small|(English: \"महान इंडोनेशिया (इण्डोनेशिया)]]\")}} |official_languages = इंडोनेशियाई |capital = जकार्ता |demonym = इंडोनेशियाई (इण्डोनेशियाई) |latd=6 |latm=10.5 |latNS=S |longd=106 |longm=49.7 |longEW=E |largest_city = जकार्ता |government_type = अध्यक्षीय गणराज्य |leader_title1 = राष्ट्रपति |leader_name1 = जोको विडोडो |leader_title2 = उप राष्ट्रपति |leader_name2 = मारुफ़् आमिन |area_rank = 10वाँ |area_magnitude = |area_km2 = 19,19,440 |area_sq_mi = 7,35,355 |percent_water = 4.85 |population_estimate = 23,75,12,352 |population_estimate_year = जुलाई २००८ अनु. |population_estimate_rank = 3 |population_census = 20,62,64,595 |population_census_year = 2000 |population_density = 134 |population_densitymi² = 347 |population_density_rank = 84वाँ |GDP_PPP_year = 2008 |GDP_PPP = $12 खरब |GDP_PPP_rank = - |GDP_PPP_per_capita = $3,986 |GDP_PPP_per_capita_rank = - |HDI_year = 2019 |HDI_change = steady |HDI = 0.718 |HDI_ref = |HDI_rank = 107th |sovereignty_type = स्वतंत्रता |sovereignty_note = इटली से |established_event2 = घोषणा |established_date2 = 17 अगस्त 1945 |established_event3 = मान्यता |established_date3 = 27 दिसंबर (दिसम्बर) 1949 |currency = रुपिया |currency_code = IDR |time_zone = अनेक |utc_offset = +7 से +9 |time_zone_DST = आकलन नहीं |utc_offset_DST = |cctld = .id |calling_code = 62 |website = www.indonesia.go.id/id/ |footnotes = }} इंडोनेशिया गणराज्य (दीपांतर (दीपान्तर) गणराज्य) दक्षिण पूर्व एशिया और ओशिनिया में स्थित एक विशाल देश है। जिसकी राजधानी जकर्ता से (कालिमन्तन ) नूसन्तारा हो गयी है एवं यह 17,508 द्वीपों वाले इस देश की जनसंख्या लगभग 27 करोड़ है, यह दुनिया का चौथा सबसे अधिक आबादी और दुनिया में सबसे बड़ी मुस्लिम आबादी वाला देश है। देश की राजधानी जकार्ता है। देश की जमीनी सीमा पापुआ न्यू गिनी, पूर्वी तिमोर और मलेशिया के साथ मिलती है, जबकि अन्य पड़ोसी देशों सिंगापुर, फिलीपींस, ऑस्ट्रेलिया और भारत का अंडमान और निकोबार द्वीप समूह क्षेत्र शामिल है। इतिहास ईसा पूर्व ४थी शताब्दी से ही इंडोनेशिया द्वीपसमूह एक महत्वपूर्ण व्यापारिक क्षेत्र रहा है। बुनी अथवा मुनि सभ्यता इंडोनेशिया की सबसे पुरानी सभ्यता है। चौथी शताब्दी ईसा पूर्व तक ये सभ्यता काफी उन्नति कर चुकी थी। ये हिंदू एवं बौद्ध धर्म मानते थे और ऋषि परंपरा का अनुकरण करते थे। अगले दो हजार साल तक इंडोनेशिया एक हिंदू और बौद्ध देशों का समूह रहा। यहाँ हिंदू राजाओं का राज था। किर्तानेगारा और त्रिभुवना जैसे राजा यहाँ सदियों पहले राज करते थे। श्रीविजय के दौरान चीन और भारत के साथ व्यापारिक सम्बंध थे।…"} {"text": "[CS Wikipedia] Jean-Éric Vergne\n\nJean-Éric Vergne (* 25. dubna 1990 v Pontoise, Francie) je francouzský automobilový závodník, pilot Formule E a bývalý pilot Formule 1. Momentálně jezdí v šampionátu Formule E za tým DS Techeetah. Kompletní výsledky Formule 1 Formule E Externí odkazy Francouzští automobiloví závodníci Francouzští piloti F1 Piloti F1 stáje Toro Rosso Narození v roce 1990 Žijící lidé Muži Narození 25. dubna Piloti Formule E"} {"instruction": "Construct a loop to print all the numbers divisible by 3 between 1 and 20", "input": "", "output": "for num in range(1, 21): if num % 3 == 0: print(num)"} {"instruction": "Change the following Python code to a generator.", "input": "def fibonacci(n):\n if n < 0:\n return;\n result = []\n prev = 0\n current = 1\n result.append(prev)\n result.append(current)\n while(n - 2):\n temp = current \n current += prev\n prev = temp\n result.append(current)\n n = n - 1\n return result", "output": "def fibonacci(n):\n prev, current = 0, 1\n while(n):\n yield prev\n prev, current = current, prev + current \n n = n - 1\n \n# Driver Code\nresult = list(fibonacci(10))\n\nprint(result) # prints [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]"} {"instruction": "Write a function in Python that takes an array of integers as an input and returns an array with only the distinct numbers from the input.", "input": "[1, 2, 3, 4, 4, 5, 5]", "output": "def distinct_numbers(arr):\n return list(set(arr))"} {"instruction": "Replace the following if-else statement with a ternary operator.", "input": "if n > 0: x = n * 10 else: x = n * 5", "output": "x = n * 10 if n > 0 else n * 5"} {"text": "[CS Wikipedia] Helen Binaová\n\nHelen Binaová (19. května 1912 – 15. března 1983) byla americká rychlobruslařka. Startovala v ukázkových ženských závodech na Zimních olympijských hrách 1932. Na distanci 500 m se umístila na šesté příčce, na trati 1000 m byla vyřazena v rozjížďkách a v závodě na 1500 m skončila na třetím místě. Následující rok se zúčastnila prvního neoficiálního ženského Mistrovství světa 1933, kde se umístila na třetí příčce. Externí odkazy Americké rychlobruslařky Narození 19. května Narození v roce 1912 Úmrtí 15. března Úmrtí v roce 1983 Ženy"} {"instruction": "For the following list, print out the second element.", "input": "list = [\"apple\", \"banana\", \"cherry\"]", "output": "second_element = list[1] print(second_element) # prints banana"} {"text": "[HI Wikipedia] लातविया\n\nलातविया या लातविया गणराज्य (लातवियाई : Latvijas Republika) उत्तरपूर्वी यूरोप में स्थित एक देश है और उन तीन बाल्टिक गणराज्यों में से एक है जिनका द्वितीय विश्व युद्ध के बाद भूतपूर्व सोवियत संघ में विलय कर दिया गया। इसकी सीमाएं लिथुआनिया, एस्टोनिया, बेलारूस और रूस से मिलती हैं। यह आकार की दृष्टि से एक छोटा देश है और इसका कुल क्षेत्रफल ६४,५८९ वर्ग किमी और जनसंख्या २२,३१,५० (२००९) है। लातविया की राजधानी है रीगा जिसकी अनुमानित जनसंख्या है ८,२६,०००। कुल जनसंख्या का ६०% लातवियाई मूल के नागरिक है और लगभग ३०% लोग रूसी मूल के हैं। यहाँ की आधिकारिक भाषा है लातवियाई, जो बाल्टिक भाषा परिवार से है। यहाँ की आधिकारिक मुद्रा है लात्स। लात्विया को १९९१ में सोवियत संघ से स्वतंत्रता मिली थी। १ मई, २००४ को लातविया यूरोपीय संघ का सदस्य बना। यहाँ के वर्तमान राष्ट्रपति हैं - वाल्डिस ज़ाट्लर्स। इतिहास तेरहवीं से सोलहवीं शताब्दियों तक लातविया लिवोनिया और कौरलैंड तक फैला हुआ था और प्रुसीयाई राजाओं के अधीन था। सत्रहवीं सदी में लातविया पर पोलैंड और स्वीडन ने अधिकार कर लिया। अठारहवीं सदी में, न्येस्ताद की संधि के बाद लिवोनिया और कौरलैंड रूसी साम्राज्य का भाग बन गए। इसकी सरकार कौरलैंड और लिवोनिया दोनो से मिलकर बनीं थी। रूसी गृहयुद्ध के दौरान (१९१७-१९२२), लातविया के अधिकांश सैन्य वाहिनियों ने जर्मनी के विरुद्ध बोल्शेविक के पक्ष में युद्ध किया था। लातविया पहली बार १९१८ में एक स्वतन्त्र राष्ट्र के रूप में अस्तित्व में आया। दूसरे विश्व युद्ध के दौरान, इसपर प्रथम बार (दो अन्य बाल्टिक गणराज्यों के साथ) सोवियत संघ ने आक्रमण किया और बाद में नाज़ी जर्मनी ने और अंततः १९४४ में सोवियत संघ ने इसे संयोजित कर एक सोवियत गणराज्य बना दिया। १९९१ में सोवियत संघ के विघटन के बाद यह एक बार फिर एक स्वतन्त्र राष्ट्र के रूप में अस्तित्व में आया। लिथुआनिया और एस्टोनिया से विलग लातविया ने स्वतंत्र राष्ट्र राष्ट्रमण्डल की सदस्यता ग्रहण नहीं की बल्कि लातविया नें यूरो-अटलान्टिक एका का चुनाव किया और अप्रैल २००४ में नाटो का सदस्य बना और १ मई २००४ को यूरोपीय संघ का। प्रशासनिक प्रभाग लातविया २६ प्रशासकीय क्षेत्रों और ७ नगरीय क्षेत्रों में विभाजित है जिन्हें लातविया में क्रमशः apriņķis और lielpilsētas कहा जाता है। राजनीति १००-सीटों वाली एकविधाई लातवियाई संसद, जिसे सैइमा (Saeima) कहा जाता है, चुनावों द्वारा प्रति चार वर्ष में चुनी जाती है। राष्ट्रपति का चुनाव सैइमा द्वारा एक अन्य चुनाव में किया जाता है और यह भी प्रति चार वर्ष में होता है। राष्ट्रपति द्वारा प्रधानमंत्री नियुक्त किया जाता है, जो अपनी मंत्रीपरिषद के साथ, कार्यकारी शाखा बनाता है, जिसे सैइमा में विश्वास मत प्राप्त करना होता है। यही संसदीय प्रणाली दूसरे विश्व युद्ध से पूर्व भी थी। सर्वोच्च सिविल सेवक १६ राज्य सचिव होते हैं। लातविया में १८ वर्ष से ऊपर के सभी लातवियाई नागरिक संसदीय चुनावों मतदान कर सकते हैं। राष्ट्रपति चुनाव २००७ राष्ट्रपति चुनाव, ३१ मई २००७ वाल्डिस ज़ाट्लर्स को संसद द्वारा राष्ट्रपति चुना गया। आम चुनाव २००६ के आम चुनाव २००६ के संसदीय चुनावों में १९ राजनीतिक दलों में भाग लिया था। इन चुनावों में प्रधानमंत्री एइग्कार्स काल्विटिस के सत्तारूढ़…"} {"instruction": "Write a python script to segregate a list of numbers into lists odd and even numbers.", "input": "list_of_numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "odd_numbers = []\neven_numbers = []\n\nfor number in list_of_numbers:\n if number % 2 == 0:\n even_numbers.append(number)\n else:\n odd_numbers.append(number)\n\nprint(\"Odd numbers: \" + str(odd_numbers))\nprint(\"Even numbers: \" + str(even_numbers))"} {"instruction": "Create a program to generate all possible pairs of a given list of numbers", "input": "[1, 2, 3]", "output": "\"\"\" Create a program to generate all possible pairs of a given list of numbers \"\"\" def generate_pairs(nums): pairs = [] for i in range(len(nums)): for j in range(i+1, len(nums)): pairs.append((nums[i], nums[j])) return pairs if __name__ == '__main__': print(generate_pairs([1, 2, 3]))"} {"instruction": "Parse a list of numbers from a string in Python.", "input": "s = \"1, 2, 3, 4, 5, 6\"", "output": "import re list = re.findall(r'\\d+', s)"} {"instruction": "Write an algorithm in Python which reads a string and reorders it alphabetically.", "input": "string s = 'dcba'", "output": "def reorder_string(s): s = sorted(s) return ''.join(s) print(reorder_string('dcba'))"} {"text": "[DE Wikipedia] Hartmannstraße 28 (Bad Kissingen)\n\nDas Anwesen Hartmannstraße 28 in der Hartmannstraße in Bad Kissingen, der Großen Kreisstadt des unterfränkischen Landkreises Bad Kissingen, gehört zu den Bad Kissinger Baudenkmälern und ist unter der Nummer D-6-72-114-299 in der Bayerischen Denkmalliste registriert. Geschichte Das Mietshaus wurde im Jahr 1911 vom Bad Kissinger Architekten Franz Krampf im späten Jugendstil errichtet. Bei dem Anwesen handelt es sich um einen dreigeschossigen Mansardwalmdachbau mit bossiertem Sockel und geschwungenem Mittelgiebel. Das Mansarddach und der geschwungene Mittelgiebel des Anwesens sind charakteristische Elemente für den Jugendstil. Die strenge Symmetrie und eine gewisse Sprödigkeit der Fassade deuten auf dessen Spätphase mit einem stärker werdenden klassizisierenden Zug hin. Zu dem Anwesen gehört eine gleichzeitig entstandene Vorgarteneinfriedung mit Hausteinverkleidung. Literatur Weblinks Baudenkmal in Bad Kissingen Bauwerk des Jugendstils in Bad Kissingen Wohngebäude in Bad Kissingen Bad Kissingen"} {"instruction": "Modify the following HTML code to add a new div element inside the existing div.", "input": "
    Hello, world!
    ", "output": "
    New div element
    Hello, world!
    "} {"instruction": "Delete all duplicated characters in a string.", "input": "String: abcabcabc", "output": "abc"} {"instruction": "Create an R program to find the percentage of males and females in a given dataset.", "input": "Table Name: people", "output": "male_count <- nrow(people[people$Gender == \"Male\", ]) female_count <- nrow(people[people$Gender == \"Female\", ]) total <- nrow(people) male_percentage <- (male_count / total) * 100 female_percentage <- (female_count / total) * 100 print(paste0('Percentage of males:', male_percentage, '%')) print(paste0('Percentage of females:', female_percentage, '%'))"} {"instruction": "Create a REST API with Python and Flask for managing a movie database. This API should include endpoints to create a new movie record, retrieve a movie record, update a movie record, and delete a movie record.", "input": "Not applicable", "output": "from flask import Flask \nfrom flask_restful import Api, Resource, reqparse \n\napp = Flask(__name__)\napi = Api(app)\n\nmovies = {}\n\nclass Movie(Resource):\n def get(self, name):\n return movies[name]\n \n def post(self, name):\n parser = reqparse.RequestParser()\n parser.add_argument('year')\n parser.add_argument('rating')\n args = parser.parse_args()\n \n movies[name] = {'year': args['year'], 'rating': args['rating']}\n \n return movies[name], 201\n \n def delete(self, name):\n del movies[name]\n return '', 204\n \n def put(self, name):\n parser = reqparse.RequestParser()\n parser.add_argument('year')\n parser.add_argument('rating')\n args = parser.parse_args()\n \n movies[name] = {'year': args['year'], 'rating': args['rating']}\n \n return movies[name], 201\n \n \napi.add_resource(Movie, '/movie/') \n \napp.run(debug=True)"} {"instruction": "Create a simple calculator application in Python 3.", "input": "", "output": "def calculator():\n while True:\n print(\"Options:\")\n print(\"Enter 'add' to add two numbers\")\n print(\"Enter 'subtract' to subtract two numbers\")\n print(\"Enter 'quit' to end the program\")\n user_input = input(\": \")\n\n if user_input == \"quit\":\n break\n elif user_input == \"add\":\n num1 = float(input(\"Enter a number: \"))\n num2 = float(input(\"Enter another number: \"))\n result = str(num1 + num2)\n print(\"The answer is \" + result)\n elif user_input == \"subtract\":\n num1 = float(input(\"Enter a number: \"))\n num2 = float(input(\"Enter another number: \"))\n result = str(num1 - num2)\n print(\"The answer is \" + result)\n else:\n print(\"Unknown input\")\n \ncalculator()"} {"instruction": "Edit the following code to return a Promise in the getMessage() function", "input": "function getMessage() { const fullName = getName(); // TODO: return a Promise }", "output": "function getMessage() { const fullName = getName(); // return a Promise return new Promise ((resolve, reject) => { resolve(fullName); }); }"} {"text": "[HI Wikipedia] शास्त्रीय संगीत\n\nभारतीय शास्त्रीय संगीत या मार्ग, भारतीय संगीत का अभिन्न अंग है। शास्त्रीय संगीत को ही ‘क्लासिकल म्यूजिक भी कहते हैं। शास्त्रीय गायन सुर-प्रधान होता है, शब्द-प्रधान नहीं। इसमें महत्व सुर का होता है (उसके चढ़ाव-उतार का, शब्द और अर्थ का नहीं)। इसको जहाँ शास्त्रीय संगीत-ध्वनि विषयक साधना के अभ्यस्त कान ही समझ सकते हैं, अनभ्यस्त कान भी शब्दों का अर्थ जानने मात्र से देशी गानों या लोकगीत का सुख ले सकते हैं। इससे अनेक लोग स्वाभाविक ही ऊब भी जाते हैं पर इसके ऊबने का कारण उस संगीतज्ञ की कमजोरी नहीं, लोगों में जानकारी की कमी है। इतिहास भारतीय शास्त्रीय संगीत की परम्परा भरत मुनि के नाट्यशास्त्र और उससे पहले सामवेद के गायन तक जाती है। भरत मुनि द्वारा रचित भरत नाट्य शास्त्र, भारतीय संगीत के इतिहास का प्रथम लिखित प्रमाण माना जाता है। इसकी रचना के समय के बारे में कई मतभेद हैं। आज के भारतीय शास्त्रीय संगीत के कई पहलुओं का उल्लेख इस प्राचीन ग्रंथ में मिलता है। भरत मुनि के नाटयशास्त्र के बाद मतंग मुनि की बृहद्देशी और शारंगदेव रचित संगीत रत्नाकर, ऐतिहासिक दृष्टि से सबसे महत्वपूर्ण ग्रंथ माना जाता है। बारहवीं सदी के पूर्वार्द्ध में लिखे सात अध्यायों वाले इस ग्रंथ में संगीत व नृत्य का विस्तार से वर्णन है। संगीत रत्नाकर में कई तालों का उल्लेख है व इस ग्रंथ से पता चलता है कि प्राचीन भारतीय पारंपरिक संगीत में बदलाव आने शुरू हो चुके थे व संगीत पहले से उदार होने लगा था मगर मूल तत्व एक ही रहे। 11वीं और 12वीं शताब्दी में मुस्लिम सभ्यता के प्रसार ने उत्तर भारतीय संगीत की दिशा को नया आयाम दिया। राजदरबार संगीत के प्रमुख संरक्षक बने और जहां अनेक शासकों ने प्राचीन भारतीय संगीत की समृद्ध परंपरा को प्रोत्साहन दिया वहीं अपनी आवश्यकता और रुचि के अनुसार उन्होंने इसमें अनेक परिवर्तन भी किए। इसी समय कुछ नई शैलियाँ भी प्रचलन में आईं जैसे खयाल, गज़ल आदि और भारतीय संगीत का कई नये वाद्यों से भी परिचय हुआ जैसे सरोद, सितार इत्यादि। भारतीय संगीत के आधुनिक मनीषी स्थापित कर चुके हैं कि वैदिक काल से आरम्भ हुई भारतीय वाद्यों की यात्रा क्रमश: एक के बाद दूसरी विशेषता से इन यंत्रों को सँवारती गयी। एक-तंत्री वीणा ही त्रितंत्री बनी और सारिका युक्त होकर मध्य-काल के पूर्व किन्नरी वीणा के नाम से प्रसिद्ध हुई। मध्यकाल में यह यंत्र जंत्र कहलाने लगा जो बंगाल के कारीगरों द्वारा आज भी इस नाम से पुकारा जाता है। भारत में पहुँचे मुस्लिम संगीतकार तीन तार वाली वीणा को सह (तीन) + तार = सहतार या सितार कहने लगे। इसी प्रकार सप्त तंत्री अथवा चित्रा-वीणा, सरोद कहलाने लगी। उत्तर भारत में मुगल राज्य ज्यादा फैला हुआ था जिस कारण उत्तर भारतीय संगीत पर मुसलिम संस्कृति व इस्लाम का प्रभाव ज्यादा महसूस किया गया। जबकि दक्षिण भारत में प्रचलित संगीत किसी प्रकार के मुस्लिम प्रभाव से अछूता रहा। बाद में सूफी आन्दोलन ने भी भारतीय संगीत पर अपना प्रभाव जमाया। आगे चलकर देश के विभिन्न हिस्सों में कई नई पद्धतियों व घरानों का जन्म हुआ। ब्रिटिश शासनकाल के दौरान कई नये वाद्य प्रचलन में आए पाश्चात्य संगीत से भी भारतीय संगीत का परिचय हुआ। आम जनता में लोकप्रिय आज का वाद्य हारमोनियम, उसी समय प्रचलन में आया। इस तरह भारतीय संगीत के उत्थान व उसमें…"} {"instruction": "Could you write a program that does linear regression with two variables in Python?", "input": "", "output": "import numpy as np\nfrom sklearn.linear_model import LinearRegression\n\n# Create data\nx = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])\n# Create target\ny = np.dot(x, np.array([1, 2])) + 3\n\n# Create a linear regression model\nmodel = LinearRegression()\n# Fit the model\nmodel.fit(x, y)\n\n# Make prediction\nx_test = np.array([3, 5])\ny_test = model.predict([x_test])\n\n# Output prediction\nprint(\"Predicted value of y given x=[3,5] :\", y_test[0])"} {"instruction": "Generate a Python program to perform matrix multiplication.", "input": "A = [[1, 2, 3],\n [4, 5, 6],\n [7, 8, 9]] \n\nB = [[7, 8, 9],\n [4, 5, 6],\n [1, 2, 3]]", "output": "def matrixMultiplication(A,B): \n \n return [[sum(a*b for a,b in zip(A_row,B_col)) \n for B_col in zip(*B)] for A_row in A] \n\nA = [[1, 2, 3], \n [4, 5, 6], \n [7, 8, 9]] \n\nB = [[7, 8, 9], \n [4, 5, 6], \n [1, 2, 3]]\n\nC = matrixMultiplication(A,B) \n\nfor i in range(len(C)): \n print(C[i])"} {"text": "[EN Wikipedia] List of New York Red Bulls seasons\n\nSince its foundation in 1996, the American soccer club New York Red Bulls has played in the Major League Soccer professional league. The team has won 3 Supporters' Shields. Key Key to competitions Major League Soccer (MLS) – The top-flight of soccer in the United States, established in 1996. U.S. Open Cup (USOC) – The premier knockout cup competition in U.S. soccer, first contested in 1914. CONCACAF Champions League (CCL) – The premier competition in North American soccer since 1962. It went by the name of Champions' Cup until 2008. Key to colors and symbols Key to league record Season = The year and article of the season Div = Division/level on pyramid League = League name Pld = Games played W = Games won L = Games lost D = Games drawn GF = Goals for GA = Goals against GD = Goal difference Pts = Points PPG = Points per game Conf. = Conference position Overall = League position Key to cup record DNE = Did not enter DNQ = Did not qualify NH = Competition not held or canceled QR = Qualifying round PR = Preliminary round GS = Group stage R1 = First round R2 = Second round R3 = Third round R4 = Fourth round R5 = Fifth round Ro16 = Round of 16 QF = Quarterfinals SF = Semifinals F = Final RU = Runners-up W = Winners Seasons 1. Avg. attendance include statistics from league matches only. 2. Top goalscorer(s) includes all goals scored in League, MLS Cup Playoffs, U.S. Open Cup, MLS is Back Tournament, CONCACAF Champions League, FIFA Club World Cup, and other competitive continental matches. References External links New York Red Bulls New York Red Bulls seasons New York Red Bulls seasons"} {"instruction": "Create a CSS script to format the text in an h2 element.", "input": "", "output": "h2 { font-size: 22px; font-weight: bold; font-family: Arial, sans-serif; line-height: 1.2; color: #333; text-align: center; }"} {"text": "[DE Wikipedia] Karakurt\n\nAls Karakurt werden bezeichnet: Folgende Orte in der Ukraine und der Türkei: Karakurt (Ukraine), Dorf in der ukrainischen Oblast Odessa, Rajon Bolhrad. Karakurt (Türkei), Ortschaft in der türkischen Provinz Kars, Bezirk Sarıkamış. Folgende Schiffsklasse: Die Karakurt-Klasse, Korvettenklasse der russischen Marine. Folgende Spinnenart: Die Europäische Schwarze Witwe (Latrodectus tredecimguttatus), Art innerhalb der Gattung der Echten Witwen (Latrodectus)."} {"instruction": "Create a HTML page to display a table in the following format.", "input": "", "output": " Table
    Name Address Phone
    John 123 Fake Street 123-456-7890
    Jane 456 Real Street 098-765-4321
    "} {"instruction": "Does the following code fragment pass the test?", "input": "def my_func(a, b): return a + b def test_my_func(): assert(my_func(2, 3) == 5)", "output": "Yes, the code fragment passes the test since the function \"my_func\" successfully returns the value 5 when given arguments a=2 and b=3."} {"instruction": "Write a python program to print the following pattern.", "input": "n = 5", "output": "def pattern(n):\n # Outer loop \n for i in range(0, n): \n \n # Inner loop to handle number of columns \n # values changing according to outer loop \n for j in range(0, i+1): \n \n # Printing stars \n print(\"* \",end=\"\") \n \n # Ending line after each row \n print(\"\\r\") \n \n# Driver Code \npattern(5)"} {"instruction": "Write Python code to find the sum of the factorial of a given number.", "input": "3", "output": "def find_sum_factorial_number(n):\n sum_num = 0\n for i in range(1, n + 1):\n sum_num += math.factorial(i)\n return sum_num\n\nif __name__ == '__main__':\n n = int(input('Input a number: '))\n print(find_sum_factorial_number(n))"} {"instruction": "Write a JavaScript code to print the characters of a string one by one in an alert message.", "input": "str = \"Hello World!\"", "output": "for (let i = 0; i < str.length; i++) { alert(str.charAt(i)); }"} {"text": "[CS Wikipedia] Anthony Quinn\n\nAnthony Quinn, vlastním jménem Antonio Rudolfo Oaxaca Quinn, (21. dubna 1915, Chihuahua, Mexiko – 3. června 2001, Boston, USA) byl mexicko-americký herec, malíř a scenárista, dvojnásobný držitel ceny Americké filmové akademie Oscar. Život Narodil se irskému otci a mexické matce aztécké národnosti. Ačkoliv se narodil v Mexiku a po matce byl mexický Indián, vyrůstal v městečku Boyle Heights nedaleko od Los Angeles. Jeho rodiče bojovali na počátku 20. století v mexické občanské válce na straně vzbouřeneckého generála Pancho Villy a po jeho pádu museli uprchnout do USA. Otec si našel práci kulisáka v hollywoodských ateliérech. Nicméně předčasně zahynul při autonehodě a malý Anthony musel živit rodinu sám. Pracoval v pomocných dělnických povoláních a toužil stát se profesionálním boxerem. Nicméně měl jak výtvarné tak i hudební nadání, takže vystupoval s orchestrem při bohoslužbách. Pro studium architektury na vysoké škole se potřeboval zdokonalit v angličtině a proto se přihlásil do hereckého kurzu, což se mu stalo osudným. Herectví se mu postupně velmi zalíbilo. Pro svůj exotický vzhled byl v americkém filmu velmi často využíván do rolí zločinců mexického nebo indiánského původu, dále do rolí tajemných cizinců, drsných revolucionářů a všelijakých zloduchů. Velmi často hrál ve westernech a dobrodružných či kriminálních filmech. Zpočátku vystupoval pouze v malých a vedlejších rolích, nicméně se postupně vypracoval v uznávanou a obdivovanou hollywoodskou hvězdu. Měl syna Francesca, který byl taktéž hercem. Filmografie, výběr 1941 Sedmá kavalérie 1952 Viva Zapata! (role:Eufemio Zapata, Oscar za výkon ve vedlejší roli) 1954 Silnice 1956 Zvoník od Matky boží (role:Quasimodo) 1957 Žízeň po životě (role: malíř Paul Gauguin, Oscar za výkon ve vedlejší roli) 1959 Poslední vlak z Gun Hillu 1961 Děla z Navarone 1962 Lawrence z Arábie 1964 Řek Zorba 1968 Zbraně pro San Sebastian 1993 Poslední akční hrdina 2002 Ve jménu Angela Externí odkazy The Estate of Anthony Quinn Anthony Quinn's artwork Directing Anthony Quinn and article by Josh Becker The Making of Lawrence of Arabia, Digitised BAFTA Journal, Winter 1962-3 Unquelled Persona: encountering the artwork of Anthony Quinn 2008 ArtsEditor.com article Američtí herci Držitelé Oscara za nejlepší mužský herecký výkon ve vedlejší roli Hollywoodský chodník slávy Američané irského původu Naturalizovaní občané USA Narození v roce 1915 Narození 21. dubna Narození v Mexiku Úmrtí v roce 2001 Úmrtí 3. června Úmrtí v Bostonu Zemřelí na zápal plic Muži"} {"text": "[EN Wikipedia] Le Fort III osteotomy\n\nThe Le Fort III Osteotomy for oral and maxillofacial surgery, is used to correct generalised growth failure of the midface involving the upper jaw nose and cheek bones (zygomas). The surgical approach and post operative management is similar as for the Le Fort II procedure. Brow lift procedures may be carried out at the same time as Le Fort II and Le Fort III osteotomies. See also Le Fort osteotomy Le Fort fracture of skull References Oral and maxillofacial surgery"} {"instruction": "Write a Python script to send an email using the smtplib module.", "input": "", "output": "import smtplib sender = 'from@example.com' recipients = ['to@example.com'] message = \"\"\"Subject: Test Email This is a test email message. \"\"\" with smtplib.SMTP('localhost') as server: server.sendmail(sender, recipients, message)"} {"instruction": "Suggest a way to create a linked list in python.", "input": "", "output": "class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def append(self, data): new_node = Node(data) if not self.head: self.head = new_node return current = self.head while current.next: current = current.next current.next = new_node"} {"instruction": "Write a code to initialize an array with 10 elements of value 0.", "input": "", "output": "int[] array = new int[10]; Arrays.fill(array, 0);"} {"text": "[EN Wikipedia] Ryton River\n\nThe Ryton River is a river of the Canterbury region of New Zealand's South Island. It flows southwest down a long valley within the Craigieburn Range to reach the northeastern shore of Lake Coleridge. See also List of rivers of New Zealand References Rivers of Canterbury, New Zealand Rivers of New Zealand"} {"instruction": "Write a python program to convert a given hexadecimal to binary.", "input": "Hexadecimal: 0x56", "output": "def hex_to_binary(h): \n return bin(int(h, 16)) \n \nprint(hex_to_binary('0x56'))"} {"instruction": "Generate a Python script that outputs the first ten perfect squares from 1 to 100.", "input": "", "output": "for i in range(1, 11):\n print(str(i**2))"} {"instruction": "Request the average temperature of the city 'Boston' from the Weather API.", "input": "", "output": "import requests def get_average_temperature(city): api_url = 'http://api.openweathermap.org/data/2.5/weather?q='+city+'&APPID=your_api_key' response = requests.get(api_url) data = response.json() temp = data['main']['temp'] return temp - 273.15"} {"instruction": "Design an algorithm to find the two numbers in an array that have the largest sum.", "input": "[1,3,4,6,7]", "output": "# Finds two numbers in an array that have the largest sum def getMaxSum(arr): # Initialize the sum to the maximum possible value maxSum = -float('inf') # Iterate over all elements of the array for i in range(len(arr)): for j in range(i+1, len(arr)): # Compare the current sum to the maximum sum maxSum = max(maxSum, arr[i] + arr[j]) # Return the largest sum return maxSum"} {"text": "[HI Wikipedia] विश्व व्यापार संगठन\n\nविश्व व्यापार संगठन (WTO) एक अन्तर्राष्ट्रीय संगठन है, जिसका ध्येय अन्तर्राष्ट्रीय व्यापार का उदारीकरण है। यह व्यापार से सम्बन्धित नियमों को निर्धारित और प्रतिष्ठित करने के लिए विकसित देशों की पहल पर आरम्भ किया गया था। इसने आधिकारिक रूप से 1 जनवरी 1995 को, 1994 के मराकेश सहमति के अनुसार संचालन शुरू किया, इस प्रकार 1948 में स्थापित प्रशुल्क और व्यापार पर सामान्य सहमति (गैट) की जगह ली। विश्व व्यापार संगठन दुनिया का सबसे बड़ा अंतर्राष्ट्रीय आर्थिक संगठन है, जिसमें 164 सदस्य देशों का प्रतिनिधित्व है। यह वैश्विक व्यापार और वैश्विक सकल घरेलू उत्पाद का 98% से अधिक है। विश्व व्यापार संगठन व्यापार सहमतियों पर आलोचना के लिए एक ढाँचा प्रदान करके भाग लेने वाले देशों के बीच वस्तुओं, सेवाओं और बौद्धिक सम्पदा में व्यापार की सुविधा प्रदान करता है, जिसका उद्देश्य साधारणतः प्रशुल्क, कोटा और अन्य प्रतिबंधों को कम करना या समाप्त करना है; इन समझौतों पर सदस्य सरकारों के प्रतिनिधियों द्वारा हस्ताक्षर किए जाते हैं और उनकी विधायिकाओं द्वारा इसकी पुष्टि की जाती है। विश्व व्यापार संगठन व्यापार सहमतियों के लिए प्रतिभागियों के पालन को लागू करने और व्यापार से सम्बन्धित विवादों को हल करने के लिए स्वतंत्र विवाद समाधान का प्रबंधन करता है। संगठन व्यापारिक भागीदारों के बीच भेदभाव को प्रतिबन्धित करता है, लेकिन पर्यावरण संरक्षण, राष्ट्रीय सुरक्षा और अन्य महत्वपूर्ण लक्ष्यों के लिए अपवाद प्रदान करता है। WTO का मुख्यालय जिनेवा, स्वित्सरलैंड में स्थित है। इसका शीर्ष निर्णय लेने वाला निकाय मंत्रिस्तरीय सम्मेलन है, जो सभी सदस्य राज्यों से बना है और साधारणतः द्विवार्षिक रूप से आयोजित किया जाता है; सभी निर्णयों में सामान्य सहमति पर महत्व दिया जाता है। दिन-प्रतिदिन के कार्यों को सामान्य परिषद द्वारा नियंत्रित किया जाता है, जिसमें सभी सदस्यों के प्रतिनिधि शामिल होते हैं। महानिदेशक और चार डिप्टी के नेतृत्व में 600 से अधिक कर्मियों का एक सचिवालय, प्रशासनिक, पेशेवर और तकनीकी सेवाएँ प्रदान करता है। विश्व व्यापार संगठन का वार्षिक आय-व्ययक लगभग 220 मिलियन अमेरिकी डॉलर है, जो सदस्यों द्वारा उनके अंतर्राष्ट्रीय व्यापार के अनुपात के आधार पर योगदान दिया जाता है। संरचना डब्ल्यूटीओ की मूल संरचना में निम्नलिखित निकाय हैं– मंत्रिस्तरीय सम्मेलन (Ministerial Council) : यह डब्ल्यूटीओ का शासी निकाय हैI यह संगठन की रणनीतिक दिशा तय करने और अपने अधिकार क्षेत्र के तहत समझौतों पर सभी अंतिम निर्णय लेने के लिए जिम्मेदार होता है। इसमें सभी सदस्य देशों के अंतरराष्ट्रीय व्यापार मंत्री होते हैं। सामान्य काउंसिल (General Council) : व्यवहार में, ज्यादातर मामलों के लिए यह डब्ल्यूटीओ का फैसला करने वाला प्रमुख अंग है। इसमें सभी सदस्य देशों के वरिष्ठ प्रतिनिधि (सामान्यतः पर राजदूत स्तर के) होते हैं। यह डब्ल्यूटीओ के प्रतिदिन के कारोबार और प्रबंधन की देखरेख के लिए जिम्मेदार होता है। नीचे वर्णित निकायों में से कई सीधे सामान्य काउंसिल को रिपोर्ट करते हैं। व्यापार नीति समीक्षा निकाय (The Trade Policy Review Body): यह उरुग्वे राउंड के बाद बने व्यापार नीति समीक्षा तंत्र की देखरख करता है। यह सभी सदस्य देशों की व्यापार नीतियों की आवधिक…"} {"instruction": "Create an array of the squared values of all elements of the given array.", "input": "arr = [2, 3, 6, 8]", "output": "def square_arr(arr): return [x**2 for x in arr]"} {"text": "[EN Wikipedia] Yanislav Gerchev\n\nYanislav Gerchev () (born 4 October 1989) is a Bulgarian judoka. He competed at the 2016 Summer Olympics in the men's 60 kg event, in which he was eliminated in the third round by Amiran Papinashvili. References External links 1989 births Living people Bulgarian male judoka Olympic judoka for Bulgaria Judoka at the 2016 Summer Olympics Judoka at the 2015 European Games European Games competitors for Bulgaria Judoka at the 2019 European Games Judoka at the 2020 Summer Olympics 21st-century Bulgarian people"} {"instruction": "Write a JavaScript to read the following JSON object and print its \"name\" key value", "input": "data = { \"name\": \"John\", \"age\": \"33\", \"city\": \"New York\" }", "output": "console.log(data.name);"} {"instruction": "Design a Python program to convert all the characters of a string to upper case.", "input": "This is a sample sentence.", "output": "def to_upper(s):\n return s.upper()\n\nresult = to_upper(\"This is a sample sentence.\")\nprint(result)"} {"instruction": "Design a function to remove duplicates from an array", "input": "", "output": "def remove_duplicates(arr): # Stores the unique elements unique = [] # Iterate through the array for elem in arr: # If the element is not already in the unique list if elem not in unique: # Add it to the unique list unique.append(elem) # Return the array without duplicates return unique"} {"instruction": "Assemble a Python program to measure similarity", "input": "Compute the similarity between two strings.", "output": "def compute_similarity(s1, s2):\n len1 = len(s1)\n len2 = len(s2)\n max_len = max(len1, len2)\n count = 0\n\n for i in range(max_len):\n if i >= len1 or i >= len2:\n break\n if s1[i] == s2[i]:\n count += 1\n \n return count / max_len"} {"text": "[DE Wikipedia] Admiralty Island (Nunavut)\n\nAdmiralty Island (engl. für „Admiralitäts-Insel“, Inuktitut Qikiqtagafaaluk) ist eine unbewohnte, irregulär geformte arktische Insel in der Kitikmeot-Region des kanadischen Territoriums Nunavut. Sie liegt in der Victoria Strait, südlich der Collinson Peninsula von Victoria Island und östlich der Albert Edward Bay. Die Fläche der Insel beträgt 171 km², nach anderen Quellen 173,6 km². Einzelnachweise Insel (Arktischer Ozean) Insel (Nordamerika) Insel (Nunavut)"} {"instruction": "Create a method to checkout the content of dictionary.", "input": "", "output": "def check_dict(dictionary): for key in dictionary: print(key + \": \" + str(dictionary[key]))"} {"instruction": "Create a Python function that takes a list of numbers as an argument and sorts it in descending order using quick sort algorithm.", "input": "[7, 5, 2, 4, 2, 9, 3, 8]", "output": "def quickSort(nums):\n if len(nums) <= 1:\n return nums\n pivot = nums[len(nums) // 2]\n left = [x for x in nums if x < pivot]\n middle = [x for x in nums if x == pivot]\n right = [x for x in nums if x > pivot]\n return quickSort(right) + middle + quickSort(left)\n\nif __name__ == \"__main__\":\n numbers = [7, 5, 2, 4, 2, 9, 3, 8]\n print(quickSort(numbers))"} {"instruction": "Create a Python class to represent an employee record with fields name and salary.", "input": "", "output": "class Employee: def __init__(self, name, salary): self.name = name self.salary = salary def get_name(self): return self.name def get_salary(self): return self.salary"} {"instruction": "Write a function in JavaScript to remove all vowels from an input string.", "input": "", "output": "function removeVowels(str) { return str.replace(/[aeiou]/gi, ''); }"} {"instruction": "Print all the elements in the following array in descending order.", "input": "[4, 2, 6, 8, 5, 9, 1]", "output": "9 8 6 5 4 2 1"} {"instruction": "Create a web scraper in Python for scraping articles from a specific website. The web scraper should save the extracted text, title, and date.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = 'https://example.com/articles.html'\npage = requests.get(url)\nsoup = BeautifulSoup(page.content, 'html.parser')\n\n# get the title\ntitle = soup.find(\"h1\", class_=\"article-title\")\ntitle_text = title.text.strip()\n\n# get the date\ndate = soup.find(\"div\", class_=\"article-date\")\ndate_text = date.text\n\n# get the article text\ntext = soup.find(\"div\", class_=\"article-text\")\ntext_text = text.text.strip()\n \n # save the information in the file\nwith open('article.txt', 'w') as file:\n file.write(title_text+'\\n')\n file.write(date_text+'\\n')\n file.write(text_text)"} {"instruction": "Create a for loop to iterate through a given list and print the list elements.", "input": "list_items = [2, 3, 4, 5, 6, 7, 8]", "output": "\"\"\" Create a for loop to iterate through a given list and print the list elements \"\"\" list_items = [2, 3, 4, 5, 6, 7, 8] for item in list_items: print(item)"} {"instruction": "Create a data structure in Python to store employee name, salary and designation.", "input": "", "output": "emp_dict = {\n 'name':[], \n 'salary':[], \n 'designation':[]\n};"} {"instruction": "Write a Python program to generate a randomly sized array with random numbers between 0 and 1000.", "input": "Not applicable", "output": "import random\n\nn = random.randint(1, 10)\narray = [random.randint(0, 1000) for i in range(n)]\nprint(array)"} {"instruction": "Develop a python script for converting an infix expression to postfix notation.", "input": "", "output": "def infix_to_postfix(infix_expr):\n prec = {}\n prec[\"*\"] = 3\n prec[\"/\"] = 3\n prec[\"+\"] = 2\n prec[\"-\"] = 2\n prec[\"(\"] = 1\n opStack = []\n postfixList = []\n tokenList = infix_expr.split()\n\n for token in tokenList:\n if token in \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" or token in \"0123456789\":\n postfixList.append(token)\n elif token == '(':\n opStack.append(token)\n elif token == ')':\n topToken = opStack.pop()\n while topToken != '(':\n postfixList.append(topToken)\n topToken = opStack.pop()\n else:\n while (len(opStack) != 0) and (prec[opStack[-1]] >= prec[token]):\n postfixList.append(opStack.pop())\n opStack.append(token)\n\n while len(opStack) != 0:\n postfixList.append(opStack.pop())\n return \" \".join(postfixList)"} {"text": "[DE Wikipedia] William Mahaney\n\nWilliam (Bill) C. Mahaney (* 17. Mai 1941) ist ein US-amerikanischer Geograph und Geologe. William Mahaney lehrte als Dozent am Atkinson College der York University in Toronto (Kanada). Er ist Autor und Herausgeber zahlreicher Fachbücher und Aufsätze. Außerdem schreibt er Novellen und Fiction Storys. Er ist Mitglied mehrerer wissenschaftlicher Gesellschaften. 1993 erhielt er den G. K. Gilbert Award der „Association of American Geographers“ für sein Buch Ice on the Equator. Schriften Atlas of Sand Grain Surface Textures and Applications. Oxford University Press, Oxford, 2002. The Warmaker: Hannibal's Invasion of Italia and the aftermath. 2008 The Golden Till: A Novel. ISBN 978-1450245951 Ice on the Equator. Quaternary geology of Mount Kenya, East Africa, Wm Caxton Ltd, 1990, ISBN 0940473194 bzw. ISBN 9780940473195 Weblinks Eigene Homepage Werkverzeichnis bei Google Bücher Werkverzeichnis der Staatsbibliothek zu Berlin Statistik auf Microsoft Academic Search Geograph (20. Jahrhundert) Geologe (20. Jahrhundert) Hochschullehrer (York University) Autor Herausgeber US-Amerikaner Geboren 1941 Mann"} {"text": "[DE Wikipedia] Amt Uecker-Randow-Tal\n\nIm Amt Uecker-Randow-Tal sind 13 Gemeinden zur Erledigung ihrer Verwaltungsgeschäfte zusammengeschlossen. Das Amt liegt im Südosten des Bundeslandes Mecklenburg-Vorpommern (Deutschland) und im Süden des Landkreises Vorpommern-Greifswald. Im Süden grenzt das Amt an das Bundesland Brandenburg. In der Mitte des Amtes liegt die nicht amtsangehörige Stadt Pasewalk. Die Stadtverwaltung Pasewalk und die Amtsverwaltung Uecker-Randow-Tal kooperieren bei einigen Verwaltungsaufgaben miteinander. Die Gemeinden mit ihren Ortsteilen Brietzig mit Starkshof Fahrenwalde mit Bröllin, Friedrichshof und Karlsruh Groß Luckow Jatznick mit Belling, Blumenhagen, Groß Spiegelberg, Klein Luckow, Sandförde, Waldeshöhe und Wilhelmsthal Koblentz mit Breitenstein und Peterswalde Krugsdorf mit Rothenburg Nieden Papendorf Polzow mit Roggow und Neu Polzow Rollwitz mit Damerow, Schmarsow, Schmarsow-Ausbau und Züsedom Schönwalde mit Dargitz, Sandkrug und Stolzenburg Viereck mit Alt-Stallberg, Borken, Marienthal, Neuenkrug, Riesenbrück und Uhlenkrug Zerrenthin Eingemeindungen Am 1. Januar 2012 wurden die folgenden vormals eigenständigen Gemeinden als Ortsteile eingemeindet: Damerow und Züsedom nach Rollwitz Blumenhagen und Klein Luckow nach Jatznick Dienstsiegel Das Amt verfügt über kein amtlich genehmigtes Hoheitszeichen, weder Wappen noch Flagge. Als Dienstsiegel wird das kleine Landessiegel mit dem Wappenbild des Landesteils Vorpommern geführt. Es zeigt einen aufgerichteten Greifen mit aufgeworfenem Schweif und der Umschrift „AMT UECKER-RANDOW-TAL“. Wirtschaft Das Amtsgebiet ist vorwiegend landwirtschaftlich geprägt. Im Norden hat das Amt Anteil an der Ueckermünder Heide. Wirtschaftlicher und kultureller Mittelpunkt sowie Verkehrsknoten ist Pasewalk. Einzelnachweise Uecker Randow Tal Landkreis Vorpommern-Greifswald"} {"instruction": "Create a web scraper in Python to extract all links from a website.", "input": "", "output": "import requests\nfrom bs4 import BeautifulSoup\n\ndef get_all_links(url):\n \n # make a GET request to fetch the raw HTML content\n html_content = requests.get(url).text\n \n # parse the html content\n soup = BeautifulSoup(html_content, \"lxml\")\n \n # extract all links from web page \n links = soup.find_all(\"a\")\n return links"} {"text": "[DE Wikipedia] Hotel Post Sargans\n\nDas Hotel Post Sargans ist ein Hotel in Sargans im Schweizer Kanton St. Gallen. Das Hotel wechselte im Lauf seiner Geschichte mehrmals den Namen: von „Schwefelbad“ und „Gast- und Badhaus zum Rössli“ über „Gasthaus zum Rössli“ Anfang des 19. Jahrhunderts, „Gasthaus zum Schwefelbad“ ab 1843. Seit Ende des 19. Jahrhunderts bis zur Gegenwart heisst es „Hotel Post“. Geschichte Die Schwefelquellen bei Sargans wurden bereits Anfang des 19. Jahrhunderts von Gästen des nahegelegenen Wirtshauses „Schwefelbad“ für medizinische Bäder genutzt. Das genaue Erbauungsdatum des Vorgängerbaus des heutigen Gasthauses ist unbekannt. Fridolin Peter renovierte um 1840 die Badwirtschaft. Die Badquelle galt nach Aussagen von Johann Gottfried Ebel als eine der „vorzüglichsten“ Schwefelquellen der Schweiz. Diese wurde aber schon 100 Jahr zuvor mit viel Erfolg als Heilquelle genutzt. Einige Reparaturen fanden 1843 statt. A. Zindel-Kressig als Besitzer der Schwefelquelle beim Kaufhaus Anrig wurde in diesem Jahr Besitzer. Im Jahre 1888 erfolgte der erste Anbau des Gasthauses. 1897 kam eine Kegelbahn hinzu sowie kurz darauf eine „Tonhalle“ mit grossem Theatersaal. Die Besitzer entschieden sich damals, das Hotel erneut umzubenennen in „Hotel Post“, so wie es heute noch genannt wird. Der Name wurde ausgewählt, auf Grund der Post, die damals im Mitteltrakt hineingebaut wurde. Im Stockwerk darüber wurden Wohnungen gebaut. Während des Zweiten Weltkrieges übernachtete General Guisan regelmässig im Hotel Post. Er war in dieser Zeit für das Schweizer Réduit zuständig, darum musste er Sargans oft besuchen. 1968 übernahm die Familie Kunz das Hotel Post. Unter der Leitung von Ernst Grob wurden 1979 mehrere Umgestaltungen der Räumlichkeiten durchgeführt. Die oberen Etagen mussten dabei von Stahlstützen getragen werden, die WC-Anlagen wurden ins Hinterhaus verlegt. Die inoffizielle Neueröffnung des Restaurants fand am 23. Dezember 1979 statt, offiziell war die Eröffnung am 1. Februar 1980. Im Jahr 1986 folgte der nächste Umbau: In nur vier Wochen entstand der Saal, der für bis zu 200 Personen geplant wurde, dazu kam ein weiterer Saal für bis zu 50 Personen. 1990 wurde das Hotel an Edith und Peter Kunz übergeben. Ein Anbau mit 40 Zimmern im hinteren Bereich wurde im Jahre 1999 erstellt. Im Jahr 2015 entstand ein Seminarraum. Das Hotel Post wurde 2018 an die dritte Generation übergeben. Seither führen Rico Kunz und Patricia Baer das Haus. Weblinks Hotel Post Sargans, Homepage Geschichte, Homepage Hotel Schwefelbad 1933 Hotel Post 1951 Einzelnachweise Post Sargans Sargans Unternehmen (Kanton St. Gallen)"} {"text": "[DE Wikipedia] Franz-Heinrich Philipp\n\nFranz-Heinrich Philipp (* 28. Juni 1921 in Königsberg; 3. März 1984 in Marburg) war ein deutscher Kirchenhistoriker und Bibliothekar. Leben Franz-Heinrich Philipp studierte nach Arbeits- und Kriegsdienst sowie Gefangenschaft (1938 bis 1950) Evangelische Theologie, Religionswissenschaft, Philosophie, Psychologie und Slawistik an der Universität Marburg und promovierte dort 1956. Außerdem hatte er 1954 und 1956 das erste und zweite theologische Examen abgelegt. Als Bibliotheksreferendar an der Universitätsbibliothek Marburg trat er 1956 in die Ausbildung für den höheren Bibliotheksdienst ein (Fachprüfung am Bibliothekar-Lehrinstitut des Landes Nordrhein-Westfalen 1958). Von 1958 bis 1984 war er dann wieder an der Universitätsbibliothek Marburg tätig, die er von 1973 bis 1981 als Direktor leitete. Im Jahre 1969 hatte er sich an der Universität Marburg habilitiert und wurde dort 1972 zum Honorarprofessor für Kirchengeschichte ernannt. Schriften (Auswahl) Tolstoj und die protestantische Bibelwissenschaft. In: Zeitschrift für Theologie und Kirche, Bd. 54 (1957), S. 80–95. Tolstoj und Pascal. In: Zeitschrift für Religions- und Geistesgeschichte, Bd. 10 (1958), S. 23–44. Tolstoj und der Protestantismus (= Osteuropastudien der Hochschulen des Landes Hessen, Reihe 2, Bd. 2). Schmitz, Gießen 1959 (Dissertation Universität Marburg). Der Ausleihvorgang an den deutschen wissenschaftlichen Universalbibliotheken. Eine Untersuchung an Hand von Arbeitszeitstudien (= Arbeiten aus dem Bibliothekar-Lehrinstitut des Landes Nordrhein-Westfalen, Bd. 17). Greven, Köln 1959. Leo Tolstoj, vom Frieden ohne Gewalt. Eine Einführung in Leben und Lehre Tolstojs. Steinkopf, Stuttgart 1960. Ad fontes. Johannes Evangelista Gossner. Leben und Lebenswerk. Steinkopf, Stuttgart 1964. Der deutsche Protestantismus und das Judentum. Eine historische Untersuchung für die Jahre 1848-1930. Habilitationsschrift Universität Marburg 1969. Zwiegespräch mit Gott. Das Gebet im Leben und Lebenswerk Johann Albrecht Bengels. Steinkopf, Stuttgart 1972, ISBN 3-7984-0257-4. (Hrsg.): Bibliotheksbau und Bibliothekstechnik. Ein Kompendium für Bibliothekare (= Bibliothekspraxis, Bd. 11). Verlag Dokumentation, Pullach 1973, ISBN 3-7940-4011-2. Anmerkungen zu drängenden Fragen des Bibliothekswesens in der BRD. In: Bibliotheksdienst, Jg. 9 (1976), S. 446–457. (mit Herwig Gödeke): Die Universitätsbibliothek Marburg 1527–1977. Eine bauhistorische Darstellung (= Schriften der Universitätsbibliothek Marburg, Bd. 7). Kempkes, Gladenbach 1977. Die Literaturversorgung in der Bundesrepublik Deutschland. In: Heinz Maier-Leibnitz (Hrsg.): Information und Gesellschaft. Bedingungen wissenschaftlicher Publikation. Wissenschaftliche Verlagsgesellschaft, Stuttgart 1977, ISBN 3-8047-0554-5, S. 175–187. Die überregionale…"} {"text": "[DE Wikipedia] Anneliese Bretschneider\n\nAnneliese Bretschneider (* 24. August 1898 in Glauchau; † 20. November 1984 in Potsdam) war eine Sprachwissenschaftlerin, die sich besonders mit der Dialektologie des Märkischen beschäftigt hat. Sie war die Begründerin des Brandenburg-Berlinischen Wörterbuchs. Leben und Wirken Anneliese Bretschneider wirkte v. a. in Marburg, Berlin und Potsdam. Sie wurde am 24. August 1898 in eine Großhändlerfamilie im sächsischen Glauchau geboren. Sie besuchte die Schule in Werdau und machte 1917 in Zwickau ihr Abitur. 1918 nahm sie ein Studium der Germanistik, Indogermanistik und Geschichte an der Universität Jena auf und setzte es ab 1919 an der Universität Marburg fort, wo sie auch Volkskunde, Dialektologie und allgemeine Sprachwissenschaft sowie Sanskrit und Romanistik studierte. Als Studentin von Ferdinand Wrede wurde sie 1923 mit der Arbeit „Die Sprache des Heliand und ihre dialektgeographische Entwicklung“ in Marburg promoviert. Zusätzlich legte sie an der Universität 1928 das Staatsexamen als Lehrerin an höheren Schulen ab. Von 1924 bis 1930 war sie in Marburg als wissenschaftliche Assistentin am Deutschen Sprachatlas und am Hessen-Nassauischen Volkswörterbuch tätig. Vermittelt durch Theodor Frings wechselte sie 1931 als Assistentin zum Atlas der deutschen Volkskunde in Berlin, wo sie bis 1932 arbeitete. Bereits seit 1927 führte sie mehrere von der Notgemeinschaft der deutschen Wissenschaft finanzierte dialektologische Forschungsprojekte durch, u. a. gemeinsam mit Ferdinand Wrede und John Meier. Mehrere dieser Forschungen können als Vorarbeiten zum Projekt des Brandenburg-Berlinischen Wörterbuchs angesehen werden, das sie 1939 als letztes der großlandschaftlichen Wörterbücher der deutschen Dialekte begründete und das ihr Lebenswerk werden sollte. Bereits 1929 trat Bretschneider dem Kampfbund für deutsche Kultur und zum 1. August 1932 der NSDAP bei (Mitgliedsnummer 1.277.168). Vermittelt durch den Erlanger Germanisten Walter Stang wurde sie Mitarbeiterin des Kulturpolitischen Archivs im Amt Rosenberg, dem 1934 gegründeten nationalsozialistischen „Überwachungsamt“, wo sie als Leiterin der Auskunftsstelle die „völkische weltanschauliche Verlässlichkeit“ von Wissenschaftlern und anderen Personen feststellte und Akten mit Informationen über Personen und Ereignisse in der deutschen Kultur anlegte. Zugleich diente sie dem Auswärtigen Amt mit ihren sprach- und volkskundlichen Kenntnissen zur wissenschaftlichen Fundierung von Besitzansprüchen an Polen. Und spätestens seit 1935 arbeitete sie dem Sicherheitsdienst des Reichsführers SS zu, seit 1940 war sie dort als Stipendiatin unter Leitung des Germanisten Wilhelm Spengler tätig. Aus Überzeugung betrieb Bretschneider die völkische Indienstnahme ihrer Forschung. Nach dem Krieg konnte Bretschneider in der DDR…"} {"instruction": "Utilize a regular expression to match all words that begin with 'b' in a given text.", "input": "text = \"The quick brown fox jumps over the lazy dog.\"", "output": "import re text = \"The quick brown fox jumps over the lazy dog.\" word_list = re.findall(r\"\\b[bB]\\w+\", text) print(word_list) # output: ['brown', 'fox', 'b jumps', 'b lazy']"} {"instruction": "Using Java, create a program to find the maximum sum of a sub-array within a given array.", "input": "", "output": "// Java Code public class MaximumSubArraySum { public static int maxSubArraySum(int[] nums) { int maxSum = Integer.MIN_VALUE; int currentSum = 0; for (int num : nums) { currentSum += num; if (currentSum > maxSum) maxSum = currentSum; if (currentSum < 0) currentSum = 0; } return maxSum; } public static void main(String[] args) { int[] nums = {-2, 1, -3, 4, -1, 2, 1, -5, 4}; int maxSum = maxSubArraySum(nums); System.out.println(\"Maximum Sub Array Sum: \" + maxSum); } }"} {"text": "[CS Wikipedia] Vůz WRm812, 813 ČD\n\n{{DISPLAYTITLE:Vůz WRm812, 813 ČD}} Vozy WRm812 a WRm813, obě řady shodně číslovány v intervalu 51 54 88-81, byly jídelní vozy provozované Českými drahami. Byly vyrobeny v roce 1978 ve vagónce VEB Waggonbau Bautzen. Technický popis Byly to první vozy typu UIC-Z délky 26 400 mm u tehdejších Československých státních drah. Měly podvozky Görlitz V upravené pro rychlost až 160 km/h. Od roku 2010 byla maximální rychlost těchto vozů snížena na 140 km/h z důvodu přehřívání špalíkových brzd. Vůz byl rozdělen na jídelní a kuchyňskou část. V jídelní části se nacházelo 40 míst k sezení. Vozy měly bílý nátěr s červeným pruhem přes okna. Pruh byl přerušen asi ve 3/4 délky vozů sešikmením směrem dolu. Některé vozy dostaly i nový modro-bílý korporátní lak od studia Najbrt. Modernizace a budoucnost První modernizace proběhla v letech 1991–1992, jejím cílem byla modernizace interiéru. Došlo k snížení počtu míst v jídelní části na 30. Dalších 8 míst se nachází v nově vytvořeném klubovém oddíle. Celkem bylo zrekonstruováno 15 vozů. V roce 1994 proběhla modernizace třech vozů na řadu WRmee814. Předmětem modernizace byla úprava interiéru, výměna oken, dosazení klimatizace a výměna kuchyňského vybavení. Cílem bylo získat jídelní vozy vhodné na vlaky kategorie EuroCity. V letech 2012–2013 proběhla rekonstrukce na řadu WRmee816, která kromě rekonstrukce interiéru a výměny výbavy kuchyně přinesla předsuvné dveře ovládané tlačítky a dosazení kotoučových brzd, díky čemu mohla být maximální rychlost těchto vozů opět zvýšena na 160 km/h. Provoz Vozy od jízdního řádu 2012/2013 již nejsou nasazovány. Vůz WRm813 č. 001 byl 10. prosince 1993 poškozen při požáru v Maďarsku a následně byl zrušen. Reference Externí odkazy Fotogalerie vozů WRm812 Fotogalerie vozů WRm813 WRm812, 813 Kolejová vozidla vyráběná od roku 1978 Kolejová vozidla vyráběná do roku 1978"} {"instruction": "Use the Twitter API to develop a sentiment analysis program in Python.", "input": "Not applicable", "output": "import tweepy\nimport nltk\nfrom nltk.sentiment.vader import SentimentIntensityAnalyzer\n\n#Twitter credentials\nconsumer_key = 'your_key'\nconsumer_secret = 'your_secret'\naccess_token = 'your_token'\naccess_token_secret = 'your_secret'\n\n#Create OAuth authentication\nauth = tweepy.OAuthHandler(consumer_key, consumer_secret)\nauth.set_access_token(access_token, access_token_secret)\n\n#Create API object\napi = tweepy.API(auth)\n\n#initialize sentiment analyzer\nanalyzer = SentimentIntensityAnalyzer()\n\n#Search query\nsearch_query = '#sad'\n\n#Search results\nsearch_results = api.search(search_query)\n\n#Loop through search results\nfor tweet in search_results:\n #Analyze sentiment\n sentiment = analyzer.polarity_scores(tweet.text)\n #Print sentiment\n print(f\"{tweet.text} - {sentiment}\")"} {"instruction": "Write a script in PHP for converting a string to lowercase.", "input": "", "output": ""} {"instruction": "Generate a python program to collect all elements of a given list that are of even length.", "input": "list = [\"a\", \"bb\", \"ccc\", \"dddd\", \"eee\"]", "output": "def even_length_elements(my_list):\n even_length_list = list()\n for elem in my_list:\n if (len(elem) % 2 == 0):\n even_length_list.append(elem)\n return even_length_list"} {"text": "[DE Wikipedia] Eastern (Begriffsklärung)\n\nEastern steht für: Eastern, ein Filmgenre Eastern Air Lines, ehemalige US-amerikanische Fluggesellschaft von 1926 bis 1991 Eastern Air Lines (2011), kurzlebige US-amerikanische Fluggesellschaft Eastern Airways, britische Regionalfluggesellschaft Eastern Standard Time, eine Zeitzone, siehe UTC−5 Eastern Motor Company, ehemaliger US-amerikanischer Automobilhersteller Eastern Autos, ehemaliges irisches Montagewerk für Automobile Geografie: Eastern District (Hongkong), einen Distrikt von Hongkong Eastern (Kenia), eine ehemalige kenianische Provinz Eastern Provinz (Sri Lanka), eine Provinz Sri Lankas Eastern (Sierra Leone), eine Provinz von Sierra Leone im NRHP gelistete Objekte: Eastern Cemetery, in Portland, Maine, ID-Nr. 73000112 Eastern Female High School, in Baltimore, Maryland, ID-Nr. 71001035 Eastern High School, in Baltimore, Maryland, ID-Nr. 00000870 Eastern Idaho District Fair Historic District, in Blackfoot, Idaho, ID-Nr. 01000864 Eastern Kentucky University Historic District, in Richmond, Kentucky, ID-Nr. 84001804 Eastern Lock of the Chesapeake and Delaware Canal, in Delaware City, Delaware, ID-Nr. 75000543 Eastern Market, in Washington, DC, ID-Nr. 71000998 Eastern Market Historic District, in Detroit, Michigan, ID-Nr. 78001518 Eastern Michigan Asylum Historic District, in Pontiac, Michigan, ID-Nr. 81000315 Eastern Michigan University Historic District, in Ypsilanti, Michigan, ID-Nr. 84000017 Eastern Middlesex County Second District Court, in Waltham, Massachusetts, ID-Nr. 89001516 Eastern Parkway, in New York, New York, ID-Nr. 83001689 Eastern Point Historic District, in Groton, Connecticut, ID-Nr. 08000499 Eastern Point Light Station, in Gloucester, Massachusetts, ID-Nr. 87002027 Eastern Promenade, in Portland, Maine, ID-Nr. 89001707 Eastern Sierra Madre Ridge Archeological District, in New Cuyama, Kalifornien, ID-Nr. 78000779 Eastern Slope Inn, in North Conway, New Hampshire, ID-Nr. 82004994 Eastern Star Baptist Church, in Tarboro, North Carolina, ID-Nr. 80002827 Eastern Star Hall, in Sacramento, Kalifornien, ID-Nr. 92001757 Eastern Star Lodge 207 F&AM, in St. Francis, Arkansas, ID-Nr. 02001074 Eastern State Penitentiary, in Philadelphia, Pennsylvania, ID-Nr. 66000680 Eastern University Preparatory School, in Claremore, Oklahoma, ID-Nr. 82003697 Siehe auch: Easter Eastern Township Great Eastern"} {"instruction": "Write a Python code to implement a list containing at least three dictionaries.", "input": "", "output": "list_of_dicts = [ \n {\n \"name\": \"John\",\n \"age\": 32,\n \"country\": \"USA\"\n },\n {\n \"name\": \"Peter\",\n \"age\": 28,\n \"country\": \"Australia\"\n },\n {\n \"name\": \"David\",\n \"age\": 30,\n \"country\": \"Canada\"\n }\n]"} {"text": "[DE Wikipedia] Gmina Grodziec\n\nDie Gmina Grodziec ist eine Landgemeinde im Powiat Koniński der Woiwodschaft Großpolen in Polen mit etwa mit 5100 Einwohnern. Ihr Sitz ist das gleichnamige Dorf mit 1700 Einwohnern. Geographie Die Gemeinde liegt im Osten den Woiwodschaft, zwanzig Kilometer südlich der Kreisstadt Konin und zehn Kilometer nördlich der Stadt Stawiszyn. Posen liegt 80 Kilometer westlich, Łódź etwa 90 Kilometer östlich. Angrenzende Nachbargemeinden sind Rzgów im Norden, Rychwał im Osten, Stawiszyn sowie Blizanów im Süden, Chocz im Südwesten, Gizałki im Westen und Zagórów im Nordwesten. Die Gemeinde hat eine Flächenausdehnung von 117,7 km², 56 Prozent werden landwirtschaft- und 37 Prozent forstwirtschaftlich genutzt. Verwaltungsgeschichte Nach der zweiten Teilung Polens gehörte die Region von 1793 bis 1807 zu Preußen. Von der Provinz Südpreußen kam das Gebiet 1807 zum Herzogtum Warschau und 1815 zum russisch beherrschten Kongresspolen. Im Jahr 1918 wurde Grodziec Teil der Zweiten Polnischen Republik. Mit dem Überfall auf Polen wurde das Gemeindegebiet deutsch besetzt und kam mit dem Landkreis Konin zum Regierungsbezirk Posen im Reichsgau Wartheland. Grodziec erhielt 1939 den Namen Großdorf und wurde 1943 in Grödschütz umbenannt. Die Landgemeinde wurde 1954 in Gromadas aufgeteilt und 1973 wieder gebildet. Der Powiat wurde 1975 aufgelöst und die Gemeinde kam von der Woiwodschaft Posen zur Woiwodschaft Konin. Seit Januar 1999 gehört die Gemeinde zur Woiwodschaft Großpolen und wieder zum Powiat Kaliski. Einwohnerzahlen: 1995: 5287 2000: 5314 2005: 5247 2011: 5288 (Volkszählung) 2015: 5246 2020: 5131 Gliederung Zur Landgemeinde Grodziec gehören folgende 18 Orte mit einem Schulzenamt (sołectwo): Biała Biała Kolonia Biskupice Bystrzyca Czarnybród Grodziec Janów Junno Królików Królików Czwarty Lądek Łagiewniki Nowe Grądy Stary Borowiec Stara Ciświca Stare Grądy Wielołęka Zaguźnica Weitere Ortschaften der Gemeinde sind: Aleksandrówek Biskupice-Kolonia Konary Lipice Mokre Nowa Ciświca Nowa Huta Nowy Borowiec Stara Huta Stary Tartak Tartak Wycinki Denkmalgeschützte Sehenswürdigkeiten und Naturdenkmale Das Schlösschen aus dem 18. Jahrhundert wurde unter der Nummer 23/336 am 22. Januar 1949 in das nationale Denkmalregister der Woiwodschaft aufgenommen, der Park am 16. Dezember 1949 (Nummer A36). Das Gutshaus stammt von 1830 und wurde am 12. September 1969 unter Schutz gestellt (Nummer 732/A). Die neugotische Pfarrkirche vom Ende des 19. Jahrhunderts wurde mit dem Kirchhof und Pfarrhaus aus gleicher Zeit unter dem Eintrag 311/53 vom 14. Mai 1984 geschützt. Im Hauptort der Gemeinde sind eine Gruppe von 29 Hainbuchen und eine Gruppe von neun Eichen als Naturdenkmale ausgewiesen. Verkehr Die Woiwodschaftsstraße DW443 führt von Jarocin (Jarotschin) nach Tuliszków (Tuliszkow). Der nächste…"} {"text": "[CS Wikipedia] Anna Rossinelli\n\nAnna Rossinelli (* 20. dubna 1987 Basilej) je švýcarská zpěvačka a skladatelka. Spolu s Manuelem Meiselem a Georgem Dillierem vystupuje v pop-soulovém triu. To působí pod jejím jménem.Reprezentovala Švýcarsko na Eurovision Song Contest 2011 v Düsseldorfu, kde jako tamější první zástupce od roku 2005 postoupila do finále. Zde obsadila 25. místo. Se svou formací vydala 2 alba, z nichž druhé Marylou obsadilo první místo v žebříčku švýcarské hitparády. Kariéra Počátky Anna se narodila v Basileji. Od útlého věku se věnovala zpěvu a docházela na školu se zvláštním hudebním zaměřením. Později studovala na Basilejské škole jazzu, kde se kromě vokální průpravy a teorie naučila hrát na klavír. Ve třinácti letech poprvé profesionálně vystoupila. O rok později založila a capella formaci a začala vystupovat s pop-rockovou kapelou. Mimo to se živila jako číšnice a modelka V roce 2008 začala spolupracovat s Manuelem Meiselem a Georgem Dillierem, kteří také pocházejí z Basileje. Nejprve vystupovali pod názvem Anneclaire, později začali používat jméno Anna Rossinelli. 2011: Eurovision Song Contest V prosinci 2010 Anna se svojí skupinou zvítězila v národním kole Švýcarska do Eurovize. S baladou \"In Love For A While\" následně 10. května 2011 vystoupili v mezinárodním semifinále v Düsseldorfu, odkud postoupili do finále. Stali se tak vůbec prvním švýcarským zástupcem od účasti kapely Vanilla Ninja (2005), kterému se to podařilo. Ve finále 14. května Anna obsadila poslední 25. místo se ziskem 19 bodů – 10 ze Spojeného království, 5 ze Srbska a 4 ze Slovenska. Po účasti na Eurovizi se Anna vydala na masivní turné na podporu debutového alba Bon Voyage. 14. října byl vydán singl \"Joker\". Samotné album vyšlo 9. prosince 2011. 2012 - V roce 2012 si v Curychu zazpívala s Jamesem Morrisonem. Vystoupila také s Andreasem Vollenweiderem a Adrianem Sternem.6. března byla vydána píseň \"Let It Go\", úvodní singl k druhému albu Marylou. To vyšlo 3. května a debutovalo na prvním místě švýcarské hitparády alb. Osobní život Anna žije s Georgem Dillierem, který v jejím triu hraje na basu. Diskografie Alba Singly Reference Externí odkazy Oficiální web Videoklip \"In Love For A While\" (YouTube) Vystoupení na Eurovizi 2011 (YouTube) Žijící lidé Narození v roce 1987 Švýcarské zpěvačky Účastníci Eurovision Song Contest 2011 Švýcarští účastníci Eurovision Song Contest Ženy Narození 20. dubna Narození v Basileji"} {"instruction": "Given two equations, predict the range of the output variable.", "input": "Equation 1: Y = X + 2 Equation 2: Y = 2X", "output": "The range of the output variable is [-2, ∞)."} {"instruction": "Write a Visual Basic Script to add two numbers", "input": "", "output": "Function add(a As Integer, b As Integer) add = a + b End Function MsgBox(add(5, 2))"} {"instruction": "Write a Python function to sort the given array of dictionaries by key value.", "input": "arr = [{'name': 'Jose', 'age': 32}, {'name': 'Ravi', 'age': 23}, {'name': 'Paul', 'age': 26}]", "output": "def sort_by_key(arr): return sorted(arr, key=lambda i: i['name'])"} {"instruction": "Write a function in Python to convert JSON data into a Python dictionary.", "input": "json_data = '{\"name\":\"John\",\"age\":30,\"city\":\"New York\"}'", "output": "import json def json_to_dict(json_data): return json.loads(json_data) data = json_to_dict(json_data) print(data)"} {"text": "[DE Wikipedia] Glatte\n\nGlatte ist der Familienname folgender Personen: Adolf Glatte (1866–1920), deutscher Landschafts- und Porträtmaler Jessica Glatte (* 1973), deutsche Operettensängerin (Sopran) Reinhard Glatte (* 1938), deutscher Bauingenieur und Hochschullehrer Siehe auch: Klatte Kladde"} {"instruction": "Create a program in Python that removes duplicates from a given array.", "input": "[1,1,2,3,4,5,5,5]", "output": "def remove_duplicates(array):\n new_array = []\n for element in array:\n if element not in new_array:\n new_array.append(element)\n return new_array"} {"instruction": "Given a string and an integer, write a program to compare the string with the integer and return the longer string.", "input": "my_string = \"Hello\" my_int = 1", "output": "def compare_str_int(str, num): if len(str) > num: return str else: return \"{i} is greater than {s}\".format(i=num, s=str) my_string = \"Hello\" my_int = 1 print(compare_str_int(my_string, my_int))"} {"instruction": "Construct a for loop to print the integer from 0 to 50.", "input": "", "output": "for i in range(51): print(i)"} {"instruction": "Compress the following string using a Huffman algorithm.", "input": "\"aaaaaaaaabccddddee\"", "output": "import heapq def huffman_encode(string): freq = {} for c in string: freq[c] = freq.get(c, 0) + 1 heap = [[weight, [char, \"\"]] for char, weight in freq.items()] heapq.heapify(heap) while len(heap) > 1: low = heapq.heappop(heap) high = heapq.heappop(heap) for pair in low[1:]: pair[1] = '0' + pair[1] for pair in high[1:]: pair[1] = '1' + pair[1] heapq.heappush(heap, [low[0] + high[0]] + low[1:] + high[1:]) encoded = \"\" codes = dict() for char, code in heap[0][1:]: codes[char] = code encoded += code return codes, encoded if __name__ == '__main__': string = \"aaaaaaaaabccddddee\" codes, encoded = huffman_encode(string) print(encoded)"} {"text": "[DE Wikipedia] Harzelt\n\nHarzelt ist ein Ortsteil der Gemeinde Gangelt im Kreis Heinsberg in Nordrhein-Westfalen. Geographie Lage Harzelt liegt ca. 4 km nördlich von Gangelt an der Kreisstraße 3. In der Nähe des Ortes befindet sich am Saeffeler Bach das Naturschutzgebiet Höngener- und Saeffeler Bruch. Der Ort Harzelt grenzt direkt an das Dorf Langbroich und liegt an einem Hang. Gewässer Bei Starkregen und bei Schneeschmelze fließt das Oberflächenwasser aus den Bereich Harzelt in den Saeffeler Bach (GEWKZ 2818222) und dann weiter über den Rodebach in die Maas. Der Saeffeler Bach hat eine Länge von 12,747 km bei einem Gesamteinzugsgebiet von 47,479 km². Nachbarorte Siedlungsform Harzelt ist ein mehrzeiliges, beidseitig bebautes Straßendorf am erhöhten Rand des Saeffeler Bachs. Geschichte Ortsname 1277 Artcele 1312 Harttelt 1343 Hertsel 1541 Hartzel 1820 Harzel 1846 Hartzel 1912 Harzelt Ortsgeschichte Im Hochmittelalter gehörte Harzelt zusammen mit 38 Ortschaften sowie 32 Einzelgehöften und Rittersitzen den Herren von Millen und zum Jülicher Amt Millen. Der Ort war 1277 im Havertwald berechtigt. Güter zu Harzelt lagen 1343 im Zinsbezirk Breberen der Herrschaft Heinsberg. Im 16. Jahrhundert besaßen die von Budberg unter Harzelt Land, das wahrscheinlich zum Haus Altenburg in Breberen gehörte. Der Ort ist im Laufe der Zeit mit Langbroich zusammengewachsen. Harzelt hatte 1828 insgesamt 115 Einwohner, 1852 waren es 202 Einwohner. Harzelt bildete mit den Orten Langbroich und Schierwaldenrath die Gemeinde Schierwaldenrath. Mit dem Gesetz zur Neugliederung von Gemeinden des Selfkantkreises Geilenkirchen-Heinsberg vom 24. Juni 1969 wurde die Gemeinde Schierwaldenrath am 1. Juli 1969 in die Gemeinde Gangelt eingegliedert. Kirchengeschichte Die Pfarre St. Mariä Empfängnis setzt sich aus den Orten Langbroich und Harzelt zusammen und ist seit 1855 eigenständig. Die Bevölkerung besteht zum größten Teil aus Katholiken. Im Zentrum von Langbroich befindet sich die 1859 fertiggestellte Kirche St. Mariä Empfängnis, die auch die Hauptsehenswürdigkeit darstellt. Nahe der Kirche befindet sich ein Denkmal, das an die Gefallenen aus dem Zweiten Weltkrieg erinnert. Der Ort Harzelt gehörte ursprünglich zur Pfarre Breberen. Nach 1815 bildete Harzelt einen Schulverband mit dem benachbarten Ort Langbroich, der zur Pfarre Gangelt gehörte. 1852 richteten die Bewohner beider Orte ein Gesuch an den Erzbischof von Köln zur Errichtung einer selbstständigen Pfarrei. Am 8. Dezember 1855 wurde die Pfarre St. Mariä Empfängnis errichtet. Erster Pfarrer war Hubert Schrammen (1855–68). Ab 1925 gehört die Pfarre zum Dekanat Gangelt. Im Zuge der Pfarrgemeindereformen im Bistum Aachen wurde die ehemals eigenständige katholische Pfarrgemeinde St. Mariä Empfängnis Langbroich in die Weggemeinschaft der katholischen…"} {"instruction": "Create a Python script which connects to a MySQL database, runs a query and outputs the results in JSON format.", "input": "Database name: test\nQuery: SELECT * FROM users", "output": "import mysql.connector\nimport json\n\ndb = mysql.connector.connect(\n host=\"localhost\",\n user=\"yourusername\",\n password=\"yourpassword\",\n database=\"test\"\n)\n\ncursor = db.cursor()\n\nsql = \"SELECT * FROM users\"\n\ncursor.execute(sql)\n\nresults = cursor.fetchall()\n\njson_data = []\n\nfor result in results:\n json_data.append(result)\n\nprint(json.dumps(json_data))"} {"instruction": "Generate a python function to convert an array to a dictionary", "input": "['a', 1, 'b', 2, 'c', 3]", "output": "def array_to_dict(lst):\n output = {}\n for i in range(0, len(lst), 2):\n output[lst[i]] = lst[i+1]\n \n return output\n\n# main program\nmy_list = ['a', 1, 'b', 2, 'c', 3]\nresult = array_to_dict(my_list)\nprint(result)"} {"text": "[CS Wikipedia] Gustáv Plavec\n\nGustáv Plavec (4. dubna 1904 – 5. listopadu 1971) byl slovenský evangelický farář, spisovatel a publicista. Byl redaktorem časopisu evangelické mládeže Prameň. Slovenští protestantští duchovní Slovenští spisovatelé Narození v roce 1904 Úmrtí v roce 1971 Muži"} {"instruction": "Create some code that iterates through a list and prints out each element.", "input": "my_list = [1, 4, 6, 8]", "output": "for item in my_list: print(item)"} {"instruction": "Fix the following JavaScript bug.", "input": "function helloWorld() { console.log('Hello' + 'World')", "output": "function helloWorld() { console.log('Hello' + ' ' + 'World')"} {"instruction": "Code a function in Python to generate random numbers within a given range.", "input": "", "output": "import random def random_num_gen(start, end): return random.randint(start, end)"} {"text": "[HI Wikipedia] भीष्म साहनी\n\nरावलपिंडी पाकिस्तान में जन्मे भीष्म साहनी (८ अगस्त १९१५- ११ जुलाई २००३) आधुनिक हिन्दी साहित्य के प्रमुख स्तंभों में से थे। १९३७ में लाहौर गवर्नमेन्ट कॉलेज, लाहौर से अंग्रेजी साहित्य में एम ए करने के बाद साहनी ने १९५८ में पंजाब विश्वविद्यालय से पीएचडी की उपाधि हासिल की। भारत पाकिस्तान विभाजन के पूर्व अवैतनिक शिक्षक होने के साथ-साथ ये व्यापार भी करते थे। विभाजन के बाद उन्होंने भारत आकर समाचारपत्रों में लिखने का काम किया। बाद में भारतीय जन नाट्य संघ (इप्टा) से जा मिले। इसके पश्चात अंबाला और अमृतसर में भी अध्यापक रहने के बाद दिल्ली विश्वविद्यालय के ज़ाकिर हुसैन दिल्ली महाविद्यालय में साहित्य के प्रोफेसर बने। १९५७ से १९६३ तक मास्को में विदेशी भाषा प्रकाशन गृह (फॉरेन लॅग्वेजेस पब्लिकेशन हाउस) में अनुवादक के काम में कार्यरत रहे। यहां उन्होंने करीब दो दर्जन रूसी किताबें जैसे टालस्टॉय आस्ट्रोवस्की इत्यादि लेखकों की किताबों का हिंदी में रूपांतर किया। १९६५ से १९६७ तक दो सालों में उन्होंने नयी कहानियां नामक पात्रिका का सम्पादन किया। वे प्रगतिशील लेखक संघ और अफ्रो-एशियायी लेखक संघ (एफ्रो एशियन राइटर्स असोसिएशन) से भी जुड़े रहे। १९९३ से ९७ तक वे साहित्य अकादमी के कार्यकारी समीति के सदस्य रहे। भीष्म साहनी को हिन्दी साहित्य में प्रेमचंद की परंपरा का अग्रणी लेखक माना जाता है। वे मानवीय मूल्यों के लिए हिमायती रहे और उन्होंने विचारधारा को अपने ऊपर कभी हावी नहीं होने दिया। वामपंथी विचारधारा के साथ जुड़े होने के साथ-साथ वे मानवीय मूल्यों को कभी आंखो से ओझल नहीं करते थे। आपाधापी और उठापटक के युग में भीष्म साहनी का व्यक्तित्व बिल्कुल अलग था। उन्हें उनके लेखन के लिए तो स्मरण किया ही जाएगा लेकिन अपनी सहृदयता के लिए वे चिरस्मरणीय रहेंगे। भीष्म साहनी हिन्दी फ़िल्मों के जाने माने अभिनेता बलराज साहनी के छोटे भाई थे। उन्हें १९७५ में तमस के लिए साहित्य अकादमी पुरस्कार, १९७५ में शिरोमणि लेखक अवार्ड (पंजाब सरकार), १९८० में एफ्रो एशियन राइटर्स असोसिएशन का लोटस अवार्ड, १९८३ में सोवियत लैंड नेहरू अवार्ड तथा १९९८ में भारत सरकार के पद्मभूषण अलंकरण से विभूषित किया गया। उनके उपन्यास तमस पर १९८६ में एक फिल्म का निर्माण भी किया गया था। प्रमुख रचनाएँ उपन्यास - झरोखे, तमस, बसंती, मय्यादास की माडी़, कुन्तो, नीलू निलिमा नीलोफर कहानी संग्रह - मेरी प्रिय कहानियां, भाग्यरेखा, वांगचू, निशाचर नाटक - हानूश (१९७७), माधवी (१९८४), कबिरा खड़ा बजार में (१९८५), मुआवज़े (१९९३) आत्मकथा - बलराज माय ब्रदर बालकथा- गुलेल का खेल संदर्भ बाहरी कड़ियाँ लोग अमन चाहते हैं: भीष्म साहनी की मृत्यु से कुछ ही समय पहले लिये गया बीबीसी साक्षात्कार (आडियो भी उपलब्ध) १९९८ पद्म भूषण भीष्म साहनी हिन्दी कथाकार हिन्दी उपन्यासकार साहित्य अकादमी द्वारा पुरस्कृत हिन्दी भाषा के साहित्यकार शलाका सम्मान हिन्दी विकि डीवीडी परियोजना साहित्य अकादमी फ़ैलोशिप से सम्मानित 1915 में जन्मे लोग २००३ में निधन"} {"text": "[HI Wikipedia] परवेज़ मुशर्रफ़\n\nपरवेज़ मुशर्रफ़ (उर्दू: پرويز مشرف; जन्म अगस्त 11, 1943) पाकिस्तान के राष्ट्रपति और सेना प्रमुख रह चुके हैं। इन्होंने साल 1999 में नवाज़ शरीफ की लोकतान्त्रिक सरकार का तख्ता पलट कर पाकिस्तान की बागडोर संभाली और 20 जून, 2001 से 18 अगस्त 2008 तक पाकिस्तान के राष्ट्रपति रहे। 5 फरवरी 2023 को दुबई में निधन हो गया । प्रारंभिक जीवन मुशर्रफ़ का जन्म दिल्ली शहर में दरियागंज में हुआ था। भारत के विभाजन के बाद उनका परिवार कराची में जाकर बसा। पाकिस्तान के सेनाध्यक्ष अप्रैल से जून 1999 तक भारत और पाकिस्तान के बीच हुए कारगिल युद्ध के दौरान मुशर्रफ़ ही पाकिस्तान के सेना-प्रमुख थे। पाकिस्तान के राष्ट्रपति अक्टूबर 1999 में नवाज़ शरीफ़ ने जब मुशर्रफ़ को उनके पद से हटाने की कोशिश की तो मुशर्रफ़ के प्रति वफ़ादार जनरलों ने शरीफ़ का ही तख्ता पलट करके सरकार पर कब्जा कर लिया। मई 2000 में पाकिस्तान के सर्वोच्च न्यायालय ने आदेश दिया कि पाकिस्तान में चुनाव कराए जाएं। मुशर्रफ़ ने जून 2001 में तत्कालीन राष्ट्रपति रफीक़ तरार को हटा दिया व खुद राष्ट्रपति बन गए। अप्रैल 2002 में उन्होंने राष्ट्रपति बने रहने के लिए जनमत-संग्रह कराया जिसका अधिकतर राजनैतिक दलों ने बहिष्कार किया। अक्टूबर 2002 में पाकिस्तान में चुनाव हुए जिसमें मुशर्रफ़ का समर्थन करने वाली मुत्ताहिदा मजलिस-ए-अमाल पार्टी को बहुमत मिला। इनकी सहायता से मुशर्रफ़ ने पाकिस्तान के संविधान में कई परिवर्तन कराए जिनसे 1999 के तख्ता-पलट और मुशर्रफ़ के अन्य कई आदेशों को वैधानिक सम्मति मिल गई। {{तथ्य} मुशर्रफ़ के शासन के दौरान भारत पर उग्रवादी हमले बढ़े, लेकिन बाद में दोनों देशों के बीच शान्ति की बात-चीत भी आगे बढ़ी। 2005 में परेड पत्रिका ने मुशर्रफ़ को दुनिया के 10 सबसे बुरे तानाशाहों की सूची में शामिल किया। २४ नवम्बर २००७ को उन्होने सेना प्रमुख का पद त्याग दिया तथा असैन्य राष्ट्रपति के रूप में शपथ ली। पाकिस्तान के शासक के रूप में कार्यकाल के दौरान प्रमुख घटनाएं अमेरिका पर आतंकवादी हमला (9/11) 11 सितम्बर 2001 के हमले के बाद जब संयुक्त राज्य अमरीका ने अफ़गानिस्तान और ईराक पर युद्ध शुरु किया तो मुशर्रफ़ ने अमेरिका का पूरा समर्थन किया। नवाब बुग्ती हत्याकांड नवाब अकबर खान बुगती पाकिस्तान के बलूचिस्तान प्रांत के एक राष्ट्रवादी नेता थे जो बलूचिस्तान को पाकिस्तान से अलग एक देश बनाने के लिए संघर्ष कर रहे थे। 2006 में बलूचिस्तान के कोहलू जिले में एक सैन्य कार्रवाई में अकबर बुगती और उनके कई सहयोगियों की हत्या कर दी गई थी। इस अभियान का आदेश जनरल परवेज़ मुशर्रफ ने दिया था जो तब देश के सैन्य प्रमुख और राष्ट्रपति दोनों थे। आपातकाल मुशर्रफ ने पाकिस्तान में 2007 में आपातकाल लागू कर दिया। बेनजीर भुट्टो की हत्या बेनजीर भुट्टो दिसम्बर 2007 में रावलपिंडी में एक चुनावी रैली के बाद एक आत्मघाती हमले में मारी गई। मुशर्रफ पर उन्हें जरूरी सुरक्षा मुहैया नहीं कराने के आरोप लगे। लाल मस्जिद पर हमला मुशर्रफ के आदेश पर 2007 में लाल मस्जिद पर सैन्य कार्रवाई की गई जिसमें लगभग 90 धार्मिक विद्यार्थियों की मृत्यु हो गई थी। आगरा शिखर वार्ता भारत के तत्कालीन प्रधानमंत्री श्री अटल बिहारी वाजपेयी के साथ आगरा में पाकिस्तान के राष्ट्राध्यक्ष के रूप में मुलाकात की। इस मुलाकात…"} {"instruction": "Improve the following code in order to create a balanced binary search tree.", "input": "Node insert(int x, Node root) { if (root == NULL) { root = new Node; root->key = x; root->left = root->right = NULL; } else if (x < root->key) root->left = insert(x, root->left); else root->right = insert(x, root->right); return root; }", "output": "Node insert(int x, Node root) { if (root == NULL) { root = new Node; root->key = x; root->left = root->right = NULL; } else if (x < root->key) root->left = insert(x, root->left); else root->right = insert(x, root->right); root = balance(root); return root; } Node balance(Node root) { int left_height = height(root->left); int right_height = height(root->right); if (abs(left_height - right_height) > 1) { if (right_height > left_height) root = leftRotate(root); else root = rightRotate(root); } return root; }"} {"instruction": "Create an AI chatbot in Python to answer simple user questions about a specific topic.", "input": "", "output": "# import libraries\nimport random\nimport nltk\nfrom nltk.corpus import wordnet \n\n# define a function to find the synonym of a given word\ndef get_synonym(word):\n synonyms = set()\n for syn in wordnet.synsets(word):\n for l in syn.lemmas():\n synonyms.add(l.name())\n if word in synonyms:\n synonyms.remove(word)\n return list(synonyms)\n\n# define a function to generate a response\ndef bot_response(question):\n responses = [\"I'm not sure I understand, could you rephrase the question?\", \n \"I don't have enough information to answer that question, can you give me more data?\", \n \"I'm not sure I can help you with that.\", \n \"Can you rephrase the question?\", \n \"What would you like to know?\"]\n \n # tokenize the sentence\n tokens = nltk.word_tokenize(question)\n \n # look for a synonym of each word\n synonyms_list = []\n for word in tokens:\n synonyms_list.append(get_synonym(word))\n\n # generate a response with synonyms of each word\n response_tokens = []\n for synonyms in synonyms_list:\n if len(synonyms) > 0:\n response_tokens.append(random.choice(synonyms))\n else:\n response_tokens.append(word)\n response = ' '.join(response_tokens)\n\n # if not, randomly select one of the predefined responses\n if not response:\n response = random.choice(responses)\n \n return response"} {"instruction": "Write a function to convert the given list of integers into a dictionary of lists.", "input": "my_list = [1, 2, 3, 4]", "output": "def list_to_dict(lst): my_dict = {} for i in lst: my_dict[str(i)] = [i] return my_dict if __name__ == '__main__': my_list = [1, 2, 3, 4] print(list_to_dict(my_list))"} {"instruction": "Create a function in Python that takes an array of integers as input, checks if the array is sorted, and, if not, sorts it.", "input": "[3, 1, 4, 2, 5]", "output": "def is_sorted(arr):\n sorted_arr = sorted(arr)\n if arr == sorted_arr:\n return True\n else:\n arr.sort()\n return arr"} {"instruction": "Generate an algorithm in Python that can take in a list of integers and sort them in ascending order.", "input": "Example list: [4, 9, 1, 6, 5]", "output": "def sort_ascending(nums):\n n = len(nums)\n for i in range(n):\n for j in range(0, n-i-1):\n if nums[j] > nums[j+1] :\n nums[j], nums[j+1] = nums[j+1], nums[j] \n return nums"} {"text": "[HI Wikipedia] एल्यूमीनियम पिघलने भट्ठी\n\nएल्यूमिनियम पिघलने फर्नेस एल्यूमीनियम भट्ठी के लिए विभिन्न औद्योगिक उद्देश्यों की सेवा करने के लिए बनाया गया है। यह अल जो कई अन्य उपकरणों से बेहतर गर्मी की गर्मी तत्व का वितरण और अब जीवन के लिए समर्थन कर रहे हैं जैसे विभिन्न तत्वों के होते हैं। इन एल्यूमिनियम पिघलने भट्ठी मिश्र धातुओं के किसी भी प्रकार की सक्षम हैं। इन भट्टियों को अच्छी तरह से पृथक कर रहे हैं कि एक बेहतर गर्मी और ऊर्जा वितरण की अनुमति देता है जो क्रूसिबल जीवन प्रत्याशा में सुधार. एल्यूमीनियम भट्टियां विभिन्न आकार में उपलब्ध हैं और क्षमता. 300 ALMHF CJN क्षमता 300 किग्रा (AL) हॉट जोन साइज: 815 आईडी एक्स 900 Ht निर्माण:. एम.एस. स्ट्रक्चरल स्टील और शीट्स 3 और 6 मिमी आधार खड़े लंबाई: 300 मिमी अधिकतम अस्थायी 900 डिग्री: पावर: 58 किलोवाट आपूर्ति: 415 वी स्टार कनेक्शन ताप तत्वों: KANTHAL A1, पट्टी टाइप इन्सुलेशन: गर्म चेहरे, शीत चेहरा, आधार है - 8, 7, Castable, शीर्ष पर सिरेमिक ऊन. नियंत्रण प्रणाली: पीआईडी ​​नियंत्रक, बिजली की बचत के लिए Thyristor ड्राइव, MCCB MCB और सुरक्षा के लिए अन्य सभी ब्रांडेड सामान. आवेदन: धातु कास्टिंग / / मिश्र / पिघलने विभिन्न सामग्रियों की रिफाइनिंग ढलाई. धातुकर्म"} {"instruction": "Construct a Python code that accepts a string as an input and returns the total number of vowels in the string", "input": "", "output": "def count_vowels(string): \n vowels = \"aeiou\"\n count = 0\n for s in string:\n if s.lower() in vowels:\n count += 1\n return count"} {"instruction": "Print the character at the specified index in a given string.", "input": "s = \"Hello World!\" index = 5", "output": "s = \"Hello World!\" index = 5 print(\"Character at index\", index, \"is:\", s[index]) Output: Character at index 5 is: W"} {"instruction": "Formulate a statement using Python that will return the value 'True' when the user's age is equal to 21.", "input": "userage = 21", "output": "if userage == 21: print(True)"} {"instruction": "Write a Python code that generates an array of 20 random integers between 1 and 10.", "input": "", "output": "import random\n\nrandom_numbers = [random.randint(1, 10) for i in range(20)]"} {"instruction": "Write a python code to perform the task of bubble sorting in a list.", "input": "arr = [1, 10, 5, 4, 8]", "output": "def bubble_sort(arr): \n n = len(arr) \n for i in range(n): \n for j in range(0, n-i-1): \n if arr[j] > arr[j+1] : \n arr[j], arr[j+1] = arr[j+1], arr[j]\n \nbubble_sort(arr)"} {"text": "[EN Wikipedia] 1837 in Denmark\n\nEvents from the year 1837 in Denmark. Incumbents Monarch – Frederick VI Prime minister – Otto Joachim Events 7 April - C.A. Reitzel publishes Hans Christian Andersen's Fairy Tales Told for Children. First Collection. Third Booklet (Eventyr, fortalte for Børn. Første Samling. Tredie Hefte. 1837) containing fairytales such as The Little Mermaid and The Emperor's New Clothes. Undated The artist Emil Bærentzen founds his own printing business as Em. Bærentzen & Co.'s Lithografiske Institut. Culture Music B. S. Ingemann publishes Morgensange for Børn with seven morning songs for children as well as Foraarssang (\"Storken sidder paa Bondens Tag;\"), Births 18 March — Marie Christine Björn, ballet dancer (born 1763) 21 April – Fredrik Bajer, writer (died 1922) 4 July Sophus Mads Jørgensen, chemist (died 1914) 5 September – Janus la Cour, painter (died 1909) 5 November Philip Heyman, businessman (died 1893) Deaths 7 January – Erich Erichsen, merchant and ship-owner (born (1752) 27 November – Salomon Soldin, publisher and writer (born 1774) References 1830s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Design a webpage with a given template.", "input": "Template: Pink and Purple with three-column layout", "output": " Pink and Purple Layout
    "} {"instruction": "Generate a Python code to create a class which creates an empty dictionary with the given keys.", "input": "\"name, age\"", "output": "class EmptyDictionary:\n def __init__(self, keys):\n self.keys = [k.strip() for k in keys.split(\",\")]\n self.dictionary = {k: None for k in self.keys}\n \n def get_dictionary(self):\n return self.dictionary"} {"instruction": "Write a JavaScript function that takes two numbers and a mathematical operator as parameters and returns the result of the specified operation.", "input": "x = 6, y = 3, operator = '*'", "output": "function calculate(x, operator, y) { switch (operator) { case '+': return x + y; case '-': return x - y; case '*': return x * y; case '/': return x / y; case '%': return x % y; default: return NaN; } } let result = calculate(6, '*', 3); console.log(result); // 18"} {"instruction": "Create a class called \"Person\" using Python, with attributes \"name\", \"age\" and \"country\".", "input": "", "output": "class Person:\n def __init__(self, name, age, country):\n self.name = name\n self.age = age\n self.country = country\n def get_name(self):\n return self.name\n def get_age(self):\n return self.age\n def get_country(self):\n return self.country"} {"instruction": "Transform this code fragment to use the appropriate data structure.", "input": "word = \"apple\" for i in range(len(word)): print(word[i])", "output": "word = \"apple\" for letter in word: print(letter)"} {"instruction": "Write a code snippet in Python to print Pascal’s triangle for a given value of n.", "input": "4", "output": "def printPascalTriangle(n) : \n for line in range(1, n + 1) : \n C = 1 \n for i in range(1, line + 1) : \n print(C, end = \"\") \n C = int(C * (line - i) / i); \n print(\"\") \n\nn = 4\nprintPascalTriangle(n)"} {"instruction": "Express the following SQL query in a pythonic way.", "input": "SELECT id,name FROM users WHERE gender = 'M' AND age >= 20", "output": "def select_users_male_age_above_20(users):\n output = []\n for user in users:\n if user['gender'] == 'M' and user['age'] >= 20:\n output.append({'id':user['id'], 'name':user['name']})\n return output"} {"instruction": "Create a Python program to interpret a user command from a given set of instructions and execute it.", "input": "Taking a break", "output": "command = input(\"Please enter your command: \")\n \nif command == \"Taking a break\":\n print(\"Taking a five minute break\")\n # code to execute the taking a break command\nelse:\n print(\"Invalid command\")"} {"instruction": "Create a Migration Script in Node.js for creating a table for customers.", "input": "customer_id, first_name, last_name, email", "output": "const { Client } = require('pg'); const client = new Client({ connectionString: process.env.DATABASE_URL }); async function createCustomerTable() { await client.connect(); const query = ` CREATE TABLE customers ( customer_id SERIAL PRIMARY KEY, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL ) ` await client.query(query); await client.end(); } createCustomerTable();"} {"text": "[DE Wikipedia] Karakurt (Ukraine)\n\nKarakurt (, , oder auch Karakurti, ) ist ein im Budschak gelegenes Dorf im Südwesten der ukrainischen Oblast Odessa mit etwa 2700 Einwohnern (2001). Geschichte Karakurt wurde 1811 als erste Siedlung von Albanern aus der bulgarischen Dobrudscha im Gouvernement Bessarabien des Russischen Kaiserreiches gegründet. Nach dem für Russland verlorenen Krimkrieg ging das Gebiet um Cahul, Bolgrad und Ismail, in dem auch Karakurt liegt, 1856 an das Fürstentum Moldau, um nach dem nächsten Russisch-Osmanischen Krieg 1878 wieder, bis 1917, an Russland zu fallen. In den Wirren der Oktoberrevolution verlor Russland Bessarabien, das sich zur 1917 Demokratischen Moldauischen Republik erklärte und im gleichen Jahr freiwillig an das Königreich Rumänien anschloss. Nach der Besetzung Bessarabiens 1940 durch die Sowjetunion lag Karakurt im Rajon Bolhrad der Oblast Akkerman (ab dem 7. August 1940 Oblast Ismajil) in der Ukrainischen SSR. Zu Beginn des Deutsch-Sowjetischen Krieges kam das Dorf 1941 erneut an Rumänien. Nachdem die Rote Armee Bessarabien 1944 zurückerobert hatte, lag die Ortschaft, nun seit dem 14. November 1945 .in Schowtnewe () umbenannt, wieder in der ukrainischen Oblast Ismajil, die 1954 in der Oblast Odessa aufging. 1991 wurde die Ortschaft Teil der unabhängigen Ukraine. Am 12. Mai 2016 erhielt das Dorf aufgrund der Dekommunisierung in der Ukraine seinen ursprünglichen Namen zurück. Auch heute noch ist Albanisch die bevorzugt gesprochene Sprache in Karakurt. Die Bewohner des Dorfes setzten sich 2013 etwa zu 60 % aus Albanern, 25 % Bulgaren, 10 % Gagausen und 5 % Vertreter anderer Ethnien zusammen. Geografie Die Ortschaft liegt am Ufer des Karassulak (), einem 21 km langen Zufluss des Jalpuhsees, 9 km südöstlich vom Rajonzentrum Bolhrad und etwa 220 km südwestlich vom Oblastzentrum Odessa. Durch das Dorf verläuft die Territorialstraße T–16–06. Verwaltungsgliederung Am 12. Juni 2020 wurde das Dorf ein Teil der Landgemeinde Wassyliwka; bis dahin bildete es zusammen mit dem Dorf Nowyj Karakurt () die Landratsgemeinde Karakurt (Каракуртська сільська рада/Karakurtska silska rada) im Süden des Rajons Bolhrad. Weblinks Artikel zum Dorf und dessen Geschichte auf timbes5 (ukrainisch) Einzelnachweise Ort in der Oblast Odessa Rajon Bolhrad Gegründet 1811 Albanische Diaspora"} {"instruction": "Create a database table in SQL.", "input": "Table Name: User Columns: user_id, username, password", "output": "CREATE TABLE User ( user_id INT NOT NULL, username VARCHAR(50) NOT NULL, password VARCHAR (50) NOT NULL, PRIMARY KEY(user_id) );"} {"instruction": "Generate a Python program to generate a list comprehension of a given set or range.", "input": "words = [\"tea\", \"eat\", \"apple\"]", "output": "result = [i[::-1] for i in words]"} {"instruction": "Create a python package to analyze log data from a web server. The package should parse log entries and identify the top 10 most visited URLs on a daily basis.", "input": "sample.log \n\n[2020-06-03 00:12:30] 192.168.0.1 GET /images/index.jpg 200 \n\n[2020-06-03 00:15:20] 192.168.0.2 GET /css/style.css 200\n\n[2020-06-03 00:20:17] 192.168.0.2 GET /js/app.js 200\n\n[2020-06-04 00:14:40] 192.168.0.1 GET /images/index.jpg 200\n\n[2020-06-04 00:17:30] 192.168.0.2 GET /css/style.css 200\n\n[2020-06-04 00:22:17] 192.168.0.2 GET /js/app.js 200", "output": "import re\nfrom collections import Counter\n\ndef read_logs(log_file):\n log_entries = []\n with open(log_file) as f:\n lines = f.readlines()\n for line in lines:\n log_entry = line.strip().split(' ')\n log_entries.append(log_entry)\n return log_entries\n\ndef find_top_urls(log_file, day):\n log_entries = read_logs(log_file)\n urls = [log[2] for log in log_entries if log[0].startswith(day)]\n counter_urls = Counter(urls)\n return counter_urls.most_common(10)\n\nif __name__ == \"__main__\":\n top_urls = find_top_urls('sample.log', '2020-06-04')\n print(top_urls)"} {"instruction": "Edit a Python program to take input from a user.", "input": "def hello():\n print('Hello')", "output": "def hello():\n name = input('What is your name? ')\n print(f'Hello {name}')"} {"text": "[HI Wikipedia] भारतीय अमरीकी\n\nअमरीका में बसे 38,52,293 भारतीय अमेरिकी भारत और अमेरिका के मध्य मजबूत कड़ी हैं। सैन फ़्रांसिस्को-लॉस एंजेलिस, न्यूयॉर्क-न्यू जर्सी, शिकागो, डैट्रायट, ह्यूस्टन, एटलांटा, मायामी-आरलैण्डो-टैम्पा और वाशिंगटन डी. सी. के बड़े क्षेत्र में उनकी उल्लेखनीय उपस्थिति है। 1960 और 1970 के दशकों में अमेरिका आए पहले भारतीयों में डॉक्टर, वैज्ञानिक और इंजीनियर (अभियान्त्रक) जैसे पेशों के लोग थे पर हाल ही में बहुत से अन्य पेशों के लोग भी आने लगे हैं। भारतीय-अमेरिकियों ने बहुत सी संस्थाएँ और संगठन बनाये हुए हैं जो मुख्य रूप से भाषा के आधार पर और कुछ एक व्यवसाय के आधार पर बनाये गये हैं। सम्पन्नता बढ़ने से, खासकर सूचना तकनीक और बायोटेक्नोलॉजी क्षेत्रों में, यह समुदाय राजनीति के क्षेत्र में भी लगातार सक्रीय भूमिका निभा रहे हैं। भारतीय-अमेरिकी समुदाय की बढ़ती हुई राजनीतिक चेतना और प्रभाव का एक महत्वपूर्ण परिणाम कांग्रेशनल कॉकस ऑन इंडिया एंड इंडियन अमेरिकन्स के रूप में सामने आया है। निचले सदन में इस कॉकस के सदस्यों की संख्या 130 है और सदन में यह किसी एक देश से सम्बन्धित सबसे बड़ा गुट है। इस गुट और भारतीय-अमेरिकी समुदाय दोनों की भूमिका महत्वपूर्ण है और उनकी कोशिश है कि दुनिया के दो सबसे बड़े लोकतान्त्रिक देश अतीत को भुला दें और अपनी नीतियों और हितों में मजबूत तालमेल बनायें। न्यूयॉर्क महानगर में भारतीय-अमेरिकियों की सबसे बड़ी आबादी निवास करती है। भारतीय अमेरिकी"} {"instruction": "Develop a function in Python which reverses any given string.", "input": "", "output": "def reverseString(str):\n return str[::-1]"} {"instruction": "In JavaScript, create a function that returns the length of a string.", "input": "", "output": "function stringLength(str){ return str.length; }"} {"text": "[EN Wikipedia] Algibacter\n\nAlgibacter is a genus in the phylum Bacteroidota (Bacteria). Etymology The name Algibacter derives from:Latin feminine gender noun alga, seaweed; Neo-Latin masculine gender noun, a rodbacter, nominally meaning \"a rod\", but in effect meaning a bacterium, rod; Neo-Latin masculine gender noun Algibacter, rod isolated from seaweed. Species The genus contains 15 species (including basonyms and synonyms), namely A. aestuarii A. agarilyticus A. agarivorans A. alginicilyticus A. amylolyticus A. aquimarinus A. lectus (Nedashkovskaya et al. 2004, (Type species of the genus).; Latin masculine gender adjective lectus, chosen, selected, referring to a bacterium that forms select, beautiful colonies.) A. marinivivus A. mikhailovii (Nedashkovskaya et al. 2007, ; Neo-Latin masculine gender genitive case noun mikhailovii, of Mikhailov, in honour of Valery V. Mikhailov, a Russian microbiologist, for his contributions to the development of marine microbiology.) A. miyuki A. onchidii A. pacificus A. pectinivorans A. psychrophilus A. undariae See also Bacterial taxonomy Microbiology References Flavobacteria Bacteria genera"} {"instruction": "explain the concept of static variables in a programming language", "input": "", "output": "Static variables are variables which retain their value over multiple function calls. They are declared with the \"static\" keyword and can be accessed within the same scope in which they were declared. Static variables can be declared at the class level or at the function level and are typically used to maintain some state information across multiple calls to the same function or data between multiple instances of the same class. Static variables are commonly used to maintain a count of the number of times a function has been called, to store configuration information for the entire program, or to maintain a cumulative data value that is modified within a loop."} {"instruction": "Write a Python program to find the nearest 3 squares to a given number.", "input": "30", "output": "def findNearestSquares(n):\n nearestSquareList = []\n i = 1\n # Find all the nearest squares\n while i * i <= n:\n nearestSquareList.append(i * i)\n i += 1\n \n # Find the nearest 3 squares\n nearest3Squares = nearestSquareList[-3:]\n \n return nearest3Squares\n\nnearest3Squares = findNearestSquares(30)\nprint(nearest3Squares)\n\n# Output:\n# [25, 28, 29]"} {"instruction": "Rewrite the following code segment in C#. for (i = 0; i < n; i++) { j = j + i; }", "input": "", "output": "int j = 0; for (int i = 0; i < n; i++) { j += i; }"} {"text": "[DE Wikipedia] Centre for the Resolution of the Emergency Situation\n\nCentre for the Resolution of the Emergency Situation (kurz CRES; Thai: , RTGS: Sun Amnuai Kan Kae Khai Sathannakan Chuk Choen, kurz , deutsch: Zentrum für die Lösung der Notsituation) war eine thailändische Regierungsorganisation. Die Regierung Abhisit Vejjajiva gründete das CRES am 7. April 2010 mit dem Mandat, die Ordnung in Bangkok und verschiedenen Provinzen im Zuge der Unruhen in Bangkok wiederherzustellen. Die Aktivisten der (kurz UDD, deutsch etwa: Vereinigte nationale Front für Demokratie gegen Diktatur; im Volksmund „Rothemden“) protestierten schon seit dem 12. März in der Stadt und besetzten seit dem 3. April die im Zentrum Bangkoks gelegene Ratchaprasong-Kreuzung. Sie wollten den Rücktritt der Regierung und anschließende Neuwahlen erzwingen. Aktivitäten Die Gründung bezog sich rechtlich auf die öffentliche Notfallverordnung vom 16. Juli 2005 und war eine direkte Reaktion auf die Erstürmung des Repräsentantenhauses. Der sofort ausgerufene Ausnahmezustand ermächtigte das CRES Verdächtige bis zu 30 Tage an inoffiziellen Orten festzuhalten und zu befragen. Die Mitarbeiter des CRES waren bei diesen Handlungen größtenteils immun gegen Strafverfolgung. Die Anzahl der so festgehaltenen Personen wurde nicht bekannt gegeben. Außerdem schloss das CRES in der Zeit der Unruhen etwa 1.000 Webseiten, eine Fernsehstation, mehrere Onlinefernsehsender und mehr als 40 Radiostationen die sie mit der UDD in Verbindung gebracht hatte. Am 10. April zog das CRES mehrere tausend Militär- und Polizeieinheiten in dem besetzten Gebiet zusammen. Sie stürmten das besetzte Hauptgeschäftsviertel, stießen dabei aber auf massiven Widerstand. Die Soldaten zogen sich in Panik zurück und setzten scharfe Munition ein. Am Abend des 16. April gab Premierminister Abhisit Vejjajiva die Neustrukturierung des CRES bekannt. Dabei übergab er die Leitung der Organisation von Suthep Thaugsuban an Anupong Paochinda. Außerdem sollte das Zentrum besser auf terroristische Elemente, die die Demonstration infiltriert hätten, reagieren können. Abhisit erwähnte überdies den am gleichen Tag fehlgeschlagenen Versuch der Polizei, vier Anführer der Rothemden, unter ihnen Nattawut Saikua und Arisman Pongruangrong, festzunehmen. Die Menge anwesenden Demonstranten hielt die Polizei davon ab, das Gebäude zu stürmen, wodurch die Gesuchten durch die Fenster und über die Fassade entkommen konnten. Dabei nahmen die Rothemden, eigenen Angaben zufolge als Schutzmaßnahme, vier Angehörige der operierenden Polizeispezialeinheit als Geiseln. Am 13. Mai veränderte das CRES die Einsatzregeln der eingesetzten Truppen. Die neuen Richtlinien erlaubten den Einsatz von scharfer Munition für Warnschüsse, zur Selbstverteidigung und zur Tötung nicht näher definierter Terroristen. Nach Ansicht von Human Rights Watch schuf…"} {"text": "[CS Wikipedia] Vteřina\n\nVteřina, plným názvem úhlová vteřina (dříve také oblouková vteřina), je jednou z jednotek úhlu (1/60 úhlové minuty). Pro úhlovou vteřinu se používá značka ″ (před kterou se nepíše mezera) či zkratka as. Stejná značka se používá i pro palec, což ale také není jednotka SI. Odlišení od jednotky času V běžném, neodborném jazyce se jednotka času označuje sekunda i vteřina, obě verze jsou považovány za možné. Naopak v odborných textech je sekunda (zaveden přijetím systému jednotek SI roku 1974) od roku 1980 jediný správný a legální název pro jednotku času. Etymologie Název sekunda, což je latinská řadová číslovka s významem druhá, je odvozen od toho, že se jedná po minutách o druhé dělení hodiny – latinsky pars minuta secunda. (Minuta tak byla pars minuta prima – „první zmenšená část“; používala se ještě další dělení např. pars minuta tertia, dnes se však zpravidla sekunda už dále dělí desetinně; v některých jazycích se však slovo pro šedesátinu sekundy zachovalo, ačkoliv se neužívá, např. v polštině či v arabštině , tálita.) Výraz vteřina poprvé použil (ve smyslu úhlu) tepelský premonstrát, český buditel a vlastenec Josef Vojtěch Sedláček v roce 1822 v díle Základové měřictví, čili Geometrie (pro minutu má pojem menšina a tercii třetina). Jde o jeho neologismus (rusismus), nápodobu slova sekunda utvořenou z řadové číslovky vterý (viz též heslo úterý). Má se za to, že Sedláček (který vytvářel terminologii matematiky a fyziky) znal slovo wterý (ve smyslu „druhý”) z Rukopisu královédvorského, „nalezeného” v roce 1817 (a po jistý čas ještě nepovažovaného za padělek), a že jeho pravděpodobný autor, rusofil Václav Hanka, toto slovo nejspíše vytvořil podle ruského slova второй/vtoroj téhož významu. V ostatních slovanských jazycích se používá výhradně označení odvozené z latinského secundus. Odkazy Poznámky Reference Externí odkazy Jednotky rovinného úhlu"} {"instruction": "Create a HTTP GET request using Python.", "input": "", "output": "import requests url = 'https://www.example.com' response = requests.get(url) print(response.text)"} {"instruction": "Write a Python code to update the values in a table.", "input": "Table name: orders\nTable Schema:\n\norder_id INT\ncustomer_name VARCHAR\nprice INT\n\nInput Data:\norder_id = 2345\ncustomer_name = ‘John Smith'\nprice = 59.99", "output": "cur.execute(\"UPDATE orders SET customer_name = %s, price = %s WHERE order_id = %s\", (customer_name, price, order_id))\nconn.commit()"} {"instruction": "Optimize a Python program to print the sum of the 10 smallest even numbers larger than a user-defined number.", "input": "num = 20", "output": "num = int(input(\"Enter a number: \"))\n\n# Find the 10 smallest even numbers larger than the user-defined number\nnumbers = []\ntotal = 0\nfor i in range(num+1, num+21):\n if i%2 == 0:\n numbers.append(i)\n total += i\n \nprint('The sum is', total)"} {"text": "[DE Wikipedia] Evangelische Kirche Grävenwiesbach\n\nDie Evangelische Kirche Grävenwiesbach ist eine Dorfkirche in der Gemeinde Grävenwiesbach im Hochtaunuskreis. Sie steht unter Denkmalschutz. Lage und Nutzung Die Evangelische Kirche Grävenwiesbach, Kirchgasse 3, wird von der gleichnamigen Kirchengemeinde und für die ihr angegliederten Orte Hasselborn, Heinzenberg, Hundstadt, Laubach, Mönstadt und Naunstadt genutzt. Die Kirchengemeinde gehört zum Dekanat Hochtaunus der Propstei Rhein-Main der Evangelischen Kirche in Hessen und Nassau. Dem Sakralbau ist auf demselben Areal ein Gemeindehaus angegliedert, in dem in den Wintermonaten die Gottesdienste stattfinden. Die Kirche ist das weithin sichtbare Wahrzeichen der Gemeinde Grävenwiesbach. Allerdings sind weder Gebäude noch das Grundstück außerhalb jener Zeiten zu betreten, in denen sie von der Kirchengemeinde genutzt werden. Baugeschichte, Orgel und Glocken Die evangelische Kirche wurde im Auftrag des Fürsten Karl von Nassau-Usingen von Schlossbaumeister Friedrich Joachim Stengel im Stil des klassizistischen Barock entworfen und 1737/38 errichtet. Typisch ist die Ausführung der Kirche als Querkirche, damit einhergehend die Platzierung des Turms mittig an der Nordlängsseite. Zugänge befinden sich im Hauptportal nach Süden, zwei Seitenportalen nach Osten und Westen sowie einen Zugang an der Turmseite zur Sakristei. Das schlichte Äußere setzt sich im durch zahlreiche Fenster mit ungefärbten Gläsern lichtdurchfluteter Innenraum fort, der auf Gemälde und Zierrat weitgehend verzichtet. Bankreihen und Emporen sind um einen vor dem Turmzugang liegenden Altar- und Kanzelbereich ausgerichtet, dem vis-à-vis die kleine Orgel auf der Empore des Hauptportals an der Südlängsseite korrespondiert. Die ursprüngliche Köhlerorgel 1750 mit einem Manual, Pedal und 15 Registern wurde 1961/63 von der Orgelbaufirma Günter Hardt & Sohn, Weilmünster-Möttau, gegründet von Daniel Raßmann, um ein weiteres Manual und sieben Register erweitert. Die Orgel wurde 1996 renoviert. Im Turm der Kirche hängen vier Glocken (Geläut siehe Weblinks). Die Kirche wurde seit der zweiten Hälfte des 20. Jahrhunderts in mehreren Phasen renoviert, 1995 die Außenanlage sowie Holzbalustrade und Bänke, 2009 das Kirchendach in altdeutscher Schieferdeckung. Literatur Kathrin Ellwardt: Kirchenbau zwischen evangelischen Idealen und absolutistischer Herrschaft. Die Querkirchen im hessischen Raum vom Reformationsjahrhundert bis zum Siebenjährigen Krieg. Michael Imhof Verlag, Petersberg 2004, ISBN 3-937251-34-0 Cornelia Kalinowski e. a.: Kirchen im Hochtaunuskreis. (PDF; 4,9 MB) Bad Homburg v. d. H. 2006. Hg. vom Kreisausschuss des Hochtaunuskreises, S. 30 Weblinks Internetpräsenz der Kirchengemeinde Grävenwiesbach Klaus-Friedrich Rüb: Informationen zum Kirchengebäude. Geläut im Turm der evangelischen Kirche…"} {"instruction": "Write a Python program that reads a text document and performs tokenization followed by part-of-speech (POS) tagging.", "input": "text.txt\n\nThe quick brown fox jumps over the lazy dog.", "output": "import nltk\n\ndef tokenize_and_tag(filename):\n tokens = nltk.word_tokenize(open(filename).read())\n tagged_tokens = nltk.pos_tag(tokens)\n print(tagged_tokens)\n\ntokenize_and_tag('text.txt')\n\n# Output: [('The', 'DT'), ('quick', 'JJ'), ('brown', 'NN'), ('fox', 'NN'), ('jumps', 'VBZ'), ('over', 'IN'), ('the', 'DT'), ('lazy', 'JJ'), ('dog', 'NN'), ('.', '.')]"} {"instruction": "Create an SQL query to select only the rows from a table where the second column is not empty.", "input": "", "output": "SELECT * FROM TABLE_NAME WHERE COL2 <> '';"} {"instruction": "Write a function in Python that takes a sentence and removes all spaces.", "input": "\"Hello, World!\"", "output": "def remove_spaces(sentence): \"\"\"Remove all spaces from a given sentence.\"\"\" return sentence.replace(\" \", \"\")"} {"instruction": "Write code in Java to create a linked list.", "input": "", "output": "class Node{ int data; Node next; Node(int d){ data = d; next = null; } } class LinkedList{ Node head; public void insert(int data){ Node node = new Node(data); if (head == null) { head = node; } else { Node n = head; while (n.next != null) { n = n.next; } n.next = node; } } }"} {"instruction": "Write an SQL query to get the name, age and salary of the youngest employee.", "input": "", "output": "SELECT Name, Age, Salary FROM employees ORDER BY Age ASC LIMIT 1;"} {"text": "[EN Wikipedia] Semblis\n\nSemblis is a genus of insects belonging to the family Phryganeidae. Species: Semblis atrata Semblis phalaenoides References Phryganeidae Trichoptera genera"} {"instruction": "Translate the given program from Python to C.", "input": "def calculate_area(r):\n pi = 3.14\n area = pi * r * r\n return area", "output": "#include\n#define PI 3.14\n\nfloat calculate_area(float r)\n{\n float area = PI * r * r;\n return area;\n}"} {"instruction": "In Python, create a loop that takes a user input and appends it to a list until the user types \"stop\".", "input": "", "output": "my_list = []\n\nwhile True:\n user_input = input('Type something: ')\n if user_input == 'stop':\n break\n my_list.append(user_input)\n\nprint(my_list)"} {"text": "[DE Wikipedia] Bremner-Gletscher\n\nDer Bremner-Gletscher ist ein Gletscher in den Chugach Mountains in Südzentral-Alaska. Der Gletscher besitzt drei Gletscherzungen. Sein Nährgebiet liegt auf einer Höhe von an der Nordflanke des Mount Hawkins, einem östlichen Nebengipfel des Mount Tom White. Er strömt anfangs 16 km in nordöstlicher Richtung. Er vereinigt sich anschließend mit zwei von rechts heranströmenden Tributärgletschern und wendet sich nach Norden. Er strömt nun 21 km in nördlicher Richtung. Die Middle-Fork-Gletscherzunge zweigt nach 9 km nach Westen ab. Nach weiteren 12 km spaltet sich der Hauptgletscher in die North-Fork-Gletscherzunge, die nach Westen gerichtet ist, sowie in die Tana-Gletscherzunge, die nach Osten strömt, auf. Der Hauptgletscher besitzt eine mittlere Breite von 2,5 km. Die drei Gletscherzungen sind im Rückzug begriffen. Gletscherzungen Die Middle-Fork-Gletscherzunge ist 12,3 km lang. Sie besitzt eine mittlere Breite von 2,8 km und endet auf einer Höhe von ungefähr . Der Middle Fork Bremner River entwässert den Gletscher. Die North-Fork-Gletscherzunge ist 8,6 km lang und 2 km breit. Sie endet auf einer Höhe von und speist den North Fork Bremner River. Die Tana-Gletscherzunge ist lediglich 4,6 km lang und maximal 2,1 km breit. Sie ist nach Osten gerichtet und bildet den Ursprung des West Fork Tana River. Die Gletscherzunge endet auf einer Höhe von . Weblinks Gletscher in den Chugach Mountains GBremnerGletscher Wrangell-St.-Elias-Nationalpark Chugach Census Area Copper River Census Area"} {"text": "[HI Wikipedia] ऊसर\n\nऊसर या बंजर (barren land) वह भूमि है जिसमें लवणों की अधिकता हो, (विशेषत: सोडियम लवणों की अधिकता हो)। ऐसी भूमि में कुछ नहीं अथवा बहुत कम उत्पादन होता है। ऊसर बनने के कारण जल भराव अथवा जल निकास की समुचित व्यवस्था का न होना वर्षा कम तापमान का अधिक होना भूमिगत जल का ऊंचा होना गहरी क्षेत्रों में जल रिसाव होना वृक्षों की अन्धाधुंध कटाई भूमि को परती छोड़े रहना भूमि में आवश्यकता से अधिक रसायनों का प्रयोग करना तथा कभी भी जैविक खाद, कम्पोस्ट खाद, सड़ी गोबर की खाद तथा ढ़ैचा की हरी खाद का प्रयोग न करना लवणीय जल से सिंचाई करना ऊसर सुधार की विधि (तकनीकी) ऊसर सुधार की विधि क्रमबद्ध चरणबद्ध तथा समयबद्ध प्रणाली है इस विधि से भूमि को पूर्ण रूप से ठीक किया जा सकता है। सर्वेक्षण - बेहतर जल प्रबन्ध एवं जल निकास की समुचित व्यवस्था हेतु सर्वेक्षण। बोरिंग स्थल का चयन 1.स्थल ऊँचे स्थान पर चुना जाये। 2. जिस सदस्थ के खेत में वोरिंग हो वह बकायादार न हो। 3. एक बोरिंग की दूरी दूसरे से 200 मी0 से कम न हो। मेड़बन्दी -यह कार्य बरसात में या सितम्बर अक्टूबर में जब भूमि नम रहती है तो शुरू कर देनी चाहिए। -मेड़ के धरातल की चौड़ाई 90 सेमी ऊंचाई 30 सेमी तथा मेड़ की ऊपरी सतह की चौ0 30 सेमी होनी चाहिए। -मेड़बन्दी करते समय सिंचाई नाली और खेत जल निकास नाली का निर्माण दो खेतों की मेड़ों के बीच कर देना चाहिए। जुताई - भूमि की जुताई वर्षा में या वर्षा के बाद सितम्बर अक्टूबर या फरवरी में करके छोड़ दें जिससे लवण भूमि की सतह पर एकत्र न हो। -भूमि की जुताई 2-3 बार 14-20 सेमी गहरी की जाये खेत जुताई से पूर्व उसरीले पैच को 2 सेमी की सतह खुरपी से खुरचकर बाहर नाले में डाल दें। समतलीकरण -खेत को कम चौड़ी और लम्बी-2 क्यारियों में बाटकर क्यारियों का समतलीकरण करना चाहिए। -जल निकास नाली की तरफ बहुत हल्का सा ढ़ाल देना चाहिए ताकि खेत का फालतू पानी जल निकास नाली द्वारा बहाया जाये। -मिट्टी की जांच करा ले आवश्यक 50 प्रतिशत जिप्सम की मात्रा का पता चल पाता हैं। सिंचाई नाली, जल निकास नाली तथा स्माल स्ट्रक्चर का निर्माण -खेत की ढाल तथा नलकूप के स्थान को ध्यान में रखते हुए सिंचाई तथा खेत नाली का निर्माण करना चाहिए। -सिंचाई नाली भूमि की सतह से ऊपर बनाई जाये, जो आधार पर 30 सेमी गहरी तथा शीर्ष पर 120 सेमी हो। -खेत नाली भूमि की सतह से 30 बनाई जाये, जो आधार पर 30 सेमी गहरी तथा शीर्ष पर 75-90 सेंमी हो। लिंक ड्रेन यह 50 सेमी गहरी आधार पर 45 सेमी और शीर्ष पर 145 सेमी और साइड स्लोप 1:1 का होना चाहिए जिप्सम का प्रयोग एवं लीचिंग - समतलीकरण करते समय खेत में 5-6 मी चौड़ी और लम्बी क्यारियां बना लें तथा सफेद लवण को 2 सेमी की सतह खुरपी से खुरच कर बाहर नाले में डाल दें। - फिर क्यारियों में हल्का सा पानी लगा दें चार पांच दिन बाद निकाल दें जिससे लवण लीचिंग द्वारा भूमि के नीचे अथवा पानी द्वारा बाहर निकल जायेंगे। - समतलीकरण का पता लगाने के लिये क्यारियों में हल्का पानी लगा दें। तथा हल्की जुताई करके ठीक प्रकार से समतल कर लें। क्यारियों में जिप्सम मिलाना - जिप्सम का प्रयोग करते समय क्यारियां नम हो। - बोरियों को क्यारियों में समान रूप से फैला दें। - इसके बाद देशी हल या कल्टीवेटर की सहायता से भूमि की ऊपरी 7-8 सेमी की सतह में जिप्सम मिला दें और…"} {"instruction": "Implement a Go program that takes a string as input and prints its reverse.", "input": "", "output": "package main import \"fmt\" func main() { var str string fmt.Printf(\"Enter a string: \") fmt.Scanf(\"%s\\n\", &str) fmt.Printf(\"The reverse of the string is %s\\n\", reverse(str)) } func reverse(s string) string { r := []rune(s) for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 { r[i], r[j] = r[j], r[i] } return string(r) }"} {"instruction": "Create an application in Python that displays the lyrics to a given song.", "input": "‘Happy’ by Pharrell Williams", "output": "import requests\nimport re\n \ndef get_lyrics(song):\n song = song.replace(\" \", \"+\")\n base_url = 'https://www.azlyrics.com/lyrics/'\n page_url = base_url + song + \".html\"\n \n response = requests.get(page_url)\n lyrics = re.search(r\"(.*)\", response.text, flags=re.DOTALL).group(1)\n lyrics = re.sub(r'<[^>]*>', '', lyrics)\n \n return lyrics\n \nlyrics = get_lyrics('Happy Pharrell Williams')\nprint(lyrics)"} {"instruction": "Change the following list of strings into a single combined string.", "input": "my_list = [\"Hello\", \"world\", \"this\", \"is\", \"a\", \"test\"]", "output": "# Create the string from the list my_string = ' '.join(map(str, my_list)) # Print the string print(my_string) # Hello world this is a test"} {"instruction": "Create a web page using HTML, CSS and JavaScript that displays a user's full name.", "input": "const fullName = \"John Doe\";", "output": " My First Webpage

    My Full Name

    My full name is John Doe.

    "} {"instruction": "Compare two values to check if the first one is greater than the second one, and if so, print \"A is greater than B\".", "input": "A = 5 B = 3", "output": "if A > B: print(\"A is greater than B\")"} {"instruction": "Write a PHP function named \"calculateArea\" to calculate the area of a rectangle.", "input": "length = 10 width = 20", "output": ""} {"instruction": "Create an R function which takes a vector of numbers as input and returns its average.", "input": "", "output": "getAvg <- function(x){ return(mean(x)) }"} {"instruction": "Create a function that adds two matrices of the same size.", "input": "[[1, 2], [3, 4]], [[5, 6], [7, 8]]", "output": "int[][] addMatrix(int[][] a, int[][] b) { int[][] c = new int[a.length][a[0].length]; for (int i = 0; i < a.length; i++) { for (int j = 0; j < a[i].length; j++) { c[i][j] = a[i][j] + b[i][j]; } } return c; }"} {"instruction": "Generate an array of Nth Fibonacci sequence using Python.", "input": "N = 10", "output": "def generate_fibonacci_sequence(N):\n '''\n This program takes in an integer N and returns the first N elements of the Fibonacci sequence\n '''\n \n fibonacci_sequence = []\n \n if N < 1:\n return fibonacci_sequence\n elif N == 1:\n fibonacci_sequence = [1]\n return fibonacci_sequence\n else:\n fibonacci_sequence = [1,1]\n for i in range(2,N):\n fibonacci_sequence.append(fibonacci_sequence[i-2]+fibonacci_sequence[i-1]) \n \n return fibonacci_sequence\n \nprint(generate_fibonacci_sequence(10)) # [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]"} {"instruction": "Build a text generator in Python that can generate poem based on a given input.", "input": "", "output": "def generate_poem(input): \n poem = []\n for i in range(len(input)):\n line = ''\n for j in range(i):\n line += input[j] + ' '\n poem.append(line)\n return poem"} {"text": "[DE Wikipedia] Blindstock\n\nAls Blindstock oder Montagezarge wird ein Rahmen bezeichnet, der als Lehrgerüst für Tür- und Fenster-Öffnungen in den Rohbau eingefügt wird. Typischerweise wird ein Blindstock aus Bohlen oder Kanthölzern gefertigt und kann nach Fertigstellung des Rohbaus dazu dienen, das Türfutter (Umfassungszarge) einer Tür oder den Blendrahmen eines Fensters daran zu befestigen. Der obere Riegel des Blindstocks dient im Mauerwerksbau auch als temporärer Sturz, um den gemauerten Sturz bis zum Abbinden des Mauermörtels zu tragen, oder als endgültiger Sturz, wenn er für diese Aufgabe ausreichend stark bemessen ist. Da heute meist passgenaue, großformatige Mauersteine und Fertigstürze zum Errichten von Wänden verwendet werden, bringt die Verwendung eines Blindstocks keine großen Vorteile mit sich. Türzargen und Fensterrahmen werden im Mauerwerk verschraubt, so dass auf die Befestigung an einem eingemauerten Blindstock verzichtet werden kann. Falls Türen und Fenster erst nach dem Verputzen der Wände eingesetzt werden sollen (um sie beispielsweise vor Beschädigung während der Bauphase zu schützen), können zunächst Blindstöcke eingeputzt werden, an welchen sich später die Türen und Fenster auf einfache Weise anschlagen lassen. Bei Einbau von Fenstern in der Dämmebene kann es sinnvoll sein, zunächst einen Blindstock an der Außenseite der Wandöffnung anzubringen, um das Fenster sodann an diesem soliden Rahmen befestigen zu können. Einzelnachweise Türen Fenster Bauausführung Stütze (Bauteil)"} {"instruction": "Write a Python program to search a database and generate a report based on the results.", "input": "The database contains information on employee records including name, salary, and department.", "output": "import sqlite3\n\n# Connect Database\nconn = sqlite3.connect('employee_records.db')\n\n# Create Cursor\ncursor = conn.cursor()\n\n# Query Database\ncursor.execute(\"SELECT name, salary, department FROM employees\")\nrows = cursor.fetchall()\n\n# Generate Report\nfor row in rows:\n name = row[0]\n salary = row[1]\n department = row[2]\n print(f'{name} earns ${salary} in {department}')\n\n# Close Connection\nconn.close()"} {"instruction": "Implement a web service using Python Flask to generate a pie chart from input data.", "input": "Sample input data: [1, 2, 4, 6]", "output": "import flask\nfrom flask import request, jsonify\nimport matplotlib.pyplot as plt\n\n# create the Flask app\napp = flask.Flask(__name__)\napp.config[\"DEBUG\"] = True\n\n# function to generate the pie chart\ndef generate_pie_chart(data):\n fig, ax = plt.subplots()\n ax.pie(data, labels=['1', '2', '4', '6'], autopct='%1.1f%%')\n ax.axis('equal') \n return fig\n\n# home route\n@app.route('/', methods=['GET'])\ndef home():\n return '''

    Pie Chart Generator

    \n

    A web service to generate pie chart from input data.

    '''\n\n# route to generate the pie chart\n@app.route('/api/v1/generate_pie_chart', methods=['POST'])\ndef generate_pie_chart_route():\n # get the input data\n data = request.json['data']\n \n # generate the pie chart \n fig = generate_pie_chart(data)\n \n # save the figure as a png image\n figure_file = 'figure.png'\n fig.savefig(figure_file)\n \n # read the pie chart image\n data = open(figure_file, 'rb').read()\n \n # return the chart as response\n return data\n\n# run the app\nif __name__ == '__main__':\n app.run(debug=True)"} {"instruction": "Assign a value of 123 to the variable x.", "input": "", "output": "x = 123"} {"instruction": "Design a Python program to implement the Bubble Sort algorithm.", "input": "[1, 8, 4, 6, 2, 5]", "output": "def bubble_sort(arr):\n for i in range(len(arr) - 1):\n for j in range(len(arr) - i - 1):\n if arr[j] > arr[j + 1]:\n arr[j], arr[j + 1] = arr[j + 1], arr[j]\n return arr\n\nresult = bubble_sort([1, 8, 4, 6, 2, 5])\nprint(result)"} {"instruction": "Create a program that takes in two lists and prints out a new list with the elements from the first list followed by the elements from the second list.", "input": "list_1 = [1, 2, 3] list_2 = [4, 5, 6]", "output": "# define a function to combine two lists into one def combine_lists(list_1, list_2): # create a new list combined_list = [] # append the elements from list 1 for ele in list_1: combined_list.append(ele) # append the elements from list 2 for ele in list_2: combined_list.append(ele) # return the combined list return combined_list # input two lists list_1 = [1, 2, 3] list_2 = [4, 5, 6] # output the combined list combined_list = combine_lists(list_1, list_2) print(\"The combined list is \" + str(combined_list))"} {"instruction": "Design an algorithm in Python to optimize a given set of objects for a given goal.", "input": "Objects: A, B, C, D \nGoal: Maximize value", "output": "def optimize(objects, goal):\n max_value = -float(\"inf\")\n best_config = None\n\n for config in generate_configs(objects):\n value = evaluate_config(config)\n if value > max_value:\n max_value = value\n best_config = config\n \n return best_config\n\ndef generate_configs(objects):\n # Generate all possible combinations of the objects\n \ndef evaluate_config(config):\n # Evaluate the value of the configuration for the given goal"} {"instruction": "Generate the Python code for a pipelie of KMeans and GaussianMixture clustering models.", "input": "n_clusters = 10", "output": "from sklearn.cluster import KMeans, GaussianMixture\ncluster = KMeans(n_clusters=n_clusters).fit(X)\npipeline = GaussianMixture(n_components=2).fit(cluster.cluster_centers_)"} {"instruction": "Using the given information, create a SQL query to find the total number of products in the database.", "input": "Table: products Columns: product_id, product_name", "output": "SELECT COUNT(*) FROM products;"} {"instruction": "Create a Python script to download a zip archive from a URL and extract it in the current directory.", "input": "https://example.com/myzip.zip", "output": "import requests\nimport shutil\nimport zipfile\n\nurl = 'https://example.com/myzip.zip'\n\nresponse = requests.get(url, stream=True)\n\nwith open('myzip.zip', 'wb') as f:\n shutil.copyfileobj(response.raw, f)\n\nwith zipfile.ZipFile('myzip.zip', 'r') as f:\n f.extractall()"} {"instruction": "Create a HTML page with a textbox, button and a message “Hello World!”", "input": "", "output": "

    Hello World!

    "} {"instruction": "Write an operation that adds all the numbers in a given list.", "input": "[32, 15, 45, 56, 16]", "output": "sum = 164"} {"instruction": "Write a SQL query to calculate the total cost of a given product.", "input": "product_id: 123 price: 100.50 quantity: 10", "output": "SELECT SUM(price * quantity) AS total_cost FROM products WHERE product_id = 123;"} {"instruction": "Create a Python class with the same content as a JSON string.", "input": "myjson_string = '{\"name\": \"John\", \"age\": 20}'", "output": "import json class Person: def __init__(self, json_string): data = json.loads(json_string) self.name = data['name'] self.age = data['age'] myjson_string = '{\"name\": \"John\", \"age\": 20}' person = Person(myjson_string) print(person.name, person.age)"} {"instruction": "Generate a Python script to create a list of numbers in the range 0-n (inclusive) and print it.", "input": "n = 10", "output": "n = 10\n\nlist_numbers = []\nfor i in range(0,n+1):\n list_numbers.append(i)\n\nprint(list_numbers)"} {"instruction": "Using regex, convert a string of dates from the format 'dd/mm/yyyy' to 'mm/dd/yyyy'", "input": "String \"05/06/2019, 10/08/2020\"", "output": "String \"06/05/2019, 08/10/2020\""} {"instruction": "Design a Python program to simulate a simple calculator.", "input": "", "output": "#Function to add two numbers\ndef add(val1, val2):\n return val1+val2\n\n#Function to subtract two numbers\ndef subtract(val1, val2):\n return val1-val2\n\n#Function to multiply two numbers\ndef multiply(val1, val2):\n return val1*val2\n\n#Function to divide two numbers\ndef divide(val1, val2):\n return val1/val2\n\nwhile True:\n print(\"Please provide the operator and operands\")\n print(\"1. Add\")\n print(\"2. Subtract\")\n print(\"3. Multiply\")\n print(\"4. Divide\")\n print(\"5. Exit\")\n \n \n # Take input from the user \n choice = int(input(\"Enter your choice of operation: \")) \n \n # Check if choice is one of the four options\n if choice in (1, 2, 3, 4): \n num1 = float(input(\"Enter the first number: \")) \n num2 = float(input(\"Enter the second number: \")) \n \n if choice == 1: \n print(num1, \"+\", num2, \"=\", \n add(num1,num2)) \n \n elif choice == 2: \n print(num1, \"-\", num2, \"=\", \n subtract(num1,num2)) \n \n elif choice == 3: \n print(num1, \"*\", num2, \"=\", \n multiply(num1,num2)) \n \n elif choice == 4: \n print(num1, \"/\", num2, \"=\", \n divide(num1,num2)) \n \n elif choice == 5:\n print(\"Exiting Program!\")\n break\n else: \n print(\"Please enter a valid option!\")"} {"instruction": "Write a piece of code in Python that prints a multiplication table", "input": "", "output": "def multiplication_table(n): for i in range(1, n+1): for j in range(1, n+1): print(\"{}x{}={}\".format(i, j, i*j)) print(\"\")"} {"instruction": "Convert the following code into equivalent Python 3 function.", "input": "function doubleString(str) {\n return str + str;\n}", "output": "def doubleString(str):\n return str + str"} {"instruction": "Generate a valid CSS rule to center align the text with the id \"heading_text\"", "input": "", "output": "#heading_text { text-align: center; }"} {"instruction": "Create a Python script that splits a given string into equal parts", "input": "", "output": "def split_str(str, n):\n return [str[i:i+n] for i in range(0, len(str), n)]"} {"instruction": "Write a Python function to compute the total amount of a given grocery bill after taxes.", "input": "items = [('apple', 1.49), ('banana', 0.99), ('bread', 4.99)]", "output": "def compute_total_after_taxes(items): tax = 0.07 total = 0 for item in items: price = item[1] tax_amount = price * tax total += price + tax_amount return round(total, 2)"} {"instruction": "Write a Python script that takes in the arguments x and y and prints the result of p + q.", "input": "p = 5\nq = 7", "output": "def calculate_sum(x, y):\n \"\"\"\n Takes in the arguments x and y and prints the result of p + q.\n Args:\n x: first argument.\n y: second argument.\n Returns:\n result: the sum of the two arguments.\n \"\"\"\n result = x + y\n return result\n\np = 5\nq = 7\nresult = calculate_sum(p, q)\nprint(result)"} {"instruction": "Create an expression parser in Python to evaluate basic mathematical expressions.", "input": "", "output": "# Assume input is a valid mathematical expression with no syntax errors \n\ndef expression_parser(expression): \n tokens = expression.split() \n stack = [] \n \n for token in tokens: \n if token == '+' or token == '*' or token == '/': \n a = stack.pop() \n b = stack.pop() \n if token == '+': \n c = b + a \n elif token == '*': \n c = b * a \n else: \n c = b / a \n stack.append(c) \n else: \n stack.append(int(token)) \n return stack.pop()"} {"instruction": "Construct a regex pattern in Python to match any odd number.", "input": "", "output": "import re\n\npattern = re.compile('[13579]') # matches any odd number"} {"instruction": "Create an array of objects in JavaScript that contains five objects, each representing a different programming language.", "input": "", "output": "var languages = [ {langName: \"JavaScript\", creator: \"Brendan Eich\", releaseYear: 1995}, {langName: \"Python\", creator: \"Guido van Rossum\", releaseYear: 1991}, {langName: \"C\", creator: \"Dennis Ritchie\", releaseYear: 1972}, {langName: \"Java\", creator: \"James Gosling\", releaseYear: 1995}, {langName: \"C++\", creator: \"Bjarne Stroustrup\", releaseYear: 1985} ]"} {"instruction": "Construct a Python program that finds the maximum number in a given sequence of integers.", "input": "7, 3, 12, 9, 4", "output": "sequence = [7, 3, 12, 9, 4]\nmaxnum = 0\n\nfor num in sequence:\n if num > maxnum:\n maxnum = num\n\nprint(maxnum) # Output: 12"} {"instruction": "Create a function in JavaScript to convert a given string to a positive integer.", "input": "str = \"323\"", "output": "const convertStringToInteger = str => { return parseInt(str, 10); }"} {"instruction": "Construct an SQL query that averages the grades of students belonging to the Physics department.", "input": "Table Name: Grades", "output": "SELECT AVG(grade) FROM Grades WHERE department = 'Physics';"} {"instruction": "Create a web scraper to extract the title and description of a given URL using BeautifulSoup.", "input": "URL: https://www.example.com/", "output": "# Imports import requests from bs4 import BeautifulSoup # Define the URL url = \"https://www.example.com/\" # Get the HTML response = requests.get(url) html = response.content # Parse the HTML soup = BeautifulSoup(html,\"html.parser\") # Extract the title and description title = soup.find(\"title\").text description = soup.find(\"meta\", property=\"og:description\")['content'] # Print the title and description print(\"Title:\", title) print(\"Description:\", description)"} {"instruction": "Where does a Python interpreter look for modules?", "input": "", "output": "The Python interpreter looks for modules in the following locations: the home directory, the built-in modules, the PYTHONPATH environment variable, and the standard Python library path."} {"text": "[EN Wikipedia] Hagenella\n\nHagenella is a genus of insects belonging to the family Phryganeidae. The species of this genus are found in Europe, Easternmost Asia and Northern America. Species: Hagenella apicalis (Matsumura, 1904) Hagenella canadensis (Banks, 1907) References Phryganeidae Trichoptera genera"} {"text": "[HI Wikipedia] भगवानबाबा\n\nआबाजी तुबाजी सानप (२९ जुलाई १८९६ - १८ जनवरी १९६५) जो 'भगवानबाबा' के नाम से प्रसिद्ध थे, उनका जनमः सावरगाव घाट तालुका पाटोदा जिल्हा बीड में हुवा था। । महाराष्ट्र के वारकरी सम्प्रदाय के प्रसिद्ध सन्त थे। परिचय भगवानबाबा हिंदुओं के गौरव हैं। जिस दौर में हिंदू धर्म और संस्कृति पर आक्रमण हो रहे थे ऐसे समय में भगवानबाबाने अपने प्राणों की परवाह किये बगैर त्याग का प्रतीक भगवा ध्वज हाथों लेकर धर्म की रक्षा की। यही कारण है की उन्हें आज हर ह्रदय के सम्राट की संज्ञा दी जाती है। देश, धर्म और स्वाभिमान की रक्षा के लिए कितने त्याग किये और अपने धर्म ध्वजा का मान ऊँचा रखा। हिन्दू आध्यात्मिक नेता गुरु परंपरा भगवानबाबाकी गुरुपरंपरा आगे दिइ गई है। नारायण ब्रह्मदेव अत्री ऋषी दत्तात्रेय जनार्दनस्वामी संत एकनाथ गावोबा किंवा नित्यानंद अनंत दयानंद स्वामी पैठणकर आनंदॠषी नगदनारायण महाराज महादेव महाराज (पहिले) शेटीबाबा (दादासाहेब महाराज) गोविंद महाराज नरसू महाराज महादेव महाराज (दुसरे) माणिकबाबा भगवानबाबा मराठी लोग भारत के लोग संत मत"} {"instruction": "Design a function in JavaScript to take in two strings as parameters and return true if the strings are anagrams and false otherwise.", "input": "", "output": "function isAnagram(string1, string2) { // Convert both strings to lowercase var s1 = string1.toLowerCase(); var s2 = string2.toLowerCase(); // To sort the strings and // remove all spaces s1 = s1.replace(/ /g, '').split('').sort().join(''); s2 = s2.replace(/ /g, '').split('').sort().join(''); if (s1 == s2) return true; else return false; }"} {"instruction": "Design a function to validate a phone number.", "input": "Phone Number: 212-555-0000", "output": "def check_phone_number(phone_number): #Remove any non-numeric characters phone_number = phone_number.replace(\"-\", \"\") phone_number = phone_number.replace(\" \", \"\") #Check if the phone number is 10 digits long if (len(phone_number) != 10): return False #Check each digit is a number for digit in phone_number: if not digit.isdigit(): return False #Check the area code is valid area_code = phone_number[0:3] valid_area_codes = [\"201\", \"212\", \"203\", \"202\", \"205\"] if area_code not in valid_area_codes: return False #All tests passed return True print(check_phone_number('212-555-0000')) Output: True"} {"text": "[EN Wikipedia] Simon Edens\n\nSimon Edens, QGM, QPM, was a career police officer within the United Kingdom and is a former Chief Constable of Northamptonshire Police. Career History Simon started his policing career with the Royal Ulster Constabulary (now the Police Service of Northern Ireland). Between 1981 and 1991, Simon served as a Constable and Sergeant in both urban and rural settings across Northern Ireland. In May 1989, Simon was awarded the Queen's Gallantry Medal for bravery in Northern Ireland. In 1991, Simon joined Cambridgeshire Police in England as a Constable. Between 1991 and 2004, he was successfully promoted from Constable through to the rank of Chief Superintendent (circa 2004), having then taken command of Cambridgeshire Police’s Central Division and transformation across the Force later in 2006. Given Simon’s leadership abilities, in 2007 he undertook the Strategic Command Course (designed for the promotion of Chief Officers) and in 2008 was hired by West Mercia Police as their Assistant Chief Constable – a position he held until 2012. In August 2012, Simon was appointed Deputy Chief Constable of Leicestershire Police, assuming command and responsibilities for, among other things, performance, professional standards and corporate governance. He was appointed Chief Constable of Northamptonshire Police by the then Police and Crime Commissioner of Northamptonshire, Adam Simmonds, in July 2015. He retired from the police service on 5 August 2018. Honours and awards 1989 - Queen's Gallantry Medal 2015 - Queen's Police Medal References External links Youtube Facebook Living people Royal Ulster Constabulary officers British Chief Constables Northern Irish recipients of the Queen's Police Medal Recipients of the Queen's Gallantry Medal Year of birth missing (living people)"} {"instruction": "Produce a JavaScript code snippet for opening a new browser window.", "input": "", "output": "window.open(\"\", \"_blank\");"} {"text": "[DE Wikipedia] Progressive Jazz\n\nProgressive Jazz ist ein vermeintlicher Jazzstil der späten 1940er- und frühen 1950er-Jahre. Dieses Etikett hat erstmals Stan Kenton verwendet, um Aspekte seines eigenen Schaffens zu beschreiben. Er konnte hierbei insbesondere auf Pete Rugolo, Robert Graettinger, Chico O’Farrill oder Franklyn Marks mit ihren Kompositionen und großorchestralen Arrangements „mit einer massierten Fülle gewaltiger Akkorde und übereinandergeschichter Klangmassen“ für die Kenton-Band zurückgreifen. Das Etikett des Progressive Jazz wurde später von Kritikern und Fans teilweise auch auf die Musik von Dave Brubeck, das Modern Jazz Quartet und Entwicklungen des Cool Jazz und des Third Stream angewendet. Progressive bedeutete in diesem Zusammenhang ein Musikverständnis, das auf bestimmten Errungenschaften der Klassik, insbesondere auf der Spätromantik und ihren harmonischen Erweiterungen aufbaute. Literatur Andre Asriel: Jazz – Analysen und Aspekte. Berlin 1966 (4., überarbeitete und erweiterte Auflage 1985) Ian Carr, Digby Fairweather, Brian Priestley: The Rough Guide to Jazz. Rough Guides, 2004. ISBN 1-84353-256-5. Einzelnachweise Jazz-Stil"} {"text": "[EN Wikipedia] Boris P. Stoicheff\n\nBoris P. Stoicheff, , (June 1, 1924 – April 15, 2010) was a Macedonian Canadian physicist. Stoicheff was born in Bitola, in the Kingdom of Yugoslavia (present-day North Macedonia). His family emigrated to Canada 1931, and he grew up in Toronto. He earned a degree in Engineering Physics from the University of Toronto in 1947, and a PhD from the same institution in 1950. He stayed for another year at Toronto on a fellowship, then went to the National Research Council (Canada) in Ottawa to work as a postdoctoral researcher in the spectroscopy laboratory headed by Gerhard Herzberg, where he worked on Raman scattering. In 1953 he was promoted at the National Research Council (Canada) to a permanent research position. Stoicheff became well known for his Raman spectroscopy through the 1950s, publishing a number of previously unavailable high-resolution molecular spectra. In 1954, he married his wife Joan, and they had a son, Peter Stoicheff, in 1956 (who would go on to become the President of the University of Saskatchewan). In the late 1950s, he became interested in Brillouin scattering, and attempted to build a laser, though Theodore Maiman succeeded in doing so first. Stoicheff nonetheless soon built the first laser in Canada, and researched using it for spectroscopy. He spent a sabbatical year in 1963 at MIT, working with Charles Townes and some of Townes's graduate students on the same subject, and in 1964 took a professorship at the University of Toronto. In the late 1970s he changed focus from Brillouin spectroscopy to Rydberg spectroscopy. He retired in 1989, though continued to perform research. By 2000, he was working on the origin of diffuse interstellar bands. Honors and awards He was elected a Fellow of the Royal Society in 1975. He served as president of the Optical Society of America in 1976 and was awarded their William F. Meggers Award in 1981 and their Frederic Ives Medal in 1983. He also received the Henry Marshall Tory Medal, in 1989. Tributes Since 2011, the Optical Society of America and the Canadian Association of Physicists sponsors a scholarship in his name that is awarded annually to an undergraduate or graduate student who has demonstrated both research excellence and significant service in either professional organizations. See also Inverse Raman effect Stimulated Brillouin scattering Singlet fission Supercontinuum References External links Articles Published by early OSA Presidents Journal of the Optical Society of America Fascination with light led scientist to build and operate Canada's first laser Toronto Globe and Mail, 17 May 2010 Obituary from Canadian Association of Physicists 1924 births 2010 deaths Yugoslav emigrants to Canada University of Toronto alumni Presidents of Optica (society) Canadian physicists Macedonian…"} {"instruction": "Implement a Python method that builds a binary search tree from an unsorted array", "input": "[4, 3, 8, 15, 1, 5]", "output": "# Node class\nclass Node: \n def __init__(self, val): \n self.val = val\n self.left = None\n self.right = None\n\n# Function to construct a Binary Search Tree \n# from a given array\ndef constructBst(arr): \n # check if list is empty or not \n if (len(arr) == 0): \n return None\n \n # create a new root \n root = Node(arr[0]) \n arr.pop(0) \n \n # assign left and right child \n # of root node \n left_arr, right_arr = [], []\n for item in arr: \n if (item <= root.val): \n left_arr.append(item) \n else: \n right_arr.append(item)\n \n # recursively construct \n # left and right sub tree \n root.left = constructBst(left_arr) \n root.right = constructBst(right_arr) \n return root \n\n# Function to traverse a Binary Search Tree \n# and print its elements in inorder \ndef inorderTraversal(root): \n if (root != None): \n inorderTraversal(root.left) \n print(root.val, end = \" \") \n inorderTraversal(root.right) \n\n# Driver Code \nif __name__ == '__main__': \n arr =[4, 3, 8, 15, 1, 5]\n root = constructBst(arr) \n inorderTraversal(root)"} {"text": "[EN Wikipedia] Pavelló de l'Espanya Industrial\n\nThe Pavelló de l'Espanya Industrial (), currently named Centre Esportiu Municipal l'Espanya Industrial is a building located in Barcelona. Completed in 1991, it hosted the weightlifting competitions for the 1992 Summer Olympics. References 1992 Summer Olympics official report. Volume 2. pp. 196–9. Venues of the 1992 Summer Olympics Olympic weightlifting venues Sports venues in Barcelona"} {"instruction": "What is a for loop?", "input": "", "output": "A for loop is a programming structure used to repeat a specific set of instructions for a given number of times or until a specified condition is met. The syntax of a for loop is \"for in :\" and the format is \"for in range(, ):\" where the start and end value are optional. The code within the loop will be executed until the given condition is met, or the loop is terminated with a break command."} {"text": "[CS Wikipedia] Evropský systém ostrahy hranic\n\nEvropský systém ostrahy hranic (zkratka Eurosur z anglického The European Border Surveillance System) je monitorovací systém Evropské unie, který využívá drony, průzkumná letadla, pobřežní čidla a dálkový průzkum pomocí satelitů ke sledování nelegální imigrace do členských států Evropské unie. Cílem Eurosur je získat informaci o současném pohybu migrantů a o činnostech organizací obchodujících s lidmi. Nařízení Eurosur zahrnuje též záchranu osob v nouzi. Samotné pátrání a záchrana na moři spadají do pravomoci vykonávané členskými státy v rámci mezinárodních úmluv. Způsob provedení Eurosur pomocí národních koordinačních center (NCC) informuje státy schengenské dohody a dále Bulharsko, Rumunsko a Chorvatsko o neřízené migraci a uprchlících. Evropská pohraniční služba Frontex pak dodává celkový obraz situace a společné předhraniční zpravodajství. Frontex také zpřístupňuje společné služby (Eurosur Fusion Services), např. detekci a sledování plavidel, složité výpočty, předpovědi počasí. Služby jsou poskytovány v součinnosti s Evropskou námořní bezpečnostní agenturou (EMSA) a Satelitním centrem EU (SatCen). Identifikaci pro účely mezinárodní ochrany ilegálních přistěhovalců zajišťuje systém EURODAC. Historie Tragická smrt více než tří set uprchlíků u italského ostrova Lampedusa v roce 2013 donutila Itálii ke spuštění humanitární akce pod názvem Mare Nostrum. Z pohledu uprchlíků došlo paradoxně ke zhoršení situace, neboť převaděči zneužívali zvýšené italské přítomnosti a již tak přeplněné lodě obsazovali větším počtem lidí. Spoléhali totiž na italské námořnictvo, které uprchlíky v případě ohrožení zachrání. Za rok trvání operace prošlo rukama italského námořnictva více než 150 000 uprchlíků. V roce 2014 proto byly upraveny pravomoci Frontexu a spuštěna společná operace Triton. V prosinci 2013 19 schengenských států spustilo Eurosur na jižní a východní hranici EU. Dodavatele systému vedla španělská GMV Aerospace and Defence. V roce 2014 už bylo členy Eurosur všech 30 schengenských států. Kritika V září 2014 Eurosur pomohl zachránit 38 lidí. Jinak ale panuje o jeho užitečnosti skepse, protože vyhodnocení satelitních snímků trvá i několik dnů. Samotné náklady na vybudování koordinačních center se uvádí ve výši 5,5 miliardy korun. Na období od října 2013 do roku 2020 bylo na instalaci a údržbu systému EUROSUR vyhrazeno z rozpočtu EU 244 milionů EUR. Velké zbrojařské firmy a lobbistické organizace, zejména Evropská organizace pro bezpečnost (EOS), AeroSpace a Asociace obranného průmyslu údajně úspěšně prosazují přístup k migraci a uprchlíkům jako k bezpečnostní hrozbě. To znamená nejen dobré zisky pro zbrojní průmysl, ale také více násilí a represe na hranicích. Migranty tak nutí hledat jiné, často nebezpečnější cesty, což vede k většímu počtu úmrtí a rozkvětu…"} {"text": "[EN Wikipedia] Cozzolino\n\nCozzolino is an Italian surname. Notable people with the surname include: Andrea Cozzolino (born 1962), Italian politician Dominic Cozzolino (born 1994), Canadian ice sledge hockey player Giuseppe Cozzolino (born 1985), Italian footballer Kei Cozzolino (born 1987), Japanese-born Italian racing driver Pasquale Cozzolino, a Neapolitan chef based in New York See also Leandro Cuzzolino (born 1987), Argentine futsal player Italian-language surnames"} {"instruction": "Generate a random number between 5 and 10 using Python.", "input": "", "output": "import random\nrand_num = random.randint(5,10)\nprint(rand_num)"} {"instruction": "What is the syntax required to create an array of objects using JavaScript?", "input": "", "output": "An array of objects can be created using the syntax below: let arrayOfObjects = [ { key1: 'value1', key2: 'value2' }, { key1: 'value3', key2: 'value4' }, { key1: 'value5', key2: 'value6' } ];"} {"instruction": "Develop a code that can calculate the cumulative sum of an array", "input": "[2, 4, 6, 8, 10]", "output": "def cummulative_sum(arr): cum_sum = 0 for num in arr: cum_sum += num return cum_sum if __name__ == '__main__': test_list = [2, 4, 6, 8, 10] print('Cumulative Sum:', cummulative_sum(test_list))"} {"instruction": "Develop a Python function to calculate the summed weighted average from a given set of values and weight.", "input": "values = [90, 50, 70], weights = [0.4, 0.2, 0.4]", "output": "def weightedAverage(values, weights):\n sum = 0.0\n for i in range(len(values)):\n sum += values[i] * weights[i]\n return sum/len(values)\n\nvalues = [90, 50, 70]\nweights = [0.4, 0.2, 0.4]\n\nprint(weightedAverage(values, weights))"} {"instruction": "Create an API in Python and deploy it with the Flask framework", "input": "", "output": "# import dependencies\nimport flask\nfrom flask import request, jsonify\n\n#import API methods\nimport some_function\n\napp = flask.Flask(__name__)\napp.config[\"DEBUG\"] = True\n\n# create API endpoint\n@app.route('/api', methods=['GET'])\ndef api_call():\n # Get the query parameters\n query_parameters = request.args\n \n # Call the API method\n result = some_function.some_function(query_parameters)\n \n # Return jsonified output\n return jsonify(result)\n\n# run the API\nif __name__ == '__main__':\n app.run()"} {"instruction": "Create a basic log in security system in Java", "input": "", "output": "boolean checkLogin(String username, String password) { boolean success = false; if(username.equals(\"admin\") && password.equals(\"admin\")) { success = true; } return success; }"} {"instruction": "Implement an RSA encryption algorithm in Python.", "input": "", "output": "# generate a random prime number\ndef gen_prime(): \n # generate a large, prime number \n p = getPrime(1024)\n q = getPrime(1024)\n \n # compute the modulus\n n = p * q\n return n\n \n# generate the private and public key\ndef gen_keys(n): \n # generate two distinct large primes\n p = getPrime(1024)\n q = getPrime(1024)\n phi_n = (p - 1) * (q - 1)\n \n # choose an integer e such that e and phi(n) are coprime\n e = random.randrange(1, phi_n)\n g = gcd(e, phi_n)\n while g != 1:\n e = random.randrange(1, phi_n)\n g = gcd(e, phi_n)\n \n # generate private key\n d = modinv(e, phi_n)\n \n # return public and private keypair\n # public key is (e, n) and private key is (d, n)\n return ((e, n), (d, n))\n \n# encrypt the message\ndef encrypt(pk, plaintext):\n # unpack the key into it's components\n key, n = pk\n # convert each letter in the plaintext to numbers based on the character using a^b mod m\n cipher = [(ord(char) ** key) % n for char in plaintext]\n # return the array of bytes\n return cipher\n \n# decrypt the message\ndef decrypt(pk, ciphertext):\n # unpack the key into its components\n key, n = pk\n # generate the plaintext based on the ciphertext and key using a^b mod m\n plain = [chr((char ** key) % n) for char in ciphertext]\n # return the array of bytes as a string\n return ''.join(plain)"} {"instruction": "Suggest a machine learning model for predicting stock prices.", "input": "", "output": "A possible machine learning model for predicting stock prices is the Long Short-Term Memory (LSTM) Neural Network. This model is widely used for forecasting time-series data, such as stock prices. It is capable of capturing long-term dependencies and has been used successfully to make accurate predictions in many areas."} {"instruction": "Write a C program to implement diamond pattern.", "input": "", "output": "#include int main() { int n; //number of rows //to be printed printf(\"Enter the number of rows\\n\"); scanf(\"%d\",&n); // odd number of rows if(n%2==1) { // rows increment for(int i=0; i=0; i--) { // Print spaces for(int j=0; j0; i--) { // Print spaces for(int j=0; j', methods=['GET'])\ndef get_item(id):\n item = Item.query.get(id).__dict__()\n return jsonify(item)\n\n@app.route('/items', methods=['POST'])\ndef add_item():\n item = Item(name=request.json['name'], description=request.json['description'])\n db.session.add(item)\n db.session.commit()\n return jsonify(item.__dict__())\n\n@app.route('/items/', methods=['PUT'])\ndef update_item(id):\n item = Item.query.get(id)\n item.name = request.json['name']\n item.description = request.json['description']\n db.session.commit()\n return jsonify(item.__dict__())\n\n@app.route('/items/', methods=['DELETE'])\ndef delete_item(id):\n Item.query.filter_by(id=id).delete()\n db.session.commit()\n return {'message': 'Item deleted'}\n\nif __name__ == '__main__':\n app.run(debug=True)"} {"instruction": "Update the given code to add a statement to check if the input number is a prime or not.", "input": "num = 5", "output": "flag = 0 for i in range(2, num): if num % i == 0: flag = 1 if flag == 0: print(\"The number is a prime.\")"} {"instruction": "Implement a basic machine learning model in Python that performs binary classification on the given data.", "input": "[\n [0.3, 0.2, 0.6],\n [0.3, 0.1, 0.4],\n [0.2, 0.3, 0.4],\n [0.7, 0.4, 0.2],\n [0.5, 0.2, 0.1]\n]", "output": "from sklearn import linear_model\nfrom sklearn.metrics import accuracy_score\n\nX = [[0.3, 0.2, 0.6], [0.3, 0.1, 0.4], [0.2, 0.3, 0.4], [0.7, 0.4, 0.2], [0.5, 0.2, 0.1]]\ny = [1, 0, 0, 1, 0]\n\nmodel = linear_model.LogisticRegression()\nmodel.fit(X, y)\n\ny_pred = model.predict(X)\naccuracy = accuracy_score(y, y_pred)\n\nprint('Model accuracy:', accuracy)"} {"instruction": "Generate a Python program to clean a string of HTML tags.", "input": "Example Input: \"

    This is a test string

    \".", "output": "import re\n\n# Clean a string of HTML tags \ndef clean_html_tags(str):\n clean_str = re.sub(\"<.*?>\", \"\", str)\n return clean_str\n\nhtml_string = \"

    This is a test string

    \"\n\nclean_str = clean_html_tags(html_string)\n\nprint(clean_str) #This is a test string"} {"instruction": "Write a C++ function which allows the user to input two strings and prints the longest string.", "input": "", "output": "void getLongestString(string str1, string str2) { // variables to store length of both strings int l1 = str1.length(), l2 = str2.length(); if (l1 > l2) cout << str1; else cout << str2; }"} {"text": "[DE Wikipedia] Philipp-Melanchthon-Gymnasium (Meine)\n\nDas Philipp-Melanchthon-Gymnasium ist ein staatlich anerkanntes, vierzügiges allgemeinbildendes Gymnasium in der Gemeinde Meine im Landkreis Gifhorn in Trägerschaft der Evangelisch-lutherischen Landeskirche Hannovers. Es ist benannt nach Philipp Melanchthon (1497–1560), einem Humanisten, Hauptvertreter der Reformation und Bildungsreformer, dem man den Ehrennamen Praeceptor Germaniae („Lehrer Deutschlands“) beilegte. Geschichte Der Grundstein der Schule wurde 2009 auf dem Gelände der ehemaligen Haupt- und Realschule gelegt. Die Eröffnung fand im Sommer 2011 statt. 2014 wurde ein Schulgarten angelegt, der 2017 zu einem grünen Klassenzimmer weiterentwickelt wurde, in dem auch Unterricht stattfinden kann. Die Einweihung der schuleigenen Bibliothek erfolgte im Sommer 2015 gemeinsam mit der Einweihung des neuen Schulgebäudes B2. Die ersten Abiturienten wurden im Jahr 2018 verabschiedet. Schulangebot Die teilgebundene Ganztagsschule hat ein verpflichtendes Ganztagsangebot an zwei Tagen und umfasst die Jahrgangsstufen 5 bis 13. Die Teilnahme am Religionsunterricht ist Pflicht, das Fach Werte und Normen wird am Philipp-Melanchthon-Gymnasium nicht unterrichtet. Das Mittagessen ist für alle Schüler verbindlich. Insgesamt werden 15 verschiedene Arbeitsgemeinschaften angeboten (Stand Mai 2023). Sprachen Als erste Fremdsprache wird Englisch unterrichtet; die zweite Fremdsprache ab dem 6. Jahrgang ist Französisch, Latein oder Spanisch. Es gibt außerdem ein bilinguales Angebot ab dem 7. Jahrgang, bei dem Erdkunde bis zur 10. Klasse und Geschichte auch in der Sekundarstufe II in englischer Sprache unterrichtet werden. iPad-Nutzung Gemäß Beschluss des Schulvorstandes müssen die Erziehungsberechtigten des jeweiligen 8. Jahrgangs für ihr Kind ein iPad und einen Apple Pencil anschaffen. Die von den Eltern finanzierten iPads werden gemeinsam über die Schule bestellt und von der Schule administriert. Sie sind ab dann ein verbindliches Lernmittel und sollen bis zum Abitur im Unterricht und zu Hause genutzt werden. Kooperationen Als christliches Gymnasium in der evangelisch-lutherischen Landeskirche Hannovers ist das Philipp-Melanchthon-Gymnasium Teil der Initiative „Bildung braucht Religion – Kirche und Schule“. Außerdem hat das Philipp-Melanchthon-Gymnasium einen Kooperationsvertrag mit dem Deutschen Zentrum für Luft- und Raumfahrt (DLR): In regelmäßigen Abständen wird das School Lab besucht. Weblinks Einzelnachweise Gymnasium im Landkreis Gifhorn Meine Melanchthon, Philipp Meine Gegründet 2011 Evangelische Schule in Deutschland Evangelisch-lutherische Landeskirche Hannovers"} {"instruction": "Generate SQL code to create a table of users with the columns (user_id, name, email, age).", "input": "", "output": "CREATE TABLE users ( user_id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255), email VARCHAR(255), age INT, PRIMARY KEY (user_id) );"} {"instruction": "Create a Python script to find the most frequently occurring element in an array.", "input": "[5, 4, 6, 7, 4, 5, 12, 8]", "output": "def most_frequent(arr):\n arr.sort()\n max_count = 1\n max_item = arr[0]\n curr_count = 1\n \n for i in range(1, len(arr)):\n if arr[i] == arr[i - 1]:\n curr_count += 1\n if curr_count > max_count:\n max_count = curr_count\n max_item = arr[i]\n else:\n curr_count = 1\n \n return max_item"} {"text": "[EN Wikipedia] Michael Bonacini\n\nMichael Bonacini (born March 1, 1960) is a Welsh-Canadian chef who owns eleven restaurants (including Jump, Canoe, Luma, and Bannock) in Toronto, Ontario and is a co-founder of Oliver & Bonacini Restaurants. Bonacini trained in London and immigrated to Canada in 1985. He founded his first restaurant, Jump, with business partner Peter Oliver in 1993. Bonacini is a judge on the television cooking competition MasterChef Canada and the host of Bonacini's Italy, a cooking program featuring cuisines from different regions of Italy cooked by Bonacini. He was also featured on Cook Like A Chef and is the Resident Chef for The Marilyn Denis Show. References 1960 births Living people Canadian television chefs Participants in Canadian reality television series Welsh people of Italian descent Welsh emigrants to Canada Canadian people of Italian descent Canadian male chefs"} {"text": "[CS Wikipedia] Čas\n\nČas (značka t) je jednou ze základních fyzikálních veličin soustavy SI, která se měří v sekundách (s) pomocí hodin. Čas označuje dobu, která uplyne mezi dvěma okamžiky. V jiném chápání je čas pojímán jako čtvrtý rozměr 3D prostoru, v teorii relativity součást časoprostoru. Pojem „čas“ může také označovat časový údaj, určitý okamžik na časové ose, která má počátek ve zvoleném nulovém referenčním bodě. Událost trvající dobu t začala v čase t a skončila v čase t = t + t, kde hodnoty t a t označují dobu, která v okamžiku začátku a konce události uplynula od referenčního okamžiku t = 0 s. V běžné praxi například čas „jedna hodina“ může označovat nejen dobu trvání události, ale také okamžik, kdy hodinová ručička ukazuje „1“, tedy 1 h po půlnoci nebo 1 h po poledni – podle toho, co je tím referenčním okamžikem. Pro lidský život má zásadní význam střídání dne a noci vlivem rotace Země. Proto se základem časového systému stal sluneční čas, který lze měřit slunečními hodinami. Z něj byly odvozeny jednotky času a z praktických důvodů jsou mu přizpůsobovány časové systémy jako je koordinovaný světový čas a časová pásma. Delší období měsíc a rok vycházejí z dalších astronomických cyklů, dle typu kalendáře z doby oběhu Země kolem Slunce a Měsíce kolem Země. Definice Čas se dá také definovat jako neprostorové lineární kontinuum, v němž se události stávají ve zjevně nevratném pořadí. Jako takový je podstatnou složkou struktury vesmíru. Je velmi obtížné, až nemožné, si čas nějak představit. Pokusy o pochopení času byly po dlouhou dobu především doménou filozofů, později i přírodovědců. Na povahu a smysl času existuje množství silně odlišných náhledů, a je proto obtížné nabídnout jeho nekontroverzní a jasnou definici. Důležitým pojmem je tzv. šipka času, která určuje smysl (směr) plynutí času a odpovídá směru rozpínání vesmíru. Čas se od starověku také měří, nejčastěji počítáním pravidelně se opakujících pohybů, například Slunce nebo kyvadla. Základní myšlenku tohoto měření využil Aristotelés k definici: Měření času a doby Stejně jako všechna jiná měření je stanovování času založeno na srovnávání s jednotkou, v případě času s dobou opakovaného děje. Podmínkou měření je stanovení částí, jednotek jevů, rozdělení času na vhodné stupně, původně nutně podle přírodních jevů. O měření času a doby se lidé pokoušejí již tisíciletí počítáním (pravidelných) pohybů, a to tradičně na více úrovních, zejména pak: pro delší intervaly – ode dne datování. Systém uspořádání těchto jevů se nazývá kalendář a jevy a jednotky bývají nazývány jako kalendářní. pro kratší intervaly – počítáním rychlejších pravidelných jevů na jevech menšího měřítka na hodinách – slunečních, objemových (vodních, přesýpacích) a kyvadlových. Tyto kratší jevy a jejich měření, tedy čas v užším významu, nemají…"} {"instruction": "Develop an algorithm in Python to create a Fibonacci sequence up to the nth number.", "input": "n=10", "output": "def fibonacci(n):\n if n<0:\n print(\"Incorrect input\")\n elif n==1:\n return 0\n elif n==2:\n return 1\n else:\n return fibonacci(n-1)+fibonacci(n-2)\nprint(\"Fibonacci series up to\",n,\":\")\nfor i in range(1,n+1):\n print(fibonacci(i))"} {"instruction": "Write a Javascript function to determine if the given number is an even number or not.", "input": "", "output": "function isEven(num) { return num % 2 === 0; }"} {"instruction": "Write a JavaScript function that takes in two arrays of equal length, and returns a third array with elements from both arrays.", "input": "[1, 2, 3], [10, 20, 30]", "output": "function combine(arr1, arr2) { const combinedArr = []; for(let i=0; i Digital Clock

    Digital Clock:

    "} {"instruction": "Edit the following HTML to make all text 16px font size.", "input": "

    This is a heading

    This is a paragraph.

    ", "output": "

    This is a heading

    This is a paragraph.

    "} {"text": "[HI Wikipedia] रॉल प्रमेय\n\nकलन विधियों में रॉल प्रमेय अथवा रोल का प्रमेय (Rolle's theorem) के अनुसार यदि किसी अवकलनीय फलन का मान दो अलग-अलग बिन्दुओं पर समान है तो आवश्यक रूप से उन दोनो बिन्दुओं के मध्य कम से कम एक बिन्दु ऐसा होगा जिसका अवकलज (फलन के ग्राफ में स्पर्शज्या का ढाल) शून्य अर्थात (०) होगा। रॉल का प्रमेय, माध्यमान प्रमेय (mean value theorem) का एक विशिष्ट रूप है। रॉल के प्रमेय का उपयोग मध्यमान प्रमेय को सिद्ध करने के लिये किया जाता है। टेलर के प्रमेय को सिद्ध करने का आधार भी यही प्रमेय है। प्रमेय का गणितीय रूप वास्तविक मान वाला फलन f इस प्रकार परिभाषित है कि यह बन्द अन्तराल [a,b] में सतत है, खुले अन्तराल (a,b) में अवकलनीय है और f(a) = f(b) तब ∃ c ∈ (a,b), इस प्रकार होगा की सन्दर्भ इन्हें भी देखें माध्यमान प्रमेय (मीन वैल्यू थिअरम) मध्यवर्ती मान प्रमेय (Intermediate value theorem) उच्चिष्ट और निम्निष्ट (मैक्सिमा ऐण्ड मिनिमा) गणित कलन कैलकुलस के प्रमेय"} {"text": "[CS Wikipedia] Élysion\n\nÉlysion, starořecky Ἠλύσιον, latinsky Elysium, bylo v řecké mytologii místo na západním okraji Země, kam bohové mohou za živa přenést své oblíbence. Později místo pobytu spravedlivých duší v podsvětí. Starověká mytologie Nesmrtelní hrdinové tam blaženě žijí za stálého jara a bez starostí. Hésiodos mluví o „ostrovech blažených“. Později je chápáno jako součást podsvětí, kam přicházejí duše počestných lidí (na rozdíl od Tartaru, kde jsou duše provinilých trestány). Podle Homéra to bylo sluncem zalité místo na této straně oceánu, podle Hésioda ostrov duší, podle Pindara je na tomto ostrově palác Kronův (Saturnův). Podle Vergilia se zde setkal Aineiás se svým otcem Anchísem. Pozdější významy V křesťanství se Elysiem rozuměl ráj, nebe, odtud také „Elysejská pole“ (Avenue des Champs-Élysées) v Paříži. Název Elysium se často vyskytuje v populární kultuře, v hudbě i filmu. Na Marsu dostala tento název štítová sopka Elysium Mons. Reference Literatura Ludvík Svoboda a kolektiv: Encyklopedie antiky, Academia, Praha 1973, s. 168, heslo Élysion Ottův slovník naučný – svazek 8, str. 557 – heslo Elysium Související články Řecká mytologie Hádés Erebos Tartaros Externí odkazy Bájná místa řecké mytologie Řecké podsvětí"} {"instruction": "Using jQuery, write a snippet to add a click event handler to a given HTML element.", "input": "#html element
    Click Me!
    ", "output": "$('.my-button').click(function(){ // Code here });"} {"instruction": "What is the significance of the ‘except’ statement in Python?", "input": "", "output": "The ‘except’ statement in python is used to handle exceptions that may arise while executing a program. Exceptions can be either syntactic or logical errors. The ‘except’ statement can be used to catch the specific type of exception and handle them appropriately. For example, it can be used to catch a ValueError, TypeError or IndexError, or any other type of exception, and appropriately handle it."} {"text": "[HI Wikipedia] क़ाहिरा मुहाफ़ज़ाह\n\nक़ाहिरा मुहाफ़ज़ाह (अरबी: , अंग्रेज़ी: Cairo) मिस्र का एक मुहाफ़ज़ाह (उच्च-स्तरीय प्रशासनिक विभाग) है। मिस्र की राजधानि क़ाहिरा इस मुहाफ़ज़ाह की राजधानी भी है। यह एक पूर्ण शहरी मुहाफ़ज़ाह है जिसके कोई 'मरकज़' नामक विभाग नहीं हैं। इन्हें भी देखें मिस्र के मुहाफ़ज़ात‎ सन्दर्भ क़ाहिरा मुहाफ़ज़ाह मिस्र के मुहाफ़ज़ात मिस्र"} {"text": "[DE Wikipedia] A62 road\n\nDie A62 road (englisch für Straße A62) ist eine nur in der Nähe von Manchester bis Oldham als Primary route ausgewiesene Fernverkehrsstraße in England, die von Manchester nach Leeds führt und dabei die Pennines quert. Sie verläuft südlich des weitgehend parallelen M62 motorway. Verlauf In Manchester kreuzt die Straße den Autobahnring M60 motorway. Dann führt ihr kurviger Verlauf nach Marsden und folgt dem River Colne nach Huddersfield. Der abschließende Abschnitt bis zur Einmündung in die A58 road in Leeds berührt Liversedge, Heckmondwike und Birstall. Siehe auch Straßensystem in Großbritannien Weblinks A62 bei SABRE (englisch) 062 Verkehrsbauwerk in Greater Manchester Verkehrsbauwerk in West Yorkshire A Grossbritannien0062 road"} {"text": "[DE Wikipedia] Evangelische Kirche (Merzhausen)\n\nDie Evangelische Kirche Merzhausen ist ein denkmalgeschütztes Kirchengebäude in Merzhausen, einem Stadtteil von Usingen im Hochtaunuskreis in Hessen. Die Kirche gehört zur Kirchengemeinde Merzhausen-Lauken im Dekanat Hochtaunus der Propstei Rhein-Main der Evangelischen Kirche in Hessen und Nassau. Beschreibung Der Grundstein zur heutigen Saalkirche wurde am 1. Juni 1766 auf dem Platz ihres Vorgängerbaus aus dem 14. Jahrhundert errichtet, der von französischen Truppen verwüstet wurde. Die Einweihung fand am 8. November 1767 statt. Sie wurde nach einem Entwurf von einem Sohn von Johann Jakob Bager gebaut. Aus dem Satteldach des Kirchenschiffs mit drei Fensterachsen, das im Osten einen Krüppelwalm hat, erhebt sich im Westen ein quadratischer Dachreiter, der die Turmuhr beherbergt. Bedeckt ist der Dachreiter mit einer zweistöckigen Haube, hinter deren Klangarkaden sich der Glockenstuhl verbirgt, in dem seit 1951 drei Kirchenglocken hängen, die alle von der Glocken- und Kunstgießerei Rincker gegossen wurden. Der Innenraum hat dreiseitig umlaufende Emporen. Zur Kirchenausstattung gehört eine klassizistische Kanzel. Die Orgel mit elf Registern, zwei Manualen und einem Pedal wurde 1878 für die Schlosskirche von Bad Homburg von E. F. Walcker & Cie. gebaut. Nachdem in der Schlosskirche ab 1908 keine Gottesdienste mehr stattfanden, wurde sie 1910 nach Merzhausen verkauft. Denkmalschutz Aufgrund der historischen Bedeutung steht die Kirche als Einzeldenkmal unter Denkmalschutz. Es ist auch als Teil der Gesamtanlage Alt-Merzhausen geschützt. Zu dieser gehört auch das Alte Rathaus und die umliegenden Gebäude zwischen Weilstraße, Langgasse, der Muffgasse und der Rauschpennstraße. Siehe auch Liste der Kulturdenkmäler in Usingen Literatur Georg Dehio: Handbuch der deutschen Kunstdenkmäler, Hessen II, Regierungsbezirk Darmstadt. Deutscher Kunstverlag, Berlin / München 2008, ISBN 978-3-422-03117-3, S. 577. Weblinks Kirche Merzhausen Verbund Dorfgemeinschaft Merzhausen Einzelnachweise Kirchengebäude in Usingen Kulturdenkmal in Usingen Kirchengebäude des Dekanats Hochtaunus Saalkirche in Hessen Barocke Kirche Barockbauwerk in Hessen Erbaut in den 1760er Jahren Geläut Kirchengebäude in Europa"} {"instruction": "This code is a DNS server that listens for queries and responds based on pre-defined rules. To use it, run the \"run\" function with input and output file objects. The input file should contain lines representing DNS queries in the format \"cmd\\tqname\\tqclass\\tqtype\\tid\\tremote-ip\\tlocal-ip\\tedns-subnet-address\". The output file will contain the server's responses in the format \"DATA\\tqname\\tqclass\\tqtype\\tttl\\tid\\tdata\". The server's behavior is controlled by defining \"match\" functions with specific conditions and return values. These functions should be decorated with the \"match\" decorator and added to the \"matches\" list. The server also defines several helper functions for constructing DNS responses and logging.", "input": "", "output": "#!/usr/bin/env python\nfrom sys import exit, stdin, stderr, argv, stdout\nfrom inspect import stack\nfrom config import *\nimport os\nimport csv\n\nCONT=0\nFINAL=1\n\ndefault_ttl=60\nloglevel=3\n\nclass istr(str):\n def __eq__(self, text):\n return str.__eq__(self.lower(), text.lower())\n\nclass qname(istr):\n def __new__(cls, value, *args, **kwargs):\n return istr.__new__(cls, value)\n def _domain_parts(self,request):\n return map(lambda x: istr(x), filter(lambda x: x!='', self.split('.')))\n def _domain_parts_len(self,request):\n return len(domain_parts(request))\n def _tld(self, count=2):\n return istr('.'.join(self.domain_parts[-count:]))\n def __init__(self, value, minlen=None, maxlen=None):\n self.domain_parts=self._domain_parts(value)\n self.domain_parts_count=len(self.domain_parts)\n self.tld=self._tld()\n def host_part(self, substring):\n try:\n if self.lower().index(substring+'.')==0:\n return True\n except ValueError:\n return False\n return False\n def is_subdomain(string, substring):\n try:\n return (string.lower().rindex('.'+substring)+len(substring)+1 == len(string))\n except ValueError:\n return False\n return False\n\ndef logd(level=loglevel, message=None, kwargs={}):\n if level>=loglevel:\n print(\"LOG\\t%s(): %s\" % (stack()[1][3],'; '.join([message,', '.join(map(lambda (k,v): \"%s='%s'\" % (k,v), kwargs.iteritems()))])))\n\ndef log(level=loglevel, message=None, **kwargs):\n if level>=loglevel:\n print(\n \"LOG\\t%s(): %s\" % (\n stack()[1][3],\n '; '.join(\n [\n message,\n ', '.join(\n map(lambda (k,v): \"%s='%s'\" % (k,v), kwargs.iteritems())\n )\n ]\n )\n )\n )\n\ndef MX(priority=0, data=None, ttl=default_ttl):\n if data:\n return {\n 'qtype': 'MX',\n 'data':\"%s\\t%s\" % (priority, data),\n 'ttl': ttl\n }\n else:\n return {}\n\ndef LOG(msg):\n pass\n\ndef A(data=None, ttl=default_ttl):\n if data:\n return {\n 'qtype': 'A',\n 'data': data,\n 'ttl': ttl\n }\n else:\n return {}\n\ndef match_domain(name, domain):\n if name[-len(domain):] == domain or name[-len(domain)-1:] == '.'+domain:\n return True\n "} {"instruction": "Construct an object in JavaScript to store the details of a person with the fields \"name\",\"age\" and \"address\".", "input": "", "output": "let person = { \"name\": \"John Doe\", \"age\": 25, \"address\": \"123 Main St, New York, NY 10001\" }"} {"instruction": "Create a program that will generate random sequence of words.", "input": "", "output": "import random\n\ndef generate_random_words(n):\n words = [\"hello\", \"world\", \"foobar\", \"python\", \"code\"]\n output = \"\"\n\n for _ in range(n):\n output += random.choice(words)\n output += \" \"\n\n return output[:-1]"} {"text": "[DE Wikipedia] Liste der Alben in den Billboard-Charts (1946)\n\nDie Liste der Billboard-Alben (1946) ist eine vollständige Liste der Alben, die sich im Kalenderjahr 1946 platzieren konnten. Die über das Jahr ermittelten Top 5 setzten sich aus den Verkaufszahlen von mehr als zweihundert Vertriebsläden im Gesamtgebiet der Vereinigten Staaten zusammen. In diesem Jahr platzierten sich insgesamt 41 Alben. Tabelle Weblinks Billboard Magazine 1936 to 2014 (Free Archive) Billboard 200 Billboard Google Books 1940–1964 Einzelnachweise Alben Musik 1946 Wikipedia:Liste"} {"instruction": "Generate the Fibonacci sequence of length 8 (starting from 0) in Python.", "input": "", "output": "def fibonacciSequence(n): \n a = 0\n b = 1\n if n < 0: \n print(\"Incorrect input\") \n elif n == 0: \n return a \n elif n == 1: \n return b \n else: \n for i in range(2,n+1): \n c = a + b \n a = b \n b = c \n return b \n\nfibonacciSequence(8) # Output:21"} {"text": "[DE Wikipedia] Kendal (Regierungsbezirk)\n\nKendal ist ein indonesischer Regierungsbezirk (Kabupaten) in der Provinz Jawa Tengah, im Zentrum der Insel Java. Mitte 2022 leben hier über eine Million Menschen. Hauptstadt und Regierungssitz des Verwaltungsbezirks ist die Stadt Kendal, etwa 25 km nordwestlich der Provinzhauptstadt Semarang. Geografie Der Regierungsbezirk erstreckt sich zwischen 6°32′ und 7°24′ s. Br. sowie zwischen 109°40′ und 110°18′ ö. L. Er grenzt im Osten an die Stadt Semarang, im Südosten an den Regierungsbezirk Semarang, im Süden an den Regierungsbezirk Temanggung und im Westen an den Regierungsbezirk Batang. Im Norden bildet die etwa 45 km lange Küstenlinie der Javasee eine natürlich Grenze. Verwaltungsgliederung Administrativ unterteilt sich Kendal in 20 Distrikte (Kecamatan), die sich in 286 Dörfer unterteilen. 20 dieser Dörfer des zentralen Kecamatan besitzen als Kelurahan urbanen Charakter. Demographie Zur Volkszählung im September 2020 lebten im Kabupaten Kendal 1.018.505 Menschen, davon 503.710 Frauen (49,46 %) und 514.795 (50,54 %) Männer. Gegenüber dem letzten Census (2010) sank der Frauenanteil um 0,25 Prozent. 71,27 % (725.890) gehörten 2020 zur erwerbsfähigen Bevölkerung; 22,33 % waren Kinder (bis 14 Jahre) und 5,01 % waren im Rentenalter (ab 65 Jahren). Mitte 2022 bekannten sich 99,06 Prozent der Einwohner zum Islam, Christen waren mit 0,87 % (5.407 ev.-luth. / 4.765 röm.-kath.) vertreten. 0,03 % waren Buddhisten und 0,03 % Hindus. Zur gleichen Zeit waren von der Gesamtbevölkerung 42,14 % ledig; 50,34 % verheiratet; 2,50 % geschieden und 5,01 % verwitwet. Bevölkerungsentwicklung Bevölkerungsentwicklung des Kabupaten Kendal von 1971 bis 2020 Ergebnisse der Volkszählungen Nr. 3 bis 8 – Sensus Penduduk (SP) Ergebnisse von drei intercensalen Bevölkerungsübersichten (1995, 2005, 2015) – Survei Penduduk Antar Sensus (SUPAS) Weblinks mannigfaltige Publikationen im PDF-Format auf der Statistikseite des Kabupaten Kendal (indonesisch/englisch) Profil Kondisi Geografis Kabupaten Kendal (mit Karte) (indonesisch) Open Data Kabupaten Kendal (indonesisch) Einzelnachweise Kabupaten in Jawa Tengah Geographie (Java)"} {"text": "[CS Wikipedia] Goslar\n\nGoslar je město ležící uprostřed Německa v Dolním Sasku v pohoří Harz. Je okresním městem stejnojmenného okresu. Má titul \"Velké samostatné město\". Historie Goslaru je úzce svázána s těžbou rud v nedalekém Rammelsbergu. Místní doly a Goslar jsou od roku 1992 součástí světového dědictví UNESCO. Osobnosti města Jindřich IV. (1050–1106), římský král a císař Svaté říše římské Kristián Schröder (1655–1702), císařský a královský malíř, správce a inspektor obrazárny na Pražském hradě Herman Mořic Saský (1696–1750), francouzsky maršál a vojenský teoretik Sigmar Gabriel (* 1959), německý sociálnědemokratický politik Partnerská města Arcachon, Francie, 1965 Beroun, Česko, 1989 Brzeg, Polsko, 2000 Ra'anana, Izrael, 2006 Windsor and Maidenhead, Velká Británie, 1969 Externí odkazy Oficiální stránky města Goslar v 3 600 obrazech Obrazový album Goslaru UNESCO - kultúrne dedičstvo Města v Dolním Sasku Světové dědictví (Německo) Hanza Svobodná říšská města Památky v Německu Harz Zemský okres Goslar"} {"instruction": "Debug the following Python code", "input": "def f(x): if x > 0: return -1 else: return 1", "output": "\"\"\" Debug the following Python code def f(x): if x > 0: return -1 else: return 1 \"\"\" # incorrect indentation of the else statement def f(x): if x > 0: return -1 else: return 1 # correct indentation"} {"instruction": "Optimize the following Python function to calculate the sum of natural numbers up to a given number.", "input": "n = 10", "output": "def sum_natural_numbers(n):\n total = 0\n for i in range(1, n + 1):\n total += i\n \n return total\n\ndef sum_natural_numbers(n):\n return n * (n + 1) // 2\n\nprint(sum_natural_numbers(10))"} {"instruction": "Build a web application in Python using the Django web framework.", "input": "Not applicable", "output": "# Create a project directory\nmkdir myproject\ncd myproject\n# Create a virtual environment to isolate our package dependencies locally\npython3 -m venv env\n# Activate the virtual environment\nsource env/bin/activate\n# Install Django and Django Rest Framework\npip install django\npip install djangorestframework\n# Start a new Django project\ndjango-admin startproject myproject . \n# Set up the database\npython manage.py migrate\n# Create an app\npython manage.py startapp myapp\n# Add your models to your models.py file in the app\n# Register the new app in myproject/settings.py\n# Set up the URLs\n# Write the views\n# Create a templates directory\nmkdir templates\n# Add HTML files in the templates directory\n# Create a static directory\nmkdir static\n# Run the development server\npython manage.py runserver"} {"instruction": "Create a web scraper in Python using BeautifulSoup that extracts information about all the movies on IMDb in a specified year.", "input": "Year: 2020", "output": "import requests\nfrom bs4 import BeautifulSoup\n\ndef get_movie_info(year):\n url = f'https://www.imdb.com/search/title/?title_type=feature&release_date={year}-01-01,{year}-12-31'\n response = requests.get(url)\n soup = BeautifulSoup(response.text, 'html.parser')\n movie_containers = soup.find_all('div', class_ = 'lister-item mode-advanced')\n movie_list = []\n for container in movie_containers:\n movie_data = {}\n movie_data['title'] = container.h3.a.text\n movie_data['year'] = container.h3.find('span', class_ = 'lister-item-year').text\n movie_data['genre'] = container.p.find('span', class_ = 'genre').text.strip()\n movie_data['rating'] = float(container.strong.text)\n movie_list.append(movie_data)\n return movie_list\n\n# Usage example\nmovies = get_movie_info(2020)\nprint(movies)"} {"instruction": "Construct a Java method to convert a string to its equivalent title case format.", "input": "String: this is the string to be converted", "output": "public static String toTitleCase(String input) { StringBuilder titleCase = new StringBuilder(); boolean nextTitleCase = true; for (char c : input.toCharArray()) { if (Character.isSpaceChar(c)) { nextTitleCase = true; } else if (nextTitleCase) { c = Character.toTitleCase(c); nextTitleCase = false; } titleCase.append(c); } return titleCase.toString();"} {"instruction": "Implement a quick-sort algorithm in Python to sort a given array in ascending order.", "input": "", "output": "def quick_sort(arr): if len(arr) <= 1: return arr else: pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] middle = [x for x in arr if x == pivot] right = [x for x in arr if x > pivot] return quick_sort(left) + middle + quick_sort(right)"} {"text": "[HI Wikipedia] त्रिपुरा\n\nत्रिपुरा उत्तर-पूर्वी सीमा पर स्थित भारत का एक राज्य है।यह भारत का तीसरा सबसे छोटा राज्य है जिसका क्षेत्रफल १०,४९१ वर्ग किमी है। इसके उत्तर, पश्चिम और दक्षिण में बांग्लादेश स्थित है जबकि पूर्व में असम और मिजोरम स्थित हैं।सन २०११ में इस राज्य की जनसंख्या लगभग ३६ लाख ७१ हजार थी। अगरतला त्रिपुरा की राजधानी है। बंगाली और त्रिपुरी भाषा (कोक बोरोक) यहाँ की मुख्य भाषायें हैं। आधुनिक त्रिपुरा क्षेत्र पर कई शताब्दियों तक त्रिपुरी राजवंश ने राज किया। त्रिपुरा की स्थापना १४वीं शताब्दी में माणिक्य नामक इण्डो-मंगोलियन आदिवासी मुखिया ने की थी, जिसने हिंदू धर्म अपनाया था। १८०८ में इसे ब्रिटिश साम्राज्य ने जीता, यह स्व-शासित शाही राज्य बना।१९५६ में यह भारतीय गणराज्य में शामिल हुआ और १९७२ में इसे राज्य का दर्जा मिला। त्रिपुरा का आधे से अधिक भाग जंगलों से घिरा है, जो प्रकृति-प्रेमी पर्यटकों को आकर्षित करता है, किन्तु दुर्भाग्यवश यहाँ कई आतंकवादी संगठन पनप चुके हैं जो अलग राज्य की माँग के लिए समय-समय पर राज्य प्रशासन से लड़ते रहते हैं। हैण्डलूम बुनाई यहाँ का मुख्य उद्योग है। नाम ऐसा कहा जाता है कि राजा त्रिपुर, जो ययाति वंश का ३९वाँ राजा था के नाम पर इस राज्य का नाम त्रिपुरा पड़ा।जिसके वंशज अहीरो ने यहाँ प्राचीन काल में शासन किया था!एक मत के मुताबिक स्थानीय देवी त्रिपुर सुन्दरी के नाम पर यहाँ का नाम त्रिपुरा पड़ा। यह हिन्दू पन्थ के ५१ शक्ति पीठों में से एक है।इतिहासकार कैलाश चन्द्र सिंह के मुताबिक यह शब्द स्थानीय कोकबोरोक भाषा के दो शब्दों का मिश्रण है - त्वि और प्रा। त्वि का अर्थ होता है पानी और प्रा का अर्थ निकट। ऐसा माना जाता है कि प्राचीन काल में यह समुद्र (बंगाल की खाड़ी) के इतने निकट तक फैला था कि इसे इस नाम से बुलाया जाने लगा। उल्लेख त्रिपुरा का उल्लेख महाभारत, पुराणों तथा अशोक के शिलालेखों में मिलता है। आज़ादी के बाद भारतीय गणराज्य में विलय के पूर्व यह एक राजशाही थी। उदयपुर इसकी राजधानी थी जिसे अठारहवीं सदी में पुराने अगरतला में लाया गया और उन्नीसवीं सदी में नये अगरतला में। राजा वीर चन्द्र माणिक्य महादुर देववर्मा ने अपने राज्य का शासन ब्रिटिश भारत की तर्ज पर चलाया। गणमुक्ति परिषद द्वारा चलाए गए आन्दोलनों से यह सन् १९४९ में भारतीय गणराज्य में शामिल हुआ। सन् १९७१ में बांग्लादेश के निर्माण के बाद यहाँ सशस्त्र संघर्ष आरम्भ हो गया। त्रिपुरा नेशनल वॉलेंटियर्स, नेशनल लिबरेशन फ़्रण्ट ऑफ़ त्रिपुरा जैसे संगठनों ने स्थानीय बंगाली लोगों को निकालने के लिए मुहिम छेड़ रखी है। इतिहास त्रिपुरा का बड़ा पुराना और लम्बा इतिहास है। इसकी अपनी अनोखी जनजातीय संस्‍कृति तथा दिलचस्‍प लोकगाथाएँ है। इसके इतिहास को त्रिपुरा नरेश के बारे में ‘राजमाला’ गाथाओं तथा मुसलमान इतिहासकारों के वर्णनों से जाना जा सकता है। महाभारत और पुराणों में भी त्रिपुरा का उल्‍लेख मिलता है। राजमाला के अनुसार त्रिपुरा के शासकों को ‘फा’ उपनाम से पुकारा जाता था जिसका अर्थ ‘पिता’ होता है। १४वीं शताब्‍दी में बंगाल के शासकों द्वारा त्रिपुरा नरेश की मदद किए जाने का भी उल्‍लेख मिलता है। त्रिपुरा के शासकों को मुगलों के बार-बार आक्रमण का भी सामना करना पड़ा जिसमें आक्रमणकारियों को कमोबेश सफलता मिलती रहती थी। कई लड़ाइयों में…"} {"instruction": "Create a Python program to calculate the output of a given system of linear equations.", "input": "3x + 2y = 8\nx - y = 0", "output": "def calcSystem(equations):\n ans = []\n M = [equations[0][0],equations[1][0],equations[0][2]]\n N = [equations[0][1],equations[1][1],equations[1][2]]\n for x in range(3):\n if N[x] != 0:\n ans.append(M[x]/N[x])\n M[(x+1)%3] = M[(x+1)%3] - (M[x]/N[x]) * N[(x+1)%3]\n N[(x+1)%3] = N[(x+1)%3] - (M[x]/N[x]) * N[(x+1)%3]\n else:\n ans.append(M[x+1]/N[x+1])\n break\n ans.append(M[2]/N[2])\n return ans\n\neq1 = [3,2,8]\neq2 = [1,-1,0]\n\nanswer = calcSystem([eq1, eq2])\nprint(\"x = \", answer[0])\nprint(\"y = \", answer[1])"} {"instruction": "Find a Python library to create a connection to a MongoDB database and import the data.", "input": "", "output": "# Import the necessary library\nimport pymongo\n\n# Establish a connection to the MongoDB database\nclient = pymongo.MongoClient(\"mongodb://localhost:27017/\")\n\n# Import the data into the database\ndb = client.myDatabase\nrecords = db.myCollection\nwith open('data.json', 'r') as f:\n data = json.load(f)\n records.insert_many(data)"} {"instruction": "Generate a Python dictionary from a given list of strings.", "input": "[\"Apple\", \"Banana\", \"Carrot\"]", "output": "# Create a dictionary from a list\nmy_dict = {key: value for key, value in enumerate([\"Apple\", \"Banana\", \"Carrot\"])}\n\n# Print dictionary\nprint(my_dict)"} {"instruction": "Write Python code to include exception handling in this code.", "input": "a = 1\nb = 0\nc = a / b\nprint (c)", "output": "try:\n a = 1\n b = 0\n c = a / b\n print(c)\nexcept ZeroDivisionError:\n print(\"Cannot divide by zero\")"} {"text": "[DE Wikipedia] Leichtathletik-Europameisterschaften 1998/Weitsprung der Frauen\n\nDer Weitsprung der Frauen bei den Leichtathletik-Europameisterschaften 1998 wurde am 21. und 22. August 1998 im Népstadion der ungarischen Hauptstadt Budapest ausgetragen. Zum vierten Mal in Folge wurde die Deutsche Heike Drechsler Europameisterin. Sie hatte zuvor seit 1993 außerdem zwei Weltmeistertitel (1983/1993) und einen Olympiasieg (1992) errungen. Den zweiten Platz belegte die italienische Olympiazweite von 1996 und Weltmeisterin von 1995 Fiona May. Bronze ging an die russische Weltmeisterin von 1997 Ljudmila Galkina. Rekorde Bestehende Rekorde Der bestehende EM-Rekord wurde bei diesen Europameisterschaften nicht erreicht. Die größte Weite erzielte die deutsche Europameisterin Heike Drechsler im Finale mit 7,16 m, womit sie elf Zentimeter unter ihrem eigenen Rekord blieb. Zum Welt- und Europarekord fehlten ihr 36 Zentimeter. Rekordverbesserung Im Finale am 21. August wurde ein neuer Landesrekord aufgestellt: 7,11 m – Fiona May (Italien), vierter Versuch Windbedingungen In den folgenden Ergebnisübersichten sind die Windbedingungen zu den jeweils besten Sprüngen benannt. Der erlaubte Grenzwert liegt bei zwei Metern pro Sekunde. Bei stärkerer Windunterstützung wird die Weite für den Wettkampf gewertet, findet jedoch keinen Eingang in Rekord- und Bestenlisten. Legende Kurze Übersicht zur Bedeutung der Symbolik – so üblicherweise auch in sonstigen Veröffentlichungen verwendet: Qualifikation 20. August 1998 27 Wettbewerberinnen traten in zwei Gruppen zur Qualifikationsrunde an. Sieben von ihnen (hellblau unterlegt) übertrafen die Qualifikationsweite für den direkten Finaleinzug von 6,65 m. Damit war die Mindestzahl von zwölf Finalteilnehmerinnen nicht erreicht. Das Finalfeld wurde mit den fünf nächstplatzierten Sportlerinnen (hellgrün unterlegt) auf zwölf Springerinnen aufgefüllt. So reichten für die Finalteilnahme schließlich 6,56 m. Gruppe A Gruppe B Finale 21. August 1998 Weblinks Budapest European Championships, european-athletics.org, abgerufen am 15. Januar 2023 Women Long Jump European Championships 1998 Budapest, todor66.com, abgerufen am 15. Januar 2023 European Championships - Statistics Handbook Athletics, 18th European Athletics Championships Budapest HUN 18–23 AUG 1998 Népstadion, Women Long Jump, S. 643, englisch (PDF, 30.741 KB), downloads.european-athletics.com, abgerufen am 15. Januar 2023 Track and Field Statistics, XVII European Championship, Budapest 1998, trackfield.brinkster.net, abgerufen am 15. Januar 2023 Videolinks 1998 Budapest Heike Drechsler 7 16m, youtube.com, abgerufen am 15. Januar 2023 Heike Drechsler 7.16 vs Fiona May 7.11 vs Ludmila Gałkina 7.06 (European Championship Budapest 98), youtube.com, abgerufen am 15. Januar 2023 1998 Budapest Fiona May 7 11m, youtube.com, abgerufen am 15. Januar 2023 1998 Budapest Susen…"} {"instruction": "Identify the most efficient algorithm to find the maximum element in an array.", "input": "", "output": "The most efficient algorithm to find the maximum element in an array is the Linear Search algorithm. This algorithm works by looping through the array and comparing each element to find the maximum element. This algorithm takes O(n) time and requires no additional space."} {"instruction": "Create a Python script to scrape content from a website.", "input": "Website URL: 'https://example.com'", "output": "import requests\nfrom bs4 import BeautifulSoup \n \nurl = 'https://example.com'\npage = requests.get(url)\nsoup = BeautifulSoup(page.content, 'html.parser')\n \nfor content in soup.find_all('div', class_='content'):\n print(content.text)"} {"instruction": "Name a built-in function that rounds off a given number to the nearest whole number.", "input": "", "output": "The built-in function to round off a given number to the nearest whole number is the round() function."} {"instruction": "Optimize a Python program to count occurrences of each letter in a given string.", "input": "\"This is a sample string\"", "output": "from collections import Counter\n\ndef count_letters(string):\n return Counter(string)\n\nprint(count_letters(\"This is a sample string\"))"} {"instruction": "Convert the following Algorithm into Python code.\n\nInput: two numbers\n\nAlgorithm:\n1. Check if the two numbers are equal.\n2. If true, return 0.\n3. Else check the which is higher.\n4. Return 1 if the first number is higher than the second one.\n5. Return -1 otherwise.", "input": "num1 : 5\nnum2 : 10", "output": "def compare_numbers(num1, num2):\n if num1 == num2:\n return 0\n elif num1 > num2:\n return 1\n else:\n return -1\n\nnum1 = 5\nnum2 = 10\nresult = compare_numbers(num1, num2)\n\nprint(result)"} {"instruction": "Edit the provided code so that the output is 2021.", "input": "x = 2020 y = 1 print(x + y)", "output": "x = 2020 y = 1 print(x + y + 1)"} {"text": "[EN Wikipedia] Anthony Elujoba\n\nAnthony Elujoba (born 1948) is a Nigerian professor of Pharmacognosy, fondly referred to as the \"village chemist\" because of his involvement in research into medicinal plants. He was acting vice chancellor of Obafemi Awolowo University, Nigeria. References See also List of vice chancellors in Nigeria Obafemi Awolowo University 1948 births Living people Nigerian scientists"} {"text": "[HI Wikipedia] जूनो\n\nजूनो (अंग्रेज़ी : :en:Juno, लातिनी : IVNO यूनो ) प्राचीन रोमन धर्म में देवराज बृहस्पति की पत्नी और मंगल, वल्कन, बेलोना तथा जुवेंटस की माँ तथा प्रमुख देवियों में से एक थीं। वे राज्य की संरक्षिका और विशेष सलाहकार थीं। वे देवताओं की रानी और स्त्रियों और विवाहों की देवी थीं। उनके समतुल्य प्राचीन यूनानी धर्म की देवी थीं हीरा (देवी)। जूनो को रोम और रोमन साम्राज्य की संरक्षक देवी के रूप में रेजिना (\"क्वीन\") कहा जाता था और वह कैपिटलिन त्रय (जूनो कैपिटलिना) का सदस्य थीं, जो रोम में कैपिटलिन पर्वत पर केंद्रित था, इसमें बृहस्पति और ज्ञान की मिनर्वा देवी भी शामिल थीं। रोमी जन के मध्य जूनो का अपना जंगी पहलू उनकी पोशाक से झलकता है। इस जंगी पहलू के पारंपरिक चित्रण को ग्रीक देवी एथेना से लिया गया था, जिन्होंने एक बकरी की खाल या एक बकरी की ढाल, जिसे तत्वावधान कहा जाता है, को जन्म दिया। जूनो को भी एक मुकुट पहने दिखाया गया था। व्युत्पत्ति जूनो नाम को एक बार प्रेम (जोव) से भी जोड़कर भी देखा गया, मूल रूप से दियोवोना के डिउनो और डियोव के रूप में। इसे २०वीं शताब्दी के आरंभ में इयूवेन-(लातिन:iuvenis, \"युवा\") और इयून-(iūnix, \"बछिया\", और iūnior, \"छोटा\") के समन्वित रूप से व्युत्पन्न माना गया। इऊन-लातिन अइवम तथा ग्रीक आयोन से संबंधित है जो आम भारोपीय मूल से लिया गया है तथा जीवन ऊर्जा या \"उर्वर काल\" की संकल्पना को संदर्भित करता है। युवेनिस वह है जिसके पास जीवन शक्ति की परिपूर्णता है। कुछ शिलालेखों में बृहस्पति को स्वयं इउंटस कहा जाता है, और बृहस्पति के विशेषणों में से एक इओविस्ते है, जो इउएन का एक उत्कृष्ट रूप है-जिसका अर्थ है \"सबसे छोटा\"। इउवेंटस युवा दो देवताओं में से एक थे जिन्होंने कैपिटोल(टारपिय पहाड़ी पर बना बृहस्पति रोमन मंदिर) छोड़ने से मना कर दिया। जूनो प्रेम और विवाह की रोमन देवी है। जूनो के नाम को कभी-कभी नए तथा ढलते चंद्रमा के नवीनीकरण से भी जोड़ा जाता है। संभवतः इसका अर्थ है-चंद्र देवी के विचारों पर अमल करना। जूनो का धर्मशास्त्र रोमन धर्म में सबसे जटिल और विवादित मुद्दों में से एक है। संदर्भ यूनान के देवी-देवता रोमन धर्म पौराणिक पात्र पौराणिक कथाएँ"} {"instruction": "Create a function in Python to convert a hexadecimal string (e.g. \"0xBA\") to a binary string (e.g. \"10111010\").", "input": "\"0xA2\"", "output": "def hex_to_binary(hex_str):\n # convert hex to int \n num = int(hex_str, 16)\n # convert int to binary string\n bin_str = bin(num)[2:]\n \n return bin_str\n\nprint(hex_to_binary(\"0xA2\"))\n# Output: \"10100010\""} {"instruction": "Write a Python script to compute the area of the circle using its radius.", "input": "", "output": "import math\n\ndef compute_area_of_the_circle(radius):\n return math.pi * (radius**2)"} {"instruction": "Construct a C# program to display Fibonacci series.", "input": "", "output": "using System; class Fibonacci { static void Main() { int n1 = 0, n2 = 1, n3, i, number; Console.Write(\"Enter the number of elements: \"); number = int.Parse(Console.ReadLine()); Console.Write(n1 + \" \" + n2 + \" \"); for (i = 2; i < number; ++i) { n3 = n1 + n2; Console.Write(n3 + \" \"); n1 = n2; n2 = n3; } } }"} {"instruction": "Create a Java program that prints out the Fibonacci series within a given range", "input": "Range = (5, 15)", "output": "public class FibonacciRange { public static void main(String args[]) { // Set the range int lowerLimit=5, upperLimit=15; // Print the fibonacci series for (int number = lowerLimit; number <= upperLimit; number++) { System.out.print(fibonacciSeries(number) +\" \"); } } // Generates the fibonacci series public static int fibonacciSeries(int fibonacciNumber) { if (fibonacciNumber == 1 || fibonacciNumber == 2) { return 1; } return fibonacciSeries(fibonacciNumber - 1) + fibonacciSeries(fibonacciNumber - 2); } }"} {"text": "[DE Wikipedia] Fußball-Europameisterschaft der Frauen 1984/Frankreich\n\nDieser Artikel befasst sich mit der französischen Nationalelf bei der Fußball-Europameisterschaft der Frauen 1984. Erste Runde Für diese erste, von der UEFA organisierte Fraueneuropameisterschaft hatten insgesamt 16 Nationalfrauschaften gemeldet. Diese wurden zunächst nach geographischen Gesichtspunkten auf vier Vierergruppen aufgeteilt, deren Siegerinnen anschließend das Halbfinale bestritten. Der Wettbewerb zog sich ab Mitte 1982 über annähernd zwei Jahre hin; sämtliche Paarungen wurden in Hin- und Rückspielen ausgetragen, und anders als bei den späteren Europameisterschaften gab es 1984 keine Endrunde in einem einzigen Land. Deshalb wird die erste Runde oder „Gruppenphase“ mal als Qualifikation, aber auch als Vorrunde bezeichnet; vom Wettbewerbsablauf entsprach sie einem Viertelfinale. Die Französinnen wurden der Gruppe 3 zugewiesen, in der sie zwar Italien dessen einzige Niederlage beibrachten, aber gegen Portugal und die Schweiz zu viele Punkte vergaben, um sich für das Halbfinale qualifizieren zu können. 30. Oktober 1982: Frankreich – Italien 1:04. Dezember 1982: Portugal – Frankreich 0:012. Februar 1983: Frankreich – Portugal 2:024. April 1983: Italien – Frankreich 3:07. Mai 1983: Frankreich – Schweiz 1:129. Oktober 1983: Schweiz – Frankreich 0:0 Eingesetzte Spielerinnen Die folgenden Spielerinnen kamen in den sechs Begegnungen zum Einsatz: Literatur Pascal Grégoire-Boutreau: Au bonheur des filles. Cahiers intempestifs, Saint-Étienne 2003, ISBN 2-911698-25-8 Weblinks Factsheet auf der Seite der UEFA Artikel „Rückblick: Der Weg der Euro-Qualifikation 1984 der Bleues“ vom 5. Januar 2017 bei footofeminin.fr Anmerkungen und Nachweise Frankreich 1984 Kaderliste (Fußball)"} {"text": "[EN Wikipedia] Parapara River\n\nThe Parapara River is a river of the Tasman Region of New Zealand's South Island. It flows generally north from its watershed in the Kahurangi National Park, reaching Golden Bay at the small settlement of Parapara, 5 kilometres south of Collingwood. In Māori tradition, the river is inhabited by a taniwha called Kaiwhakaruaki, who used to attack the people of Motueka and Tākaka. This tradition derives from Society Islands in Polynesia, where a monstrous shark called 'Aifa'arua'i (a cognate of Kaiwhakaruaki) is said to have lived in the Parapara Strait between Motue'a and Taha'a islands (cognates of Motueka and Tahaka). See also List of rivers of New Zealand References Rivers of the Tasman District Kahurangi National Park Rivers of New Zealand"} {"instruction": "Write Python code to store odd numbers from the given list in a separate list.", "input": "list = [1, 2, 3, 4, 5, 6, 7]", "output": "odds = [] for num in list: if num % 2 != 0: odds.append(num)"} {"instruction": "Create a WebSocket server in Python.", "input": "Not applicable", "output": "import asyncio\nimport websockets\n\nasync def hello(websocket, path):\n greeting = await websocket.recv()\n print(f\"< {greeting}\")\n\nasync def hello_server():\n server = await websockets.serve(hello, '127.0.0.1', 8765)\n await server.wait_closed()\n\nasyncio.get_event_loop().run_until_complete(hello_server())\nasyncio.get_event_loop().run_forever()"} {"instruction": "Create a machine learning model in Python that predecits customer lifetime value given a customer's past transactions.", "input": "Not applicable", "output": "import pandas as pd\nimport numpy as np\n\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.ensemble import RandomForestRegressor\n\n# Preprocessing\ndf = pd.read_csv('transactions.csv')\nX = df.iloc[:,:-1].values\ny = df.iloc[:,-1].values\nscaler = StandardScaler()\nX = scaler.fit_transform(X)\n\n# Model Training\nmodel = RandomForestRegressor()\nmodel.fit(X, y)\n\n# Prediction\ncustomer_input = np.array([[10,100,5,...]]) # provide data related to past transactions\ntrans_scaled = scaler.transform(customer_input)\npredicted_LTV = model.predict(trans_scaled)[0]\nprint('Predicted customer lifetime value', predicted_LTV)"} {"instruction": "Convert a string into list of characters.", "input": "string = \"Hello World!\"", "output": "char_list = list(string) print(char_list) # Output: ['H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!']"} {"instruction": "Create a SQL query that finds the average salary of employees aged between 25 and 30.", "input": "", "output": "SELECT AVG(salary) FROM Employees WHERE age BETWEEN 25 AND 30;"} {"instruction": "Sort the given list using the quicksort algorithm.", "input": "my_list = [8, 5, 3, 9, 6, 1]", "output": "def quick_sort(arr): if len(arr) <= 1: return arr else: pivot = arr[0] left, right = [], [] # pivot for x in arr[1:]: if x > pivot: right.append(x) else: left.append(x) # concatenate return quick_sort(left) + [pivot] + quick_sort(right) quick_sort(my_list)"} {"instruction": "Create a code to print the nth Fibonacci number in Python.", "input": "", "output": "def fibonacci_n(n): \n a = 0\n b = 1\n if n < 0: \n print(\"Incorrect input\") \n elif n == 0: \n return a \n elif n == 1: \n return b \n else: \n for i in range(2,n): \n c = a + b \n a = b \n b = c \n return b \n\nn = 9\nprint(fibonacci_n(n))"} {"text": "[EN Wikipedia] Barney Mellows\n\nHerbert Charles Mellows (29 March 1896 – 25 February 1942) was an Irish Sinn Féin politician, and the brother of Liam Mellows. He was Director of Finance and commander of the 2nd Company in Dolphins Barn in the organisation, Fianna Éireann from August 1915 until the Easter Rising in 1916. From January 1917 to June 1917 he became Adjutant general of the organization. He was elected at the 1923 general election as Teachta Dála (TD) for the Galway constituency, but in accordance with Sinn Féin's abstentionist policy, he did not take his seat. He lost his seat at the June 1927 general election, and did not stand again. References External links 1901 census return 1911 census return 1896 births 1942 deaths Members of the 4th Dáil Politicians from County Galway Sinn Féin TDs (post-1923)"} {"instruction": "Make the following Python code snippet more efficient.", "input": "def determine_commission_rate(gross_sales):\n if gross_sales >= 10000:\n commission_rate = 0.1\n elif gross_sales >= 5000 and gross_sales < 10000:\n commission_rate = 0.07\n elif gross_sales < 5000:\n commission_rate = 0.05\n return commission_rate", "output": "def determine_commission_rate(gross_sales):\n if gross_sales >= 10000:\n return 0.1\n elif gross_sales >= 5000:\n return 0.07\n else:\n return 0.05"} {"instruction": "Create an HTML button that opens an alert message with the words \"Welcome\".", "input": "", "output": ""} {"instruction": "Write a SQL query to find the titles of all movies directed by Steven Spielberg.", "input": "", "output": "SELECT title FROM movies WHERE director = 'Steven Spielberg';"} {"instruction": "Write a Python script that filters a list of integers and returns only even numbers.", "input": "list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "def filter_even_numbers(lst):\n # Filter out even numbers from the given list \n even_numbers = [num for num in lst if num % 2 == 0]\n return even_numbers\n\nlist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nresult = filter_even_numbers(list)\nprint(result)"} {"text": "[DE Wikipedia] Florian Heinke\n\nFlorian Heinke (* 1981 in Frankfurt am Main) ist ein deutscher Maler. Er lebt und arbeitet in Frankfurt am Main. Leben Florian Heinke studierte von 2004 bis 2005 an der Kunsthochschule Mainz bei Friedemann Hahn. Von 2005 bis 2009 führte er sein Studium an der Städelschule in Frankfurt am Main bei Christa Näher in der freien Malerei fort und beendete dies mit dem Meisterschüler. Schon seit Beginn des Studiums initiiert Heinke eigene Ausstellungen mitunter an kunst-untypischen Orten wie z. B. Clubs, Cafés, Antiquariaten oder im öffentlichen Raum, da der Bezug zum alltäglichen Leben in seiner Arbeit stets eine zentrale Rolle spielt. 2010 organisierte und kuratierte er in seiner Heimatstadt die Ausstellung „Love kills. Betting on the Muse.“ mit Arbeiten namhafter Künstler wie u. a. Thomas Bayrle, André Butzer, Anton Corbijn, Jack Goldstein, Friedemann Hahn, Gregor Hildebrandt, Barbara Klemm, Alicja Kwade, Sandra Mann, Jonathan Meese, Christa Näher, Nam June Paik, Manfred Peckl, Raymond Pettibon, Tobias Rehberger, Anselm Reyle, Gerhard Richter, Marcus Sendlinger, Karsten Thormaehlen, Günther Uecker, Eva Weingärtner und Thomas Zipp. 2008 setzte er, gemeinsam mit Daniel Birnbaum, in Form eines Stolpersteins vor dem Frankfurter Römer der Liebe und ihrer Fragilität ein Denkmal. Seine ehemaligen goldenen Verlobungsringe, ließ er unter einem unmarkierten Pflasterstein, vor den Toren des Standesamtes auf dem Römerberg, vergraben und einzementieren. Werk Heinkes Arbeiten kreisen um die Gesellschaft, um Zwischenmenschliches, um das Du und Ich ebenso wie das Wir und die anderen. Er spürt gegenwärtigen gesellschaftlichen Tendenzen nach und zeigt Bruchstellen im zwischenmenschlichen Miteinander auf – die emotionale Verflachung von Beziehungen, Einsamkeit, die Unfähigkeit sich auszutauschen in einer von Schnelllebigkeit geprägten, globalisierten Welt. Heinke malt stets in Schwarz und mit Acryl auf industriellem Nessel. Seine Arbeitsweise, die er seit 2006 verfolgt, bezeichnet Heinke als BLACK POP. Angelehnt an die Pop Art zeigt er jedoch nicht den „schönen Schein“ der Konsumwelt, sondern will Gefühle übermitteln. Seine Motive greifen Situationen auf, wie sie aus dem Alltag bekannt sind, und zielen teils auf schockierende, teils provokant, immer aber emotional auf eine Reaktion beim Betrachter. Diese scheinbare Plakativität von Heinkes Bildinszenierungen verführt den Betrachter zum oberflächlichen Konsumieren – und führt ihn vor: Ein schneller Blick, ein bekanntes Motiv, die Darstellung scheint eindeutig und leicht erfasst. Und sitzt damit unreflektiert gängigen Bildmythen auf. Stipendien Stipendium Sammlung Lenikus Wien, 2008 Stipendium der Frankfurter Künstlerhilfe e.V., 2009 Stipendium Kulturamt der Stadt Frankfurt am Main, Artist in Residence-Wien, 2011…"} {"instruction": "Construct a React component to display a login form.", "input": "", "output": "function LoginForm(){ return (
    ); }"} {"instruction": "Construct a lambda function to find all odd numbers in a given list.", "input": "List of numbers: [2, 3, 7, 8, 10]", "output": "list_of_nums = [2, 3, 7, 8, 10] odd_nums = list(filter(lambda num: num % 2 != 0, list_of_nums))"} {"text": "[HI Wikipedia] मिशेल फूको\n\nमिशेल फूको की राज्य की अवधारणा राज्य की संस्था लोगों से कैसे अपनी बात मनवाती है— इस समझ में सबसे ताजा और विचारोत्तेजक विकास मिशेल फ़ूको ने किया है। पूँजीपति वर्ग राज्य में अपनी सामाजिक सत्ता केवल हिंसा के उपकरणों (सेना, पुलिस आदि) के द्वारा ही स्थापित नहीं करता। वह तरह-तरह के सांस्कृतिक रूपों का इस्तेमाल करके भी अपनी सामाजिक सत्ता की निरंतरता सुनिश्चित करता है। इसलिए राज्य की संरचनाओं को उनके सांस्कृतिक रूपों में समझना भी आवश्यक है। अन्ततः राज्य के पक्ष में सहमति पैदा करने की ज़िम्मेदारी ये सांस्कृतिक संरचनाएँ ही निभाती हैं। फ़ूको बताते हैं कि आधुनिक समाज में लोगों को नियंत्रित या अनुशासित करने के लिए निगरानी की एक बहुस्तरीय व्यवस्था के अलावा दूसरों द्वारा किये गये निर्णयों को आत्मसात् करने तथा परीक्षा प्रणाली जैसे उपाय अपनाये जाते हैं। फ़ूको जोर देकर कहते हैं कि लोगों पर दृष्टि रखने मात्र से सत्ता का आधा काम पूरा हो जाता है। इसके लिए वे स्टेडियम की व्यवस्था का हवाला देते हैं जिसमें सीटों की व्यवस्था इस तरह की जाती है कि दर्शक किसी कार्यक्रम को आसानी से देख पायें पर साथ ही यह व्यवस्था सत्ता के नियंत्रकों को दर्शकों पर निगाह रखने की सहूलियत भी प्रदान करती है। यहाँ फ़ूको अनुशासन और नियंत्रण की सत्ता का मॉडल चिह्नित करने के लिए राजनीतिक चिंतक जेरेमी बैंथम द्वारा कल्पित जेल पनोप्टिकॉन का उल्लेख भी करते हैं। जिसकी मूल वास्तु-योजना कुछ ऐसी थी कि कोठरियों में बंद कैदी एक दूसरे के लिए तो अदृश्य रहें लेकिन जेल के केंद्रीय टॉवर की निगरानी से बाहर न हो पायें। कैदियों को कभी इस बात का पता नहीं चलता कि उन पर निगाह रखी जा रही है या नहीं पर उनके मस्तिष्क में यह बात बैठ जाती है कि कोई उन पर दृष्टि रखता है। फ़ूको पैनॉप्टिकन के सिद्धांत को एक ऐसे रूपक की तरह देखते हैं जो जेल की चौहद्दी के पार जाकर स्कूलों, कारखानों और अस्पतालों में अनुशासन का आम ढर्रा बन जाता है। हालाँकि बैंथम की यह प्रस्तावित जेल कभी मूर्त रूप नहीं ले पायी लेकिन एक सिद्धांत के रूप में वह आधुनिक समाज की लगभग हर गतिविधि पर काबिजज हो गयी है। आधुनिक समाज में अनुशासन कायम करने वाली व्यवस्थाओं के लिए वह एक ऐसा औजार सिद्ध हुई है जिसने प्राक-आधुनिक काल के राजाओं और हाकिमों को अपदस्थ कर उनकी जगह ख़ुद को स्थापित कर लिया है। इस क्रम में फ़ूको यह भी दर्शाते हैं कि आधुनिक सत्ता या अनुशासन कायम करने वाली व्यवस्था केवल लोगों की गतिविधियों पर ही नज़र नहीं रखती बल्कि वह लोगों को उनकी अक्षमता दिखाकर भी नियंत्रित करती है। उनके अनुसार आधुनिक सत्ता समझ, प्रतिभा, सामान्य और असामान्य व्यवहार जैसी कोटियों का निर्माण करती है और जब कोई व्यक्ति इसके द्वारा स्थापित कसौटियों या मानकों पर ख़रा नहीं उतरता तो व्यवस्था ऐसे व्यक्ति को कमतर या असामान्य घोषित करने का मौका नहीं चूकती। इस संदर्भ में फ़ूको यह याद दिलाना नहीं भूलते कि आधुनिक समाज की इन अनुशासनकारी संस्थाओं का यह रवैया किसी तरह के प्रतिशोध से नहीं बल्कि सुधार से प्रेरित होता है। जिसका अंतिम लक्ष्य यह होता है कि व्यक्ति समाज की प्रदत्त कसौटियों या मानकों को स्वीकार कर ले। ध्यान दें कि समाज की मान्यताओं के द्वारा अनुशासन कायम करने का यह ढंग न्यायिक दण्ड की उस व्यवस्था से…"} {"text": "[EN Wikipedia] Dennis Burgess\n\nDennis Burgess (February 18, 1926 – November 3, 1980) was a British television actor born in Neath, Glamorgan, Wales. He married Glenys Maria Hare at Neath, in 1958. Burgess came from Port Talbot, attended Port Talbot Secondary School and worked as a drama teacher for most of his adult life. He dedicated a lot of his time to helping his father care for his invalid mother, and it wasn't until after she had died that Burgess became a professional actor at 47 years of age, moving from Wales to the south east of England. His first professional role was in a film starring his boyhood friend Richard Burton, who had helped him into the profession. Burton and Burgess had remained great friends, and a series of letters written by the screen legend to his old friend, have previously been exhibited at the National Library of Wales at Aberystwyth. They included an invitation to Burton's 50th birthday party in 1975, from his then wife Elizabeth Taylor. Burgess went on to feature in The Professionals, The Sandbaggers, and The Elephant Man, and played the recurring role of Flambeau in Father Brown. His second career was to be a short one. On the evening of 3 November 1980, Dennis Burgess was driving to his home in Chesham when he suffered a massive heart attack and veered off the road. He was found dead at the wheel of his car, in the middle of a cricket pitch, in Hemel Hempstead, Hertfordshire, England. He was 54. Filmography References External links British male film actors British male television actors 1980 deaths 20th-century British male actors 1926 births"} {"text": "[DE Wikipedia] Pistazien\n\nDie Pistazien (Pistacia) sind eine Pflanzengattung mit etwa zehn bis zwölf Arten aus der Familie der Sumachgewächse (Anacardiaceae). Sie kommen auf der Nordhalbkugel sowohl in Asien als auch in Europa und Amerika vor. Einige Arten werden zur Gewinnung von Pistazien genutzt. Merkmale Die Pistazien-Arten sind Bäume und Sträucher. Die wechselständigen Laubblätter sind in der Regel gefiedert, paarig oder unpaarig, manchmal dreiteilig, selten ungeteilt. Die Blätter oder Blättchen besitzen einen glatten Rand. Nebenblätter fehlen. Sie sind zweihäusig getrenntgeschlechtig (Diözie). In achselständigen, traubigen oder rispigen Blütenständen stehen viele Blüten zusammen. Die kleinen Blüten sind eingeschlechtig. Die männlichen Blüten haben ein einfaches Perianth (auch als Deckblätter gedeutet) ohne Petalen und ein Diskus kann vorhanden sein oder er fehlt, drei bis sechs, selten sieben, Staubblätter mit kurzen Staubfäden und großen, eiförmigen Staubbeuteln und ein reduziertes oder kein Gynözeum. Die von Hochblättern umhüllten weiblichen Blüten enthalten ein zwei- bis fünfteiliges, einfaches Perianth ohne Petalen, der kurze Griffel endet in drei ausgebreiteten Narben, ein Diskus kann vorhanden sein oder er fehlt, Staminodien fehlen meist, der Fruchtknoten ist oberständig, einfächrig mit nur einer Samenanlage. Es wird eine einsamige Steinfrucht gebildet, die bei Reife rot oder bläulich bis grünlich bis schwarz wird und gepunktet ist. Die Samen besitzen kein Endosperm. Verbreitung Die Pistazien-Arten kommen im Mittelmeerraum, Südwest- und Ostasien, dem südlichen Nordamerika und in Guatemala vor. Systematik Der Gattungsname Pistacia wurde 1753 von Carl von Linné in Species Plantarum, 2, S. 1025–1026 erstveröffentlicht. Typusart ist Pistacia vera Ein Synonym für Pistacia ist Terebinthus Es gibt etwa zehn bis zwölf Pistacia-Arten: Pistacia aethiopica : Diese Art ist in Äthiopien, Kenia, Somalia, Tansania, Uganda und im Jemen beheimatet. Atlantische Pistazie, Terebinthe oder Atlantische Terebinthe (Pistacia atlantica ): Die Heimat ist der Mittelmeerraum, Kleinasien und der Indische Subkontinent. Pistacia chinensis : Die Heimat ist China, Taiwan und die Philippinen. Das Holz wird zur Möbelherstellung und zur Produktion eines gelben Farbstoffes verwendet. Pistacia cucphuongensis : Es ist ein Endemit in Cuc Phuong und Ninh Binh in Vietnam. Pistacia eurycarpa : Die Heimat reicht von Kleinasien bis Afghanistan. Pistacia integerrima : Die Heimat reicht von Afghanistan und Myanmar bis zum Indischen Subkontinent. Pistacia khinjuk : Die Heimat reicht von Ägypten über Kleinasien und Afghanistan bis zum Indischen Subkontinent. Mastixstrauch, Wilde Pistazie (Pistacia lentiscus ): Nutzpflanze für ein Naturharz, Mittelmeerraum. Pistacia malayana : Die Heimat ist Malaysia. Pistacia…"} {"text": "[EN Wikipedia] Sarane Ferret\n\nÉtienne \"Sarane\" Ferret (1912–1970) (surname also later spelled Ferré on occasion) was a French musette and gypsy jazz guitarist and composer, a contemporary and musical associate of Django Reinhardt, and the brother of noted Gitan (gypsy) guitar players Baro and Matelo Ferret. He recorded with his own quintet in Paris in the 1940s and continued performing there, with occasional recording sessions, until his death in 1970. Biography Sarane Ferret was the middle-born of the three Ferret brothers, Gitan gypsies from Rouen, France who made their way to Paris and there made the acquaintance of Django Reinhardt in 1931. He was known by his Gypsy nickname \"Sarane\". From 1931, the Ferret brothers Baro, Matelo and Sarane, and cousin René \"Challain\" Ferret, were favorite sidemen of Reinhardt. He initially made his name as a banjo player in Bals Musette, including with the Italian accordionist Vétese Guérino. He also accompanied Eastern European Gypsies in the Russian cabarets. He formed his own quintet in the 1940s, incorporating clarinets on occasion as well as the violin of Georges Effrosse into the \"classic\" gypsy jazz lineup (Effrosse's tenure with the quintet was short-lived, however, dying in a Nazi concentration camp in 1944); Sarane's original compositions included \"Cocktail Swing\", \"Royal Blue\" and \"Surprise-Party\" as well as recording versions of compositions by Django Reinhardt. Sarane continued to perform through the 1950s and 1960s, though without the recognition of his wartime quintet recordings; at times his bands a variety of accompanists including Jaques \"Montagne\" Mala, Laro Sollero, René Mailhes and others. Married to Gusti Malha's daughter Poupée, he resided in Paris up to his death in 1970, which was marked by a tribute concert by the gypsies at the Olympia Hall in Paris, issued on record as \"La Nuit des Gitans\". His musical legacy was continued by Francis-Alfred Moerman (1936-2010) who accompanied Sarane many times from 1960 onwards., Musical style While Sarane's Swing Quintette was modelled on that of his great contemporary Django Reinhardt, his sound was somewhat different; commentator Michael Dregni states: \"I hear in Sarane's fretwork a more deliberate, perhaps cautious guitarist... [his songs] imbued with a remote, even mysterious atmosphere... melodies floating on entrancing airs of minor-key wistfulness.\" For most of his career he is pictured with, and recorded with a Selmer guitar as indeed, were most French guitarists of the day; towards the end of his life he also recorded in a more mainstream, electric style as evidenced on his tracks on the album Tribute To Django recorded in 1967 for French radio (album released later, in 1989). Partial discography On 78 RPM discs: 1940 Tony Murena et son Ensamble Swing (with Baro and…"} {"instruction": "Construct a switch statement to log different grades messages based on the grade variable.", "input": "var grade = \"A+\";", "output": "switch(grade){ case \"A+\": console.log(\"Excellent job!\"); break; case \"A\": console.log(\"Well done!\"); break; case \"B\": console.log(\"Good job!\"); break; case \"C\": console.log(\"Keep up the good work!\"); break; default: console.log(\"Keep up the hard work!\"); break; }"} {"text": "[DE Wikipedia] Pakt Simon-Gagern\n\nAls Pakt Simon-Gagern bezeichnet man eine Absprache in der Frankfurter Nationalversammlung Anfang 1849. Sie führte dazu, dass bedeutende demokratische Elemente in die Reichsverfassung vom 28. März gelangten. Ohne die Absprache wäre die Verfassung monarchistischer und rechtsliberaler ausgefallen. In der damaligen Situation war Heinrich von Gagern der Ministerpräsident des revolutionären Deutschen Reiches. Seine rechtsliberale Fraktion nannte sich Casino, nach ihrem Versammlungslokal. Heinrich Simon hingegen vertrat die linke, demokratische Fraktion Westendhall. Im Februar und März 1849 waren die Abgeordneten nicht nur in Fraktionen aufgeteilt, sondern standen sich in einer bestimmten Einzelfrage gegenüber: die Großdeutschen (Mainlust) wollten Österreich in den Nationalstaat einbeziehen, die Erbkaiserlichen (Weidenbusch) hingegen dem preußischen König die deutsche Kaiserwürde übertragen. Das machte es für den Ministerpräsidenten von Gagern schwierig, eine Mehrheit für die neue Verfassung zu erreichen. Dazu brauchte er möglichst viele Stimmen der politischen Linken, die sich über mehrere Fraktionen verteilte. Simon konnte daher mit von Gagern einige Punkte aushandeln; am Ende hatte die Reichsverfassung eine knappe Mehrheit in der Nationalversammlung. Danach wählte sie den preußischen König Friedrich Wilhelm IV. zum Kaiser der Deutschen, der dies allerdings ablehnte (April 1849). Die Absprachen hatten mindestens eine weitreichende Folge: Zu den Punkten gehörte nicht zuletzt das allgemeine und gleiche Wahlrecht (für Männer), das kurz vor der Annahme der Verfassung in einem Reichsgesetz beschlossen wurde. Dieses Reichsgesetz war später das Vorbild für die Wahlgesetze, durch die 1866/67 der Norddeutsche Bund gegründet werden konnte. Vorgeschichte Die Situation in Österreich sorgte dafür, dass sich die Verfassungsberatungen in Frankfurt in die Länge zogen. Fraglich schien es, ob Österreich überhaupt in einen deutschen Nationalstaat integriert werden konnte. Die Großdeutschen wollten zumindest diejenigen Gebiete Österreichs im Nationalstaat wissen, die bereits zum Deutschen Bund gehört hatten. An der Spitze des Nationalstaats hätte etwa ein Direktorium stehen können, in dem unter anderem der österreichische Kaiser und der preußische König vertreten waren. Allerdings hätte Österreich sein Staatsgebiet in einen deutschen und einen übrigen Teil aufteilen müssen. Der österreichische Kaiser wäre im Sinne einer Personalunion die einzige Klammer zwischen beiden gewesen. Dies lehnte er ab. Am 11. März 1849 schließlich wurde in Frankfurt bekannt, dass der Kaiser selbstherrlich eine österreichische Verfassung erlassen hatte. Diese Nachricht warf in der Frankfurter Nationalversammlung die Fraktionsbildungen um. Bekannte Österreicher lehnten ihr Mandat nieder. Der…"} {"instruction": "Create a Python program that prints a welcome message to the user based on their input.", "input": "\"Welcome to my program!\"", "output": "name = input(\"Enter your name:\") \n \nprint(\"Welcome to my program \" + name + \"!\")"} {"instruction": "Create an algorithm using Python to find the largest number in a list.", "input": "[8, 5, 10, 3]", "output": "def find_largest_number(numbers):\n # Finds the largest number from the given list\n largest = 0\n for num in numbers:\n if num > largest:\n largest = num\n return largest\n \nnumbers = [8, 5, 10, 3]\nlargest = find_largest_number(numbers)\nprint(largest)"} {"instruction": "Generate a function in Python that returns the cumulative sum of a list of numbers.", "input": "[1, 2, 3, 4]", "output": "def cumulative_sum(nums):\n sums = []\n current_sum = 0\n \n for n in nums:\n current_sum += n\n sums.append(current_sum)\n \n return sums\n \nprint(cumulative_sum([1, 2, 3, 4])) # [1, 3, 6, 10]"} {"text": "[EN Wikipedia] Maria Clara Eimmart\n\nMaria Clara Eimmart (27 May 1676 – 29 October 1707), was a German astronomer, engraver and designer. She was the daughter and assistant of Georg Christoph Eimmart the Younger. Biography Maria Clara Eimmart was a German astronomer born in Nuremberg. She was the daughter of painter, engraver, and amateur astronomer Georg Christoph Eimmart the Younger, who was also director of the Nuremberg Academy of Art, the Malerakademie, from 1699 to 1704. Her grandfather, Georg Christoph Eimmart the Elder, was also an engraver and painter of portraits, still-lifes, landscapes, and historical subjects. The profession of Maria Clara Eimmart’s father was lucrative, but he spent all of his earnings in the purchase of astronomical instruments and on building (in 1678) a private observatory on the Nuremberg city wall. He was a diligent observer and published his results in various memoirs and scientific transactions. Because of the strength of the crafts tradition in Germany, Maria Clara Eimmart was able to take advantage of the opportunity to train as an apprentice to her father. Through him, she received a broad education in French, Latin, mathematics, astronomy, drawing, and engraving. Her skills as an engraver allowed her to assist her father in his work, and she became known for her depictions of the phases of the moon. In addition, she illustrated flowers, birds, and classical subjects, but most of these paintings have been lost. In 1706, Eimmart married Johann Heinrich Muller (1671-1731), her father’s pupil and successor, who had become director of the Eimmart observatory in 1705. Muller also taught physics at the Nuremberg Gymnasium, where Eimmart assisted her husband. Muller was so influenced by the family love for astronomy that he became a diligent amateur and afterwards a professor at Altorf, where he used his skill in depicting comets, sun-spots, and lunar mountains aided by Maria Clara. In the early years of their marriage, their associates included the two Rost Brothers, who were novelists and astronomers, and Doppelmayer, a historian of astronomy. In 2012 Markus Heinz of the Staatsbibliothek zu Berlin discovered two paintings by her of a total solar eclipse that was seen in Nuremberg in 1706. These were known to have existed but were also thought lost. These paintings are in excellent agreement with text descriptions of the event and are now of considerable scientific importance, being a unique depiction by a trained astronomer of the solar corona during the Maunder minimum. Just a year after her marriage, Maria Clara Eimmart died in childbirth in Nuremberg. Astronomical illustrations Eimmart is best known for her exact astronomical illustrations done in pale pastels on dark blue cardboard. Between 1693 and 1698, Eimmart made over 350 drawings of the…"} {"text": "[EN Wikipedia] Ratna Ram Chaudhary\n\nRatna Ram Chaudhary ( – 28 November 2019) was an Indian politician from Rajasthan belonging to Indian National Congress. He was a member of the Rajasthan Legislative Assembly. Chaudhary was elected Sarpanch for the first time in the year 1959 in the Panchayat Raj formed after independent India. After this, after being invincible sarpanch for 22 consecutive years, for the first time in 1977, he was elected MLA from the Congress party. Later in 1980, 1990 and 1998 he was also elected as MLA. Biography Chaudhary was elected as a member of the Rajasthan Legislative Assembly from Raniwara in 1977. He was also elected from Raniwara in 1980. He was also elected from this constituency in 1990 and 1998. Chaudhary died on 28 November 2019 at the age of 90. References 1920s births 2019 deaths Rajasthan MLAs 1977–1980 Indian National Congress politicians from Rajasthan People from Jalore district Rajasthan MLAs 1980–1985 Rajasthan MLAs 1990–1992 Rajasthan MLAs 1998–2003"} {"instruction": "Create a solution that detects the presence of a character in a string.", "input": "Python", "output": "def detect_character(string, char):\n for ch in string:\n if ch == char:\n return True\n return False\n\nstring = 'Python'\nchar = 'y'\nprint(detect_character(string, char))"} {"instruction": "Generate a valid VHDL code for given design", "input": "Implement a 4-to-1 multiplexer using the given data ports", "output": "LIBRARY ieee; USE ieee.std_logic_1164.all; entity Multiplexer is Port ( a,b,c,d: in std_logic; sel: in std_logic; y : out std_logic); end Multiplexer; architecture Behavioral of Multiplexer is begin process(a,b,c,d,sel) begin if sel = '0' then y <= a; elsif sel = '1' then y <= b; elsif sel = '2' then y <= c; elsif sel = '3' then y <= d; else y <= '0'; end if; end process; end Behavioral;"} {"text": "[CS Wikipedia] Hordubalové\n\nHordubalové je český film z roku 1937, který natočil režisér Martin Frič podle novely Hordubal Karla Čapka. Film vypráví o návratu slovenského emigranta z Ameriky (Jaroslav Vojta) na svůj statek ke své ženě a dcerce. Žena kromě peněz však už o něj nemá zájem, intimně žije s čeledínem, což skončí tragicky. Základní údaje Námět: Karel Čapek Scénář: Karel Čapek, Karel Hašler Hudba: Miloš Smatek Kamera: Jaroslav Blažek Režie: Mac Frič Hrají: Jaroslav Vojta, Suzanne Marwille, Mirko Eliáš, Palo Bielik, Eliška Kuchařová, Vlasta Součková, Gustav Hilmar Další údaje: černobílý, drama Výroba: Lloyd, 1937 Související články Hordubal – knižní předloha Externí odkazy České dramatické filmy Filmy z roku 1937 Filmy Martina Friče České filmy natočené podle knižní předlohy Československé černobílé filmy Filmy inspirované dílem Karla Čapka"} {"text": "[HI Wikipedia] जलालपुर जट्टां\n\nजलालपुर जट्टां (अंग्रेज़ी:Jalalpur Jattan उर्दू:) पाकिस्तानी पंजाब के ज़िला गुजरात का एक शहर है। इतिहास जब सिकंदर महान ने महाराजा पुरूवास को हराया तो उस ने दो शहर आबाद किये। एक शहर झेलम नदी और दूसरा शहर चेनाब नदी के पास बसाये। चेनाब के पास आबाद किया गया दूसरा शहर आज का जलालपुर जट्टां है। सिकंदर ने इस का नाम शाकलानगर रखा जिसकी उत्पत्ति यूनानी और संस्कृत शब्दों से की गई। शाकलानगर का अर्थ सुंदरता का शहर है। इन शहरों को सिकंदर महान की बहुराष्ट्रीय सेनाओं ने आबाद किया जिन में यूनानियों की अधिक संख्या शामिल थी। ये शहर सिकंदर महान की विदा के बाद कई वर्ष तक पनपते रहे। बाद में जलालुद्दीन ख़िलजी और इस की सेना ने मंगोलों के हमलों को रोकने के लिए इस शहर में ठहराव किया। ख़िलजी ने शहर का नाम बदल कर अपने नाम पर जलालाबाद रख दिया। फिर अपने काल के मशहूर जाट जिन का नाम ज़बरदस्त ख़ान और अजमेर ख़ान था ने शहर का नाम जलालपुर जट्टां कर दिया। सिख साम्राज्य में भी इस शहर को महिमा मिली। जलालपुर जट्टां में इस्लामगढ़ नामक एक स्थान है जिसे 300 ई॰पू॰ में राजा चन्द्रगुप्त मौर्य ने बनवाया था। स्थानीय इतिहासकारों की मानता है कि इस्लाम गढ़ में चन्द्रगुप्त मौर्य ने एक क़िले का निर्माण किया था। क़िले की जगह का असल नाम तो मालूम नहीं मगर समय के साथ ये क़िला इस्लाम गढ़ क़िला के नाम से प्रसिद्ध हो गया। ये क़िला औरंगज़ेब, अहमद शाह अब्दाली, महाराजा रणजीत सिंह और इन की सेनाओं का टकसाल रहा है। केवल क़िले के कुछ ख़राब अवशेष ही आज मौजूद है। 1832 में इस्लाम गढ़ क़िला लाहौर के महाराजा रणजीत सिंह का टकसाल था। शहर के क्षेत्रों के भीतर एक प्राचीन शहर भी है जिस का नाम कुल्ला चोर है। कुल्ला चोर अब जलालपुर जट्टां शहर का नगर है। क्षेत्र में खुदाई से पता चला है कि कुल्ला चोर मौर्य राजवंश का टकसाल था। जलालपुर जट्टां को 1908 में नगरपालिका बनाया गया। फ़रवरी 2015 में शहर को तहसील का दर्जा दिया गया। मौसम शहर की जलवायु मध्यम है। शहर का औसत तापमान 23.9 डिग्री सेल्सियस है। गर्मियों में तापमान 45 सेंटीग्रेड तक पार कर जाता है लेकिन आज़ाद कश्मीर के पहाड़ों से निकटता होने के कारण यहाँ गर्मी अपेक्षाकृत कम है। शहर में वर्षा उल्लेखनीय है। वर्षा भी गर्म महीनों के दौरान होती है। सर्दियों में कम से कम तापमान 2 सेंटीग्रेड से नीचे गिर जाता है। औसत वर्षा 802 मिमी है। अर्थव्यवस्था जलालपुर जट्टां सदर सर्किल गुजरात का मुख्य कार्यालय है। शहर कपड़े कुटीर उद्योग और नानख़ताईयों के कारण विदित है। शहर जलालपुर–गुजरात सड़क द्वारा कई कस्बों और गांवों को गुजरात से जोड़ता है। जलालपुर जट्टां शहर छम्ब के लिए एक महत्वपूर्ण पड़ाव है। जलालपुर जट्टां को कश्मीर का द्वार भी कहा जाता है। छावनी शहर में एक छोटे सी छावनी क्षेत्र है जिसे जलालपुर छावनी कहा जाता है। नियंत्रण रेखा से निकटता के कारण इस छावनी की अपनी एहमियत है। और देखें गुजरात सन्दर्भ ज़िला गुजरात में आबादी वाले स्थान ज़िला गुजरात"} {"instruction": "Write a function in Python to count the number of vowels in a string.", "input": "", "output": "def count_vowels(string):\n count = 0\n vowels = set(\"aeiouAEIOU\")\n for letter in string:\n if letter in vowels:\n count += 1\n return count"} {"instruction": "Compose a code to find the mean and median of a given list", "input": "[1, 6, 4, 9, 5, 8, 2]", "output": "def get_mean_median(nums): num_count = len(nums) num_sum = 0.0 for num in nums: num_sum += num mean = num_sum / num_count nums.sort() if num_count % 2 == 0: median1 = nums[num_count//2] median2 = nums[num_count//2 - 1] median = (median1 + median2)/2 else: median = nums[num_count//2] return mean, median"} {"text": "[EN Wikipedia] List of place names of Dutch origin in the United States\n\nThis is a list of place names in the United States that either are Dutch, were translated from Dutch, or were heavily inspired by a Dutch name or term. Many originate from the Dutch colony of New Netherland. California Delft Colony, California Colorado Leyden, Colorado Nederland, Colorado Delaware Bombay Hook Brandywine Creek Bread and Cheese Island Cape Henlopen Drawyer Creek Murderkill River Prime Hook Reedy Point Georgia Amsterdam, Georgia Illinois Leyden Township, Cook County, Illinois South Holland, Illinois Indiana Holland, Indiana Iowa Breda, Iowa Kentucky Ghent, Kentucky Louisiana Zwolle, Louisiana Massachusetts Leyden, Massachusetts Middleborough, Massachusetts Michigan Borculo, Michigan Drenthe, Michigan Holland, Michigan Noordeloos, Michigan Overisel Township, Michigan Vriesland, Michigan Zeeland, Michigan Minnesota Delft, Minnesota Ghent, Minnesota Groningen, Minnesota Holland, Minnesota Hollandale, Minnesota Holland Township, Kandiyohi County, Minnesota Missouri Amsterdam, Missouri Deventer, Missouri Montana Amsterdam, Montana New Jersey Amsterdam, New Jersey Arthur Kill Barnegat: Barnegat Bay, Barnegat Branch Trail, Barnegat Inlet, Barnegat Light, New Jersey, Barnegat Lighthouse State Park, Barnegat Peninsula, Barnegat Township, New Jersey, Barnegat (CDP), New Jersey Bergen: Bergen County, New Jersey, Bergen Hill, Bergen Hill, Jersey City neighborhood, Bergen Neck peninsula, Bergen Point, Bergen Square, neighborhood in Jersey City, Bergenfield, New Jersey, Bergenline Avenue, North Bergen, New Jersey Bloomingdale, New Jersey Brielle, New Jersey Constable Hook Cromakill Creek Cresskill, New Jersey Deep Voll Brook Dwars Kill Cromakill Creek and Cromakill Marsh Frelinghuysen Township, New Jersey Harlingen, New Jersey Hasbrouck Heights, New Jersey Hoboken, New Jersey Holland Township, New Jersey Houvenkopf Mountain Kill van Kull Holland, Monmouth County, New Jersey Losen Slote Creek Molly Ann Brook (originally Molly's Yawn Brook) Overpeck Creek Paulins Kill Paulus Hook, neighborhood in Jersey City Pavonia Terminal, Jersey City, New Jersey Robbins Reef Rutgers University Sparkill Creek Sandy Hook Skillman, New Jersey Teaneck, New Jersey Tenafly, New Jersey Van Vorst Park, neighborhood in Jersey City Voorhees Township Wallkill River Wyckoff, New Jersey New York Alplaus Kill Alplaus, New York Amsterdam (city), New York Amsterdam (town), New York Anthony Kill Arbor Hill Historic District–Ten Broeck Triangle Arthur Kill Barneveld, New York Batavia Kill Batavia Kill (East Branch Delaware River) Batavia, New York Batavia (town), New York Batten Kill Bear Kill Beaver Kill Beaver Kill (Alder Creek) Beaverkill Creek Bedford–Stuyvesant, Brooklyn Beekman Place Beekman, New York Beeren Island Bergen (village), New York Bergen Street (IND Culver Line)…"} {"text": "[EN Wikipedia] Akçayurt, Hani\n\nAkçayurt () is a neighbourhood in the municipality and district of Hani, Diyarbakır Province in Turkey. The village is populated by Kurds and had a population of 65 in 2022. Disappearance of the village muhtar A Kurdish muhtar (elected village head) after being released stated in a press statement that he had been tortured by Turkish gendarmes while in custody and forced to tell television journalists the PKK had burned his village, he stated when in fact it was the Turkish military who burned the village. On 18 August 1994 when returning to his village an eye-witness stated he was detained and taken via helicopter. He has not been seen since. References Neighbourhoods in Hani District Kurdish settlements in Diyarbakır Province"} {"instruction": "Write a Python program to sort the given list of lists by their third elements.", "input": "my_list = [[1, 2, 5], [3, 4, 1], [7, 8, 9]]", "output": "def sort_by_third_elements(list_of_lists):\n return sorted(list_of_lists, key=lambda x: x[2])\n\nmy_list = [[1, 2, 5], [3, 4, 1], [7, 8, 9]]\nprint(sort_by_third_elements(my_list))\n# Output: [[3, 4, 1], [1, 2, 5], [7, 8, 9]]"} {"instruction": "Change the response to now fulfill the following purpose", "input": "Find the number of ones in a binary number 101011", "output": "def find_ones(n): count = 0 while n > 0: if n % 10 == 1: count += 1 n //= 10 return count"} {"instruction": "Write a regex expression to match strings that start with \"abc\" and end with \"xyz\".", "input": "", "output": "^abc.*xyz$"} {"instruction": "Create an array of prime numbers between 0 and 100 and print them out.", "input": "", "output": "Array = [] for num in range(2,101): if all(num % i != 0 for i in range(2,num)): Array.append(num) print(Array)"} {"text": "[DE Wikipedia] Noah Gregor\n\nNoah Gregor (* 28. Juli 1998 in Beaumont, Alberta) ist ein kanadischer Eishockeyspieler, der seit Oktober 2023 bei den Toronto Maple Leafs aus der National Hockey League (NHL) unter Vertrag steht und dort auf der Position des Centers spielt. Zuvor war Gregor vier Spielzeiten bei den San Jose Sharks in der NHL aktiv. Karriere Gregor verbrachte seine Jugendzeit zunächst bis 2014 bei den Leduc Oil Kings in den Juniorenligen seiner Heimatprovinz Alberta. Im Bantam Draft der Western Hockey League (WHL) wurde der Stürmer im Jahr 2013 von den Victoria Royals ausgewählt. Diese transferierten ihn im Januar 2014 jedoch mit einigen Draft-Wahlrechten im Tausch für Travis Brown zum Ligakonkurrenten Moose Jaw Warriors. Dort debütierte Gregor in der Saison 2014/15. Aufgrund einer Verletzung absolvierte er nur zehn Spiele, in denen er allerdings sechs Scorerpunkte sammelte. In der folgenden Spielzeit war der Angreifer wieder genesen und erreichte 82 Scorerpunkte in ebenso vielen Spielen, was schließlich dazu führte, dass er im NHL Entry Draft 2016 in der vierten Runde an 111. Stelle von den San Jose Sharks aus der National Hockey League (NHL) ausgewählt wurde. Gregor blieb noch weitere eineinhalb Spielzeiten in Moose Jaw, ehe er im Dezember 2017 erneut transferiert wurde und er somit zurück zu den Victoria Royals gelangte. Für die Royals absolvierte der Offensivspieler aber bis zum Ende der Spielzeit 2017/18 inklusive der Playoffs nur 41 Spiele, da sich Vicoria im Juli 2018 in einem Transfergeschäft wieder von ihm trennte. Gregor wechselte in die Organisation der Prince Albert Raiders. Zwischenzeitlich hatte er im April desselben Jahres auch einen NHL-Einstiegsvertrag bei den San Jose Sharks unterschrieben, der ihn zum Saisonende zu seinem Profidebüt bei Sharks-Farmteam San Jose Barracuda in der American Hockey League (AHL) verhalf. Die Saison 2018/19 absolvierte der Kanadier komplett bei den Prince Albert Raiders. Diese führte er gemeinsam mit Brett Leason als Topfavorit in die Playoffs um den Ed Chynoweth Cup, den er zum Abschluss seiner Juniorenkarriere gewann. Zum Spieljahr 2019/20 wechselte Gregor in den Profibereich und kam im Saisonverlauf für die San Jose Sharks in der NHL als auch die San Jose Barracuda in der AHL zum Einsatz. Im Verlauf der Saison 2021/22 schaffte der Stürmer den Sprung zum NHL-Stammspieler. Nach der Saison 2022/23 wurde sein auslaufender Vertrag nicht verlängert, sodass er sich als Free Agent auf der Suche nach einem neuen Arbeitgeber befand. Diesen fand der Stürmer im Oktober 2023 in den Toronto Maple Leafs. International Mit der kanadischen U18-Nationalmannschaft nahm Gregor an der U18-Junioren-Weltmeisterschaft 2016 im US-amerikanischen Grand Forks teil. Dabei belegte er mit der Mannschaft nach Niederlagen im Halbfinale und im Spiel…"} {"instruction": "Write a Python program to find the longest palindromic subsequence of a given string.", "input": "roadrace", "output": "def longest_palindromic_subsequence(string):\n n = len(string)\n dp = [[0 for _ in range(n)] for _ in range(n)]\n for i in range(n):\n dp[i][i] = 1\n for i in range(n-1):\n if string[i] == string[i+1]:\n dp[i][i+1] = 2\n for l in range(3, n+1):\n for i in range(n-l+1):\n j = i+l-1\n if string[i] == string[j]:\n dp[i][j] = dp[i+1][j-1] + 2\n else:\n dp[i][j] = max(dp[i][j-1], dp[i+1][j])\n return dp[0][n-1]"} {"instruction": "Create a function in Python that takes a list of strings, converts it to camelCase, and returns a new list with the converted strings.", "input": "list = [\"this\", \"is\", \"an\", \"example\"]", "output": "def convertToCamelCase(list):\n camelCaseList = []\n\n for string in list:\n string = string.capitalize()\n camelCaseList.append(string)\n\n return ''.join(camelCaseList)"} {"instruction": "Develop a C++ code to print the numbers 1 to 10 in descending order.", "input": "", "output": "for(int i=10; i>0; i--) cout << i << \" \";"} {"text": "[EN Wikipedia] Abacus\n\nThe abacus (: abaci or abacuses), also called a counting frame, is a hand-operated calculating tool of unknown origin used since ancient times in the ancient Near East, Europe, China, and Russia, millennia before the adoption of the Hindu-Arabic numeral system. The abacus consists of a two-dimensional array of slidable beads (or similar objects). In their earliest designs, the beads could be loose on a flat surface or sliding in grooves. Later the beads were made to slide on rods and built into a frame, allowing faster manipulation. Each rod typically represents one digit of a multi-digit number laid out using a positional numeral system such as base ten (though some cultures used different numerical bases). Roman and East Asian abacuses use a system resembling bi-quinary coded decimal, with a top deck (containing one or two beads) representing fives and a bottom deck (containing four or five beads) representing ones. Natural numbers are normally used, but some allow simple fractional components (e.g. , , and in Roman abacus), and a decimal point can be imagined for fixed-point arithmetic. Any particular abacus design supports multiple methods to perform calculations, including addition, subtraction, multiplication, division, and square and cube roots. The beads are first arranged to represent a number, then are manipulated to perform a mathematical operation with another number, and their final position can be read as the result (or can be used as the starting number for subsequent operations). In the ancient world, abacuses were a practical calculating tool. Although calculators and computers are commonly used today instead of abacuses, abacuses remain in everyday use in some countries. The abacus has an advantage of not requiring a writing implement and paper (needed for algorism) or an electric power source. Merchants, traders, and clerks in some parts of Eastern Europe, Russia, China, and Africa use abacuses. The abacus remains in common use as a scoring system in non-electronic table games. Others may use an abacus due to visual impairment that prevents the use of a calculator. The abacus is still used to teach the fundamentals of mathematics to children in most countries. Etymology The word abacus dates to at least AD 1387 when a Middle English work borrowed the word from Latin that described a sandboard abacus. The Latin word is derived from ancient Greek (abax) which means something without a base, and colloquially, any piece of rectangular material. Alternatively, without reference to ancient texts on etymology, it has been suggested that it means \"a square tablet strewn with dust\", or \"drawing-board covered with dust (for the use of mathematics)\" (the exact shape of the Latin perhaps reflects the genitive form of the Greek word,…"} {"instruction": "Suggest a solution to print the third character from a string in Python.", "input": "String = \"Hello, world!\"", "output": "print(string[2]) # Output: l"} {"instruction": "Create a program in Python to measure the performance of a code snippet. The program should measure the execution time for a piece of code and display the results in milliseconds.", "input": "def add(x,y):\n return x+y", "output": "import time\ndef measure_performance(fn, data):\n start = time.perf_counter()\n result = fn(*data)\n elapsed = 1000 * (time.perf_counter() - start) \n return result, elapsed\n\ndef add(x, y):\n return x + y\n\ndata = (3, 5)\nresult, elapsed = measure_performance(add, data)\nprint('Result:', result)\nprint('Elapsed time (ms):', elapsed)"} {"instruction": "Create a Python class for a TV Show with attributes for title, season number, episode number, and rating.", "input": "Not applicable", "output": "class TVShow:\n def __init__ (self, title, season_number, episode_number, rating):\n self.title = title\n self.season_number = season_number\n self.episode_number = episode_number\n self.rating = rating\n \n def get_title(self):\n return self.title\n \n def get_season_number(self):\n return self.season_number\n \n def get_episode_number(self):\n return self.episode_number\n \n def get_rating(self):\n return self.rating"} {"instruction": "Create a Python program to print a formatted table of grades for a given set of students.", "input": "Students = [\n {\n 'name': \"John\",\n 'grade': 92\n },\n {\n 'name': \"Alice\",\n 'grade': 95\n },\n {\n 'name': \"Bob\",\n 'grade': 87\n }\n]", "output": "def print_grade_table(students):\n max_name_length = max(len(student['name']) for student in students)\n line_template = \"{{name:<{max_name_length}}} {{grade}}\".format(max_name_length=max_name_length)\n header = line_template.format(name='Name', grade='Grade')\n sep = '-' * len(header)\n print(header)\n print(sep)\n for student in students:\n print(line_template.format(**student))"} {"instruction": "Create a Python function which takes a list of numbers and returns a list of median values.", "input": "list = [1, 2, 4, 16, 8, 10]", "output": "def get_medians(input_list):\n '''Returns list of median values of the list of numbers given.''' \n medians = []\n l = len(input_list)\n for i in range(l):\n tuple_l = input_list[:i]+input_list[i+1:] # Exclude the current element while calculating median.\n tuple_l.sort()\n l_1 = len(tuple_l)\n if l_1%2==0:\n median = (tuple_l[int(l_1/2)-1] + tuple_l[int(l_1/2)])/2\n else:\n median = tuple_l[int((l_1-1)/2)]\n medians.append(median)\n return medians\n\nlist = [1, 2, 4, 16, 8, 10]\nprint(get_medians(list))\n# Output: [1.5, 2, 5, 8, 6.5]"} {"text": "[DE Wikipedia] Sophie Lewis\n\nSophie Lewis ist der Name folgender Personen: * Sophie Lewis (Autorin), deutsch-britische Autorin Sophie Lewis (Radsportlerin) (* 2002), britische Radrennfahrerin"} {"text": "[CS Wikipedia] Římskokatolická farnost Kostelec\n\nŘímskokatolická farnost Kostelec je územním společenstvím římských katolíků v rámci vikariátu České Budějovice - venkov českobudějovické diecéze. O farnosti Historie Plebánie v Kostelci (místní části Hluboké nad Vltavou)je písemně doložena v roce 1379, později však zanikla. Kostelec byl pak postupně filiálkou Hosína a Purkarce. V roce 1703 vznikla ve vsi expozitura. Z té byla v roce 1848 vytvořena samostatná farnost. Současnost Farnost spravuje ex currendo z Modré Hůrky řeckokatolický kněz (tj. katolický kněz byzantského ritu) s oprávněním (tzv. fakultou) biritualismu, který tedy může slavit bohoslužby v byzantském i římském ritu. Vedle této činnosti ve struktuře českobudějovické diecéze rovněž pečuje o komunitu řeckokatolíků ve Strakonicích. Odkazy Reference Externí odkazy Profil farnosti na webu Českobudějovické diecéze Kostelec Náboženství v Hluboké nad Vltavou Organizace v Hluboké nad Vltavou Organizace založené roku 1848"} {"instruction": "Write a python program that creates and prints a range of numbers.", "input": "Start from 0, increment by 2 and end at 10", "output": "for number in range(0, 11, 2):\n print(number)"} {"instruction": "Build a TensorFlow model to perform sentiment analysis on text.", "input": "", "output": "import tensorflow as tf # Get the data dataset = tf.keras.utils.get_file( 'aclImdb_v1.tar.gz', 'http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz') # Load the data and prepare it for the model reviews_train, reviews_test, labels_train, labels_test \\ = tf.keras.datasets.imdb.load_data( path=str(dataset)[:-7] + \"/aclImdb/train/\") # Convert the integers back to words word2id = tf.keras.datasets.imdb.get_word_index() word2id = {k:(v+3) for k,v in word2id.items()} word2id[\"\"] = 0 word2id[\"\"] = 1 word2id[\"\"] = 2 word2id[\"\"] = 3 id2word = {value:key for key,value in word2id.items()} # Model for sentiment analysis model = tf.keras.Sequential([ tf.keras.layers.Embedding(input_dim=len(word2id)+1, output_dim=256), tf.keras.layers.GlobalAveragePooling1D(), tf.keras.layers.Dense(256, activation=tf.nn.relu), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(1, activation=tf.nn.sigmoid) ]) model.compile( optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'] ) model.fit( reviews_train, labels_train, epochs=10, validation_data=(reviews_test, labels_test) )"} {"text": "[DE Wikipedia] NEPA\n\nNEPA steht für: Nuclear Energy for the Propulsion of Aircraft; deutsch: Nuklearenergie für den Flugzeug-Antrieb, siehe Convair X-6 National Environmental Policy Act, ein Umweltgesetz in den USA von 1970, siehe auch Umweltverträglichkeitsprüfung New England Press Association, eine Nachrichtenagentur mit Sitz in Boston, Massachusetts, USA Nepa ist: eine Gattung aus der Familie der Skorpionswanzen NEPA"} {"text": "[HI Wikipedia] चम्पावत की आदमखोर बाघिन\n\nचम्पावत की आदमखोर बाघिन जिम कार्बेट का प्रथम शिकार थी जिसका वर्णन उन्होंने अपनी पुस्तक \"कुमाओं के नरभक्षी \"में किया है। जिम कार्बेट चम्पावत जिला"} {"instruction": "Create an array from 0 to n-1.", "input": "n = 10", "output": "arr = [x for x in range(0, n)] print(arr)"} {"instruction": "Implement a program in Python to separate odd and even numbers in separate arrays.", "input": "", "output": "def separate_odd_even(arr):\n odd = []\n even = []\n for num in arr:\n if num % 2 == 0:\n even.append(num)\n else:\n odd.append(num)\n return odd, even"} {"instruction": "Output the sum of numbers in a list in Python.", "input": "[1, 2, 3, 4, 5]", "output": "def list_sum(inpList):\n sum = 0\n for num in inpList:\n sum += num\n return sum\n\nprint(list_sum([1, 2, 3, 4, 5]))"} {"instruction": "Write a Python program to generate an encrypted version of the given string using Caesar’s Cipher.", "input": "string='Hello World'", "output": "def encrypt(string, key): \n # Create an empty output string \n output = \"\" \n \n # For each character in the given string \n for char in string: \n # Convert to ASCII value \n char_ascii = ord(char) \n \n # Add the key (shift) \n shifted = char_ascii + key \n \n # Convert to character \n output += chr(shifted) \n \n # Return the output string \n return output"} {"instruction": "Optimize a Python program to reverse an array in place.", "input": "[1, 2, 3, 4]", "output": "def reverse_in_place(arr):\n low = 0\n high = len(arr) - 1\n while low < high:\n arr[low], arr[high] = arr[high], arr[low]\n low += 1\n high -= 1\n return arr\n\narr = [1, 2, 3, 4]\nprint(reverse_in_place(arr))"} {"text": "[CS Wikipedia] Neuilly-sur-Seine\n\nNeuilly-sur-Seine (výslovnost: [nœji syʀ sɛn]) je město ležící na severozápadní hranici Paříže (asi 6,8 km od centra); spadá pod departement Hauts-de-Seine, region Île-de-France. Spolu se 6., 7. a 8. obvodem patří k nejhustěji obydleným čtvrtím Paříže a obydleným obcím v Evropě. Geografie Město se skládá z 11 místních částíː Bagatelle, Borghèse-Hugo, Duc d'Orléans, Dulud-Laffitte, Gouraud, Jatte, Longchamp, Peretti, Perronet-Chézy, Sablons a Saussaye, most přes řeku Seinu je spojuje s pařížskou čtvrtí Défense. Historie Osadu založili Galové, Římané ji podle přístavu nazývali Portus de Lulliaco. Ve středověku se město nejprve nazývalo Lugniacum (1224), poté Luingni (1226), složené slovo znamená les (lun) a bažinatá pláň (noue). Další změny jména následovaly na Nully (1316) a Nullacum (1379). Král František I. si dal v letech 1528-1533 postavit renesanční zámek Madrid, který byl zbořen roku 1792, dochoval se z něj jen název bulváru Boulevard du Château. Druhý královský zámek (château de Neuilly), byla rozsáhlá barokní rezidence s parkem vévodů orléanských, postavená v letech 1751-1755. Byl vypálen a vydrancován během únorové revoluce roku 1848, král Napoleon III. dal roku 1852 areál rozdělit na 700 stavebních parcel a sedm bulvárů, jediné zachovalé křídlo bylo adaptováno pro katolickou školu, pak chudobinec a v letech 1907-1909 přestavěno na klášter s kaplí Kongregace sester sv. Tomáše z Villanovy. Až do roku 1606 sem fungovala jen lodní doprava přes Seinu. Špatně naložený trajekt, který 9. června 1606 vezl krále Jindřicha IV. a královnu Marii Medicejskou ze Saint-Germain-en-Laye, se převrhl a královnu ze Seiny museli tahat za vlasy. Jindřich IV. dal ještě téhož roku postavit přes Seinu dřevěný most. Ludvík XV. jej dal nahradit 219 m dlouhým kamenným obloukovým mostem, který byl otevřen 22. září 1772. Byl předchůdcem dnešního 250 metrů dlouhého mostu. Roku 1768 zde lékárník Antoine Parmentier jako první začal pěstovat brambory. V roce 1880 zde slavný pařížský chemik Jean-François Houbigant otevřel parfumerii s vlastní laboratoří, tehdy nejmodernější ve Francii. V roce 1919 zde byla uzavřena Neuillyská smlouva, upravující hranice Bulharska, poraženého v 1. světové válce. V letech 1983—2002 zde byl starostou pozdější francouzský prezident Nicolas Sarkozy. Vývoj počtu obyvatel Počet obyvatel Doprava Neuilly je obsluhováno linkou 1 pařížského metra, od roku 2022 také příměstskými vlaky RER . Říční doprava slouží spíše rekreačním účelům. Památky Novogotický kostel sv. Petra (1887) Novorenesanční budova radnice (1886) Synagoga, ze 20. let 20. století Park Folie Saint James s palácem Clauda Baudarda, barona ze Saint James; s antikizujícími stavbami a nyní pustým pavilonem kabinetu přírodních kuriozit (1777-1780) Park de Bagatelle Novorenesanční Villa Thouret…"} {"text": "[EN Wikipedia] Amore & Vita\n\nAmore & Vita () is a continental cycling team founded in 1989. It is registered in Ukraine and it participates in UCI Continental Circuits races. Team history The team's origins date to 1948 when Lorenzo Fanini founded an amateur cycling team. The team website states it is \"the oldest professional cycling team in the world.\" In 1984, the team turned professional and was renamed Fanini–Wührer. In 1989, during an audience at the Vatican with Pope John Paul II, the manager, Ivano Fanini, had his riders appearing in jerseys with the slogan \"No to Abortion\". Subsequently, the team was renamed Amore e Vita, \"Love and Life\" or \"Love for Life\". Chad Gerlach rode with the team in 2009 after years of homelessness and addiction preceded by promising career. In 2004, the team bikes featured a crucifix on the handlebars. Doping violations During the Tour de Suisse in 1999, Fanini fired Timothy Jones and Massimo Gimondi after they failed hematocrit tests. Fanini offered David Millar and Jesús Manzano team spots in 2004 after they confessed to doping. After Riccardo Riccò was fired by Vacansoleil for doping violations in 2011, Fanini offered him a spot on the team if he accepted \"penitential confinement\". The conditions included removing his earrings, piercings and the diamond embedded in his tooth. Both sides could not agree on the deal and Ricco joined Meridiana–Kamen. On 6 June 2014, Luca Benedetti gave an adverse analytical finding for Darbepoetin (dEPO), was suspended from competing and later banned for life. Team roster Major wins 1989 GP Industria & Artigianato di Larciano, Edward Salas Trofeo Matteotti, Roberto Pelliconi Trofeo Laigueglia, Pierino Gavazzi Gran Premio Industria e Commercio di Prato, Pierino Gavazzi 1990 Stage 5 Giro d'Italia, Fabrizio Convalle 1992 Stage 1 Tour de Suisse, Alessio Di Basco 1993 Giro dell'Appennino, Giuseppe Calcaterra 1994 Stage 1 Tour de Suisse, Gianluca Pierobon Overall Settimana Internazionale di Coppi e Bartali, Rodolfo Massi Stage 15 Vuelta a España, Alessio Di Basco Stage 18 Vuelta a España, Giuseppe Calcaterra 1996 Stage 2 Giro d'Italia, Glenn Magnusson Stage 17 Giro d'Italia, Nicolaj Bo Larsen 1997 road race championships, Nicolaj Bo Larsen time trial championships, Dario Andriotto Stage 5 Circuit de la Sarthe, Filippo Meloni Overall Tour de Normandie, Glenn Magnusson Stage 13 Giro d'Italia, Glenn Magnusson Gran Premio Nobili Rubinetterie, Dario Andriotto 1998 road race championships, Timothy Jones Overall Tour de l'Ain, Cristian Gasperoni Stage 3, Alessio Galletti Stage 9 Giro d'Italia, Glenn Magnusson 1999 Stage 9 Vodacom Rapport Toer, Gilberto Zattoni Overall Tour of Slovenia, Timothy Jones Stage 5, Timothy Jones Stage 10 Tour de Suisse, Maurizio De Pasquale Gran Premio Industria e Commercio Artigianato…"} {"text": "[HI Wikipedia] दूझे​\n\nदूझे​ () चीनी भाषा में जनवादी गणतंत्र चीन से छपने वाली सामान्य दिलचस्पी की एक पत्रिका है। यह चीन में सबसे ज़्यादा बिकने वाली पत्रिका है और इसमें नए लेख, अन्य पत्रिकाओं से लिए गए लेख, लघु कहानियाँ, पुस्तकों के अंश, लतीफ़े, इत्यादि छापे जाते हैं। इसका प्रकाशन १९८१ में लान्झू शहर में शुरू हुआ था और इसे 'गांसू जन प्रेस' छापती है। सन्दर्भ चीनी भाषा पत्रिकाएँ चीन की पत्रिकाएँ"} {"instruction": "Write a proper open-ended text classification model in Python.", "input": "", "output": "import pandas as pd\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.naive_bayes import BernoulliNB\n\n# preprocess and load the data\ndata = pd.read_csv('Dataset.csv')\nX = data['text']\ny = data['label']\n\nvectorizer = CountVectorizer(binary= True)\nX = vectorizer.fit_transform(X)\n\n# Split the data\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size= 0.3)\n\n# Train the model\nmodel = BernoulliNB()\nmodel.fit(X_train, y_train)\n\n# Evaluate the model\naccuracy = model.score(X_test, y_test)\nprint('Accuracy:', accuracy)"} {"instruction": "Draft an HTML page with a table that contains three columns and two rows.", "input": "", "output": " Table Example
    Column 1 Column 2 Column 3
    Row 1 Data 1 Row 1 Data 2 Row 1 Data 3
    Row 2 Data 1 Row 2 Data 2 Row 2 Data 3
    "} {"instruction": "Write a SQL statement to select all rows in a table.", "input": "Table name: student_info", "output": "SELECT * FROM student_info;"} {"instruction": "Write a function in JavaScript which takes an array of numbers and returns the average of all the numbers.", "input": "", "output": "function getAverage(arr) { let sum = 0; for (let i = 0; i < arr.length; i++) { sum += arr[i]; } return sum / arr.length; }"} {"instruction": "Develop a Python script to automate the web application UI testing.", "input": "", "output": "import unittest\nfrom selenium import webdriver\n\nclass LoginForm(unittest.TestCase):\n\n def setUp(self):\n self.driver = webdriver.Firefox()\n self.driver.get('http://example.com/login')\n\n def test_login_form(self):\n username_field = self.driver.find_element_by_name('user[username]')\n username_field.send_keys('bob')\n password_field = self.driver.find_element_by_name('user[password]')\n password_field.send_keys('s3cr3t')\n password_field.submit()\n\n # Check that we are now logged in\n welcome_message = self.driver.find_element_by_xpath('//*[contains(text(), \"Welcome, bob\")]')\n self.assertTrue(welcome_message)\n\n def tearDown(self):\n self.driver.quit\n\nif __name__ == '__main__':\n unittest.main()"} {"instruction": "Generate a classification network in a deep learning framework.", "input": "", "output": "import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Activation model = Sequential() model.add(Dense(64, input_dim = 8)) model.add(Activation('relu')) model.add(Dense(16)) model.add(Activation('sigmoid')) model.add(Dense(2)) model.add(Activation('softmax')) model.compile(loss = 'categorical_crossentropy', optimizer = 'adam', metrics = ['accuracy'])"} {"instruction": "Create a Python program to sort a list of numbers from lowest to highest.", "input": "[5, 2, 3, 7, 4]", "output": "def sort_list(numbers): \n numbers.sort() \n return numbers \n \n# Driver code \nnumbers = [5, 2, 3, 7, 4]\nprint(sort_list(numbers))"} {"text": "[CS Wikipedia] Druhá vláda Oldřicha Černíka\n\nDruhá vláda Oldřicha Černíka existovala v období od 1. ledna 1969 do 27. září 1969. Jednalo se o první československou federální vládu. Seznam členů vlády Předseda vlády: Oldřich Černík Místopředseda vlády: Peter Colotka, do 30. 1. 1969 Samuel Falťan František Hamouz Václav Valeš Karol Laco, od 30. 1. 1969 Ministr zahraničních věcí: Ján Marko Ministr národní obrany: Martin Dzúr Ministr vnitra: Jan Pelnář Ministr plánování: František Vlasák Ministr financí: Bohumil Sucharda Ministr zahraničního obchodu: Ján Tabaček Ministr práce a sociálních věcí: Michal Štanceľ Ministr - předseda Výboru pro ceny: Jiří Typolt Ministr - předseda Výboru pro technický a investiční rozvoj: Miloslav Hruškovič Ministr - předseda Výboru pro průmysl: Josef Krejčí Ministr - předseda Výboru pro zemědělství a výživu: Koloman Boďa Ministr - předseda Výboru pro dopravu: František Řehák Ministr - předseda Výboru pro tisk a informace: Jaroslav Havelka Ministr - předseda Výboru pro pošty a telekomunikace: Milan Smolka Ministr bez portfeje: Bohuslav Kučera (ČSS) Jan Pauly (ČSL) Státní tajemník v ministerstvu zahraničních věcí: Václav Pleskot Státní tajemník v ministerstvu vnitra: Ján Majer Státní tajemník v ministerstvu plánování: Ján Kraus Státní tajemník v ministerstvu financí: Jozef Gajdošík Státní tajemník v ministerstvu zahraničního obchodu: Ludvík Úbl Státní tajemník v ministerstvu práce a sociálních věcí: Vlasta Brablcová Státní tajemník v ministerstvu národní obrany: Václav Dvořák, od 16. 1. 1969 Odkazy Reference Literatura Kdo byl kdo v našich dějinách ve 20. století Související články Vláda Stanislava Rázla, Vláda Josefa Kempného a Josefa Korčáka - tehdejší vlády ČSR Vláda Štefana Sádovského a Petera Colotky - tehdejší vláda SSR Ústavní zákon o československé federaci Federální shromáždění Externí odkazy Složení slibu členů vlády v Československém filmovém týdeníku Vláda České republiky Černík Černík Černík Černík"} {"instruction": "Write a SQL query to find the average score of students who are aged between 20 and 23.", "input": "", "output": "SELECT AVG(score) FROM students WHERE age BETWEEN 20 AND 23;"} {"instruction": "What kind of data structure is used for a queue in Java?", "input": "", "output": "A queue in Java is typically implemented using a linked list or an array."} {"instruction": "Write a TensorFlow script to build a 3-layer neural network classifier.", "input": "", "output": "import tensorflow as tf #Create placeholders X = tf.placeholder(tf.float32, [None, 784]) y = tf.placeholder(tf.float32, [None, 10]) #Create first layer W1 = tf.Variable(tf.truncated_normal([784, 300], stddev=0.1)) b1 = tf.Variable(tf.zeros([300])) A1 = tf.nn.relu(tf.add(tf.matmul(X, W1), b1)) #Create second layer W2 = tf.Variable(tf.truncated_normal([300, 100], stddev=0.1)) b2 = tf.Variable(tf.zeros([100])) A2 = tf.nn.relu(tf.add(tf.matmul(A1, W2), b2)) #Create third layer W3 = tf.Variable(tf.truncated_normal([100, 10], stddev=0.1)) b3 = tf.Variable(tf.zeros([10])) A3 = tf.nn.sigmoid(tf.add(tf.matmul(A2, W3), b3)) #Define cross-entropy loss loss = tf.reduce_mean(-tf.reduce_sum(y*tf.log(A3), reduction_indices=[1])) #Define the accuracy correct_prediction = tf.equal(tf.argmax(A3,1), tf.argmax(y,1)) accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32)) #Train the model train_op = tf.train.AdamOptimizer(1e-4).minimize(loss)"} {"text": "[HI Wikipedia] वितरणानुसार विश्व के समाचारपत्रों की सूची\n\nयह औसत वितरण के आधार पर दुनिया के दैनिक समाचारपत्रों की सूची है। इन आंकड़ों के स्रोत 'वितरण परिक्षण संस्थानों के विश्व संघ' (International Federation of Audit Bureaux of Circulations) और 'अख़बार​ व समाचार प्रकाशकों की अंतर्राष्ट्रीय सभा' (World Association of Newspapers and News Publishers) हैं। इस सूची में मुफ़्त समाचारपत्रों को सम्मिलित नहीं किया गया है। कुछ आंकड़ों को लेकर विवाद है, मसलन कुछ जापानी अख़बारों पर अपनी वितरण संख्याओं को बढ़ा-चढ़ाकर बताने का आरोप डाला गया है। सर्वोच्च 100 समाचारपत्र सन्दर्भ समाचारपत्र"} {"text": "[CS Wikipedia] Héctor Scarone\n\nHéctor Pedro Scarone Beretta (26. listopadu 1898 – 4. dubna 1967) byl uruguayský fotbalista. Hrával na pozici útočníka. S uruguayskou fotbalovou reprezentací vyhrál první mistrovství světa roku 1930 (Scarone v all-stars týmu turnaje) a také fotbalový turnaj olympijských her v letech 1924 a 1928, tedy v době, kdy šlo o nejuznávanější mezinárodní fotbalovou soutěž světa. Čtyři zlaté medaile má též z mistrovství Jižní Ameriky (1917, 1923, 1924, 1926). Celkem za národní tým odehrál 52 utkání, v nichž vstřelil 31 gólů. S Nacionalem Montevideo se stal osmkrát uruguayským mistrem (1916, 1917, 1919,1920, 1922, 1923, 1924, 1934). Po skončení hráčské kariéry se krátce pokoušel o trenérskou dráhu, v letech 1951–1952 například vedl Real Madrid. Externí odkazy Portrét na Planet World Cup Portrét na World Football Legends Statistiky RSSSF Uruguayští olympijští vítězové ve fotbale Fotbaloví útočníci Mistři světa ve fotbale Fotbalisté Club Nacional de Football Fotbalisté FC Barcelona Fotbalisté Interu Milán Narození v roce 1898 Úmrtí v roce 1967 Narození 26. listopadu Úmrtí 4. dubna Muži Narození v Montevideu Úmrtí v Montevideu Uruguayští fotbaloví trenéři Trenéři Nacionalu Montevideo Hráči Mistrovství světa ve fotbale 1930"} {"text": "[DE Wikipedia] Landesärztekammer Hessen\n\nAls Körperschaft des öffentlichen Rechts vertritt die Landesärztekammer Hessen (LÄKH) die beruflichen Belange ihrer Mitglieder auf allen Gebieten ärztlicher Berufsausübung. Sie überwacht die Einhaltung der Berufspflichten der hessischen Ärzteschaft und bietet als Dienstleister Beratung, Information und Hilfe. Die Aufgaben werden unter anderem durch § 5 Abs. 1 des Hessischen Heilberufsgesetz definiert. Rechtsaufsichtsbehörde ist das Hessische Ministerium für Soziales und Integration. Organisation Verwaltung und Aufbau Die LÄKH hat ihren Sitz in Frankfurt am Main. Sie ist neben den Standorten ihrer Bezirksärztekammern auch in Bad Nauheim präsent, da sich dort die Carl-Oelemann-Schule und die Akademie für Ärztliche Fort- und Weiterbildung der LÄKH befinden. Geschäftsbereiche Das Präsidium der LÄKH führt die laufenden Geschäfte, sie bedient sich hierbei der Geschäftsführer. Die LÄKH ist in drei Geschäftsbereiche untergliedert: Ärztlicher Geschäftsbereich Kaufmännischer Geschäftsbereich Justitiariat Bezirksärztekammern Die LÄKH hat gemäß § 13 ihrer Hauptsatzung sechs Bezirksärztekammern: Darmstadt Frankfurt Gießen Kassel Marburg Wiesbaden Der Bezirksärztekammer gehören die in ihrem Bereich tätigen Kammermitglieder und die jeweiligen freiwilligen Mitglieder an. Die Bezirksärztekammern führen Verzeichnisse über die in ihren Bereichen tätigen Berufsangehörigen. Die Bezirksärztekammern werden im Rahmen der Aufgaben der Landesärztekammer Hessen nach deren Anweisung tätig. Mitgliedschaft Nach dem Hessischen Heilberufsgesetz, der Hauptsatzung der LÄKH und der Meldeordnung der LÄKH wird zwischen einer Pflichtmitgliedschaft und einer freiwilligen Mitgliedschaft unterschieden. Jedes Mitglied unterliegt der Berufsordnung der Ärzte in Hessen. Pflichtmitgliedschaft Jede Ärztin / jeder Arzt ist bei Ausübung einer ärztlichen Tätigkeit in Hessen gemäß o. g. Rechtsvorschriften Pflichtmitglied der Landesärztekammer Hessen. Die Pflichtmitgliedschaft besteht nach Aufnahme der ärztlichen Tätigkeit, die Fristen zur Anmeldung sind gesetzlich geregelt. Die Mitgliedschaft wird bei der zuständigen Bezirksärztekammer beantragt. Welche Bezirksärztekammer zuständig ist, ergibt sich aus dem Dienstort der Haupttätigkeit (vgl. auch die Informationen zur Mitgliedschaft der LÄKH). Freiwillige Mitgliedschaft Sollte eine Ärztin / ein Arzt keiner ärztlichen Tätigkeit nachgehen und dabei ihren / seinen Hauptwohnsitz in Hessen haben, so kann sie / er freiwilliges Mitglied werden. Wichtig in diesem Zusammenhang ist, dass dies nicht in jedem Bundesland so geregelt ist. In einigen Bundesländern besteht Pflichtmitgliedschaft für Ärzte, unabhängig von einer tatsächlichen ärztlichen Tätigkeit. Eine freiwillige Mitgliedschaft wird in Hessen ebenfalls über die zugehörige Bezirksärztekammer beantragt.…"} {"instruction": "Using the list of numbers, create a function to sort the list into ascending order.", "input": "numbers = [6, 4, 3, 2, 8]", "output": "def sort_ascending(numbers): numbers.sort() return numbers"} {"text": "[CS Wikipedia] Záhon\n\nZáhon je plocha v zahradě, nebo parku určená na zpravidla dočasnou výsadbu rostlin. Květinové záhony mohou na jednu sezónu vytvořit barevný obrazec. Záhon v okrasné zahradě nebo parku je prvek úpravy zahradní architektury používaný podle zásad sadovnické tvorby. Zeleninové záhony jsou určeny k pěstování zeleniny. Některé druhy zeleniny byly vyšlechtěny pro použití jako okrasné rostliny. Hlavní u koncepce okrasného záhonu však není druh rostliny, ale invence autora a péče o rostliny, proto můžete dekorativně zapůsobit na oko diváka i záhonem salátu, nebo zelí. Moderní zahradnictví používá do květinových záhonů menší kompaktní rostliny, které kvetou rovnoměrně a spolehlivě. Jsou pěstovány především pro použití ve velkých ornamentech, kde je jednotnost a předvídatelnost (kvetení v termínu) nesmírně důležité. Často takto šlechtěné rostliny ztratí individuální rysy, což kritizoval například Christopher Lloyd, který prosadil neformální styl podestýlky. Druhy květinových záhonů Záhony, jak jsou používány v parcích a velkých zahradách, kde celé květinové záhony jsou znovu osázeny dvakrát nebo třikrát do roka, jsou nákladné a na pracovní čas náročné ozdobné prvky. Což je důvod, proč jsou stále vzácné. Výhodou záhonů je relativně snadné odplevelení po sezóně porytím. Podle složení Na záhony můžeme použít jak trvalky, tak letničky, nebo jako doplněk i zasenkované nádoby s tropickými rostlinami. K použití jednotlivých druhů letniček a jejich kombinace s cibulovinami, hlíznatými rostlinami a trvalkami je třeba znát jejich nároky a vlastnosti. Záhon, který je ozdobou pouze krátké období a péči vyžaduje celý rok, tak jak je tomu u trvalkových záhonů, není nejlepší kombinací, (pokud nejde právě o důležitý termín na který jsou kvality kvetení vyžadovány). Podle kvetení Na jaře kvetoucí záhony Rostliny používané na jaře pro kvetoucí záhony jsou často dvouletky (Vysévané jeden rok, kvetou další), nebo trvalky. Jarní cibuloviny, například se často používají tulipány a narcisy, obvykle se kombinují s pomněnkami (Myosotis), nebo s maceškami (Viola × wittrockiana). Jarní cibuloviny lze tepelnou úpravou (zchlazením na 9 °C nebo 5 °C ) termínovat pro kvetení na určitou dobu (± 2 týdny). Takové cibule jsou velmi žádané na slavnostní akce kdy jsou záplavy květů v záhonech a nebo obrazce z množství květů atraktivním doplňkem. Po odkvetení se cibule buď do začátku léta nechají v záhonech „zatáhnout“ a vyjmou se a uskladní (pokud nemají zůstat v zemi), nebo se odstraní jako odpad. Trvalky naopak zůstávají na stanovišti celý rok. Proto jsou zvláště ceněné trvalky, které jsou kromě kvetení dekorativní třeba zajímavě tvarovanými, nebo zbarvenými listy, či aspoň atraktivními plody. Jarní cibuloviny pro na jaře kvetoucí záhony Modřenec Narcis (rostlina) Sněženka Bledule Šafrán…"} {"text": "[HI Wikipedia] स्वीडन\n\nस्वीडन (स्वीडिश: Konungariket Sverige कूनुङारीकेत् स्वेरिये) यूरोपीय महाद्वीप में उत्तर में स्केंडिनेविया प्रायद्वीप में स्थित एक देश है। स्टॉकहोल्म इसकी राजधानी और सबसे बड़ा शहर है। स्वीडिश भाषा इसकी मुख्य और राजभाषा है। यहाँ एक संवैधानिक और लोकतान्त्रिक राजतन्त्र है। स्वीडन के पश्चिम एवं उत्तर में नॉर्वे, पूर्व में फ़िनलैंड तथा दक्षिण में डेनमार्क स्थित हैं। स्वीडन का पूरा क्षेत्रफल 528447 वर्ग किलोमीटर का है, जिसमे से 407340 वर्ग किलोमीटर थल क्षेत्र, 40080 वर्ग किलोमीटर में नदियाँ और झील तथा 81027 वर्ग किलोमीटर समुद्र क्षेत्र है। इस तरह यह यूरोपियन यूनियन में तीसरा सबसे बड़ा देश है। यहाँ की जनसँख्या वर्तमान में लगभग एक करोड़ दस लाख है। भूगोल स्वीडन, उत्तरी यूरोप के बाल्टिक सागर और बोथनिया की खाड़ी के पश्चिम में स्थित है, जो इसे एक लंबी तटरेखा प्रदान करता है, और स्केंडिनेविया प्रायद्वीप के पूर्वी हिस्से को बनाता है। पश्चिम में स्कैंडिनेवियाई पर्वत श्रृंखला (स्कैंडरना) है, जो स्वीडन को नॉर्वे से अलग करती है। फिनलैंड इसकेउत्तर-पूर्व में स्थित है। इसकी डेनमार्क, जर्मनी, पोलैंड, रूस, लिथुआनिया, लातविया और एस्टोनिया के साथ समुद्री सीमाएं हैं, और यह ओरेसंड ब्रिज द्वारा डेनमार्क (दक्षिण-पश्चिम) से जुड़ी हुई है। इसकी नॉर्वे के साथ सीमा (1,69 किमी लंबी) यूरोप के भीतर सबसे लंबी है। 449,964 किमी2 (173,732 वर्ग मील) क्षेत्रफल के साथ, स्वीडन दुनियाँ का 55वां सबसे बड़ा देश है, यह यूरोप में चौथा और उत्तरी यूरोप में सबसे बड़ा देश है। स्वीडन में सबसे कम ऊंचाई समुद्र तल से -2.41 मीटर (-7.91 फीट) पर क्रिस्टियानस्टेड के पास, हम्मरज़ोन झील के खाड़ी है। उच्चतम बिंदु समुद्र तल से 2,111 मीटर (6,926 फीट) पर केबनेकाइज है। संस्कृति, भूगोल और इतिहास के आधार पर स्वीडन को 25 प्रांत या भूस्खलन में बाटा गया है। प्रांतों को आमतौर पर तीन बड़े भूमि क्षेत्रों, उत्तरी नॉरलैंड, केंद्रीय स्वेलैंड और दक्षिणी गौतालैंड में समूहीकृत किया गया है। स्वीडन के कुल भूमि क्षेत्र का लगभग 65% वनों से ढका हुआ है। गॉटलैंड और ओलैंड स्वीडन के सबसे बड़े द्वीप हैं और वानर्न और वाटरर्न इसकी सबसे बड़ी झीलें हैं। जनसांख्यिकी 31 मार्च 2018 तक स्वीडन की कुल आबादी 10,142,686 थी। स्वीडन के सांख्यिकी विभाग अनुसार, 12 अगस्त 2004 को पहली बार जनसंख्या बढ़कर 9 मिलियन हो गई और 2012 के वसंत तक यह 9.5 मिलियन से अधिक हो गई। जनसंख्या घनत्व 22.5 लोग प्रति वर्ग² (58.2 प्रति वर्ग मील) है, और यह उत्तर की तुलना में दक्षिण में काफी अधिक है। 85% आबादी शहरी क्षेत्रों में रहती है। राजधानी शहर स्टॉकहोम की जनसंख्या 950,000 है (शहरी क्षेत्र में 1.5 मिलियन और महानगरीय क्षेत्र में 2.3 मिलियन)। दूसरे और तीसरे सबसे बड़े शहर गोथनबर्ग और मालमो हैं। नॉरलैंड, जो लगभग 60% स्वीडिश क्षेत्र को कवर करता है, में बहुत कम जनसंख्या घनत्व है (5 लोग प्रति वर्ग किलोमीटर के नीचे)। पहाड़ और दूरस्थ तटीय क्षेत्र अधिकांशतः गैर आबादी वाले हैं। 1820 से 1930 के बीच, लगभग 1.3 मिलियन स्वीडिश, देश की आबादी का एक तिहाई, उत्तरी अमेरिका में आ कर बस गए, जिनमें से अधिकांश संयुक्त राज्य अमेरिका में बसें। 2006 के अमेरिकी जनगणना ब्यूरो के अनुमान के अनुसार 4.4 मिलियन से…"} {"instruction": "Generate code in Python to print out the common elements of two sorted lists in linear time.", "input": "", "output": "def find_common_elements(list1, list2):\n common_elements = []\n i = 0\n j = 0\n while i < len(list1) and j < len(list2):\n if list1[i] == list2[j]:\n common_elements.append(list1[i])\n i += 1\n j += 1\n elif list1[i] > list2[j]:\n j += 1\n else:\n i += 1\n return common_elements"} {"instruction": "Optimize a Python script to find the maximum value of a series of numbers.", "input": "lst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "def find_max(lst):\n max_value = None\n for number in lst:\n if max_value is None or number > max_value:\n max_value = number\n return max_value\n\n# Main\nlst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nmax_value = find_max(lst)\nprint('The maximum value of the list is {}'.format(max_value))"} {"text": "[CS Wikipedia] Billboard (časopis)\n\nBillboard (The International Music-Record-Tape Newsweekly) je americký týdeník věnující se hudebnímu průmyslu a hudebním žebříčkům. Byl založen v roce 1894, v Los Angeles. Magazín informuje o hitparádách a příčkách; nejznámější hitparáda je zřejmě Billboard Hot 100, ve které jsou písničky bez ohledu na styl, ovšem závisí tu zde především na prodejnosti jednotlivých písní (případně singlů). Naproti tomu hitparáda Billboard 200 informuje o 200 nejprodávanějších alb. Grafy Billboardu stanovují míru popularity a významnosti jednotlivých děl a skupin. Od roku 2009 je Billboard v rukou obchodní skupiny e5 Global Media. Externí odkazy Billboard Americké hudební časopisy Vzniklo 1894"} {"instruction": "Write a JavaScript code to create a timer that counts down from 10.", "input": "", "output": "let countDown = 10; let interval = setInterval(() => { countDown--; if (countDown == 0) { clearInterval(interval); } }, 1000);"} {"instruction": "Write an algorithm in Python that finds the maximum of three numbers.", "input": "Not applicable", "output": "def find_max(a, b, c):\n if a > b and a > c:\n max_num = a\n elif b > a and b > c:\n max_num = b\n else:\n max_num = c\n \n return max_num\n \n max_number = find_max(7, 5, 9)\n \n print(\"The maximum of three numbers is:\", max_number)"} {"text": "[DE Wikipedia] Brunei Super League 2018/19\n\nDie Brunei Super League 2018/19 war die sechste Spielzeit der höchsten Fußballliga in Brunei. Organisiert wurde die Liga von der National Football Association of Brunei Darussalam. Titelverteidiger war MS ABDB. Die Saison startete mit dem ersten Spieltag am 26. Oktober 2018 und endete mit dem letzten Spieltag am 12. April 2019. Mannschaften Abschlusstabelle Stand: Saisonende 2018/19 |} Weblinks Brunei Super League 2018/19 in der Datenbank von soccerway.com Brunei Super League 2018/19 in der Datenbank der Rec.Sport.Soccer Statistics Foundation Einzelnachweise 201819 Fußballsaison 2018/19"} {"instruction": "Change the following program to use a try/except/finally block to handle errors.", "input": "def read_file(file): with open(file) as f: for line in f: print(line)", "output": "try: def read_file(file): with open(file) as f: for line in f: print(line) except IOError: print(\"Error: Could not read file\") finally: print(\"Closing file\") f.close()"} {"text": "[CS Wikipedia] T-buněčný receptor\n\nT-buněčný receptor (TCR, z anglického T-cell receptor) je molekula nacházející se na povrchu T-lymfocytů. Ve většině případů TCR rozpoznává antigenní peptidy prezentované na molekulách hlavního histokompatibilního komplexu (MHC). Signalizace přes TCR a s ním asociované molekuly (CD3 komplex, koreceptory) vede k aktivaci T-buňky a odpovědi na příslušný ligand. Struktura T-buněčný receptor svou strukturou připomíná Fab fragmenty imunoglobulinů. TCR je transmembránový heterodimer složený z řetězců α a β popřípadě γ a δ. Na každém řetězci lze rozlišit domény extracelulární (ta je největší), transmembránovou a intracelulární. Extracelulární část se nadále dělí na variabilní oblast (V), konstantní oblast (C) a stonkový segment. Variabilní oblast všech řetězců obsahuje tři hypervariabilní smyčky zvané CDR (Complemetarity Determining Regions). CDR oblasti jsou hlavními prostředníky interakce TCR s komplexem peptid:MHC (viz dále). Řetězec β navíc obsahuje čtvrtou hypervariabilní smyčku HV4. Konstantní domény obou řetězců spolu pravděpodobně interagují prostřednictvím uhlovodíkových zbytků z navázaných cukrů. Stonkový segment je charakteristický bohatým zastoupením cysteinových zbytků, díky nimž dochází ke vzniku disulfidických můstků mezi oběma řetězci heterodimeru. Rozdíl ve struktuře mezi receptory αβ a γδ je v úhlu, který svírají podélné osy variabilní a konstantní oblasti. Zatímco u γδ TCR je tento úhel přibližně 111°, úhel u αβ TCR je větší: 147°. Je možné, že tento rozdíl se může podílet na rozdílném přenosu signálu do buňky a odlišné interakci s koreceptory. Přestavba genů pro TCR TCR v genomu TCRα lokus leží na 14. chromozomu a obsahuje V (variable) a J (joining) genové segmenty (Vα, Jα). Lidské Vα obsahuje 70-80 segmentů, každému z nich předchází exon kódující vedoucí (Leader, L) sekvenci. L sekvence je po vstupu do endoplazmatického retikula (ER) odštípnuta.Za genovými segmenty kódující variabilní oblast leží shluk přibližně 60 segmentů kódujících Jα část. Konstantní část (Cα) je kódována jedním segmentem. TCRβ lokus leží na 7. chromozomu (u myši na 6. chromosomu) a je jinak organizován. Kromě Vβ a Jβ genových segmentů jsou součástí genu i segmenty kódující Dβ segmenty (diversity). Na chromozomu jsou genové segmenty uspořádány následovně: přibližně 52 funkčních Vβ segmentů je lokalizováno daleko od dvou separátních shluků (klastrů), z nichž každý obsahuje 1 Dβ, 6-7 Jβ a 1 Cβ. V případě řetězců α a β je CDR3 smyčka kódována segmenty D a J. Smyčky CDR1 a 2 segmentem V. CDR1 a CDR2 jsou méně variabilní, kontaktují méně variabilní oblast komplexu peptid:MHC, zatímco vysoce variabilní CDR3 oblast interaguje s unikátní peptidovou složkou TCR ligandu. TCRδ lokus leží mezi genovými segmenty Vα a Jα. Toto umístění způsobuje, že jakákoliv přestavba v α…"} {"instruction": "Create a CSS style sheet to change the font color of an heading to red.", "input": "", "output": "h1 { color: red; }"} {"instruction": "Create a function that will find the maximum length of increasing subarray in a list", "input": "list = [2, 3, 3, 1, 4, 5, 8, 4]", "output": "def longest_increasing_subarray(arr): max_length = 1 curr_length = 1 for i in range(1, len(arr)): if arr[i] > arr[i - 1]: curr_length += 1 else: if curr_length > max_length: max_length = curr_length curr_length = 1 if curr_length > max_length: max_length = curr_length return max_length"} {"instruction": "Offer a suggestion for increasing the performance of the following Python Script", "input": "def function(arg):\n for i in range(len(arg)):\n print(i)", "output": "def function(arg):\n for i in arg:\n print(i)"} {"instruction": "Optimize the following code to improve its runtime:\n```Python\nfor x in range(10):\n sum = 0\n for y in range(10):\n sum += y\n print sum\n```", "input": "Not applicable", "output": "sum = 0\nfor y in range(10):\n sum += y\nprint sum\nfor x in range(10):\n print sum"} {"instruction": "Create an HTML table containing 3 row and 3 column of text elements.", "input": "Table with 9 text elements", "output": "
    Text 1 Text 2 Text 3
    Text 4 Text 5 Text 6
    Text 7 Text 8 Text 9
    "} {"text": "[CS Wikipedia] Hendrik Adamson\n\nHendrik Adamson (6. října/24. září jul. 1891 Kärstna – 7. března 1946 Tuhalaane, Estonsko) byl esperantsky píšící estonský spisovatel a učitel. Jeho hlavním dílem je román Aŭli (Auli), o životě malého chlapce. Mezi jeho básnická díla patří sbírka (Večerní píseň). Mnoho jeho básní vyšlo na stranách revue a v antologii 12 esperantských básníků . Související články Esperantská literatura Externí odkazy Estonští básníci Estonští esperantisté Estonští spisovatelé Spisovatelé píšící esperantem Básníci tvořící v esperantu Narození v roce 1891 Narození 6. října Úmrtí v roce 1946 Úmrtí 7. března Muži"} {"instruction": "How does one go about creating a function in JavaScript?", "input": "", "output": "In JavaScript, functions are declared using the 'function' keyword followed by the name of the function and a pair of parentheses. The code for the function should be enclosed within curly brackets. For example: function addTwoNumbers(a, b) { return a + b; }"} {"instruction": "Write a code snippet in Python to split a string by its whitespaces.", "input": "string = \"This is a sample string\"", "output": "string = \"This is a sample string\"\nstr_list = string.split()\nprint(str_list)"} {"instruction": "Write a java code to calculate the sum of two numbers provided as input.", "input": "int num1 = 25; int num2 = 24;", "output": "int result = num1 + num2; System.out.println(result);"} {"instruction": "Given a set of points and an origin point, calculate the distance between the origin point and each point in the set.", "input": "[(1,1),(4,4),(3,3)] (0,0)", "output": "\"\"\" Given a set of points and an origin point, calculate the distance between the origin point and each point in the set \"\"\" import math def points_distance(points, origin): distances = [] for point in points: distances.append(math.sqrt((point[0]-origin[0])**2 + (point[1]-origin[1])**2)) return distances if __name__ == '__main__': print(points_distance([(1,1),(4,4),(3,3)], (0,0))) # [1.4142135623730951, 5.65685424949238, 4.242640687119285]"} {"instruction": "Create a web scraping script in Python that extracts all the users and their reviews from a page on TripAdvisor.", "input": "The URL of the page: https://www.tripadvisor.com/Hotel_Review-g469893-d13034369-Reviews-The_Fountainhead_Hotel-San_Fernando_Trinidad_Tobago.html", "output": "from lxml import html\nimport requests\n\nurl = \"https://www.tripadvisor.com/Hotel_Review-g469893-d13034369-Reviews-The_Fountainhead_Hotel-San_Fernando_Trinidad_Tobago.html\"\npage = requests.get(url)\n\ntree = html.fromstring(page.content)\nuser_names = tree.xpath('//a[@class=\"scrname\"]/text()')\nreview_texts = tree.xpath('//p[@class=\"partial_entry\"]/text()')\n\n# print user names and comments\nfor user_name, review_text in zip(user_names, review_texts):\n print(user_name, '\\n', review_text, '\\n\\n')"} {"instruction": "Write a Haskell program to convert a given string to an Integer.", "input": "string text = \"12345\"", "output": "stringToInt :: String -> Int stringToInt x = read x :: Int"} {"instruction": "Write a function to calculate all the possible paths for a N x N matrix.", "input": "", "output": "def calculate_paths(matrix): rows = len(matrix) cols = len(matrix[0]) dp = [[0 for _ in range(cols)] for _ in range(rows)] dp[0][0] = 1 for i in range(rows): for j in range(cols): if i-1 >= 0: dp[i][j] = dp[i][j] + dp[i-1][j] if j-1 >= 0: dp[i][j] = dp[i][j] + dp [i][j-1] return dp[rows-1][cols-1]"} {"instruction": "Design a neural network to recognize handwritten digits in Python.", "input": "Not applicable", "output": "import numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import layers\n\n# define the model\nmodel = tf.keras.Sequential()\nmodel.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)))\nmodel.add(layers.MaxPooling2D((2, 2)))\nmodel.add(layers.Conv2D(64, (3, 3), activation='relu'))\nmodel.add(layers.MaxPooling2D((2, 2)))\nmodel.add(layers.Conv2D(64, (3, 3), activation='relu'))\n\nmodel.add(layers.Flatten())\nmodel.add(layers.Dense(64, activation='relu'))\nmodel.add(layers.Dense(10, activation='softmax'))\n\n# compile the model\nmodel.compile(optimizer='adam',\n loss='sparse_categorical_crossentropy',\n metrics=['accuracy'])"} {"instruction": "Print prime numbers in the given range.", "input": "Lower range: 10 Upper range: 30", "output": "for num in range(10, 30 + 1): # prime numbers are greater than 1 if num > 1: for i in range(2, num): if (num % i) == 0: break else: print(num)"} {"instruction": "Modify the following Java code to reverse a given string.", "input": "public class SimpleStringReverser { public static String reverse(String str) { String result = \"\";", "output": "public class SimpleStringReverser { public static String reverse(String str) { String result = \"\"; for(int i = str.length() - 1; i >= 0; i--) { result += str.charAt(i); } return result; } }"} {"instruction": "Print out the names of even numbered elements from the given list.", "input": "list_of_names = [\"John\", \"Jacob\", \"Michael\", \"Peter\", \"Paul\"]", "output": "for i in range(0, len(list_of_names), 2): print(list_of_names[i])"} {"instruction": "Design a Python algorithm to determine if a given number x is a prime number.", "input": "", "output": "def is_prime(x):\n if x < 2:\n return False \n for i in range(2, int(x ** 0.5) + 1):\n if x % i == 0:\n return False\n return True"} {"instruction": "Given two binary trees, check if the first tree is subtree of the second tree.", "input": "", "output": "# Python program to check if \n# a binary tree is subtree of another binary tree \n \n# A binary tree node \nclass Node: \n \n # Constructor to create a new node \n def __init__(self, data): \n self.data = data \n self.left = None\n self.right = None\n \ndef isSubTree(T, S): \n \n if S is None: \n return True\n \n if T is None: \n return False\n \n if areIdentical(T, S): \n return True\n \n return isSubTree(T.left, S) or isSubTree(T.right, S) \n \n \ndef areIdentical(T, S): \n \n if T is None and S is None: \n return True\n \n if T is None or S is None: \n return False\n \n return (T.data == S.data and areIdentical(T.left, S.left)and\n areIdentical(T.right, S.right))"} {"instruction": "Rewrite the following code snippet so that it is compatible with Python 3", "input": "sum = 0 for num in range(10): sum = sum + num print sum", "output": "sum = 0 for num in range(10): sum += num print(sum)"} {"instruction": "Create a Python program to calculate the intersection points between two circles.", "input": "Circle 1: Center (0, 0) and Radius 3\nCircle 2: Center (3, 3) and Radius 6", "output": "\"\"\"\nCreate a Python program to calculate the intersection points between two circles\n\"\"\"\nimport math\n\ndef get_intersection(c1, c2):\n # Calculate center distance between two circles\n dist = math.sqrt((c1[0] - c2[0]) ** 2 + (c1[1] - c2[1]) ** 2)\n # Check if distances between centers is equal to or greater than sum of radius\n if dist >= (c1[2] + c2[2]):\n return None\n # Calculate the angle between two circles\n angle = math.acos(((c1[2] ** 2 + dist ** 2) - c2[2] ** 2) / (2 * c1[2] * dist))\n # Calculates the point P on the line segment which connects both the circles centers\n point_p = (\n c1[0] + c1[2] * math.cos(angle),\n c1[1] + c1[2] * math.sin(angle)\n )\n # Calculates the distance from point P to both circles intersection points\n dist_2 = math.sqrt((c1[2] ** 2) - (dist ** 2))\n # Calculates the intersection point\n intersection1 = (\n point_p[0] - dist_2 * (c2[1] - c1[1]) / dist,\n point_p[1] + dist_2 * (c2[0] - c1[0]) / dist\n )\n intersection2 = (\n point_p[0] + dist_2 * (c2[1] - c1[1]) / dist,\n point_p[1] - dist_2 * (c2[0] - c1[0]) / dist\n )\n return intersection1, intersection2\n\nif __name__ == \"__main__\":\n c1 = (0, 0, 3) # center 1 (x, y), radius\n c2 = (3, 3, 6) # center 2 (x, y), radius\n intersection = get_intersection(c1, c2)\n print(\"Intersection points: \", intersection)"} {"instruction": "Create an optimizer in Python to maximize the output of a given function.", "input": "", "output": "import numpy as np\n\ndef optimize(func, initial_params):\n params = initial_params\n best_params = None\n best_score = -np.inf\n while True:\n # Update current parameters\n params = update(params)\n # Calculate score\n score = func(params)\n # Check if improved result\n if score > best_score:\n best_params = params\n best_score = score\n # If result does not improve, exit loop\n else:\n break\n return best_params"} {"text": "[HI Wikipedia] फ़सल\n\nफसल या शस्य किसी समय-चक्र के अनुसार वनस्पतियों या वृक्षों पर मानवों व पालतू पशुओं के उपभोग के लिए उगाकर काटी या तोड़ी जाने वाली पैदावार को कहते हैं। मसलन गेंहू की फ़सल तब तैयार होती है जब उसके दाने पककर पीले से हो जाएँ और उस समय किसी खेत में उग रहे समस्त गेंहू के पौधों को काट लिया जाता है और उनके कणों को अलग कर दिया जाता है। आम की फ़सल में किसी बाग़ के पेड़ों पर आम पकने लगते हैं और, बिना पेड़ों को नुक्सान पहुँचाए, फलों को तोड़कर एकत्रित किया जाता है। जब से कृषि का आविष्कार हुआ है बहुत से मानवों के जीवनक्रम में फ़सलों का बड़ा महत्व रहा है। उदाहरण के लिए उत्तर भारत, पाकिस्तान व नेपाल में रबी की फ़सल और ख़रीफ़ की फ़सल दो बड़ी घटनाएँ हैं जो बड़ी हद तक इन क्षेत्रों के ग्रामीण जीवन को निर्धारित करती हैं। इसी तरह अन्य जगहों के स्थानीय मौसम, धरती, वनस्पति व जल पर आधारित फ़सलें वहाँ के जीवन-क्रमों पर गहरा प्रभाव रखती हैं। भारतीय फसलें तथा उनका वर्गीकरण भारतीय फसलों का वर्गीकरण भिन्न-भिन्न आधारों पर किया जा सकता है। नीचे कुछ आधारों पर भारतीय फसलों का वर्गीकरण दिया गया है। ऋतु आधारित रबी फसलें : गेहूँ, जौं, चना, सरसों, मटर, बरसीम, रिजका‌ - हरे चारे की खेती, मसूर, आलू, राई,तम्‍बाकू, लाही, जई, सूरजमुखी आदि जायद फसलें : कद्दू, खरबूजा, तरबूज, लौकी, तोरई, मूँग, खीरा, मिर्च, टमाटर, आदि ख‍रीफ फसलें : धान, बाजरा, मक्‍का, कपास, मूँगफली, शकरकन्‍द, उर्द, मूँग, मोठ लोबिया(चँवला), ज्‍वार, तिल, ग्‍वार, जूट, सनई, अरहर, ढैंचा, गन्‍ना, सोयाबीन,भिण्डी आदि जीवनचक्र पर आधारित एकवर्षीय फसलें : धान, गेहूँ, चना, ढैंचा, बाजरा, मूँग, कपास, मूँगफली, सरसों, आलू, शकरकन्‍द, कद्दू, लौकी, सोयाबीन द्विवर्षीय फसलें : चुकन्दर, प्‍याज बहुवर्षीय फसलें (Perennials) : नेपियर घास, रिजका, फलवाली फसलें उपयोगिता या आर्थिक आधार पर अन्‍न या धान्‍य फसलें (Cereals) : धान, गेहूँ, जौं, चना, मक्‍का, ज्‍वार, बाजरा, तिलहनी फसलें (Oilseeds) : सरसों, अरंडी, तिल, मूँगफली, सूरजमुखी, अलसी, , तोरिया, सोयाबीन और राई दलहनी फसलें (Pulses) : चना, उर्द, मूँग, मटर, मसूर, अरहर, मूँगफली, सोयाबीन मसाले वाली फसलें : अदरक, पुदीना, प्‍याज, लहसुन, मिर्च, धनिया, अजवाइन, जीरा, सौफ, हल्‍दी, कालीमिर्च, इलायची और तेजपत्ता रेशेदार फसलें (Fibres) : जूट, कपास, सनई, पटसन, ढैंचा चारा फसलें (Fodders) : बरसीम, लूसर्न (रिजका), नैपियर घास, लोबिया, ज्‍वार फलदार फसलें : आम, अमरूद, नींबू, लीची, केला, पपीता, सेब, नाशपाती, जड एवं कन्‍द (Roots & Tubers) : आलू, शकरकन्‍द, अदरक, गाजर, मूली, अरबी, रतालू, टेपियोका, शलजम उद्दीपक (Stimulants) : तम्बाकू, पोस्‍त, चाय, कॉफी, धतूरा, भांग शर्करा : चुकन्‍दर, गन्‍ना औषधीय फसलें (Medicinals) : पुदीना, मेंथा, अदरक, हल्‍दी, सफेद मूसली और तुलसी विशेष उपयोग आधारित नकदी फसलें (Cash Crops) : गन्‍ना, आलू, तम्‍बाकू, कपास, मिर्च, चाय, काफी, अन्‍तर्वती फसले (Catch Crops) : उर्द, मूँग, चीना, लाही, सांवा, आलू मृदा रक्षक फसलें (Cover Crops) : मूँगफली, मूँग, उर्द, शकरकन्‍द, बरसीम, लूसर्न (रिजका) हरी खाद : मूँग, सनई, बरसीम, ढैचां, मोठ, मसूर, ग्‍वार, मक्‍का, लोबिया, बाजराबरसीम की उन्नतशील प्रजातियां कौन-कौन सी है? बरसीम की मुख्य…"} {"text": "[HI Wikipedia] ओनिकोफोरा\n\nनखी या 'ओनिकोफोरा' (Onychophora) एक्डीसोजोवा संघ है जिसमें लगभग १८० जातियाँ हैं। परिचय 'ओनिकोफोरा' शब्द की व्युत्पत्ति ग्रीक भाषा से है। इसका अर्थ है 'नख रखनेवाले' 'नखी' (Gr. - Onychus claw+phorus - bearing)। इस समूह में चलकृमि (walking worms) आते हैं। ये छोटे नखर रखनेवाले प्राणी हैं, जिनके पैर में मुड़े हुए नखर रहते हैं। ये आर्थ्रोपोडा संघ (phylum) के प्राचीनतम, आकर्षक एवं विशिष्ट प्राणी हैं। इनकी प्रत्यक्ष प्राचीन आकृति ही आर्थ्रोपोडा का लक्षण है। साथ ही साथ ये आर्थ्रोपोडा संघ के शेष प्राणियों से इतने भिन्न हैं कि कुछ विशेषज्ञ इन्हें स्तवंत्र समूह में रखना पसंद करते हैं। इनमें वृक्कक (nephridium) ऐसी रचनाएँ भी होती हैं, जो खंडित कृमियों (ऐनिलिडा संघ) में पाई जाती हैं। इस तरह अनेक प्रकार से यह जंतु दो संघों (ऐनिलिडा और आर्थ्रोपोडा) को संबद्ध करने का कार्य करता है। ये स्थलचर प्राणी हैं। इनका बाह्यत्वक् कोमल और पतला होता है। सिर तीन खंडों का बना होता है, जो शरीर से भिन्न नहीं किया जा सकता। इन खंडों में से एक मुखपूर्व (pre-oral) और अन्य दो मुखपश्च (post oral) होते हैं। मुखपूर्ववाले खंड में एक जोड़ा शृंगिका और मुखपश्चवाले खंडों के क्रमानुसार एक जोड़ा हनु और एक जोड़ा मुखांकुरक रहता है। इनके नेत्र सरल वेसिकिल (vesicle) होते हैं। शरीर के सारे खंड समान और प्रत्येक में पार्श्वपाद की भाँति एक जोड़ा अखंडित अवयव होता है, जिसके अंत में दो हँसियाकार नखर होते हैं। हर खंड में एक जोड़ा उत्सर्गीं नलिका रहती है। श्वसन क्रिया श्वासनली द्वारा होती है, जिसके श्वासछिद्र सारे शरीर पर अव्यवस्थित रूप में बिखरे रहते हैं। देहगुहा रुधिरगुहा (haemo-coele) है और हृदयावरक गुहा में युग्मित, पार्श्विक, अपवाही रध्रं खुलते हैं। जननेंद्रियों में रोमिका (cilia) होती है और परिधान सीधे होता है। वर्गीकरण नखी समूह दो कुलों, (१) पेरिपैटिडी (Peripatidae) और (२) पेरिपटॉप्सिडी (Peripatopsidae), में विभाजित है। पेरिपैटिडी कुल में भूमध्यरेखीय प्राणी अंतर्भूत हैं, जिनमें २२ से लेकर ४३ जोड़े तक पाद होते हैं और इसमें चार वंश, पेरिपेटस (Peripatus), ओवोपेरिपेटस (Ovoperipatus), टिफ्लोपेरिपेटस (Typhloperipatus) तथा मेसोपेरिपेटस (mesoperipatus) सम्मिलित हैं। पेरिपटॉप्सिडी (Peripatopsidae) कुल में ऑस्ट्रलेशियन (Australasian) प्राणी हैं, जिनमें १४ से लेकर २५ जोड़े तक पाद होते हैं। इस कुल में पाँच वंश, पेरिपैटॉप्सिस (Peripatopsis), पेरिपैटॉयड्स (Peripatoids), ओओपेरिपेटस (Ooperipatus), ऑपिस्थोपेटस (Opisthopatus) और पैरापेरिपैटस (Paraperipatus) हैं। इस समूह में प्राणियों की संख्या अति अल्प हैं, किंतु सबकी रचना एक समान होती है। इसके लगभग सत्तर स्पीशीज़ (species) पाए जाते हैं, जिनका वितरण अविच्छिन्न रूप से विश्व के समस्त उष्ण प्रदेशों में है। ये अयनवृत्त संबंधी देशों, जैसे अफ्रीका, ऑस्ट्रेलिया, उत्तरी और दक्षिणी अमरीका, एशिया, वेस्ट इंडीज़, मलाया, सुमात्रा, भारत और कुछ अन्य प्रदेशों के जंगलों में पाए जाते है। इस समूह का स्थानीय प्रदेशों और संसार के विस्तीर्ण और पृथक् पृथक् भागों में पाया जाना इस तथ्य का द्योतक है कि संभवत: पुरातन काल में ये अधिक सफल और विस्तृत रूप में थे, किंतु अब ये क्रमश: लुप्त होते जा रहे…"} {"text": "[HI Wikipedia] अणुगति सिद्धांत\n\nप्रत्येक पदार्थ तीन अवस्थायों में पाया जाता है : (i) ठोस (ii) द्रव (iii) गैस | पदार्थ की विभिन्न अवस्थायों में अणुओं की गति भिन्न भिन्न प्रकार की होती है, अंतरा-अणुक दूरी भिन्न-भिन्न होती है तथा अंतरा-अणुक बल भी भिन्न-भिन्न होता है | इसीलिए पदार्थ की विभिन्न अवस्थायों में भौतिक गुण भी भिन्न-भिन्न होते हैं | उदाहरण के लिए, पदार्थ की ठोस अवस्था में उसका एक निश्चित आयतन व निश्चित आकृति होती है, द्रव अवस्था में उसका आयतन को निश्चित होता है लेकिन आकृति कोई निश्चित नहीं होती है तथा गैस अवस्था में न तो आयतन निश्चित होता है न ही आकृति | इन गुणों की व्याख्या अणुगति सिद्धांत द्वारा की जाती है | ठोस का अणुगति सिद्धांत : ठोस के गुणों की व्याख्या ठोस के अणुगति सिद्धांत द्वारा की जा सकती है, जो निम्न है - (1) ठोस के अणु एक नियमित क्रम में सजे होते हैं | प्रत्येक अणु की एक निश्चित अवधि होती है | ये अणु अपनी स्थिति के इधर उधर कम्पनिक गति करते रहते हैं, लेकिन अपना स्थान नहीं छोड़ते हैं | इसीलिए ठोस का आयतन तथा आकृति निश्चित होती है | (2) ठोस में अंतरा-अणुक दूरी बहुत कम होती है | सामान्यतः यह अंतरा-अणुक दूरी, द्रव के अपेक्षा कम होती है | (3) ठोस में अणुओं के बीच सर्वाधिक आकर्षण बल लगता है | इसी बल के कारण ठोस में अणु अपने स्थान पर बने रहते हैं तथा एक स्थान से दूसरे स्थान तक चलने के लिए स्वतंत्र नहीं होते हैं, बल्कि अपने स्थान पर रहकर ही इधर उधर कम्पनिक गति करते हैं | (4) ठोस को गर्म करने पर उसके अणुओं का दोलन आयाम बढ़ जाता है जिससे उनके बीच की औसत दूरी बढ़ जाती है अर्थात् ठोस का प्रसार हो जाता है | इसे ठोस का उष्मीय प्रसार कहते हैं | द्रव का अणुगति सिद्धांत : (1) द्रव में अणुओं की स्थिति निश्चित नहीं होती हैं, केवल वे द्रव के भीतर ही विभिन्न चालो से विभिन्न दिशाओं में अनियमित गति करते रहते हैं | (2) द्रव में अंतरा-अणुक दूरी प्राय ठोस से अधिक होती है, लेकिन गैस की अपेक्षा काफी कम होती है | (3) आकर्षण बल, गैस की अपेक्षा बहुत अधिक होता है, लेकिन ठोस की अपेक्षा बहुत कम होता है | (4) द्रव को गर्म करने पर उसके अणुओं के बीच की औसत दूरी बढ़ जाती है, जिससे द्रव का उष्मीय प्रसार कहते हैं | (5) द्रव को बहुत अधिक गर्म करते रहने पर एक ऐसी अवस्था आती है, जबकि अणुओं की औसत उर्जा इतनी बढ़ जाती है कि वे पारस्परिक आकर्षण बल को पार करके द्रव की सतह के बाहर जाने के लिए स्वतंत्र हो जाते हैं | इसे द्रव का वाष्पन कहते हैं | गैस का अणुगति सिद्धांत : (1) किसी गैस के सभी अणु समान, सुदृढ़ तथा अति-सूक्ष्म गोलाकार कण होते हैं | इनका आयतन, गैस के आयतन की तुलना में नगण्य होता है | (2) गैस के अणुओं की स्थित निश्चित नहीं होती | (3) गैस में अंतरा-अणुक दूरी सबसे अधिक होती है | (4) गैसों में अणुओं के बीच आकर्षण बल प्रायः नगण्य होता है | इसीलिए अणुओं की गति अनियमित होती है | भौतिकी की अवधारणाएँ"} {"text": "[HI Wikipedia] न्यूज़ीलैण्ड\n\nन्यूज़ीलैंड प्रशान्त महासागर में ऑस्ट्रेलिया के पास स्थित देश है। ये दो बड़े द्वीपों से बना है। न्यूज़ीलैंड (माओरी भाषा में: आऔतैआरौआ) दक्षिण पश्चिमि प्रशांत महासागर में दो बड़े द्वीप और अन्य कई छोटे द्वीपों से बना एक देश है। न्यूज़ीलैंड के ४० लाख लोगों में से लगभग तीस लाख लोग उत्तरी द्वीप में रहते हैं और दस लाख लोग दक्षिणी द्वीप में। यह द्वीप दुनिया के सबसे बडे द्वीपों में गिने जाते हैं। अन्य द्वीपों में बहुत कम लोग रहतें हैं और वे बहुत छोटे हैं। इनमें मुख्य है: स्टिवोट द्वीप (दक्षिण द्वीप के दक्षिण में स्थित), तीसरा सबसे बड़ा द्वीप, जनसन्ख्या ४०० इतिहास मुख्य लेख: न्यूजीलैंड का इतिहास राजनीती न्यूजीलैंड में सरकार एकात्मक संसदीय संवैधानिक राजतंत्र प्रणाली के अधीन है व् इस देश की सरकार महारानी एलिजाबेथ द्वितीय द्वारा शासित है, लेकिन इस देश में चुनाव होते है व् न्यूजीलैंड को चुनाव के द्वारा अपना प्राइम मिनिस्टर चुनने का अधिकार है. भूगोल दक्षिण पश्चिमी प्रशांत महासागर में स्थित एक खूबसूरत द्वीप देश है, जोकि प्रशांत महासागर में ऑस्ट्रेलिया के पूर्व में स्थित है. इस द्वीप की भौगोलिक स्थिति बेहद लाजवाब है व इसके दक्षिण में नई कैलेडोनिया, टोंगा और फिजी देश स्थित हैं। न्यूजीलैंड कई द्वीपों के समूह से बना देश है, जिसमें उत्तर और दक्षिण द्वीप सबसे बड़े और सबसे अधिक आबादी वाले द्वीप शामिल है, साथ ही इसके इस द्वीप का वातावरण व सुहावना मौसम विश्व भर के सैलानियों को अपनी और आकर्षित करता है। सन्दर्भ बाहरी कड़ियाँ न्यूजीलैंड से जुड़ी 22 जानकारियां"} {"instruction": "You are given two lists. Output a third list which contains only the elements common to both lists.", "input": "list1 = [1, 2, 3, 4, 5] list2 = [3, 4, 5, 6, 7]", "output": "list3 = [3,4,5]"} {"instruction": "Create a basic sentence classifer in Python using NLP. The classifier should be able to classify whether a sentence is about science, technology, or sports.", "input": "science and technology has revolutionized how we live", "output": "import nltk\nfrom nltk import word_tokenize\nfrom nltk.corpus import stopwords\nimport sklearn\nfrom sklearn.svm import SVC\n\n# Pre-process input for the classifier\ndef pre_process(sentence):\n stopwords_list = stopwords.words('english')\n tokens = word_tokenize(sentence)\n lower_tokens = [token.lower() for token in tokens if token not in stopwords_list]\n return lower_tokens\n\n# Create feature set using bag of words\ndef create_feature_set(sentence_list):\n feature_set = []\n for item in sentence_list:\n feature_set.extend([pre_process(item['sentence'])])\n return feature_set\n\n# Train the classifier\ndef train_classifier(sentence_list):\n feature_set = create_feature_set(sentence_list)\n targets = [item['category'] for item in sentence_list]\n svc = SVC(kernel='linear').fit(feature_set, targets)\n return svc\n\n# Test the classifier\ndef test_classifier(classifier, sentence):\n feature_set = pre_process(sentence)\n prediction = classifier.predict([feature_set])\n return prediction[0]\n\n# Train the classifier\nsentence_list = [\n {'sentence': 'I like playing football', 'category': 'sports'}, \n {'sentence': 'I like reading books', 'category': 'science'}, \n {'sentence': 'Data science is an interesting field', 'category': 'technology'}\n]\nclassifier = train_classifier(sentence_list)\n\n# Predict the sentence\nsentence = 'science and technology has revolutionized how we live'\nprediction = test_classifier(classifier, sentence)\nprint('Prediction:', prediction) #technology"} {"instruction": "Create a JavaScript code snippet to check the validity of a credit card number.", "input": "credit_card_number = ‘1234567891234567’", "output": "function validateCardNumber(credit_card_number) { // remove any non-digits var card_number = credit_card_number.replace(/\\D/g, ''); // add odd digits in even length strings or even digits in odd length strings var sum = 0; for (var i = 0; i < card_number.length; i++) { var intVal = parseInt(card_number.substr(i, 1)); if (i % 2 == 0) { intVal *= 2; if (intVal > 9) { intVal = 1 + (intVal % 10); } } sum += intVal; } // If the result is divisible by 10, the card number is valid return (sum % 10 == 0); } console.log(validateCardNumber(credit_card_number))"} {"text": "[DE Wikipedia] Haweswater Reservoir\n\nDas Haweswater Reservoir ist ein Stausee im nordenglischen Lake District. Der See verläuft in leicht gebogener Form von Süden nach Nordosten im Tal von Mardale und hat ein Fassungsvermögen von 28 Mio. m³. Beschreibung Ursprünglich gab es zwei natürliche Seen, High Water und Low Water. Durch den Bau der Staumauer wurde der Wasserspiegel um 29 Meter angehoben und es entstand ein sechs Kilometer langer und 600 Meter breiter See. Der umstrittene Bau der Staumauer wurde 1929 begonnen, nachdem das britische Parlament ein Gesetz verabschiedet hatte, das die Wasserversorgung in Nordwest-England und im Großraum Manchester sicherstellen sollte. Es gab umfangreiche Proteste gegen dieses Projekt, weil die im Tal von Mardale gelegenen Dörfer Measand und Mardale Green aufgegeben und geflutet werden sollten. Zusätzlich zählte man das Tal zu den landschaftlich besonders reizvollen Gegenden Westmorlands, so dass der Plan wenig Zustimmung in der Bevölkerung fand. Bevor man das Tal 1935 nach Fertigstellung der Bauarbeiten flutete, wurden alle Gebäude der Dörfer Measand und Mardale Green abgerissen, darunter das mehrere hundert Jahre alte Dun Bull Hotel in Mardale Green. Die Steine der Dorfkirche verwendete man mit zum Bau der Staumauer und die Gräber des Friedhofes wurden in den etwa zehn Kilometer weiter östlich gelegenen Ort Shap verlegt. Wenn der Wasserspiegel im Sommer sinkt, kann man heute noch die Überreste des Dorfes sehen. Die das Tal abschließende Staumauer ist 470 Meter lang und 27,5 Meter hoch und wird durch 44 Pfeiler gestützt. Sie galt zum Zeitpunkt der Erstellung als besondere technische Leistung, da sie die erste Pfeilerstaumauer der Welt in Hohlbauweise war. Der Bauherr, die Manchester Corporation, ließ eine neue Straße am Ostufer des Stausees bis zu dessen südlichem Ende bauen, wo das Dorf Mardale Green vor der Überflutung lag. Dort gibt es heute lediglich einen Parkplatz, der als Ausgangspunkt für Touren auf die umliegenden Berge Harter Fell, Branstree und High Street genutzt wird. Auf halbem Wege wurde das Haweswater Hotel als Ersatz für das alte Dun Bull Hotel gebaut. Heute gehört das Reservoir der United Utilities plc, einer Public Limited Company (Aktiengesellschaft) für Strom- und Wasserversorgung mit Sitz in Warrington. Die Täler um das Haweswater Reservoir sind die einzige Region in England, in der Steinadler nisten. Im abgelegenen Seitental Riggindale unterhält die Royal Society for the Protection of Birds (RSPB) eine Beobachtungsstation. Das erste Adlerpaar nistete dort 1969 und bisher wurden von unterschiedlichen Paaren 16 Küken aufgezogen. Seit 2004 ist der weibliche Adler verschwunden, aber man hofft, dass der verbliebene männliche Adler wieder eine Partnerin findet, um neuen Nachwuchs aufzuziehen. Der Buchautor Alfred Wainwright beklagte…"} {"instruction": "Write a Python function that computes the average of 3 numbers.", "input": "1, 2, 3", "output": "def average(a, b, c):\n return (a + b + c) / 3.0\n\nprint(average(1,2,3)) # Output: 2.0"} {"instruction": "Suggest a Python library to monitor the performance of this system", "input": "A distributed system that processes large amounts of data on multiple nodes", "output": "The Python library 'celery' can be used to monitor the performance of a distributed system. It provides scalability and concurrency capabilities to handle large amounts of data by distributing tasks across multiple nodes. It also offers task monitoring and management through custom metrics and performance logs."} {"instruction": "Implement a given design pattern in Python.", "input": "", "output": "# factory pattern example \n \nclass Shape:\n sides = 0\n \n def type(self):\n print(\"This is an abstract class\")\n\nclass Triangle(Shape):\n sides = 3\n def type(self):\n print(\"This is a triangle\")\n\nclass Rectangle(Shape):\n sides = 4\n def type(self):\n print(\"This is a rectangle\")\n\nclass Factory:\n def get_obj(self, shape):\n if shape == \"triangle\":\n return Triangle()\n if shape == \"rectangle\":\n return Rectangle()\n \nf = Factory()\n \nshape1 = f.get_obj(\"triangle\")\nshape1.type() \n \nshape2 = f.get_obj(\"rectangle\")\nshape2.type()"} {"instruction": "Write a Python function to convert a given string to lowercase.", "input": "string = \"FOO\"", "output": "def to_lowercase(string): return string.lower() string = \"FOO\" print(to_lowercase(string))"} {"text": "[EN Wikipedia] Algorithm\n\nIn mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing calculations and data processing. More advanced algorithms can use conditionals to divert the code execution through various routes (referred to as automated decision-making) and deduce valid inferences (referred to as automated reasoning), achieving automation eventually. Using human characteristics as descriptors of machines in metaphorical ways was already practiced by Alan Turing with terms such as \"memory\", \"search\" and \"stimulus\". In contrast, a heuristic is an approach to problem solving that may not be fully specified or may not guarantee correct or optimal results, especially in problem domains where there is no well-defined correct or optimal result. As an effective method, an algorithm can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing \"output\" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input. History Ancient algorithms Since antiquity, step-by-step procedures for solving mathematical problems have been attested. This includes Babylonian mathematics (around 2500 BC), Egyptian mathematics (around 1550 BC), Indian mathematics (around 800 BC and later; e.g. Shulba Sutras, Kerala School, and Brāhmasphuṭasiddhānta), The Ifa Oracle (around 500 BC), Greek mathematics (around 240 BC, e.g. sieve of Eratosthenes and Euclidean algorithm), and Arabic mathematics (9th century, e.g. cryptographic algorithms for code-breaking based on frequency analysis). Al-Khwārizmī and the term algorithm Around 825, Muḥammad ibn Mūsā al-Khwārizmī wrote kitāb al-ḥisāb al-hindī (\"Book of Indian computation\") and kitab al-jam' wa'l-tafriq al-ḥisāb al-hindī (\"Addition and subtraction in Indian arithmetic\"). Both of these texts are lost in the original Arabic at this time. (However, his other book on algebra remains.) In the early 12th century, Latin translations of said al-Khwarizmi texts involving the Hindu–Arabic numeral system and arithmetic appeared: Liber Alghoarismi de practica arismetrice (attributed to John of Seville) and Liber Algorismi de numero Indorum (attributed to Adelard of Bath). Hereby, alghoarismi or algorismi is the Latinization of Al-Khwarizmi's name; the text starts with the phrase Dixit…"} {"instruction": "Write a code in PHP to convert Celsius to Fahrenheit.", "input": "", "output": "function celsiusToFahrenheit($celsius) { return $celsius * 9 / 5 + 32; }"} {"text": "[EN Wikipedia] Percival River\n\nThe Percival River is a river of the Canterbury region of New Zealand's South Island. It flows southwest from its origins in the Hanmer Range to the northeast of Hanmer Springs, reaching the Waiau River south of the town. See also List of rivers of New Zealand References Rivers of Canterbury, New Zealand Rivers of New Zealand"} {"instruction": "Write a query in SQL to list the most expensive item from each category.", "input": "TABLE items item_id INT PK category VARCHAR price INT", "output": "SELECT item_id, category, MAX(price) FROM items GROUP BY category;"} {"text": "[DE Wikipedia] Provinz Huarmey\n\nDie Provinz Huarmey ist eine der 20 Provinzen, die die Verwaltungsregion Ancash in Peru bilden. In dem 3.908,4 km² großen Gebiet lebten im Jahr 2017 30.560 Menschen, was einer Bevölkerungsdichte von 7,8 Einwohnern pro km² entspricht. Verwaltungssitz ist Huarmey. Geographische Lage Die Provinz Huarmey liegt 230 km nordnordwestlich der Landeshauptstadt Lima. Die Provinz erstreckt sich über eine Länge von 95 km entlang der Pazifikküste. Sie reicht bis zu 70 km ins Inland. Im Osten der Provinz erheben sich die Berge der Cordillera Negra, einem niedrigeren Gebirgszug der peruanischen Westkordillere. Die Flüsse Río Culebras und Río Huarmey münden in der Provinz ins Meer. Im Süden reicht die Provinz bis in das Flusstal des Río Fortaleza. Im Norden grenzt die Provinz Huarmey an die Provinz Casma, im Osten an die Provinzen Huaraz, Aija, Recuay und Bolognesi. Im Süden liegt die Provinz Barranca. Gliederung Die Provinz Huarmey besteht aus 5 Distrikten (distritos). Der Distrikt Huarmey ist Sitz der Provinzverwaltung. Weblinks Huarmey Huarmey"} {"instruction": "Implement a function to return the element that appears most frequently in a list.", "input": "[5,5,5,5,6,6,7,7,7]", "output": "def find_most_frequent_element(arr): d = {} for num in arr: if num in d: d[num] += 1 else: d[num] = 1 max_freq = 0 most_frequent_element = None for num in d: if d[num] > max_freq: max_freq = d[num] most_frequent_element = num return most_frequent_element"} {"text": "[DE Wikipedia] Sepp Trütsch\n\nSepp Trütsch (* 23. Mai 1949 in Schwyz) ist ein ehemaliger Schweizer Moderator von Volksmusiksendungen und Sänger. Leben Sepp Trütsch schloss an seine Schulzeit an der Kantonsschule Kollegium Schwyz eine Ausbildung zum Drogisten an. Seine musikalische Ausbildung umfasste Gesang und Komposition. Seine mediale Laufbahn begann er als freier Mitarbeiter bei Radio Studio Bern im Jahr 1979. Trütsch arbeitete bis 1982 für das Radio. In derselben Zeit schrieb er Kolumnen für die Berner Zeitung Der Bund. Am 1. August 1980 nahm er die Tätigkeit als Redaktor und Präsentator bei SF DRS auf und war von 1984 bis 1987 Redaktionsleiter Folklore. Er hat etwa 470 Abendsendungen des volkstümlichen Schlagers moderiert, beispielsweise den Grand Prix der Volksmusik zusammen mit Carolin Reiber und Karl Moik. Weitere bekannte Sendungen volkstümlicher Musik mit Sepp Trütsch als Moderator waren Musig-Plausch und Fyraabig. Für das Schweizer Fernsehen präsentierte er regelmässig Sendungen bis 2002, als die Fernsehkarriere abrupt endete, weil SF DRS sich entschied, alle seine Volksmusik-Sendungen abzusetzen. Seitdem widmet er sich der Gastronomie und organisiert Events. Seit 10. November 1997 ist Sepp Trütsch Verwaltungsratspräsident der Arena Wydehof AG in Birr AG, eines Gross-Gastronomiebetriebes für Events und Gastronomie. Ausserdem besitzt er gemeinsam mit seiner Frau Ida Trütsch-Reichmuth seit 1. September 2008 das Hotel «Wysses Rössli» in seinem Heimatort Schwyz. Ferner ist er seit 26. Oktober 2000 Mitglied der Proyou Event AG in Schwyz, eines Unternehmens, das im Bereich Events und Musikverlag tätig ist. Er ist seit 23. August 2004 geschäftsführender Gesellschafter der TVM Events GmbH und seit 14. Februar 1997 Inhaber der Sepp Trütsch Events + Konzeptionen. Neben seinen Gastronomie-Tätigkeiten organisiert Sepp Trütsch weiterhin zahlreiche volkstümliche Veranstaltungen wie Brauchtumsübertragungen, Fasnachtsumzüge, Trachten-, Schwing- sowie Jodlerfeste oder auch musikalische Kreuzfahrten. Zudem veröffentlicht er zahlreiche Tonträger. Auch ist Trütsch als Buch- und Kalenderautor aktiv. Er ist seit 1969 mit Ida Trütsch-Reichmuth verheiratet und hat mit ihr einen Sohn (* 1970) und eine Tochter (* 1973). Er wohnt in Schwyz. Publikationen Sepp Trütsch serviert Spezialitäten. Weber, Gwatt 2011, ISBN 978-3-90953274-2. Weblinks Website von Sepp Trütsch Einzelnachweise Fernsehmoderator (Schweiz) Interpret volkstümlicher Schlager (Schweiz) Person (Schwyz) Schweizer Geboren 1949 Mann"} {"instruction": "Build a TensorFlow model for classification of a 2-D dataset.", "input": "X = [[1, 2], [3, 4], [5, 6]] Y = [0, 1, 1]", "output": "\"\"\" Build a TensorFlow model for classification of a 2-D dataset. Input: X = [[1, 2], [3, 4], [5, 6]] Y = [0, 1, 1] Output: import tensorflow as tf # data X = tf.constant([[1, 2], [3, 4], [5, 6]], dtype=tf.float32) Y = tf.constant([0, 1, 1], dtype=tf.float32) # model model = tf.keras.Sequential() model.add(tf.keras.layers.Dense(2, activation='relu')) model.add(tf.keras.layers.Dense(1, activation='sigmoid')) model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']) model.fit(X, Y, epochs=50, batch_size=3) \"\"\""} {"instruction": "Create a function in Python to calculate the area of a triangle given its base and height.", "input": "", "output": "def triangle_area(base, height):\n return (base * height) / 2"} {"text": "[HI Wikipedia] गंगनम जिला\n\nगंगनम जिला (; हंजा: 江南區; गंगनम गु) दक्षिण कोरिया की प्रशासनिक इकाई - गु (स्थानीय सरकारी जिले) जिनसे मिलकर सियोल शहर बना है, में से एक है। गंगनम (강남; 江南 ) का शाब्दिक अर्थ है \"(हान) नदी के दक्षिण में\"। वर्ष २०१० की जनगणना के अनुसार, गंगनम जिले की कुल जनसंख्या 527,641 है, जो इसे सियोल का चौथा सर्वाधिक जनसंख्या वाला शहर बनाती है। 39.5 कि.मी2 के क्षेत्रफ़ल से यह सियोल का तृतीय बड़ा जिला है। सन्दर्भ दक्षिण कोरिया"} {"text": "[HI Wikipedia] अशोक चक्रधर\n\nडॉ॰ अशोक चक्रधर (जन्म ८ फ़रवरी सन् १९५१) हिंदी के विद्वान, कवि एवं लेखक है। हास्य-व्यंग्य के क्षेत्र में अपनी विशिष्ट प्रतिभा के कारण प्रसिद्ध वे कविता की वाचिक परंपरा का विकास करने वाले प्रमुख विद्वानों में से भी एक है। टेलीफ़िल्म लेखक-निर्देशक, वृत्तचित्र लेखक निर्देशक, धारावाहिक लेखक, निर्देशक, अभिनेता, नाटककर्मी, कलाकार तथा मीडिया कर्मी के रूप में निरंतर कार्यरत अशोक चक्रधर जामिया मिलिया इस्लामिया में हिंदी व पत्रकारिता विभाग में प्रोफेसर के पद से सेवा निवृत्त होने के बाद केन्द्रीय हिंदी संस्थान तथा हिन्दी अकादमी, दिल्ली के उपाध्यक्ष पद पर कार्यरत रहे। 2014 में उन्हें पद्म श्री से सम्मानित किया गया। जीवन परिचय अशोक चक्रधर जी का जन्म ८ फ़रवरी, सन १९५१ में खु्र्जा (उत्तर प्रदेश) के अहीरपाड़ा मौहल्ले में हुआ। उनके पिताजी डॉ॰_राधेश्याम_'प्रगल्भ'' अध्यापक, कवि, बाल साहित्यकार और संपादक थे। उन्होंने 'बालमेला' पत्रिका का संपादन भी किया। उनकी माता कुसुम प्रगल्भ गृहिणी थीं। बचपन से ही विद्यालय के सांस्कृतिक कार्यक्रमों में भाग लेने में उनकी रुचि थी। बचपन से ही उन्हें अपने कवि पिता का साहित्यिक मार्गदर्शन मिला और उनके कवि-मित्रों की गोष्ठियों के माध्यम से उन्हें कविता लेखन की अनौपचारिक शिक्षा मिली। सन १९६० में उन्होंने रक्षामंत्री 'कृष्णा मेनन' को अपनी पहली कविता सुनाई। सन १९६२ में सोहन लाल द्विवेदी की अध्यक्षता में अपने पिता द्वारा आयोजित एक कवि सम्मेलन अशोक चक्रधर ने अपने मंचीय जीवन की पहली कविता पढ़कर पं.सोहनलाल द्विवेदी जी का आशीर्वाद प्राप्त किया। साहित्यिक अभिरुचि के साथ-साथ अपनी पढ़ाई के प्रति भी अशोक चक्रधर काफ़ी सतर्क रहे। सन् १९७० में उन्होंने बी. ए. प्रथम श्रेणी उत्तीर्ण किया। 1968 में वे मथुरा में आकाशवाणी केन्द्र में ऑडिशंड आर्टिस्ट के रूप में चुने गए। 1972 में उन्होंने आगरा विश्वविद्यालय से हिंदी में स्नातकोत्तर की उपाधि प्राप्त की। इसके बाद उन्होंने दिल्ली विश्वविद्यालय में एम. लिट्. में प्रवेश लिया। इसी बीच 1972 में उन्हें दिल्ली विश्वविद्यालय के सत्यवती कॉलेज में प्रध्यापक पद पर नियुक्त मिल गई। दिल्ली विश्वविद्यालय के हिन्दी विभाग में इन दिनों अनेक गुणात्मक परिवर्तन हुए। उनकी पहली पुस्तक मैकमिलन से 'मुक्तिबोध की काव्य प्रक्रिया' 1975 में प्रकाशित हुई। जोधपुर विश्वविद्यालय ने इस पुस्तक को युवा लेखन द्वारा लिखी गई वर्ष की सर्वश्रेष्ठ पुस्तक का पुरस्कार दिया। 1975 में उन्होंने जामिया मिल्लिया इस्लामिया में प्राध्यापक के पद पर कार्य प्रारंभ किया, जहाँ वे २००८ तक कार्यरत रहे। उन्होंने प्रौढ़ एवं नवसाक्षरों के लिए विपुल लेखन, नाटक, अनुवाद, कई चर्चित धारावाहिकों, वृत्त चित्रों का लेखन निर्देशन करने के अलावा कंप्यूटर में हिंदी के प्रयोग को लेकर भी महत्वपूर्ण काम किया है। वे जननाट्य मंच के संस्थापक सदस्य भी हैं। इनका नाटक बंदरिया चली ससुराल नाटक का नेशनल स्कूल ऑफ ड्रामा द्वारा मंचन हो चुका है। इसके निर्देशक श्री राकेश शर्मा तथा रंगमंडल, राष्ट्रीय नाट्य विद्यालय है। और श्री रंजीत कपूर के नाटक 'आदर्श हिन्दू होटल' एवं 'शॉर्टकट' के लिए गीत लेखन भी इन्होंने किया। अशोक चक्रधर ने हिन्दी के विकास में कम्प्यूटर की भूमिका विषयक शताधिक पावर-पाइंट…"} {"instruction": "Generate a valid Python program to create an alphabetically sorted list of all the words in a sentence.", "input": "\"This is a great day\"", "output": "def sortSentence(sentence):\n words = sentence.split(\" \")\n words.sort()\n return words\n\nresult = sortSentence(\"This is a great day\")\nprint(result)"} {"instruction": "Write a for-loop in Python to find the average of 5 numbers.", "input": "5 numbers: 10, 15, 20, 25, 30", "output": "total = 0\nfor num in [10, 15, 20, 25, 30]:\n total += num\n\naverage = total / 5\nprint(average)"} {"text": "[EN Wikipedia] George William Forrest\n\nSir George William David Stark Forrest (1845–1926) was a British educator, journalist and historian, in India from 1872 to 1900. Life He was the second son of George Forrest VC, born at Nasirabad, Ajmer. He matriculated at St John's College, Cambridge in 1866, graduating B.A. in 1870. He entered the Inner Temple in 1872, but was not called to the bar. He began to write for periodicals including the Saturday Review. As a journalist, he was known for work published in The Times, particularly a scoop in 1880 with the Battle of Maiwand. Forrest was appointed to Bombay Educational Department, late in 1872. He was Census Commissioner at Bombay in 1882. He was seconded to work on the Bombay Records, 1884-8, becoming Professor of English History, Elphinstone College, in 1887. He was Director, Bombay Records, in 1888, Assistant Secretary, Government of India, and Director, Government of India Records, 1894–1900. In bad health, Forrest returned to the United Kingdom in 1900. He went in 1904 to Iffley Turn House just outside Oxford, was knighted in 1913, and died there on 28 January 1926. Works Forrest published books: Selections from the Official Writings of Mountstuart Elphinstone (1884) Selections from the State Papers in the Foreign Department (1890) The Administration of the Marquis of Lansdowne as Viceroy and Governor (1894) Sepoy Generals (1901) Cities of India Past and Present (1903) History of the Indian Mutiny (1904–1912, 3 vols.), a documentary history. John Laband wrote in 1976 of historiography of the Indian rebellion of 1857 in terms of \"the voluminous literature of British historians such as Kaye, Holmes and G. W. Forrest.\" Rudrangshu Mukherjee, writing in 2008, stated that \"Much of what we write and say today about 1857 is possible because of the work of [Surendra Nath Sen, Ramesh Chundra Majumdar and S B Chaudhuri] and of the great narratives produced in the second half of the 19th century and early 20th century by Charles Ball, John Kaye, G W Forrest and others.\" Selections from the Travels and Journals Preserved in the Bombay Secretariat (1906) Life of Field-Marshal Sir Neville Chamberlain, G.C.B., G.C.S.I. (1909), on Neville Bowles Chamberlain. Selections from the State Papers of the Governors-General of India: Warren Hastings (2 vols., 1910) Life of Lord Roberts (1914) The Life of Lord Clive (2 vols., 1918) Selections from the State Papers of the Governors-General of India: Lord Cornwallis (2 vols., 1926) Other works were: The Famine in India (1897), pamphlet Articles on the deforestation of India in the Bombay Gazette. Family In 1877 Forrest married Emma Georgina Viner, daughter of Thomas Viner of Crawley, Sussex. They had a son and a daughter. Notes 1845 births 1926 deaths 19th-century British historians English journalists 20th-century…"} {"instruction": "Write a Python program to find the three numbers from an array whose sum is closest to an given number", "input": "arr = [59, 40, 20, 90]\nnum = 70", "output": "def find_closest_sum(arr, num):\n arr.sort()\n final_sum = None\n closest_sum = None\n prev_diff = float(\"inf\")\n for i in range(len(arr)):\n for j in range(i+1, len(arr)):\n for k in range(j+1, len(arr)):\n sum = arr[i] + arr[j] + arr[k]\n diff = abs(num - sum)\n if diff < prev_diff:\n prev_diff = diff\n closest_sum = sum\n return closest_sum\n\nprint(find_closest_sum(arr, num))"} {"text": "[CS Wikipedia] Římskokatolická farnost Jiříkov\n\nŘímskokatolická farnost Jiříkov (lat. Georgswalda) je církevní správní jednotka sdružující římské katolíky na území města Jiříkov a v jeho okolí. Organizačně spadá do děčínského vikariátu, který je jedním z 10 vikariátů litoměřické diecéze. Centrem kostela je kostel svatého Jiří v Jiříkově. Historie farnosti Původ tzv. staré farnosti není znám. Nově byla kanonicky zřízena od roku 1664. Matriky jsou vedeny od roku 1665. Duchovní správcové vedoucí farnost Začátek působnosti jmenovaného v duchovní správě farnosti od roku: Kromě kněží stojících v čele farnosti, působili ve farnosti v průběhu její historie i jiní kněží. Většinou pracovali jako farní vikáři, kaplani, katecheté, výpomocní duchovní aj. Území farnosti Do farnosti náleží území dřívějších historických obcí: Filipov (Philippsdorf) Jiříkov (Georgswalde) Loučné (Wiesenthal) Nový Jiříkov (Neugeorgswalde) Římskokatolické sakrální stavby na území farnosti Ve farnosti se mohou nacházet i další drobné sakrální stavby, místa římskokatolického kultu a pamětihodnosti, které neobsahuje tato tabulka. Příslušnost k farnímu obvodu Z důvodu efektivity duchovní správy byl vytvořen farní obvod (kolatura) farnosti – děkanství Rumburk, jehož součástí je i farnost Jiříkov, která je tak spravována excurrendo. Přehled těchto kolatur je v tabulce farních obvodů děčínského vikariátu. Odkazy Poznámky Reference Související články Děčínský vikariát Filipovský zázrak Seznam menších bazilik v Česku Seznam obcí v litoměřické diecézi Externí odkazy Profil farnosti v elektronickém katalogu litoměřické diecéze Bohoslužby ve farnosti Jiříkov Poutní místa Šluknovska Jiříkov Jiříkov Jiříkov"} {"instruction": "Write a Python program that takes two strings as input and returns a list of all the words that appear in both strings.", "input": "string1 = \"This is a string of text\"\nstring2 = \"This text is also a string\"", "output": "string1 = \"This is a string of text\"\nstring2 = \"This text is also a string\"\n\ndef find_words_in_both(s1, s2):\n list1 = s1.split()\n list2 = s2.split()\n result = []\n for word1 in list1:\n for word2 in list2:\n if word1 == word2:\n result.append(word1)\n return result\n\nprint(find_words_in_both(string1, string2))"} {"instruction": "Write a TensorFlow code to classify MNIST.", "input": "", "output": "# Load the MNIST dataset (x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data() # Reshape and normalize the input data x_train = x_train.reshape(x_train.shape[0], 28, 28, 1) x_test = x_test.reshape(x_test.shape[0], 28, 28, 1) x_train = x_train.astype('float32') x_test = x_test.astype('float32') x_train /= 255 x_test /= 255 # Build the model model = tf.keras.models.Sequential([ tf.keras.layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)), tf.keras.layers.MaxPooling2D(2, 2), tf.keras.layers.Flatten(), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dense(10, activation='softmax') ]) model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) # Train and evaluate the model model.fit(x_train, y_train, epochs=10) model.evaluate(x_test, y_test)"} {"instruction": "Create a function for checking valid passwords in Python.", "input": "", "output": "def check_valid_password(pwd):\n length_valid = (len(pwd) >= 8)\n has_uppercase = False\n has_lowercase = False\n has_digit = False\n for char in pwd: \n if char.isupper():\n has_uppercase = True\n elif char.islower():\n has_lowercase = True\n elif char.isnumeric():\n has_digit = True\n valid = length_valid and has_uppercase and has_lowercase and has_digit\n return valid"} {"instruction": "Using Python, write a program to find the most common element among a list of numbers", "input": "[4, 8, 9, 4, 6, 4, 8]", "output": "def most_frequent(list): \n return max(set(list), key = list.count) \n \nlist = [4, 8, 9, 4, 6, 4, 8]\nprint(most_frequent(list))"} {"instruction": "Write a bash script to list all subdirectories located in the current working directory.", "input": "", "output": "#!/bin/bash for directory in * do if [ -d $directory ] then echo $directory fi done"} {"instruction": "Sort a list of integers in ascending order using selection sort.", "input": "[ 9, 5, 2, 0, 7, 4, 1, 8, 6, 3]", "output": "def selection_sort(list): for i in range(len(list)): min_idx = i for j in range(i+1, len(list)): if list[min_idx] > list[j]: min_idx = j list[i], list[min_idx] = list[min_idx], list[i] list = [9, 5, 2, 0, 7, 4, 1, 8, 6, 3] selection_sort(list) print (\"Sorted array:\", list)"} {"instruction": "Write a python loop to print all the numbers from 1 to 10.", "input": "", "output": "for i in range(1,11):\n print(i)"} {"instruction": "Create a function in Python that takes two inputs: a number and a list of numbers. The function should return a list of numbers that sum to the input number.", "input": "number = 5\nnums = [1, 2, 3, 4]", "output": "def find_sum(number, nums):\n result_list = []\n\n for i in range(len(nums)-1):\n for j in range(i+1, len(nums)):\n if nums[i] + nums[j] == number:\n result_list.append([nums[i], nums[j]])\n\n return result_list\n\nresult = find_sum(number, nums) \nprint(result) # [[1, 4], [2, 3]]"} {"instruction": "Write a Python script to scrape website text content", "input": "", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = \"example.com\"\n\nresponse = requests.get(url)\nhtml_response = response.content\n\nsoup = BeautifulSoup(html_response, \"html.parser\")\ntext_content = soup.find_all(\"p\")\n\nfor text in text_content:\n print(text.text)"} {"text": "[EN Wikipedia] Dřevčice\n\nDřevčice is a municipality and village in Prague-East District in the Central Bohemian Region of the Czech Republic. It has about 800 inhabitants. References Villages in Prague-East District"} {"instruction": "Generate a loop to iterate through each character of a string in Python.", "input": "", "output": "\"\"\"\nGenerate a loop to iterate through each character of a string\n\"\"\"\n\n# Define a string\nstring = 'Example string'\n\n# Iterate through the characters of the string\nfor char in string:\n # Print each character\n print(char)"} {"instruction": "Create a k-Nearest Neighbors (k-NN) classifier in Python to predict whether an individual earns more or less than $50,000 per year.", "input": "[[44, 'M', 17, 0, 0, 'high school', 44000], [38, 'M', 9, 4, 0, 'Bachelor's degree', 55000], [30, 'F', 12, 2, 0, 'Master's degree', 48000]]", "output": "import numpy as np \n\nclass KNNClassifier:\n def __init__(self, k):\n self.k = k\n\n def fit(self, X, y):\n self.X_train = X\n self.y_train = y\n\n def predict(self, X):\n predictions = []\n \n for row in X:\n distances = []\n for train_row in self.X_train:\n distances.append(np.linalg.norm(row - train_row))\n \n sorted_distances = np.argsort(distances) \n \n top_k_distances = sorted_distances[:self.k]\n \n top_k_labels = [self.y_train[i] for i in top_k_distances] \n \n label_counts = {}\n for label in top_k_labels:\n label_counts[label] = label_counts.get(label, 0) + 1\n \n sorted_label_counts = sorted(label_counts.items(), key = lambda x: x[1], reverse=True)\n \n predictions.append(sorted_label_counts[0][0])\n\n return predictions"} {"instruction": "Construct a python program that randomly swaps two elements within a list of numbers.", "input": "[1, 2, 3, 4, 5]", "output": "import random\n\n# input list\ndata_list = [1, 2, 3, 4, 5]\n\n# choose two random indices\ni, j = random.sample(range(len(data_list)), 2)\n\n# store the values before swapping\na = data_list[i]\nb = data_list[j]\n\n# swap two elements in a list\ndata_list[i] = b\ndata_list[j] = a\n\n# print the list after swapping\nprint(data_list)"} {"text": "[CS Wikipedia] Corriebaatar\n\nCorriebaatar je jediným dosud známým rodem čeledi Corriebaataridae, skupiny vyhynulých multituberkulátních savců. Jediný druh rodu, C. marywaltersae byl popsán v roce 2009 paleontologem Thomasem Richem a kolegy a představuje dosud jediného známého zástupce australských multituberkulátů. Drobný savec žil v období spodní křídy (stupeň apt), asi před 125 až 112 miliony let. Literatura Rich, T.H., Vickers-Rich, P., Flannery, T.F., Kear, B.P., Cantrill, D.J., Komarower, P., Kool, L., Pickering, D., Trusler, P., Morton, S., van Klaveren, N., and Fitzgerald, E.M.G. 2009. An Australian multitubercular and its palaeobiogeographic implications. Acta Palaeontologica Polonica 54 (1):1-6. Externí odkazy Druhohorní savci Organismy žijící v křídě"} {"instruction": "Scan through the following code in JavaScript and replace the placeholders with appropriate code.", "input": "var numbers = [1, 2, 3, 4]; for(___){ console.log(___); }", "output": "var numbers = [1, 2, 3, 4]; for(var i = 0; i < numbers.length; i++){ console.log(numbers[i]); }"} {"text": "[HI Wikipedia] कला\n\nकला (आर्ट) शब्द इतना व्यापक है कि विभिन्न विद्वानों की परिभाषाएँ केवल एक विशेष पक्ष को छूकर रह जाती है। कला का अर्थ अभी तक निश्चित नहीं हो पाया है, यद्यपि इसकी हजारों परिभाषाएँ की गयी है। भारतीय परम्परा के अनुसार कला उन सारी क्रियाओं को कहते हैं जिनमें कौशल अपेक्षित हो। यूरोपीय शास्त्रियों ने भी कला में कौशल को महत्त्वपूर्ण माना है। कला एक प्रकार का कृत्रिम निर्माण है जिसमे शारीरिक और मानसिक कौशलों का प्रयोग होता है। परिभाषा मैथिली शरण गुप्त के शब्दों में, अभिव्यक्ति की कुशल शक्ति ही तो कला है -- (साकेत, पंचम सर्ग) दूसरे शब्दों में -: मन के अंतःकरण की सुन्दर प्रस्तुति ही कला है। इतिहास कला शब्द का प्रयोग शायद सबसे पहले भरत के \"नाट्यशास्त्र\" में ही मिलता है। पीछे वात्स्यायन और उशनस् ने क्रमश: अपने ग्रंथ \"कामसूत्र\" और \"शुक्रनीति\" में इसका वर्णन किया। \"कामसूत्र\", \"शुक्रनीति\", जैन ग्रंथ \"प्रबंधकोश\", \"कलाविलास\", \"ललितविस्तर\" इत्यादि सभी भारतीय ग्रंथों में कला का वर्णन प्राप्त होता है। अधिकतर ग्रंथों में कलाओं की संख्या 64 मानी गयी है। \"प्रबंधकोश\" इत्यादि में 72 कलाओं की सूची मिलती है। \"ललितविस्तर\" में 86 कलाओं के नाम गिनाये गये हैं। प्रसिद्ध कश्मीरी पंडित क्षेमेंद्र ने अपने ग्रंथ \"कलाविलास\" में सबसे अधिक संख्या में कलाओं का वर्णन किया है। उसमें 64 जनोपयोगी, 32 धर्म, अर्थ, काम, मोक्ष, सम्बन्धी, 32 मात्सर्य-शील-प्रभावमान सम्बन्धी, 64 स्वच्छकारिता सम्बन्धी, 64 वेश्याओं सम्बन्धी, 10 भेषज, 16 कायस्थ तथा 100 सार कलाओं की चर्चा है। सबसे अधिक प्रामाणिक सूची \"कामसूत्र\" की है। यूरोपीय साहित्य में भी कला शब्द का प्रयोग शारीरिक या मानसिक कौशल के लिए ही अधिकतर हुआ है। वहाँ प्रकृति से कला का कार्य भिन्न माना गया है। कला का अर्थ है रचना करना अर्थात् वह कृत्रिम है। प्राकृतिक सृष्टि और कला दोनों भिन्न वस्तुएँ हैं। कला उस कार्य में है जो मनुष्य करता है। कला और विज्ञान में भी अंतर माना जाता है। विज्ञान में ज्ञान का प्राधान्य है, कला में कौशल का। कौशलपूर्ण मानवीय कार्य को कला की संज्ञा दी जाती है। कौशलविहीन या बेढब ढंग से किये गये कार्यों को कला में स्थान नहीं दिया जाता। वर्गीकरण कलाओं के वर्गीकरण में मतैक्य होना सम्भव नहीं है। वर्तमान समय में कला को मानविकी के अन्तर्गत रखा जाता है जिसमें इतिहास, साहित्य, दर्शन और भाषाविज्ञान आदि भी आते हैं। पाश्चात्य जगत में कला के दो भेद किये गये हैं- उपयोगी कलाएँ (Practice Arts) तथा ललित कलाएँ (Fine Arts)। परम्परागत रूप से निम्नलिखित सात को 'कला' कहा जाता है- स्थापत्य कला (Architecture) मूर्त्तिकला (Sculpture) चित्रकला (Painting) संगीत (Music) काव्य (Poetry) नृत्य (Dance) रंगमंच (Theater/Cinema) आधुनिक काल में इनमें फोटोग्राफी, चलचित्रण, विज्ञापन और कॉमिक्स जुड़ गये हैं। उपरोक्त कलाओं को निम्नलिखित प्रकार से भी श्रेणीकृत कर सकते हैं- साहित्य - काव्य, उपन्यास, लघुकथा, महाकाव्य आदि निष्पादन कलाएँ (performing arts) – संगीत, नृत्य, रंगमंच पाक कला (culinary arts) - बेकिंग, चॉकलेटरिंग, मदिरा बना मिडिया कला - फोटोग्राफी, सिनेमेटोग्राफी, विज्ञापन दृष्य कलाएँ - ड्राइंग, चित्रकला, मूर्त्तिकला कुछ कलाओं में दृश्य और निष्पादन दोनों के तत्त्व मिश्रित…"} {"instruction": "Write a SQL query to find the first name of all students enrolled in course \"CSCI-203\"", "input": "", "output": "SELECT firstName FROM students WHERE courseName = 'CSCI-203';"} {"instruction": "Create a software application in Python for predicting heart failure from cardiac data.", "input": "Not applicable.", "output": "import pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.metrics import accuracy_score\n\n# Load the data\ndata = pd.read_csv('heart_data.csv')\n\n# Split the data into features (X) and the labels (Y)\nX = data.drop('chd', axis=1)\nY = data['chd']\n\n# Split the data into training and testing sets\nX_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.25, random_state=0)\n\n# Create a logistic regression model and train it\nmodel = LogisticRegression()\nmodel.fit(X_train, Y_train)\n\n# Test the model\nY_pred = model.predict(X_test)\nacc = accuracy_score(Y_test, Y_pred)\nprint(acc) # Prints accuracy score"} {"instruction": "Rewrite a provided Python function to a more Pythonic version.", "input": "def add_numbers(x, y):\ntotal = 0\nfor i in range(x, y):\n total = total + i\nreturn total", "output": "def add_numbers(x, y):\n return sum(range(x, y))"} {"instruction": "In Python, use the re module to remove the HTML tags from a given string.", "input": "String: This is a bold string", "output": "import re\n\nstring = \"This is a bold string\"\n\nclean_string = re.sub(r'<[^>]*>', '', string)\n\nprint(clean_string)"} {"text": "[DE Wikipedia] Lusche\n\nLusche steht für: Lusche (Kartenspiel), Spielkarte ohne Zählwert Lusche, niederdeutsch für Pfütze Lusche, deutscher Name von Luže, Ort im Okres Chrudim, Tschechien Lusche ist der Familienname folgender Personen: Ulrich Lusche (* 1968), deutscher Rechtsanwalt und Politiker (CDU) Siehe auch: Morgen, ihr Luschen! Der Ausbilder-Schmidt-Film, deutscher Film von Mike Eschmann (2008) Lusch"} {"text": "[HI Wikipedia] स्वामी विवेकानन्द\n\n{{Infobox Hindu leader |name= स्वामी विवेकानन्द | image = Swami Vivekananda-1893-09-signed.jpg |caption= स्वामी विवेकानन्द शिकागो (1893) में swami Vivekananda ek nastik vyakti the. विvek ने अंग्रेजी भाषा में लिखा !: \"एक असीमित, पवित्र, शुद्ध सोच एवं गुणों से परिपूर्ण उस परमात्मा को मैं नतमस्तक हूँ।\" Swami Vivekanand ek nastik vykti the. इसी चित्र में दूसरी ओर विवेकानन्द के हस्ताक्षर हैं। | image_alt = Black and white image of an Indian man standing | birth_date = | birth_place = कलकत्ता (अब कोलकाता) | birth_name = नरेन्द्रनाथ दत्त | death_date = | death_place = बेलूर मठ, बंगाल रियासत, ब्रिटिश राज (अब बेलूर, पश्चिम बंगाल में) | nationality = भारतीय | guru = रामकृष्ण परमहंस | disciple = अशोकनंद, Virajananda, Paramananda, Alasinga Perumal, Abhayananda, Sister Nivedita, Swami Sadananda | philosophy = आधुनिक वेदांत, राज योग | founder = Ramakrishna MissionRamakrishna Math | Literary works = राज योग (पुस्तक)|राज योग, karm योग (पुस्तक)|कर्म योग, भक्ति योग, ज्ञान योग (पुस्तक)|ज्ञान योग, माई मास्टर (पुस्तक)| माई मास्टर | influenced = Subhas Chandra Bose, Aurobindo Ghose, Bagha Jatin, Mahatma Gandhi, Rabindranath Tagore, Chakravarti Rajagopalachari, Jawaharlal Nehru, Bal Gangadhar Tilak, Jamsetji Tata, Nikola Tesla, Sarah Bernhardt, Emma Calvé, Jagadish Chandra Bose, Annie Besant, Romain Rolland, Narendra Modi, Anna Hazare |quote =\"उठो, जागो और तब तक नहीं रुको जब तक लक्ष्य प्राप्त न हो जाए\" | signature = Swami-Vivekanda-Signature-transparent.png | footnotes = }} स्वामी विवेकानन्द (, ) (जन्म: 12 जनवरी 1863 - मृत्यु: 4 जुलाई 1902) वेदान्त के विख्यात और प्रभावशाली आध्यात्मिक गुरु थे। उनका वास्तविक नाम नरेन्द्र नाथ दत्त था। उन्होंने अमेरिका स्थित शिकागो में सन् 1893 में आयोजित विश्व धर्म महासभा में भारत की ओर से सनातन धर्म का प्रतिनिधित्व किया था। भारत का आध्यात्मिकता से परिपूर्ण वेदान्त दर्शन अमेरिका और यूरोप के हर एक देश में स्वामी विवेकानन्द की वक्तृता के कारण ही पहुँचा। उन्होंने रामकृष्ण मिशन की स्थापना की थी जो आज भी अपना काम कर रहा है। वे रामकृष्ण परमहंस के सुयोग्य शिष्य थे। उन्हें 2 मिनट का समय दिया गया था किन्तु उन्हें प्रमुख रूप से उनके भाषण का आरम्भ \"मेरे अमेरिकी बहनों एवं भाइयों\" के साथ करने के लिये जाना जाता है। उनके संबोधन के इस प्रथम वाक्य ने सबका दिल जीत लिया था। कलकत्ता के एक कुलीन बंगाली कायस्थ परिवार में जन्मे विवेकानन्द आध्यात्मिकता की ओर झुके हुए थे। वे अपने गुरु रामकृष्ण देव से काफी प्रभावित थे जिनसे उन्होंने सीखा कि सारे जीवों मे स्वयं परमात्मा का ही अस्तित्व हैं; इसलिए मानव जाति अथेअथ जो मनुष्य दूसरे जरूरतमन्दो की मदद करता है या सेवा द्वारा परमात्मा की भी सेवा की जा सकती है। रामकृष्ण की मृत्यु के बाद विवेकानन्द ने बड़े पैमाने पर भारतीय उपमहाद्वीप की यात्रा की और ब्रिटिश भारत में तत्कालीन स्थितियों का प्रत्यक्ष ज्ञान प्राप्त किया। बाद में विश्व धर्म संसद 1893 में भारत का प्रतिनिधित्व करने, संयुक्त राज्य अमेरिका के लिए प्रस्थान…"} {"instruction": "Write a C++ function that takes in a linked list and a value, and inserts the value as the head node of the list.", "input": "list = [7, 8, 10] value = 5", "output": "Node* insertFront(Node* head, int value) { Node* tmp = new Node; tmp->data = value; tmp->next = head; head = tmp; return head; }"} {"instruction": "Create a Regular Expression to match URLs", "input": "", "output": "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$"} {"instruction": "Generate a function in Python that takes an integer value from a dictionary and returns its value as a string.", "input": "{\"number1\": 8, \"number2\": 16, \"number3\": 20}", "output": "def get_string_value(input_dict):\n \"\"\"Return string value in the input dictionary\"\"\"\n output_value = \"\"\n for key, value in input_dict.items():\n output_value = str(value)\n return output_value"} {"text": "[DE Wikipedia] Home Nations Championship 1884\n\nDie Ausgabe 1884 des Turniers Home Nations Championship in der Sportart Rugby Union (das spätere Five Nations bzw. Six Nations) fand vom 5. Januar bis 12. April statt. Turniersieger wurde England, das mit Siegen gegen alle anderen Teilnehmer die Triple Crown schaffte. Teilnehmer Abschlusstabelle Ergebnisse Für das Spielergebnis zählte die Anzahl erzielter Tore. Ein Tor wurde für eine erfolgreiche Erhöhung nach einem Versuch oder für ein Dropgoal gegeben. Endete das Spiel unentschieden nach Anzahl der Tore, zog man die nicht erhöhten Versuche hinzu, um einen Gewinner zu ermitteln. Gab es danach immer noch keinen eindeutigen Sieger, so trennten sich beide Teams unentschieden. Ergebnisnotation: T = Try (Versuch); G = Goal (Tor nach Versuch); D = Dropgoal (in Klammern die Anzahl erzielter Tore) Weblinks Offizielle Website von Six Nations (englisch, französisch oder italienisch) Sportveranstaltung 1884 Six Nations"} {"text": "[HI Wikipedia] जिब्राल्टर बंदरगाह प्राधिकरण\n\nजिब्राल्टर बंदरगाह प्राधिकरण () एक जिब्राल्टर सरकार के आधीन एक स्वतंत्र संस्था है। मूल जिब्राल्टर बंदरगाह प्राधिकरण की स्थापना वर्ष 1806 में हुई थी। परन्तु निवर्तमान प्राधिकरण की स्थापना 2005 में जिब्राल्टर पोर्ट अथोरिटी एक्ट (जिब्राल्टर बंदरगाह प्राधिकरण अधिनियम) के तहत हुई थी। हालांकि आधीकारिक तौर पर संस्था 2005 में स्थापित हो गई थी परन्तु यह एक वर्ष तक गठित नहीं हुई। 2006 में इसके सबसे पहले सदस्यो की नियुक्ति हुई। इसकी कई जिम्मेदारियाँ हैं परन्तु प्राधिकरण का प्राथमिक कार्य समुद्री सेवाओं का प्रावधान करना है। जिब्राल्टर बंदरगाह अब मुख्य रूप से जहाजो के लिए बंकर सेवा उपलब्ध कराता है। इसके अध्यक्ष जिब्राल्टर सरकार में पर्यटन, सार्वजनिक परिवहन और बंदरगाह मंत्री नील एफ़ कोस्टा हैं तथा रॉय स्टैंब्रूक मुख्य कार्यकारी अधिकारी और बंदरगाह के केप्टन हैं। इतिहास 19 फ़रवरी 1706 के दिन ग्रेट ब्रिटेन की महारानी ऐनी (1665–1714) ने जिब्राल्टर को मुक्त बंदरगाह का दर्जा प्रदान किया। हालांकि 18वी सदी के शुरुआत में जिब्राल्टर मुख्य तौर पर एक सैनिक आधार (गैरीसन) था तथा वाणिज्य की मात्रा लगभग न के बराबर थी। 1805 में हुए एतिहासिक ट्रफ़ैलगर के युद्ध के पश्चात जिब्राल्टर में अन्तराष्ट्रीय व्यापार के लिए बंदरगाह स्थापित किया गया। 1823 में सबसे पहली बार कोई स्टीमर जिब्राल्टर में रुका और इसी के साथ इस बंदरगाह के बंकर सेवा उपलब्ध कराने वाले स्थान के क्रमिक विकास की शुरुआत हो गई। सरकार द्वारा प्रशासित जिब्राल्टर बंदरगाह प्राधिकरण की स्थापना 1806 में हुई। इसके उत्तराधिकारी स्वतंत्र जिब्राल्टर बंदरगाह प्राधिकरण (जिब्राल्टर पोर्ट अथोरिटी) की स्थापना इस इबेरियाई प्रायद्वीप के दक्षिणी सिरे पर स्थित ब्रिटिश प्रवासी शासित प्रदेश में 2005 में जिब्राल्टर बंदरगाह प्राधिकरण अधिनियम के पास होने के पश्चात हुई। संसद में पास हुए इस अधिनियम ने जिब्राल्टर की सरकार की कुछ जिम्मेदारियाँ भी प्राधिकरण को हस्तांतरित कर दीं। इस अधिनियम के प्रावधान बंदरगाह और नौवहन मंत्री द्वारा निर्धारित तिथि या तिथियों से प्रभावी हो गए। हालांकि प्राधिकरण की स्थापना 2005 में ही हो गई थी परन्तु 2006 तक स्वतंत्र जिब्राल्टर बंदरगाह प्राधिकरण का गठन नहीं हो पाया। 1 जून 2006 से प्राधिकरण के सदस्य प्रभावी हुए। बंदरगाह का कार्यालय उत्तरी मोल में स्थित है, जो जिब्राल्टर हार्बर के उत्तरी सिरे पर स्थित तरंगरोध है। सरकारी संघठन जिसने बंदरगाह का संचालन 1806 से 2006 तक किया था उसे भी जिब्राल्टर बंदरगाह प्राधिकरण के शीर्षक द्वारा संदर्भित किया जाता है, जैसा उत्तरी मोल पर स्थापित एक पट्टिका पर भी लिखा हुआ है। जिम्मेदारियाँ प्राधिकरण का प्रमुख कार्य समुद्री सेवाओं का प्रावधान करना है। इसके पास बंदरगाह के बुनियादी ढांचे के रखरखाव व इसकी सुरक्षा के साथ-साथ अनुरक्षण की जिम्मेदारियाँ हैं। प्राधिकरण का कर्तव्य है कि वह बंदरगाह का संचालन अन्तराष्ट्रीय मानको के अनुसार करे। इसे ब्रिटिश जिब्राल्टर क्षेत्रीय जल में जहाजों के संचलन का ध्यान रखना होता है। इसके साथ-साथ जरूरत पड़ने पर प्राधिकरण को खोज और बचाव की सेवा मुहैया करानी पड़ती है। जिब्राल्टर बंदरगाह प्राधिकरण को यह सुनिश्चित करना होता है कि बंदरगाह के भीतर की संस्थाएँ स्थानीय और…"} {"instruction": "Given a string of text, write a python script to remove all non-alphanumeric characters.", "input": "", "output": "def remove_non_alphanumeric_chars(input_string): return ''.join(c for c in input_string if c.isalnum())"} {"instruction": "Find the average salary of the given table.", "input": "Table structure: Employee_ID Name Department Salary", "output": "SELECT AVG (Salary) FROM Employee ;"} {"text": "[HI Wikipedia] चम्बा, हिमाचल प्रदेश\n\nचंबा भारत के हिमाचल प्रदेश प्रान्त का एक नगर है। हिमाचल प्रदेश का चंबा अपने रमणीय मंदिरों और हैंडीक्राफ्ट के लिए सर्वविख्यात है। रवि नदी के किनारे 996 मीटर की ऊँचाई पर स्थित चंबा पहाड़ी राजाओं की प्राचीन राजधानी थी। चंबा को राजा साहिल वर्मन ने 920 ई. में स्थापित किया था। इस नगर का नाम उन्होंने अपनी प्रिय पुत्री चंपावती के नाम पर रखा। चारों ओर से ऊंची पहाड़ियों से घिरे चंबा ने प्राचीन संस्कृति और विरासत को संजो कर रखा है। प्राचीन काल की अनेक निशानियां चंबा में देखी जा सकती हैं। जाब 'जाब', चंबा का अरबी नाम है। इसके जाफ, हाब, आब और गाँव नाम भी हैं। इसकी प्राचीन राजधानी ब्रह्मपुर (वयराटपट्टन) थी। हुएनत्सांग ने इसका वर्णन करते हुए लिखा है कि यह अलखनंदा और करनाली नदियों के बीच बसा है। कुछ काल बाद इस प्रदेश की राजधानी चंबा हो गई। 15 अप्रैल 1948 में इसका विलयन भारत सरकार द्वारा शासित हिमाचल प्रदेश में हो गया। अरब लेखकों ने सामान्यत: चंबा के सूर्यवंशी राजपूत शासकों को 'जाब' की उपाधि के साथ लिखा है। हब्न रुस्ता का मत है कि यह शासन सालुकि वंश के थे परंतु राजवंश की उत्पत्ति के संबंध में विद्वानों में मतभेद है। ८४६ ई. में सर्वप्रथम हब्न खुर्रदद्बी ने 'जाब' का प्रयोग किया, पर ऐसा लगता है कि इस शब्द की उत्पत्ति अरब साहित्य में इससे पूर्व हो चुकी थी। इस प्रकार यह प्रामाणिक माना जाता है कि चंबा नगर ९ वीं शताब्दी के प्रथम दशक में विद्यमान था। इब्न रुस्ता ने लिखा है कि चंबा के शासक प्राय: गुर्जरों और प्रतिहारों से शत्रुता रखते थे। मुख्य आकर्षण- चंपावती मंदिर यह मंदिर राजा साहिल वर्मन की पुत्री को समर्पित है। यह मंदिर शहर की पुलिस चौकी और कोषागार भवन के पीछे स्थित है। कहा जाता है कि चंपावती ने अपने पिता को चंबा नगर स्थापित करने के लिए प्रेरित किया था। मंदिर को शिखर शैली में बनाया गया है। मंदिर में पत्थरों पर खूबसूरत नक्काशी की गई है और छत को पहिएनुमा बनाया गया है। लक्ष्मीनारायण मंदिर यह मंदिर पांरपरिक वास्तुकारी और मूर्तिकला का उत्कृष्‍ट उदाहरण है। चंबा के 9 प्रमुख मंदिरों में यह मंदिर सबसे विशाल और प्राचीन है। कहा जाता है कि सवसे पहले यह मन्दिर चम्बा के चौगान में स्थित था परन्तु बाद में इस मन्दिर को राजमहल (जो वर्तमान में चम्बा जिले का राजकीय महाविद्यालय है) के साथ स्थापित कर दिया गया। भगवान विष्णु को समर्पित यह मंदिर राजा साहिल वर्मन ने 10 वीं शताब्दी में बनवाया था। यह मंदिर शिखर शैली में निर्मित है। मंदिर में एक विमान और गर्भगृह है। मंदिर का ढांचा मंडप के समान है। मंदिर की छतरियां और पत्थर की छत इसे बर्फबारी से बचाती है। भूरी सिंह संग्रहालय यह संग्रहालय 14 सितंबर 1908 ई. को खुला था। 1904-1919 तक यहां शासन करने वाले राजा भूरी सिंह के नाम पर इस संग्रहालय का नाम पड़ा। भूरी सिंह ने अपनी परिवार की पेंटिग्स का संग्रह संग्रहालय को दान कर दिया था। चंबा की सांस्कृतिक विरासत को संजोए इस संग्रहालय में बसहोली और कांगड़ा आर्ट स्कूल की लघु पेंटिग भी रखी गई हैं। भांदल घाटी यह घाटी वन्य जीव प्रेमियों को काफी लुभाती है। यह खूबसूरत घाटी 6006 फीट की ऊँचाई पर स्थित है। यह घाटी चंबा से 53 किमी .दूर सलूणी से जुड़ी हुई है। यहां से ट्रैकिंग करते हुए जम्मू-कश्मीर पहुंचा जा सकता है। रास्ते…"} {"instruction": "Using Python, design an algorithm to summarize a given text.", "input": "text = \"This is a piece of text, that needs to be summarized. To summarize, you need to condense the information into a shorter form, while still conveying the main points of the text. You also need to make sure that the summary retains the meaning of the original text.\"", "output": "def summarize(text):\n sentences = text.split('.')\n \n # Create a dictionary to store the number of occurrences of each word in the input\n word_occurrences = {}\n for sentence in sentences:\n for word in sentence.split():\n if word not in word_occurrences:\n word_occurrences[word] = 0\n word_occurrences[word] += 1\n \n # Sort the words based on their occurrences in the text\n sorted_words = sorted(word_occurrences.items(), key=lambda x: x[1], reverse=True)\n \n # Use the top N most frequent words as the cornerstone of the summary\n N = min(10, len(sorted_words))\n cornerstone_words = [word[0] for word in sorted_words[:N]]\n \n # Find the sentences that contain the cornerstone words\n summary = \"\"\n for sentence in sentences:\n for word in sentence.split():\n if word in cornerstone_words:\n summary += \" \" + sentence\n break\n return summary\n\nresult = summarize(text)\nprint(result)"} {"instruction": "Implement a text classification model in Python using the Keras library. The model should be able to classify a sentence as expressing positive or negative sentiment.", "input": "corpus = [\"It is a wonderful day today\",\"the weather is extremely bad today\"]\nlabels = [1, 0]", "output": "import numpy as np\n\nfrom keras.preprocessing.text import Tokenizer\nfrom keras.preprocessing import sequence\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Embedding, LSTM\n\ncorpus = [\"It is a wonderful day today\",\n\"the weather is extremely bad today\"]\nlabels = np.array([1, 0])\n\n# tokenize corpus\ntokenizer = Tokenizer()\ntokenizer.fit_on_texts(corpus)\nX = tokenizer.texts_to_sequences(corpus)\nX = sequence.pad_sequences(X, maxlen=10)\n\n# build model\nmodel = Sequential()\nmodel.add(Embedding(len(tokenizer.word_index)+1, 100, input_length=10))\nmodel.add(LSTM(100, dropout=0.2, recurrent_dropout=0.2))\nmodel.add(Dense(1, activation='sigmoid'))\nmodel.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])\n\n# train the model\nmodel.fit(X, labels, batch_size=1, epochs=20)\n\n# test the model\ntest_sentence = \"today the weather is horrible\"\ntest_tokenized = tokenizer.texts_to_sequences([test_sentence])\ntest_tokenized = sequence.pad_sequences(test_tokenized, maxlen=10)\npredict = model.predict(test_tokenized)\nprint(predict[0])"} {"text": "[HI Wikipedia] पश्चिम बंगाल\n\nपश्चिम बंगाल () भारत के पूर्वी भाग में स्थित एक राज्य है। इसके पड़ोस में नेपाल, सिक्किम, भूटान, असम, बांग्लादेश, ओडिशा, झारखण्ड और बिहार हैं। इसकी राजधानी कोलकाता है। इस राज्य में 23 जनपद है। यहाँ की मुख्य भाषा बांग्ला है। बंगाल का इतिहास बंगाल पर इस्लामी शासन 13वीं शताब्दी से प्रारम्भ हुआ तथा 13वीं शताब्दी में मुग़ल शासन में व्यापार तथा उद्योग का एक समृद्ध केन्द्र में विकसित हुआ। 15वीं शताब्दी के अन्त तक यहाँ यूरोपीय व्यापारियों का आगमन हो चुका था तथा 18वीं शताब्दी के अन्त तक यह क्षेत्र ब्रिटिश ईस्ट इण्डिया कम्पनी के नियन्त्रण में आ गया था। भारत में ब्रिटिश साम्राज्य का उद्गम यहीं से हुआ। 1947 में भारत स्वतन्त्र हुआ और इसके साथ ही बंगाल, मुस्लिम प्रधान पूर्व बंगाल (जो बाद में बांग्लादेश बना) तथा हिन्दू प्रधान पश्चिम बंगाल (भारतीय बंगाल) में विभाजित हुआ। भूगोल यह राज्य भारत के पूर्वी भाग में 88,853 वर्ग किमी के भूखण्ड पर फैला है। इसके उत्तर में सिक्किम, उत्तर-पूर्व में असम, पूर्व में बांग्लादेश, दक्षिण में बंगाल की खाड़ी तथा उड़ीसा तथा पश्चिम में बिहार तथा झारखण्ड है। उत्तर में हिमालय पर्वत श्रेणी का पूर्वी हिस्सा से लेकर दक्षिण में बंगाल की खाड़ी तक प्रदेश की भौगोलिक दशा में खासी विविधता नजर आती है। उत्तर में दार्जिलिंग के शिखर, हिमालय पर्वतश्रेणी के अंग हैं। इसमें संदक्फू चोटी आती है जो राज्य का सर्वोच्च शिखर है। दक्षिण की ओर आने पर, एक छोटे तराई के बाद मैदानी भाग आरम्भ होता है। यह मैदान दक्षिण में गंगा के डेल्टा के साथ खत्म होता है। यही मैदानी क्षेत्र, पूर्व में बांग्लादेश में भी काफी विस्तृत है। पश्चिम की ओर का भूखण्ड पठारी है। गंगा की धारा मुख्य शाखा यहाँ कई भागों में बँट जाती है - एक शाखा बांग्लादेश में प्रवेश करती है जिसे पद्मा (पॉद्दा) नाम से जाना जाता है, दूसरी शाखाएँ पश्चिम बंगाल (भारतीय बंगाल) में दक्षिण की ओर भागीरथी तथा हुगली नामों के साथ बहती हैं। उपर्युक्त सभी शाखाएँ दक्षिण की ओर बंगाल की खाड़ी में विसर्जित होती हैं। गंगा नदी का मुहाना (सुंदरवन) विश्व का सबसे बड़ा मुहाना (डेल्टा) है। उत्तरी पर्वतीय भाग में तीस्ता, महानंदा, तोरसा आदि नदियाँ बहती हैं। पश्चिमी पठारी भाग में दामोदर, अजय, कंग्साबाती आदि प्रमुख धाराएं हैं। पश्चिम बंगाल (भारतीय बंगाल) का मौसम मुख्यतः उष्णकटिबन्धीय है। जनपद पश्चिम बंगाल (भारतीय बंगाल) के जिलों की कुल संख्या 23 है। नीचे बायीं ओर दी गयी छवि के अनुसार जिलों के नाम सूचीबद्ध हैं। {| |- style=\"height:100px; vertical-align:top;\" | दार्जिलिंग जलपाईगुड़ी कूचबिहार उत्तर दिनाजपुर दक्षिण दिनाजपुर मालदा बीरभूम मुर्शिदाबाद पूर्व बर्धमान नदिया |
      पुरुलिया बांकुड़ा हुगली उत्तर 24 परगना पूर्व मेदिनीपुर हावड़ा कोलकाता दक्षिण २४ परगना पश्चिम मेदिनीपुर अलीपुरद्वार कलिम्पोंग झाड़ग्राम पश्चिम बर्धमान |} संस्कृति नृत्य, संगीत तथा चलचित्रों की यहाँ लम्बी तथा सुव्यवस्थित परम्परा रही है।दुर्गापूजा (बांग्ला: দুর্গাপূজা दुर्गापूजा) यहाँ अति उत्साह तथा व्यापक जन भागीदारी के साथ मनाई जाती है। क्रिकेट तथा फुटबॉल यहाँ के लोकप्रियतम खेलों में से हैं। सौरभ गांगुली जैसे खिलाड़ी तथा मोहन बगान एवं ईस्ट बंगाल जैसी टीम इसी प्रदेश से…"} {"instruction": "Identify the most used programming language in the following data.", "input": "Java: 30%, Python: 40%, C++: 20%, JavaScript: 10%", "output": "most_used_language = \"Python\""} {"text": "[EN Wikipedia] Surf's Up 2: WaveMania\n\nSurf's Up 2: WaveMania is a 2017 animated comedy film directed by Henry Yu. It is the sequel to the 2007 film Surf's Up. Produced by Sony Pictures Animation and WWE Studios with animation from Rainmaker Entertainment, the film received a direct-to-video release on January 17, 2017, on DVD and digital media. The reception to the sequel was mostly negative and it was also the last Sony Pictures Animation film to be released as a direct-to-DVD feature. Jeremy Shada and Melissa Sturm respectively replace Shia LaBeouf and Zooey Deschanel as Cody Maverick and Lani Aliikai. Jon Heder and Diedrich Bader return as Chicken Joe and Tank Evans, respectively, while WWE professional wrestlers John Cena, The Undertaker, Triple H, Saraya Bevis, Michael Cole, and Vince McMahon make up the rest of the cast. Plot A northern rockhopper penguin named Cody Maverick lives in obscurity on Pen Gu Island, where he teaches children to surf in his own surf school alongside gentoo penguin Lani Aliikai, opposed by his rival Tank Evans, who also runs his own surf school. Cody's friend Chicken Joe is a world-famous surfer, performing in competitions around the world. Chicken Joe leaves his world tour to visit Pen Gu island. At the same time, \"The Hang 5\", a team of extreme surfers and thrillseekers (consisting of giant otter Mr. McMahon, puffin Paige and penguins J.C., The Undertaker and Hunter, and their announcer Seagull), arrive on the island. Since Cody was a big fan of them from childhood, he invites the whole team to his place and throws a party in their honor. At the party, Mr. McMahon reveals that the team are on a journey to a mythical surf spot called the \"Trenches\" to ride a rogue wave, and further reveals to his team that he is retiring, and came to the island to find his replacement. After Mr. McMahon and Paige choose Lani, Cody and Tank respectively convince J.C. and Hunter to sponsor them as potential replacements for McMahon, the Undertaker randomly selecting Chicken Joe so that he will also have a candidate, unaware of his fame. The group subsequently leaves the island atop a whale. Having approached an unknown coastline, they walk (and later surf) through a desert for a time (encountering quicksand), before reaching a jungle, at which the group stops for the night. The next day, while searching the jungle, they find a temple, the remains of an ancient penguin civilization that worshipped the art of surfing, Tank discovering a golden surfboard. Further, the group uses improvised hang gliders combined with surfboards to cross a lava lake on Cody's suggestion (from having viewed hieroglyphs from the temple), during which, due to his bickering with Tank, he almost knocks Chicken Joe into the lava, and The 5 harshly berate him for his behavior. Feeling immense guilt,…"} {"instruction": "Write a code snippet to get the name of the planet which is the fifth planet from the sun.", "input": "", "output": "name_planets = [\"Mercury\", \"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\", \"Neptune\"] fifth_planet = name_planets[4] print(fifth_planet)"} {"instruction": "Write a Python program to print out the current time.", "input": "Not applicable", "output": "from datetime import datetime\n\n# get the current time and print it out\nnow = datetime.now()\nprint(now)"} {"text": "[EN Wikipedia] Harry Marshall\n\nWilliam Henry Marshall (16 February 1905 – 9 March 1959) was an English footballer who played at inside-forward. He scored 71 goals in 276 league appearances in the Football League, playing for Nottingham Forest, Southport, Wolverhampton Wanderers, Port Vale, Tottenham Hotspur, and Rochdale. Career Marshall played for Hucknall Primitives and Bromley's Athletic, before joining Nottingham Forest in 1923. Forest finished just one place above the First Division relegation zone in 1923–24, finishing ahead of Chelsea on goal average. They were then relegated in last place in 1924–25, and Marshall moved on to Southport of the Third Division North. He scored 27 goals in 54 league games for the \"Sandgrounders\", and was sold on to Wolverhampton Wanderers at the end of 1926–27. Wolves finished 16th in the Second Division in 1927–28 and 17th in 1928–29. He signed with Port Vale for a sizeable outlay in March 1930. He was initially a roaring success at Vale, scoring on his debut in a 2–0 win at Accrington Stanley on 15 March 1930, though only made three further appearances in 1929–30 as the club raced to the Third Division North title. He regularly made the first team from October 1930, though scored just twice in 24 Second Division appearances in 1930–31. He scored three goals in 29 games in 1931–32, including two against Potteries derby rivals Stoke City at The Old Recreation Ground. He was sold to league rivals Tottenham Hotspur in March 1932. After leaving \"Spurs\" he played for Birmingham & District League clubs Kidderminster Harriers and Brierley Hill Alliance, before joining Third Division North side Rochdale in 1935. The club finished just one place and two points above the re-election zone in 1935–36 and were just three points above the (potential) drop zone in 1936–37. He later ended his career in Northern Ireland with Linfield. Career statistics Source: Honours Port Vale Football League Third Division North: 1929–30 References People from Hucknall Footballers from Nottinghamshire English men's footballers Men's association football forwards Nottingham Forest F.C. players Southport F.C. players Wolverhampton Wanderers F.C. players Port Vale F.C. players Tottenham Hotspur F.C. players Kidderminster Harriers F.C. players Brierley Hill Alliance F.C. players Rochdale A.F.C. players Linfield F.C. players English Football League players 1905 births 1959 deaths"} {"instruction": "Develop a Python script which extracts data from a given website.", "input": "URL: https://www.example.com", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = \"https://www.example.com\"\npage = requests.get(url)\nsoup = BeautifulSoup(page.content, 'html.parser')\n\n# Extract all Anchor Tags\nlinks = soup.find_all('a')\n\n# Extract all the contents of Anchors\nfor link in links:\n print(link.text, link.get('href'))"} {"instruction": "Explain what the following code is doing.", "input": "import random def generate_random_number(): return random.randint(1, 10)", "output": "The code is defining a function called \"generate_random_number\" which will generate a randomly chosen integer between 1 and 10 using the randint() function from the random library."} {"instruction": "Write a PHP script to print the current week number", "input": "", "output": ""} {"instruction": "Create a list comprehension in Python to extract all the even numbers from a given list.", "input": "list = [3,4,5,6,7,8]", "output": "evens_list = [num for num in list if num % 2 == 0]"} {"instruction": "Create a class in Python that can be used to store the details of a student.", "input": "", "output": "class Student: def __init__(self, name, age, gender): self.name = name self.age = age self.gender = gender def set_details(self, name, age, gender): self.name = name self.age = age self.gender = gender def get_details(self): return f'Name: {self.name}, Age: {self.age}, Gender: {self.gender}'"} {"text": "[DE Wikipedia] ATP Challenger Tour 2022\n\nIn der folgenden Tabelle werden die Turniere der professionellen Herrentennis-Saison 2022 der ATP Challenger Tour dargestellt. Sie bestand aus 184 Turnieren mit einem Preisgeld zwischen 37.520 und 159.360 US-Dollar. Es war die 46. Ausgabe des Challenger-Turnierzyklus und die vierzehnte unter dem Namen ATP Challenger Tour. Seit 2019 hatten eigentlich alle Turniere im Einzel ein 48er-Feld. Im Jahr 2019 kam allerdings eine neue Kategorie (Challenger 50) hinzu, in der das Teilnehmerfeld aus 32 Spielern bestand. Es konnten sich aus einer Qualifikation von vier Spielern zwei einen Platz für das Hauptfeld sichern. Aufgrund der Coronavirus-Pandemie wiesen auch in diesem Jahr die Turniere im Einzel jedoch (bis auf wenige Ausnahmen) ein reduziertes 32er-Feld auf. Es konnten sich hierbei aus der Qualifikation von 24 (in Ausnahmen 16) Spielern 6 (bzw. 4) einen Platz im Hauptfeld sichern. Turnierplan Januar Februar März April Mai Juni Juli August September Oktober November 1 Turnierbeginn (ohne Qualifikation) 2 Seit 2019 werden alle Spieler der Turniere untergebracht. 3 Das Kürzel „(i)“ (= indoor) bedeutet, dass das betreffende Turnier in einer Halle ausgetragen wird. Verteilung der Weltranglistenpunkte Ein Überblick über die Punktverteilung der jeweiligen Challenger-Kategorien im Jahr 2022. Seit 2019 mussten alle Challenger-Turniere ihren Spielern Hospitality gewähren. Erklärung Kopfzeile: S = Sieger; F = (unterlegener) Finalist; HF = Halbfinale erreicht (und dann ausgeschieden); VF = Viertelfinale; AF = Achtelfinale; 1R = Erste Runde Paare im Doppel erhalten keine Punkte vor dem Viertelfinale. Siehe auch ATP Tour 2022 ATP Champions Tour 2022 WTA Tour 2022 WTA Challenger Series 2022 ITF Women’s World Tennis Tour 2022 Weblinks ATP Challenger Tour (englisch) ATP Challenger Tour 2022 Results Archive (englisch) Einzelnachweise 2022 Tennissaison 2022"} {"instruction": "Write a HTML code to display a hyperlink with the text \"GitHub\" and point it to the github.com website.", "input": "", "output": "GitHub"} {"instruction": "You need to generate an array of strings of length 5 to 10 characters.", "input": "", "output": "import string import random def generate_string_array(length): # This function will generate an array of strings array_of_strings = [] for _ in range(length): new_string = ''.join(random.choice(string.ascii_lowercase) for _ in range(random.randint(5,10))) array_of_strings.append(new_string) return array_of_strings"} {"instruction": "Convert the given algorithm written in pseudo code to Python.", "input": "Input: Array A\n1. from i=1 to i=length[A]\n2. j=i \n3. min = A[i]\n4. for j = i+1 to length[A]\n5. if min > A[j]\n6. min = A[j] \n7. swap A[i] with A[j]", "output": "def selection_sort(A): \n for i in range(len(A)): \n minimum = i \n for j in range(i+1, len(A)): \n if A[minimum] > A[j]: \n minimum = j \n A[i], A[minimum] = A[minimum], A[i]"} {"text": "[EN Wikipedia] Badminton at the 2011 SEA Games – Men's singles\n\nThese are the results of the men's singles competition in badminton at the 2011 SEA Games in Jakarta. Medal winners Draw Top half Bottom half Finals References Results Badminton at the 2011 SEA Games"} {"text": "[DE Wikipedia] VfL Bergen 94\n\nDer VfL Bergen 94 ist ein deutscher Mehrspartenverein aus Bergen auf Rügen. Heimstätte des Vereins ist das Ernst-Moritz-Arndt-Stadion, welches 4000 Zuschauern Platz bietet. Verein (Fußball) Der VfL Bergen wurde 1938 als Einheit Bergen gegründet. Nach der 1945 erfolgten Auflösung wurde der Verein nach Kriegsende als Rugia Bergen neu gegründet. In der Folgezeit fanden weitere Namensänderungen statt, 1949 in KWU Bergen sowie ab 1951 in Einheit Bergen. Mit dem Einsteigen der Deutschen Reichsbahn als Trägerbetrieb verbesserten sich die sportlichen Rahmenbedingungen. Der Verein von der Insel Rügen wurde 1961 in BSG Lokomotive Bergen umbenannt. 1971 gelang Lok Bergen der Aufstieg von der Bezirksliga Rostock in die DDR-Liga. Die zweithöchste Spielklasse der DDR musste Lok nach nur einer Spielzeit gemeinsam mit Einheit Grevesmühlen wieder verlassen. 1974 schaffte Bergen mit knappen Vorsprung vor Motor Wolgast noch einmal die Rückkehr in die Liga. Konnte der erneute sofortige Wiederabstieg in der Saison 1974/75 noch verhindert werden, mussten die Rüganer 1976 endgültig in die Bezirksliga absteigen. 1989 stieg Lok Bergen in die viertklassige Bezirksklasse ab und wurde nach der Wende in die Landesliga integriert. Gleichzeitig spielte der Verein ab 1990 unter dem Namen ESV Bergen. Im Jahr 1994 erfolgte die letzte Namensänderung in VfL Bergen 94. Auf sportlicher Ebene pendelte der VfL ab den neunziger Jahren zwischen Landesliga und Verbandsliga Mecklenburg-Vorpommern, in der Bergen von 1995 bis 2000 und von 2004 bis 2006 agierte. Derzeitige Spielklasse ist die Landesliga Mecklenburg-Vorpommern. Statistik Teilnahme DDR-Liga: 1971/72, 1974/75, 1975/76 Ewige Tabelle der DDR-Liga: Rang 138 Personen Nicole Fetting (* 1980) Ulrike Jurk (* 1979) Björn Laars (* 1974) Rainer Marks (* 1941, † 2019) Meinhard Uentz (* 1938, † 2021) Literatur Hardy Grüne: Lok Bergen. In: Enzyklopädie des deutschen Ligafußballs. Band 7: Vereinslexikon. AGON-Sportverlag, Kassel 2001, ISBN 3-89784-147-9, S. 40. Hanns Leske: Lok Bergen. In: Enzyklopädie des DDR-Fußballs. Verlag Die Werkstatt, Göttingen 2007, ISBN 978-3-89533-556-3, S. 183. Weblinks www.vfl-bergen.de Einheit Bergen, Lok Bergen, VfL Bergen 94. www.ruegen-fussball.de Übersicht aller Vereine von Rügen Fußballverein aus dem Landkreis Vorpommern-Rügen Volleyballverein aus Mecklenburg-Vorpommern Verein im Landesfußballverband Mecklenburg-Vorpommern Vfl Bergen 94 Vfl Bergen 94 Sportverein (Landkreis Vorpommern-Rügen) VfL Bergen 94 Sport (Pommern)"} {"text": "[CS Wikipedia] Překlad\n\nPřeklad (translace) je písemný převod (zpravidla také psaného) originálního textu z jednoho jazyka do druhého provedený překladatelem. Rozlišuje se přitom především obor originálu, zda jde o text umělecký, odborný, populárně-naučný, administrativní, náboženský, návod na použití přístroje apod. Na rozdíl od tlumočníka nemusí být překladatel rychlý, důležitá je hlavně faktická správnost a přesnost překladu a shodná srozumitelnost. Překladatel obvykle překládá z cizího jazyka do své mateřštiny, resp. do jazyka ovládaného na stejné úrovni. Potřebuje nadprůměrnou znalost obou jazyků, vyjadřovací schopnosti a kromě toho i znalosti oboru tématu textu, často i okolností vzniku textu, lingvistiky, stylistiky, literární teorie a teorie překladu, popř. dějin překladu. Zvláště při uměleckém překladu je důležitý navíc převod nejen obsahu, nýbrž i estetických hodnot textu a individuálního stylu autora originálu. Často jde více o nápodobu vyznění v cílovém jazyce, zejména, pokud jsou jazyky velmi odlišné. Vědeckým zkoumáním v oblasti překladu (i tlumočení) se zabývá obor translatologie. Tři druhy překladu Ačkoliv je nejběžnější formou překladu převod mezi dvěma cizími jazyky, lze v zásadě rozlišovat tři druhy překladu (podle Romana Jakobsona): interlingvální, tj. mezijazykový – nejznámější forma překladu intralingvální, tj. vnitrojazykový – převod v rámci jednoho jazyka, např. modernizace starého textu, který by pro současného čtenáře téhož jazyka byl nesrozumitelný intersemiotický, tj. meziznakový – převod mezi různými znakovými systémy, např. při filmové adaptaci románu Související články Literární překlad Odborný překlad Strojový překlad Post editing Externí odkazy Translatologie"} {"instruction": "Develop a numerical optimization algorithm in Python to minimize the cost of a given function.", "input": "The function to be minimized is f(x) = x^2 + 2x + 3", "output": "# Import the required libraries\nimport numpy as np\n\n# Define the objective function\ndef f(x):\n return np.square(x) + 2*x + 3\n\n# Define the optimization algorithm\ndef opt(f, x0, lr, n_iter):\n x = x0\n for i in range(n_iter):\n x_prev = x\n grad = 2 * x + 2\n x = x - lr * grad\n if np.abs(x - x_prev) < 1e-5:\n break\n\n# Print the results\nprint(\"Minimum at {} with value {}\".format(x, f(x)))"} {"instruction": "Create a Python class to represent a person and its details.", "input": "", "output": "class Person:\n def __init__(self, name, age):\n self.name = name\n self.age = age\n\ndef describe_person(self): \n print(f\"Name: {self.name}, Age: {self.age}\")"} {"text": "[HI Wikipedia] पी॰ वी॰ नरसिम्हा राव\n\nपामुलापति वेंकट नरसिंह राव (जन्म- 28 जून 1921, मृत्यु- 23 दिसम्बर 2004) भारत के 09 वें प्रधानमंत्री के रूप में जाने जाते हैं। 'लाइसेंस राज' की समाप्ति और भारतीय अर्थनीति में खुलेपन उनके प्रधानमंत्रित्व काल में ही आरम्भ हुआ। ये आन्ध्रा प्रदेश के मुख्यमंत्री भी रहे। इनके प्रधानमंत्री बनने में भाग्य का बहुत बड़ा हाथ रहा है। 21 मई 1991 को राजीव गांधी की हत्या हो गई थी। ऐसे में सहानुभूति की लहर के कारण कांग्रेस को निश्चय ही लाभ प्राप्त हुआ। 1991 के आम चुनाव दो चरणों में हुए थे। प्रथम चरण के चुनाव राजीव गांधी की हत्या से पूर्व हुए थे और द्वितीय चरण के चुनाव उनकी हत्या के बाद में। प्रथम चरण की तुलना में द्वितीय चरण के चुनावों में कांग्रेस का प्रदर्शन बेहतर रहा। इसका प्रमुख कारण राजीव गांधी की हत्या से उपजी सहानुभूति की लहर थी। इस चुनाव में कांग्रेस को स्पष्ट बहुमत नहीं प्राप्त हुआ लेकिन वह सबसे बड़े दल के रूप में उभरी। कांग्रेस ने 232 सीटों पर विजय प्राप्त की थी। फिर नरसिम्हा राव को कांग्रेस संसदीय दल का नेतृत्व प्रदान किया गया। ऐसे में उन्होंने सरकार बनाने का दावा पेश किया। सरकार अल्पमत में थी, लेकिन कांग्रेस ने बहुमत साबित करने के लायक़ सांसद जुटा लिए और कांग्रेस सरकार ने पाँच वर्ष का अपना कार्यकाल सफलतापूर्वक पूर्ण किया। पीवी नरसिंह राव ने देश की कमान काफी मुश्किल समय में संभाली थी। उस समय भारत का विदेशी मुद्रा भंडार चिंताजनक स्तर तक कम हो गया था और देश का सोना तक गिरवी रखना पड़ा था। उन्होंने रिजर्व बैंक के अनुभवी गवर्नर डॉ. मनमोहन सिंह को वित्तमंत्री बनाकर देश को आर्थिक भंवर से बाहर निकाला।''' इन्हें भी देखें भारत के प्रधानमंत्री अटल बिहारी वाजपेयी सन्दर्भ बाहरी कड़ियाँ देश की आर्थिक आजादी के मसीहा थे नरसिंह राव भारत के प्रधानमंत्रियो का आधिकारिक जालस्थल (अंग्रेजी मे) 1921 में जन्मे लोग २००४ में निधन भारत के प्रधानमंत्री भारतीय राष्ट्रीय कांग्रेस के राजनीतिज्ञ भारतीय राष्ट्रीय कांग्रेस के अध्यक्ष"} {"text": "[CS Wikipedia] Mechanika tuhého tělesa\n\nMechanika tuhého tělesa (mechanika dokonale tuhého tělesa, popř. také stereomechanika) je část mechaniky, která se zabývá pohybem tuhého tělesa a silami na ně působícími. Skutečná pevná tělesa jsou soubory atomů a molekul vázaných jistými vnitřními silami, které je možné vnější silou překonat a těleso deformovat. Popis reálných těles s uvážením deformací je poměrně složitý, proto byl zaveden pojem tuhého tělesa, což je ideální těleso, které svůj tvar ani objem působením libovolně velkých sil nemění. Tuhé těleso je vymezeno svou hmotností a geometrickým tvarem, kterému přísluší objem . Tuhé těleso, jakožto soustavu atomů nebo molekul, lze nahradit soustavou hmotných bodů, jejichž vzájemné vzdálenosti se nemění. Poloha a pohyb Poloha dokonale tuhého tělesa v prostoru je plně určena polohou jeho tří bodů, které neleží v jedné přímce. Souřadnice těchto tří bodů však nelze volit zcela libovolně, poněvadž jejich vzájemné vzdálenosti jsou určeny tvarem tělesa. Z devíti souřadnic tří bodů tělesa lze volit pouze šest, neboť zbývající tři souřadnice již vyplynou z pevně určených vzdáleností vrcholů trojúhelníka tvořeného danými body. Poloha tuhého tělesa je tak určena šesti souřadnicemi, které lze považovat za šest nezávislých parametrů. Tuhému tělesu je tedy přisuzováno šest stupňů volnosti. Takový počet stupňů volnosti má však pouze tuhé těleso, jehož poloha není omezována žádnými dalšími podmínkami (tedy volné těleso). Zavádí se pojem Hmotný střed, jako Volba těchto parametrů je závislá na daných podmínkách řešeného problému. Vhodnou volbou mohou být např. tři souřadnice těžiště a tři úhly určující orientaci tělesa vzhledem k osám soustavy souřadnic. Těmito třemi úhly mohou být např. Eulerovy úhly. Pohyb tuhého tělesa lze vždy rozložit na (Chaslesova věta): posuvný pohyb (translaci) Všechny body tělesa se pohybují po rovnoběžných trajektoriích otáčivý pohyb (rotaci) kolem osy otáčení všechny body tělesa se pohybují po kružnicích se středy na ose otáčení. Výsledný obecný pohyb tuhého tělesa je složením obou pohybů. Speciálním druhem posuvného pohybu je pohyb paralelní (kruhový, spirálový, cykloidní). K posouzení účinku síly na otáčivý pohyb se zavádí veličina moment síly a k posouzení množství energie nutné k roztočení tělesa na určitou úhlovou rychlost veličina moment setrvačnosti. Síly Působiště síly v tuhém tělese lze posouvat po vektorové přímce síly. Tohoto a dalších poznatků se využívá k hledání výslednice sil, ke skládání sil. Dvě stejně velké síly opačného směru, které neleží na společné přímce, však nelze skládat a tvoří tzv. dvojici sil. Stejně tak nelze skládat dvě mimoběžné síly. Rovnováha sil V gravitačním poli Země působí na hmotné body tuhého tělesa síly, které jsou prakticky rovnoběžné a přímo úměrné hmotnosti jednotlivých hmotných bodů.…"} {"instruction": "Create a Python script that accesses a website's HTML.", "input": "", "output": "# Import the requests library \nimport requests \n\n# Get the website's content \nr = requests.get('https://www.example.com/') \n\n# Get the webpage's HTML \nhtml = r.text\n\n# Print the HTML \nprint(html)"} {"instruction": "Write a Python script for combining two dictionaries.", "input": "dict1 = { \"a\" : 1, \"b\" : 2 }\ndict2 = { \"c\" : 3, \"d\" : 4 }", "output": "def combine_dicts(dict1, dict2): \n new_dict = dict1.copy() \n new_dict.update(dict2) \n return new_dict \n \ndict1 = { \"a\" : 1, \"b\" : 2 }\ndict2 = { \"c\" : 3, \"d\" : 4 }\n \nprint(combine_dicts(dict1, dict2))"} {"instruction": "Given a list of integers, find the lengthiest common substring of the list.", "input": "[1, 2, 3, 4, 5, 3, 2, 6]", "output": "The longest common substring of the list [1, 2, 3, 4, 5, 3, 2, 6] is \"3, 2\". The length of the common substring is 3."} {"text": "[HI Wikipedia] रवीन्द्रनाथ ठाकुर की कृतियाँ\n\nरवीन्द्रनाथ ठाकुर का सृष्टिकर्म काव्य, उपन्यास, लघुकथा, नाटक, प्रबन्ध, चित्रकला और संगीत आदि अनेकानेक क्षेत्रों में फैला हुआ है। उपन्यास {| class=\"wikitable\" |- ! उपन्यास ! रचनाकाल ! अन्य तथ्य ! हिन्दी अनुवाद |- | करुणा | १८८० | रवीन्द्रनाथ ठाकुर का पहला (लघु) उपन्यास। इसके स्वरूप को लेकर आरंभ में इसके उपन्यास माने जाने पर विवाद था; परंतु बाद में इसे उपन्यास के रूप में ही स्वीकृति मिली। | 'रवीन्द्रनाथ टैगोर रचनावली' (सस्ता साहित्य मंडल, नयी दिल्ली से प्रकाशित) के खण्ड-२४ में संकलित। |- | बउ-ठाकुरानीर हाट | १८८२ | रवीन्द्रनाथ ठाकुर के प्रथम उपन्यास के रूप में प्रसिद्ध। यशोहर के राजा प्रतापादित्य और चंद्रद्वीप के राजा (जमींदार) रामचन्द्र राय के विवाद को आधार बनाकर लिखित ऐतिहासिक (लघु) उपन्यास। १३१६ बंगाब्द (१९०९ ई॰) में प्रकाशित उनका प्रायश्चित्त नाटक बउ-ठाकुरानीर हाट पर ही आधारित है। प्रायश्चित्त १३३६ बंगाब्द (१९२९ ई॰) में पुनर्लिखित होकर परित्राण नाम से मुद्रित हुआ। | ठकुरानी बहू का बाजार नाम से 'रवीन्द्रनाथ टैगोर रचनावली' (सस्ता साहित्य मंडल, नयी दिल्ली से प्रकाशित) के खण्ड-२६ में संकलित। |- | राजर्षि| १८८६ | त्रिपुरा के राजपरिवार के इतिहास को लेकर रचित ऐतिहासिक (लघु) उपन्यास। १२९७ बंगाब्द (१८९० ई॰) में इस उपन्यास के प्रथमांश के आधार पर विसर्जन नामक नाटक की रचना हुई। | 'रवीन्द्रनाथ टैगोर रचनावली' (सस्ता साहित्य मंडल, नयी दिल्ली से प्रकाशित) के खण्ड-२३ में संकलित। |- | प्रजापतिर निर्बन्ध | १९०१ | हास्यरसात्मक (लघु) उपन्यास। १३११ बंगाब्द (१९०४ ई॰) में रबीन्द्र-ग्रन्थाबली ('हितबादीर उपहार') संकलन में चिरकुमार सभा नाम से प्रकाशित है। बाद में चिरकुमार सभा नाम से इस उपन्यास का नाट्यरूपान्तरण १३३२ बंगाब्द (१९२५ ई॰) में प्रकाशित हुआ। | |- | नष्टनीड़ | १९०२ | सामाजिक-मनस्तात्त्विक उपन्यासिका। इस लघु उपन्यास के प्रकाशन से रवीन्द्रनाथ की अति विशिष्ट कथा-यात्रा, बल्कि बाङ्ला साहित्य की ही एक नयी कथा-यात्रा आरंभ हुई। बंगाली उच्च मध्यवर्ग की स्त्रियों की मनोदशा और उसकी विडंबना का इसमें बहुत ही प्रामाणिक और विश्वसनीय चित्र उकेरा गया है। इसका प्रकाशन लम्बी कहानी के रूप में भी होते रहा है। सत्यजीत राय ने सन् १९६४ में इसी कथा पर आधारित फ़िल्म 'चारुलता' बनायी थी। | 'रवीन्द्रनाथ टैगोर रचनावली' (सस्ता साहित्य मंडल, नयी दिल्ली से प्रकाशित) के खण्ड-२९ में लम्बी कहानी के रूप में संकलित। |- | चोखेर बालि | १९०२ | सामाजिक-मनस्तात्त्विक उपन्यास। रवीन्द्रनाथ के श्रेष्ठ उपन्यास के रूप में प्रसिद्ध। २००३ साल में ऋतुपर्ण घोष ने इस उपन्यास के आधार पर चोखेर बालि चलचित्र का निर्माण किया। | आँख की किरकिरी नाम से साहित्य अकादेमी, नयी दिल्ली से प्रकाशित एवं 'रवीन्द्रनाथ टैगोर रचनावली' (सस्ता साहित्य मंडल, नयी दिल्ली से प्रकाशित) के खण्ड-१६ में संकलित। |- | नौकाडुबि | १९०६ | सामाजिक उपन्यास। सर्वप्रथम १३१०-११ बंगाब्द में बंगदर्शन पत्रिका में प्रकाशित हुआ था। | नौका डूबी नाम से 'रवीन्द्रनाथ टैगोर रचनावली' के खण्ड-१७ में संकलित। |- | गोरा | १९१० | महाकाव्यात्मक उपन्यास। रवीन्द्रनाथ टैगोर का दीर्घतम उपन्यास। देश पत्रिका एवं कई अन्य लोगों के विचार से बीसवीं शताब्दी का श्रेष्ठ बाङ्ला…"} {"instruction": "Calculate the running average of a given array of data.", "input": "[1,6,3,5,2,7,8]", "output": "def calculate_running_average(arr): running_sum = 0 for i in range(len(arr)): running_sum += arr[i] arr[i] = running_sum / (i+1) return arr arr = [1, 6, 3, 5, 2, 7, 8] calculate_running_average(arr) # Returns [1.0, 3.5, 3.0, 3.75, 3.2, 4.16, 4.43]"} {"instruction": "Modify the following program to output the 3 most frequency words.", "input": "words = 'It is very important to be pythonic when writing python code.'\n\nword_dict = {}\nfor word in words.split():\n if word in word_dict:\n word_dict[word] += 1\n else:\n word_dict[word] = 1", "output": "words = 'It is very important to be pythonic when writing python code.'\n\nword_dict = {}\nfor word in words.split():\n if word in word_dict:\n word_dict[word] += 1\n else:\n word_dict[word] = 1\n\nsorted_words = sorted(word_dict, key = lambda x: word_dict[x], reverse = True)\nprint(\"The three most frequent words are:\")\nfor i in range(3):\n print(sorted_words[i], word_dict[sorted_words[i]])"} {"instruction": "Create a dictionary with two keys and a list of values assigned to each key.", "input": "", "output": "my_dict = { \"key1\": [1, 2, 3], \"key2\": [4, 5, 6] }"} {"text": "[HI Wikipedia] सुवर्णरेखा नदी\n\nसुवर्णरेखा या स्वर्णरेखा भारत के झारखण्ड, पश्चिम बङ्गाल और ओड़िशा राज्यों में बहने वाली एक नदी है। विवरण यह राँची नगर से 16 किलोमीटर दक्षिण-पश्चिम में स्थित नगड़ी गाँव में रानी चुआं नामक स्थान से निकलती है और उत्तर पूर्व की ओर बढ़ती हुई मुख्य पठार को छोड़कर प्रपात के रूप में गिरती है। इस प्रपात (झरना) को हुन्डरु जलप्रपात (hundrughagh) कहते हैं। प्रपात के रूप में गिरने के बाद नदी का बहाव पूर्व की ओर हो जाता है और मानभूम जिले के तीन संगम बिंदुओं के आगे यह दक्षिण पूर्व की ओर मुड़कर सिंहभूम में बहती हुई उत्तर पश्चिम से मिदनापुर जिले में प्रविष्टि होती है। इस जिले के पश्चिमी भूभाग के जंगलों में बहती हुई बालेश्वर जिले में पहुँचती है। यह पूर्व पश्चिम की ओर टेढ़ी-मेढ़ी बहती हुई बालेश्वर नामक स्थान पर बंगाल की खाड़ी में गिरती है। इस नदी की कुल लंबाई 474 किलोमीटर है और लगभग 28928 वर्ग किलोमीटर का जल निकास इसके द्वारा होता है। इसकी प्रमुख सहायक नदियाँ काँची एवं कर्कारी हैं। भारत का प्रसिद्ध एवं पहला लोहे तथा इस्पात का कारखाना इसके किनारे स्थापित हुआ। कारखाने के संस्थापक जमशेद जी टाटा के नाम पर बसा यहाँ का नगर जमशेदपुर या टाटानगर कहा जाता है। अपने मुहाने से ऊपर की ओर यह 16 मील तक देशी नावों के लिए नौगम्य (navigable) है। इन्हें भी देखें खड़कई नदी चौमुखा, ओड़िशा सन्दर्भ झारखण्ड की नदियाँ पश्चिम बंगाल की नदियाँ ओड़िशा की नदियाँ"} {"text": "[CS Wikipedia] Kazatelská stanice Českobratrské církve evangelické ve Velké Lhotě u Dačic\n\nKazatelská stanice Českobratrské církve evangelické ve Velké Lhotě u Dačic je kazatelskou stanicí Farního sboru Českobratrské církve evangelické v Telči. Kazatelská stanice vznikla roku 2016 přeměnou dosavadního Farního sboru Českobratrské církve evangelické ve Velké Lhotě u Dačic, existujícího v letech 1782–2015. Poslední farářkou sboru byla Kateřina Frühbauerová (od roku 2011 na mateřské dovolené) a kurátorem František Novák. V roce 2014 schválilo sborové shromáždění velkolhoteckého sboru záměr sloučení s FS ČCE v Telči s tím, že valtínovská část se stane součástí FS ČCE v Jindřichově Hradci. Tento záměr podpořil i konvent Horáckého a Jihočeského seniorátu. Poslední krok ke sloučení byl na rozhodnutí synodu, který se sešel v květnu 2015. Dnem 1. ledna 2016 vstoupilo sloučení velkolhoteckého sboru s telčským a vyčlenění kazatelské stanice Valtínov k jindřichohradeckému sboru v platnost. Faráři sboru Josef Pospíšil (1928-1930) Miroslav Janeba (1938-1943) Jiří Melmuk (1963-1967) Miloslav Gregar (1967-1979) Alois Valenta (1979-1983) Jiří Melmuk (1986-1990) Petr Melmuk (1990-2006) Pavel Klimeš (2006-2009) Kateřina Frühbauerová (2009-2015) Odkazy Reference Související články Farní sbor Českobratrské církve evangelické v Telči Farní sbor Českobratrské církve evangelické v Jindřichově Hradci Evangelický kostel ve Velké Lhotě (dolní kostel) Evangelický kostel ve Velké Lhotě (horní kostel) Externí odkazy Údaje o kazatelské stanici na portálu Evangnet Údaje o zrušeném sboru na portálu Evangnet Oficiální stránky sboru Velká Lhota u Dačic Organizace založené roku 2016 Volfířov"} {"instruction": "Design a program in Python to search a tree using a Breadth-First Search.", "input": "", "output": "def BFS(tree, item):\n # Create an empty queue for BFS\n queue = []\n \n # Enqueue the root of tree\n queue.append(tree)\n \n # Do till the queue is empty\n while(len(queue) > 0):\n # Dequeue an item from queue\n item = queue.pop(0)\n \n # If the dequeued item is the item we are looking for then return\n if item == item:\n return item\n \n # Enqueue the left node\n if item.left is not None:\n queue.append(item.left)\n \n # Right node enqueue\n if item.right is not None:\n queue.append(item.right)\n \n # Item not found\n return None"} {"instruction": "How can you validate a credit card number using JavaScript?", "input": "", "output": "You can validate a credit card number using JavaScript with the Luhn algorithm. The Luhn algorithm is a simple checksum formula that can be used to validate various identification numbers, such as credit card numbers, National Provider Identifier (NPI) numbers, and Canadian Social Insurance Numbers (SINs)."} {"text": "[CS Wikipedia] Zapp\n\nZapp (Zapp Band, Zap & Roger) je funková hudební skupina, založená v roce 1978 bratry Lesterem, Larrym, Rogerem, Tonym a Terrym Troutmanovými. Jejich hity jako \"More Bounce to the Ounce\", \"Dance Floor, Part 1\" či \"Computer Love\", pomohl ve vývoji West coast hip hopu a G-funku. především díky použití silně basového funkového rytmu a pozorohudnému použití talk boxu, zesilovače který může změnit lidský hlas na hlas robotický. Tyto nevídané prvky částečně stály za úspěchem kapely. Členové Roger Troutman: vokály, kytara, bass, klávesy, harmonika, vibrafon, perkuse, talk box Larry Troutman: perkuse Lester Troutman: bicí Terry \"Zapp\" Troutman: klávesy, bass, vokály v pozadí Diskografie Studiová alba 1980: Zapp 1982: Zapp II 1983: Zapp III 1985: The New Zapp IV U 1989: Zapp Vibe 2002: Zapp VI: Back By Popular Demand Kompilace 1993: Zapp & Roger: All The Greatest Hits 1996: Roger & Zapp: Greatest Hits Vol. 2 & More Funkoví hudebníci"} {"instruction": "Amend the following Python function to calculate the sum of all even numbers in the given range.", "input": "def sum_even_numbers(n): '''This function will calculate the sum of all numbers in the given range.''' total = 0 for i in range(n): total += i return total", "output": "def sum_even_numbers(n): '''This function will calculate the sum of all even numbers in the given range.''' total = 0 for i in range(n): if i%2==0: total += i return total"} {"text": "[EN Wikipedia] Luís de Almeida (diplomat)\n\nLuís de Almeida served as the Angolan government's top diplomat to Europe during the 1980s. A career ambassador, he represented Angola in France, West Germany, Morocco, the Netherlands, and the Community of Portuguese-Speaking Countries. Early life Born in Gabela-Amboim, province of Kwanza-Sul, Angola, José Luís de Almeida studied political science and sociology and became a prominent diplomat and advocate for Angolan independence. He was married and had four children. Career Lauded as \"one of the most prominent figures of Angolan diplomacy,\" and a passionate advocate for Angola in international forums, Luis de Almeida helped to establish Angolan relations with many countries in Africa and Europe. “He was one of our pioneers, who long before national independence understood that our fight also had a political and diplomatic path,\" said Angolan foreign minister Téte António. In September 1961 Almeida participated in the first Summit of the Nonaligned Movement in Belgrade, Yugoslavia as a member of the Popular Movement for the Liberation of Angola (MPLA) delegation. As general director for information in the transitional government of Angola, he created programming for Portuguese-speaking African countries on Radio Deutsche Welle. A close advisor of Angolan president António Agostinho Neto, Almeida was tasked with opening various diplomatic missions. In a 1978 press conference in Brussels, Almeida announced that Belgium, Yugoslavia, and Italy had been chosen as initial sites for an Angolan presence in Europe. In December 1978 he became the first Angolan ambassador to be accredited to France and in 1985 he was appointed ambassador to West Germany. From 1993 to 2011 he served as Angola's ambassador to Morocco and was awarded the \"Grand Cross of Wissam Al Alaoui\" by King Mohammed VI, the highest honor granted to diplomats for their service in Morocco. On June 1, 2011, he was appointed Angolan ambassador to the Netherlands and took his seat in November of that year. From 2014 to 2018 he acted as permanent representative to the Community of Portuguese Speaking Countries (CPLP). Later life Luis de Almeida died on August 12, 2020, at the age of 87. See also Angola-France relations References External links Article on November 2008 appointment Obituary, Jornal de Angola (in Portuguese) Living people Year of birth missing (living people) Ambassadors of Angola to France Angolan diplomats"} {"instruction": "Generate a function in Python to calculate the total price of an online order. The function should take an array of items and item prices as input and return the total price as output.", "input": "Input array of items: [\"T-shirt\",\"Jeans\",\"Shoes\"], item prices: [30,45,100]", "output": "def calculate_total_price(items, prices):\n total = 0\n for i in range(len(items)):\n total += prices[i]\n return total\n \ntotal = calculate_total_price([\"T-shirt\",\"Jeans\",\"Shoes\"], [30,45,100]) \nprint(\"The total price is:\", total)"} {"text": "[HI Wikipedia] माशेरब्रुम\n\nमाशेरब्रुम पाक अधिकृत कश्मीर के बल्तिस्तान क्षेत्र में स्थित काराकोरम पर्वतों के माशेरब्रुम पर्वत समूह का सबसे ऊँचा पर्वत है। ७,८२१ मीटर (२५,६५९ फ़ुट) की बुलंदी के साथ यह विश्व का २२वाँ सबसे ऊँचा और पाकिस्तान-नियंत्रित क्षेत्रों का ९वाँ सबसे ऊँचा पहाड़ है। इसे के१ (K1) भी बुलाया जाता है क्योंकि १९वीं सदी में काराकोरम शृंखला के निरिक्षण के दौरान यह पहला मापा गया पर्वत था। माशेरब्रुम समूह बाल्तोरो हिमानी से दक्षिण में स्थित है। नाम 'माशेरब्रुम' नाम की उत्पत्ति और अर्थ को लेकर विद्वानों में बहस है। 'माशादार' का मतलब सामने से छर्रों से भरा जाने वाली बंदूक़ होता है और 'ब्रुम' का मतलब 'पर्वत'। सम्भव है यही इस नाम की जड़ रही हो। लेकिन 'माशा' का अर्थ 'उच्च महिला या रानी' भी होता है जिससे यह भी मुमकिन है कि पहाड़ के नाम का अर्थ 'पर्वतों की रानी' हो। १९६० में स्थानीय राजा के अनुसार इसका नाम संस्कृत से था और उसका अर्थ 'फ़ैसले का दिन' या 'प्रलय पर्वत' है। कुछ अन्य स्रोत इसे बलती भाषा से उत्पन्न बताते हुए इसका अर्थ 'आग का पहाड़' बताते हैं। इतिहास १८५६ में ब्रिटिश राज का थोमस मोन्टगोमरी नामक सैन्य अफ़सर काराकोरम शृंखला का निरिक्षण कर रहा था। उसने यहाँ माशेरब्रुम की बुलंद चोटी देखी और उसे 'काराकोरम-१' या 'के-१' का सरकारी नामांकन दे दिया। लेकिन स्थानीय लोगों के लिये इसका नाम 'माशेरब्रुम' ही था। १९३८ में इसे दक्षिण से चढ़ने का प्रयास किया गया जो नाक़ामयाब रहा। १९४७ में भारत विभाजन के बाद भारत-पाकिस्तान में कश्मीर को लेकर १९४८ का युद्ध छिड़ा। युद्ध-विराम के बाद इस क्षेत्र पर पाकिस्तानी क़ब्ज़ा बन गया। १९५५ और १९५७ में माशेरब्रुम पर विजय पाने के दो और पर्वतारोही प्रयास भी असफल रहे। आख़िरकर १९६० में एक अमेरिकी दस्ते के जॉर्ज अर्विन्ग बॅल और विली उनसोएल्ड इसपर दक्षिणपूर्व मार्ग से चढ़ने में सफल हुए। इन्हें भी देखें माशेरब्रुम पर्वत शृंखला बाल्तोरो हिमानी सन्दर्भ काराकोरम पाकिस्तान के पर्वत गिलगित-बल्तिस्तान"} {"instruction": "Suppose we have a dictionary with keys (1,2,3). Create a function to return the values of the dictionary.", "input": "d = {1: \"one\", 2: \"two\", 3: \"three\"}", "output": "def get_values(d): return list(d.values())"} {"instruction": "Build an AI chatbot using Python and Dialogflow.", "input": "Not applicable", "output": "import os\nimport json\n\n#import the packages\nfrom flask import Flask, request\n\n#initialization\napp = Flask(__name__)\n\n@app.route('/webhook', methods=['GET', 'POST'])\ndef webhook():\n#handle user message\n req = request.get_json(silent=True, force=True)\n user_input = req[\"queryResult\"][\"queryText\"]\n \n result = {\n \"fulfillmentText\":\"This is a sample response from your webhook!\"\n }\n \n#send response\n res = json.dumps(result, indent=4)\n print(res)\n r = make_response(res)\n r.headers['Content-Type'] = 'application/json'\n return r\n\n@app.route('/', methods=['GET'])\ndef index():\n return 'hello world'\n \n if __name__ == '__main__':\n port = int(os.getenv('PORT', 5000))\n print(\"Starting app on port %d\" % port)\n app.run(debug=False, port=port, host='0.0.0.0')"} {"instruction": "Write a Python program to group a given list of integers into sublists of given size.", "input": "list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], size = 3", "output": "def group_list(mylist, n): \n \n newlist = [] \n \n # create a list of indices for sublists \n indices = list(range(0, len(mylist), n)) \n \n # create sublists too \n for start in indices: \n end = start + n\n \n newlist.append(mylist[start:end]) \n \n return newlist \n \n# Driver code \nlist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] \nsize = 3\n \nprint(group_list(list, size)) \n# [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]]"} {"instruction": "An array of integers is given, write a function to print the second largest element of the array.", "input": "", "output": "def secondLargest(arr): first = 0 second = 0 for i in range(len(arr)): if arr[i] > first: second, first = first, arr[i] elif (arr[i] > second and arr[i] < first): second = arr[i] return second"} {"instruction": "Generate a python code to print out all prime numbers between 1 to 100.", "input": "", "output": "for num in range(2, 101):\n \n for i in range(2,num):\n if (num % i) == 0:\n break\n else:\n print(num, end=' ')\n# Output : 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97"} {"instruction": "Write a function in Java to check if the length of a string is greater than 5.", "input": "String str = \"Hello World!\"", "output": "public static boolean isStringLongerThan5(String str) { return str.length() > 5; }"} {"instruction": "Create a program to determine if a number is divisible by another number", "input": "", "output": "def is_divisible(n, m): if n % m == 0: return True return False"} {"instruction": "Edit the sentence using the correct punctuation.", "input": "The apple is red", "output": "The apple is red."} {"instruction": "Generate a valid syntax to remove the last element of a list", "input": "", "output": "my_list.pop()"} {"instruction": "Load the given JSON data using Javascript.", "input": "{ \"name\": \"John\", \"age\": 30 }", "output": "var data = { \"name\": \"John\", \"age\": 30 }; var jsonData = JSON.parse(data); console.log(jsonData);"} {"instruction": "Create a code snippet in Python to find the missing number in an array of length n-1 when all numbers from 1 to n are present.", "input": "[7, 5, 6, 4, 2]", "output": "def missing_number(nums): \n \n full_list = list(range(1,len(nums)+1))\n return (set(full_list) - set(nums)).pop()\n\nnums = [7, 5, 6, 4, 2]\nresult = missing_number(nums) \nprint('Missing number is', result)"} {"text": "[EN Wikipedia] Tāngarākau River\n\nThe Tāngarākau River is a river of the Manawatū-Whanganui region of New Zealand's North Island. It flows south for from its source west of Ōhura in the King Country to reach the Whanganui River. State Highway 43, known as the Forgotten World Highway, travels through the Tāngarākau Gorge. Bridges As the river flows mainly through remote areas there are only five bridges across the river along its entire length. In the upper reaches in the Waitaanga Forest there is a swing bridge on the Tatu Track State Highway 43 crosses the river three times as it winds through Tāngarākau Gorge A rail bridge on the Stratford–Okahukura Line crosses the river at the small settlement of Tāngarākau See also List of rivers of New Zealand References Rivers of Taranaki Rivers of Manawatū-Whanganui Rivers of New Zealand"} {"instruction": "Generate code that implements a method to compare two strings.", "input": "", "output": "def compare_strings(str1, str2): if len(str1) != len(str2): return False for i in range(len(str1)): if str1[i] != str2[i]: return False return True"} {"instruction": "Create a Python program that generates lyrics for a song.", "input": "Not applicable", "output": "import random\n\n# A list of words, that the program can use to generate lyrics\nwords = [\"Love\", \"Life\", \"Dreams\", \"Happiness\", \"Joy\", \"Home\",\n\"Friends\", \"Family\", \"Success\", \"Believe\", \"Magic\", \"Laughter\",\n\"Together\", \"Memories\", \"Adventure\", \"Appreciate\", \"Peace\",\n\"Passion\", \"Courage\", \"Forever\"]\n\n# Generate a song with 8 lines\nfor i in range(8):\n # Choose random words to form the line\n line = \"\"\n for j in range(4):\n line += random.choice(words) + \" \"\n # Capitalize the line and add punctuation\n line = line.capitalize() + \".\\n\"\n print(line)\n\n# Print the result\nprint(\"That is all I need to be complete.\")"} {"instruction": "Write a function in JavaScript that returns the longest item in the array.", "input": "[\"a\", \"ab\", \"abc\", \"abcd\"]", "output": "function longestItem(arr) { // Initializing the longest item to the first item in the array for comparison let longest = arr[0]; for (let item of arr) { // Comparing the length of each item to the longest if (item.length > longest.length) { longest = item; } } return longest; } console.log(longestItem([\"a\", \"ab\", \"abc\", \"abcd\"]));"} {"instruction": "Write a query to extract data from a table called \"inventory\" which contains the columns: id, item, quantity", "input": "", "output": "SELECT id, item, quantity FROM inventory"} {"text": "[HI Wikipedia] पटना संग्रहालय\n\nपटना म्यूजियम बिहार की राजधानी पटना में स्थित है। इसका निर्माण १९१७ में अंग्रेजी शासन के समय हुआ था ताकि पटना और आसपास पाई गई ऐतिहासिक वस्तुओं को संग्रहित किया जा सके। स्थानीय लोग इसे 'जादू घर' कहते हैं। मुगल-राजपूत वास्तुशैली में निर्मित पटना संग्रहालय को बिहार की बौद्धिक समृद्धि का प्रतीक माना जाता है। भवन के केंद्र पर आकर्षक छतरी, चारों कोनों पर गुंबद और झरोखा शैली की खिड़कियां इसकी विशिष्टताएं हैं। प्राचीन भारत युग से 1764 तक कलाकृतियों को बिहार संग्रहालय में रखा गया है और 1764 के बाद के अवयव पटना संग्रहालय में रखे जाते हैं। पटना संग्रहालय 2300 साल पुरानी दीदारगंज यक्षी मूर्तिकला को भी खो देगा। इतिहास जानकारों के मुताबिक वर्ष 1912 में बंगाल से बिहार के विभाजन होने के बाद एक संग्रहालय की आवश्यकता महसूस की गई थी। तब तत्कालीन गवर्नर चार्ल्स एस बेली की अध्यक्षता में बिहार और उड़ीसा (अब ओडिशा) सोसाइटी की बैठक में बिहार के लिए एक प्रांतीय संग्रहालय स्थापित करने का प्रस्ताव रखा गया था जिसे सर्वसम्मति से पारित किया गया था। इसके बाद तत्कालीन गवर्नमेंट हाउस वर्तमान समय का मुख्य न्यायाधीश के आवास में 20 जनवरी 1915 को संग्रहालय की स्थापना की गई थी। जिस भवन में अभी संग्रहालय है उस भवन में संग्रहालय एक फरवरी 1929 में लाया गया था। इसी वर्ष सात मार्च को बिहार-उड़ीसा के तत्कालीन गवर्नर सर लैंसडाउन स्टीदेंसन ने इस संग्रहालय का उद्घाटन किया था। परिचय इस संग्रहालय में दुर्लभ संग्रह का भंडार है। संग्रहालय नव पाषाणकालीन पुरावशेषों और चित्रों, दुर्लभ सिक्कों, पांडुलिपियों, पत्थर और खनिज, तोप और शीशा की कलाकृतियों से समृद्ध है। वैशाली में लिच्छवियों द्वारा भगवान बुद्ध की मृत्यु के बाद बनवाए गए प्राचीनतम मिट्टी के स्तूप से प्राप्त बुद्ध के दुर्लभ अस्थि अवशेष वाली कलश मंजूषा है तो वृक्ष का जीवाश्म संग्रहालय में काफी पुराने चीड़ के एक वृक्ष का जीवाश्म भी यहां रखा हुआ है, जिसे देखने के लिए विदेश से भी लोग आते हैं। संग्रहालय में रात्रि की रोशनी व्यवस्था भी प्रशंसनीय है। राहुल सांकृत्यायन द्वारा प्रदत्त लगभग 250 दुर्लभ पांडुलिपियों सहित कई पुस्तकों एवं शोध ग्रंथों के संरक्षण के लिए रासायनिक उपचार भी किए गए हैं। बिहार म्यूजियम के लिए हेरिटेज टनल जनवरी 2023 में, बिहार सरकार ने बिहार संग्रहालय और पटना संग्रहालय के बीच 1.4 किलोमीटर लंबी प्रस्तावित मेट्रो (हेरिटेज टनल) के निर्माण के लिए दिल्ली मेट्रो रेलवे कॉर्पोरेशन लिमिटेड को सलाहकार के रूप में नियुक्त किया। अगस्त 2023 में, बिहार सरकार की कैबिनेट ने 542 करोड़ की संशोधित लागत पर हेरिटेज सुरंग के निर्माण को मंजूरी दी। इन्हें भी देखें बिहार संग्रहालय अन्तर्राष्ट्रीय संग्रहालय दिवस नारद संग्रहालय, बिहार पटना के पर्यटन स्थल सन्दर्भ बाहरी कड़ियाँ बिहार के संग्रहालय भारत में संग्रहालय"} {"instruction": "Using Python, build a dictionary containing the numbers from 1 to n as the key and the square of each number as the value.", "input": "n = 10", "output": "my_dict = {}\n\nfor i in range(1,n+1):\n my_dict[i] = i**2\n\nprint(my_dict)"} {"instruction": "How can you make a dictionary key iterable in Python?", "input": "", "output": "A dictionary in Python can be made iterable using a for loop. To iterate over the keys of a dictionary, we can use the ``dict.keys()`` method which returns an iterable object of the keys in the dictionary. This iterable can then be used to iterate over the keys of the dictionary."} {"text": "[CS Wikipedia] Jessica Barden\n\nJessica Barden (* 21. července 1992 Northallerton, Severní Yorkshire) je britská herečka. Mezi její nejznámější role patří Alyssa v seriálu The End of the F***ing World a Justine v Penny Dreadful. Životopis Narodila se v Northallertonu v Severním Yorkshiru a v roce 1995 se s rodiči přestěhovala do města Wetherby, kam později chodila i na střední školu. Její herecký debut přišel v roce 1999, kdy se objevila v malé roli v dílu seriálu Mí rodiče, mimozemšťané. Později též ztvárnila malé role v seriálech No Angels a The Chase. V roce 2007 bylo oznámeno, že ztvární Kayleigh Morton ve známém britském dramatickém seriálu Coronation Street, kde se objevovala až do konce následujícího roku, kdy v seriálu její rodina spolu s ní odjede. V roce 2007 přišel její filmový debut, a to ve snímku Revoluce paní Ratcliffové, který pojednává o britské rodině, která se během studené války přestěhuje do Západního Německa. V roce 2010 se objevila ve filmu Stephena Frearse, Tamara Drewe a v následujícím roce si zahrála Sophii, kamarádku hlavní postavy v podání Saoirse Ronan, v akčním filmu Hanna. V roce 2014 ztvárnila jednu z rolí v americkém nezávislém snímku Ukolébavka. V roce 2015 se objevila v dvoudílné televizní adaptaci knihy The Outcast od Sadie Jones. Ve stejném roce si zahrála Liddy ve filmu Thomase Vinterberga, Daleko od hlučícího davu a též ztvárnila vedlejší roli v absurdní černé komedii Humr. V roce 2017 se objevila v britském hororovém snímku Habit a zahrála si Alyssu v seriálu The End of the F***ing World. Filmografie Film Televize Reference Externí odkazy Britské herečky Britští dětští herci Žijící lidé Narození 21. července Narození v roce 1992 Ženy"} {"text": "[CS Wikipedia] Ida B. Wells\n\nIda Bell Wells-Barnett (16. července 1862 Holly Springs – 25. března 1931 Chicago), spíše známá jako Ida B. Wells, byla africko-americká novinářka, muckrakerka, sufražetka, feministka, zastánkyně georgismu a vůdkyně Afroamerického hnutí za občanská práva. V roce 1909 založila National Association for the Advancement of Colored People. Spoluvlastnila noviny The Free Speech ve měste Memphis, ve kterých započala investigativní šetření, tehdy zvané jako muckraking, smrti tří afrických mužů zlynčovaných bílých davem. Její novinová kancelář byla vypálena a Ida musela uprchnout do New Yorku, kde se stala vůdkyní zmíněného hnutí. Odkazy Reference Externí odkazy Američtí novináři Americké sufražetky Americké feministky Investigativní novináři Členové Republikánské strany (USA) Absolventi Shawovy univerzity Absolventi Fiskovy univerzity Afroameričané Otroci Muckraker Narození 16. července Narození v roce 1862 Narození v Mississippi Úmrtí 3. dubna Úmrtí v roce 1931 Úmrtí v Chicagu Ženy"} {"instruction": "Write a PHP script to get the length of a string.", "input": "string = \"Hello World!\"", "output": ""} {"text": "[DE Wikipedia] Baschir Schihab II.\n\nBaschir Schihab II. (; geb. 2. Januar 1767; gest. 1850) war ein libanesischer Emir, der in der ersten Hälfte des 19. Jahrhunderts den osmanischen Libanon regierte. Er war der erste Herrscher, der vom sunnitischen Islam, der Religion der früheren schihabischen Emire, zur maronitischen Kirche konvertierte. Siehe auch Schihab-Dynastie Emirat Libanonberg Literatur Mikhail Mishaqa: Murder, Mayhem, Pillage, and Plunder: The History of the Lebanon in the 18th and 19th Centuries. (SUNY Press, Albany 1988). Aus dem Arabischen übersetzt von Wheeler McIntosh Thackston. (in Teilansicht) Matti Moosa: The Maronites in History. Gorgias Press 2005 Alfred Schlicht: Frankreich und die syrischen Christen 1799–1861: Minoritäten und europäischer Imperialismus im Vorderen Orient. Islamkundliche Untersuchungen 61, Berlin: Schwarz, 1981 (in Teilansicht) Weblinks Bashīr Shihāb II Einzelnachweise und Fußnoten Person (Osmanisches Reich) Emir Geschichte des Libanon Syrisch-Maronitische Kirche von Antiochien Osmanisches Syrien Geboren 1767 Gestorben 1850 Mann"} {"instruction": "Create an array of four different colors in JavaScript.", "input": "", "output": "let colors = [\"red\", \"green\", \"blue\", \"yellow\"];"} {"instruction": "Edit the given code to limit the output to only the 30 most recent entries in the database.", "input": "entries = db.execute_query(\"SELECT * FROM users\")", "output": "entries = db.execute_query(\"SELECT * FROM users ORDER BY id DESC LIMIT 30\")"} {"instruction": "Multiply two vectors of the same size.", "input": "Vector1 = [1, 2, 3] Vector2 = [4, 5, 6]", "output": "resultantVector = [4, 10, 18]"} {"text": "[DE Wikipedia] Edelgard Huber-von Gersdorff\n\nEdelgard Ida Valeska Huber-von Gersdorff (* 7. Dezember 1905 in Gera, als Edelgard Ida Valeska von Gersdorff; † 9. April 2018 in Karlsruhe) war eine Supercentenarian und zeitweise die älteste lebende deutsche Frau. Sie war am Tag ihres Todes 112 Jahre und 123 Tage alt und gehörte damals wohl zu den 15 ältesten Menschen aus dem deutschsprachigen Raum. Leben Edelgard von Gersdorff entstammte dem uradligen Adelsgeschlecht Gersdorff. Als sie neun Jahre alt war, wurde ihr Vater Franz Erdmann von Gersdorff (1866–1927) als Offizier in den Ersten Weltkrieg eingezogen. Ihre Mutter Elsa (1882–1945) zog mit den beiden Kindern Edelgard und Helga nach Karlsruhe, von wo ihre Familie Stiefbold herstammte; sie kam im Alter von 63 Jahren bei einem Luftangriff auf die Stadt Naumburg (Saale) im April 1945 ums Leben. Elsa war die Tochter des Königlich-preußischen Generalmajors Rudolf Stiefbold und seiner Frau Elise Meier, die über ihren Vater, den Karlsruher Arzt Geh. Hofrat Eduard Meier Urenkelin des wirklichen geheimen Rates am badischen Hof Emanuel Meier, über ihre Mutter Emma Speyerer Enkelin des Heidelberger Unternehmers, Bürgermeisters und badischen Landtagsabgeordneten Jacob Wilhelm Speyerer war. Im Alter von 22 Jahren erkrankte Edelgard von Gersdorff an Kinderlähmung. Im selben Jahr starb ihr Vater. Sie verbrachte einige Jahre im Bett und lernte mühsam wieder laufen. Sie trieb weiter Sport, fuhr Fahrrad und studierte zuerst Chemie an der Technischen Hochschule Fridericiana in Karlsruhe und dann Jura in Heidelberg. Bis zum Eintritt in das Rentenalter arbeitete sie als Justiziarin bei der Deutschen Bau- und Bodenbank. Edelgard von Gersdorff war seit dem Silvestertag 1938 mit Walther Huber (1902–1987) verheiratet, Architekturprofessor und Rektor der Staatlichen Ingenieurschule Karlsruhe von 1953 bis 1968. Die Ehe blieb kinderlos. Am 7. Dezember 2017 feierte sie in Karlsruhe ihren 112. Geburtstag. In den Medienberichten jener Zeit wird sie oft Edelgard Huber von Gersdorff genannt. Zum Tag des europaweiten Notrufs 112 am 11. Februar 2018 wurde Edelgard Huber-von Gersdorff Ehrenschirmherrin der Aktion „Ein Europa – eine Nummer“, mit der die europaweite Gültigkeit des Euronotrufs beworben wird. Als zu diesem Zeitpunkt älteste lebende Frau Deutschlands hatte sie die Entwicklung Europas seit dem Deutschen Kaiserreich und während zweier Weltkriege sowie die europäische Einigung miterlebt und fühlte sich selbst als Europäerin. „Die 112 ist das Zeichen für Hilfe und ein wichtiges Symbol für die europäische Einigung“, so Huber-von Gersdorff. Am 9. April 2018, dem 73. Todestag ihrer Mutter, starb Edelgard Huber-von Gersdorff zu Hause in Karlsruhe. In den Monaten vor ihrem Tod war sie die älteste lebende deutsche Frau sowie hinter Gustav Gerneth die zweitälteste lebende…"} {"text": "[CS Wikipedia] Ileana Silaiová\n\nIleana Silaiová (* 14. října 1941, Kluž) je bývalá rumunská atletka, běžkyně, halová mistryně Evropy v běhu na 1500 metrů. Sportovní kariéra Startovala celkem na čtyřech olympijských hrách. Největšího úspěchu dosáhla hned při premiéře v Mexiku, kde získala stříbrnou medaili v běhu na 800 metrů. V následující sezóně obsadila v této disciplíně na mistrovství Evropy páté místo. Stříbrnou medaili vybojovala v běhu na 800 metrů rovněž na evropských halových šampionátech v letech 1971 a 1972. Na olympiádě v roce 1972 doběhla šestá ve finále v běhu na 800 metrů. Při další olympiádě v Montrealu v běhu na 800 metrů skončila v semifinále, v běhu na 1500 metrů nepostoupila z rozběhu. V roce 1978 se stala halovou mistryní Evropy v běhu na 1500 metrů. V sezóně 1979 dostala kvůli dopingu roční zákaz startu. Po skončení trestu startovala na olympiádě v Moskvě, kde skončila osmá v běhu na 1500 metrů. Externí odkazy Rumunští běžci Mistryně Evropy v běhu na 1 500 m Stříbrní olympijští medailisté v atletice Rumunští stříbrní olympijští medailisté Narození v roce 1941 Žijící lidé Ženy Narození 14. října Narození v Kluži Dopingové případy rumunských sportovců Dopingové případy v atletice"} {"instruction": "Write a function in Python to generate random numbers within a desired range.", "input": "", "output": "import random\n\n# define a function to generate random numbers\ndef generate_random(start, end):\n\treturn random.randint(start, end)\n\n# generate a random number in the given range\nstart = 10\nend = 15\nprint(generate_random(start, end))"} {"text": "[DE Wikipedia] Liste der Naturdenkmale in Roigheim\n\nDie Liste der Naturdenkmale in Roigheim nennt die verordneten Naturdenkmale (ND) der im baden-württembergischen Landkreis Heilbronn liegenden Gemeinde Roigheim. In Roigheim gibt es insgesamt vier als Naturdenkmal geschützte Objekte, davon zwei flächenhafte Naturdenkmale (FND) und zwei Einzelgebilde-Naturdenkmale (END). Stand: 1. November 2016. Flächenhafte Naturdenkmale (FND) Einzelgebilde (END) Weblinks Schutzgebietsverzeichnis der Landesanstalt für Umwelt, Messungen und Naturschutz Baden-Württemberg Übersichtstabelle: FND, END Naturdenkmale Roigheim"} {"instruction": "Create a PoS tagging tool with Python and NLTK which takes a sentence as an input and tags each word with its part-of-speech (POS) category.", "input": "The quick brown fox jumps over the lazy dog", "output": "from nltk.tokenize import word_tokenize\nfrom nltk.tag import pos_tag\n\nsentence = \"The quick brown fox jumps over the lazy dog\" \nwords = word_tokenize(sentence)\nprint(pos_tag(words))\n\nOutput: \n[('The', 'DT'), ('quick', 'JJ'), ('brown', 'NN'), ('fox', 'NN'), ('jumps', 'VBZ'), ('over', 'IN'), ('the', 'DT'), ('lazy', 'JJ'), ('dog', 'NN')]"} {"instruction": "Write a RegEx to extract text inside tags", "input": "
      This is a test
      ", "output": "\\(.*?)\\"} {"instruction": "Create a program that implements a Stack (LIFO) using an array", "input": "", "output": "class Stack: def __init__(self): self.stack = [] def push(self, item): self.stack.append(item) def pop(self): if self.is_empty(): return None return self.stack.pop() def is_empty(self): return len(self.stack) == 0"} {"instruction": "Construct a Java program for sorting a given array in ascending order.", "input": "", "output": "public class ArraySort { public static int[] sortArray(int[] arr) { int n = arr.length; for (int i = 0; i < n - 1; i++) { int min_idx = i; for (int j = i + 1; j < n; j++) if (arr[j] < arr[min_idx]) min_idx = j; int temp = arr[min_idx]; arr[min_idx] = arr[i]; arr[i] = temp; } return arr; } }"} {"instruction": "Generate a Python code snippet for sorting an array of strings in ascending alphabetical order.", "input": "[\"apple\", \"banana\", \"orange\", \"kiwi\"]", "output": "def sort_words(words):\n # Sort the list in ascending alphabetical order.\n sorted_words = sorted(words)\n # Return the sorted list.\n return sorted_words\n \nwords = [\"apple\", \"banana\", \"orange\", \"kiwi\"]\n\nsorted_words = sort_words(words)\n\nprint(sorted_words)"} {"text": "[CS Wikipedia] Setrvačnost\n\nSetrvačnost je vlastnost hmotných těles (těles s hmotností), která se snaží setrvat ve stavu před vnějším fyzikálním působením, tj. v případě, že na těleso nepůsobí žádná vnější síla. Jinými slovy, jedná se o odpor tělesa vůči změně jeho rychlosti. V mechanice můžeme setrvačnost popsat jako schopnost tělesa neměnit směr ani rychlost posuvného pohybu vůči inerciální vztažné soustavě. Jsou-li působící síly v rovnováze (tj. vzájemně se ruší) setrvává těleso v původním stavu, tedy v klidu nebo v rovnoměrném přímočarém pohybu. Mírou setrvačnosti je (setrvačná) hmotnost tělesa. Pojem setrvačnosti lze aplikovat i na otáčivý pohyb těles a jejich rovnoměrné otáčení s konstantním směrem osy otáčení, jsou-li v rovnováze působící síly i jejich momenty. Mírou setrvačnosti je v takovém případě moment setrvačnosti. Z uvedených principů vyplývají i důsledky pro setrvačnost proudění tekutin a relativní stabilitu jeho vírů. Příkladem jiného typu setrvačnosti je tepelná setrvačnost. Za setrvačnost můžeme, do určité míry, považovat i průchod proudu (elektron je hmotná částice) vinutím indukčnosti po odpojení/připojení elektrického zdroje. Mnozí sem zařadí i \"setrvačnost lidského myšlení\". Související články Newtonovy pohybové zákony Hybnost Dynamika"} {"instruction": "Create a feature for predicting a customer's subscription plan based off their purchase history.", "input": "The customer has purchased 2 shirts, 1 hat, and 3 pairs of jeans in the past month.", "output": "The prediction feature should calculate the customer's current subscription plan by taking into account the items they have purchased. It could use factors such as item types, quantity of items purchased, time since purchase, cost of items, sale promotions, combinations of items, and so forth. The feature should use a combination of analyzed data and established weights for each factor to accurately predict the customer's most likely subscription plan."} {"instruction": "How would you insert an element into a pre-existing array using JavaScript?", "input": "", "output": "An element can be inserted into a pre-existing array using the JavaScript Array.prototype.push() method. The push() method takes a single element as an argument and appends it to the end of the array. For example, to insert the value 7 into an array, you could use the following syntax: array.push(7);"} {"text": "[CS Wikipedia] Zdeněk Kluiber\n\nDoc. RNDr. Ing. Zdeněk Kluiber, CSc., Ph.D. (20. března 1950, Ústí nad Labem – 14. prosince 2010) byl český středoškolský a vysokoškolský pedagog a popularizátor výuky fyziky. V roce 2001 byl zařazen mezi tisícovku lidí, kteří měli na světě největší vliv na přírodovědné vzdělávání. Se svou manželkou Ing. Janou Kluiberovou (* 28. září 1954) měl dva syny, Ing. Tomáše Kluibera (* 18. srpna 1980) a BcA. Luboše Kluibera (* 7. října 1983). Život Vystudoval učitelství se specializací na matematiku a fyziku na Matematicko-fyzikální fakultě Univerzity Karlovy v Praze. Po ukončení studia v roce 1973 začal vyučovat na gymnáziu v Kladně, v roce 1977 získal titul doktora přírodních věd. V roce 1979 opustil kladenské gymnázium a až do roku 1990 pracoval na Fyzikálním ústavu ČSAV. V letech 1990 až 2004 působil na pražském Gymnáziu Christiana Dopplera (do roku 1993 Gymnázium Korunní, v letech 1993 až 1999 Gymnázium Zborovská), v jehož profesorském sboru – ač zprvu nebyl členem vedení školy – měl silné postavení. Jako profesor fyziky zde podporoval výuku tohoto předmětu a účast „mladých nadějných fyziků“ na odborných soutěžích, na jejichž organizaci se také významně podílel. Zejména se jednalo o Turnaj mladých fyziků, ve kterém školní tým pod jeho vedením pravidelně dosahoval významné úspěchy (kromě častých vítězství v soutěži na národní úrovni získalo gymnázium nejedenkrát také první místo na celosvětovém finále). Díky svým osobním kontaktům rozvinul spolupráci školy s vyučujícími z Matematicko-fyzikální fakulty Univerzity Karlovy v Praze a vědci z Fyzikálního ústavu Akademie věd České republiky. Na jaře 1998 se stal ředitelem gymnázia. V roce 2000 se habilitoval na Fakultě přírodních věd Univerzity Mateje Bela v Banské Bystrici (obor Teorie vyučování všeobecně vzdělávacích předmětů se zaměřením na teorii vyučování fyzice). Poté, co byla odhalena zpronevěra hospodářkou školy, z funkce ředitele v roce 2004 nuceně odešel a přestal na gymnáziu také vyučovat. Jeho působení na škole však bylo ze strany studentů a vyučujících vnímáno rozporuplně. Kromě některých zvláštních osobnostních rysů (např. hry na housle při školních akcích) mu někdy bylo studenty např. vytýkáno, že svou pozornost spíše než vlastní výuce věnoval jiným činnostem, zvýhodňoval na škole děti svých spolužáků z vysoké školy nebo že funkci ředitele vykonával s přespřílišným nadhledem. Ze strany ostatních vyučujících bylo negativně hodnoceno jím prosazované privilegované postavení fyziky, způsobující například neúčast členů soutěžního družstva Turnaje mladých fyziků při výuce nebo omezení výuky jiných vyučovacích předmětů při pořádání fyzikálních exkurzí apod. Nicméně jeho úspěchy a úspěchy jeho studentů na národní i mezinárodní úrovni jsou neoddiskutovatelné. Od roku 2004 vyučoval na Pedagogické fakultě…"} {"instruction": "Write a Python script to extract all the values for a given key from a dictionary.", "input": "dictionary = {\n 'key1': 'val1',\n 'key2': 'val2',\n 'key3': 'val3',\n 'key4': 'val4',\n}", "output": "def get_key_values(dictionary, key):\n return [value for key, value in dictionary.items() if key == key]"} {"instruction": "Compute the factorial of a given number using a recursive algorithm.", "input": "", "output": "def factorial(n): if n == 0: return 1 else: return n * factorial(n-1)"} {"instruction": "Implement a decision tree classifier in Python to predict car prices.", "input": "[Number_of_Doors, Vehicle_Size, Price]\n\n[2, Small, 12000]\n[4, Small, 18000]\n[4, Large, 20000]\n[4, Small, 25000]", "output": "import pandas as pd\nfrom sklearn import tree\n\n# Dataset\ndata = [[2, 'Small', 12000], [4, 'Small', 18000], [4, 'Large', 20000], [4, 'Small', 25000]]\n\n# Columns Headers\ncolumns= ['Number_of_Doors', 'Vehicle_size', 'Price']\n\n# Create Dataframe\ndf = pd.DataFrame(data, columns=columns)\n\n# Create Features\nX = df.iloc[:, :2].values\ny = df.Price\n\n# Create Decision Tree Classifier\nclf = tree.DecisionTreeClassifier().fit(X,y)\n\n# Making Predictions\ntest_data = [[2, 'Small']]\ntest_data_df = pd.DataFrame(test_data, columns=['Number_of_Doors', 'Vehicle_size'])\n \nresult = clf.predict(test_data_df)\n\nprint(result[0])"} {"instruction": "Edit the following HTML code so that it displays a black, 100px border-radius circle.", "input": "
      ", "output": "
      "} {"instruction": "Generate an optimized python code for finding the maximum element in a list of numbers.", "input": "", "output": "def find_max(l):\n max_elmt = l[0]\n for x in l:\n if x > max_elmt:\n max_elmt = x\n return max_elmt"} {"instruction": "Explain the purpose of each line of code in the following program.", "input": "\"\"\" def fun(x): y = x * 2 return y \"\"\"", "output": "\"\"\" The first line of code defines a function named `fun` which takes a single parameter `x`. The second line multiplies the parameter `x` by 2 and assigns the resulting value to a new variable called `y`. The third line returns the value stored in `y` as the output of the function. \"\"\""} {"instruction": "Write a function that takes a sentence as an argument and returns a Dictionary of all the words and their counts in the sentence.", "input": "'The quick brown fox jumps over the lazy dog'", "output": "def count_words(sentence): words_counts = {} words = sentence.split(\" \") for word in words: if word not in words_counts: words_counts[word] = 0 words_counts[word] += 1 return words_counts print(count_words('The quick brown fox jumps over the lazy dog'))"} {"instruction": "Convert the following HTML string to a DOM tree using JavaScript.", "input": "
      Hello World
      ", "output": "let parser = new DOMParser(); let div = parser.parseFromString('
      Hello World
      ', 'text/html'); let domTree = div.querySelector(\"div\");"} {"instruction": "Develop a python code to evaluate the sum of all the even numbers in a given sequence.", "input": "", "output": "def sum_even_numbers(sequence):\n result = 0\n for num in sequence:\n if num % 2 == 0:\n result += num\n \n return result"} {"instruction": "Create a Python program to generate multiplication tables from 1 to 10.", "input": "", "output": "for i in range(1, 11):\n for j in range(1, 11):\n print(i*j, end = \" \")\n print()"} {"instruction": "Construct a Python class for playing 'Rock, Paper, Scissors'.", "input": "", "output": "class Game:\n def __init__(self):\n pass\n \n def play_game(self, player_choice):\n # list of possible choices\n choices = [\"rock\", \"paper\", \"scissors\"]\n \n # randomly choose one from the list\n computer_choice = choices[random.randint(0, 2)]\n \n # compare choice\n # rock beats scissors\n if computer_choice == choices[0] and player_choice == choices[2]:\n print(\"Computer chose rock. You lose.\")\n elif computer_choice == choices[2] and player_choice == choices[0]:\n print(\"Computer chose scissors. You win.\")\n \n # paper beats rock\n elif computer_choice == choices[1] and player_choice == choices[0]:\n print(\"Computer chose paper. You lose.\")\n elif computer_choice == choices[0] and player_choice == choices[1]:\n print(\"Computer chose rock. You win.\")\n \n # scissors beats paper\n elif computer_choice == choices[2] and player_choice == choices[1]:\n print(\"Computer chose scissors. You lose.\")\n elif computer_choice == choices[1] and player_choice == choices[2]:\n print(\"Computer chose paper. You win.\")\n \n # draw\n elif computer_choice == player_choice:\n print(\"Computer chose the same thing. Draw.\")"} {"instruction": "Modify the following code segment to add multiple values in an array", "input": "var myArray = []; myArray[0] = 'x';", "output": "var myArray = []; myArray.push('x', 'y', 'z');"} {"instruction": "Construct a program to shuffle the content of a list.", "input": "", "output": "import random def shuffle_list(lst): for i in range(len(lst)-1, 0, -1): j = random.randint(0, i) lst[i], lst[j] = lst[j], lst[i] return lst"} {"instruction": "You are given a string array. Code a JavaScript function to remove duplicate strings from the array.", "input": "let arrStrings = [\"apple\", \"orange\", \"apple\", \"banana\"]", "output": "function removeduplicates(arr){ let arrDupRemoved = []; for (let i = 0; i < arr.length; i++){ if(arrDupRemoved.indexOf(arr[i]) === -1){ arrDupRemoved.push(arr[i]); } } return arrDupRemoved; } console.log(removeduplicates(arrStrings)) // prints [\"apple\", \"orange\", \"banana\"]"} {"instruction": "Using the bubble sort algorithm, sort the following array.", "input": "[3, 5, 2, 1, 4]", "output": "def bubbleSort(arr): n = len(arr) # Traverse through all array elements for i in range(n): # Last i elements are already in place for j in range(0, n-i-1): # traverse the array from 0 to n-i-1 # Swap if the element found is greater # than the next element if arr[j] > arr[j+1] : arr[j], arr[j+1] = arr[j+1], arr[j] return arr # Driver code arr = [3, 5, 2, 1, 4] bubbleSort(arr) Output: [1, 2, 3, 4, 5]"} {"instruction": "We need to write a program to generate all permutations of a given string.", "input": "", "output": "def generate_permutations(s): results = [] if len(s) == 1: results.append(s) else: for i, c in enumerate(s): for perm in generate_permutations(s[:i] + s[i + 1:]): results.append(c + perm) return results"} {"instruction": "Compare the following two strings and list the differences.", "input": "string1 = \"Hello World\" string2 = \"Hello World!\"", "output": "The strings are different as the second string has an exclamation mark at the end."} {"instruction": "Identify the output of this snippet of C code.", "input": "int x = 10, y = 5; int z = (x * y) - 15;", "output": "The output of this snippet of C code is z = 25."} {"instruction": "Use CSS to create a text area with the width of 300px and the height of 200px", "input": "", "output": ""} {"instruction": "Construct a while loop in the code to print the integers from 0 to 9.", "input": "", "output": "i = 0 while i < 10: print(i) i += 1"} {"instruction": "Create an algorithm in Python to find the largest element in an unsorted list of numbers.", "input": "[10, 5, 20, 8, 9, 12]", "output": "def find_large_element(lst):\n largest_number = lst[0]\n for i in range(1, len(lst)):\n if lst[i] > largest_number:\n largest_number = lst[i]\n return largest_number\n\nmy_list = [10, 5, 20, 8, 9, 12]\nprint(find_large_element(my_list)) # 20"} {"instruction": "Write an algorithm using Python that calculates the prime factors of an input number.", "input": "", "output": "def prime_factorize(x):\n if x == 1:\n return []\n i = 2\n prime_factors = []\n while x > 1:\n if x % i == 0:\n prime_factors.append(i)\n x= x / i\n else:\n i += 1\n return prime_factors\n\nprime_factorize(10) # Output: [2, 5]"} {"instruction": "Add two matrices of size 3x3.", "input": "mat1 = [[1,2,3], [4,5,6], [7,8,9]] mat2 = [[10,11,12], [13,14,15], [16,17,18]]", "output": "# adding two matrices res = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] # iterating through rows for i in range(3): # iterating through columns for j in range(3): res[i][j] = mat1[i][j] + mat2[i][j] # printing the result for i in range(3): for j in range(3): print(res[i][j], end=\" \") print() # Output: 11 13 15 17 19 21 23 25 27"} {"instruction": "Create an algorithm in Python to find the GCD of two numbers.", "input": "Number 1: 28\nNumber 2: 56", "output": "# function to calculate GCD \ndef gcd(x, y): \n \n # This function implements the Euclidian \n # algorithm to find GCD \n while(y): \n x, y = y, x % y \n \n return x \n\n# Driver program to test above function \nn1 = 28\nn2 = 56\nprint(\"GCD of\", n1, \"and\", n2, \"is\", gcd(n1, n2))"} {"instruction": "Split the following sentence into tokens.", "input": "Sentence: I cannot wait to go to the movies.", "output": "['I', 'can', 'not', 'wait', 'to', 'go', 'to', 'the', 'movies', '.']"} {"instruction": "Can you create a web scraper in Python to extract the titles of articles from a newspaper website?", "input": "http://example.com/newspaper", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = \"http://example.com/newspaper\"\n\n# fetch data from the given URL\nr = requests.get(url)\n\n# create a BeautifulSoup object\nsoup = BeautifulSoup(r.content, \"lxml\")\n\n# extract the title of all articles\nfor article_title in soup.find_all('h3', class_='title'):\n print(article_title.text)"} {"instruction": "Write a JavaScript function to format a given number to HH:MM:SS.", "input": "// Given a number of seconds input let secs = 85", "output": "const formatTime = (secs) => { let d = new Date(0); d.setSeconds(secs); let hh = d.getHours().toString().padStart(2, '0'); let mm = d.getMinutes().toString().padStart(2, '0'); let ss = d.getSeconds().toString().padStart(2, '0'); return `${hh}:${mm}:${ss}`; }"} {"text": "[HI Wikipedia] रामेश्वरम शहर\n\nरामेश्वरम (Rameswaram), जिसे तमिल लहजे में \"इरोमेस्वरम\" भी कहा जाता है, भारत के तमिल नाडु राज्य के रामनाथपुरम ज़िले में एक तीर्थ नगर है, जो हिन्दू धर्म के पवित्रतम चार धाम तीर्थस्थलों में से एक है। यह रामेश्वरम द्वीप (पाम्बन द्वीप) पर स्थित है, जो भारत की मुख्यभूमि से पाम्बन जलसन्धि द्वारा अलग है और श्रीलंका के मन्नार द्वीप से 40 किमी दूर है। भौगोलिक रूप से यह मन्नार की खाड़ी पर स्थित है। चेन्नई और मदुरई से रेल इसे पाम्बन पुल द्वारा मुख्यभूमि से जोड़ती है। रामायण की घटनाओं में रामेश्वरम की बड़ी भूमिका है। यहाँ श्रीराम ने भारत से लंका तक का राम सेतु निर्माण करा था, ताकि सीता की सहायता के लिए रावण के विरुद्ध आक्रमण करा जा सके। यहाँ श्रीराम ने शिव की उपासना करी थी और आज नार के केन्द्र में खड़ा शिव मन्दिर उशी घटनाक्रम से समबन्धित है। नगर और मन्दिर दोनों शिव व विष्णु भक्तों के लिए श्रद्धा-केन्द्र हैं। विवरण उत्तर भारत में काशी (वाराणसी या बनारस) की जो मान्यता है, वही दक्षिण में रामेश्वरम् की है। धार्मिक हिंदुओं के लिए वहां की यात्रा उतना की महत्व रखती है, जितना कि काशी की। रामेश्वरम चेन्नई से कोई ६०० किमी दक्षिण में है। रामेश्वरम एक सुन्दर टापू है। हिंद महासागर और बंगाल की खाड़ी इसको चारों ओर से घेरे हुए हैं। यहाँ पर रामायण से संबंधित अन्य धार्मिक स्थल भी हैं। यह तमिल नाडु के रामनाथपुरम ज़िले का तीसरा सबसे बड़ा शहर है जिसकी देखरेख १९९४ में स्थापित नगरपालिका करती है। पौराणिक कथाओं के अतिरिक्त यहाँ पर श्रीलंका के जाफ़ना के राजा, चोल और अलाउद्दीन खिलजी के सेनापति मलिक काफूर की भी उपस्थिति रही है। श्रीलंका के गृहयुद्ध के दौरान विस्थापित तमिलों, ईसाई मिशनरियों और रामसेतु को तोड़कर नौवहन का रास्ता तैयार करने के लिए भी यह शहर चर्चा में रहा है। जिला मुख्यालय, रामनाथपुरम से यह कोई ५० किलोमीटर पूर्व की दिशा में पड़ता है। पर्यटन तथा मत्स्यव्यापार यहाँ के वासियों की मुख्य आजीविका है। द्वीप इस हरे-भरे टापू की शकल शंख जैसी है। कहते हैं, पुराने जमाने में यह टापू भारत के साथ जुड़ा हुआ था, परन्तु बाद में सागर की लहरों ने इस मिलाने वाली कड़ी को काट डाला, जिससे वह चारों और पानी से घिरकर टापू बन गया। जिस स्थान पर वह जुडा हुआ था, वहां इससमस ढाई मील चौड़ी एक खाड़ी है। शुरू में इस खाड़ी को नावों से पार किया जाता था। बाद में आज से लगभग चार सौ बरस पहले कृष्णप्पा नायकन नाम के एक छोटे से राजा ने उसे पर पत्थर का बहुत बड़ा पुल बनवाया। अंग्रेजो के आने के बाद उसपुल की जगह पर रेल का पुल बनाने का विचार हुआ। उस समय तक पुराना पत्थर का पुल लहरों की टक्कर से हिलकर टूट चूका था। एक जर्मन इंजीनियर की मदद से उस टूटे पुल का रेल का एक सुंदर पुल बनवाया गया। इस समय यही पुल रामेश्वरम् को भारत से जोड़ता है। इस स्थान पर दक्षिण से उत्तर की और हिंद महासागर का पानी बहता दिखाई देता है। समुद्र में लहरे बहुत कम होती है। शांत बहाव को देखकर यात्रियों को ऐसा लगता है, मानो वह किसी बड़ी नदी को पार कर रहे हों। रामेश्वरम् शहर और रामनाथजी का मशहूर मंदिर इस टापू के उत्तर के छोर पर है। टापू के दक्षिणी कोने में धनुषकोटि नामक तीर्थ है, जहां हिंद महासागर से बंगाल की खाड़ी मिलती है। इसी स्थान को सेतुबंध कहते है। लोगों का…"} {"instruction": "Compile a Python program to retrieve the nth Fibonacci number in the series.", "input": "5", "output": "def Fibonacci(n): \n if n<0: \n print(\"Incorrect input\") \n elif n==1: \n return 0\n elif n==2: \n return 1\n else: \n return Fibonacci(n-1)+Fibonacci(n-2) \n \nnum = 5\nprint(Fibonacci(num))"} {"text": "[DE Wikipedia] Istituto di Studi Comunisti Palmiro Togliatti\n\nDas Istituto di Studi Comunisti Palmiro Togliatti (Institut für Kommunistische Studien Palmiro Togliatti) war von 1944 bis 1993 die zentrale Parteihochschule des Partito Comunista Italiano (PCI). Die Schule war in Rom gegründet worden und hatte ab 1955 ihren Sitz in Frattocchie, einem Stadtteil von Marino (Latium). Nach Anna Tonelli, einer italienischen Historikerin, war diese Schule das Hauptmodell für weitere Schulen der PCI und diente der Ausbildung von Führungskräften für die Partei. Bis 1989 habe es etwa hundert aktive Schulen der PCI in ganz Italien gegeben. „Noch heute ist der Name Frattocchie verbunden mit einem Modell einer Parteischule, das nachgeahmt werden sollte, um denjenigen, die eine politische Karriere anstreben, Methoden und Grundsätze zu vermitteln.“ Geschichte Das im Oktober 1944 in Rom gegründete Institut, das im Dezember des gleichen Jahres seine Arbeit aufnahm, war während der gesamten Zeit seines Bestehens die zentrale Einrichtung für die Ausbildung von Kadern und Führern der PCI. Nach einer bereits 1950 beschlossenen Erweiterung der Einrichtung wurde 1955 in Frattocchie in einem Anwesen, das die Partei als Geschenk erhalten hatte und das an der Via Appia Nuova lag, der Schulbetrieb aufgenommen. Die Schule trug ursprünglich den Namen von Andrei Alexandrowitsch Schdanow. Bereits in den 1950er Jahren sollte es dann nach Palmiro Togliatti, dem damaligen Generalsekretär der PCI, benannt werden, was dieser aber mit dem Satz „Man gibt den Namen einer lebenden Person nicht an eine Organisation weiter, es sei denn, man wünscht ihr den Tod.“ abgelehnt habe. So blieb es zunächst bei dem neuen Namen Institut für kommunistische Studien, bevor die Schule dann 1973 endgültig den Namenszusatz Palmiro Togliatti erhielt. Die Schule war von einem Park umgeben, in dem es Volleyball- und Bocciafelder gab. Sie präsentierte sich als eine der modernsten und zukunftsweisendsten politischen Schulen und verfügte über geräumige Klassenzimmer mit bis zu zweihundert Sitzplätzen, eine Fachbibliothek mit 5.000 Bänden, Lesesäle, eine Turnhalle, ein Museum und eine moderne Krankenstation. Fast durchweg findet der Hauptsaal des Instituts Erwähnung, den Renato Guttusos 318 × 520 cm großes Gemälde Die Schlacht an der Admiralsbrücke (La Battaglia di Ponte dell’Ammiraglio) schmückte, das sich heute in der Sammlung der Galleria Nazionale d’Arte Moderna in Rom befindet. Die Mehrheit der Studenten stammte in den frühen Jahren der Schule aus der Arbeiterklasse. Deren Auswahl trafen drei Instanzen gemeinsam: die Kader- und Schulkommission der Partei, der Provinzialverband und die Schulleitung. „Die Provinzverbände (die den größten Teil der Kosten für die Unterbringung und Verpflegung der Schüler trugen) bestimmten die Kandidaten, die in das Institut geschickt werden…"} {"instruction": "Create a Javascript function to take an array of numbers and return the sum of all its elements.", "input": "[1, 2, 3, 4, 5]", "output": "function sumArrayElements(arr) { let sum = 0; for (let i = 0; i < arr.length; i++) { sum += arr[i]; } return sum; }"} {"instruction": "Rewrite the following Python code using list comprehensions.", "input": "def divisible(x):\n out = []\n for i in range(1, x):\n if (i % 3 == 0) or (i % 5 == 0):\n out.append(i)\n return out", "output": "def divisible(x):\n return [i for i in range(1, x) if (i % 3 == 0) or (i % 5 == 0)]"} {"text": "[CS Wikipedia] Reichswerke Hermann Göring\n\nReichswerke Hermann Göring (oficiální označení Reichswerke AG für Erzbergbau und Eisenhütten „Hermann Göring“) byly spolu s I.G. Farben a Vereinigte Stahlwerke AG největšími německými koncerny v Třetí říši. Od března 1937 plánoval Hermann Göring, Paul Pleiger a Hermann Alexander Brassert založení říšské společnosti. Tato společnost byla založena 15. července 1937 jako akciová společnost se sídlem v Berlíně. Její kapitálový vklad byl nejprve 5 miliónů říšských marek. Podíl státu ve společnosti činil 90 procent. V červenci 1941 došlo k přeložení sídla firmy z Berlína do Salzgitteru. V době období druhé světové války byly součásti koncernu například Škodovy závody či Vítkovické železárny. Od září 1944 do ledna 1945 byl pro vítkovický koncern v obci Rydułtowy vybudován pomocný tábor KL Auschwitz-Birkenau, kde pracovala asi tisícovka vězňů. Po konci války byl koncern zrušen. Reference Externí odkazy Průmysl Nacistické Německo Firmy založené roku 1937 Zaniklo 1945"} {"text": "[EN Wikipedia] Cornelis Bastiaan Vaandrager\n\nCornelis Bastiaan Vaandrager (26 August 1935, in Rotterdam – 18 March 1992, in Rotterdam), who generally published with only his initials as C. B. Vaandrager, was a Dutch writer and poet who lived and worked in Rotterdam. Later he came to be known simply by the shortened version of his name as Vaan. Vaandrager was a leading writer, along with Hans Sleutelaar and Armando, in the group of experimental Dutch writers called De Zestigers (The Sixtiers), who were preceded by De Vijftigers. Life and work Youth, education and early career Vaandrager was born in the Pretorialaan in southern Rotterdam in 1935. His father was a postman and van driver, his mother a housewife. The family moved when he was six to the Brielselaan, where he grew up. He was a brilliant student at the Charlois Lyceum, where he received a straight A at his exam for his Greek translations of Homer and Herodotus. The principal urged him to go on to university, but Vaandrager opted to become a trendsetting poet, writer and artist. After his military service Vaandrager started working as copywriter for a local newspaper, and later for some publicity agencies. In the new paper Het Parool he published his first children's story in 1958. He joined the artistic scene, taking part in the café night life with his school friend Hans Sleutelaar and such emerging pop artists as Woody van Amen and Daan van Golden. Late in the 1950s, together with Sleutelaar and painter-poet Armando, he joined the editorial board of the Flemish-Dutch literary magazine Gard Sivik (1955–64), which was then relocated from Antwerp to Rotterdam. Later the three were joined by the poet Hans Verhagen in starting the new magazine De Nieuwe Stijl (1965–66). Work In 1960 Vaandrager made his prose debut with his 60-page coming of age story, Leve Joop Massaker (Long Live Joop Massaker), which was compared by critics to novels by Gerard Reve and Hugo Claus. A year later came his poetry debut, Met andere ogen (With other eyes). With those works he established his name as a promising local literary talent. Vaandrager set his face against literary pretension and identified his work with the \"dislocating, raw city mentality of punk and New Wave\". In the preface to his 1967 collection of poems (Gedichten) he claimed \"not to give a shit about poetry\". Like several others in his generation, he took inspiration from Marcel Duchamp’s concept of the readymade. At the heart of his \"Dutch Railways\", for example, there is a railway schedule, given context by the opening line \"Tanya, it's up to you\" and those following the train times: \"Say hello to Amsterdam/ and no messing around\". The poem tells a story without descending into the anecdotal. Similarly, in \"Tourist Traffic\" the mind plays over three statements that juxtapose a river in…"} {"text": "[DE Wikipedia] Ruacanafälle\n\nDie Ruacanafälle sind ein Wasserfall des namibisch-angolanischen Grenzflusses Kunene, der hier in der Regenzeit bis zu 107 Meter tief in eine bis zu 1067 Meter breite Schlucht stürzt. Beschreibung Ihren Namen tragen die Fälle nach der in der Nähe gelegenen Kreisstadt Ruacana. Direkt am Wasserfall befinden sich das unterirdisch angelegte Ruacana-Wasserkraftwerk. Es wurde ursprünglich in den 1970er-Jahren als Teil des Cunene-Projekts erbaut und ist das größte Elektrizitätswerk Namibias. Durch die jahreszeitlich bedingten, starken Wasserstandsschwankungen und die Verwendung des Flusswassers zur Stromerzeugung bietet der Wasserfall nur bei Hochwasser, häufig gegen Ende der Regenzeit im März und April, oder bei Schleusenöffnung ein beeindruckendes Schauspiel. Siehe auch Liste von Wasserfällen Weblinks Einzelnachweise Wasserfall in Angola Geographie (Omusati) Provinz Cunene WRuacanafalle"} {"instruction": "Create a program in Python that takes two numbers as an input and returns the sum of the two numbers.", "input": "", "output": "def sum_nums(a, b):\n \"\"\"Returns the sum of two numbers a and b.\"\"\"\n return a + b"} {"instruction": "Write a SQL query to select the latest registration record for each user.", "input": "", "output": "SELECT * FROM registrations WHERE registration_date IN (SELECT MAX(registration_date) FROM registrations GROUP BY user_id);"} {"text": "[DE Wikipedia] Benito Rigoni\n\nBenito Rigoni (* 11. April 1936 in Asiago; † 23. Dezember 2021 in Dueville) war ein italienischer Bobfahrer. Biografie Benito Rigoni kam bereits in jungen Jahren mit dem Wintersport in Berührung. Am Anfang seiner sportlichen Karriere trat er im Skilanglauf auf den langen Distanzen an, ohne allerdings größere Erfolge verzeichnen zu können. Wegen seiner Statur wurde die Sportgruppe der Forstpolizei auf ihn aufmerksam. Im Alter von 18 Jahren kam er bereits als Anschieber in der ersten Bobmannschaft der Sportgruppe zum Einsatz. Er startete bei seinem Debüt im Nationalkader zusammen mit Sergio Zardini, schloss sich jedoch später dem Bobteam um Eugenio Monti an. Mit diesem wurde er 1957 italienischer Meister im Viererbob und 1961 auch im Zweierbob. Zudem wurde er mit Monti, Sergio Siorpaes und Furio Nordio 1961 Weltmeister. Bei den Olympischen Winterspielen 1964 in Innsbruck ersetzte Gildo Siorpaes, der Bruder von Sergio, Nordio. Im Viererbob-Wettbewerb gewann die Crew die Bronzemedaille. Nach seiner Zeit als Aktiver arbeitete er als Beamter bei der Forstpolizei. Rigoni wurde vom Comitato Olimpico Nazionale Italiano mit dem Stella al merito sportivo Gold ausgezeichnet. Weblinks Einzelnachweise Bobfahrer (Italien) Olympiateilnehmer (Italien) Teilnehmer der Olympischen Winterspiele 1964 Bobweltmeister Italienischer Meister (Bob) Sportler (Asiago, Venetien) Italiener Geboren 1936 Gestorben 2021 Mann"} {"instruction": "Write a function in Python which converts a given string to a list, split by words.", "input": "\"Hello world!\"", "output": "# Function to convert a string to a list, split by words\ndef string_to_list(string):\n # Initialize an empty list\n word_list = []\n \n # Iterate through each character of the string\n for character in string:\n word = \"\"\n while character != \" \" and character != \"\":\n word += character\n string = string[1:]\n character = string[0]\n # Add each word to the list\n word_list.append(word)\n\n return word_list\n\n# Driver code\nmy_string = \"Hello world!\"\n\nword_list = string_to_list(my_string)\n\nprint(word_list) # prints ['Hello', 'world!']"} {"instruction": "Find the total area of all countries from the table.", "input": "Table name: countries Columns: - name (text) - population (integer) - area (float) - capital_city (text)", "output": "SELECT SUM(area) FROM countries;"} {"instruction": "Create a function to generate the nth term in the Fibonacci sequence.", "input": "n = 3", "output": "def get_fib_term(n): if n <= 1: return n else: return get_fib_term(n-1) + get_fib_term(n-2) print(get_fib_term(3))"} {"text": "[EN Wikipedia] Hlavenec\n\nHlavenec is a municipality and village in Prague-East District in the Central Bohemian Region of the Czech Republic. It has about 500 inhabitants. Sights The most important monument is the memorial of Emperor Charles VI made by Matthias Braun in 1724–1725. References Villages in Prague-East District"} {"instruction": "Write a Java program to read the following text and count the number of words in the given sentence.", "input": "This is a sample sentence.", "output": "import java.util.*; public class CountWords { public static void main(String[] args) { String str = \"This is a sample sentence.\"; int wordCount = 0; for (int i = 0; i < str.length(); i++) { if ((str.charAt(i) == ' ') || (str.charAt(i) == '.')) { wordCount++; } } System.out.println(\"The number of words in the given sentence is \" + (wordCount + 1)); } }"} {"text": "[EN Wikipedia] Asterism\n\nAsterism may refer to: Asterism (astronomy), a pattern of stars Asterism (gemology), an optical phenomenon in gemstones Asterism (typography), (⁂) a moderately rare typographical symbol denoting a break in passages See also Aster (disambiguation) Asterisk (disambiguation)"} {"instruction": "Write a Python program to detect if an array contains any duplicate elements.", "input": "[3, 5, 8, 1, 2, 3]", "output": "def check_duplicates(arr):\n seen = set()\n \n for element in arr:\n if element in seen:\n return True\n else:\n seen.add(element)\n return False\n\narr = [3, 5, 8, 1, 2, 3]\nresult = check_duplicates(arr)\nprint(result)"} {"text": "[DE Wikipedia] Bendere Oboya\n\nBendere Opamo Oboya (* 17. April 2000 in Gambela, Äthiopien) ist eine australische Sprinterin, die sich auf den 400-Meter-Lauf spezialisiert hat. Sportliche Laufbahn Erste internationale Erfahrungen sammelte Bendere Oboya im Jahr 2017, als sie bei den Commonwealth Youth Games in Nassau in 52,69 s die Goldmedaille über 400 Meter gewann und auch mit der australischen Mixed-Staffel über 4-mal 400 Meter in 3:25,08 min siegte. Im Jahr darauf startete sie bei den Commonwealth Games im australischen Gold Coast, kam dort aber mit 55,62 s nicht über die erste Runde hinaus. 2019 siegte sie in 52,76 s bei den Ozeanienmeisterschaften in Townsville und erhielt damit ein Freilos für die Weltmeisterschaften in Doha, bei denen sie mit 51,58 s im Halbfinale ausschied. Im Vorlauf stellte sie mit 51,21 s einen neuen U20-Ozeanienrekord auf. Zudem startete sie dort auch mit der 4-mal-400-Meter-Staffel der Frauen, verpasste aber mit 3:28,64 min den Finaleinzug. 2020 siegte sie in 52,38 s beim Sydney Track Classic und im Jahr darauf siegte sie beim Sydney Track Classic in 36,71 s über 300 Meter und anschließend siegte sie in 52,26 s beim Queensland Track Classic. Im August nahm sie an den Olympischen Sommerspielen in Tokio teil und schied dort mit 52,37 s im Vorlauf aus. Zudem verpasste sie im Staffelbewerb mit 3:30,61 min den Finaleinzug. In den Jahren 2019 und 2021 wurde Oboya australische Meisterin im 400-Meter-Lauf sowie 2017 in der 4-mal-400-Meter-Staffel. Persönliche Bestleistungen 300 Meter: 36,71 s, 13. März 2021 in Sydney 400 Meter: 51,21 s, 30. September 2019 in Doha (U20-Ozeanienrekord) Weblinks Athletenprofil bei den CG2018 400-Meter-Läufer (Australien) 4-mal-400-Meter-Staffel-Läufer (Australien) Olympiateilnehmer (Australien) Teilnehmer der Olympischen Sommerspiele 2020 Ozeanienmeister (400-Meter-Lauf) Australischer Meister (Leichtathletik) Australier Geboren 2000 Frau"} {"instruction": "Create a Visual Basic function to print the contents of an array.", "input": "", "output": "Public Sub PrintArray(arr() As Integer) For i = 0 To arr.Length - 1 Console.WriteLine(arr(i)) Next End Sub"} {"text": "[EN Wikipedia] Tagara\n\nTagara may refer to: Țâgâra, a village in Plopana Commune, Bacău County, Romania Ter, Maharashtra, a village in India, identified as the ancient Tagara trading centre mentioned in the Periplus of the Erythraean Sea. Tagara was the important trade centres of ancient India was on the trade route connecting Kalyana with Vengi'"} {"instruction": "Write a function in Python to convert a 2D array into a single column array.", "input": "arr = [[0, 1, 2], [3, 4, 5], [6, 7, 8]]", "output": "def convert_to_single_column_array(arr): single_column_arr = [] for sub_arr in arr: for val in sub_arr: single_column_arr.append(val) return single_column_arr"} {"text": "[CS Wikipedia] Farní sbor Českobratrské církve evangelické v Praze 9 – Horní Počernice\n\nFarní sbor Českobratrské církve evangelické v Praze 9 - Horní Počernice je sborem Českobratrské církve evangelické v Praze. Sbor spadá pod Pražský seniorát. Sbor byl ustaven jako samostatný roku 1950. Duchovní sboru je farářka Alžběta Hanychová, kurátorem sboru Martin Hrubeš. Faráři sboru Václav Velkoborský (1951-1963) Marie Molnárová (1963–1971) Marie Linnemannová (1974-1979) Miluše Nováková (1981-1987) Martin Prudký (1988–1990) Miloslav Plecháček (1990–2006) Mikuláš Vymětal Th.D. (2000–2005) Olga Mrázková (2004–2005) Miloš Rejchrt (2006) Petr Firbas (2006 - 2018) Alžběta Hanychová (2018 - Externí odkazy Oficiální stránky sboru Údaje o sboru na portálu Evangnet Praha 9 - Horní Počernice Náboženství v Horních Počernicích Organizace založené roku 1950"} {"instruction": "Implement a web scraper in Python to extract all headlines from a web page.", "input": "", "output": "import requests from bs4 import BeautifulSoup url = 'https://example.com/' response = requests.get(url) html = response.text soup = BeautifulSoup(html, 'html.parser') headlines = [] for tag in soup.find_all('h1', class_='headline'): headline = tag.string headlines.append(headline)"} {"instruction": "Explain the difference between and tags.", "input": "", "output": "The HTML tag is used to indicate which version of HTML web page is based on. It allows a browser to know which type of document it is dealing with, so that it can determine how to render the document. The tag is used to provide information about the content of the web page, such as its title, author, keywords, description, language and more. It does not affect the way a browser displays the web page."} {"instruction": "Create a Python class to represent a 3 x 3 matrix with variable values.", "input": "", "output": "class Matrix: def __init__(self, a00=0, a01=0, a02=0, a10=0, a11=0, a12=0, a20=0, a21=0, a22=0): self.matrix = [[a00, a01, a02], [a10, a11, a12], [a20, a21, a22]] def __str__(self): return str(self.matrix)"} {"instruction": "Write a Python program to sort a list of strings by the length of each string.", "input": "", "output": "def sort_by_length(strings):\n return sorted(strings, key=len)"} {"instruction": "Create a Dockerfile to build a container with python, flask, and gunicorn.", "input": "Not applicable", "output": "FROM python:3.7\n\t\nRUN mkdir /usr/src/app\n\nWORKDIR /usr/src/app\n\nCOPY requirements.txt ./\n\nRUN pip install --no-cache-dir -r requirements.txt\n\nEXPOSE 5000\n\nCOPY . .\n\nCMD [\"gunicorn\", \"--workers\", \"3\", \"-eventlet\", \"--bind\", \":5000\", \"wsgi:app\"]"} {"instruction": "Using JavaScript, create a program to check whether two given strings are an anagram or not.", "input": "", "output": "// JavaScript Code function checkAnagrams(str1, str2) { const s1 = str1.split('').sort().join(''); const s2 = str2.split('').sort().join(''); return s1 === s2; }"} {"instruction": "Program a C# procedure to display the multiplication table of a given number.", "input": "", "output": "void DisplayTable(int num) { for (int i = 1; i <= 10; i++) { Console.WriteLine($\"{num} x {i} = {num * i}\"); } }"} {"instruction": "Implement a Python parser to print return a list of words from a given string.", "input": "\"Hello, World!\"", "output": "def parse_words(string):\n words = []\n\n for word in string.split(\" \"):\n words.append(word.strip(\"!,.? \\n\\t\\r\\\"\\'-\"))\n return words\n\nresult = parse_words(\"Hello, World!\")\nprint(result)\n##\nOutput: ['Hello', 'World']"} {"instruction": "Design a CSS grid container with 3 columns of equal size.", "input": "", "output": ".container { display: grid; grid-template-columns: 1fr 1fr 1fr; }"} {"instruction": "Design a function in Python that takes two parameters, a list and a number, and returns a list where all elements are multiplied by the number.", "input": "[1,2,3], 4", "output": "def mul_list(input_list, number): return [x*number for x in input_list]"} {"text": "[HI Wikipedia] रायपुर\n\nरायपुर (Raipur) भारत के छत्तीसगढ़ राज्य में स्थित एक नगर है। यह राज्य की राजधानी है और रायपुर ज़िले का मुख्यालय है। रायपुर छत्तीसगढ़ राज्य का सबसे बड़ा शहर होने के साथ-साथ राज्य का एक महत्वपूर्ण औद्योगिक और व्यापारिक केन्द्र है। छत्तीसगढ़ के विभाजन के पूर्व रायपुर मध्य प्रदेश राज्य का अंग था। रायपुर को स्वच्छ सर्वेक्षण 2021 मे भारत का 6वां सबसे स्वच्छ शहर घोषित किया गया है। रायपुर को व्यापार के लिए देश के सबसे अच्छे शहरों मे से एक माना जाता है। रायपुर खनिज संपदा से भरपूर है। यह देश मे स्टील एवं लोहे के बड़े बाजारों मे से एक है। लगभग 200 स्टील रोलिंग मिल, 195 स्पन्ज आयरन प्लांट, कम से कम 6 स्टील प्लांट, 60 प्लाइवुड कारखाने, 35 फेरो-अलॉय प्लांट, और 500 कृषि उद्योग हैं। रायपुर मे 800 से अधिक राइस मिल प्लांट हैं। इतिहास पुराने भवन एवं किलों के अवशेष पर आधारित कुछ इतिहासविदों की मान्यतानुसार यह शहर ९वीं सदी से अस्तित्व में है।यहां प्राचीन गोंड राजाओं का शासन था, ज्यादातर लोगों का मानना है कि यह १४ वीं सदी में बसा था। जनसांख्यिकी 2011 की जनगणना के अनुसार: जनसंख्या - 10,10,087 लिंगानुपात - 946 साक्षरता दर - 86.90% पुरुष साक्षरता दर 92.39% महिला साक्षरता दर 81.10% भूगोल एवं जलवायु रायपुर खारुन नदी के तट में बसा छत्तीसगढ़ का सबसे बड़ा शहर है। रायपुर एक बड़े मैदान (छत्तीसगढ़ का मैदान) के मध्य में स्थित है जो \"धान का कटोरा\" भी कहा जाता है। रायपुर के पूर्व में महानदी नदी बहती है। उत्तर-पश्चिम में मैकाल की पहाड़ियां हैं। उत्तरी ओर छोटा नागपुर का पठार और दक्षिण में बस्तर का पठार है। रायपुर मुम्बई-हावड़ा रेल लाइन पर है और यह सभी मह्त्वपूर्ण शहरों से जुड़ा है। राष्ट्रीय राजमार्ग ६ शहरो से गुज़रता है और ४३ शहर को विशाखापट्नम से जोड़ता है। रायपुर मुम्बई, दिल्ली एव्म अन्य शहरों से हवाई मा‍र्ग से जुड़ा हुआ है। रायपुर का हवाई अड्डा 'माना में है। तापमान: गर्मी में ४५ से २९ सेल्सिअस सर्दी में २७ से १० सेल्सिअस वर्षा लगभग १२० से मी (जुलाई से सितम्बर) नवा रायपुर 01 नवंबर सन् 2000 में बने छत्तीसगढ़ राज्य की राजधानी रायपुर का प्रशासनिक केन्द्र 'नया रायपुर' हैं। यह एक विश्व स्तरीय परियोजना है जिसमे कि वर्तमान रायपुर से 25 किमी दूर एक नए शहर का सृजन किया गया है। इस के लिए एक बड़े क्षेत्र की भूमि का अर्जन या अधिग्रहण किया गया है। नया रायपुर का कुल क्षेत्रफल 80,000 हेक्टेयर है। नये रायपुर में 225 किमी पक्की सड़क है। नया रायपुर के परसदा क्षेत्र मेंअन्तर्राष्ट्रीय क्रिकेट स्टेडियम बनाया गया है। अर्थव्यवस्था रायपुर संपूर्ण छ्त्तीसगढ़ एवं उड़ीसा के लिये थोक की मंडी है। इसके अलावा यह एक औद्योगिक नगर है। शिक्षा रायपुर में मुख्य विश्वविद्यालय: पंडित रविशंकर शुक्ल विश्वविद्यालय इन्दिरा गांधी कृषि विश्वविद्यालय हिदायतुल्ला विधि विश्वविद्यालय एवं कुशाभाऊ ठाकरे पत्रकारिता एवं संचार विश्वविद्यालय नय आयुष्य एवं चिकित्सा विश्वविद्यालय इंजीनियरिंग की शिक्षा के लिए NIT राष्ट्रीय तकनीकी संस्थान सहित चार अभियांत्रिकी महाविद्यालय हैं : शासकीय अभियांत्रिकी महाविद्यालय, रायपुर इंस्टीट्यूट आफ़ टेक्नॉलाजी, दिशा इंस्टीट्यूट आफ़ टेक्नालाजी एंड मैनेजमेंट नए चिकित्सा विश्वविद्यालय के अधीन रायपुर के चार…"} {"instruction": "How would you create a website that provides users with their daily horoscopes?", "input": "", "output": "The website should provide the users with an interface to select their star sign from a drop-down list. When the user selects their star sign, the website should display their daily horoscope. To achieve this, the website should connect to a database which contains the daily horoscopes for each of the star signs."} {"instruction": "Create a Python script to scrape the title and link of news articles from a given page.", "input": "", "output": "from bs4 import BeautifulSoup\nimport requests\n\ndef get_news_articles(url):\n page = requests.get(url)\n soup = BeautifulSoup(page.content, 'html.parser')\n articles = []\n for article in soup.find_all('article'):\n link = article.find('a', class_=\"shop-now-option\")['href']\n title = article.find('h2').get_text()\n articles.append({'title': title, 'link': link})\n return articles"} {"instruction": "Initialize a variable with a list containing numbers from 1-100.", "input": "", "output": "list_numbers = [i for i in range(1,101)]"} {"instruction": "How could the following code be optimized?", "input": "def remove_duplicates(input_list): temp_list = [] for item in input_list: if item not in temp_list: temp_list.append(item) return temp_list", "output": "def remove_duplicates(input_list): return list(set(input_list)) #This is more efficient than iterating over the list to remove duplicate items."} {"instruction": "Write Java code to generate random numbers between 0 and 10.", "input": "", "output": "Random rand = new Random(); // Generate random integers in range 0 to 10 int rand_int1 = rand.nextInt(11);"} {"instruction": "Write an R function that determines the average value of an integer array.", "input": "", "output": "average <- function(numbers) { sum <- 0 for (i in numbers) { sum <- sum + i } return(sum/length(numbers)) }"} {"text": "[EN Wikipedia] Pataua River\n\nThe Pataua River is a tidal river of the Northland Region of New Zealand's North Island. It flows northeast from its origins east of Whangarei, reaching the Pacific Ocean at the southern end of Ngunguru Bay. At its mouth, the river is flanked by the settlements of Pataua North and Pataua South, which are connected by a footbridge. See also List of rivers of New Zealand References Rivers of the Northland Region Rivers of New Zealand"} {"instruction": "Write an Android app for creating and playing a quiz competition.", "input": "", "output": "public class QuizApp extends Activity { private ArrayList questions; public void onCreate(Bundle bundle) { questions = new ArrayList(); // other code // such as setting the layout // and adding questions to the list } public void showQuestion() { // code to show new question // such as setting the text/image // showing the options, etc. } public void selectAnswer(int answerIndex) { // code to check if the selected answer is // correct or wrong // and show correct or wrong message } public void changeQuestion() { // code to show next question } }"} {"instruction": "To test the installation of our library, run the `test_install` and `test_sdist` methods in the `TestInstallation` class. The `test_install` method installs the library using `python setup.py install` and checks that it can be used. The `test_sdist` method creates a source distribution tarball with `python setup.py sdist` and checks that it matches the content of our git repository. To run the tests, execute the `unittest` module on the file containing this code.", "input": "", "output": "\"\"\"\nTests installation of our library.\n\"\"\"\n\nimport glob\nimport os\nimport shutil\nimport sys\nimport tarfile\nimport threading\nimport unittest\n\nimport stem\nimport stem.util.system\n\nimport test.util\n\nfrom test.util import only_run_once\n\nINSTALL_MISMATCH_MSG = \"Running 'python setup.py sdist' doesn't match our git contents in the following way. The manifest in our setup.py may need to be updated...\\n\\n\"\n\nBASE_INSTALL_PATH = '/tmp/stem_test'\nDIST_PATH = os.path.join(test.util.STEM_BASE, 'dist')\nSETUP_THREAD, INSTALL_FAILURE, INSTALL_PATH, SDIST_FAILURE = None, None, None, None\n\n\ndef setup():\n \"\"\"\n Performs setup our tests will need. This mostly just needs disk iops so it\n can happen asynchronously with other tests.\n \"\"\"\n\n global SETUP_THREAD\n\n def _setup():\n global INSTALL_FAILURE, INSTALL_PATH, SDIST_FAILURE\n original_cwd = os.getcwd()\n\n try:\n os.chdir(test.util.STEM_BASE)\n\n try:\n os.chdir(test.util.STEM_BASE)\n stem.util.system.call('%s setup.py install --prefix %s' % (sys.executable, BASE_INSTALL_PATH), timeout = 60)\n stem.util.system.call('%s setup.py clean --all' % sys.executable, timeout = 60) # tidy up the build directory\n site_packages_paths = glob.glob('%s/lib*/*/site-packages' % BASE_INSTALL_PATH)\n\n if len(site_packages_paths) != 1:\n raise AssertionError('We should only have a single site-packages directory, but instead had: %s' % site_packages_paths)\n\n INSTALL_PATH = site_packages_paths[0]\n except Exception as exc:\n INSTALL_FAILURE = AssertionError(\"Unable to install with 'python setup.py install': %s\" % exc)\n\n if not os.path.exists(DIST_PATH):\n try:\n stem.util.system.call('%s setup.py sdist' % sys.executable, timeout = 60)\n except Exception as exc:\n SDIST_FAILURE = exc\n else:\n SDIST_FAILURE = AssertionError(\"%s already exists, maybe you manually ran 'python setup.py sdist'?\" % DIST_PATH)\n finally:\n os.chdir(original_cwd)\n\n if SETUP_THREAD is None:\n SETUP_THREAD = threading.Thread(target = _setup)\n SETUP_THREAD.start()\n\n return SETUP_THREAD\n\n\ndef clean():\n if os.path.exists(BASE_INSTALL_PATH):\n shutil.rmtree(BASE_INSTALL_PATH)\n\n if os.path.exists(DIST_PATH):\n shutil.rmtree(DIST_PATH)\n\n\ndef _assert_has_all_files(path):\n \"\"\"\n Check that all the files in the stem directory are present in the\n installation. This is a very common gotcha since our setup.py\n requires us to remember to add new modu"} {"instruction": "Write a Python function to randomize a given list of integers.", "input": "[1, 2, 3, 4, 5]", "output": "import random\n\ndef randomize(arr):\n random.shuffle(arr)\n return arr"} {"instruction": "Create a predictive algorithm in Python to predict the price of a given stock.", "input": "", "output": "import pandas as pd\nimport numpy as np\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LinearRegression\n\ndef predict_stock_price(data):\n # clean and prepare the data\n data = data.dropna()\n \n # split the data into features and target values\n X = data.drop(columns=['price'])\n y = data['price']\n X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n # create and fit the model\n lr = LinearRegression().fit(X_train, y_train)\n\n # predict on the test data\n y_pred = lr.predict(X_test)\n return y_pred"} {"instruction": "Create a HTML page displaying 3 columns of data", "input": "Data: [\"Name\", \"Age\", \"Gender\"], [\"Bob\", 35, \"Male\"], [\"John\", 28, \"Male\"], [\"Sarah\", 39, \"Female\"]", "output": " Data
      Name Age Gender
      Bob 35 Male
      John 28 Male
      Sarah 39 Female
      "} {"text": "[DE Wikipedia] Luca Sanchez\n\nLuca Sanchez (* 18. März 1999 in Perpignan) ist ein französischer Tennisspieler. Karriere Sanchez spielte so gut wie gar nicht auf der ITF Junior Tour. In der Jugend-Rangliste kam er bis Platz 1184. Bei den Profis spielte Sanchez 2018 das erste Mal auf der drittklassigen ITF Future Tour. 2021 war er das erste Mal erfolgreich, als er im Doppel zwei Titel gewann und sich in der Weltrangliste platzierte. Schnell konzentrierte er sich vor allem aufs Doppel. Bis Mitte 2022 rückte er dort durch drei weitere Titel in die Top 400 vor und konnte Turniere der ATP Challenger Tour spielen. In Troyes und Todi zog er jeweils ins Halbfinale ein; das Jahr beendete er auf Platz 222. Nach seinem sechsten Future-Titel rückte er mit seinem Stammpartner Théo Arribagé als Ersatzspieler für das Turnier der ATP Tour in Montpellier im Februar 2023 ins Doppel-Hauptfeld nach. Durch den kampflosen Rückzug der Gegner erreichten sie das Viertelfinale, wo sie knapp unterlagen. Darauf folgte das dritte Challenger-Halbfinale in Cherbourg, ehe Sanchez in Marseille erneut von einer Wildcard profitierte – er spielte mit Petros Tsitsipas. Gegen Grégoire Barrère und Albano Olivetti verbuchte er seinen ersten ATP-Matcherfolg. In der Folgerunde schieden sie aus. Er erreichte mit Platz 174 ein neues Karrierehoch. Erfolge Doppel Turniersiege Weblinks Tennisspieler (Frankreich) Franzose Geboren 1999 Mann"} {"instruction": "Convert this Java code sample to Python.", "input": "public int sumOfArray(int[] array) {\n int sum = 0; \n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n return sum;\n}", "output": "def sum_of_array(array):\n sum = 0 \n for i in range(len(array)):\n sum += array[i]\n return sum"} {"instruction": "Write a Python program for finding the maximum of 3 numbers.", "input": "4, 7, 6", "output": "def max_of_three(a, b, c):\n if (a > b) and (a > c):\n greatest = a\n elif (b > a) and (b > c):\n greatest = b\n else:\n greatest = c\n return greatest\n\nprint(\"Max is: \", max_of_three(4, 7, 6))"} {"instruction": "Given the following input, write a Python program to output the characteristics of the longest word.", "input": "laptop,computer,keyboard", "output": "def longest_word(list_words):\n longest_word = max(list_words, key=len)\n print(\"Length of longest word: \" + str(len(longest_word)))\n print(\"Longest Word: \" + longest_word)\n\nlist_words = [\"laptop\", \"computer\", \"keyboard\"]\nlongest_word(list_words)"} {"instruction": "Write SQL code to remove duplicates from a database table.", "input": "Table name: Items Columns: ID, Name", "output": "DELETE FROM Items WHERE ID NOT IN (SELECT MIN(Id) FROM Items GROUP BY Name)"} {"text": "[HI Wikipedia] सिन्धी भाषा\n\nसिंधी भारत के पश्चिमी हिस्से और मुख्य रूप से सिन्ध प्रान्त में बोली जाने वाली एक प्रमुख भाषा है। यह सिन्धी हिन्दू समुदाय(समाज) की मातृ-भाषा है। गुजरात के कच्छ जिले में सिन्धी बोली जाती है और वहाँ इस भाषा को 'कच्छी भाषा' कहते हैं। इसका सम्बन्ध भाषाई परिवार के स्तर पर आर्य भाषा परिवार से है जिसमें संस्कृत समेत हिन्दी, पंजाबी और गुजराती भाषाएँ शामिल हैं। अनेक मान्य विद्वानों के मतानुसार, आधुनिक भारतीय भाषाओं में, सिन्धी, बोली के रूप में संस्कृत के सर्वाधिक निकट है। सिन्धी के लगभग 70 प्रतिशत शब्द संस्कृत मूल के हैं। सिन्धी भाषा सिन्ध प्रदेश की आधुनिक भारतीय-आर्य भाषा है जिसका सम्बन्ध पैशाची नाम की प्राकृत और व्राचड नाम की अपभ्रंश से जोड़ा जाता है। इन दोनों नामों से विदित होता है कि सिंधी के मूल में अनार्य तत्व पहले से विद्यमान थे, भले ही वे आर्य प्रभावों के कारण गौण हो गए हों। सिन्धी के पश्चिम में बलोची, उत्तर में लहँदी, पूर्व में मारवाड़ी और दक्षिण में गुजराती का क्षेत्र है। यह बात उल्लेखनीय है कि इस्लामी शासनकाल में सिन्ध और मुलतान (लहँदीभाषी) एक प्रान्त रहा है और 1843 से 1936 ई. तक सिन्ध, बम्बई प्रांत का एक भाग होने के नाते गुजराती के विशेष सम्पर्क में रहा है। पाकिस्तान में सिन्धी भाषा नस्तालिक (यानि अरबी लिपि) में लिखी जाती है जबकि भारत में इसके लिये देवनागरी और नस्तालिक दोनो प्रयोग किये जाते हैं। सिन्धी का भूगोल एवं उपभाषाएँ सिंध के तीन भौगोलिक भाग माने जाते हैं- (1) सिरो (शिरो भाग), (2) विचोली (बीच का) और (3) लाड़ (संस्कृत : लाट प्रदेश = नीचे का)। सिरो की बोली सिराइकी कहलाती है जो उत्तरी सिंध में खैरपुर, दादू, लाड़कावा और जेकबाबाद के जिलों में बोली जाती है। यहाँ बलोच और जाट जातियों की अधिकता है, इसलिए इसको 'बरीचिकी' और 'जतिकी' भी कहा जाता है। दक्षिण में हैदराबाद और कराची जिलों की बोली 'लाड़ी' है और इन दोनों के बीच में 'विचोली' का क्षेत्र है जो मीरपुर खास और उसके आसपास फैला हुआ है। विचोली सिंध की सामान्य और साहित्यिक भाषा है। सिंध के बाहर पूर्वी सीमा के आसपास 'थड़ेली', दक्षिणी सीमा पर 'कच्छी' और पश्चिमी सीमा पर 'लासी' नाम की सम्मिश्रित बोलियाँ हैं। 'धड़ेली' (धर = थल = मरुभूमि) जिला नवाबशाह और जोधपुर की सीमा तक व्याप्त है जिसमें मारवाड़ी और सिंधी का सम्मिश्रण है। कच्छी (कच्छ, काठियावाड़ में) गुजराती और सिंधी का एवं 'लासी' (लासबेला, बलोचिस्तान के दक्षिण में) बलोची और सिंधी का सम्मिश्रित रूप है। इन तीनों सीमावर्ती बोलियों में प्रधान तत्व सिंधी ही का है। भारत के विभाजन के बाद इन बोलियों के क्षेत्रों में सिंधियों के बस जाने के कारण सिंधी का प्राधान्य और बढ़ गया है। सिंधी भाषा का क्षेत्र 65 हजार वर्ग मील है। व्याकरण सिन्धी शब्द सिन्धी के सब शब्द स्वरान्त होते हैं। इसकी ध्वनियों में ग॒ , ॼ , ॾ , और , ॿ अतिरिक्त और विशिष्ट ध्वनियाँ हैं जिनके उच्चारण में सवर्ण ध्वनियों के साथ ही स्वर तन्त्र को नीचा करके काकल को बन्द कर देना होता है जिससे द्वित्व का सा प्रभाव मिलता है। ये भेदक स्वनग्राम है। संस्कृत के त वर्ग + र के साथ मूर्धन्य ध्वनि आ गई है, जैसे पुट्ट, या पुट्टु (पुत्र), मण्ड (मन्त्र), निण्ड (निन्द्रा), ॾोह (द्रोह)। संस्कृत का संयुक्त व्यंजन और प्राकृत का…"} {"instruction": "Write a function to check whether two lists are equal.", "input": "list1=[1,2,3,4,5] list2=[1,2,3,4,5]", "output": "def equal(list1, list2): if len(list1) != len(list2): return False for i in range(len(list1)): if list1[i] != list2[i]: return False return True"} {"text": "[EN Wikipedia] 2009 A Lyga\n\nThe Lithuanian A Lyga 2009 was the 20th season of top-tier football in Lithuania. The season started on 4 April 2009 and ended on 31 October 2009. Ekranas successfully defended their title. Promotion and relegation Šilutė were relegated to the I Lyga after finishing the 2008 season in last place. They were replaced by I Lyga champions Tauras. Pre-season controversy The Lithuanian top football division was shaken to its core after FBK Kaunas and Atlantas withdrew their participation on 20 March 2009. Both teams cited serious differences with the Lithuanian Football Federation over the way the league has been led in the past as a reason. This was the second blow to the league within two weeks after Žalgiris were denied a license for this season because of excessive financial problems on 6 March 2009. As a consequence, the chairman of the National Football Clubs' Association (NFKA), Gintaras Ugianskis, resigned from his post. Further, the organization of the league was put into the hands of the LFF. The 2009 A Lyga consists of eight teams chosen from all teams of both A Lyga and I Lyga. Teams with a higher 2008 season rank had a preference to enter. Clubs being interested in a participation could submit their application until 26 March 2009. On 27 March 2009, the LFF announced the three replacement teams. Banga Gargždai, LKKA ir Teledema Kaunas and Kruoja Pakruojis were appointed to the league. Further, the LFF classified FBK Kaunas and Atlantas to play in the third-tier II Lyga because of \"unethical conduct and other irregularities\" while Žalgiris were granted a license for the second-level I Lyga. Clubs League table Results Every team will play each other four times, twice at home and twice on the road, for a total of 28 games. Top goalscorers Last updated: 26 October 2009; Source: futbolas.lt References LFF Lyga seasons 1 Lith Lith"} {"text": "[EN Wikipedia] Otematata River\n\nThe Otematata River is a river in North Otago, New Zealand. It rises west of Kohurau and flows northward into Lake Aviemore east of Otematata township. See also List of rivers of New Zealand References Rivers of Otago Rivers of New Zealand"} {"instruction": "Design an algorithm in Python to search a number in an sorted array.", "input": "", "output": "def search(arr, x): \n l = 0\n r = len(arr) - 1\n while l <= r: \n mid = l + (r - l) // 2\n\n if arr[mid] == x: \n return mid \n \n elif arr[mid] < x: \n l = mid + 1\n \n else: \n r = mid - 1\n \n return -1"} {"instruction": "Create an AI program that recognizes handwritten letters and digits using Python.", "input": "Not applicable", "output": "# imports\nimport tensorflow as tf\nfrom tensorflow import keras\n\n# load the MNIST dataset\nmnist = keras.datasets.mnist\n# Split the dataset into training and testing sets\n(x_train, y_train), (x_test, y_test) = mnist.load_data()\n# Preprocess the data\nx_train, x_test = x_train / 255.0, x_test / 255.0\n\n# create a model\nmodel = keras.Sequential()\n# add a convolution layer\nmodel.add(keras.layers.Conv2D(28, kernel_size=(3,3), input_shape=(28, 28, 1)))\n# add a max pooling layer\nmodel.add(keras.layers.MaxPool2D(pool_size=(2, 2)))\n# add a flatten layer\nmodel.add(keras.layers.Flatten())\n# add a dense layer\nmodel.add(keras.layers.Dense(128, activation='relu'))\n# add an output layer\nmodel.add(keras.layers.Dense(10, activation='softmax'))\n\n# compile the model\nmodel.compile(optimizer='adam', \n loss='sparse_categorical_crossentropy',\n metrics=['accuracy'])\n\n# train the model\nmodel.fit(x_train, y_train, epochs=5)\n\n# evaluate the model\nmodel.evaluate(x_test, y_test)"} {"text": "[EN Wikipedia] Croceibacter\n\nCroceibacter is a genus in the phylum Bacteroidota (Bacteria). Etymology The name Croceibacter derives from:Latin adjective croceus, saffron-colored; Neo-Latin masculine gender noun, a rodbacter, nominally meaning \"a rod\", but in effect meaning a bacterium, rod; Neo-Latin masculine gender noun Croceibacter, saffron-colored rod. Species The genus contains a single species, namely C. atlanticus ( Cho and Giovannoni 2003, (Type species of the genus).; Latin masculine gender adjective atlanticus, of or pertaining to the Atlantic Ocean (a species isolated from the Atlantic Ocean).) See also Bacterial taxonomy Microbiology References Bacteria genera Flavobacteria Monotypic bacteria genera"} {"instruction": "Write a code in Go that will reverse all the words in a sentence.", "input": "sentence: \"GPT is a powerful tool\"", "output": "package main func reverseWords(sentence string) string { words := strings.Split(sentence, \" \") var reversedSentence string for i:=len(words)-1; i>=0; i-- { reversedSentence += words[i] + \" \" } return strings.TrimSpace(reversedSentence) }"} {"instruction": "How would you code a function in Python to rotate elements of an array?", "input": "", "output": "def rotate_array(array, n):\n '''\n This function takes in an array and an integer n and rotates the elements of the array by n positions.\n '''\n return array[n:] + array[:n]"} {"text": "[EN Wikipedia] Thewa\n\nThewa is a special art of jewelry making which involves fusing of intricately worked-out sheet gold on molten glass. It evolved in Pratapgarh district, Rajasthan India. Its origin dates back to the rajput era. Process Thewa is a traditional art of fusing 23K Gold with multicoloured glass. The glass is treated by a special process to have glittering effects, which in turn highlights the intricate gold work. The whole Thewa piece is hand crafted over a period of one month by skilled artisans. Thewa, an art that pulsates with life, caught seemingly in movement, in motifs used on jewellery, which shows the culture, heritage and tales of romance and valour of Rajasthan with nature and happiness depicting the art of the fine craftsmanship. The process of making thewa work is detailed; time consuming and intricate, taking up to a month to complete each piece. It starts with broken pieces of terracotta, finely ground, mixed with chemicals and oil to produce a thick paste. The paste spread on a wooden base has a 23carat gold sheet of 40gauge thickness set onto the mixture and the free hand design etched on it. Black paint spread over the gold sheet that highlights the design so it becomes clearly visible for further detailed work with fine tools. The craftsman removes the excess gold creating a design often based on the Hindu mythology or Mughal court scenes, historical events or with flora and fauna motifs. Origin Nathu ji Soni invented the process in 1767; the secrets of the craft that passed directly from father to son over the generations remains it in the family only, who call themselves 'Raj-Sonis’. Many of the members from this family have been awarded by UNESCO, National & State Government. Some of the finest examples of this unique form of decorative art are in local museum collections in India as well as abroad including the Metropolitan Museum of Art and the Victoria & Albert. Other Origin: THEWA is a word from the local Rajasthani language which literally means “SETTING”. Thewa is an art of fusing 23ct gold with multicoloured glass. It is a very detailed and intricate process. A 23ct gold piece is first beaten into a very thin sheet. Intricate designs are inscribed onto these gold sheets using very fine chisel. This gold sheet, called as “Thewa Ki Patti” is fixed to a lac-resin compound spread on a board by slightly warming the lac and then pressing the gold sheet onto it. An open work pattern is pierced thru these gold sheets placed on the lac-resin covered board by knocking off the portions which ultimately creates the intricate design. The gold sheet is gently peeled off by heating it. Like the rest of Rajasthan handicrafts, the glass works of Pratapgarh are unique in both design and usage. Besides beautiful and traditional items such as…"} {"instruction": "Generate a code in Java for sorting an array using Mergesort.", "input": "", "output": "public static void sortMerge (int [] array) { //Array must have more than one element if (array.length > 1) { int len = array.length; //Split vector into two halves int mid = len/2; int left [] = Arrays.copyOfRange (array, 0, mid); int right [] = Arrays.copyOfRange (array, mid, len); //Sort each half sortMerge (left); sortMerge (right); //Merge the sorted halves int i = 0; int j = 0; int k = 0; while (i str2){ console.log(str1 + \" is bigger than \" + str2); } else{ console.log(str2 + \" is bigger than \" + str1); }"} {"text": "[DE Wikipedia] Central Cee\n\nCentral Cee (* 4. Juni 1998 in Shepherd’s Bush, London, Vereinigtes Königreich; bürgerlich Oakley Neil Caesar-Su), auch bekannt als Cench, ist ein britischer Rapper aus Westlondon. Ende 2020 hatte er seinen nationalen Durchbruch mit dem Song Loading. Mit seinem Debütalbum Wild West war er im Jahr darauf international erfolgreich. Biografie Oakley Caesar-Su alias Central Cee begann als Teenager in der zweiten Hälfte der 2010er Jahre Songs zu veröffentlichen. In den Anfangsjahren verwendete er viel Auto-Tune und bewegte sich im Trap-Genre. 2020 wandte er sich dem Drill Rap zu und mit Veröffentlichungen wie Day in the Life und Molly sowie einem Auftritt in der Freestyle-Rapshow Mad About Bars von Kenny Allstar machte er auf sich aufmerksam. Im Oktober des Jahres veröffentlichte er Loading und hatte damit seinen ersten Hit. Der Song stieg auf Anhieb in die Top 40 der UK-Charts ein und stieg bis Platz 19. 20 Wochen hielt er sich in den Top 100 und brachte ihm eine Gold-Auszeichnung. Zwei weitere Songs brachte er in die Charts, einer davon der Top-10-Hit Commitment Issues, bevor er im März 2021 das Mixtape Wild West folgen ließ. Es schaffte den Einstieg auf Platz 2 und hielt sich über ein halbes Jahr in den Charts. Es war über England hinaus erfolgreich und kam unter anderem auch in Frankreich und Australien in die Hitlisten. Der Erfolg brachte ihm den Breakthrough Award von GRM Daily. Im September veröffentlichte er die Single Obsessed with You, auf der er die Newcomerin PinkPantheress samplet. Sie kam ebenfalls international in die Charts, unter anderem auch in der Schweiz, und brachte ihm mit Platz 4 seine beste Singleplatzierung in England. Seiner Ankündigung seines zweiten Mixtapes für das folgende Jahr folgte die Aufnahme in den Sound of 2022 der BBC. Diskografie Alben Weitere Alben 2022: No More Leaks Singles Weitere Lieder 2022: Bumpy Johnson 2022: Crypto Price Singles als Gastmusiker Weitere Gastbeiträge 2021: Movie (Rondodasosa feat. Central Cee & Nko) 2021: Measure of a Man (FKA Twigs feat. Central Cee; Film: The King’s Man) Auszeichnungen für Musikverkäufe Quellen Weblinks Central Cee bei Genius (englisch) Rapper Engländer Brite Geboren 1998 Mann"} {"instruction": "Given a string and an integer N, write a Python function to construct the Nth palindromic string.", "input": "", "output": "def construct_palindrome(string, N): length = len(string) mid = length // 2 left = string[:mid] right = left[::-1] if length % 2 == 0: left = string[:mid - (N - 1)] right = left[::-1] else: left = string[:mid - N] right = string[mid + 1:(mid + 1) + N][::-1] return left + string[mid] + right"} {"text": "[EN Wikipedia] Tūtoko River\n\nThe Tūtoko River is a river located in the Darran Mountains in New Zealand. Originating from the western flank of Mount Tūtoko it is a tributary of the Cleddau River. See also List of rivers of New Zealand References Rivers of Fiordland"} {"instruction": "Describe how a web server handles a request.", "input": "", "output": "When a web server receives a request, it typically passes the request to a request handler. The request handler interprets the request and takes the appropriate action. Depending on the type of request, this could include accessing a file or a database, or running an application. After the request has been processed, the response is typically sent back to the user in the form of HTML, XML, or JSON."} {"instruction": "Write a Python script to print the current date in the following format: \"Monday, October 5th, 2020\".", "input": "", "output": "import datetime\n\ndate_info = datetime.datetime.today()\n\nday_name = date_info.strftime(\"%A\")\nmonth_name = date_info.strftime(\"%B\")\ndate_num = date_info.strftime(\"%-d\")\nyear_num = date_info.strftime(\"%Y\")\n\nprint(f\"{day_name}, {month_name} {date_num}th, {year_num}\")"} {"instruction": "Edit the following code to generate a boolean array with True for odd numbers and False for even numbers", "input": "a = [1, 2, 3, 4, 5]", "output": "import numpy as np a = [1, 2, 3, 4, 5] b = np.array([i % 2 for i in a])"} {"instruction": "You need to write an HTML page with two forms, one for registering a new user and the other for logging in an existing user.", "input": "", "output": "

      Welcome to the Sign Up/Login Page

      Sign Up



      Log In



      "} {"instruction": "How would you call a function 'process' in JavaScript?", "input": "", "output": "The function 'process' can be called with the following syntax: process();"} {"instruction": "Perform an left outer join of two tables, Customers and Orders, in an SQL query and order the result by CustomerName in ascending order.", "input": "", "output": "SELECT c.Name AS CustomerName, o.OrderNumber FROM Customers c LEFT OUTER JOIN Orders o ON c.ID = o.CustomerID ORDER BY CustomerName ASC;"} {"instruction": "Write a Python program to find a pair of elements (from an array) whose sum is an exact number.", "input": "[2, 4, 6, 9], 8", "output": "def sum_pair(array, target_sum):\n res_pair = []\n # Sort the array\n array.sort()\n # Set the left and right pointers\n l, r = 0, len(array) - 1\n while l != r:\n if array[l] + array[r] == target_sum:\n res_pair.append((array[l], array[r]))\n l += 1\n r -= 1\n # If sum is smaller than target sum, increase left\n elif array[l] + array[r] < target_sum:\n l += 1\n # If sum is greater than target sum, decrease right\n else:\n r -= 1\n return res_pair\n \nprint(sum_pair([2, 4, 6, 9], 8))"} {"instruction": "Create an HTML form with a submit button that will trigger an alert message on clicking the button.", "input": "", "output": "
      "} {"instruction": "Design a class Car with a constructor to initialize the variables _type, _year and _color", "input": "", "output": "class Car: def __init__(self, type, year, color): self._type = type self._year = year self._color = color"} {"instruction": "Create a Python function to swap key-value pairs in a dictionary.", "input": "", "output": "def swap_dict_keys(d): return {v: k for k, v in d.items()}"} {"text": "[DE Wikipedia] Smithy Clough\n\nDer Smithy Clough ist ein Wasserlauf in Lancashire, England. Er entsteht als Nan Hole Clough an der Nordostseite des Boulsworth Hill und fließt in nordwestlicher Richtung. Er bildet bei seinem Zusammentreffen mit dem Turnhole Clough den Wycoller Beck. Gewässer in Lancashire"} {"text": "[HI Wikipedia] संगीत\n\nसुव्यवस्थित ध्वनि, जो रस की सृष्टि करे, संगीत कहलाती है। गायन, वादन व नृत्य तीनों के समावेश को संगीत कहते हैं। संगीत नाम इन तीनों के एक साथ व्यवहार से पड़ा है। गाना, बजाना और नाचना प्रायः इतने पुराने है जितना पुराना आदमी है। बजाने और बाजे की कला आदमी ने कुछ बाद में खोजी-सीखी हो, पर गाने और नाचने का आरंभ तो न केवल हज़ारों बल्कि लाखों वर्ष पहले उसने कर लिया होगा, इसमें कोई संदेह नहीं।yughvn vi rich CL BB v CV गायन मानव के लिए प्राय: उतना ही स्वाभाविक है जितना भाषण। कब से मनुष्य ने गाना प्रारंभ किया, यह बताना उतना ही कठिन है जितना कि कब से उसने बोलना प्रारंभ किया है। परंतु बहुत काल बीत जाने के बाद उसके गायन ने व्यवस्थित रूप धारण किया। संगीत पद्धतियाँ उत्तरी राजस्थान संगीत पद्धति दक्षिणी संगीत पद्धति इतिहास युद्ध, उत्सव और प्रार्थना या भजन के समय मानव गाने बजाने का उपयोग करता चला आया है। संसार में सभी जातियों में बाँसुरी इत्यादि फूँक के वाद्य (सुषिर), कुछ तार या ताँत के वाद्य (तत), कुछ चमड़े से मढ़े हुए वाद्य (अवनद्ध या आनद्ध), कुछ ठोंककर बजाने के वाद्य (घन) मिलते हैं। ऐसा जान पड़ता है कि भारत में भरत के समय तक गान को पहले केवल 'गीत' कहते थे। वाद्य में जहाँ गीत नहीं होता था, केवल दाड़ा, दिड़दिड़ जैसे शुष्क अक्षर होते थे, वहाँ उसे 'निर्गीत' या 'बहिर्गीत' कहते थे और नृत्त अथवा नृत्य की एक अलग कला थी। किंतु धीरे-धीरे गान, वाद्य और नृत्य तीनों का \"संगीत\" में अंतर्भाव हो गया - गीतं वाद्यं तथा नृत्यं त्रयं संगतमुच्यते। भारत से बाहर अन्य देशों में केवल गीत और वाद्य को संगीत में गिनते हैं; नृत्य को एक भिन्न कला मानते हैं। भारत में भी नृत्य को संगीत में केवल इसलिए गिन लिया गया कि उसके साथ बराबर गीत या वाद्य अथवा दोनों रहते हैं। ऊपर लिखा जा चुका है कि स्वर और लय की कला को संगीत कहते हैं। स्वर और लय गीत और वाद्य दोनों में मिलते हैं, किंतु नृत्य में लय मात्र है, स्वर नहीं। हम संगीत के अंतर्गत केवल गीत और वाद्य की चर्चा करेंगे, क्योंकि संगीत केवल इसी अर्थ में अन्य देशों में भी व्यवहृत होता है। व्युत्पत्ति संगीत का आदिम स्रोत प्राकृतिक ध्वनियाँ ही है। प्राक् संगीत-युग में मनुष्य के प्रकृति की ध्वनियों और उनकी विशिष्ट लय को समझने की कोशिश की। हर तरह की प्राकृतिक ध्वनियाँ संगीत का आधार नहीं हो सकतीं, अत: भाव पैदा करने वाली ध्वनियों को परखकर संगीत का आधार बनाने के साथ-साथ उन्हें लय में बाँधने का प्रयास किया गया होगा। प्रकृति की वे ध्वनियाँ जिन्होंने मनुष्य के मन-मस्तिष्क को स्पर्श कर उल्लसित किया, वही सभ्यता के विकास के साथ संगीत का साधन बनीं। हालांकि विचारकों के भिन्न-भिन्न मत हैं। दार्शनिकों ने नाद के चार भागों परा, पश्यन्ती, मध्यमा और वैखरी में से मध्यमा को संगीतोपयोगी स्वर का आधार माना। डार्विन ने कहा कि पशु रति के समय मधुर ध्वनि करते हैं। मनुष्य ने जब इस प्रकार की ध्वनि का अनुकरण आरम्भ किया तो संगीत का उद्भव हुआ।’’ कार्ल स्टम्फ ने भाषा उत्पत्ति के बाद मनुष्य द्वारा ध्वनि की एकतारता को स्वर की उत्पत्ति माना। उन्नीसवीं शदी के उत्तरार्द्ध में भारतेन्दु हरिश्चन्द्र ने कहा कि ‘‘संगीत की उत्पत्ति मानवीय संवेदना के साथ हुई।’’ उन्होंने संगीत को गाने, बजाने, बताने (केवल…"} {"instruction": "Given a n x n matrix where each element is 0 or 1, how can you find the area of the largest square sub-matrix composed of only ‘1s’?", "input": "", "output": "The simplest way to find the area of the largest square sub-matrix composed entirely of '1's is to use a dynamic programming approach. The algorithm works by iterating through all the elements in the matrix. At each cell, it checks if the current element is a '1' and if the other elements around it form a square sub-matrix of size at least one containing '1's, and if so it updates the answer accordingly. The code for finding the area of the largest square sub-matrix composed of only '1's may look like this: # n is the size of the matrix def maximum_square_submatrix(matrix, n): # answer stores the maximum size of the square ans = 0 # dp array of size n+1 x n+1 dp = [[0 for _ in range(n+1)] for _ in range(n+1)] for i in range(1, n+1): for j in range(1, n+1): # if the element is 1 if matrix[i-1][j-1] == 1: # find the minimum of the elements on its left, top and diagonal dp[i][j] = 1 + min(dp[i-1][j], dp[i][j-1], dp[i-1][j-1]) # update the answer ans = max(ans, dp[i][j]) # return the answer return ans * ans"} {"instruction": "Write a C++ function that generates a Fibonacci series of numbers up to an integer n.", "input": "n = 8", "output": "#include using namespace std; int Fibonacci (int n){ if (n<=0) return 0; if (n==1) return 1; else return Fibonacci(n-1)+Fibonacci(n-2); } int main() { int n; cin >> n; for (int i=0;i "} {"instruction": "Create a python program to filter a list of numbers to include only the prime numbers", "input": "[2, 3, 7, 11, 12, 15]", "output": "def isPrime(n): \n for i in range(2,n): \n if n % i == 0: \n return False\n return True\n\nnumbers = [2, 3, 7, 11, 12, 15] \nprimes = filter(isPrime, numbers)\nprint('Prime numbers are:') \nprint(list(primes))"} {"instruction": "Create a dictionary from a list of tuples, where the key is the first element of the tuple and the value is the second element of the tuple.", "input": "list_of_tuples = [('key1', 'val1'), ('key2', 'val2'), ('key3', 'val3')]", "output": "def list_to_dict(list_of_tuples): return dict(list_of_tuples)"} {"instruction": "Design a program in Python that will count the words in a sentence.", "input": "This is a sample sentence.", "output": "def word_count(sentence): words = sentence.split(' ') return len(words) print(word_count('This is a sample sentence.'))"} {"instruction": "Create an HTML form that contains a text box and a submit button.", "input": "", "output": "
      "} {"instruction": "Find the total number of elements in the following array.", "input": "my_array = [[1,2], 3, 4]", "output": "Total number of elements = 4"} {"instruction": "Create a Python function to sort a list of strings based on a given alphabetical order.", "input": "alphabet = 'bdhajfz', strings = ['bad', 'hfja', 'abd', 'zaj']", "output": "def sort_string_list(strings, alphabet): sorted_list = sorted(strings, key=lambda x:(alphabet.index(x[0]),x)) return sorted_list"} {"instruction": "Train an XGBoost model in Python to classify emails into two categories: 'spam' and 'not spam'.", "input": "Data set with 4,000 emails", "output": "import pandas as pd\nimport xgboost as xgb\n\n# Read in the data set\ndata = pd.read_csv('email.csv')\n\n# Split the data into features and labels\nX = data.drop(columns=['label'])\ny = data['label']\n\n# Train and test split\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Build the model \nxg_clf = xgb.XGBClassifier(objective=\"binary:logistic\", random_state=42)\nxg_clf.fit(X_train, y_train)\n\n# Make predictions with the test data\ny_preds = xg_clf.predict(X_test)\n\n# Evaluate the model \naccuracy = accuracy_score(y_test, y_preds)\n\nprint('The model accuracy is:', accuracy)"} {"instruction": "Write a JavaScript program that asks the user to enter a number and then prints the sum of the cube of the digits of the number.", "input": "", "output": "let number = Number(prompt(\"Enter a number:\")); let sum = 0; while (number > 0) { let last_digit = number % 10; sum = sum + last_digit**3; number = (number - last_digit)/10; } console.log(sum); # The output will be the sum of the cube of the digits"} {"text": "[DE Wikipedia] Munichion\n\nMunichion ( oder ) war ein Monat des attischen Kalenders. Er war der zehnte Monat des attischen Kalenders, im julianischen Kalender entspricht ihm etwa der März/April. Plutarch zufolge wurde der Name zu Ehren von Demetrios I. Poliorketes am Ende des 4. Jahrhunderts v. Chr. in Demetrion geändert. Da der Name Munichion jedoch weiter in Benutzung war, hat sich neue Name entweder nur kurz gehalten oder die Überlieferung Plutarchs war fehlerhaft. Während in der klassischen griechischen Literatur gewöhnlich die Schreibweise auftritt, findet sich in späterer Literatur und insbesondere in späteren Inschriften die Schreibweise . Der Name des Monats geht auf das Fest Munichia zurück, das am 16. Munichion zu Ehren der Artemis Munichia begangen wurde. Wegen der nur lokalen Bedeutung des Festes wurde der Monatsname nur im attischen Kalender genutzt und ist in keinem anderen ionischen Kalender zu finden. Literatur Anmerkungen Monat des griechischen Kalenders Athen in der Antike"} {"instruction": "Create a Java class to find all substrings of a given string.", "input": "String str = \"Hello World\"", "output": "public class SubstringFinder { public static List findSubstrings(String str) { List substrings = new ArrayList<>(); for (int i = 0; i < str.length(); i++) { for (int j = i + 1; j <= str.length(); j++) { String substr = str.substring(i, j); substrings.add(substr); } } return substrings; } } String str = \"Hello World\"; SubstringFinder.findSubstrings(str);"} {"instruction": "Optimize an existing Python script to run as efficiently as possible.", "input": "def spam(divideBy):\n return 42 / divideBy\n\nprint(spam(2))\nprint(spam(12))\nprint(spam(0))", "output": "def spam(divideBy):\n try:\n return 42 / divideBy\n except ZeroDivisionError:\n print('Error: Invalid argument.')\n\nprint(spam(2))\nprint(spam(12))\nprint(spam(0))"} {"instruction": "Develop a function in Python that takes an integer as an argument and prints the factorial of the number.", "input": "", "output": "def factorial(n): \n \"\"\"Computes the factorial of a number\n\n Parameters\n ----------\n n : int\n The number\n\n Returns\n -------\n factorial : int\n The factorial of the number\n \"\"\"\n if n < 0: \n return 0\n elif n == 0 or n == 1: \n return 1\n else: \n factorial = 1\n for i in range(2,n + 1): \n factorial = factorial * i \n return factorial"} {"text": "[CS Wikipedia] Pavillon des Arts\n\nPavillon des Arts (Pavilon umění) byla galerie umění v Paříži. Nacházela se v 1. obvodu v ulici Rue Rambuteau. Historie Pavilon byl založen v roce 1983 a uzavřen roku 2006. Výstavy Galerie se zaměřovala na umění ve všech jeho formách, různých kultur a různých období: fotografie, malířství, sochařství, oděvy, nábytek, medaile aj. Reference Galerie a muzea umění v Paříži Muzea založená roku 1983 Organizace zaniklé roku 2006 1. obvod (Paříž) Uzavřená muzea v Paříži"} {"instruction": "Create a basic Python Flask application that takes a number as input from a form and displays its increment by 1.", "input": "Not applicable", "output": "from flask import Flask, request, render_template\n\napp = Flask(__name__)\n\n@app.route('/', methods=['GET', 'POST'])\ndef index():\n if request.method == 'POST':\n number = int(request.form['number'])\n incremented_number = number + 1\n return render_template('index.html', incremented_number=incremented_number)\n else:\n return render_template('index.html')\n\nif __name__ == '__main__':\n app.run(debug=True)\n\n\n\n\n Python Flask Example\n\n\n\t
      \n\t\t\n\t\t\n\t
      \n\t\n\t{% if incremented_number %}\n\t\t

      {{ incremented_number }}

      \n\t{% endif %}\n\n"} {"instruction": "Create a Java function to calculate the area of a triangle from its three vertices.", "input": "A=(2,3), B=(3,4), C=(4,5).", "output": "public static double getTriangleArea(Point A, Point B, Point C) { double area = 0.5 * (A.x * B.y + B.x * C.y + C.x * A.y - B.x * A.y - C.x * B.y - A.x * C.y); return area; }"} {"instruction": "Write an R script to compute the sum of all the elements of a given list.", "input": "list = c(1, 2, 3, 4, 5)", "output": "sum <- 0 for(i in list){ sum <- sum + i } print(sum) # Output: 15"} {"text": "[EN Wikipedia] Nothing's Real but Love\n\n\"Nothing's Real but Love\" is the debut single by English singer-songwriter Rebecca Ferguson. The song serves as the lead single from the debut studio album, Heaven, and was released in the United Kingdom on 20 November 2011, having originally been scheduled for release the following week. The release was brought forward to coincide with the first official performance of the song on the eighth series of The X Factor. The song was written by Ferguson with Eg White, who also produced it. \"Nothing's Real but Love\" is a mid-tempo soul and pop song. The song also features on Ferguson's debut EP, iTunes Festival: London 2012. \"Nothing's Real but Love\" received positive reviews from critics, praising the gentle acoustics and the lyrics. On 26 November the song debuted at number ten on the UK Singles Chart, The song made the top ten in Scottish Singles Chart as well, and charted at 23 in the Irish Singles Chart. The song also received international success, with the song charting in the top twenty in Italian and Australian singles chart. \"Nothing's Real but Love\" was certified Gold in Australia for shifting 35,000 copies. The song was used in a television advertisement campaign for Nescafé Gold Blend coffee, and was covered by Karise Eden of The Voice Australia. Ferguson has performed the track live a few times, including on The Today Show, where she made her U.S. television debut. Background The single was scheduled to be released on 27 November 2011, but the release date was brought forward to 20 November 2011 to coincide with her return to The X Factor, where she performed the track live on television for the first time alongside a performance of an album track on The Xtra Factor. In terms of the actual meaning behind the song, Ferguson told Blues & Soul: \"It's basically talking about how we get so concerned about stuff like money and cars that it overtakes our lives and we forget what's really important is FAMILY. I mean, I actually remember the day I wrote it with Eg White. Something had upset me, and I was like 'You know, people just forget what's important'... And then I literally just said 'It's not your money, it's not your car - it's LOVE!' - and straightaway we were both like 'Oh, we've got a SONG here!'!... And, while I know it sounds cheesy, I genuinely do think those sentiments are TRUE! Plus, I was standing in line and wondering why it don't move\" Composition According to the sheet music published by EMI Music Publishing, \"Nothing's Real but Love\" is a soul and pop song set in common time with 72 beats per minute. The song is written in the key of A Major, with the vocal range from the note of A3 to F#5. Nothing's Real but Love contains the instruments of guitars and a piano. Critical reception \"Nothing's Real But Love\" received positive…"} {"instruction": "Design a program in Python to separate a list of numbers into even and odd numbers.", "input": "[2, 3, 5, 6, 8, 9, 10]", "output": "def separate_numbers(list):\n even_numbers = []\n odd_numbers = []\n for num in list:\n if num % 2 == 0:\n even_numbers.append(num)\n else:\n odd_numbers.append(num)\n return even_numbers, odd_numbers\n\nlist = [2, 3, 5, 6, 8, 9, 10]\neven_numbers, odd_numbers = separate_numbers(list)\nprint(\"Even numbers in the list:\", even_numbers)\nprint(\"Odd numbers in the list:\", odd_numbers)"} {"instruction": "Generate a python program that takes input as a string and prints out each word in the string in reverse order.", "input": "This is an example.", "output": "# Take input\ntext = input('Enter a string: ')\n\n# Split string into words\nwords = text.split(' ') \n\n# Reverse order\nwords.reverse() \n\n# Print\nfor word in words:\n print(word)"} {"instruction": "Write a Python program to calculate a value from a given sequence of numbers. The program should calculate the sum of the sequence elements and return the sum of the squares of the odd numbers from the sequence.", "input": "sequence = [2, 4, 5, 6, 7]", "output": "def calc_sum(sequence):\n sum = 0\n for num in sequence:\n sum += num\n return sum\n\ndef calc_sum_squares(sequence):\n sum = 0\n for num in sequence:\n if num % 2 == 1:\n sum += num * num\n return sum\n\nsequence = [2, 4, 5, 6, 7]\ntotal_sum = calc_sum(sequence)\nsum_squares = calc_sum_squares(sequence)\n\nprint(\"Total sum:\", total_sum)\nprint(\"Sum of squares of odd numbers:\", sum_squares)"} {"instruction": "Use the Python built-in function filter() to find all numbers divisible by 5.", "input": "mylist = [10, 21, 32, 45, 56, 77]", "output": "list(filter(lambda x: (x % 5 == 0), mylist))"} {"instruction": "Write a Python program to filter a list of strings and only return strings with two or more words.", "input": "my_list = [\"hello\", \"world\", \"how\", \"are\", \"you\", \"I am fine\"]", "output": "my_list = [\"hello world\", \"how are you\", \"I am fine\"]\n\nfiltered_list = [i for i in my_list if len(i.split())>1]\n\nprint(filtered_list)\n\n# Output: ['hello world', 'how are you', 'I am fine']"} {"instruction": "Develop a program to perform edit distance calculation on two strings in Python.", "input": "", "output": "def edit_distance(str1, str2):\n matrix = []\n for i in range(len(str1) + 1):\n matrix.append([0] * (len(str2) + 1))\n \n for i in range(len(str1) + 1):\n matrix[i][0] = i\n for j in range(len(str2) + 1):\n matrix[0][j] = j\n \n for i in range(1, len(str1) + 1):\n for j in range(1, len(str2) + 1):\n if str1[i-1] == str2[j-1]:\n matrix[i][j] = matrix[i-1][j-1]\n else:\n matrix[i][j] = 1 + min(matrix[i][j-1], matrix[i-1][j], matrix[i-1][j-1])\n \n return matrix[len(str1)][len(str2)]"} {"instruction": "Create a C program to print the given matrix in the following elements", "input": "int arr[3][3] = {1,2,3,4,5,6,7,8,9};", "output": "#include int main() { int arr[3][3] = {1,2,3,4,5,6,7,8,9}; int i,j; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf(\"%d \",arr[i][j]); printf(\"\\n\"); } return 0; }"} {"instruction": "Write a Python program to determine the sum of the elements of an array, after applying a given function to each array element.", "input": "def func(x):\n return x * x\n\narr = [1, 2, 3, 4]", "output": "def element_wise_sum(func, arr):\n sum = 0 \n for elem in arr:\n sum += func(elem)\n return sum\n\nsum = element_wise_sum(func, arr)"} {"instruction": "Given a 2D array, replace every element with the greatest element on its row.", "input": "[[6, 2, 9], [3, 8, 7], [1, 4, 5]]", "output": "def greatest_element(arr): # loop through elements of 1D array for i in range(len(arr)): max_element = arr[i][0] # loop through elements of 2D array for j in range(len(arr[i])): if arr[i][j] > max_element: max_element = arr[i][j] # replace every element with max_element for j in range(len(arr[i])): arr[i][j] = max_element return arr"} {"instruction": "Create a random number generator in Java that produces a random integer between 1 and 10.", "input": "", "output": "public class RandomNumberGenerator { public static int generateNumber() { Random rand = new Random(); return rand.nextInt(10) + 1; } }"} {"instruction": "Generate a loop to find the largest sub-array in a given array with contiguous elements and its sum.", "input": "Array: [-2, 6, -3, 5, -2, 3, 4, -2]", "output": "\"\"\" Generate a loop to find the largest sub-array in a given array with contiguous elements and its sum. \"\"\" def largest_subarray_sum(array): best_sum = 0 current_sum = 0 current_start_index = 0 best_start_index = -1 best_end_index = -1 for i in range(len(array)): current_sum += array[i] if current_sum > best_sum: best_sum = current_sum best_start_index = current_start_index best_end_index = i if current_sum < 0: current_sum = 0 current_start_index = i + 1 return (best_sum, best_start_index, best_end_index) if __name__ == '__main__': array = [-2, 6, -3, 5, -2, 3, 4, -2] print(largest_subarray_sum(array))"} {"instruction": "Design a function in Python to test if the given number is a prime or not.", "input": "N = 13", "output": "def is_prime(n):\n if n <= 1:\n return False\n\n for i in range(2, n):\n if n % i == 0:\n return False\n\n return True\n\nis_prime(13) # True"} {"instruction": "Generate a python code to classify an array of numbers into a set of categories", "input": "Given an array of numbers [3, 8, 15, 7, 20], classify the array into two categories - even and odd.", "output": "def even_odd_classification(arr):\n evens = []\n odds = []\n\n for i in arr:\n if i % 2 == 0:\n evens.append(i)\n else:\n odds.append(i)\n \n return evens, odds"} {"text": "[CS Wikipedia] Houbaření\n\nHoubaření je záliba, která spočívá v chození po lese a hledání a sbírání hub. Někteří houbaři pěstují houby i doma. Češi jsou považováni za nejvášnivější houbaře na světě, alespoň jednou ročně vyrazí na houby přes sedmdesát procent obyvatel České republiky, což nemá ve světě obdoby a což z Česka dělá tzv. houbařskou velmoc. Podle České zemědělské univerzity připadalo v roce 2006 na jednu českou domácnost 8,2 kg nasbíraných hub. Kromě Čechů je houbaření široce rozšířeno v zemích Evropy ležící severovýchodně od České republiky (Rusko, Polsko, Slovensko, Finsko). V ostatních zemích Evropy není tato záliba příliš rozšířená a praktikují je pouze malé zájmové spolky a skupiny. V západní Evropě se spíše jedí jen pěstované žampióny. Houbaření je rozšířenější v některých oblastech Skandinávie. Mimo Evropu je sběr a pěstování hub rozšířeno zejména v jihovýchodní Asii. Vybrané houby na území Česka Jedlé houby bedla vysoká hlíva ústřičná holubinka mandlová hřib dubový hřib hnědý hřib koloděj hřib kovář hřib smrkový hřib uťatovýtrusý hřib žlutomasý klouzek sličný kozák březový kozák habrový křemenáč březový křemenáč dubový křemenáč osikový lakovka ametystová liška obecná (houba) muchomůrka růžovka pýchavka obecná ryzec pravý ryzec syrovinka suchohřib plstnatý václavka smrková Nejedlé houby holubinka brunátná hřib plavý podhřib žlučový Jedovaté houby holubinka jízlivá hřib satan třepenitka svazčitá Smrtelně jedovaté houby muchomůrka bílá muchomůrka jarní muchomůrka jízlivá muchomůrka zelená čepičatka jehličnanová pavučinec plyšový vláknice začervenalá závojenka olovová Psychotropní houby lysohlávka česká muchomůrka červená Kvalita hub V houbách se hromadí těžké kovy a jiné látky. Olovem je nejvíce zamořeno okolí Příbrami (Brdy). V houbách se také hromadí radioaktivní izotop cesia 137, ten ale v Česku na rozdíl od těžkých kovů žádné riziko nepředstavuje. Odkazy Reference Související články Otrava houbami Ochrana hub v České republice Houby Houbeles Dostupné online BEZDĚK, Jan, 1858-1915: Houby jedlé a jim podobné jedovaté sv. 1. Hranice: Jan Bezděk, 1901. 225 s. Zdigitalizováno v rámci služby Elektronické knihy na objednávku (EOD) Moravskou zemskou knihovnou. Dostupné online Externí odkazy Česká mykologická společnost Domov amatérských mykologů Server Nahouby.cz Mykologie Záliby ja:キノコ#キノコ狩り"} {"instruction": "Construct a Python program to predict whether a given patient has cancer or not.", "input": "Features of the patient: age = 25, sex = male, BMI = 25, number of children = 0", "output": "import numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import RandomForestClassifier\n\n# Get the data\ndata = pd.read_csv('data.csv')\n\n# Create the features and target arrays\nX = data.drop(columns=['has_cancer'])\ny = data['has_cancer']\n\n# Split into training and test sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.33)\n\n# Train the model\nmodel = RandomForestClassifier(n_estimators=100)\nmodel.fit(X_train, y_train)\n\n# Make predictions\nprediction = model.predict([[25, 'male', 25, 0]])\n\nif prediction[0] == 1:\n print('The patient has cancer.')\nelse:\n print('The patient does not have cancer.')"} {"instruction": "Design a structure in Python to store data related to airport schedules.", "input": "", "output": "class FlightSchedule:\n def __init__(self):\n self.airport_info ={}\n \n def add_flight(self,flight_name,source,destination,departure_time,arrival_time):\n self.airport_info[flight_name] = {\n 'source': source,\n 'destination': destination,\n 'departure_time': departure_time,\n 'arrival_time': arrival_time\n }\n \n def get_flight_info(self,flight_name):\n if flight_name in self.airport_info:\n return self.airport_info[flight_name]\n else:\n return 'Flight does not exist.'"} {"instruction": "Create a webpage with a button to allow the user to log in.", "input": "[noinput]", "output": " Login Page
      "} {"instruction": "Using Java, write a program to determine if a given word is a palindrome.", "input": "word = \"racecar\"", "output": "boolean isPalindrome = true; for (int i = 0; i < word.length()/2; i++ ){ if (word.charAt(i) != word.charAt(word.length()-i-1)){ isPalindrome = false; break; } }"} {"text": "[HI Wikipedia] हिन्दी संगठन\n\nहिन्दी संगठन या 'हिन्दी स्पीकिंग यूनियन' मॉरीशस की एक प्रमुख हिन्दीसेवी संस्था है। इसकी स्थापना संसद के विधेयक संख्या ३३ के तहत १२ दिसम्बर १९९४ को हुई थी। यह संस्था कला एवं संस्कृति मंत्रालय के सहयोग से अपनी गतिविधियाँ आयोजित करती है। इसका कार्यालय आर्किड टॉवर, पोर्ट लूई में है। हिन्दी विद्वान, हिन्दी संस्थाएँ तथा हिन्दी साहित्यकार इसके सदस्य हैं। 'हिन्दी ज्ञान, हमारा मान' - इसका ध्येयवाक्य है। उद्देश्य हिन्दी संगठन के प्रमुख उद्देश्य हैं- हिन्दी के बोलचाल स्वरूप तथा हिन्दी साहित्य के सृजन को प्रोत्साहित करना राष्ट्रीय एवं अतरराष्ट्रीय स्तर पर आदान-प्रदान कार्यक्रमों द्वारा संस्कृति का प्रचार करना हिन्दी संगठन का मानना है कि हिन्दी पूर्वजों से प्राप्त विरासत में प्राप्त एक निधि है जिसकी न केवल सुरक्षा करनी है बल्कि उसका प्रचार-प्रसार भी करना है। मारीशस की संस्कृति और अस्मिता हिन्दी के माध्यम से ही फल-फूल सकती है। इन्हें भी देखें हिन्दी प्रचारिणी सभा, मॉरीशस मारीशस के हिन्दी विद्वान बाहरी कड़ियाँ हिन्दी संगठन (Hindi Speaking Union) हिन्दीसेवी संस्थाएँ"} {"instruction": "Create a Python script to calculate the sum of the numbers in a list given as input.", "input": "list = [1, 5, 10, 30]", "output": "def sum_list(list):\n total = 0\n for i in list:\n total += i\n return total\n\nprint sum_list(list)"} {"instruction": "Generate a function for calculating the average of a list of numbers in Python.", "input": "Not applicable", "output": "def avg_list(lst):\n sum = 0\n count = 0\n for i in lst:\n sum += i\n count += 1\n avg = sum / count\n return avg"} {"instruction": "Identify the correct data type for the value \"37.45\".", "input": "", "output": "float"} {"text": "[CS Wikipedia] Lísek (rozcestník)\n\nNázev Lísek má více míst: Lísek, obec v okrese Žďár nad Sázavou Lísek (Postupice), část obce Postupice v okrese Benešov Lísek (hrad), zřícenina Lísek (Hudlice), osada ve východní části obce Hudlice v okrese Beroun, na západním úbočí kopce Lísek Lísek (483 m), kopec východně od Hudlic, s vrcholem v k. ú. Stradonice u Nižboru obce Nižbor v okrese Beroun Lísek (760 m), kopec severovýchodně od Počátek Lísek (přítok Třešťského potoka), potok u obce Hodice (okres Jihlava), přítok Třešťského potoka Na Lísku, místní pojmenování a stejnojmenná tramvajová zastávka v Praze na rozhraní Michle a Krče na pozdějším Budějovickém náměstí Lísek (usedlost), zaniklá usedlost v Praze-Bohnicích"} {"instruction": "Napiš Python funkci pro faktoriál.", "input": "", "output": "def factorial(n):\n if n < 0:\n raise ValueError('n >= 0')\n r = 1\n for i in range(2, n+1):\n r *= i\n return r"} {"instruction": "Given a list of numbers, find the number which appears the most times in the list.", "input": "[2, 3, 4, 2, 3, 2, 3, 2]", "output": "The number which appears the most times in the list is 2, which appears 4 times."} {"text": "[CS Wikipedia] Všeobecná deklarace lidských práv\n\nVšeobecná deklarace lidských práv je nezávazný dokument, obsahující nejznámější katalog lidských práv. Ve třiceti článcích deklarace jsou vyjmenována základní občanská, politická, kulturní, ekonomická a sociální práva platná pro všechny obyvatele na Zemi. Podle některých teoretiků nabylo toto prohlášení závaznosti jako právní obyčej. V části VII závěrečného aktu, kapitoly I Deklarace, jimiž se řídí vztahy mezi zúčastněnými státy Helsinské konference, se zúčastněné státy zavázaly, že kromě jiného budou v oblasti lidských práv a základních svobod postupovat též v souladu se Všeobecnou deklarací lidských práv. Podle čl. 56 v návaznosti na čl. 55 Charty OSN si musí členské země OSN plnit i závazky vyplývající ze Všeobecné deklarace lidských práv. Všeobecná deklarace lidských práv byla schválena Valným shromážděním Organizace spojených národů dne 10. prosince 1948. Pro přijetí rezoluce hlasovalo z tehdejších 58 členů OSN 48 zemí: Afghánistán, Argentina, Barma, Belgie, Bolívie, Brazílie, Čína, Dánsko, Dominikánská republika, Ekvádor, Egypt, Etiopie, Filipíny, Francie, Guatemala, Haiti, Island, Indie, Irák, Írán, Chile, Kanada, Kolumbie, Kostarika, Kuba, Libanon, Libérie, Lucembursko, Mexiko, Nikaragua, Nizozemsko, Nový Zéland, Norsko, Pákistán, Panama, Paraguay, Peru, Rakousko, Řecko, Salvador, Siam, Spojené království, Spojené státy americké, Sýrie, Švédsko, Turecko, Uruguay a Venezuela. Hlasování se zdrželi: Bělorusko, Československo, Jihoafrická unie, Jugoslávie, Polsko, Saúdská Arábie, Sovětský svaz a Ukrajina. Závazné dokumenty o lidských právech jako jsou regionální evropská Úmluva o ochraně lidských práv a základních svobod, vyhlášená pod č. 209/1992 Sb., Evropská sociální charta, vyhlášená pod č. 14/2000 Sb. m. s., nebo celosvětové Mezinárodní pakt o občanských a politických právech a Mezinárodní pakt o hospodářských, sociálních a kulturních právech, vyhlášené pod č. 120/1976 Sb., v povědomí veřejnosti tak známé nejsou. 10. prosinec je na základě hlasování Valného shromáždění OSN od roku 1950 slaven jako Den lidských práv. V rámci islámské kultury představuje určitou protiváhu proti Všeobecné deklaraci lidských práv takzvaná Káhirská deklarace lidských práv v islámu. Odkazy Reference Související články Den lidských práv Lidská práva Úmluva o ochraně lidských práv a základních svobod Externí odkazy Český text Všeobecné deklarace lidských práv (pdf) Anglický text Všeobecné deklarace lidských práv Oficiální překlady Všeobecné deklarace lidských práv (Anglicky) Dějiny lidských práv Dokumenty o lidských právech"} {"instruction": "Write a JavaScript function to convert an array to a string separated by key-pair value separator such as \"|\".", "input": "const array1 = [1,2,3,4,5];", "output": "function arrayToString(arr, separator=\"|\") { return arr.join(separator); } arrayToString(array1); // returns \"1|2|3|4|5\""} {"instruction": "Create a Python class for a particle whose properties include mass, velocity and temperature.", "input": "", "output": "class Particle():\n def __init__(self, mass, velocity, temperature):\n self.mass = mass\n self.velocity = velocity\n self.temperature = temperature"} {"instruction": "Develop a greedy algorithm in Python to complete a given optimization task.", "input": "", "output": "def greedy_solution(arr):\n arr.sort()\n cur_max = arr[0]\n result = [cur_max]\n for i in range(1, len(arr)):\n if arr[i] > cur_max + 1:\n cur_max = arr[i]\n result.append(cur_max)\n return result"} {"text": "[DE Wikipedia] Galatas\n\nGalatas (griechisch Γαλατάς) bezeichnet mehrere Orte in Griechenland Galatas (Ziros) Dorf in der Gemeinde Ziros, Region Epirus Galatas (Nafpaktia) Dorf in der Gemeinde Nafpaktia, Region Westgriechenland Galatas (Gortynia) Dorf in der Gemeinde Gortynia, Region Peloponnes Galatas (Nemea) Dorf in der Gemeinde Nemea, Region Peloponnes Galatas (Trizinia-Methana) Dorf in der Gemeinde Trizinia-Methana, Region Attika Galatas (Minoa Pediada) Dorf in der Gemeinde Minoa Pediada, Region Kreta Galatas (Chania) Dorf in der Gemeinde Chania, Region Kreta"} {"text": "[HI Wikipedia] न्यू इंग्लैंड\n\nन्यू इंग्लैंड () संयुक्त राज्य अमेरिका का एक भौगोलिक क्षेत्र है जिसमें पूर्वोत्तर संयुक्त राज्य के छह राज्य शामिल हैं: मेन, वरमॉण्ट, न्यू हैम्पशायर, मैसाचुसेट्स, रोड आइलैंड और कनेक्टिकट। यह न्यूयॉर्क से पश्चिम और दक्षिण में सीमा रखता है और कनाडाई प्रान्तों न्यू ब्रंसविक और क्यूबेक से क्रमशः उत्तर-पूर्व और उत्तर में। मैसाचुसेट्स की राजधानी बोस्टन, न्यू इंग्लैंड का सबसे बड़ा शहर है। 1620 में पहले अंग्रेज लोग मैसाचुसेट्स में बसना शुरू हुए थे। 18वीं शताब्दी के अंत में, न्यू इंग्लैंड कॉलोनियों के राजनीतिक नेताओं ने नए कर लागू करने के ब्रिटेन के प्रयासों के प्रति प्रतिरोध शुरू किया। इस टकराव ने 1775 में अमेरिकी क्रांतिकारी युद्ध की पहली लड़ाई और वसंत 1776 में इस क्षेत्र से ब्रिटिश अधिकारियों के निष्कासन का नेतृत्व किया। संयुक्त राज्य अमेरिका में गुलामी को खत्म करने के लिए इस क्षेत्र ने आंदोलन में प्रमुख भूमिका निभाई। यह अमेरिका का पहला क्षेत्र भी था जिसमें औद्योगिक क्रांति का बदलाव हुआ। न्यू इंग्लैंड की भौगोलिक भूगोल विविध है। दक्षिणपूर्व न्यू इंग्लैंड संकीर्ण तटीय मैदान है, जबकि पश्चिमी और उत्तरी क्षेत्रों में एपलाशियन पर्वतमाला के उत्तरी छोर के चोटियों का प्रभुत्व है। 2010 में, न्यू इंग्लैंड की आबादी 1,44,44,865 थी। मैसाचुसेट्स सबसे अधिक आबादी वाला राज्य है, जबकि वरमोंट कम से कम आबादी वाले राज्य है। श्वेत अमेरिकी कुल जनसंख्या के 83.4% हैं। अंग्रेज़ी घर पर बोली जाने वाली सबसे आम भाषा है। 81.3% निवासी घर पर केवल अंग्रेज़ी ही बोलते हैं। 2015 तक, न्यू इंग्लैंड की जीडीपी 953.9 अरब डॉलर थी। सन्दर्भ इन्हें भी देखें येल विश्वविद्यालय संयुक्त राज्य अमेरिका के राज्य"} {"instruction": "Write an SQL query to get the number of customers per country", "input": "Table Name: Customers Columns: Name, Country", "output": "SELECT Country, COUNT(*) AS NumberOfCustomers FROM Customers GROUP BY Country;"} {"instruction": "Given a list of numbers, remove all negative numbers and sort the remaining numbers in ascending order.", "input": "numbers = [-5, -1, 2, 0, 4, 5, 9]", "output": "def remove_negatives_and_sort(numbers): # filter out negative numbers non_negatives = list(filter(lambda x: x >= 0, numbers)) # sort the non-negative numbers non_negatives.sort() return non_negatives print(remove_negatives_and_sort([-5, -1, 2, 0, 4, 5, 9])) # [0, 2, 4, 5, 9]"} {"instruction": "Write a function that produces an array of Fibonacci numbers with n numbers.", "input": "", "output": "def fibonacci(n): if n == 0: return [] elif n == 1: return [0] elif n == 2: return [0, 1] elif n > 2: fib_nums = [0, 1] for i in range(2, n): fib_nums.append(fib_nums[i-1] + fib_nums[i-2]) return fib_nums"} {"instruction": "Create a Python program to sort a given list of numbers within a range and return the sorted list.", "input": "arr = [7, 0, 5, 6, 3, 9]\nstart = 0\nend = 9", "output": "def sort_in_range(arr, start, end):\n # create a count array to store the count of each number \n count = [0 for i in range(start, end+1)]\n output = []\n # count the occurance of each number in the array\n for num in arr:\n count[num] += 1\n # append the number to the output array for each occurance\n for i in range(start, end+1):\n for c in range(0, count[i]):\n output.append(i)\n return output"} {"instruction": "Generate a function to multiply two integers.", "input": "", "output": "def multiply_ints(x, y): return x * y"} {"instruction": "Sort a list of user objects by their age", "input": "users = [{'name': 'John', 'age': 10}, {'name': 'Peter', 'age': 20}, {'name': 'Chris', 'age': 15}]", "output": "sorted_users = sorted(users, key=lambda k: k['age'])"} {"instruction": "Explain in detail what is the significance of a local variable in Python", "input": "", "output": "A local variable in Python is a variable that is declared within a function or a class. It is a variable that only exists in the context of that function or class, and cannot be accessed outside the function or class in which it is declared. Local variables are also referred to as \"lexical\" or \"automatic\" variables because they are automatically scoped to the function or class in which they are declared. They are different from global variables, which are available to the entire program. Local variables are helpful in limiting the scope of a variable, which means that the variable is only accessible in the function or class in which it is declared. This can help make code more efficient, clear, and secure."} {"text": "[HI Wikipedia] शूमाँ घोषणा-पत्र\n\nफ्रांस के विदेशमंत्री रॉबर्ट शूमाँ ने कोयला और स्टीम उत्पादन में सहयोग के लिए जर्मनी और फ्रांस के लिए एक योजना घोषित की। कुछ अन्य देशों को भी इसमें शामिल होने का न्यौता दिया गया। शूमाँ योजना इस विचार पर आधारित थी कि शांति के लिए यूरोपीय एकता बहुत ज़रूरी है। रॉबर्ट शूमाँ ने कहा कि उत्पादन में सहयोग से फ्रांस और जर्मनी के बीच सहयोग और दोस्ती की नई शुरूआत होगी और दोनों युद्ध से परे हटकर शांति के बारे में सोचना शुरू करेंगे। यूरोप का इतिहास"} {"instruction": "Write a Python class with methods for printing strings and computing the length of a string.", "input": "", "output": "class MyString:\n def __init__(self):\n self.string = \"\"\n \n def set_string(self, string):\n self.string = string\n \n def get_string(self):\n return self.string\n \n def print_string(self):\n print(self.string)\n \n def get_length(self):\n string_length = len(self.string)\n return string_length"} {"text": "[CS Wikipedia] Celebration (píseň, Kool & the Gang)\n\n„Celebration“ je post-disco/funk/popový singl z roku 1980 od skupiny Kool & the Gang. Skladba pochází z alba Celebrate!. 7. února 1981 se píseň se umístila v Hot 100 na #1 příčce. Dále si vydobyla 1. místo i v jiných Billboard hitparádách, respektive v R&B a Dance žebříčkách. Produkce Skladatel: Donna Johnson, Claydes Charles Smith, Earl Eugene Toon Jr., James „J.T.“ Taylor, Ronald Nathan Bell, George Melvin Brown, Dennis Ronald Thomas, Eumir Deodato, Robert Spike Mickens, Robert Earl Bell Vydavatelství: Mercury Records Trvání: 3:42 (7\" vinyl verze) Datum vydání: říjen 1980 Hitparáda Cover verze Jump5 (pro album Kim Possible) Kylie Minogue Dragon Americké písně Singly z roku 1980 Písně v angličtině"} {"instruction": "Create a Python function to encode an input string using the Caesar Cipher", "input": "Not applicable", "output": "def caesar_cipher(input_string, shift):\n alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n output_string = ''\n\n for char in input_string:\n if char in alphabet:\n char_index = alphabet.find(char)\n new_char_index = char_index + shift\n output_string += alphabet[new_char_index % len(alphabet)]\n else:\n output_string += char\n\n return output_string"} {"text": "[DE Wikipedia] Innokenti Dmitrijewitsch Meltschakow\n\nInnokenti Dmitrijewitsch Meltschakow (; * in Irkutsk; † unbekannt) war ein russischer Architekt und Hochschullehrer. Leben Meltschakow trat 1927 in I. L. Kopylows Kunststudio in Irkutsk ein und verließ es 1930 mit dem Titel Künstler-Techniker. Anschließend ging er nach Leningrad und studierte Architektur an der Hochschule für Angewandte Kunst. Während des Studiums arbeitete er an Projekten zur Gestaltung von Leningrad mit und hörte nicht auf zu zeichnen. Auf der Ausstellung junger Künstler stellte er seine Architekturzeichnungen und Landschaften aus, die seine Meisterschaft zeigten. Mit der Diplomarbeit Architektenhaus in Leningrad schloss er das Studium ab und wurde dann auf Antrag der Institutsleitung von der Architektur-Akademie zur Aspirantur angenommen. Er beteiligte sich bereits an Wettbewerben und schlug 1937 ein Projekt für ein Denkmal für die Helden der Stratosphäre vor, das von der Akademie prämiiert wurde. Auch projektierte er die Moskauer Metro-Station Ismailowskaja. 1838 wurde Meltschakow in die USA geschickt zur Mitarbeit am sowjetischen Pavillon der 1939 New York World’s Fair. Zusammen mit J. J. Lansere und A. M. Solowjew gestaltete er das Pavilloninnere zur Darstellung der Leistungen der Volkswirtschaft der Sowjetunion. Auch fertigte er Zeichnungen der Pavillons von Frankreich, Japan, Belgien und anderen Ländern an, die er 1941 im Moskauer Haus der Architektur ausstellte. In den ersten Tagen des Deutsch-Sowjetischen Krieges wurde Meltschakow mit der Tarnung der Moskauer Produktionsbetriebe und dem Schutz der Industriezonen beauftragt. 1943 begann Meltschakow auf Einladung I. W. Scholtowskis seine Lehrtätigkeit am Moskauer Architektur-Institut. Ab 1943 entwarf Meltschakow Denkmäler und beteiligte sich an Allunionswettbewerben. Insbesondere gestaltete er zusammen mit S. S. Nanuschjan und den Bildhauern P. Waiwada, B. Petrauskas, B. Pundzius, R. Jakimavičius, K. Jaroschtschunas und K. Bogdanas unter der Leitung von J. Mikėnas das Ehrenmal der 1200 Gardisten der 11. Gardearmee für die Gefallenen des Sturms auf Königsberg im späteren Kaliningrad am Gwardeiski Prospekt. Nach dem Gewinn des Wettbewerbs reiste er nach Königsberg zum Studium der Örtlichkeiten. Am 30. September 1945 wurde mit dem Bau der Anlage begonnen, und am 9. Mai 1960 wurde die Ewige Flamme entzündet. Zusammen mit Nikolai Dschemsowitsch Kolli schuf Meltschakow das Kalinin-Grabmal an der Moskauer Kremlmauer sowie ein Denkmal für General Brussilow. 1948 projektierte Meltschakow zusammen mit dem Künstler Roschdestwenski den Pavillon der UdSSR auf dem II. Weltkongress der Internationalen Demokratischen Frauenföderation in Budapest. In den 1950er Jahren beteiligte er sich am Bau der Triumphbögen in Kiew und Perejaslaw-Chmelnyzkyj zur Feier des 300. Jahrestags der Vereinigung…"} {"instruction": "Given a list of strings, write a program to return all strings with first character as 'c'.", "input": "list_strings = [\"cat\", \"dog\", \"cow\", \"duck\"]", "output": "required_strings = [] for string in list_strings: if string[0] == 'c': required_strings.append(string) # required_strings = [\"cat\", \"cow\"]"} {"instruction": "Implement quick sort in Java.", "input": "", "output": "public static void quickSort(int[] arr, int low, int high) { if (arr == null || arr.length == 0) return; if (low >= high) return; // pick the pivot int middle = low + (high - low) / 2; int pivot = arr[middle]; // make left < pivot and right > pivot int i = low, j = high; while (i <= j) { while (arr[i] < pivot) { i++; } while (arr[j] > pivot) { j--; } if (i <= j) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; i++; j--; } } // recursively sort two sub parts if (low < j) quickSort(arr, low, j); if (high > i) quickSort(arr, i, high); }"} {"instruction": "Write a function in Python to check if an element is present in an array.", "input": "arr = [1, 2, 3, 5, 7]\nelement = 4", "output": "arr = [1, 2, 3, 5, 7]\nelement = 4\n\ndef contains(arr, element):\n for e in arr:\n if e == element:\n return True\n return False\n\nresult = contains(arr, element)\nprint(result)"} {"instruction": "Write a Python program to calculate the area of a triangle given 3 sides.", "input": "side1=5, side2=8, side3=7", "output": "def area(side1, side2, side3):\n # calculate the semi-perimeter\n s = (side1 + side2 + side3)/2\n # calculate the area\n area = (s*(s-side1)*(s-side2)*(s-side3)) ** 0.5\n return area"} {"instruction": "Using the given list of strings, create a function to count and return the number of capital letters in the list.", "input": "", "output": "def count_capital_letters(string_list): count = 0 for string in string_list: for char in string: if char.isupper(): count += 1 return count"} {"instruction": "Write a Python class to detect and block malicious requests.", "input": "", "output": "class RequestChecker():\n def __init__(self):\n pass\n \n def check_request(self, request):\n # Your code to check the request\n is_malicious = False # If a malicious request is found, set it to True\n \n if is_malicious:\n print('Malicious request detected!')\n else:\n print('Request is clean.')\n \n return is_malicious\n\nrequest_checker = RequestChecker()\nrequest_checker.check_request(request)"} {"instruction": "Construct an for loop in R for reading in a csv of an dataset.", "input": "file_name = \"mydata.csv\"", "output": "d <- read.csv(file_name) for (i in 1:nrow(d)) { # do something with each row of data }"} {"instruction": "Replace the for-loop in the following Python function with an equivalent while loop.", "input": "def count_down(value):\n ret = 1\n for i in range(value, 0, -1):\n ret *= i\n return ret", "output": "def count_down(value):\n ret = 1\n while value > 0:\n ret *= value\n value -= 1\n return ret"} {"instruction": "Write a JavaScript code that prints out even numbers between 0 and 50.", "input": "", "output": "for (let i = 0; i <= 50; i++) { if (i % 2 == 0) { console.log(i); } }"} {"text": "[DE Wikipedia] Eisenbahnunfall von Woodville\n\nBei dem Eisenbahnunfall von Woodville stieß bei Woodville, Indiana, USA, am 12. November 1906 ein Güterzug frontal mit einem in der Gegenrichtung verkehrenden Personenzug zusammen. 43 Menschen starben. Ausgangslage Die Zugsicherung sollte auf der eingleisigen Strecke der Baltimore and Ohio Railroad dadurch gewährleistet sein, dass die Züge in einer bestimmten, festgelegten Reihenfolge fuhren. An diesem Tag tobte ein Schneesturm, der auch die Sicht des Zugpersonals beeinträchtigte. Ein Güterzug verkehrte in östlicher Richtung. Um dem entgegenkommenden Personenzug Nr. 47 die Zugkreuzung zu ermöglichen, wartete er auf einem Ausweichgleis. Der Personenzug verkehrte an diesem Tag aber in zwei Teilen, die in einigem Abstand hintereinander fuhren. Um den zweiten Personenzugteil bei der hier geübten Methode der Zugsicherung zu sichern, hatte der zuerst fahrende ein besonderes Spitzensignal, das die Lokomotivführer der Züge, die der Personenzug kreuzte, auf den zweiten Zugteil aufmerksam machte: Zwei grüne Fahnen und zwei zusätzliche grüne Signallaternen. Unfallhergang Die beiden zusätzlichen grünen Signallaternen waren in dem Schneesturm erloschen. Die beiden grünen Fahnen übersah der Lokomotivführer des Güterzuges: Er fuhr in die Strecke ein und kollidierte mit dem zweiten Teil des Personenzugs Nr. 47. Neben den unmittelbaren Kollisionsschäden brach auch noch ein Feuer aus. Folgen 43 Menschen starben, überwiegend Einwanderer aus Osteuropa. Wissenswertes Dieser Unfall ist im Ablauf nahezu identisch mit dem Eisenbahnunfall von Warrensburg zwei Jahre zuvor und einem Eisenbahnunfall, der sich am 4. Oktober 1910 in Staunton, Illinois, ereignete. Siehe auch Liste von Eisenbahnunfällen in den Vereinigten Staaten Literatur Peter W. B. Semmens: Katastrophen auf Schienen. Eine weltweite Dokumentation. Transpress, Stuttgart 1996, ISBN 3-344-71030-3, S. 25. Einzelnachweise Woodville Woodville Woodville Baltimore and Ohio Railroad"} {"instruction": "Create a Python script to reverse each word in a sentence.", "input": "Sentence = \"This is a test\"", "output": "# Create a empty list to store the reversed sentences\n reversed_sentences = []\n\n# Get the list of words from the given sentence\nwords = sentence.split(' ')\n\n# Reverse each word\nfor word in words:\n reversed_word = word[::-1]\n reversed_sentences.append(reversed_word)\n\n# Print the reversed sentence\nreversed_sentence = ' '.join(reversed_sentences)\nprint(reversed_sentence) \n# Output: sihT si a tset"} {"instruction": "Edit the given HTML code to create a paragraph element.", "input": "
      Hello World!
      ", "output": "

      Hello World!

      "} {"instruction": "Create a function to round a number to the nearest integer.", "input": "", "output": "def round_number(x): return round(x)"} {"instruction": "Design a data structure to store a list of names of the student with their respective grades in a class.", "input": "Student names and grades [ ['John', 90], ['Tom', 80], ['Jill', 95], ['Stacy', 75] ]", "output": "class StudentGrades: def __init__(self, names, grades): self.names = names self.grades = grades def add_entry(self, name, grade): self.names.append(name) self.grades.append(grade) def get_grade(self, name): for i in range(len(self.names)): if self.names[i] == name: return self.grades[i]"} {"instruction": "Automate the testing of a Python Flask application by writing a script that will run unit tests on the models.", "input": "Not applicable", "output": "import unittest\nfrom flask_testing import TestCase\nfrom app import db, Task\n\nclass TestModel(TestCase):\n def create_app(self):\n return app\n\n def setUp(self):\n db.create_all()\n self.task = Task(description='Description')\n db.session.add(self.task)\n db.session.commit()\n\n def tearDown(self):\n db.session.remove()\n db.drop_all()\n\nclass TestTask(TestModel):\n def test_task_creation(self):\n self.assertEqual('Description', self.task.description)\n\nif __name__ == '__main__':\n unittest.main()"} {"instruction": "Create a Python function to format a string with the proper case and punctuation", "input": "string=\"hello, world\"", "output": "def format_string(string):\n \"\"\"Function to format a string with the proper case and punctuation\"\"\"\n return string.lower().capitalize() + \".\""} {"instruction": "Create a Q-Learning algorithm in Python to play the game '2048'.", "input": "", "output": "import numpy as np\nimport random \n\nclass QLearner:\n def __init__(self, alpha=0.2, gamma=0.9):\n self.alpha = alpha\n self.gamma = gamma\n self.Q = dict()\n \n def get_Q(self, state, action):\n \"\"\"\n Return Q-value for a given state and action.\n \"\"\"\n return self.Q.get((state, action), 0.0)\n \n def learn_Q(self, state, action, reward, next_state):\n \"\"\"\n Update the Q-value for a given state, action and reward.\n \"\"\"\n QValue = self.get_Q(state, action) \n next_QValue = max(self.get_Q(next_state, a) for a in self.get_legal_actions(next_state))\n new_QValue = (1 - self.alpha) * QValue + self.alpha * (reward + self.gamma * next_QValue)\n self.Q[(state, action)] = new_QValue\n \n def choose_action(self, state):\n \"\"\"\n Select the best action from a given state.\n \"\"\"\n best_action = None\n max_value = -np.inf\n actions = self.get_legal_actions(state)\n for action in actions:\n value = self.get_Q(state, action)\n if value > max_value:\n max_value = value\n best_action = action\n return best_action\n \n def get_legal_actions(self, state):\n \"\"\"\n Return legal moves for the given game state.\n \"\"\"\n # Return a list of legal actions for the given state.\n pass\n \n def learn(self):\n \"\"\"\n Update Q-value based on the results of the game.\n \"\"\"\n # Implement the learning part of the assignment.\n pass"} {"instruction": "Create a Python class called \"Friend\" with fields \"name\", \"age\" and \"hobbies\".", "input": "Not applicable", "output": "class Friend:\n \n def __init__(self, name, age, hobbies):\n self.name = name\n self.age = age\n self.hobbies = hobbies\n \n def getName(self):\n return self.name\n \n def getAge(self):\n return self.age\n \n def getHobbies(self):\n return self.hobbies"} {"instruction": "Rewrite the following code snippet from Python to JavaScript, taking into account any changes in syntax or function calls.\n\nm = \"Hello, World!\"\nprint(m)", "input": "", "output": "let m = 'Hello, World!';\nconsole.log(m);"} {"text": "[EN Wikipedia] Andrey Markov\n\nAndrey Andreyevich Markov (14 June 1856 – 20 July 1922) was a Russian mathematician best known for his work on stochastic processes. A primary subject of his research later became known as the Markov chain. He was also a strong, close to master-level chess player. Markov and his younger brother Vladimir Andreevich Markov (1871–1897) proved the Markov brothers' inequality. His son, another Andrey Andreyevich Markov (1903–1979), was also a notable mathematician, making contributions to constructive mathematics and recursive function theory. Biography Andrey Markov was born on 14 June 1856 in Russia. He attended the St. Petersburg Grammar School, where some teachers saw him as a rebellious student. In his academics he performed poorly in most subjects other than mathematics. Later in life he attended Saint Petersburg Imperial University (now Saint Petersburg State University). Among his teachers were Yulian Sokhotski (differential calculus, higher algebra), Konstantin Posse (analytic geometry), Yegor Zolotarev (integral calculus), Pafnuty Chebyshev (number theory and probability theory), Aleksandr Korkin (ordinary and partial differential equations), Mikhail Okatov (mechanism theory), Osip Somov (mechanics), and Nikolai Budajev (descriptive and higher geometry). He completed his studies at the university and was later asked if he would like to stay and have a career as a Mathematician. He later taught at high schools and continued his own mathematical studies. In this time he found a practical use for his mathematical skills. He figured out that he could use chains to model the alliteration of vowels and consonants in Russian literature. He also contributed to many other mathematical aspects in his time. He died at age 66 on 20 July 1922. Timeline In 1877, Markov was awarded a gold medal for his outstanding solution of the problem About Integration of Differential Equations by Continued Fractions with an Application to the Equation . During the following year, he passed the candidate's examinations, and he remained at the university to prepare for a lecturer's position. In April 1880, Markov defended his master's thesis \"On the Binary Square Forms with Positive Determinant\", which was directed by Aleksandr Korkin and Yegor Zolotarev. Four years later in 1884, he defended his doctoral thesis titled \"On Certain Applications of the Algebraic Continuous Fractions\". His pedagogical work began after the defense of his master's thesis in autumn 1880. As a privatdozent he lectured on differential and integral calculus. Later he lectured alternately on \"introduction to analysis\", probability theory (succeeding Chebyshev, who had left the university in 1882) and the calculus of differences. From 1895 through 1905 he also lectured in differential calculus. One…"} {"instruction": "Write a query in SQL to select all the rows from table Books.", "input": "", "output": "SELECT * FROM Books;"} {"text": "[DE Wikipedia] Franz August Müller (Fechter)\n\nFranz August Müller (* vor 1920; † nach 1932) war ein deutscher Fechter, der mit dem Fecht-Club Hermannia Frankfurt mehrfacher deutscher Mannschaftsmeister in allen drei Disziplinen (Degen, Florett und Säbel) wurde. Müller gewann bei den deutschen Einzelmeisterschaften 1920 erstmals eine Bronzemedaille im Floretteinzel, 1924 gewann er eine weitere Bronzemedaille mit dem Florett. Auch mit Säbel und Degen zog er zwischen 1920 und 1924 häufig in die Finalrunde der deutschen Meisterschaften ein. Bei den Gauverbandsfesten des Gauverbandes mittelrheinischer Fechtclubs belegte er im gleichen Zeitraum mehrere dritte Plätze mit Florett und Säbel. Als Mitglied der Mannschaft des Fecht-Clubs Hermannia Frankfurt gewann er insgesamt zehn deutsche Mannschaftsmeisterschaften mit allen drei Waffen: 1923, 1924, 1927 und 1932 mit dem Florett, 1923, 1924 und 1932 mit dem Degen, sowie 1921, 1927 und 1932 mit dem Säbel. Einzelnachweise Fechter (Deutschland) Deutscher Meister (Fechten) Fechter (Fecht-Club Hermannia Frankfurt) Deutscher Geboren im 19. oder 20. Jahrhundert Gestorben im 20. oder 21. Jahrhundert Mann"} {"instruction": "Create a program in Python to read input from the user and respond with a randomly generated quote.", "input": "Not applicable", "output": "import random\n\nquotes = [\n \"It's not who you are that holds you back, it's who you think you're not.\",\n \"You don't have to be great to start, but you have to start to be great.\",\n \"It's not what happens to you, but how you react to it that matters.\",\n \"It does not matter how slowly you go, as long as you do not stop.\"\n]\n\nprint(\"Enter your name:\")\nname = input()\n\nrandom_quote = random.choice(quotes)\nprint(\"{}, {}\".format(name, random_quote))"} {"text": "[DE Wikipedia] Sant Cebrià de Vallalta\n\nSant Cebrià de Vallalta ist eine katalanische Gemeinde in der Provinz Barcelona im Nordosten Spaniens. Sie liegt in der Comarca Maresme. Sehenswürdigkeiten Kirche Sant Cebrià de Vallalta Einzelnachweise Weblinks Information der Generalitat de Catalunya zu Sant Cebrià de Vallalta Ort in Katalonien"} {"text": "[DE Wikipedia] Richtlinie 2002/46/EG\n\nDie Richtlinie 2002/46/EG ist eine Europäische Richtlinie, die harmonisierte Bestimmungen für Nahrungsergänzungsmittel, die als Lebensmittel in der Europäischen Union in Verkehr gebracht werden, enthält. Sie soll sicherstellen, dass Verbraucher bei Nahrungsergänzungsmitteln keine irreführenden Informationen erhalten und vor potenziellen Gesundheitsrisiken geschützt sind und bestehende Rechtsvorschriften sowohl auf nationaler als auch auf europäischer Ebene konsolidieren und ersetzen. Die Richtlinie trat am 12. Juli 2002 in Kraft und musste zum 31. Juli 2002 in nationales Recht umgesetzt werden. Anwendung Die Richtlinie 2002/46/EG enthält in Anhang I eine harmonisierte Liste von Vitaminen und Mineralstoffen, welche in Nahrungsergänzungsmittel enthalten sein dürfen. Sie gilt nicht für Arzneimittel. Durch die Richtlinie wird festgelegt, dass der Hersteller empfohlene Mindest- und Höchstmengen angeben muss und dass keinerlei werbliche Aussagen gemacht werden dürfen, dass sie der Verhütung, Behandlung oder Heilung einer Erkrankung dienen. Ferner darf nicht suggeriert werden, dass bei einer ausgewogenen, abwechslungsreichen Ernährung die Zufuhr von angemessene Nährstoffmengen nicht möglich sei. Angegeben werden müssen die enthaltenen Nährstoffe oder sonstigen Stoffe und eine empfohlene tägliche Verzehrmenge. Daneben müssen Warnhinweise vorhanden sein, dass die empfohlene Dosis nicht zu überschreiten werden soll und das Produkt außerhalb der Reichweite von kleinen Kindern aufzubewahren ist. Umsetzung in nationales Recht Da es sich um eine EU-Richtlinie handelt, muss diese in nationales Recht umgesetzt werden. In Deutschland geschah dies durch die Verordnung über Nahrungsergänzungsmittel und zur Änderung der Verordnung über vitaminisierte Lebensmittel, in Österreich durch die Verordnung der Bundesministerin für Gesundheit und Frauen über Nahrungsergänzungssmittel (NEMV) und das Lebensmittelsicherheits- und Verbraucherschutzgesetz - LMSVG. Zudem können nationalen Behörden zusätzliche Regelungen treffen. So können sie vorschreiben, dass Hersteller ihnen das Inverkehrbringen eines Produkts anzeigen müssen (z. B. indem sie Musteretikett übermitteln) oder auch den Verkauf eines Produktes beschränken oder ganz untersagen, wenn es Hinweise gibt, dass das Produkt die menschliche Gesundheit gefährden könnte. Ergänzende Vorschriften Ergänzt wird diese Verordnung durch weitere EU-Verordnungen, die die Zugabe von Substanzen zu Lebensmitteln regeln, wie die über Lebensmittel für Säuglinge und Kleinkinder und für besondere medizinische Zwecke und Tagesrationen für gewichtskontrollierende Ernährung die Verordnung (EG) Nr. 1924/2006 (Health Claims) die Verordnung (EG) Nr. 1925/2006 (Anreicherungsverordnung) Einzelnachweise Verbraucherschutz Richtlinie (EU)"} {"text": "[EN Wikipedia] Assassin (Cain novel)\n\nAssassin is the third novel of the Samuel Carver series by English thriller writer, Tom Cain, released on 2 July 2009 through Bantam Press. Plot This novel takes place twelve years after the previous Samuel Carver novel, The Survivor, with Carver having spent the intervening years as a security consultant. The plot of the novel centres on a copycat killer attempting to implicate Carver in the assassination of America's first black president. Reception The book was well received, with critics praising its fast-paced action and complex plot. Sarah Broadhurst of Love Reading stated that she thinks Cain \"comes mighty close\" to reaching the standard of thriller writing attained by Lee Child in his Jack Reacher series;a large influence on Cain; and states that the novel is \"Terrific stuff. Highly recommended\". This praise was echoed by Roddy Brooks, writing for the Coventry Telegraph, who found the finale to be \"nerve-jangling\"; the novel as a whole to be a \"fast-moving thriller\"; and stated that \"Cain is a master of the genre.\". The Daily Telegraphs Jeremy Jehu was a little more critical. Referring to the twelve-year jump in the characters story, Jehu stated that \"[Cain's] solution in this third Carver romp is an act of either outrageous chutzpah or unmitigated cheek.\"; however also states that \"Cain still rattles out a punchy yarn, but fans might well feel taken for a ride – albeit an exciting one.\". References 2009 British novels British thriller novels Novels by Tom Cain Bantam Press books"} {"instruction": "Replace the placeholder with a for loop for iterating over the numbers from 1 to n and printing them.", "input": "for i in range(n): # TODO", "output": "for i in range(1, n+1): print(i)"} {"text": "[EN Wikipedia] Shin River (New Zealand)\n\nThe Shin River is a river in New Zealand's Marlborough Region. It flows north from its sources in the Inland Kaikoura Range to reach the Hodder River, which is part of the Awatere River system, located southwest of Seddon, New Zealand. See also List of rivers of New Zealand References Rivers of the Marlborough Region Rivers of New Zealand"} {"instruction": "Create a method that given an array as input, outputs the quantity of odd numbers.", "input": "[1,2,3,4,5,6,7]", "output": "def countOdds(arr): return len([x for x in arr if x % 2 != 0])"} {"instruction": "Design a function in Python that takes in two numbers and outputs their sum.", "input": "2, 3", "output": "def sumTwo(a, b):\n return a + b\n\nprint(sumTwo(2, 3))"} {"text": "[HI Wikipedia] आगा खां द्वितीय\n\nअली शाह, आगा खां द्वितीय, मूल नाम अली शाह,47वां इमाम (अरवी : علي شاه، الآغا خان الثاني जन्म: 1885, जन्म स्थान : वर्तमान पुणे, भारत), शियाओं के निजरी इसमाईली मत के आध्यात्मिक नेता। ये आगा खां प्रथम के ज्येष्ठ पुत्र थे, शियाओं के निजारी इसमाईली संप्रदाय के इमाम या आध्यात्मिक नेता के रूप में पिता के उत्तराधिकारी थे। इमाम के अपने छोटे से कार्यकाल में उन्होने अपने समुदाय की दशा सुधारने के प्रयास किए। सन्दर्भ देखें आगा खां महल, पुणे आगा खां सांस्कृतिक ट्रस्ट आगा खां श्रेणी : जन्म: 1885 श्रेणी : निज़ारी इमाम श्रेणी : आध्यात्मिक नेता पुणे"} {"text": "[HI Wikipedia] चियापास\n\nचियापास (स्पानी: Chiapas) आधिकारिक तौर पर स्वतंत्र और संप्रभु चियापास राज्य (स्पानी: Estado Libre y Soberano de Chiapas), मैक्सिको के 31 राज्यों में से एक है जिसमें संघीय जिले के साथ मैक्सिको की 32 संघीय संस्थायें शामिल है। यह 118 नगर पालिकाओं में विभाजित है और इसकी राजधानी टक्सत्ला गुतीएरेज़ है। चियापास के अन्य मुख्य शहरों में सैन क्रिस्टोबाल डे लास कसास, कोमितान और टापाचुला शामिल हैं। पश्चिमी मैक्सिको में स्थित यह राज्य मैक्सिको का सबसे दक्षिणी राज्य है। इसके उत्तर में टबैस्को उत्तर पश्चिम में वेराक्रुज़ और पश्चिम में ओक्साका राज्य स्थित हैं। चियापास की सीमा पूर्व दिशा में ग्वाटेमाला और दक्षिण में प्रशांत महासागर द्वारा निर्धारित होती है। सन्दर्भ मैक्सिको"} {"text": "[CS Wikipedia] Minoritský klášter (Znojmo)\n\nMinoritský klášter je bývalý klášter ve Znojmě v ulici Přemyslovců. Klášter původně sloužil minoritům, následně františkánům a později sloužil jako vojenská vychovatelna nebo vězení; od roku 1945 pak slouží jako jedna z budov Jihomoravského muzea ve Znojmě. Klášter je spolu s bývalou nemocnicí a torzem kostela chráněn jako kulturní památka České republiky. Historie Minorité Pozemky klášteru daroval král Václav I., na těchto pozemcích se posléze ve Znojmě usadili minorité, ti se v oblasti blízko královského hradu usadili již někdy kolem založení města Znojma v roce 1225. První písemná zmínka o klášteře pochází roku 1239, po tažení v Prusku měl umožnit rozšíření kláštera Přemysl Otakar II. Po své smrti na Moravském poli byly jeho ostatky vystaveny v Minoritském kostele ve Vídni a následně pak byly přeneseny do krypty klášterního kostela kláštera minoritů ve Znojmě. Tam zůstaly až do roku 1296, kdy byly přesunuty do Prahy. V roce 1271 byl v blízkém sousedství kláštera postaven klášter klarisek. Roku 1307 se v klášteře setkal Rudolf Habsburský se svým otcem Albrechtem I. Habsburským, došlo k dohodě o novém režimu následnictví trůnu v českých zemích. Na počátku 14. století se ve Znojmě usadili členové žebravého řádu Mendicantů a čelili velkým problémům, ty pak ustaly za vlády Karla IV. Během husitských válek opět upadly do problémů a různé snahy pomoci minoritům selhaly. Minoritský klášter byl nakonec kvůli nedostatku personálu uzavřen a v roce 1534 byl převzat františkány. Františkáni Františkáni měli od roku 1470 klášter na Dolním Předměstí ve Znojmě, ten nebyl chráněn a byl často ničen při bojích a výpadech. Po odchodu minoritů bylo františkánům povoleno se přestěhovat do budov minoritského kláštera uvnitř městských hradeb. Klášter pak v druhé třetině 16. století byl částečně přestavěn a na počátku 17. století se v klášteře opakovaně sešel Moravský zemský sněm. Mezi lety 1728 a 1729 byl rozšířen refektář kláštera a v mezi lety 1754 a 1758 byla postavena nová budova klášterního špitálu. Roku 1784 za vlády císaře Josefa II. byl klášter zrušen. Další použití Doba zrušení klášterního kostela není známa, v roce 1840 však byl z větší části zbořen. Po zrušení kláštera budovy sloužily jako vojenská vychovatelna regimentu prince Coburga a od roku 1825 byly budovy kláštera přestavěny do podoby věznice, klášter i kostel byly v této přestavbě velmi poničeny, kostel byl zbořen a jihovýchodní rameno ambitu také. Od roku 1945 je pak areál kláštera součástí Jihomoravského muzea ve Znojmě. Odkazy Reference Související články Jihomoravské muzeum ve Znojmě Klášter klarisek ve Znojmě Externí odkazy Znojmo Znojmo Kláštery ve Znojmě Kulturní památky ve Znojmě Znojmo Znojmo"} {"instruction": "Create a Python function to check whether or not a string is palindrome or not.", "input": "", "output": "def is_palindrome(string):\n \n i = 0\n j = len(string)-1\n \n while j > i:\n if string[i] != string[j]:\n return False\n i += 1\n j -= 1\n \n return True\n\n# Driver code\nstring = \"malayalam\"\nprint(is_palindrome(string))"} {"instruction": "Generate Python code that will update the values of a list", "input": "A list of integers lst = [5, 10, 10, 15, 25]. Update all values that are larger than 10 by subtracting 5.", "output": "lst = [x if x <= 10 else x - 5 for x in lst]"} {"text": "[HI Wikipedia] गंगोत्री\n\nगंगोत्री (Gangotri) भारत के उत्तराखण्ड राज्य के उत्तरकाशी ज़िले में स्थित एक नगर व प्रमुख हिन्दू तीर्थस्थल है। गंगोत्री नगर से 19 किमी दूर गोमुख है, जो गंगोत्री हिमानी का अन्तिम छोर है और गंगा नदी का उद्गम स्थान है। गंगा उद्गम गंगोत्री का गंगाजी मंदिर, समुद्र तल से 3042 मीटर की ऊँचाई पर स्थित है। भागीरथी के दाहिने ओर का परिवेश अत्यंत आकर्षक एवं मनोहारी है। यह स्थान उत्तरकाशी से 100 किमी की दूरी पर स्थित है। गंगा मैया के मंदिर का निर्माण गोरखा कमांडर अमर सिंह थापा द्वारा 18 वी शताब्दी के शुरूआत में किया गया था वर्तमान मंदिर का पुननिर्माण जयपुर के राजघराने द्वारा किया गया था। प्रत्येक वर्ष मई से अक्टूबर के महीनो के बीच पतित पावनी गंगा मैंया के दर्शन करने के लिए लाखो श्रद्धालु तीर्थयात्री यहां आते है। यमुनोत्री की ही तरह गंगोत्री का पतित पावन मंदिर भी अक्षय तृतीया के पावन पर्व पर खुलता है और दीपावली के दिन मंदिर के कपाट बंद होते है। पौराणिक संदर्भ पौराणिक कथाओ के अनुसार भगवान श्री रामचंद्र के पूर्वज रघुकुल के चक्रवर्ती राजा भगीरथ ने यहां एक पवित्र शिलाखंड पर बैठकर भगवान शंकर की प्रचंड तपस्या की थी। इस पवित्र शिलाखंड के निकट ही 18 वी शताब्दी में इस मंदिर का निर्माण किया गया। ऐसी मान्यता है कि देवी भागीरथी ने इसी स्थान पर धरती का स्पर्श किया। ऐसी भी मान्यता है कि पांडवो ने भी महाभारत के युद्ध में मारे गये अपने परिजनो की आत्मिक शांति के निमित इसी स्थान पर आकर एक महान देव यज्ञ का अनुष्ठान किया था। यह पवित्र एवं उत्कृष्ठ मंदिर सफेद ग्रेनाइट के चमकदार 20 फीट ऊंचे पत्थरों से निर्मित है। दर्शक मंदिर की भव्यता एवं शुचिता देखकर सम्मोहित हुए बिना नहीं रहते। शिवलिंग के रूप में एक नैसर्गिक चट्टान भागीरथी नदी में जलमग्न है। यह दृश्य अत्यधिक मनोहार एवं आकर्षक है। इसके देखने से दैवी शक्ति की प्रत्यक्ष अनुभूति होती है। पौराणिक आख्यानो के अनुसार, भगवान शिव इस स्थान पर अपनी जटाओ को फैला कर बैठ गए और उन्होने गंगा माता को अपनी घुंघराली जटाओ में लपेट दिया। शीतकाल के आरंभ में जब गंगा का स्तर काफी अधिक नीचे चला जाता है तब उस अवसर पर ही उक्त पवित्र शिवलिंग के दर्शन होते है। इतिहास गंगोत्री शहर धीरे-धीरे उस मंदिर के इर्द-गिर्द विकसित हुआ जिसका इतिहास 1200 वर्ष पुराना हैं, इसके पहले भी अनजाने कई सदियों से यह मंदिर हिदुओं के लिये आध्यात्मिक प्रेरणा का श्रोत रहा है। चूंकि पुराने काल में चारधामों की तीर्थयात्रा पैदल हुआ करती थी तथा उन दिनों इसकी चढ़ाई दुर्गम थी इसलिये वर्ष 1980 के दशक में गंगोत्री की सड़क बनी और तब से इस शहर का विकास द्रुत गति से हुआ। गंगोत्री शहर तथा मंदिर का इतिहास अभिन्न रूप से जुड़ा है। प्राचीन काल में यहां मंदिर नहीं था।गंगोत्री में सेमवाल पुजारियों के द्वारा गंगा माँ के साकार रूप यानी गंगा धारा की पूजा की जाती थी भागीरथी शिला के निकट एक मंच था जहां यात्रा मौसम के तीन-चार महीनों के लिये देवी-देताओं की मूर्तियां रखी जाती थी इन मूर्तियों को मुखबा आदि गावों से लाया जाता था जिन्हें यात्रा मौसम के बाद फिर उन्हीं गांवों में लौटा दिया जाता था। गढ़वाल के गुरखा सेनापति अमर सिंह थापा ने 18वीं सदी में गंगोत्री मंदिर का निर्माण सेमवाल पुजारियों केेे निवेदन पर उसी जगह जहां…"} {"instruction": "Develop a Python class for a student to be stored in a database.", "input": "", "output": "class Student:\n def __init__(self, name, age, grade, courses):\n self.name = name\n self.age = age\n self.grade = grade\n self.courses = courses\n\n def enroll_in_course(self, course):\n self.courses.append(course)\n\n def get_grade(self):\n return self.grade"} {"instruction": "Write a regular expression that matches words with an \"r\" followed by any number of letters.", "input": "", "output": "\\br[a-zA-Z]*"} {"text": "[DE Wikipedia] Bahnhof Bad Bellingen\n\nDer Bahnhof Bad Bellingen ist neben dem Bahnhof Rheinweiler eine von zwei Bahnstationen in der baden-württembergischen Gemeinde Bad Bellingen im Landkreis Lörrach. Er besitzt zwei Bahnsteiggleise. Gemäß der Eisenbahn-Bau- und Betriebsordnung handelt es sich heute beim Bahnhof Bad Bellingen jedoch nicht mehr um einen Bahnhof, sondern um einen Haltepunkt. Lage Der Bahnhof Bad Bellingen liegt sehr zentral in der Gemeinde Bad Bellingen. Von hier aus sind alle wichtigen Einrichtungen und Sehenswürdigkeiten schnell erreichbar. Direkt gegenüber dem Bahnhof auf der Westseite befindet sich die Gaststätte Gasthof Hirschen. Ebenfalls auf der Westseite befindet sich ein kleiner P+R-Parkplatz sowie überdachte Abstellmöglichkeiten für Fahrräder und Motorräder. Geschichte Der Bahnhof Bad Bellingen wurde zusammen mit dem Streckenabschnitt Schliengen–Efringen der von Mannheim über Karlsruhe und Freiburg nach Basel führenden Bahnstrecke Mannheim–Basel (Rheintalbahn) am 8. November 1848 eröffnet. Zeitgleich wurde das Billettausgabebureau eröffnet. 1865, knapp 20 Jahre nach Eröffnung der Bahnstrecke, wurde das Empfangsgebäude des Bahnhofs Bad Bellingen eröffnet, welches heute noch steht. 1884 wurde an das Bahnhofsempfangsgebäude eine Güterhalle mit einer Verladestation angebaut. 1965 wurde die Güterverladung in Bad Bellingen aufgegeben und 1978 dann auch das entsprechende Gebäude abgerissen. Am 1. September 1991 wurde die Fahrkarten- und Gepäckausgabe sowie der Warteraum im Bahnhofsgebäude geschlossen. Seitdem steht das Empfangsgebäude leer. Bis Dezember 2013 wurden die Bahnsteige im Bahnhof Bad Bellingen auf 55 cm erhöht und auf 210 Meter verlängert. Im Sommer 2014 wurde unter Vollsperrung der Abschnitt zwischen Schliengen und Haltingen über Bad Bellingen komplett saniert. Gleise, Schwellen und die Tunnel wurden erneuert. Am 9. Oktober 2015 wurde das Empfangsgebäude im Auftrag der Deutschen Bahn durch die Auktionshaus Karhausen AG in Berlin versteigert. Verkehr Bad Bellingen liegt im Tarifgebiet des Regio Verkehrsverbundes Lörrach (RVL). In Richtung Süden (Basel) gibt es Übergangstarife zum Tarifverbund Nordwestschweiz (TNW). Schienenverkehr Die Stadt ist durch Regional-Express- und Regionalbahn-Züge mit Basel bzw. Freiburg im Breisgau und Offenburg verbunden. Der Regionalexpress hält alle zwei Stunden, die Regionalbahn stündlich, mit zusätzlichen Verbindungen in den Hauptverkehrszeiten. Die nächstgelegenen ICE-Halte sind im Süden Basel Bad Bf und im Norden Freiburg (Breisgau) Hbf. Nächster Halt einzelner IC- und TGV-Züge ist Müllheim (Baden). Busverkehr Auf der Ostseite des Bahnhofs Bad Bellingen befindet sich die Bushaltestelle Hertinger Straße. Dort halten die Überlandbuslinien 4 und 15 des Stadtverkehrs Lörrach, welche durch die Südwestdeutsche…"} {"text": "[HI Wikipedia] डायक्रिया चतुष्कोण\n\nडायक्रिया चतुष्कोण (Diacria quadrangle), संयुक्त राज्य भूगर्भ सर्वेक्षण (यूएसजीएस), खगोलभूविज्ञान अनुसंधान कार्यक्रम द्वारा इस्तेमाल के लिए मंगल ग्रह की 30 चतुष्कोणिय नक्शों की एक श्रृंखला में से एक है। डायक्रिया चतुष्कोण को MC-2(मार्स चार्ट-2) के रूप में भी जाना जाता है। खगोलशास्त्र मंगल ग्रह"} {"text": "[HI Wikipedia] केदैंऐ\n\nकेदैंऐ और केदैञै (Kėdainiai) यह एक नगर लिथुआनिया में है। वह नगर देश का मध्य में है, नेवेज़िस नदी के पास। केदैंऐ में लगभग ३०६६८ निवासी रहते हैं। लिथुआनिया शहर"} {"text": "[DE Wikipedia] Josef Silberbauer\n\nJoseph Silberbauer († 1805 in Znaim) war ein südmährischer Orgelbauer, der im letzten Drittel des 18. Jahrhunderts im nördlichen Niederösterreich und im südlichen Mähren wirkte. Dessen Nachfolger waren Ignaz Reinold und Benedikt Latzl, die jeweils den Betrieb in Znaim weiterführten. Leben Biografische Details sind kaum bekannt. Vermutlich war Silberbauer ein Schüler von Ignaz Florian Casparides in Znaim und übernahm dessen Werkstatt. Dort legte er am 8. Jänner 1768 den Bürgereid ab. Er wird als Znaimer Orgelbauer beschrieben, obwohl dies bisher urkundlich nicht belegt ist. Ignaz Reinold (1777–1848) erlernte den Orgelbau bei Silberbauer und übernahm dessen Werkstatt, als sein Lehrmeister im Jahr 1805 erblindete und starb. Werk Um die 55 Arbeiten Silberbauers sind belegt. Er baute vorwiegend zweimanualige Orgelwerke mit Rückpositiv und einige Brüstungsorgeln. Seine Orgeln sind auf höchstem handwerklichem und künstlerischem Niveau gefertigt und sorgfältig durchdacht konzipiert. Am besten erhalten sind seine Instrumente in Dürnholz, Grusbach und Dyje. Silberbauer verwendete in einigen Werken die gebrochene Oktave mit Fis und Gis in der Bassoktave. Werkliste Kursivschreibung gibt an, dass die Orgel nicht oder nur noch das historische Gehäuse erhalten ist. In der fünften Spalte bezeichnet die römische Zahl die Anzahl der Manuale und ein großes „P“ ein selbstständiges Pedal. Die arabische Zahl gibt die Anzahl der klingenden Register an. Die letzte Spalte bietet Angaben zum Erhaltungszustand oder zu Besonderheiten. Literatur Otto Biba: Der Orgelbau in NÖ – Eine Einführung. Arbeitsbehelf der BDA, Wien 1973. Harald Goertz: Musikhandbuch für Österreich. Doblinger, München 1983, S. 99–101. Hans Haselböck: Barocker Orgelschatz in Niederösterreich. Wien, München 1972. Hans Heiling: Kurzinventar der Denkmalorgeln in Niederösterreich. Arbeitsbehelf der BDA. Wien 1973. Hans Heiling: Der Orgelbauer Josef Silberbauer. In: Singende Kirche. Nr. 37, Heft 2, 1990, S. 68–71. Karl Schütz: Orgelbau in der Erzdiözese Wien an der Wende des 18. zum 19.Jahrhundert. In: Beiträge zur Wiener Diözesangeschichte, Beilage zum Wiener Diözesanblatt. Jahrgang 32, Nr. 3, 1. Dezember 1991, S. 33 ff. Jiří Sehnal: Die Znaimer Orgelbauschule. In: Edith Bilek-Czerny (Red.): Klangdenkmale. Glocken und Orgeln (= Denkmalpflege in Niederösterreich. Bd. 40). Amt der Niederösterreich. Landesregierung, Abteilung Kultur und Wissenschaft, St. Pölten 2008, S. 42–44. Weblinks Österreichische Orgeldatenbank Eintrag im Oesterreichischen Musiklexikon Organ index: Josef Silberbauer Einzelnachweise Orgelbauer (18. Jahrhundert) Orgelbauer (Österreich) Person (Znojmo) Geboren im 18. Jahrhundert Gestorben 1805 Mann"} {"instruction": "Compare two strings in C# and return a Boolean indicating whether they are anagrams.", "input": "string1 = \"listen\"; string2 = \"silent\"", "output": "public static bool AreAnagrams(string string1, string string2) { if (String.Concat(string1.OrderBy(c => c)) == String.Concat(string2.OrderBy(c => c))) { return true; } else { return false; } } bool result = AreAnagrams(\"listen\", \"silent\");"} {"instruction": "Create a class in Python called Math that can calculate the average of two numbers.", "input": "", "output": "class Math: def __init__(self, x, y): self.x = x self.y = y def average(self): return (self.x + self.y) / 2"} {"instruction": "Construct a for loop in the code for printing all items in the following list.", "input": "numbers = [1, 2, 3, 4]", "output": "numbers = [1, 2, 3, 4] for number in numbers: print(number)"} {"text": "[HI Wikipedia] हरिराम व्यास\n\nहरिराम व्यास (संवत १५६७ - १६८९) राधावल्लभ सम्प्रदाय के उच्च कोटि के भक्त तथा कवि थे। राघावल्लभीय संप्रदाय के हरित्रय में इनका विशिष्ट स्थान है। परिचय भक्तप्रवर व्यास जी का जन्म ओड़छानिवासी श्री सुमोखन शुक्ल के घर मार्गशीर्ष शुक्ला पंचमी, संवत् १५६७ को हुआ था। वे सनाढय शुक्ल ब्राह्मण थे। संस्कृत के अध्ययन में विशेष रुचि होने के कारण अल्पकाल ही में इन्होंने पांडित्य प्राप्त कर लिया। ओड़छानरेश मधुकरशाह इनके मित्रशिष्य थे। व्यास जी अपने पिता की ही भाँति परम् वैष्णव तथा सद्गृहस्थ थे। राधाकृष्ण की ओर विशेष झुकाव हो जाने से ये ओड़छा छोड़कर वृंदावन चले आए। राधावल्लभ संप्रदाय के प्रमुख आचार्य गोस्वामी हितहरिवंश जी के जीवनदशर्न का इनके ऊपर ऐसा मोहक प्रभाव पड़ा कि इनकी अंतर्वृत्ति नित्यकिशोरी राधा तथा नित्यकिशोर कृष्ण के निकुंजलीलागान में रम गई। चैतन्य संप्रदाय के रूप गोस्वामी और सनातन गोस्वामी से इनकी गाढ़ी मैत्री थी। इनकी निधनतिथि ज्येष्ठ शुक्ला ११, सोमवार सं. १६८९ मानी जाती है। इनका धार्मिक दृष्टिकोण व्यापक तथा उदार था। इनकी प्रवृत्ति दाशर्निक मतभेदों को प्रश्रय देने की नहीं थीं। राघावल्लभीय संप्रदाय के मूल तत्त्व - 'नित्यविहार दशर्न' - जिसे 'रसोपासना' भी कहते हैं - की सहज अभिव्यक्ति इनकी वाणी में हुई है। इन्होंने शृंगार के अंतर्गत संयोगपक्ष को नित्यलीला का प्राण माना है। राधा का नखशिख और शृंगारपरक इनकी अन्य रचनाएँ भी संयमित एवं मर्यादित हैं। 'व्यासवाणी' भक्ति और साहित्यिक गरिमा के कारण इनकी प्रौढ़तम कृति है। पहले ये संस्कृत के शास्त्रार्थी पंडित थे और सदा शास्त्रार्थ करने के लिए तैयार रहते थे। एक बार वृंदावन में जाकर गोस्वामी हितहरिवंश जी को शास्त्रार्थ के लिए ललकारा। गोसाईं जी ने नम्र भाव से यह पद कहा - यह जो एक मन बहुत ठौर करि कही कौनै सचु पायो। जहँ तहँ बिपति जार जुवती ज्यों प्रकट पिंगला गायो दीक्षा-गुरु निम्न दोहे से प्रतीत होता है कि इनके दीक्षा- गुरु हितहरिवंश थे : उपदेस्यो रसिकन प्रथम,तब पाये हरिवंश। जब हरिवंश कृपा करी ,मिठे व्यास के संश।। यह पद सुनकर व्यास जी चेत गए और हितहरिवंश जी के अनन्य भक्त हो गए। उनकी मृत्यु पर इन्होंने इस प्रकार अपना शोक प्रकट किया - हुतो रस रसिकन को आधार। बिन हरिबंसहि सरस रीति को कापै चलिहै भार? को राधा दुलरावै गावै, वचन सुनावै कौन उचार? वृंदावन की सहज माधुरी, कहिहै कौन उदार? पद रचना अब कापै ह्वैहै? नीरस भयो संसार। बड़ो अभाग अनन्य सभा को, उठिगो ठाट सिंगार जिन बिन दिन छिन जुग सम बीतत सहज रूप आगार। व्यास एक कुल कुमुद चंद बिनु उडुगन जूठी थार जब हितहरिवंश जी से दीक्षा लेकर व्यास जी वृंदावन में ही रह गए तब महाराज 'मधुकर साह' इन्हें ओरछा ले जाने के लिए आए, पर ये वृंदावन छोड़कर न गए और अधीर होकर इन्होंने यह पद कहा - वृंदावन के रूख हमारे माता पिता सुत बंधा। गुरु गोविंद साधुगति मति सुख, फल फूलन की गंधा इनहिं पीठि दै अनत डीठि करै सो अंधान में अंधा। व्यास इनहिं छोड़ै और छुड़ावै ताको परियो कंधा रचनाएँ व्यास-वाणी (हिन्दी में )-प्रकाशित रागमाला (हिन्दी में ) नवरत्न (संस्कृत में) स्वधर्म पद्धति (संस्कृत में) माधुर्य भक्ति का वर्णन व्यास जी के उपास्य श्यामा-श्याम रूप, गुण तथा स्वाभाव सभी दृष्टियों से उत्तम हैं। ये वृन्दावन में विविध प्रकार…"} {"instruction": "Develop an algorithm for counting the number of unique characters in a string.", "input": "str = \"Hello World!\"", "output": "def uniqueChars(str): charCount = dict() for ch in str: if ch in charCount: charCount[ch] += 1 else: charCount[ch] = 1 return len(charCount)"} {"instruction": "Write a Python program to generate a list that contains only the non-unique elements from a given list.", "input": "[1,2,3,4,5,1,2,2,3,4]", "output": "def generate_non_unique_list(lst): new_list = [] for i in lst: if lst.count(i) > 1 and i not in new_list: new_list.append(i) return new_list"} {"instruction": "Find the index of the element \"z\" in the array \"alphabet\" below, and print the index.", "input": "let alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];", "output": "let index = alphabet.indexOf('z'); console.log(index);"} {"instruction": "Decompose the following code into two different functions.", "input": "def calculateMinimumDifference(nums): if len(nums) <= 1: return 0 min_diff = float('inf') for x in range(1, len(nums)): min_diff = min(min_diff, abs(nums[x] - nums[x-1])) return min_diff", "output": "def calculate_diff(arr): return abs(arr[0] - arr[1]) def calculate_minimum_difference(nums): if len(nums) <= 1: return 0 min_diff = float('inf') for x in range(1, len(nums)): min_diff = min(min_diff, calculate_diff(nums[x-1:x+1])) return min_diff"} {"instruction": "Write an algorithm to sort an array of integers in Python.", "input": "[2,1,3,4,6,5]", "output": "def bubble_sort(nums):\n size = len(nums)\n for i in range(size):\n for j in range(size-1):\n if nums[j] > nums[j+1]:\n temp = nums[j]\n nums[j] = nums[j+1]\n nums[j+1] = temp\n return nums\n\nprint(bubble_sort([2,1,3,4,6,5]))"} {"instruction": "Calculate the percentage of numbers in an array that is greater than 5.", "input": "[3, 4, 7, 8, 9, 11]", "output": "def calc_perc(arr): count = 0 for num in arr: if num > 5: count +=1 return count/len(arr) *100 calc_perc([3, 4, 7, 8, 9, 11])"} {"instruction": "Generate a Python function that takes a list as input, and returns the number of values in the list that are greater than the average of the values in the list.", "input": "input_list = [4, 8, 6, 3, 10]", "output": "def count_above_average(input_list): \n average = sum(input_list)/len(input_list)\n count = 0\n for value in input_list: \n if value > average: \n count += 1\n return count"} {"text": "[EN Wikipedia] Daniel Deusser\n\nDaniel Deusser (; born 13 August 1981) is a German equestrian and Olympic bronze medalist. He represented his country at the 2016 Summer Olympics. He is nicknamed \"Double D.\" His career reached a higher level starting from 2002, when he was part of team Germany at the Young Rider European Championships. With his top partner Killer Queen, he was selected to represent Germany at Rio de Janeiro Olympic Games in 2016. Daniel Deusser is the current world number five (March 2022). International Championship Results References External links 1981 births Living people German male equestrians Equestrians at the 2016 Summer Olympics Olympic equestrians for Germany Olympic bronze medalists for Germany Olympic medalists in equestrian Medalists at the 2016 Summer Olympics Equestrians at the 2020 Summer Olympics"} {"instruction": "Program a binary search algorithm.", "input": "data: [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] target: 16", "output": "def binary_search(data, target): low = 0 high = len(data) - 1 while low <= high: index = (low + high) // 2 value = data[index] if value == target: return index if target < value: high = index - 1 else: low = index + 1 return -1 data = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] target = 16 index = binary_search(data, target) if index != -1: print(\"Target is at index: {}\".format(index)) else: print(\"Target not found\")"} {"instruction": "Write a Python script to decrypt the given ciphertext.", "input": "Ciphertext: NPKUO", "output": "alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n\ndef decrypt(ciphertext):\n plaintext = \"\"\n for letter in ciphertext:\n index = alphabet.find(letter)\n newIndex = (index - 3) % 26\n plaintext += alphabet[newIndex]\n return plaintext\n\nprint(decrypt(\"NPKUO\"))"} {"instruction": "What is the maximum size of a virtual memory address used by 32-bit Intel 8086 processor?", "input": "", "output": "The maximum size of a virtual memory address used by a 32-bit Intel 8086 processor is 4 gigabytes (2^32 bytes)."} {"instruction": "Create a python function that takes in two arguments x and y, and will print out the multiplication result after adding 1 to x.", "input": "", "output": "def multiply_add_one(x, y):\n print(x + 1 * y)"} {"instruction": "Create a function in Python that checks if a given number is a prime.", "input": "15", "output": "def isPrime(n):\n if n < 2:\n return False\n for i in range(2, int(sqrt(n))+1):\n if n % i == 0:\n return False\n return True"} {"instruction": "What is a Hash Table in C++?", "input": "", "output": "A Hash Table (also known as Hash Map) is a data structure in C++ which uses a hash function to map keys to values. It can be used to store, add, and remove elements in constant time and is often used for caches and associative arrays."} {"instruction": "Write a JavaScript program to convert an array of objects into a comma-separated values (CSV) string with column headers.", "input": "[ {name: 'John', age: 28, city: 'New York'}, {name: 'Mary', age: 34, city: 'London'}, {name: 'Bob', age: 23, city: 'Los Angeles'} ]", "output": "function arrayToCSV(data) { let csv = ''; const headers = Object.keys(data[0]); csv += headers.join(',') + '\\n'; data.forEach((item) => { let row = ''; Object.values(item).forEach((value) => { row += `\"${value}\",`; }); row = row.slice(0, -1); csv += `${row}\\n`; }); return csv; }"} {"instruction": "Develop a program to identify the highest number in a given array.", "input": "Array: [2, 5, 15, 4, 7, 10]", "output": "int highestNum = 0; foreach (int num in array) { if (num > highestNum) { highestNum = num; } } Console.WriteLine(\"The highest number in the array is \" + highestNum);"} {"text": "[CS Wikipedia] Náměstí republiky (Lublaň)\n\nNáměstí republiky (slovinsky Trg republike), dříve náměstí revoluce (slovinsky Trg Revolucije) je jedno z hlavních náměstí v slovinské metropoli Lublani. Nachází se v jihozápadní části města, v blízkosti Plečnikova náměstí, Muzeálního náměstí a Národního muzea. Náměstí bylo navrženo a vybudováno v druhé polovině 20. století podle projektu Edvarda Ravnikara. Realizace prostoru náměstí do současné podoby probíhala v letech 1962 až 1982. Na vzniku moderního prostranství spolupracoval Edvard Ravnikar s několika dalšími architekty, urbanisty a sochaři, mezi které patřili např. Anton Bitenc, Miloš Bonča, Jože Koželj, Anton Pibernik, Franc Rihtar, Vladislav Sedej a další. Nejprve zde vznikl parkovací dům, později byla vybudována přístavba místního gymnázia Jože Plečnika. V roce 1971 byl dokončen obchodní dům Maximarket a centrální prostranství. Cankarův dům byl budován v letech 1979 až 1981. V roce 1981 byl také odhalen pomník komunistickému politikovi Edvardu Kardeljovi, který se do současné doby na náměstí nachází. Dominantou prostranství jsou dvě výškové budovy (TR2 a TR3). Dne 26. června 1991 zde byla vyhlášena nezávislost Slovinska na Jugoslávii. Odkazy Externí odkazy Geografie Lublaně"} {"instruction": "Identify the most suitable language to create a web application.", "input": "", "output": "JavaScript."} {"instruction": "Write a python class to represent a circle", "input": "", "output": "class Circle:\n def __init__(self, radius):\n self.radius = radius\n \n def area(self):\n return 3.14 * (self.radius ** 2)\n \n def circumference(self):\n return 2 * 3.14 * self.radius\n \ncircle1 = Circle(10)\nprint(circle1.area())\nprint(circle1.circumference())"} {"instruction": "Generate a Python program to convert all characters to lowercase", "input": "", "output": "def convert_to_lowercase(string):\n return string.lower()"} {"instruction": "Create a loop to print the numbers in reverse order from 5 to 2.", "input": "", "output": "for i in range(5, 1, -1): print(i)"} {"text": "[CS Wikipedia] Minerální olej\n\nMinerální olej (též ropný olej) je jedním z produktů frakční destilace ropy. Je to průhledný, bezbarvý olej složený především z alkanů (typicky s 15 až 40 atomy uhlíku v molekule) a cyklických parafinů, příbuzný s vazelínou (známou též jako bílá vazelina, v lékopisu latinsky Vaselinum album). Má hustotu okolo 0,8 g/cm3. Minerální olej je látka poměrně nízké ceny a vyrábí se ve velkých množstvích. Je dostupný jako lehký a těžký minerální olej. Koncem 19. století byl poprvé použit termín „minerální olej“ nebo „skalní olej“ k popisu ropných uhlovodíků a souvisejících produktů, které byly získávány z vrtů do podzemních rezervoárů. Termín odlišoval ropné uhlovodíky získávané z podzemních zdrojů od jiných tehdejších zdrojů oleje, například palmového nebo velrybího oleje. Na dnešním petrochemickém trhu se termín „minerální olej“ často používá v právních dokumentech jako označení všech kapalných uhlovodíků a plynných produktů získávaných z ropných vrtů. Existují tři základní třídy rafinovaných minerálních olejů: parafinové oleje, založené na n-alkanech naftenové oleje, založené na cykloalkanech aromatické oleje, založené na aromatických uhlovodících (neplést s esenciálními oleji) Vliv na zdraví Podle IARC jsou minerální oleje prokázaný karcinogen (skupina 1), pokud jsou nezpracované či málo zpracované, ale plnězpracované jsou neklasifikované (skupina 3). Využití Projímadlo Lubrikant Kosmetika Reference Literatura Lawrence Livermore National Laboratory – Safe handling of Alkali Metals Food and Agriculture Organization – Report on food safety of mineral oil, 1970 Externí odkazy Frakce ropy Paliva Kapalná paliva Uhlovodíková paliva Chemické látky pro kosmetiku Oleje Chladicí média"} {"instruction": "Develop a python program to print the character with the maximum frequency in a given string.", "input": "sample_str = 'football'", "output": "def max_frequency_char(string):\n char_freq = {}\n for char in string:\n if char in char_freq.keys():\n char_freq[char] += 1 \n else:\n char_freq[char] = 1\n max_freq = 0 \n max_char = None\n for char, freq in char_freq.items():\n if freq > max_freq:\n max_freq = freq\n max_char = char \n return max_char\n\nprint(max_frequency_char(sample_str))"} {"text": "[DE Wikipedia] St. Laurentius (Bergstetten)\n\nDie römisch-katholische, denkmalgeschützte Filialkirche St. Laurentius steht in Bergstetten, einem Ortsteil des Marktes Laaber im Landkreis Regensburg der Oberpfalz. Die Kirche gehört zum Bistum Regensburg. Das Bauwerk ist unter der Denkmalnummer D-3-75-162-28 als Baudenkmal in die Bayerische Denkmalliste eingetragen. Beschreibung Die im Kern romanische Saalkirche wurde 1599 umgebaut und im 18. Jahrhundert geringfügig verändert. Sie besteht aus einem Langhaus und einer eingezogenen, halbrunden Apsis. Aus dem Satteldach des Langhauses erhebt sich über dem Giebel im Westen ein achteckiger, mit Schindeln verkleideter Dachreiter, der mit einer Zwiebelhaube bedeckt ist. Der Innenraum des Langhauses ist mit einer Flachdecke überspannt, die Apsis mit einem Stichkappengewölbe. An der Decke befindet sich ein Fresko mit der Krönung Mariens. Das barocke Altarretabel des Hochaltars zeigt den von Johann Georg Hämmerl gemalten heiligen Laurentius als Märtyrer. Literatur Georg Dehio: Handbuch der deutschen Kunstdenkmäler, Bayern V, Regensburg und Oberpfalz. Deutscher Kunstverlag, München 2008, S. 80. Weblinks Kirchengebäude im Landkreis Regensburg Kirchengebäude im Bistum Regensburg Saalkirche in Bayern Kirchengebäude in Europa Baudenkmal in Laaber Laurentiuskirche Erbaut in den 1590er Jahren Romanische Kirche Bauwerk der Romanik in Bayern Bauwerk in Laaber"} {"instruction": "Create a HTML form which includes a dropdown list and a submit button.", "input": "", "output": "
      "} {"instruction": "Build an algorithm in Python that creates output based on the given input.", "input": "Input: [1, 2, 5, 8, 11]", "output": "def algorithm(input_list):\n output_list = []\n for i in input_list: \n if i % 2 == 0:\n output_list.append(str(i) + ' is an even number')\n else:\n output_list.append(str(i) + ' is an odd number')\n return output_list"} {"text": "[HI Wikipedia] रवांडा जनसंहार\n\nरवांडा नरसंहार तुत्सी और हुतु समुदाय के लोगों के बीच हुआ एक जातीय संघर्ष था। 1994 में 6 अप्रैल को किगली में हवाई जहाज पर बोर्डिंग के दौरान रवांडा के राष्ट्रपति हेबिअरिमाना और बुरुन्डियान के राष्ट्रपति सिप्रेन की हत्या कर दी गई, जिसके बाद ये संहार शुरू हुआ। करीब 100 दिनों तक चले इस नरसंहार में 5 लाख से लेकर दस लाख लोग मारे गए। तब ये संख्या पूरे देश की आबादी के करीब 20 फीसदी के बराबर थी। इस संघर्ष की नींव खुद नहीं पड़ी थी, बल्कि ये रवांडा की हुतू जाति के प्रभाव वाली सरकार जिसने इस जनसंहार को प्रायोजित किया था। इस सरकार का मकसद विरोधी तुत्सी आबादी का देश से सफाया था। इसमें ना सिर्फ तुत्सी लोगों का कत्ल किया गया, बल्कि तुत्सी समुदाय के लोगों के साथ जरा सी भी सहानुभूति दिखाने वाले लोगों को मौत के घाट उतार दिया गया। नरसंहार को सफल बनाने वालों में रवांडा सेना के अधिकारी, पुलिस विभाग, सरकार समर्थित लोग, उग्रवादी संगठन और हुतु समुदाय के लोग शामिल थे। हुतु और तुत्स समुदाय में लंबे समय से चली आ रही आला दर्जे की दुश्मनी एक बड़ी वजह थी। जुलाई के मध्य में इस संहार पर काबू पाया गया। हालांकि, हत्या और बलात्कार की इन वीभत्स घटनाओं ने अफ्रीका की आबादी के बड़े हिस्से के लोगों को बुरी तरह प्रभावित किया है, इस घटना का असर लोगों के दिलो दिमाम पर आज भी बरकरार है। इस संहार के बाद संयुक्त राष्ट्र संघ और अमेरिका, ब्रिटेन, बेल्जियम समेत तमाम देशों को उनकी निष्क्रियता के लिए आलोचना का सामना करना पड़ा। संयुक्त राष्ट्र यहां शांति स्थापना करने में नाकाम रहा। वहीं, पर्यवेक्षकों ने इस नरसंहार को समर्थन देने वाली फ्रांस की सरकार की भी जमकर आलोचना की। मानवाधिकार की पैरोकार अधिकांश पश्चिमी देश इस पूरे मसले को खामोशी से देखते रहे। आधुनिक शोध इस बात पर बल देते हैं सामान्य जातीय तनाव इस नरसंहार की वजह न देकर इसकी वजह युरोपीय उपनिवेशवादी देशों अपने स्वार्थों के लिये हुतू और तुत्सी लोगों को कृत्रिम रूप से विभाजित किया जाना है। सन्दर्भ इन्हें भी देखें रवांडा अफ्रीकी महासंघ बाहरी कड़ियाँ अफ़्रीका का इतिहास अफ्रीका में नरसंहार"} {"text": "[HI Wikipedia] शुमश्ती भाषा\n\nशुमश्ती (Shumashti, ), जिसे शुमश्त भी कहते हैं, कुनर (कुनड़) शाखा की एक दार्दी भाषा है जो अफ़ग़ानिस्तान​ के कुनर प्रान्त में बोली जाती है। यह कुनर नदी के पश्चिमी किनारे पर ग्वार-बती बोलने वाले इलाक़े से लगभग ६० किमी दूर बोली जाती है। १९९४ में अनुमान लगाया गया कि इसे केवल १,००० लोग बोलते हैं। अनुमान लगाया गया है कि शुमश्ती के लगभग ६३% शब्द​ नंगलामी भाषा से और ४७% ग्वार-बती भाषा से मिलते हैं। इस भाषा पर पाशाई भाषा का भारी प्रभाव पड़ा है। सन्दर्भ हिन्द-आर्य भाषाएँ दार्दी भाषाएँ अफ़ग़ानिस्तान की भाषाएँ"} {"text": "[DE Wikipedia] Amar Ouamrane\n\nAmar Ouamrane (* 1919 in Frikat, Französisch-Algerien; † 28. Juli 1992 in Algier, Algerien) war während des Algerienkriegs Offizier des bewaffneten Arms der Front de Libération Nationale sowie Vertreter der Organisation im Ausland. Leben Ouamrane wurde in Frikat in der Region Tizi Ouzou als Sohn einer berberischen Familie geboren. Er schlug eine Laufbahn als Berufssoldat in den französischen Streitkräften ein und brachte es bis zum Unteroffizier. Im Zuge der Unruhen zum Ende des Zweiten Weltkriegs desertierte Ouamrane und wurde daraufhin festgenommen und gefoltert. Er wurde Ende 1946 begnadigt und freigelassen. Wenige Monate später ging er in der Kabylei in der von der Parti du peuple algérien um Krim Belkassem formierten antikolonialen Untergrund. Ouamrane hatte zu Beginn des Algerienkriegs eine regionale, militärische Führungsfunktion innerhalb der FLN inne. Er rekrutierte seinen berberischen Landsmann Abane Ramdane in die Organisation und nahm zusammen mit diesem an der Konferenz von Soummam als einer von sechs Führungskadern der FLN teil. Nach der Festnahme von Rabah Bitat war er von 1955 bis 1956 Kommandeur des Wilaya 4, welcher das Umland von Algier umfasste. Danach erledigte er logistische Aufgaben für die FLN. Nach dem Tod Ramdanes und dem Machtzuwachs der Drei B wurde Ouamrane mehr und mehr marginalisiert. Insbesondere wurde ihm innerhalb der Organisation ein unmoralischer Lebenswandel vorgeworfen. Ab 1960 vertrat er die FLN als Botschafter in Tunesien und der Türkei. Einzelnachweise Person im Algerienkrieg Algerier Geboren 1919 Gestorben 1992 Mann Militärperson (Algerien)"} {"instruction": "Enter the necessary code to initiate a MongoDB connection", "input": "", "output": "from pymongo import MongoClient #creating the MongoClient client = MongoClient(\"mongodb://localhost:27017/\") #connecting to the database db = client[\"database_name\"]"} {"instruction": "Generate a random string containing only lowercase letters using Python.", "input": "", "output": "import string \nimport random\n\ndef gen_random_string(length): \n letters = string.ascii_lowercase\n return ''.join(random.choice(letters) for i in range(length)) \n\nprint(gen_random_string(10))"} {"instruction": "Provide an example of an if-else statement in C++.", "input": "", "output": "int x = 5; if (x > 0) { std::cout << \"x is positive\"; } else { std::cout << \"x is negative or zero\"; }"} {"instruction": "Create an algorithm in Python for removing all duplicates from an array.", "input": "arr = [1, 2, 4, 4, 1, 5, 2]", "output": "def removeDuplicates(arr): \n res = [] \n seen = set() \n for e in arr:\n if e not in seen: \n res.append(e) \n seen.add(e) \n \n return res \n \nprint(removeDuplicates([1, 2, 4, 4, 1, 5, 2]))"} {"text": "[DE Wikipedia] Georg Streiter (Journalist, 1907)\n\nGeorg Heinrich Karl Streiter (* 20. Oktober 1907 in Berlin; † 9. August 1976 in Bonn) war ein deutscher Journalist und Politiker. Studium in Berlin und Danzig Georg Streiter studierte von 1926 bis 1929 Nationalökonomie an der Friedrich-Wilhelms-Universität zu Berlin, wo er 1927 zum Sprecher der Allgemeinen Studentenschaft gewählt wurde. 1929 wechselte er an die TH Danzig, um angewandte Psychologie (Psychotechnik) zu studieren. Durch den Völkerbund und den Versailler Vertrag war Danzig im Jahr 1920 aus dem deutschen Staatsverband herausgelöst und zu einem unabhängigen Staat, der Freien Stadt Danzig, erklärt worden. Bei vielen deutschen Studenten genoss die Stadt eine starke Anziehungskraft, die Danziger Hochschule wurde „im Reich als gut und nicht sonderlich leicht gerühmt“, die Studentenschaft war international, dazu zählten insbesondere Polen (aus dem Polnischen Korridor) sowie Jugoslawen, Schweden, Russen, Norweger und Griechen. Karriere in Danzig und Polen Im Sommer 1930 brach Streiter das Studium ab und nahm beim Danziger Landbund die Tätigkeit des Geschäftsführers auf, durch die er Hermann Rauschning kennenlernte. Zu dieser Zeit stand Streiter der Deutschnationalen Volkspartei der Freien Stadt Danzig nahe; auch später bekannte er sich als Deutschnationaler. Ab 1932 arbeitete er für Rauschning als Sekretär, der im Juni 1933 zum Senatspräsidenten und damit zum faktischen Staatsoberhaupt von Danzig gewählt wurde. Streiter trat zum 1. April 1933 in die NSDAP und in die SA ein. Als engster Mitarbeiter Rauschnings und offizieller Pressesprecher des Senats der Freien Stadt Danzig war Streiter an Verhandlungen mit dem Völkerbund und der polnischen Regierung in Genf und Warschau beteiligt. Daneben betreute er als Rauschnings persönlicher Referent insbesondere die Polen betreffenden Aufgaben des Senats. Anfang 1934 bezeichnete der Pulitzer-Preisträger Hubert R. Knickerbocker in US-amerikanischen Zeitungen Streiter als „Danzig's coming man“ („Danzigs kommenden Mann“). Hintergrund dieser Annahme war ein Machtkampf zwischen Rauschning und dem Danziger NSDAP-Gauleiter Albert Forster, bei dem es dann jedoch Forster gelang, „zwei Fliegen mit einer Klappe zu schlagen“. So forderte Forster im September 1934 ultimativ von Rauschning die Entlassung von Streiter, dem er „judenfreundliches Verhalten“ vorwarf. Rauschning lehnte dies ab und stellte sich demonstrativ hinter seinen wichtigsten Mitarbeiter. Tatsächlich pflegten Streiter und Rauschning einen guten Kontakt zur jüdischen Gemeinde Danzigs sowie zur örtlichen jüdischen Geschäftswelt und Presse. Nicht selten lancierte Streiter im Auftrag von Rauschning Artikel über die Judenfrage in jüdische Tageszeitungen, die im deutlichen Kontrast zur offiziellen NS-Sprachregelung standen. Bei diesen, Jahre später…"} {"instruction": "Develop a python program to find the maximum element in a dictionary", "input": "sampleDict = {'A': 12, 'B': 17, 'C': 3}", "output": "def findMax(sampleDict): \n \n max_value = 0\n max_key = ''\n \n for key, value in sampleDict.items(): \n if value > max_value: \n max_value = value\n max_key = key \n \n return max_key, max_value \n \n# Driver's code \nsampleDict = {'A': 12, 'B': 17, 'C': 3} \nmax_key, max_value = findMax(sampleDict) \nprint(\"The maximum element in the dictionary is :\", \n max_key, max_value)"} {"instruction": "Create a MySQL table with two columns id and name, where id should have primary key.", "input": "", "output": "CREATE TABLE student ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, PRIMARY KEY (id) );"} {"instruction": "Write code to convert a given hexadecimal string to a binary string.", "input": "Hexadecimal string: 7468", "output": "def hex_to_bin(hexadecimal_str): return bin(int(hexadecimal_str, 16))[2:] # [2:] removes 0b from the start"} {"instruction": "Construct a switch-case statement in JavaScript to print the day of the week.", "input": "var day_index = 5;", "output": "switch (day_index) { case 0: console.log('Monday'); break; case 1: console.log('Tuesday'); break; case 2: console.log('Wednesday'); break; case 3: console.log('Thursday'); break; case 4: console.log('Friday'); break; case 5: console.log('Saturday'); break; case 6: console.log('Sunday'); break; }"} {"instruction": "Write a Python program to find all pairs of numbers in the given list whose sum is equal to the given number.", "input": "nums = [1, 2, 3, 4, 5], sum = 8", "output": "def find_pairs(nums, sum): result = [] for i in range(len(nums)): for j in range(i+1, len(nums)): if nums[i] + nums[j] == sum: result.append((nums[i], nums[j])) return result res = find_pairs(nums, sum) print(res) # Output: [(2, 6), (3, 5)]"} {"instruction": "Rewrite the code below to use Python data structures.", "input": "let numbersArray = [5, 9, 3, 2, 6, 10];\nlet numbersArrayIndex = 0;\nlet currentNumber = numbersArray[numbersArrayIndex];\n\nwhile (numbersArrayIndex < numbersArray.length) {\n console.log(currentNumber);\n numbersArrayIndex++;\n currentNumber = numbersArray[numbersArrayIndex];\n}", "output": "numbers_array = [5, 9, 3, 2, 6, 10]\n\nfor current_number in numbers_array:\n print(current_number)"} {"instruction": "Write a Scala function to generate a range of numbers.", "input": "", "output": "def generateRange(start:Int, end:Int): List[Int] = { if (start > end) List(end) else start :: generateRange(start+1, end) }"} {"instruction": "Write a Python program to calculate the sum of all words in a sentence.", "input": "", "output": "def sum_of_words(sentence):\n words = sentence.split() \n total = 0 \n for word in words: \n total += len(word) \n return total\n\nresult = sum_of_words(\"This is a sentence\")\nprint(result)"} {"instruction": "Scale a vector of 10 numbers from 0 to 10.", "input": "[2.5, 3.5, 5.5, 7.5, 1.5, 8.5, 0.5, 4.5, 6.5, 9.5]", "output": "def scale(vector): scaled_vector = [] for i in vector: scaled_vector.append(i/10*10) return scaled_vector"} {"instruction": "Create a JavaScript statement that generates a random number between 1 and 10.", "input": "", "output": "Math.floor(Math.random() * 10) + 1;"} {"text": "[HI Wikipedia] आगा खां तृतीय\n\nसुल्तान सर मुहम्मद शाह, आगा खां तृतीय, मूल नाम : सुल्तान सर मुहम्मद शाह,48वां इमाम (अरवी : سيدي سلطان محمد شاه، الآغاخان الثالث जन्म:2 नवम्बर 1877, जन्म स्थान : वर्तमान कराची, पाकिस्तान, मृत्यु : 11 जुलाई 1957, वरसोई, स्विट्जरलैंड), शियाओं के निजरी इसमाईली मत के आध्यात्मिक नेता। ये आगा खान द्वितीय के एकलौते बेटे थे। 1885 में अपने पिता के उत्तराधिकारी के रूप में वह निजारी इस्माईली संप्रदाय के इमाम बने। जीवन परिचय इनकी माँ ईरान की शाही परिवार से थीं। उनकी देखरेख में आगा खाँ को इस्माईली और पूर्वी शिक्षा के साथ-साथ पश्चिमी शिक्षा भी दी गयी। अपने समुदाय के मामलों को कर्मठता से निपटाने के अलावा उन्होने भारत के मुसलमानों में तेज़ी से अग्रणी स्थान हासिल कर लिया। 1906 में भारत में मुस्लिम अल्पसंख्यकों के हितों को प्रोत्साहित करने के लिए वाइसराय से मिलने गए मुस्लिम शिष्टमंडल का उन्होने नेतृत्व किया। 1909 के मार्ले-मिंटो सुधारों से अंतत: अलग मुस्लिम निर्वाचक मण्डल बन गया। राजनीतिक गतिविधियां आगा खाँ तृतीय अखिल भारतीय मुस्लिम लीग के प्रारंभिक वर्षों में अध्यक्ष रहे तथा अलीगढ़ में मुस्लिम महाविद्यालय को विश्वविद्यालय का दर्जा दिलाने के लिए उन्होने एक कोश का गठन किया। यह दर्जा उसे 1920 में मिला। प्रथम विश्व युद्ध शुरू होने पर आगा खाँ ने मित्र राष्ट्रों के उद्देश्यों का समर्थन किया, लेकिन इसके बाद के शांति सम्मेलन में उन्होने आग्रह किया कि तुर्की के साथ उदारता से पेश आया जाय। प्रथम विश्व युद्ध में उनकी सहायता के लिए उन्हें नाइट की उपाधि दी गयी। उन्होने लंदन में भारतीय वैधानिक सुधारों पर हुए गोलमेज़ सम्मेलन (1930-32) में महत्वपूर्ण भूमिका निभाई। 1932 में जीनेवा में विश्व निरस्त्रीकरण सम्मेलन तथा 1932 में और 1934 से 1937 तक लीग ऑफ नेशंस की सभा में आगा खाँ तृतीय ने भारत का प्रतिनिधित्व किया। 1937 में उन्हे लीग का अध्यक्ष बनाया गया। द्वितीय विश्व युद्ध के दौरान वह स्वीटजरलैंड में रहे और राजनाइटिक गतिविधियां छोड़ दी। महात्मा गांधी को 1942 से 1945 तक पूना (वर्तमान पुणे) में आगा खां महल में बंदी बनाकर रखा गया था। आगा खाँ को घुड़दौड़ों के लिए श्रेष्ठ नस्ल के घोड़ों के सफल मालिक और प्रवजनक के रूप में भी जाना जाता था। सन्दर्भ देखें आगा खां महल, पुणे आगा खां सांस्कृतिक ट्रस्ट आगा खां जन्म: 1885 निज़ारी इमाम आध्यात्मिक नेता पुणे"} {"text": "[EN Wikipedia] Teviot River\n\nThe Teviot River is a river in New Zealand, a tributary of the Clutha River. See also List of rivers of New Zealand References Rivers of Otago Rivers of New Zealand Tributaries of the Clutha River"} {"instruction": "Write a JavaScript function that multiplies two numbers together.", "input": "", "output": "function multiply(x, y) { return x * y; }"} {"instruction": "Classify the following snippet of Python code as data wrangling, visualization, or machine learning.", "input": "from sklearn.neighbors import KNeighborsClassifier\n\nknn = KNeighborsClassifier(n_neighbors=5)\nknn.fit(X, y)", "output": "Machine learning."} {"instruction": "Modify the following Python script to create a new object 'obj2' that has the same data as 'obj1', but with the 'val2' value changed to 100.", "input": "obj1 = {'key1': 'val1', 'key2': 'val2'}", "output": "obj1 = {'key1': 'val1', 'key2': 'val2'}\n\n# create a copy of obj1\nobj2 = obj1.copy()\n# modify the value of key2\nobj2['key2'] = 100"} {"instruction": "How can you detect if there is an infinite loop in a code?", "input": "", "output": "One way of detecting if there is an infinite loop in a code is by using a counter to count the number of iterations the loop is performing. If the number of iterations exceeds some predefined threshold value, we can conclude that the code is executing an infinite loop. Another technique to detect an infinite loop is to keep track of all the loop variables and compare the values at two different points in the loop. If it detects a repeating pattern, it may indicate that the loop is stuck in an infinite loop."} {"instruction": "Create a Ruby program that takes a group of strings and returns the number of strings longer than 5 characters.", "input": "[\"Hello\", \"World\", \"Foo\", \"Bar\", \"Baz\"]", "output": "strings = [\"Hello\", \"World\", \"Foo\", \"Bar\", \"Baz\"] count = 0 strings.each do |str| if str.length > 5 count += 1 end end puts \"The number of strings longer than 5 characters is: #{count}\""} {"instruction": "Create a function in Python that takes two parameters: a list of numbers and an integer, and returns the list of numbers sorted such that any numbers divisible by the integer are placed at the beginning of the list.", "input": "numbers = [10, 7, 3, 9, 12, 15]\ninteger = 3", "output": "def sortByDivisible(numbers, integer):\n sortedList = []\n\n for num in numbers:\n if (num % integer == 0):\n sortedList.append(num)\n\n for num in numbers:\n if (num % integer != 0):\n sortedList.append(num)\n\n return sortedList\n\nnumbers = [10, 7, 3, 9, 12, 15]\ninteger = 3\n\nprint(sortByDivisible(numbers, integer))\n# Output: [9, 12, 3, 10, 7, 15]"} {"instruction": "Write a lambda expression to find the maximum value of two numbers.", "input": "", "output": "maximum = lambda num1, num2: num1 if num1 > num2 else num2"} {"instruction": "Write a Python function to invert a string (swap uppercase and lowercase letters).", "input": "", "output": "def invert_string(string):\n # Initially create an empty string as result \n result = ''\n \n # Traverse every character of the string \n for char in string: \n # If an uppercase character is found \n if char.isupper(): \n # Add its lowercase equivalent to the result \n result += char.lower() \n # If a lowercase character is found \n elif char.islower(): \n # Add its uppercase equivalent to the result \n result += char.upper() \n else: \n # If not an alphabet character \n result += char\n return result"} {"instruction": "Edit an existing Python script to search for and delete duplicated words in a string.", "input": "my_string = 'this this string contains contains duplicate duplicate words words'", "output": "my_string = 'this string contains duplicate words' \n\nmy_string = my_string.split() \nres = [] \nfor i in my_string: \n if i not in res: \n res.append(i) \n\nmy_string = ' '.join(res) \nprint(my_string)"} {"text": "[DE Wikipedia] Bruton Music\n\nBruton Music ist ein britisches Musiklabel, welches im Jahre 1977 vom Musikproduzenten Robin Phillips gegründet wurde. Das Label veröffentlichte vorwiegend instrumentale, gesangslose Titel, welche häufig in TV-Serien und -Filmen Einsatz fanden. Es wechselte 1982 erstmals den Besitzer, als Michael Jackson dieses aufkaufte. 1985 ging es in die Zomba Group über. Veröffentlichungen Zu bekannten Veröffentlichungen zählen: Drama Montage, Brian Bennett Bekannte Einsatzgebiete TV-Serien 1978: Deutsch-britische Kinderserie Fünf Freunde (u. a. Drama Montage von Brian Bennett) Weblinks Website Einzelnachweise Britisches Musiklabel Gegründet 1977"} {"text": "[DE Wikipedia] Ramsler (Malerfamilie)\n\nDie Malerfamilie Ramsler geht auf den niederländischen Steinhauer Gerhard Ramsler aus Deventer zurück. Sein gleichnamiger Sohn verließ wegen religiöser Verfolgung um 1560 seine niederländische Heimat und ließ sich in Straubing nieder. Das Schicksal der Familie lässt sich bis zur Mitte des 17. Jh. verfolgen. Die Familie bekam im 17. Jh. auch einen Theologenzweig, auf den heute alle im südwestdeutschen und Schweizer Raum lebenden Namensträger zurückgehen. Skizze Gerhard Ramsler arbeitete recht bald auch als Maler, wechselte 1570 nach Augsburg. Sein Sohn Anton, der seine Malerlehre wohl bei dem Lauinger Maler Georg Brentel machte und dessen Tochter Sibilla heiratete, ließ sich in Tübingen nieder. Er war der Autor einer der beiden Gruppen der Professorenbildnisse, die 1580 den Anfang der Tübinger Professorengalerie bildete. Er arbeitete aber auch viel als Wappenmaler. Anton hatte drei Söhne, die Maler wurden. Der erfolgreichste war der älteste Sohn Jacob, der in Tübingen blieb. Außer den zwei Bildnissen für die Professorengalerie waren seine Arbeiten unbedeutend. Ähnlich wie sein Vater arbeitete Jacob Ramsler auch als Wappenmaler. Dessen älterer gleichnamiger Sohn, wurde Silberschmiedmeister, während der jüngere Friedrich (II.) in die Fußstapfen des Vaters trat. Auch Jacobs jüngere Brüder Friedrich und Johannes waren Maler. Auf der Grundlage der Urkunden lässt sich von beiden nur ein relativ kurzer Lebensabschnitt verfolgen. Von Johannes ist nur eine Zeichnung erhalten. Johannes hatte einen Sohn – Jacob (II.) –, der als Goldschmied tätig war. Dessen gleichnamiger Sohn führte das Handwerk seines Vaters als Goldarbeiter fort. Im Gegensatz zu den künstlerisch-handwerklich veranlagten Familienmitgliedern gründete ein jüngerer Sohn Antons – Gerhard Anton (1603–1640) – einen theologisch-beamtenmäßig geprägten Familienzweig. Gerhard Ramsler († 1548), Steinhauer Gerhard Ramsler (1530–1612), Steinhauer und Maler Anton Ramsler (zwischen 1560 und 1566 – 1607), Maler in Tübingen Jacob Ramsler (1587–1635), Maler in Tübingen Jacob Ramsler (II.) (wohl 1612 – 1692 (oder 1693)), Silberschmied Friedrich Ramsler (II.) (1616 – nach 1630), Maler Friedrich Ramsler (vermutlich 1588 – frühestens 1621), Maler in Urach Anton Ramsler (II.) (* um 1610; † kurz nach 1630), Maler in Reutlingen Johannes Ramsler (vermutlich 1590 – 1624), Maler in Lauingen Jacob Ramsler (III.) (* 1619), Goldschmied in Tübingen, Neusohl und Hornberg Johannes Ramsler (II.), lebte in Neusohl Jacob Ramsler (IV.), Goldarbeiter in Neusohl und Tübingen Gerhard Anton Ramsler (1603–1640), Pfarrer in Höpfingen, Erlenbach und Beerfelden Johann Gerhard Ramsler (1635–1703), Pfarrer und Special in Freudenstadt und Schorndorf Samuel Friedrich Ramsler (1661–1721), Vogt in Cannstatt Daniel Friedrich Ramsler (1689–1737),…"} {"text": "[HI Wikipedia] प्राग\n\nप्राग (चेक: प्राहा; जर्मन: प्राग; ) चेक गणराज्य की राजधानी और सबसे बड़ा शहर है। यह यूरोपीय संघ का 14वां सबसे बड़ा शहर है। प्राग कभी बोहेमिया की ऐतिहासिक राजधानी हुआ करती थी। वल्टावा नदी के उत्तर-पश्चिम में स्थित यह शहर 1.3 मिलियन लोगों का घर है, जबकि इसके महानगरीय क्षेत्र की 2.6 लाख की आबादी होने का अनुमान है। शहर में समशीतोष्ण जलवायु है, अर्थात: गर्म गर्मियाँ और बेहद ठंड सर्दियाँ। प्राग एक समृद्ध इतिहास के साथ मध्य यूरोप का एक राजनीतिक, सांस्कृतिक और आर्थिक केंद्र रहा है। रोमनकाल के दौरान स्थापित और गॉथिक, पुनर्जागरण और बारोक युग में समृद्ध प्राग, बोहेमिया साम्राज्य की राजधानी थी और कई पवित्र रोमन सम्राटों का मुख्य निवास स्थल थी, जिसमें मुख्यत: चार्ल्स चतुर्थ (शा.1346-1378) शामिल थे। यह हाब्सबर्ग राजशाही और उसके ऑस्ट्रो-हंगेरियन साम्राज्य का एक महत्वपूर्ण शहर था। शहर ने दोनों विश्व युद्धों और युद्ध के बाद के कम्युनिस्ट युग के दौरान बोहेमियन और यूरोपीय धर्मसुधार, तीस साल का युद्ध और 20वीं शताब्दी के इतिहास में चेकोस्लोवाकिया की राजधानी के रूप में प्रमुख भूमिका निभाई है।. इतिहास अपने अस्तित्व के हजारों वर्षों के दौरान, यह शहर उत्तर में स्थित प्राग के किले से दक्षिण में व्यास्राद के किले तक फैलते हुए, एक आधुनिक यूरोपीय देश, और यूरोपीय संघ के एक सदस्य देश, चेक गणराज्य की राजधानी बन गया। भूगोल प्राग वल्टावा नदी के किनारे पर स्थित है। प्राग बोहेमियन बेसिन के केंद्र में 50°05\"एन और 14°27\"ई अक्षांश पर स्थित है, इस प्रकार यह लगभग फ्रैंकफर्ट (जर्मनी); पेरिस (फ्रांस); और वैंकूवर (कनाडा) के समान अक्षांश में स्थित है। जलवायु प्राग में आर्द्र महाद्वीपीय जलवायु (कोपेन डीएफबी) है। सर्दियों में बहुत कम धूप के साथ औसत तापमान जमने के बिन्दु के पास तक पहुच जाता हैं। नवंबर के मध्य से मार्च के मध्य तक हिमपात आम बात है, और 20 सेमी (8 इंच) तक बर्फ जमा हो जाना सामान्य हैं। ग्रीष्मकाल के दौरान आमतौर पर अधिक धूप होती है और अधिकतम तापमान 24 डिग्री सेल्सियस (75 डिग्री फारेनहाइट) तक पहुंच जाता हैं। यद्यपि गर्मियों में रात में भी काफी ठंड हो जाती हैं। प्राग (और बोहेमिया के अधिकांश निचले क्षेत्र में) में वर्षा कम होती है (मात्र 500 मिमी[20 इंच] प्रति वर्ष) क्योंकि यह सूडेट्स और अन्य पर्वत श्रृंखलाओं की बारिश की छाया में स्थित है। जनसंख्या 2011 की जनगणना के अनुसार, शहर के लगभग 14% निवासियों विदेशी है, जोकि देश के उच्चतम अनुपात है। 1378 के बाद से प्राग की जनसंख्या वृद्धि; संस्कृति शहर पारंपरिक रूप से यूरोप के सांस्कृतिक केंद्रों में से एक है, जहाँ कई सांस्कृतिक कार्यक्रम होते हैं। कुछ महत्वपूर्ण सांस्कृतिक संस्थानों में नेशनल थिएटर (नॉरदनी डिवाडलो) और एस्टेट्स थियेटर (स्टोवोवस्के या टिलोवो या नोस्टीकोवो डिवाडलो) शामिल हैं, जहां मोजार्ट डॉन गियोवानी और ला क्लेमेन्ज़ा डि टिटो के कार्यक्रम हुए थे। अन्य प्रमुख सांस्कृतिक संस्थान में रूडोल्फिनम हैं जोकि चेक फिलहारमोनिक ऑर्केस्ट्रा और म्यूनिसिपल हाउस का घर है जोकि प्राग सिम्फनी ऑर्केस्ट्रा के लिये प्रसिद्ध है। यूरोप में कम लागत वाली हवाईयात्रों की वृद्धि के साथ, प्राग एक लोकप्रिय सप्ताहांत शहर गंतव्य बन गया है। जिससे पर्यटक अपने कई…"} {"instruction": "Find the sum of all elements from the following list.", "input": "list1 = [1, 2, 3, 4, 5]", "output": "list_sum = 0 for num in list1: list_sum += num print(list_sum) # Output: 15"} {"instruction": "Develop an algorithm in Python for sorting the given array in increasing order", "input": "[5, 4, 3, 2, 1]", "output": "def bubbleSort(arr): \n n = len(arr) \n \n # Traverse through all array elements \n for i in range(n): \n \n # Last i elements are already in place \n for j in range(0, n-i-1): \n \n # traverse the array from 0 to n-i-1 \n # Swap if the element found is greater \n # than the next element \n if arr[j] > arr[j+1] : \n arr[j], arr[j+1] = arr[j+1], arr[j] \n \n# Driver code to test above \narr = [5, 4, 3, 2, 1] \nbubbleSort(arr) \n \nprint (\"Sorted array is:\") \nfor i in range(len(arr)): \n print (\"%d\" %arr[i]),"} {"instruction": "Design a C++ program to convert a given number from binary to decimal.", "input": "<>", "output": "#include #include int BinToDec(long long n) { int decimalNumber = 0, i = 0, remainder; while (n!=0) { remainder = n % 10; n /= 10; decimalNumber += remainder*pow(2,i); ++i; } return decimalNumber; } int main() { long long bNum; std::cout << \"Enter a binary number: \"; std::cin >> bNum; int dec = BinToDec(bNum); std::cout << \"Decimal Representation of \" << bNum << \" is \" << dec << std::endl; return 0; }"} {"instruction": "Write a python program to check if two given strings are anagrams. Anagrams are two strings which contain the same set of characters.", "input": "s1 = \"cat\", s2 = \"tac\"", "output": "def is_anagram(s1, s2):\n s1 = s1.lower()\n s2 = s2.lower()\n if len(s1) != len(s2):\n return False\n s1_dict = {}\n for char in s1:\n if char not in s1_dict:\n s1_dict[char] = 1\n else:\n s1_dict[char] += 1\n for char in s2:\n if char not in s1_dict:\n return False\n else:\n s1_dict[char] -= 1\n if s1_dict[char] < 0:\n return False\n return True"} {"instruction": "Design a function in Python to count the total number of prime numbers between the two given numbers (inclusive).", "input": "Start = 10, End = 20", "output": "def count_primes(start, end):\n count = 0\n for i in range(start, end+1):\n if is_prime(i):\n count += 1\n return count\n\ndef is_prime(num):\n for i in range(2, int(num**0.5) + 1):\n if num % i == 0:\n return False\n return True"} {"instruction": "Write a function to filter a list of strings based on a search term", "input": "", "output": "def filter_by_search_term(strings, search_term): return [string for string in strings if search_term in string]"} {"instruction": "Find the largest integer in this list?", "input": "[1, 4, 9, 3, 5]", "output": "largest_integer = max([1, 4, 9, 3, 5]) print(largest_integer) # Output: 9"} {"instruction": "Suggest a solution to improve the following Python code to minimize the running time.", "input": "def reverse_list(input_list): \n rev_list = [] \n for i in range(len(input_list)-1,-1,-1): \n rev_list.append(input_list[i]) \n return rev_list", "output": "def reverse_list(input_list): \n left = 0\n right = len(input_list) - 1\n while left < right:\n input_list[left], input_list[right] = input_list[right], input_list[left]\n left += 1\n right -= 1\n \n return input_list"} {"text": "[HI Wikipedia] जनकपुर\n\nजनकपुर नेपाल का प्रसिद्ध धार्मिक स्थल है ये नगर प्राचीन काल में मिथिला की राजधानी माना जाता है। यहाँ पर प्रसिद्ध राजा जनक थे। जो सीता माता के पिता थे। यह शहर भगवान राम की ससुराल के रूप में विख्यात है। वर्तमान स्थिति जनकपुर संप्रति नेपाल के जनकपुर अंचल और धनुषा जिला में स्थित है। भाषा-बोली यहाँ की प्रमुख भाषा मैथिली, हिन्दी और नेपाली है। इतिहास प्राचीन काल में यह विदेह राज्य की राजधानी थी। विदेह राज्य के संस्थापक निमि के वंश में महाराज सीरध्वज जनक 22 वें जनक थे, और अयोध्यापति राजा दशरथ के समकालीन थे। दाशरथि राम की अर्द्धांगिनी सीता मिथिलेश जनक सीरध्वज की पुत्री थी। महाकवि विद्यापति के ग्रंथ \"भू-परिक्रमा\" में स्पष्ट शब्दों में लिखा है कि जनकपुर से सात कोस दक्षिण महाराज जनक का राजमहल था : जनकपुरदक्षिणांशे सप्तक्रोश-व्यतिक्रमे। डिजगलमहाग्रामे गेहास्तु जनकस्य च।। जनकपुर की ख्याति कैसे बढ़ी और उसे राजा जनक की राजधानी लोग कैसे समझने लगे, इसके सम्बन्ध में एक अनुश्रुति प्रचलित है। कहा जाता है कि पवित्र जनक वंश का कराल जनक के समय में नैतिक अधःपतन हो गया। कौटिल्य ने प्रसंगवश अपनेअर्थशास्त्र में लिखा है कि कराल जनक ने कामान्ध होकर ब्राह्मण कन्या का अभिगमन किया। इसी कारण वह बन्धु-बान्धवों के साथ मारा गया। अश्वघोष ने भी अपने ग्रंथ बुद्ध चरित्र में इसकी पुष्टि की है। कराल जनक के वध के पश्चात् जनक वंश में जो लोग बच गये, वे निकटवर्ती तराई के जंगलों में जा छुपे। जहाँ वे लोग छिपे थे, वह स्थान जनक के वंशजों के रहने के कारण जनकपुर कहलाने लगा। सीता स्वयंबर कथा रामायण कथा के अनुसार जनक राजाओं में सबसे प्रसिद्ध सीरध्वज जनक हुए। यह बहुत ही विद्वान एवं धार्मिक विचारों वाले थे। शिव के प्रति इनकी अगाध श्रद्धा थी। इनकी भक्ति से प्रसन्न होकर भगवान शंकर ने इन्हें अपना धनुष प्रदान किया था। यह धनुष अत्यंत भारी था। जनक की पुत्री सीता धर्मपरायण थी वह नियमित रूप से पूजा स्थल की साफ-सफाई स्वयं करती थी। एक दिन की बात है जनक जी जब पूजा करने आए तो उन्होंने देखा कि शिव का धनुष एक हाथ में लिये हुए सीता पूजा स्थल की सफाई कर रही हैं। इस दृश्य को देखकर जनक जी आश्चर्य चकित रह गये कि इस अत्यंत भारी धनुष को एक सुकुमारी ने कैसे उठा लिया। इसी समय जनक जी ने तय कर लिया कि सीता का पति वही होगा जो शिव के द्वारा दिये गये इस धनुष पर प्रत्यंचा चढ़ाने में सफल होगा। अपनी प्रतिज्ञा के अनुसार राजा जनक ने धनुष-यज्ञ का आयोजन किया। इस यज्ञ से संपूर्ण संसार के राजा, महाराजा, राजकुमार तथा वीर पुरुषों को आमंत्रित किया गया। समारोह में अयोध्या के राजा दशरथ के पुत्र रामचंद्र और लक्ष्मण अपने गुरु विश्वामित्र के साथ उपस्थित थे। जब धनुष पर प्रत्यंचा चढ़ाने की बारी आई तो वहाँ उपस्थित किसी भी व्यक्ति से प्रत्यंचा तो दूर धनुष हिला तक नहीं। इस स्थिति को देख राजा जनक को अपने-आप पर बड़ा क्षोभ हुआ। गोस्वामी तुलसीदास ने रामचरित मानस में लिखा है- \"अब अनि कोउ माखै भट मानी, वीर विहीन मही मैं जानी तजहु आस निज-निज गृह जाहू, लिखा न विधि वैदेही बिबाहू सुकृतु जाई जौ पुन पहिहरऊँ, कुउँरि कुआरी रहउ का करऊँ जो तनतेऊँ बिनु भट भुविभाई, तौ पनु करि होतेऊँ न हँसाई\" राजा जनक के इस वचन को सुनकर लक्ष्मण के आग्रह और गुरु की आज्ञा पर रामचंद्र ने…"} {"instruction": "Create a function that filters an array for all numbers greater than the given number.", "input": "", "output": "def filter_array(arr, num): return [x for x in arr if x > num]"} {"instruction": "Create a css class to set the text color of a h1 element to blue.", "input": "", "output": "h1 { color: blue; }"} {"instruction": "given a sentence, Write a JavaScript program to find out whether the sentence contains all the vowels.", "input": "let sentence = \"This is an example sentence\";", "output": "function findVowels(sentence) { let count = 0; let vowels = \"aeiou\"; for (let char of sentence.toLowerCase()) { if (vowels.indexOf(char) !== -1) { count++; } } return count === 5; }"} {"instruction": "Write a regular expression that finds all the words in a given sentence that start with a lowercase letter.", "input": "Sentence: Hello World.", "output": "\\b[a-z]\\w+\\b"} {"instruction": "Create an HTML page to display the output of a JavaScript greeting message.", "input": "message: Welcome!", "output": " JavaScript Greeting Message

      Welcome!

      "} {"instruction": "Alter the following python code such that it prints \"Hello, world!\"", "input": "for x in range(1,10): print(x)", "output": "for x in range(1,10): if x == 5: print('Hello, world!') else: print(x)"} {"text": "[HI Wikipedia] थायलेसीन​\n\nथायलेसीन​ (Thylacine) आधुनिक युग का सबसे ज्ञात मांसाहारी धानीप्राणी (मारसूपियल​) था। इसे अपनी पीठ की धारियों के कारण तस्मानियाई शेर (Tasmanian tiger) भी कहा जाता है। कुछ लोग इस तस्मानियाई भेड़िया (Tasmanian wolf) भी बुलाते हैं। यह ऑस्ट्रेलिया की मुख्यभूमि, तस्मानिया द्वीप और न्यू गिनी का निवासी था लेकिन मानना है कि यह २०वीं सदी में विलुप्त हो गया। यह अपने 'थायलेसायनिडाए' (Thylacinidae) नामक जीववैज्ञानिक कुल की आख़री जीवित जाति थी क्योंकि अन्य सभी जातियाँ मध्यनूतन युग, यानि आज से ५० लाख वर्ष पूर्व, के अंत तक पहले ही विलुप्त हो चुकी थीं। विलुप्ति जब तक १८वीं और १९वीं सदियों में यूरोपी लोग ऑस्ट्रेलियाई मुख्यभूमि में आकर बसे, थायलेसीन​ वहाँ या तो विलुप्त हो चुका था या विलुप्ति की कागार पर था। लेकिन मुख्यभूमि से हटकर तस्मानिया के द्वीप पर यह तस्मेनियाई डेविल जैसे अन्य जातियों की तरह जीवित था। जब वहाँ भी यूरोपी लोगों का डेरा हुआ तो इसे मारने के लिए सरकारी इनाम दिए जाने लगे। धीरे-धीरे यह ख़त्म होने लगा। १९३६ में अंतिम ज्ञात थायलेसीन​ ने तस्मानिया की राजधानी होबार्ट के चिड़ियाघर में दम तोड़ दिया और यह जाति विलुप्त हो गई। इसकी विलुप्ति के कई कारण बताये जाते हैं जिनमें मानवों द्वारा शिकार, बिमारी का फैलना, तस्मानिया में कुत्तों का आ जाना और थायलेसीन​ के जंगली निवास स्थानों में इंसानों का आ धमकना शामिल हैं। जनवरी २०१३ में बहुत छानबीन के बाद वैज्ञानिकों में मानव-गतिविधियों को ही इसकी विलुप्ति का ज़िम्मेदार ठहराया। इन्हें भी देखें धानीप्राणी तस्मानियाई डेविल सन्दर्भ मांसाहारी धानीप्राणी डैसयूरोमोर्फ़ तस्मानिया के स्तनधारी ऑस्ट्रेलिया के धानीप्राणी"} {"instruction": "Given a list of strings, write a Python function to remove all the whitespaces from each string.", "input": "['Hello World ', 'Hi there', 'Good Morning']", "output": "def remove_whitespace(word_list):\n return [word.strip() for word in word_list]\n\nstripped_list = remove_whitespace(['Hello World ', 'Hi there', 'Good Morning'])\nprint(stripped_list)"} {"instruction": "Rewrite the following C++ function to Python.", "input": "int multiply(int a, int b)\n{\n int result = a * b;\n return result;\n}", "output": "def multiply(a, b):\n result = a * b\n return result"} {"instruction": "Write a Python function to calculate the greatest common factor (GCF) of two numbers.", "input": "Number 1: 15 \nNumber 2: 25", "output": "def gcf(m, n):\n while m != 0:\n m, n = n % m, m \n return n\n\nprint(gcf(15, 25))"} {"instruction": "Implement a function in Python to reverse a given list of numbers.", "input": "List: [1, 2, 4, 7, 9]", "output": "def reverseList(list):\n start = 0\n end = len(list) - 1\n \n while start < end:\n list[start], list[end] = list[end], list[start]\n start += 1\n end -= 1\n \n return list\n\nlist = [1, 2, 4, 7, 9]\n\nreverseList(list)\n# Output: [9, 7, 4, 2, 1]"} {"instruction": "Create a new list 'squared' that contains the squares of all the elements in the list 'nums'.", "input": "nums = [1, 2, 3, 4]", "output": "squared = [num**2 for num in nums]"} {"text": "[DE Wikipedia] Michael Kotulla\n\nMichael Kotulla (* 19. Juni 1960 in Hannover) ist ein deutscher Rechtswissenschaftler und Hochschullehrer. Leben Kotulla verließ 1976 die Hauptschule und machte bis 1979 eine Berufsausbildung zum Kfz-Mechaniker. Im Anschluss daran besuchte er zunächst 1979/1980 eine Berufsfachschule und von 1980 bis 1983 ein berufliches Gymnasium. Daraufhin folgte von 1983 bis 1984 der Grundwehrdienst bei der Bundeswehr. Nach seinem Abitur studierte er von 1984 bis 1989 Rechtswissenschaften und von 1985 bis 1993 teilweise parallel Geschichtswissenschaften an der Philipps-Universität Marburg. Sein erstes juristisches Staatsexamen legte er 1989 ab; das Geschichtsstudium beendete er 1993 als Magister Artium (M. A.). Zum Dr. jur. promoviert wurde er bereits 1991 in Marburg; 1993 legte er zudem sein zweites juristisches Staatsexamen ab. 1999 erfolgte seine Habilitation an der Universität Lüneburg. Im gleichen Jahr wurde Kotulla von der Universität Bielefeld auf den neu errichteten „Lehrstuhl für Öffentliches Recht, insbesondere Umweltrecht“ berufen. Seit dem 10. April 2002 ist Kotulla Direktor des Instituts für Umweltrecht, seit Januar 2009 Mitglied des Hochschulrates der Universität Trier. Kotulla war von 2010 bis 2012 Dekan der juristischen Fakultät der Universität Bielefeld. Bereits 2009–2010 und wieder 2012–2013 hatte er das Amt des Prodekans inne. Forschungsschwerpunkt Kotullas ist neben dem Umweltrecht die deutsche Verfassungsgeschichte ab 1806. Er ist Mitglied der Vereinigung für Verfassungsgeschichte. Zusammen mit Walter Frenz führt Kotulla die Schriftleitung der monatlich erscheinenden Fachzeitschrift Natur und Recht. Er ist verheiratet und hat zwei Kinder. Schriften (Auswahl) Die Tragweite der Grundrechte der revidierten preußischen Verfassung vom 31. Januar 1850. Frankfurt am Main [u. a.] 1992 (zugleich Diss., Univ. Marburg 1991). Rechtliche Instrumente des Grundwasserschutzes. Eine systematische Analyse des EG-, Bundes- und Landesrechts. Berlin [u. a.] 1999 (zugleich Habilitationsschrift Grundwasserschutz als Rechtsproblem, Lüneburg 1998). Das konstitutionelle Verfassungswerk Preußens (1848–1918). Eine Quellensammlung mit historischer Einführung. Heidelberg 2003. Deutsches Verfassungsrecht 1806–1918. Eine Dokumentensammlung nebst Einführungen. Bislang sechs Bände: Bd. 1: Gesamtdeutschland, Anhaltische Staaten und Baden. Berlin 2005. Bd. 2: Bayern. Berlin 2007. Bd. 3: Berg und Braunschweig. Berlin 2008. Bd. 4: Bremen. Berlin 2016. Bd. 5: Elsass-Lothringen. Berlin 2023. Bd. 18: Nassau. Berlin 2021. Deutsche Verfassungsgeschichte. Vom Alten Reich bis Weimar (1495–1934). Berlin 2008, ISBN 978-3-540-48705-0. Thüringische Verfassungsurkunden: Vom Beginn des 19. Jahrhunderts bis heute. Berlin, Heidelberg 2015. Umweltrecht und Umweltpolitik (UmweltWissenschaften) (=…"} {"instruction": "Query an SQL table called \"Students\" to get the names of all the enrolled students.", "input": "", "output": "SELECT Name FROM Students;"} {"instruction": "Create a python function for calculating the area of a circle given the radius.", "input": "", "output": "def area(radius): \n return 3.14 * radius * radius"} {"instruction": "Build a Python function that takes in two integers and returns the greatest common divisor.", "input": "4 and 8", "output": "def gcd(a, b):\n if b == 0:\n return a\n return gcd(b, a % b)\n\nprint(gcd(4, 8)) # Output: 4"} {"instruction": "Write a Python program to find the closest pair of points in a given set of points.", "input": "[[2, 3], [12, 30], [40, 50], [5, 1], [12, 10], [3, 4]]", "output": "import math\n\ndef closest_pair(points):\n closest_pair = None\n closest_distance = float('inf')\n for i in range(len(points)):\n for j in range(i + 1, len(points)):\n distance = calc_distance(points[i], points[j])\n if distance < closest_distance:\n closest_distance = distance\n closest_pair = (points[i], points[j])\n\n return closest_pair, closest_distance\n\ndef calc_distance(p1, p2):\n return math.sqrt((p2[0] - p1[0])**2 + (p2[1] - p1[1])**2)\n\npoints = [[2, 3], [12, 30], [40, 50], [5, 1], [12, 10], [3, 4]]\nclosest_pair, closest_distance = closest_pair(points)\n\nprint(closest_pair) # prints ([2, 3], [3, 4])\nprint(closest_distance) # prints 1.0"} {"instruction": "What is the correct syntax to create a dictionary in Python?", "input": "", "output": "my_dict = {'key1':'value1','key2':'value2'}"} {"instruction": "Extract only the digits from a given string using Python.", "input": "", "output": "import re def extract_digits(string): regex = r\"\\D\" return re.sub(regex, \"\", string)"} {"instruction": "Create a Python script to convert the given JSON object into an XML document.", "input": "{ \"username\": \"John123\", \"age\": 23, \"country\": \"USA\" }", "output": "import xmltodict import json json_object = { \"username\": \"John123\", \"age\": 23, \"country\": \"USA\" } xml_message = xmltodict.unparse(json.loads(json.dumps(json_object)), pretty=True) print(xml_message) Output: John123 23 USA "} {"text": "[CS Wikipedia] Albert Goodheir\n\nAlbert Goodheir (26. června 1912, Utrecht, Nizozemsko – 27. prosince 1995, Glasgow, Spojené království) byl skotský lékař, spisovatel, překladatel a esperantista. Dílo Vlastní dílo Merlo sur menhiro Fondita sur roko''' Nia kultura heredaĵo kaj esperanto Překlady D-ro Jekyll kaj S-ro Hyde - L. Stevenson Forkaptita - L. Stevenson La noktmeza kortumo - B. Merrinian Bakĥanti-noj - Eurípidés Prometeo ligita - Aischylos Apologio de Sokrato kaj Kritono'' - Platon Související články Esperantská literatura Externí odkazy https://www.webcitation.org/query?id=1256546815744033&url=www.geocities.com/origlit/autor/goodheir.html Esperantská literatura Narození 26. června Narození v roce 1912 Narození v Utrechtu Úmrtí 27. prosince Úmrtí v roce 1995 Úmrtí v Glasgow Muži"} {"instruction": "Write code in Python using PyTorch to predict the outcome of a binary classification problem.", "input": "Not applicable", "output": "import torch\nimport torch.nn as nn\n\n# input data\nX = torch.tensor([[0.5, 0.4], [0.7, 0.2], [0.3, 0.1], [0.6, 0.9]]) \ny = torch.tensor([0, 1, 0, 1])\n\n# define the model\nmodel = nn.Sequential(\n nn.Linear(2, 1), \n nn.Sigmoid())\n\n# define the loss function and the optimization algorithm\ncriterion = nn.BCELoss()\noptimizer = torch.optim.SGD(model.parameters(), lr=0.1)\n\n# train the model\nepochs = 100\nfor epoch in range(epochs):\n outputs = model(X)\n\n # calculate the loss\n loss = criterion(outputs, y)\n\n # backprop and perform Adam optimisation\n optimizer.zero_grad()\n loss.backward()\n optimizer.step()\n\n# make predictions\npred = model(X).detach().round()\nprint(pred)"} {"instruction": "Create a program in Python to design and implement a knapsack problem.", "input": "n = 5, W = 8, weights = [2, 3, 4, 5, 6], values = [2, 5, 6, 12, 9]", "output": "def knapsack(n, W, weights, values): \n # create a 2D array, dp[n+1][W+1], and fill with zeros \n dp = [[0 for x in range(W+1)] for x in range(n+1)] \n\n  #iterating over array rows \n for i in range(n+1): \n #iterating over array columns \n for w in range(W+1): \n if i==0 or w==0 : \n dp[i][w] = 0\n elif weights[i-1] <= w: \n dp[i][w] = max(values[i-1] + dp[i-1][w-weights[i-1]], dp[i-1][w]) \n else: \n dp[i][w] = dp[i-1][w] \n \n return dp[n][W] \n\n# test\nprint(knapsack(5, 8, [2, 3, 4, 5, 6], [2, 5, 6, 12, 9]))\n# Output: 20"} {"instruction": "Generate an array of 10 random numbers between 1 and 100 using Python", "input": "", "output": "import random def generate_random_array(n): array= [] for _ in range(n): array.append(random.randint(1, 100)) return array print(generate_random_array(10)) // Output // [14, 20, 32, 84, 59, 45, 11, 34, 57, 19]"} {"instruction": "Create a list of all prime numbers from 1 to 1000 using Python.", "input": "", "output": "# Create an empty list \nprime_list = []\n\n# loop 1 to 1000\nfor num in range(2,1001):\n prime = True\n for i in range(2,num):\n if (num % i == 0):\n prime = False\n if prime:\n prime_list.append(num)\n\nprint(\"Prime numbers from 1 to 1000 are:\")\nprint(prime_list)"} {"instruction": "What is the purpose of using a data structure?", "input": "", "output": "The purpose of using a data structure is to store, organize, and manipulate data quickly and effectively. By using an appropriate data structure depending on the type of data and the operations being performed, it is possible to make data processing efficient and improve the performance of the program."} {"instruction": "Design a program in Python to detect the vowel in a given string.", "input": "Hello World", "output": "def vowelCheck(inputString): \n vowels = ['a','e','i','o','u','A','E','I','O','U'] \n for x in inputString: \n if x in vowels: \n return x"} {"instruction": "Generate a dictionary with 10 elements and display it.", "input": "", "output": "dictionary = { 'A': 'Apple', 'B': 'Ball', 'C': 'Cat', 'D': 'Dog', 'E': 'Elephant', 'F': 'Fish', 'G': 'Goat', 'H': 'Horse', 'I': 'Ink', 'J': 'Jelly' } print(dictionary)"} {"instruction": "Find the sum of three numbers and add five to it.", "input": "a = 4, b = 7, c = 10", "output": "sum = a + b + c result = sum + 5"} {"instruction": "Create a Python script that inputs an integer and prints \"odd\" if the number is odd, or \"even\" if the number is even.", "input": "", "output": "def check_even_or_odd(num): if num % 2 == 0: print(\"even\") else: print(\"odd\") check_even_or_odd(5) # odd"} {"instruction": "Find the reverse of an array in Python.", "input": "arr = [1, 2, 3, 4, 5]", "output": "arr = [5, 4, 3, 2, 1]"} {"instruction": "Write a Python program to generate a table of values for sin and cos functions between 0 and 10.", "input": "Not applicable", "output": "import math \n\ndef generate_table(): \n \n # headers \n print (\"angle (in degrees) sin(angle) cos(angle)\") \n \n # values \n for angle in range(0, 370, 10): \n print(\"{:7} {:15.4f} {:15.4f}\".format(angle,math.sin(math.radians(angle)),math.cos(math.radians(angle)))) \n\nif __name__ == \"__main__\": \n generate_table()"} {"instruction": "Please generate a Python script that calculates the mean of a given array of numbers.", "input": "[4, 9, 3, 5]", "output": "def calculateMean(array):\n # sum up all elements in the array\n mean = 0\n for i in range(len(array)):\n mean += array[i]\n # calculate the mean by dividing the sum by number of elements\n mean /= len(array)\n return mean\n\narray = [4, 9, 3, 5]\nmean = calculateMean(array)\nprint(mean)"} {"instruction": "Write a Python script that takes a paragraph as input and prints the unique words in it.", "input": "This is a sample paragraph.", "output": "paragraph = \"This is a sample paragraph.\"\n\n# split the string into words\nwords = paragraph.split()\n\n# sort the words alphabetically\nwords.sort()\n\n# remove duplicates\nunique_words = []\nfor word in words:\n if word not in unique_words:\n unique_words.append(word)\n\n# print the unique words\nprint(\", \".join(unique_words))"} {"text": "[EN Wikipedia] 2010 Vegalta Sendai season\n\n2010 Vegalta Sendai season. Competitions J. League 1 Emperor's Cup J. League Cup Player statistics Other pages J. League official site Vegalta Sendai Vegalta Sendai seasons"} {"instruction": "Create a python script to detect a palindrome from a given string.", "input": "", "output": "def is_palindrome(s):\n s = s.lower()\n return s == s[::-1]"} {"instruction": "Extract a character's count from a given string.", "input": "string = \"this is a sample string\"", "output": "def count_characters(string): '''This function takes a string as argument and returns a dictionary that contains the count of characters in the given string.''' # create an empty dictionary char_count = {} # iterate over the characters and add to dictionary if not already present for char in string: if char not in char_count: char_count[char] = 1 else: # Increment the count if already present char_count[char] += 1 return char_count"} {"instruction": "Create a function to delete a specific row from a table named 'Orders'.", "input": "Primary Key of the order: 1234", "output": "def delete_row(table, order_key): query = 'DELETE FROM {} WHERE order_key = ?'.format(table) try: cursor.execute(query, (order_key,)) cursor.commit() except: cursor.rollback() print('Error occurred while deleting order')"} {"instruction": "Change the given code so that the variable is incremented only if the condition returns true.", "input": "", "output": "x = 0 if (condition): x += 1"} {"instruction": "How would you create a for-loop in Python to iterate through all the integers from 1 to 10?", "input": "", "output": "for i in range(1,11): print(i)"} {"text": "[DE Wikipedia] Oblast Russe\n\nDie Oblast Russe () ist eine Verwaltungseinheit im Norden Bulgariens mit der gleichnamigen Stadt Russe als Verwaltungssitz. Die nördliche Grenze zu Rumänien wird durch den Verlauf der Donau gebildet. Auf 2.803 km² leben Einwohner. Verwaltungsgliederung Die Oblast Russe gliedert sich in acht Gemeinden (община), die wiederum aus 75 Orten bestehen. Städte Bevölkerung Nach der Volkszählung von 2011 leben in der Oblast Russe 174.774 Bulgaren, 28.503 Türken, 8533 Sinti und Roma, 527 Armenier, 355 Russen, 49 Rumänen, 48 Ukrainer, 19 Mazedonier und weitere Angehörige kleinerer ethnischen Gruppen. Weblinks Offizielle Seite der Oblast, bulgarisch/englisch Guide Bulgaria Einzelnachweise Russe"} {"text": "[CS Wikipedia] Vůz ARmpee832 ČD\n\n{{DISPLAYTITLE:Vůz ARmpee832 ČD}} Vozy ARmpee832, číslované v intervalu 61 54 85-71, jsou řadou osobních vozů první třídy s barovým oddílem z vozového parku Českých drah. Všechny tyto vozy (001–006) vznikly v letech 2009–2010 modernizací pěti vozů řady BRm830 a jednoho vozu řady BRcm831 v ŽOS Vrútky. Vznik řady První návrh na modernizaci pěti starších bistro vozů BRm830 a jednoho bistro vozu s oddíly s lehátky BRcm831 byl oznámen již v roce 2006, ale výběrové řízení bylo vypsáno až v září 2008. Celková cena zakázky měla být 200 milionů Kč, čili přibližně 33 milionů Kč za vůz, a všech šest vozů mělo být dodáno do 12 měsíců od podpisu smlouvy. V únoru 2009 bylo výběrové řízení uzavřeno. Do výběrového řízení se přihlásily dvě firmy, a tak o vítězi rozhodla nižší cena. Tu nabídla společnost ŽOS Vrútky, konkrétně 205 milionů Kč. Cena rekonstrukce jednoho vozu se zvýšila přibližně o jeden milion Kč na 34 milionů Kč. Prototypový vůz byl veřejnosti představen na Mezinárodním strojírenském veletrhu 2009 v Brně. Vůz měl při představení označení „BRm/ARmpee61 51 54 85-40 000-3“, sedačky v oddíle první třídy byly potaženy tmavě červenou látkou a sedačky v bistro oddíle modrou. V provozu s cestujícími se vůz s těmito odlišnostmi nikdy neobjevil. Technické informace Jsou to klimatizované vozy typu UIC-Z o délce 26 400 mm s nejvyšší povolenou rychlostí 160 km/h. Vozy jsou vybaveny podvozky typu GP 200 S 25. Brzdová soustava je tvořena kotoučovou brzdou DAKO s dvěma kotouči na každé nápravě a elektromagnetickou kolejnicovou brzdou pro nouzové brždění z vysokých rychlostí. Vozy mají dva páry jednokřídlých předsuvných nástupních dveří.. Mezivozové přechodové dveře jsou poloautomatické dvoukřídlé, posuvné do stran. Vnitřní oddílové dveře jsou poloutomatické jednokřídlé, posuvné do stran. Všechny dveře jsou ovládané tlačítky. Přibližně polovina oken těchto vozů je pevných, neotvíratelných, zbylá okna jsou výklopná v horní pětině. Vozy jsou půdorysně děleny na nástupní prostor s elektrickým rozvaděčem a WC pro cestující. Následuje velkoprostorový oddíl první třídy se čtyřmi fiktivními oddíly. Sedačky jsou umístěny proti sobě, a jsou mezi nimi umístěny rozkládací stolky. Jejich příčné uspořádání je 2 + 1. Celkem je pro cestující první třídy k dispozici 22 polohovatelných sedaček. Cestujícím jsou k dispozici i zásuvky 230 V. Po oddíle první třídy následuje bistro oddíl, ve kterém jsou na jedné straně dva čtyřmístné boxy a na druhé pult se šesti barovými stoličkami, čili celkem 14 míst k sezení. Za bistro oddílem se nachází kuchyňka, kolem které je podélná chodba. Na konci vozu je druhý nástupní prostor s WC pro obsluhu vozu. Všechny místa k sezení jsou potaženy světle hnědou látkou s kolečky. Interiér je proveden podle návrhu designového studia Najbrt. Do vozů byl při…"} {"text": "[EN Wikipedia] 1954 World Professional Match-play Championship\n\nThe 1954 World Professional Match-play Championship was a professional snooker tournament held from 5 October 1953 to 6 March 1954 across various locations in the British Isles. The final was held at Houldsworth Hall in Manchester, England. Fred Davis won his sixth World Snooker Championship title by defeating Walter Donaldson by 45 to 26 in the final after securing a winning lead at 36–15. Donaldson compiled a of 121, the highest of the tournament, on the last day of the final. There were nine entrants. Rex Williams and Harry Stokes were scheduled to play a preliminary match, with the winner joining the other seven players in the main draw, but Williams retired from the match due to illness. Defending champion Davis defeated Stokes and then John Pulman, to face Donaldson for the eighth consecutive world final. Donaldson had eliminated Kingsley Kennerley and Alec Brown to reach the final. During the final, Donaldson announced his retirement from future world championship events. Background The World Snooker Championship is a professional tournament and the official world championship of the game of snooker. The sport was developed in the late 19th century by British Army soldiers stationed in India. Professional English billiards player and billiard hall manager Joe Davis noticed the increasing popularity of snooker compared to billiards in the 1920s, and with Birmingham-based billiards equipment manager Bill Camkin, persuaded the Billiards Association and Control Council (BACC) to recognise an official professional snooker championship in the 1926–27 season. In 1927, the final of the first professional snooker championship was held at Camkin's Hall; Davis won the tournament by beating Tom Dennis in the final. The annual competition was not titled the World Championship until 1935, but the 1927 tournament is now referred to as the first World Snooker Championship. Davis also won the title each year until 1940, when the contest was cancelled during World War II, and again when the championship resumed in 1946, accumulating a total of 15 titles before retiring from the event. In 1952, the World Professional Match-play Championship was created following a dispute between the Professional Billiards Players' Association (PBPA) and the BACC. In response to player complaints that the BACC was taking too large a percentage of income from the tournament, the BACC claimed that the championship \"has always been, and in theory is to be, regarded as an affair of honour and a test of merit\", and that \"every effort is made to arrange terms advantageous to the professionals competing in the championship, compatible with securing an equitable return for the promoters of it, the B.A.& C.C.\" The PBPA members established an alternative competition which became known as…"} {"instruction": "Create a Python script to generate a random password with at least one uppercase, one lowercase and one number.", "input": "", "output": "import string\nimport random\n\ndef generate_password():\n letters = string.ascii_letters + string.digits\n password = list(random.choice(letters) for i in range(8))\n while not any(l.isupper() for l in password) or not any(l.islower() for l in password) or not any(l.isdigit() for l in password):\n password = list(random.choice(letters) for i in range(8))\n return ''.join(password)\n\npassword = generate_password() \nprint(\"Random password is:\", password)"} {"instruction": "Generate a Python class for an address book program. The class should contain methods for adding a new person's name, phone number and email, and editing an existing contact.", "input": "Not applicable", "output": "class AddressBook:\n def __init__(self):\n self.people = {}\n\n def add_person(self, name):\n self.people[name] = { 'phone': None, 'email': None }\n \n def edit_person(self, name, phone=None, email=None):\n person = self.people[name]\n if phone: \n person['phone'] = phone\n if email:\n person['email'] = email"} {"text": "[HI Wikipedia] बार्बी रैपुन्ज़ेल\n\nबार्बी रैपुन्ज़ेल (अंग्रेज़ी: Barbie as Rapunzel) एक २००२ प्रत्यक्ष-से-वीडियो कंप्यूटर एनिमेटेड फिल्म है। यह फिल्म 2 समग्र बार्बी फिल्म श्रृंखला में। इस बार्बी के रूप में केली शेरिडन की आवाज सुविधाएँ। हिंदी डबिंग संस्करण बार्बी के रूप में राजश्री नाथ सुविधाएँ। कहानी अनुकूलित है से ब्रदर्स ग्रिम परियों की कहानी \"रैपुन्ज़ेल\"। यह भारत, द हिन्दी डबिंग संस्करण में जारी किया गया था को ४ मई, २००४ पर VCD, काफी समय बाद उत्तर अमेरिकी रिलीज होने के बाद। प्लॉट बार्बी एक कहानी बताता है उसकी छोटी बहन केली, जो उसकी पेंटिंग की क्षमता में विश्वास नहीं है। रैपुन्ज़ेल एक नौकर के रूप में रहता है चुड़ैल गोठेल, जो एक जंगल में अलग मनोर में रहता है। वह ऊपर विश्वास है कि गोठेल उसे एक शिशु के रूप में परित्याग से बचाया बढ़ता। रैपुन्ज़ेल पेनेलोप में साहचर्य पाता है, एक निवर्तमान ड्रैगन, और होबी, एक चिंताजनक खरगोश। रैपुन्ज़ेल क्या खाली समय खर्च करती है वह स्थानों पर वह जा रही के सपने के सुंदर चित्र पेंटिंग है जब वह एक दिवसीय नि: शुल्क है। हालांकि, गोठेल मंजूरी नहीं रैपुन्ज़ेल शौक और उसे सब कुछ है कि गोठेल उसके लिए किया गया है कि प्रशंसा नहीं की आरोप लगाया। जबकि गोठेल के लिए चाय की तैयारी, पेनेलोप गलती से एक गुप्त सीढ़ी जो मनोर के नीचे एक पुराने कमरे की ओर जाता है पाता है। शुरू में वे इसे उसके माता पिता, जो कथित तौर पर उसे सुनसान से एक उपहार की खोज: एक चांदी निम्नलिखित के साथ उत्कीर्ण कंघी: \"लगातार ऊपर सितारों के रूप में, हमेशा पता है कि आप प्यार करते हैं। हमारी बेटी को उसका पहला जन्मदिन पर रैपुन्ज़ेल. के साथ हमेशा के लिए प्यार, माँ और पिताजी।\" इन शब्दों के युवा कलाकार पहली बार के लिए उसके अतीत पूछताछ छोड़ दें। उसकी मोड़ जल्दी बाधित है चाय के लिए हैं गोठेल कॉल द्वारा। गोठेल उसे भोजन की सेवा के बाद, रैपुन्ज़ेल और उसके दोस्तों के तहखाने जहां पेनेलोप अभी तक एक और रहस्य उजागर फिर से आना: एक सुरंग के पास के गांव में अग्रणी है। रैपुन्ज़ेल इस पथ लेता है छोटे किंगडम के लिए और एक राजकुमारी नाम कैटरीना बचाव करने में सक्षम है से एक ख़तरा। इसके तुरंत बाद, रैपुन्ज़ेल है कैटरीना बड़े भाई के लिए शुरू की, द सुंदर राजकुमार स्टेफन। वह बताते हैं से उसके कि जाल कैटरीना के लिए भागने में कामयाब वहाँ डाल दिया गया था किंग विल्हेम एक दूसरे राज्य के शासक। रहस्यमय प्रथम द्वारा मंत्रमुग्ध, स्टेफन पूछता है उसे फिर से मिलने जो वह इससे सहमत हैं, हालांकि अपनी बैठक अचानक समाप्त हो गया है पहले स्टेफन उसे उसका नाम बता सकते हैं जब वह जल्दी वापस जंगल में जाती है से बचने के लिए किया जा रहा है गोठेल द्वारा की खोज सकता है। रॅपन्ज़ेल के लिए अज्ञात, है गोठेल पालतू फेर्रेट, ओटो, पूरे विनिमय देखी गई है। नाराज, गोठेल मांग है रॅपन्ज़ेल उसके लड़के का नाम बताओ। रॅपन्ज़ेल का कहना है कि वह यह नहीं पता है, लेकिन करता गोठेल उसे विश्वास नहीं करता, वह सोच है कि वह जानता था कि अपने अस्तित्व के बावजूद किया गया है उसे करने के लिए झूठ बोल। रैपुन्ज़ेल उसे बताता है कि वह उसे दूर बंद नहीं रख सकते हमेशा के लिये, जो गोठेल जवाब: \"घड़ी मुझे\"। गोठेल नष्ट कर देता है रैपुन्ज़ेल रंग और चित्रों एक लंबा टॉवर में उसके बेडरूम में बदलने से पहले और…"} {"instruction": "Create a class that can represent a 2D coordinate system.", "input": "", "output": "\"\"\" Create a class that can represent a 2D coordinate system \"\"\" class CoordinateSystem: def __init__(self,x,y): self.x = x self.y = y def add(self,other): x = self.x + other.x y = self.y + other.y return CoordinateSystem(x,y) if __name__ == '__main__': a = CoordinateSystem(1,2) b = CoordinateSystem(3,4) print(a.add(b)) # <__main__.CoordinateSystem object at 0x000002B50FE37B70>"} {"instruction": "Train a recurrent neural network in Python to generate a text summary of a given article", "input": "The text of a news article about the US 2020 presidential election", "output": "import tensorflow as tf\nfrom tensorflow.keras.layers import Input, Dense, Embedding, GRU, Dropout\n\ndef build_model(vocab_size, embedding_dim):\n model = tf.keras.Sequential()\n # Embedding layer\n model.add(Embedding(vocab_size, embedding_dim, input_length=500))\n # GRU layer\n model.add(GRU(128, dropout=0.25))\n # Dropout layer\n model.add(Dropout(0.5))\n # Output layer\n model.add(Dense(vocab_size, activation='softmax'))\n return model"} {"text": "[HI Wikipedia] जिब्राल्टर आम चुनाव, 2011\n\nजिब्राल्टर आम चुनाव ब्रिटिश प्रवासी शासित प्रदेश जिब्राल्टर में 8 दिसम्बर 2011 के दिन आयोजित हुए थे। चुनाव के अंदर दो दल (जिब्राल्टर सोशल डैमोक्रैट्स और प्रोग्रेसिव डैमोक्रेटिक पार्टी) तथा एक गठबंधन (जिब्राल्टर सोशलिस्ट लेबर पार्टी और जिब्राल्टर लिबरल पार्टी) ने अपने उम्मीदवार उतारे थे। चुनाव जिब्राल्टर संसद की 17 सीटो के लिए आयोजित किया गया था। जिब्राल्टर सोशलिस्ट लेबर पार्टी और जिब्राल्टर लिबरल पार्टी के गठबंधन कुल दस सीट जीत कर नई सरकार बनाई तथा फेबियन पिकार्डो जिब्राल्टर के नए मुख्यमंत्री बने। दल चुनाव में न्यू जिब्राल्टर डेमोक्रेसी को छोड़ कर जिब्राल्टर के सभी सक्रीय दलों ने हिस्सा लिया था। जिब्राल्टर सोशलिस्ट लेबर पार्टी और जिब्राल्टर लिबरल पार्टी ने अपना गठबंधन इस चुनाव में भी जारी रखा। जिब्राल्टर सोशल डैमोक्रैट्स और प्रोग्रेसिव डैमोक्रेटिक पार्टी स्वतंत्र रूप से भाग लिया। परिणाम चुनाव में जिब्राल्टर सोशलिस्ट लेबर पार्टी और जिब्राल्टर सोशल डैमोक्रैट्स ने सात-सात सीटें प्राप्त करीं। जिब्राल्टर लिबरल पार्टी को तीन सीटें मिली तथा प्रोग्रेसिव डैमोक्रेटिक पार्टी को कोई सीट प्राप्त नहीं हुई। कुल मतदान 81.4 प्रतिशत हुआ। जिब्राल्टर सोशल डैमोक्रैट्स को सबसे अधिक 81,721 वोट मिले, उसके पश्चात जिब्राल्टर सोशलिस्ट लेबर पार्टी को 59,824, जिब्राल्टर लिबरल पार्टी को 25,590 तथा प्रोग्रेसिव डैमोक्रेटिक पार्टी को केवल 7,622 वोट ही प्राप्त हुए। जिब्राल्टर सोशलिस्ट लेबर पार्टी और जिब्राल्टर लिबरल पार्टी के गठबंधन ने कुल दस सीट जीत कर नई सरकार बनाई। जिब्राल्टर सोशल डैमोक्रैट्स सात सीटों के साथ मुख्य और एकमात्र विपक्षी दल बना। सन्दर्भ 2011"} {"instruction": "Write a Python function to calculate the maximum value of two numbers given by the user.", "input": "x = 24\ny = 63", "output": "def maximum_numbers(x, y):\n if x > y:\n return x\n else:\n return y\n\nprint(maximum_numbers(x, y))"} {"text": "[CS Wikipedia] Lusigny-sur-Barse\n\nLusigny-sur-Barse je francouzská obec v departementu Aube v regionu Grand Est. V roce 2010 zde žilo 1 755 obyvatel. Vývoj počtu obyvatel Související články Seznam obcí v departementu Aube Externí odkazy Reference Obce v departementu Aube"} {"instruction": "Generate python code to encode a given string in base64.", "input": "string = 'This is a test string.'", "output": "def base64_encode(string):\n encoded_string = base64.b64encode(string.encode('utf-8')) \n return encoded_string.decode('utf-8')"} {"instruction": "Optimize a program in Python for searching for a string in a list.", "input": "value = 'apple'\nlist = ['bannanas', 'oranges', 'apple']", "output": "def search(value, list):\n for i in range(len(list)):\n if list[i] == value:\n return i\n return -1\n\nvalue= 'apple'\nlist = ['bannanas', 'oranges', 'apple']\nprint(search(value, list))"} {"instruction": "Write a Ruby program to create a class called \"Person\" with variables such as name, age, gender, etc.", "input": "", "output": "class Person attr_accessor :name, :age, :gender def initialize(name, age, gender) @name = name @age = age @gender = gender end end"} {"instruction": "Generate a query in SQL which can retrieve the maximum price for each product.", "input": "", "output": "SELECT product_id, MAX(price) FROM product_table GROUP BY product_id;"} {"text": "[HI Wikipedia] महर्षि दयानन्द सरस्वती विश्वविद्यालय, अजमेर\n\nमहर्षि दयानन्द सरस्वती विश्वविद्यालय, अजमेर भारत का एक प्रमुख विश्वविद्यालय है। इसकी स्थापना १९८७ में हुई थी। 'नेशनल असेसमेण्ट ऐण्ड एक्रेडिशन काउन्सिल बंगलुरु' ने २००४ में इसे बी++ ग्रेड दिया था। लगभग २०० से अधिक महाविद्यालय इससे सम्बद्ध हैं। बाहरी कड़ियाँ महर्षि दयानन्द सरस्वती विश्वविद्यालय, अजमेर का जालघर भारत के विश्वविद्यालय राजस्थान में विश्वविद्यालय और कॉलेज"} {"instruction": "Write an SQL query to select all employees from department 1 having a salary greater than 50,000.", "input": "", "output": "SELECT * FROM employees WHERE department = 1 AND salary > 50000;"} {"instruction": "Create a Python program to scramble a given string and return the scrambled version.", "input": "The string: \"Hello World\"", "output": "import random\n\ndef scrambleString(string):\n # Split the string into a list\n chars = list(string)\n\n # Shuffle the list\n random.shuffle(chars)\n\n # Join the list to form the scrambled string\n scrambled = \"\".join(chars)\n\n return scrambled\n\n# Create the string\nstring = \"Hello World\"\n\n# Scramble the string\nscrambled = scrambleString(string)\n\n# Print the result\nprint(scrambled)"} {"instruction": "Create a HTML code to show a green square with a width of 100px and a height of 100px.", "input": "", "output": "
      "} {"text": "[DE Wikipedia] Liste der Monuments historiques in Marac\n\nDie Liste der Monuments historiques in Marac führt die Monuments historiques in der französischen Gemeinde Marac auf. Liste der Immobilien |} Weblinks Marac Marac !"} {"instruction": "Implementation the quicksort algorithm using c++.", "input": "", "output": "// C++ code for quick sort #include using namespace std; // A utility function to swap two elements void swap(int* a, int* b) { int t = *a; *a = *b; *b = t; } /* This function takes last element as pivot, places the pivot element at its correct position in sorted array, and places all smaller (smaller than pivot) to left of pivot and all greater elements to right of pivot */ int partition (int arr[], int low, int high) { int pivot = arr[high]; // pivot int i = (low - 1); // Index of smaller element for (int j = low; j <= high- 1; j++) { // If current element is smaller than or // equal to pivot if (arr[j] <= pivot) { i++; // increment index of smaller element swap(&arr[i], &arr[j]); } } swap(&arr[i + 1], &arr[high]); return (i + 1); } /* The main function that implements QuickSort arr[] --> Array to be sorted, low --> Starting index, high --> Ending index */ void quickSort(int arr[], int low, int high) { if (low < high) { /* pi is partitioning index, arr[p] is now at right place */ int pi = partition(arr, low, high); // Separately sort elements before // partition and after partition quickSort(arr, low, pi - 1); quickSort(arr, pi + 1, high); } } /* Function to print an array */ void printArray(int arr[], int size) { int i; for (i=0; i < size; i++) cout << arr[i] << \" \"; cout << endl; }"} {"text": "[DE Wikipedia] Kosch-Prinzip\n\nDas Kosch-Prinzip (auch Kosh, Qosh, Qoʻsh, Kasch, Kash oder Qash geschrieben) ist ein städtebauliches Prinzip der Anordnung zweier repräsentativer Bauten in zentralasiatischen Städten. Der Name ist aus dem persischen Wort „Qash“ abgeleitet, das „gegenüber“ bedeutet. Anordnung Gemäß dem Kosch-Prinzip werden die zwei Bauwerke, beispielsweise Moscheen oder Madrasas, die in der Regel die gleiche Größe haben, so angeordnet, dass ihre Prunkfassaden einander auf derselben Hauptachse gegenüberliegen. Oft sind neben den in der Mittelachse angeordnete Pischtake mit Iwanen auch weitere Fassadenelemente wie Arkaden, Fensterachsen oder Ecktürme einander gegenüberliegend angeordnet, so dass die zwei Gebäude einander wie Bild und Spiegelbild gegenüberstehen. Beispiele Ein Beispiel für eine strenge Symmetrie ist der Registan in Samarqand, wo die Ulugʻbek-Madrasa und die Sher-Dor-Madrasa einander symmetrisch gegenüberstehen. Ein weiteres Beispiel für strenge Symmetrie sind die Allah-Quli-Khan-Madrasa und die Qutlugh-Murad-Inak-Madrasa in Xiva. Bei dem Poi-Kalon-Ensemble in Buxoro dagegen ist die Symmetrie durchbrochen. Die Kalon-Moschee ist niedriger als die ihr auf derselben Hauptachse gegenüberliegende Mir-Arab-Madrasa, hat dafür aber eine größere Breite. Durchbrochen ist die Symmetrie auch in dem Gebäudeensemble Labi Hovuz in Buxoro, in dem sich die Nodir-Devonbegi-Chanaqa und die Nodir-Devonbegi-Madrasa auf derselben Hauptachse gegenüberliegen. Zwar haben beide Bauwerke einen hohen Pischtak, aber die Khanaqa ist deutlich schmaler, bei ihr fehlen die zweigeschossigen Spitzbogenarkaden der Madrasa, und die Ecktürme stehen direkt neben dem Pischtak. Außerdem liegen zwischen den beiden Gebäuden ein Bassin und ein Park, so dass der Bezug der Gebäude zueinander optisch geschwächt ist. Bei der Qoʻsh-Madrasa in Buxoro, einer Doppel-Madrasa, die das Anordnungsprinzip sogar im Namen trägt, sind zwar die Fassaden der Modari-Khan-Madrasa und der Abdullah-Khan-Madrasa mit allen ihren Einzelelementen (Pischtak, Iwan, Arkaden, Ecktürme) streng spiegelsymmetrisch zueinander angeordnet. Die Symmetrie ist allerdings dadurch durchbrochen, dass die beiden Gebäude nicht dieselbe Hauptachse haben. Die Achse der Modari-Khan-Madrasa ist schräg zu der Symmetrieachse angeordnet, so dass ihre Fassade schräg zu dem Rest des Gebäudes steht. Siehe auch Kosch-Madrasa Literatur Weblinks Bernhard Peter: Das Kosh-Prinzip in der Architektur auf www.bernhardpeter.de Einzelnachweise Stadtbaugeschichte (Islam) Zentralasien Architektur des Mittelalters"} {"instruction": "Develop a Java program to rotate a two-dimensional array clockwise by 90 degrees.", "input": "[[1, 2], [3, 4]]", "output": "public class RotateMatrix { public static void rotate(int[][] arr, int n) { for (int x = 0; x < n/2; x++) { for (int y = x; y < n-x-1; y++) { int temp = arr[x][y]; arr[x][y] = arr[y][n-1-x]; arr[y][n-1-x] = arr[n-1-x][n-1-y]; arr[n-1-x][n-1-y] = arr[n-1-y][x]; arr[n-1-y][x] = temp; } } } }"} {"instruction": "Edit this Python program to make the output more accurate", "input": "def calculate_average(numbers):\n total = 0\n for n in numbers:\n total += n\n return float(total) / len(numbers)", "output": "def calculate_average(numbers):\n total = 0\n for n in numbers:\n total += n\n return float(total) / len(numbers) if len(numbers) > 0 else 0"} {"text": "[DE Wikipedia] Pfarrkirche Preding\n\nDie römisch-katholische Pfarrkirche Preding steht auf einer Anhöhe in der Marktgemeinde Preding im Bezirk Deutschlandsberg in der Steiermark. Die auf die heilige Maria im Dorn geweihte Pfarrkirche und Wallfahrtskirche gehörte bis Ende August 2018 zum dann aufgelösten Dekanat Deutschlandsberg in der Diözese Graz-Seckau, seit Auflassung dieses Dekanates liegt sie im Seelsorgeraum Südweststeiermark. Die Kirche steht unter . Geschichte 1355 wurde eine Pfarre genannt. 1532 war bei einem Türkeneinfall ein Brand. Unter Verwendung von gotischen Bauteilen erfolgten 1699 und 1745 Neubauten. Architektur Das breite dreijochige Langhaus hat ein Kreuzgratgewölbe auf Doppelgurten und Doppelpilastern in der Art des Jakob Schmerlaib (um 1699). Der zweijochige Chor mit einem Fünfachtelschluss hat ein Platzlgewölbe auf Gurten auf kräftig gestuften Wandpilastern mit Gesimskapitellen und Stuckrahmenleisten (um 1743). Ausstattung Der Hochaltar und die Seitenaltäre im Stil des Rokoko in der Art des Jakob Peyer wurden 1765 konsekriert und 1893 neu vergoldet. Am 20. August 1843 wurde der Körper der heiligen Märtyrerin Faustina in einer Prozession in die Pfarrkirche gebracht und dort nach den für die darauffolgende Woche angesetzten Feierlichkeiten am 27. August unter der Mensa des Hochaltars beigesetzt. Diese Reliquie stammte aus den Katakomben in Rom und war durch Vermittlung von Karl Graf von Welserheimb zunächst in die Grazer Franziskanerkirche gebracht worden. Von dort wurde sie durch Fürstbischof Zängerle auf Ersuchen des Pfarrers Franz Löschenkohl der Pfarrgemeinde Preding weitergegeben. Ob diese Reliquie in einer (bzw. in welcher) Beziehung zur Reliquie der Hl. Faustina in der Annakapelle der Pfarrkirche Dingolfing steht, ist in der Quelle nicht behandelt. Die Orgel wurde 1937 gebaut. Vom Vorgängerwerk, 1741 vom Grazer Orgelmacher Johann Georg Mitteregger aufgestellt, sind Statuen erhalten, die einen Engel und König David darstellen. Die Orgel der Pfarrkirche wurde 2022 vom Orgelbaumeister Drago Lukmann vollständig renoviert und in einem Festgottesdienst am 20. November 2022 neu geweiht. Literatur Die Kunstdenkmäler Österreichs. Dehio Steiermark (ohne Graz) 1982. Preding, Pfarr- (Wallfahrts-) kirche hl. Maria im Dorn, S. 375–376. Vinzenz Lödler: Geschichte von Preding – von den ältesten Zeiten bis 1906. Graz, Moser 1906. Simadruck Deutschlandsberg. Weblinks Einzelnachweise Preding Preding Preding Preding Preding Preding Baudenkmal (Steiermark) Preding Gotisches Bauwerk in der Steiermark Preding Barockbauwerk in der Steiermark"} {"instruction": "Create a web application that allows users to search for movies and save their favorites.", "input": "", "output": "\"\"\" Create a web application that allows users to search for movies and save their favorites \"\"\" # Import libraries import flask import sqlalchemy # Create Flask application app = flask.Flask(__name__) # Connect to database engine = sqlalchemy.create_engine('sqlite:///movies.db') # Define routes @app.route(\"/\") def index(): # Return homepage return flask.render_template(\"index.html\") @app.route(\"/search\") def search(): # Get search terms from query string terms = flask.request.args.get(\"terms\") # Query database conn = engine.connect() query = f\"SELECT * FROM movies WHERE title LIKE '%{terms}%'\" results = conn.execute(query).fetchall() conn.close() # Render results return flask.render_template(\"search.html\", results=results) @app.route(\"/save\") def save(): # Get the movie id from query string movie_id = flask.request.args.get(\"id\") # Save the movie to the database conn = engine.connect() query = f\"INSERT INTO favorites (movie_id) VALUES ({movie_id})\" conn.execute(query) conn.close() # Redirect to homepage return flask.redirect(\"/\") if __name__ == '__main__': app.run(debug=True)"} {"instruction": "Generate a Python program to check if any element of a given list is palindrome or not.", "input": "list1 = [12, 121, 3]", "output": "list1 = [12, 121, 3]\n\n# Iterate through the list\nfor element in list1:\n # Convert the element to a string\n element = str(element)\n \n # Check if the element is a palindrome\n if element == element[::-1]:\n print(element + \" is a palindrome\")\n else:\n print(element + \" is not a palindrome\")"} {"instruction": "Construct an SQL query to select the total number of employees in the table 'Employees'.", "input": "", "output": "SELECT COUNT(*) FROM Employees;"} {"instruction": "Translate the following JSON into an XML format.", "input": "{ \"person\": { \"name\": \"Jane\", \"age\": 30 } }", "output": " Jane 30 "} {"instruction": "Create a Python program to process raw customer data into a summary report.", "input": "Raw Customer Data (JSON):\n[\n {\n \"customer_name\": \"John Doe\",\n \"total_amount_spent\": 2000\n },\n {\n \"customer_name\": \"Jane Doe\",\n \"total_amount_spent\": 800\n },\n {\n \"customer_name\": \"Joe Smith\",\n \"total_amount_spent\": 200\n }\n]", "output": "import json\n\nraw_data = [\n {\n \"customer_name\": \"John Doe\",\n \"total_amount_spent\": 2000\n },\n {\n \"customer_name\": \"Jane Doe\",\n \"total_amount_spent\": 800\n },\n {\n \"customer_name\": \"Joe Smith\",\n \"total_amount_spent\": 200\n }\n]\n\n# calculate total amount spent\ntotal_amount_spent = 0\nfor customer in raw_data:\n total_amount_spent += customer['total_amount_spent']\n\n# generate summary report\nsummary_report = {\n 'total_amount_spent': total_amount_spent,\n 'customers': []\n}\nfor customer in raw_data:\n summary_report['customers'].append({\n 'customer_name': customer['customer_name'],\n 'total_amount_spent': customer['total_amount_spent']\n })\n\n# save summary report to a file\nwith open('summary_report.json', 'w') as outfile:\n json.dump(summary_report, outfile)"} {"text": "[HI Wikipedia] दिलदार नगर जंक्शन\n\nदिलदार नगर जंक्शन भारत के उत्तर प्रदेश राज्य के नगर दिलदार नगर में स्थित उत्तर पूर्व रेलवे की पूर्व रेलवे शाखा के अन्तर्गत आने वाला रेलवे स्टेशन है। दिलदार नगर में अन्य स्टेशन दिलदार नगर उत्तर प्रदेश में रेलवे स्टेशन"} {"instruction": "Write a class to represent a point in a 2-D plane.", "input": "", "output": "class Point: def __init__(self, x_coordinate, y_coordinate): self.x = x_coordinate self.y = y_coordinate def get_x(self): return self.x def get_y(self): return self.y def set_x(self, x_coordinate): self.x = x_coordinate def set_y(self, y_coordinate): self.y = y_coordinate def distance(self, other_point): x_diff_sq = (self.x - other_point.x) * (self.x - other_point.x) y_diff_sq = (self.y - other_point.y) * (self.y - other_point.y) return (x_diff_sq + y_diff_sq) ** 0.5 p1 = Point(1, 2) p2 = Point(3, 4) print(p1.distance(p2))"} {"text": "[CS Wikipedia] Timmy Trumpet\n\nTimmy Trumpet vlastním jménem Timothy Jude Smith (* 9. června 1982, Sydney) je australský DJ a hudební producent. Jeho popularita v posledních letech rychle roste, zatímco v roce 2016 se v anketě TOP 100 DJs magazínu DJ mag, kde lidé hlasují o svých nejoblíbenějších DJs, umístil na 75. místě, v TOP 100 DJs 2020 již uzavírá první desítku. Často ve své tvorbě pracuje s trumpetou. Navštěvoval Hudební konzervatoř v Sydney, ze které byl vyhozen. Proslavil se skladbou „Freaks“, další významný bod začátku jeho kariéry je výstup v klubu Pacha na Ibize. Timmy Trumpet v Česku Poprvé se Timmy Trumpet objevil na druhém ročníku festivalu Gravity, který se konal 2. října 2015 v Praze. Zaujal zde místo na hlavním podiu. Jeho druhá návštěva v ČR byla na festival Gravity Madness, který se konal 18. listopadu 2016 v Praze. Zde se také ukázal americký DJ Jauz. 28. července 2017 Timmy tvořil společně s KSHMR headlinery AIR festivalu, který se konal 28.-29.7.2017 v královéhradeckém Festivalparku. Naposled navštívil 2. března 2018 Bobycentrum v Brně. Další vystoupení se plánuje 12. října 2018 v Praze v Tipsport areně. Bude to jedno z největších halových vystoupení. 23. srpna 2019 - Vystoupil TimmyTrumpet na festivalu Mácháč 2019 Diskografie 2009 Sunrise Nothing Between Us Sunset 2010 Tromba Ye Ye Ye (KCB) 2011 Trrrumpet Horny (Tenzin) 2012 Sassafras (Chardy) Hornpipe Fever (Juan Kidd & Jonathan Ulysses) 2013 Melbournia (SCNDL) Bleed Snapback 2014 Freaks (Savage) The Buzz (New World Sound) Nightmare 2015 Hipsta (Chardy) Mantra Toca (Carnage & KSHMR) 2016 Psy or Die (Carnage) Collab Bro (ANGEMI) Party Till We Die (MAKJ & Andrew W.K.) Oracle Anywhere You Go (Nervo) 2017 Take Your Call Al Pacino (Krunk!) Punjabi (Dimatik) Narco (Blasterjaxx) Deja-Vu (Savage) 2018 The Underground (Hardwell) 100 (Vini Vici) Reference Externí odkazy Oficiální webová stránka Australští diskžokejové Narození 9. června Narození v roce 1987 Muži Žijící lidé Narození v Sydney"} {"instruction": "Compare this object-oriented code in Python to the same code written in Java.", "input": "class Car:\n def __init__(self, make, model, year):\n self.make = make\n self.model = model\n self.year = year\n self.odometer_reading = 0\n\n def get_make_and_model(self):\n return f'{self.make} {self.model}'", "output": "// Java code\npublic class Car {\n private String make;\n private String model;\n private int year;\n private int odometerReading;\n\n public Car(String make, String model, int year) {\n this.make = make;\n this.model = model;\n this.year = year;\n this.odometerReading = 0;\n }\n\n public String getMakeAndModel() {\n return this.make + \" \" + this.model;\n }\n}"} {"instruction": "Create a Python program that implements a search algorithm (e.g. binary search, linear search).", "input": "Array: [1, 3, 4, 6, 8, 9, 11, 12, 14]\nTarget: 11", "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\narr = [1, 3, 4, 6, 8, 9, 11, 12, 14]\ntarget = 11\n\nresult = linear_search(arr, target)\nif result == -1:\n print('Element not found')\nelse:\n print(f'Element found at index {result}')\n\nOutput:\nElement found at index 6"} {"instruction": "Edit the following HTML code to enable a toggle to show and hide a DIV element when a button is clicked.", "input": "

      This is a text paragraph.

      ", "output": "

      This is a text paragraph.

      This is the toggleable content.

      "} {"text": "[EN Wikipedia] Anglo-French War (1213–1214)\n\nThe Anglo-French War was a major medieval conflict that pitted the Kingdom of France against the Kingdom of England and various other states. It was fought in an attempt to curb the rising power of King Philip II of France and regain the Angevin continental possessions King John of England lost to him a decade earlier. It is widely regarded as the very first anti-French coalition war and came to an end at the decisive Battle of Bouvines at which Philip defeated England and its allies. The Duchy of Normandy, once a site of conflict between Richard I of England and Philip II, grew to be one of the hot spots of medieval Anglo-French wars as the King of England had to defend a continental holding that was so close to Paris. In 1202, Philip II launched an invasion of Normandy that culminated in the six-month Siege of Château Gaillard, which led to the conquest of the duchy and of neighbouring territories. In 1214, when Pope Innocent III assembled an alliance of states against France, John agreed. The allies met Philip near Bouvines and were soundly defeated. The French victory resulted in the conquest of Flanders and put an end to further attempts from John to regain his lost territories. This conflict was an episode of a century-long struggle between the House of Capet and the House of Plantagenet over the Angevin domains in France, which started with Henry II's accession to the English throne in 1154 and his rivalry with Louis VII and ended with Louis IX's triumph over Henry III at the Battle of Taillebourg in 1242. Aftermath After the disastrous military campaigns in France and the loss of much of the Angevin domains, King John became increasingly unpopular and a civil war erupted in England as lords challenged him. Some of the rebellious barons, faced with an uncompromising king, turned to Prince Louis, the son and heir apparent of King Philip and grandson-in-law of King Henry II of England. Despite discouragement from his father and from Pope Innocent III, Louis sailed to England with an army on 14 June 1216, captured Winchester and soon controlled over half of the English kingdom. However, just when it seemed like England was about to be his, King John's sudden death in October caused the rebellious barons to desert Louis in favour of John's nine-year-old son, Henry III. With William Marshall acting as regent, a call for the English \"to defend our land\" against the French led to a reversal of fortunes on the battlefield. After his army was beaten at Lincoln on 20 May 1217 and a fleet led by Eustace the Monk, attempting to bring French reinforcements, was defeated off the coast of Sandwich on 24 August, Louis was forced to make peace on English terms. The principal provisions of the Treaty of Lambeth were an amnesty for English rebels, Louis to…"} {"instruction": "Write a function in Python to generate a random password of 8 characters.", "input": "", "output": "import random, string\n\ndef random_password(length):\n chars = string.ascii_letters + string.digits + '!@#$%^&*()'\n random_password = ''.join(random.choice(chars) for i in range(length))\n\n return random_password\n\nprint(random_password(8))"} {"instruction": "Write a Python program to print out the list of even numbers from 0 to given limit.", "input": "limit = 10", "output": "# declare list of numbers numbers = [x for x in range(0, limit+1)] # declare empty list of even numbers even_numbers = [] # loop through list of numbers for num in numbers: # if number is even, append to even_numbers list if num % 2 == 0: even_numbers.append(num) # print even numbers print(even_numbers) # Output: [0, 2, 4, 6, 8, 10]"} {"text": "[HI Wikipedia] गंजाम\n\nगंजाम (Ganjam) भारत के ओड़िशा राज्य के गंजाम ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय नहीं है और ज़िला मुख्यालय छत्रपुर में है। गंजाम से राष्ट्रीय राजमार्ग 16 गुज़रता है। शहर से कुछ दूर पूर्व में बंगाल की खाड़ी का तट है। जनसांख्यिकी भारत की जनगणना २०११ के अनुसार पालिका क्षेत्र की जनसंख्या ११,७४७ है जिसमे ६,०७१ पुरुष व ५,६७६ महिलाएँ हैं। ०-६ आयुवर्ग की जनसंख्या १,२७७ है जो कुल जनसंख्या का १०.८७% है। यहाँ की लिंगानुपात दर ९३५ महिलाएँ प्रति १००० पुरुष हैं जो कि राज्य की औसत से ९७९ से कम है। साक्षरता दर ८५.३०% है जो कि राज्य की दर ७२.८७% से अधिक है। धर्म यहाँ की कुल जनसंख्या में ९९.१९% हिन्दू, ०.७२% ईसाई, ०.०६% मुस्लिम, ०.०२% सिक्ख तथा ०.०१% जैन धर्म के अनुयायी हैं। ०.०१% लोगों ने अपने धर्म का उल्लेख नहीं किया है। इन्हें भी देखें गंजाम ज़िला सन्दर्भ गंजाम ज़िला ओड़िशा के शहर गंजाम ज़िले के नगर"} {"instruction": "Write a C# program to filter the entities from a given array.", "input": "Array = [0, \"Apple\", 1, \"Orange\", 2, \"Banana\", 3, \"Mango\"]. Condition = Entity should be a number", "output": "int[] entities = Array.OfType().ToArray();"} {"instruction": "Create a C++ program to generate a multiplication table of size n x n.", "input": "", "output": "#include using namespace std; int main() { int n = 3; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) cout << i * j << \" \"; cout << endl; } return 0; }"} {"instruction": "What is a dynamic programming algorithm?", "input": "", "output": "Dynamic programming is an algorithm design technique that is used to solve optimization problems by breaking them down into smaller subproblems. It enables you to solve a problem by combining solutions to similar subproblems, saving time and often being more efficient than standard methods. It is widely used in operations research, artificial intelligence, bioinformatics, linguistics, and other fields."} {"instruction": "Find the logarithm (base 10) of a number.", "input": "1000", "output": "3.0"} {"instruction": "Create a program in C++ to find the max and min of an array of fixed size.", "input": "array = [3, 5, 8, 6, 10, 1]", "output": "#include using namespace std; // Function to find maximum and minimum of an array void minMax(int arr[], int n) { int max = arr[0]; int min = arr[0]; for (int i = 1; i < n; i++) { if (arr[i] > max) max = arr[i]; if (arr[i] < min) min = arr[i]; } cout << \"Maximum element = \" << max << endl; cout << \"Minimum element = \" << min; } int main() { int arr[] = {3, 5, 8, 6, 10, 1}; int n = sizeof(arr) / sizeof(arr[0]); minMax(arr, n); return 0; }"} {"instruction": "From the given data set, calculate the mean and print it out.", "input": "[1, 2, 3, 4, 5]", "output": "data_set = [1, 2, 3, 4, 5] mean = sum(data_set) / len(data_set) print(\"The mean is {}\".format(mean))"} {"text": "[DE Wikipedia] Onken\n\nDie Onken GmbH ist ein 1940 von Hermann Onken gegründeter deutscher Hersteller von Molkereiprodukten mit Sitz in Moers. Seit 2011 gehört die Marke Onken zur Schweizer Milchverarbeiterin Emmi. Geschichte 1940 übernahm Hermann Onken die An- und Verkaufsgenossenschaft vereinigter Milchproduzenten in Essen. Das Unternehmen hieß fortan Donau-Molkerei-Produkte Onken & Co KG. In den sechziger Jahren wurde ein neuer Produktionsbetrieb in Mülheim an der Ruhr eröffnet. 1993 schließlich entstand in Moers-Hülsdonk am Niederrhein die neue Molkerei. Seit 1994 gibt es eine weitere Vertriebsgesellschaft in London. 2004 wurde Onken von der Oetker-Gruppe übernommen. Zum 1. Januar 2011 erwarb die Schweizer Molkerei Emmi die weltweiten Rechte der Marke Onken von Dr. Oetker. Infolgedessen steuerte Emmi Marketing und Vertrieb, während Dr. Oetker als Co-Packer fungierte. Die Arbeitsplätze in Moers blieben dadurch erhalten. Zum 1. Juli 2018 brachte Dr. Oetker das Werk in Moers in ein Joint-Venture mit der Molkerei Gropper ein. Die dadurch entstandene Moers Frischeprodukte GmbH & Co. KG ist seitdem Co-Packer für die Markenprodukte von Onken. Onken wurde primär in Deutschland und Großbritannien vertrieben, den beiden Schlüsselmärkten von Emmi. Im Mai 2022 gab Emmi bekannt, dass die Marke Onken in Deutschland mit Ende Juni eingestellt werden sollte. Seither gibt es die Marke nur noch in Großbritannien. Produkte Unter dem Markennamen Onken werden Vollkorn-Fruchtjoghurt, Naturjoghurt und Speisequark hergestellt. Ende 2019 und erneut 2020 brachte Emmi 15 Jahre nach der Einstellung der Produktion im Jahr 2004 den Fruchtquark Frufoo mit einigen Änderungen unter der Marke Onken kurzzeitig erneut auf den Markt. Weblinks Emmi Deutschland Onken UK (englisch) Einzelnachweise Unternehmen (Moers) Milchverarbeitendes Gewerbe (Deutschland) Markenname (Milchprodukt) Hersteller von Milchprodukten Lebensmittelhersteller (Nordrhein-Westfalen) Produzierendes Unternehmen (Kreis Wesel)"} {"text": "[EN Wikipedia] Tokanui River\n\nThe Tokanui River is a river in New Zealand, flowing into Toetoes Bay. See also List of rivers of New Zealand References Rivers of Southland, New Zealand Foveaux Strait Rivers of New Zealand"} {"instruction": "How can we use the reduce() function in JavaScript to find the sum of an array of numbers?", "input": "", "output": "const numbers = [10, 20, 30] const sum = numbers.reduce((acc, val) => acc + val, 0) console.log(sum)"} {"instruction": "Create a React component that displays the current day of the week and date.", "input": "", "output": "import React from \"react\"; const Date = () => { const today = new Date(); const currentDay = today.getDay(); const dayList = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]; return (
      {dayList[currentDay]}, {today.getFullYear()}/{today.getMonth()+1}/{today.getDate()}
      ); }; export default Date;"} {"instruction": "Create a for-loop in JavaScript that iterates through numbers from 1 to 10 and prints out the current number.", "input": "", "output": "for (let i = 1; i <= 10; i++) { console.log(i); }"} {"instruction": "Generate Python code to find numbers that are multiples of both 3 and 5 between 0 and 100.", "input": "Not applicable", "output": "# List of numbers which are multiples of both 3 and 5 between 0 and 100\nmultiples_3_5 = [] \n\n# Iterate over all numbers between 0 and 100 \nfor num in range(101): \n \n # Check for multiples of both 3 and 5 \n if num % 3 == 0 and num % 5 == 0: \n multiples_3_5.append(num) \n \nprint(multiples_3_5)"} {"instruction": "Write a SQL query to select all the books written by a specific author.", "input": "author: \"Robert Louis Stevenson\"", "output": "SELECT * FROM books WHERE author = \"Robert Louis Stevenson\""} {"text": "[CS Wikipedia] Těleso\n\nTěleso je, ve fyzice či mechanice, obecný hmotný živý či neživý předmět, který je objektem zkoumání fyziky, resp. mechaniky. Vyplňuje daným způsobem určitou část objemu prostoru, která je nějakým způsobem ohraničena a která obsahuje látku daného skupenství. Těleso má na rozdíl od látky tvar, rozměry, velikost a hlavně hmotnost. Označení těleso se nejčastěji používá pro pevná tělesa. Některá tělesa mají jednoduchý tvar (např. koule, válec, krychle) a některá složitější tvar (auto, kladívko, brambora atd.). Klasifikace těles podle skupenství, typu látky a struktury Podle skupenství látky a typu látky se především rozlišují pevná tělesa, kapalná tělesa, plynná tělesa, tělesa z plazmy či exotická tělesa z Boseho-Einsteinova kondenzátu. Zvláštním případem jsou také tělesa ze sypké hmoty či tělesa z antihmoty či dalších exotických nebo hypotetických forem látky. Podle struktury tělesa se definují tělesa homogenní (stejnorodá) a tělesa nehomogenní (nestejnorodá). V realitě však neexistuje ideálně homogenní těleso. Avšak v mnoha případech mechaniky, lze považovat těleso za homogenní (výhodou je pak významně jednodušší aplikace při řešení vědeckých úloh). Nehomogenní tělesa mají ve svém objemu např. proměnlivou hustotu, proměnlivé materiálové vlastnosti atp. Klasifikace těles podle rozměrů či hmotnosti Makroskopické těleso (makroobjem) je těleso složeno z velkého počtu částic (atomů, molekul). Jeho rozměry jsou vzhledem k rozměrům „mikroskopických“ částic velké. Makroskopické těleso je obvykle okem přímo viditelné. Extrémní makroskopická tělesa dosahují rozměrů a hmotnosti galaxií. Mikroskopické těleso (mikroobjem) není okem přímo viditelné. Dolní hranice rozměrů a hmotností reálných mikroskopických těles zřejmě udávají elementární částice. Avšak v mechanice lze také využívat bodová tělesa s nulovým objemem. Tělesa lze také dělit podle prostorových rozměrů: bodová tělesa (např. hmotný bod) – jsou nejjednodušší realizací tělesa. Objem bodového tělesa a jeho rozměry jsou . Bodové těleso může mít hmotnost a další dynamické charakteristiky, mohou v něm působit zatížení a mohou v něm být předepsané okrajové či počáteční podmínky atp. Bodové těleso ve skutečnosti neexistuje. Avšak, bodové těleso má ekvivalentní vlastnosti jako reálné těleso a lze pro něj sestavit např. rovnice rovnováhy jako u reálných těles, jednorozměrná tělesa (1D) – Nahrazení reálného tělesa charakteristickým délkovým rozměrem, např. úsečkou (nosník) nebo polopřímkou a přímkou (pružný podklad nosníku nebo desky). Výhodou je zjednodušení reálné situace, dvourozměrná tělesa (2D) – Nahrazení reálného tělesa dvěma délkovými rozměry a plochou. Výhodou je zjednodušení reálné situace, trojrozměrná tělesa (prostorová, 3D) – Skutečnost nebo její dostatečně přesný objemový popis reálného tělesa,…"} {"instruction": "Create a Ruby class for a customer and add attributes for name, age and address.", "input": "", "output": "class Customer attr_accessor :name, :age, :address def initialize(name, age, address) @name = name @age = age @address = address end end"} {"instruction": "Create a Python class called Car with properties for make, model, year, color and fuel type.", "input": "Not applicable", "output": "class Car:\n def __init__(self, make, model, year, color, fuel):\n self.make = make\n self.model = model\n self.year = year\n self.color = color\n self.fuel = fuel\n \n def get_make(self):\n return self.make\n \n def get_model(self):\n return self.model\n \n def get_year(self):\n return self.year\n \n def get_color(self):\n return self.color\n \n def get_fuel(self):\n return self.fuel"} {"instruction": "Create an API endpoint for a Python Flask application that takes a string as an input and returns the frequency of all the words that appear in the given string.", "input": "String: \"Hello world, hello again world!\"", "output": "from flask import Flask, request\nfrom collections import Counter\n\napp = Flask(name)\n\n@app.route('/word-frequency', methods=['POST'])\ndef word_frequency():\n string = request.json['string']\n counts = Counter(string.split())\n return {'frequency': counts}\n\nif name == 'main':\n app.run(debug=True)"} {"instruction": "Write a Python script to classify a given article into one of the following categories: 'Politics', 'Technology', 'Social'.", "input": "\"The company announced a range of new innovative technologies to help combat climate change.\"", "output": "from sklearn.naive_bayes import MultinomialNB\nfrom sklearn.feature_extraction.text import CountVectorizer\n\narticle = \"The company announced a range of new innovative technologies to help combat climate change.\"\n\ntext = [article]\ncv = CountVectorizer()\nX = cv.fit_transform(text)\n\nclf = MultinomialNB()\nclf.fit(X, ['Technology'])\nprint(clf.predict(X))"} {"text": "[HI Wikipedia] सैमसंग गैलेक्सी टैब\n\nसैमसंग गैलेक्सी टैब एन्ड्रॉइड् आधारित टैबलेट कंप्यूटरों की शृंख्ला है जिसके निर्माता सैमसंग हैं। शृंख्ला का पहला प्रादर्श, 7 इंच सैमसंग गैलेक्सी टैब, 2 सितंबर 2010 को आईएफ़ए बर्लिन में विमोचित हुआ था। तब से लेकर कई प्रादर्श जारी किये जा चुके हैं, इनमें 7.7, 8.9 तथा 10.1 इंच डिस्प्ले भी शामिल हैं। सन्दर्भ बाहरी कड़ियाँ सैमसंग गैलेक्सी टैब आधिकारिक पृष्ठ सैम्संग गैलेक्सी टैब प्रशंसक पृष्ठ टैबलेट कम्प्यूटर 6000 सैमसंग द्वारा निर्मित स्मार्टफ़ोन"} {"instruction": "Estimate the value of pi to four decimal places.", "input": "", "output": "The estimated value of pi is 3.1416."} {"text": "[HI Wikipedia] गॉथिक वास्तुकला\n\nगॉथिक वास्तुकला (Gothic architecture) वास्तुकला की एक शैली है जो यूरोप में उत्तर मध्यकाल में प्रचलित थी। गॉथिक शैली 'रोमनेस्क वास्तुकला' से जन्मी। यह शैली फ्रांस में १२वीं शती में जन्मी तथा १६वीं शती तक प्रचलित रही। उस काल में इसे 'फ्रांसीसी कर्म' (Opus Francigenum) कहा जाता था। 'गॉथिक' शब्द का प्रयोग पुनर्जागरण के बाद के काल में प्रचलित हुआ। गोथिक शैली के बाद पुनरुद्धार वास्तुकला (Renaissance architecture) का जन्म हुआ। इस शैली की मुख्य विशेषताएँ हैं- बिन्दुमय चाप (pointed arch), रिब किया हुआ गुम्बद, अर्धचाप वप्र (flying buttress)। यूरोप के अनेक महान गिरिजाघरों एवं अन्य ईसाई धार्मिक भवन इसी शैली में बने हैं। बाहरी कड़ियाँ Mapping Gothic France, a project by Columbia University and Vassar College with a database of images, 360° panoramas, texts, charts and historical maps Gutenberg.org, from Project Gutenberg ,, from Internet Archive वास्तुशैली मध्यकालीन फ्रांसीसी वास्तुकला वास्तुकला शैलियाँ de:Gotik#Baukunst"} {"instruction": "Create a program to detect a palindrome in a given sentence using Python.", "input": "Not applicable", "output": "import re\n\ndef hasPalindrome(sentence):\n words = sentence.split(' ')\n for word in words:\n if word == word[::-1]:\n return True\n return False\n\ndef isPalindrome(sentence):\n sentence = re.sub('\\W+', '', sentence.lower())\n return sentence == sentence[::-1]\n\nif __name__ == '__main__': \n sentence = 'A man, a plan, a canal, Panama'\n print(hasPalindrome(sentence)) # Outputs True\n print(isPalindrome(sentence)) # Outputs True"} {"text": "[EN Wikipedia] The Neuroscientist\n\nThe Neuroscientist is a peer-reviewed academic journal that publishes papers in the field of Neurology and Neuroscience. The journal's editor is Stephen G Waxman (Yale University). It has been in publication since 1995 and is currently published by SAGE Publications. Scope The Neuroscientist is aimed at basic neuroscientists, neurologists, neurosurgeons, and psychiatrists in research, academic, and clinical settings, reviewing new and emerging basic and clinical neuroscience research. The journal evaluates key trends in molecular, cellular, developmental, behavioral systems, and cognitive neuroscience in a disease-relevant format. Abstracting and indexing The Neuroscientist is abstracted and indexed in, among other databases: SCOPUS, and the Social Sciences Citation Index. According to the Journal Citation Reports, its 2013/2014 impact factor is 6.837, ranking it 11 out of 194 journals in the category ‘Clinical Neurology’. and 25 out of 185 journals in the category ‘Clinical Neurology’. References External links SAGE Publishing academic journals English-language journals Neuroscience journals Neurology journals"} {"text": "[EN Wikipedia] Frankfurter Würstchen\n\nA Frankfurter Würstchen (Frankfurt sausage) is a thin parboiled sausage in a casing of sheep's intestine. The flavor is acquired by a method of low temperature smoking. For consumption, Frankfurters are occasionally not boiled; they are heated in hot water for only about eight minutes to prevent the skin from bursting. They are also commonly grilled over propane or charcoal flame. They are traditionally served with bread, mustard, horseradish and/or potato salad. History Meat sausages as a Frankfurt speciality are already mentioned in medieval sources, often served during the Imperial coronation ceremonies at the Römerberg. Smoked Frankfurter Würstchen have protected geographical status in Germany since about 1860. Since 1929, the indication is only allowed to be used for sausages that are produced in the Frankfurt area, mainly in Neu-Isenburg and Dreieich. Originally, Frankfurters were made without nitrite curing salt. After going through specific aging and smoking processes, the sausages, now of a golden colour, are put into wooden boxes with small sheet of parchment paper between layers. Therefore, the traditional sausages have a square cross-section, but there are a few exceptions where the sausage is round. Other countries Outside Germany, \"frankfurter\" is a common designation for boiled sausages, such as North American hot dog sausages, which are called Wiener Würstchen (Vienna sausages) in Germany. In Austria, Vienna sausages are called Frankfurter Würstl as they allegedly were brought to Vienna by Johann Georg Lahner (1772–1845), a butcher trained in Frankfurt, who in 1805 began to produce sausages from a mixture of pork and beef. See also Frankfurter Rindswurst References German sausages Hessian cuisine Cooked sausages"} {"instruction": "Write an algorithm in Python that takes as input an array of numbers and returns the maximum element.", "input": "[15, 25, 7, 1]", "output": "def maxElement(arr): \n maxElement = arr[0]; \n \n for i in range(1, len(arr)): \n if maxElement < arr[i]: \n maxElement = arr[i]; \n \n return maxElement; \n \narr = [15, 25, 7, 1];\nmaxElement = maxElement(arr); \nprint (\"Maximum element in the array is:\", maxElement);"} {"instruction": "Design a python code to build a web application using Django's MVC framework.", "input": "", "output": "# Importing essential libraries\nimport os\nimport sys\n \n# start a new Django project\nfrom django.core.management import execute_from_command_line\n \n# check the requirements.txt file to get the list of libraries \nif __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"my_app.settings\")\n try:\n from django.core.management import execute_from_command_line\n except ImportError as exc:\n raise ImportError(\n \"Couldn't import Django. Are you sure it's installed and \"\n \"available on your PYTHONPATH environment variable? Did you \"\n \"forget to activate a virtual environment?\"\n ) from exc\n execute_from_command_line(sys.argv)"} {"instruction": "Generate a Python function to generate an equation with given coefficients and variables.", "input": "coefficients: [2, 3, 1], variables: [\"x\", \"y\", \"z\"]", "output": "def generate_equation(coefficients, variables):\n equation = \"\"\n for i, coeff in enumerate(coefficients):\n equation += str(coeff) + variables[i] + \" + \"\n equation = equation[:-3]\n return equation"} {"instruction": "Create a web crawler written in Python that scrapes hotel reviews from an online travel website.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\ndef scraper(url):\n response = requests.get(url)\n html = response.content\n soup = BeautifulSoup(html, 'lxml')\n\n reviews_container = soup.find_all('div', class_='review_container')\n \n reviews = []\n for review in reviews_container:\n rating = review.find('span', attrs={'class': 'rating'}).text\n description = review.find('p', class_='review_description').text\n reviews.append((rating, description))\n\n return reviews\n\nurl = 'https://www.example.com/hotels/reviews'\nreviews = scraper(url)"} {"instruction": "Use a SQL query to extract all the rows from the table \"Employees\" that includes employees with the last name Smith.", "input": "", "output": "SELECT * FROM Employees WHERE last_name = 'Smith'"} {"text": "[DE Wikipedia] Elbląg (Fluss)\n\nDer Elbląg () ist ein 14,5 Kilometer langer Fluss in der polnischen Woiwodschaft Ermland-Masuren, der durch die Stadt Elbląg () fließt. Der Elbląg entwässert den Druzno () und mündet in das Frische Haff () und damit in die Ostsee. Er ist auf seiner gesamten Länge schiffbar und verbindet als Seeschifffahrtsstraße den Elbinger Seehafen mit dem Frischen Haff. Der Schifffahrtsweg aus dem Haff nach Danzig führte seit Jahrhunderten über das seit dem Ende des 2. Weltkrieges auf russischem Gebiet gelegene Pillauer Tief, seit dem 17. September 2022, dem 83. Jahrestag der Sowjetischen Besetzung Ostpolens besteht mit dem Kanal durch die Frische Nehrung eine auf polnischem Gebiet gelegene Alternative, die zudem deutlich kürzer ist. In Elbing zweigt der Oberländische Kanal ab. Geschichtliche Erwähnung Wulfstan, ein angelsächsischer Händler im späten 9. Jahrhundert, bezeichnet in seinem Bericht von seiner Reise von Haithabu zum preußischen Handelsort Truso den Fluss auf Angelsächsisch als Ilfing. Zuflüsse Die Hauptzuflüsse sind: Fiszewka (Fischau) Kumiela (Hommel) Tina (Thiene) Literatur Michael Gottlieb Fuchs: Beschreibung der Stadt Elbing und ihres Gebietes in topographischer, geschichtlicher und statistischer Hinsicht. Band 1, Elbing 1818, S. 333–402. August Eduard Preuß: Preußische Landes- und Volkskunde oder Beschreibung von Preußen. Ein Handbuch für die Volksschullehrer der Provinz Preußen, so wie für alle Freunde des Vaterlandes. Gebrüder Bornträger, Königsberg 1835, S. 31–32. Einzelnachweise"} {"instruction": "Optimize the following Python code for counting the number of vowels in a string.", "input": "def count_vowels(str):\n count = 0\n vowels = [\"a\", \"e\", \"i\", \"o\", \"u\"]\n for i in str:\n if i in vowels:\n count += 1\n return count", "output": "def count_vowels(str):\n count = 0\n vowels = set(\"aeiou\")\n for i in str:\n if i in vowels:\n count += 1\n return count"} {"instruction": "Create a Java program to find the max number within a list.", "input": "", "output": "public static int findMax(int[] array) { int max = array[0]; for (int i = 0; i < array.length; i++) { if (array[i] > max) { max = array[i]; } } return max; }"} {"text": "[EN Wikipedia] Articles of Confederation\n\nThe Articles of Confederation and Perpetual Union was an agreement among the 13 states of the United States, formerly the Thirteen Colonies, that served as the nation's first frame of government. It was debated by the Second Continental Congress at Independence Hall in Philadelphia between July 1776 and November 1777, and finalized by the Congress on November 15, 1777. It came into force on March 1, 1781, after being ratified by all 13 colonial states. A guiding principle of the Articles was the establishment and preservation of the independence and sovereignty of the states. The Articles consciously established a weak central government, affording it only those powers the former colonies had recognized as belonging to king and parliament. The document provided clearly written rules for how the states' league of friendship, known as the Perpetual Union, would be organized. While waiting for all states to ratify, the Congress observed the Articles as it conducted business, directing the war effort, conducting diplomacy with foreign states, addressing territorial issues and dealing with Native American relations. Little changed procedurally once the Articles of Confederation went into effect, as ratification did little more than constitutionalize what the Continental Congress had been doing. That body was renamed the Congress of the Confederation; but most Americans continued to call it the Continental Congress, since its organization remained the same. As the Confederation Congress attempted to govern the continually growing U.S. states, its delegates discovered that the limitations placed upon the central government (such as in assembling delegates, raising funds, and regulating commerce) rendered it ineffective at doing so. As the government's weaknesses became apparent, especially after Shays' Rebellion, some prominent political thinkers in the fledgling union began asking for changes to the Articles. Their hope was to create a stronger government. Initially, in September 1786, some states met to address interstate protectionist trade barriers between them. Shortly thereafter, as more states became interested in meeting to revise the Articles, a meeting was set in Philadelphia on May 25, 1787. This became the Constitutional Convention. Delegates quickly agreed that the defects of the frame of government could not be remedied by altering the Articles, and so went beyond their mandate by replacing it with a new constitution. On March 4, 1789, the government under the Articles was replaced with the federal government under the Constitution. The new Constitution provided for a much stronger federal government by establishing a chief executive (the president), courts, and taxing powers. Background and context The political push to increase cooperation…"} {"instruction": "Construct a query in PostgreSQL to find the names and emails of all users who have \"google.com\" in their emails.", "input": "", "output": "SELECT name, email FROM users WHERE email LIKES '%google.com%';"} {"instruction": "Create a JavaScript function to validate an email address with the following conditions.", "input": "", "output": "function validateEmail(email) { const re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/; return re.test(email); }"} {"text": "[DE Wikipedia] Tajemnica Statuetki\n\nTajemnica Statuetki ist ein 1993 von Metropolis Software House für DOS-basierte Computer entwickeltes und veröffentlichtes Computerspiel des Adventure-Genres. Es war das erste Abenteuerspiel aus Polen. Seine Handlung dreht sich um den fiktiven Interpol-Agenten John Pollack, der versucht, ein Geheimnis rund um den Diebstahl verschiedener Antiquitäten auf der ganzen Welt zu lösen. Während die Software-Piraterie in Polen weit verbreitet war, konnte das Spiel bei seiner Veröffentlichung zwischen 4000 und 6000 Kopien verkaufen und wurde im Land sehr populär. Tajemnica Statuetki wurde für seine Handlung gelobt und war ein kultureller Meilenstein, der dazu beitrug, die polnische Videospielindustrie trotz kleiner Kritik an Spielmechanik und audiovisuellem Design zu fördern und zu legitimieren. Einzelnachweise DOS-Spiel Computerspiel 1993 Adventure"} {"instruction": "Create a regular expression to match strings containing two consecutive symbols \"#\" followed by four alphabetic characters.", "input": "", "output": "/\\#[a-zA-Z]{4}/"} {"text": "[CS Wikipedia] Eugen Lanti\n\nEugen Lanti (pseudonym Eugena Adama) (19. července 1879 – 1. ledna 1947) byl normandský učitel a v esperantu píšící spisovatel. Jeho sloh byl prostý, sarkastický, užívání přípon a předpon zredukoval na minimum dle zásady „sufiĉo kaj neceso“ (přípona jen jako nutnost). Založil svaz Sennacieca Asocio Tutmonda a byl dlouholetým redaktorem třídní revue Sennaciulo. Bibliografie Leteroj de lanti Vortoj de k-do lanti For la neŭtralismon! La labo-rista esperantismo Naciismo Překlady Skizo pri filozofio de l'homa digno od Gillese Kandid a Tri verkoj de Volter'' od Voltaira Odkazy Externí odkazy Související články Esperantská literatura Esperantská literatura Francouzští anarchisté Narození 19. července Narození v roce 1879 Úmrtí 1. ledna Úmrtí v roce 1947 Sebevrazi Sebevraždy oběšením v Mexiku Muži"} {"instruction": "Perform a linear search to find if a key exists in an array using C.", "input": "int arr[] = {4, 3, 2, 10, 40}; int key = 40;", "output": "// Perform linear search int flag = 0; for (int i = 0; i < 5; i++) { if (arr[i] == key) { flag = 1; break; } } if (flag == 1) printf(\"Present\"); else printf(\"Not Present\");"} {"instruction": "Modify the Python program below to make it more efficient.", "input": "def foo(lst):\n minimum = lst[0]\n for n in lst:\n if minimum > n:\n minimum = n\n return minimum", "output": "def foo(lst):\n minimum = min(lst)\n return minimum"} {"text": "[HI Wikipedia] अर्जेण्टीना\n\nआर्जेंटीना दक्षिण अमेरिका में स्थित एक देश है। क्षेत्रफल एवं जनसंख्या की दृष्टि से दक्षिणी अमरीका का ब्राजील देश के बाद द्वितीय विशालतम देश है (क्षेत्रफल: २७,७६,६५६ वर्ग कि.मी.)। इसके उतत्र में ब्राजील पश्चिम में चिली तथा उत्तरपश्चिम में पराग्वे है। देश २२° द.अ. तथा ५५° द.अ. के मध्य ३७,७०० कि॰मी॰ की लंबाई में उत्तर दक्षिण फैला हुआ है। इसकी आकृति एक अधोमुखी त्रिभुज के समान है जो लगभग २,६०० कि॰मी॰ चौड़े आधार से दक्षिण की ओर संकरा होता चला गया है। उत्तर में यह बोलिविया एवं परागुए, उत्तर, पूर्व में युरुगए तथा ब्राजील और पश्चिम में चिली देश से घिरा है। अर्जेन्टीना का नाम अर्जेन्टम से पड़ा जिसाक अर्थ चाँदी होता है। चांदी के लिए प्रयुक्त लैटिन तथा स्पैनिश पर्यायवाची शब्दों से ही, जो क्रमश: 'अर्जेटम' एवं 'प्लाटा' हैं, अर्जेटीना और 'रायो डी ला प्लाटा' (देश की महान एस्चुअरी) का नामकरण हुआ है। आरंभ में यह उपनिवेश था जिसकी स्थापना स्पेन के चार्ल्स तृतीय ने पुर्तगाली दबाव को रोकने के लिए की थी। सन् १८१० ई. में देश की जनता ने स्पेन की सत्ता के विरुद्ध आंदोलन आरंभ किया जिसके परिणाम स्वरूप १८१६ ई. में यह स्वतंत्र हुआ। परंतु स्थायी सरकार की स्थापना १८५३ ई से ही संभव हुई। आर्जेटीना गणतंत्र के अतंर्गत २२ राज्यों के अतिरिक्त एक फेडरल जिला तथा टेरा डेल फ्यूगो, अंटार्कटिका महाद्वीप के कुछ भाग और दक्षिणी अतलांतक सागर के कुछ द्वीप हैं। प्रकृतिक दशा पश्चिम के पर्वतीय क्षेत्रफल को छोड़कर देश का अन्य शेष भाग मुख्यत: निम्न भूमि है। देश सामान्यत: चार स्थलाकृतिक प्रदेशों में विभक्त हो जाता है: ऐंडीज़ पर्वतीय प्रदेश, उत्तर का मैदान, पंपाज़ और पैटागोनिया। ऐंडीज़ पर्वतीय प्रदेश के अंतर्गत देश का लगभग ३० प्रतिशत भाग आता है। पश्चिम में उत्तर दक्षिण फैली इस पर्वतश्रेणी का उत्थान तृतीयक कल्प में आल्प्स गिरि-निर्माण-काल में हुआ था। यह चिली देश के साथ प्राकृतिक सीमा निर्धारित करती है। इस श्रेणी में ही, मध्य एशिया के पश्चात् सीमा निर्धारित करती है। इस श्रेणी में ही, मध्य एशिया के पश्चात्, विश्व के उच्चतम शिखर स्थित हैं, जैसे माउंट अकोंकागुआ (७,०२३ मीटर), मर्सीडरियो (६,६७२ मीटर) और टुपनगाटो (६,८०२ मीटर)। इस प्रदेश में अंगूर, शहतूत तथा अन्य फल बहुतायत से पैदा होते हैं। उत्तर के मैदानी प्रदेश के अंतर्गत चैको मैसोपोटामिया तथा मिसिओनेज़ क्षेत्र हैं। इस प्रदेश में जलोढ के विस्तृत निक्षेप पाए जाते हैं। अधिकांश भाग वर्षा में बाढ़ग्रस्त हो जाते हैं। चैको क्षेत्र वनसंसाधन में धनी है तथा मिसिओनेज़ में यर्बा माते (एक प्रकार की चाय) की खेती होती है। पराना, परागुए आदि नदियों से घिरा मैसोपोटामिया पशुओं के लिए प्रसिद्ध है। देश के मध्य में स्थित पम्पास अत्यधिक उपजाऊ और विस्तृत समतल घास की मैदान है। यह देश का सबसे समृद्धिशाली भाग है जिसमें ८० प्रतिशत जनसंख्या रहती है। कृषि एवं पशुपालन उद्योगों के कुल उत्पादन का लगभग दो तिहाई भाग यहीं से प्राप्त होता है। पैटागोनिया प्रदेश रायो निग्रो से दक्षिण की ओर देश के दक्षिणी छोर तक फैला है (क्षेत्रफल: ७,७७,००० वर्ग कि.मी.)। यह अर्धशुष्क एवं अल्प जनसंख्यावाला पठारी प्रदेश है। यहाँ विशेष रूप से पशु पालन का कारोबार होता है। नदियां ऐंडीज़ पर्वत अथवा उत्तर की उच्च भूमि से…"} {"instruction": "Create a basic web-scrapper program in Python that downloads the entire HTML of a given website.", "input": "https://example.com", "output": "import requests\nresponse = requests.get(\"https://example.com\")\nhtml = response.text"} {"instruction": "Modify the existing code to enable user input so the user can enter their own number and have the average of those two numbers returned.", "input": "def find_average(a, b): return (a + b) / 2", "output": "def find_average(): a = int(input(\"Enter first number: \")) b = int(input(\"Enter second number: \")) return (a + b) / 2"} {"text": "[CS Wikipedia] Johana z Guînes\n\nJohana z Guînes ( Jeanne de Guînes,† 1331/1342 Guerville) byla hraběnka z Eu a Guînes. Život Narodila se jako jedna ze dvou dcer Balduina z Guînes a Johany, dcery Matouše z Montmorency. Byla provdána za Jana z Brienne. Roku 1294 zdědili hrabství Eu a o rok později se Janovi podařilo na francouzském králi vysoudit hrabství Guînes, které Johanin děd pod nátlakem prodal francouzské koruně. Roku 1302 Jan z Brienne společně s výkvětem francouzských rytířů padl v bitvě u Courtrai. Johana svého manžela přežila o řadu let. Zemřela roku 1331 či 1342 a byla pohřbena po jeho boku v cisterciáckém klášteře Foucarmont. Externí odkazy Hraběnky z Eu Hraběnky z Guînes Úmrtí ve 14. století Pohřbení v klášteře Foucarmont Ženy"} {"instruction": "Generate a Python program that takes in a string of text and returns the count of each unique word in the string", "input": "This is a sample string", "output": "def count_words(string):\n word_counts = {} \n words = string.split()\n \n for word in words:\n if word in word_counts:\n word_counts[word] += 1 \n else:\n word_counts[word] = 1\n \n return word_counts\n\nprint(count_words(\"This is a sample string\")) \n# Output {'This': 1, 'is': 1, 'a': 1, 'sample': 1, 'string': 1}"} {"text": "[EN Wikipedia] Fondation Napoléon\n\nThe Fondation Napoléon is a foundation, which registered as a French non-profit organization (reconnue d'utilité publique) on November 12, 1987. Its mission is to encourage and support study and interest in the history of the First, and Second French Empires and to support the preservation of Napoleonic Heritage. Mission and activities The Foundation Napoléon promotes research on the history of the two French Empires, most notably by awarding six research grants to Ph.D. candidates in French and non-French. It also awards annual History Prizes for outstanding works on subjects related to the two French Empires (in French and other European languages). The Foundation also helps to organize academic conferences, bicentennial and sesquicentennial commemorations, Napoleonic book publishing, and exhibition catalogues. Save Longwood, Napoleon's House on St Helena In December 2010, the Foundation launched an international appeal to save Napoleon's house on the island of St Helena. The funds collected were to be used to pay for the restoration of the buildings in which Napoleon and his entourage lived in exile on St Helena from 1815 to 1821. The appeal is supported by the French Ministry of Foreign Affairs. Opposition to the removal of the Statue of Napoleon in Rouen In September 2020, the mayor of Rouen, Nicolas Mayer-Rossignol (Socialist), wished to replace the statue of Napoleon with a statue or work of art dedicated to the recently deceased feminist Gisèle Halimi. The plans were strongly opposed by the leader of the city's opposition, Jean-François Bures. Historian :fr:Thierry Lentz, director of the Foundation Napoléon, called the plans \"cancel culture\" and argued that Napoleon was a benefactor of Rouen, making him more locally relevant than Halimi. In December 2021, a survey of 4,080 residents found that 68% wanted the statue to remain, and the city council said it would respect the result. Later in December 2021, the statue was registered as a monument historique. Publication of the General Correspondence of Napoleon Bonaparte In 2002, the Fondation launched its grand project to publish the most complete version ever of the General Correspondence of Napoleon I (fifteen volumes completed by 2018). This project is in partnership with the French Archives nationales, the French Archives du Ministère des Affaires étrangères, and with the support of the Fondation La Poste. The end result will be the publication of fourteen volumes and more than 40,000 letters, all with commentary and checked as much as possible against originals in public and private collections. Volume 8, containing letters for the year 1808 and the war in Spain, was published in November 2011 by Editions Fayard. Libraries, web sites and e-review Libraries The Napoleonic Digital Library…"} {"instruction": "Compose a Python script to convert a string to an all-uppercase string.", "input": "String: 'Experiment'", "output": "# converting the string to upper-case string = \"Experiment\" print(\"Old String:\", string) string = string.upper() print(\"New String:\", string)"} {"instruction": "Who is the author of the book \"Alice in Wonderland\"?", "input": "", "output": "The author of the book \"Alice in Wonderland\" is Lewis Carroll."} {"text": "[CS Wikipedia] Afélium\n\nAfélium, též aphelium, česky odsluní, je nejvzdálenější místo od Slunce (přesněji od ohniska dráhy), jímž prochází těleso, které se kolem Slunce pohybuje po elipse. V aféliu se pohybuje těleso nejmenší rychlostí na své dráze (viz 2. Keplerův zákon). Tělesa se mohou pohybovat i po drahách, podobných jiným kuželosečkám než elipse. Tyto kuželosečky ale afélium nemají. Kružnice má od středu (ohniska) všechny body stejně vzdálené a u paraboly i hyperboly lze k jakkoliv vzdálenému bodu najít ještě vzdálenější. Vzdálenost Země od Slunce v aféliu je 152,1 mil. km - to je o zhruba 2,5 milionu km více než střední vzdálenost Země od Slunce. Toto afélium nastává 4. července. Související články Apsida (astronomie) Gravitace Mechanika Perihélium Pohyb tělesa kolem Slunce Sluneční soustava Nebeská mechanika"} {"instruction": "Given a list of strings, write a Python program to convert each of the strings to lowercase.", "input": "[\"My Heart Will Go On\",\"We Are The Champions\",\"Thriller\",\"Welcome To The Jungle\",\"Eye Of The Tiger\",\"Money For Nothing\",\"Billie Jean\",\"Purple Rain\",\"The Show Must Go On\",\"Bohemian Rhapsody\"]", "output": "new_list = []\nfor item in [\"My Heart Will Go On\",\"We Are The Champions\",\"Thriller\",\"Welcome To The Jungle\",\"Eye Of The Tiger\",\"Money For Nothing\",\"Billie Jean\",\"Purple Rain\",\"The Show Must Go On\",\"Bohemian Rhapsody\"]:\n new_list.append(item.lower())\n\nprint(new_list)"} {"instruction": "Create a Python program to convert a list of numbers to a comma separated string. The program should take a list of integers as input and return a string with the elements of the list separated by a comma (',').", "input": "list_of_integers = [1, 2, 3, 4]", "output": "def list_to_string(list):\n return ','.join(str(x) for x in list)\n\nlist_of_integers = [1, 2, 3, 4]\nprint(list_to_string(list_of_integers)) // Outputs: 1,2,3,4"} {"instruction": "Refactor a Python function with a long code block, so that it has descriptive function names, is object-oriented, and more efficient.", "input": "def long_code_block(input_a, input_b):\n result = 0\n for i in range(len(input_a)):\n for j in range(len(input_b)):\n if input_b[j] == input_a[i]:\n result = result + 1\n return result", "output": "def count_matches(list_a, list_b):\n count = 0\n for item_a in list_a:\n for item_b in list_b:\n if item_b == item_a:\n count += 1\n return count"} {"instruction": "Design a Python script to print the first 10 even numbers.", "input": "", "output": "for num in range(0, 20, 2):\n if num < 10:\n print(num, end=' ') \n# Output: 0 2 4 6 8"} {"instruction": "Write a SQL query to produce a list of customer names from the following table.", "input": "Table: customers | customer_id | name | | --------- | ----- | | 1 | Bill | | 2 | Jane | | 3 | John |", "output": "SELECT name FROM customers;"} {"text": "[EN Wikipedia] Aberdeenshire\n\nAberdeenshire (; ) is one of the 32 council areas of Scotland. It takes its name from the County of Aberdeen, which has substantially different boundaries. The Aberdeenshire Council area includes all of the area of the historic counties of Aberdeenshire and Kincardineshire (except the area making up Aberdeen City council area), as well as part of Banffshire. The county boundaries are officially used for a few purposes, namely land registration and lieutenancy. Aberdeenshire Council is headquartered at Woodhill House, in Aberdeen, making it the only Scottish council whose headquarters are located outside its jurisdiction. Aberdeen itself forms a different council area (Aberdeen City). Aberdeenshire borders onto Angus and Perth and Kinross to the south, Highland and Moray to the west and Aberdeen City to the east. Traditionally, it has depended economically on the primary sector (agriculture, fishing, and forestry) and related processing industries. Over the last 40 years, the development of the oil and gas industry and associated service sector has broadened Aberdeenshire's economic base, and contributed to a rapid population growth of some 50% since 1975. Its land represents 8% of Scotland's overall territory. It covers an area of . History Aberdeenshire has a rich prehistoric and historical heritage. It is the locus of a large number of Neolithic and Bronze Age archaeological sites, including Longman Hill, Kempstone Hill, Catto Long Barrow and Cairn Lee. The area was settled in the Bronze Age by the Beaker culture, who arrived from the south around 2000–1800 BC. Stone circles and cairns were constructed predominantly in this era. In the Iron Age, hill forts were built. Around the 1st century AD, the Taexali people, who have left little history, were believed to have resided along the coast. The Picts were the next documented inhabitants of the area and were no later than 800–900 AD. The Romans also were in the area during this period, as they left signs at Kintore. Christianity influenced the inhabitants early on, and there were Celtic monasteries at Old Deer and Monymusk. Since medieval times, there have been many traditional paths that crossed the Mounth (a spur of mountainous land that extends from the higher inland range to the North Sea slightly north of Stonehaven) through present-day Aberdeenshire from the Scottish Lowlands to the Highlands. Some of the most well-known and historically important trackways are the Causey Mounth and Elsick Mounth. Aberdeenshire played an important role in the fighting between the Scottish clans. Clan MacBeth and the Clan Canmore were two of the larger clans. Macbeth fell at Lumphanan in 1057. During the Anglo-Norman penetration, other families arrive, such as House of Balliol, Clan Bruce, and Clan Cumming…"} {"text": "[DE Wikipedia] Sandy Wilson\n\nSandy Wilson ist der Name folgender Personen: * Sandy Wilson (1922–2007), britischer Architekt, siehe Colin St. John Wilson Sandy Wilson (Komponist) (Alexander Galbraith Wilson; 1924–2014), britischer Musicalkomponist und -texter Sandy Wilson (Regisseurin) (Sandra Wilson; * 1947), kanadische Filmregisseurin und Drehbuchautorin Siehe auch: Alex Wilson Alexander Wilson (Begriffsklärung)"} {"instruction": "Create a class that contains two methods: one to generate a random number between a given range, and one to create a list of \"n\" random numbers.", "input": "n = 10, min = 0, max = 100", "output": "class RandomNumberList: def __init__(self): self.numbers = [] def generate_random(self, min, max): return random.randint(min, max) def create_list(self, n, min, max): # Generate a list of n random numbers between min and max self.numbers = [self.generate_random(min, max) for _ in range(n)] return self.numbers"} {"text": "[CS Wikipedia] Salon vín\n\nSalon vín – národní soutěž vín ČR je finální soutěží systému Národní soutěže vín. V rámci soutěže je každý rok vybráno nejlepší víno s titulem \"Šampion\", dále \"Vítězové kategorií\" a \"Nejlepší kolekce\". Sto nejlepších vín soutěže je oceněno prestižním titulem \"Salon vín ČR\". Na vlastní soutěž navazuje celoročně otevřená veřejná degustační expozice nejlepších sta vín, umístěná ve sklepních prostorách státního zámku ve Valticích. Nominace Vína přihlášená do Salonu vín musí nejprve projít systémem nominačních oblastních soutěží systému Národní soutěže vín, garantovaných Svazem vinařů ČR. Teprve na základně dominace může přihlásit vinař své víno k hodnocení ve finální soutěži – Salonu vín – národní soutěži vín ČR. Zařazena mohou být jen vína vyrobená z hroznů vypěstovaných v České republice, přihlašovaná partie musí v dané kategorii splňovat minimální množstevní kriteria daná statutem Salonu vín. Takto získané vzorky jsou hodnoceny komisí degustátorů, která maximálně 100 vínům udělí právo označovat láhve známkou \"Salon vín\", chráněnou Úřadem průmyslového vlastnictví ČR a zároveň je udělen titul \"Šampion\", \"Vítězové kategorií\" a \"Nejlepší kolekce\". Soutěž „Salon vín České republiky“ je také samozřejmě uznanou soutěží podle kriterií Ministerstva zemědělství a hodnocení probíhá pod kontrolou MZe. Hodnocení Hodnocení je prováděno 100 bodovým systémem podle platných regulí O.I.V. (mezinárodní organizace pro vinařství a vinohradnictví). K tomu, aby hodnocení vín proběhlo na vysoké profesionální úrovni, jsou vybíráni degustátoři podle svých znalostí, zkušeností a schopnosti dokonale senzoricky hodnotit a rozlišovat víno. Nominovaní degustátoři museli projít mezinárodním degustačním kursem, který vedli enologové Vyšší odborné školy a Spolkového úřadu pro vinařství a ovocnářství v rakouském Klosteneuburgu a museli složit zkoušku podle norem DIN, ISO a ÖNORM. Důležitým a zcela zásadním atributem je požadavek na předchozí naláhvování celé přihlašované partie vína a odběr a zapečetění vzorků přímo u výrobce vína organizátorem Salonu, který má právo na výběr libovolných 6 láhví z přihlašované partie. Hodnocení Salonu vín se uskutečňuje každoročně v lednu v profesionálním degustačním pracovišti v Národním vinařském centru ve Valticích, nejlepším svého druhu u nás a srovnatelným s podobnými pracovišti v Evropě. Prezentace Po vybrání kolekce Salonu vín jsou tato vína nakoupena v množství uvedeném ve statutu a uložena ve sklepních prostorách Národního vinařského centra. Zde jsou k dispozici veřejnosti, která má možnost ochutnat kterékoliv ze zde uložených vín. Vína uložená v Salonu vín jsou určena výhradně ke vzdělávání návštěvníků o víně a propagaci a podpoře našeho vinařství tím, že široká veřejnost, včetně zahraničních návštěvníků, má možnost naše nejlepší vína…"} {"text": "[DE Wikipedia] Bill Schafhauser\n\nWilliam „Bill“ Schafhauser (* 12. März 1962 in Saint Paul, Minnesota) ist ein ehemaliger schweizerisch-US-amerikanischer Eishockeyspieler, der von 1989 bis 1996 in der Nationalliga A für den EV Zug aktiv war. Karriere Schafhauser begann an der lokalen Hill-Murray High School mit dem Eishockeyspielen. Ab 1980 spielte er für die Northern Michigan University in der National Collegiate Athletic Association. Die Qualitäten des Verteidigers blieben auch den NHL-Scouts nicht verborgen. Beim NHL Entry Draft 1981 wurde er in der sechsten Runde an 117. Stelle von den Chicago Black Hawks gedraftet. 1982 wurde er für die U-20 Nationalmannschaft der USA aufgeboten und erreichte mit dieser an der Junioren-Weltmeisterschaft im eigenen Land den sechsten Platz. Nach seinem Abschluss startete er seine Profikarriere in der zweitklassigen International Hockey League. Obwohl er gleich in seiner ersten Saison mit der Ken McKenzie Trophy für den besten Neuling ausgezeichnet wurde, schaffte Schafhauser den Sprung in die NHL nicht. Deshalb entschloss er sich, in Europa sein Glück zu versuchen und unterschrieb für ein Jahr in Italien beim SV Ritten-Renon. Dank Großeltern mütterlicherseits erhielt er die Schweizer Staatsbürgerschaft und konnte fortan in der Schweizer Meisterschaft spielen, ohne das Ausländerkontingent zu belasten. Nach einer Saison in der Nationalliga B beim SC Herisau wechselte er 1989 in die höchste Spielklasse zum EV Zug, mit welchem er bis ins Playoff-Finale vordrang. Sein neun Jahre jüngerer Bruder Pat war in Zug von 1991 bis 1994 sein Teamkollege. Während der Saison 1995/96 verletzte sich sein Bruder Pat bei einem Spiel so schwer, dass er fortan querschnittgelähmt war. Nach einer Auszeit, die er nutzte, um seinem Bruder beizustehen, entschloss er sich, seine eigene Karriere fortzusetzen. Nach Knieproblemen musste er seine Karriere aber am Ende der Saison trotzdem beenden. Erfolge und Auszeichnungen Qualifikationssieger und Vizemeister mit dem EV Zug 1995 Ken McKenzie Trophy 1985 Northern Michigan MVP: 1984 NCAA West All-America Second Team: 1984 CCHA All-Star Second Team: 1984 Northern Michigan Bester Verteidiger: 1982, 1984 Weblinks Eishockeyspieler (Northern Michigan Wildcats) Eishockeyspieler (Kalamazoo Wings, IHL) Eishockeyspieler (Hershey Bears) Eishockeyspieler (Ritten Sport) Eishockeyspieler (EV Zug) Eishockeyspieler (SC Herisau) US-Amerikaner Schweizer Geboren 1962 Mann"} {"text": "[EN Wikipedia] List of Israeli films of 1972\n\nA list of films produced by the Israeli film industry in 1972. 1972 releases Unknown premiere date See also 1972 in Israel References External links Israeli films of 1972 at the Internet Movie Database Lists of 1972 films by country or language Film 1972"} {"instruction": "Modify a jQuery code to make an element translucent", "input": "", "output": "$(document).ready(function(){ $(\"#targetElement\").css(\"opacity\", \"0.5\"); });"} {"instruction": "Create a class in Python with methods \"add\" and \"find\" to add a value to a dictionary and find the value in it, respectively.", "input": "", "output": "class Dictionary: def __init__(self): self.data = {} def add(self, key, value): self.data[key] = value def find(self, key): if key in self.data: return self.data[key] return None"} {"text": "[DE Wikipedia] Spanischer Fingerhut\n\nDer Spanische Fingerhut (Digitalis obscura), auch Dunkler Fingerhut genannt, ist eine Pflanzenart aus der Gattung der Fingerhüte (Digitalis) in der Familie der Wegerichgewächse (Plantaginaceae). Die Pflanze ist in östlichen und südöstlichen Bergregionen Spaniens und im marokkanischen Rifgebirge heimisch. Sie ist in allen Pflanzenteilen giftig und wird selten als Zierpflanze genutzt. Beschreibung Erscheinungsbild und Blatt Der Spanische Fingerhut ist ein immergrüner Halbstrauch, der Wuchshöhen von 30 bis 60 Zentimeter, selten 120 Zentimeter erreicht. Die rötlichbraunen Stängel sind niederliegend bis aufsteigend, unverzweigt oder etwas verzweigt, im unteren Teil verholzend mit rissiger Rinde und nur im oberen Teil beblättert. Die dunkelgrünen, einfachen, ledrigen, glänzenden Laubblätter sind linealisch bis lanzettlich, 6 bis 15 Zentimeter lang und 0,4 bis 2,2 Zentimeter breit, ganzrandig oder schwach gezähnt. Die Blätter sind an jungen Trieben dicht angeordnet, meist nach unten gebogen und sehr spitz. Die unteren, älteren Blätter sind zurückgebogen und rötlich bis braun gefärbt. Bis auf die Blüten sind alle oberen Pflanzenteile kahl. Blütenstand und Blüte Der endständige, 9 bis 22 Zentimeter lange, einseitswendige traubige Blütenstand ist mit sieben bis zweiundzwanzig (selten auch bis vierzig) gestielten, zwittrigen, zygomorphen Blüten locker besetzt. Die lanzettlichen Tragblätter sind 6 bis 17 Millimeter lang und 2 bis 2,5 Millimeter breit. Die eiförmigen bis elliptischen oder elliptischen bis lanzettlichen Kelchblätter sind 5,5 bis 12 Millimeter lang und 2 bis 3,5 Millimeter breit, spitz oder spitz zulaufend, gekerbt, kahl oder am Rande etwas drüsig behaart. Die zweilippige, 21 bis 31 Millimeter lange, braunrote bis orangegelbe (selten weiße) Blütenkrone ist glockenförmig und außen drüsig behaart. Die Kronröhre ist 15 bis 20 Millimeter lang und 8 bis 13 Millimeter breit und innen dunkler rotbraun gefleckt. Der Fruchtknoten ist drüsig behaart. Die obere Kronlippe ist zweilappig oder ganz. Die untere Kronlippe besitzt gut entwickelte, dreieckige, stumpfe oder rundspitzige Seitenlappen und einen 6 bis 11 Millimeter langen mittleren Kronlappen. Die Kronlappen sind innen in der Mitte gelborange, zum Rand und zur Kronröhre hin rotbraun gefleckt. Die äußeren Ränder sind mit bis zu 1,5 Millimeter langen, weißen Haaren besetzt. Die Blütezeit erstreckt sich an den natürlichen Standorten von April bis Juli, in mitteleuropäischen Gärten von Juni bis September. Die Nektar führenden Blüten werden von Bienen bestäubt, gelegentlich aber auch von Vögeln besucht. Frucht und Samen Nach der Befruchtung entwickelt sich der Fruchtknoten zu einer ei- bis kegelförmigen, sehr spitzen, drüsig behaarten Kapselfrucht, die 13 bis 21 Millimeter lang und 6 bis 9 Millimeter breit…"} {"text": "[DE Wikipedia] Arvède Barine\n\nArvède Barine, Pseudonym von Louise-Cécile Vincens, geb. Bouffé (* 17. November 1840 in Paris; † 14. November 1908 ebenda) war eine französische Historikerin, Biographin und Literaturkritikerin. Leben Arvède Barine war eine Enkelin des unter Napoleon Bonaparte nach Frankreich eingewanderten Schweizer Staatsmannes Stapfer. Verheiratet war sie mit Charles Ernest Vincens (1836–1908). Sie trat mit Übersetzungen aus dem Russischen und Englischen hervor. So übertrug sie aus dem Englischen La Russie contemporaine (1872) von Herbert Barry und aus dem Russischen Souvenirs: enfance, adolescence, jeunesse (1886) von Tolstoi. Sie schrieb Artikel für die Revue politique et littéraire, Revue bleue, Revue des Deux Mondes, Nouvelle Revue u. a. Zeitschriften. In ihren literarischen und kulturgeschichtlichen Essays behandelte sie zumeist ausländische Erscheinungen, gewann im Journal des Débats Eingang mit Abhandlungen über Ibsen und war seit 1899 regelmäßige Mitarbeiterin des Figaro für Frauenfragen und Erziehungswesen. Um die Jahrhundertwende war sie Mitglied der Ligue de la patrie française, die sich als antidreyfusardische Bewegung gegründet hatte. Sie war Ritter der Ehrenlegion. Werke Portraits de femmes. Madame Carlyle. George Eliot, une détraquée , .... , 1887, von der Académie française gekrönt, 3. Auflage 1902 Essais et fantaisies, 1888 Princesses et grandes dames: Marie Mancini. La reine Christine. Une princesse arabe. La duchesse du Maine. La margrave de Bayreuth, 1890; 6. Auflage 1902 Bernardin de Saint-Pierre, Biographie, 1891 A. de Musset, Biographie, 1893; 3. Auflage 1900 Névrosés : Hoffmann, Quincey, Edgar Poe, G. de Nerval, 1898 Saint François d’Assise et la légende des trois compagnons, 1901 La jeunesse de la Grande Mademoiselle (1627–1652), 1901 Louis XIV et la Grande Mademoiselle (1652–1693), 1905 Madame, mère du Régent, 1652– 1722, postumes Werk, von Louis Batiffol 1909 vollendet Literatur Barine, Arvède, in: Meyers Großes Konversations-Lexikon, 6. Auflage, 1902-08, 2. Bd., S. 381–382. Weblinks Arvède Barvin auf Wikisource Einzelnachweise Literaturkritiker Übersetzer aus dem Englischen Übersetzer aus dem Russischen Übersetzer ins Französische Autor Mitglied der Ehrenlegion (Ritter) Franzose Geboren 1840 Gestorben 1908 Frau"} {"instruction": "Write a MySQL query to count the number of students enrolled in a course called \"Coding 101\".", "input": "", "output": "SELECT COUNT(*) FROM students WHERE course = 'Coding 101';"} {"text": "[DE Wikipedia] Nihat Şahin\n\nNihat Şahin (* 15. September 1989 in Izmir) ist ein türkischer Fußballtorhüter. Karriere Şahin kam in Izmir zur Welt und zog im Kindesalter mit seiner Familie nach Antalya. Hier begann er mit dem Fußballspielen in der Jugendmannschaft von Kar İçecek Sarılar Spor und anschließend in den Jugendmannschaften von Antalyaspor, Varsak Spor und İskenderun Demir Çelikspor. Bei İskenderun DÇ bekam er 2007 einen Profi-Vertrag, spielte aber lediglich für die zweite Auswahl. In der Winterpause der Saison 2008/09 wechselte er an die Schwarzmeerküste zum Drittligisten Ofspor und kam bis zum Saisonende zu sporadischen Einsätzen. Ab der Saison 2009/10 wurde er dann regelmäßig eingesetzt. 2011/12 wechselte er zum Süper-Lig-Klub Sivasspor. Obwohl er als dritter Torwart eingekauft wurde und in der zweiten Auswahl eingesetzt werden sollte, kam er zu mehreren Ligaeinsätzen für das Profi-Team. Aktuell hat er einen Vertrag bis 30. Juni 2015 Im Sommer 2014/15 wechselte innerhalb der Süper Lig zum Aufsteiger Mersin İdman Yurdu. Nachdem dieser Verein zum Sommer 2016 den Klassenerhalt verfehlte zog Şahin zur nächsten Saison zum Ligarivalen Gençlerbirliği Ankara weiter. Die Hauptstädter verließ er ebenfalls nach zwei Jahren und einem verfehlten Klassenerhalt und wechselte zum Zweitligisten Gazişehir Gaziantep FK. Erfolge Mit Gazişehir Gaziantep FK Play-off-Sieger der TFF 1. Lig und Aufstieg in die Süper Lig: 2018/19 Weblinks Fußballtorhüter (Gaziantep FK) Fußballtorhüter (Gençlerbirliği Ankara) Fußballtorhüter (Körfez Iskenderunspor) Fußballtorhüter (Mersin İdman Yurdu) Fußballtorhüter (Ofspor) Fußballtorhüter (Sivasspor) Sportler (Izmir) Türke Geboren 1989 Mann"} {"text": "[EN Wikipedia] Sanders Corps of Cadets Center\n\nThe Sam Houston Sanders Corps of Cadets Center is a museum on the campus of Texas A&M University in College Station, Texas, dedicated to the school's Corps of Cadets. Since its opening in 1992, the Center has become home to thousands of Aggie artifacts, the Metzger-Sanders gun collection, over 60 exhibits, and over 600 photographs. Exhibits Among the exhibits are those honoring Texas A&M traditions such as the 12th Man, Silver Taps and Muster, as well as some of the Corps of Cadets' most cherished traditions: Aggie Band, Final Review, Fish Drill Team, Parson's Mounted Cavalry and Ross Volunteers. The Center holds six of the seven Medals of Honor awarded to Texas A&M former students for actions during World War II. Hall of Honor The Corps Center hosts the Corps of Cadets Hall of Honor, which was established in 1993 to recognize former Corps members who \"exemplify the Aggie Spirit\". As of 2018, it features 171 inductees whose portraits, biographies, and plaques are on display. Notable members include Colonel Robert \"Danny\" Barr, an Air Force One pilot for Presidents George H. W. Bush and Bill Clinton. Corps Center Guard The Corps Center Guard (CGG) is based at the center and is a historical unit that serves to preserve the history of the Corps. They give tours to visiting tourists on a daily basis. As a tribute to the past of A&M, members often wear old uniforms of the Corps. References External links Sam Houston Sanders Corps of Cadets Center - official site Texas A&M University Museums in Brazos County, Texas Education museums in the United States University museums in Texas Museums established in 1992 Military and war museums in Texas"} {"instruction": "What code is necessary to randomly shuffle a list in Python?", "input": "", "output": "import random\n\ndef shuffle(list):\n random.shuffle(list)\n return list"} {"instruction": "Design a function that takes a string of HTML tags in an input and removes the tags from the string", "input": "", "output": "def strip_tags(s): tag = False out = \"\" for c in s: if c == \"<\": tag = True elif c == \">\": tag = False elif not tag: out += c return out"} {"instruction": "Write a Python script that computes the sum of two given integers.", "input": "", "output": "def sum_two_ints(a, b):\n return a + b"} {"instruction": "Create a Python function to remove duplicate elements from a given array.", "input": "array = [1, 2, 5, 2, 1, 9]", "output": "def remove_duplicates(array): \n result = set() \n for element in array: \n result.add(element) \n \n return list(result) \n \nresult = remove_duplicates(array) \nprint(result)"} {"instruction": "Design a class for representing student data in Python", "input": "", "output": "class Student:\n def __init__(self, name, age):\n self.name = name\n self.age = age\n \n def get_name(self):\n return self.name\n \n def get_age(self):\n return self.age"} {"instruction": "Generate a code in Python that takes a string as input and removes duplicate characters from it", "input": "St = \"DaSSmmoonnd\"", "output": "st = \"DaSSmmoonnd\"\nst_list = list(st)\nst_set = set(st_list)\nst_nodupes = ''.join(st_set)\nprint(st_nodupes)"} {"text": "[HI Wikipedia] फ़िल कोगन\n\nफ़िलिप जॉन \"फ़िल\" कोगन (जन्म: 31 मई 1967) न्यूज़ीलैंड की टेलिविज़न शक्सियत हैं, जिन्हें सबसे अधिक सीबीएस पर प्रसारित होने वाले अमेरिकी रिएलिटी टीवी कार्यक्रम द अमेज़िंग रेस के मेजबान के तौर पर जाना जाता है। शृंखला का सबसे पहले प्रसारण 2001 में हुआ था और फ़िल प्रथम प्रकरण से ही इसके साथ जुड़े हुए हैं। यह नो ऑपरच्युनिटि वेस्टिड के निर्माता और मेजबान ही हैं, जिसका निर्माण अमेरिका, न्यूज़ीलैंड और कनाडा में हो चुका है। अपने कार्य के लिए इन्होंने आठ प्रतिष्ठित एमी पुरस्कार जीते हैं। शुरुआती जीवन कोगन का जन्म क्राइस्टचर्च से 22 किलोमीटर (14 मील) दूर स्थित लिंकन नगर में हुआ था। इन्होंने अपने बचपन का काफ़ी समय अण्टीगुआ और कनाडा में व्यतीत किया था। इन्होंने क्राइस्टचर्च के सेंट एंड्रयूज़ कॉलेज से शिक्षा प्राप्त की थी। परिवार कोगन अपनी पत्नी लुईस कोगन और पुत्री एली के साथ रहते हैं। इनका वर्तमान घर लॉस एन्जिल्स, कैलीफोर्निया, में है। इनके न्यूज़ीलैंड में भी दो घर हैं। सन्दर्भ जीवित लोग 1967 में जन्मे लोग क्राइस्टचर्च के लोग"} {"instruction": "Write a Python code to calculate the factorial of a given number using memoization.", "input": "", "output": "def factorial_memoization(n): \n\n\t#Creating table to store result \n\tfactorial_table = [1] * (n+1) \n\n\t# Calculating factorial and storing in \n\t# the table \n\tfor i in range(1, n+1): \n\t\tfactorial_table[i] = i * factorial_table[i - 1] \n\n\treturn factorial_table[n] \n\nresult = factorial_memoization(5)\nprint(result)"} {"instruction": "Write a python code to check for a number being prime or not.", "input": "num = 11", "output": "# Initialize a boolean no_prime no_prime = False # Check all numbers lower than num for i in range(2, num): if num % i == 0: no_prime = True break # Print the appropriate output if no_prime: print(num, 'is not prime') else: print(num, 'is prime')"} {"instruction": "Create a REST API in Python with Flask for a restaurant menu. The API should have endpoints for creating, updating, and deleting menu items.", "input": "Not applicable", "output": "from flask import Flask, request, json\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_marshmallow import Marshmallow\n\n# init Flask\napp = Flask(__name__)\n\n# Database init\napp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database.db'\napp.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False\ndb = SQLAlchemy(app)\n\n# Marshmallow init\nma = Marshmallow(app)\n\n# Create MenuItem model\nclass MenuItem(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Column(db.String(100))\n description = db.Column(db.String(200))\n \n def __init__(self, name, description):\n self.name = name\n self.description = description\n\n# Create MenuItemSchema\nclass MenuItemSchema(ma.Schema):\n class Meta:\n fields = ('id', 'name', 'description')\n\n# Init Schema\nmenu_item_schema = MenuItemSchema()\nmenu_items_schema = MenuItemSchema(many=True)\n\n# Create endpoints\n@app.route('/menu_items/create')\ndef create_menu_item():\n name = request.json['name']\n description = request.json['description']\n \n new_menu_item = User(name, description)\n \n db.session.add(new_menu_item)\n db.session.commit()\n \n return menu_item_schema.jsonify(new_menu_item)\n\n@app.route('/menu_items//update', methods=['PUT'])\ndef update_menu_item(id):\n menu_item = MenuItem.query.get(id)\n \n name = request.json['name']\n description = request.json['description']\n \n menu_item.name = name\n menu_item.description = description\n \n db.session.commit()\n \n return menu_item_schema.jsonify(menu_item)\n\n@app.route('/menu_items//delete', methods=['DELETE'])\ndef delete_menu_item(id):\n menu_item = MenuItem.query.get(id)\n \n db.session.delete(menu_item)\n db.session.commit()\n \n return json.dumps({'success': True})\n\n# Run the app\nif __name__ == '__main__':\n app.run(debug=True)"} {"instruction": "Write a SQL statement to delete all records from a table called 'students' where the grade is below 3.", "input": "", "output": "DELETE FROM students WHERE grade < 3;"} {"instruction": "Explain the purpose of the keyword ``this`` in Java.", "input": "", "output": "In Java, the keyword \"this\" is used to refer to the current object. It can be used to access the values of instance variables and to call methods within the current object. It can also be used to pass the object itself as an argument to another method. \"this\" is used to differentiate instance variables from local variables in the same method."} {"text": "[EN Wikipedia] Tutaki River\n\nThe Tutaki River is a river of the Tasman Region of New Zealand's South Island. It flows north from its sources southwest of Lake Rotoroa to reach the Mangles River 10 kilometres east of Murchison. See also List of rivers of New Zealand To access the river you head north of the town Murchison and turn off to the Mangles valley on the right. You will follow the road down the Mangles Valley until a T junction at which point you can choose to head north or south along Tutaki Road. The road follows the river, which is excellent for trout fishing. From the north branch you can turn off and head through the Braeburn track to visit Lake Rotoroa. In the south branch you will find Matakitaki station. References Rivers of the Tasman District Rivers of New Zealand"} {"instruction": "Create a array of objects in JavaScript.", "input": "", "output": "let arrayObjects = [ {name: 'Spike', age: 6}, {name: 'Spot', age: 4}, {name: 'Max', age: 2}, {name: 'Fluffy', age: 8} ];"} {"text": "[CS Wikipedia] Ellinikí Radiofonía Tileórasi\n\nEllinikí Radiofonía Tileórasi (ERT) (, : Řecký rozhlas a televize, čili Řecká vysílací společnost) je řecká veřejnoprávní televize a rozhlas. V červnu 2013 vláda rozhodla, že kvůli korupci a finanční neefektivnosti přeruší společnost po skončení svého programu 11. června (tedy v ranních hodinách 12. června) rozhlasové i televizní vysílání. V červnu roku 2015 byla její činnost na návrh vlády opět obnovena. Historie Rozhlasové vysílání ERT začalo v roce 1938 ve formě programu Aténské rozhlasové stanice, která později přerostla v Národní rozhlasovou společnost EIR. EIR se v roce 1950 stala zakládacím členem Evropské vysílací unie EBU. Po experimentálním televizním vysílání ze studia EIR v aténském Zappeionu v roce 1965 se rozběhlo pravidelné vysílání 23. února 1966. V roce 1987 došlo zákonem ke sloučení všech rozhlasových a televizních stanic v Řecku do společnosti ERT, která tak nahradila dřívější EIR, již přejmenovanou na EIRT (Národní instituce pro rozhlas a televizi). Zároveň vznikla ERT3, autonomní buňka uvnitř ERT, sdružující vysílání ET3 a regionálních rozhlasových stanic pro severní Řecko. Na přelomu tisíciletí ERT vysílala tři televizní programy. Televize byla financována smíšeným způsobem, základem byl poplatek za elektroměr a příjmy z reklamy. ERT byla dlouhodobě schodková. V roce 2006 dostala ERT první digitální multiplex. V červnu 2013 ERT vysílala tři celoplošné televizní a čtyři rozhlasové programy, dále několik regionálních programů a vysílání do zahraničí Voice of Greece. Kanály Televizní ET1 - kultura, dokumenty, filmy, pořady pro děti a zprávy NET - zprávy, publicistika, filmy, zábavné pořady ET3 - regionální vysílání pro severní Řecko ERT HD - vysílání v HD rozlišení ERT World - vysílání do zahraničí pro řeckou diasporu Rozhlasové Celoplošné ERA 1 - zprávy, sport, diskusní pořady ERA 2 - pořady pro mladé, současná hudba ERA 3 - vážná hudba, umění, kultura, rozhlasové hry ERA Spor - sportovní přenosy a zprávy Voice of Greece - vysílání do zahraničí pro řeckou diasporu Regionální KOSMOS - world music a alternativní hudba, vysílá jen v Aténách a Korintu FILIA - cizojazyčná stanice, vysílací pro imigranty a turisty, vysílá jen v Aténách a Korintu Přerušení vysílání a jeho obnova 11. června 2013 oznámil mluvčí řecké vlády Lukase Papadimose, že televizní i rozhlasové vysílání ERT bude přerušeno po skončení programu plánovaného na tento den, tedy v ranních hodinách 12. června. Oficiálním důvodem byly „nedostatek transparentnosti a neuvěřitelná extravagance“, média viděla též zřejmou souvislost s úspornými opatřeními kladenými na řeckou vládu Evropskou komisí a Mezinárodním měnovým fondem v souvislosti s pomocí těchto institucí v řecké finanční krizi. Rozhodnutí se dotklo zhruba 2500 zaměstnanců, kteří dostali výpověď a mohou požádat o…"} {"instruction": "Write a for loop in Python to sum up the elements of an array.", "input": "[5, 9, 2]", "output": "arr = [5, 9, 2] total = 0 for num in arr: total+=num print(total) Output: 16"} {"instruction": "Align text cells in a table to the left,he right, and center.", "input": "", "output": "# Python program to align text cells in a table to the left,he right, and center \n\ntable = [('Name', 'Age', 'Gender'),\n ('John', '21', 'Male'),\n ('Doe', '25', 'Female')]\n\nfor row in table:\n # Align text to the left \n left_aligned = \"{:<10}{:<10}{:<10}\".format(*row) \n \n # Align text to the right\n right_aligned = \"{:>10}{:>10}{:>10}\".format(*row) \n \n # Align text to the center\n center_aligned = \"{:^10}{:^10}{:^10}\".format(*row) \n\nprint(\"Left aligned:\")\nprint(left_aligned) \n\nprint(\"Right aligned:\")\nprint(right_aligned)\n\nprint(\"Center aligned:\")\nprint(center_aligned) \n\n# Output:\n# Left aligned:\n# Name Age Gender \n# John 21 Male \n# Doe 25 Female \n\n# Right aligned:\n# Name Age Gender\n# John 21 Male\n# Doe 25 Female \n\n# Center aligned:\n# Name Age Gender \n# John 21 Male \n# Doe 25 Female"} {"instruction": "Convert the following SQL statement to a Pyspark Query.", "input": "SELECT employee_id, name, salary FROM employees WHERE salary > 50000", "output": "spark.sql(\"SELECT employee_id, name, salary FROM employees WHERE salary > 50000\").show()"} {"instruction": "Write an SQL query to identify unique months and years that appear in a table.", "input": "Table: Appointments id | month | year", "output": "SELECT DISTINCT month, year FROM Appointments;"} {"instruction": "Develop a class in Python to perform various matrix operations like addition, subtraction, multiplication and transpose.", "input": "", "output": "class Matrix: \n def __init__(self, m, n, lst): \n self.m = m \n self.n = n \n self.mat = [] \n \n c = 0\n for i in range(self.m): \n a =[] \n for j in range(self.n): \n a.append(lst[c]) \n c += 1\n self.mat.append(a) \n \n def __str__(self): \n output = \"\"\n for i in self.mat: \n for j in i: \n output += str(j) + \" \"\n output += '\\n'\n return output \n \n def add(self, mat2): \n for i in range(self.m): \n for j in range(self.n): \n self.mat[i][j] += mat2.mat[i][j] \n \n def sub(self, mat2): \n for i in range(self.m): \n for j in range(self.n): \n self.mat[i][j] -= mat2.mat[i][j]\n \n def mul(self, mat2): \n result = [] \n for i in range(self.m): \n a =[] \n for j in range(mat2.n): \n s = 0\n for k in range(self.n): \n s += self.mat[i][k] * mat2.mat[k][j] \n a.append(s) \n result.append(a) \n self.mat = result \n self.m = len(result) \n self.n = len(result[0]) \n \n def transpose(self):\n result = [[self.mat[j][i] for j in range(len(self.mat))] for i in range(len(self.mat[0]))]\n self.mat = result \n self.m = len(result) \n self.n = len(result[0])"} {"instruction": "Create a python program to calculate Fibonacci sequence for a given number.", "input": "n = 8", "output": "def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n-1) + fibonacci(n-2)\n\nif __name__ == '__main__':\n n = 8\n print(fibonacci(n))"} {"instruction": "Create a Python class to work with complex numbers.", "input": "", "output": "class ComplexNumber: \"\"\"This class is used to work with complex numbers.\"\"\" def __init__(self, real, imag): self.real = real self.imag = imag def __add__(self, other): \"\"\"This method overloads the '+' operator to add complex numbers.\"\"\" return ComplexNumber(self.real + other.real, self.imag + other.imag) def __sub__(self, other): \"\"\"This method overloads the '-' operator to subtract complex numbers.\"\"\" return ComplexNumber(self.real - other.real, self.imag - other.imag) def __mul__(self, other): \"\"\"This method overloads the '*' operator to multiply complex numbers.\"\"\" return ComplexNumber(self.real*other.real - self.imag*other.imag, self.real*other.imag + self.imag*other.real) def __str__(self): \"\"\"This method overrides the __str__ method to print complex numbers in a readable format.\"\"\" return self.real + self.imag + \"i\" if __name__ == '__main__': c1 = ComplexNumber(1, 2) c2 = ComplexNumber(2, 3) print(\"Addition of c1 and c2 =\", c1 + c2) print(\"Subtration of c1 and c2 =\", c1 - c2) print(\"Multiplication of c1 and c2 =\", c1 * c2)"} {"instruction": "Create a machine learning model that predicts whether an email is spam or not.", "input": "", "output": "import scikit-learn as sklearn # Load the data X = dataset[['email_body', 'send_from', 'subject', 'num_links']] y = dataset['is_spam'] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 0, stratify=y) # Train the model classifier = sklearn.linear_model.LogisticRegression() classifier.fit(X_train, y_train) # Test the model y_predicted = classifier.predict(X_test) # Check the accuracy accuracy = sklearn.metrics.accuracy_score(y_test, y_predicted) print(\"Accuracy score: {:.2f}\".format(accuracy)) # Output: Accuracy score: 0.95"} {"instruction": "Replace the placeholders in the following Python code snippet with appropriate values.", "input": "for x in range(__, __): print(x)", "output": "for x in range(0, 10): print(x)"} {"instruction": "Write a code to merge two given lists of equal size.", "input": "list1 = [1,2,3] list2 = [4,5,6]", "output": "\"\"\" Write a code to merge two given lists of equal size \"\"\" # Given lists list1 = [1,2,3] list2 = [4,5,6] # Initialising an empty list merged_list = [] # Merging the lists for i in range(len(list1)): merged_list.append(list1[i]) merged_list.append(list2[i]) # Printing the merged list print(\"Merged list is\", merged_list)"} {"instruction": "Create a Python program to generate a list of random integers with the size", "input": "5", "output": "import random\n\ndef generate_random_int_list(n):\n return [random.randint(0,10) for i in range(n)]"} {"instruction": "Using the standard library to construct a generator that returns the first n prime numbers.", "input": "", "output": "from math import sqrt def prime_numbers(n): primes = [] i = 2 while len(primes) < n: for number in range(2, int(sqrt(i)) + 1): if i % number == 0: break else: primes.append(i) i += 1 yield from primes"} {"text": "[EN Wikipedia] Rawda, Kuwait\n\nRawda ( Gulf Arabic pronunciation: ) is an area of Capital Governorate in Kuwait and a suburb of the capital city of Kuwait City. It comprises five blocks. The area is served by Rawda and Hawally Co-Op Society. It neighbours five other areas: Adialiya, Nizha, Hawally and Surra. The area falls between, and is served by, Kuwait's 3rd Ring Road & 4th Ring Road from East to West. Kuwait's Route 40 is located to the east of the area, and serves it from the north to the south. History and Etymology The area is named after its plants and flowers that bloom during the spring. The area was temporarily named East ʿDēlīya during and after its construction, before being renamed to Rawda, meaning garden or meadow in Arabic. Services Hawally and Rawda Co-Op Society provides public consumer services, including running the main supermarket and convenience stores. The area's co-op is consistently ranked the best or one of the best in Kuwait. References Suburbs of Kuwait City"} {"instruction": "Compose a Python function to find all the prime numbers between 1 and 100.", "input": "", "output": "def find_primes(x, y):\n result = []\n for num in range(x, y + 1):\n if num > 1:\n isPrime = True\n for i in range(2, num//2 + 1):\n if num % i == 0:\n isPrime = False\n break\n if isPrime:\n result.append(num)\n return result"} {"instruction": "Design a class to represent a Circle with a radius", "input": "", "output": "class Circle { constructor(radius) { this.radius = radius; } getArea() { return Math.PI * this.radius * this.radius; } getCircumference() { return 2 * Math.PI * this.radius; } }"} {"text": "[EN Wikipedia] Grand Prix Bradlo\n\nThe Grand Prix Bradlo was a cycling race held annually in Slovakia. It was part of UCI Europe Tour in category 2.2. Winners References Cycle races in Slovakia Recurring sporting events established in 2000 Recurring sporting events disestablished in 2009 2000 establishments in Slovakia UCI Europe Tour races Defunct cycling races in Slovakia"} {"instruction": "Edit the Java code to filter out the persons whose age is less than 18.", "input": "List persons = new ArrayList<>(); for (Person person : persons) { System.out.println(person.getName()); }", "output": "List persons = new ArrayList<>(); for (Person person : persons) { if (person.getAge() >= 18) { System.out.println(person.getName()); } }"} {"text": "[CS Wikipedia] Betlémská\n\nBetlémská ulice na Starém Městě v Praze spojuje Smetanovo nábřeží a Betlémské náměstí. Nazvána je podle nedaleké Betlémské kaple na Betlémském náměstí postavené v letech 1391-94. Na čísle 4 je nejstarší střední průmyslová škola v České republice, celým názvem Střední průmyslová škola strojnická, škola hlavního města Prahy, založena v roce 1837. Historie a názvy Ulice vznikla ve středověku a měla různé názvy: původní název - ulice \"Svatého Ondřeje\" později - střední část má název \"Boršov\", část u Vltavy má název \"Dolní Solní\" podle zdejší solnice, nebo \"Přívozní\" od konce 18. století - název \"Betlémská\". Budovy, firmy a instituce měšťanský dům - Betlémská 1, Smetanovo nábřeží 8 U Dvou okounků - Betlémská 2, Divadelní 24 U Kuchyňků - Betlémská 3, Karoliny Světlé 27 Střední průmyslová škola strojnická, škola hlavního města Prahy - Betlémská 4 Koukolovský dům - Betlémská 5 Residence Bologna - Betlémská 6, Konviktská 5 Náprstkovo muzeum asijských, afrických a amerických kultur - Betlémská 13, U Dobřenských 2, Betlémské náměstí 1 dům U Bílé růže - Betlémská 14 Odkazy Reference Literatura Externí odkazy Betlémská Ulice na Starém Městě (Praha) Ulice nazvané po městech"} {"instruction": "Create a new Python class called Area to calculate the area of different shapes.", "input": "", "output": "class Area: def __init__(self): pass def calculate_area_rectangle(self, length, width): return length * width def calculate_area_triangle(self, base, height): return 0.5 * base * height def calculate_area_circle(self, radius): return 3.14 * radius**2"} {"instruction": "How would you debug the following code?", "input": "def findNumberSum(numbers): total = 0 for n in numbers: total += n return total", "output": "To debug the code, you could start by adding print statements at different places in the code to find out the output at each step. For instance, you could add print statements to print out the value of the \"total\" variable at the beginning, during and after the for loop, or to see the contents of the list \"numbers\". Then you can check what value is expected and what value is actually produced for every step, to identify the issue."} {"instruction": "Create an HTML page containing a text field and a button.", "input": "", "output": " Input Form
      "} {"instruction": "Write a Python program for a program that checks if two strings are palindromes.", "input": "Input strings: “radar”, “dad”", "output": "def is_palindrome(str1, str2):\n # Reverse str1\n reverse_str1 = str1[::-1]\n\n # Check if str1 is the same as the reversed version of str2\n if reverse_str1 == str2:\n return True\n else:\n return False\n\n# Sample input\nstr1 = 'radar'\nstr2 = 'dad'\n\n# Check if the strings are palindromes\nprint(is_palindrome(str1, str2)) # Output: True"} {"text": "[DE Wikipedia] Friedrich Küter\n\nFriedrich Karl Ernst Küter (* 19. Mai 1879 in Stralau; † 31. Januar 1945 vermutlich in Bergen-Belsen) war ein deutscher Kaufmann und als Kommunalpolitiker 1920 der erste Bezirksverordnetenvorsteher von Berlin-Tempelhof. Lebenslauf Am 22. März 1902 heirateten Friedrich Küter und Emma Marie Anna Lücke (* 20. Februar 1878; † 7. August 1961 in Berlin-Friedenau) auf dem Standesamt Berlin IV a und zusammen hatten sie drei Töchter, Frieda Dorothea (* 27. Dezember 1897 in Fürstenwalde/Spree, bei der Hochzeit als eigenes Kind anerkannt), Hildegard Anna (* 17. November 1902 in Berlin-Tempelhof) und Margot (* 1909). Die Familie zog 1912 vom Schlesischen Bahnhof (heute Ostbahnhof) nach Berlin-Mariendorf in die Dorfstraße 2 (heute Alt-Mariendorf 53). Im Anschluss an seine kaufmännische Lehre ging er nach dem Ersten Weltkrieg, an dem er als Soldat teilgenommen hat, in die bezirkliche Verwaltung. Seit 1900 engagierte sich Friedrich Küter in der SPD oder der USPD. Mit der Bildung von Groß-Berlin im Jahr 1920 wurde Mariendorf ein Ortsteil des Bezirks Tempelhof und Friedrich Küter wurde am 20. Juni 1920 in die erste Bezirksverordnetenversammlung und am 23. November zum Bezirksverordnetenvorsteher (Präsident der Bezirksverordnetenversammlung) gewählt. Er amtierte bis zum 23. Februar 1921 und wurde dann zwei Tage später unbesoldeter Bezirksstadtrat. Küter wurde am 18. März 1921 vom Berliner Oberbürgermeister Gustav Böß persönlich in das Amt eingeführt. In dieser Funktion leitete er die Abteilung Bauwesen. Sein besonderes Augenmerk richtete er auf die Anlage von Grünflächen und Kleingärten in der heftig expandierenden Großstadt Berlin. Tempelhof und Mariendorf waren in dieser Zeit stark wachsende Orte. Seiner Initiative verdankt Mariendorf den Volkspark Mariendorf, der 1931 eingeweiht wurde. Hauptberuflich arbeitete er im Bezirksamt Kreuzberg als Oberinspektor. Zur Bezirksverordnetenwahl am 12. März 1933 kandidierte Küter auf dem Listenplatz 3 der SPD, konnte sein Mandat nach der Machtergreifung durch die Nationalsozialisten aber nicht mehr ausüben und verlor alle Ämter. Am 20. März 1933 wurde in der Tempelhofer-Mariendorfer Zeitung seine Beurlaubung gemeldet, offiziell schied er aber erst am 7. Juni 1933 aus seinem Amt als Stadtrat im Bezirksamt aus und wurde an diesem Tag durch einen von den Nationalsozialisten bestimmten Staatskommissar ersetzt. Friedrich Küter wurde 1933 mit dem Schild „Ich bin Sozialdemokrat“ von SA-Männern durch Tempelhofer Straßen geführt. Im April 1944 wurde er verhaftet und musste seinen 65. Geburtstag im Polizeipräsidium Alexanderplatz verbringen. Nach seiner Freilassung wurde er einen Tag später aufgrund einer Denunziation in das KZ Sachsenhausen verschleppt. Ohne Verfahren wurde er in die sogenannte Schutzhaft genommen. Im Frühjahr 1945…"} {"instruction": "Construct the lambda function for calculating the square of a number.", "input": "", "output": "square = lambda x: x*x #This lambda function will calculate the square of a number."} {"instruction": "Edit the given Python code to compute the mean of the given list of numbers.", "input": "my_list = [10, 20, 30, 40, 50] sum = 0.0 for x in my_list: sum += x", "output": "my_list = [10, 20, 30, 40, 50] sum = 0.0 for x in my_list: sum += x mean = sum / len(my_list)"} {"instruction": "Write a Python function using the Pandas library to filter out the rows with a missing value in the specified column.", "input": "Dataframe: Name Age John 25 Jane Maria 30 Column Name: Age", "output": "import pandas as pd # Input Data df = pd.DataFrame({'Name': ['John','Jane','Maria'], 'Age': [25, None, 30]}) # Filter the Data filtered_df = df.loc[df['Age'].notnull()] print(filtered_df)"} {"text": "[HI Wikipedia] ओनेगा झील\n\nओनेगा झील (रूसी: Оне́жское о́зеро, ओनेझ़स्कोए ओज़ेरो; अंग्रेज़ी: Lake Onega) पश्चिमोत्तरी रूस में कारेलिया गणतंत्र, लेनिनग्राद ओब्लास्त व वोलोग्दा ओब्लास्त के क्षेत्रों में स्थित एक मीठे पानी की झील है। लादोगा झील के बाद यह यूरोप की दूसरी सबसे बड़ी झील है। नाविक यातायात के लिये बाल्टिक सागर को श्वेत सागर से जोड़ने वाला नहर-मार्ग ओनेगा झील और इसके दक्षिण-पश्चिम में स्थित लादोगा झील से होते हुए निकलता है। किझ़ी द्वीप इस झील में किझ़ी द्वीप स्थित है, जो अपनी लकड़ी की इमारतों के लिये प्रसिद्ध है। यह जगह-जगह से लाई हुई काठ से सैंकड़ों वर्षों के काल में बनाई गई थीं। इन्हें भी देखें लादोगा झील कारेलिया गणतंत्र सन्दर्भ रूस की झीलें यूरोप की झीलें कारेलिया कारेलिया गणतंत्र"} {"instruction": "Build a Python program to tokenize a string into separate words.", "input": "\"Hello, World!\"", "output": "def tokenize(string):\n words = string.split(\" \")\n return words\n\ntokenized_str = tokenize(\"Hello, World!\")\nprint(tokenized_str)"} {"text": "[HI Wikipedia] पीयूष मिश्रा\n\nपीयूष मिश्रा (जन्म १३ जनवरी १९६३) एक भारतीय नाटक अभिनेता, संगीत निर्देशक, गायक, गीतकार, पटकथा लेखक हैं। मिश्रा का पालन-पोषण ग्वालियर में हुआ और १९८६ में उन्होंने दिल्ली स्थित नेशनल स्कूल ऑफ़ ड्रामा से स्नातक की शिक्षा प्राप्त की। उन्होंने मकबूल, गुलाल, गैंग्स ऑफ वासेपुर जैसी फ़िल्मों में गाने गाये हैं। पीयूष मिश्रा को उनके मित्र एन के शर्मा ने 1989 में साम्यवाद से परिचित कराया था और वे 20 वर्षों तक पूरी तरह से वामपंथी कार्यकर्ता थे। सन्दर्भ बाहरी कड़ियाँ An Interview with Piyush Mishra (पीयूष मिश्रा का एक साक्षात्कार) 1963 में जन्मे लोग जीवित लोग भारतीय गायक"} {"instruction": "Construct an SQL statement to select data from two tables.", "input": "", "output": "SELECT table_1.*, table_2.* FROM table_1, table_2 WHERE table_1.column_name = table_2.column_name;"} {"instruction": "Create a Python program which keeps track of 3 variables x, y and z.", "input": "", "output": "def keep_track():\n x = 0\n y = 0\n z = 0\n while True:\n # do something to x, y and z\n ..."} {"instruction": "Write a SQL query to find the names of all employees working at a given department", "input": "", "output": "SELECT e.name FROM employee e JOIN department d ON e.departmentid = d.id WHERE d.name = 'given department'"} {"instruction": "Generate a code snippet to add two numbers in Python.", "input": "x = 2, y = 4", "output": "result = x + y\nprint(result) # Prints 6"} {"instruction": "What is the fifth prime number?", "input": "", "output": "The fifth prime number is 11."} {"instruction": "Rewrite the following function from Java to Python:\n\nint findMax(int[] arr) { \n int max = arr[0]; \n for (int i = 0; i < arr.length; i ++) {\n if (arr[i] > max) {\n max = arr[i]; \n }\n }\n return max;\n}", "input": "Not applicable", "output": "def find_max(arr):\n max = arr[0]\n for i in range(len(arr)):\n if arr[i] > max:\n max = arr[i]\n return max"} {"text": "[DE Wikipedia] Umon (Volk)\n\nDie Umon sind eine Volksgruppe in Nigeria, die aus etwa 29.800 Menschen (Stand: 2013) besteht. Sie sprechen eine gleichnamige Sprache, die zur Sprachgruppe Kohumono-Ubaghara gehört. Die vorwiegende Religion ist das Christentum. Literatur Toyin Falola, Bukola Adeyemi Oyeniyi: Nigeria. ABC-Clio, Santa Barbara 2015, ISBN 978-1-59884-968-4, S. 329, Nr. 495 (Google books). Weblinks Umon bei peoplegroups.org. Abgerufen am 24. April 2013 Einzelnachweise Ethnie in Nigeria"} {"text": "[CS Wikipedia] Agluona\n\nNázev Agluona může znamenat: Agluona (Minija) – řeka na západě Litvy, levý přítok Minije Agluona (Šešuvis) – řeka (mající dvě stejnojmenné větve) na západě Litvy, pravý přítok řeky Šešuvis Agluona (Agluona) – jedna ze zmíněných větví (přítok stejnojmenné řeky Agluony) Agluona (Vadakstis) – řeka na severu Litvy, levý přítok řeky Vadakstis (tvořící část hranice s Lotyšskem) Agluona (Širvėna) – řeka na severu Litvy, vlévající se ve městě Biržai do jezera jménem Širvenos ežeras Agluona (Snietala) – potok na západě Litvy (okres Jurbarkas), levý přítok řeky Snietala Naujoji Agluona – potok v katastru obce Naujoji Akmenė, levý přítok říčky Žara Agluona – litevský název pro Aglona – okresní město v západní části Lotyšska, v Latgale, 40 km na severovýchod od Daugavpilsu Původ názvu Agluona, někdy také jinak Egluona souvisí jazykově s názvem smrku – v litevštině eglė. Slovo eglė má stejný jazykový původ jako české slovo jehla(/jehlice) a také jedle (pozor na rozdíl podobných významů). Tedy shrnuto: smrk/eglė má v litevštině název podle jehličí. Agluona/Egluona má název podle smrků, které patrně jsou/byly hojné v jejím okolí. Agluona i Egluona jsou v litevštině rodu ženského, číslo jednotné. Externí odkazy"} {"instruction": "Use CSS to create a box containing some text with a light green background, black text, and a white border.", "input": "", "output": ".box { background-color: lightgreen; color: black; border: 1px solid white; }"} {"instruction": "Write a single-line Python code to delete a key-value pair from a dictionary.", "input": "my_dictionary = {'name': 'John', 'age': 20, 'job': 'Software Engineer', 'city': 'Berlin'}", "output": "my_dictionary.pop('city')"} {"text": "[CS Wikipedia] Dějiny lidstva\n\nDějiny lidstva jsou oblast dějin, která se zabývá celou minulostí lidské kultury a společnosti. Jako vědecký obor jsou předmětem historických věd, ale i antropologie. Vzletně a přitom výstižně popsal smysl této disciplíny Marcus Tullius Cicero: „Historia vero testis temporum, lux veritatis, vita memoriae, magistra vitae, nuntia vetustatis.“ – „Dějiny jsou svědky časů, světlem pravdy, živou pamětí, učitelkou života a poslem minulosti.“ Historie lidstva se obvykle dělí na pět období: pravěk, starověk, středověk, novověk a období dějin nejnovějších, tzv. soudobých, sahajících až do současnosti. Pravěk je tradiční označení období dějin lidstva, ze kterého nepocházejí žádné písemné prameny, jde o období do vzniku písma. Datace vynálezu písma je v různých oblastech světa značně individuální. Používání písma umožnilo vznik a rozvoj infrastruktury a rozšiřování vědomostí, a to ovlivnilo celé lidské dějiny. Jelikož písmo bylo vynalezeno na několika místech nezávisle na sobě, vedou se spory o to, která oblast byla kolébkou civilizace. Starověké civilizace vznikaly v blízkosti vodních toků. Kolem roku 3000 př. n. l. se zformovaly první městské státy v Mezopotámii (název znamená země mezi řekami, tedy mezi řekami Eufrat a Tigris), utvořil se centralizovaný stát v Egyptě, rozložený podél břehů Nilu, v dnešní Indii vznikla kultura poříčí Indu. Za konec starověku a začátek středověku se tradičně považuje pád Západořímské říše v roce 476, přechod středověku v novověk pak bývá nejčastěji symbolicky vymezován znovuobjevením Ameriky pro Evropany v roce 1492, existují však i jiná pojetí. Od 18. století se začaly velmi rychlým tempem hromadit znalosti a nové vynálezy v Evropě, což vlivem své rychlosti vyvolalo průmyslovou revoluci. Dějiny se často vážou na historické prameny jako například kroniky. Ty však mohou být tendenční a zkreslovat tak pohled na dějiny. Navíc se projevuje interpretační romantizace a idealizace dějin. V moderní době pak dochází například i k zpochybňování holokaustu. Zkreslování vzpomínek je totiž běžný proces. Rozvoj lidského rodu a vliv klimatu Anatomicky moderní člověk, systematicky Homo sapiens (člověk moudrý), vznikl asi před 400 000 až 250 000 lety. V té době existovaly, i když už jen vzácně, i další druhy rodu Homo, a to Homo erectus (člověk vzpřímený) a Homo neanderthalensis (člověk neandertálský). Většina vědců zabývajících se lidskou evolucí se domnívá, že druh Homo sapiens se vyvinul v Africe a odtud se rozšířil do všech ostatních částí světa, v Evropě tak nahradil člověka neandertálského a v Asii člověka vzpřímeného, se kterými se geneticky zkřížil. Někteří vědci však soudí, že druh Homo sapiens se vyvinul v různých částech světa v téže době. Zřejmě nejpopulárnějším předchůdcem dnešního člověka, „pračlověkem“, je člověk neandertálský,…"} {"instruction": "Write a Bash script to accept two command line arguments (username and password) and echo them out.", "input": "", "output": "#!/bin/bash username=$1 password=$2 echo \"Username: ${username}\" echo \"Password: ${password}\""} {"text": "[CS Wikipedia] Stevan Mirković\n\nStevan Mirković (v srbské cyrilici Стеван Мирковић; 27. října 1927, Valjevo, Království Srbů, Chorvatů a Slovinců – 26. září 2015, Bělehrad) byl účastník jugoslávského partyzánského boje, voják Jugoslávské lidové armády. V roce 1944 vstoupil do řad partyzánů a také do komunistické strany. Bojoval na Sremské frontě, kde byl raněn. V 80. letech zastával řadu vyšších postů v jugoslávské armádě V letech 1987–1989 zastával pozici náčelníka generálního štábu JNA. Na konci roku 1989 odešel do výslužby. Zůstal nicméně i nadále členem organizace jugoslávské lidové armády, existující při Svazu komunistů. S rostoucím vlivem Slobodana Miloševiće v průběhu roku 1989 a 1990 zostřoval postupně svoji kritiku vůči srbskému předákovi. Reference Narození v roce 1927 Narození 27. října Úmrtí v roce 2015 Úmrtí 26. září Jugoslávští partyzáni Muži"} {"instruction": "Write an SQL query to find all employees with a salary greater than $5000.", "input": "", "output": "SELECT * FROM employees WHERE salary > 5000;"} {"instruction": "Compute the Least Common Multiple of two numbers.", "input": "a = 15\nb = 10", "output": "# Python3 code to find LCM\ndef compute_lcm(x, y):\n # choose the greater number\n if x > y:\n greater = x\n else:\n greater = y\n\n while(True):\n if((greater % x == 0) and (greater % y == 0)):\n lcm = greater\n break\n greater += 1\n\n return lcm\n\nlcm = compute_lcm(15, 10)\nprint(\"The Least Common Multiple of 15 and 10 is: \",lcm)"} {"instruction": "Automatically refactor a subsection of Python code that uses two for-loops.", "input": "for x in range(3):\n for y in range(4):\n print(x, '-', y)", "output": "for x, y in itertools.product(range(3), range(4)):\n print(x, \"-\", y)"} {"text": "[EN Wikipedia] Elios Manzi\n\nElios Manzi (born 28 March 1996) is an Italian judoka. He competed at the 2016 Summer Olympics in the men's 60 kg event, in which he was eliminated in the second round by Kim Won-jin. References External links 1996 births Living people Italian male judoka Olympic judoka for Italy Judoka at the 2016 Summer Olympics Judoka at the 2014 Summer Youth Olympics Sportspeople from Messina 21st-century Italian people"} {"instruction": "Specify the platform and the environment variables needed to run a Java program.", "input": "", "output": "The platform dependent environment variables needed to run a Java program on any platform are: 1. JAVA_HOME: This variable stores the location of JDK. 2. PATH: This variable stores the path to the executables. 3. CLASSPATH: This variable contains the path to the Java classes. 4. JRE_HOME: This variable stores the location of the JRE."} {"instruction": "Write a function in Python that creates a random password of length 8 with at least two uppercase letters, one lowercase letter, one number, and one special character.", "input": "Not applicable", "output": "import random\nimport string\n\ndef random_password():\n char_length = 8\n characters = string.ascii_letters + string.digits + string.punctuation\n password = ''.join(random.choice(characters) for x in range(char_length))\n has_uppercase = any(x.isupper() for x in password)\n has_lowercase = any(x.islower() for x in password)\n has_numbers = any(x.isnumeric() for x in password)\n has_specials = any(x in string.punctuation for x in password)\n if has_uppercase+has_lowercase+has_numbers+has_specials >= 3:\n return password\n else:\n return random_password()\n\npwd = random_password"} {"instruction": "What is the code for using the Python Requests module to post data to the server?", "input": "URL: \"http://example.com/data\"", "output": "import requests\n \nurl = \"http://example.com/data\"\ndata = {\"name\":\"John Doe\",\"age\":30}\n \nresponse = requests.post(url, data = data)"} {"text": "[EN Wikipedia] Moskovsky Rail Terminal\n\nMoskovsky Rail Terminal may refer to: Moskovsky Rail Terminal (Nizhny Novgorod), a rail terminal in Nizhny Novgorod, Russia Moskovsky Rail Terminal (Saint Petersburg), a rail terminal in St. Petersburg, Russia Moskovsky Rail Terminal (Tula) See also Moscow railway station (disambiguation)"} {"instruction": "Create a class in Python to generate a calendar.", "input": "calendarName = \"My Calendar\"", "output": "class CalendarGenerator(object):\n\n def __init__(self, name):\n self.name = name\n\n def generate_calendar(self):\n calendar = []\n\n # Code to generate a calendar goes here\n\n return calendar\n\ncalendar = CalendarGenerator(calendarName)\ncalendar.generate_calendar()"} {"instruction": "What is the Python library used to parse a JSON string?", "input": "", "output": "The Python library used to parse a JSON string is json. The json library provides functions for encoding and decoding a JSON string. The syntax for decoding would be: json.loads(data). The syntax for encoding would be: json.dumps(data)."} {"instruction": "Run a sentiment analysis of the following sentence using Python.", "input": "The food was really good but the service was terrible.", "output": "\"\"\" Run a sentiment analysis of the sentence using Python \"\"\" import nltk from textblob import TextBlob text = 'The food was really good but the service was terrible.' blob = TextBlob(text) for sentence in blob.sentences: print(sentence.sentiment) # Output Sentiment(polarity=0.05, subjectivity=0.6)"} {"instruction": "Write a function that takes a sentence and returns the string with all occurrences of the longest word removed.", "input": "\"This is a very long sentence\"", "output": "def remove_longest_word(sentence): # Split the sentence into words words = sentence.split(' ') # Find the longest word longest_word = \"\" for word in words: if len(word) > len(longest_word): longest_word = word # Remove all occurrences of the longest word new_sentence = [] for word in words: if word != longest_word: new_sentence.append(word) # Join the list back into a string and return it return \" \".join(new_sentence) print(remove_longest_word(\"This is a very long sentence\")) # This is a sentence"} {"text": "[HI Wikipedia] चन्द्रशेखर कम्बार\n\nचंद्रशेखर कंबार (; जन्म : २ जनवरी १९३७) एक कन्नड़ भाषा के कवि, नाटककार एवं लोकसाहित्यकार हैं। उन्होंने कन्नड़ भाषा में फिल्मों का निर्देशन भी किया है और वे हम्पी में कन्नड़ विश्वविद्यालय के संस्थापक कुलपति भी रहे हैं। उनके उल्लेखनीय साहित्यिक योगदान के आलोक में उन्हें 2010 के लिए ज्ञानपीठ पुरस्कार प्रदान करने की घोषणा की गई है। इनके द्वारा रचित एक नाटक सिरिसंपिगे के लिये उन्हें सन् १९९१ में साहित्य अकादमी पुरस्कार (कन्नड़) से सम्मानित किया गया। सन्दर्भ 1937 में जन्मे लोग जीवित लोग कन्नड़ साहित्यकार ज्ञानपीठ सम्मानित साहित्य अकादमी द्वारा पुरस्कृत कन्नड़ भाषा के साहित्यकार"} {"instruction": "Write a SQL query to return the ranking of the employees with highest salary.", "input": "SELECT * FROM Employees ORDER BY Salary DESC", "output": "SELECT e.*, RANK() OVER (ORDER BY Salary DESC) AS Rank FROM Employees e"} {"text": "[DE Wikipedia] Pauly Shore\n\nPaul Montgomery „Pauly“ Shore (* 1. Februar 1968 in Los Angeles) ist ein US-amerikanischer Komödiant und Schauspieler. Leben Pauly Shore ist der Sohn von Sam und Mitzi Shore, den Gründern des Comedy-Clubs The Comedy Store. Geboren in Hollywood, wuchs er in Beverly Hills auf. 1986 schloss er die High School ab. Shore trat als Stand-Up-Comedian auf und hatte in den späten 1980er Jahren kleinere Rollen in mehreren Filmen und Fernsehserien. Einem breiteren Publikum wurde er 1989 als MTV-Moderator bekannt. Er hatte seine eigene Show, Totally Pauly, in der er auch sein Markenzeichen, The Weasel („das Wiesel“), erfand, eine Parodie auf einen selbstverliebten, exzentrischen und verplanten, aber letztlich liebenswürdigen Surfer. 1994 endete seine Zeit bei MTV. Populär wurde Shore jedoch vor allem durch seine Rollen in Filmkomödien Anfang der 1990er Jahre. Mit Steinzeit Junior aus dem Jahre 1992 gelang ihm der endgültige Durchbruch auf der Kinoleinwand, obwohl er für seine schauspielerischen Leistungen in diesem Film auch mit der Goldenen Himbeere ausgezeichnet wurde. Spätere Filme waren weniger erfolgreich und seinem steilen Aufstieg folgte ein allmählicher Abstieg. 1997 wurde seine TV-Comedyserie Pauly nach nur einer Folge von FOX eingestellt. Schließlich erhielt er die Goldene Himbeere in der Kategorie „Schlechtester Newcomer des Jahrzehnts“. Die späten 1990er, als lukrative Filmangebote ausblieben, verbrachte Shore vor allem als Synchronsprecher. Einen bei Kritikern und Fans beachteten Comebackversuch startete er im Jahr 2003 mit seiner selbstironischen Mockumentary Pauly Shore is Dead. Zuletzt trat er mit einer Comedyshow im amerikanischen Fernsehen auf, in der er unter anderem seine Sexsucht thematisierte. Pauly Shore hatte Beziehungen mit Susanna Hoffs (The Bangles) (1989), der Pornodarstellerin Savannah (1991–1992) und mit Kylie Minogue (1997). Filmografie (Auswahl) 1987: 21 Jump Street – Tatort Klassenzimmer (21 Jump Street, Fernsehserie, 1 Folge) 1988: Maybe Baby – Am Anfang war der Klapperstorch (For Keeps) 1988: Endlich wieder 18 (18 Again!) 1989: Phantom of the Mall 1989: Eine schrecklich nette Familie (Married… with Children) 1990: Wedding Band 1992: Class Act 1992: Steinzeit Junior (Encino Man) 1993: Schwiegersohn Junior (Son in Law) 1994: In the Army now – Die Trottel der Kompanie (In the Army now) 1995: Chaos! Schwiegersohn Junior im Gerichtssaal (Jury Duty) 1996: Bud & Doyle: Total bio. Garantiert schädlich (Bio-Dome) 1997: Mehr Pech als Verstand (The Curse of Inferno) 2003: Pauly Shore is Dead (PAULY SHORE IS DEAD: YOU'LL NEVER WIEZ IN THIS TOWN AGAIN!) 2005: My Big Fat Independent Movie 2009: Dr. Dolittle 5 2011: Bucky Larson: Born to be a Star 2015: Hawaii Five-0 (SE05 E22: Hangover (Ho'amoano)) 2016: Workaholics (SE06 E01: Wolves of…"} {"instruction": "Add code to this function to return the square of the input number.", "input": "def square_number(number): 1", "output": "def square_number(number): return number*number"} {"text": "[DE Wikipedia] Palast von Panah Ali Khan\n\nDer Palast von Panah Ali Khan (aserbaidschanisch Pənahəli Xanın sarayı) war die Privatresidenz von Pənahəli Xan, dem Gründer des Khanats Karabach (1747–1806), in der aserbaidschanischen Stadt Ağdam. In unmittelbarer Nähe des Palastes befindet sich der Imarət-Friedhof, ein adeliger Grabkomplex von Karabach-Herrschern. Geschichte und Architektur Der Palast wurde im Jahr 1738 in Ağdam errichtet, als der aufstrebende Pənahəli Xan versuchte, die Macht in der Region Karabach an sich zu reißen. Das Palastgebäude besteht aus zwei rechtwinklig zueinander stehenden Einheiten. Der Hauptteil des Bauwerks setzt sich aus mehreren gewölbten Räumen zusammen, die sich um den zentralen Kuppelraum gruppieren, vor dem sich ein Iwan befindet, der wiederum nach Süden ausgerichtet ist. Diese Halle ist die sogenannte Diwanchana, die die Hälfte des Palastes ausmacht. Der Iwan der Konstruktion wurde in Form einer dreifeldrigen Arkade angefertigt. Die Spitzbögen ruhten auf Säulen aus massivem Stein. Generell hatte der Iwan das Aussehen eines Portikus und fungierte somit als Haupteingang in das Gebäude. Die Haupthalle war von einem achteckigen Kuppelgewölbe mit einer kleinen laternenförmigen Öffnung an der Spitze überdacht. Zwischen 1993 und 2020 war Ağdam von armenischen Truppen besetzt. Die meisten kulturell-religiösen Einrichtungen der Region wurden in dieser Zeit entweder komplett zerstört oder stark beschädigt. Vom Palast von Panah Ali Khan sind heutzutage nur noch Ruinen übriggeblieben. Literatur und Einzelnachweise Palast von Panah Ali Khan Palast in Aserbaidschan Kulturdenkmal (Aserbaidschan) Erbaut in den 1730er Jahren"} {"instruction": "Write a Python program to display the multiplication table of a given number.", "input": "", "output": "def multiplication_table(n):\n print('Multiplication Table of ', n)\n for i in range(1, 11):\n product = i * n\n print('{0} x {1} = {2}'.format(i, n, product))"} {"instruction": "Create a bash script that creates three TextFiles named first.txt, second.txt, and third.txt each having 10 lines of text.", "input": "", "output": "#!/bin/bash for file in {first,second,third}.txt; do touch $file for i in {1..10}; do echo \"This is line $i in the file $file\" >> $file done done"} {"instruction": "Create a function in Python that will print out a random word from a given list.", "input": "words_list = ['cat', 'dog', 'ball', 'toy']", "output": "import random def random_word(words_list): word = random.choice(words_list) print(word) random_word(words_list)"} {"instruction": "Construct a class in Python to represent a point in Cartesian coordinates.", "input": "", "output": "class Point:\n def __init__(self, x, y):\n self.x = x\n self.y = y\n \n def distance_from_origin(self):\n return (self.x ** 2 + self.y ** 2) ** 0.5\n \np = Point(3, 4)\nprint(p.distance_from_origin())"} {"text": "[EN Wikipedia] Utakura River\n\nThe Utakura River is a river of the Northland Region of New Zealand's North Island. It flows west from its sources northwest of Kaikohe, reaching the Waihou River at the point where it widens to become an arm of the Hokianga Harbour. Long and short-fin eels, smelt, īnanga, torrentfish and redfin bully live in the river. The river is assessed as fair, in a scale between good and poor, as it suffers from turbidity and e-coli and phosphorus pollution. See also List of rivers of New Zealand References External links Far North District Rivers of the Northland Region Rivers of New Zealand"} {"instruction": "Compute the sum of the squares of all the numbers between 1 and 10 (inclusively).", "input": "", "output": "385"} {"text": "[EN Wikipedia] Nonprofit and Voluntary Sector Quarterly\n\nNonprofit and Voluntary Sector Quarterly is a peer-reviewed academic journal that covers research on the nonprofit and voluntary sector. The journal's editors are Joanne Carman (University of North Carolina at Charlotte) and Jaclyn Piatak (University of North Carolina at Charlotte). It was established in 1972 and is currently published by SAGE Publications on behalf of the Association for Research on Nonprofit Organizations and Voluntary Action . Abstracting and indexing Nonprofit and Voluntary Sector Quarterly is abstracted and indexed in Scopus and the Social Sciences Citation Index. According to the Journal Citation Reports, its 2021 impact factor is 3.348. References External links Association for Research on Nonprofit Organizations and Voluntary Action SAGE Publishing academic journals English-language journals Sociology journals Bimonthly journals Academic journals established in 1972"} {"instruction": "Construct a function in Python to calculate the area of a triangle with three sides", "input": "side1: 3\nside2: 4\nside3: 5", "output": "def triangleArea(side1, side2, side3):\n s = (side1 + side2 + side3) / 2\n area = (s * (s - side1) * (s - side2) * (s - side3)) ** 0.5\n return area"} {"instruction": "Create a function in Python that takes in a string and returns true if all characters in the string are unique and false if there is at least one repeated character.", "input": "", "output": "def check_unique(s):\n seen=set()\n for c in s:\n if c in seen:\n return False\n else:\n seen.add(c)\n return True"} {"text": "[HI Wikipedia] बलूचिस्तान (पाकिस्तान)\n\nबलूचिस्तान (उर्दू: بلوچستان , बलोची: بلۏچستان‎) पाकिस्तान का पश्चिमी प्रान्त है। बलूचिस्तान नाम का क्षेत्र बड़ा है और यह ईरान (सिस्तान व बलूचिस्तान प्रान्त) तथा अफ़गानिस्तान के सटे हुए क्षेत्रों में बँटा हुआ है। यहाँ की राजधानी क्वेटा है। यहाँ के लोगों की प्रमुख भाषा बलूच या बलूची के नाम से जानी जाती है। 1944 में बलूचिस्तान के स्वतन्त्रता का विचार जनरल मनी के विचार में आया था पर 1947 में ब्रिटिश इशारे पर इसे पाकिस्तान में शामिल कर लिया गया। 1970 के दशक में एक बलूच राष्ट्रवाद का उदय हुआ जिसमें बलूचिस्तान को पाकिस्तान से स्वतन्त्र करने की माँग उठी। यह प्रदेश पाकिस्तान के सबसे कम जनसंख्या वाले इलाकों में से एक है। इतिहास इसके पूर्वी किनारे पर सिन्धु घाटी सभ्यता का उद्भव हुआ। कुछ विद्वानों का मानना है कि सिन्धु घाटी सभ्यता के मूल लोग बलूच ही थे। पर इसके साक्ष्य नगण्य हैं। सिन्धु घाटी की लिपि को न पढ़े जाने के कारण संशय अब तक बना हुआ है। पर सिन्धु सभ्यता के अवशेष आज के बलूचिस्तान में कम ही पाये जाते हैं। बलूची लोगों का माना है कि उनका मूल निवास सीरिया के इलाके में थे और उनका मूल सेमेटिक (अफ़्रो-एशियाटिक) है। आज का दक्षिणी बलूचिस्तान ईरान के कामरान प्रांत का हिस्सा था जबकि उत्तर पूर्वी भाग सिस्तान का अंग है। सन् 652 में मुस्लिम खलीफ़ा उमर ने कामरान पर आक्रमण के आदेश दिए और यह इस्लामी खिलाफ़त (ख़िलाफ़त) का अंग बन गया। पर उमर ने अपना साम्राज्य कामरान तक ही सीमित रखा। अली के खिलाफ़त में पूरा बलूचिस्तान, सिन्धु नदी के पश्चिमी छोर तक, खिलाफत के अन्तर्गत आ गया। इस समय एक और विद्रोह भी हुआ था। सन् 663 में हुए विद्रोह में कलात राशिदुन खिलाफ़त के हाथ से निकल गया। बाद में उम्मयदों ने इसपर कब्जा कर लिया। इसके बाद यह मुगल हस्तक्षेप का भी विषय रहा पर अन्त में ब्रिटिश शासन में शामिल हो गया। 1944 में इसे स्वतन्त्र करने का विचार भी अंग्रेजों के मन में आया था पर 1947 में यह स्वतन्त्र पाकिस्तान का अंग बन गया। सत्तर के दशक में यहाँ पाकिस्तानी शासन के विरुद्ध मुक्ति अभियान भी चला था। जिसे कुचल दिया गया। इस्लाम का आगमन 654 ईस्वी में, सिस्तान के राज्यपाल (गवर्नर) अब्दुलरहमान इब्न समराह और ससादीद फारस और बीजान्टिन साम्राज्य की कीमत पर नए उभरे रशीदुन खिलाफत ने ज़ारञ्ज में एक विद्रोह को कुचलने के लिये एक इस्लामी सेना भेजी, जो अब दक्षिणी अफगानिस्तान में है। जराञ्ज पर विजय प्राप्त करने के बाद, सेना के एक स्तम।भ ने हिन्दू कुश पर्वत शृङ्खला में काबुल और गजनी पर विजय प्राप्त करते हुए उत्तर की ओर धकेल दिया, जबकि एक अन्य स्तम्भ उत्तर-पश्चिमी बलूचिस्तान में क्वेटा जिले से होकर गया और डावर और कान्दबील (बोलन) के प्राचीन शहरों तक क्षेत्र पर विजय प्राप्त की। यह प्रलेखित है कि आज के प्रान्त के भीतर आने वाली प्रमुख बस्तियाँ, 654 में रशीदुन खिलाफत द्वारा नियन्त्रित हो गयीं, सिवाय अच्छी तरह से संरक्षित पर्वतीय शहर क़ाइक़ान को छोड़कर, जो अब कलात है। अली की खिलाफ़त के दौरान, दक्षिणी बलूचिस्तान के मकरान क्षेत्र में विद्रोह छिड़ गया। 663 में, उमय्यद खलीफा मुआविया प्रथम के शासनकाल के दौरान, उनके मुस्लिम शासन ने उत्तर-पूर्वी बलूचिस्तान और कलात पर नियंत्रण खो दिया, जब कलात में विद्रोह के खिलाफ लड़ाई…"} {"instruction": "Find a way to get the size of a linked list without traversing it.", "input": "head: 1 -> 2 -> 3 -> 4 -> 5 -> null", "output": "def get_list_size(head): count = 0 temp = head while(temp): count += 1 temp = temp.next return count"} {"instruction": "Create a dictionary and assign four key-value pairs.", "input": "", "output": "my_dict = {'apple': 'fruit', 'carrot': 'vegetable', 'house': 'structure', 'dog': 'animal'}"} {"instruction": "Generate\na python program that calculates the total cost of all items in a given list", "input": "[(\"apple\", 5, 50),(\"mango\",6,70)]", "output": "def total_cost(items):\n total_cost = 0\n for item in items:\n quantity = item[1]\n unit_price = item[2]\n total_cost += quantity * unit_price\n return total_cost"} {"instruction": "Write an Objective-C statement to create an empty array to hold names.", "input": "", "output": "NSMutableArray *names = [NSMutableArray array];"} {"text": "[HI Wikipedia] सिन्धु नदी\n\nसिन्धु नदी एशिया की सबसे लंबी नदियों में से एक है। यह पाकिस्तान, भारत (जम्मू और कश्मीर) और चीन (पश्चिमी तिब्बत) के माध्यम से बहती है। सिन्धु नदी का उद्गम स्थल, तिब्बत के मानसरोवर के निकट सिन-का-बाब नामक जलधारा माना जाता है। इस नदी की लंबाई प्रायः ३६१० किलोमीटर है। यहां से यह नदी तिब्बत और कश्मीर के बीच बहती है। नंगा पर्वत के उत्तरी भाग से घूम कर यह दक्षिण पश्चिम में पाकिस्तान के बीच से गुजरती है और फिर जाकर अरब सागर में मिलती है। इस नदी का ज्यादातर अंश पाकिस्तान में प्रवाहित होता है। यह पाकिस्तान की सबसे लंबी नदी और राष्ट्रीय नदी है। सिंधु की पांच उपनदियां हैं। इनके नाम हैं: वितस्ता, चन्द्रभागा, ईरावती, विपासा एंव शतद्रु. इनमें शतद्रु सबसे बड़ी उपनदी है। सतलुज/शतद्रु नदी पर बना भाखड़ा-नंगल बांध के द्वारा सिंचाई एंव विद्दुत परियोजना को बहुत सहायता मिली है। इसकी वजह से पंजाब (भारत) एंव हिमाचल प्रदेश में खेती ने वहां का चेहरा ही बदल दिया है। वितस्ता (झेलम) नदी के किनारे जम्मू व कश्मीर की राजधानी श्रीनगर स्थित है। परिचय सिंध नदी उत्तरी भारत की तीन बड़ी नदियों में से एक हैं। इसका उद्गम बृहद् हिमालय में कैलाश से ६२.५ मील उत्तर में सेंगेखबब के स्रोतों में है। अपने उद्गम से निकलकर तिब्बती पठार की चौड़ी घाटी में से होकर, कश्मीर की सीमा को पार कर, दक्षिण पश्चिम में पाकिस्तान के रेगिस्तान और सिंचित भूभाग में बहती हुई, कराँची के दक्षिण में अरब सागर में गिरती है। इसकी लंबाई लगभग २,००० मील है। बल्तिस्तान में खाइताशो ग्राम के समीप यह जास्कार श्रेणी को पार करती हुई १०,००० फुट से अधिक गहरे महाखड्ड में, जो संसार के बड़े खड्डों में से एक हैं, बहती है। जहाँ यह गिलगित नदी से मिलती है, वहाँ पर यह वक्र बनाती हुई दक्षिण पश्चिम की ओर झुक जाती है। अटक में यह मैदान में पहुँचकर काबुल नदी से मिलती है। सिंध नदी पहले अपने वर्तमान मुहाने से ७० मील पूर्व में स्थित कच्छ के रन में विलीन हो जाती थी, पर रन के भर जाने से नदी का मुहाना अब पश्चिम की ओर खिसक गया है। झेलम, चिनाव, रावी, व्यास एवं सतलुज सिंध नदी की प्रमुख सहायक नदियाँ हैं। इनके अतिरिक्त गिलगिट, काबुल, स्वात, कुर्रम, टोची, गोमल, संगर आदि अन्य सहायक नदियाँ हैं। मार्च में हिम के पिघलने के कारण इसमें अचानक भयंकर बाढ़ आ जाती है। बरसात में मानसून के कारण जल का स्तर ऊँचा रहता है। पर सितंबर में जल स्तर नीचा हो जाता है और जाड़े भर नीचा ही रहता है। सतलुज एवं सिंध के संगम के पास सिंध का जल बड़े पैमाने पर सिंचाई के लिए प्रयुक्त होता है। सन्‌ १९३२ में सक्खर में सिंध नदी पर लॉयड बाँध बना है जिसके द्वारा ५० लाख एकड़ भूमि की सिंचाई की जाती है। जहाँ भी सिंध नदी का जल सिंचाई के लिए उपलब्ध है, वहाँ गेहूँ की खेती का स्थान प्रमुख है और इसके अतिरिक्त कपास एवं अन्य अनाजों की भी खेती होती है तथा ढोरों के लिए चरागाह हैं। हैदराबाद (सिंध) के आगे नदी ३,०० वर्ग मील का डेल्टा बनाती है। गाद और नदी के मार्ग परिवर्तन करने के कारण नदी में नौसंचालन खतरनाक है। सिन्धु घाटी सभ्यता (३३००-१७०० ई.पू.) विश्व की प्राचीन नदी घाटी सभ्यताओं में से एक प्रमुख सभ्यता थी। इतिहास ऋग्वेद में कई नदियों का वर्णन किया गया है, जिनमें से एक का नाम \"सिंधु\" है। ऋग्वैदिक \"सिंधु\" को…"} {"instruction": "Compute the sum of list integers using Python.", "input": "Target list: [3, 5, 7, 9]", "output": "mylist = [3, 5, 7, 9]\ntotal = 0\n\nfor item in mylist:\n total = total + item\n\nprint(\"The sum of list items is:\", total)"} {"instruction": "Modify the following code to print out all even numbers in the list.", "input": "lst = [1, 2, 3, 4, 5]", "output": "for i in lst: if i % 2 == 0: print(i)"} {"instruction": "Create a SQL query to retrieve the names and birthdates of all employees in a table called \"employees\".", "input": "", "output": "SELECT name, birthdate FROM employees;"} {"instruction": "What is the proper way to check if a variable of type String is empty in Bash?", "input": "", "output": "if [ -z \"$var\" ]; then echo \"The variable is empty.\" fi"} {"instruction": "Generate code to optimize a matrix multiplication in Python.", "input": "A 3x3 matrix", "output": "# import numpy\nimport numpy as np\n\n# Declare matrix A and B\nA = np. array([[2, 3, 5], [5, 7, 2], [4, 2, 6]])\nB = np.array([[6, 2, 1], [3, 4, 5], [5, 3, 7]])\n\n# use numpy for matrix multiplication\nC = np.dot(A, B)\n\n# Vectorization \nD = np.zeros((3,3))\n\nfor i in range(3):\n for j in range(3):\n for k in range(3):\n D[i,j] += A[i,k] * B[k,j]\n\n# Compare matrix multiplication results\nif np.array_equal(C, D):\n print(\"Matrix optimzation is successful\")\nelse:\n print(\"Matrix optimization failed\")"} {"instruction": "Design a program in Python to find the greatest of three numbers.", "input": "25, 39, 12", "output": "def greatest_num(num1, num2, num3):\n greatest = 0\n if num1 > num2 and num1 > num3:\n greatest = num1\n elif num2 > num1 and num2 > num3:\n greatest = num2\n else:\n greatest = num3\n print(\"The greatest of the three numbers is:\", greatest)\n \n# Here we call the function with the three numbers \ngreatest_num(25, 39, 12)"} {"instruction": "Display the results from a MySQL query in HTML table format.", "input": "MySQL query: SELECT * FROM employees WHERE name LIKE '%john%'", "output": "\"; echo \"IDNameAge\"; while ($row = mysqli_fetch_assoc($result)) { echo \"\".$row['id'].\"\".$row['name'].\"\".$row['age'].\"\"; } echo \"\"; ?>"} {"text": "[DE Wikipedia] Bahnstrecke Skalsko–Stará Paka\n\n|} Die Bahnstrecke Skalsko–Stará Paka ist eine regionale Eisenbahnverbindung in Tschechien, die ursprünglich von der Lokalbahn Sudoměř-Skalsko–Alt Paka (tschech.: Místní dráha Sudoměř-Skalsko–Stará Paka) als landesgarantierte Lokalbahn erbaut wurde. Sie zweigt in Skalsko von der Bahnstrecke Mšeno–Dolní Cetno ab und führt über Mladá Boleslav (Jungbunzlau), Sobotka und Lomnice nad Popelkou (Lomnitz an der Popelka) nach Stará Paka (Altpaka). Nach einem Erlass der tschechischen Regierung ist die Strecke seit dem 20. Dezember 1995 als regionale Bahn („regionální dráha“) klassifiziert. Geschichte Am 19. Januar 1904 wurde den Herren Heinrich G. Maštálka aus Sobotka, Wenzel Hanoušek aus Jungbunzlau, Theodor Mastný aus Lomnitz, Wenzel Michal aus Jungbunzlau und Cyrill Papoušek aus Groß Wschelis die Konzession erteilt, eine als normalspurige Lokalbahn auszuführende Locomotiveisenbahn von der zwischen den Stationen Sudoměř und Skalsko der Lokalbahn Mscheno–Unter Cetno neu zu errichtenden Station Sudoměř-Skalsko über Jungbunzlau und Unter-Bautzen nach Altpaka zu errichten. Am 26. November 1905 wurde der erste Abschnitt von Sudoměř-Skalsko über Mladá Boleslav (Jungbunzlau) bis Sobotka eröffnet. Die restlichen Streckenabschnitte wurden am 1. Juni 1906 (Lomnice nad Popelkou–Stará Paka) und 24. September 1906 (Sobotka–Lomnice nad Popelkou) in Betrieb genommen. Den Betrieb führte die k.k. Staatsbahnen (kkStB) für Rechnung der Eigentümer aus. Nach dem Zerfall Österreich-Ungarns im Oktober 1918 ging die Betriebsführung an die neu gegründeten Tschechoslowakischen Staatsbahnen (ČSD) über. Am 1. Januar 1925 wurde die Lokalbahn Sudoměř-Skalsko–Alt Paka verstaatlicht und die Strecke wurde ins Netz der ČSD integriert. Sie wurde fortan von der Staatsbahndirektion (Ředitelství státních drah) Hradec Králové verwaltet. Im Zweiten Weltkrieg lag die Strecke zur Gänze im Protektorat Böhmen und Mähren. Betreiber waren jetzt die Protektoratsbahnen Böhmen und Mähren (ČMD-BMB). Am 9. Mai 1945 kam die Strecke wieder vollständig zu den ČSD. Am 1. Januar 1993 ging die Strecke im Zuge der Auflösung der Tschechoslowakei an die neu gegründeten České dráhy (ČD) über. Seit 2003 gehört sie zum Netz des staatlichen Infrastrukturbetreibers Správa železniční dopravní cesty (SŽDC). Im Jahresfahrplan 2013 wird die Strecke in einem angenäherten Zweistundentakt in den Relationen Mělník–Lomnice nad Popelkou und Lomnice nach Popelkou–Stará Paka von Personenzügen bedient. Seit Oktober 2018 wird der Streckenabschnitt zwischen Katusice und Bukovno umfassend instand gesetzt. Nach Abschluss der Bauarbeiten ist ein regelmäßiger Zweistundentakt im Reiseverkehr zwischen Mlada Boleslav und Mělník vorgesehen. Im Bahnhof Katusice kreuzen die Züge dann jeweils zur üblichen Symmetrieminute. Sowohl in Mlada Boleslav…"} {"instruction": "Write a Python program to predict the future stock price of a company.", "input": "Predict the stock price of Apple in 2021.", "output": "import pandas as pd\n\n# Read the data\ndata = pd.read_csv(\"apple stock data.csv\")\n\n# Extract the data points\nX = data[['open', 'high', 'low', 'volume']]\ny = data['close']\n\n# Fit the model\nmodel.fit(X, y)\n\n# Predict the stock price of Apple in 2021 \npredict = model.predict([[Apple_open, Apple_high, Apple_low, Apple_volume]])\nprint(predict)"} {"instruction": "Write a JavaScript function that swaps the values of two variables.", "input": "", "output": "function swap(a, b) { let temp = a; a = b; b = temp; }"} {"instruction": "Write an HTML link tag to open a link in a new tab.", "input": "", "output": "Link"} {"instruction": "Output the following array in a column", "input": "[1, 2, 3, 4]", "output": "for x in [1,2,3,4]: print(x) # Output: 1 2 3 4"} {"instruction": "Write a Perl script to output the 8th character in a given string.", "input": "String = \"SoftwareTestingHelp\"", "output": "$str = \"SoftwareTestingHelp\"; print substr($str, 8, 1);"} {"instruction": "Write a sql query to fetch records from a table with a condition that must provide results with an id greater than 10.", "input": "", "output": "SELECT * FROM table WHERE id > 10;"} {"instruction": "Write a prompt message that asks the user to enter their name.", "input": "", "output": "Please enter your name:"} {"instruction": "Create a cryptography program that computes the factorial of a given number.", "input": "num = 5", "output": "def factorial(n): if n == 0: return 1 return n * factorial(n-1) if __name__ == '__main__': num = 5 result = factorial(num) print(result)"} {"text": "[CS Wikipedia] Marek Brodský\n\nMarek Brodský (* 19. května 1959 Praha) je český hudebník, textař, výtvarník, publicista a herec, syn herce Vlastimila Brodského, též poloviční bratr herečky Terezy Brodské. V roce 1983 spoluzaložil hudební skupinu Nahoru po schodišti dolů band, jejímž vedoucím, bubeníkem a hlavním textařem byl až do svého odchodu v roce 2005. S opuštěním skupiny si po vzájemné dohodě s ostatními členy odnesl i název Nahoru po schodišti dolů band a skupina nadále vystupovala v mírně změněné sestavě pod názvem Schodiště. K herectví se dostal víceméně náhodně. Debutoval ve filmu Dneska přišel nový kluk, společně s otcem si pak zahrál v cimrmanovské komedii Rozpuštěný a vypuštěný. Mezi další významné snímky patřil válečný film Mladí muži poznávají svět nebo televizní seriál Křeček v noční košili. Filmografie 2019 Svět pod hlavou (TV seriál 2.díl) 2012 Bastardi 3 2006 Letiště 1998 Kázání rybám (TV film) 1996 Mňága – Happy end 1995 Mladí muži poznávají svět 1987 Křeček v noční košili (TV seriál) 1987 Přátelé bermudského trojúhelníku, Díl 3. Linka do Prahy 1986 Galoše šťastia 1986 Zlá krev (TV seriál) 1985 Mravenci nesou smrt 1984 Rozpuštěný a vypuštěný 1983 Radostné události (TV inscenace) 1982 Chladna zrána (TV inscenace) 1982 Malinový koktejl 1982 Pavilón šeliem 1981 Dneska přišel nový kluk Diskografie Nahoru po schodišti dolů Band 2005 Mokrý prádlo (Indies Records, MAM262-2) 2003 Live Palác Akropolis 19. 2. 2003 (vydáno vlastním nákladem) 2002 Album první... a něco navíc (Black Point music, BP 0139-2) (znovu natočené první album + bonus v podobě rarit z let 1985-1987) 2001 Svinska pržola (Black Point music, BP 0122-2) 1997 Ukazovák nasliněnej (Indies Records, MAM071-2) 1993 Nahoru po schodišti dolů Band 83-93 (Mirdovo hudební studio, MS 10 2 311) Knihy Marek Brodský, Ondřej Bezr: Celý to mám v mlze, vydalo nakladatelství Maťa v roce 2003, (rozhovor Ondřeje Bezra s Markem Brodským, výpis diskografie Nahoru po schodišti dolů Bandu, výběr písňových textů) Marek Brodský: Zdrhám, zdrhám, vydalo nakladatelství Galén v roce 2009, , (písňové texty) Rodinný život Marek Brodský pochází z umělecké rodiny. Jeho matkou byla česká tanečnice Bíba Křepelková a otcem herec Vlastimil Brodský, který se po rozvodu s jeho matkou znovu oženil s herečkou Janou Brejchovou a z tohoto druhého manželství vzešla Markova sestra Tereza Brodská. Marek Brodský byl třikrát ženatý. Má jednu dceru Barboru Brodskou, která má už syna Alberta (* 2012). Podobně jako jeho otec se po celý život potýká s plachostí a depresemi. Odkazy Reference Literatura Externí odkazy Čeští herci Čeští bubeníci Čeští textaři Žijící lidé Čeští výtvarníci Narození v roce 1959 Narození 19. května Narození v Praze Muži"} {"text": "[EN Wikipedia] IRobot R-Gator\n\nThe iRobot R-Gator is an unmanned robotic platform from iRobot Corporation and John Deere. The robot is built upon Deere's M-Gator currently in use by the US Military. The R-Gator can operate autonomously, performing perimeter patrol and other missions while keeping personnel out of harm's way. It can operate autonomously by following a map or choosing its own waypoints to reach a pre-determined destination. It can also do \"follow the leader\" operations to keep up with troops, be tele-operated, or driven manually if needed. In military exercises, the R-Gator has shown an ability to carry gear for soldiers to lighten their loads. It also demonstrated its capacity to carry and drop off explosive ordnance disposal robots weighing more than . An R-Gator could deploy the smaller machine and provide unmanned perimeter security while the EOD robot dismantles the bomb. The first R-Gator sale to the military was to the U.S. Navy Space and Naval Warfare Systems Command for autonomous perimeter security. References External links John Deere: R-Gator Gizmag article Defense Update article Unmanned ground vehicles IRobot John Deere vehicles"} {"text": "[HI Wikipedia] तंज़ानिया\n\nतंजानिया का संयुक्त गणराज्य (स्वाहिली: Jamhuri ya Muungano wa Tanzania), अफ्रीका महाद्वीप के पूर्वी भाग में स्थित एक देश है, जिसकी सीमायें, उत्तर में कीनिया और युगांडा, पश्चिम में रवांडा, बुरुंडी और कांगो, दक्षिण में ज़ाम्बिया, मलावी और मोजाम्बिक से मिलती हैं, तथा देश की पूर्वी सीमा हिंद महासागर द्वारा निर्धारित होती है। तंजानिया का संयुक्त गणराज्य, 26 प्रदेशों जिन्हें मिकाओ कहते हैं से मिलकर बना है, जिनमें ज़ांज़ीबार का स्वायत्त क्षेत्र भी शामिल है। 2005 में निर्वाचित राष्ट्रपति जकाया किकवेते म्रिशो देश के वर्तमान राष्ट्रप्रमुख हैं। 1996 से, तंजानिया की सरकारी राजधानी दोदोमा है, जहां संसद और कुछ सरकारी कार्यालय स्थित हैं। स्वतंत्रता प्राप्ति से लेकर 1996 के बीच, तटीय शहर दार अस सलाम ने देश की राजनीतिक राजधानी बना रहा। आज, दार-एस-सलाम तंजानिया का सबसे प्रमुख वाणिज्यिक शहर है और ज्यादातर सरकारी कार्यालय यहीं पर स्थित हैं। यह देश का और उसके स्थलरुद्ध पड़ोसी देशों के लिए सबसे प्रमुख बंदरगाह है। तंजानिया नाम दो राष्ट्रों तंगानयिका और ज़ांज़ीबार से मिलकर से मिलकर बना है, जिनके विलय स्वरूप 1964 में तंगानयिका और ज़ांज़ीबार का संयुक्त गणराज्य अस्तित्व में आया था जिसका नाम उसी वर्ष बाद में बदल कर तंजानिया का संयुक्त गणराज्य कर दिया गया। इतिहास 2 3 सन्दर्भ इन्हें भी देखें तंज़ानिया हिन्दी विकि डीवीडी परियोजना देश अफ़्रीका"} {"instruction": "Write a Java code to generate a Fibonacci number at a given index.", "input": "", "output": "public class Fibonacci { public static int getFibonacciNumber(int index) { // base cases if (index == 0) { return 0; } if (index == 1 || index == 2) { return 1; } // recursive case return getFibonacciNumber(index - 1) + getFibonacciNumber(index - 2); } }"} {"instruction": "Sort a given list using bubble sort in Python.", "input": "list = [3,5,2,4,7,5]", "output": "def bubble_sort(list):\n for i in range(len(list)):\n for j in range(len(list)-1):\n if list[j]>list[j+1]:\n list[j],list[j+1] = list[j+1],list[j]\n return list\n\nif __name__ == '__main__':\n list = [3,5,2,4,7,5]\n print(bubble_sort(list))"} {"instruction": "Describe the difference between a loop and a conditional statement.", "input": "", "output": "A loop is a set of instructions that is execute repeatedly until a certain condition is met. A conditional statement is an instruction that is used to check a condition, and if the condition is true, it will execute certain code. Loops can be used to execute a block of code multiple times, while a conditional statement can be used to choose between different blocks of code."} {"text": "[EN Wikipedia] Punakitere River\n\nThe Punakitere River is a river of the Northland Region of New Zealand's North Island. It is a tributary of the Waima River, though it is longer than the Waima itself. The Punakitere has its origins in several streams which flowe through and to the south of Kaikohe, and flows predominantly westward to reach the Waima close to the small settlement of Moehau. See also List of rivers of New Zealand References Far North District Rivers of the Northland Region Rivers of New Zealand"} {"instruction": "Write a code in Python to parse a JSON string.", "input": "{\n \"name\": \"James\",\n \"age\": 27\n}", "output": "import json\n\njson_string = '{\"name\": \"James\",\"age\": 27}'\ndata = json.loads(json_string)\nprint(data[\"name\"], data[\"age\"])"} {"instruction": "Write a python program that implements the following function:", "input": "Given two sorted lists, return a merged sorted list.", "output": "def merge_sorted_lists(list1, list2):\n merged_list = []\n\n while list1 and list2:\n if list1[0] < list2[0]:\n merged_list.append(list1.pop(0))\n else:\n merged_list.append(list2.pop(0))\n\n merged_list += list1 + list2\n\n return merged_list"} {"text": "[CS Wikipedia] Harmonia confessionum fidei\n\nHarmonia confessionum fidei (Souzvuk vyznání víry) je teologický spis z roku 1581, který vznikl v reformovaném prostředí a byl vydán tiskem v Ženevě. Představuje jeden z prvních pokusů o komparativní symboliku. Kniha formuluje deset základních věroučných otázek, k nimž přináší výňatky z různých protestantských věrovyznání, a to helvétských vyznání, Augsburského vyznání, 39 článků anglikánské církve, Bratrského vyznání aj. Harmonia byla dílem autorského kolektivu kalvinistických teologů pod vedením Jeana-Françoise Salvarda (†1585). Roku 1586 byla Harmonia přeložena do angličtiny. Externí odkazy Harmonia on-line Křesťanská kréda Reformace Knihy z roku 1581"} {"text": "[DE Wikipedia] Pierre d’Estaing\n\nPierre d’Estaing, auch d’Estaing OSB (* 1320 in Estaing; † 18. oder 25. November 1377 in Rom) war ein französischer Benediktiner, Bischof und Kardinal. Leben D’Estaing wurde 1320 auf dem Familienschloss als viertes der neun Kinder von Guillaume III. d’Estaing und dessen Ehefrau Esmengarde de Peyre geboren. Er trat in das Benediktinerkloster Ste-Foy in Conques ein und wurde dann Mönch der Abtei Saint-Victor in Marseille. Er erwarb seinen Doktor in Jura. Er war Prior des Klosters Saint-Genies-d’Olt (Rouergue), des Klosters Sainte-Foy de Colombiers im Bistum Meaux und des Klosters La Canourgue (Gévaudan), welches unweit seiner Heimat lag. Am 19. November 1361 wurde er zum Bischof von Saint-Flour gewählt. Er baute die Kirche Prior in Villedieu und gründete ein Kapitel mit sechs Chorherren. Am 13. April 1368 wurde er zum Erzbischof von Bourges ernannt. Am 7. Juni 1370 kreierte Papst Urban V. Pietro Corsini, den Bischof von Volterra und Florenz, zum Kardinalpriester von San Lorenzo in Damaso und d’Estaing zum Kardinalpriester von Santa Maria in Trastevere. 1370 war er mit Anglic Grimoard auf einer Mission in Italien. Daher war er nicht beim Konklave 1370 anwesend. Der neugewählte Papst Gregor XI. ernannte ihn zum Legaten in Italien. Von Juli 1371 bis März 1374 war er in Bologna. 1373 wurde er zum Kardinalbischof von Ostia e Velletri und zum Camerlengo ernannt. Er starb am 18. oder 25. November 1377 in Rom und wurde in Santa Maria in Trastevere beigesetzt. Literatur Einzelnachweise Bischof von Saint-Flour Kardinal (14. Jahrhundert) Römisch-katholischer Bischof (14. Jahrhundert) Prior Benediktiner Franzose Geboren 1320 Gestorben 1377 Mann"} {"instruction": "Generate an optimized python program to calculate the sum of all digits in a given positive integer number.", "input": "123456", "output": "input_number = 123456 \n\ndef find_sum_of_digits(number): \n n = number \n sum = 0\n while n > 0:\n sum += n % 10\n n //= 10\n return sum \n\nsum_of_digits = find_sum_of_digits(input_number) \nprint(\"Sum of all digits in {} is {}.\" .format(input_number,sum_of_digits))"} {"instruction": "Create an algorithm in Python that finds the longest consecutive subarray within a given array.", "input": "array = [1, 2, 3, 4, 5, 6, 7]", "output": "def longest_consecutive_subarray(array): \n longest_length = 0\n current_length = 0\n Hash = {} \n \n for val in array: \n if val not in Hash: \n Hash[val] = 1\n current_length += 1\n \n if current_length > longest_length: \n longest_length = current_length \n \n else: \n current_length = 0\n \n return longest_length"} {"instruction": "Compare and contrast Java and Python for developing applications.", "input": "", "output": "Java and Python are both popular programming languages used for developing applications. Java is a statically typed language and requires extra effort in the form of type checking during compilation, while Python is a dynamically typed language and no type checking is required. Java is more suitable for large-scale enterprise software development and is known for its performance and scalability, whereas Python is generally easier to work with and better suited for smaller projects and prototyping. Java is also more verbose than Python, requiring more lines of code to accomplish the same task. On the other hand, Python has a large library of additional modules and provides simpler syntax and more intuitive programming style."} {"instruction": "Design a function in Python to find the minimum of three numbers.", "input": "2, -6, 4", "output": "def find_min(a, b, c):\n if a 20;"} {"instruction": "Create a GUI application in C# that displays a welcome message when the program is launched.", "input": "", "output": "using System.Windows.Forms; public static class Program { static void Main() { Application.EnableVisualStyles(); Application.Run(new Form1()); } } public class Form1 : Form { public Form1() { MessageBox.Show(\"Welcome!\"); } }"} {"instruction": "Output an array of even numbers from 0 to 20 using a for loop in Python.", "input": "", "output": "even_nums = [] for num in range(0, 21): if num % 2 == 0: even_nums.append(num) print(even_nums)"} {"instruction": "Identify an ideal algorithm to find the longest palindrome in a given string.", "input": "", "output": "The Manacher’s Algorithm is an ideal algorithm to find the longest palindrome in a given string. This algorithm utilizes dynamic programming to find the longest palindrome in linear time complexity by iterating through the string and checking whether a substring is a palindrome or not."} {"instruction": "Create a Javascript function that will loop through an array and push each item into a new array.", "input": "", "output": "function loopThroughArray(arr) { let newArr = []; for(let i = 0; i < arr.length; i++) { newArr.push(arr[i]); } return newArr; }"} {"text": "[DE Wikipedia] Reichenbach\n\nReichenbach steht für: Reichenbach (Familienname) – zu Namensträgern siehe dort Reichenbach (Mondkrater) Reichenbach-Werkstätte in München, siehe Mathematisch-Feinmechanisches Institut Porzellanmanufaktur Reichenbach in Reichenbach (Thüringen) Reichenbach ist der Name folgender geographischer Objekte: Städte und Gemeinden in Deutschland: Reichenbach am Heuberg, Gemeinde im Landkreis Tuttlingen, Baden-Württemberg Reichenbach an der Fils, Gemeinde im Landkreis Esslingen, Baden-Württemberg Reichenbach (Landkreis Kronach), Gemeinde im Landkreis Kronach, Bayern Reichenbach (Landkreis Cham), Gemeinde im Landkreis Cham, Bayern Reichenbach-Steegen, Gemeinde im Landkreis Kaiserslautern, Rheinland-Pfalz Reichenbach (bei Baumholder), Gemeinde im Landkreis Birkenfeld, Rheinland-Pfalz Reichenbach/O.L., Stadt im Landkreis Görlitz, Sachsen Reichenbach im Vogtland, Stadt im Vogtlandkreis, Sachsen Reichenbach (Thüringen), Gemeinde im Saale-Holzland-Kreis, Thüringen Gemeinde in der Schweiz: Reichenbach im Kandertal, Gemeinde im Kanton Bern Ortsteile in Deutschland: in Baden-Württemberg: Reichenbach (Aalen), Ortsteil der Stadt Aalen, Ostalbkreis Reichenbach (Bad Rippoldsau-Schapbach), Ortsteil der Gemeinde Bad Rippoldsau-Schapbach, Landkreis Freudenstadt Reichenbach (Bad Schussenried), Stadtteil von Bad Schussenried, Landkreis Biberach Reichenbach (Berglen), Ortsteil der Gemeinde Berglen, Rems-Murr-Kreis Reichenbach (Elzach), Stadtteil der Stadt Elzach, Landkreis Emmendingen Reichenbach (Freiamt), Ortsteil der Gemeinde Freiamt (Schwarzwald), Landkreis Emmendingen Reichenbach (Gengenbach), Stadtteil der Stadt Gengenbach, Ortenaukreis Reichenbach (Hornberg), Stadtteil der Stadt Hornberg, Ortenaukreis Reichenbach, Stadtteil der Stadt Lahr/Schwarzwald, Ortenaukreis Reichenbach (Oppenweiler), auch Reichenbach an der Murr, Weiler der Gemeinde Oppenweiler, Rems-Murr-Kreis Reichenbach (Waldbronn), Ortsteil der Gemeinde Waldbronn, Landkreis Karlsruhe Reichenbach (Westhausen), Ortsteil der Gemeinde Westhausen, Ostalbkreis Reichenbach an der Murr, Ortsteil der Gemeinde Oppenweiler, Rems-Murr-Kreis Reichenbach im Täle, Ortsteil der Gemeinde Deggingen, Landkreis Göppingen Reichenbach unter Rechberg, Stadtteil der Stadt Donzdorf, Landkreis Göppingen in Bayern: Reichenbach (Auerbach), Ortsteil der Stadt Auerbach in der Oberpfalz, Landkreis Amberg-Sulzbach Reichenbach (Feuchtwangen), Ortsteil der Stadt Feuchtwangen, Landkreis Ansbach Reichenbach (Iggensbach), Ortsteil der Gemeinde Iggensbach, Landkreis Deggendorf Reichenbach (Mömbris), Ortsteil des Marktes Mömbris, Landkreis Aschaffenburg Reichenbach (Münnerstadt), Ortsteil der Stadt Münnerstadt, Landkreis Bad Kissingen Reichenbach (Nagel), Ortsteil der Gemeinde Nagel, Landkreis Wunsiedel im Fichtelgebirge Reichenbach (Nesselwang),…"} {"instruction": "Write a SQL query to list the names and salaries of the employees who work in the finance department", "input": "", "output": "SELECT name, salary FROM employee WHERE department = 'finance';"} {"instruction": "Create a SQL query to find the first name, last name, and the total number of orders placed for all customers, sorted by Number of orders in descending order.", "input": "", "output": "SELECT c.first_name, c.last_name, COUNT(o.customer_id) as num_orders FROM customers c JOIN orders o WHERE c.id = o.customer_id GROUP BY c.id ORDER BY num_orders DESC;"} {"instruction": "Create a basic UI in HTML/CSS for a shopping cart website.", "input": "", "output": " Shopping Cart

      Shopping Cart

      © All rights reserved
      "} {"instruction": "Create an array of the numbers from 1 to 10.", "input": "", "output": "let numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];"} {"text": "[EN Wikipedia] NCIS (soundtrack)\n\nNCIS: The Official TV Soundtrack is a series of soundtrack albums featuring music used in the CBS television series NCIS. The first volume in the series, released on February 10, 2009, received attention for its method of compiling music for the album; show producers and writers were presented previously unreleased tracks from popular artists \"ranging from Perry Farrell to Jakob Dylan as the shows were being crafted, and then taking inspiration from those tunes to help craft the show.\" This method contrasted with the norm for TV soundtracks, which tend to be compilations of previously released music that is already available individually or on other albums. NCIS: The Official TV Soundtrack – Vol. 2 was released on November 3, 2009, according to Amazon.com. Volume 1 Overview NCIS: The Official TV Soundtrack is the first soundtrack album from the television series NCIS. The album is a two-disc, 22-track set that includes brand new songs from artists featured prominently in episodes of the series. According to the soundtrack website, NCIS show producers listened to literally dozens of submitted tracks before choosing the ones best suited for upcoming storylines, and from which the show's writers could draw upon for inspiration. The soundtrack also features NCIS stars Pauley Perrette (\"Abby Sciuto\"), who performs the self-composed \"Fear\" under the moniker Stop Making Friends, and Cote de Pablo (\"Ziva David\"), whose memorable performance of Tom Waits' \"Temptation\" from the Season 6 premiere episode, \"Last Man Standing,\" is included. It is Perrette’s character, Abby, whose music sensibilities in the show serve as the basis for the soundtrack’s \"Abby’s Lab\" disk 2. Track listing Songs used in NCIS episodes Volume 2 Overview NCIS: The Official TV Soundtrack – Vol. 2 is the second soundtrack album from the television series NCIS. The album is a 12-track set that includes brand new and exclusive songs from artists featured prominently in 2009-2010 episodes of the series, including Bob Dylan whose newly remixed and mastered \"California\" from the artist's Bringing It All Back Home sessions marks the first commercial release of this track. John Mellencamp's \"Someday The Rains Will Fall\" was recorded during the summer of 2009 in room 636 of the Gunter Hotel in San Antonio, Texas – the same room blues legend Robert Johnson recorded many of his classic songs in 1936. NCIS star Michael Weatherly (Special Agent Anthony DiNozzo) contributes his own \"Bitter And Blue\", specifically recorded for the soundtrack album. Norah Jones, Joss Stone, Sick Puppies, Sharon Little, Sheryl Crow, Keaton Simons, and Saosin all contribute new and exclusive tracks. Otis Redding's \"I've Got Dreams To Remember\" and Tom Lehrer's \"The Elements,\" both utilized in previous season's episodes,…"} {"text": "[CS Wikipedia] Shazad Latif\n\nShazad Latif (* 3. července 1988 Londýn) je britský herec. Je pákistánsko-anglicko-skotského původu. V letech 2009–2011 hrál v televizním seriálu MI5, mezi lety 2013 a 2015 působil v seriálu Toast of London. Ve filmu debutoval v roce 2015 ve snímku Muž, který poznal nekonečno. Roku 2016 se představil v seriálu Penny Dreadful. Od roku 2017 hraje v seriálu Star Trek: Discovery postavu Voqa, resp. Ashe Tylera. V roce 2018 herecky ztvárnil náboráře Islámského státu ve filmu Profile. Externí odkazy Britští televizní herci Britští filmoví herci Narození 3. července Narození v roce 1988 Žijící lidé Muži"} {"instruction": "Create an array containing the alphabet in lowercase in Python.", "input": "", "output": "Using the string.ascii_lowercase constant, an array containing the alphabet in lowercase can be created. Example: import string alphabet_array = list(string.ascii_lowercase) print(\"Array containing the alphabet in lowercase:\", alphabet_array) # Output: Array containing the alphabet in lowercase: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']"} {"instruction": "Using a while loop, write a Python program to reverse a given sentence.", "input": "\"Hello there my friend\"", "output": "# Initialize an empty string \nrevString = \"\"\n\n# Set 'idx' to point to the end of the string \nidx = len(sent) - 1\n \n# Iterate in reverse through the string \nwhile idx >= 0:\n # Append each individual character to the result string\n revString += sent[idx]\n # Decrement the index\n idx -= 1\n\n# Output the reversed result\nprint(revString)"} {"text": "[HI Wikipedia] ब्रिटेन\n\nब्रिटेन शब्द का प्रयोग हालाँकि आम तौर पर हिंदी में यूनाइटेड किंगडम देश का बोध करने के लिए होता है, परंतु इसका उपयोग अन्य सन्दर्भों के लिए भी हो सकता है: ग्रेट ब्रिटेन और आयरलैंड का यूनाइटेड किंगडम, अथवा यूनाइटेड किंगडम: जोकि इंग्लैंड, स्कॉटलैंड, वेल्स और उत्तरी आयरलैंड जैसे देशों का एक बहुराष्ट्रीय राज्य है। ग्रेट ब्रिटेन: वह द्वीप जिसपर इंग्लैंड, स्कॉटलैंड और वेल्स जैसे देश स्थित हैं। ग्रेट ब्रिटेन राजशाही: इंग्लैंड और स्कॉटलैंड राजशाहियों के विलय से बना एक पूर्व राज्य। तथा इसका उपयोग यूनाइटेड किंगडम के सुरक्षा बलों या खेल टीमों के लिये भी हो सकता है।"} {"instruction": "Inside a Python program, how would you convert a float number to a string?", "input": "", "output": "str_number = str(float_number)"} {"instruction": "Write a Java code snippet for creating an array with 10 random numbers between 1 and 50.", "input": "", "output": "int[] randNums = new int[10]; Random rand = new Random(); for(int i = 0; i < randNums.length; i++) { randNums[i] = rand.nextInt(50) + 1; }"} {"instruction": "Modify the following HTML to create a link that opens in a new window.", "input": "Example Link", "output": "Example Link"} {"instruction": "Write a Python function that takes string input of two sentences and returns a boolean value if the sentences are anagrams or not.", "input": "sent1 = \"tabe\";\nsent2 = \"beat\"", "output": "def is_anagram(sent1, sent2):\n sent1 = sent1.replace(\" \", \"\").lower()\n sent2 = sent2.replace(\" \", \"\").lower()\n\n if len(sent1) != len(sent2):\n return False\n\n counter = {}\n\n for letter in sent1:\n if letter in counter:\n counter[letter] += 1\n else:\n counter[letter] = 1\n\n for letter in sent2:\n if letter in counter:\n counter[letter] -= 1\n else:\n counter[letter] = 1\n\n for k in counter:\n if counter[k] != 0:\n return False\n\n return True"} {"text": "[EN Wikipedia] 1959–60 Norwegian 1. Divisjon season\n\nThe 1959–60 Norwegian 1. Divisjon season was the 21st season of ice hockey in Norway. Eight teams participated in the league, and Valerenga Ishockey won the championship. First round Second round Final round Relegation round External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1959 in Norwegian sport 1960 in Norwegian sport"} {"text": "[CS Wikipedia] Henri Vallienne\n\nHenri Vallienne (19. listopadu 1854 – 1. prosince 1908) byl francouzský lékař, esperantista. Dílo Původní tvorba KASTELO DE PRELONGO - rozsáhlý původní román, plný dobrodružství, záhad, intrik a justičních omylů ĈU LI - román, stylově revidován K. Kalocsayem Překlady do esperanta Manon Lescaut od A. Prévosta, MARGOT od Musseta, ENEIDO od Vergilia, LA METAMORFOZOJ od Ovidia - zůstala v rukopise, LA AVENTUROJ DE TELEMAKO od Fénelona - zůstala v rukopise. Odkazy Externí odkazy Esperantská literatura Esperantská literatura Narození v roce 1854 Úmrtí v roce 1909 Muži"} {"instruction": "Compose a Python program for finding the median value of an unsorted array.", "input": "[4, 5, 6, 7, 8, 1, 2]", "output": "def median(arr):\n # Sort the array\n arr.sort()\n\n # Calculate length\n n = len(arr)\n\n # Check if n is even\n if n % 2 == 0:\n median1 = arr[n // 2]\n median2 = arr[n // 2 - 1]\n median = (median1 + median2) / 2\n else:\n median = arr[n // 2]\n\n return median\n\narr = [4, 5, 6, 7, 8, 1, 2]\nresult = median(arr)\nprint(result) # 4.5"} {"text": "[DE Wikipedia] Rotachtal Bodensee\n\nDas Gebiet Rotachtal Bodensee ist ein durch das Regierungspräsidium Tübingen nach der Richtlinie 92/43/EWG (Fauna-Flora-Habitat-Richtlinie) ausgewiesenes Schutzgebiet (SG-Nummer DE-8222342) im Südosten des deutschen Bundeslandes Baden-Württemberg. Lage Das rund 466 Hektar (ha) große Schutzgebiet Rotachtal Bodensee gehört naturräumlich zum Bodenseebecken und Oberschwäbischem Hügelland. Seine vier Teilflächen liegen auf einer Höhe von 398 bis und erstrecken sich zu 62 Prozent (= 289,0 ha) im Bodenseekreis (Deggenhausertal, Friedrichshafen, Oberteuringen) und zu 38 Prozent (= 177,2 ha) im Landkreis Ravensburg (Gemeinde Horgenzell). Die Teilflächen umfassen das Gebiet der Rotach zwischen Horgenzell im Norden und ihrer Mündung in den Bodensee zwischen Eriskirch und Langenargen im Süden. Schutzzweck Wesentlicher Schutzzweck ist die Erhaltung des Rotachtals bis zur Mündung in den Bodensee mit tief eingeschnittenen Tobeln im Oberlauf, sowie Niedermoorgebiet, Altweiherwiese und Tongrube. Lebensraumtypen Die Vielzahl von Lebensraumtypen mit naturnahen Tobelwäldern und Auwäldern, sowie Pfeifengraswiesen als Zeugnisse früherer Landnutzung zeichnet sich hauptsächlich durch folgende Lebensräume aus: Mischwald (31 %), feuchtes und mesophiles Grünland (26 %), Laub- (15 %) sowie Nadelwald (13 %). Folgende Lebensraumtypen nach Anhang I der FFH-Richtlinie kommen im Gebiet vor: Arteninventar Folgende Arten von gemeinschaftlichem Interesse kommen im Gebiet vor: Zusammenhängende Schutzgebiete Folgende Schutzgebiete sind Bestandteil des FFH-Gebiets: Siehe auch Liste der FFH-Gebiete in Baden-Württemberg Liste der Schutzgebiete im Bodenseekreis Weblinks Standarddatenbogen für das FFH-Gebiet „Rotachtal Bodensee“ Karte des Schutzgebiets im Daten- und Kartendienst der LUBW Klimadaten und Szenarien für das Schutzgebiet vom Potsdam-Institut für Klimafolgenforschung (PIK) Einzelnachweise FFH-Gebiet im Bodenseekreis FFH-Gebiet im Landkreis Ravensburg Schutzgebiet in Deggenhausertal Schutzgebiet in Friedrichshafen Schutzgebiet in Oberteuringen Schutzgebiet in Amtzell Schutzgebiet in Bodnegg Schutzgebiet (Umwelt- und Naturschutz) in Europa"} {"instruction": "Write a Ruby program to search for a specific item in an array of strings.", "input": "array = [\"Apple\",\"Banana\",\"Mango\",\"Orange\"]", "output": "def search_array(array, item) return array.include?(item) end puts search_array(array, \"Mango\") #true"} {"instruction": "Create a React component for a navigation bar with a logo and two menu items named \"Home\" and \"About\".", "input": "", "output": "import React from 'react'; const Navbar = () => { return ( ) } export default Navbar;"} {"instruction": "Generate a Python program to compare two strings and return the largest string.", "input": "", "output": "def largest_string(str1, str2): \n if len(str1) >= len(str2): \n return str1 \n else: \n return str2"} {"text": "[HI Wikipedia] कश्मीरी\n\nकश्मीरी का अर्थ हो सकता हैः कश्मीरी भाषा जो कि भारत और पाकिस्तान की एक प्रमुख भाषा है। कश्मीरी लोग यानि भारतीय उपमहाद्वीप के जम्मू कश्मीर राज्य के रहवासी"} {"instruction": "Design the code for a Python program that takes a sentence as input and returns the longest word from the sentence.", "input": "The quick brown fox jumps over the lazy dog.", "output": "def longest_word(sentence):\n words = sentence.split()\n max_len = len(words[0])\n longest_word = words[0]\n for word in words[1:]:\n if len(word) > max_len:\n max_len = len(word)\n longest_word = word\n return longest_word\n\nresult = longest_word(\"The quick brown fox jumps over the lazy dog.\")\nprint(result)"} {"instruction": "Edit the code to create a program to print all the leap years between 1900 and 2000.", "input": "for year in range(1900, 2001): # TODO", "output": "for year in range(1900, 2001): if year % 4 == 0 and year % 100 != 0 or year % 400 == 0: print(year)"} {"text": "[DE Wikipedia] Kurt Weidner (Schauspieler)\n\nKurt Weidner (* 21. Februar 1907 in Oberhof, Thüringen, Deutsches Reich; † nach 1978) war ein deutscher Tänzer und Schauspieler bei Bühne und Fernsehen. Leben Weidner erhielt eine Ausbildung zum Tänzer und Schauspieler und begann seine Laufbahn 1931 als Balletttänzer in Gotha. Anschließend ging er in die Provinz und nach Berlin, wo man ihn an mehreren hauptstädtischen Bühnen sehen konnte. Später war er ein freischaffender Künstler, der sich nicht mehr fest an eine Spielstätte band. Sein letztes Engagement im Dritten Reich brachte ihn während des Zweiten Weltkriegs nach Wesermünde, ehe er 1943 eingezogen wurde. Die frühe Nachkriegszeit führte Kurt Weidner bis 1954 ans Theater von Bremerhaven, danach war er mehrere Spielzeiten in Konstanz tätig, ehe er sich in den 1960er Jahren in Berlin einfand und wieder auf die Bühnenbretter (u. a. Berliner Theater) stieg. Weidner machte auch Hörfunk und übernahm Aufträge als Synchronsprecher. Vor die Kamera trat Kurt Weidner recht spät, erst mit über 60 Jahren wurde er regelmäßig mit kleineren Rollen in Fernsehspielen bedacht. Bereits 1975 verliert sich seine Spur wieder. Filmografie 1960: Das ehrbare Mädchen – die gute Gattin 1968, 1969: Die Unverbesserlichen (Fernsehserie, Folgen … und ihre Sorgen/… und ihre Menschenkenntnis) 1969: Nachrichten aus der Provinz 1971: Besuch der Tochter 1971: Geschäfte mit Plückhahn 1972: Hoopers letzte Jagd 1972: Mandala 1972: Hamburg Transit (Fernsehserie, Folge Endstation Fuhlsbüttel) 1972: Auf Befehl erschossen 1973: Eine geschiedene Frau 1974: Preußenkorso Nr. 17 1975: Berlin 0:00 – 24.00 Uhr (Fernsehserie, Folge Der Geburtstag) Literatur Who‘s Who in the Arts, zwei Bände. 2. überarbeitete Auflage, Wörthsee 1978. Zweiter Band S. 364. Weblinks Theaterschauspieler Filmschauspieler Tänzer (Deutschland) Deutscher Geboren 1907 Gestorben im 20. oder 21. Jahrhundert Mann"} {"instruction": "Create a Java program that print the Fibonacci sequence in the given range.", "input": "min = 0, max = 10", "output": "public class Fibonacci { public static void main(String[] args) { int min = 0, max = 10; int prev = 0, next = 1; System.out.print(\"Fibonacci Sequence in the given range:\"); for (int i = 0; i <= max; i++) { if (i >= min) { System.out.print(\" \" + prev); } int sum = prev + next; prev = next; next = sum; } } }"} {"instruction": "Create a function in JavaScript that removes all vowels from a string.", "input": "", "output": "function removeVowels(str) { let result = \"\"; for (let i = 0; i < str.length; i++) { if ((str[i] !== 'a') && (str[i] !== 'e') && (str[i] !== 'i') && (str[i] !== 'o') && (str[i] !== 'u')) { result += str[i]; } } return result; }"} {"instruction": "Create a coding program that sorts a given list of numbers into ascending order.", "input": "[4, 3, 2, 5, 9, 1, 8]", "output": "def ascending_order(arr): # Bubble sort algorithm. n = len(arr) # Traverse through all array elements for i in range(n): # Last i elements are already in place for j in range(0, n-i-1): # traverse the array from 0 to n-i-1 # Swap if the element found is greater # than the next element if arr[j] > arr[j+1] : arr[j], arr[j+1] = arr[j+1], arr[j] return arr # Test arr = [4, 3, 2, 5, 9, 1, 8] ascending_order(arr) print (\"Sorted array is:\") for i in range(len(arr)): print (\"%d\" %arr[i]),"} {"instruction": "Generate a Python script that will extract all URLs from the given text.", "input": "The websites I like to visit are https://www.google.com and https://www.facebook.com", "output": "import re\n\ntext = \"The websites I like to visit are https://www.google.com and https://www.facebook.com\"\n\nurl_list = re.findall(r'(https?://\\S+)', text)\n\nprint(url_list)"} {"instruction": "Write a method in Python to print each element in a given dictionary.", "input": "{\n \"Alice\": 23,\n \"Bob\": 30,\n \"John\": 27\n}", "output": "def printDict(dictionary): \n for key in dictionary: \n print(\"{}: {}\".format(key, dictionary[key])) \n\ndict = {\n \"Alice\": 23,\n \"Bob\": 30,\n \"John\": 27\n}\nprintDict(dict)"} {"instruction": "Write an algorithm that sorts the following list of integers in ascending order", "input": "[15, 5, 8, 0, 42]", "output": "def sort_list(lst): for i in range(len(lst)): for j in range(i+1, len(lst)): if lst[i] > lst[j]: lst[i], lst[j] = lst[j], lst[i] return lst"} {"text": "[CS Wikipedia] Nanuk (mytologie)\n\nNanuk, též Nanuq (grónsky též Nanoq) je postava z inuitské mytologie (Inuité). Výraz znamená v inuitštině medvěd. V mytologii představuje pána medvědů, který rozhoduje o tom, zda lovci činili dle všech aplikovatelných tabu, a zda si zaslouží úspěch při lovu medvědů. Odkazy Reference Související články Nanuk Nanuk"} {"instruction": "In Python, parse a JSON string and return the value associated with a particular key", "input": "JSON String: { \"key1\": \"value1\", \"key2\": \"value2\" }\nKey: \"key2\"", "output": "import json\n\n# Create a json object from the string\njson_obj = json.loads('{\"key1\": \"value1\", \"key2\": \"value2\"}')\n\n#get the value for a particular key\nvalue = json_obj[\"key2\"]"} {"text": "[CS Wikipedia] Áron Bulharský\n\nÁron Bulharský (, zemřel 14. června 976) byl bulharský šlechtic v desátém století našeho letopočtu, jeden z komitopulů, čtyř bratrů, kteří společně vládli Bulharské říši a bojovali s Byzantskou říší. Byl třetím synem Nikoly, významného šlechtice z dvora bulharského cara Petra I. a správce západní část země. Měl tři bratry Davida, Mojžíše a Samuela. Když v roce 969 car Petr I. zemřel a jeho synové Boris a Roman byli tou dobou v zajetí u byzantského císaře Jana Tzimiska v Cařihradě, rozdělili si tito čtyři bratři správu nad svobodným zbytkem Bulharska a jako společní vládci jsou známi pod jménem komitopulové. David a Mojžíš ovšem postupně v bojích zahynuli a Áron začal vyjednávat s byzantským císařem Basileem o oboustranně výhodném míru a spojenectví, díky kterému by se mohl zmocnit vlády nad celým Bulharskem. Samuel se o této zradě dozvěděl a nechal Árona i s jeho rodinou dne 14. června 976 zabít poblíž dnešní Dupnice. Přežil pouze jeho syn Ivan Vladislav, který se později stal bulharským carem. Reference Externí odkazy Bulharští panovníci Narození v 10. století Úmrtí v roce 976 Úmrtí 14. června Muži"} {"instruction": "Using the input string, create a new string that contains all the characters in even indices.", "input": "my_string = \"abcdefghi\"", "output": "# Create an empty string new_string = \"\" # Iterate over the even indices for i in range(0, len(my_string), 2): new_string += my_string[i] # Print the new string print(new_string) # prints 'acegi'"} {"instruction": "Write a C++ program to separate digits and characters from a string", "input": "Input string: ab123cde", "output": "#include using namespace std; int main() { string str = \"ab123cde\"; string digit; string alpha; for (int i = 0; i < str.length(); i++) { if (isdigit(str[i])) { digit.push_back(str[i]); } else { alpha.push_back(str[i]); } } cout << digit << endl; cout << alpha << endl; return 0; }"} {"instruction": "Create a Python script that parses a JSON string and complete the following tasks: (1) convert the string to an object, (2) sort the object by keys, and (3) print the object in a formatted way.", "input": "{\"a\": 3, \"b\": 1, \"c\": 2}", "output": "import json \n\n# Convert the string to an object \ndata = json.loads('{\"a\": 3, \"b\": 1, \"c\": 2}')\n\n# Sort the object by keys \nsorted_data = {k: data[k] for k in sorted(data.keys())}\n\n# Print the object in a formatted way \nprint(json.dumps(sorted_data, indent=4))"} {"instruction": "Write a Python program to create a dictionary containing the given list of numbers and their squares as values.", "input": "[1,2,3,4,5]", "output": "my_list = [1,2,3,4,5]\n\nsquares_dictionary = {}\n\nfor x in my_list:\n squares_dictionary[x] = x**2\n\nprint(squares_dictionary)"} {"instruction": "Create a sorting algorithm in Python to organize a given array of numbers.", "input": "Array of numbers: [3, 5, 4, 1, 6]", "output": "def bubbleSort(nums): \n for i in range(len(nums)-1): \n for j in range(0, len(nums)-i-1): \n if nums[j] > nums[j+1] : \n nums[j], nums[j+1] = nums[j+1], nums[j] \n return nums\n \narr = [3, 5, 4, 1, 6]\nprint (bubbleSort(arr))"} {"instruction": "Create a function in Python to delete an element from a linked list given its position.", "input": "", "output": "def deleteNode(head, position):\n # If linked list is empty \n if head == None: \n return\n\n # Store head node \n temp = head \n \n # If head needs to be removed \n if position == 0: \n head = temp.next\n temp = None\n return head \n\n # Find previous node of the node to be deleted \n for i in range(position-1): \n temp = temp.next\n if temp is None: \n break\n\n # if position is more than number of nodes \n if temp is None: \n return\n\n # Node temp.next is the node to be deleted \n # store pointer to the next of node to be deleted \n next = temp.next.next\n\n # Unlink the node from linked list \n temp.next = None\n\n temp.next = next\n\n return head"} {"instruction": "Write a SQL query to select the top 3 highest salaries in a employees table.", "input": "", "output": "SELECT TOP 3 salary FROM employees ORDER BY salary DESC;"} {"text": "[EN Wikipedia] Pararrhaptica subsenescens\n\nPararrhaptica subsenescens is a moth of the family Tortricidae. It was first described by Lord Walsingham in 1907. It is endemic to the Hawaiian islands of Molokai and Hawaii. External links Archipini Endemic moths of Hawaii Biota of Hawaii (island) Biota of Molokai"} {"instruction": "Create a function to parse the given HTML and return an array containing the text content of all the

      tags.", "input": "html: Parsing HTML

      Parsing HTML

      This is the first paragraph.

      This is the second paragraph.

      ", "output": "def get_p_tags(html): soup = BeautifulSoup(html,\"html.parser\") p_tags = soup.find_all('p') content = [] for tag in p_tags: content.append(tag.get_text()) return content html = \"\"\" Parsing HTML

      Parsing HTML

      This is the first paragraph.

      This is the second paragraph.

      \"\"\" print(get_p_tags(html))"} {"instruction": "Query an API and display its results.", "input": "URL = \"http://ip-api.com/json\"", "output": "import requests response = requests.get(url) data = response.json() print(data)"} {"instruction": "Create a Python program to classify emails as either spam or non-spam.", "input": "Not applicable", "output": "import numpy as np\nimport pandas as pd\nfrom sklearn.preprocessing import LabelEncoder\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.naive_bayes import MultinomialNB\n\n# Load dataset\ndf = pd.read_csv('dataset.csv')\n\n# Encode labels\nle = LabelEncoder()\nX = df.drop(['label'],axis=1).values\ny = le.fit_transform(df['label'])\n\n# Split into train and test set\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)\n\n# Train model\nmodel = MultinomialNB()\nmodel.fit(X_train, y_train)\n\n# Make prediction\nprediction = model.predict(X_test)\n\n# Evaluate model\naccuracy = np.mean(prediction == y_test)\nprint('Accuracy: ', accuracy)"} {"instruction": "Design an algorithm in Python for linear search on an array of integers.", "input": "", "output": "def linearSearch(arr, x): \n \n for i in range(len(arr)): \n \n if arr[i] == x: \n return i \n \n return -1"} {"instruction": "Develop a program to spell a given word.", "input": "\"Hello\"", "output": "def spellWord(word): words = list(word) for i in range(len(words)): print(words[i])"} {"text": "[DE Wikipedia] Vestec\n\nVestec ist der Name mehrerer Orte in Tschechien Gemeinde im Okres Náchod, siehe Vestec u Hořiček Gemeinde im Okres Nymburk, siehe Vestec nad Mrlinou Gemeinde im Okres Praha-západ, siehe Vestec u Prahy Vestec, Ortsteil von Běstvina, Okres Chrudim Vestec, Ortsteil von Chocerady, Okres Benešov Vestec, Ortsteil von Chrudim, Okres Chrudim, siehe Vestec (Chrudim) Vestec, Ortsteil von Hřiměždice, Okres Příbram Vestec, Ortsteil von Mezno, Okres Benešov Vestec, Ortsteil von Zaloňov, Okres Náchod Vestec, Ortsteil von Zbizuby, Okres Kutná Hora Vestec, Ortsteil von Zvěstov, Okres Benešov Dolní Vestec, Ortsteil von Slavíkov, Okres Havlíčkův Brod Horní Vestec, Ortsteil von Slavíkov, Okres Havlíčkův Brod Malý Vestec, Ortsteil von Vestec nad Mrlinou, Okres Nymburk Nový Vestec, Gemeinde im Okres Praha-východ Starý Vestec, Gemeinde im Okres Nymburk"} {"instruction": "Design a PHP code for displaying the current URL.", "input": "", "output": ""} {"instruction": "Embed a machine learning model into a web page.", "input": "Python Machine Learning model file", "output": "# Imports \nfrom flask import Flask, render_template, request\nfrom sklearn.externals import joblib\n\n# App\napp = Flask(__name__)\n\n# Load the model\nmodel = joblib.load(Python Machine Learning model file)\n\n# Routes\n\n@app.route('/', methods=['GET', 'POST'])\ndef predict(): \n # Get the data from the POST request. \n data = request.form\n # Make prediction using the model. \n prediction = model.predict(data)\n \n # Render template\n return render_template('index.html', prediction=prediction)\n\n# Run App\nif __name__ == '__main__': \n app.run(debug=True)"} {"instruction": "Create a function in Python which takes a list and finds the second highest number in it.", "input": "arr = [2, 3, 1, 5, 4]", "output": "def second_highest_num(arr): arr.sort() return arr[-2]"} {"instruction": "Create a Python program to calculate day of the week for a given date.", "input": "(2020, 05, 22)", "output": "import datetime\n\nday, month, year = (2020, 05, 22)\n\nweekdays = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"]\n\ninpDate = datetime.date(year, month, day)\ndayOfWeek = inpDate.weekday()\nprint(weekdays[dayOfWeek])"} {"instruction": "Implement a 'closest to zero' algorithm in Python, which returns the closest to 0 value from a given array.", "input": "[-2, 4, -5, - 1]", "output": "def closest_to_zero(arr):\n closest_val = 0\n closest_diff = float('inf')\n \n for val in arr:\n if abs(val) < abs(closest_diff):\n closest_diff = val\n closest_val = val\n\n return closest_val\n\narr1 = [-2, 4, -5, -1]\nresult = closest_to_zero(arr1)\nprint(result)"} {"instruction": "Create a python script that extracts the first ten words from a given text.", "input": "The quick brown fox jumps over the lazy dog", "output": "import re\n\ntext = \"The quick brown fox jumps over the lazy dog\"\n\n# Extract words using a regular expression\nwords_list = re.findall(r\"[\\w']+\", text)\n\n# Print the first ten words\nprint(words_list[:10])"} {"instruction": "Write a Python script to generate a random linear sequence.", "input": "", "output": "import random\n\n# generate the sequence\nsequence_length = 10\nsequence = [] \nfor i in range(sequence_length):\n sequence.append(random.randint(1, 10))\n\nprint(sequence)"} {"instruction": "Create a class \"Person\" in Kotlin with first name, last name, and age as its fields.", "input": "", "output": "class Person( var firstName: String, var lastName: String, var age: Int )"} {"instruction": "Write a SQL query to print out the names of employees in the Employees table who are older than 25.", "input": "Employees table is defined as: (employee_id int, first_name varchar(255), last_name varchar(255), age int).", "output": "SELECT first_name, last_name FROM Employees WHERE age > 25;"} {"instruction": "Parse the string \"Hello[1]World[4]123[3]\" into a list.", "input": "string = \"Hello[1]World[4]123[3]\"", "output": "my_list = string.split('[') my_list = [item.replace(']', '') for item in my_list] my_list = [int(item) for item in my_list[1::2]]"} {"instruction": "Create a function to convert a given decimal number to its corresponding hexadecimal value.", "input": "", "output": "def dec2hex(n): return hex(n)[2:]"} {"instruction": "Create a Node.js script to read from a MongoDB database.", "input": "", "output": "const MongoClient = require('mongodb').MongoClient; // Connection url const url = 'mongodb://localhost:27017'; // Database Name const dbName = 'myproject'; // Connect using MongoClient MongoClient.connect(url, function(err, client) { // Create a collection we want to drop later const col = client.db(dbName).collection('users'); // Insert a bunch of documents col.find({}).toArray(function(err, docs) { // Print the documents returned console.log(\"Found the following records\"); console.log(docs) // Close the DB client.close(); }); });"} {"instruction": "Implement a function to remove all occurrences of string t from string s.", "input": "s = 'The quick brown fox jumps over the lazy dog.' t = 'the'", "output": "def remove_string(s, t): if t not in s: return s s = s.lower() t = t.lower() indices = [] start = 0 while True: index = s.find(t, start) if index == -1: break indices.append(index) start = index + 1 offset = 0 for index in indices: s = s[:index - offset] + s[index - offset + len(t):] offset += len(t) return s"} {"text": "[DE Wikipedia] Doki Doki Morning\n\nDoki Doki Morning (jap. , Doki Doki Mōningu, wörtlich „herzklopfender Morgen“, geschrieben Doki Doki ☆ Morning) ist ein Lied der japanischen Metal-Band Babymetal. Es ist das erste Lied der Gruppe und wurde am 22. Oktober 2011 in Japan als DVD-Single veröffentlicht. Doki Doki Morning ist sowohl auf dem drei Jahre später erschienenen Debütalbum Babymetal als auch auf dem Album Sakura Gakuin 2010 Nendo: Message der Idol-Popgruppe Sakura Gakuin zu finden. Veröffentlichung Der Gesang für das Lied wurde am 30. Oktober 2010 aufgenommen. Dessen erste Präsentation erfolgte am 28. November in Yokohama, im Rahmen des Sakura Gakuin Festival 2010, dem Debütkonzert der Idol-Popgruppe Sakura Gakuin (von der Babymetal bis 2013 eine Subgruppe war). Das Lied wurde fast ein Jahr später als Standard-Download und als limitierte DVD-Single veröffentlicht. Letztere war am 22. und 23. Oktober 2012 bei Konzerten von Sakura Gakuin in der Mt. Rainier Hall in Shibuya im Vorverkauf erhältlich, danach auch in begrenzter Stückzahl in Online-Shops und bei Tower Records in Shinjuku. Der limitierten Edition war eine DVD mit dem Musikvideo von Doki Doki ☆ Morning beigelegt, ebenso ein Handtuch mit dem Bandlogo. Es folgten zwei Wiederveröffentlichungen: am 6. April 2012 in Japan und am 13. Dezember 2015 in Großbritannien. Komposition Doki Doki ☆ Morning gilt als typisches Beispiel des von Babymetal maßgeblich beeinflussten Subgenres Kawaii Metal, das Elemente von Metal und J-Pop verschmilzt. Dunkle, eindringliche Instrumentation wechselt sich ab mit einer eingänglichen und fröhlichen Melodie. Der Liedtext handelt vom morgendlichen Stress von Teenagern, bevor sie zur Schule gehen müssen. Keines der drei Mädchen war damals mit Metal vertraut. Bei den Aufnahmen bemerkte Moa Kikuchi (Moametal) dazu, dass der Klang des Liedes einen direkten Gegensatz zur japanischen leichten Musik (kei-on) bildet. Aus diesem Grund erhielt Babymetal innerhalb von Sakura Gakuin die alternative Bezeichnung Jūon-bu (, „Club für harte Musik“), um den Kontrast hervorzuheben. Leadsängerin Suzuka Nakamoto (Su-metal) kommentierte, dass sie zuvor noch nie solche musikalische Härte gehört habe, während Yui Mizuno (Yuimetal) zu Beginn eher an der Choreografie als am Gesang interessiert war. Nakamotos Gesang wurde getrennt von jenem von Kikuchi und Mizuno aufgenommen. Rezeption Am 7. November 2011 erreichte Doki Doki ☆ Morning Platz 80 in den Charts für Independent-Singles und -Alben von Billboard Japan. Musikvideo Toy’s Factory lud am 12. Oktober 2011 auf seinem eigenen YouTube-Kanal eine gekürzte Version des Musikvideos hoch. Über ein Jahr später, am 8. November 2012, erfolgte der Upload der Vollversion auf dem offiziellen Kanal von Babymetal. Die Produktion des Videos stand unter der Leitung von Shimon Tanaka. Bis…"} {"instruction": "How would you print the sum of all elements in a 2-dimensional array?", "input": "array=[[1,2], [3,4], [5,6]]", "output": "sum=0 for i in range(len(array)): for j in range(len(array[i])): sum+= array[i][j] print(sum)"} {"instruction": "Create a Python script to output the maximum number from a set of user-inputted numbers.", "input": "", "output": "def find_max_number(numbers):\n maximum = numbers[0]\n for i in numbers:\n if i > maximum:\n maximum = i\n return maximum"} {"instruction": "Create a class in Python to represent a book and include a method for getting the name of the book.", "input": "", "output": "class Book: def __init__(self, name): self.name = name def get_name(self): return self.name"} {"instruction": "Create a looping statement in Python to print the alphabet in lowercase.", "input": "", "output": "for letter in \"abcdefghijklmnopqrstuvwxyz\": print(letter)"} {"instruction": "Write an algorithm to check if a number is even or not without using modulus (%) operator", "input": "", "output": "def is_even(num): if num & 1 == 0: return True else: return False"} {"text": "[EN Wikipedia] Rimantas Šulskis\n\nRimantas Šulskis (1943–1995) was a Lithuanian sculptor and painter. See also List of Lithuanian painters References Lithuanian sculptors 1943 births 1995 deaths 20th-century Lithuanian sculptors 20th-century Lithuanian painters"} {"instruction": "Create an Artificial Neural Network in Python to classify flower colors from a given input.", "input": "", "output": "\"\"\"\nCreating an Artificial Neural Network in Python to classify flower colors from a given input \n\"\"\"\n\nimport numpy as np\nimport keras\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout\n\n# Create the input data and labels\nX_train = np.array([\n [0],\n [1],\n [2],\n [3],\n [4],\n [5],\n [6]\n ])\n\ny_train = np.array([\n [0, 0, 0, 0, 1], # Blue\n [0, 0, 0, 1, 0], # Green\n [0, 0, 1, 0, 0], # Yellow\n [1, 0, 0, 0, 0], # Red\n [0, 1, 0, 0, 0], # Orange\n [0, 0, 0, 0, 0], # Purple\n [0, 0, 0, 1, 0] # Green\n ])\n\n# Create the model\nmodel = Sequential()\nmodel.add(Dense(20, activation='relu', input_shape=(1,)))\nmodel.add(Dropout(0.2))\nmodel.add(Dense(20, activation='relu'))\nmodel.add(Dropout(0.2))\nmodel.add(Dense(20, activation='relu'))\nmodel.add(Dense(5, activation='softmax'))\n\n# Compile and run the model\nmodel.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])\nmodel.fit(X_train, y_train, epochs=50, batch_size=1)"} {"instruction": "Using Python, design an algorithm that takes a string as an input and reverses it.", "input": "\"Hello World!\"", "output": "def reverseString(str): \n s = \"\" \n for i in str: \n s = i + s\n return s \n\nprint(reverseString('Hello World!'))\t# Output: !dlroW olleH"} {"instruction": "Build a Keras model to predict whether a patient has cancer.", "input": "", "output": "model = keras.Sequential([ keras.layers.Dense(64, activation='relu', input_shape=(len(features.keys()),)), keras.layers.Dense(32, activation='relu'), keras.layers.Dense(1, activation='sigmoid') ]) model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])"} {"instruction": "Write a Python script to determine how many lowercase letters are in a given string.", "input": "string = \"Hello World!\"", "output": "\"\"\" Python script to determine how many lowercase letters are in a given string \"\"\" # Initialize a variable to count the lowercase letters lowercase_letter_count = 0 # Loop through each character in the string for char in string: # Check if the character is a lowercase letter if char.islower(): # If yes, then increment the counter lowercase_letter_count += 1 # Print the total number of lowercase letters print(lowercase_letter_count)"} {"instruction": "Create an exponential moving average function in R.", "input": "", "output": "library(zoo) exponential_moving_average <- function(x, n, beta) { EMA <- 0 for (i in 1:length(x)) { if (i == 1) { EMA[i] <- x[i] } else { EMA[i] <- ((beta * x[i]) + ((1 - beta) * EMA[i - 1])) } } ma_x <- as.numeric(rollapply(EMA, n, mean, fill = NA, align = \"right\")) return(ma_x) }"} {"instruction": "Generate a 5-element tuple of random numbers between 5 and 15 using Python.", "input": "", "output": "import random random_tuple = tuple(random.randint(5, 15) for _ in range(5))"} {"instruction": "Design a data structure to store the details of a student (Name, Age, Course).", "input": "", "output": "struct Student { name: String, age: u32, course: String, }"} {"text": "[CS Wikipedia] Rychlost světla\n\nRychlost světla (nebo jiného elektromagnetického záření) ve vakuu (stručně též „světelná rychlost“ bez nutnosti uvádět ještě „ve vakuu“) je definována jako fázová rychlost postupného elektromagnetického vlnění ve vakuu. V soustavách jednotek založených na metrickém systému (tedy i SI) má vzhledem k definici metru přesnou hodnotu 299 792 458 metrů za sekundu (1 079 252 848,8 km/h). Označuje se podle uvedené normy ISO/IEC značkou , často však jen písmenem c, které norma ponechává pro rychlost světla v látkovém prostředí (značka je pravděpodobně odvozena z latinského celeritas, což znamená rychlost, nebo z constans, znamenající konstanta). Tato rychlost dává přirozený poměr měřítek prostoru a času a je nejvyšší možnou rychlostí šíření signálu či informace (pokud nebereme v potaz kvantové provázání). Rychlost světla v látkovém prostředí je v mikroskopickém popisu stejná jako rychlost světla ve vakuu , avšak světlo kvantově interaguje s částicemi látky, a proto se v makroskopickém popisu jeví jeho fázová rychlost pomalejší. Rychlost šíření světla je pak rovna , kde je index lomu příslušné látky (materiálu). Přehled Podle standardní fyzikální teorie se všechno elektromagnetické záření, včetně viditelného světla, šíří (nebo pohybuje) ve vakuu konstantní rychlostí všeobecně známou jako rychlost světla. Tato fyzikální konstanta se značí písmenem , pro stručnost se často píše jen c. Rychlostí se šíří také gravitace v obecné teorii relativity. Zákony elektromagnetismu (jako jsou Maxwellovy rovnice) uvádějí, že rychlost elektromagnetického záření nezávisí na rychlosti objektu vyzařujícího záření. Proto například světlo vyzařující z rychle se pohybujícího zdroje se šíří stejnou rychlosti jako světlo vyzařované ze statického zdroje, i když podle relativistického Dopplerova jevu se barva, frekvence, energie a hybnost světla změní. Jestliže se zkombinuje pozorování s principem relativity, všichni pozorovatelé naměří shodnou rychlost světla ve vakuu, nezávisle na vztažné soustavě pozorovatele nebo rychlosti objektu vyzařujícího světlo. Proto se na může nahlížet jako na fyzikální konstantu a tento fakt je základem speciální teorie relativity. Je důležité poznamenat, že základem speciální relativity je konstanta , nikoliv samotné světlo. Jestliže je tedy světlo nějak upraveno, aby se šířilo rychlosti menší než , tak to přímo neovlivní speciální teorii relativity. Pozorovatelé cestující velkými rychlostmi zjistí, že vzdálenosti a časy jsou zdeformované („dilatované“) v souladu s Lorentzovými transformacemi. Transformace ale deformují vzdálenosti a časy takovým způsobem, že rychlost světla zůstává vůči nim konstantní. Osoba cestující rychlostí blízkou rychlosti světla by viděla, že barva světla vpředu (ve směru pohybu) by měla modrý posuv a barva vzadu rudý. Jestliže by…"} {"instruction": "Using the given dictionary, write a program in Python to find the most frequent word.", "input": "sample_dict = {'electron':10, 'atom':3, 'chemistry':2, 'quantum':15}", "output": "def most_frequent(sample_dict):\n key = max(sample_dict, key=sample_dict.get) \n return key \n \nprint(most_frequent(sample_dict)) # Outputs: \"quantum\""} {"text": "[EN Wikipedia] Kenneth M. Baird\n\nKenneth MacClure Baird (January 23, 1923 – April 18, 2022) was a Canadian physicist, metrologist and inventor, born of Canadian parents in China in 1923. Biography He received his Bachelor of Science in physics at the University of New Brunswick, Canada in 1943, and joined the Canadian National Research Council (NRC) in Ottawa where he excelled at research in aerial reconnaissance and high speed photography, thereby earning him full NRC financial support for graduate studies at Bristol University, England, where he acquired his Ph.D. in solid state physics in 1952. He is the younger brother to Dr. David Baird. Returning to the NRC, Baird headed the transition of Canada’s primary length standard/facilities of the International Metre from a prototype metal bar (the official international standard of length established in 1779) to a wavelength of light. His contribution to the development of isotope lamps, on perturbations to wavelength standards, and in interferometry (including the development of the world’s first interference comparator for metre bar calibration in terms of standard wavelengths) placed Canada among the main contributors to the redefinition of the International Metre in 1960. Baird also maintained Canada’s primary standard of mass as well as length, and standards for quantities derived from them, such as density, pressure, vacuum and certain engineering standards. For much of this work Baird engaged the industrial community, producing results such as the first commercially produced internal reflector laser, manufactured by E. Leitz Company. In 1973, Baird and his colleagues invented an important interference device designed for the security of valuable documents, subsequently used on Canadian monetary bills thus establishing a new standard for currency anti-counterfeiting. It was the quest of Baird and his colleagues to improve the accuracy of measurements of the speed of light, which ultimately provided the solid foundation for redefining the International Metre in 1982 and \"their skilled pioneering work in laser frequency stabilization and measurement\" which resulted in the following achievements: The development of the Iodine-stabilized helium neon laser, and one of the first demonstrations of saturated absorption spectroscopy and widely used realization of the primary standard of length and wavelengths. The confirmation of the most recent new values for the speed of light , 100 times more accurate than previous measurements (The 7th International Conference on Quantum Electronics, Montreal, 1972). The development of the technique of transition–difference generated frequencies in spectroscopic wavelength and frequency measurements. The first measurement of the frequency of visible light, in collaboration with the US National…"} {"instruction": "Replace all vowels in a given string with the character \"X\" in C++.", "input": "\"Hello World!\"", "output": "#include #include using namespace std; int main() { string s = \"Hello World!\"; for (int i=0; s[i]!='\\0'; i++) { if (s[i] == 'A' || s[i] == 'a' || s[i] == 'E' || s[i] == 'e' || s[i] == 'I' || s[i] == 'i' || s[i] == 'O' || s[i] == 'o' || s[i] == 'U' || s[i] == 'u') s[i] = 'X'; } cout << s; return 0; }"} {"text": "[EN Wikipedia] Axiom\n\nAn axiom, postulate, or assumption is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments. The word comes from the Ancient Greek word (), meaning 'that which is thought worthy or fit' or 'that which commends itself as evident'. The precise definition varies across fields of study. In classic philosophy, an axiom is a statement that is so evident or well-established, that it is accepted without controversy or question. In modern logic, an axiom is a premise or starting point for reasoning. In mathematics, an axiom may be a \"logical axiom\" or a \"non-logical axiom\". Logical axioms are taken to be true within the system of logic they define and are often shown in symbolic form (e.g., (A and B) implies A), while non-logical axioms (e.g., ) are substantive assertions about the elements of the domain of a specific mathematical theory, such as arithmetic. Non-logical axioms may also be called \"postulates\" or \"assumptions\". In most cases, a non-logical axiom is simply a formal logical expression used in deduction to build a mathematical theory, and might or might not be self-evident in nature (e.g., the parallel postulate in Euclidean geometry). To axiomatize a system of knowledge is to show that its claims can be derived from a small, well-understood set of sentences (the axioms), and there are typically many ways to axiomatize a given mathematical domain. Any axiom is a statement that serves as a starting point from which other statements are logically derived. Whether it is meaningful (and, if so, what it means) for an axiom to be \"true\" is a subject of debate in the philosophy of mathematics. Etymology The word axiom comes from the Greek word (axíōma), a verbal noun from the verb (axioein), meaning \"to deem worthy\", but also \"to require\", which in turn comes from (áxios), meaning \"being in balance\", and hence \"having (the same) value (as)\", \"worthy\", \"proper\". Among the ancient Greek philosophers an axiom was a claim which could be seen to be self-evidently true without any need for proof. The root meaning of the word postulate is to \"demand\"; for instance, Euclid demands that one agree that some things can be done (e.g., any two points can be joined by a straight line). Ancient geometers maintained some distinction between axioms and postulates. While commenting on Euclid's books, Proclus remarks that \"Geminus held that this [4th] Postulate should not be classed as a postulate but as an axiom, since it does not, like the first three Postulates, assert the possibility of some construction but expresses an essential property.\" Boethius translated 'postulate' as petitio and called the axioms notiones communes but in later manuscripts this usage was not always strictly kept. Historical…"} {"text": "[EN Wikipedia] American National Standards Institute\n\nThe American National Standards Institute (ANSI ) is a private nonprofit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organization also coordinates U.S. standards with international standards so that American products can be used worldwide. ANSI accredits standards that are developed by representatives of other standards organizations, government agencies, consumer groups, companies, and others. These standards ensure that the characteristics and performance of products are consistent, that people use the same definitions and terms, and that products are tested the same way. ANSI also accredits organizations that carry out product or personnel certification in accordance with requirements defined in international standards. The organization's headquarters are in Washington, D.C. ANSI's operations office is located in New York City. The ANSI annual operating budget is funded by the sale of publications, membership dues and fees, accreditation services, fee-based programs, and international standards programs. Many ANSI regulations are incorporated by reference into United States federal statutes (i.e. by OSHA regulations referring to individual ANSI specifications). ANSI does not make these standards publicly available, and charges money for access to these documents; it further claims that it is copyright infringement for them to be provided to the public by others free of charge. These assertions have been the subject of criticism and litigation. History ANSI was most likely formed in 1918, when five engineering societies and three government agencies founded the American Engineering Standards Committee (AESC). In 1928, the AESC became the American Standards Association (ASA). In 1966, the ASA was reorganized and became United States of America Standards Institute (USASI). The present name was adopted in 1969. Prior to 1918, these five founding engineering societies: American Institute of Electrical Engineers (AIEE, now IEEE) American Society of Mechanical Engineers (ASME) American Society of Civil Engineers (ASCE) American Institute of Mining Engineers (AIME, now American Institute of Mining, Metallurgical, and Petroleum Engineers) American Society for Testing and Materials (now ASTM International) had been members of the United Engineering Society (UES). At the behest of the AIEE, they invited the U.S. government Departments of War, Navy (combined in 1947 to become the Department of Defense or DOD) and Commerce to join in founding a national standards organization. According to Adam Stanton, the first permanent secretary and head of staff in 1919, AESC started as an ambitious program and little else. Staff for the first year…"} {"instruction": "Write a SQL query to find the average price for all products in the Products table.", "input": "SELECT * FROM Products", "output": "SELECT AVG(Price) FROM Products;"} {"instruction": "Create a Python program to display a user's profile. The program should take a JSON object as an input and should output the user's name, age and email address.", "input": "{\n \"name\":\"John Smith\",\n \"age\":32,\n \"email\":\"john.smith@example.com\"\n}", "output": "import json\n\nprofile_data = {\n \"name\":\"John Smith\",\n \"age\":32,\n \"email\":\"john.smith@example.com\"\n}\n\ndata = json.loads(profile_data)\n\nprint(\"Name: {}\".format(data[\"name\"]))\nprint(\"Age: {}\".format(data[\"age\"]))\nprint(\"Email: {}\".format(data[\"email\"]))\n\n# Output: \n# Name: John Smith\n# Age: 32\n# Email: john.smith@example.com"} {"instruction": "Write a class to define a complex number", "input": "", "output": "class ComplexNumber{ double real; double imaginary; public ComplexNumber(double real, double imaginary){ this.real = real; this.imaginary = imaginary; } public double getReal(){ return real; } public double getImaginary(){ return imaginary; } }"} {"instruction": "Design a web application in Python that reads a web page and counts the total number of words in the page.", "input": "", "output": "import requests \nfrom bs4 import BeautifulSoup \nimport re\n\n# Fetch the web page \npage = requests.get(\"THE_WEBPAGE_URL\") \n# Parse the content of the page\nsoup = BeautifulSoup(page.content, 'html.parser')\n\n# Find all visible text in the page \ntext = soup.find_all(text=True)\n\n# Remove text inside scripts and style tags\nfor t in text: \n if t.parent.name in ['style', 'script', 'head', 'title', 'meta', '[document]']: \n text.remove(t)\n\n# Remove extra spaces\ntext_string = \" \".join(text)\ntext_string = re.sub('\\s+', ' ', text_string)\n\n# Count the total number of words \nword_count = len(text_string.split()) \n\nprint(\"Total number of words:\", word_count)"} {"instruction": "Design a program that produces the following output: . . . . . . . . . . . . . . . . . . . . .", "input": "", "output": "#include int main() { for (int i=0; i<17; i++) { std::cout << \".\"; } std::cout << std::endl; return 0; }"} {"text": "[DE Wikipedia] Kullana Kulturali\n\nKullana Kulturali (maltesisch; „Kulturelle Halskette“) ist eine Enzyklopädie zu Malta bzw. den Maltesischen Inseln in maltesischer Sprache, die in den Jahren von 1999 bis 2006 in Malta im Verlag Pubblikazzjonijiet Indipendenza (PIN) in Pièta auf Malta erschien. Sie umfasst 72 Bände. Sie ist thematisch nach einzelnen Themen gegliedert. Jedes Thema der Reihe umfasst dabei einen Band, zu einigen Themen gibt es zwei Bände. Zahlreiche Fachgelehrte haben an dem Werk mitgearbeitet. Die folgende Übersicht gibt an: 1. die Nummer des Bandes; 2. den maltesischen Buchtitel (mit einer deutschen Übersetzung in Klammern), 3. den Namen des/der Verfasser(s), 4. Erscheinungsdatum des Bandes. Bände 1 L-istorja tat-trasport fil-Gżejjer Maltin (Geschichte des Transports auf den Maltesischen Inseln). Guido Lanfranco 2 Il-mediċina fil-gżejjer Maltin (Die Medizin der Maltesischen Inseln). Charles Savona Ventura (2006) 3 In-novella Maltija : xi perspettivi fuq l-iżvilupp tan-novella bil-Malti (Der maltesische Roman: einige Perspektiven auf die Entwicklung des maltesischen Romans). Charles Briffa (1999) 4 Il-Mitoloġija (Mythologie). Victor Xuereb (1999) 5 Il-Molluski ta' Malta (Maltesische Mollusken). Charles Cachia (1999) 6 L-istorja ta' l-opra f'Malta (1631-1866) (Geschichte der Oper in Malta (1631–1866)). Alfred G. Miceli (1999) 7 Il-Futbol Malti (Maltesischer Fußball). Carmel Baldacchino (1999) 8 L-Emigrazzjoni Maltija : Is-Seklu Dsatax u Ghoxrin (Maltesische Migration: Das 19. und 20. Jahrhundert). Lawrence E Attard (1999) 9 Is-swar u l-fortifikazzjonijiet (Bastionen und Festungen). Vincent Zammit (1999) 10 Il-Malti, elf sena ta' storja (Die Malteser, tausend Jahre Geschichte). Joseph M. Brincat (2000) 11 L-Istituti ta' Hajja Kkonsagrata. Alexander Bonnici (2000) 12 Il-Lepidoptera (Schmetterlinge). Paul M. Sammut (2000) 13 L-arti moderna (Moderne Kunst). Joseph Paul Cassar (2000) 14 Niċeċ u Statwi fit-Toroq Maltin (Nischen und Statuen auf maltesischen Straßen). Tony Terribile (2000) 15 Il-Pulizija f'Malta : 1800-1964 (Polizei in Malta: 1800–1964). Edward Attard (2000) 16 Tliet Sekli ta' Ghamara Maltija (Drei Jahrhunderte maltesische Möbel). Joseph Galea-Naudi; Denise Micallef (2000) 17 Il-Flotta ta' l-Ordni ta' San Ġwann (Die Flotte des Order of Saint John). Joseph Muscat (2000) 18 Il-mużika ta' Malta sa l-ah̳h̳ar tas-seklu tmintax (Maltesische Musik bis zum Ende des 18. Jahrhunderts). Joseph Vella Bondin (2000) 19 Il-mużika ta ́Malta fis-sekli dsatax u ghoxrin (Maltesische Musik im 19. und 20. Jahrhundert). Joseph Vella Bondin (2000) 20 L-Istorja ta' l-Edukazzjoni f'Malta (Geschichte des Schulwesens in Malta.). Joseph Zammit Mangion (2000) 21 Qxur, Biċċiet, u Opri tal-Bahar. Carmel Pulè (2000) 22 Il-ktieb tal-filosofija f'Malta I (Philosophische Bücher in Malta I).…"} {"instruction": "Create a web application in Python that displays a directory structure tree for a given path.", "input": "/home/myUser/myFolder", "output": "import os\n\ndef make_tree(path): \n files = os.listdir(path) \n for f in files: \n full_path = os.path.join(path, f) \n if os.path.isdir(full_path): \n print(f) \n make_tree(full_path) \n else: \n print(\" -\" + f) \n \npath = '/home/myUser/myFolder' \nmake_tree(path)"} {"text": "[DE Wikipedia] Adolf Becker (Politiker)\n\nAdolf Heinrich August Becker (* 30. Juli 1848 in Rostock; † 18. April 1922 ebenda) war ein deutscher Jurist in der Kommunalverwaltung. Von 1907 bis 1919 war er Bürgermeister von Rostock. Leben Adolf Becker wuchs in Rostock auf und besuchte hier die Schule. Nach dem Abitur begann er an der Universität Jena Rechtswissenschaft zu studieren. 1868 wurde er im Corps Thuringia Jena aktiv. Als Inaktiver wechselte er an die heimatliche Universität Rostock. 1880 wurde er zum Senator gewählt. Von 1893 bis 1898 bekleidete er das Amt des Ratssyndicus. Ab 1898 saß Becker wieder als Senator im Ratskollegium. Von 1907 bis 1919 war er Bürgermeister von Rostock. Adolf Becker war während seiner gesamten Amtszeit ein Förderer der Kunst und Kultur. Er war Mitglied im Beirat der Theaterdeputation, förderte den Verein für Rostocks Altertümer und den Kunst- und Konzertverein. Ehrungen Dr. phil. h. c. der Universität Rostock Adolf-Becker-Straße in der Kröpeliner-Tor-Vorstadt Literatur Einzelnachweise Jurist in der Kommunalverwaltung Corpsstudent (19. Jahrhundert) Mann Deutscher Bürgermeister (Rostock) Geboren 1848 Gestorben 1922 Ehrendoktor der Universität Rostock"} {"instruction": "Given a list of integers, write a Python program to print the latest 3 largest numbers.", "input": "[5, 1, 10, 25, 74, 17, 2]", "output": "def print_largest_three_numbers(numbers): \n numbers.sort(reverse=True) \n print(*numbers[:3], sep = \", \") \n\nprint_largest_three_numbers([5, 1, 10, 25, 74, 17, 2])\n\nOutput:\n74, 25, 17"} {"text": "[EN Wikipedia] 68 Whiskey\n\n68 Whiskey is an American military comedy-drama television series created by Roberto Benabib. Based on the Israeli television series Charlie Golf One (known as Taagad in ), it premiered on January 15, 2020 on the Paramount Network. In September 2020, the series was canceled after one season. Cast and characters Main Sam Keeley as Cooper Roback Gage Golightly as Grace Durkin Cristina Rodlo as Sergeant Rosa Alvarez Jeremy Tardy as Staff Sergeant Mekhi Davis Nicholas Coombe as Anthony Petrocelli Fahim Fazli as warlord Derek Theler as Sasquatch Beth Riesgraf as Major Sonia Holloway Lamont Thompson as Colonel Harlan Austin Recurring Usman Ally as Captain Hazara Artur Benson as Khalil Aaron Glenane as Chef Colin Gale Linc Hand as Crash Jade Albany as Cassola Omar Maskati as Qasem Episodes Production Development On July 9, 2018, it was announced that Paramount Network had given the production a pilot order. The pilot was directed by Michael Lehmann and written by Roberto Benabib who were also set to executive produce alongside Brian Grazer, Francie Calfo, Zion Rubin, Efrat Shmaya Dror, Danna Stern, Samie Kim Falvey and Michael Lehmann. On April 30, 2019, it was reported that Paramount Network had given the production a series order for a first season consisting of ten episodes. Production companies involved with the series were slated to consist of CBS Television Studios, Imagine Television, and yes Studios. The series premiered on January 15, 2020. On September 2, 2020, Paramount Network canceled the series after one season. In an extended Twitter thread in 2021, staff writer Dylan Park-Pettiford and story editor Caitie Delaney revealed that a writer on the series fabricated a career in the Marines in order to get a job, and was only found out and removed mid-season due to Park-Pettiford's suspicions. Casting In September 2019, it was announced that Sam Keeley, Gage Golightly, Cristina Rodlo, Jeremy Tardy, Nicholas Coombe, Derek Theler, Beth Riesgraf, and Lamont Thompson were cast as series regulars while Usman Ally, Artur Benson, and Aaron Glenane were cast in recurring roles. In October 2019, Linc Hand and Jade Albany joined the cast in recurring capacities. Reception Critical response On the review aggregation website Rotten Tomatoes, the series holds an approval rating of 88% with an average rating of 6/10, based on 8 reviews. Metacritic, which uses a weighted average, assigned the series a score of 61 out of 100 based on 4 critics, indicating \"generally favorable reviews.\" Ratings References External links 2020 American television series debuts 2020 American television series endings 2020s American comedy-drama television series American military television series American television series based on Israeli television series English-language…"} {"text": "[DE Wikipedia] Hildegund Menzel-Rogner\n\nHildegund Menzel-Rogner, geb. Rogner (* 2. März 1910 in Breslau; † 6. Februar 1945 in Berlin) war eine deutsche Philosophin und Wissenschaftlerin. Leben Die Tochter eines Volksschullehrers lernte als Heranwachsende den Jugendstilkünstler Melchior Lechter (1865–1937) kennen, der sie förderte, und studierte nach dem Abitur Philosophie, Mathematik und Physik. Bereits vor der Promotion zum Dr. phil. an der Friedrich-Wilhelms-Universität zu Berlin am 20. Oktober 1937 hatte sie zum 1. August 1937 eine Stelle bei der Deutschen Versuchsanstalt für Luftfahrt (DVL) in einem mathematischen Forschungsprojekt angenommen. Am 22. Dezember 1938 heiratete sie den Historiker Ottokar Menzel. Von 1939 bis 1940 und von 1942 bis 1945 war sie Mitarbeiterin der Cusanus-Ausgabe der Heidelberger Akademie der Wissenschaften, von 1940 bis 1942 Mitarbeiterin der Leibniz-Ausgabe der Preußischen Akademie der Wissenschaften Berlin. Wohl am 5. Februar 1945 erschoss ihr Ehemann zunächst seine Frau und danach sich selbst. Da die Leichen erst am 6. Februar aufgefunden wurden, gilt dieser Tag als offizieller Todestag. Schriften Die Bewegung des Erkennens und das Sein in der Philosophie des Nikolaus von Cues, Heidelberg 1937 (Berlin, phil. Diss. 1936). Das Geschwindigkeitsfeld in der Umgebung eines Leitwerkprofils endlicher Dicke verschwindenden Spalt. In: Luftfahrtforschung. Bd. 70 (1940) S. 11–17. Hrsg.: Nikolaus von Cues: Der Laie über Versuche mit der Waage. Idiota de staticis experimentis. Meiner, Leipzig 1942 (Schriften des Nikolaus von Cues in deutscher Übersetzung; 5 = Philosophische Bibliothek; 220), [2. Aufl. 1944] (Digitalisat). mit Martin Honecker (Hrsg.): Nikolaus von Cues: Der Laie über den Geist. Idiota de mente. Meiner, Hamburg 1949 (Schriften des Nikolaus von Cues in deutscher Übersetzung; 10 = Philosophische Bibliothek; 228) (Digitalisat). Literatur Martina Hartmann: „Es fragt die Welt nach meinem Ziel, nach deiner letzten Stunde nichts“. Das Wissenschaftler-Ehepaar Hildegund und Ottokar Menzel (1910–1945). Duncker & Humblot, Berlin 2023 (Zeitgeschichtliche Forschungen; 64), ISBN 978-3-428-18796-6 . Weblinks Martina Hartmann: Ottokar Menzel (1912–1945) und Hildegund Menzel-Rogner (1910–1045). Ein Wissenschaftlerehepaar im Dritten Reich (Online-Vortrag vom 18.3.2021) cau.gelehrtenverzeichnis.de Wissenschaftler Deutscher Geboren 1910 Gestorben 1945 Frau Philosoph (20. Jahrhundert)"} {"instruction": "Implement a REST API endpoint with Python and Flask to POST user data including username, email, and password.", "input": "{\n \"username\": \"scott_pilgrim\",\n \"email\": \"scott@pilgrim.com\",\n \"password\": \"ferriswheel\"\n}", "output": "import flask\nfrom flask import Flask, request, jsonify\napp = Flask(__name__)\n\n@app.route('/users', methods=['POST'])\ndef create_user():\n data = request.get_json()\n username = data['username']\n email = data['email']\n password = data['password']\n\n # Insert into database\n\n return jsonify({\"message\": \"User created successfully\"})\n\nif __name__ == '__main__':\n app.run()"} {"text": "[CS Wikipedia] Encyklopedie\n\nEncyklopedie ( okružní + výchova) je strukturované, zpravidla objemné dílo, které se pokouší zevrubně představit lidské poznání týkající se jednoho, více, anebo všech oborů. Řeckého pojmu poprvé užil v 5. století př. n. l. Hippias z Elidy, který jim označoval všeobecné vzdělání. Obecná charakteristika Encyklopedie je specifický druh slovníku, jde o naučný slovník, a jeho hesla (encyklopedická hesla) mohou být tedy řazena různými způsoby. Některé encyklopedie jsou tedy řazeny abecedně, jiné tematicky. Samostatnou kapitolou jsou elektronické encyklopedie (potažmo internetové encyklopedie), u kterých mnohdy ani nemá otázka řazení hesel příliš smysl. Na rozdíl od výkladového slovníku, který přináší stručnou definici hesla, se encyklopedie snaží přiblížit předmět hlouběji a podrobněji. Encyklopedický text může být také lépe strukturován a přinést pro čtenáře dostatečnou informaci o daném tématu hesla, doplněnou o ilustrace, mapy, přehledy, grafy, bibliografii apod. Také zpravidla často odkazuje na související hesla. Encyklopedii lze definovat pomocí čtyř základních vlastností: jejího předmětu, účelu, metody či členění a proces vzniku. Předmět: Tematika encyklopedie může být obecná. Ty obsahují hesla z různých oborů (Ottův slovník naučný, Encyclopædia Britannica apod.), nebo se mohou specializovat na určitý obor či okruh hesel (např. filozofický slovník, slovník lékařství apod.), či na určitou zeměpisnou či kulturní oblast (např. o určité zemi, náboženství apod.). Určení: Encyklopedická díla mají za cíl přinést důležité shromážděné poznání z určitého oboru; v tomto smyslu se liší podrobností a záběrem. Účel díla může ovlivnit i cílový okruh čtenářů; dětské encyklopedie se s tématem vypořádávají jinak než všeobecné encyklopedie či odborné slovníky. Řazení: Historicky existují dva rozdílné způsoby organizace tištěných encyklopedií: abecední řazení a tematické řazení. Moderní elektronické encyklopedie obvykle spojují obě metody, krom toho umožňují rychlé vyhledávání díky indexaci a křížovým odkazům. Metoda vzniku: Encyklopedická díla se také liší ve volbě svých autorů a editorů, způsobu shromažďování, ověřování a sepisování jednotlivých hesel. Autoři encyklopedického díla mohou být renomovanými odborníky v daných oborech, jiné moderní encyklopedie jsou tvořeny a ověřovány mnohem širším okruhem autorů. Velmi volný přístup praktikují otevřené encyklopedie, mezi nimi zejména Wikipedie. Vývoj encyklopedií (příklady) Přechůdci moderních encyklopedií Idea encyklopedie je velmi stará – pochází ze starověkého Řecka (tzv. „zaokrouhlené vzdělání“ – enkyklios paideia). Římané tento pedagogický koncept přejímali a v dílech různých myslitelů (např. Varro, Martianus Capella) postupně vykrystalizoval ve svobodná umění (septem artes liberales). Toto přejal i středověk. V…"} {"instruction": "In a Python class, create a method to compute the average of n numbers without using the average function.", "input": "", "output": "class AverageCalculator:\n def average(self, nums):\n sum = 0\n for i in range(len(nums)):\n sum += nums[i]\n\n return sum / len(nums)"} {"instruction": "Write a blank Python program to convert celsius to fahrenheit.", "input": "", "output": "def celsius_to_fahrenheit(celsius):\n \"\"\"\n This function converts the given celsius value to its corresponding fahrenheit value\n \"\"\"\n fahrenheit = (celsius * (9/5)) + 32\n return fahrenheit"} {"instruction": "Create a for loop for copying an array.", "input": "arr = [1, 2, 3, 4, 5]", "output": "arr_copy = [] for i in arr: arr_copy.append(i)"} {"instruction": "Write a Python program to combine the elements of two lists of equal length into a dictionary.", "input": "list1 = ['a', 'b', 'c'] list2 = [1, 2, 3]", "output": "dict = {} for i in range(len(list1)): dict[list1[i]] = list2[i] print(dict)"} {"instruction": "Construct a Markov chain using Python to predict the next word in a sentence.", "input": "Not applicable", "output": "import random\n \n# Build the Markov chain\ndef build_chain(data):\n chain = {}\n \n for i in range(len(data)-2):\n key = (data[i], data[i+1])\n value = data[i+2]\n \n if key in chain:\n chain[key].append(value)\n else:\n chain[key] = [value]\n \n return chain\n \n# Generate the output\ndef generate_output(chain, seed):\n output = list(seed)\n \n while True:\n key = (seed[-2], seed[-1])\n if key not in chain:\n break\n value = random.choice(chain[key])\n output.append(value)\n seed = seed[1:] + [value]\n \n return ' '.join(output)"} {"text": "[CS Wikipedia] Richard Chaves\n\nRichard John Chaves (* 9. října 1951 Jacksonville, Florida) je americký herec. Jedná se o veterána vietnamské války, podle které má základy autorské kritika v divadelní hře Tracers (Stopaři). I když hrál v několika filmech, výrazněji se neprosadil. Jeho nejznámější rolí je role Poncha ve filmu Predátor. Zde se setkal s Arnoldem Schwarzeneggerem, s Billem Dukem a dokonce i s Van Dammem, který se v Predátorovi však pouze mihl, jak nasedá do vrtulníku. V dalším filmu Svědek se setkal s Harrisonem Fordem. Poté hrál i v méně známých seriálech. Externí odkazy Američtí herci Narození 9. října Narození v roce 1951 Narození v Jacksonville Žijící lidé Muži"} {"instruction": "Create a Python program that converts a list of numbers into a dictionary, where the key is the number and the value is the corresponding difference between two immediate numbers in the list.", "input": "[1, 2, 4, 7, 11]", "output": "def diff_in_list(input_list):\n \"\"\"This function takes a list of integers and returns a dictionary with the input number as key and the difference between two immediate numbers as value.\"\"\"\n \n output_dict = {}\n \n # Iterate over the list and create a dictionary with the \n # input number as key and the difference between\n # two immediate numbers as value\n for i in range(len(input_list) - 1):\n output_dict[input_list[i]] = input_list[i + 1] - input_list[i]\n \n return output_dict\n \n# Sample Input\ninput_list = [1, 2, 4, 7, 11]\n\n# Print the output\nprint(diff_in_list(input_list))"} {"instruction": "Create a SQL statement to select all carts with more than 10 items in them.", "input": "", "output": "SELECT * FROM carts WHERE items > 10;"} {"instruction": "Edit the following code so that it prints the sum of all elements of given array", "input": "arr = [1,5,8,4,2] def sumArray(arr): for i in len(arr): print(arr[i])", "output": "arr = [1,5,8,4,2] def sumArray(arr): total = 0 for i in arr: total += i print(total)"} {"instruction": "Create a MySQL query to update the salary field of the employee", "input": "Table - employee Field - salary", "output": "UPDATE employee SET salary = 2000 WHERE employee_id = 1"} {"instruction": "Change the following code snippet to generate a random integer from 0 to 10.", "input": "", "output": "import random random_int = random.randint(0, 10)"} {"instruction": "Create a python script that parses a CSV and generates a new CSV that adds the total number of rows, total number of columns, and total amount of the data for each attribute.", "input": "", "output": "\"\"\"\nParses a CSV and generates a new CSV that adds the total number of rows, total \nnumber of columns, and total amount of data for each attribute.\n\"\"\"\n\nimport csv\n\ndef parse_csv(filename):\n with open(filename) as csv_file:\n reader = csv.DictReader(csv_file)\n rows =0\n cols = 0\n data_totals = []\n for row in reader:\n rows += 1\n cols = len(row)\n for col in row:\n if len(data_totals) < cols:\n data_totals.append([row[col],1])\n else:\n existing_total = data_totals[cols - 1]\n new_total = [existing_total[0] + float(row[col]), existing_total[1] + 1]\n data_totals.append(new_total)\n #write to new csv\n with open('new_csv.csv', mode='w') as new_csv_file:\n writer = csv.writer(new_csv_file, delimiter=',', quotechar='\"', quoting=csv.QUOTE_MINIMAL)\n writer.writerow(['Rows', 'Columns', 'Data Totals'])\n writer.writerow([rows, cols, data_totals])\n\nif __name__ == '__main__':\n filename = 'test.csv'\n parse_csv(filename)"} {"instruction": "How does the Fibonacci number sequence work?", "input": "", "output": "The Fibonacci sequence is a sequence of numbers where each number in the sequence is the sum of the two numbers preceding it. The first two numbers in the sequence are 0 and 1. The sequence starts with 0 and 1 and continues by adding the two previous numbers to get the next number in the sequence. For example, the first six numbers in the Fibonacci sequence are 0, 1, 1, 2, 3, 5. The sequence can be represented as 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on."} {"instruction": "Create a Python script that does linear regression on a given dataset.", "input": "Not applicable", "output": "import numpy as np\nimport pandas as pd\nfrom matplotlib import pyplot as plt\nimport statsmodels.api as sm\n\n# Load the data \ndata = pd.read_csv('data.csv')\n\n# Add constant to the dataset \ndata = sm.add_constant(data)\n# Fit the model \nresults = sm.OLS(data['x'], data[['const','y']]).fit()\n\n# Get the fitted parameters\nparameters = results.params\n\n# Get the current values of x and y\nx = data['x']\ny = data['y']\n\n# Calculate the predicted values\ny_pred = parameters[0] + parameters[1] * x \n\n# Plot the data and the prediction \nplt.scatter(x, y, label='Data')\nplt.plot(x, y_pred, color='r', label='Prediction')\nplt.legend()\nplt.show()"} {"instruction": "Design a Python program to convert a list of Fahrenheit temperatures to a list of Celsius temperatures.", "input": "[150, 160, 170, 180, 190]", "output": "def Fahrenheit_to_Celsius(Fahrenheit_Temps): \n Celsius_Temps = [] \n for temp in Fahrenheit_Temps: \n Celsius = (temp - 32) * 5 / 9\n Celsius_Temps.append(Celsius) \n return Celsius_Temps \n\nFahrenheit_Temps = [150, 160, 170, 180, 190] \nCelsius_Temps = Fahrenheit_to_Celsius(Fahrenheit_Temps) \nprint(\"Celsius Temperatures =\", Celsius_Temps)"} {"instruction": "Write an SQL query to find the highest population of any country from the table of countries.", "input": "Table: countries Columns: Name (string), Population (int)", "output": "SELECT Name, MAX(Population) FROM countries;"} {"text": "[CS Wikipedia] Termodynamický děj\n\nTermodynamický děj (též tepelný děj) je děj, při kterém se mění stav tělesa (mění se některé ze stavových veličin). Kruhový děj Pokud termodynamická soustava projde řadou změn a nakonec se vrátí do původního stavu, pak říkáme, že soustava vykonala kruhový (cyklický) děj (zkráceně cyklus). Kruhový děj je proto v diagramu p-V i diagramu T-S znázorněn uzavřenou křivkou. Obsah plochy uvnitř křivky v diagramu p-V znázorňuje celkovou práci vykonanou na termodynamické soustavě (či termodynamickou soustavou – záleží na znaménkové konvenci) během cyklu. Podobně obsah plochy uvnitř křivky v diagramu T-S znázorňuje celkové teplo dodané během cyklu termodynamické soustavě (tedy rozdíl přijatého a odevzdaného tepla). Celková změna vnitřní energie po ukončení jednoho cyklu je nulová (ΔU = 0). Stejné tvrzení platí i pro ostatní stavové veličiny. Vratné a nevratné děje Termodynamické děje lze rozdělit na Vratné (reverzibilní) děje – děje, u nichž lze původního stavu dosáhnout obrácením pořadí jednotlivých úkonů. Nevratné (ireverzibilní) děje – děje, které probíhají bez vnějšího působení pouze v jednom směru, tzn. původního stavu nelze dosáhnout přesně stejným postupem v obráceném pořadí. K dosažení původního stavu je nutno vynaložit určitou energii, která nepatří dané soustavě. V přírodě jsou všechny reálné děje nevratné. Kruhové děje bývají označovány jako vratné nebo nevratné cykly. Nejznámějším příkladem vratného kruhového děje je Carnotův cyklus. Děje při konstantní termodynamické veličině Mnohé technicky využitelné děje probíhají tak, že některá z termodynamických veličin zůstává během děje konstantní. Takové děje bývají označovány speciálními názvy. Všeobecná rovnice změny stavu plynu Z podobnosti vztahů pro izotermický, adiabatický a polytropický děj lze zapsat všeobecnou rovnici pro změnu stavu plynu ve tvaru , kde je tlak plynu, je jeho objem a je konstanta. Pro se jedná o vztah pro izotermický děj, pro rovné Poissonově konstantě jde o děj adiabatický. Položíme-li , jedná se o děj polytropický. Pro se jedná o rovnici izobarického děje a pro jde o děj izochorický. Související články Termodynamika Tepelná výměna Externí odkazy Chemické rovnováhy"} {"instruction": "Create an HTTP request to get the data from the given API and parse it into a JSON object.", "input": "https://example.com/api/getData", "output": "import requests url = \"https://example.com/api/getData\" response = requests.get(url) data = response.json()"} {"instruction": "Identify the type of object-oriented programming pattern used in the following code snippet.", "input": "public class Animal { public void eat() { // eat logic } public void move() { // move logic } public void sleep() { // sleep logic } }", "output": "The code snippet is an example of the Template Method pattern. It provides a template method (eat, move, and sleep) that can be used by subclasses. The template method is defined in a superclass and the subclasses can override the methods to provide custom implementations."} {"instruction": "Create a Python web crawler to collect data from web page.", "input": "", "output": "import requests\nimport bs4 \n\ndef web_crawler(url):\n # make request to the specified url and retrieve the response\n response = requests.get(url) \n # since this page is regular HTML page, we need to use the html parser\n soup = bs4.BeautifulSoup(response.text, 'html.parser')\n # extract the data from the parsed web page \n results = soup.select(\"body\") \n # return collected data\n return results"} {"instruction": "Create a Python function that returns the index of the nth occurrence of a substring in a given string.", "input": "(\"Hello World\", \"l\", 3)", "output": "def find_nth_occurrence(string, substring, n):\nindex = -1\n\nwhile n > 0:\n n -= 1\n index = string.find(substring, index+1)\n\nif index == -1:\n return None\nelse:\n return index\n\nif __name__ == \"__main__\":\n result = find_nth_occurrence(\"Hello World\", \"l\", 3)\n print(result)"} {"instruction": "Write a Python program to sort a list of tuples according to its second parameter in ascending order.", "input": "list = [(\"yellow\", 28), (\"blue\", 30), (\"black\", 25), (\"pink\", 45)]", "output": "def sort_tuples(list): \n \"\"\"Function to sort tuples according to their second parameter\"\"\" \n list.sort(key = lambda x : x[1]) \n return list\n\n#Example:\nprint(sort_tuples(list))"} {"instruction": "Create a program that prints out a list of all numbers from 0 to 10, except for five.", "input": "", "output": "for num in range(11): if num != 5: print(num)"} {"instruction": "Using a dictionary, write a program in Python to categorize each list item into a group of the same type.", "input": "items = [1, 2, ‘a’, ‘b’, 4, 5, ‘c’, ‘d’, 7, 8]", "output": "def categorize(items):\n groups = {\n 'numbers': [],\n 'strings': []\n }\n for item in items:\n if type(item) == int or type(item) == float:\n groups['numbers'].append(item)\n else:\n groups['strings'].append(item)\n return groups"} {"instruction": "Use a Python library to visualize a Gaussian normal distribution with the mean set to 5 and the standard deviation set to 1.", "input": "", "output": "import matplotlib.pyplot as plt \nimport numpy as np\n\nmean = 5 \nstd = 1 \nx = np.linspace(mean - 3*std, mean+3*std, 100)\nplt.plot(x, 1/(np.sqrt(2*np.pi*std**2)) *np.exp(-(x-mean)**2/(2*std**2))) \nplt.show()"} {"instruction": "Create a code to calculate the area of the triangle with given side lengths.", "input": "a=3 \nb=4\nc=5", "output": "# Python Program to find the area of triangle\na = 3\nb = 4\nc = 5\n# calculate the semi-perimeter\ns = (a + b + c) / 2\n# calculate the area\narea = (s*(s-a)*(s-b)*(s-c)) ** 0.5\nprint('The area of the triangle is %0.2f' %area)"} {"text": "[DE Wikipedia] Luzon-Waldratte\n\nDie Luzon-Waldratte (Bullimus luzonicus) ist ein auf den nördlichen Philippinen endemisches Nagetier in der Gattung der Philippinen-Moosmäuse. Das Typusexemplar stammt von den Hängen des Mount Data. Merkmale Dieses Nagetier ist groß und erreicht ohne Schwanz eine Länge von 234 bis 267 mm, die Schwanzlänge beträgt 190 bis 233 mm und das Gewicht liegt bei 350 bis 520 g. Es sind 49 bis 56 mm lange Hinterfüße und 28 bis 36 mm lange Ohren vorhanden. Die Oberseite ist mit dunkelbraunem Fell bedeckt und auf der Unterseite kommt silbergraues Fell vor. Typisch ist ein schmaler nackter Schwanz der im vorderen Bereich dunkel sowie im letzten Drittel oder Viertel weiß ist. Weibchen besitzen 6 oder 8 paarig angeordnete Zitzen. Verbreitung und Lebensweise Die Art lebt in nördlichen und südöstlichen Bereichen Luzons, fehlt jedoch im Gebiet um Manila. Sie hält sich im Hügel- und Bergland zwischen 200 und 2400 Meter Höhe auf. Als Habitat dienen verschiedene Wälder, Buschländer und teilweise landwirtschaftlich genutzte Gebiete. Die Luzon-Waldratte schafft im hohen Gras Pfade, indem sie Pflanzen niedertrampelt oder Gras abbeißt. Die verstreuten Halme sind ein deutliches Zeichen ihrer Anwesenheit. Die Nahrung besteht hauptsächlich aus Pflanzenteilen und wird vermutlich mit Kleintieren komplettiert. Die Exemplare können tag- und nachtaktiv sein. Meist besteht ein Wurf aus Zwillingen und allgemein werden bis zu drei Nachkommen pro Wurf geboren. Gefährdung Die IUCN listet die Luzon-Waldratte als nicht gefährdet (least concern) aufgrund ihres guten Anpassungsvermögens und da sie angelegte Brände gut überstehen kann. Einzelnachweise Langschwanzmäuse Endemisches Tier der Philippinen Luzon"} {"text": "[EN Wikipedia] Royal Moroccan Judo Federation\n\nThe Royal Moroccan Judo Federation is a sports association founded in 1959 in Morocco, replacing the Moroccan Judo League, created in 1951. Its role is to promote judo in the kingdom and to represent the colors of Morocco in international competitions. RMJF has been affiliated with the International Judo Federation since 1962, was a founding member of the African Judo Union in 1961 and has been part of the Arab Judo Union since 1977. See also List of judo organizations References External links Judo in Morocco Mococco"} {"instruction": "Print the following string in HTML.", "input": "\"Welcome to my website!\"", "output": " Welcome to my website! Welcome to my website! "} {"instruction": "Combine the following two items in an array.", "input": "Item1: 2 Item2: [3, 4, 5]", "output": "[2, 3, 4, 5]"} {"text": "[CS Wikipedia] Jason Alexander\n\nJason Alexander, rodným jménem Jay Scott Greenspan (* 23. září 1959, Newark, New Jersey, USA) je americký herec, muzikálový zpěvák a tanečník, držitel americké divadelní ceny Tony. Vybraná filmografie 2005 – Chrise nemá rád nikdo (TV seriál) 2002 – 101 dalmatinů II: Flíčkova londýnská dobrodružství 2001 – Těžce zamilován 1999 – Star Trek: Vesmírná loď Voyager (epizoda „Kroužek expertů“) 1997 – Popelka 1997 – Pánská jízda 1996 – Dunston: Sám v hotelu 1996 – Poslední smích 1995 – V dobrém i zlém 1994 – Blankman 1994 – Noviny 1993 – Šišouni v New Yorku 1993 – Všude dobře, doma nejlíp 1990 – Jakubův žebřík 1990 – Pretty Woman 1990 – Show Jerryho Seinfelda (TV seriál) 1986 – Pobřeží moskytů Externí odkazy Narození v roce 1959 Američtí herci Žijící lidé Muži Držitelé ceny Tony Narození 23. září Držitelé ceny Drama Desk Narození v Newarku Držitelé Ceny Sdružení filmových a televizních herců v kategorii nejlepší televizní obsazení (komedie) Držitelé Ceny Sdružení filmových a televizních herců v kategorii nejlepší televizní herec (komedie) Američtí iluzionisté"} {"text": "[EN Wikipedia] Adrienn Kocsis\n\nAdrienn Kocsis de Carulla (born 14 May 1973) is a retired Peruvian badminton player who initially played for Hungary but later moved on to represent Perú. Kocsis won Hungarian national championship and Peruvian national championship many times. Most notably, she won two bronze medals at 1999 Pan American games in Canada in two disciplines while representing Perú. She's the winner of several international titles in Italy, Peru, Brazil, Argentina and Chile. She also finished runner-up in Slovenia, Spain, Suriname and Jamaican international tournaments. Achievements Pan American Games IBF International References 1973 births Living people Peruvian female badminton players Hungarian female badminton players Pan American Games bronze medalists for Peru Pan American Games medalists in badminton Badminton players at the 1999 Pan American Games Medalists at the 1999 Pan American Games Sportspeople from Debrecen 20th-century Peruvian women"} {"instruction": "Generate a random string with the a capital letter followed by two lower case letters.", "input": "", "output": "import string import random def random_string(): capitalletter = random.choice(string.ascii_uppercase) lowercaseletter1 = random.choice(string.ascii_lowercase) lowercaseletter2 = random.choice(string.ascii_lowercase) return capitalletter + lowercaseletter1 + lowercaseletter2"} {"text": "[CS Wikipedia] František Lorenc\n\nFrantišek Lorenc, v Brazílii psáno Lorenz (24. prosince 1872 Zbyslav – 24. května 1957 Porto Alegre), byl český profesor a esperantista žijící po desetiletí v Brazílii. Je autorem první učebnice esperanta pro Čechy, která vyšla v roce 1890 tři roky po vyjití Zamenhofovy knihy přezdívané La Unua Libro. V červenci 2018 byla na jeho počest přejmenována knihovna ve Vrdech. Dílo Byl polyglot, znal 80 jazyků a napsal celkem 56 děl. Jednalo se o gramatiky různých indiánských nářečí, studie o józe apod. Příklady děl v esperantu: Voĉoj de poetoj el la spirita mondo (1944), jedná se o básně psané s pomocí média, technikou automatického psaní Antologio de Brazilaj poetoj, v rukopise zůstala antologie brazilských básníků Překlady Ze sanskrtu do esperanta přeložil dílo Bhagavad-gita. Dále do esperanta přeložil básně z osmdesáti jazyků, tento výbor vyšel pod názvem Diverskolora bukedeto. Odkazy Reference Literatura Externí odkazy Biografický článek na webu Svazu zdravotně postižených esperantistů Odhalení pomníku F.V. Lorencovi v Brazílii 2012 na stránkách českého velvyslanectví, oddělení Významní Češi v Brazílii Knihovna FVL ve Vrdech u Čáslavi Čeští esperantisté Čeští překladatelé Čeští spisovatelé vědecké literatury Čeští polygloti Překladatelé ze sanskrtu Překladatelé do esperanta Čeští překladatelé z francouzštiny Překladatelé do češtiny Narození v roce 1872 Narození 24. prosince Úmrtí v roce 1957 Úmrtí 24. května Muži"} {"instruction": "Create a GPT-2 model to generate text given a seed phrase.", "input": "", "output": "from transformers import GPT2Tokenizer, GPT2LMHeadModel tokenizer = GPT2Tokenizer.from_pretrained('gpt2') model = GPT2LMHeadModel.from_pretrained('gpt2') def generate_text(seed_phrase): input_ids = torch.tensor(tokenizer.encode(seed_phrase)).unsqueeze(0) output_ids = model.generate( input_ids=input_ids, max_length=100, do_sample=True ) return tokenizer.decode(output_ids[0])"} {"text": "[EN Wikipedia] KJYL\n\nKJYL is a Christian radio station licensed to Eagle Grove, Iowa, broadcasting on 100.7 MHz FM. KJYL serves the Fort Dodge, Iowa area. The station is owned by Minn-Iowa Christian Broadcasting, Inc. Translators KJYL is also heard locally in Newell, Iowa, through a translator on 96.3 FM. References External links KJYL's official website JYL Radio stations established in 1994 1994 establishments in Iowa"} {"instruction": "Write a code to get the current weather information for a given city.", "input": "city = \"New York\"", "output": "import requests import json def get_weather_information(city): url = 'http://api.openweathermap.org/data/2.5/weather?q={},'.format(city) response = requests.get(url) data = json.loads(response.text) return data if __name__ == '__main__': print(get_weather_information(\"New York\"))"} {"instruction": "Generate a method for a Python class that returns the most commonly used words in a text document.", "input": "Not applicable", "output": "def most_common_words(self):\n words = {}\n words_list = self.text.split(' ')\n \n for word in words_list:\n if word in words.keys():\n words[word] += 1\n else:\n words[word] = 1\n \n return sorted(words, key=words.get, reverse=True)[:10]"} {"instruction": "Create a Swift program that reads in three values from the user and prints out the maximum value.", "input": "", "output": "import Foundation var a = 0 var b = 0 var c = 0 print(\"Enter 3 values:\") if let aInput = readLine() { if let aInt = Int(aInput) { a = aInt } } if let bInput = readLine() { if let bInt = Int(bInput) { b = bInt } } if let cInput = readLine() { if let cInt = Int(cInput) { c = cInt } } var maximum = max(max(a, b), c) print(\"The maximum value is: \\(maximum)\")"} {"instruction": "Fix the bug in the following code that causes the output to be incorrect.", "input": "def calculate_sum(numbers): total = 0 for num in numbers: total += num return total numbers = [2, 3, 5] result = calculate_sum(numbers) print(f'Sum of {numbers} is {result}')", "output": "def calculate_sum(numbers): total = 0 for num in numbers: total += num return total numbers = [2, 3, 5] result = calculate_sum(numbers) print(f'Sum of {numbers} is {result}.')"} {"instruction": "Develop a SQL query to find all the records that have modified within a given time range.", "input": "", "output": "SELECT * FROM Table WHERE ModifiedTime BETWEEN '' AND '';"} {"instruction": "How can you change the given string 'Hello World' to 'World Hello'?", "input": "", "output": "string = \"Hello World\" string = string.split() string = string[1] + ' ' + string[0] print(string) # World Hello"} {"instruction": "Write Python code to reverse the letters in the string \"hello\".", "input": "", "output": "def reverseString(s): return s[::-1] print(reverseString('hello'))"} {"instruction": "Create a web application that displays a list of all available program languages and their features.", "input": "Not applicable", "output": "\n \n Programming Languages\n \n \n

      Programming Languages

      \n
        \n
      • JavaScript – Object-oriented, event-driven, and functional programming language
      • \n
      • Python – Object-oriented, interpreted, high-level programming language
      • \n
      • C – High-level, structured, multiparadigm, compiled programming language
      • \n
      • C++ – Object-oriented, compiled, generic programming language
      • \n
      • Java – Object-oriented, portable, compiled programming language
      • \n
      \n \n"} {"text": "[CS Wikipedia] Akustika\n\nAkustika je rozsáhlý vědní obor, zabývající se vznikem zvukového vlnění, jeho šířením, vnímáním zvuku sluchem a přenosu prostorem až po vnímání lidskými smysly. Má celou řadu poddisciplín, např. hudební akustika zkoumá fyzikální základy hudby, hudebních nástrojů a prostorů, stavební akustika zvukové jevy a souvislosti v uzavřeném prostoru, budovách a stavbách, prostorová akustika šíření zvuku v obecném prostoru, fyziologická akustika vznikem zvuku v hlasovém orgánu člověka a jeho vnímáním v uchu, psychoakustika vnímání zvuku v mozku atd. Akustika patří mezi nejstarší obory fyziky. Akustika se dále dělí podle oblasti zájmu. Slovo AKUSTIKA pochází z řec. akoustikós, což znamená \"týkající se slyšení\", od akoúo znamenající \"slyším\". Obory akustiky Fyzikální akustika studuje způsob vzniku a šíření zvuku. Dále se zabývá jeho odrazem a pohlcováním v různých materiálech. Hudební akustika zkoumá zvuky a jejich kombinace se zřetelem na potřeby hudby. Lingvistická akustika se zabývá tříděním hlásek z hlediska percepce. Auditivni metoda zkoumá zvuky řeči pouhým poslechem. Hlubší analýzy je schopna pouze metoda pracující s přístroji – tzv. Spektrograf, který převádí zvuky v optické záznamy a tzv. Sonograf. Obrazy zvuku se pak nazývají zvukové spektrografy a sonogramy. Fyziologická akustika se zabývá vznikem zvuku v hlasivkách člověka a jeho vnímáním v uchu. Lékaři se také podrobně zabývají vlivem hluku na lidské zdraví a fungování lidského organismu. Stavební akustika zkoumá dobré a nerušené podmínky poslouchatelnosti hudby a řeči v obytných místnostech a sálech. Dále také možnosti eliminace nežádoucího šíření hluku mimo místnosti či opačně z vnějšího prostoru do budov. Elektroakustika se zabývá záznamem zvuku, reprodukcí a šířením zvuku s využitím elektrického proudu. Rozlišení zvukových vlnění Infrazvuk je zvuk o tak nízkém kmitočtu, že ho lidské ucho není schopné zaznamenat. Přesná hranice mezi slyšitelným zvukem a infrazvukem neexistuje, ale udává se mezi 16 a 20 Hz. Spodní hranice se udává mezi 0,001 a 0,2 Hz. Je známo, že velryby, sloni, hroši, nosorožci, okapi a aligátoři používají infrazvuk k dorozumívání. Ultrazvuk je zvuk s frekvencí vyšší než 20 000 Hz. Ultrazvuk se dá použít třeba při lékařském vyšetření. Ultrazvukové vlny procházejí tělem a odrážejí se od orgánů (akustická impedance). Odražené vlny lze převést ve formě jasově modulovaného obrazu na monitor. Externí odkazy Stavební profese"} {"instruction": "Generate a code in Python to classify the gender of a given name.", "input": "", "output": "def classify_gender(name):\n genders = {\n 'male': ['john', 'peter', 'mark'],\n 'female': ['alice', 'anna', 'jane']\n }\n for key, names in genders.items():\n if name in names:\n return key\n return 'unknown'"} {"instruction": "Explain why it is important to have exception handling", "input": "", "output": "Exception handling is important for a program as it allows the program to gracefully handle any unexpected or erroneous conditions. This helps keep the program running by providing meaningful feedback and prompts to the user. It also helps reduce the risk of having some part of the program crashing due to an unforeseen and avoidable event. Exception handling also encourages developers to write more robust and structured code as they are aware that their code might be faced with unpredictable conditions, and they will expect their code to be able to handle them gracefully."} {"instruction": "Generate a correct python program to return the second biggest element in a given list.", "input": "[1, 5, 9, 4, 16, 11]", "output": "def second_biggest(lst):\n max1 = 0\n max2 = 0\n for num in lst:\n if num > max1:\n max1 = num\n elif num > max2:\n max2 = num\n return max2\n\nsecond_largest_num = second_biggest([1, 5, 9, 4, 16, 11])\nprint(second_largest_num)"} {"instruction": "Use an existing Python function to find the longest string in the following array.", "input": "arr = [\"cat\", \"dog\", \"elephant\", \"squirrel\", \"moose\"", "output": "max(arr, key=len) # returns \"elephant\""} {"text": "[CS Wikipedia] Jasmin Savoy Brown\n\nJasmin Savoy Brown (* 21. března 1994, Alameda, Kalifornie) je americká herečka, která se proslavila hlavně díky roli Evie v seriálu stanice HBO Pozůstalí a rolí Allison Adams v seriálu For the People. Životopis a kariéra Narodila se v Alamedě v Kalifornii, ale vyrůstala ve Springfieldu v Oregonu. Ve čtyřech letech si poprvé zahrála v muzikálové produkci místního kostela, díky které získala lásku k vystupování. V dospívání si zahrála v několika muzikálech a byla členkou několika muzikálových klubů, sborů a skupin včetně, Portland Shakespeare Project, Art's Umbrella, Oregonský dětský sbor a Up Star Crow Studios. Po střední skole se přestěhovala do Los Angeles, aby se mohla více věnovat herectví. Získala menší role v seriálech Grimm, Brooklyn 99 a The Fosters. V roce 2015 získala vedlejší roli Evie Murphy v seriálu stanice HBO Pozůstalí. Evie byla dcera Eriky a Johna, kteří se ztratili při zemětřesení. Po skončení seriálu byl obsazena do role Niny v seriálu stanice Freeform Stitchers. Jednu z hlavních rolí si zahrála v dramatickém seriálu Will, který vypraví příběh mladého Williama Shakespeara. V roce 2017 byla obsazena do hlavní role Allison Adams v seriálu For the People. Filmografie Film Televize Reference Americké televizní herečky Americké filmové herečky Žijící lidé Ženy Herečky z Kalifornie Narození v roce 1994 Narození 21. března Narození v Alamedě (Kalifornie)"} {"text": "[DE Wikipedia] Felice Govean\n\nFelice Govean (* 19. Dezember 1819 in Racconigi, Piemont; † 10. März 1898 in Alpignano bei Turin) war ein Italienischer Dramatiker und Publizist. Leben Felice Govean entstammte einem gräflichen Geschlecht, machte seine Studien in Turin und übernahm dann eine Stelle bei einer Feuerversicherungsgesellschaft. Später wurde er Schauspieler, wandte aber dieser Laufbahn bald wieder den Rücken und arbeitete als Schriftsetzer erst in Mailand, später in Turin, wo er eine Familie gründete. Nachdem Govean 1848 begonnen hatte, biographische Broschüren für das Volk zu schreiben, die reißenden Absatz fanden, gründete er mit Bottero ein demokratisches Blatt, die Gazzetta del popolo, die bald eine ungeheure Verbreitung fand. Nicht minder Erfolg hatte er mit seinen Dramen, von denen I Valdesi (Die Waldenser) und Gesù Cristo auch in Deutschland durch Übersetzungen bekannt wurden (ersteres in Reclams Universalbibliothek). Es handelte sich um originelle Werke im Stil des deutschen „Kraftdramas“, aber von noch grellerem Farbenauftrag und durch kirchenfeindliche Tendenz sensationell wirksam. Seine übrigen Dramen L’assedio d’Alessandria, Il Guttemberg, Un ballo di modiste, Pinto Ribeiro und Maometto wirkten gleichfalls in Italien sehr stark auf ein Massenpublikum. Govean schrieb auch vielgelesene Erzählungen wie La camera anonima und La morte. Zu seinen patriotischen Taten gehört die Eröffnung einer Subskription, mit der er 100 Kanonen für die Festung Alessandria aufbrachte. In späterem Alter lebte Govean, der sich auch mit Freimaurerei beschäftigte, auf seinem Landhaus zu Alpignano bei Turin, wo er 1898 im Alter von 78 Jahren starb. Literatur Publizist Journalist (Italien) Italiener Geboren 1819 Gestorben 1898 Mann"} {"instruction": "Write a C# function to generate all combinations of length n of a given array.", "input": "", "output": "static void GenerateCombinations(int[] arr, int n) { int[] result = new int[n]; GenerateCombination(arr, 0, 0, result); } static void GenerateCombination(int[] arr, int start, int index, int[] result) { if (index == result.Length) { Console.WriteLine(String.Join(\",\", result)); return; } for (int i = start; i < arr.Length; i++) { result[index] = arr[i]; GenerateCombination(arr, i + 1, index + 1, result); } }"} {"instruction": "Create a function in Python that takes two numbers as arguments and returns their average.", "input": "2, 3", "output": "def average(a, b): \n return (a + b) / 2\n\nprint(average(2, 3))"} {"instruction": "Create a C# method to find the third common element in two arrays", "input": "arr1: [8, 15, 20, 7, 2] arr2: [5, 6, 7, 9, 8]", "output": "public int FindCommonElement(int[] arr1, int[] arr2) { HashSet set = new HashSet(); foreach (int item in arr1) { set.Add(item); } List commons = new List(); foreach (int item in arr2) { if (set.Contains(item)) commons.Add(item); } return commons.Count >= 3 ? commons[2] : -1; }"} {"instruction": "Create a function in Python that takes a list of strings and returns a dictionary containing a count of how many times each string appears in the list.", "input": "[\"foo\", \"bar\", \"foo\", \"baz\", \"foo\"]", "output": "def count_words(words):\n counted_words = {}\n for word in words:\n if word not in counted_words:\n counted_words[word] = 1\n else:\n counted_words[word] += 1\n return counted_words\n\nwords = [\"foo\", \"bar\", \"foo\", \"baz\", \"foo\"]\nresult = count_words(words)\nprint(result)"} {"instruction": "Write a Haskell program to calculate the sum of list elements.", "input": "[2,3,7,9]", "output": "sumlist :: [Integer] -> Integer sumlist [] = 0 sumlist (x:xs) = x + sumlist xs -- Driver Code main = do print (sumlist [2,3,7,9]) -- Output: 21"} {"instruction": "Develop a program in Python to compute the median of three numbers.", "input": "", "output": "def median(a, b, c): \n if (a <= b <= c) or (c <= b <= a): \n median = b \n elif (b <= a <= c) or (c <= a <= b): \n median = a \n else: \n median = c \n \n return median"} {"text": "[EN Wikipedia] Torchyn\n\nTorchyn (; ) is an urban-type settlement in Lutsk Raion, Volyn Oblast, western Ukraine. It is located on the banks of the Serna in the drainage basin of the Dnieper. Population: Economy Transportation The closed railway station is in Lutsk. The settlement is on Highway H22 connecting Lutsk and Volodymyr. Notable people Jacek Rybiński, Polish Cistercian abbot References Urban-type settlements in Lutsk Raion Lutsky Uyezd"} {"text": "[HI Wikipedia] बासल-श्तात कैन्टन\n\nबासल-श्तात कैन्टन (जर्मन व अंग्रेज़ी: Basel-Stadt) स्विट्ज़रलैंड के उत्तर में स्थित एक कैन्टन (प्रान्त से मिलता-जुलता प्रशासनिक विभाग) है। जर्मन भाषा में 'बासल-श्तात' का मतलब 'बासल शहर' है और यह कैन्टन बासल शहर और उसके इर्द-गिर्द के कुछ इलाक़ों को मिलाकर बनी हुई है। इसके विपरीत बासल-लान्डशाफ़्ट कैन्टन बासल क्षेत्र के देहाती इलाक़ों से बनी हुई है। यह किसी ज़माने में यह दोनों एक ही 'बासल कैन्टन' नामक कैन्टन का भाग थीं लेकिन १९वीं सदी में ग्रमीण और शहरी क्षेत्रों में अधिकारों को लेकर झड़पें हुई और २६ अगस्त १८३३ में इनका बटवारा हुआ और दो अलग कैन्टन बन गई। क्षेत्रफल के हिसाब से बासल-श्तात स्विट्ज़रलैंड की सबसे नन्ही कैन्टन है। ऐतिहासिक बासल कैन्टन सन् १५०१ में स्विस परिसंघ का हिस्सा बना था। इन्हें भी देखें स्विट्ज़रलैंड के कैन्टन सन्दर्भ बासल-श्तात कैन्टन स्विट्ज़रलैंड के कैन्टन"} {"instruction": "Create a class in C++ with one public member and one private member.", "input": "", "output": "class MyClass { public: int publicMember; private: int privateMember; };"} {"instruction": "Create a program in Python that takes a string as an input and prints out all unique substrings in the input string.", "input": "abcabc", "output": "string = \"abcabc\"\n\n# To store unique substring\nlist_unique_substrings = []\n# Iterating through the length of string\nfor index_i in range(len(string)):\n # Iterating through the range of index_i and string length\n for index_j in range(index_i, len(string)):\n # Slice the substring from index_i to index_j\n substr = string[index_i: index_j + 1]\n # check if substring is already in list\n if substr not in list_unique_substrings:\n list_unique_substrings.append(substr)\n\n# Print the list of unique substrings\nprint(list_unique_substrings)"} {"text": "[CS Wikipedia] Plazma (rozcestník)\n\nPlazma může být: fyzika plazma – ionizovaný plyn, čtvrté skupenství hmoty biologie krevní plazma – tekutá část krve plazmatická membrána (plazmalema) – cytoplazmatická membrána buněk plazmatické proteiny – bílkoviny obsažené v krevní plazmě protoplazma – živá hmota vyplňující vnitřní část buňky technika Plasma (KDE), redesign desktopového prostředí KDE pro UNIX-like operační systémy plazmová obrazovka – zkrácený název typu televizní obrazovky ostatní plazma (chalcedon) – temně zelená odrůda chalcedonu Externí odkazy"} {"instruction": "Input a two-dimensional array and calculate the sum of each row.", "input": "arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "def row_sum(arr): row_sum = [] for row in arr: sum = 0 for ele in row: sum += ele row_sum.append(sum) return row_sum"} {"text": "[DE Wikipedia] Tabu & Love Film\n\nDie TABU FILM GmbH ist eine Filmproduktionsgesellschaft für Pornofilme mit Sitz in Essen. Im Jahr 1968 gründete der deutsche Pionier der Pornografie, Charly Brown, die Firma Tabu & Love Film. Lange bevor andere Produzenten in Deutschland den Schritt in die Pornografie wagten, drehte Charly Brown unter anderem mit Hans Billian Filme wie Josephine Mutzenbacher. Im Jahr 1997 wurde die Firma vom Schweizer Unternehmen Mascotte Film AG in Zürich übernommen, welches seit über 35 Jahren im internationalen Filmlizenzhandel und Kinoverleih tätig ist. Peter Preissle, der Geschäftsführer der Firma, ist in der Schweiz als Pornoproduzent und ehemaliger Zueri-Punk landesweit bekannt. Zu den von ihm entdeckten oder geförderten Darstellerinnen gehören: Laetitia Zappa, Anja Juliette Laval, Tyra Misoux, Louisa Lamour und früher auch Sibel Kekilli unter dem Pseudonym Dilara. Die Mascotte Film AG ist Produzentin und Rechte-Inhaberin sämtlicher Produktionen, die unter den deutschen Labels Magmafilm und Tabu erscheinen. Tabu & Love Film hat viele Filme international bekannter Regisseure synchronisiert und in deutscher Sprache veröffentlicht: Alan Vydra, Alex de Renzy, Hans Billian, Lasse Braun, Gregory Dark, Joe D’Amato, Anita Rinaldi, Michael Ninn, Kris Kramski, Elizabeth Starr, Mike Beck, Eon McKai u. v. a. m. Bekannte Tabu-Filme 2007: Moerderische Girls 3 (Regie: Eon McKai, Darstellerin: Joanna Angel) 2007: Jane Bond (Regie: Mike Beck) 2006: Pornstars from Mars (Regie: Elizabeth Starr, Darsteller: Ron Jeremy) 2000: Models (Regie: Kris Kramski, Darstellerin: Dru Berrymore) 1998: Planet Sex (Regie-Debüt von Anita Rinaldi) 1995: Paprika (Regie: Joe D’Amato, Darstellerin: Laetitia Zappa) 1995: Shock/Latex (Regie: Michael Ninn, Darstellerin: Juli Ashton). Ausgezeichnet mit dem XRCO Award und in die Hall of Fame aufgenommen. 1994: Sex (Regie: Michael Ninn, Darstellerin: Sunset Thomas) 1992: Familie Immerscharf (Regie: Hans Billian) 1985: New Wave Hookers (Regie: Gregory Dark, Darstellerin: Traci Lords). Ausgezeichnet mit dem XRCO Award und in die Hall of Fame aufgenommen. 1984: Weekend Girls (Regie: Jerry Ross, Darstellerin: Traci Lords) 1982: Teenagers in Love (Darstellerin: Annette Haven) 1978: Roulette (Regie: Alan Vydra) 1978: Pretty Peaches (Regie: Alex de Renzy, Darstellerin: Desiree Cousteau). Ausgezeichnet mit dem XRCO Award und in die Hall of Fame aufgenommen. 1976: Bienenstich im Liebesnest (Regie: Hans Billian) Weblinks Tabu & Love Gesamtverzeichnis der Tabufilme inkl. Filmographie Pornofilmgesellschaft (Deutschland) Medienunternehmen (Essen) Kunst (Essen)"} {"instruction": "Write a JavaScript code to create a function that checks if a given number is divisible by 2.", "input": "", "output": "function isDivisibleBy2(num) { return num % 2 === 0; }"} {"instruction": "Generate a python program for validating a phone number.", "input": "Phone numbers should be in 10-digit format (no dashes, hyphens, etc.).", "output": "def valid_phone_number(phone):\n phone = str(phone)\n return len(phone) == 10 and phone.isdigit()"} {"text": "[HI Wikipedia] वी. एस अच्युतानान्तन\n\nवेलिक्ककतु शंकरन अच्युतानंदन (मलयालम: വേലിക്കകത്ത് ശങ്കരന്‍ അച്യുതാനന്തന്‍) एक भारतीय राजनीतिज्ञ है। ओन्होंने २००६ से २०११ तक केरल के मुख्यमंत्री थे। वर्तमान में वे केरल विधानसभा में विपक्ष के नेता के रूप में कार्य करता हैं। अच्युतानंदन ने भारत की कम्युनिस्ट पार्टी (मार्क्सवादी) के संस्थापक नेताओं में से एक था। केरल राज्य में पार्टी कार्यकर्ताओं के निर्माण में वे एक प्रमुख भूमिका निभाई। उन्होंने ऐसा एक जन नेता है, जो अखंडता के लिए सम्मान। १९८५ से जुलाई २००९ तक अच्युतानंदन भारत की कम्युनिस्ट पार्टी (मार्क्सवादी) के पोलित ब्यूरो के एक सदस्य था। वे अपने वैचारिक स्वभाव के कारण जुलाई २००९ में केंद्रीय पार्टी समिति को लौट गया था। सन्दर्भ जीवित लोग 1923 में जन्मे लोग केरल के मुख्यमंत्री"} {"instruction": "Write a line of code to input 10 numbers from the user.", "input": "", "output": "a = list(map(int, input(\"Enter 10 numbers: \").split()))"} {"instruction": "Write a Python script to filter a list of text strings by removing all strings that contain a certain substring.", "input": "word_list = ['hello', 'apple', 'this', 'is', 'a', 'word']\nkeyword = 'a'", "output": "filtered_list = [x for x in word_list if keyword not in x]\n# filtered_list = ['hello', 'this', 'word']"} {"instruction": "Create a python program to evaluate an expression string and return the result.", "input": "\"10 + 2 * 5 - 3\"", "output": "def calculate(expression): \n stack = [] \n for i in expression: \n if i.isdigit(): \n stack.append(int(i)) \n else: \n val1 = stack.pop() \n val2 = stack.pop() \n if i == '+': \n result = val2 + val1 \n elif i == '-': \n result = val2 - val1 \n elif i == '*': \n result = val2 * val1 \n else: \n result = val2/val1 \n stack.append(result) \n\n return stack.pop() \n\nprint(calculate(\"10 + 2 * 5 - 3\")) # 19"} {"instruction": "Given two strings s1 and s2, find the number of times the characters in s2 are present in s1.", "input": "s1 = \"Hello World\", s2 = \"o\"", "output": "s1 = \"Hello World\" s2 = \"o\" def count_characters(s1, s2): count = 0 for c in s1: if c == s2: count += 1 return count print(count_characters(s1,s2))"} {"instruction": "Can you build an algorithm in Python that determines if a number is odd or even?", "input": "", "output": "def is_odd(number):\n if number % 2 == 0:\n return False\n else:\n return True"} {"instruction": "In Python, how could you print a list from the last element to the first element?", "input": "", "output": "for element in reversed(my_list): print(element)"} {"instruction": "Model a NoSQL database using CosmosDB", "input": "The database should store user posts, which consists of the post ID, content text, user ID and date of creation.", "output": "Azure Cosmos DB is a NoSQL database-as-a-service model that provides a schema-free data model and supports automatic indexing of all data. To model a posts database with CosmosDB, create a database and a container. Then create item in the container, each item should contain the fields \"Post ID\", \"ContentText\", \"User ID\" and \"Date of Creation\". These fields should be indexed to allow for efficient queries and retrieval of the posts data."} {"instruction": "Provide the logic for sorting an array of strings alphabetically.", "input": "", "output": "for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] > arr[j]: arr[i], arr[j] = arr[j], arr[i]"} {"instruction": "Create a class in Python containing attributes, methods and constructors", "input": "", "output": "class MyClass:\n def __init__(self, attr1, attr2):\n self.attr1 = attr1\n self.attr2 = attr2\n \n def my_method(self):\n # Do something\n pass"} {"instruction": "Generate a correct python program to format a given string s so that the output pattern is as follows", "input": "Given String: \"Hello--world--someone\"\nThe output pattern is: \"Hello world someone\".", "output": "def format_string(s):\n string_arr = s.split(\"--\")\n return ' '.join(string_arr)"} {"instruction": "Write an algorithm for sorting an array in ascending order using the Bubble Sort technique.", "input": "[3, 7, 4, 1, 9]", "output": "// Start loop for i in range(length of array): // Start inner loop for j in range(i+1, length of array): // Compare elements and swap if needed if array[i] > array[j]: temp = array[i] array[i] = array[j] array[j] = temp // End inner loop // End loop // Result: array is now sorted in ascending order [1, 3, 4, 7, 9]"} {"instruction": "Compress a string using Huffman coding in Python.", "input": "String: \"aaabbcc\"", "output": "def get_freq_list(s): # dictionaries are efficient for such a task freq_list = {} for char in s: if char in freq_list.keys(): freq_list[char] += 1 else: freq_list[char] = 1 return freq_list def create_huffman_tree(freq_list): # create a priority queue # to pop two minimum element each time priority_queue = [] for key in freq_list.keys(): node = Node(key, freq_list[key]) heapq.heappush(priority_queue, node) while len(priority_queue) > 1: left_node = heapq.heappop(priority_queue) right_node = heapq.heappop(priority_queue) new_node = Node(None, left_node.freq + right_node.freq, left_node, right_node) heapq.heappush(priority_queue, new_node) huffman_tree = heapq.heappop(priority_queue) return huffman_tree def compress_string(huffman_tree, symbols): # create a character-code dict code_dict = {} _generate_codes(huffman_tree, '', code_dict) # encode the string encoded_str = '' for char in symbols: encoded_str += code_dict[char] return encoded_str"} {"instruction": "Write a sql statement to retrieve the average salary of all employees", "input": "", "output": "SELECT AVG(salary) FROM employees"} {"instruction": "Write a function in JavaScript that counts the number of characters in a sentence.", "input": "The quick brown fox", "output": "function characterCounter(str) { return str.length; }"} {"instruction": "Generate a Python program that reads a line from the user and prints out the number of words in the line.", "input": "", "output": "def count_words():\n sentence = input(\"Please enter a sentence here: \")\n num_words = len(sentence.split())\n print(\"The sentence has\", num_words, \"words.\")\n\ncount_words()"} {"instruction": "Create a program to output the items in a list that appear only once.", "input": "list = [50, 10, 20, 30, 10, 50, 44, 55, 44]", "output": "items_set = set(list) unique_items = [] for item in items_set: if list.count(item) == 1: unique_items.append(item) print(\"Unique items:\",unique_items)"} {"text": "[DE Wikipedia] Braunes Bergschaf\n\nDas Braune Bergschaf ist eine Nutztierrasse, die von den früher in Tirol und Bayern beheimateten Steinschafen abstammt. Aus Überlieferungen von Hirten und Schäfern geht hervor, dass damals der Anteil von farbigen Steinschafen weitaus größer war als der weißen. Die Haltung der überwiegend in Gebirgsgegenden vorkommenden Braunen Bergschafrasse beschränkte sich lange Zeit auf die Alpenregionen von Österreich, Oberbayern, Südtirol und dem schweizerischen Engadin mit seinen Nebentälern. Das Lebensgewicht der Tiere wird in den Veröffentlichungen unterschiedlich angegeben: So betrage bei Altböcken 80 bis 115 kg, Jährlingsböcken 65 bis 85 kg, Mutterschafen 65 bis 85 kg und Jährlingsschafen 45 bis 60 kg, könne aber bei guter Fütterung darüber liegen. Die Arche Austria gibt das Jährlingsgewicht der Widder bei 65 kg, das der Schafe bei 55 kg an. Altwidder würden um 80 kg und Schafe um 70 kg wiegen. Die deutsche Bundesanstalt für Landwirtschaft und Ernährung nennt bei Böcken ein Gewicht von unter 100 kg und bei Schafen von 70 bis 80 kg. Gefährdung Die Gesellschaft zur Erhaltung alter und gefährdeter Haustierrassen (GEH) hat diese Rasse in die Kategorie II (stark gefährdet) der Roten Liste (Stand Januar 2022) eingestuft. Sie hat auch einen Betreuer dieser Rasse berufen. Weblinks Rassebeschreibung bei der Gesellschaft zur Erhaltung alter und gefährdeter Haustierrassen Beschreibung bei der Arche Austria – Verein zur Erhaltung seltener Nutztierrassen Braunes Bergschaf beim Österreichischen Bundesverband für Schafe und Ziegen Rasseportrait mit Foto bei vieh-ev.de Einzelnachweise Schafrasse Gefährdete Nutztierrasse"} {"instruction": "Design a Python class that represents a taxi.", "input": "", "output": "class Taxi:\n \n def __init__(self, capacity, license_number):\n self.capacity = capacity\n self.license_number = license_number\n self.passengers = []\n \n def add_passenger(self, passenger):\n if self.capacity > len(self.passengers):\n self.passengers.append(passenger)\n return True\n else:\n return False"} {"instruction": "Generate a HTML page with 3 columns using Bootstrap.", "input": "", "output": " Bootstrap Example
      "} {"instruction": "Modify the following code to compute the sum of squares of the numbers from k to n.", "input": "def sum(k, n): sum = 0 for i in range(k, n+1): sum += i return sum", "output": "def sum_squares(k, n): sum = 0 for i in range(k, n+1): sum += i**2 return sum"} {"instruction": "Create an algorithm to find the minimum number of coins required to make a given amount in python.", "input": "amount = 12", "output": "def minimum_coins_needed(amount):\n denominations = [1, 2, 5, 10]\n result = [0 for _ in range(amount+1)]\n \n # Compute the result for amount = 0\n result[0] = 0 \n \n # Iterate over all amount from 1 to desired\n for i in range(1, amount+1): \n # Initialize an inner loop to maximum value (amount)\n temp_min = float('Inf')\n for j in range(0, len(denominations)): \n # Check if coins are less than amount\n if denominations[j] <= i:\n temp_min = min(temp_min, result[i-denominations[j]])\n # Store the final result in amount's index\n result[i] = temp_min + 1\n \n return result[amount]"} {"instruction": "Write a python code to perform a three-way comparison of three numbers.", "input": "", "output": "def three_way_comparison(num1, num2, num3):\n if num1 > num2 and num1 > num3:\n return 1\n elif num2 > num1 and num2 > num3:\n return 2\n elif num3 > num1 and num3 > num2:\n return 3"} {"instruction": "Analyze a given Python code snippet and determine its type - a documentation, a code snippet, or a comment.", "input": "def f(x):\n \"\"\"A simple function\n that prints the argument\"\"\"\n print(x)", "output": "Documentation"} {"instruction": "Develop a Python algorithm to validate a given palindrome string.", "input": "\"level\"", "output": "def isPalindrome(s):\n i = 0\n j = len(s) - 1\n while i < j:\n if s[i] != s[j]:\n return False\n i += 1\n j -= 1\n return True\n \n# Driver code \ns = \"level\"\n \nif isPalindrome(s):\n print(\"Yes\")\nelse:\n print(\"No\")"} {"instruction": "Explain the process of linear search in a few sentences.", "input": "", "output": "Linear search is a technique for searching for an element in a list by repeatedly checking every element until a match is found or the end of the list is reached. It is typically implemented as a loop, where each element is compared to the search key until a match is found, or until all the elements have been searched."} {"text": "[HI Wikipedia] कमरा\n\nकमरा, कक्ष या ख़ाना किसी घर या अन्य निर्मित ढाँचे के अन्दर के ऐसे भाग को कहते हैं जो अलग विभाजित कर दिया गया हो। यह विभाजन दीवारों, पर्दों या दरवाजों से किया गया हो सकता है। आमतौर पर कमरों के ऊपर छत भी डली हुई होती है, लेकिन यह ज़रूरी नहीं है। ऐतिहासिक रूप से कमरे मिनोआई सभ्यता के २२०० ईसापूर्व में बने निर्माणों में देखे जा चुके हैं। इन्हें भी देखें घर छत सन्दर्भ कमरे वास्तु तत्व"} {"text": "[CS Wikipedia] Magdalény Rettigové\n\nUlice Magdalény Rettigové na Novém Městě v Praze je krátká neprůchodná (slepá) ulice vycházející od Lazarské ulice směrem k Purkyňově ulici. Nazvána je podle české kuchařky a spisovatelky Magdaleny Dobromily Rettigové (1785-1845). V ulici, u domu Diamant, je bezbariérový vstup do stanice metra Národní třída. Asi polovinu východní části ulice ohraničuje Pedagogická fakulta Univerzity Karlovy, která zde má svou hlavní budovu. Historie a názvy Původně byl prostor ulice součást Lazarské ulice až do roku 1930, od tohoto roku do roku 1947 nesla ulice název \"U Domácnosti\" a od roku 1947 má nový název \"Magdalény Rettigové\". Mezi lety 1254 a 1478 se na místě této ulice a v jejím okolí rozkládal rozlehlý židovský hřbitov, druhý nejstarší v Praze, Židovská zahrada, založen během vlády krále Přemysla Otakara II.. Hřbitov byl na konci 15. století zrušen zásahem Vladislava Jagellonského, jeho území bylo rozparcelováno a byly zde vystavěny měšťanské domy. Během archeologických výzkumů v letech 1997-2000 zde bylo objeveno kolem 400 hrobů. Na počátku 18. století zde byl zřízen klášter řádu Trinitářů vystavěn Kryštofem Dietzenhoferem a Johanem Georgem Aichbauerem. Součástí kláštera byl také dodnes stojící kostel Nejsvětější trojice. Posláním trinitářů bylo vykupování křesťanských zajatců z muslimských zemí. V českých zemí byli již od počátku svého působení ve velké oblibě. Klášter byl však za dob reforem Josefa II. roku 1783 zrušen a později i zbořen. Na jeho pozemcích byl mezi lety 1898-1899 zbudován secesní spolkový dům \"Domácnost\", kde byla zřízena Česká škola kuchařská. Po tomto domě ulice později dostala na krátký čas také název. V místech zdejšího městského dívčího reálného gymnázia Elišky Krásnohorské byly roku 1882, po funkcionalistické přestavbě, ustanoveny čtyři samostatné školy: česká obecná a měšťanská škola chlapecká a dívčí, německá škola obecná a odborná škola pro ženská povolání. Objekt těchto škol je nyní využíván Pedagogickou fakultou Univerzity Karlovy. Budovy, firmy a instituce Dům Diamant Magdalény Rettigové 1, Lazarská 9 Dům je umístěn na nároží ulic Spálené, Lazarské a Magdaleny Rettigové. Jedná se o projekt architekta Friedricha Ohmanna, profesora uměleckoprůmyslové školy, vystavěný roku 1913 s kubistickými prvky diamantových faset. Původní návrh však počítal s fasádami ve stylu klasicistní secese, nicméně byl návrh Emilem Králíčkem přepracován ve stejném roce, kdy započala výstavba. Stavba má obdélný půdorys rovnoběžný s Lazarskou ulicí. V úrovni prvního až třetího patra můžeme zahlédnout dva pětistranné arkýře zdobené kubizujícími pilastry, shluky krystalů a nad hlavním vchodem můžeme sledovat nápis \"Diamant\". V konstrukci jsou uplatněny železobetonové trámy a železné nosiče. Původním majitelem domu, jenž započal jeho stavbu, byl lékárník…"} {"instruction": "Generate a JavaScript function to return the average of two numbers", "input": "", "output": "function avgTwoNums(num1, num2) { const average = (num1 + num2) / 2; return average; }"} {"instruction": "Create a function in Python to group data by a column and apply aggregate functions on each group.", "input": "df = pd.DataFrame({\"A\": [\"foo\", \"foo\", \"foo\", \"foo\", \"foo\",\"bar\", \"bar\", \"bar\", \"bar\"],\n \"B\": [\"one\", \"one\", \"one\", \"two\", \"two\",\"one\", \"one\", \"two\", \"two\"],\n \"C\": [1, 2, 3, 4, 5, 6, 7, 8, 9],\n \"D\": [2, 3, 4, 5, 6, 7, 6, 8, 9]})", "output": "group_by_column = df.groupby(\"B\").agg({'C': 'sum', 'D': 'mean'})"} {"instruction": "Create a function to remove the second largest element in a given array.", "input": "arr = [5, 4, 2, 1, 3]", "output": "def remove_second_largest(arr): max_arr = max(arr) arr.remove(max_arr) return max(arr)"} {"instruction": "Implement a sorting algorithm in Python that sorts a list of strings in descending order of length.", "input": "arr = [\"Apple\", \"Banana\", \"Cat\", \"Elephant\"]", "output": "def sort_by_length(arr): \n for i in range(len(arr)):\n for j in range(i + 1, len(arr)):\n if len(arr[i]) < len(arr[j]): \n arr[i], arr[j] = arr[j], arr[i] \n return arr\n \nprint(sort_by_length(arr))"} {"instruction": "Write a function that exchanges the first and last elements of a list.", "input": "", "output": "def exchange_first_last(lst): first_item = lst[0] last_item = lst[-1] lst[0] = last_item lst[-1] = first_item return lst"} {"text": "[HI Wikipedia] हैरी पॉटर\n\nयह लेख हैरी पॉटर उपन्यास क्रम के बारे में है। हैरी पॉटर पात्र के लिए हैरी पॉटर (पात्र) देखें। हैरी पॉटर या हैरी पौटर (अंग्रेज़ी: Harry Potter) जे. के. रोलिंग द्वारा अंग्रेज़ी में रचित एक उपन्यास क्रम है। इसमें एक नई जादुई दुनिया का वर्णन है जिसमें अच्छे और बुरे जादूगर, जादू का विद्यालय, झाड़ू पर उड़ान और मिथकीय जानवर हैं। इस उपन्यास में हैरी पॉटर (इसका मुख्य किरदार) और अन्य पात्र हॉग्वार्ट्स नाम के विद्यालय में जादू पढ़ते हैं और नये रोमांचक कारनामों का सामना करते हैं। इन उपन्यासों पर इन्हीं नामों की ७ हॉलिवुड फ़िल्में भी बन चुकी हैं। उपन्यासों के हिन्दी संस्करण भी उपलब्ध हैं। सारी कहानी ब्रिटेन देश में घटित होती है और सब काल्पनिक है। ये उपन्यास इक्कीसवीं सदी का शायद सबसे मशहूर उपन्यास है। १९९७ मे जे. के. रोलिंग द्वारा लिखी गई ये काल्पनिक कथा है| जिस पर २००१मे हॅरी पॉटर नामक मूव्ही बनाई गई| कहानी इस उपन्यास शृंखला की कहानी हैरी पॉटर नाम के किशोर (बालक) के इर्द-गिर्द घूमती है, जो अनाथ है। बचपन में हैरी को ये नहीं पता था कि वो एक जादूगर है। जब उसे पता चलता है कि वो एक जादूगर है, तो वो तन्त्र-मन्त्र और जादू-टोने के विद्यालय हॉग्वार्ट्स में दाख़िला ले लेता है। इस तरह शुरू होती है हैरी और उसके दोस्तों (हर्माइनी ग्रेंजर और रॉन वीज़्ली) की रोमांचक ज़िन्दगी। कई बार उन्हें उनके ख़ूंख़ार दुश्मन दुष्ट और आतंकवादी जादूगर लॉर्ड वोल्डेमॉर्ट का सामना करना पड़ता है। कहानी में अच्छा और बुरा जादू हर जगह मिलता है। मुख्य पात्र हैरी पॉटर हैरी पॉटर कहानी का मुख्य पात्र है। हैरी पॉटर एक किशोर बालक है, जिसके माँ-बाप, लिली एवं जेम्स पॉटर को एक दुष्ट जादूगर, लॉर्ड वोल्डेमोर्ट ने मार डाला था। हैरी पॉटर जादूगरों की दुनिया में काफ़ी मशहूर है और हैरी का नाम हर कोई जानता है, क्योंकि वही एकमात्र इनसान है जो कि मृत्युदंशम् शाप (अवाडा कडाव्रा) से बचा है। कहानी के अनुसार हैरी अत्यंत बुद्धिमान नहीं है। हैरी की छड़ी में लॉर्ड वोल्डेमोर्ट की छड़ी वाला फ़ीनिक्स का पंख है। हैरी का एक पालतू पक्षी भी है, जिसका नाम हेडविग है और वो एक उल्लू है। हैरी गरुड़द्वार का है। हैरी को सेवरस स्नेप एवं ड्रेको मेल्फॉय बिल्कुल पसंद नहीं है। हैरी के कई मित्र है जिनमे रॉन, हर्माईनी, नेविल, सीमस एवं फ़्रेड-जोर्ज शामिल है। हर्माइनी ग्रेंजर हरमाईनी हरमॉयनी या हरमायनी से भी पुकारा जाता है। हर्माइनी ग्रेंजर हॉग्वर्ट्स की सबसे बुद्धिमान छात्रा है। हर्माइनी एक मगलू परिवार से है और हर्माइनी हैरी और रॉन की सबसे अच्छी दोस्त है। हैरी और रॉन जब भी मुसीबत में होते है, तो हर्माइनी उनकी मदद करती है। सभी अध्यापक हर्माइनी को पसंद करते है। हर्माइनी को भी प्रो. स्नेप अच्छे नहीं लगते। हर्माइनी ड्रेको को एक दुष्ट और घमंडी लड़का मानती है। हर्माइनी की एक पालतू बिल्ली है जिसका नाम क्रुक-शैंक्स है। हर्माइनी के कई दोस्त है जिनमें हैरी, रॉन, जिनी, नेविल आदि शामिल है। रॉन वीज़्ली रॉनल्ड वीज़्ली या सिर्फ़ रॉन कहानी का तीसरा मुख्य पात्र है। रॉन ख़ानदानी शुद्ध-ख़ून है। रॉन आर्थर विज़्ली एवं मॉली विज़्ली का छ्ठा बेटा है। रॉन के 5 भाई (चार्ली, बिल, पर्सी, फ़्रेड, जोर्ज) और एक बहिन (जिनी) है। रॉन थोड़ा डरपोक है और पढ़ाई में कमज़ोर है। रॉन…"} {"instruction": "In Ruby, write a method to find the sum of two numbers from the given string.", "input": "String: “The sum of 4 and 8 is 12”", "output": "def sum_from_string(str) array = str.scan(/\\d+/).map(&:to_i) sum = array[0] + array[1] return sum end sum_from_string(\"The sum of 4 and 8 is 12\") # Output: 12"} {"instruction": "Write a CSS rule to set the text color of a page to red", "input": "", "output": "body { color: red; }"} {"text": "[CS Wikipedia] Seznam dílů seriálu Smrtonosná zbraň\n\nToto je seznam dílů seriálu Smrtonosná zbraň. Dne 10. května 2019 byl seriál stanicí Fox po třech řadách zrušen. Přehled řad Seznam dílů První řada (2016–2017) Druhá řada (2017–2018) Třetí řada (2018–2019) Reference Externí odkazy Smrtonosná zbraň"} {"instruction": "Write a JavaScript code to compare the values of two strings", "input": "", "output": "if (string1 === string2) { console.log(\"The strings are equal.\") } else { console.log(\"The strings are not equal.\") }"} {"instruction": "Create a Python program to print out the elements of a list in reverse order.", "input": "mylist = [1, 2, 3, 4, 5]", "output": "# Creating a new reversed list\nreversed_list = mylist[::-1]\n\n# Iterating through the list and printing each element\nfor num in reversed_list:\n print(num)"} {"instruction": "Create a basic Python game that allows a user to guess a number from 1 to 10. The game should display appropriate messages based on the player's input.", "input": "Not applicable", "output": "# Game script\nimport random\n\n# Welcome message\nprint(\"Welcome to the guessing game!\")\n\n# Generate a random number\ntarget_number = random.randint(1, 10)\n\n# Initialise variables and flags\nguessed = False\nattempts = 0\n\nwhile not guessed:\n attempts += 1\n guess = int(input(\"Guess a number (1-10): \"))\n\n if guess < target_number:\n print(\"That's too low. Try again!\")\n elif guess > target_number:\n print(\"That's too high. Try again!\")\n else:\n guessed = True\n\n# Congratulations message\nif guessed:\n print(\"Congratulations! You guessed the number in {} attempts\".format(attempts))"} {"instruction": "Write a Python program to create a tree structure in JSON for given input data.", "input": "{\"name\": \"root\", \"children\": [{\"name\": \"a\", \"children\": [{\"name\": \"b\", \"children\": []}]}]}", "output": "import json\n\ndata = {\n 'name': 'root',\n 'children': [\n {\n 'name': 'a',\n 'children': [\n {\n 'name': 'b',\n 'children': []\n }\n ]\n }\n ]\n}\n\njson_string = json.dumps(data, indent=4)\nprint(json_string)\n\n# output\n{\n \"name\": \"root\",\n \"children\": [\n {\n \"name\": \"a\",\n \"children\": [\n {\n \"name\": \"b\",\n \"children\": []\n }\n ]\n }\n ]\n}"} {"text": "[HI Wikipedia] लाग्रांजीय यांत्रिकी\n\nलाग्रांजीय यांत्रिकी अथवा लाग्रांजियन यांत्रिकी स्थिर प्रक्रिया द्वारा हेमिल्टन विधि द्वारा चिरसम्मत यांत्रिकी का एक पुनःसूत्रिकरण है। वैचारिक ढांचा व्यापकीकृत निर्देशांक अवधारणा एवं शब्दावली यदि किसी कण पर बाह्य बल कार्य करते हैं तो न्यूटन के गति के नियमानुसार तीनों विमाओं के लिए तीन साधारण द्विघात अवकल समीकरण प्राप्त होंगी। अतः कण की पूर्ण अवस्था का वर्णन करने के लिए ६ स्वतंत्र चर (तीन प्रारम्भिक निर्देशांक और तीन वेग) प्रर्याप्त हैं। सन्दर्भ"} {"instruction": "What is the definition of polymorphism in programming?", "input": "", "output": "Polymorphism in programming is a principle allowing the same code to be used for objects of different types, or for a given object to behave differently in different contexts. Polymorphism is an essential element of object-oriented programming, as it allows for code reusability, among other benefits. Polymorphism is achieved in programming by using inheritance and abstraction, along with virtual functions and templates. Examples of polymorphism include the various forms of overloading and overriding, and type punning."} {"text": "[EN Wikipedia] Rancho Los Alamos\n\nRancho Los Álamos was a Mexican land grant in present-day Santa Barbara County, California given in 1839 by Governor Juan Alvarado to José Antonio de la Guerra, a son of José de la Guerra y Noriega. Los Álamos is Spanish for \"the cottonwoods\" and describes Frémont's Cottonwood (Populus fremontii) trees lining the banks of the San Antonio Creek. History In 1839, during Mexico's rule of Alta California, José Antonio de la Guerra was granted title to Rancho Los Álamos in the Los Alamos Valley. Concepción Ortega, who married José de la Guerra, came to live at the adobe ranch house. With the cession of California to the United States following the Mexican–American War, the 1848 Treaty of Guadalupe Hidalgo provided that the land grants would be honored. As required by the Land Act of 1851, a claim for Rancho Los Álamos was filed with the Public Land Commission in 1852, and the land grant was patented to de la Guerra in 1872. In 1876, San Francisco financier Thomas Bell along with his son John S. Bell, and James B. Shaw, purchased acreage from Rancho Los Álamos and the neighboring Rancho La Laguna. Both families allocated a half square mile from each of their new ranches to create the Los Alamos town site with \"Centennial Street\" as the central thoroughfare. Historic sites of the Rancho Los Alamos Ranch House. A one story adobe ranch house established about 1840 and designated a National Historic Landmark in 1970. See also Ranchos of California List of Ranchos of California References External links Ranchos of Santa Barbara County Map Alamos, Los Los Alamos"} {"text": "[DE Wikipedia] Abbas-Ali Soleimani\n\nAbbas-Ali Soleimani (; * 25. Mai 1947 In Savādkuh, Mazandaran, Iran; gest. 26. April 2023 in Bābolsar, Mazandaran, Iran) war ein schiitischer Geistlicher aus dem Iran und auch ein Ayatollah. Er war Mitglied des Expertenrats. Leben Am 25. Mai 1947 kam Soleimani in einer religiösen Familie zur Welt. Bereits im Alter von 5 Jahren begann er seine Ausbildung in Kuttab und setzte ab seinem 12. Lebensjahr sein Studium an einer Hawza in Ghom und später in Behschahr fort. Später führte er seine religiöse Ausbildung in Maschhad weiter. Im Laufe seiner Karriere wurde Soleimani zum Vertreter von Welāyat-e Faqih und zum Imam des Freitagsgebets in der Stadt Kaschan ernannt. Er war auch Mitglied des Expertenrats. Am 26. April 2023 wurde Soleimani in der Provinz Mazandaran erschossen. Zu diesem Zeitpunkt war er 75 Jahre alt. Einzelnachweise Ajatollah Geboren 1947 Gestorben 2023 Mann"} {"instruction": "Create a Swift function for checking if a number is even or odd.", "input": "", "output": "func isEven(num: Int) -> Bool { return (num % 2) == 0 }"} {"text": "[HI Wikipedia] कालामी भाषा\n\nकालामी को गावरी भाषा भी कहते हैं - इस से भिन्न गोवरो भाषा के लिए गोवरो भाषा का पन्ना देखिये कालामी (Kalami, ), जिसे कालाम कोहिस्तानी या गावरी (Gawri, ) भी कहते हैं, कोहिस्तानी शाखा की एक दार्दी भाषा है जो पाकिस्तान के ख़ैबर​-पख़्तूनख़्वा प्रान्त के कोहिस्तान ज़िले बोली जाती है। श्रेणीकरण कालामी दार्दी भाषाओं की कोहिस्तानी उपपरिवार की एक भाषा है और उस उपपरिवार की अन्य भाषाओं से मिलती-जुलती है, जिसमें तोरवाली, कल्कोती, सिन्धु-कोहिस्तानी, बटेरी, चिलिस्सो, गोवरो, वोटापुरी-कतरगलई और तिराही शामिल हैं। सुर पंजाबी, डोगरी और कई दार्दी भाषाओं की तरह कालामी एक सुरभेदी भाषा है। इसमें पांच सुर प्रयोग होते हैं - ऊँचा, गिरता, रूककर गिरता, नीचा और उठता। सन्दर्भ हिन्द-आर्य भाषाएँ दार्दी भाषाएँ पाकिस्तान की भाषाएँ सुरभेदी भाषाएँ"} {"instruction": "Write a Python program to remove the duplicates from a given list of numbers while preserving the order of elements.", "input": "[1, 2, 3, 2, 1]", "output": "def remove_duplicates(lst):\n new_list = []\n for i in lst:\n if i not in new_list:\n new_list.append(i)\n return new_list\n\nprint(remove_duplicates([1, 2, 3, 2, 1]))"} {"instruction": "Format the output of a number to contain comma-separated thousands.", "input": "num = 323456789", "output": "# Format the output of a number to contain comma-separated thousands def format_number(num): return '{:,}'.format(num) # Get the formatted output print(format_number(323456789)) # Output: 323,456,789"} {"instruction": "Write a Python program to calculate the letter grade of a given numerical grade.", "input": "", "output": "def calculate_grade(score):\n if score >= 90:\n return \"A\"\n elif score >= 80:\n return \"B\"\n elif score >= 70:\n return \"C\"\n elif score >= 60:\n return \"D\"\n else:\n return \"F\"\n\nresult = calculate_grade(90)\nprint(result)"} {"text": "[EN Wikipedia] Ready reckoner\n\nA ready reckoner is a printed book or table containing pre-calculated values, often multiples of given amounts. They were widely used in shops and by tradesmen before the advent of cheap electronic calculators, metric weights and measures and decimal currencies in the 1970s. Background Prior to the 1960s and the widespread introduction of calculators, multiplication was a laborious chore, often prone to error. This was especially so when calculations involved non-decimal currencies. Various devices were invented to aid this process, such as the abacus, log tables, slide rule, stepped reckoner, or the comptometer, but the most commonly used device for everyday commerce was the ready reckoner. These could be either general-purpose – aimed to meet the needs of a variety of trades – or designed specifically for one trade or group of trades. History The earliest surviving ready reckoner in English dates from the 1570s; other sources attribute the invention to the Dutch mathematician Simon Stevin, who calculated and published decimal tables in the 1580s. William Webster published A plaine and most necessarie booke of tables, for simple and compound interest, in 1625. There are several other seventeenth-century publications giving 'reckonings ready done' or 'accounts ready cast up' or tables of simple and compound interest. The most popular of these was William Leybourn's, Panarithmologia, being a mirror breviate treasure mate for merchants, bankers, tradesmen, mechanicks, and a sure guide for purchasers, sellers, or mortgagers of land, leases, annuities, rents, pensions, &c. in present possession or reversion. (1693). Other works were published in France such as François Barrême’s Le Livre des Comptes Faits. Paris: Thierry, which appeared in 1673, and was still being published in 1862. The term 'ready reckoner' was coined by the schoolmaster Daniel Fenning with the publication of The ready reckoner; or trader's most useful assistant in 1757. This was a modernised and extended version of Leybourn's work, which was reprinted in Boston, Massachusetts, about 1770, and translated into German in Germantown, Philadelphia, 1774. Fenning's work continued to be reprinted in England until the early 1820s when several of the tables were superseded by the advent Imperial Weights and Measures under the Weights and Measures Act 1824. By the end of the eighteenth century, ready reckoners designed for the needs of particular trades or types of business began to appear. Thus The gentleman and farmers' assistant, by John Cullyer (1795) or The farmer's, grazier's, and butcher's ready reckoner (1796). Hundreds of ready reckoners appeared, principally in the UK and US throughout the nineteenth century and the first half of the twentieth century, as they proved to be cheaper to…"} {"instruction": "Create a function that adds two inputs of type integers and returns the sum.", "input": "a = 8 b = 3", "output": "def add(a, b): return a + b"} {"instruction": "Design an algorithm in Python that sorts an unordered list of three numbers in increasing order.", "input": "List = [3, 1, 2]", "output": "def sort_list(input_list):\n output_list = []\n while input_list:\n smallest = input_list[0]\n for i in input_list:\n if i < smallest:\n smallest = i\n output_list.append(smallest)\n input_list.remove(smallest)\n return output_list"} {"text": "[HI Wikipedia] रगडगंज\n\nरगड्गंज बाज़ार जिला गोण्डा से 18 किलोमीटर दूर स्थित है। यहां पर अनेक जाति एवम धर्म के लोग निवास करते है। इनके अन्दर काफी मेल जोल रहता है। यहां से 14 किलोमीटर दक्खिन दिशा की ओर बहुत ही विशालतम देव स्थान है। जो कि उत्तरी भवानी के नाम से प्रसिद्ध है।"} {"text": "[HI Wikipedia] कृपानिवास\n\nकृपानिवास रसिक रामोपासना के एक प्रमुख आचार्य। इनका जन्म १७५० ई. के आसपास दक्षिण भारत में हुआ था। इनके पिता का नाम सीतानिवास तथा माता का गुणशीला था। वे श्री रंग के उपासक थे। उन्होंने इन्हें बचपन ही में रामानुजीय वैष्णव संत आनंद विलास से दीक्षा दिलाई। पंद्रह वर्ष की अवस्था में इन्हें संसार से विरक्ति हुई और वे घर त्याग कर मिथिला चले आए और रसिक भावना का आश्रय लिया। चारों धाम की पैदल यात्रा करते हुए अग्रदास के आचार्य पीठ रेवासा (जयपुर) गए। वहाँ से अयोध्या आए और कुछ दिनों वहाँ रहे। वहाँ से वे उज्जैन गए और वहांम् कुछ काल तक रहे। तदनंतर वे चित्रकूट आए ओर शेष जीवन वहीं व्यतीत किया। चित्रकूट में ही स्फटिक शिला के पास उनका देहावसान हुआ। युगलप्रिया के अनुसार उन्होंने लगभग एक लाख छंदों की रचना की थी किंतु इनके जो ग्रंथ उपलब्ध हैं उनमें पच्चीस हजार से अधिक छंद नहीं हैं। उनके लिखे समस्त ग्रंथ सांप्रदायिक सिद्धांत निरूपण की दृष्टि से लिखे गए है। कुछ रचनाएँ भावनात्मक भी हैं जो विभिन्न राग-रागिनियों में गेय हैं। भक्तकवि"} {"instruction": "Rewrite the following Python program to sort the numbers in an array in ascending order.", "input": "list = [5, 1, 0, 4, 7]", "output": "def sort(list): for i in range(len(list)-1): for j in range(0, len(list)-i-1): if list[j] > list[j+1] : list[j], list[j+1] = list[j+1], list[j] list = [5, 1, 0, 4, 7] sort(list) print (\"Sorted list is:\") print(list)"} {"instruction": "Design a Python class to represent a user with fields name and age.", "input": "", "output": "class User: def __init__(self, name, age): self.name = name self.age = age def get_name(self): return self.name def get_age(self): return self.age"} {"instruction": "Design a data structure in Python for a deck of cards.", "input": "", "output": "class Card:\n suits = (\"Hearts\", \"Diamonds\", \"Spades\", \"Clubs\")\n values = (\"A\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \n \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\")\n \n def __init__(self, suit, value):\n self.suit = suit\n self.value = value\n \n def __repr__(self):\n return f\"{self.value} of {self.suit}\"\n\nclass Deck:\n def __init__(self):\n self.cards = [Card(suit, value) for suit in Card.suits\n for value in Card.values]\n \n def __repr__(self):\n return f\"Deck of {self.count()} cards\"\n \n def count(self):\n return len(self.cards)\n \n def _deal(self, num):\n count = self.count()\n actual = min([count,num])\n if count == 0:\n raise ValueError(\"All cards have been dealt\")\n else:\n cards = self.cards[-actual:]\n self.cards = self.cards[:-actual]\n return cards\n \n def deal_card(self):\n return self._deal(1)[0]\n \n def deal_hand(self, hand_size):\n return self._deal(hand_size)"} {"instruction": "Develop a python program automate the process of generating a list of random numbers between 1 to 100.", "input": "", "output": "import random\n\ndef generate_random_nums(n,min_val,max_val):\n output = []\n for i in range(n):\n output.append(random.randint(min_val,max_val))\n return output\n\nif __name__ == '__main__':\n n = 10\n min_val = 1\n max_val = 100\n print(generate_random_nums(n,min_val,max_val))"} {"text": "[EN Wikipedia] Amorbia emigratella\n\nAmorbia emigratella, the Mexican leaf-roller, is a moth of the family Tortricidae. Although it was described from Hawaii (where it is found on Kauai, Oahu, Molokai, Maui and Hawaii), it is known to be a native of the southern United States, Mexico and Central America. It was first described by August Busck in 1910. The length of the forewings is 8–11 mm for males and 11.5–12 mm for females. Adults are pale yellow to brown and may be variably mottled with dark brown. There are multiple generations per year. The larvae have been recorded on a wide range of plants, including Acacia koaia, Arachis hypogaea, Brassaia, Brassica oleracea, Carica papaya, Cassia leschenaltiana, Citrus sinensis, Dodonaea viscosa, Dracaena, Gardenia, Gliricidia septum, Gossypium, Ipomoea batatas, Lycopersicon esculentum, Macadamia, Orchidaceae, Passiflora, Persea americana, Phais, Phaseolus, Pipturus, Psidium guajava, Rosa, Rubus, Rubus hawaiiensis, Solanum melongena, Solanum tuberosum, Sophora, Theobroma cacao, Ulex europaeus, Wikstroemia foetida and Zea mays. They are leaf-rollers and are often so numerous as to defoliate the trees. They are known to attack the fruit of some plants or web together leaves as well. The larvae are yellowish green and may have dark lateral lines. Pupation takes place within the folded leaf. The pupa is 9–12 mm long and dark brown to golden brown. The pupal stage takes about 10 days. References External links Fact Sheet Moths described in 1910 Sparganothini Moths of North America"} {"instruction": "Create a Python program which performs basic math operations on user input numbers and prints the result.", "input": "Not applicable", "output": "# Function to add two numbers\ndef add(x, y):\n return x + y\n\n# Function to subtract two numbers\ndef subtract(x, y):\n return x - y\n\n# Function to multiply two numbers\ndef multiply(x, y):\n return x * y\n\n# Function to divide two numbers\ndef divide(x, y):\n return x / y\n\n# Take inputs from the user\nnum1 = int(input(\"Enter first number: \"))\nnum2 = int(input(\"Enter second number: \"))\n\n# Add the two numbers\nsum = add(num1, num2)\n\n# Subtract the two numbers\nsub = subtract(num1, num2)\n\n# Multiply the two numbers\nmul = multiply(num1, num2)\n\n# Divide the two numbers\ndiv = divide(num1, num2)\n\n# Print the results\nprint(\"Sum: {0} \\nSub: {1} \\nMul: {2} \\nDiv: {3}\".format(sum, sub, mul, div))"} {"instruction": "Generate a Python code to implement the classic Tower of Hanoi problem.", "input": "", "output": "def tower_of_hanoi(n, from_rod, to_rod, aux_rod): \n if n == 1: \n print(\"Move disk 1 from rod\",from_rod,\"to rod\",to_rod) \n return\n tower_of_hanoi(n-1, from_rod, aux_rod, to_rod) \n print(\"Move disk\",n,\"from rod\",from_rod,\"to rod\",to_rod) \n tower_of_hanoi(n-1, aux_rod, to_rod, from_rod)"} {"instruction": "Generate a Python function to print the Fibonacci series up to a given number.", "input": "", "output": "def print_fibonacci(num): \n a = 0\n b = 1\n print(a, end =' ') \n print(b, end =' ') \n for i in range(2,num): \n c = a + b \n a = b \n b = c \n print(c, end =' ')"} {"instruction": "Can you retrieve the item at index 3 from the following array?", "input": "int[] arr = {11, 30, 45, 19, 20, 60};", "output": "int itemAtIndex3 = arr[3]; // itemAtIndex3 is equal to 19"} {"instruction": "Write a Python script to find the area of a triangle when three sides are given.", "input": "a = 3\nb = 4\nc = 5", "output": "# calculate the semi-perimeter\ns = ( a + b + c ) / 2\n \n# calculate the area\narea = (s*(s-a)*(s-b)*(s-c)) ** 0.5\n \nprint('The area of the triangle is %0.2f' %area)\n// Output: The area of the triangle is 6.00"} {"text": "[EN Wikipedia] August 27\n\nEvents Pre-1600 410 – The sacking of Rome by the Visigoths ends after three days. 1172 – Henry the Young King and Margaret of France are crowned junior king and queen of England. 1232 – Shikken Hojo Yasutoki of the Kamakura shogunate promulgates the Goseibai Shikimoku, the first Japanese legal code governing the samurai class. 1557 – The Battle of St. Quentin results in Emmanuel Philibert becoming Duke of Savoy. 1593 – Pierre Barrière failed an attempt to assassinate Henry IV of France. 1597 – Jeongyu War: Battle of Chilcheollyang: A Japanese fleet of 500 ships destroys Joseon commander Won Gyun’s fleet of 200 ships at Chilcheollyang. 1600 – Ishida Mitsunari’s Western Army commences the Siege of Fushimi Castle, which is lightly defended by a much smaller Tokugawa garrison led by Torii Mototada. 1601–1900 1689 – The Treaty of Nerchinsk is signed by Russia and the Qing Empire (Julian calendar). 1776 – American Revolutionary War: Members of the 1st Maryland Regiment repeatedly charged a numerically superior British force during the Battle of Long Island, allowing General Washington and the rest of the American troops to escape. 1791 – French Revolution: Frederick William II of Prussia and Leopold II, Holy Roman Emperor, issue the Declaration of Pillnitz, declaring the joint support of the Holy Roman Empire and Prussia for the French monarchy, agitating the French revolutionaries and contributing to the outbreak of the War of the First Coalition. 1793 – French Revolutionary Wars: The city of Toulon revolts against the French Republic and admits the British and Spanish fleets to seize its port, leading to the Siege of Toulon by French Revolutionary forces. 1798 – Wolfe Tone's United Irish and French forces clash with the British Army in the Battle of Castlebar, part of the Irish Rebellion of 1798, resulting in the creation of the French puppet Republic of Connacht. 1810 – Napoleonic Wars: The French Navy defeats the British Royal Navy, preventing them from taking the harbour of Grand Port on Île de France. 1813 – French Emperor Napoleon I defeats a larger force of Austrians, Russians, and Prussians at the Battle of Dresden. 1828 – Brazil and Argentina recognize the sovereignty of Uruguay in the Treaty of Montevideo 1832 – Black Hawk, leader of the Sauk tribe of Native Americans, surrenders to U.S. authorities, ending the Black Hawk War. 1859 – Petroleum is discovered in Titusville, Pennsylvania, leading to the world's first commercially successful oil well. 1881 – The Georgia hurricane makes landfall near Savannah, Georgia, resulting in an estimated 700 deaths. 1883 – Eruption of Krakatoa: Four enormous explosions almost completely destroy the island of Krakatoa and cause years of climate change. 1893 – The Sea Islands hurricane strikes the United States…"} {"instruction": "Name a specific package that can be used to implement a REST API in Node.js", "input": "", "output": "The Express.js package can be used to implement a REST API in Node.js."} {"text": "[CS Wikipedia] Bílkova (Praha)\n\nBílkova ulice v dnešní podobě vznikla po asanaci Židovského města v roce 1893 spojením 3 částí ulic. Západní část se jmenovala “Masařská“ podle zdejších (židovských) masných krámů. Prostřední část ulice se jmenovala “Scheplesova“ podle zdejších lázní pana Scheplesa. Východní část ulice se jmenovala od roku 1400 V cípu nebo Ve dvorci (Přesný záznam nebyl dochován) a byla patrně lepá. Historie a názvy Lokalita ulice byla původně rozdělena: západní část se nazývala \"Masařská\" podle masných krámů střední část se nazývala \"Scheplsova\" podle lázní pana Scheplesa východní část se nazývala \"V cípu\" nebo \"Ve dvorci\". Od 15. století až do roku 1840 se jmenovala Bílkova, v letech 1840-1870 “Malá křížová“ a od roku 1870 až do současnosti se jmenuje opět Bílkova. Bílkova se jmenovala podle rozlehlého dvoru u Bílků Budovy, firmy a instituce Galerie la femme - Bílkova 2 italská restaurace a pizzeria Pepenero - Bílkova 4 restaurace Baterka - Bílkova 5 pekárna Mansson bakery - Bílkova 8 hotel YouResidence - Bílkova 11 Dinitz, první košer restaurace v Praze - Bílkova 12 Odkazy Externí odkazy Reference Literatura •LAŠŤOVKA, Marek. Pražský uličník: encyklopedie názvů pražských veřejných prostranství. Praha: Libri, 1997. . Bílkova Bílkova Ulice na Starém Městě (Praha)"} {"instruction": "Create a function to calculate the maximum of two numbers.", "input": "", "output": "def max_of_two(x, y): if x > y: return x else: return y"} {"text": "[HI Wikipedia] पर्माफ़्रोस्ट\n\nभूविज्ञान में स्थायीतुषार या पर्माफ़्रोस्ट (permafrost) ऐसी धरती को बोलते हैं जिसमें मिट्टी लगातार कम-से-कम दो वर्षों तक पानी जमने के तापमान (यानि शुन्य सेंटीग्रेड) से कम तापमान पर रही हो। इस प्रकार की धरती में मौजूद पानी अक्सर मिटटी के साथ मिलकर उसे इतनी सख़्ती से जमा देता है कि मिटटी भी सीमेंट या पत्थर जैसी कठोर हो जाती है। पर्माफ़्रोस्ट वाले स्थान अधिकतर पृथ्वी के ध्रुवों के पास ही होते हैं (जैसे कि साइबेरिया, ग्रीनलैंड व अलास्का), हालांकि कुछ ऊँचे पहाड़ी क्षेत्रों (जैसे कि तिब्बत व लद्दाख़) में भी जहाँ-तहाँ पर्माफ़्रोस्ट मिलता है। पर्माफ़्रोस्ट में खुदाई करना पत्थर तोड़ने की तरह होता है और इसके लिए अक्सर भारी औज़ारों की ज़रुरत होती है। इमारत निर्माण पर्माफ़्रोस्ट वाले क्षेत्रों में इमारतों को खड़ा करने में काफ़ी कठिनाई होती है क्योंकि इन इमारतों की गर्मी से पर्माफ़्रोस्ट समय के साथ पिघलता है और इमारत की बुनियाद कमज़ोर पड़ जाती है। इस कारण से या तो इमारत के नीचे गहरे खम्बे गाड़कर उसे स्थिर करने की आवश्यकता होती है यह फिर नीचे के पर्माफ़्रोस्ट को इमारत की गर्मी से बचाने की ज़रुरत होती है। नक़्शेदार धरती पर्माफ़्रोस्ट वाले इलाक़ों में धरती जमने से उसमें तरह-तरह के ज्यामितीय डिज़ाइन बन जाते हैं। मंगल ग्रह पर भी पर्माफ़्रोस्ट होता है और वहाँ भी ऐसी नक़्शेवाली धरती दिखती है। पर्माफ़्रोस्ट में जमे हुए जीवों का पुनःजीविकरण सन् 2012 में कुछ रूसी वैज्ञानिकों ने साइबेरिया की पर्माफ़्रोस्ट में पिछले 30,000 वर्षों से अधिक से जमे हुए सिलीन स्टेनोफ़ाइला नामक एक पौधे के कुछ अंशों से उस पौधे को दुबारा जीवित कर दिया। उन्होंने अपने अनुसन्धान-प्रस्तुति में कहा कि इसपर अब फूल आ रहे हैं और यह उपजाऊ बीज भी बना रहा है। इस से उनका दावा है कि जीवों के अंश बर्फ़ में जमाने से दसियों हज़ारों साल तक सुरक्षित रहने की सम्भावना रखते हैं। इन्हें भी देखें बर्फ़ सन्दर्भ भूविज्ञान पर्वतीय पारिस्थितिकी"} {"instruction": "How can you sort a list of strings lexicographically in C++?", "input": "", "output": "We can use the sort() method from the algorithm library to sort a list of strings lexicographically in C++. The syntax for this method is as follows: sort(listOfStrings.begin(), listOfStrings.end());"} {"instruction": "Implement a basic calculator that can compute simple math expressions.", "input": "9 * 2", "output": "def calculate(expr): return eval(expr)"} {"instruction": "Given a two dimensional array, write a Python program to print the second diagonal of the array.", "input": "my_array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "my_array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] # A function to print second diagonal of # given array def print_second_diagonal(arr): # Find length of given array n = len(arr) # Traverse second diagonal for i in range(0, n): print(arr[i][n-1-i], end = \" \") # Driver code print_second_diagonal(my_array) # Output: 3 6 9"} {"text": "[EN Wikipedia] Cēsu Alus\n\nCēsu Alus is a brewery and alcohol beverage producer in Cēsis, Latvia. As the roots of the brewery dates back in 1590, Cēsu Alus is considered to be the oldest brewery in Baltic and Nordic countries. Cēsu alus is the largest brewery producing beer in Latvia. In year 2018 Cēsu alus produced 64% of all beer produced in Latvia. History In 1590 brewing of beer is referred for the first time in the Cēsis Castle audit. The first brewery was located in the castle itself. In the first half of 17th century the brewery was relocated to the third forecastle. In 1878 the historic brewery buildings were built and the brewery was established in the ownership of count Emanuel von Sievers. In 1922 several entrepreneurs from Cēsis repurchased the brewery from Sievers and established the joint-stock company Augļu dārzs (). In 1940 SC Augļu dārzs was nationalised. In 1976 Industrial beer producer Cēsu Alus was established which also incorporated breweries in Naukšēni and Gulbene. In 1995 Cēsu Alus was privatised and once again became a joint stock company. In 1999 Cēsu Alus was bought by the Finnish beer and non-alcoholic drinks producer Olvi. In July 2001 the new brewery plant was opened in Cēsis with a filling capacity of 20 million litres of beer. In 2003 Cēsu Alus became the second largest beer producer in Latvia, and in year 2014 - Cēsu alus became the largest brewery producing beer in Latvia. JSC Cēsu alus participates in the evaluation of the Sustainability Index since its introduction in Latvia in 2010. In the first three years, JSC Cēsu alus received a Silver rating, but with a purposeful development of the company's operations and sustainability performance, from 2013 onwards, the company's performance in the Sustainability Index was awarded with a Gold level certificate, and from 2017 with the highest – Platinum level. See also Bauskas alus Užavas Alus References Beer in Latvia Beer brands Latvian brands Food and drink companies of Latvia Manufacturing companies of Latvia Companies based in Cēsis Companies established in 1995 Breweries in Latvia"} {"instruction": "Could you create a function in Python for reaching an element in a given list with a specific index?", "input": "[2, 3, 5, 7, 11], index = 3", "output": "def get_element(lst, index):\n return lst[index]"} {"instruction": "Using a switch-case statement, calculate the grade for the student using the percentage in the input.", "input": "Student percentage: 80", "output": "switch(percentage) { case (percentage >= 90): grade = 'A'; break; case (percentage >= 80): grade = 'B'; break; case (percentage >= 70): grade = 'C'; break; case (percentage >= 60): grade = 'D'; break; case (percentage < 60): grade = 'F'; break; default: grade = 'Invalid'; break; }"} {"instruction": "Write a code in Ruby to convert an array of integers into a string.", "input": "The given array is [1,2,3,4,5].", "output": "def convert_integers_to_string(array) array.map(&:to_s).join(', ') end array = [1,2,3,4,5] puts convert_integers_to_string(array)"} {"instruction": "Create an HTML form that asks for the user's name and age.", "input": "", "output": "

      "} {"instruction": "Fill in the blanks of the following Python code to implement a Selection Sort algorithm.", "input": "def selection_sort(arr): for [i] in [range](len(arr),1,-1): max_element=arr[0] for [j] in [range]([i]): if arr[j] > max_element : max_element=arr[j] [temp] = arr[i] arr[i] = max_element arr[arr.index(max_element)] = [temp]", "output": "def selection_sort(arr): for i in range(len(arr),1,-1): max_element=arr[0] for j in range(i): if arr[j] > max_element : max_element=arr[j] temp = arr[i-1] arr[i-1] = max_element arr[arr.index(max_element)] = temp"} {"instruction": "Write a python program to generate a Combinations of four numbers from a given list of N numbers", "input": "numbers = [1, 4, 5, 6, 7]", "output": "def comb_four(nums): \n result = [] \n for i in range(len(nums)-3): \n for j in range(i+1, len(nums)-2): \n for k in range(j+1, len(nums)-1):\n for l in range(k+1, len(nums)): \n result.append([nums[i], nums[j], nums[k], nums[l]]) \n return result"} {"text": "[CS Wikipedia] Arup\n\nArup Group Limited je britská nadnárodní inženýrská společnost, která vznikla v roce 1946 v Londýně, kde stále sídlí. Arup provádí plánování, řízení projektů a konzultování ve stavebním průmyslu a řešení různých aspektů vytvořeného prostředí jako udržitelnost a zmírňování změny klimatu. Arup má přes 13 tisíc zaměstnanců v 35 zemích a je to zaměstnanci vlastněná společnost. Reference Externí odkazy Architektonické firmy Firmy ve stavebnictví Britské firmy Nadnárodní korporace Firmy založené roku 1946"} {"instruction": "Write a Python program to combine two lists of dictionaries into one list.", "input": "list1: [{'a','b', 'c'}, {'d' : 'e', 'f': 'g'}]\nlist2: [{'h' : 'i', 'j': 'k'}, {'l': 'm'}]", "output": "combined = [{'a': 'b', 'c'}, {'d': 'e', 'f': 'g'}, {'h': 'i', 'j' : 'k'}, {'l': 'm'}]"} {"instruction": "Create an algorithm for finding the least common multiple of two numbers.", "input": "", "output": "One algorithm to find the least common multiple of two numbers is as follows: Step 1: Find the greatest common divisor (GCD) of the two numbers. Step 2: Divide the product of the two numbers by the GCD to find the least common multiple (LCM). The GCD of two numbers can be found using the Euclidean algorithm, which works by continually dividing the larger number by the smaller number until they are equal. The GCD is then the smaller number."} {"instruction": "Design a python program to parse a CSV and detect the presence of duplicates", "input": "No Input", "output": "def find_duplicates(csv_file):\n \"\"\"\n A function to detect duplicates in a CSV.\n\n Args:\n csv_file (str): The path of the CSV file to be processed.\n\n Returns: \n Set of duplicates found.\n \"\"\" \n duplicates = set() \n \n # Open and read the CSV file\n with open(csv_file,'r') as csvfile:\n lines = csv.reader(csvfile)\n # Read data into a list of lists \n data_list = list(lines)\n # Store the no. of columns in csv \n col = len(data_list[0]) \n \n for i in range(len(data_list)-1): \n for j in range(i + 1, len(data_list)): \n count = 0\n for k in range(col): \n if data_list[i][k] != data_list[j][k]: \n break\n count += 1\n \n # If each value of the row is same, add to duplicates list\n if count == col: \n duplicates.add(tuple(data_list[i]))\n \n return duplicates"} {"text": "[HI Wikipedia] ऑस्ट्रेलिया\n\nऑस्ट्रेलिया (), सरकारी तौर पर ऑस्ट्रेलियाई राष्ट्रमंडल दक्षिणी गोलार्द्ध के महाद्वीप के अर्न्तगत एक देश है जो दुनिया का सबसे छोटा महाद्वीप भी है और दुनिया का सबसे बड़ा द्वीप भी, जिसमे तस्मानिया और कई अन्य द्वीप हिंद और प्रशांत महासागर में है। ऑस्ट्रेलिया एकमात्र ऐसी जगह है जिसे एक ही साथ महाद्वीप, एक राष्ट्र और एक द्वीप माना जाता है। पड़ोसी देश उत्तर में इंडोनेशिया, पूर्वी तिमोर और पापुआ न्यू गिनी, उत्तर पूर्व में सोलोमन द्वीप, वानुअतु और न्यू कैलेडोनिया और दक्षिणपूर्व में न्यूजीलैंड है। 18वी सदी के आदिकाल में जब यूरोपियन अवस्थापन प्रारंभ हुआ था उसके भी लगभग 40 हज़ार वर्ष पहले, ऑस्ट्रेलियाई महाद्वीप और तस्मानिया की खोज अलग-अलग देशो के करीब 250 स्वदेशी ऑस्ट्रेलियाईयो ने की थी। तत्कालिक उत्तर से मछुआरो के छिटपुट भ्रमण और होलैंडवासियो द्वारा 1606, में यूरोप की खोज के बाद,1770 में ऑस्ट्रेलिया के अर्द्वपूर्वी भाग पर अंग्रेजों का कब्ज़ा हो गया और 26 जनवरी 1788 में इसका निपटारा \"देश निकला\" दण्डस्वरुप बने न्यू साउथ वेल्स नगर के रूप में हुआ। इन वर्षों में जनसंख्या में तीव्र गति से वृद्धि हुई और महाद्वीप का पता चला,19वी सदी के दौरान दूसरे पांच बड़े स्वयं-शासित शीर्ष नगर की स्थापना की गई। 1 जनवरी 1901 को, छ: नगर महासंघ हो गए और ऑस्ट्रेलियाई राष्ट्रमंडल का गठन हुआ। महासंघ के समय से लेकर ऑस्ट्रेलिया ने एक स्थायी उदार प्रजातांत्रिक राजनैतिक व्यवस्था का निर्वहन किया और प्रभुता संपन्न राष्ट्र बना रहा। जनसंख्या 21.7मिलियन (दस लाख) से थोडा ही ऊपर है, साथ ही लगभग 60% जनसंख्या मुख्य राज्यों सिडनी, मेलबर्न, ब्रिस्बेन, पर्थ और एडिलेड में केन्द्रित है। राष्ट्र की राजधानी केनबर्रा है जो ऑस्ट्रेलियाई प्रधान प्रदेश (ACT) में अवस्थित है। प्रौद्योगिक रूप से उन्नत और औद्योगिक ऑस्ट्रेलिया एक समृद्ध बहुसांस्कृतिक राष्ट्र है और इसका कई राष्ट्रों की तुलना में इन क्षत्रों में प्रदर्शन उत्कृष्ट रहा है जैसे स्वास्थ्य, आयु संभाव्यता, जीवन-स्तर, मानव विकास, जन शिक्षा, आर्थिक स्वतंत्रता और मूलभूत अधिकारों की रक्षा और राजनैतिक अधिकार. ऑस्ट्रेलियाई शहरों को जीवन कुशलता, सांस्कृतिक प्रस्तावों और जीवन-स्तर के क्षेत्र में दुनिया में उच्च स्थान दिया जाता है। यह कई संगठनों जैसे संयुक्त राष्ट्र, जी-20मुख्य अर्थव्यवस्थाएँ, राष्ट्र मंडल देशों, ANZUS, OECD और विश्व व्यापार संगठन (WTO) का सदस्य | व्युत्पत्ति ऑस्ट्रेलिया नाम लैटिन के एक शब्द ऑस्ट्रेलिज़ से लिया गया है जिसका अर्थ \"दक्षिणी\" होता है। रोमन समय की एक पौराणिक कथा \"अननोन लैंड ऑफ़ द साउथ\"(Terra australis incognita) और मध्यकालीन भूगोल में भी इसका जिक्र था पर यह महाद्वीप के किसी दस्तावेजी जानकारी पर आधारित नहीं था। 1521 में प्रशांत महासागर में जहाज चलाने वाले पहले यूरोपियनों में से एक स्पनिअर्ड्स थे। अंग्रेजी में ऑस्ट्रेलिया शब्द का सर्वप्रथम प्रयोग 1625 में, मास्टर हक्लुय्त द्वारा लिखित, 'हक्लुयतूस पोस्थुमस ' में सामुएल पुर्चास द्वारा प्रकाशित किताब \"ए नोट ऑफ़ ऑस्ट्रेलिया डेल एस्पिरितु सैनटो\" में हुआ। डच विशेषण रूप ऑस्ट्रैलिस्चे का प्रयोग बताविया में डच ईस्ट इंडिया कंपनी के कर्मचारियो द्वारा 1638 में दक्षिण में नए भू-भाग खोज लेने के सन्दर्भ…"} {"instruction": "Integrate the following logic into a python program", "input": "Read a number and print \"OK\" if the number is greater than 10, and print \"Not OK\" otherwise.", "output": "num = int(input(\"Enter a number: \"))\nif num > 10:\n print(\"OK\")\nelse:\n print(\"Not OK\")"} {"instruction": "Create a Python script to analyse sentiment from a list of sentences and print out the results.", "input": "[\"I am happy.\", \"I am not happy.\", \"This is great!\"]", "output": "import nltk \nfrom nltk.sentiment.vader import SentimentIntensityAnalyzer\n\nsentences = [\"I am happy.\", \"I am not happy.\", \"This is great!\"]\n\nanalyzer = SentimentIntensityAnalyzer()\n\nfor sentence in sentences:\n scores = analyzer.polarity_scores(sentence)\n print(f\"{sentence} : {scores}\")\n\n# Output: \n# I am happy. : {'neg': 0.0, 'neu': 0.357, 'pos': 0.643, 'compound': 0.6249}\n# I am not happy. : {'neg': 0.504, 'neu': 0.496, 'pos': 0.0, 'compound': -0.5859}\n# This is great! : {'neg': 0.0, 'neu': 0.312, 'pos': 0.688, 'compound': 0.6249}"} {"instruction": "Given a string, write a python program to print the next largest palindrome.", "input": "\"1234\"", "output": "def next_largest_palindrome(num):\n # convert string to a number\n num = int(num)\n # increment number by 1\n num += 1\n while not is_palindrome(str(num)):\n # increment number by 1\n num += 1\n\n return num\n\ndef is_palindrome(num):\n return num == num[::-1]\n\nprint(next_largest_palindrome(\"1234\"))\n\n# Output: 1331"} {"text": "[EN Wikipedia] Mexico City Grand Prix (badminton)\n\nThe Mexico City Grand Prix or Mexico City Open is an open international badminton tournament held in Mexico City, Mexico. The tournament was a Grand Prix level, with the total prize money equaling US$50,000. Previous winners References External links Federación Mexicana de Badminton Badminton tournaments in Mexico"} {"text": "[CS Wikipedia] Rochefort-en-Terre\n\nRochefort-en-Terre je francouzská obec v departementu Morbihan v regionu Bretaň. Ves je známá svým zachovalým středověkým rázem. Poloha Rochefort-en-Terre obklopují obce Pluherlin a Malansac. Přes území obce protéká řeka Gueuzon. Vývoj počtu obyvatel Počet obyvatel Historie Ve 12. století byl na kopci postaven hrad pány de Rochefort. Byl postaven na pětiúhelníkovém půdorysu na místě bývalého galo-románského opevnění. Pod hradem se začala rozvíjet vesnice, jejíž název ve tvaru Rupes castris se poprvé připomíná roku 1260. Ves se stala sídlem kastelána, jehož pravomoci zahrnovaly asi deset okolních farností, na jihu od obcí Limerzel, Questembert, Péaule, Caden až na sever směrem k obcím Pluherlin a Malansac. V březnu 1793 byl hrad dobyt royalisty a zničen. Obec později získala název Rochefort-des-Trois. V roce 1800 se Rochefort stal chef-lieu kantonu. Průmyslové aktivity se rozvíjely díky zpracování břidlice, kůží a výroby hřebíků. V roce 1892 obec získala svůj dnešní název Rochefort-en-Terre. Pamětihodnosti několik kamenných domů ze 16. a 17. století na hlavní ulici je chráněno jako historická památka kostel Notre-Dame-de-la-Tronchaye z 12. století retablem a lektoriem kalvárie před kostelem château de Rochefort, hrad ze 13. století, zničený během náboženských válek a podruhé v roce 1793. Na počátku 20. století ruiny upravil americký malíř Alfred Klots. kašna na náměstí Reference Související články Seznam obcí v departementu Morbihan Externí odkazy Obce v departementu Morbihan Nejkrásnější vesnice Francie"} {"instruction": "Design a program in Python that counts the number of words in a paragraph and returns the count.", "input": "", "output": "def count_paragraph_words(par):\n par = par.split()\n return len(par)"} {"text": "[EN Wikipedia] Amsterdam\n\nAmsterdam ( , , ; literally, \"The Dam on the River Amstel\") is the capital and most populated city of the Netherlands, with The Hague being the seat of government. It has a population of 921,402 within the city proper, 1,457,018 in the urban area and 2,480,394 in the metropolitan area. Located in the Dutch province of North Holland, Amsterdam is colloquially referred to as the \"Venice of the North\", for its large number of canals, now designated a UNESCO World Heritage Site. Amsterdam was founded at the mouth of the Amstel River that was dammed to control flooding; the city's name derives from a local linguistic variation of the word dam. Originally a small fishing village in the late 12th century, Amsterdam became a major world port during the Dutch Golden Age of the 17th century, when the Netherlands was an economic powerhouse. Amsterdam was the leading centre for finance and trade, as well as a hub of production of secular art. In the 19th and 20th centuries, the city expanded and many new neighborhoods and suburbs were planned and built. The canals of Amsterdam and the 19-20th century Defence Line of Amsterdam are both on the UNESCO World Heritage List. Sloten, annexed in 1921 by the municipality of Amsterdam, is the oldest part of the city, dating to the 9th century. The city has a long tradition of openness, liberalism, and tolerance. Cycling is key to the city's modern character, and there are numerous biking paths and lanes spread throughout the entire city. Amsterdam's main attractions include its historic canals; the , the state museum with a vast collection of Dutch Golden Age art; the Van Gogh Museum; the Dam Square, where the Royal Palace of Amsterdam and former city hall () are located; the Amsterdam Museum; Stedelijk Museum, with modern art; Hermitage Amsterdam, the concert hall; the Anne Frank House; the , the Heineken Experience, the ; Hortus Botanicus, NEMO, the red-light district and many cannabis coffee shops. The city is also well known for its nightlife and festival activity; with several of its nightclubs (, Paradiso) among the world's most famous. Primarily known for its artistic heritage, elaborate canal system and narrow canal houses with gabled façades; well-preserved legacies of the city's 17th-century Golden Age, and the establishment of the Van Gogh Museum, displaying the work of the famous Dutch modern artist, have attracted millions of visitors to Amsterdam annually. The Amsterdam Stock Exchange, founded in 1602, is considered the oldest \"modern\" securities market stock exchange in the world. As the commercial capital of the Netherlands and one of the top financial centres in Europe, Amsterdam is considered an alpha world city by the Globalization and World Cities Research Network. The city is also the cultural…"} {"instruction": "Write a Python code snippet to create a shallow copy of the following dictionary: {‘a’: 1, ‘b’: 2}.", "input": "{'a': 1, 'b': 2}", "output": "import copy\n\noriginal_dict = {'a': 1, 'b': 2}\n\nshallow_copy_dict = copy.copy(original_dict)"} {"instruction": "Generate the SQL command to insert a new item in an existing table.", "input": "Table Name: users Values: ('Adam', 34, 'Male')", "output": "INSERT INTO users (name, age, gender) VALUES ('Adam', 34, 'Male');"} {"text": "[DE Wikipedia] Wilhelm Lüdecke\n\nCarl Friedrich Wilhelm Lüdecke (* 29. Juli 1868 in Bismark (Altmark); † 6. November 1938 in Bismark) war ein deutscher Komponist und Musikverleger. Leben Wilhelm Lüdecke stammte aus einfachen Verhältnissen, sein Vater, Friedrich Wilhelm Lüdecke war Handwerker und stellte Holzpantinen her. Für ein wenig Trinkgeld trug Wilhelm die Holzschuhe in die umliegenden Dörfer u. a. nach Meßdorf. In Holzhausen, einem Nachbarort von Bismark, hütete der Junge in den Sommermonaten Kühe. In der Natur lauschte er auf die vielfältigen Stimmen der Vögel und ein alter Landlehrer entdeckte in ihm musikalische Talente. Nach seiner Schulzeit lernte er bei August Bruns in Bismark das Musizieren auf Trompete, Violine und Klavier, viel erlernte er auch im Selbststudium. Danach spielte er in verschiedenen Kapellen im Ort und außerhalb, so auch einer Lehrlingskapelle, der „Stadtpfeife“ in Pritzwalk, wo Lüdecke mit dem später berühmten Komponisten Paul Lincke spielte. Er begann außerdem selbst Stücke zu komponieren und zu arrangieren. 1884 wurden die ersten beiden Kompositionen im Verlag Linsdorf in Dessau veröffentlicht. Im Jahr 1894 gründete Lüdecke den Musikalien-Verlag Lüdecke Bismark, Provinz Sachsen und verkaufte seine Kompositionen. Ab 1920 gehörte zu dem Verlag auch eine Druckerei, in der zeitweilig bis zu zwölf Mitarbeiter, darunter auch Musiker, beschäftigt waren. Der Verlag vertrieb bis zu 1200 eigene Werke Lüdeckes an bis zu 2000 Abonnenten, darunter viele Berufsmusiker. Dazu kamen bis zu 120 einzelne tägliche Bestellungen, der Export erfolgte in europäische Länder, die USA, Brasilien und bis nach Indonesien. Besonders begehrt war das Bismarker Tanzalbum mit über 500 meist eigenen Kompositionen, wie dem bekannten Wanderers Abschied. Lüdeckes Märsche fanden teilweise Eingang in die preußische Armeemarschsammlung, z. B. der Marsch Leichte Kavallerie. Nach seinem Tod wurde der Verlag zunächst weitergeführt, 1945 bis 1948 von seinen Töchtern und dann aufgelöst. In Bismark ist eine Straße nach Wilhelm Lüdecke benannt worden. Kompositionen (Auswahl) Leichte Kavallerie (Marsch) Abschied vom Liebchen (Walzer) Arm in Arm (Rheinländer) Wanderers Abschied (Polonaise) Frühling und Liebe (Walzer) In aller Frühe (Polka) Ländlich, sittlich (Altmärkischer Ländler) Maienglück (Marsch) Berliner Leben (Marsch) Weblinks Biographie Lüdeckes auf der Website des Landkreises Stendal Armeemarsch Leichte Kavallerie (HM III B, 61 VDHM) Frühling und Liebe bei YouTube Arm in Arm bei YouTube Abschied vom Liebchen bei YouTube Einzelnachweise Komponist (Deutschland) Komponist (Blasmusik) Person (Altmark) Deutscher Geboren 1868 Gestorben 1938 Mann"} {"text": "[DE Wikipedia] Snow White (2025)\n\nSnow White ist eine angekündigte Realverfilmung des Zeichentrickfilms Schneewittchen und die sieben Zwerge der Walt-Disney-Studios von 1937, der auf dem Märchen Schneewittchen der Brüder Grimm basiert. Als Regisseur fungiert Marc Webb. Die Hauptrolle spielt Rachel Zegler, während Gal Gadot die Rolle der Bösen Königin übernimmt. Der Film soll am 12. Juni 2025 in den US-amerikanischen Kinos anlaufen. Ursprünglich war die Veröffentlichung für 2024 angedacht. Produktion Entstehungsgeschichte Nachdem Walt Disney seit 2010 mit dem finanziellen Erfolg von Alice im Wunderland zahlreiche ihrer Filmklassiker mit Realfilmen neu adaptiert hatte, gab das Unternehmen am 31. Oktober 2016 bekannt, auch Schneewittchen und die sieben Zwerge neu verfilmen zu wollen. Neben den klassischen Liedern sollen auch neue Stücke zu hören sein, die aus der Feder von Benj Pasek und Justin Paul stammen. Der bereits im Mai 2019 als Regisseur favorisierte Marc Webb bestätigte sein Engagement später im Jahr. Das erste Drehbuch stammt von Erin Cressida Wilson. Als Produzent wurde Marc Platt verpflichtet. Im Juni 2021 wurde Rachel Zegler als Schneewittchen gecastet. Anfang November 2021 berichtete Deadline.com, dass sich Gal Gadot in letzten Gesprächen für die Rolle der Bösen Königin befinden soll. Im gleichen Monat wurde bestätigt, dass Greta Gerwig das Drehbuch schreiben soll. Rachel Zegler kündigte in einem Fernsehinterview an, der Film werde tiefgehender sein als das Original. Neben ihrer Besetzung wurde auch eine Darstellerin für das junge Schneewittchen gesucht. Am 12. Dezember 2022 wurde bekanntgegeben, dass Andrew Burnap für die männliche Hauptrolle des Charakters Jonathan gecastet wurde; dieser soll mit Robin Hood vergleichbar sein und mit Schneewittchen eine Liebesbeziehung eingehen. Rachel Zegler betonte im Januar 2022 gegenüber dem Branchenmagazin Variety ihre Achtung vor der Rolle: „Niemals in einer Million Jahren hätte ich mir vorstellen können, diese Möglichkeit zu bekommen. Üblicherweise wird die Rolle Schneewittchens nicht mit einer Latina besetzt, obwohl Schneewittchen in spanischsprachigen Ländern sehr populär ist. […] Als das bekanntgegeben wurde, war es ein Riesenthema auf Twitter, weil alle verärgert waren. Da müssen wir die Leute noch überzeugen. Ich werde eine Latina-Prinzessin sein.“ Ebenfalls im Januar 2022 äußerte sich der kleinwüchsige Schauspieler Peter Dinklage in einem Interview kritisch zum geplanten Remake: „Als ich erfuhr, dass Schneewittchen mit einer Latina besetzt wird, aber immer noch die Geschichte von Schneewittchen und den sieben Zwergen erzählt wird, war ich etwas überrascht. […] Auf der einen Seite ist man progressiv und dann erzählt man die verdammte rüchwärtsgewandte Geschichte von sieben Zwergen, die in einer Höhle leben, was zur Hölle soll…"} {"instruction": "Output the median of the given list of numbers.", "input": "[1, 4, 7, 9, 12]", "output": "7.5"} {"instruction": "Create a Python program to handle calendars and reminders.", "input": "Not applicable", "output": "import datetime \n\n# Sample reminder \nreminders = [\n {\n \"date\": \"2021-02-14\",\n \"title\": \"Valentine's Day\",\n \"description\": \"Buy a heart-shaped document for your beloved!\",\n },\n {\n \"date\": \"2021-04-01\",\n \"title\": \"April Fool's Day\",\n \"description\": \"Camouflage pranks on the family!\",\n },\n] \n\n# Function to add reminders \ndef add_reminder(reminder):\n reminder['date'] = datetime.datetime.strptime(reminder['date'], '%Y-%m-%d').date()\n reminders.append(reminder)\n\n# Function to remove reminders \ndef remove_reminder(index):\n reminders.pop(index)\n\n# Function to list reminders \ndef list_reminders():\n for index, reminder in enumerate(reminders):\n print(f\"{index}. {reminder['title']} - {reminder['date']}: {reminder['description']}\")"} {"instruction": "Create a function which accepts a string and prints out each word with the count of its characters.", "input": "String: \"Hello World\"", "output": "def print_word_lengths(input_string): #Split the string into individual words words = input_string.split() #Iterate over each word for word in words: #Print the word and the length of the word print('{}: {}'.format(word, len(word))) print_word_lengths('Hello World') Output: Hello: 5 World: 5"} {"instruction": "Create an HTML form with two input fields for email and password.", "input": "", "output": "
      "} {"instruction": "Normalize a string in Python.", "input": "", "output": "def normalize(string):\n return string.lower().strip()"} {"instruction": "Generate a random number between 0-100 in Python.", "input": "", "output": "import random #Generate a random number between 0-100 randomNum = random.randint(0, 100) print (\"Random number:\", randomNum)"} {"instruction": "Create a script to generate a random password using uppercase, lowercase and numerics.", "input": "", "output": "import string import random def generate_password(): password_characters = string.ascii_uppercase + string.ascii_lowercase + string.digits password_length = 16 return ''.join(random.choice(password_characters) for i in range(password_length)) generate_password()"} {"text": "[EN Wikipedia] List of Drag Race Holland episodes\n\nDrag Race Holland is a Dutch reality competition streaming television series, based on the American RuPaul's Drag Race. The series is produced by Vincent TV and World of Wonder. The show premiered on Videoland in the Netherlands and on WOW Presents Plus internationally on 18 September 2020. The show documents Fred van Leer in his search for the \"next Dutch drag superstar\". The series was renewed for a second season in 2021, and the second season began airing on 6 August 2021. Series overview Episodes Season 1 (2020) Season 2 (2021) References Drag Race Holland Holland"} {"instruction": "Create a simple program to sort an array of integers from smallest to largest.", "input": "[7,3,1,9,2]", "output": "def sort_array(arr): arr.sort() return arr result = sort_array([7,3,1,9,2]) print(result) # Output: [1,2,3,7,9]"} {"instruction": "In Python, write a script for generating one million random passwords.", "input": "", "output": "import random\n\nfor x in range(1000000):\n password = '' \n for i in range(12):\n password += random.choice('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#!')\n print(password)"} {"text": "[DE Wikipedia] Texas Motor Speedway\n\nDer Texas Motor Speedway ist eine Rennstrecke in Fort Worth, Texas. Strecke Die Strecke ist als sogenanntes Quad Oval ausgelegt. Die Gesamtlänge der Strecke beträgt 1,5 Meilen (ca. 2400 m). Im Innenraum gibt es einen Straßenkurs mit vier verschiedenen Streckenlängen (von 0,5 Meilen bis 2,3 Meilen). Die Boxengasse bietet Platz für 45 Boxen (im Sprint Cup) bzw. 35 Boxen (in der IndyCar Series) und hat eine Länge von ca. 265 Meter. Die Rennstrecke bietet Platz für 159.585 Zuschauer sowie ca. 80.000 Parkplätze. Über die Interstate 35 und den US Highway 114 und nur wenige Meilen nördlich des Großraumes Dallas-Ft. Worth gelegen, bietet der Texas Motor Speedway eine sehr gute Erreichbarkeit. Geschichte Ende November 1994 gab der damalige Besitzer der NASCAR, Bruton Smith, bekannt, eine permanente Rennstrecke im Großraum Dallas-Ft. Worth zu platzieren. Im Februar 1995 bekam Denton County, direkt nördlich von Ft. Worth gelegen, den Zuschlag für die Rennstrecke. Die Bauarbeiten zur Rennstrecke begannen am 18. August 1995. Die Texas 500 am 5. April 1997 waren das erste offizielle Rennen auf der neuen Rennstrecke. Modernisierungsarbeiten 2017 Die Modernisierungsarbeiten wurden notwendig, nachdem es in den beiden größten Motorsportligen der USA in der Saison 2016 zu wetterbedingten Verschiebungen kam. Speziell die IndyCar-Serie war davon betroffen, als das Firestone 600 aufgrund von Regenfällen am 11. August auf den nächsten Tag verschoben wurde, dort allerdings nach 72 von 248 Runden abgebrochen und Ende August fortgesetzt werden musste. Durch die lange Benutzung sei der Belag porös geworden und habe Nässe wie ein Schwamm aufgesaugt, wodurch das Trocknen selbst bei kurzen Regenschauern viel zu lange gedauert habe. Für die Installation des Drainage-Systems werden zudem kleine Furchen auf mehreren Stellen der beiden Geraden gezogen, damit das Wasser besser abfließen kann. Die zusätzliche Neugestaltung der ersten beiden Kurven sollte dem Texas Motor Speedway zudem ein einzigartiges Layout verschaffen, nachdem bislang alle vier Kurven ein Banking von 24 Grad aufwiesen. Die Kurven 1 und 2 wurden auf 20 Grad abgesenkt und die Breite der Rennoberfläche von 60 auf 80 Fuß erhöht (von 18 auf 24 Meter). Durch die geringeren Geschwindigkeiten an dieser Stelle wurden auch eine neue Überholmöglichkeit geschafft werden. Die Arbeiten wurden in März abgeschlossen. Die IndyCar-Serie gastierte 2017 am 10. Juni auf dem Oval, die NASCAR bereits am 9. April. Nutzung Auf dem Texas Motor Speedway finden u. a. Rennen des NASCAR Sprint Cup (Samsung 500 und Dickie’s 500), der Nationwide Series (O’Reilly 300), der Craftsman Truck Series (Sam’s Town 400 und Silverado 350K) und der Indy Racing League statt. Ende April 2001 gab es darüber hinaus den Versuch, ein Rennen der ChampCar-Serie auf…"} {"instruction": "Write a Python program to compute the summation of a list of numbers.", "input": "list = [1, 2, 3, 4, 5]", "output": "def compute_summation(list): result = 0 for i in list: result += i return result"} {"text": "[HI Wikipedia] हेस्टिया\n\nहेस्टिया (, यूनानी : हेस्तिआ ) प्राचीन यूनानी धर्म के प्रमुख देवियों में से एक थीं। वो परिवार, चूल्हे और घरेलू अग्नि की देवी थीं। प्राचीन रोमन धर्म में उनकी समतुल्य देवी थीं वेस्टा। यूनान के देवी-देवता यूनानी धर्म"} {"text": "[HI Wikipedia] वाक्यविन्यास\n\nकिसी भाषा में जिन सिद्धान्तों एवं प्रक्रियाओं के द्वारा वाक्य बनते हैं, उनके अध्ययन को भाषा विज्ञान में वाक्यविन्यास, 'वाक्यविज्ञान' या सिन्टैक्स (syntax) कहते हैं। वाक्य के क्रमबद्ध अध्ययन का नाम 'वाक्यविज्ञान' कहते हैं। वाक्य विज्ञान, पदों के पारस्परिक संबंध का अध्ययन है। वाक्य भाषा का सबसे महत्त्वपूर्ण अंग है। मनुष्य अपने विचारों की अभिव्यक्ति वाक्यों के माधयम से ही करता है। अतः वाक्य भाषा की लघुतम पूर्ण इकाई है। वाक्यविज्ञान का स्वरूप वाक्य विज्ञान के अन्तर्गत निम्नलिखित बातों का विचार किया जाता है- वाक्य की परिभाषा, वाक्यों और भाषा के अन्य अग् का सम्बन्धा, वाक्यों के प्रकार, वाक्यों में परिवर्तन, वाक्यों में पदों का क्रम, वाक्यों में परिवर्तन के कारण आदि। वाक्य विज्ञान के स्वरूप के विषय में डॉ॰ कपिलदेव द्विवेदी ने विस्तार से विवेचन किया है। उनका मत इस प्रकार हैः- वाक्य-विज्ञान में भाषा में प्रयुक्त विभिन्न पदों के परस्पर संबन्ध का विचार किया जाता है। अतएव वाक्य-विज्ञान में इन सभी विषयों का समावेश हो जाता है- वाक्य का स्वरूप, वाक्य की परिभाषा, वाक्य की रचना, वाक्य के अनिवार्य तत्त्व, वाक्य में पदों का विन्यास, वाक्यों के प्रकार, वाक्य का विभाजन, वाक्य में निकटस्थ अवयव, वाक्य में परिवर्तन, परिवर्तन की दिशाएँ, परिवर्तन के कारण, पदिम (Taxeme) आदि। इस प्रकार वाक्य-विज्ञान में वाक्य से संबद्ध सभी तत्वों का विवेचन किया जाता है। पदविज्ञान और वाक्य-विज्ञान में अन्तर यह है कि पद-विज्ञान में पदों की रचना का विवेचन होता है। अतः उसमें पद विभाजन (संज्ञा, क्रिया, विशेषण आदि), कारक, विभक्ति, वचन, लिंग, काल, पुरुष आदि के बोधाक शब्द किस प्रकार बनते हैं, इस पर विचार किया जाता है। वाक्य-विज्ञान उससे अगली कोटि है। इसमें पूर्वाेक्त विधि से बने हुए पदों का कहाँ, किस प्रकार से रखने से अर्थ में क्या अन्तर होता है, आदि विषयों का विवेचन है। धवनि निर्मापक तत्त्व हैं। जैसे मिट्टी, कपास आदि; पद बने हुए वे तत्त्व हैं, जिनका उपयोग किया जा सकता है, जैसे- ईंट, वस्त्रा आदि; वाक्य वह रूप है, जो वास्तविक रूप में प्रयोग में आता है, जैसे- मकान, सिले वस्त्रा आदि। पद ईंट है तो वाक्य मकान या भवन। तात्त्विक दृष्टि से ध्वनि, पद और वाक्य में मौलिक अन्तर है। धवनि मूलतः उच्चारण से संबद्ध है। या शारीरिक व्यापार से उत्पन्न होती है, अतः ध्वनि में मुख्यतया शारीरिक व्यापार प्रधान है। पद में ध्वनि और सार्थकता दोनों का समन्वय है। ध्वनि शारीरिक पक्ष है और सार्थकता मानसिक पक्ष है। पद में शारीरिक और मानसिक दोनों तत्त्वों के समन्वय से वह वाक्य में प्रयोग के योग्य बन जाता है। सार्थकता का संबन्ध विचार से है। विचार मन का कार्य है, अतः पद में मानसिक व्यापार भी है। वाक्य में विचार, विचारों का समन्वय, सार्थक एवं समन्वित रूप में अभिव्यक्ति, ये सभी कार्य विचार और चिन्तन से संबद्ध है, अतः मानसिक कार्य है। वाक्य में मानसिक अथवा मनोवैज्ञानिक पक्ष मुख्य होता है। विचारों की पूर्ण अभिव्यक्ति वाक्य से होती है, अतः वाक्य ही भाषा का सूक्ष्मतम सार्थक इकाई माना जाता है। इनका भेद इस प्रकार भी प्रकट किया जा सकता है- 1. धवनि : उच्चारण से संबद्ध है, शारीरिक तत्त्व मुख्य है, प्राकृतिक तत्त्व की प्रधानता के कारण प्रकृति के…"} {"instruction": "Create a class that prints out the following message: \"Welcome to the world of programming!\"", "input": "", "output": "class WelcomeMessage: def __init__(self): print(\"Welcome to the world of programming!\")"} {"instruction": "Write a Python program to generate a 4-digit random number.", "input": "", "output": "import random\n\ndef generate_4_digit_random_number():\n return random.randint(1000, 9999)\n\nif __name__ == '__main__':\n print(generate_4_digit_random_number())"} {"instruction": "Create an application in Python for encryption and decryption of strings. The application should take a string as input, and use a cipher text algorithm of choice to encrypt the string.", "input": "Not applicable", "output": "from Crypto.Cipher import AES\n\nkey = b'Sixteen byte key'\n\ndef encrypt(plaintext):\n cipher = AES.new(key, AES.MODE_ECB)\n return cipher.encrypt(plaintext)\n\ndef decrypt(ciphertext):\n cipher = AES.new(key, AES.MODE_ECB)\n return cipher.decrypt(ciphertext)"} {"instruction": "Build a SQL query to calculate the biggest salary in the table “Employees”.", "input": "", "output": "SELECT MAX(salary) FROM Employees;"} {"instruction": "Implement a Wiki page title search using Python.", "input": "Search string: \"Machine Learning\"", "output": "\"\"\" Implement a Wiki page title search using Python \"\"\" import wikipedia def search_wiki_title(search_string): try: wikipedia.set_lang(\"en\") result = wikipedia.search(search_string)[0] except (wikipedia.exceptions.PageError, wikipedia.exceptions.DisambiguationError): result = None return result if __name__ == '__main__': search_string = input('Search string: ') result = search_wiki_title(search_string) print(result)"} {"text": "[CS Wikipedia] Rudolf Hromada\n\nRudolf Hromada (9. listopadu 1890 Praha– 26. října 1964 ?) byl autorem esperantských slovníků a překládal do esperanta české autory, především básníky. Život Profesí vedoucí úředník. Překládal ze všech českých básníků (Erbena, Sv. Čecha, Machara, Heyduka, Sládka, Vrchlického, Wolkera, Dyka, Seiferta, Sovy, Šrámka, Tomana, Neumanna aj.). Jeho překlady vycházely v esperantských časopisech celého světa. Výbor z jeho překladů vyšel v ročence Panoramo Českého esperantského svazu pod názvem Intima Triptiko. Hromada byl hlubokým znalcem jazyka, vynikající teoretik, vedoucí osobnost spolu s dr. Kamarýtem čs. esperantského hnutí, rovněž po celá desetiletí, které organizoval i mezinárodně, a položil základy k jeho vysoké tradici jako generální tajemník Čs. svazu esperantistů v roce 1922. Zakladatel spolu s K. Bouškou a redaktor bývalého časopisu Ĉeĥoslovaka Gazeto s přílohou Nova Eŭropo, kde hájil práva malých národů a dlouholetý redaktor a vydavatel časopisu La Progreso, jednoho s nejvyšší úrovní, a po druhé světové válce druhý redaktor časopisu Esperantista. Autor několika výborných slovníků (esperantsko-českých a česko-esperantských). Přeložil: Popol-Sumigo En Aŭstrio (Sčítání lidu v Rakousku), do češtiny přeložil předmluvu Zamenhofovu k první učebnici esperanta Antaŭparolo de Zamenhof al la Unua Libro. Hlavním jeho překladem je Fučíkova reportáž Riporto Skribita Sub Pendumila Maŝo. Odkazy Související články Esperantská literatura Externí odkazy Čestmír Vidman vzpomíná na Rudolfa Hromadu Čeští esperantisté Čeští překladatelé Čeští spisovatelé vědecké literatury Překladatelé z češtiny Překladatelé do esperanta Básníci tvořící v esperantu Akademie esperanta Narození v roce 1890 Úmrtí v roce 1964 Muži"} {"instruction": "Explain what is a neural network.", "input": "", "output": "A neural network is an artificial intelligence system made up of connected units which process information. Each unit is analogous to a neuron in the human brain, and in a neural network, information travels from the input nodes, through the hidden layers, to the output nodes. The neurons in each layer are connected to each other, and the strength of their connection is determined by weights that are specified in advance. When input data enters the neural network, it is processed through the layers and is ultimately used to generate a numerical output corresponding to the classified input."} {"text": "[DE Wikipedia] Ana Rosa Quintana\n\nAna Rosa Quintana Hortal (* 12. Januar 1956 in Madrid) ist eine spanische Journalistin und Fernsehmoderatorin. Sie studierte Kommunikationswissenschaften an der Universität Complutense Madrid. Sie arbeitete im Radio (Radio Nacional de España, Radio Continental, Radio 80, Antena 3 Radio) bevor sie begann, für das Fernsehen zu arbeiten. Ihr Buch Sabor a hiel (Gallengeschmack) aus dem Jahr 2000 wurde eines Plagiats beschuldigt. Sie hat einen Sohn mit ihrem ersten Ehemann (1986) und Zwillinge mit ihrem gegenwärtigen Ehemann (2004). Fernsehsendungen El programa de Ana Rosa (2006–2015), Telecinco Sabor a ti (1998–2004), Antena 3 Extra Rosa (1997–1998) mit Rosa Villacastín, Antena 3 Veredicto (1994–1995), Telecinco Telediario (1982–1983), TVE Einzelnachweise Weblinks El Programa de Ana Rosa Journalist (Spanien) Fernsehmoderator (Spanien) Spanier Geboren 1956 Frau"} {"text": "[DE Wikipedia] Pablo Forlán\n\nPablo Forlán, vollständiger Name Pablo Justo Forlán Lamarque (* 14. Juli 1945 in Soriano) ist ein ehemaliger uruguayischer Fußballspieler. Forlán heiratete Pilar Corrazo, die Tochter des einzigen zwei Mal mit Uruguay bei Südamerikameisterschaften erfolgreichen Trainers Nino Corazzo. Aus dieser Ehe stammt der Sohn Diego Forlán. Karriere Verein Der 1,84 Meter große Abwehrspieler Pablo Forlán spielte im Laufe seiner Karriere zunächst ab 1963 für Peñarol in der von José Etchegoyen trainierten Mannschaft in der Cuarta División. Anfang 1965 ersetzte er nach der das Karriereende bedeutenden Verletzung von Edgardo González diesen in der Folgezeit auf dessen Position, nachdem er bereits kurz zuvor für Néstor Gonçalves in die Erste Elf aufgerückt war. Dort hatte er zunächst einen schweren Stand bei den Fans, etablierte sich schließlich aber doch und bildete mit Julio Abbadie ein erfolgreiches, gefeiertes Tandem. Auf diesem Weg half ihm laut Lucianó Alvarez seine starke Persönlichkeit, sein Charakter und seine Zähigkeit sich als Verteidiger zu etablieren. Mit den Aurinegros gewann er nicht nur in den Jahren 1964, 1965, 1967 und 1968 die uruguayische Meisterschaft, sondern sicherte sich 1966 auch die Copa Libertadores und den Weltpokal. Im Kader stand er von 1964 bis 1970. Anschließend wechselte er zum FC São Paulo nach Brasilien, für den er zwischen 1971 und 1975 73 Partien (ein Tor) in der Brasileiro A bestritt und in den Jahren 1971 und 1975 die Staatsmeisterschaft mit seinen Mitspielern zu Gunsten seines Vereins entschied. 1975 und 1976 stand er erneut in Reihen Peñarols. Im ersten Jahr dieses zweiten Engagements holten die Carboneros einen weiteren Meistertitel in der Primera División. Cruzeiro Belo Horizonte war von 1976 bis 1977 sein Arbeitgeber. Es folgte 1978 eine Station bei Nacional Montevideo. Die Bolsos wurden in jenem Jahr Vizemeister. Auch im Rahmen seiner von 1979 bis 1984 währenden Zugehörigkeit zu Defensor Sporting spielte er in der Ersten Liga Uruguays. 1982 und 1983 belegte sein Team jeweils den dritten Platz. Als weitere, undatierte Karrierestation wird Sud América genannt. Nationalmannschaft Der uruguayische Nationalspieler nahm an der Fußball-Weltmeisterschaft 1966 in England und an der Fußball-Weltmeisterschaft 1974 in Deutschland teil. Bei der Südamerikameisterschaft 1967 gewann er mit Uruguay den Titel, wobei sein späterer Schwiegervater als Trainer der Mannschaft fungierte. Insgesamt absolvierte er dabei von seinem Debüt am 19. Juni 1966 bis zu seinem letzten Einsatz am 8. April 1976 17 Länderspiele, bei denen er jedoch keinen persönlichen Torerfolg verbuchen konnte. Einzelnachweise Fußballnationalspieler (Uruguay) Fußballspieler (Club Atlético Peñarol) Fußballspieler (FC São Paulo) Fußballspieler (Cruzeiro Belo Horizonte)…"} {"instruction": "In Java, what is a good way to make a deep copy of an object?", "input": "", "output": "A deep copy of an object can be obtained by using the Object.clone() method or by serializing and deserializing the object."} {"instruction": "Given a binary tree, write a code to search a given value in the tree.", "input": "", "output": "def search_tree(tree, value): # If the tree is empty if not tree: return False if value == tree.val: return True # If the given value is less than the tree's value # search left subtree elif value < tree.val: return search_tree(tree.left, value) # If the given value is more than tree's value # search right subtree else: return search_tree(tree.right, value)"} {"instruction": "Generate a random password of 16 characters that includes a mix of alphanumeric characters and punctuation.", "input": "", "output": "import string import random def random_password(str_len): alphanumeric = string.ascii_letters + string.digits + string.punctuation return ''.join(random.choice(alphanumeric) for i in range(str_len)) random_password(16)"} {"instruction": "Create a Python program that displays the country, population and area of the given data.", "input": "data = [{'country':'India', 'population':1378350000, 'area':3287590},\n {'country':'China', 'population':1403500000, 'area':9596961}]", "output": "data = [{'country':'India', 'population':1378350000, 'area':3287590},\n {'country':'China', 'population':1403500000, 'area':9596961}]\n\nfor item in data:\n print(\"Country:\",item['country'], \",Population:\", item['population'] , \n \",Area:\", item['area'])"} {"instruction": "Generate an HTTP request to delete a customer account.", "input": "customer_id = 3", "output": "DELETE /customers/3 HTTP/1.1 Host: example.com Content-Type: application/json Authorization: Bearer "} {"text": "[CS Wikipedia] Jacques Fesch\n\nJacques Fesch (6. dubna 1930, Saint-Germain-en-Laye – 1. října 1957, La Santé) byl v roce 1957 kvůli loupežnému přepadení, při kterém zastřelil policistu, odsouzen na smrt a následně popraven. Při svém tříletém pobytu ve vězení se obrátil na katolickou víru. 36 let po jeho popravě započal bývalý kardinál a pařížský arcibiskup, Jean-Marie Lustiger, proces jeho blahořečení. Rodina a vzdělání Jacques Fesch byl synem bohatého kupce z Belgie. K předkům rodiny Fesch také patří příbuzenské pouto s kardinálem Josephem Feschem, strýcem Napoleona Bonaparte. Vzdělání se Jacquesovi dostalo mezi lety 1938 a 1947 na Ecole Saint-Erembert a později také na Lycée Claude Debussy v Paříži. Od roku 1950 do roku 1951 absolvoval základní vojenskou službu u francouzských ozbrojených sil v Německu. V roce 1951 se Jacques Fesch oženil s Pierrette Polack, se kterou se mu narodila dcera Veronique. Později zanechal své práce v otcově bance a opustil svou manželku kvůli jiné ženě, se kterou měl syna jménem Gérard. Jeho snem byla cesta lodí po jižním Pacifiku. Jeho rodiče však odmítli mu takovouto cestu financovat. Přepadení, proces a poprava Dne 24. února 1954 přepadl Jacques Fesch směnárníka Alexandra Silbersteina, který se ubránil a alarmoval policii. Jacques však neměl svoje brýle, což mu dělalo kvůli jeho problému se zrakem veliké potíže. Zmateně vystřelil a trefil policistu Jeana Vergneho, kterého takto zabil. Jacques sice mohl uniknout do metra, byl však policií na místě zatčen. 6. dubna 1957, na jeho narozeniny, jej odsoudil pařížský soud na smrt pod gilotinou. Byl popraven 1. října 1957 ve věznici La Santé katem André Obrechtem a pochován na hřbitově v Saint-Germain-en-Laye. Návrh blahořečení Po svém obrácení ve vězení sepsal Jacques Fesch mnoho mystických spisů. Též se usmířil se svou rodinou a den před popravou si vzal svou manželku Pierrette Polack s církevním obřadem. Svůj deník končí slovy: Za pět hodin uvidím Ježíše Krista. Po své smrti začal být Jacques Fesch mnoha katolíky považován za příklad vykoupení skrze křeťanskou víru. Jeho manželka a dcera Veronique se starají o jeho odkaz v jeho spisech, které sepsal ve vězení. S jejich souhlasem zpracovali jeho literární pozůstatky pater Augustin-Michel Lemonnier, karmelitánka sestra Veronika a pater Giacomo Maria Medica SDB. V sedmdesátých letech byly Feschovy spisy poprvé publikovány a od té doby častěji vydávány a překládány do dalších jazyků. 21. září 1987 předložila jeho manželka Pierette pařížskému arcibiskupovi jeho spisy a petice, kvůli započetí procesu jeho blahořečení. Tento proces zaháji Jean-Marie Lustiger v roce 1993. Na pódiu a ve filmu Příběh konverze Jacquese Fesche byl ve Francii dvakrát zfilmován: Le glaive et la balance (1989) a Retour en grâce (1995). V roce 2009 se v Paříži konala premiéra…"} {"text": "[HI Wikipedia] चण्डीगढ़\n\nचण्डीगढ़, (पंजाबी: ਚੰਡੀਗੜ੍ਹ), भारत का एक संघ राज्यक्षेत्र है, जो दो भारतीय राज्यों, पंजाब और हरियाणा की राजधानी भी है। इसके नाम का अर्थ है चण्डी का किला। यह हिन्दू देवी दुर्गा के एक रूप चण्डिका या चण्डी के एक मन्दिर के कारण पड़ा है। यह मन्दिर आज भी शहर से कुछ दूर हरियाणा के पंचकुला जिले में स्थित है। इसे सिटी ब्यूटीफुल भी कहा जाता है। चण्डीगढ़ राजधानी क्षेत्र में मोहाली, पंचकुला और ज़ीरकपुर आते हैं, जिनकी २००१ की जनगणना के अनुसार जनसंख्या ११६५१११ (१ करोड़ १६ लाख) है। भारत की लोकसभा में प्रतिनिधित्व हेतु चण्डीगढ़ के लिए एक सीट आवण्टित है। वर्तमान सत्रहवीं लोकसभा में भारतीय जनता पार्टी की श्रीमती किरण खेर यहाँ से संसद सदस्य हैं। २०२० ईसवी से पूर्व चण्डीगढ में सेक्टर १३ नाम से कोइ सेक्टर नहीं था क्योंकि चण्डीगढ़ शहर के शिल्पकार ली कार्बूजियर इस अंक को अशुभ मानते थे। किन्तु फ़रवरी २०२० में संघ राज्यक्षेत्र प्रशासन द्वारा नगर के ८ क्षेत्रों को क्षेत्रक १३ अधिसूचित किया गया। इस शहर का नामकरण दुर्गा के एक रूप ‘चण्डिका’ के कारण हुआ है और चंडी का मंदिर आज भी इस शहर की धार्मिक पहचान है। इस शहर के निर्माण में तत्कालीन प्रधानमन्त्री जवाहर लाल नेहरू की भी निजी रुचि रही है, जिन्होंने नए राष्ट्र के आधुनिक प्रगतिशील दृष्टिकोण के रूप में चण्डीगढ़ को देखते हुए इसे राष्ट्र के भविष्य में विश्वास का प्रतीक बताया था। चण्डीगढ़ को तत्कालीन भारत राष्ट्रपति श्री राजेन्द्र प्रसाद द्वारा १९५३ ई० में किया गया था। अन्तर्राष्ट्रीय स्तर पर शहरी योजनाबद्धता और वास्तु-स्थापत्य के लिए प्रसिद्ध यह शहर आधुनिक भारत का प्रथम योजनाबद्ध शहर है। चण्डीगढ़ के मुख्य वास्तुकार फ्रांसीसी वास्तुकार ली कार्बूजियर हैं, लेकिन शहर में पियरे जिएन्नरेट, मैथ्यु नोविकी एवं अल्बर्ट मेयर के बहुत से अद्भुत वास्तु नमूने देखे जा सकते हैं। शहर का भारत के समृद्ध राज्यों और संघ शसित प्रदेशों की सूची में अग्रणी नाम आता है, जिसकी प्रति व्यक्ति आय ९९,२६२ रु (वर्तमान मूल्य अनुसार) एवं स्थिर मूल्य अनुसार ७०,३६१ (२००६-०७) रु है। इतिहास ब्रिटिश भारत के विभाजन उपरांत १९४७ में पंजाब राज्य को भारत और पाकिस्तान में दो भागों में बाँट दिया गया था। इसके साथ ही राज्य की पुरानी राजधानी लाहौर पाकिस्तान के भाग में चली गयी थी। अब भारतीय पंजाब को एक नई राजधानी की आवश्यकता पड़ी। पूर्व स्थित शहरों को राजधानी बदलने में आने वाली बहुत सी कठिनाईयों के फलस्वरूप एक नये योजनाबद्ध राजधानी शहर की स्थापना का निश्चय किया गया तथा १९५२ में इस शहर की नींव रखी गई। उस समय में भारत में चल रही बहुत सी नवीन शहर योजनाओं में चंडीगढ़ को प्राथमिकता मिली जिसका मुख्य कारण एक तो नगर की स्थिति और दूसरा कारण तत्कालीन प्रधानमंत्री जवाहर लाल नेहरु तथा राज्यपाल सर सी पी एन ( चन्देश्वर प्रसाद नारायण सिंह ) का निजी रुचि का होना था । राष्ट्र के आधुनिक प्रगतिशील दृष्टिकोण के रूप में चंडीगढ़ को देखते हुए उन्होंने शहर को अतीत की परंपराओं से उन्मुक्त, राष्ट्र के भविष्य में विश्वास का प्रतीक बताया। शहर के बहुत से खाके व इमारतों की वास्तु रचना फ्रांस में जन्में स्विस वास्तुकार व नगर-नियोजक ली कार्बुज़िए ने १९५० के दशक में की थी। कार्बुज़िए भी असल में शहर के द्वितीय…"} {"text": "[EN Wikipedia] Real Club de Polo de Barcelona\n\nReal Club de Polo de Barcelona () is a country club in Barcelona, Spain. Established in 1897, it had 9000 members at the time of the 1992 Summer Olympics. Normally used for polo, field hockey, tennis, squash, and swimming by its members, the club was the venue for the Olympic equestrian competition (dressage, jumping, and the eventing finals) and the riding portion of the modern pentathlon events. Trophies Men's hockey División de Honor de Hockey: 15 1958, 1959, 1970, 1977, 1978, 1980, 1981, 1982, 2002, 2003, 2008, 2013, 2014, 2015, 2018 European Cup: 1 2003–04 Copa del Rey: 31 1916, 1917, 1922, 1924, 1925, 1929, 1941, 1957, 1958, 1959, 1960, 1962, 1964, 1970, 1974, 1976, 1979, 1980, 1981, 1982, 1983, 1989, 1996, 2003, 2008, 2013, 2014, 2016, 2017, 2019, 2020 Women's hockey División de Honor Femenina: 9 1964, 1965, 1972, 1973, 1977, 1978, 1979, 2003, 2006 Copa de la Reina: 3 2003, 2004, 2005 Current squad Men's squad Head coach: Katie Allen References External links 1992 Summer Olympics official report. Volume 2. pp. 221–24. Official website 1897 establishments in Catalonia Field hockey clubs established in 1897 Venues of the 1992 Summer Olympics Olympic equestrian venues Olympic modern pentathlon venues Sports venues in Barcelona Sports clubs and teams in Barcelona Field hockey clubs in Catalonia Polo clubs"} {"text": "[HI Wikipedia] सुभद्रा कुमारी चौहान\n\nसुभद्रा कुमारी चौहान (१६ अगस्त १९०४-१५ फरवरी १९४८) हिन्दी की सुप्रसिद्ध कवयित्री और लेखिका थीं। झाँसी की रानी (कविता) उनकी प्रसिद्ध कविता है। वे राष्ट्रीय चेतना की एक सजग कवयित्री रही हैं। स्वाधीनता संग्राम में अनेक बार जेल यातनाएँ सहने के पश्चात अपनी अनुभूतियों को कहानी में भी व्यक्त किया। जीवन परिचय उनका जन्म नागपंचमी के दिन इलाहाबाद के निकट निहालपुर नामक गांव में रामनाथसिंह के जमींदार परिवार में हुआ था। बाल्यकाल से ही वे कविताएँ रचने लगी थीं। उनकी रचनाएँ राष्ट्रीयता की भावना से परिपूर्ण हैं। सुभद्रा कुमारी चौहान, चार बहने और दो भाई थे। उनके पिता ठाकुर रामनाथ सिंह शिक्षा के प्रेमी थे और उन्हीं की देख-रेख में उनकी प्रारम्भिक शिक्षा भी हुई। इलाहाबाद के क्रास्थवेट गर्ल्स स्कूल में महादेवी वर्मा उनकी जूनियर और सहेली थीं। १९१९ में खंडवा के ठाकुर लक्ष्मण सिंह के साथ विवाह के बाद वे जबलपुर आ गई थीं। १९२१ में गांधी जी के असहयोग आंदोलन में भाग लेने वाली वह प्रथम महिला थीं। वे दो बार जेल भी गई थीं। सुभद्रा कुमारी चौहान की जीवनी, इनकी पुत्री, सुधा चौहान ने 'मिला तेज से तेज' नामक पुस्तक में लिखी है। इसे हंस प्रकाशन, इलाहाबाद ने प्रकाशित किया है। वे एक रचनाकार होने के साथ-साथ स्वाधीनता संग्राम की सेनानी भी थीं। डॉo मंगला अनुजा की पुस्तक सुभद्रा कुमारी चौहान उनके साहित्यिक व स्वाधीनता संघर्ष के जीवन पर प्रकाश डालती है। साथ ही स्वाधीनता आंदोलन में उनके कविता के जरिए नेतृत्व को भी रेखांकित करती है। १५ फरवरी १९४८ को एक कार दुर्घटना में उनका आकस्मिक निधन हो गया था। कथा साहित्य 'बिखरे मोती' उनका पहला कहानी संग्रह है। इसमें भग्नावशेष, होली, पापीपेट, मंछलीरानी, परिवर्तन, दृष्टिकोण, कदम्ब के फूल, किस्मत, मछुये की बेटी, एकादशी, आहुति, थाती, अमराई, अनुरोध, व ग्रामीणा कुल १५ कहानियां हैं! इन कहानियों की भाषा सरल बोलचाल की भाषा है! अधिकांश कहानियां नारी विमर्श पर केंद्रित हैं! उन्मादिनी शीर्षक से उनका दूसरा कथा संग्रह १९३४ में छपा। इस में उन्मादिनी, असमंजस, अभियुक्त, सोने की कंठी, नारी हृदय, पवित्र ईर्ष्या, अंगूठी की खोज, चढ़ा दिमाग, व वेश्या की लड़की कुल ९ कहानियां हैं। इन सब कहानियों का मुख्य स्वर पारिवारिक सामाजिक परिदृश्य ही है। 'सीधे साधे चित्र' सुभद्रा कुमारी चौहान का तीसरा व अंतिम कथा संग्रह है। इसमें कुल १४ कहानियां हैं। रूपा, कैलाशी नानी, बिआल्हा, कल्याणी, दो साथी, प्रोफेसर मित्रा, दुराचारी व मंगला - ८ कहानियों की कथावस्तु नारी प्रधान पारिवारिक सामाजिक समस्यायें हैं। हींगवाला, राही, तांगे वाला, एवं गुलाबसिंह कहानियां राष्ट्रीय विषयों पर आधारित हैं। सुभद्रा कुमारी चौहान ने कुल ४६ कहानियां लिखी और अपनी व्यापक कथा दृष्टि से वे एक अति लोकप्रिय कथाकार के रूप में हिन्दी साहित्य जगत में सुप्रतिष्ठित हैं। वातावरण चित्रण-प्रधान शैली की भाषा सरल तथा काव्यात्मक है, इस कारण इनकी रचना की सादगी हृदयग्राही है। सम्मान सेकसरिया पारितोषिक (१९३१) 'मुकुल' (कविता-संग्रह) के लिए सेकसरिया पारितोषिक (१९३२) 'बिखरे मोती' (कहानी-संग्रह) के लिए (दूसरी बार) भारतीय डाकतार विभाग ने ६ अगस्त १९७६ को सुभद्रा कुमारी चौहान के सम्मान में २५ पैसे का एक डाक-टिकट जारी किया है। भारतीय तटरक्षक सेना ने २८…"} {"text": "[HI Wikipedia] अज़रबाइजान\n\nआज़रबाइजान(अन्य वर्तनी:अज़रबैजान या अज़रबाइजान) (), कॉकेशस के पूर्वी भाग में एक गणराज्य है, पूर्वी यूरोप और एशिया के मध्य में बसा हुआ। भौगोलिक रूप से यह एशिया का ही भाग है। इसके सीमांत देश हैं: अर्मेनिया, जॉर्जिया, रूस, ईरान, तुर्की और इसका तटीय भाग कैस्पियन सागर से लगता हुआ है। यह १९९१ तक भूतपूर्व सोवियत संघ का भाग था। अज़रबैजान एक धर्मनिरपेक्ष देश है और वर्ष २००१ से काउंसिल का सदस्य है। अधिकांश जनसंख्या इस्लाम धर्म की अनुयायी है और यह देश इस्लामी सम्मेलन संघ का सदस्य राष्ट्र भी है। यह देश धीरे-धीरे औपचारिक लेकिन सत्तावादी लोकतंत्र की ओर बढ़ रहा है। नामोत्पत्ति \"अज़रबैजान\" नाम के उद्गम को लेकर कई प्रकार की अवधारणाएँ है। सबसे प्रचलित प्रमेय यह है कि यह नाम \"अट्रोपटन\" शब्द से निकला है। अट्रोपट फ़ारसी अकामीनाईड राजवंश के समय में एक क्षत्रप था, जिसे सिकंदर महान ने आक्रमण करके परास्त किया और अट्रोपटन को स्वाधीनता मिली। उस समय यह क्षेत्र मीदिया अट्रोपाटिया या अट्रोपाटीन के नाम से जाना जाता था। इस नाम की मूल उत्पत्ति की जड़ें प्राचीन ईरानी पंथ, पारसी धर्म में मानी जाती हैं। आवेस्ता के एक दस्तावेज़ में इस बात का उल्लेख है \"âterepâtahe ashaonô fravashîm ýazamaide\", प्राचीन फ़ारसी में जिसका शाब्दिक अनुवाद है \"पवित्र अटारे-पटा के फ़्रावशी की हम वंदना करते हैं\"। अट्रोपटनों ने अट्रोपटन (वर्तमान ईरानी अज़रबैजान) क्षेत्र पर शासन किया। \"अट्रोपटन\" नाम स्वयं एक प्राचीन-ईरानी, संभवतः मीदन, का यूनानी ध्वन्यात्मक युग्म है, जिसका अर्थ है \"पवित्र अग्नि द्वारा रक्षित\"। इतिहास अज़रबैजान में प्रारंभिक मानव बस्तियों के चिह्न पाषाण युग के बाद के दिनों के हैं। ५५० ईसापूर्व में एक्यूमेनिडा राजवंश ने इस क्षेत्र पर विजय प्राप्त की थी, जिससे पारसी धर्म का उदय हुआ और बाद में यह क्षेत्र सिकंदर महान के साम्राज्य का भाग बना और बाद में उसके उत्तराधिकारी, सेलियूसिडा साम्राज्य का। अल्बानियाई कॉकेशन लोगों ने चौथी शताबदी ईसापूर्व में इस क्षेत्र में एक स्वतंत्र राजशाही की स्थापना की, लेकिन ९५-६७ ईसापूर्व में टिगरानीस २ महान ने इसपर अधिकार कर लिया। यह भी देखिए अज़रबैजान (विक्षनरी) सन्दर्भ अज़रबैजान एशिया के देश यूरोप के देश"} {"instruction": "Create a Python script that prints all the combinations of a string.", "input": "String: \"ABC\"", "output": "def combinations(s): \n \n # Get the length of the string \n n = len(s) \n \n # A loop to pick starting point of substring \n for i in range(n): \n \n # Pick ending point of substring \n for j in range(i,n): \n \n # Print the substring \n for k in range(i,j+1): \n print(s[k], end=\"\") \n print() \n\ncombinations(\"ABC\")"} {"instruction": "Create a method to convert a given number to Roman numeral format.", "input": "num = 2020", "output": "def int_to_roman(num): roman_numerals = { 1: 'I', 4: 'IV', 5: 'V', 9: 'IX', 10: 'X', 40: 'XL', 50: 'L', 90: 'XC', 100: 'C', 400: 'CD', 500: 'D', 900: 'CM', 1000: 'M' } result = '' for n in sorted(roman_numerals.keys(), reverse=True): count = num // n result += roman_numerals[n] * count num %= n return result if __name__ == '__main__': num = 2020 print(int_to_roman(num))"} {"instruction": "Edit the following Python code such that it will print an array containing the seven days of the week.", "input": "days = [\"Monday\", \"Thuesday\", \"Wednesday\", \"Thrusday\", \"Friday\"]\n\nfor day in days:\n print(day)", "output": "days = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"]\n\nfor day in days:\n print(day)"} {"instruction": "Develop a function in Python to calculate the n factorial.", "input": "", "output": "def factorial(n):\n if n == 0:\n return 1\n else:\n return n*factorial(n-1)"} {"text": "[EN Wikipedia] Anthophyta\n\nThe anthophytes are a paraphyletic grouping of plant taxa bearing flower-like reproductive structures. The group, once thought to be a clade, contained the angiosperms - the extant flowering plants, such as roses and grasses - as well as the Gnetales and the extinct Bennettitales. Detailed morphological and molecular studies have shown that the group is not actually monophyletic, with proposed floral homologies of the gnetophytes and the angiosperms having evolved in parallel. This makes it easier to reconcile molecular clock data that suggests that the angiosperms diverged from the gymnosperms around 320-300 mya. Some more recent studies have used the word anthophyte to describe a hypothetical group which includes the angiosperms and a variety of extinct seed plant groups (with various suggestions including at least some of the following groups: glossopterids, corystosperms, Petriellales Pentoxylales, Bennettitales and Caytoniales), but not the Gnetales. References Historically recognized plant taxa"} {"instruction": "Write a python loop to print all the even numbers between 2 and 15 (inclusive).", "input": "", "output": "for i in range(2, 16): if i % 2 == 0: print(i)"} {"instruction": "Create a MongoDB document containing the following data", "input": "Name: John Age: 32 Occupation: Engineer", "output": "{ name: \"John\", age: 32, occupation: \"Engineer\" }"} {"instruction": "Create a React component to render a pie chart", "input": "", "output": "import React from 'react'; import {Pie} from 'react-chartjs-2'; const data = { labels: [ 'Red', 'Green', 'Yellow' ], datasets: [{ data: [300, 50, 100], backgroundColor: [ '#FF6384', '#36A2EB', '#FFCE56' ], hoverBackgroundColor: [ '#FF6384', '#36A2EB', '#FFCE56' ] }] }; export const PieChartComponent = () => { return (

      Pie Chart

      ); }"} {"instruction": "Build a type checking function to determine what kind of data is being processed, given a generic string in Python.", "input": "str = '123'", "output": "def check_type(str):\n try:\n int(str)\n return 'Integer'\n except ValueError:\n pass\n \n try:\n float(str)\n return 'Float'\n except ValueError:\n pass\n \n return 'String'\n\nprint(check_type('123')) # prints 'Integer'"} {"text": "[DE Wikipedia] Tomoe Gozen\n\nTomoe Gozen (japanisch , deutsch etwa: „Dame Tomoe“; * um 1157; † um 1247), veraltet Tomowe, war eine der wenigen weiblichen Krieger (Onna-musha) der japanischen Geschichte. Leben und Wirken Bis zur Schlacht von Awazu Tomoe Gozen kam laut dem Heike Monogatari aus der Provinz Shinano. Später war sie Yoshinakas Wächterin. Dies war nicht ungewöhnlich, waren seinerzeit doch viele japanische Frauen im Umgang mit Waffen (vor allem der Naginata) geübt, um ihr Heim verteidigen zu können oder als Ashigaru zu dienen. Tomoe Gozen verdiente sich aufgrund ihrer Fähigkeiten im Reiten, Bogenschießen und Kenjutsu rasch den Respekt ihrer männlichen Kameraden. Auch im Heike Monogatari wird Tomoe Gozen ausführlich beschrieben, wo erneut ihre Schönheit („weiße Haut, langes Haar und ein überaus bezauberndes Gesicht“) sowie ihre Fähigkeiten und ihre Tapferkeit gelobt werden. Die weit verbreitete Kakuichi-Fassung des Heike Monogatari beschreibt Tomoe als binjo (Dienerin, Untergebene), die Yoshinaka aus Shinano mitbrachte. Doch im weiteren Text wird sie als Ippō no Taishō (führender Kommandant) bezeichnet. Die Enkei-Bon-Fassung dieses Textes erwähnte Tomoe nicht als binjo, sondern als bijo (schöne Frau). Trotz solcher Unklarheiten wird Tomoe jedoch in allen Fassungen als gefürchtete Kriegerin beschrieben, die es „mit Tausenden“, ja auch mit „Dämonen oder Göttern“ aufnehmen konnte und ungebändigte Pferde (, arauma-nori) ritt. Ihre Herkunft wird von Version zu Version anders dargestellt: Im Heike Monogatari wird keine Verwandtschaft erwähnt, aber sie tritt in einigen Versionen (z. B. Gempei Seisuiki) als die Tochter von Nakahara no Kaneto auf, der Imai Kanehiras und Higuchi Kanemitsus Vater war, oder im Gempei Tojoroku als die Tochter von Higuchi Kanemitsu. Schlacht von Awazu Nachdem im Gempei-Krieg die Taira (Heike) geschlagen und westwärts getrieben wurden, setzte sich Minamoto no Yoshinaka an die Spitze des Klans und wählte Kyōto als seinen Sitz. Sein Vetter Minamoto no Yoritomo war darüber äußerst ungehalten und beauftragte seine beiden Brüder Minamoto no Yoshitsune und Minamoto no Noriyori, ihn zu töten. Dieser Konflikt gipfelte am 21. Februar 1184 in der Schlacht von Awazu. Als sich dabei Yoshinakas Niederlage abzeichnete, der ohnehin die ganze Zeit über in starker Unterzahl focht, soll dieser jedoch Tomoe Gozen aus ihrer Pflicht entlassen haben, da dieser meinte: „Es wäre eine Schande, wenn man sagen würde, dass Kiso Yoshinaka in seinem letzten Kampf von einer Frau begleitet wurde.“ Er wählte seinen Lieblingsdiener Imai Kanehira, der sein Adoptivbruder war, als einzige Begleitung in Awazu (siehe Heike Monogatari). Obwohl sie sich gegen diesen Befehl sträubte, war sie aufgrund ihres Eides gezwungen zu gehorchen. Bevor sie dem Wunsch ihres Herrn entsprach, hielt sie auf…"} {"instruction": "Write a Java program for removing all white spaces from a given string.", "input": "", "output": "public class RemoveSpace { public static String removeSpace(String str) { return str.replaceAll(\"\\\\s\",\"\"); } public static void main (String[] args) { String str = \"Hello World!\"; str = removeSpace(str); System.out.println(str); } }"} {"instruction": "Construct a CSS code that adds a background color of red to the ’div' element.", "input": "", "output": "div { background-color: red; }"} {"text": "[DE Wikipedia] Rindsmaul\n\nRindsmaul ist der Familienname folgender Personen: Rindsmaul steht für: Rindsmaul (Adelsgeschlecht), ursprünglich fränkisches, dann steirisches Adelsgeschlecht"} {"instruction": "Below is the code of a shopping list application. Modify it to add a function to calculate the total cost of all items in the list.", "input": "shopping_list = { 'item1': 2.5, 'item2': 3.5, 'item3': 4.25 }", "output": "shopping_list = { 'item1': 2.5, 'item2': 3.5, 'item3': 4.25 } def calculate_cost(list): cost = 0 for item in list: cost += list[item] return cost total_cost = calculate_cost(shopping_list) print(total_cost) # prints 10.25"} {"instruction": "Given a JSON string, write a function in JavaScript to extract the value for the key \"name\".", "input": "jsonString = {\"name\":\"John\", \"age\":30, \"city\":\"New York\"}", "output": "function getValueByKey(jsonString, key) { let jsonObj = JSON.parse(jsonString); return jsonObj[key]; } nameValue = getValueByKey(jsonString, \"name\"); console.log(nameValue) //prints \"John\""} {"instruction": "Write a Java program to compare two strings lexicographically.", "input": "Two strings: string1=\"GeeksforGeeks\" and string2=\"GeeksQuiz\"", "output": "public class CompareStringLexicographically { public static void main(String[] args) { String str1 = \"GeeksforGeeks\"; String str2 = \"GeeksQuiz\"; // Comparing both strings lexicographically int result = str1.compareTo(str2); // checking for the comparison output if (result > 0) System.out.println(\"str1 is greater than str2\"); else if (result < 0) System.out.println(\"str1 is smaller than str2\"); else System.out.println(\"str1 is equal to str2\"); } }"} {"instruction": "Formulate a spark query to delete records having a given value in a field", "input": "field: age; value: 18; table: people", "output": "DELETE FROM people WHERE age = 18;"} {"instruction": "Rewrite the following code snippet to use the generator in Python.", "input": "def squares_up_to_n(n):\n results = []\n for i in range(n):\n results.append(i**2)\n return results", "output": "def squares_up_to_n(n):\n for i in range(n):\n yield i**2"} {"instruction": "Calculate the sum of the squares of the given number array.", "input": "[2, 3, 4]", "output": "29 (2^2 + 3^2 + 4^2 = 4 + 9 + 16 = 29)"} {"instruction": "Create an algorithm in Python for removing duplicates from an array of integers.", "input": "[1, 2, 4, 5, 6, 2, 7, 4]", "output": "def remove_duplicates(arr):\n s = set()\n result = []\n for i in arr:\n if i not in s:\n s.add(i)\n result.append(i)\n return result\n\narr = [1, 2, 4, 5, 6, 2, 7, 4]\n\nprint(remove_duplicates(arr))\n# Output: [1, 2, 4, 5, 6, 7]"} {"instruction": "Write a code to wrap a text in a box, with the given length and padding parameters.", "input": "text = \"Hello World!\", length = 20, padding = 5", "output": "def wrap_in_box(text, length, padding): border = \"\" for i in range(length): border += \"-\" space = \"\" for i in range(padding): space += \" \" text = space + text + space if len(text) > length: text = text[:length-1] text = text.center(length) print(border) print(text) print(border)"} {"instruction": "Build an algorithm in Python for finding the sum of all the odd numbers in a given array.", "input": "[1, 2, 3, 4, 5, 6]", "output": "def sumOddNumbers(arr):\n sum = 0\n for num in arr:\n if num % 2 != 0:\n sum += num\n return sum\n\narr = [1, 2, 3, 4, 5, 6]\nprint(sumOddNumbers(arr))"} {"instruction": "Create a program which takes a string and replaces all instances of the letter \"e\" with \"X\".", "input": "\"Hello world\"", "output": "def replace_e_with_x(s): \"\"\"Function to replace all instances of the letter \"e\" with \"X\"\"\" return s.replace('e', 'X') print(replace_e_with_x(\"Hello world\")) # Output: \"HXllo world\""} {"instruction": "Create a REST API using the Flask framework in Python to create, read, update and delete records from a database.", "input": "Not applicable", "output": "from flask import Flask, request\nfrom flask_restful import Resource, Api\nfrom flask_sqlalchemy import SQLAlchemy\n\napp = Flask(__name__)\n\n# Connect to the database\napp.config['SQLALCHEMY_DATABASE_URI'] = 'YOUR DB URI'\ndb = SQLAlchemy(app)\n\n# Create a model class for table row\nclass TableRow(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Column(db.String(50), nullable=False)\n description = db.Column(db.String(50), nullable=False)\n\n# Create a REST API using Flask-RESTful\napi = Api(app)\n\n# Create the API's endpoints\nclass CreateRecord(Resource):\n def post(self):\n # Get the request body\n json_data = request.get_json()\n # Create a new record\n new_record = TableRow(name=json_data['name'], description=json_data['description'])\n db.session.add(new_record)\n db.session.commit()\n return {'status': 'success'}, 201\n\nclass ReadRecord(Resource):\n def get(self, id):\n # Get a record by id\n record = TableRow.query.filter_by(id=id).first()\n # Check if record exists\n if record:\n return {'name': record.name, 'description': record.description}, 200\n return {'status': 'not found'}, 404\n\nclass UpdateRecord(Resource):\n def put(self, id):\n # Get the record\n record = TableRow.query.filter_by(id=id).first()\n # Check if record exists\n if record:\n # Get the request body\n json_data = request.get_json()\n # Update the record\n record.name = json_data['name']\n record.description = json_data['description']\n db.session.commit()\n return {'status': 'success'}, 200\n return {'status': 'not found'}, 404\n\nclass DeleteRecord(Resource):\n def delete(self, id):\n # Get the record\n record = TableRow.query.filter_by(id=id).first()\n # Check if record exists\n if record:\n # Delete the record\n db.session.delete(record)\n db.session.commit()\n return {'status': 'success'}, 200\n return {'status': 'not found'}, 404\n\n# Add the API's endpoints to the API\napi.add_resource(CreateRecord, '/create')\napi.add_resource(ReadRecord, '/read/')\napi.add_resource(UpdateRecord, '/update/')\napi.add_resource(DeleteRecord, '/delete/')\n\nif __name__ == '__main__':\n app.run(debug=True)"} {"instruction": "Write a JavaScript function that sorts an array of strings alphabetically.", "input": "myArray = [\"cat\",\"apple\",\"dog\"]", "output": "function sortArray(arr) { let sortedArray = arr.sort(); return sortedArray; }"} {"instruction": "Write a function in Python to evaluate an algebraic expression", "input": "exp= \"((x+y)^2)*(x+1)\"\nx=2\ny=3", "output": "def evaluate_expr(expr,x,y):\n x = float(x)\n y = float(y)\n\n def eval_expr(expr):\n return eval(expr)\n\n evaluation = eval_expr(expr.replace(\"x\", str(x)).replace(\"y\", str(y)))\n return evaluation\n \nexp = \"((x+y)^2)*(x+1)\"\nx = 2\ny = 3\nprint(evaluate_expr(exp,x,y))"} {"instruction": "Suggest an improvement for the following piece of code", "input": "def addTwoNumbers(a, b): return a + b", "output": "def addTwoNumbers(a, b): try: if type(a) == str or type(b) == str: raise TypeError('Inputs must be of type int or float') return a + b except TypeError as e: print(e)"} {"instruction": "Can you create a Python program to find prime numbers within a given range?", "input": "", "output": "def is_prime(n):\n if n <= 1:\n return False\n for i in range(2, n):\n if n % i == 0:\n return False\n return True\n\n\ndef find_prime_numbers(a, b):\n result = []\n for num in range(a, b + 1):\n if is_prime(num):\n result.append(num)\n return result\n\n\nstart = 2\nend = 20\nprint(find_prime_numbers(start, end))"} {"text": "[EN Wikipedia] Cryptanaerobacter\n\nCryptanaerobacter is a genus in the phylum Bacillota (Bacteria). Etymology The name Cryptanaerobacter derives from: Greek cryptos (κρυπτός), hidden; an (ἄν), not; aer, aeros (ἀήρ, ἀέρος), air; Neo-Latin, a rod bacter, nominally meaning \"a rod\", but in effect meaning a bacterium, rod; giving Cryptanaerobacter, an anaerobic rod that is hidden within the consortium. Species The genus contains a single species, Cryptanaerobacter phenolicus (Juteau et al. 2005, (ype species of the genus). The specific name is from Latin phenol, phenol; icus, suffix used in adjectives with the sense of belonging to; giving phenolicus, belonging to phenol.) See also Bacterial taxonomy Microbiology References Peptococcaceae Monotypic bacteria genera Bacteria genera"} {"instruction": "Write a for loop in Java to print all the numbers in a given list.", "input": "int[] list = {21, 34, 54, 77, 92};", "output": "for (int i = 0; i < list.length; i++) { System.out.println(list[i]); }"} {"instruction": "Create a Python function that takes two lists as parameters, and returns the first list with each element doubled.", "input": "list1: [1, 2, 3] \nlist2: [4, 5, 6]", "output": "def double_list(list1,list2):\n for i in range(len(list1)):\n list1[i] *= 2\n return list1\n\nlist1 = [1, 2, 3] \nlist2 = [4, 5, 6]\n\nprint(double_list(list1,list2))"} {"instruction": "Write a SQL query to select all the vehicles from a table that are owned by John.", "input": "Table name: vehicles Columns: owner_name, vehicle", "output": "SELECT vehicle FROM vehicles WHERE owner_name = 'John'"} {"instruction": "Write a Python program to determine the number of elements in a given array before the return value is -1.", "input": "Array = [2, 3, -1, 5, 4, 7]", "output": "def countElements(Array): \n count = 0\n for i in Array: \n if i != -1: \n count = count + 1\n else: \n break\n return count"} {"instruction": "Create a Python script that takes two integers as input and prints out their greatest common divisor.", "input": "30, 54", "output": "def gcd(a, b): \n if b == 0:\n return a \n else:\n return gcd(b, a % b)\n\nif __name__ == \"__main__\":\n a = int(input(\"Enter first integer: \"))\n b = int(input(\"Enter second integer: \"))\n result = gcd(a, b)\n print(\"The GCD of {} and {} is: {}\".format(a, b, result))"} {"text": "[EN Wikipedia] Pseudoschrankia brevipalpis\n\nPseudoschrankia brevipalpis is a species of moth in the genus Pseudoschrankia, endemic to Oahu in the Hawaiian Islands. It is a pollinator of Schiedea kaalae. References Endemic moths of Hawaii Hypeninae Moths described in 2015"} {"instruction": "Generate a correct SQL query to retreive a subset of rows in a table", "input": "Table Name: students Condition: Retrieve rows where the student grade is greater than 80", "output": "SELECT * FROM students WHERE grade > 80;"} {"instruction": "Create a program in Python to calculate the factorial of any given non-negative number n.", "input": "", "output": "def factorial(n):\n factorial = 1\n while n > 0:\n factorial *= n\n n -= 1\n return factorial"} {"instruction": "Follow the comments in the code to complete the program which prints a conversion table from Fahrenheit to Celsius.", "input": "# This program prints a conversion table from Fahrenheit to Celsius # Print a heading for the table # TODO # Print the column headings # TODO # Calculate and print the table body # TODO", "output": "# This program prints a conversion table from Fahrenheit to Celsius # Print a heading for the table print(\"Fahrenheit to Celsius Conversion Table\") # Print the column headings print(\"Fahrenheit \\t Celsius\") # Calculate and print the table body for fahr in range(-50 , 121): celsius = (fahr - 32) * 5 / 9 print(\"%3d \\t\\t %.2f\" % (fahr, celsius))"} {"instruction": "Generate a python program to read the contents from a given URL", "input": "", "output": "import requests\n\ndef read_url(url):\n r = requests.get(url)\n if r.status_code == 200:\n return r.text\n else:\n return None"} {"instruction": "Generate a program in Python to calculate the area of a circle given its radius.", "input": "5.5", "output": "import math\n\ndef calculate_area_of_circle(radius):\n area = math.pi * radius ** 2\n return area\n\nresult = calculate_area_of_circle(5.5)\nprint('The area of the circle is: ', result)"} {"instruction": "Generate an array with the numbers from -10 to 10 in incremental order.", "input": "", "output": "let arr = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];"} {"instruction": "Use regex to match a substring, 'the' within a sentence.", "input": "The quick brown fox", "output": "regex = /the/ This regex will match the substring \"the\" in the sentence \"The quick brown fox.\""} {"text": "[HI Wikipedia] कंपनी राज\n\nकंपनी राज का अर्थ है ब्रिटिश ईस्ट इण्डिया कम्पनी द्वारा भारत पर शासन। यह 1773 में शुरू किया है, जब कंपनी ने कोलकाता में एक राजधानी की स्थापना की है, अपनी पहली गवर्नर जनरल वॉरेन हेस्टिंग्स नियुक्त किया और संधि का एक परिणाम के रूप में 1764 बक्सर का युद्ध के बाद सीधे प्रशासन, में शामिल हो गया है लिया जाता है। 1765 में, जब बंगाल के नवाब कंपनी से हार गया था, और दीवानी प्रदान की गई थी, या बंगाल और बिहार में राजस्व एकत्रित करने का अधिकार हैशा सन १८५८ से,१८५७ जब तक चला और फलस्वरूप भारत सरकार के अधिनियम १८५८ के भारतीय विद्रोह के बाद, ब्रिटिश सरकार सीधे नए ब्रिटिश राज में भारत के प्रशासन के कार्य ग्रहण किया। विस्तार और क्षेत्र अंग्रेजी ईस्ट इंडिया कंपनी (इसके बाद, कंपनी) 1600 में कंपनी व्यापारियों की लंदन के ईस्ट इंडीज में व्यापार के रूप में स्थापित किया गया था यह 1612 में भारत में एक पैर जमाने बाद मुगल सम्राट जहांगीर द्वारा दिए गए अधिकारों के एक कारखाने, या सूरत के पश्चिमी तट पर बंदरगाह में व्यापारिक पोस्ट 1640 में स्थापित की। विजयनगर शासक से इसी तरह की अनुमति प्राप्त करने के बाद आगे दक्षिण, एक दूसरे कारखाने के दक्षिणी तट पर मद्रास में स्थापित किया गया था। बंबई द्वीप, सूरत से अधिक दूर नहीं था, एक पूर्व पुर्तगाली चौकी ब्रागणसा की कैथरीन के चार्ल्स द्वितीय शादी में दहेज के रूप में इंग्लैंड के लिए भेंट की चौकी, 1668 में कंपनी द्वारा पट्टे पर दे दिया गया था। दो दशक बाद, कंपनी पूर्वी तट पर एक उपस्थिति के रूप में अच्छी तरह से स्थापित हुई और, गंगा नदी डेल्टा में एक कारखाने को कोलकाता में स्थापित किया गया था। के बाद से, इस समय के दौरान अन्य कंपनियों पुर्तगाली, डच, फ्रेंच और डेनिश थे इसी तरह इस क्षेत्र में विस्तार की स्थापना की, तटीय भारत पर अंग्रेजी कंपनी की शुरुआत भारतीय उपमहाद्वीप पर एक लंबी उपस्थिति निर्माण करे ईस का कोई सुराग पेशकश नहीं की। प्लासी का पहला युद्ध 1757 में कंपनी ने रॉबर्ट क्लाइव के तहत जीत और 1764 बक्सर की लड़ाई (बिहार में) में एक और जीत, कंपनी की शक्ति मजबूत हुई और सम्राट शाह आलम यह दीवान की नियुक्ति द्वितीय और बंगाल का राजस्व कलेक्टर, बिहार और उड़ीसा। कंपनी इस तरह 1773 से नीचा गंगा के मैदान के बड़े क्षेत्र के वास्तविक शासक बन गए। यह भी डिग्री से रवाना करने के लिए बम्बई और मद्रास के आसपास अपने उपनिवेश का विस्तार। एंग्लो - मैसूर युद्धों(1766-1799) और एंग्लो - मराठा युद्ध (1772-1818) के सतलुज नदी के दक्षिण भारत के बड़े क्षेत्रों के नियंत्रण स्थापित कर लिया। कंपनी की शक्ति का प्रसार मुख्यतः दो रूपों लिया। इनमें से पहला भारतीय राज्यों के एकमुश्त राज्य-हरण और अंतर्निहित क्षेत्रों, जो सामूहिक रूप से ब्रिटिश भारत समावेश आया के बाद प्रत्यक्ष शासन था। पर कब्जा कर लिया क्षेत्रों उत्तरी प्रांतों (रोहिलखंड, गोरखपुर और दोआब शामिल) (1801), दिल्ली (1803) और सिंध (1843) शामिल हैं। पंजाब, उत्तर - पश्चिम सीमांत प्रांत और कश्मीर, 1849 में एंग्लो - सिख युद्धों के बाद कब्जा कर लिया गया है, तथापि, कश्मीर तुरंत जम्मू के डोगरा राजवंश अमृतसर (1850) की संधि के तहत बेच दिया है और इस तरह एक राजसी राज्य बन गया। बरार में 1854 पर कब्जा कर लिया गया था और दो ​​साल बाद अवध के…"} {"text": "[CS Wikipedia] Pilot Pen Tennis 2009 – muži\n\nTenisový turnaj na okruhu ATP Pilot Pen Tennis 2009 se konal ve dnech 23.–29. srpna v americkém New Havenu venku na kurtech s tvrdým povrchem. Odměny činily 750,000 USD. Dvouhra Nasazení hráčů V závorce je kolo, ve kterém hráč vypadl. Všichni nasazení hráči měli v 1. kole volný los. Ceny a body do žebříčku Pavouk Finálová fáze Horní polovina 1. Sekce 2. Sekce Dolní polovina 3. Sekce 4. Sekce Čtyřhra Nasazení hráčů V závorce je kolo, ve kterém hráči vypadli. Ceny a body do žebříčku Pavouk Související články Pilot Pen Tennis Pilot Pen Tennis 2009 - ženy Reference Pavouk dvouhry Pavouk čtyřhry Externí odkazy Oficiální stránka turnaje ATP World Tour 2009 Connecticut Open Tenis v USA v roce 2009"} {"instruction": "Create a Python object-oriented program to represent a hospital patient. The patient object should contain attributes for name, age, birthdate, and current medical conditions.", "input": "Not applicable", "output": "class Patient:\n def __init__(self, name, age, birthdate, conditions):\n self.name = name\n self.age = age\n self.birthdate = birthdate\n self.conditions = conditions\n\ndef get_name(self):\n return self.name\n\ndef get_age(self):\n return self.age\n\ndef get_birthdate(self):\n return self.birthdate\n\ndef get_conditions(self):\n return self.conditions\n\ndef update_conditions(self, conditions):\n self.conditions = conditions"} {"text": "[CS Wikipedia] Kostel Nanebevzetí Panny Marie (Nové Město na Moravě)\n\nKostel Nanebevzetí Panny Marie je filiální a hřbitovní kostel v římskokatolické farnosti Nové Město na Moravě, nachází se v centru města Nové Město na Moravě na Malé ulici. Kostel je jednolodní stavba z 16. století s půlkruhovým závěrem a protáhlou lodí. Kostel se nachází na hřbitově, který původně sloužil jako morový. Kostel nemá věž, pouze malou polygonální věžičku na západní straně. Kostel je chráněn jako kulturní památka České republiky. V kostele se konají pohřební bohoslužby a poutní mše svatá o slavnosti Nanebevzetí Panny Marie. Historie Kostel byl postaven někdy v 16. století, jednou z možností je, že kostel byl postaven kolem roku 1610 nebo 1620 luterány. Pro katolické bohoslužby byl kostel upraven v 17. století, přestavěn do dnešní podoby byl v roce 1749. Kostel získal patrocinium v roce 1662, již v tu dobu tak kostel existoval. Kolem roku 1741 pak byl rozšířen hřbitov při kostelu a byl ohrazen kamennou zdí. V roce 1749 pak byl kostel značně rozšířen a přestavěn, kostel byl výrazně zvětšen. Stavba byla dokončena v roce 1750 a téhož roku byl kostel vysvěcen. V roce 1801 kostel vyhořel a až do roku 1843 byl kostel nepoužíván, v roce 1814 však byla do kostela pořízena socha svatého Antonína Paduánského a v roce 1823 byl na kostele vyvšen kříž. V roce 1828 byl kostel pokryt novou šindelovou věží a později byl kostel nadále upravován a kůr, kazatelna a lavice byly následně také obnoveny. V roce 1853 byl kůr kostela nahrazen zděným, byla přistavěna předsíň a byla pořízena kazatelna, oltář a varhany. V padesátých či šedesátých letech 19. století pak byl kostel nově vydlážděn. Kostel pak byl v roce 1899 opraven a generální rekonstrukce proběhla 1930 a 1931. Roku 1946 byl do kostela pořízen zvon. V roce 1950 pak byl kostel elektrifikován a roku 1953 byly opraveny varhany. Odkazy Reference Související články Nové Město na Moravě Římskokatolická farnost Nové Město na Moravě Externí odkazy Farnost na stránkách biskupství brněnského Nanebevzetí Panny Marie Nové Město na Moravě Nanebevzetí Panny Marie Nové Město na Moravě Nanebevzetí Panny Marie Nové Město na Moravě Kulturní památky v okrese Žďár nad Sázavou"} {"text": "[DE Wikipedia] Peter Hauptmann (Theologe)\n\nPeter Hauptmann (* 25. März 1928 in Chemnitz; † 23. Juni 2016 in Überlingen) war ein deutscher lutherischer Theologe, Professor für Kirchengeschichte Osteuropas und Theologiegeschichte der Lutherischen Konfessionskirchen an der Westfälischen Wilhelms-Universität Münster, sowie Pfarrer der Selbständigen Evangelisch-Lutherischen Kirche und später der Evangelisch-Lutherischen Freikirche. Leben und akademisches Wirken Peter Hauptmann kam 1928 in Chemnitz zur Welt, wo er auch die Heilige Taufe empfing. Er studierte von 1947 bis 1953 Theologie in Berlin, Rostock und Münster. 1953 promovierte er in Münster mit einer Arbeit über den altrussischen Glauben. Schon während seines Studiums war Peter Hauptmann, aus Protest gegen den Beitritt der lutherischen Landeskirchen zur EKD, der Selbständigen Evangelisch-Lutherischen Kirche in Hessen beigetreten, die eine Vorgängerkirche der heutigen Selbständigen Evangelisch-Lutherischen Kirche (SELK) ist. Von 1954 bis 1955 wirkte er als Vikar und Lehrer am Missionsseminar der Bleckmarer Mission unter Friedrich Wilhelm Hopf. An der Lutherischen Theologischen Hochschule Oberursel bestand er im November 1955 das Zweite Theologische Examen und wurde am 4. Dezember 1955 in Rodenberg am Deister durch Superintendent Martin zum Heiligen Amt der Kirche ordiniert. Im Anschluss an seine Ordination arbeitete Peter Hauptmann als Pfarrverweser in den Gemeinden Höchst, Usenborn und im fränkischen Mühlhausen. 1958 ging Hauptmann zurück an die Universität Münster und arbeitete dort am Ostkirchen-Institut unter der Leitung von Robert Stupperich, dessen Nachfolge er auch später antrat. Er habilitierte sich 1968 über die Katechismen der Ostkirche und bekam einen Lehrstuhl für Kirchengeschichte Osteuropas und Theologiegeschichte der Lutherischen Konfessionskirchen. Diesen Lehrstuhl hatte er bis 1990 inne. Seine Arbeitsschwerpunkte lagen in der Ostkirchenkunde und der Erforschung der Geschichte der lutherischen Freikirchen. Während seiner Zeit in Münster war er nicht der einzige Inhaber eines theologischen Lehrstuhls, der Glied der dortigen altlutherischen Gemeinde war. Hierzu zählten auch seine Kollegen Ernst Kinder (Systematische Theologie) und Karl Heinrich Rengstorf (Neues Testament). Zentraler Gegenstand seiner Forschungen zu den Ostkirchen war im Wesentlichen die Russisch-Orthodoxe Kirche und hier vor allem die oppositionelle verfolgte Bewegung der Altgläubigen, denen er mehrere Referate im Jahrbuch Kirche im Osten widmete und schließlich eine späte Gesamtdarstellung widmete. In ihnen fand er eine seine altlutherische Gemeindezugehörigkeit spiegelnde Heimat. Als in der SELK, zu deren Ministerium Peter Hauptmann gehörte, in den 1990er Jahren immer wieder das Thema Frauenordination diskutiert wurde, trat er aus der SELK aus und in die…"} {"text": "[CS Wikipedia] Kaplická brázda\n\nKaplická brázda je geomorfologický podcelek v západní části Novohradského podhůří. Jedná se o v severojižním směru protáhlou prolomovou sníženinu širokou 5–12 km, která je pokračováním severně položené Českobudějovické pánve. Je ohraničena výraznými zlomovými svahy – zejména na západě, kde sousedí s Prachatickou hornatinou a Českokrumlovskou vrchovinou. Východní ohraničení tvoří převážně údolí Malše, za nímž se zvedají Stropnická pahorkatina a Soběnovská vrchovina. Střední nadmořská výška Kaplické brázdy 568,5 m. Geomorfologické okrsky Kroclovská pahorkatina Velešínská pahorkatina Netřebický práh Stradovská kotlina Dolnodvořišťská sníženina Cetvinská kotlina Geologická stavba Kaplická brázda je složená z kaplických svorů, svorových rul a vyvřelin centrálního moldanubického plutonu. Zbytky neogénních usazenin jsou považovány za doklad dřívějšího odvodňování prolomu k jihu – do povodí Dunaje. Reference Externí odkazy Novohradské podhůří Geografie okresu Český Krumlov Geografie okresu České Budějovice Brázdy v Česku Geomorfologické podcelky v Česku"} {"instruction": "Develop a program in Python to store 5 integer numbers in a list and print out the maximum value.", "input": "[7, 9, 23, 0, 4]", "output": "numbers = [7, 9, 23, 0, 4]\n\nmaximum = max(numbers)\n\nprint(\"The maximum value is: \"+ str(maximum))"} {"instruction": "Create a Python script to scrape all links from a web page.", "input": "", "output": "import requests from bs4 import BeautifulSoup page = requests.get('') soup = BeautifulSoup(page.text, 'html.parser') links = [] for link in soup.find_all('a'): links.append(link.get('href')) # Usage print(links)"} {"instruction": "Write an outbound rule in Firewall to block traffic from a certain IP address.", "input": "IP address: 123.123.123.123", "output": "sudo iptables -A OUTPUT -s 123.123.123.123 -j DROP"} {"text": "[CS Wikipedia] Memoriál Zdeňka Jánoše\n\nMemoriál Zdeňka Jánoše je fotbalový turnaj určený internacionálům starším 35 let. Pojmenován je na počest prvoligového brankáře Zdeňka Jánoše. Propozice turnaje Turnaj se hraje systémem, kdy každý účastník sehraje utkání s každým dalším účastníkem. Za vítězné utkání mužstvo obdrží 3 body, za remizované 1 bod a za prohrané 0 bodů. Po sehrání všech předepsaných utkání se sestaví tabulka a v turnaji vítězí mužstvo s nejvyšším počtem získaných bodů. V případě rovnosti bodů rozhoduje vyšší počet vstřelených branek. 1. ročník (2000) Výsledky zápasů: Tabulka turnaje: 2. ročník (2001) Výsledky zápasů: Tabulka turnaje: 4. ročník (2003) Výsledky zápasů: Tabulka turnaje: 5. ročník (2004) Výsledky zápasů: Tabulka turnaje: Reference České fotbalové soutěže Události nazvané po osobách Sportovní události založené roku 2000"} {"instruction": "Create a python script to categorize a given text into three categories: positive, negative and neutral.", "input": "", "output": "import re\n\ndef categorize_text(text):\n \"\"\"Categorizes the given text into positive, negative or neutral.\"\"\"\n text = text.lower()\n if re.search(r\"\\b(happy|glad|fun)\\b\", text):\n return \"positive\"\n elif re.search(r\"\\b(sad|angry|fearful)\\b\", text):\n return \"negative\"\n else:\n return \"neutral\""} {"instruction": "Embed a mathematical expression in Python and print the expression.", "input": "x**3 + 2*x**2 + 3", "output": "expression = 'x**3 + 2*x**2 + 3'\n\nprint(eval(expression))"} {"instruction": "Create a function in Python to extract words from a sentence.", "input": "", "output": "def extract_words(sentence): \n return sentence.split()"} {"text": "[HI Wikipedia] इलिनॉय\n\nइलिनॉय () अमरीका का एक राज्य है। इसकी राजधानी स्प्रिंगफील्ड है। इस राज्य में शिकागो सबसे बड़ा शहर है। इसे 1818 में राज्य का दर्जा प्राप्त हुआ। यह 6वां सबसे अधिक जनसंख्या वाला राज्य और भूमि क्षेत्र के मामले में 25वां सबसे बड़ा राज्य है। इलिनोइस का एक विविध आर्थिक आधार है और यह एक प्रमुख परिवहन केंद्र है। शिकागो का बंदरगाह विशाल झीलों के माध्यम से राज्य को अन्य वैश्विक बंदरगाहों से जोड़ता है। दशकों से ओ'हारे अंतर्राष्ट्रीय हवाईअड्डा को दुनिया के सबसे व्यस्ततम हवाई अड्डों में से एक के रूप में गिना जाता है। सबसे पहले 17वीं और 18वीं शताब्दी में यूरोपीय जनसंख्या राज्य के पश्चिम में मिसिसिपी नदी पर बसी, जो कि फ्रांसीसी कनाडाई उपनिवेशवादी थे। अमेरिकी क्रन्तिकारी युद्ध के पश्चात् संयुक्त राज्य की स्थापना हुई और अमेरिकी आबादकार 1810 के दशक में एपलाशियन पर्वतमाला को पार करके बसना शुरू हुए। शिकागो की 1830 के दशक में शिकागो नदी के तट पर स्थापना की गई जो कि दक्षिणी मिशिगन झील पर चुनिंदा प्राकृतिक बंदरगाहों में से एक है। जॉन डेयर के नए प्रकार के स्टील के हल के आविष्कार ने इलिनोइस के समृद्ध प्रेरी को दुनिया के सबसे अधिक उत्पादक पूर्ण और मूल्यवान खेतों में बदल दिया, जिसने जर्मनी और स्वीडन के नए आप्रवासी किसानों को आकर्षित किया। इलिनोइस में रहने के दौरान तीन अमेरिकी राष्ट्रपतियों का निर्वाचिन हुआ है: अब्राहम लिंकन, युलीसेस सिंपसन ग्रांट, और बराक ओबामा। इसके अतिरिक्त रोनाल्ड रीगन, जिनका राजनीतिक कैरियर कैलिफोर्निया में स्थित था, इलिनोइस में पैदा और पले-बढ़े हुए एकमात्र अमेरिकी राष्ट्रपति है। अब इलिनोइस ने लिंकन को अपने आधिकारिक नारे, लैंड ऑफ़ लिंकन के साथ सम्मानित किया है जो कि 1954 से उसके लाइसेंस प्लेटों पर प्रदर्शित किया जा रहा है। सन्दर्भ बाहरी कड़ियाँ संयुक्त राज्य अमेरिका के राज्य"} {"instruction": "Using a for loop, calculate the distance between one point to every other point in the given list.", "input": "points = [ (10, 20), (12, 22), (14, 24) ]", "output": "# Using a for loop, calculate the distance between one point to every other point in the given list from math import sqrt distances = [] for i in range(len(points)): for j in range(len(points)): if i != j: x1, y1 = points[i] x2, y2 = points[j] distance = sqrt((x2 - x1)**2 + (y2 - y1)**2) distances.append(distance) print(distances) # Output: [2.8284271247461903, 4.242640687119285, 2.8284271247461903]"} {"instruction": "Can you create a Python program that converts binary numbers to decimal numbers?", "input": "binary_number = \"1010\"", "output": "def binary_to_decimal(binary_number):\n decimal_number = 0\n for digit in binary_number:\n decimal_number = decimal_number*2 + int(digit)\n return decimal_number\n\nbinary_number = \"1010\"\n\nprint(binary_to_decimal(binary_number)) # 10"} {"instruction": "Create a function that prints the binary representation of a number.", "input": "number = 5", "output": "def print_binary(number): binary_string = \"\" while number != 0: remainder = number % 2 binary_string = str(remainder) + binary_string number = number // 2 return binary_string print(print_binary(number))"} {"instruction": "Write a code snippet to create a new JavaScript array of n length.", "input": "", "output": "var array = []; for (var i = 0; i < n; i++) { array.push(null); }"} {"instruction": "Create a data visualization in Python using Matplotlib that displays the total number of cases for coronavirus in different countries.", "input": "[[United States, 212000], [Russia, 180000], [Italy, 105000], [Spain, 90000], [Germany, 70000]]", "output": "import matplotlib.pyplot as plt\n\ncountry_data = [['United States', 212000], ['Russia', 180000], ['Italy', 105000], ['Spain', 90000], ['Germany', 70000]]\ncountry = [data[0] for data in country_data]\ncases = [data[1] for data in country_data]\n\nplt.barh(country, cases)\nplt.title(\"Total number of Coronavirus cases by country\")\nplt.xlabel('Number of cases')\nplt.ylabel('Country')\nplt.show()"} {"instruction": "Create a Python function to generated permutations of a given list of numbers.", "input": "[1, 2, 3]", "output": "def permutations(arr):\n if len(arr) == 0:\n return []\n\n if len(arr) == 1:\n return [arr]\n\n l = []\n for i in range(len(arr)):\n m = arr[i]\n remL = arr[:i] + arr[i+1:]\n for p in permutations(remL):\n l.append([m] + p)\n return l\n\npermutations([1, 2, 3])"} {"instruction": "Debug the following code by finding the syntax error.", "input": "def calculate_value(nums): result = 0 for num in nums result += num return result", "output": "def calculate_value(nums): result = 0 for num in nums: # missing colon result += num return result"} {"instruction": "Solve the following equation for x.", "input": "3x + 4 = 10", "output": "x = (10 - 4) / 3 x = 2"} {"instruction": "Write an algorithm in Python to sort a given list using the bubble sort technique.", "input": "", "output": "def bubble_sort(arr): \n n = len(arr) \n for i in range(n): \n for j in range(0, n-i-1): \n if arr[j] > arr[j+1] :\n arr[j], arr[j+1] = arr[j+1], arr[j]"} {"instruction": "Write a Python script to convert a string containing temperatures in Celsius to Fahrenheit", "input": "string celsius = '25, 15, 32'", "output": "def convertCelsiusToFahrenheit(celsius):\n temperature_fahrenheit = []\n\n for c in celsius.split(','):\n temperature_fahrenheit.append(float(c)*1.8 + 32)\n\n return temperature_fahrenheit\n\nfahrenheit = convertCelsiusToFahrenheit(celsius)\nprint(fahrenheit)"} {"instruction": "Transform the below SQL query into MongoDB.", "input": "SELECT user_id, COUNT(*) FROM orders WHERE status = 'completed' GROUP BY user_id ORDER BY COUNT(*) DESC;", "output": "db.orders.aggregate([ {$match: {status: 'completed'}}, {$group: {user_id: '$user_id', count: {$sum: 1}}}, {$sort: {count: -1 }} ])"} {"text": "[EN Wikipedia] Xe Bang Fai River\n\nThe Xe Bang Fai River (Nam Xebangfai) is a river in Laos. It originates in the Annamite Range on the border between Laos and Vietnam at . It flows through Khammouane Province and Savannakhet Province. Xe Bang Fai River Cave Xe Bang Fai River Cave is in Hin Namno National Park in Khammouane Province. It is believed to be one of the largest river caves in the world with passages some 120 meters tall and 200 meters wide, and a subterranean channel seven kilometres long. Notes References External links Account of a visit to the Xe Bang Fai cave in 2014 Account of a second visit to the Xe Bang Fai cave, Tham Khoun Xe in 2015 Rivers of Laos Geography of Savannakhet province Geography of Khammouane province"} {"instruction": "Generate a Python class to store a database table into memory.", "input": "Table Name: \"People\"\nColumns: \"id\", \"name\", \"age\", \"gender\", \"address\"", "output": "class People:\n def __init__(self, id, name, age, gender, address):\n self.id = id\n self.name = name\n self.age = age\n self.gender = gender\n self.address = address\n\n def get_data(self):\n data = {\n 'id': self.id,\n 'name': self.name,\n 'age': self.age,\n 'gender': self.gender,\n 'address': self.address\n }\n return data\n\n def set_data(self, data):\n self.id = data['id']\n self.name = data['name']\n self.age = data['age']\n self.gender = data['gender']\n self.address = data['address']"} {"instruction": "Design a Flask application in Python to create an API endpoint for user registration.", "input": "Not applicable", "output": "from flask import Flask, request\n\napp = Flask(name)\n\n@app.route('/users', methods=['POST'])\ndef create_user():\n data = request.json\n # Create the user\n # ...\n return {'status': 'user created'}\n\nif name == 'main':\n app.run(debug=True)"} {"instruction": "Write Python code to extend a string to be twice as long as the original string", "input": "Example string: \"Hello world\"", "output": "input = \"Hello world\" output = input + input"} {"instruction": "Design a Python class to store and manipulate data from a tabular dataset.", "input": "", "output": "class TableData:\n def __init__(self, data):\n self.data = data\n self.column_names = list(data[0].keys())\n self.row_count = len(data)\n\n def get_rows(self):\n rows = []\n for row in self.data:\n rows.append(list(row.values()))\n\n return rows\n\n def get_columns(self):\n columns = []\n for name in self.column_names:\n column = []\n for row in self.data:\n column.append(row[name])\n \n columns.append(column)\n\n return columns\n\n def get_column_names(self):\n return self.column_names\n\n def get_row_count(self):\n return self.row_count"} {"instruction": "Generate code for a for loop to iterate through the numbers from 0 to n-1.", "input": "n = 5", "output": "for i in range(0, n): print(i)"} {"instruction": "Create a python script that displays the information of three different cities.", "input": "Edinburgh: Scotland, 54.6°N, UK\nParis: France, 48.86°N, Europe\nDhaka: Bangladesh, 23.78°N, Asia", "output": "def get_city_info(city, country, latitude, continent):\n print(\"City: {}, Country: {}, Latitude: {}, Continent: {}\".format(\n city, country, latitude, continent))\n \nget_city_info('Edinburgh', 'Scotland', '54.6°N', 'UK')\nget_city_info('Paris', 'France', '48.86°N', 'Europe')\nget_city_info('Dhaka', 'Bangladesh', '23.78°N', 'Asia')"} {"instruction": "What is a Python list?", "input": "", "output": "A Python list is an ordered collection of objects, stored in memory and indexed by number that can contain items of different types such as numbers, strings, and other lists."} {"instruction": "Write a JavaScript code snippet to query a given database table.", "input": "Table Name: users", "output": "const query = \"SELECT * FROM users\""} {"instruction": "Write a single line of code to convert a string to a date in Python.", "input": "", "output": "date = datetime.strptime('01/01/2019', '%d/%m/%Y')"} {"instruction": "Develop a Python program to convert an integer from one binary representation to another.", "input": "15", "output": "def decimal_to_binary(n): \n return bin(n).replace(\"0b\", \"\") \n \ndef binary_to_decimal(n): \n return int(n,2) \n \ninput_decimal = 15\nfinding_binary = decimal_to_binary(input_decimal) \n \nresult = binary_to_decimal(finding_binary) \nprint(result)"} {"instruction": "Create a while loop that prints each element in the list from the end.", "input": "numbers = [1, 2, 3, 4, 5]", "output": "i = len(numbers) while i > 0: print(numbers[i-1]) i -= 1"} {"instruction": "Create a python function to find out if an item exists in a given list.", "input": "", "output": "def is_item_in_list(item, my_list):\n '''This function checks if an item exists in a given list and returns a boolean value.\n Parameters\n ----------\n item: The item to be checked.\n my_list: The list in which the item is to be checked. \n \n Returns\n --------\n boolean: True if the item is present in the list, and False if it is not.\n '''\n\n return item in my_list"} {"instruction": "Write an HTML code to add a padding of 10px to the paragraph tag", "input": "", "output": "

      "} {"instruction": "Given a string, write the appropriate regex pattern that checks if the string contains any digit.", "input": "", "output": "import re def check_digits(string): \"\"\" This function takes a string and checks if it contains any digit. \"\"\" regex_pattern = r\"[0-9]\" return bool(re.search(regex_pattern, string))"} {"instruction": "Construct a 2-dimensional array, A, of size M*N, filled with all zeroes.", "input": "M=4, N=5", "output": "A = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]"} {"instruction": "Explain the differences between Bitwise AND, OR, and XOR operations.", "input": "", "output": "The bitwise AND (&) operation returns a 1 in a given bit position if both bits being compared are equal to 1. The bitwise OR (|) operation returns a 1 in a given bit position if either or both of the bits being compared are equal to 1. The bitwise XOR (^) operation produces a result of 1 if the two bits being compared are different and 0 if both bits are the same."} {"instruction": "Develop an algorithm in Python to replace all the vowels in a string with an asterisk.", "input": "string = “Hello World”", "output": "string = “Hello World”\n\ndef replaceVowels(string):\n vowels = (\"a\", \"e\", \"i\", \"o\", \"u\")\n result = \"\"\n for char in string:\n if char in vowels:\n result += \"*\"\n else:\n result += char\n return result\n\nnew_string = replaceVowels(string)\nprint(new_string) # This will print out \"H*ll* W*rld\""} {"instruction": "Create a CSS code that demonstrates a nice hover effect for a button.", "input": "", "output": ".button { background: #3498db; color: #fff; font-size: 1.2em; padding: 10px; transition: 0.2s; } .button:hover { background: #4578ba; box-shadow: 0px 0px 5px #ccc; transform: scale(1.1); }"} {"instruction": "Create a class in Python that inherits properties from a parent class named 'Animal'.", "input": "", "output": "class Animal:\n def __init__(self, name):\n self.name = name\n\nclass Dog(Animal):\n def __init__(self, name, breed):\n super().__init__(name)\n self.breed = breed"} {"text": "[HI Wikipedia] ख़ोरूग़​\n\nख़ोरूग़​ (ताजिक: Хоруғ, , Khorugh) मध्य एशिया के ताजिकिस्तान देश के कूहिस्तोनी-बदख़्शान स्वशासित प्रान्त की राजधानी है। यह उस प्रान्त के शुग़नोन​ ज़िले की प्रशासनिक राजधानी भी है। पामीर पर्वतों में २,२०० मीटर की ऊँचाई पर पंज नदी और ग़ुन्द​ नदी के संगम-स्थल पर स्थित यह शहर अपने मनोहर पर्वतीय वातावरण के लिए जाना जाता है। नाम का उच्चारण 'ख़ोरूग़​' शब्द में बिन्दु-वाले 'ख़' के उच्चारण पर ध्यान दें क्योंकि यह बिना बिन्दु वाले 'ख' से ज़रा भिन्न है। इसका उच्चारण 'ख़राब' और 'ख़रीद' के 'ख़' से मिलता है। इसमें 'ग़' अक्षर के उच्चारण पर भी ध्यान दें क्योंकि यह भी बिन्दु-रहित 'ग' से ज़रा भिन्न है। इसका उच्चारण 'ग़लती' और 'ग़रीब' शब्दों के 'ग़' से मिलता है। इतिहास १९वीं सदी के अंतिम चरणों तक यह इलाक़ा बुख़ारा के अमीर, अफ़ग़ानिस्तान के शाह, रूसी साम्राज्य और ब्रिटेन के बीच विवादित था। उस शताब्दी के अंत तक रूस ने यहाँ विजय पा ली और १८९६ में यहाँ अपना एक क़िला बना लिया। यहीं से गुज़रने वाली पंज नदी रूसी साम्राज्य और अफ़ग़ानिस्तान की नई सरहद बन गई। जब सोवियत संघ बना तो उसने १९२५ में ख़ोरूग़​ को गोरनो-बदख़्शान की राजधानी बना दिया। सोवियत नेताओं ने बहुत कोशिश करी कि सोवियत संघ के अन्य भागों से लोग यहाँ आ बसें लेकिन बिना उद्योगों और उपजाऊ ज़मीन की कमी वाली इस धरती पर यह प्रयास असफल रहा। यह क्षेत्र आज भी ताजिकिस्तान के सबसे ग़रीब इलाक़ों में गिना जाता है। कुछ दृश्य मौसम ख़ोरूग़​ का मौसम अर्ध-शुष्क है। इसकी सर्दियाँ ठंडी और बर्फ़ व वर्षा से भरपूर होती हैं। गरिमयों में अधिक गर्मी पड़ती है और बारिश कम या बिलकुल नहीं होती। इन्हें भी देखें कूहिस्तोनी-बदख़्शान स्वशासित प्रान्त सन्दर्भ कूहिस्तोनी-बदख़्शान स्वशासित प्रान्त ताजिकिस्तान के शहर मध्य एशिया के शहर"} {"text": "[DE Wikipedia] West Horsley Place\n\nWest Horsley Place ist ein Grade-I-Bauwerk in West Horsley, Surrey, England. Auf dem Anwesen gibt es acht weitere Bauwerke im Grade II, darunter ein Hundezwinger aus der Mitte des 19. Jahrhunderts. Geschichte Die Ursprünge des Gebäudes gehen zurück auf das Jahr 1425. Es wurde aus rotem Backstein gebaut, die Galerie im Westflügel wurde später in zusätzliche Schlafzimmer umgebaut. Das Haus hat insgesamt 50 Schlafzimmer. Im 16. Jahrhundert gehörte es John, Lord Berners, der die erste englische Übersetzung von Froissarts Chroniken anfertigte und später dem Earl of Lincoln. Es gehörte im 19. Jahrhundert Henry Currie, der von 1847 bis 1852 konservatives Parlamentsmitglied für den Wahlkreis Guildford war. Als die spätere Eigentümerin Laura Mart Fielder 1908 verstarb und dem King’s College, Cambridge £3000 hinterließ, wurde West Horsley Place mit £62.536 bewertet. 1931 wurde das Anwesen erworben von Robert Crewe-Milnes, 1. Marquess of Crewe und dessen Frau. Crewe starb 1945, seine Frau Peggy (geborene Primrose, † 1967) hinterließ es der Tochter Mary Innes-Ker, Duchess of Roxburghe (1915–2014). Diese verschloss es weitgehend und lebte in einem fünf Zimmer umfassenden Bereich des Hauses. Als die Duchess 2014 im Alter von 99 Jahren verstarb, erbte ihr damals achtzigjähriger Großneffe, der Autor und Fernsehmoderator Bamber Gascoigne, das Anwesen. Die Duchess war zwar kinderlos, hatte aber zahlreiche Großnichten und Großneffen. Gascoigne war überrascht, dass seine Großtante ihm das Anwesen hinterließ. Um Finanzmittel zur Restaurierung des etwas heruntergekommenen 50-Zimmer-Anwesens aufzubringen, ließ Gascoigne den Besitz der Duchess von Sotheby’s in London und Genf versteigern. Man erlöste mit 8,8 Millionen Pfund das vierfache dessen, was ursprünglich erwartet wurde. Grange Park Opera Grange Park Opera hat einen auf 99 Jahr abgeschlossenen Pachtvertrag für ein für diesen Zweck auf dem Anwesen errichtetes Theater mit 750 Plätzen. Der Bauantrag für das Theater nach einem Entwurf von Tim Ronalds stieß zunächst auf Opposition, doch wurde er im Mai 2016 durch den Guildford Borough Council genehmigt. Architektonisches Vorbild für die Architekten war der „Hufeisenbau“ der Mailänder Scala. Grange Park Opera ist der erste Neubau eines Opernhauses im Vereinigten Königreich im 21. Jahrhundert. Die Eröffnungsaufführung fand am 9. Juni 2017 mit Puccinis Oper Tosca statt. Es spielte das BBC Concert Orchestra unter Leitung von Gianluca Marcianò, Joseph Calleja sang den Cavaradossi und Ekaterina Metlova die Titelrolle. West Horsley Place im Film In dem Haus wurde ein Großteil des 2015 von ITV ausgestrahlten Fernsehfilmes Harry Price: Ghost Hunter gedreht. West Horsley Place diente in Roger Michells Verfilmung des Romans Meine Cousine Rachel von 2017 als Wohnsitz der Ashleys.…"} {"text": "[DE Wikipedia] ARR\n\nARR steht als Abkürzung für: Absolute Risikoreduktion, Maß einer Therapiewirksamkeit, siehe Relative und absolute Risikoreduktion Adolf-Reichwein-Realschule (Witten) Agencja Rynku Rolnego, polnische Agentur für den Agrarmarkt Air Armenia, armenische Fluggesellschaft (ICAO-Code) Alaska Railroad, US-amerikanische Eisenbahngesellschaft Alles Real Records, deutsches Hip-Hop-Plattenlabel, siehe Curse Amoroso-Robinson-Relation, bestimmte Umformung der Grenzerlösfunktion in der Mikroökonomie Andøya Rakettskytefelt, Raketenstartplatz auf der norwegischen Insel Andøya Annual Recurring Revenue, jährlich wiederkehrende Einkünfte, insbesondere aus Leistungsverträgen AR-R steht für: Provinz Río Negro, Argentinien (Ländercode nach ISO 3166-2) arr. steht für: arrangiert, siehe Arrangement Abkürzung"} {"instruction": "Name a few use cases of Convolutional Neural Networks.", "input": "", "output": "Convolutional Neural Networks are widely used in domains such as computer vision, natural language processing, pattern recognition, time series analysis, audio processing, object recognition and classification, and for other tasks such as image segmentation, automated image captioning, image deblurring, object detection and tracking."} {"instruction": "List out all the sorting algorithms supported in Python.", "input": "", "output": "The sorting algorithms supported in Python include bubble sort, insertion sort, selection sort, merge sort, quick sort, and heap sort."} {"instruction": "Suggest an edit to fix the following code snippet.", "input": "for num in range(10): if num % 2 == 0 print(num);", "output": "for num in range(10): if num % 2 == 0: print(num);"} {"text": "[HI Wikipedia] नेपालभाषा\n\nनेपालभाषा, नेपाली भाषा से अलग है। इसी तरह खस भाषा भी नेपाल भाषा से भिन्न है। इनमें भ्रमित न हों। नेपाल भाषा ('नेवा' अथवा 'नेपाल भाय्') नेपाल की एक प्रमुख भाषा है। यह भाषा १४वीं शताब्दी से लेकर १८वीं शताब्दी के अन्त तक नेपाल की प्रशासनिक भाषा थी। आजकल नेपाल की जो राजभाषा है वह नेपाली है, न कि नेपालभाषा। नेपालभाषा, चीनी-तिब्बती भाषा-परिवार के अन्तर्गत तिब्बती-बर्मेली समूह में संयोजित है। यह रंजना लिपि, प्रचलित लिपि और देवनागरी लिपि में भी लिखी जाने वाली एक मात्र चीनी-तिब्बती भाषा है। यह भाषा दक्षिण एशिया की सबसे प्राचीन इतिहास वाली तिब्बती-बर्मेली भाषा है और तिब्बती बर्मेली भाषा में चौथी सबसे प्राचीन काल से उपयोग में लाई जाने वाली भाषा। वर्गीकरण यह भाषा चीनी-तिब्बती भाषा परिवार के अन्तर्गत तिब्बती-बर्मेली समूह में संयोजित है। लिपि नेपाल भाषा बहुत सी लिपियों में लिखी जाती है। इनमें प्रमुख लिपियां हैं - रञ्जना, प्रचलित लिपि, ब्राह्मी, भूजिँगोल, देवनागरी आदि। ये सभी लिपियाँ बाएं से दाएं तरफ लिखी जाती है। इन सभी लिपियों में स्वरमाला और व्यंजनमाला नामक दो प्रकार के अक्षर होते हैं। विकास क्रम नेपाल भाषा नेपाल मण्डल (काठमांडू उपत्यका) की मूल भाषा है। इस भाषा का उत्पत्ति-स्थान काठमांडू ही है। काठमांडू में किरांत शासन के समय में इस भाषा पर किरांती भाषा का प्रभाव पड़ा। तिब्बत के साथ शताब्दियों के व्यापारिक सम्बन्धों के कारण इस भाषा में तिब्बती भाषा का भी उल्लेख्य प्रभाव दिखता है। लिच्छवी काल और मल्ल काल में संस्कृत तथा शाहकाल में खस भाषा का प्रभाव भी इस भाषा में दिखने लगा। तिब्बती-बर्मेली भाषा परिवार की भाषा होने के बावजूद वर्षो तक भारोपेली भाषा के सम्बन्ध ने नेपाल भाषा का स्वरूप विशेष रूप से नामपद थोडा भारोपेली जैसा बना दिया है। नेपाली मिडिया में निजी क्षेत्र की भागीदारी के बाद इस भाषा के विकास को गति मिली है। साहित्य नेपाल भाषा साहित्य के आरम्भ का कोई ऐतिहासिक प्रमाण नहीं है। इसका विकास और विस्तार लिच्छवी तथा मल्ल काल में होने के तथ्य की उस समय में रचित विभिन्न नाटक, गीत, काव्य तथा तत्कालीन शिलालेख पुष्टि करते हैं। नेपाल भाषा के महाकवि सिद्धिदास महाजु हैं। साहित्यकार जयन्त वर्मा लुन्तभद्र बज्राचार्य जय प्रकाश मल्ल सिद्धिदास महाजु सिद्धिचरण श्रेष्ठ शुक्रराज जोशी शास्त्री चित्तधर \"हृदय\" धूस्वां सायमी बासु पासा कुछ शव्द तथा वाक्य नेपालभाषा और नेपाली में अन्तर यहाँ कुछ सरल उदाहरणों द्वारा दोनों भाषाओं का अन्तर दर्शाने का प्रयत्न किया गया है। सम्बोधन खाद्यान्न सम्बन्ध रंग शरीर बाहरी कड़ियाँ https://web.archive.org/web/20040924111745/http://www.jwajalapa.com/ https://web.archive.org/web/20170913202247/http://layalama.com/ Editable Online Nepal Bhasa dictionary नेवार-नेपाली-अङ्ग्रेजी शब्दकोश विश्व की भाषाएँ नेपालभाषा तिब्बती-बर्मी भाषाएँ नेपाल की भाषाएँ नेपाल"} {"instruction": "Create a list in Python of elements 0-9 in random order.", "input": "", "output": "import random # Generate a list of 10 numbers nums = [i for i in range(10)] # Shuffle the list random.shuffle(nums) # Print the shuffled list print(nums) # [5, 0, 2, 3, 9, 8, 4, 1, 7, 6]"} {"instruction": "Design a code generation program in Python to generate a HTML page with text content.", "input": "", "output": "def generate_html(text):\n html = \"\\n\"\n html += \"\\n\"\n html += \"

      \" + text + \"

      \\n\"\n html += \"\\n\"\n html += \"\\n\"\n \n return html\n\nif __name__ == \"__main__\":\n text = \"Hello World!\"\n html = generate_html(text)\n print(html)"} {"text": "[EN Wikipedia] Vytautas Pranas Bičiūnas\n\nVytautas Pranas Bičiūnas (August 20, 1893 in Klovainiai – October 30, 1943 in Sverdlovsk) was a Lithuanian painter, theatre actor, writer and literary critic. Between 1914 and 1916, he studied at Kazan Art School. Then in 1917, along with Juozas Tumas-Vaižgantas, he edited the newspaper Lietuviu Balsas (The Lithuanian Voice) See also List of Lithuanian painters References 1893 births 1943 deaths 20th-century Lithuanian painters 20th-century Lithuanian male actors Lithuanian male stage actors People from Pakruojis District Municipality"} {"text": "[CS Wikipedia] Itreksjód\n\nItreksjód, Ítreksjóð či Itreksiod je v germánské mytologii jeden ze synů Ódina a bůh. Je zmíněn v 75. kapitole Prozaické Eddy v knize Skáldskaparmál, kde se o něm mluví jako o jednom z Ásů a synů Ódina. Reference Severští bohové"} {"instruction": "Write code to determine the type of a given variable in Python.", "input": "", "output": "def get_type(var):\n return type(var).__name__"} {"instruction": "What is a web server?", "input": "", "output": "A web server is a computer system that hosts web applications and responds to requests from users over the internet. The web server processes the requests and sends a response back to the users, usually in the form of an HTML web page."} {"instruction": "Write a SQL query to list all the product categories with their sales numbers in the given data set.", "input": "Table: Products | id | product_name | category | sale_price | 1 iPhone Phones 400 2 iPad Tablets 500 3 Apple Watch Phones 300 4 In-ear headset Audio 50 5 Pen Drive Storage 20 6 32GB RAM Storage 100", "output": "SELECT category, SUM(sale_price) as total_sales FROM Products GROUP BY category"} {"instruction": "Write a method in Python to append a given list to another list.", "input": "list_1 = [1,2,3] list_2 = [4,5,6]", "output": "list_1.extend(list_2)"} {"instruction": "Implement a 3d vector class with a constructor, a dot product method and a normalization method.", "input": "", "output": "class Vector3d { double x, y, z; //Constructor Vector3d(double x, double y, double z) { this.x = x; this.y = y; this.z = z; } // Dot product double dotProduct(Vector3d vec2) { double result = this.x * vec2.x + this.y * vec2.y + this.z * vec2.z; return result; } // Normalization Vector3d normalize() { double magnitude = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); Vector3d normalized = new Vector3d(this.x / magnitude, this.y / magnitude, this.z / magnitude); return normalized; } }"} {"text": "[CS Wikipedia] Ivar Nilsson\n\nIvar Bengt Nilsson (12. června 1933 Göteborg – 26. února 2019 Hindås) byl švédský rychlobruslař. Na mezinárodní scéně se poprvé představil v roce 1960. Tehdy nejprve skončil čtvrtý na Mistrovství Evropy, posléze byl dvanáctý na Mistrovství světa a nakonec závodil na Zimních olympijských hrách (5000 m – 7. místo, 10 000 m – 4. místo). Čtvrtou příčku z kontinentálního šampionátu si zopakoval i v roce 1961. Největšího úspěchu dosáhl na Mistrovství světa 1962, kde vybojoval bronzovou medaili. Zúčastnil se také ZOH 1964 (1500 m – 19. místo, 5000 m – 7. místo, 10 000 m – 10. místo). Od roku 1966 startoval již pouze na švédských závodech, sportovní kariéru ukončil v roce 1969. Zemřel 26. února 2019 ve věku 85 let. Odkazy Reference Externí odkazy Švédští rychlobruslaři Švédští olympionici Narození 12. června Narození v roce 1933 Narození v Göteborgu Úmrtí 26. února Úmrtí v roce 2019 Muži"} {"instruction": "Create a web service to fetch data from a database.", "input": "", "output": "A web service can be created using programming languages such as Python, JavaScript, etc. It will contain code to connect to the database, fetch the data, and return it in the appropriate format."} {"instruction": "What is the command to delete all occurrences of the element \"5\" from a given Python array?", "input": "", "output": "arr = [3, 4, 5, 2, 5, 1, 5] arr = [x for x in arr if x != 5]"} {"text": "[CS Wikipedia] Treble\n\nTreble je ve fotbalové terminologii označení pro úspěch klubu, který v jednom roce (resp. sezóně) získá tři trofeje, zpravidla domácí double (tedy vítězství v domácí lize a národním poháru) a k tomu vyhraje některou významnou kontinentální pohárovou soutěž (např. Ligu mistrů, Pohár osvoboditelů, atp.). Jedno- či dvouzápasové soutěže (většinou superpoháry) a také Mistrovství světa ve fotbale klubů se obecně nepovažují za součást treble. Ve Skotsku je za domácí treble také považováno vítězství v lize, poháru a ligovém poháru. Držitelé evropského treble Zisk 2 domácích trofejí + titul v PMEZ/Lize mistrů: Celtic FC (1967) AFC Ajax (1972) PSV Eindhoven (1988) Manchester United (1999) FC Barcelona (2009, 2015) Inter Milán (2010) FC Bayern Mnichov (2013, 2020) Manchester City FC (2023) Reference Související články Double (fotbal) Quadruple Externí odkazy Bundesliga - Bayern Mnichov získal i DFB Pokal a slaví treble Sportovní terminologie"} {"instruction": "Write a Python function that takes three numbers as argument and prints the largest one.", "input": "3, 5, 9", "output": "def largest_number(a, b, c):\n max = a\n if b > max:\n max = b\n if c > max:\n max = c\n print(max) \n\nlargest_number(3, 5, 9)"} {"text": "[DE Wikipedia] Niski Młyn\n\nNiski Młyn () ist ein Ort in der polnischen Woiwodschaft Ermland-Masuren. Er gehört zur Gmina Bisztynek (Stadt- und Landgemeinde Bischofstein) im Powiat Bartoszycki (Kreis Bartenstein). Geographische Lage Niski Młyn liegt am Westufer des Flüsschens Rhein () in der nördlichen Mitte der Woiwodschaft Ermland-Masuren, sieben Kilometer westlich der einstigen Kreisstadt Rößel (polnisch Reszel) bzw. 24 Kilometer südöstlich der heutigen Kreismetropole Bartoszyce (). Geschichte Zeit seines Bestehens war Niedermühl bis 1945 als ein großer Hof ein Wohnplatz der Gemeinde Santoppen (polnisch Sątopy), zuletzt im ostpreußischen Kreis Rößel. Im Jahre 1785 war Niedermühl eine königliche Erbpachtsmühle mit einer Feuerstelle, im Jahre 1820 wurden außer der königlichen Mühle eine Feuerstelle bei acht Einwohnern genannt. Die Zahl der Einwohner stieg bis 1885 auf 18 und belief sich im Jahre 1905 auf zwölf. Mit der Abtretung des gesamten südlichen Ostpreußen 1945 in Kriegsfolge an Polen erhielt Niedermühl die polnische Namensform „Niski Młyn“. Heute ist der kleine Ort in die Stadt- und Landgemeinde Bisztynek (Bischofstein) im Powiat Bartoszycki (Kreis Bartenstein) eingegliedert, von 1975 bis 1998 der Woiwodschaft Olsztyn, seither der Woiwodschaft Ermland-Masuren zugehörig. Kirche Bis 1945 war Niedermühl in die evangelische Kirche Bischofstein in der Kirchenprovinz Ostpreußen der Kirche der Altpreußischen Union als auch in die römisch-katholische Kirche Santoppen im damaligen Bistum Ermland eingepfarrt. Heute gehört Niski Młyn katholischerseits immer noch zu Sątopy, das jetzt zum Erzbistum Ermland gehört, evangelischerseits zur Kirche Bartoszyce (Bartenstein), einer Filialkirche der Johanneskirche Kętrzyn (Rastenburg) in der Diözese Masuren der Evangelisch-Augsburgischen Kirche in Polen. Verkehr Niski Młyn liegt an der verkehrstechnisch nicht unbedeutenden Woiwodschaftsstraße 594, die die beiden Städte Bisztynek (Bischofstein) und Reszel (Rößel) miteinander verbindet. Sątopy-Samulewo (Bischdorf) ist die nächste Bahnstation. Sie liegt an der Bahnstrecke Toruń–Tschernjachowsk, die heute bereits in Posen beginnt, dafür aber in Korsze (Korschen) endet und nicht mehr in das nördliche Ostpreußen, heute die russische Oblast Kaliningrad, bis nach Insterburg () führt. Einzelnachweise Ort der Woiwodschaft Ermland-Masuren Gmina Bisztynek"} {"instruction": "Convert this regular expression to JavaScript regex expression.", "input": "/[A-Z][a-z]+/", "output": "/[A-Z][a-z]+/g"} {"instruction": "Using the given Python code, update its style using pep 8 conventions.", "input": "def factorial (x):\n if x <= 1:\n return 1\n return x * factorial (x-1)", "output": "def factorial(x):\n if x <= 1:\n return 1\n return x * factorial(x - 1)"} {"instruction": "Given the following JSON snippet, design a MongoDB schema for the corresponding collection.", "input": "{ \"users\": [ { \"name\": \"John\", \"addr\": { \"street\": \"123 Main St\", \"city\": \"New York\" } } ] }", "output": "db.users.insert({ name: String, addr: { street: String, city: String } })"} {"instruction": "Develop a web scraping program using Python to extract the names and contact information of 10 randomly selected people from a popular website.", "input": "Not applicable", "output": "import requests\nimport random\nfrom bs4 import BeautifulSoup\n\n#specify website url\nwebsite_url = 'https://www.example.com/people'\n\n#scraping function\ndef scrape_contacts():\n #load website\n html = requests.get(website_url).text\n #parse html\n soup = BeautifulSoup(html, 'html.parser')\n contacts = []\n #extract contact information\n for contact in soup.find_all('div', {'class': 'contact'}):\n name = contact.find('h3').text\n email = contact.find('p', {'class': 'email'}).text\n phone = contact.find('p', {'class': 'phone'}).text\n contacts.append({'name': name, 'email': email, 'phone': phone})\n #randomly select 10 contacts\n return random.sample(contacts, 10)\n\nscraped_contacts = scrape_contacts()"} {"instruction": "Write a JavaScript function to convert a number from octal to decimal.", "input": "octal_number = 014", "output": "function octToDec(octal_number){ let dec_number = 0; let i = 0; while(octal_number != 0){ dec_number += (octal_number % 10) * Math.pow(8,i); octal_number = Math.floor(octal_number/10); i++; } return dec_number; } var decimal_number = octToDec(014); console.log(decimal_number);"} {"instruction": "Develop a Python program to remove all characters from an input string that are not a-z, A-Z, 0-9, or white space.", "input": "\"Hello,@ $World.\"", "output": "import re\n\ndef remove_non_alphanum(s):\n return re.sub('[^a-zA-Z0-9 \\n\\.]', '', s)\n\nstring = \"Hello,@ $World.\"\nres = remove_non_alphanum(string) \n\nprint(res)"} {"instruction": "Change the variable \"str\" below to upper case.", "input": "let str = 'hello world!';", "output": "let str = 'HELLO WORLD!';"} {"instruction": "Create a code to sort this list in a descending order", "input": "my_list = [1,9,3,5,7]", "output": "\"\"\" Sort this list in a descending order \"\"\" my_list = [1,9,3,5,7] # Sort the list in a descending order my_list.sort(reverse=True) print(my_list)"} {"instruction": "Implement a JavaScript for creating alert message when a page loads.", "input": "", "output": "window.onload = function(){ alert(\"Welcome to this page!\"); }"} {"instruction": "Analyze the following sentence to determine the type of verb phrase involved.", "input": "We have met several times.", "output": "The verb phrase in this sentence is a perfect verb phrase, as it indicates an action that has been completed in the past and has a continuing result in the present. The verb in the phrase is \"have met\"."} {"text": "[DE Wikipedia] Relatives Gehör\n\nRelatives Gehör beschreibt die Fähigkeit einer Person, einen Ton mithilfe eines Referenztons zu identifizieren oder wiederzugeben, indem das Intervall zwischen Referenz- und Zielton genutzt wird. Das relative Gehör ist sehr viel weiter verbreitet als das absolute Gehör, das nur bei einem von tausend Menschen vorkommt. Relatives Gehör setzt mehrere oder alle der folgenden Fähigkeiten voraus: Der Abstand eines Tons zu einem gegebenen Referenzton kann bestimmt werden (Bsp.: „drei Oktaven über C“). Intervalle zwischen vorgegebenen Tönen können unabhängig von deren Bezug zum Kammerton A identifiziert werden. Eine Melodie kann entsprechend ihrer Notation korrekt nachgesungen werden, indem jeder Ton der Melodie im entsprechenden Intervall zum vorhergehenden Ton produziert wird. Alternativ erlaubt diese Fähigkeit beim Hören einer unbekannten Melodie, die Noten in Bezug zu einem gegebenen Referenzton zu benennen. Diese letzte Fähigkeit, die sich nicht nur auf Sänger, sondern auch auf Instrumentalisten bezieht, die sich auf ihr Gehör verlassen müssen, um die exakte Tonhöhe der Töne, die sie spielen, zu kontrollieren (z. B. bei Holzblasinstrumenten und bundlosen Saiteninstrumenten), ist unerlässlich für Musiker, um gemeinsam musizieren zu können. Als Beispiel mag hier die unterschiedliche Festlegung des Kammertons dienen, besonders bei der Aufführung mit historischen Instrumenten. Anders als das absolute Gehör ist das relative Gehör häufig bei Musikern zu finden, besonders bei jenen, die „nach Gehör spielen“. Ein exaktes relatives Gehör ist ein typisches Charakteristikum guter Musiker. Im Gegensatz zum absoluten Gehör kann das relative Gehör durch Gehörbildung (weiter-)entwickelt werden. Computergestützte Gehörbildung ist beliebt bei Musikern und Musikschülern, und es werden unterschiedlichste Programme zur Verbesserung des relativen Gehörs angeboten. Einige Musiklehrer nutzen bekannte Liedanfänge, um ihren Schülern das Intervallhören zu erleichtern (s. Gehörbildung), andere lassen Melodien nach Gehör auf einem Musikinstrument nachspielen. Dies ist besonders förderlich bei Instrumenten, auf denen, anders als z. B. beim Klavier, jeder Ton direkt und einzeln erzeugt und korrigiert werden muss. Indische Musiker bilden relatives Gehör aus, indem sie in Intervallen über einem Bordunton singen. Westlich geprägte Gehörbildung verwendet traditionell Solfège oder zahlencodiertes Blattsingen, um den Schülern das relative Gehör nahezubringen. Weite Intervalle (größer als eine Oktave) sind oft schwieriger zu erkennen als einfache Intervalle (kleiner als eine Oktave). Intervallerkennung wird verwendet, um Akkorde zu identifizieren und analysieren, und kann auch verwendet werden, um ein Instrument nach einem Referenzton zu stimmen, selbst wenn der Referenzton nicht der…"} {"instruction": "Write a Python program to edit the given JSON string using the given selection criteria.", "input": "JSON String: { “name”: “Alice”, “role”: “programmer”, “department”: “engineering” }\nSelection Criteria: Change the department of the given JSON string.", "output": "import json\n\njson_str = '{ \"name\": \"Alice\", \"role\": \"programmer\", \"department\": \"engineering\" }'\n\ndata = json.loads(json_str)\n\ndata[\"department\"] = \"marketing\"\n\njson_str = json.dumps(data)\n\nprint(json_str)"} {"instruction": "Insert a node at the beginning of a linked list.", "input": "[10 -> 15 -> 20 -> 25]", "output": "// Java program to insert a node // at the beginning of a Singly Linked List public static void push(Node head_ref, int new_data) { // allocate node Node new_node = new Node(new_data); // put in the data new_node.data = new_data; // link the old list off the new node new_node.next = head_ref; // move the head to point to the new node head_ref = new_node; }"} {"instruction": "How would you print a big \"Hello World\" on the console output?", "input": "", "output": "print('"} {"instruction": "Generate a function in Python for finding the maximum value in a list of numbers with time complexity O(n).", "input": "num_list = [3, 7, 4, 2, 8, 16, 1, 9, 10]", "output": "def max_val(num_list):\n\tif len(num_list) == 0:\n\t\treturn None\n\t\n\tmax_num = num_list[0]\n\t\n\tfor num in num_list:\n\t\tif num > max_num:\n\t\t\tmax_num = num\n\t\n\treturn max_num"} {"instruction": "How does a hash table work?", "input": "", "output": "A hash table is a data structure that stores data items in an associative array where the key is used to quickly search for the data item. It is based on the concept of hashing which converts a key into an address in the array. Each address points to the data item associated with that key. The hash table offers fast lookup times by using hashing functions which are designed to spread data evenly over the table."} {"instruction": "Create a Python program to find the sum of the series - 1² + 2² + 3² + ... + n²", "input": "n = 5", "output": "def series_sum(n):\n sum = 0\n for i in range(1, n+1):\n sum += i**2\n return sum\n\nprint(series_sum(5))"} {"text": "[CS Wikipedia] Jennifer Ehle\n\nJennifer Ehle (* 29. prosince 1969) je americká divadelní i filmová herečka. Je nositelkou mnoha ocenění za svoji divadelní i filmovou tvorbu. Mezi její nejslavnější hollywoodské role patří například Králova řeč (2010), Nákaza (2011), RoboCop (2014) nebo trojice filmové série Padesát odstínů (Padesát odstínů šedi, 2015; Padesát odstínů temnoty, 2017 a Padesát odstínů svobody, 2018). Televizní role 1995 Pýcha a předsudek, šestidílný televizní seriál BBC - role: Elizabeth Bennet Odkazy Externí odkazy Americké herečky Narození v roce 1969 Narození 29. prosince Narození ve Winston-Salemu Žijící lidé Ženy Držitelky ceny BAFTA za nejlepší televizní herečku Držitelé Ceny Sdružení filmových a televizních herců v kategorii nejlepší filmové obsazení"} {"instruction": "Generate a python code for linear regression.", "input": "", "output": "from sklearn.linear_model import LinearRegression\n\nmodel = LinearRegression()\nmodel.fit(X, y)"} {"instruction": "Generate a neural network model which uses the Keras API in Python to predict whether an email is spam or not.", "input": "Not applicable", "output": "from tensorflow.keras.layers import Dense, Input\nfrom tensorflow.keras.models import Sequential\n\nmodel = Sequential()\ninput = Input(shape=(1,))\n\nx = Dense(32, activation='relu')(input)\nx = Dense(32, activation='relu')(x)\nx = Dense(1, activation='sigmoid')(x)\n\nmodel = Model(inputs=input, outputs=x)\nmodel.compile(optimizer='adam',\n loss='binary_crossentropy',\n metrics=['accuracy'])"} {"instruction": "Create a Python program to read 2 numbers from the user and calculate their sum.", "input": "Not applicable", "output": "num1 = int(input(\"Enter first number: \"))\nnum2 = int(input(\"Enter second number: \"))\n \n# Adding two numbers\nsum = num1 + num2\n \nprint(\"Sum of {0} and {1} is {2}\" .format(num1, num2, sum))"} {"instruction": "Generate a Python program which returns the most recognized word in a given list of strings.", "input": "[\"Hello\", \"Hi\", \"Greeting\"]", "output": "def most_recognized(strings):\n max_string = \"\"\n max_count = 0\n for string in strings:\n count = len(string.split())\n if count > max_count:\n max_string = string\n max_count = count\n return max_string\n\nstrings = [\"Hello\", \"Hi\", \"Greeting\"]\n\nmost_recognized_word = most_recognized(strings)\nprint(f\"Most recognized word: {most_recognized_word}\")"} {"instruction": "Create a function that takes a sentence as a string and returns a string containing the sentence in reverse order.", "input": "\"I am learning to code\"", "output": "public String reverse(String sentence) { StringBuilder reversedSentence = new StringBuilder(); String[] words = sentence.split(\" \"); for (int i = words.length - 1; i >= 0; i--) { reversedSentence.append(words[i]); reversedSentence.append(\" \"); } return reversedSentence.toString().trim(); }"} {"instruction": "Create a program in Python that displays a 3x3 chess board, with pieces at starting positions.", "input": "Not applicable", "output": "import numpy as np\n\nchess_board = np.array([[\"R\", \"N\", \"B\", \"Q\", \"K\", \"B\", \"N\", \"R\"],\n [\"P\", \"P\", \"P\", \"P\", \"P\", \"P\", \"P\", \"P\"],\n [\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \"],\n [\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \"],\n [\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \"],\n [\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \"],\n [\"p\", \"p\", \"p\", \"p\", \"p\", \"p\", \"p\", \"p\"],\n [\"r\", \"n\", \"b\", \"q\", \"k\", \"b\", \"n\", \"r\"]])\nprint (chess_board)"} {"text": "[EN Wikipedia] Pearson River\n\nThe Pearson River is a river of the West Coast region of New Zealand's South Island. It flows north from Mount Aspiring's glacial lake, which is fed by the Volta and Bonar Glaciers, to reach the Waiatoto River. See also List of rivers of New Zealand References Rivers of the West Coast, New Zealand Mount Aspiring National Park Rivers of New Zealand"} {"instruction": "Create classes and interfaces to represent an online news system.", "input": "", "output": "class NewsSystem { public string title; public string content; public NewsSystem(string title, string content) { this.title = title; this.content = content; } } interface INewsActions { void PostNewArticle(NewsSystem article); void EditArticle(NewsSystem article); void DeleteArticle(NewsSystem article); }"} {"text": "[HI Wikipedia] चेरतला\n\nचेरतला (Cherthala) भारत के केरल राज्य के आलाप्पुड़ा ज़िले में स्थित एक नगर है। यह इसी नाम की तालुका का मुख्यालय भी है। आवागमन महाराष्ट्र में मुम्बई के उपनगर पनवेल से तमिल नाडु में भारत की मुख्यभूमि के दक्षिणतम छोर कन्याकुमारी तक जाने वाला राष्ट्रीय राजमार्ग 66 यहाँ से गुज़रता है और इसे देशभर के कई स्थानों से जोड़ता है। इन्हें भी देखें आलाप्पुड़ा ज़िला सन्दर्भ आलाप्पुड़ा ज़िला केरल के शहर आलाप्पुड़ा ज़िले के नगर"} {"instruction": "Output the following string in reverse order using loops.", "input": "Hello World", "output": "for (let i = 10; i >= 0; i--) { console.log(msg[i]); }"} {"instruction": "Generate a CPython code for reversing a given list of numbers.", "input": "[1,2,3,4]", "output": "def reverse_list(nums):\n return nums[::-1]"} {"instruction": "You are given a list of numbers. Count how many of them are prime numbers.", "input": "[1,2,3,4,5,6,7]", "output": "def count_primes(numbers): count = 0 for number in numbers: if is_prime(number): count += 1 return count def is_prime(number): if number <= 1: return False for i in range(2, number): if number % i == 0: return False return True"} {"instruction": "Write a Python program to efficiently delete all items from a set that are in another set.", "input": "A = {1, 2, 3, 4, 5}\nB = {2, 4}", "output": "A = {1, 2, 3, 4, 5}\nB = {2, 4}\n\nA -= B"} {"instruction": "Populate an array with numbers from 1 to 10 in Python.", "input": "", "output": "arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"} {"instruction": "Create a function to raise a given number to the Nth power.", "input": "", "output": "def power(n, x): if x == 0: return 1 return n * power(n, x-1)"} {"instruction": "Write a SQL query to find the first ten customers by their joining date.", "input": "", "output": "SELECT * FROM customers ORDER BY joining_date ASC LIMIT 10;"} {"instruction": "Calculate how many distinct values can be inserted in a binary tree containing 2 nodes.", "input": "", "output": "2^2 - 1 = 3 distinct values can be inserted in a binary tree containing 2 nodes."} {"instruction": "Write a Python program to generate n-grams of the given text with a window size of 3.", "input": "The quick brown fox jumps over the lazy dog", "output": "from collections import Counter\n\n\ndef generate_ngrams(text, window_size):\n text = text.lower().split(' ')\n ngrams = []\n for n in range(window_size, len(text)+1):\n for i in range(len(text)-n+1):\n ngrams.append(' '.join(text[i:i+n]))\n return Counter(ngrams)\n\n\ntext = \"The quick brown fox jumps over the lazy dog\"\nwindow_size = 3\n\nngrams_count = generate_ngrams(text, window_size)\n\nprint('\\nNGRAMS COUNT:',ngrams_count)\n\n# Output\n# NGRAMS COUNT: Counter({'the quick brown': 3,\n# 'quick brown fox': 2,\n# 'over the lazy': 1,\n# 'brown fox jumps': 1,\n# 'fox jumps over': 1,\n# 'the lazy dog': 1,\n# 'jumps over the': 1,\n# 'quick brown fox jumps': 1})"} {"instruction": "Given an array of positive integers, remove all the duplicates.", "input": "List1 = [1, 2, 3, 3, 4, 4, 2]", "output": "List1 = list(set(List1)) # Output: List1 = [1, 2, 3, 4]"} {"text": "[EN Wikipedia] Timeline of PlayStation 3 SKUs\n\nThe PlayStation 3 was originally launched in Japan on November 11, 2006 and in North America on November 17, 2006 with two SKUs: a 20 GB version and a 60 GB version. Both of these models included hardware backwards compatibility for PlayStation 2 games. In January 2007, Sony announced that Europe's 60 GB version would exclude hardware backwards compatibility for PS2 titles and instead would provide compatibility through software emulation of the PS2's hardware. During the course of 2007, Sony announced several new PlayStation 3 SKUs and discontinued others. The new 40 GB, 80 GB and 160 GB PlayStation 3 models do not feature software emulation of PlayStation 2 hardware. In August 2009, all previous models were discontinued, as the new PS3 Slims were released, in 120GB and 250GB editions, priced at $299 and $349, respectively. One year later, in August 2010, the 120GB version went out of production, to be replaced by a 160GB counterpart, which was also priced at $299. Timeline of SKUs 2005 On May 16, 2005 at E3, Sony unveils a PlayStation 3 prototype with 2 HDMI ports, 6 USB ports and 3 ethernet ports. This was never planned to be released. 2006 On November 11, 2006, the PlayStation 3 was launched in Japan with both 20 GB and 60 GB models available. On November 17, 2006, the PlayStation 3 was launched in the United States, with both 20 GB and 60 GB models available. 2007 On March 23, 2007, the PlayStation 3 was launched in Europe, Australia, the Middle East, Africa and New Zealand, with only a 60 GB model available. On April 11, 2007, Sony discontinued the 20 GB PlayStation 3 model in North America, citing \"lack of consumer demand.\" It is widely speculated that the removal of the 20 GB model from the North American market was probably done in order to save manufacturing costs, as there is a difference in cost between the two aforementioned models of around $30. In June 2007, Sony Computer Entertainment Europe (SCEE) president David Reeves stated that there were no plans for the 80 GB PlayStation 3 model to be released in the PAL regions, and that a 20 GB PS3 model for PAL regions is \"highly unlikely\". On July 9, 2007, Sony announced the 80 GB PlayStation 3 model for North America, bundled with MotorStorm, to be available beginning August 6, 2007. In addition, Sony announced a price drop in which the 60 GB model would sell for US$499. On July 12, 2007, SCEE announced a Starter Pack bundle in Europe, including a second SIXAXIS controller and two first-party titles from a given selection, to sell at the same price as the standalone model. SCEE stated that there were no plans to introduce an 80 GB model or to drop the price for the 60 GB model in Europe. Around this time SCEE President David Reeves and Sony Computer Entertainment, Incorporated President…"} {"instruction": "Create a loop to print \"I love Python\" five times", "input": "", "output": "for i in range(5): print(\"I love Python\")"} {"text": "[DE Wikipedia] Paul Pigorsch\n\nPaul Pigorsch (* 11. September 1991 in Torgau) ist ein deutscher Sportschütze im Wurfscheibenschießen in der Disziplin Trap. Leben und Karriere Pigorsch kam durch seinem Vater zum Schießsport und schoss zunächst Laufende Scheibe, wechselte aber dann zum Flintenschießen. Mit 15 Jahren startete er erstmalig 2007 bei den Deutschen Meisterschaften in München in der damaligen Klasse der Junioren B des Trap-Wettkampfes und belegte auf Anhieb den vierten Platz. Ein Jahr später in Wiesbaden wurde er Deutscher Meister. Danach folgte 2009 der Einzug in den Juniorenkader und der Beginn der internationalen Karriere mit Starts bei Welt- und Europameisterschaften. Doch die erste Jahre im Juniorenbereich verliefen steinig, Pigorschs beste Platzierungen war der zehnte Platz mit der Mannschaft bei der Weltmeisterschaft 2009 in Maribor und zwei fünfte Plätze, ebenfalls mit der Mannschaft, bei den Europameisterschaften 2010 in Kasan und 2011 in Belgrad. Nach seinem Wechsel in den Nationalkader 2012 änderte sich zunächst nichts, bis er 2019 beim Weltcup in Al Ain die Bronzemedaille gewann und in Acapulco knapp das Finale verpasste. Beim Weltcup Finale in Al Ain wurde er Achter. Ein Jahr später war er bei den Europameisterschaften in Osijek unter der Top-Ten. 2022 belegte er im Finale beim Weltcup in Changwon der fünften Platz. 2015 war er Teilnehmer bei den Europaspielen in Minsk wo er im Einzelwettkampf und im Mixed-Team-Wettkampf antrat und die Plätze 28 und 23 belegte. Paul Pigorsch wurde seit 2007 dreimal Deutscher Meister, fünfmal Vizemeister und erhielt viermal Bronze. Weblinks Datenbanken vom Freundeskreis Wurfscheibe. Paul Pigorsch bei Team Deutschland Sportschütze (Deutschland) Teilnehmer an den Europaspielen (Deutschland) Teilnehmer der Europaspiele 2019 Deutscher Meister (Sportschießen) Deutscher Geboren 1991 Mann"} {"instruction": "Create a python script that sorts a list of tuples based on the second element.", "input": "tuples = [('a',3), ('d', 1), ('c', 2)]", "output": "sortedTuples = sorted(tuples, key = lambda x: x[1])"} {"instruction": "Generate a Python function that takes a number less than 1000 and returns it written in words.", "input": "213", "output": "def num2words(number): \n ones = [\"\", \"one \",\"two \", \"three \", \"four \", \n \"five \", \"six \", \"seven \", \"eight \", \n \"nine \", \"ten \", \"eleven \", \"twelve \", \n \"thirteen \", \"fourteen \", \"fifteen \", \n \"sixteen \", \"seventeen \", \"eighteen \", \n \"nineteen \"] \n tens = [\"\", \"\", \"twenty \", \"thirty \", \"forty \", \n \"fifty \", \"sixty \", \"seventy \", \"eighty \", \n \"ninety \"] \n if(number == 0): \n return \"zero\"\n if(number < 0): \n return \"minus \" + num2words(-1 * number) \n if((number/1000) > 0): \n return num2words(number/1000) + \"thousand \" + num2words(number%1000) \n if((number / 100) > 0): \n return num2words(number/100) + \"hundred \" + num2words(number%100) \n if((number/10) > 1):\n return tens[int(number//10)] + num2words(number % 10) \n else:\n return ones[int(number)]\n\nprint(num2words(213))"} {"text": "[DE Wikipedia] Wladimir Kudrjawzew\n\nWladimir Kudrjawzew (auch Vladimir Kudryavtsev, , * um 1965) ist ein russischer Rock-, Jazz- und Improvisationsmusiker (Kontrabass, Komposition). Leben und Wirken Kudryavtsev spielte in Russland in den späten 1980er-Jahren in der Jazzband Ars Nova (Forgotten Gifts, u. a. mit Mikhail Kostuchkin, Pyotr Kornev), in den folgenden Jahren u. a. mit Harald Rüschenbaum (Sunrise in St. Petersburg (1994), u. a. mit Dusko Goykovich), von 1996 bis 2005 in der Rockband Aquarium. Ab den 2010er-Jahren war er Mitglied der russisch-französischen Formation Goat’s Notes, mit der er drei Alben für Leo Records einspielte; außerdem arbeitete er in Frankreich mit verschiedenen Theaterprojekten. Im Trio mit Hugues Vincent und Maria Logofet nahm er das Album Free Trees (Leo, 2014) auf, zu dem er Kompositionen beisteuerte. 2016 trat er mit Goat’s Notes und Wladimir Tschekassin auf dem fünften Leo Records Festival auf. Im Bereich des Jazz war er zwischen 1987 und 2014 an fünf Aufnahmesessions beteiligt, als Studiomusiker auch mit Andrei Knyazev (Любовь Негодяя 2005) und Marc Almond (Heart on Snow, 2003). Diskographische Hinweise Goat’s Notes: Fuzzy Wonder (Leo, 2913), mit Grigory Sandomirsky, Ilya Vilkov, Maria Logofet, Andrey Bessonov, Piotr Talalay Goat’s Notes: Wild Nature Executives (Leo, 2013), mit Andrey Bessonov, Oleg Mariakhin, Piotr Talalay, Alexey Andreev, Grigory Sandomirsky, Kirill Parenchuk, Yury Sevastyanov, Ilya Vilkov, Maria Logofet Hugues Vincent, Alexei Borisov, Ilja Chistiakov, Konstantin Sukhan, Vladimir Kudryavtsev: One Room (Topet, 2014) Goat’s Notes: Cosmic Circus (Leo, 2014), mit Ilya Vilkov, Andrey Bessonov, Pierre Lamblaa, Gregory Sandominsky, Maria Logofet, Sabine Bouthinon, Hugues Vincent, Piotr Talalay Vladimir Kudryavtsev / Fred Costa / Gregory Sandomirsky / Piotr Talalay: Quartet Red (Leo, 2020) Weblinks Webpräsenz von Goat’s Notes Einzelnachweise Rockmusiker Jazz-Bassist Improvisationsmusiker Russe Geboren im 20. Jahrhundert Mann"} {"instruction": "Write a function in Python that takes a string and determines the longest palindrome in it.", "input": "itsracecarthatmadethetoot", "output": "def longestPalindrome(s): \n n = len(s) \n table = [[0 for x in range(n)] for y in range(n)]\n \n # All substrings of length 1 are palindromes \n maxLength = 1\n i = 0\n while (i < n): \n table[i][i] = True\n i = i + 1\n \n # check for substring of length 2. \n start = 0\n i = 0\n while (i < n - 1): \n if (s[i] == s[i + 1]): \n table[i][i + 1] = True\n start = i \n maxLength = 2\n i = i + 1\n \n # Check for lengths greater than 2. k is length \n # of substring \n k = 3\n while (k <= n): \n # Fix the starting index \n i = 0\n while (i < (n - k + 1)): \n \n # Get the ending index of substring from \n # starting index i and length k \n j = i + k - 1\n \n # checking for sub-string from ith index to \n # jth index iff str[i+1] to str[j-1] is a \n # palindrome \n if (table[i + 1][j - 1] and s[i] == s[j]): \n table[i][j] = True\n \n if (k > maxLength): \n start = i \n maxLength = k \n i = i + 1\n k = k + 1\n print (\"Longest palindrome substring is: \")\n print (s[start:start + maxLength]) \n \n return maxLength"} {"text": "[CS Wikipedia] Škoda 633\n\nŠkoda 633 byl osobní automobil vyráběný automobilkou Škoda. Výroba začala v roce 1931 a ukončena byla roku 1934. Vyrobilo se 504 kusů. Motor byl vodou chlazený vpředu uložený řadový šestiválec SV o objemu 1792 cm³. Měl výkon 24 kW (33 koní) a vůz s ním dosahoval rychlosti okolo 100 km/h. Externí odkazy 633 Osobní automobily Automobily vyráběné od roku 1931 Automobily vyráběné do roku 1934"} {"instruction": "Form an if-else condition that prints “This is an even number” if a number is even and “This is an odd number” if the number is odd", "input": "number = 5", "output": "if (number % 2 == 0): print(\"This is an even number\") else: print(\"This is an odd number\")"} {"instruction": "Find the latitude and longitude of an input address.", "input": "address = \"1600 Amphitheatre Parkway, Mountain View, CA\"", "output": "import geocoder g = geocoder.google(address) print(\"Latitude: \" + str(g.latlng[0])) print(\"Longitude: \" + str(g.latlng[1]))"} {"instruction": "Write a function in Python to find the power of a given number n using an iterative approach.", "input": "", "output": "def power_iterative(n, exponent):\n # First, set an initial product value\n product = 1\n # Iterate up to the desired power\n for _ in range(exponent):\n product *= n\n # Return the product\n return product\n\npower = power_iterative(3, 4)\nprint(power)"} {"instruction": "Write an if-else statement in Java that checks if a given number is divisible by 3 and prints \"Divisible by 3\" if true, otherwise \"Not divisible\".", "input": "", "output": "if (num % 3 == 0) { System.out.println(\"Divisible by 3\"); } else { System.out.println(\"Not divisible\"); }"} {"instruction": "Given a list of numbers, sort them from smallest to largest.", "input": "lst = [3, 5, 2, 6, 8, 1]", "output": "lst.sort()"} {"instruction": "Write a Python program that web-scrapes data from a website and stores it in a structured format (e.g. JSON, CSV).", "input": "Example Website: https://example.com", "output": "import requests\nimport json\n\n# Make a get request to get the data\nresponse = requests.get('https://example.com')\n\n# Store the data in a structured format\ndata = json.loads(response.text)\n\n# Save the data to a json file\nwith open('example.json', 'w') as f:\n json.dump(data, f)"} {"instruction": "Write a code to implement Selection Sort in Java", "input": "", "output": "public class SelectionSort { public static void sort(int[] arr) { int n = arr.length; // One by one move boundary of unsorted subarray for (int i = 0; i < n-1; i++) { // Find the minimum element in unsorted array int min_idx = i; for (int j = i+1; j < n; j++) if (arr[j] < arr[min_idx]) min_idx = j; // Swap the found minimum element with the first // element int temp = arr[min_idx]; arr[min_idx] = arr[i]; arr[i] = temp; } } }"} {"instruction": "Develop a lightweight AI model to classify and categorize text.", "input": "", "output": "A lightweight AI model can be developed using programming languages such as Python, JavaScript, etc. It will contain code to process text data, extract features, apply a suitable machine learning algorithm and train a model to classify and categorize text."} {"instruction": "Create a method in Java to return the largest of three numbers.", "input": "", "output": "public static int max(int num1, int num2, int num3) { int max = num1; if (num2 > max) { max = num2; } if (num3 > max) { max = num3; } return max; }"} {"instruction": "Suggest a solution for validating a password which should contain at least 1 uppercase character, 1 lowercase character and 1 digit.", "input": "", "output": "We can use a regular expression to validate a password. A regular expression to validate a password with at least 1 uppercase character, 1 lowercase character and 1 digit should be: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$ If the password matches the regular expression, the password is valid. Otherwise, the password is invalid."} {"instruction": "Use a recursive algorithm in Python to calculate the sum of a given array.", "input": "array1 = [1, 2, 3, 4, 5]", "output": "def array_sum(arr):\n if len(arr) == 1:\n return arr[0]\n else:\n return arr[0] + array_sum(arr[1:])\n\n#Driver code\nprint(array_sum(array1)) #prints 15"} {"instruction": "Replace the \"TODO\" with the appropriate code for implementing a binary search algorithm in Python.", "input": "# TODO", "output": "def binarySearch(arr, target): low = 0 high = len(arr) - 1 while low <= high: mid = (low + high) // 2 if arr[mid] == target: return mid elif arr[mid] < target: low = mid + 1 else: high = mid - 1 return -1"} {"instruction": "Optimize a Flask application for efficient performance.", "input": "Not applicable", "output": "from flask import Flask, request, jsonify\n\napp = Flask(__name__)\n\n@app.route('/api/', methods=['GET', 'POST'])\ndef process_request(endpoint):\n # Performance optimization\n # Use Redis for caching session and query performance\n # Use uWSGI for Python applications\n # Use gunicorn as WSGI server\n # Use Flask-Compress extension for compression\n # Use global variables where applicable\n # Don't use sql queries directly, always use model methods\n # Use query parameter in URLs instead of plain parameters\n # Use thread-local objects for performance\n\n # Your code here"} {"instruction": "Write a Python program to randomly select an item from a list.", "input": "list_of_names = [\"John\", \"Anna\", \"Bill\", \"Kim\", \"Claire\"]", "output": "import random\n\nlist_of_names = [\"John\", \"Anna\", \"Bill\", \"Kim\", \"Claire\"]\nrandom_name = random.choice(list_of_names)\n\nprint(f'Randomly selected name from the list: {random_name}')"} {"text": "[EN Wikipedia] Ştefan Kroner\n\nŞtefan Kroner (born 30 May 1939) is a Romanian water polo player. He competed at the 1960 Summer Olympics and the 1964 Summer Olympics. References 1939 births Living people Romanian male water polo players Olympic water polo players for Romania Water polo players at the 1960 Summer Olympics Water polo players at the 1964 Summer Olympics People from Sighișoara Sportspeople from Mureș County"} {"instruction": "What is the main idea behind Naive Bayes Model?", "input": "", "output": "The main idea behind Naive Bayes Model is to use the probability of each data point to make a prediction by calculating the probability of a certain outcome given some prior knowledge. It assumes all the features are independent of each other and uses the Bayes theorem to calculate the probability of a given class based on the evidence."} {"instruction": "Define a class named \"Day\" in Python to represent a day of the week.", "input": "", "output": "class Day: def __init__(self): self.day = \"\" def set_day(self, day): self.day = day def get_day(self): return self.day"} {"instruction": "Construct a program to find the result of the following equation", "input": "(x-1)^2", "output": "def equation(x): return (x-1)**2"} {"text": "[HI Wikipedia] जिब्राल्टर लिबरल पार्टी\n\nजिब्राल्टर लिबरल पार्टी (), जिसका संक्षिप्तकरण अंग्रेज़ी वर्णमाला के तीन अक्षरों जीएलपी के साथ किया जाता है, ब्रिटिश प्रवासी शासित प्रदेश जिब्राल्टर का एक मुख्य राजनीतिक दल है। पार्टी की मुख्य विचारधारा उदारतावाद है। 2011 के आम चुनाव में पार्टी ने जिब्राल्टर संसद की तीन सीटें जीती थीं तथा सीटों की तुलना में यह जिब्राल्टर की दूसरी सबसे बड़ी पार्टी है। निवर्तमान समय में जिब्राल्टर संसद की 17 सीटों में से सात-सात सीटें जिब्राल्टर सोशलिस्ट लेबर पार्टी और जिब्राल्टर सोशल डैमोक्रैट्स के पास है। जिब्राल्टर लिबरल पार्टी और जिब्राल्टर सोशलिस्ट लेबर पार्टी का गठबंधन इस समय सरकार में है। सात सीटों के साथ जिब्राल्टर सोशल डैमोक्रैट्स सबसे बड़ा और एकमात्र विपक्षी राजनीतिक दल है। डॉ॰ जोसेफ़ गार्सिया जिब्राल्टर लिबरल पार्टी के वर्तमान अध्यक्ष हैं। सन्दर्भ बाहरी कड़ियाँ जिब्राल्टर के राजनीतिक दल"} {"text": "[EN Wikipedia] Nonnie & Alex\n\nNonnie & Alex is a 1995 short film that Todd Field directed while a fellow at the AFI Conservatory. It was filmed in Ferndale, California. This short film is a dramatic piece about two eight-year-old children, a girl (Nonnie) and boy (her friend, Alex) who are left to their own devices in trying to sort out whether or not Alex's recently deceased mother is truly haunting them. Awards Sundance Film Festival (Special Recognition Award) Aspen Short Fest (Best Film) Academy of Television Arts & Sciences (Emmy Award – Best College Film) References External links 1995 films 1995 short films Films directed by Todd Field American short films 1990s English-language films Thesis films"} {"text": "[CS Wikipedia] Alžběta Trojanová\n\nAlžběta Trojanová (* 16. ledna 1987 Praha) je česká publicistka a moderátorka zaměřující se na problematiku počítačových her. Bývá označována za Královnu české herní žurnalistiky (toto označení vzniklo náhodou při interview pro online magazín, kde Trojanová sama sebe v nadsázce označila za „královnu“ a od té doby se pojem ujal). V současnosti bývá považována za jednu z nejvlivnějších a nejvýraznějších osob na poli české herní scény. Osobní život a studia Vystudovala gymnázium Lauderovy školy, posléze VŠ obor Marketingová komunikace a Public relations na Univerzitě Karlově v roce 2011. Mezi její nejoblíbenější hry patří dle mnoha interview Zaklínač 3: Divoký hon a Cyberpunk 2077. Ve volném čase se věnuje cosplayi. Mezi lety 2021 a 2022 prodělala úspěšně léčbu rakoviny prsu. Po této osobní zkušenosti pak propagovala prevenci a související aktivity s touto nemocí. Na konci srpna 2023 se po mnohaletém soužití vdala za svého partnera Brada Autyho. Na svatbě měla také Mikoláše Tučka, Baty Alquawen a Shial. V červenci 2020 adoptovala z útulku v Polsku psa smíšené rasy, kterého pojmenovala jako Pixel. Projekty a profesní kariéra Svou novinářskou kariéru začala v roce 2004 v časopise Gamestar, který dnes již v ČR nevychází. Několik let psala pro časopis ABC. Široké veřejnosti se představila s uvedením pořadu Re-play v roce 2009, kde působila také jako hlavní moderátorka a později jako šéfredaktorka až do roku 2019. Mnoho let spolupracuje s časopisem Score, kde má svůj pravidelný feministický sloupek. Od roku 2019 byla společně s Mikolášem Tučkem moderátorkou herního pořadu New Game + Televize Seznam. Od března 2020 je součástí redakce Games.cz, kde má na starosti tvorbu video obsahu webu. Od roku 2021 pravidelně moderuje společně s Mikolášem Tučekem Comic Con PRAGUE. Od 8. prosince 2022 uvedly společně s Baty Alquawen a Shial pořad Movie Witches, kde všechny tři společně komentují různé filmy. Nový kanál vznikl transformací původního youtube kanálu Baty a Bety. 27. září 2023 oznámili Alžběta společně s Mikolášem Tučkem společný projekt nového pořadu POP COOLT na Prima COOL. Nový pořad bude informovat o seriálech, filmech, komiksech, hrách a knihách. Jedná se o společný projekt s Mikolášem, včetně společného moderování jako v původním Re-play. Influencing Propaguje různé výrobky, či služby, které obvykle souvisí s její prací nebo zájmy. Kromě krátkodobých činností, spolupracuje také dlouhodobě s různými mezinárodními společnostmi. Od dubna 2020 tvoří video obsah pro obchod CZC, kde dělá reklamy a recenze na zapůjčené produkty a novinky ze světa technologií. V prosinci 2020 moderovala společně s Patrikem Turi charitativní stream Pomoc z budoucnosti, kdy vybírali prostřednictvím Konto Bariéry na bionickou ruku pro Lukáše Polčáka. V prosinci 2020 propagovala hru…"} {"instruction": "Develop an HTML/CSS layout with 2 columns and a 2-row header.", "input": "", "output": "
      Row1
      Row2
      Column1
      Column2
      "} {"instruction": "Develop a Python script that connects to a MySQL database to retrieve certain data information.", "input": "", "output": "\"\"\"\nDevelop a Python script that connects to a MySQL database to retrieve certain data information\n\n\"\"\"\nimport pymysql \n\n# Establish a connection to a MySQL database\nconn = pymysql.connect(\n host='localhost', \n user='username', \n password='password', \n db='dbname',\n charset='utf8mb4',\n cursorclass=pymysql.cursors.DictCursor\n)\n\n# Create and execute a MySQL query \nsql = 'SELECT * FROM table WHERE condition=value'\ncur = conn.cursor()\ncur.execute(sql)\n\n# Retrieve results from the query\nresult = cur.fetchall()\n\n# Close the cursor and connection before exiting the script\ncur.close()\nconn.close()"} {"instruction": "How can you access elements in a multi-dimensional array in JavaScript?", "input": "", "output": "Accesing elements of the array can be done by using the index of the array. For example, for a two-dimensional array, the elements can be accessed using the following syntax: array[i][j], where i is the index of the outer array, and j is the index of the inner array. For a three-dimensional array, the syntax would be array[i][j][k]."} {"instruction": "Suggest a way to generate a random series of characters with a given length in Python.", "input": "", "output": "import random\nimport string\n\ndef generate_random_string(target_length):\n chars = string.ascii_letters + string.digits\n return ''.join(random.choice(chars) for _ in range(target_length))"} {"instruction": "Write some HTML code to create a list of items.", "input": "", "output": "
      • Item 1
      • Item 2
      • Item 3
      • Item 4
      • Item 5
      "} {"instruction": "Calculate the mean, median and mode for the given set of numbers.", "input": "130, 160, 140, 160, 160", "output": "The mean is: 149.4 The median is: 160 The mode is: 160"} {"text": "[DE Wikipedia] Arthur Guinness\n\nArthur Guinness (* 24. September 1725 in Celbridge, Irland; † 23. Januar 1803 in Dublin) war ein irischer Bierbrauer und Begründer der Biermarke Guinness. Arthurs Vater war Landverwalter für Arthur Price, den anglikanischen Erzbischof von Cashel, und braute in dieser Eigenschaft Bier für die Arbeitskräfte des Gutes. Im Alter von 27 Jahren erhielt Arthur £100 aus dem Nachlass von Arthur Price. Er investierte das Geld in die Pacht einer Brauerei in Leixlip in der Nähe von Dublin. Im Jahr 1759 überließ er die Tätigkeit seinem jüngeren Bruder und zog direkt nach Dublin. Dort pachtete er eine Brauerei am St. James Gate von Mark Reinsford. Optimistisch wie er war, schloss er einen Pachtvertrag für 9000 Jahre mit einem jährlichen Pachtzins von £45. Im Jahr 1761 heiratete er in der St. Mary’s Church in Dublin Olivia Whitmore, mit der er im Verlauf seines weiteren Lebens 21 Kinder hatte. Nur zehn von ihnen erreichten das Erwachsenenalter und begründeten die berühmte Guinness-Dynastie. Im Jahr 1778 begann Guinness mit dem Brauen der dunklen Biersorte Porter, und 1799 stellte er das Brauen heller Biersorten komplett ein. Gegen Ende des 18. Jahrhunderts war seine Brauerei die größte Porter- und Stout-Brauerei der Welt. Weblinks Giganten der Biergeschichte: Arthur Guinness Arthur Brauereiunternehmer Person (Dublin) Unternehmer (Irland) Unternehmer (18. Jahrhundert) Bier (Irland) Ire Geboren 1725 Gestorben 1803 Mann"} {"instruction": "Can you provide a Python program to generate a random integer within the range of 1 to 100?", "input": "", "output": "import random\n\ndef random_int_between_1_and_100():\n return random.randint(1, 100)"} {"instruction": "Create a function that takes an integer n as an argument and returns the sum of all numbers from 1 to n.", "input": "n = 10", "output": "def sum_to_n(n): total = 0 for i in range(1, n + 1): total += i return total"} {"instruction": "Generate an HTML content in Python which contains a text input field, submit button and a paragraph to display the results.", "input": "", "output": "\n\n\n Input Form\n \n\n\n

      Enter Your Data Below:

      \n
      \n \n \n
      \n

      Result:

      \n

      \n\n"} {"instruction": "Write a code to calculate the age in years and months given the date of birth.", "input": "Date of Birth: 4 June 1998", "output": "def age_calc(date_of_birth): \"\"\" This function takes in a date of birth and calculates the age in years and months. \"\"\" today = datetime.date.today() age_years = today.year - date_of_birth.year age_months = today.month - date_of_birth.month if age_months < 0: age_years -= 1 age_months += 12 return age_years, age_months date_of_birth = datetime.date(1998, 6, 4) print(age_calc(date_of_birth)) # Output: (21, 10)"} {"instruction": "Create a Pie Chart in Python with the following data", "input": "Item\tFrequency\nPen\t4\nPencil\t9\nEraser\t3", "output": "import matplotlib.pyplot as plt\n\nitems = ['Pen', 'Pencil', 'Eraser']\nfrequencies = [4, 9, 3]\n\nplt.pie(frequencies, labels=items, autopct='%1.1f%%', shadow=True, startangle=90)\nplt.axis('equal')\nplt.show()"} {"instruction": "Write Python code to implement the Quick Sort algorithm.", "input": "[10, 7, 8, 9, 1, 5]", "output": "def partition(arr,p,r):\n x = arr[r]\n i = p - 1\n for j in range(p, r):\n if arr[j] <= x:\n i = i + 1\n arr[i], arr[j] = arr[j], arr[i]\n arr[i + 1], arr[r] = arr[r], arr[i+1]\n return i + 1\n \ndef quick_sort(arr,p,r):\n if p < r:\n q = partition(arr,p,r)\n quick_sort(arr,p,q-1)\n quick_sort(arr,q+1,r)"} {"instruction": "How would you solve the following problem: Given a list of numbers, find the two numbers that add up to a given sum?", "input": "[3, 6, 2, 8, 4], sum = 10", "output": "def find_sum(arr, num): found = False arr_set = set(arr) for i in arr_set: x = num - i if x in arr_set and x != i: # make sure the numbers aren't the same found = True return i, x if not found: return False"} {"text": "[EN Wikipedia] Phra Khanong\n\nPhra Khanong may refer to: Phra Khanong area, the neighbourhood in Bangkok usually referred to by the name Phra Khanong Phra Khanong Subdistrict in Khlong Toei District, Bangkok, which covers part of the area Phra Khanong Nuea Subdistrict in Watthana District, Bangkok, which covers part of the area Phra Khanong District in Bangkok, which formerly covered the area Phra Khanong Tai Subdistrict in Phra Khanong District, Bangkok, which is south of the Phra Khanong area. Phra Khanong BTS station, which serves the neighbourhood"} {"instruction": "Write a code to check if two rectangles overlap with each other.", "input": "rect1 = (0,0,10,10) rect2 = (8,8,12,12)", "output": "def check_overlap(rect1, rect2): x1, y1, w1, h1 = rect1 x2, y2, w2, h2 = rect2 x_overlap = max(0, min(x1 + w1, x2 + w2) - max(x1, x2)) y_overlap = max(0, min(y1 + h1, y2 + h2) - max(y1, y2)) overlap_area = x_overlap * y_overlap return (overlap_area > 0)"} {"instruction": "Implement a sorting algorithm in Python that sorts a given array of numbers in descending order.", "input": "[2, 5, 7, 3, 1, 8]", "output": "def sort_descending(list):\n sorted_list = sorted(list, reverse=True)\n return sorted_list"} {"instruction": "Write a Python program that takes a string and a number as input, and returns the string repeated the given number of times.", "input": "String: xyz\nNumber: 3", "output": "def repeatString(string, num):\n return string * num\n\nresult = repeatString(\"xyz\", 3)\nprint(result)"} {"text": "[CS Wikipedia] Basin\n\nBasin je francouzský středověký hrdinský epos ze 13. století, jeden z tzv. chansons de geste. Vypráví o mládí Karla Velikého, a proto patří do Karolínského (královského) cyklu. Epos se nedochoval, jeho děj je znám z norského prozaického zpracování Karlamagnús saga. Obsah písně Píseň úzce souvisí s eposem Mainet, ve kterém se vypráví jak mladý Karel musí uprchnout, aby jej nezavraždili nevlastní bratři Heldri a Rainfroi, kteří otrávili jejich otce, krále Pipina Krátkého, i jeho manželku Bertu, aby se zmocnili trůnu. Karlovi se zjeví anděl a poradí mu, aby v Ardenách našel zloděje jménem Basin (jde o bývalého šlechtice), který mu pomůže nad nevlastními bratry zvítězit. Karel pak skutečně nějaký čas žije v Basinově tlupě jako lupič. Společně s Basinem vnikne jako zloděj do Rainfroiho zámku, kde se mu podaří vyslechnout plány uchvatitelů. Rainfroy se chce nechat korunovat králem a Heldri má být jmenován vévodou. Karel dokáže oba zrádce zabít a stane se králem. Basin za své služby obdrží léno a ruku Rainfroiho vdovy. Odkazy Reference Externí odkazy Francouzská literární díla Knihy z 13. století Chansons de geste"} {"instruction": "Edit the existing Python program to append a new record with data programmatically.", "input": "people = [\n {\"name\": \"Alice\", \"age\": 8},\n {\"name\": \"Bob\", \"age\": 11},\n {\"name\": \"Charlie\", \"age\": 13},\n]", "output": "people = [\n {\"name\": \"Alice\", \"age\": 8},\n {\"name\": \"Bob\", \"age\": 11},\n {\"name\": \"Charlie\", \"age\": 13},\n {\"name\": \"John\", \"age\": 15},\n]\n\n# Append a new record with data programmatically:\nrecord = {\"name\": \"John\", \"age\": 15}\npeople.append(record)"} {"text": "[HI Wikipedia] फूलन देवी\n\nफूलन देवी (10 अगस्त 1963 - 25 जुलाई 2001) बागी से सांसद बनी एक भारत की एक राजनेता थीं। एक निम्न वर्ग में उनका जन्म उत्तर प्रदेश के एक छोटे से गाँव गोरहा का पूर्वा में एक मल्लाह के घर हुआ था। 1994 में, समाजवादी पार्टी के मुलायम सिंह यादव के नेतृत्व वाली राज्य सरकार ने उनके खिलाफ सभी आरोपों को सरसरी तौर पर वापस ले लिया और फूलन को रिहा कर दिया गया। वह तब समाजवादी पार्टी के उम्मीदवार के रूप में संसद के चुनाव के लिए खड़ी हुईं और दो बार मिर्जापुर के लिए संसद सदस्य के रूप में लोकसभा के लिए चुनी गईं। 2001 में, शेर सिंह राणा द्वारा नई दिल्ली में उनके आधिकारिक बंगले (सांसद के रूप में उन्हें आवंटित) के द्वार पर उनकी गोली मारकर हत्या कर दी गई थी, जिनके रिश्तेदारों को उनके गिरोह द्वारा बेहमई में मार डाला गया था। 1994 की फिल्म बैंडिट क्वीन (जेल से उनकी रिहाई के समय के आसपास बनी) उस समय तक उनके जीवन पर शिथिल रूप से आधारित है। बेहमई में हुआ हादसा फूलन को बेहमई गांव में एक घर के एक कमरे में बंद कर दिया गया था। तीन सप्ताह की अवधि में कई पुरुषों द्वारा उसे पीटा गया, बलात्कार किया गया और अपमानित किया गया। उन्होंने उसे गाँव के चारों ओर नग्न कर घुमाया। इस तीन सप्ताह की कैद से वह भागने में सफल रहीं | बेहमई में नरसंहार बेहमाई से भागने के कई महीनों बाद, फूलन बदला लेने के लिए गाँव लौटी। 14 फरवरी 1981 की शाम को, उस समय जब गाँव में एक शादी चल रही थी, फूलन और उसके गिरोह ने पुलिस अधिकारियों के रूप में पहनी हुई बेहमई में शादी की। फूलन ने मांग की कि उनके \"श्री राम\" और \"लाला राम\" को उत्पीड़ित किया जाए। [उद्धरण वांछित] उन्होंने कथित तौर पर कहा, दो व्यक्तियों को नहीं मिला। और इसलिए देवी ने गाँव के सभी युवकों को गोल कर दिया और एक कुएँ से पहले एक लाइन में खड़ा कर दिया। फिर उन्हें फाइल में नदी तक ले जाया गया। हरे तटबंध पर उन्हें घुटने टेकने का आदेश दिया गया। गोलियों की बौछार हुई और 22 लोग मारे गए। बेहमई नरसंहार ने पूरे देश में आक्रोश पैदा किया। उत्तर प्रदेश के तत्कालीन मुख्यमंत्री वी॰पी॰ सिंह ने बेहमाई हत्याओं के मद्देनजर इस्तीफा दे दिया। [१५] एक विशाल पुलिस अभियान शुरू किया गया था, जो फूलन का पता लगाने में विफल रहा था। यह कहा जाने लगा कि मानहुंट सफल नहीं था क्योंकि फूलन को इस क्षेत्र के गरीब लोगों का समर्थन प्राप्त था; रॉबिन हुड मॉडल की कहानियाँ मीडिया में घूमने लगीं। फूलन को बैंडिट क्वीन कहा जाने लगा, और उसे भारतीय मीडिया [12] के वर्गों द्वारा एक निडर और अदम्य महिला के रूप में महिमामंडित किया गया, जो दुनिया में जीवित रहने के लिए संघर्ष कर रही थी। आत्मसमर्पण और जेल की अवधि बेहमई नरसंहार के दो साल बाद भी पुलिस ने फूलन को नहीं पकड़ा था। इंदिरा गांधी सरकार ने आत्मसमर्पण पर बातचीत करने का फैसला किया। इस समय तक, फूलन की तबीयत खराब थी और उसके गिरोह के अधिकांश सदस्य मर चुके थे, कुछ पुलिस के हाथों मारे गए थे, कुछ अन्य प्रतिद्वंद्वी गिरोह के हाथों मारे गए थे। फरवरी 1983 में, वह अधिकारियों को आत्मसमर्पण करने के लिए सहमत हुई। हालाँकि, उसने कहा कि उसे उत्तर प्रदेश पुलिस पर भरोसा नहीं है और उसने जोर देकर कहा कि वह केवल मध्य प्रदेश पुलिस के सामने आत्मसमर्पण करेगी। उसने यह भी आग्रह किया कि वह महात्मा…"} {"instruction": "Create a Python program to find the total number of vowels and consonants in a given set of words.", "input": "\"Hello World\"", "output": "def count_letters(sentence):\n \"\"\"\n Count the number of vowels and consonants in the given sentence.\n @param sentence: str\n @return: tuple\n \"\"\"\n vowels = 0\n consonants = 0\n \n for char in sentence:\n if char.lower() in \"aeiou\":\n vowels += 1\n elif char.isalpha():\n consonants += 1 \n return (vowels, consonants)"} {"text": "[HI Wikipedia] गजानन दिगंबर माडगूलकर\n\nगजानन दिगंबर माडगूळकर (1 अक्टूबर 1919 – 14 दिसम्बर 1977) मराठी के प्रमुख कवि, गीतकार, लेखक तथा अभिनेता थे। महाराष्ट्र में वे अपने नाम के आद्यक्षरों 'गदिमा' से ही अधिक जाने जाते हैं। मराठी संस्कृति के लिए उनका योगदान मात्रा और गुणवत्ता दोनो दृष्टियों से बहुत अधिक है। इन्हें भी देखें गीतरामायण बाहरी कड़ियाँ gadima.com - the official website मराठी कवि"} {"instruction": "Generate a SQL query that selects all the fruit names from a table.", "input": "", "output": "SELECT fruit_name FROM fruits_table;"} {"instruction": "Write a code to find out if a given number is prime in JavaScript.", "input": "number = 29", "output": "function isPrime(number) { for (i=2; i <= Math.sqrt(number); i++) { if (number % i == 0) { return false; } } return true; } let number = 29 console.log(isPrime(number))"} {"instruction": "Create a new array in JavaScript containing only even numbers from the given input array.", "input": "Array: [3,7,10,6,23]", "output": "let evenArray = [3,7,10,6,23].filter(num => num % 2 == 0); //evenArray: [10,6]"} {"text": "[HI Wikipedia] तिलका माँझी\n\nतिलका माँझी, (संथाल:ᱵᱟᱵᱟ ᱛᱤᱞᱠᱟᱹ ᱢᱟᱡᱷᱤ) (11 फ़रवरी 1750 - 13 जनवरी 1785) तिलका मांझी उर्फ जबरा पहाड़िया जिन्होंने राजमहल, झारखंड की पहाड़ियों पर ब्रिटिश हुकूमत से लोहा लिया। इनमें सबसे लोकप्रिय तिलका मांझी हैं। परिचय जबरा पहाड़िया (तिलका मांझी) भारत में ब्रिटिश सत्ता को चुनौती देने वाले पहाड़िया समुदाय के वीर आदिवासी थे। सिंगारसी पहाड़, पाकुड़ के जबरा पहाड़िया उर्फ तिलका मांझी के बारे में कहा जाता है कि उनका जन्म 11 फ़रवरी 1750 ई. में हुआ था। 1771 से 1784 तक उन्होंने ब्रिटिश सत्ता के विरुद्ध लंबी और कभी न समर्पण करने वाली लड़ाई लड़ी और स्थानीय महाजनों-सामंतों व अंग्रेजी शासक की नींद उड़ाए रखा। पहाड़िया लड़ाकों में सरदार रमना अहाड़ी और अमड़ापाड़ा प्रखंड (पाकुड़, संताल परगना) के आमगाछी पहाड़ निवासी करिया पुजहर और सिंगारसी पहाड़ निवासी जबरा पहाड़िया भारत के आदिविद्रोही हैं। दुनिया का पहला आदिविद्रोही रोम के पुरखा आदिवासी लड़ाका स्पार्टाकस को माना जाता है। भारत के औपनिवेशिक युद्धों के इतिहास में जबकि पहला आदिविद्रोही होने का श्रेय पहाड़िया आदिम आदिवासी समुदाय के लड़ाकों को जाता हैं जिन्होंने राजमहल, झारखंड की पहाड़ियों पर ब्रितानी हुकूमत से लोहा लिया। इन पहाड़िया लड़ाकों में सबसे लोकप्रिय आदिविद्रोही जबरा या जौराह पहाड़िया उर्फ तिलका मांझी हैं। इन्होंने 1778 ई. में पहाड़िया सरदारों से मिलकर रामगढ़ कैंप पर कब्जा करने वाले अंग्रेजों को खदेड़ कर कैंप को मुक्त कराया। 1784 में जबरा ने क्लीवलैंड को मार डाला। बाद में आयरकुट के नेतृत्व में जबरा की गुरिल्ला सेना पर जबरदस्त हमला हुआ जिसमें कई लड़ाके मारे गए और जबरा को गिरफ्तार कर लिया गया। कहते हैं उन्हें चार घोड़ों में बांधकर घसीटते हुए भागलपुर लाया गया। पर मीलों घसीटे जाने के बावजूद वह पहाड़िया लड़ाका जीवित था। खून में डूबी उसकी देह तब भी गुस्सैल थी और उसकी लाल-लाल आंखें ब्रितानी राज को डरा रही थी। भय से कांपते हुए अंग्रेजों ने तब भागलपुर के चौराहे पर स्थित एक विशाल वटवृक्ष पर सरेआम लटका कर उनकी जान ले ली। हजारों की भीड़ के सामने जबरा पहाड़िया उर्फ तिलका मांझी हंसते-हंसते फांसी पर झूल गए। तारीख थी संभवतः 13 जनवरी 1785। बाद में आजादी के हजारों लड़ाकों ने जबरा पहाड़िया का अनुसरण किया और फांसी पर चढ़ते हुए जो गीत गाए - हांसी-हांसी चढ़बो फांसी ...! - वह आज भी हमें इस आदिविद्रोही की याद दिलाते हैं। पहाड़िया समुदाय का यह गुरिल्ला लड़ाका एक ऐसी किंवदंती है जिसके बारे में ऐतिहासिक दस्तावेज सिर्फ नाम भर का उल्लेख करते हैं, पूरा विवरण नहीं देते। लेकिन पहाड़िया समुदाय के पुरखा गीतों और कहानियों में इसकी छापामार जीवनी और कहानियां सदियों बाद भी उसके आदिविद्रोही होने का अकाट्य दावा पेश करती हैं। तिलका माँझी उर्फ जबरा पहाड़िया विवाद तिलका मांझी संताल थे या पहाड़िया इसे लेकर विवाद है। आम तौर पर तिलका मांझी को मूर्मु टोटेम का बताते हुए अनेक लेखकों ने उन्हें संताल आदिवासी बताया है। तिलका मांझी के पिता का नाम सुंदर मुर्मू था. सुंदर मुर्मू तिलकपुर गांव के ग्राम प्रधान (आतु मांझी) थे. उनके पिता के नाम से साफ पता चलता है तिलका मांझी संथाल परिवार में जन्मे एक संथाल आदिवासी समुदाय के थे. तिलका मांझी (मुर्मू) का जन्म 11फरवरी 1750 को हुआ…"} {"text": "[DE Wikipedia] Sportpalastrede\n\nAls Sportpalastrede wird die Rede bezeichnet, die der nationalsozialistische deutsche Reichspropagandaminister Joseph Goebbels am 18. Februar 1943 im Berliner Sportpalast hielt und in der er zur Intensivierung des „totalen Krieges“ aufrief. Die knapp 108 Minuten dauernde Rede gilt als ein Paradebeispiel der Rhetorik und der NS-Propaganda. Vorgeschichte Die Kriegsführung des Dritten Reiches hatte auf eine Blitzkriegstrategie gesetzt, also auf die schnelle Niederwerfung der Sowjetunion. Das Dritte Reich war kriegswirtschaftlich nicht auf einen längeren Krieg vorbereitet gewesen. Stalins Strategie hingegen war ein „Kampf der Maschinen“, ein Abnutzungskrieg, bei dem die größere Kriegswaffenproduktion den Sieg bringen sollte. Die Sowjetunion gewann den Krieg letztlich tatsächlich durch eine gegenüber dem Deutschen Reich deutlich größere Waffenproduktion. Anfang 1943 war die militärische Lage zunehmend schlecht, in Nordafrika waren die Achsenmächte in die Defensive geraten, und an der Ostfront hatte die 6. Armee in Stalingrad am 2. Februar kapituliert. Goebbels drängte auf eine Intensivierung der Kriegswirtschaft (des so genannten totalen Krieges) und schlug Hitler in einer Denkschrift vor, „Faulenzer und Parasiten“ wie die „Töchter der Plutokraten“ zur Arbeit in der Kriegswirtschaft zu zwingen und die Zivilwirtschaft durch Stilllegungsverfügungen zuvorderst für Luxusgaststätten, Modesalons und Läden zugunsten der Kriegswirtschaft zu verkleinern. Beeinflusst von der Dolchstoßlegende war Hitler jedoch der Ansicht, dass das deutsche Volk der Wehrmacht in den Rücken fallen könnte, wenn die Zivilgesellschaft in ihrem Konsum allzu sehr beschränkt würde. Goebbels spekulierte auch darauf, als Manager des totalen Krieges zum zweiten Mann im NS-Staat aufzurücken. Er plante die Sportpalastrede zu dem Zweck, auf Hitler Druck auszuüben. Indem er das Volk auf radikale Maßnahmen vorbereitete, glaubte er, Hitler auf seine Linie festlegen zu können. Die Rede selbst war detailliert inszeniert, Goebbels hatte das Publikum auf treueste Parteianhänger hin handverlesen, Sprechchöre studierten Slogans ein, eine Hundertschaft wurde instruiert, wann und wie lange sie applaudieren sollten. Über die Lautsprecheranlage des Sportpalastes wurde später auch Applaus von Schallplatte eingespielt. Gemäß Curt Riess’ früher Goebbels-Biografie von 1949 hat Goebbels die Rede komplett selbst entworfen, anders als seine sonstigen Reden, bei denen er von einem Entwurf seiner Assistenten ausging, und sie auch vor dem Spiegel einstudiert. Der Leiter der Rundfunkabteilung im Propagandaministerium, Hans Fritzsche, soll ihn gefragt haben, was er tun werde, wenn das Publikum nicht wunschgemäß reagiere. Laut Riess antwortete Goebbels, nach fast einer Stunde werde er die Zuhörer so weit haben, dass sie…"} {"instruction": "Write a PHP script to display the system environment variables.", "input": "", "output": "\"; } ?>"} {"instruction": "Write a loop in C++ to print out a list of numbers from 1 to 100.", "input": "", "output": "#include int main() { for(int i = 1; i <= 100; i++) { std::cout << i << ' '; } return 0; }"} {"instruction": "Write a macro in C++ that prints half of the cube of a number", "input": "", "output": "#include #define CUBE(x) ((x)*(x)*(x)) #define HALF_CUBE(x) ( (CUBE(x) )/2 ) int main() { int x = 3; std::cout << HALF_CUBE(x) << std::endl; return 0; }"} {"text": "[EN Wikipedia] Astronomer\n\nAn astronomer is a scientist in the field of astronomy who focuses their studies on a specific question or field outside the scope of Earth. They observe astronomical objects such as stars, planets, moons, comets and galaxies – in either observational (by analyzing the data) or theoretical astronomy. Examples of topics or fields astronomers study include planetary science, solar astronomy, the origin or evolution of stars, or the formation of galaxies. A related but distinct subject is physical cosmology, which studies the Universe as a whole. Types Astronomers usually fall under either of two main types: observational and theoretical. Observational astronomers make direct observations of celestial objects and analyze the data. In contrast, theoretical astronomers create and investigate models of things that cannot be observed. Because it takes millions to billions of years for a system of stars or a galaxy to complete a life cycle, astronomers must observe snapshots of different systems at unique points in their evolution to determine how they form, evolve, and die. They use this data to create models or simulations to theorize how different celestial objects work. Further subcategories under these two main branches of astronomy include planetary astronomy, galactic astronomy, or physical cosmology. Academic Historically, astronomy was more concerned with the classification and description of phenomena in the sky, while astrophysics attempted to explain these phenomena and the differences between them using physical laws. Today, that distinction has mostly disappeared and the terms \"astronomer\" and \"astrophysicist\" are interchangeable. Professional astronomers are highly educated individuals who typically have a PhD in physics or astronomy and are employed by research institutions or universities. They spend the majority of their time working on research, although they quite often have other duties such as teaching, building instruments, or aiding in the operation of an observatory. The American Astronomical Society, which is the major organization of professional astronomers in North America, has approximately 7,000 members. This number includes scientists from other fields such as physics, geology, and engineering, whose research interests are closely related to astronomy. The International Astronomical Union comprises almost 10,145 members from 70 countries who are involved in astronomical research at the PhD level and beyond. Contrary to the classical image of an old astronomer peering through a telescope through the dark hours of the night, it is far more common to use a charge-coupled device (CCD) camera to record a long, deep exposure, allowing a more sensitive image to be created because the light is added over time. Before CCDs,…"} {"text": "[EN Wikipedia] Rose Fitzpatrick\n\nRose Mary Fitzpatrick (born c. 1960) is a retired British police officer. Fitzpatrick was born in London and began her career in the City. In 1987, at the age of 27, she joined the City of London Police as a constable and rose through the uniformed ranks to the rank of chief inspector. In 1993, she served as an exchange officer with Suffolk Constabulary, and in 1995 she was attached as a staff officer to HM Inspectorate of Constabulary. In 1998, she transferred to the Metropolitan Police as a superintendent in charge of operational policing in Whitechapel, and the following year took responsibility for operational policing in the whole of Tower Hamlets. In February 2000, she was promoted to chief superintendent and took over as borough commander of Tower Hamlets. She was promoted to commander in November 2002 and headed a team working with the Home Office and Department for Constitutional Affairs to implement police and criminal justice reform, including the introduction of safer neighbourhood teams. She then took command of operational policing in North West London. She was promoted to deputy assistant commissioner in August 2005 as head of the new Diversity and Citizen Focus Command. She served as DAC Territorial Policing and in 2009 was temporary Assistant Commissioner Territorial Policing. She then became DAC Corporate Development before retiring in 2012, but four weeks later joined the new Police Scotland in 2012 as deputy chief constable in charge of territorial policing. Fitzpatrick was awarded the Queen's Police Medal (QPM) in the 2007 New Year Honours and appointed Commander of the Order of the British Empire (CBE) in the 2017 Birthday Honours for services to law and order. She retired from Police Scotland in June 2018 and was appointed to chair the Scottish Government's new National Suicide Prevention Leadership Group. There was controversy when it emerged that the Scottish Police Authority had paid her a total of £67,000 in relocation expenses and footed a £53,000 tax bill during her service. Fitzpatrick's husband is Scottish. They have two daughters. Footnotes Living people Commanders of the Order of the British Empire English recipients of the Queen's Police Medal Metropolitan Police recipients of the Queen's Police Medal British police chief officers People from London Metropolitan Police chief officers Year of birth missing (living people)"} {"instruction": "You need to write a Python program for computing the factorial of a number.", "input": "5", "output": "def factorial(num):\n if num == 0:\n return 1\n else:\n return num * factorial(num - 1)\n\nprint(factorial(5))"} {"instruction": "Create an algorithm to check if a sentence is a palindrome in Python.", "input": "Sentence: \"Rise to vote, Sir\"", "output": "def is_sentence_palindrome(sentence):\n sentence = sentence.lower().replace(\" \", \"\")\n return sentence == sentence[::-1]\n\nis_sentence_palindrome(\"Rise to vote, Sir\") # False"} {"instruction": "Construct a simple web page with two fields, a login input and a password input.", "input": "", "output": "
      "} {"instruction": "Develop a python program which can generate a random array of integers", "input": "", "output": "import random\n\ndef get_random_array(max_size):\n arr = []\n\n for _ in range(random.randint(0, max_size)):\n arr.append(random.randint(0, max_size))\n \n return arr"} {"text": "[CS Wikipedia] První vláda Lubomíra Štrougala\n\nPrvní vláda Lubomíra Štrougala existovala v období 28. ledna 1970 do 9. prosince 1971, de facto se však jednalo o pokračování vlády, jmenované 29. září 1969, původně v čele s Oldřichem Černíkem. Seznam členů vlády Předseda vlády: Lubomír Štrougal Místopředseda vlády: Josef Korčák Peter Colotka Karol Laco Matej Lúčan Václav Hůla František Hamouz Miloslav Hruškovič (do 26. 6. 1970) Jindřich Zahradník Ján Gregor Ministr zahraničních věcí: Ján Marko Ministr národní obrany: Martin Dzúr Ministr vnitra: Radko Kaska Ministr financí: Rudolf Rohlíček Ministr plánování: Václav Hůla, do 1. 1. 1971 Ministr práce a sociálních věcí: Michal Štanceľ Ministr zahraničního obchodu: Andrej Barčák Ministr - předseda Výboru pro ceny: Ignác Rendek Ministr - předseda Výboru pro průmysl: Jindřich Zahradník Ministr - předseda Výboru pro zemědělství a výživu: Bohuslav Večeřa Ministr - předseda Výboru pro dopravu: Jaroslav Knížka, do 1. 1. 1971 Ministr - předseda Výboru pro pošty a telekomunikace: Karel Hoffmann, do 1. 1. 1971 Ministr - předseda Výboru pro technický a investiční rozvoj: Oldřich Černík, do 23. 6. 1970 Ladislav Šupka, od 23. 6. 1970 Ministr bez portfeje: Bohuslav Kučera (ČSS) Jan Pauly, do 1. 1. 1971 (ČSL) Karol Martinka, od 28. 1. 1970 (od 1. 1. 1971 místopředseda Státní plánovací komise) Předseda Státní plánovací komise: Václav Hůla, od 1. ledna 1971 Předseda Federálního cenového úřadu: Ignác Rendek Předseda Výboru lidové kontroly: Drahomír Kolder Od 1. ledna 1971 byly zrušeny dosud existující výbory a byla následně zřízena federální ministerstva: Ministr dopravy: Štefan Šutka Ministr paliv a energetiky: Jaromír Matušek Ministr hutnictví a strojírenství: Josef Šimon Ministr pro technický a investiční rozvoj: Ladislav Šupka Ministr zemědělství: Bohuslav Večeřa Ministr spojů: Karel Hoffmann, do 24. 5. 1971 Vlastimil Chalupa, od 24. 5. 1971 Odkazy Literatura Milan Churaň a kol.: Kdo byl kdo v našich dějinách ve 20. století, 1. díl (A–M), 2. díl (N-Ž), Libri, Praha 1998 (2. vydání), (1. díl), (2. díl), (soubor) Související články Vláda Josefa Kempného a Josefa Korčáka - tehdejší vláda ČSR Vláda Štefana Sádovského a Petra Colotky - tehdejší vláda SSR Externí odkazy Vláda České republiky Štrougal Štrougal Štrougal Štrougal"} {"instruction": "Generate random numbers 0 to 1000.", "input": "", "output": "import random for i in range(10): print(random.randint(0, 1000))"} {"instruction": "Create a Python script to print out the multiplication table for the given number.", "input": "4", "output": "def printMultTable(n):\n for i in range(1, 11):\n print(n, 'x', i, '=', n*i)\n\nprintMultTable(4)"} {"instruction": "Construct a JavaScript program to find all the prime numbers within a range of numbers", "input": "range = [2,10]", "output": "function findPrimes(range) { let primes = []; for (let i=range[0]; i< range[1]; i++) { if (checkPrime(i)) { primes.push(i); } } return primes; } function checkPrime(num) { for (let i=2; i<=Math.sqrt(num); i++) { if (num % i == 0) { return false; } } return true; }"} {"instruction": "Develop a Python program to print the digits of a given integer in reverse order.", "input": "123", "output": "\"\"\"\nPython script to print the digits of a given integer in reverse order\n\"\"\"\n\nnum = int(input('Enter an integer: '))\n\n# Initializing the variable to hold the reversed digits \nreverse = 0\n\nwhile (num > 0):\n # Extracting the last digit\n remainder = num % 10\n\n # Multiplying the reverse variable by 10 and adding the remainder\n reverse = (reverse * 10) + remainder\n\n # Removing the last digit of the original number\n num = num // 10\n\n# printing the reversed digits\nprint(reverse)"} {"instruction": "Design a program to find the occurrence of a given character in a given string.", "input": "Given string: \"Hello World!\" Character to find: o", "output": "def occurance_count(str, char): count = 0 for c in str: if c == char: count += 1 return count"} {"text": "[HI Wikipedia] बिड़ोदी छोटी\n\nबिड़ोदी छोटी या बिड़ोदी छोट्टी, भारतीय राज्य राजस्थान के सीकर जिले की लक्ष्मणगढ़ तहसील का एक गाँव है। जिसे स्वामी की बिड़ोदी के नाम से जाना जाता है, गाँव २५० वर्ष पुराना है और लक्ष्मणगढ़ से १८ किलोमीटर (११ मील) पूर्व में और नवलगढ से २.५ किलोमीटर (१.९ मील) पश्चिम में स्थित है। बिड़ोदी छोटी की सीमाओं से कोलिडा, खींवासर, बीदासर, बीदसर, बिड़ोदी बड़ी, झाड़ेवा, जोगिया का बास और ब्राह्मणों की ढाणी (रामसिंह पुरा) और मालियों की ढाणी (भूधा का बास) गाँव लगते हैं। 500 एकड़ (२.० वर्ग किमी) भूमी वाले इस गाँव की कुल आबादी लगभग १४३० में जाट जाति का बाहुल्य है जबकि गाँव की प्रमुख गोत्र भास्कर (भाखर) है। अन्य जतियों में खाती, ब्राह्मण और हरिजन हैं। भूमि उपयोग गाँव का पूर्वी भाग रेत के टीलों से बना अनुपजाऊ भूभाग है जबकि दक्षिणी व पश्चिमी भाग अपेक्षाकृत उपजाऊ है। गाँव में सामान्यतया मानसून आधारित कृषि होती है लेकिन आजकल कुछ आर्टेसियन कुएं भी सिंचाई के काम लिए जाते हैं। इतिहास भारत की स्वतंत्रता से पहले स्वतंत्रता से पहले गाँव में भाखर जाट बसे चुके थे। सीकर दरबार ने यह गाँव बाबा चेतन दास को दिया था अतः गाँव को स्वामी की बिड़ोदी के नाम से भी जाना जाता है। गाँव में भाखर (भास्कर) जाटों का प्रभुत्व है इसके पश्चात पिलाणिया परिवार को यहाँ लाया गया। ग्राम सरकार बिड़ोदी छोटी, चक बिड़ोदी, (बिड़ोदी छोटी का एक भाग), जोगियों का बास, बुडा का बास (माळियों की ढ़ाणी) और रामसिंह पुरा बिड़ोदी बड़ी पंचायत में आते हैं। वर्तमान में गाँव की सरपंच मंजू देवी हैं, पंचायत में ०९ वार्ड सदस्य हैं जिन्हे जनता के मतदान द्वारा चुना जाता है। परिवहन बिड़ोदी लक्ष्मणगढ़ व नवलगढ से डामर सड़क से जुड़ा हुआ है। नवलगढ रेल्वे-स्टेशन नजदीकी रेल्वे स्टेशन है।) जो गाँव से २ किलोमीटर (१.९ मील) दूरी पर है जो कि जयपुर, दिल्ली सहित अन्य शहरों से अच्छे से जुड़ा हुआ है। धर्म सभी ग्रामीण हिन्दु धर्म के अनुयायी हैं। इस ग्राम में जाट, हरिजन, ब्राह्मण, खाती (जाँगीड़) व माली जाति के लोग रहते हैं। जाट जाति में भाखर (संशोधित : भास्कर), महण, पिलानियाँ व मील गोत्र हैं। हरिजन दो गोत्रों में विभाजित हैं - कांवलिया व देनवाल। ब्राह्मणों का एक मात्र घर है जिसकी चोटिया गोत्र है। सन्दर्भ बाहरी कड़ियाँ बिड़ोदी छोटी का गूगल मानचित्र दृश्य सीकर में सरपंचों का विवरण राजस्थान की राज पंचायतें सीकर ज़िले का आधिकारिक जालस्थल सीकर ज़िले के गाँव"} {"instruction": "Generate a code in Python for validating a given password", "input": "Minimum length of 8 characters and must contain at least 1 uppercase letter, 1 lowercase letter, 1 special character and 1 number", "output": "import re\n\ndef validate_password(passwd): \n Rule = re.compile(r\"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*#?&])[A-Za-z\\d@$!#%*?&]{8,}$\") \n return Rule.search(passwd)"} {"instruction": "Write a Python program to add two numbers in base-10.", "input": "num1 = 6, num2 = 8", "output": "def add_base10(num1, num2): \n return num1 + num2"} {"text": "[CS Wikipedia] Římskokatolická farnost Trhové Sviny\n\nŘímskokatolická farnost Trhové Sviny je územním společenstvím římských katolíků v rámci vikariátu České Budějovice - venkov českobudějovické diecéze. O farnosti Historie Trhové Sviny jsou prvně písemně doloženy v roce 1260, kdy zde zřejmě již byla duchovní správa. Místní farnost byla součástí doudlebského děkanátu v rámci bechyňského arcijáhenství. Farnost byla vždy poměrně rozsáhlá, což vyžadovalo přítomnost hned několika duchovních, aby bylo možno zajistit duchovní potřeby obyvatel. Roku 1842 byla farnost povýšena na děkanství. V roce 1949 bylo její území dále rozšířeno o Slavče, které do té doby patřily k farnosti v Žumberku. Farní kronika uvádí, že ještě v roce 1950 zde působili tři kněží (děkan a dva kněží v úřadu katechetů), přesto bylo problematické i při tomto počtu rozsáhlou farnost plně obstarávat. Děkan Jaroslav Holub vedl v letech 1950-1963 obsahově zajímavou farní kroniku, ve které zaznamenával poměrně otevřeně pro církev těžké poměry po komunistickém převratu. Vedle záznamů o životě farnosti v Trhových Svinech zaznamenával také překládání kněží v okolních farnostech, popisoval a komentoval stupňující se státní zásahy proti katolické církvi atd. Kroniku přestal vést v roce 1963 poté, co ji četl okresní církevní tajemník, a věci v ní zapsané použil jednak proti samotnému děkanu Holubovi, jednak proti některým věřícím. Přehled duchovních správců do r. 1947 R.D. Jan Dobrodinský 1947-1948 R.D. Stanislav Sasina 1948-1950 R.D. Jan Urban 1950-1993 R.D. Jaroslav Holub 1993-1994 R.D. Mgr. Ivo Valášek 1994-1996 R.D. Hroznata Dominik Holický, JC.D. 1996-2008 R.D. Ondřej Huječek 2008 (září-říjen) R.D. Mgr. Tomáš Dryje 2008-2018 R.D. Mgr. Marcin Dawid Źelazny († 28. 12. 2018) 2019 (leden-červen) R. D. Josef Stolařík, administrátor excurrendo od 1.7.2019 P. Andrej Ludovít Šabo, Opus J.S.S. Poutní místo Nejsvětější Trojice u Trhových Svinů Od 16. století existovala nedaleko městečka Trhových Svinů kaple, zasvěcená Nejsvětější Trojici. Na počátku 18. století byla přestavěna na působivý poutní kostel hvězdicovitého půdorysu s ambity. Farní kronika uvádí, že zde bývávala v časech komunismu procesí o slavnosti Božího Těla. Farnost tím poněkud obcházela státní regulaci pobožností, které byly vykázány výlučně na církevní půdu. Areál poutního kostela umožňoval průvod venku v ambitech. Současnost Farnost mívala sídelního duchovního správce, který byl zároveň administrátorem ex currendo ve farnostech Olešnice, Benešov nad Černou a Žumberk. Od r. 2019 je administrována excurrendo z Horní Stropnice. Odkazy Externí odkazy Profil farnosti na webu Českobudějovické diecéze Farní kronika Trhové Sviny Trhové Sviny Trhové Sviny Náboženství v okrese České Budějovice"} {"text": "[HI Wikipedia] जेफ बेनेट\n\nजेफरी ग्लेन \"जेफ\" बेनेट (अंग्रेजी: Jeffrey Glenn \"Jeff\" Bennett) या जेफ बेनेट (अंग्रेजी: Jeff Bennett) (जन्म २ अक्टूबर, १९६२) है एक अमेरिकी आवाज अभिनेता और गायक। वह सबसे अच्छा के रूप में जाना जाता है: की आवाज जॉनी ब्रेवो एक ही नाम का उपयोग करते हुए एक आवाज है कि एल्विस प्रेस्ली की तरह लग रहा था की श्रृंखला में। उन्होंने यह भी पेट्री की आवाज में है द लैंड बिफोर टाइम दूसरी फिल्म से आगे श्रृंखला, उन्होंने यह भी पेट्री की आवाज में है द लैंड बिफोर टाइम से श्रृंखला 2 फिल्म और उसके बाद डेक्सटर है लेबोरेटरी, डेक्सटर डैड में कार्टून नेटवर्क सीरीज, डेक्सटर है लेबोरेटरी और की वर्तमान आवाज़ है डिज़्नी है मिस्टर समी। फिल्मोग्राफी सन्दर्भ बाहरी कड़ियाँ 1962 में जन्मे लोग जीवित लोग अमेरिकी अभिनेता"} {"instruction": "Generate a script in python to split a given string into words and store them in a list.", "input": "str = \"This is a great day\"", "output": "def split_str(str):\n words = str.split(\" \")\n return words"} {"instruction": "Generate a Python script to produce a 2D visualization of a given data set.", "input": "The data set contains 3 attributes: age, sex and income.", "output": "import matplotlib.pyplot as plt \n\n# define data \nage = [15, 17, 20, 22, 25, 28, 33, 35, 37, 45, 50] \nsex = [\"female\",\"male\",\"male\",\"female\",\"female\",\"male\",\"female\",\"male\",\"male\",\"female\",\"female\"] \nincome = [20000, 24000, 25000, 27000, 28000, 26000, 29000,\n 33000, 31000, 50000, 52000] \n\n# create figure for plotting\nfig = plt.figure()\n\n# create 2D scatter graph of data\nplt.scatter(age, income, c=sex, s=150) \n\n# add axis labels \nplt.xlabel('Age')\nplt.ylabel('Income')\n\n# add legend\nplt.legend([\"Female\",\"Male\"])\n\n# show graph \nplt.show()"} {"instruction": "How would you go about sorting a million numbers in memory?", "input": "", "output": "A common approach would be to use an efficient sorting algorithm, such as Quicksort, Merge Sort, or Heapsort. These algorithms typically take time proportional to n log n, where n is the number of elements being sorted."} {"text": "[EN Wikipedia] CY Cergy Paris University\n\nCY Cergy Paris University (French: CY Cergy Paris Université) is a public university located in Cergy-Pontoise, France. It was officially announced in October 2019 by the décret that the university would be founded by combining other institutions on 1 January 2020. The official status of the university is an experimental institution. History The university was created from the merger of several schools of the University of Paris-Seine (ComUE), Cergy-Pontoise University and the École internationale des sciences du traitement de l'information - EISTI. The École pratique de service social - EPSS and the Institut libre d'éducation physique supérieur - ILEPS will become component institutions of the new university. The other schools in the old University of Paris-Seine will become members of the CY Alliance. ESSEC Business School - ESSEC ISIPCA (Institut supérieur international du parfum, de la cosmétique et de l'aromatique alimentaire) École nationale supérieure d’architecture de Versailles - ENSA-V École nationale supérieure du paysage - ENSP-V École nationale supérieure d'arts de Paris-Cergy - ENSAPC École nationale supérieure de l'électronique et de ses applications (ENSEA) Supméca (Institut Supérieur de Mécanique de Paris) École de Biologie Industrielle - EBI École d'électricité, de production et des méthodes industrielles - ECAM-EPMI École supérieure d'Informatique, réseaux et systèmes d'information - ITESCIA École d'ingénieur d'agro-développement international - ISTOM Faculties CY SUP All the former undergraduate faculties of the University of Cergy-Pontoise will be reorganised as a new undergraduate school which will be named CY SUP. Graduate Schools There will be five graduate schools: CY Tech, a Grande Ecole, on sciences, engineering, economy and administration, with engineering education from the EISTI CY Art and Humanity, in association with the ENSAPC, the ENSAV, the ENSP, and the INP CY Education, with the INSPÉ, the EPSS, and the ILEPS CY Law and Political Science ESSEC Research There will be an institut of advanced studies named CY Advanced Studies. See also Education in France List of public universities in France by academy References Universities and colleges established in 2020 Education in Cergy-Pontoise Universities in Île-de-France 2020 establishments in France"} {"text": "[DE Wikipedia] Bešeňová\n\nBešeňová () ist eine Gemeinde in der Nordslowakei. Sie liegt im Liptauer Kessel an der Waag, etwa zwölf Kilometer von Ružomberok entfernt. Der Ort wurde 1279 erstmals schriftlich erwähnt. Die westlich gelegene Ansiedlung Mitošiny wurde nach 1863 eingemeindet. Kultur Weblinks Ort in der Slowakei Ersterwähnung 1279"} {"instruction": "Create a Python program to filter out words containing five characters or less from a list of words.", "input": "[\"Hello\", \"Good\", \"Where\", \"Been\", \"World\", \"House\"]", "output": "# Function to filter out words containing five characters or less\ndef filterWords(arr):\n result = [word for word in arr if len(word) > 5]\n return result\n\n# Get the input\narr = [\"Hello\", \"Good\", \"Where\", \"Been\", \"World\", \"House\"]\n\n# Call the function\nresult = filterWords(arr)\n\n# Print the result\nprint(\"Filtered list of words:\", result)"} {"instruction": "Generate a 5-dimensional array using the numpy library", "input": "", "output": "import numpy as np arr = np.zeros((5,5,5,5,5))"} {"text": "[DE Wikipedia] Rajapalayam (Stadt)\n\nRajapalayam ist eine Stadt im indischen Bundesstaat Tamil Nadu. Die Stadt ist der Hauptort des Distrikt Virudhunagar. Rajapalayam hat den Status einer Municipality. Die Stadt ist in 42 Wards gegliedert. Die Hunderasse Rajapalayam stammt aus der Stadt. Geschichte Rajapalayams Einwohner stammten ursprünglich aus dem Vijayanagara-Reich. Krishnadevaraya, der Maharaja des Imperiums, sandte fünf Militärkommandos in das Königreich Madurai Nayak, um im südlichen Teil des Königreichs, in der Region des heutigen Sivagiri, Recht und Ordnung zu wahren. Um die Zeit der Schlacht von Talikota (1565) wanderten weitere Personen aus dem Vijayanagar-Reich nach Süden aus und ließen sich in Pudupalayam im westlichen Teil der Gemeinde Rajapalayam nieder. Rajapalayam wurde im Jahr 1885 als United Board gegründet. Im Jahr 1930 wurde es zu einem Panchayat Board. Die Eisenbahn erreichte Rajapalayam im Jahr 1927 und die Stadt wurde 1937 elektrifiziert. Demografie Die Einwohnerzahl der Stadt liegt laut der Volkszählung von 2011 bei 130.442. Rajapalayam hat ein Geschlechterverhältnis von 1014 Frauen pro 1000 Männer und damit einen für Indien seltenen Frauenüberschuss. Die Alphabetisierungsrate lag bei 85,48 % im Jahr 2011. Knapp 95 % der Bevölkerung sind Hindus, ca. 3 % sind Muslime und ca. 2 % gehören einer anderen oder keiner Religion an. 8,9 % der Bevölkerung sind Kinder unter 6 Jahren. Wirtschaft Die Haupterwerbszweig war anfangs die Landwirtschaft. 1936 wurde die erste Baumwollmühle in der Stadt gegründet. Heute basiert die Wirtschaft auf der Textilherstellung: In der Stadt gibt es mehrere Spinnereien und Webereien für Baumwolle sowie einen großen Baumwollmarkt. Infrastruktur Der National Highway von Tirumangalam nach Kollam führt durch die Stadt. Die Staatsstraße SH-41 (Rajapalayam-Sankarankovil-Tirunelveli) verbindet die Stadt mit dem äußersten Süden von Tamil Nadu, einschließlich Tirunelveli, Tuticorin und Kanyakumari. Der Bahnhof von Rajapalayam liegt in der Southern Railway Zone der Indian Railways und liegt an der Linie von Virudhunagar nach Kollam. Einzelnachweise Ort in Tamil Nadu Municipality in Tamil Nadu Distrikt Virudhunagar"} {"instruction": "Create a Python program to convert a string to its equivalent unicode value.", "input": "\"hello\"", "output": "import unicodedata\n \n#example string\ns = \"hello\"\n \n#printing string to unicode\nprint(\"The unicode value of '\" + s + \"' is: \" + str(ord(unicodedata.normalize('NFKD', s)[0])))\n \n#output\n#The unicode value of 'hello' is: 104"} {"instruction": "Create a Java class named \"MyClass\" with three methods - getName(), setName(), and displayName().", "input": "", "output": "public class MyClass { private String name; // constructor public MyClass(String name) { this.name = name; } // getName public String getName() { return this.name; } // setName public void setName(String name) { this.name = name; } // displayName public void displayName() { System.out.println(\"Name is: \" + this.name); } }"} {"instruction": "Sort the list in Ascending order of the second element of each element in the list.", "input": "list = [(-5, 2), (1, 0), (1, 3), (3, 4), (-3, -9), (-10, -2)]", "output": "sorted_list = sorted(list, key=lambda x: x[1]) print(sorted_list) # Output: [(-3, -9), (1, 0), (-10, -2), (-5, 2), (1, 3), (3, 4)]"} {"instruction": "Code a for loop in Java to find the maximum value in an array", "input": "int[] arr = {2,5,3,7,1};", "output": "int max = arr[0]; for (int i = 0; i < arr.length; i++) { if (arr[i] > max) { max = arr[i]; } }"} {"instruction": "Make a program in Python to find the most frequently visited page in a given dataset", "input": "logs = ['/index.php', '/home.php', '/about.php', '/contact.php', '/index.php']", "output": "def most_visited_page(logs):\n # Initiliaze a dictionary to store counts\n pages = {}\n \n # Iterate through the logs and count the number of visits\n for page in logs:\n if page in pages:\n pages[page] += 1\n else:\n pages[page] = 1\n \n # Find the page with the highest number of visits\n top_page = ''\n max_visits = 0\n for page, count in pages.items():\n if count > max_visits:\n top_page = page\n max_visits = count\n \n # Return the page with the highest number of visits\n return top_page"} {"instruction": "Write an SQL query to return the top three highest-scoring players from a table 'scores'.", "input": "", "output": "SELECT player_name FROM scores ORDER BY score DESC LIMIT 3;"} {"instruction": "Develop an algorithm to find the value of n where n is the index of the Fibonacci sequence.", "input": "", "output": "def nth_fibonacci_number(n): \"\"\"Find the value of n where n is the index of the Fibonacci Sequence.\"\"\" if n < 2: return n elif n == 2: return 1 else: return nth_fibonacci_number(n-1) + nth_fibonacci_number(n-2)"} {"instruction": "Write a line of code to display a text message in the console saying \"Hello world!\".", "input": "", "output": "console.log(\"Hello world!\");"} {"instruction": "Explain the difference between unidirectional and bidirectional recurrent neural networks.", "input": "", "output": "A unidirectional recurrent neural network (RNN) accepts a single input and produces a single output. The input sequence is processed one step at a time and the output of each step depends only on the current input and the weights of the network. This type of network is often used in language models and other sequence-based predictions. In contrast, a bidirectional recurrent neural network (BRNN) processes the input sequence in both the forward and backward directions. This allows the network to make use of both past and future context when making predictions. Additionally, it has the potential to learn longer-term dependencies since the state of the network is shared between both directions. This type of network is commonly used in areas like speech recognition and natural language understanding."} {"instruction": "Suggest a completion for achieving the following without using a `for` loop.", "input": "my_list = [1, 2, 3] # Do something", "output": "my_list = [1, 2, 3] result = list(map(lambda x: x ** 2, my_list))"} {"instruction": "Write a Python script to generate a basic HTML page with a title, header, body, and footer sections.", "input": "The page title: Sample Page", "output": "\n \n Sample Page\n \n \n

      Sample Page

      \n\n

      This page has a header, a body, and a footer.

      \n\n
      \n

      This is the footer.

      \n
      \n \n"} {"instruction": "Create a Java program that calculates the probability of rolling a pair of dice and getting the number 8.", "input": "", "output": "public static double calculateProbability(int target) { int numFavorableOutcomes = 0; int numTotalOutcomes = 36; for (int i = 1; i <=6; i++) { for (int j = 1; j <= 6; j++) { if (i + j == target) { numFavorableOutcomes++; } } } return (double) numFavorableOutcomes/numTotalOutcomes; }"} {"text": "[EN Wikipedia] Blue-moustached bee-eater\n\nThe blue-moustached bee-eater (Merops mentalis) is a species of bird in the family Meropidae. It is found in submontane and upland habitats in Cameroon, Ivory Coast, Equatorial Guinea, Ghana, Guinea, Liberia, Nigeria, and Sierra Leone. The blue-moustached bee-eater is a rainforest bird usually found singly. It perches on a high branch in the canopy beside tracks and clearings and swoops down on small butterflies, honeybees and other insects before returning to its original perch. References blue-moustached bee-eater Birds of the Gulf of Guinea Birds of West Africa blue-moustached bee-eater"} {"text": "[HI Wikipedia] अहुरा मज़्दा\n\nअहुर मज़्दा या असुर महत अवस्ताई भाषा में प्राचीन ईरानी पंथ के एक देवता का नाम है जिन्हें पारसी पंथ के संस्थापक ज़रथुश्त्र ने अजन्मा और सर्वज्ञ परमेश्वर बताया था। इसके अलावा इनके लिए ओह्रमज़्द, होउरमज़्द, हुरमुज़, अरमज़्द और अज़्ज़न्दारा नाम भी प्रयोग किये जाते हैं। वे पारसी पंथ के सर्वोच्च देवता हैं और यस्न (पारसी पूजा विधि है) में इन्हें सर्वप्रथम और सर्वाधिक सम्बोधित किया जाता है। ऋग्वेद २: १: ६ में, उन्हें असुर महत के रूप में वर्णित किया गया है। अहुर मज़्दा को प्रकाश और अच्छाई उनके ख़िलाफ़ शैतानी दाएवों का अध्यक्ष है अंगिरा मैन्यु। देव गणों की पूजा का उल्लेख १५वी शताब्दी ईसा पूर्व में ईरान से लेकर सीरिया और तुर्की में पाया जाता है। इन अभिलेखों में भारत से इन देवताओं के आने का उल्लेख है। इससे पता चलता है कि अगले हजार साल में दक्षिणी इरान में कुछ लोग देवो के बदले असुर को पूजने लगे। पारसी पंथ शुरुआत ५वी शताब्दी से मानता है। आदिम हिन्द-ईरानी लोगों के पंथ में संसार और ब्रह्माण्ड में अच्छाई और सही व्यवस्था के महत्त्व पर ज़ोर था। जब भारतीय आर्य और ईरानी लोगों का विभाजन हुआ तो इस सही व्यवस्था के लिए संस्कृत में शब्द 'ऋत' बना और ईरानी भाषाओँ में इसका सजातीय 'अर्ता' () बना, जिसका एक अन्य रूप 'अशा' है। ध्यान दीजिये कि क्योंकि अंग्रेज़ी भी हिन्द-यूरोपीय भाषा परिवार की सदस्य है इसलिए उसमें भी सही के लिए इस से मिलता-जुलता शब्द है। इसके विपरीत जाने वाली क्रिया को संस्कृत में 'द्रुह' और फ़ारसी में 'द्रुज' कहा गया, यानि 'झूठा' या 'बुरा'। पारसी धर्म में अहुर मज़्दा अर्ता के लिए और द्रुज के खिलाफ़ हैं जबकि अंगिरा मैन्यु उस से विपरीत है। परिचय अहुरमज्द प्राचीन ईरान के पैगंबर ज़रथुस्त्र की ईश्वर (अहु=स्वामी, मज्द=परम ज्ञान) को प्रदत्त संज्ञा। सर्वद्रष्टा, सर्वशक्तिमान्‌, सृष्टि के एक कर्ता, पालक एवं सर्वोपरि तथा अद्वितीय, जिसे वंचना छू नहीं सकती और जो निष्कलंक है। पैगंबर की 'गाथाओं' अथवा स्तोत्रों में ईश्वर की प्राचीनतम, महत्तम एवं अत्यंत पवित्र भावना का समावेश मिलता है और उसमें प्राकृतिक शक्ति (स्थ्रोंपॉमर्फिक) पूजा का सर्वथा अभाव है जो प्राचीन आर्य और सामी देवताओं की विशेषता थी। धार्मिक नियमों में जिनका पालन करना प्रत्येक ज़रथुस्त्र मतावलंबी का कर्तव्य माना जाता है; उसे इस प्रकार कहना पड़ता है-मैं अहुरमज्द के दर्शन में आस्था रखता हूँ... मैं असत देवताओं की प्रभुता तथा उनमें विश्वास रखनेवालों की अवहेलना करता हूँ। इस प्रकार प्रत्येक नवमतानुयायी प्रकाश का सैनिक होता है जिसका पुनीत कर्तव्य अंधकार और वासना की शक्तियों से धर्मसंस्थान के लिए लड़ना है। ऐ मज्द! जब मैंने तुम्हारा प्रथम साक्षात पाया, इस प्रकार पैगंबर ने एक सुप्रसिद्ध पद में कहा है, मैंने तुम्हें केवल विश्व के आदि कर्ता के रूप में अभिव्यक्त पाया ओर तुमको ही विवेक का स्रष्टा (श्रेष्ठ, मिन्‌) एवं सद्धर्म का वास्तविक सर्जक तथा मानव जाति के समस्त कर्मों का नियामक समझा। अहुरमज्द का साक्षात्‌ केवल ध्यान का विषय है। पैगंबर ने इसी लिए ऐसी उपमाओं और रूपकों का आश्रय लेकर ईश्वर के विषय में समझाने का प्रयास किया है, जिनके द्वारा अनंत की कल्पना साधारण मनुष्य की समझ में आ पाए। वह ईश्वर से स्वयं वाणी में प्रकट होकर उपदेश करने…"} {"instruction": "Check if an element is present in a list.", "input": "lst = [1, 2, 3, 4] element = 5", "output": "def is_element_in_list(lst, element): return element in lst if __name__ == '__main__': lst = [1, 2, 3, 4] element = 5 print(is_element_in_list(lst, element))"} {"text": "[DE Wikipedia] Shackleton-Schelfeis\n\nDas Shackleton-Schelfeis () ist ein großes Schelfeis an der Queen-Mary-Küste und der Knoxküste des Antarktischen Kontinents mit einer Länge von 384 km und einer Fläche von 33.820 km². Im Shackleton-Schelfeis liegen einige Inseln, von denen die Mill-Insel und die Masson-Insel die größten sind. Das Schelfeis wurde während der United States Exploring Expedition (1838–1842) unter Leitung von Charles Wilkes 1840 entdeckt, jedoch erst bei der Australasiatischen Antarktisexpedition (1911–1914) erkundet. Expeditionsleiter Douglas Mawson benannte es nach dem britischen Polarforscher Ernest Shackleton, an dessen Nimrod-Expedition (1907–1909) Mawson beteiligt war. Luftaufnahmen der US-amerikanischen Operation Highjump (1946–1947) dienten 1955 der Kartierung des Schelfeises. Sowjetische Wissenschaftler nahmen 1956 eine eigenständige Kartierung vor. Sie zeigte, dass sich das Schelfeis im Osten über den Scott-Gletscher hinaus bis zum 105. östlichen Längengrad erstreckt. Weblinks Shackleton Ice Shelf auf geographic.org (englisch) Shackleton Ice Shelf im Composite Gazetteer of Antarctica (englisch) Einzelnachweise Schelfeis in der Antarktis Ernest Shackleton als Namensgeber Königin-Marie-Land Knox-Küste"} {"text": "[EN Wikipedia] 1997 British National Track Championships\n\nThe 1997 British National Track Championships were a series of track cycling competitions held from 18 to 26 July 1997 at the Manchester Velodrome. The Championships were organised by the British Cycling Federation. Medal summary Men's Events Women's Events References National Track Championships"} {"instruction": "Create a for loop to iterate through a given collection and print out an index for each element.", "input": "[5, 10, 15, 20]", "output": "for i, element in enumerate(collection): print(i, element) // Output 0 5 1 10 2 15 3 20"} {"text": "[EN Wikipedia] Lights Come Down\n\nLights Come Down is the third EP released by Christian rock band, High Flight Society. It is also the band's final released work. It was released on iTunes under the label, \"Caliber Recordings\". Track listing Personnel Jason Wilkes – lead vocals, rhythm guitar Michael Packer – backing vocals, lead guitar John Packer – backing vocals, bass guitar Scotty Lockridge – drums, percussion References 2011 EPs High Flight Society albums"} {"instruction": "Write a JavaScript Object that contains employee data such as name, age and contact number.", "input": "", "output": "let employeeDetails = { name: \"John Smith\", age: 26, contactNumber: \"123-456-7890\" };"} {"instruction": "Transform the following array into an HTML unordered list.", "input": "const veggies = [\"Lettuce\", \"Carrot\", \"Cucumber\"]", "output": "
      • Lettuce
      • Carrot
      • Cucumber
      "} {"instruction": "Write an R script that performs linear regression to predict a response variable.", "input": "", "output": "# load the data data <- read.csv(\"data.csv\") # fit the model model <- lm(formula = response ~ predictor, data = data) # view the results summary(model)"} {"instruction": "Create a Python code snippet to separate colored objects into two groups, one for red and the other for blue.", "input": "", "output": "def separate_objects(objects):\n red_group = []\n blue_group = []\n for obj in objects:\n if obj.color == 'red':\n red_group.append(obj)\n else:\n blue_group.append(obj)\n return (red_group, blue_group)"} {"instruction": "Write a Python program to generate a random name from a set of given names.", "input": "['John', 'Andy', 'Alex', 'Paul', 'Pippa']", "output": "import random\n\nnames = [\"John\", \"Andy\", \"Alex\", \"Paul\", \"Pippa\"]\n\ndef getRandomName(names):\n randomIndex = random.randint(0, len(names)-1) \n return names[randomIndex]\n\nif __name__ == '__main__':\n print(getRandomName(names))"} {"text": "[HI Wikipedia] मैंग फून\n\nमैंग फून न्यूज़ीलैण्ड के गिस्बॉर्न शहर के निवर्तमान महापौर हैं। यह चीनी मूल के मुट्ठीभर उन व्यक्तियो में से एक हैं जो न्यूज़ीलैण्ड के किसी शहर के महापौर बने हों। यह अंग्रेज़ी, कैण्टोनी तथा माओरी में धाराप्रवाह हैं। जीवित लोग गिस्बॉर्न क्षेत्र के लोग 1960 में जन्मे लोग"} {"instruction": "Create a Python function to generate a matrix with random numbers in it.", "input": "", "output": "import numpy as np\ndef random_matrix(row, col):\n matrix = np.random.random((row,col))\n print(matrix)\n\nrandom_matrix(3,3) #Outputs: [[0.48281427 0.8640267 0.16479638]\n [0.65602432 0.37230416 0.05444421]\n [0.78832705 0.19239374 0.03173512]]"} {"instruction": "Generate a code in python using the tkinter library to create a graphical user interface for a program.", "input": "", "output": "# Importing essential libraries \nfrom tkinter import * \n\n# Create the root window\nroot = Tk() \n\n# Defining the title of the window \nroot.title(\"GUI created using Tkinter\") \n\n# Defining the size of the window \nroot.geometry(\"500x500\") \n\n# Create the widgets \nlabel_1 = Label(root, text = \"My First Program needs GUI\") \n\n# Position the widgets \nlabel_1.pack() \n\n# Run the program \nroot.mainloop()"} {"instruction": "Create a Python program which sorts elements of an array in ascending order.", "input": "[5, 2, 1, 3, 6, 4]", "output": "def sort_ascending(array):\n for i in range(len(array)-1):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]\n\n return array\n\nsort_ascending([5, 2, 1, 3, 6, 4]) # Output = [1, 2, 3, 4, 5, 6]"} {"instruction": "Design a software that reverse orders of string words.", "input": "Python programming is fun", "output": "def reverse_string_words(string): \n words = string.split(\" \") \n words.reverse()\n return ' '.join(words) \n \nstring = \"Python programming is fun\"\nprint(reverse_string_words(string))"} {"instruction": "Suggest a way to remove duplicate characters from a string in JavaScript.", "input": "", "output": "The Set data structure can be used to remove duplicate characters from a string in JavaScript. For example: [...new Set(\"string\")].join(\"\"); // returns \"strng\""} {"instruction": "Find the index of the first occurrence of the substring “sea” in the following string.", "input": "String: \"These are the seas\"", "output": "The index of the first occurrence of “sea” is 8."} {"instruction": "Write code to return a list of prime numbers in the given range.", "input": "Start: 10. End: 15", "output": "def get_prime_numbers(start, end): prime_numbers = [] for num in range(start, end + 1): if num > 1: for i in range(2, num): if (num % i) == 0: break else: prime_numbers.append(num) return prime_numbers # print list of prime numbers print(get_prime_numbers(10, 15)) # Output: [11, 13, 15]"} {"instruction": "Write CSS code to position a div in the middle and bottom of the page.", "input": "", "output": "div { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }"} {"instruction": "Construct a Python dictionary to convert Celsius temperature values to their Fahrenheit equivalents", "input": "", "output": "celsius_to_fahrenheit = {\n 0 : 32,\n 10 : 50,\n 20 : 68,\n 30 : 86,\n 40 : 104,\n 50 : 122,\n 60 : 140,\n 70 : 158,\n 80 : 176,\n 90 : 194,\n 100 : 212\n}"} {"instruction": "Write a machine learning algorithm in Python to classify books into one of 4 categories: fiction, non-fiction, poetry, textbooks.", "input": "An example book title: \"Pride and Prejudice\"", "output": "# Import necessary libraries\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Load the data\ndata = pd.read_csv(\"books_data.csv\")\n\n# Define feature and target variables\nX = data['title']\ny = data['category']\n\n# Transform words into numerical features\n# Vectorize feature and target data\nfrom sklearn.feature_extraction.text import CountVectorizer\nvectorizer = CountVectorizer()\nX = vectorizer.fit_transform(X).toarray()\n\n# Build the ML model\nfrom sklearn.naive_bayes import MultinomialNB\nclf = MultinomialNB()\n\n# Fit the data on the classifier\nclf.fit(X, y)\n\n# Make a prediction\npride_and_prejudice = vectorizer.transform([\"Pride and Prejudice\"]).toarray()\ncategory = clf.predict(pride_and_prejudice)[0]\n\nprint(\"The book 'Pride and Prejudice' is classified as: \", category)"} {"text": "[DE Wikipedia] Angerberg\n\nAngerberg ist eine Gemeinde mit Einwohnern (Stand ) im Bezirk Kufstein in Österreich. Die Gemeinde liegt im Gerichtsbezirk Rattenberg. Geografie Die Gemeinde Angerberg liegt oberhalb des Verkehrsknotenpunktes Wörgl am 18 km langen „Mittelgebirgsrücken“, der zwischen der Brandenberger Ache und Niederbreitenbach verläuft. Im Norden Angerbergs befindet sich der Gebirgszug der Brandenberger Alpen mit dem Hundsalmjoch () als höchster Erhebung. Gemeindegliederung Das Gemeindegebiet umfasst folgende drei Ortschaften (in Klammern Einwohnerzahl Stand ): Achleit () Angerberg () Embach () Nachbargemeinden Geologie Die Gemeinde Angerberg umfasst einen Gutteil des Plateaus nördlich des Inns sowie den Südteil der Kalkalpen mit dem Gebiet Buchacker bis Hundalm. Das Plateau von Angerberg besteht im Wesentlichen aus Kiesen, Sanden und Schluffen des Quartärs, die auf einem Sockel aus tertiären Gesteinen liegen. Zu letzteren gehören die „Unterangerberg-Schichten“, für die die Gemeinde Angerberg die Typlokalität darstellt. Es handelt sich um Sandsteine und Mergel, die im oberen Oligozän abgelagert wurden. Eine Attraktion der Gemeinde ist die Hundalm-Eis- und Tropfsteinhöhle. Das Landschaftsbild Angerbergs ist durch den häufigen Wechsel von Wald und offener Landschaft geprägt. Zahlreiche Einzelgehöfte, Weiler und Siedlungen liegen eingestreut auf diesen Flächen. Die landwirtschaftliche Nutzung findet auf den gerodeten Flächen innerhalb der Waldgebiete statt. Flächennutzung Natur- und kulturräumliche Gliederung Die Gemeinde Angerberg lässt sich in folgende landschaftsräumliche Einheiten aufteilen: Embach Dieser nördliche Rand des Gemeindegebietes ist charakterisiert durch einen leicht reliefierten Geländerücken. An diesen grenzen im Norden die Bergrücken der „Innerberge“ und des „Schrecken“. Im Süden schließt der stark vernässte Talboden des Mossbachtales an und weiters ein bewaldeter Hangrücken bis hinauf zu „Angerberg-Mitte“. Der Bereich „Embach“ ist durch den vorgelagerten Mittelgebirgsrücken vom intensiv genutzten Inntal völlig abgeschirmt. Die für Angerberg typische bajuwarische Besiedlungsform (zentrale Hofstelle inmitten gerodeter Fläche) fehlt hier. Wesentliche Elemente des Landschaftsraumes sind die von Nord nach Süd durchlaufenden Bäche (Moosbach, Wiesbach), welche in zum Großteil noch mit typischer Begleitvegetation gesäumt sind. Angerberg-Mitte Der stark reliefierte, breite Geländerücken, welcher sich von West nach Ost auf einer Länge von etwa vier Kilometern erstreckt, kennzeichnet diesen Bereich. Die bajuwarische Siedlungsform ist hier vorherrschend und damit ein ständiger Wechsel zwischen bewaldetem Gebiet und offenen Wiesenflächen. Die Hofstellen sind meist zentral in den gerodeten, landwirtschaftlichen Flächen angelegt. Der zentrale Siedlungsbereich…"} {"instruction": "Create a binary classification model in Python for a dataset that has two classes", "input": "Not applicable", "output": "# Import necessary libraries\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# Read in the dataset\ndf = pd.read_csv('data.csv')\n\n# Split the data into training and test sets\nX = df.drop('target_class', axis=1)\ny = df.target_class\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Build the classification model\nclf = LogisticRegression()\nclf.fit(X_train, y_train)\n\n# Make predictions on the test set\ny_pred = clf.predict(X_test)\n\n# Evaluate the model\naccuracy = accuracy_score(y_test, y_pred)\nprint('Accuracy: %.2f' % accuracy)"} {"instruction": "Create a loop that prints all numbers 1 to 100 with the exception of multiples of 5.", "input": "", "output": "for i in range(1,101): if i % 5 != 0: print(i)"} {"instruction": "Rewrite the following piece of code in Python, that calculates the sum of two variables.", "input": "int x = 2;\nint y = 4;\nint sum = x + y;", "output": "x = 2\ny = 4\n\nsum = x + y\nprint(sum) # 6"} {"instruction": "Vysvětli rekurzi česky.", "input": "", "output": "Rekurze je technika, kdy funkce volá sama sebe s menším problémem, dokud nedosáhne základní podmínky."} {"instruction": "How can a programmer optimize a code to improve its performance?", "input": "", "output": "A programmer can optimize a code to improve its performance by using techniques like loop optimization, code refactoring, resource optimization, cache optimization, and parallel computing. Loop optimization involves reducing the number of iterations in loops, using variables instead of literals, removing redundant loops, debugging errors, and choosing the most efficient looping techniques. Code refactoring involves restructuring the code to make it more concise, readable, and maintainable. Resource optimization involves using efficient data structures, such as hash tables and balanced trees, to reduce computational resources as well as using optimized algorithms. Cache optimization involves designing well-crafted caches to store frequently accessed data, while parallel computing allows multiple tasks to be completed simultaneously on different CPU cores."} {"instruction": "Create a program in Python to take one input argument, a string, and return a new string with the last character of the string repeating n times, where n is the length of the string.", "input": "", "output": "def repeat_last_character(s):\n # base case: if string is empty\n if len(s) == 0:\n return ''\n\n final_char = s[-1] # last character of the string\n result = final_char * len(s) # repeat the last character n times, where n is the length of the string\n\n return result\n\n# Example\nstring = 'Hello'\nprint(repeat_last_character(string)) # ooooo"} {"instruction": "Create a Python program for a text editor that replaces all instances of a specified pattern with a different text string.", "input": "string = \"Hello world!\"\npattern = \"Hello\"\nreplacement = \"Goodbye\"", "output": "# Function to replace a given pattern with a different string\ndef replace_pattern(string, pattern, replacement):\n # Split string into list of words\n words = string.split()\n\n # Go through each word and replace the pattern\n for i in range(len(words)):\n if words[i] == pattern:\n words[i] = replacement\n\n # Return the modified string\n return ' '.join(words)\n\n\n# Example\nstring = \"Hello world!\"\npattern = \"Hello\"\nreplacement = \"Goodbye\"\nmodified_string = replace_pattern(string, pattern, replacement)\nprint(modified_string) # Output: Goodbye world!"} {"instruction": "Given an array of numbers, write a prototype JavaScript function to find the average value of all numbers in the array", "input": "[6, 5, 8, 10]", "output": "function findAverage(numbers) { let sum = 0; for (number of numbers) { sum += number; } return sum / numbers.length; }"} {"instruction": "Create an algorithm in Python to combine two sorted lists into a single sorted list.", "input": "list1 = [3, 5, 7] list2 = [1, 2, 4]", "output": "def merge_lists(lst1, lst2): sorted_list = [] i=j=0 while (i arr[j+1] : \n arr[j], arr[j+1] = arr[j+1], arr[j] \n \n # Driver code to test above \n arr = [8, 1, 5, 7, 3] \n \n bubble_sort(arr) \n \n print (\"Sorted array is:\") \n for i in range(len(arr)): \n print (\"%d\" %arr[i]), \n \n# Output:\n1 3 5 7 8"} {"instruction": "Using SQL, select the names of all employees with the title \"Manager\".", "input": "", "output": "SELECT name FROM Employees WHERE title = 'Manager';"} {"instruction": "Write an R code to return the first 10 rows of a data frame.", "input": "states-data.csv", "output": "# Load the data states_data <- read.csv(\"states-data.csv\") # Get the first 10 rows head(states_data, 10)"} {"instruction": "Use Selenium Webdriver to create a Python program that navigates to the Google homepage, searches for \"GPT\" and prints the h2 element in the result page.", "input": "Not applicable", "output": "from selenium import webdriver\n\n# set chrome driver\ndriver = webdriver.Chrome()\n\n# open google\ndriver.get(\"https://www.google.com/\")\n\n# find search box and enter \"GPT\"\nsearch = driver.find_element_by_name(\"q\")\nsearch.send_keys(\"GPT\")\n\n# click search\nsearch.submit()\n\n# print h2 element\nh2 = driver.find_element_by_tag_name(\"h2\")\nprint(h2.text)\n\n# close browser\ndriver.close()"} {"instruction": "Write a python program that takes a dictionary as input and returns a list of its values.", "input": "data = {\n \"key1\": \"value1\",\n \"key2\": \"value2\",\n \"key3\": \"value3\"\n}", "output": "def get_values(data):\n \"\"\"\n Gets the values from a dictionary.\n \n Args:\n data (dict): The dictionary from which to get the values\n \n Returns:\n values (list): A list of the values from the dictionary\n \"\"\"\n values = []\n for value in data.values():\n values.append(value)\n return values\n\nif __name__ == \"__main__\":\n data = {\n \"key1\": \"value1\",\n \"key2\": \"value2\",\n \"key3\": \"value3\"\n }\n print(get_values(data))"} {"instruction": "Generate a unique key using the following string.", "input": "my_str = \"Hello World\"", "output": "import uuid key = uuid.uuid5(uuid.NAMESPACE_DNS, my_str)"} {"text": "[CS Wikipedia] Charles Gustafsson\n\nCharles Gustafsson (* 25. prosince 1932) je bývalý švédský fotbalista, který hrával na pozici záložníka. Fotbalová kariéra Celou svou kariéru strávil v klubu Malmö FF. Dvakrát nastoupil za švédskou fotbalovou reprezentaci, branku nevstřelil. Bylo to 25. září 1955 proti Norsku (remíza 1:1, Nordic Football Championship) a 16. června 1957 proti Maďarsku (0:0, přátelské utkání). Odkazy Reference Externí odkazy Profil hráče, reprezentační zápasy na eu-football.info Švédští fotbalisté Fotbalisté Malmö FF Narození v roce 1932 Muži Žijící lidé Fotbaloví záložníci Narození 25. prosince"} {"instruction": "Design a sorting algorithm in Python that uses two lists.", "input": "list1 = [3, 2, 5, 4, 1]\nlist2 = [0, 1, 1, 0, 1]", "output": "def sort_two_lists(list1, list2):\n \"\"\"Function to sort two lists by the order of list2\"\"\"\n zipped_lists = zip(list1, list2)\n zipped_lists = sorted(zipped_lists, key=lambda x: x[1])\n sorted_list1, sorted_list2 = zip(*zipped_lists)\n return list(sorted_list1), list(sorted_list2)"} {"text": "[HI Wikipedia] इम्फाल\n\nइम्फाल (ꯏꯝꯐꯥꯜ) भारत के मणिपुर राज्य की राजधानी है। इस ऐतिहासिक नगर के केन्द्र में भूतपूर्व मणिपुर राज्य की गद्दी, कंगला महल, के खण्डहर उपस्थित हैं। इम्फाल नगर इम्फाल पश्चिम ज़िले और इम्फाल पूर्व ज़िले दोनों में विस्तारित है, और शहर की अधिकांश आबादी इसके पश्चिमी भाग में निवास करती है। इम्फाल भारत सरकार द्वारा अनुसूचित स्मार्ट नगरों में से एक है। पर्यटन श्री गोविन्ददेव जी मन्दिर यह मन्दिर मणिपुर के पूर्व शासकों के महल के निकट ही है, व वैष्णवों का पावन तीर्थ स्थल है। यह दो स्वर्ण गुम्बदों सहित एक सरल किन्तु सुन्दर निर्माण है। इसमें एक पक्का प्रांगण तथा सभागार भी है। यहां के मुख्य देवता श्री राधा-कृष्ण हैं, जिनके साथ ही बलराम और कृष्ण के मन्दिर एक ओर हैं, तो दूसरी ओर जगन्नाथ, बलभद्र एवं सुभद्रा के मन्दिर हैं। शहीद मीनार इम्फाल के पोलोग्राउण्ड के पूर्वी ओर यह मीनार बीर टिकेन्द्रजीत पार्क में खड़ी है। यह ब्रिटिश सेना के विरुद्ध १८९१ के युद्ध के मणिपुरी शहीदों की याद में बनी है। यह मीनार फोटो खींचने वालों का मुख्य आकर्षण है। युद्ध स्मारक द्वितीय विश्वयुद्ध में मारे गए भारतीय व ब्रिटिश सैनिकों की समाधियाँ व कब्रें। मणिपुर ज़ू इम्फाल का चिड़ियाघर। सिंगदा ९२१ मीटर की ऊंचाई पर यह सुन्दर पिकनिक स्थल इम्फाल से १६ किलोमीटर दूर है। लांगथबल यह भारत-बर्मा सीमा से ६ किलोमीटर दूर है। इन्हें भी देखें इम्फाल पश्चिम ज़िला इम्फाल पूर्व ज़िला सन्दर्भ मणिपुर के शहर इम्फाल पश्चिम ज़िला इम्फाल पश्चिम ज़िले के नगर इम्फाल पूर्व ज़िला इम्फाल पूर्व ज़िले के नगर मणिपुर में पर्यटन भारत के राज्यों और केन्द्र शासित प्रदेशों की राजधानियाँ"} {"text": "[CS Wikipedia] Kostel svatého Karla Boromejského\n\nKostelů zasvěcených Karlu Boromejskému je více: v Praze Kostel svatého Karla Boromejského (Malá Strana) – v areálu Nemocnice Milosrdných sester sv. Karla Boromejského (dříve Pod Petřínem) Kostel svatého Karla Boromejského a Panny Marie – zrušený, součást Vlašského špitálu, Malá Strana čp. 335 Kostel svatého Karla Boromejského na Zderaze, dnes pravoslavný chrám svatého Cyrila a Metoděje (Praha) v Česku Kostel svatého Karla Boromejského (Opatovice) Kostel svatého Karla Boromejského (Písek) Kostel svatého Karla Boromejského (Varnsdorf) v zahraničí Kostel Saint-Charles-de-Monceau v Paříži Kostel svatého Karla Boromejského (Vídeň) Související články Kaple svatého Karla Boromejského Externí odkazy Údržba:Kostely bez kategorie zasvěcení"} {"instruction": "We have a given string. Replace every occurrence of 'a' with 'A'", "input": "string = 'I like apples'", "output": "string = 'I like Apples'"} {"text": "[HI Wikipedia] हरियाणा\n\nहरियाणा उत्तर भारत का एक राज्य है जिसकी राजधानी चण्डीगढ़ है। इसकी सीमायें उत्तर में पंजाब और हिमाचल प्रदेश, दक्षिण एवं पश्चिम में राजस्थान से जुड़ी हुई हैं। यमुना नदी इसके उत्तर प्रदेश राज्य के साथ पूर्वी सीमा को परिभाषित करती है। राष्ट्रीय राजधानी दिल्ली हरियाणा से तीन ओर से घिरी हुई है और फलस्वरूप हरियाणा का दक्षिणी क्षेत्र नियोजित विकास के उद्देश्य से राष्ट्रीय राजधानी क्षेत्र में शामिल है। यह राज्य वैदिक सभ्यता और सिंधु घाटी सभ्यता का मुख्य निवास स्थान है। इस क्षेत्र में विभिन्न निर्णायक लड़ाइयाँ भी हुई हैं जिसमें भारत का अधिकतर इतिहास समाहित है। इसमें महाभारत का महाकाव्य युद्ध भी शामिल है। हिन्दू मतों के अनुसार महाभारत का युद्ध कुरुक्षेत्र में हुआ (इसमें भगवान कृष्ण ने भागवत गीता का वादन किया)। इसके अलावा यहाँ तीन पानीपत की लड़ाइयाँ हुई। ब्रितानी भारत में हरियाणा पंजाब राज्य का अंग था जिसे 1966 में भारत के 17वें राज्य के रूप में पहचान मिली। वर्तमान में खाद्यान और दुग्ध उत्पादन में हरियाणा देश में प्रमुख राज्य है। इस राज्य के निवासियों का प्रमुख व्यवसाय कृषि है। समतल कृषि भूमि निमज्जक कुओं (समर्सिबल पंप) और नहर से सिंचित की जाती है। 1960 के दशक की हरित क्रान्ति में हरियाणा का भारी योगदान रहा जिससे देश खाद्यान सम्पन्न हुआ। हरियाणा, भारत के अमीर राज्यों में से एक है और प्रति व्यक्ति आय के आधार पर यह देश का दूसरा सबसे धनी राज्य है। वर्ष २०१२-१३ में देश में इसकी प्रति-व्यक्ति १,१९,१५८ (अर्थव्यवस्था के आकार के आधार पर भारत के राज्य देखें) और वर्ष २०१३-१४ में १,३२,०८९ रही। इसके अतिरिक्त भारत में सबसे अधिक ग्रामीण करोड़पति भी इसी राज्य में हैं। हरियाणा आर्थिक रूप से दक्षिण एशिया का सबसे विकसित क्षेत्र है और यहाँ कृषि एवं विनिर्माण उद्योग ने १९७० के दशक से निरंतर वृद्धि प्राप्त की है। भारत में हरियाणा यात्रि कारों, द्विचक्र वाहनों और ट्रैक्टरों के निर्माण में सर्वोपरी राज्य है। भारत में प्रति व्यक्ति निवेश के आधार पर वर्ष २००० से राज्य सर्वोपरी स्थान पर रहा है। भूगोल हरियाणा उत्तर भारत में स्थित एक स्थलरुद्ध राज्य है। इसका विस्तार २७°३९' उत्तर से ३०°५५' उत्तर तक के अक्षांशों तक, और ७४°२८' पूर्व से ७७°३६' पूर्व तक के देशान्तरों तक है। राज्य की सीमायें उत्तर में पंजाब और हिमाचल प्रदेश, तथा दक्षिण एवं पश्चिम में राजस्थान से जुड़ी हुई हैं। उत्तर प्रदेश राज्य के साथ इसकी पूर्वी सीमा को यमुना नदी परिभाषित करती है। हरियाणा राष्ट्रीय राजधानी क्षेत्र दिल्ली को भी तीन ओर से घेरता है। राज्य का क्षेत्रफल ४४,२१२ वर्ग किलोमीटर है, जो देश के कुल भौगोलिक क्षेत्रफल का १.४ प्रतिशत है, और इस प्रकार क्षेत्रफल के आधार पर यह भारत का बीस वाँ सबसे बड़ा राज्य है। समुद्र तल से हरियाणा की ऊँचाई ७०० से ३६०० फीट (२०० मीटर से १२०० मीटर) तक है। भूतत्व भौगोलिक तौर पर हरियाणा को चार भागों में बांटा जा सकता है: राज्य के उत्तरी हिस्से में स्थित यमुना-घग्गर के मैदान, सुदूर उत्तर में शिवालिक पहाड़ियों की एक पट्टी, दक्षिण-पश्चिम में बांगर क्षेत्र तथा दक्षिणी हिस्से में अरावली पर्वतमालाओं के अंतिमांश, जिनका क्षैतिज विस्तार राजस्थान से दिल्ली तक है। राज्य की मिट्टी आमतौर पर गहरी और उपजाऊ है।…"} {"text": "[CS Wikipedia] Bitva u Atuatuka\n\nBitva u Atuatuca byla jednou z bitev galských válek Julia Caesara, která se odehrála v říjnu roku 54 př. n. l. v údolí řeky Le Geer u Atuatuka, pravděpodobně dnešního města Tongeren. Římská legie a pět kohort pod velením římských legátů Tituria Sabina a Lucia Cotty zde byly kmenem Eburonů pod vedením svých vůdců Ambiorixe a Cativolca lstí poraženi a až na výjimky všichni zabiti. Předehra V roce 54 př. n. l. se Caesarovy římské legie vracely z druhé výpravy z Británie a v severní Galii se rozhodly přezimovat. V tomto roce bylo kvůli suchu málo úrody a tak římské legie byly nuceny zimovat odděleně na území několika galských kmenů, souhrnně nazývanými Belgové. Římský vojevůdce Titus Labienus se utábořil na území Remů, kteří byli spojenci Římanů, přesto musel odolávat Indutiomarovi, vůdci sousedního kmene Treverů, který římský tábor opakovaně napadal a nabádal k revoltě i Eburony. Nově vyčleněné legii a kohortám byly ze severní Itálie od řeky Pád vysláni nový legáti Titurius Sabinus a Lucius Cotta. Tato legie s kohortami se utábořila nedaleko Atuatuca na území Eburonů. I zde byl nedostatek potravin a tento nedostatek byl příčinou prvních konfliktů mezi oběma stranami. Před bitvou Vůdce Eburonů Ambiorix a jeho kmeny napadli a zabili několik římských vojáků, kteří sbírali dřevo v lese okolo tábora. Přeživší vojáci utekli zpět do tábora, následováni Ambiorikem a jeho válečníky. Když se Římané začali bránit, tak se Ambiorix s nimi dohodl na vyjednávání. Jeho vyjednávání bylo lstí, kterou chtěl římské jednotky vylákat z opevněného tábora. Římským vyjednávačům Quintu Juniovi a Gaiovi Arpineiovi namluvil, že počet bojovníků jeho kmene je velmi malý a spíše jedná pod tlakem ostatních kmenů, které byly odhodlány bránit svá území před římskou nadvládou. Tvrdil, že velké kmeny Germánů jsou rozhněvány úspěchy Julia Caesara a porážkou jejich vůdce Ariovista, a že se v brzké době chystají překročit řeku Rýn a zaútočit na římská ležení. Ambiorix římským jednotkám nabízel volný odchod a spojení se s blízkými legiemi Tita Labiena nebo Tullia Cicera, aby mohli lépe odolat hrozící germánské přesile. S těmito zprávami se Quintus Junius a Gaius Arpineius vrátili do římského tábora, kde byla vytvořena vojenská rada za účasti velících vojáků. Sabinus a Cotta zaujali rozdílná stanoviska. Cotta argumentoval tím, že by neměli bez příkazů Caesara tábor opouštět. Poukazoval na to, že v minulosti se ukázalo, že římská opevnění Germánům vždy odolala, že mají dostatek zásob, snadno dosažitelnou pomoc v podobě dalších legií a že by neměli věřit zprávám ani radám nepřátelských Eburonů. Naopak Sabinus se domníval, že Germáni vědí o Caesarově cestě do Itálie a tudíž si určitě dovolí překročit řeku Rýn. Poté se k nim připojí i Eburoni a další kmeny Belgů a zaútočí na jejich ležení. Byl…"} {"instruction": "Print the even numbers in a given array?", "input": "array = [2, 3, 4, 5, 6, 7, 8, 9];", "output": "let array = [2, 3, 4, 5, 6, 7, 8, 9]; for (let i=0; i John 30
      1 Main Street London UK
      "} {"instruction": "Produce a Python program to compute the Fibonacci number for a given integer.", "input": "8", "output": "def getFibonacci(n): \n if n<0: \n print(\"Incorrect input\") \n elif n==1: \n return 0\n elif n==2: \n return 1\n else: \n return getFibonacci(n-1)+getFibonacci(n-2) \n\nnumber = 8\nfibonacci_number = getFibonacci(number)\nprint(fibonacci_number)"} {"text": "[DE Wikipedia] Simon the Sorcerer: Wer will schon Kontakt?\n\nSimon the Sorcerer: Wer will schon Kontakt? ist ein Computerspiel des deutschen Spieleentwicklers Silver Style Entertainment aus dem Jahr 2009. Das Adventure ist der fünfte Teil der Spieleserie Simon the Sorcerer und der zweite Teil nach Simon the Sorcerer: Chaos ist das halbe Leben, der von Silver Style Entertainment entwickelt wurde. Handlung Simon the Sorcerer: Wer will schon Kontakt? spielt wie seine Vorgänger in der Zauberwelt, einer märchenhaften Parallelwelt der Erde. Der Protagonist, Simon der Zauberer, reiste einst durch einen Kleiderschrank in diese Welt und hat sich dort mit seiner Freundin Alix zur Ruhe gesetzt. Im fünften Teil der Reihe wird seine Freundin entführt und Simon muss nicht nur sie, sondern auch die Zauberwelt vor einer Invasion durch Außerirdische retten. Zauberei spielt in diesem Teil eine viel kleinere Rolle als in den Vorgängern. Stattdessen liegt der Schwerpunkt auf Steampunk-Elementen und Science-Fiction-Anspielungen. Kapitel 1 Das Spiel beginnt mit einer Silvesterfeier. Am nächsten Morgen stehen aggressive grünhäutige Gestalten vor der Tür des Zauberladens, in dem Simon zwischen allerhand Pizzaschachteln genächtigt hat. Simon kann den schießwütigen Außerirdischen entkommen. Doch vor den Toren der Stadt lauert eine Armee der Außerirdischen, die, wie es aussieht, die Zauberwelt vernichten wollen. Simon erfährt von der Einbrecherin Goldlöckchen – einer alten Bekannten aus Simon the Sorcerer 2 – dass seine Freundin Alix von den Außerirdischen entführt wurde. Anschließend spricht er mit Doktor Walden und Dänichen, die sich versehentlich im Keller des Rathauses eingesperrt haben. Doktor Walden verrät Simon, dass er ein Fluchtfahrzeug besitzt, mit dem sie den Außerirdischen entkommen können. Simon muss ihn aber zuerst befreien. Auf dem Marktplatz wird er vom Sumpfling angesprochen, einer humanoiden Amphibie, die wie ein Koch gekleidet ist und behauptet, Simons Freund zu sein. Der Sumpfling begleitet den Zauberer von da an. Simon überzeugt die Stadtwache, ihm den Schlüssel fürs Rathaus zu übergeben. Nachdem er Doktor Walden befreit hat, stellt sich heraus, dass dieser alleine mit seiner Sockenpuppe im Keller eingesperrt war und Selbstgespräche führt. Gemeinsam machen sie sich auf den Weg zum Versteck des Fluchtfahrzeugs. Nachdem Simon mit Chili ein Loch in die Stadtmauer geätzt hat, wird er jedoch von Maulwurfs-Agenten überrascht, die ihn mit Laserwaffen bedrohen. Doktor Walden ergreift die Flucht und Simon wird von den Maulwürfen auf eine Pirateninsel entführt. Kapitel 2 Simon wurde von den Maulwürfen in die Kapitänskajüte eines Schiffswracks gesperrt. Seinen berühmten Zauberhut, in den unzählige Gegenstände hinein passen, hat man ihm abgenommen. Er kann als Ersatz eine Kiste benutzen, aber jeweils nur wenige Gegenstände…"} {"instruction": "Why should you use functions in programming?", "input": "", "output": "Using functions in programming helps to break down complex tasks into more manageable pieces, which makes code easier to read and maintain. Functions also allow for the reuse of code, which can help to reduce overall development time and resources. Additionally, functions improve code organization and enable functions to be tested independently, making debugging easier."} {"instruction": "How can you sort a list of dictionaries by values of the dictionary in Python?", "input": "", "output": "def sort_dict_by_values(dict_list): return sorted(dict_list, key=lambda k: k['value'])"} {"instruction": "Write some code in JavaScript to generate an array with 3 positive random integers.", "input": "", "output": "function getRandomIntegers(size) { return [...Array(size)].map( () => Math.floor(Math.random() * Math.floor(20)) ).filter(randomNumber => randomNumber > 0); } getRandomIntegers(3); //Returns an array with 3 random positive integers"} {"text": "[CS Wikipedia] Dráha\n\nDráha je slovo slovanského původu, označující původně (v podobě „dorga“, česky draha) cestu mezi poli, kterou se vyháněl dobytek, tj. průhon. Podle jiného zdroje slovo „draha“ pro označení cest nižší kvality je odvozeno od slovesa „dražání“, které znamenalo mýcení a klučení dřevin. V dnešní době má například tyto významy: pás země upravený k pohybu nebo nesoucí stopy po opakovaném pohybu: jízdní dráha závodní dráha běžecká dráha dostihová dráha plochá dráha kuželkářská dráha cyklistická dráha rychlobruslařská dráha veslařská dráha bobová dráha či sáňkařská dráha vzletová a přistávací dráha pojezdová dráha dráha (drážní doprava) – soustava dopravních zařízení, která vozidlo vedou a na nichž je závislé, například kolejové, trolejové nebo lanové vedení: železniční dráha tramvajová dráha trolejbusová dráha lanová dráha důlní dráha průmyslová dráha horská dráha (lunaparková atrakce) V technicko-právním významu jsou součástí dráhy i její pomocná zařízení, například elektrické měnírny, nástupiště, staniční budovy Od slova dráha jsou odvozeny termíny: nádraží autobusové nádraží železnice jako dopravní systém (např. jet dráhou) železniční společnost (dráha koupila pozemek). České dráhy dráha (strojní zařízení) – část strojního zařízení sloužící pro pojezd pracovní části mechanismu jeřábová dráha pojezdová dráha stroje (např. u výtahu) trajektorie pohybu, křivka nebo souhrn částí prostoru, které bod nebo jev nebo těleso zaujímaly během pohybu ve fyzice, matematice, letectví a kosmonautice, neurologii atd. Střela s plochou dráhou letu dráha komety Oběžná dráha polární dráha geostacionární dráha geosynchronní dráha heliocentrická dráha parkovací dráha prográdní dráha retrográdní dráha sklon dráhy synchronní dráha elementy dráhy excentricita dráhy nervová dráha dráha (fyzika) – ve fyzice se dráha říká též délce trajektorie, tedy vzdálenosti, kterou těleso urazí při svém pohybu. Obvykle se označuje písmenem s. Dráha (časopis) – český časopis o drážní dopravě Přenesené významy životní dráha jako životní osud, kariéra, cesta profesní dráha dráha zločinu v přeneseném významu i jiné pásy nebo plochy Mléčná dráha dráha kovadliny – vrchní pracovní plocha kovadliny Související články trať, trasa, linka, cesta, silnice, kolej, drážka draha Reference Externí odkazy"} {"instruction": "Create a Python class called Rectangle to represent a two-dimensional rectangle with a length and width.", "input": "", "output": "class Rectangle:\n def __init__(self, length, width):\n self.length = length\n self.width = width\n\n def area(self):\n return self.length * self.width"} {"instruction": "Write a Python program to create a line chart displaying numbers from 1 to 15.", "input": "", "output": "import matplotlib.pyplot as plt\n\ndata = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]\n\n# making the line plot\nplt.plot(data, '-o') # '-o' is used to connected the dots\n\n# naming the x axis\nplt.xlabel('x - axis')\n# naming the y axis\nplt.ylabel('y - axis')\n\n# giving a title to my graph\nplt.title('Line chart of numbers from 1 to 15')\n\n# function to show the plot\nplt.show()"} {"instruction": "Construct an HTML table with two columns and 4 rows.", "input": "", "output": "
      First Column Second Column
      Row 1 Row 1
      Row 2 Row 2
      Row 3 Row 3
      Row 4 Row 4
      "} {"instruction": "What is the time complexity of the most_common() function?", "input": "", "output": "The time complexity of the most_common() function is O(n)."} {"instruction": "Create a basic implementation of a linked list using Python.", "input": "", "output": "class Node: \n def __init__(self, data): \n self.data = data \n self.next = None \n \nclass LinkedList: \n def __init__(self): \n self.head = None\n \n def push(self, new_data): \n new_node = Node(new_data) \n new_node.next = self.head \n self.head = new_node \n \n def print_list(self): \n temp = self.head \n while (temp): \n print (temp.data) \n temp = temp.next\n \n # Driver code \nllist = LinkedList() \nllist.push(1) \nllist.push(3) \nllist.push(11) \nllist.push(5) \nllist.push(9) \n \nllist.print_list()"} {"instruction": "What is the difference between shallow copying and deep copying?", "input": "", "output": "Shallow copying is the process of creating a copy of the original object which only contains references to the values contained in the original instance. This means that any shallow copy only contains references to the same objects as the original instance, while any changes made to the copy will be reflected in the original object as well. Deep copying on the other hand, is the process of creating a new instance of the original object with all of its values copied over. This means that any changes made to the copy are not reflected in the original object."} {"instruction": "Generate a Python class that takes a single number as an argument, which indicates an array size, and calculate the median value of the array", "input": "arr_size = 10", "output": "class MedianCalculator:\n def __init__(self, arr_size):\n self.arr_size = arr_size\n self.arr = []\n \n def calculate_median(self):\n if self.arr_size == 0:\n return 0\n elif self.arr_size == 1:\n return self.arr[0]\n else:\n self.arr.sort()\n if self.arr_size % 2 == 0:\n mid1 = self.arr_size // 2 - 1\n mid2 = self.arr_size // 2\n return (self.arr[mid1] + self.arr[mid2]) / 2\n else:\n return self.arr[self.arr_size // 2]"} {"instruction": "What is the correct way to find the length of an array in Java?", "input": "", "output": "The correct way to find the length of an array in Java is to use the length field of the array. For example: int[] arr = new int[10]; int len = arr.length; // len is now 10"} {"text": "[HI Wikipedia] येम्तलान्द लैन\n\nयेम्तलान्द लैन (स्वीडी: Jämtlands län, अंग्रेज़ी: Jämtland) स्वीडन का एक लैन है। 'लैन' स्वीडन का उच्च-स्तरीय प्रशासनिक विभाग होता है, जिसे कभी-कभी 'काउंटी' भी कहते हैं। इन्हें भी देखें स्वीडन की काउंटियाँ सन्दर्भ येम्तलान्द लैन स्वीडन की काउंटियाँ स्वीडन"} {"text": "[DE Wikipedia] Ministerium für Arbeit und sozialen Schutz der Russischen Föderation\n\nDas Ministerium für Arbeit und soziale Sicherheit der Russischen Föderation ist das Sozialministerium Russlands und eines der 16 Ministerien der Russischen Regierung. Aufgaben und Organisation Das Ministerium beschäftigt sich mit Arbeitsmarktpolitik, Altersvorsorge, Demografie und der Erbringung sozialer Dienstleistungen. Der Bereich Gesundheit wurde 2012 ausgegliedert und einem eigenen Ministerium unterstellt. Minister ist Maxim Topilin. Zur Erfüllung seiner Aufgaben unterstehen dem Ministerium folgende Stellen. Föderaler Dienst für Arbeit und Beschäftigung (Rostrud) Pensionskasse der Russischen Föderation Sozialversicherungskasse der Russischen Föderation Weblinks Homepage des russischen Arbeitsministerium Russland Russland Arbeit Gegründet 2012 Wirtschaft (Russland)"} {"instruction": "Use object-oriented programming principles in Python to create a class to represent a User profile.", "input": "", "output": "class UserProfile():\n def __init__(self, name, email, address, phone_number):\n self.name = name\n self.email = email\n self.address = address\n self.phone_number = phone_number\n\n def get_name(self):\n return self.name\n\n def get_email(self):\n return self.email\n\n def get_address(self):\n return self.address\n\n def get_phone_number(self):\n return self.phone_number"} {"instruction": "Create a random matrix using NumPy where the elements have 2 decimal places.", "input": "", "output": "import numpy as np # Create a 2×2 matrix random_matrix = np.random.rand(2,2) # Round to two decimal places np.around(random_matrix, decimals=2)"} {"text": "[DE Wikipedia] Lithocarpus edulis\n\nLithocarpus edulis ist eine Pflanzenart aus der artenreichen Gattung Lithocarpus in der Unterfamilie Quercoideae innerhalb der Familie der Buchengewächse (Fagaceae). Sie ist in Japan heimisch und wird in warm-gemäßigten, frostfreien Gebieten als Zierpflanze verwendet. Beschreibung Lithocarpus edulis ist ein immergrüner Baum, der Wuchshöhen bis 9 Meter erreicht. Die Rinde ist glatt und blaugrau. Die wechselständigen Laubblätter sind lederig und glattrandig. Der Same besitzt eine Länge von etwa 2,5 cm sowie einen Durchmesser von etwa 8 mm und hat die Form einer Eichel. Verbreitung, Standorte bei Kultur in Europa und Nutzung Lithocarpus edulis ist in Japan von Honshū über Kyushu bis Shikoku und auf den Ryūkyū-Inseln heimisch. Lithocarpus edulis ist in Mitteleuropa nicht winterhart; auf den Britischen Inseln kann er in den wärmsten südwestlichen Gebieten im Freien gedeihen. Die Samen sind roh oder gekocht essbar. Taxonomie Die Erstbeschreibung erfolgte 1897 unter dem Namen (Basionym) Pasania edulis durch Makino Tomitarō in Botanical Magazine, Volume 11, S. 34. Die Neukombination zu Lithocarpus edulis wurde 1916 durch Takenoshin Nakai in Index Seminum (TI), S. 8 veröffentlicht. Ein weiteres Synonym für Lithocarpus edulis (Makino) Nakai ist Quercus edulis (Makino) Makino Quellen (Abschnitte Verbreitung und Taxonomie) (Abschnitt Taxonomie) (Abschnitt Nutzung) Weblinks Lithocarpus (Gattung) Edulis Baum Endemische Pflanze Japans"} {"text": "[DE Wikipedia] Willibald Franz Kammel\n\nWillibald Franz Kammel (* 27. Mai 1879 in Steinschönau, Bezirk Tetschen, Böhmen; † 16. April 1953 in Wien) war ein österreichischer Pädagoge und Psychologe. Leben Kammel war ein älterer Bruder von Architekt Leo Kammel. Er Studierte an den Universitäten Wien, Grenoble, Salzburg, Hamburg und Leipzig (Dr. phil. 1903). Danach arbeitete er zuerst als Gymnasiallehrer, dann als Dozent an der Niederösterreichischen Landeslehrerakademie in Wien und gründete 1913 das erste Institut für experimentelle Psychologie und Jugendkunde. 1919 habilitierte er sich für Psychologie und Pädagogik. Kammel war von 1931 bis 1949 außerordentlicher Professor an der Universität Wien, 1938–1945 venia legendi entzogen. Kammel erfand das Ästhesiometer (einen Empfindungs- und Wahrnehmungsmesser) und veröffentlichte zahlreiche wissenschaftliche Werke (Die erste Einzelerinnerung, 1912; Experimentelle Untersuchungen über Ausdruckssymptome der Aufmerksamkeit, 1920; Die Hochschule für Erziehungswissenschaften, 1922 etc.). 1956 wurde der Langenzersdorfer Weg in Wien mit Gemeinderatsbeschluss vom 17. Oktober in Kammelweg umbenannt. Einzelnachweise Pädagoge (20. Jahrhundert) Hochschullehrer (Universität Wien) Österreicher Geboren 1879 Gestorben 1953 Mann"} {"instruction": "Create a Python program to reverse a string in place.", "input": "\"Hello World!\"", "output": "def reverse_string_in_space(s): \n temp_list = list(s) \n start = 0\n end = len(temp_list) - 1\n \n while start < end: \n temp_list[start], temp_list[end] = temp_list[end], temp_list[start] \n start += 1\n end -= 1\n \n s = \"\".join(temp_list) \n \n return s\n \ns = \"Hello World!\"\nprint(reverse_string_in_space(s))"} {"text": "[EN Wikipedia] Emeritus Senior Living\n\nEmeritus Corporation doing business as Emeritus Senior Living was a provider of independent living, assisted living, Alzheimer's care, and skilled nursing for seniors living in Emeritus communities throughout the United States. The company was founded in 1993, and was acquired by Brookdale Senior Living (the largest company in the industry at the time ) in July 2014 after a $23 million punitive damages award against it in a civil lawsuit in 2013. Emeritus specialized in assisted living services for seniors who need help with daily activities such as bathing, dressing, meals and medications management. Most communities also provided expert care for Alzheimer's and memory care residents, and offered respite stays for seniors who need short-term stays. Emeritus had locations in 47 states, with several facilities within each state. Facilities Company revenues were $1.57 billion in 2012. As a result of the merger with Brookdale, Emeritus now manages 1,100 facilities in 46 states. Controversy An episode of Frontline which aired on July 30, 2013, documented the alleged neglect and physical abuses perpetrated on patients by employees of Emeritus. In one civil lawsuit, Joan Boice et al v. Emeritus Corporation, a Sacramento, California jury found Emeritus liable for neglect which apparently resulted in the 2009 death of a patient; the jury assessed the company $23 million in punitive damages. Following the broadcast, Emeritus established a website to dispute the allegations. See also List of companies operating nursing homes References External links Companies based in Seattle Companies established in 1993 Companies listed on the New York Stock Exchange Housing for the elderly in the United States"} {"text": "[EN Wikipedia] 1967–68 Norwegian 1. Divisjon season\n\nThe 1967–68 Norwegian 1. Divisjon season was the 29th season of ice hockey in Norway. Eight teams participated in the league, and Valerenga Ishockey won the championship. First round Final round External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1967 in Norwegian sport 1968 in Norwegian sport"} {"instruction": "Design an algorithm in Python to find the second smallest number in an array.", "input": "[45, 25, 12, 34, 36]", "output": "def second_smallest_num(arr):\n min1 = min(arr)\n arr.remove(min1)\n min2 = min(arr)\n return min2\n\n\narr = [45, 25, 12, 34, 36]\nres = second_smallest_num(arr)\nprint(res)"} {"text": "[DE Wikipedia] Legendre (Mondkrater)\n\nLegendre ist ein Einschlagkrater im Osten der Mondvorderseite, südöstlich des Mare Fecunditatis, westlich des Kraters Humboldt und südöstlich von Petavius. Der etwa oval geformte Krater ist stark erodiert, das Innere weitgehend eben. Der Krater wurde 1935 von der IAU nach dem französischen Mathematiker Adrien-Marie Legendre offiziell benannt. Weblinks Legendre auf The-Moon Wiki Einzelnachweise Einschlagkrater (Mond)"} {"instruction": "Modify the code below to make it a one-liner", "input": "# Initialize a variable sum = 0 # Iterate over numbers from 1 to 10 for i in range(1, 11): # Add number to sum sum = sum + i # Print sum print(sum)", "output": "print(sum([i for i in range(1, 11)]))"} {"text": "[CS Wikipedia] Švýcarská hokejbalová reprezentace\n\nŠvýcarská hokejbalová reprezentace je výběrem nejlepších švýcarských hráčů v hokejbale. Od roku 1996 se účastní mistrovství světa a do roku 2000 mistrovství Evropy. Tým je řízen Švýcarskou hokejbalovou asociací, která je členem ISBHF. Největším úspěchem švýcarského týmu jsou dvě čtvrtá místa z mistrovství světa 1999 a 2001 a jeden bronz z mistrovství Evropy 2000. Účast na mistrovství světa Účast na mistrovství Evropy Externí odkazy Oficiální stránky Švýcarské hokejbalové asociace Hokejbalové reprezentace Hokejbal ve Švýcarsku Hokejbal"} {"instruction": "Create a JSON object with the following data: three fruits of each color {red: [apple, watermelon, strawberry], green apple, kiwi, honeydew], yellow: [banana, lemon, mango]}", "input": "", "output": "{ \"red\": [\"apple\", \"watermelon\", \"strawberry\"], \"green\": [\"apple\", \"kiwi\", \"honeydew\"], \"yellow\": [\"banana\", \"lemon\", \"mango\"] }"} {"text": "[DE Wikipedia] Liste der Wappen im Kreis Pinneberg\n\nDiese Liste zeigt die Wappen des Kreises Pinneberg (Schleswig-Holstein) mit seinen Städten, Gemeinden und Ämtern. Kreiswappen Amtsfreie Städte und Gemeinden Ämter Amt Elmshorn-Land Amt Geest und Marsch Südholstein Amt Hörnerkirchen Amt Pinnau Amt Rantzau Ehemalige Ämter Blasonierungen Literatur Martin Reißmann: Die Wappen der Kreise, Ämter, Städte und Gemeinden in Schleswig-Holstein / bearb. von Martin Reißmann unter Mitw. von Uta Heß. Husum: Husum; Schleswig: Landesarchiv Schleswig-Holstein, 1997 (Veröffentlichungen der Schleswig-Holsteinischen Landesarchivs; 49) Hans Schlothfeldt: Schleswig-Holsteinische Kreis- und Ortswappen Neumünster: Wachholtz, 1964 (Hrsg.: Der Schleswig-Holsteinische Heimatbund e. V.) Klemens Stadler: Deutsche Wappen – Bundesrepublik Deutschland, Band 5 – Die Gemeindewappen der Bundesländer Niedersachsen und Schleswig-Holstein Bremen: Angelsachsen, 1970 Weblinks Landesarchiv Schleswig-Holstein Kommunale Wappenrolle Pinneberg !Wappen Pinneberg Wappen Pinneberg"} {"text": "[EN Wikipedia] 1892 Michigan gubernatorial election\n\nThe 1892 Michigan gubernatorial election was held on November 1, 1892. Republican nominee John T. Rich defeated Democratic candidate Allen B. Morse with 47.21% of the vote. General election Candidates Major party candidates John T. Rich, Republican Allen B. Morse, Democratic Other candidates John W. Ewing, People's John Russell, Prohibition Results References 1892 Michigan Gubernatorial November 1892 events"} {"instruction": "Insert 'value' into the dictionary 'dic' at the key 'key'.", "input": "dic = {'a':1, 'b':2} key = 'c' value = 3", "output": "dic[key] = value"} {"instruction": "Write a code in Python to print all numbers between 2000 and 3200, which are divisible by 7 and multiple of 5.", "input": "", "output": "def divisible_numbers():\n for num in range(2000, 3201):\n if (num % 7 == 0) and (num % 5 == 0):\n print(num, end=\", \")\n\nif __name__ == '__main__':\n divisible_numbers()"} {"instruction": "Write a SQL statement that joins three tables and returns the fields of interest.", "input": "Table 1 (tbl_person): person_name, person_id Table 2 (tbl_course): course_id, course_name Table 3 (tbl_enroll): person_id, course_id Fields of Interest: person_name, course_name", "output": "SELECT tbl_person.person_name, tbl_course.course_name FROM tbl_person INNER JOIN tbl_enroll on tbl_person.person_id = tbl_enroll.person_id INNER JOIN tbl_course on tbl_enroll.course_id = tbl_course.course_id;"} {"instruction": "Generate pseudo-random numbers in Python.", "input": "", "output": "# Generate pseudo-random numbers in Python\n\nimport random\n\n# Generate a pseudo-random number between 0 and 1\nnum = random.random()\nprint(\"Pseudo-random number between 0 and 1: \", num)\n\n# Generate pseudo-random numbers from a discrete set\nnum = random.choice([1, 2, 3, 4, 5])\nprint(\"Pseudo-random number from a discrete set: \", num)"} {"instruction": "Write a Python program to round a number to a given number of decimal places.", "input": "number = 2.68\nround_places = 2", "output": "number_rounded = round(number, round_places)\nprint(number_rounded)\n# Output: 2.68"} {"instruction": "Write a Python program to replace all the vowels in the given string with '_'.", "input": "String: Python is a very interesting language", "output": "def replace_vowels(string):\n vowels = [\"a\", \"e\", \"i\", \"o\", \"u\"]\n res = []\n for letter in string.lower():\n if letter in vowels:\n res.append('_')\n else:\n res.append(letter)\n return ''.join(res)"} {"instruction": "Can you provide a Python program that prints the largest element in the given list?", "input": "[1, 3, 4, 5, 19, 13, 7]", "output": "def get_largest(nums):\n max_num = nums[0]\n for num in nums:\n if num > max_num:\n max_num = num\n return max_num\n\nprint(get_largest([1, 3, 4, 5, 19, 13, 7]))"} {"instruction": "Compose a function to generate a palette of random colors.", "input": "", "output": "import random def generate_palette(n): palette = [] for i in range(n): rgb = [] for j in range(3): rgb.append(random.randint(1, 255)) palette.append(rgb) return palette if __name__ == \"__main__\": n = 10 palette = generate_palette(n) print(palette)"} {"text": "[DE Wikipedia] Schloss Hausen (Neu-Ulm)\n\nDas Schloss Hausen steht in Hausen in Neu-Ulm im bayerischen Regierungsbezirk Schwaben. Baugeschichte Das Schloss ist ein ehemaliger Ulmer Patriziersitz, ein zweigeschossiges Schloss mit Mansarddach. Das ursprüngliche von dem Ulmer Patrizier Roth um 1573 erbaute Schloss Hausen wurde später abgebrochen. Der Bürgermeister der Reichsstadt Ulm C. H. Besserer war der Grundherr und Erbauer des 1768 erstellten heutigen Hauptbaus. Es brannte 1923 aus und wurde 1924 durch Julius Schulte-Frohlinde wieder aufgebaut. Das Gebäude steht unter der Aktennummer D-7-75-135-66 unter Denkmalschutz, ebenso wie der zugehörige Park im englischen Stil aus dem 19. Jahrhundert nördlich und westlich des Schlosses und ein querrechteckiger Pavillon von um 1768 mit Walmdach. Einzelnachweise Weblinks Hausen Baudenkmal in Neu-Ulm Bauwerk in Neu-Ulm Hausen"} {"instruction": "Generate a random alphanumeric string in Python of length 10.", "input": "Not applicable", "output": "import random \n\nalphanumeric_string = ''.join(random.choices(string.ascii_letters + string.digits, k=10))\n\nprint(alphanumeric_string)"} {"instruction": "Write a SQL query to retrieve players with a score equal to or greater than 80.", "input": "CREATE TABLE `players` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(30) NOT NULL, `score` int(11) NOT NULL, PRIMARY KEY(`id`) );", "output": "SELECT * FROM `players` WHERE `score` >= 80;"} {"text": "[CS Wikipedia] Lokomotiva S 699.1\n\nLokomotiva řady S 699.1 (od 1988 řada 260) byla elektrická lokomotiva vyrobená Škodou Plzeň. Jediný kus této řady, S 699.1001, vznikl v roce 1968 modernizací (tovární typ 52Em) prototypové lokomotivy ČS4-001 (z roku 1963, tovární typ 52E) pro použití na Železničním zkušebním okruhu Cerhenice. Lokomotiva byla primárně využívána jako brzdicí vozidlo, ale používala se zde i jako běžné hnací vozidlo. V roce 1988 byla přeznačena na číslo 260.601 a roku 1990 byla zrušena. Reference S 699.1 S 699.1"} {"instruction": "Create a function that takes an array and returns true if it contains all the elements in an another array.", "input": "array1 = [1, 2, 3, 4] array2 = [1, 2, 3]", "output": "def checkArray(array1, array2): for element in array2: if element not in array1: return False return True array1 = [1, 2, 3, 4] array2 = [1, 2, 3] print(checkArray(array1, array2)) # Output # True"} {"instruction": "Write a code to identify the longest palindrome in a given string", "input": "String: kayakracecar", "output": "def get_longest_palindrome(s): longest_palindrome = '' s_length = len(s) for i in range(s_length): for j in range(i, s_length): substring = s[i:j + 1] if len(substring) > len(longest_palindrome) and substring == substring[::-1]: longest_palindrome = substring return longest_palindrome # Verify it works print(get_longest_palindrome('kayakracecar'))"} {"instruction": "Create a regex expression that captures a valid URL.", "input": "", "output": "^(https?:\\/\\/)([\\da-zA-Z\\.-]+)\\.([a-zA-Z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$"} {"text": "[CS Wikipedia] Taťána Polnovová\n\nTaťána Polnovová (), rozená Zajkovová (), (* 20. dubna 1979, Krasnodar) je ruská atletka, která získala bronzovou medaili na mistrovství Evropy 2006 v Göteborgu ve skoku o tyči. V roce 2003 vybojovala na světové letní univerziádě v jihokorejském Tegu zlatou medaili. V letech 1998–2002 reprezentovala Turecko pod jménem Tuna Köstemová. Její osobní rekordy pochází z roku 2004. 28. února v Liévinu zdolala 471 cm. Pod širým nebem je jejím maximem 478 cm, tuto výšku skočila v Monaku 19. září v rámci světového atletického finále. Úspěchy Externí odkazy Profil a kompletní výsledky (od roku 2004) na rusathletics.com Narození v roce 1979 Ruští tyčkaři Žijící lidé Ženy"} {"instruction": "Reverse an input string.", "input": "", "output": "def reverse_string(s): return s[::-1]"} {"instruction": "Add a comment to explain the purpose of the following code.", "input": "for i in range(100): print(i)", "output": "# Prints all numbers from 0 to 99 for i in range(100): print(i)"} {"text": "[EN Wikipedia] LANSA (Colombia)\n\nLansa (acronym for Limitada Nacional de Servicio Aéreo y luego de Líneas Aéreas Nacionales) was an airline company based in Barranquilla , Colombia. History The Beginning After 1945 the company, Avianca had a complete monopoly over the airline industry. A couple of mechanics and pilots decided to form their own company on May 7, 1945 in the city of Barranquila. Captain Ernesto Recaman Saravia was the first company leader of Lansa. His first actions of being the company leader were the purchase of four Canadian-made Avro Anson 625A aircraft. Each Avro had a capacity of a maximum of eight passengers. Lansa built their first airfield, only 2 kilometers away from Paseo Colón. The airfield was named \"Las Nieves\" which translates to \"the snows\". It was equipped with a 1400 meter long track next to a wooden shed that served as an air terminal. The first planes were delivered to \"Las Nieves\" on September 3, 1945. Outcome Lansa as a result of its success from its Atlantic coast routes and in Medellin and Bogota, the company then acquired four Douglas DC-3 aircraft after having a successful year in 1946. In that same year, Lansa became a publicly traded company and changing its name to Línea Aéreas Nacionales S.A. After having been 2 years in the airline industry, Lansa accumulated 18 DC-3 aircraft. Its services were extended to the Caribbean Region, Neiva, Garzón, Popayán and Ipiales in the south of the country of Colombia. In 1948 there were negotiations of acquiring three Martin 202 aircraft, which had a maximum capacity of up to 40 passengers. However those negotiations were never finalized and the deal was off. Internationalization Lansa's first international flight was on February 8, 1947 from Barranquilla to Maracaibo. In order to expand its international operations, Lansa decided to request routes from Cartagena and Barranquilla to Havana and Miami, with the aim of competing directly with Avianca. This was the first major move by Lansa to compete internationally with Avianca. Also that year in 1947, two DC-4s were bought from the Argentine Merchant Air Fleet. Under the direction of Humberto Zimmermann, former Avianca worker, Lansa airmail services were inaugurated on June 22, 1950, then that the National Government awarded him a contract for the transport of mail and parcels. Decline The gradual decline of the company after having such great success in its early days was due to several fatal accidents that happened in 1951, the accidents seriously damaged the companies reputation and financial losses. At that point many stockholders came with the choice that to be smart with their money, they would sell their stake to Avianca. Lansa having now majority of its stock being owned by Avianca. lost its fight against Avianca making the entirety of the…"} {"instruction": "Write a Python program to flatten a list of lists into a single list.", "input": "List of lists: [[1,2], [3], [4,5,6]]", "output": "import itertools\n\n# flatten a list of lists\nlist_of_lists = [[1,2], [3], [4,5,6]]\nflattened_list = list(itertools.chain.from_iterable(list_of_lists))\n\n# print the flattened list\nprint(flattened_list) # Output: [1, 2, 3, 4, 5, 6]"} {"instruction": "Write a Java program to print out a triangle of stars.", "input": "3", "output": "* ** ***"} {"instruction": "Write a function that checks if a give number is even or odd.", "input": "", "output": "def is_even(n): if n%2 == 0: return True else: return False"} {"text": "[HI Wikipedia] पोप\n\nपादरी वर्ग को पोप कहा जाता है रोमन कैथोलिक चर्च के सर्वोच्च धर्म गुरु, रोम के बिशप एवं वैटिकन के राज्याध्यक्ष को पोप कहते हैं। 'पोप' का शाब्दिक अर्थ 'पिता' होता है। यह लैटिन के \"पापा\" (papa) से व्युत्पन्न हा है जो स्वयं ग्रीक के पापास् (πάπας, pápas) से व्युत्पन्न है। इस समय pope frncis naye इस पद पर आसीन हैं। रोमन काथलिक चर्च के परमाधिकारी को संत पापा (पिता) 'होली फादर' अथवा पोप कहते हैं। ईसा से अपने महाशिरूय संत पीटर को अपने चर्च का आधार तथा प्रधान 'चरवाहा' नियुक्त किया था और उनको यह भी सुस्पष्ट आश्वासन दिया था कि उनपर आधारित चर्च शताब्दियों तक बना रहेगा। अत: ईसा के विधान से संत पीटर का देहांत रोम में हुआ था, इसलिये प्रारंभ ही से संत पीटर के उत्तराधिकारी होने के कारण रोम के बिशप समूचे चर्च के अध्यक्ष तथा पृथ्वी पर ईसा के प्रतिनिधि माने गए थे। इतिहास इसका साक्षी है कि रोम के बिशप के अतिरिक्त किसी ने कभी संत पीटर का उत्तराधिकारी होने का दावा नहीं किया। किंतु प्राच्य चर्च के अलग होते जाने से तथा प्रोटेस्टैंट धर्म के उद्भव से पोप के अधिकारी के विषय में शताब्दियों तक वाद विवाद होता रहा, अंततोगत्वा वैटिकन की प्रथम अधिकार रखते हैं। वे ईसा की शिक्षा के सर्वोच्च व्याख्याता हैं और चर्च के परमाधिकारी की हैसियत से धर्मशिक्षा की व्याख्या करते समय भ्रमातीत अर्थात्‌ अचूक हैं। पोप वैटिकन राज्य के अध्यक्ष हैं तथा उनके देहांत पर कार्डिनल उनके उत्तराधिकारी को चुनते हैं इन्हें भी देखें पोप जॉन पॉल जोज़फ़ रैत्सिंगर पोप"} {"text": "[DE Wikipedia] Gregory Luo Wenzao\n\nGregory Luo Wenzao OP (; * um 1610 in Fu’an, Fujian, Kaiserreich China; † 27. Februar 1691 in Nanjing, Jiangsu, Kaiserreich China) war der erste römisch-katholische Bischof chinesischer Herkunft und Mitglied des Ordens der Dominikaner. Lou wurde am 24. Dezember 1633 getauft. 1650 trat er in den Dominikanerorden ein. Aufgrund seines Studiums an der Päpstliche und Königliche Universität des heiligen Thomas von Aquin in Manila sprach er Latein und Spanisch. Am 4. Juni 1654 weihte Miguel de Poblet Casasola, Erzbischof von Manila, ihn zum Priester. Nachdem 1665 die Qing-Dynastie das Christentum ächtete und die ausländischen Missionare verbrannte, war Lou der einzige römisch-katholische Missionar in China. 1669 schrieben in China tätige Missionare unter der Leitung von Bischof François Pallu einen Brief an den Papst mit dem Vorschlag, einen einheimischen Klerus und Episkopat in China zu begründen und schlugen Luo Wenzaos als Kandidat für das Bischofsamt vor. Dieser Vorschlag wurde von Portugal blockiert, das die Mission in China als seine Aufgabe verstand. Am 3. Januar 1674 ernannte Papst Clemens X. Luo Wenzao zum Apostolischen Vikar von Nanking und Titularbischof von Basilinopolis. Die Ernennung kam drei Jahre später in China an. Luo Wenzao lehnte die Ernennung ab um Konflikte mit den Portugiesen zu vermeiden. 1679 erhielt er vom Vatikan den Befehl die Ernennung anzunehmen und für die Weihe nach Manila zu reisen. In Manila wurde die Weihe von Pater Charles Garderang, dem Provinzial der dominikanischen Provinz Manila, zu der China gehörte, blockiert, weil er befürchtete, dass ein chinesischer Bischof die strikte Haltung des Dominikanerordens gegen die Praxis der Ahnenverehrung untergraben würde. Am 8. April 1685 weihte der italienische Franziskaner Bernardino della Chiesa OFMRef, Apostolischer Vikar von Fo-Kien, ihn in Guangzhou zum Bischof. Bei der Weihe assistierten der Jesuitenpater François Xavier Filipucci und der Franziskanerpater Antonio Caballero. 1688 weihte er drei chinesische Priester, Wan Qiyuan, Wu Yushan und Liu Yunde. Im selben Jahr erhielt er vom Heiligen Stuhl die Erlaubnis sich einen Koadjutor zu wählen. Sein Wahl fiel auf den Franziskaner Giovanni Francesco Nicolai. Die Portugiesen waren mit dessen Ernennung nicht einverstanden und er erhielt keine Bischofsweihe. Am 10. April 1690 wurde er mit er Erhebung des Apostolischen Vikariats zum Erzbistum Nanking zu dessen erstem Erzbischof ernannt. Einzelnachweise Weblinks Römisch-katholischer Bischof (17. Jahrhundert) Apostolischer Vikar Titularbischof Chinese Geboren im 17. Jahrhundert Gestorben 1691 Mann Dominikanerbruder"} {"instruction": "Create a Python function to calculate the sum of two numbers given as inputs.", "input": "5, 6", "output": "def calculateSum(a, b):\n return a + b\n\nsum = calculateSum(5, 6)\nprint(sum)"} {"instruction": "Find the second largest number in the following array of integers.", "input": "[1, 6, 4, 8, 7]", "output": "7"} {"instruction": "Explain the principle of dynamic programming.", "input": "", "output": "Dynamic programming is a technique for solving complex problems by breaking them down into smaller subproblems. The subproblems are solved and stored in a table, which is reused to solve future subproblems. This technique allows for efficient solutions regardless of the complexity of the problem, as it exploits the overlapping subproblems property to reduce time complexity."} {"text": "[EN Wikipedia] Tahekeroa River\n\nThe Tahekeroa River is a river of the Auckland Region of New Zealand's North Island. It flows generally southwest to reach the Makarau River eight kilometres north of Kaukapakapa. See also List of rivers of New Zealand References Rivers of the Auckland Region Manukau Harbour catchment"} {"instruction": "Implement a solution in Python using loops, to determine the maximum number of consecutive 1's in a binary number.", "input": "1011101101", "output": "def max_consecutive_ones(n):\n max_ones = 0\n count = 0\n while n > 0:\n if n %2 == 1:\n count+=1\n max_ones = max(max_ones, count)\n else:\n count = 0\n n>>=1\n return max_ones"} {"instruction": "Create a program that reads two numbers and prints out their greatest common divisor.", "input": "", "output": "def gcd(a, b): if a == 0: return b return gcd(b % a, a)"} {"instruction": "Write a method that produces a random password with the specified number of characters.", "input": "", "output": "import string import random def generate_password(characters): password = '' for _ in range(characters): password += random.choice(string.ascii_letters + string.digits) return password"} {"text": "[EN Wikipedia] Marinobacter nitratireducens\n\nMarinobacter nitratireducens is a Gram-negative, halophilic rod-shaped and motile bacterium from the genus of Marinobacter which has been isolated from coastal sea water from Visakhapatnam in India. References Alteromonadales Bacteria described in 2015 Halophiles"} {"text": "[DE Wikipedia] Land- und Forstwirtschaftsminister (Finnland)\n\nDer Land- und Forstwirtschaftsminister Finnlands (finnisch: Suomen maa- ja metsätalousministeri, schwedisch: jord- och skogsbruksminister) ist ein Teil der finnischen Regierung. Liste der Minister Folgend eine Liste der Land- und Forstwirtschaftsminister der Republik Finnland: Anmerkung: Bis 1971 hieß das Ministerium lediglich \"Landwirtschaftsministerium\". Siehe auch Liste der Ministerpräsidenten Finnlands Liste der Innenminister Finnlands Liste der Umweltminister Finnlands Liste der Verteidigungsminister Finnlands Finnland !"} {"text": "[DE Wikipedia] Mauzenstein\n\nDer Mauzenstein ist ein als Naturdenkmal ausgewiesener Buntsandsteinfelsen auf der Grenze zwischen den baden-württembergischen Städten Gaggenau (Landkreis Rastatt) und Bad Herrenalb (Landkreis Calw) im Nordschwarzwald. Er liegt, unweit des Bernsteins, auf am Mauzenberg südlich der Einsattlung zum nördlich gelegenen Tannschachberg. Stratigraphisch gehört er zum oberen Geröllhorizont (smc 2) des Mittleren Buntsandsteins. An den Seiten ist die Schichtungsstruktur des Sedimentgesteins erkennbar. Der Historische Grenzweg Michelbach–Moosbronn–Bernbach, der der ehemaligen Grenze zwischen den Ländern Baden und Württemberg folgt, passiert den Mauzenstein. Der markante Felsblock diente als Grenzstein und weist kreuzförmige Grenzmarkierungen auf. Ein Schild informiert über Spekulationen, der Fels habe in der Frühzeit dem Astralkult (Verehrung der Gestirne) gedient, womit auf herauserodierte kreisförmige Strukturen in der Felsoberfläche angespielt wird, die verschiedene Heimatkundler für menschengemacht hielten. Der badische Landesgeologe Walter Hasemann beschrieb diese jedoch, ähnlich wie die Kugelphänomene am nahen Bernsteinfelsen, als große Kugeln innerhalb eines im Hauptbuntsandstein verbreiteten Kugelhorizontes und damit als natürliche Konkretionen. Einzelnachweise Weblinks Geographie (Gaggenau) Geographie (Bad Herrenalb) Naturdenkmal im Landkreis Calw Naturdenkmal im Landkreis Rastatt Geotop im Landkreis Calw Felsen im Schwarzwald Geotop im Landkreis Rastatt Schutzgebiet im Schwarzwald"} {"instruction": "Create a Python class that provides an interface for a Stack data structure.", "input": "Not applicable", "output": "class Stack:\n def __init__(self):\n self.stack = []\n\n def push(self, item):\n self.stack.append(item)\n\n def pop(self):\n if self.stack:\n return self.stack.pop()\n else: \n return None\n\n def is_empty(self):\n return len(self.stack) == 0"} {"instruction": "Rewrite the following code snippet to use the arcpy module.", "input": "import os file_paths = [os.path.join('data', f) for f in os.listdir('data') if f.endswith('.tif')]", "output": "import os import arcpy file_paths = [os.path.join('data', f) for f in arcpy.ListRasters('*.tif')]"} {"instruction": "Create a python program that given an input string and an array of strings, returns true if an anagram of the input string exists within the array.", "input": "input_string=\"listen\"\nstrings=[\"enlist\",\"google\",\"inlets\",\"banana\"]", "output": "def anagram_in_list(input_string, strings):\n result = False\n\n for string in strings:\n if is_anagram(input_string, string):\n result = True\n break\n \n return result\n\n\ninput_string=\"listen\"\nstrings=[\"enlist\",\"google\",\"inlets\",\"banana\"]\n\nprint(anagram_in_list(input_string, strings))"} {"text": "[HI Wikipedia] बेगम हज़रत महल\n\nबेगम हज़रत महल (नस्तालीक़: , 1820 - 7 अप्रैल 1879), जो अवध (अउध) की बेगम के नाम से भी प्रसिद्ध थीं, अवध के नवाब वाजिद अली शाह की दूसरी पत्नी थीं। अंग्रेज़ों द्वारा कलकत्ते में अपने शौहर के निर्वासन के बाद उन्होंने लखनऊ पर क़ब्ज़ा कर लिया और अपनी अवध रियासत की हुकूमत को बरक़रार रखा। अंग्रेज़ों के क़ब्ज़े से अपनी रियासत बचाने के लिए उन्होंने अपने बेटे नवाबज़ादे बिरजिस क़द्र को अवध के वली (शासक) नियुक्त करने की कोशिश की थी; मगर उनका शासन जल्द ही ख़त्म होने की वजह से उनकी यह कोशिश असफल रह गई। उन्होंने 1857 के भारतीय विद्रोह के दौरान ब्रिटिश ईस्ट इंडिया कंपनी के ख़िलाफ़ विद्रोह किया। अंततः उन्होंने नेपाल में शरण मिली जहाँ उनकी मृत्यु 1879 में हुई थी। जीवनी बेगम हज़रत महल का नाम मुहम्मदी ख़ानुम था, और उनका जन्म फ़ैज़ाबाद, अवध में हुआ था। वह पेशे से एक तवायफ़ थी और अपने माता-पिता द्वारा बेचे जाने के बाद ख़्वासीन के रूप में शाही हरम में ले लिया गया था। तब उन्हें शाही आधिकारियों के पास बेचा गया था, और बाद में वे 'परी' के तौर पर पदोन्नत हुईं, और उन्हें 'महक परी' के नाम से जाना जाता था। अवध के नवाब की शाही रखैल के तौर पर स्वीकार की जाने पर उन्हें \"बेगम\" का ख़िताब हासिल हुआ, और उनके बेटे बिरजिस क़द्र के जन्म के बाद उन्हें 'हज़रत महल' का ख़िताब दिया गया था। वे आख़िरी ताजदर-ए-अवध, वाजिद अली शाह की छोटी पत्नी थीं। 1856 में अंग्रेज़ों ने अवध पर क़ब्ज़ा कर लिया था और वाजिद अली शाह को कलकत्ते में निर्वासित कर दिया गया था। कलकत्ते में उनके पति निर्वासित होने के बाद, बेगम हज़रत महल ने अवध रियासत के राजकीय मामलों को संभाला। 1857 की भारतीय क्रांति आज़ादी के पहले युद्ध के दौरान, 1857 से 1858 तक, राजा जयलाल सिंह की अगुवाई में बेगम हज़रत महल के हामियों ने ब्रिटिश ईस्ट इंडिया कंपनी के ख़िलाफ़ बग़ावत की; बाद में, उन्होंने लखनऊ पर फिर से क़ब्ज़ा कर लिया और उन्होंने अपने बेटे बिरजिस क़द्र को अवध के वली (शासक) घोषित कर दिया। बेगम हज़रत महल की प्रमुख शिकायतों में से एक यह थी कि ईस्ट इंडिया कंपनी ने सड़कें बनाने के लिए मंदिरों और मस्जिदों को आकस्मिक रूप से ध्वस्त किया था। विद्रोह के अंतिम दिनों में जारी की गई एक घोषणा में, उन्होंने अंग्रेज़ सरकार द्वारा धार्मिक आज़ादी की अनुमति देने के दावे का मज़ाक उड़ाया: जब अंग्रेज़ों के आदेश के तहत सेना ने लखनऊ और ओध के अधिकांश इलाक़े को क़ब्ज़ा कर लिया, तो हज़रत महल को पीछे हटने के लिए मजबूर होना पड़ा। हज़रत महल नाना साहेब के साथ मिलकर काम करते थे, लेकिन बाद में शाहजहांपुर पर हमले के बाद, वह फ़ैज़ाबाद के मौलवी से मिले। लखनऊ में 1857 की क्रांति का नेतृत्व बेगम हज़रत महल ने किया था। अपने नाबालिग पुत्र बिरजिस क़द्र को गद्दी पर बिठाकर उन्होंने अंग्रेज़ी सेना का स्वयं मुक़ाबला किया। उनमें संगठन की अभूतपूर्व क्षमता थी और इसी कारण अवध के ज़मींदार, किसान और सैनिक उनके नेतृत्व में आगे बढ़ते रहे। आलमबाग़ की लड़ाई के दौरान अपने जांबाज़ सिपाहियों की उन्होंने भरपूर हौसला आफ़ज़ाई की और हाथी पर सवार होकर अपने सैनिकों के साथ दिन-रात युद्ध करती रहीं। लखनऊ में पराजय के बाद वह अवध के देहातों में चली गईं और वहाँ भी क्रांति की चिंगारी सुलगाई। बेगम हज़रत महल और…"} {"instruction": "Write a Python class to implement a linked list.", "input": "", "output": "class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def push(self, data): node = Node(data) node.next = self.head self.head = node def pop(self): data = self.head.data self.head = self.head.next return data"} {"instruction": "Write a function that takes an array of integers and returns an array of the same length with each element multiplied by 2.", "input": "[1, 2, 3]", "output": "def multiplyByTwo(arr): multipliedArr = [] for i in arr: multipliedArr.append(i*2) return multipliedArr"} {"text": "[EN Wikipedia] Arthur Schopenhauer\n\nArthur Schopenhauer ( , ; 22 February 1788 – 21 September 1860) was a German philosopher. He is best known for his 1818 work The World as Will and Representation (expanded in 1844), which characterizes the phenomenal world as the manifestation of a blind and irrational noumenal will. Building on the transcendental idealism of Immanuel Kant (1724–1804), Schopenhauer developed an atheistic metaphysical and ethical system that rejected the contemporaneous ideas of German idealism. He was among the first thinkers in Western philosophy to share and affirm significant tenets of Indian philosophy, such as asceticism, denial of the self, and the notion of the world-as-appearance. His work has been described as an exemplary manifestation of philosophical pessimism. Though his work failed to garner substantial attention during his lifetime, Schopenhauer had a posthumous impact across various disciplines, including philosophy, literature, and science. His writing on aesthetics, morality, and psychology have influenced many thinkers and artists. Life Early life Arthur Schopenhauer was born on 22 February 1788, in Danzig (then part of the Polish–Lithuanian Commonwealth; present-day Gdańsk, Poland) on Heiligegeistgasse (present day Św. Ducha 47), the son of Johanna Schopenhauer (née Trosiener; 1766–1838) and Heinrich Floris Schopenhauer (1747–1805), both descendants of wealthy German patrician families. While they came from a Protestant background, neither of them was very religious; both supported the French Revolution, were republicans, cosmopolitans and Anglophiles. When Danzig became part of Prussia in 1793, Heinrich moved to Hamburg—a free city with a republican constitution. His firm continued trading in Danzig where most of their extended families remained. Adele, Arthur's only sibling, was born on 12 July 1797. In 1797, Arthur was sent to Le Havre to live with the family of his father's business associate, Grégoire de Blésimaire. He seemed to enjoy his two-year stay there, learning to speak French and fostering a life-long friendship with Jean Anthime Grégoire de Blésimaire. As early as 1799, Arthur started playing the flute. In 1803, he accompanied his parents on a European tour of Holland, Britain, France, Switzerland, Austria and Prussia. Viewed as primarily a pleasure tour, Heinrich used the opportunity to visit some of his business associates abroad. Heinrich offered Arthur a choice: he could stay at home and start preparations for university, or he could travel with them and continue his merchant education. Arthur chose to travel with them. He deeply regretted his choice later because the merchant training was very tedious. He spent twelve weeks of the tour attending school in Wimbledon, where he was disillusioned by strict and intellectually…"} {"text": "[CS Wikipedia] Slepé pleso\n\nSlepé pleso je zanikající jezero v Mlynické dolině ve Vysokých Tatrách na Slovensku. Zarůstající vodní plocha má rozlohu 0,9651 ha. Je 152 m dlouhé a 101 m široké. Leží v nadmořské výšce 1375 m. Okolí Nachází se ve vzdálenosti 100 m severozápadně od Štrbského plesa přibližně o 30 m výše za úzkým morénovým valem. Kolem plesa je nepříliš široký pás kosodřeviny a zbytky lesa, který byl částečně zničen během vichřice v roce 2004 a nyní pro změnu devastován kůrovcem. Vodní režim Voda v plese je postupně vytlačovaná rašelinou a v celém plese se objevuje jen po větších deštích. Drobné vodní očka se objevují průběžně, přičemž největší z nich se nachází ve východní části plesa a při průměru 10 m má rozlohu 80 m². Z plesa odtéká strouha sulfátové vody, která obvykle mizí dříve než dosáhne Štrbského plesa. Přístup Přístup je možný pěšky od severozápadního konce Štrbského plesa, přičemž neznačená cesta vede kolem celého Slepého plesa. Ve vzdálenosti 55 m od západního břehu prochází červená turistická značka tatranské magistrály od Štrbského plesa do Furkotské doliny. Odkazy Poznámky Literatura Související články Štrbské pleso Externí odkazy Wielka Encyklopedia Tatrzańska (WET), Ślepy Stawek Rašelinná jezera na Slovensku Antropogenní jezera na Slovensku Jezera v Tatrách na Slovensku Jezera ve Vysokých Tatrách Mlynická dolina Jezera v Prešovském kraji Vodstvo v okrese Poprad Povodí Popradu"} {"instruction": "Design a for loop in Python which iterates over two given lists and prints their items in a orderly manner.", "input": "list1 = [1, 2, 3]\nlist2 = [\"Apple\", \"Banana\", \"Cherry\"]", "output": "for item1, item2 in zip(list1, list2):\n print(f\"{item1}: {item2}\")"} {"text": "[EN Wikipedia] Arcesis anax\n\nArcesis anax is a moth of the family Tortricidae. It is found in Vietnam, Thailand and Sumatra. References Moths described in 1983 Olethreutini Moths of Asia"} {"text": "[HI Wikipedia] शुग़नी भाषा\n\nशुग़नी भाषा एक पामीरी भाषा-परिवार की बोली है जो मध्य एशिया में ताजिकिस्तान के कूहिस्तोनी-बदख़्शान स्वशासित प्रान्त और अफ़ग़ानिस्तान के बदख़्शान प्रान्त में बोली जाती है। उपभाषाएँ रुशानी भाषा, जो अधिकतर ताजिकिस्तान में बोली जाती है, शुग़नी की ही एक उपभाषा है। बरतानगी, ख़ुलफ़ी और रोशोरवी भी अक्सर शुग़नी की उपभाषाएँ कहलाती हैं लेकिन वास्तव में बरतानगी और ख़ुलफ़ी इस से बहुत अलग भाषाएँ हैं। शब्द तुलना शुग़नी और सरिकोली भाषा दोनों अन्य पूर्वी ईरानी भाषाओं से मिलती-जुलती हैं, लेकिन दोनों में कुछ ऐसे शब्द भी हैं जो वाख़ी, पश्तो और अवस्ताई जैसी पूर्वी ईरानी भाषाओं में नहीं मिलते। उपरलिखित में - १. 'ख़' के उच्चारण पर ध्यान दें - यह 'ख' से भिन्न है और 'ख़रीद' व 'ख़र्चा' जैसे शब्दों में मिलता है २. 'झ़' के उच्चारण पर ध्यान दें - यह 'झ' और 'ज़' दोनों से भिन्न है और 'टेलिविझ़न' जैसे शब्दों में मिलता है ३. 'ग़' के उच्चारण पर ध्यान दें - यह 'ग' से भिन्न है और 'ग़रीब' व 'ग़ायब' जैसे शब्दों में मिलता है ४. 'क़' के उच्चारण पर ध्यान दें - यह 'क' से ज़रा भिन्न है और 'क़ीमत' जैसे शब्दों में मिलता है ५. जो ध्वनि बिंदु-वाले 'द़' से ऊपर दर्शाई गई है वह हिन्दी व फ़ारसी में नहीं मिलती - यह 'ध' व 'ज़' का मिश्रण है यह भी ध्यान दें कि ईरानी भाषाएँ और हिन्दी व संस्कृत जैसी हिन्द-आर्य भाषाएँ सभी हिन्द-ईरानी भाषा-परिवार की सम्बन्धी भाषाएँ हैं, इसलिए इनमें आपस में बहुत से मिलते-जुलते सजातीय शब्द होते हैं इन्हें भी देखें पामीरी भाषाएँ सन्दर्भ पामीरी भाषाएँ पूर्वी ईरानी भाषाएँ ईरानी भाषाएँ मध्य एशिया की भाषाएँ हिन्द-ईरानी भाषाएँ बदख़्शान प्रान्त कूहिस्तोनी-बदख़्शान स्वशासित प्रान्त"} {"instruction": "Write a code to find the first 4 terms of the Fibonacci sequence in Java.", "input": "", "output": "public class Fibonacci { public static int[] getFibonacciNumbers(int numTerms) { int[] sequence = new int[numTerms]; int firstTerm = 0, secondTerm = 1; sequence[0] = firstTerm; sequence[1] = secondTerm; for (int i = 2; i < numTerms; i++) { sequence[i] = firstTerm + secondTerm; int temp = secondTerm; secondTerm = firstTerm + secondTerm; firstTerm = temp; } return sequence; } public static void main(String[] args) { int numTerms = 4; int[] sequence = getFibonacciNumbers(numTerms); System.out.println(\"The first \" + numTerms + \" Fibonacci Numbers are:\"); for (int i = 0; i < numTerms; i++) { System.out.println(sequence[i]); } } }"} {"text": "[DE Wikipedia] Albrecht I. Rindsmaul\n\nAlbrecht I. Rindsmaul, auch Albrecht Rindsmaul von Grünsberg (Vorname auch: Albert; * vor 1175; † nach 1234), war ein Ministeriale und Truchsess im Dienst einiger Könige und Kaiser im Heiligen Römischen Reich. Leben Albrecht entstammte der altadeligen Familie Rindsmaul. Seine Mutter hieß mit Vornamen wahrscheinlich Friderunda. Urkunden deuten auf eine vergleichsweise hohe, wenn auch nicht herausragende Stellung Albrecht Rindsmauls hin. Am 1. März 1191 ist Albrecht Rindsmaul als eine von 14 Personen (drei Geistliche, drei Laienfürsten, drei Grafen und fünf Ministeriale) beurkundet, die den feierlichen Abschluss der Bündnisverhandlungen König Heinrichs VI. mit der Stadt Pisa (im Feldzug gegen das Königreich Sizilien) öffentlich für ihn beschworen hatten. Am Ostermontag 1191 wohnte er der feierlichen Kaiserkrönung Heinrichs VI. durch Papst Coelestin III. bei. Durch diese Erfahrung, er kannte nun Italien, stieg Rindsmauls Wert für die Krone. Wahrscheinlich ist Albrecht Rindsmaul mit „Bos Teutonicus“ gemeint, der als derjenige bezeugt ist, dem König Philipp von Schwaben die „Friedenswahrung im Pistojesischen“ übertrug. Im August 1197 unterzeichnete Rindsmaul ein Diplom, mit dem Kaiser Heinrich VI. Heinrich von Kalden auszeichnete. Weil Heinrich VI. im September verstarb, ist anzunehmen, dass Rindsmaul an dessen Sterbebett anwesend war. Zum 5. Juli 1200 begleitete Rindsmaul König Philipp nach Würzburg. Im Jahr 1209 reiste er mit Otto IV. nach Rom, auch um an dessen zu dessen Kaiserkrönung am 4. Oktober anwesend zu sein. Es erfolgten viele Enttäuschungen Ottos VI., auch Papst Innozenz III. warf ihm Wortbruch vor. Auf einem Fürstentag in Nürnberg, worum Rindsmaul viele Besitztümer hatte, wurde entschieden, dass Kaiser Ottos Gegner Friedrich II. neuer König werden sollte. Im Sommer 1212 kam dieser deswegen von Sizilien ins Heilige Römische Reich. Weihnachten 1215 begleitete er diesen nach Eger, im Januar 1216 nach Hagenau im Elsass, Anfang 1217 nach Regensburg und Ende 1319 nach Nürnberg. Nachdem Friedrichs Sohn Heinrich VII. im April 1220 zum König gekrönt worden war, begab sich Friedrich II. nach Rom um sich zum Kaiser krönen zu lassen. Rindsmaul blieb in den Diensten bzw. zumindest in der Umgebung des jungen Königs Heinrich und ist 1223 und 1226 in Eger bzw. in Heilsbronn beurkundet. Ob Rindsmaul als Ministeriale am letztlich durch Verhandlungen entschiedenen Kreuzzug Friedrichs II. teilgenommen hat, ist nicht überliefert, aber denkbar. Ein Jahr später im Sommer 1230 war Rindsmaul bei Friedrich II., als dessen Bann aufgehoben wurde und auch als Friedrich II. den Papst Gregor IX. daraufhin besuchte. Im April 1230 bezeugte Rindsmaul derweil ein in Foggia (Apulien) ausgestelltes Privileg für das Kloster Tegernsee und eine Urkunde an Benediktbeuern. Im…"} {"text": "[CS Wikipedia] Leo TV\n\nLeo TV je česká placená soukromá erotická televizní stanice. Program Stanice uvádí, že její záměr je vysílat převážně live show, plánuje však také erotické reality show a podobně zaměřené pořady. Stanice též nabízí lidem podílet se na tvorbě pořadů. V roce 2009 udělila Rada pro rozhlasové a televizní vysílání televizní stanici pokutu 50 tisíc Kč z důvodu odvysílání pořadu, který „mohl vážně narušit fyzický, psychický nebo mravní vývoj dětí a mladistvých tím, že obsahoval pornografii“. V minulosti měla též stanice problémy s neoznačováním pořadů nevhodných pro mladistvé pomocí „hvězdičky“. Odkazy Reference Externí odkazy Oficiální stránky (obsahují pornografický materiál) Aleš Harazim: Velký boom českých pornokanálů! Leo TV je tu! prepni.centrum.cz, 4.7.2008 ČTK: Erotická Leo TV dostala pokutu za pornografii tyden.cz , 22.01.2009 Erotika České televizní stanice Leo TV"} {"instruction": "Generate a graphical representation of a function using Python.", "input": "f(x) = 2x + 3", "output": "import matplotlib.pyplot as plt\n\nx = range(-10, 11)\ny = [2 * x_coord + 3 for x_coord in x]\nplt.plot(x, y)\nplt.title('Graph of the function: f(x) = 2x + 3')\nplt.xlabel('x')\nplt.ylabel('2x + 3')\n\nplt.show()"} {"instruction": "Create a Python script that calculates the edit distance between two strings.", "input": "s1 = 'cat'\ns2 = 'cot'", "output": "# function to calculate edit distance\ndef edit_distance(s1, s2):\n if len(s1) == 0:\n return len(s2)\n if len(s2) == 0:\n return len(s1)\n if s1[-1] == s2[-1]:\n cost = 0\n else:\n cost = 1\n\n res = min([edit_distance(s1[:-1], s2)+1,\n edit_distance(s1, s2[:-1])+1,\n edit_distance(s1[:-1], s2[:-1]) + cost])\n return res\n\n# example\ns1 = 'cat'\ns2 = 'cot'\nprint(edit_distance(s1, s2)) # output: 1"} {"instruction": "Write a Python script that reads in a user-defined data set and prints the top-5 highest values contained in the data set.", "input": "[100.0, 74.0, 56.2, 45.5, 27.8, 21.0, 8.2, 4.1]", "output": "data = [100.0, 74.0, 56.2, 45.5, 27.8, 21.0, 8.2, 4.1]\n\ndef get_top_five_values(data):\n sorted_data = sorted(data, reverse=True)\n top_five_values = sorted_data[:5]\n return top_five_values\n\ntop_five_values = get_top_five_values(data)\nprint(top_five_values)"} {"instruction": "Create a Python code to classify a given Iris flower as Iris setosa, Iris versicolor and Iris virginica.", "input": "[5.9, 3.0, 5.1, 1.8]", "output": "def classify_iris(flower):\n if flower[0] < 5 and flower[2] < 4:\n return 'Iris setosa'\n elif flower[2] >= 4.9 and flower[3] <= 1.8:\n return 'Iris virginica'\n else:\n return 'Iris versicolor'"} {"instruction": "Create a C++ algorithm to compute the Fibonacci sequence.", "input": "", "output": "#include int fibonacci(int n) { if (n <= 1) return n; return fibonacci(n - 1) + fibonacci(n - 2); } int main() { int n = 10; std::cout << \"The Fibonacci number at position \" << n << \" is \" << fibonacci(n); return 0; }"} {"instruction": "Write a JavaScript program that logs a message to the console.", "input": "\"Hello!\"", "output": "console.log(\"Hello!\");"} {"text": "[EN Wikipedia] 1942 Egyptian parliamentary election\n\nParliamentary elections were held in Egypt in March 1942. They were boycotted by the opposition, resulting in the ruling Wafd Party winning 240 of the 264 seats. Results References Egypt Parliamentary elections in Egypt Parliamentary Egypt Election and referendum articles with incomplete results"} {"instruction": "Write a Python program to detect if two strings are anagrams or not.", "input": "", "output": "def is_anagram(word1, word2):\n word1 = word1.replace(' ', '').lower()\n word2 = word2.replace(' ', '').lower()\n\n if len(word1) != len(word2):\n return False\n\n count = {}\n for letter in word1:\n if letter in count:\n count[letter] += 1\n else:\n count[letter] = 1\n\n for letter in word2:\n if letter in count:\n count[letter] -= 1\n else:\n count[letter] = 1\n\n for k in count:\n if count[k] != 0:\n return False\n\n return True"} {"text": "[CS Wikipedia] Mechanika tekutin\n\nMechanika tekutin (též mechanika kapalin a plynů) je část mechaniky, která se zabývá mechanickými vlastnostmi tekutin, tj. silami v kapalinách a plynech a pohybem kapalin a plynů (prouděním). Tekutiny (tedy kapaliny a plyny) se na rozdíl od pevných látek vyznačují tekutostí, tedy schopností měnit svůj tvar a přizpůsobovat se tvaru nádoby, v níž se nachází. Schopnost tekutin téci je pro různé látky různá a je závislá na jejich vnitřním tření (viskozitě). Rozdělení Část mechaniky tekutin zabývající se kapalinami se nazývá hydromechanika (hydraulika) a část zabývající se plyny se nazývá aeromechanika (pneumatika). Velké množství zákonitostí mechaniky tekutin je možné aplikovat i v těchto oblastech. K přesnějšímu roztřídění jevů patřících do mechaniky tekutin lze tento obor rozdělit na hydrostatiku, aerostatiku, hydrodynamiku a aerodynamiku. Pomocné pojmy Ideální kapalina – Ideální plyn – Skutečná kapalina (Reálná kapalina) – Skutečný plyn (Reálný plyn) – Tekutost – Vnitřní tření Hydrostatika Hydrostatická tlaková síla – Hydrostatický tlak – Spojené nádoby – Hydrostatický paradoxon – Vztlaková síla – Archimédův zákon – Plování těles – Pascalův zákon Aerostatika Atmosférický tlak – Podtlak – Přetlak – Manometr – Barometr – Aneroid – Barograf – Normální atmosférický tlak Hydrodynamika Proudění – Ustálené proudění – Proudnice – Laminární proudění – Turbulentní proudění – Objemový průtok – Rovnice kontinuity – Tlaková potenciální energie – Bernoulliho rovnice – Hydrodynamický paradox – Navierova–Stokesova rovnice Aerodynamika Odpor prostředí – Odporová síla – Součinitel odporu – Aerodynamický tvar – Aerodynamická vztlaková síla Veličiny Hydrostatická tlaková síla – Hydrostatický tlak – Vztlaková síla – Objemový průtok – Odporová síla – Viskozita Související články Mechanika Externí odkazy Mechanika"} {"instruction": "Write a Python script to traverse a directory and its subdirectories.", "input": "", "output": "\"\"\"\nWrite a Python script to traverse a directory and its subdirectories.\n\"\"\"\n\nimport os\n\ndef list_files(start_path):\n for root, dirs, files in os.walk(start_path):\n for name in files:\n print(os.path.join(root, name))\n\nif __name__ == '__main__':\n start_path = '.'\n list_files(start_path)"} {"instruction": "Develop an algorithm to check if a string S is a palindrome in Python.", "input": "String S = \"racecar\"", "output": "def is_palindrome(s):\n # Convert strings to lowercase\n s = s.lower()\n \n # Iterate through middle of string with indices \n for i in range(len(s) // 2):\n if s[i] != s[len(s) - i - 1]:\n return False\n return True"} {"instruction": "Use the MySQL CREATE command to create a table of employees containing an employee ID, name, email address and phone number.", "input": "", "output": "CREATE TABLE employees ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, phone VARCHAR(20) NOT NULL, PRIMARY KEY (id) );"} {"text": "[CS Wikipedia] Vůz WRmee814 ČD\n\n{{DISPLAYTITLE:Vůz WRmee814 ČD}} Vozy WRmee814, číslované v intervalu 61 54 88-81, v 90. letech označené WRRm, jsou jídelní vozy z vozového parku Českých drah. Všechny tři vozy (016–018) vznikly v roce 1994 modernizací původních vozů WRRm v ŽOS České Velenice. Další modernizace vozů proběhla v letech 2011–2012 v ŽOS Vrútky. Vznik řady Na začátku 90. let začaly Československé státní dráhy s modernizací všech většiny jídelních vozů WRRm pro vlaky EuroCity. Nejdříve byl u 15 vozů renovován interiér a zvýšena nejvyšší povolená rychlost ze 140 km/h na 160 km/h. Tyto vozy byly později přeznačeny na WRm813 s čísly 001–015. Poté byla u čtyř vozů upravena nápravová převodovka, díky čemu se jim rychlost zvýšila na 160 km/h. Vozy byly později přeznačeny na WRm812 a byla jim přidělena pořadová čísla 019–022. Tyto vozy nebyly vybaveny klimatizací, a proto pro provoz na vlacích EuroCity potřebovaly výjimku. Proto byly v roce 1994 rekonstruovány zbylé tři vozy WRRm u Českých drah, které dostaly pořadová čísla 016–018. Zároveň tedy byla vyplněna vzniklá mezera v číslování mezi vozy WRm813 a WRm812. Výsledek modernizace je podobný s vozy WRm813, ale do vozů WRmee814 byl ještě dosazen centrální zdroj energie a klimatizace. První vůz byl dokončen 1. července 1994, a stal se vůbec první klimatizovaným vozem u Českých drah. Technický popis Jsou to jídelní vozy se skříní typu UIC-Z o délce 26 400 mm. Nejvyšší povolená rychlost těchto vozů po první modernizaci byla 160 km/h. Od roku 2010 byla jejich nejvyšší rychlost až do odvolání snížena na 140 km/h. Po druhé modernizaci byla opět zvýšena na 160 km/h. Vozy mají podvozky Görlitz Vk. Vozy byly původně vybaveny špalíkovými brzdami, při druhé modernizaci byly brzdy vyměněny za kotoučové. Po první modernizaci vozům zůstaly původní zalamovací nástupní dveře. Při druhé modernizaci byly nástupní dveře vyměněny za předsuvné, ovládané pomocí tlačítek. Vozy vždy měly, podobně jako většina jiných jídelních vozů, jen jeden pár nástupních dveří. Okna těchto vozů jsou z části celá, neotevíratelná, a z části výklopná v horní pětině. Vůz je rozdělen na jídelní a kuchyňskou část. V jídelní části se nachází 30 míst k sezení v příčném uspořádání 2 + 1. Vůz má i klubový oddíl s osmi místy k sezení. Při druhé modernizaci byl do vozů dosazen elektronický informační systém a zásuvky 230 V. Do vozů byl při první modernizaci dosazen centrální zdroj energie, díky kterému je možné v kuchyni používat elektrické spotřebiče namísto původních plynových. Provozní osvětlení těchto vozů je realizováno pomocí zářivek, nouzové a vedlejší pomocí žárovek. Klimatizaci vyrobila vídeňská firma Friedmann. Při druhé modernizaci byl do vozů dosazen 18žilový UIC kabel. Původní nátěr vozu byl bílý a přes okna červený. Nátěr se asi ve 3/4 délky vozu lámal a pod úhlem…"} {"text": "[CS Wikipedia] Burley\n\nNázev Burley má více významů: Místa Burley (Hampshire) Burley (Leeds) Burley (Rutland) Burley (Shropshire) Burley (Idaho) Burley (Washington) Ostatní Burley (tabák) – jeden z typů zpracování tabáku Externí odkazy"} {"instruction": "Create a Python program that finds a given string in a sentence and capitalizes it.", "input": "Sentence: \"I love the world\"\nString to Find: \"world\"", "output": "def capitalize_string(text, string_to_find):\n index = text.find(string_to_find)\n if index != -1:\n capitalized_string = text[:index] + string_to_find.upper() + text[index+len(string_to_find):]\n return capitalized_string\n else:\n return text\n\nsentence = \"I love the world\"\nstring_to_find = \"world\"\nprint(capitalize_string(sentence, string_to_find))"} {"text": "[CS Wikipedia] Perzekuce kněží litoměřické diecéze\n\nLitoměřická diecéze patří k nejvíce sekularizovaným diecézím na světě. Už na začátku 20. století některé regiony patřily k nejvíce sekularizovaným, např. Mostecko. Dalším významnými faktory je odsun dvou třetin diecezanů německé národnosti a komunistická perzekuce. Odsun německých kněží Pro litoměřickou diecézi byla další komunistická perzekuce velmi krutá, protože již po válce byla diecéze oslabena odsunem mnoha německých kněží. Po komunistickém puči v roce 1948 totalitní systém v Československu nejdříve nechtěl jít proti katolíkům přímo, protože jich bylo hodně i v komunistické straně. Proto začal s perzekucí postupně a opatrně. Pastýřský list Hlas biskupů v hodině velké zkoušky List byl přijat 15. června 1949 na biskupské konferenci v Praze. V tomto pastýřském listu biskupové vysvětlovali katolíkům následky komunistické politiky. Tzv. „Katolická akce“ byla označena za rozkolné hnutí a aktivistickým kněžím i laikům pohrozeno exkomunikací. List měl být čten na bohoslužbách ve všech kostelích na svátek Božího těla dne 19. června 1949, čemuž se ovšem komunistická moc snažila zabránit. kněží, kteří přes výhrůžky tento pastýřský list při mši přečetli byli vystaveni různým represím, zejména pak věznění. V litoměřické diecézi přečetli pastýřský list např. Františkek Appl, Jan Bárta, Václav Alois Huťař, Josef Just, Ezechiel Kindermann, František Krutílek, Anicet František Petružela, Jindřich Tomíček, Josef Zlámal atd. Akce K Druhou vlnou byl útok proti klášterům Akce K a následná internace řeholníků v roce 1950. Kněží odstranění z farností byli buď internováni v táborech nucené práce, zařazeni do pomocných technických praporů nebo přímo uvězněni. Někteří kněží, kteří byli postihnuti Akcí K nebo trestání PTP, vězením, ztrátou souhlasu byli občas přesouváni do litoměřické diecéze nebo získali tzv. státní souhlas pro veřejné působení v duchovní správě po roce 1968. Soudy s tzv. ilegálními skupinami Nejtěžší následky pro litoměřickou diecézi měl soud s biskupem Štěpánem Trochtou a jeho spolupracovníky Františkem Rabasem, Františkem Vlčekem a Bohumilem Landsmannem v roce 1954. Další soudy s tzv. ilegálními skupinami následovaly - např. Appl František a spol, Bárta Josef a spol, Bečvář Jan Helikar Josef a spol, Blechová Anna a spol, Cukr Josef a spol, Just Josef a Pieschová Lucie, Krutílek František a spol. Komunistický režim útočil proti biskupům, duchovenstvu, řádům (mužským, ženským i tzv. třetím řádům - pro laiky žijící spiritualitou řádu) zvláště proti jezuitům a salesiánům a dále proti organizacím laiků jako byly mariánské družiny, katolická akce atd. Důvody pro odsouzení se stávalo pro tehdejší komunistický režím protistátní činností např. kontakt s nadřízenými v zahraničí, kontakt s internunciaturou, kontakt s novináři nebo pracovníky zastupitelských…"} {"text": "[EN Wikipedia] Mazahir Uloom\n\nMazahir Uloom (also known as Mazahir Uloom Waqf) is an Islamic seminary located in Saharanpur, Uttar Pradesh. Started in November 1866 by Sa'ādat Ali Faqīh, and developed further by Mazhar Nanautawi and Ahmad Ali Saharanpuri; it is regarded as the second most influential and major Deobandi seminary in India. The earliest graduates of the seminary include famous Hadīth scholar Khalil Ahmad Saharanpuri. In 1983, the seminary split into two with the establishment of Mazahir Uloom Jadeed as a new independent seminary. Since then the seminary has been named as Mazahir Uloom Waqf Qadeem. The incumbent rector of the seminary is Muḥammad Saeedi. History Mazāhir Uloom was established as \"Mazhar Uloom\"; on 9 November 1866, six months after the foundation of the Deoband seminary. Its founding figures included Ahmad Ali Saharanpuri, Mazhar Nanautawi, Qādhi Fazlur Rahmān and Sa’adat Ali Faqih. Mazahir Uloom is thought to be the second major madrasa after Darul Uloom Deoband. The first generation teachers, apart from the founders; include, Aḥmad Hasan Kanpuri, Sa'adat Hussain Bihari, Sakhāwat Ali Ambethwi and Muḥammad Siddīq. The first generation students include Khalil Ahmad Saharanpuri, Mushtāq Aḥmad Anbethwi and Qamruddīn Sahāranpuri. In Muharram 1338 AH, the seminary established its Darul Ifta (the fatwa institute). The seminary's jurists include Ashfāqur Rahmān Kāndhlawi, Mahmood Hasan Gangohi, Abdul Qayyūm Raipuri and Muḥammad Shuaib Bastawi. Recent developments Following the split of Darul Uloom Deoband in 1982; this seminary also bifurcated into two and Mazahir Uloom Jadeed took birth as an independent offshoot in 1983. Program The seminary teaches the dars-e-nizami curriculum. The former rector of the seminary Abdul Latīf wrote a detailed defense of the dars-e-nizami curriculum; when some scholars asked the syllabus to be updated. The seminary has changed few books in the curriculum timely, but they did not modify it completely and they do not agree with the changes, or systems otherwise. Administration Mazāhir Uloom follows the dogma of Sunni Islam and the jurisprudence of Abu Hanifa. It adheres to the Chishti order of Sufism, following Rashid Ahmad Gangohi and Khalil Ahmad Saharanpuri. The seminary focuses on educational purposes only. It has stayed away from discussing politics. The management of the seminary was controlled by its local members. Owing to their differences, Rashid Ahmad Gangohi was appointed the senior patron of the seminary in 1896. Gangohi resigned from the position in 1319 AH; and an executive council called \"Majlis Shūra Sarparastān\" was formed to look after the seminary affairs on 3 January 1903. The first such council included Abdur Rahīm Raipuri, Ashraf Ali Thanwi and Zulfiqar Ali Deobandi. Scholars such as Abdur Rahīm Raipuri,…"} {"instruction": "Create a function in Java for computing the factorial of a positive integer number.", "input": "", "output": "public static long factorial(int n) { if (n == 0) { return 1; } long result = 1; for (int i = 1; i <= n; i++) { result *= i; } return result; }"} {"instruction": "Determine whether two given arrays are equal or not.", "input": "arr1 = [1, 2, 3] arr2 = [1, 2, 4]", "output": "The two arrays are not equal."} {"text": "[DE Wikipedia] Bahnhofshalle\n\nDie Bahnhofshalle (auch Bahnhalle, Bahnsteighalle, Gleishalle oder Perronhalle) ist eine Halle, welche die Bahnsteige und Gleise eines Bahnhofs überdeckt und Eisenbahn-Nutzende und Besuchende sowie Reisende und Wartende vor allem gegen Witterungseinflüsse schützt, außerdem Begegnungen ermöglichen und Einkaufsmöglichkeiten bieten kann. Oft werden auch Schalter- bzw. Wartehallen als „Bahnhofshalle“ bezeichnet. Geschichte und Architektur Am Anfang der Geschichte der Eisenbahn wurden in der Regel an das Empfangsgebäude (auch Aufnahmegebäude) hölzerne Einzelhallen gebaut. Diese älteren Hallen bestanden vielfach ganz aus Holz oder aus Holz in Verbindung mit Eisen. Ab der zweiten Hälfte des 19. Jahrhunderts aber kamen beim Um- oder Neubau von Bahnhöfen mit großem Personenverkehrsaufkommen auch größere Gruppen von Hallen, mehrschiffige Bahnhofhallen zur Ausführung und gaben diesen eine monumentale Wirkung. Mit der zunehmenden Vergrößerung der Hallenspannweiten ging man zu gusseisernen und stählernen Konstruktionen über und verwendet heute auch viel Glas. Mittelgroße bis große Bahnhöfe in den Industrienationen sind stets überdacht und verfügen über eine Halle als „Unterstand“ für die Züge und die Reisenden. Der Grund für die meist große Höhe der Bahnhofshallen liegt zum einen am Rußausstoß der Dampflokomotiven, was früher der Hauptgrund war, zum anderen an praktischen Gegebenheiten: Große Räume fangen Lärm besser auf und sind überschaubar. Ein weiterer Grund für große Bahnhofshallen ist, dass sie Repräsentationsbauten einer Stadt sind. Liste der Bahnhofshallen Europa Deutschland Mit Bahnbetrieb Aachen Hauptbahnhof, erbaut 1905, Stahl, dreischiffig Bad Ems, kleinste Bahnhofshalle der DB Bad Herrenalb Berlin Alexanderplatz Berlin Bellevue Berlin Friedrichstraße Berlin Gesundbrunnen Berlin Hackescher Markt Berlin Hauptbahnhof, erbaut 2006 Berlin Jannowitzbrücke Berlin Ostbahnhof Berlin Ostkreuz (Ringbahn) Berlin-Schöneberg (Ringbahn) Berlin-Spandau, längste Halle, 440 Meter Berlin Südkreuz (Ringbahn) Bahnhof Berlin Warschauer Straße (Stadtbahn) Berlin Westkreuz (Ringbahn) Berlin Zoologischer Garten Berlin Bülowstraße (U-Bahn) Berlin Görlitzer Bahnhof (U-Bahn) Berlin Hallesches Tor (U-Bahn) Berlin Kottbusser Tor (U-Bahn) Berlin Gleisdreieck (U-Bahn), Turmbahnhof mit zwei Hallen auf zwei Ebenen Berlin Mendelssohn-Bartholdy-Park (U-Bahn) Berlin Möckernbrücke (U-Bahn) Berlin Nollendorfplatz (U-Bahn) Berlin Olympiastadion (U-Bahn) Berlin Schönhauser Allee (U-Bahn) Berlin Eberswalder Straße (U-Bahn) Berlin Prinzenstraße (U-Bahn) Berlin Warschauer Straße (U-Bahn) Bonn Hauptbahnhof Bremen Hauptbahnhof Busenbach (Stadtbahn Karlsruhe) Chemnitz Hauptbahnhof Darmstadt Hauptbahnhof Dresden Hauptbahnhof Dresden-Neustadt Duisburg Hauptbahnhof Düsseldorf Hauptbahnhof Erfurt…"} {"text": "[EN Wikipedia] Les Angles, Pyrénées-Orientales\n\nLes Angles (; , ) is a commune in the Pyrénées-Orientales department in southern France. Legend has it that at the beginning of the XIV century, the Black Death wiped out the entire population of the former village of Vallsera. Only two sisters survived, they are believed to have donated all of the land to the commune of Les Angles. Geography Localisation Les Angles is located in the canton of Les Pyrénées catalanes and in the arrondissement of Prades. Government and politics Mayors Population See also Communes of the Pyrénées-Orientales department References Activities in Les Angles External links Official site Communes of Pyrénées-Orientales"} {"instruction": "Show an example of a while loop in Python.", "input": "", "output": "i = 0 while i < 10: print(i) i += 1"} {"instruction": "Write a Python function that takes a list of numbers as input, sorts them in ascending order, and returns a new list that includes the number of times each number occurred in the original list.", "input": "[2, 5, 2, 2, 1, 3, 5, 7, 2]", "output": "def sort_and_count(numbers):\n sorted_list = sorted(numbers)\n new_list = []\n \n length = len(sorted_list)\n current_index = 0\n \n while current_index < length:\n current_number = sorted_list[current_index]\n current_count = sorted_list.count(current_number)\n new_list.append((current_number, current_count))\n \n for i in range(current_count):\n sorted_list.remove(current_number)\n \n current_index += 1\n \n return new_list\n \n# Usage:\nprint(sort_and_count([2, 5, 2, 2, 1, 3, 5, 7, 2]))\n# Output: [(1, 1), (2, 4), (3, 1), (5, 2), (7, 1)]"} {"instruction": "Output the sum of digits in a number.", "input": "n = 123", "output": "6"} {"instruction": "Write a Python function that creates a JSON response with fields for score and data. The data field should contain a message that varies depending on the score value. If the score is 0, the message should state \"Try again\". If the score is 1, the message should state \"Well done\".", "input": "score = 0", "output": "def create_response(score):\n if score == 0:\n message = \"Try again\" \n elif score == 1:\n message = \"Well done\"\n else:\n message = \"\"\n \n return {\"score\": score, \"message\": message}"} {"text": "[CS Wikipedia] Účinnost\n\nÚčinnost může označovat: účinnost (fyzika) – fyzikální veličina světelná účinnost termodynamická účinnost účinnost (právo) – vlastnost právního předpisu Související články Účinek Efektivnost Externí odkazy"} {"instruction": "Create a Python script for encrypting and decrypting data using Advanced Encryption Standard (AES).", "input": "Not applicable", "output": "from Crypto.Cipher import AES\n\ndef encrypt(plaintext, key):\n cipher = AES.new(key, AES.MODE_EAX)\n ciphertext = cipher.encrypt(plaintext)\n # Return a tuple containing the nonce and the cipher text\n return (cipher.nonce, ciphertext)\n\ndef decrypt(nonce, ciphertext, key):\n cipher = AES.new(key, AES.MODE_EAX, nonce=nonce)\n plaintext = cipher.decrypt(ciphertext)\n return plaintext"} {"instruction": "Convert the following list of URLs to strings without the protocol portions.", "input": "url_list = ['http://example.com/index', 'https://example.net/contact', 'http://example.org/about']", "output": "def convert_urls(url_list): return list(map(lambda x : x.split('://')[1] , url_list)) converted_urls = convert_urls(url_list) print(converted_urls) # Output: ['example.com/index', 'example.net/contact', 'example.org/about']"} {"instruction": "Modify the following code to display alter the existing function to accept an additional parameter.", "input": "def foo(a, b): return a + b", "output": "def foo(a, b, c): return a + b + c"} {"instruction": "Write a Python function to classify data points as low, medium and high according to the given threshold values.", "input": "threshold = [4, 6]", "output": "def classify(value, threshold):\n if value < threshold[0]:\n return 'low'\n elif threshold[0] <= value < threshold[1]:\n return 'medium'\n else:\n return 'high'"} {"instruction": "Create a function in Python which takes a string and an integer n as input and returns a string with the first n characters of the given string.", "input": "", "output": "def get_first_n_chars(string, n): return string[:n]"} {"text": "[EN Wikipedia] Tinline River\n\nThe Tinline River is a river of the Marlborough Region of New Zealand's South Island. It flows generally south from its sources at the northern end of the Bryant Range to reach the Pelorus River seven kilometres west of Pelorus Bridge. The river is named for John Tinline and commemorates the discovery of a route from Nelson to the Wairau. See also List of rivers of New Zealand References Rivers of the Marlborough Region Rivers of New Zealand"} {"instruction": "Create a simple mini-game using Python and Pygame. The game should allow the player to move an avatar around and score points by touching objects.", "input": "Not applicable", "output": "import pygame\n\n# Initialize the game engine\npygame.init()\n\n# Define the colors\nblack = ( 0, 0, 0)\nwhite = ( 255, 255, 255)\n\n# Set the height and width of the screen\nsize = [700, 500]\nscreen = pygame.display.set_mode(size)\n\n# Set the title of the window\npygame.display.set_caption(\"My Game\")\n\n# Create an empty array\nobject_list = []\n\n# Loop until the user clicks the close button\ndone = False\n\n# Used to manage how fast the screen updates\nclock = pygame.time.Clock()\n\n# -------- Main Program Loop -----------\nwhile done == False:\n # ALL EVENT PROCESSING SHOULD GO BELOW THIS COMMENT\n for event in pygame.event.get():\n if event.type == pygame.QUIT:\n done = True\n # ALL EVENT PROCESSING SHOULD GO ABOVE THIS COMMENT\n\n # ALL GAME LOGIC SHOULD GO BELOW THIS COMMENT\n\n # Move the objects in object_list\n for item in object_list:\n item.x += item.x_speed\n item.y += item.y_speed\n\n # Player Input\n pressed = pygame.key.get_pressed()\n if pressed[pygame.K_UP]:\n player.y_speed = -3\n if pressed[pygame.K_DOWN]:\n player.y_speed = 3\n\n # Check for collisions between the player and objects\n for item in object_list:\n if abs(player.x - item.x) < 20 and abs(player.y - item.y) < 20:\n object_list.remove(item)\n player.score += 1\n\n # ALL GAME LOGIC SHOULD GO ABOVE THIS COMMENT\n\n # ALL CODE TO DRAW SHOULD GO BELOW THIS COMMENT\n\n # Clear the screen\n screen.fill(white)\n\n # Draw the objects in object_list\n for item in object_list:\n pygame.draw.rect(screen, (255, 0, 0), [item.x, item.y, 10, 10])\n\n # Draw the player onto the screen\n pygame.draw.rect(screen, (0, 0, 255), [player.x, player.y, 10, 10])\n\n # ALL CODE TO DRAW SHOULD GO ABOVE THIS COMMENT\n\n # Go ahead and update the screen with what we've drawn\n pygame.display.flip()\n\n # Limit frames per second\n clock.tick(60)\n\n# Be IDLE friendly\npygame.quit()"} {"instruction": "Generate a random 6-digit integer.", "input": "", "output": "import random random_int = str(random.randint(100000, 999999))"} {"instruction": "Write a Python program to use a type hint to check if a variable is an instance of a particular class.", "input": "", "output": "def check_type(variable, class_name):\n if isinstance(variable, class_name):\n print(\"It is an instance of the class\")\n else:\n print(\"It is not an instance of the class\")"} {"instruction": "Create a method that prints all elements of an array", "input": "[1,2,3]", "output": "def print_elements(arr): \"\"\" Print all elements of an array. \"\"\" for num in arr: print(num) arr = [1,2,3] print_elements(arr)"} {"instruction": "Rewrite the following function to use the modern function syntax in Javascript.", "input": "function greetUser(name) { console.log('Hello ' + name + '!'); }", "output": "const greetUser = (name) => console.log(`Hello ${name}!`);"} {"instruction": "Using HTML, render a link to an external site.", "input": "external_site = \"https://www.example.com\"", "output": "Visit External Site"} {"instruction": "Generate a method in Python to sort a given list of dictionaries.", "input": "list_dict = [{'name': 'a', 'age': 23}, {'name': 'b', 'age': 19}, {'name': 'c','age': 36}]", "output": "def dict_sort(list_dict): sorted_dict = sorted(list_dict, key = lambda x: x['age']) return sorted_dict"} {"text": "[DE Wikipedia] Plaza de la Constitución\n\nPlaza de la Constitución ist der Name folgender Plätze: Plaza de la Constitución (Mexiko-Stadt), ein Platz in Mexiko-Stadt, Mexiko Plaza de la Constitución (Montevideo), ein Platz in Montevideo, Uruguay Plaza de la Constitución (Santiago de Chile), ein Platz in Santiago, Chile"} {"instruction": "Generate a function in Python to filter a given list and keep only the numeric items in the list.", "input": "input_list = [4, 2, 1, 15.6, 'p', 'y', 5.8]", "output": "def filter_numeric(input_list): \n \n num_list = [] \n \n for item in input_list:\n if type(item) == int or type(item) == float: \n num_list.append(item) \n \n return num_list \n \ninput_list = [4, 2, 1, 15.6, 'p', 'y', 5.8] \nprint(filter_numeric(input_list)) \n#Output: [4, 2, 1, 15.6, 5.8]"} {"instruction": "Convert a given list into a dictionary in Python", "input": "[\"apple\", \"banana\", \"cherry\"]", "output": "dict = { \"apple\": 0, \"banana\": 1, \"cherry\": 2 }"} {"text": "[EN Wikipedia] WNKJ (FM)\n\nWNKJ is a Christian radio station licensed to Hopkinsville, Kentucky, broadcasting on 89.3 MHz FM. The station serves the areas of Hopkinsville, Kentucky, and Clarksville, Tennessee, and is owned by Pennyrile Christian Community, Inc. WNKJ's programming includes Christian talk and teaching shows such as Truth for Life with Alistair Begg, Insight for Living with Chuck Swindoll, Turning Point with David Jeremiah, Revive our Hearts with Nancy Leigh DeMoss, Back to Genesis by the Institute for Creation Research, The Alternative with Tony Evans, Focus on the Family, and Unshackled! Rebroadcasters WNKJ is simulcast on 91.7 WNLJ in Madisonville, Kentucky, as well as low powered translators on 92.1 in Murray, Kentucky, 98.9 in Dickson, Tennessee, and 101.7 in Providence, Kentucky. Simulcast Translators References External links WNKJ's official website NKJ Radio stations established in 1981 1981 establishments in Kentucky Hopkinsville, Kentucky"} {"instruction": "Create a C program to read in a 3x3 matrix composed of integers, and print it.", "input": "Input Matrix: [[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "#include int main() { int a[3][3], i, j; printf(\"Enter the elements of the 3x3 matrix : \\n\"); for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) scanf(\"%d\", &a[i][j]); printf(\"The matrix is: \\n\"); for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) printf(\"%d \", a[i][j]); printf(\"\\n\"); } return 0; }"} {"instruction": "You need to find the area of a given circle with the formula: Area = pi * r * r", "input": "r = 5", "output": "const PI = 3.14; const r = 5; const area = PI * r * r; console.log(area);"} {"instruction": "Create an object-oriented Python program for a bank account with a balance, owner name, and methods for withdrawing, depositing and showing balance.", "input": "Not applicable", "output": "class BankAccount:\n def __init__(self, owner, balance=0.0):\n self.owner = owner\n self.balance = balance\n \n def deposit(self, amount):\n self.balance += amount\n return self.balance\n \n def withdraw(self, amount):\n if amount > self.balance:\n return 'Insufficient funds'\n self.balance -= amount\n return self.balance\n \n def show_balance(self):\n print(f'Your balance is {self.balance}')\n\naccount = BankAccount('John Doe', 100.0)\naccount.show_balance() # Your balance is 100.0\naccount.deposit(50.0) # 150.0\naccount.withdraw(75.0) # 75.0"} {"instruction": "Write a Java program to print out the first n prime numbers", "input": "", "output": "public static void printPrimeNumbers(int n) { int num; int count=0; for (int i = 2; i <= n;) { num=0; for (int j = 2; j <= i / 2; j++) { if (i % j == 0) { num++; break; } } if (num == 0) { System.out.print(i+\" \"); count++; } i++; } }"} {"text": "[CS Wikipedia] Makati\n\nMakati , ) je město na Filipínách. Leží na ostrově Luzon, kde tvoří 1 z 16 měst národního centrálního regionu (NCR) - Metro Manila. Makati je spolu se sousedním městem Taguig finančním centrem Filipín, protože je zde velká koncentrace domácích i zahraničních firem. Má obyvatel. Sídlí zde muzeum historie a výtvarného umění Ayala. Centrum města V centru města je rozvinutá obchodní čtvrť (Makati Central business district) se sídlem mnoha nejvýznamnějších filipínských a nadnárodních společností, ambasád, luxusních obchodů a nákupních center. Ayala triangle je trojúhelník ulic v rámci obchodní čtvrtě, kolem kterého je největší koncentrace výškových budov mnoha nadnárodních společností. Uprostřed trojúhelníku je jediný větší městský park pro veřejnost v Makati. Ayala center je zábavní a nákupní centrum. Součástí je několik nákupních domů z nichž některé jsou přímo propojená, komplex hotelů a Ayala Muzeum, kde je představena historie Filipín a umění. Doprava Hromadná doprava Nadzemní městská dráha MRT3 (obsluhovaná převážně českými tramvajemi typu Tatra RT8D5), státní železnice PNR a soukromí autobusoví dopravci spojují Makati s dalšími městy, které jsou součástí Metro Manila. Dopravu uvnitř města zajišťují soukromí operátoři pomocí tradičního Filipínského Jeepney a autobusů. Makati nemá jednotný systém městské hromadné dopravy. Silniční síť Makati protínají dvě nejdůležitější dálnice metropolitní oblasti EDSA a Metro Manila Skyway. Dopravní síť ve městě je velmi přetížená což přispívá ke špatné kvalitě ovzduší. Zdravotnictví Většina zdravotních středisek a nemocnic v Makati je privátní. Největší a nejmodernější nemocnicí je privátní Makati Medical Center. Druhou nemocnicí je veřejná Ospital ng Makati. Odkazy Reference Externí odkazy Metro Manila Města na Filipínách Luzon"} {"text": "[HI Wikipedia] श्रीलंकाई रुपया\n\nरुपया (सिंहली: රුපියල්, तमिल: ரூபாய்), (प्रतीक: රු, Rs, SLRs / -; कोड: LKR), श्रीलंका की आधिकारिक मुद्रा है, जिसका विभाजन 100 सेंट में किया जाता है। श्रीलंकाई रुपये को श्रीलंका के केंद्रीय बैंक द्वारा जारी किया जाता है। इतिहास सन 1825 में सीलोन में सीलोनाई रिक्सडॉलर को हटाकर ब्रिटिश पाउंड को सीलोन की सरकारी मुद्रा घोषित किया गया और इसकी विनिमय दर 1 पाउंड = 13 ⅓ रिक्सडॉलर निर्धारित की गयी साथ ही ब्रिटिश चांदी के सिक्के को वैध मुद्रा बनाया गया। 1827 में रिक्सडॉलर नोटों के स्थान पर पाउंड नोट जारी किए गए। जिन रिक्सडॉलर नोटों को पाउंड नोटों से बदला नहीं गया उनका जून 1831 में विमुद्रीकरण किया गया। 26 सितम्बर 1836 को भारतीय रूपये को सीलोन का मानक सिक्का बनाया गया और सीलोन को फिर से भारतीय मुद्रा क्षेत्र में शामिल कर लिया गया। पाउंड नोट, भारतीय रुपये के नोटों के साथ प्रचलन में बने रहे। ब्रिटिश चांदी के सिक्के वैध मुद्रा बने रहे और खातों को पाउंड, शिलिंग और पेंस में रखा जाता था। हालांकि, भुगतान को एक \"काल्पनिक सममूल्य\" (तय लेखांकन दर) पर यानि 2 शिलिंग प्रति रुपया (यानी, £1 = 10 रुपये) की दर पर रुपए और आने में किया जाता था। 18 जून 1869 भारतीय रूपये को औपचारिक रूप से असीमित वैध मुद्रा के रूप में स्थापित किया गया। 23 अगस्त 1871 को रुपये का दशमलवीकरण किया गया और उसे 100 सेंट में विभाजित किया गया और 1 जनवरी 1872 ब्रिटिश मुद्रा को एक रुपया = 2 शिलिंग तीन पेंस की दर से पूरी तरह हटाकर भारतीय रुपये को एकमात्र वैध मुद्रा घोषित किया गया। सिक्के स्मारक सिक्के श्रीलंका के केन्द्रीय बैंक ने 1957 के बाद से कई स्मारक सिक्के जारी किए हैं। अपनी 60 वीं वर्षगांठ के अवसर पर, 15 दिसम्बर 2010 को श्रीलंका के केन्द्रीय बैंक ने 5000 रुपए मूल्य का बहुरंगी चांदी का स्मारक सिक्का जारी किया था। यह सिक्का केन्द्रीय बैंक द्वारा जारी किए गया पहला बहुरंगी सिक्का था। बैंकनोट विनिमय दर इन्हें भी देखें सन्दर्भ"} {"instruction": "Write a Python function that takes in one argument and prints out the Fibonacci number for that argument.", "input": "", "output": "def Fibonacci(x): if x == 0: return 0 elif x == 1: return 1 else: return Fibonacci(x-1)+Fibonacci(x-2) if __name__ == '__main__': print(Fibonacci(5)) # Output: 5"} {"instruction": "Write a code to display the current directory path in the terminal.", "input": "", "output": "import os currdir = os.getcwd() print(currdir)"} {"text": "[DE Wikipedia] Hermann Bonitz\n\nHermann Bonitz (* 29. Juli 1814 in Langensalza (Thüringen); † 25. Juli 1888 in Berlin) war ein Philologe, Philosoph und Schulreformer in Wien und Berlin. Leben Geboren als sechstes Kind des Pfarrers und Superintendenten Karl Friedrich Bonitz und seiner Mutter Maria Sophia Bonitz geb. Schmalkalden, studierte er nach dem Besuch der Landesschule in Schulpforta, einem ehemaligen Zisterzienserkloster bei Naumburg, an der Universität Leipzig Philosophie, Philologie, Theologie und Mathematik und an der Friedrich-Wilhelms-Universität Berlin Philologie. 1835 heiratete er Bertha Maria Semmel aus Gera, sie war die Tochter des Geraer Bürgermeisters, Handelsherrn und Rittergutsbesitzers Marcus Friedrich Semmel (1751–1801). Nach seiner Promotion 1836 in Leipzig war er bis 1849 im Schuldienst, zuerst als Lehrer in Dresden, ab 1838 als Oberlehrer in Berlin, und ab 1842 als Gymnasialprofessor in Stettin tätig. 1849 wurde er unter Vermittlung Franz Serafin Exners als Professor für Klassische Philologie an die Universität Wien berufen. Gemeinsam mit Exner entwarf er die unter Unterrichtsminister Leo Graf Thun-Hohenstein durchgeführte Reform zum 8-klassigen Gymnasium mit der „Maturitätsprüfung“. 1867 übersiedelte Hermann Bonitz im Rahmen seiner Ernennung zum Direktor des Gymnasiums zum Grauen Kloster und Direktor des Königlichen pädagogischen Seminars für gelehrte Schulen nach Berlin zurück. Ab 1875 war er Geheimer Regierungsrat und Vortragender Rat am Unterrichts-Ministerium. Seit 1850 war er auswärtiges Mitglied der Bayerischen Akademie der Wissenschaften. 1867 wurde er als ordentliches Mitglied in die Preußische Akademie der Wissenschaften aufgenommen. 1888 zog sich Hermann Bonitz als Geheimer Ober-Regierungsrat aus dem Arbeitsleben zurück und verstarb am 25. Juli 1888 in Berlin kurz vor seinem 74. Geburtstag. Durch den Bildhauer Carl Kundmann wurde im Wiener Arkadenhof des Universitätshauptgebäudes eine Denkmalgruppe gestaltet, die den Reformern des österreichischen Bildungswesens, Leo Graf Thun-Hohenstein, Franz Exner und Hermann Bonitz, gewidmet ist Im Jahr 1954 wurde in Wien-Floridsdorf (21. Bezirk) die Bonitzgasse nach ihm benannt. Werk Bonitz kommt zusammen mit Franz Serafin Exner eine entscheidende Bedeutung für die Reformierung des Schulsystems in Wien und Berlin zu. Seine umfangreichen Werke über Platon und Aristoteles, sein Index Aristotelicus, (Berlin 1870), die Platonischen Studien (1875, 1886) sowie seine Übersetzung von Aristoteles’ Metaphysik (Berlin 1890) wurden Standardwerke der Geisteswissenschaften. Schriften Disputationes Platonicae Duae. Blochmann, Dresden 1837. (Digitalisat) Platonische Studien (3. Ausg. Hrsg., 1886) Reprografischer Nachdruck, Forgotten Books, London 1975. ISBN 978-1-332-35699-7 Observationes Criticae in Aristotelis Libros…"} {"instruction": "Write a Python program to display a list of all the prime numbers between a given range.", "input": "Not applicable", "output": "def prime_nums_in_range(start, end): \n prime_list = [] \n for num in range(start, end + 1): \n if num > 1: # check for cases greater than 1 \n for i in range(2, num): \n if (num % i) == 0: \n break \n else: \n prime_list.append(num) \n return prime_list \n\nstart = 2 \nend = 20 \nprint(prime_nums_in_range(start, end)) \n# Output: [2, 3, 5, 7, 11, 13, 17, 19]"} {"instruction": "Describe your approach to sorting a variety of data with a single sorting algorithm.", "input": "", "output": "My approach to sorting a variety of data would involve using a single sorting algorithm. Depending on the type of data, I would select the most appropriate sorting algorithm which would involve understanding the complexity of the data and the type of sorting required. Generally, I would use quick sort or merge sort as they are efficient and have good performance. However, if needed, I would be open to using insertion or bubble sort as well."} {"instruction": "Create a for-loop in Python to loop through the items in a list and print their elements.", "input": "names = ['John', 'Kate', 'Mike', 'Alex']", "output": "for name in names:\n print(name)"} {"instruction": "Using the list as an example, remove all elements from the list that have a value of 0.", "input": "my_list = [0, 5, 7, 0, 9]", "output": "my_list = [5, 7, 9] my_list = [0, 5, 7, 0, 9] my_list = [x for x in my_list if x != 0] print(my_list)"} {"text": "[HI Wikipedia] कैण्टन\n\nस्विट्ज़रलैंड देश का कोई भी एक प्रान्त कैंटन कहलाता है। इसमें ज़्यादातर एक या दो बड़े शहरों के साथ कई कस्बे और गाँव शामिल होते हैं। हर कैण्टन की अपनी एक या दो राजभाषाएं होती हैं। कैण्टन कैण्टन"} {"instruction": "Write a SQL query to count the number of records with a field of \"user_id\" in the table called \"users\".", "input": "", "output": "SELECT COUNT(*) as count_user_id FROM users;"} {"instruction": "Write a ruby program to merge two sorted arrays in to one sorted array.", "input": "arr1: [1, 4, 6] arr2: [2, 3, 7]", "output": "def mergeSortedArrays(arr1, arr2) arr3 = arr1 + arr2 arr3.sort! return arr3 end"} {"instruction": "Analyze and improve the following basic shell script.", "input": "#!/bin/bash # simple bash script echo \"Hello World\"", "output": "#!/bin/bash # Simple bash script # Store name in a variable name=\"World\" # Print message echo \"Hello $name\""} {"text": "[HI Wikipedia] रोमानिया\n\nरोमानिया (;प्राचीन: Rumania (रूमानिया), Roumania (रौमानिया) ;) काले सागर की सीमा पर, कर्पेथियन चाप के बाहर और इसके भीतर, निचले डेन्यूब पर, बाल्कन प्रायद्वीप के उत्तर में, दक्षिणपूर्वी और मध्य यूरोप में स्थित एक देश है. लगभग पूरा डेन्यूब डेल्टा इसी क्षेत्र के भीतर स्थित है। इसकी सीमा पश्चिम में हंगरी और सर्बिया से, उत्तर पूर्व में यूक्रेन और माल्दोवा के गणराज्य से और दक्षिण में बुल्गेरिया से जुडी है। इस क्षेत्र के इतिहास में देकियन्स, रोमन साम्राज्य, बुल्गारिया साम्राज्य, हंगरी के साम्राज्य और ओटोमन साम्राज्य का शासन रहा. एक राष्ट्र-राज्य के रूप में, देश का निर्माण 1859 में मोल्दाविया और वलाकिया के विलय से हुआ और 1878 में इसकी स्वतंत्रता को मान्यता प्राप्त हुई. बाद में, 1918 में, ट्रांसिल्वेनिया, बुकोविना और बेसर्बिया भी इसमें शामिल हो गए। द्वितीय विश्व युद्ध के अंत में, इसके प्रदेशों के कुछ हिस्सों (मोटे तौर पर वर्तमान का माल्दोवा) पर सोवियत संघ का कब्जा था और रोमानिया वर्साय की संधि का एक सदस्य बन गया। 1989 में लौह परदे के पतन के साथ, रोमानिया ने राजनैतिक और आर्थिक सुधारों की श्रृंखला शुरू कर दी. क्रांति के बाद की आर्थिक समस्याओं के एक दशक बाद, रोमानिया ने आर्थिक सुधार किये जैसे 2005 में फ्लैट कर की दर को कम कर दिया और 1 जनवरी 2007 को यूरोपीय संघ में शामिल हो गया। हालांकि रोमानिया का आय स्तर यूरोपीय संघ में सबसे कम स्तरों में से एक रहता है, सुधार ने विकास की गति को बढाया है। रोमानिया अब एक उच्च मध्यम आय वर्ग की अर्थव्यवस्था से युक्त देश है। रोमानिया यूरोपीय संघ के सदस्य राज्यों में नौवां सबसे बड़ा क्षेत्र है और इसकी जनसंख्या सातवें स्थान पर अधिकतम (21.5 मिलियन लोगों के साथ) है। इसकी राजधानी और सबसे बड़ा शहर बुकेरेस्ट है (), जो 1.9 मिलियन लोगों के साथ यूरोपीय संघ का छठा सबसे बड़ा शहर है। 2007 में, ट्रांसिल्वेनिया में एक शहर सिबियु, को यूरोप की सांस्कृतिक राजधानी चुना गया। रोमानिया 29 मार्च 2004 को नाटो में भी शामिल हो गया और यह लैटिन संघ का एक सदस्य है, साथ ही OSCE के फ्रान्कोफोनिए का भी सदस्य है और CPLP का एक सहयोगी सदस्य है। रोमानिया एक अर्द्ध राष्ट्रपति संघात्मक राज्य है। परिचय रोमानिया स्थिति : 43°6' से 48°5' उ.अ. तथा 20°4' से 31°0' पू.दे.। यह यूरोप महाद्वीप में स्थित एक स्वतंत्र देश है। इसका क्षेत्रफल 91,671 वर्ग मील यहाँ के लगभग 85 प्रतिशत निवासी रोमानिया की भाषा बोलते हैं। रोमानिया 'अन्न का देश' कहा जाता है। यहाँ पर लोहे और कोयले की कमी है एवं पूँजी का अभाव तथा बाजार सीमित है, इसलिए यहाँ के 10 प्रतिशत मनुष्य ही उद्योग धंधों पर आश्रित हैं। ट्रैसिलवनिया के पूर्वी तथा पश्चिमी प्रदेशों में गेहूँ तथा मक्के की खेती होती है। प्राचीन ढंग से खेती होते हुए भी यहाँ गेहूँ अधिक पैदा होता है। चुकंदर, तंबाकू तथा अंगूर गौण उपज है। रोमानिया में अनेक खनिज पदार्थ भी उपलब्ध हैं, जैसे खनिज तेल, सोना, ताँबा, सीसा, चाँदी, मैंगनीज, ऐंटीमनी, जस्ता आदि। पूर्वी मैदानों के पहाड़ी पेद्रश में खनिज तेल का वार्षिक उत्पादन 60 लाख टन से भी अधिक होता है। तेल के उत्पादन में संसार में रोमानिया का छठा स्थान है। नलों द्वारा तेलक्षेत्र काले सागर पर स्थित कॉन्स्टानत्सा बंदरगाह से…"} {"instruction": "Write a Java program to print binary numbers from 0 to 15.", "input": "", "output": "public class Binary { public static void main(String[] args) { for (int i = 0; i <= 15; i++) { System.out.println(Integer.toBinaryString(i)); } } }"} {"text": "[DE Wikipedia] Slieve Gullion\n\nDer Slieve Gullion (englisch) oder Sliabh gCuillinn (irisch), , ist ein erloschener Vulkan im „Ó Fiaich Country“ im Süden der Grafschaft Armagh in Nordirland. Das Landschaftsschutzgebiet „Slieve Gullion Forest Park“ (Area of Outstanding Natural Beauty – AONB) mit ausgedehnten Heideflächen liegt an den der Sonne zugewandten Berghängen. Um den Berg führt der 57 km lange, markierte „Ring of Gullion Way“. Ein Teilstück dieses Rundwanderweges ist der 13 km lange „Slieve Gullion Walk“, der vom Parkplatz bei Meigh zum Gipfel und zurück zum Parkplatz führt. Sehenswürdigkeiten am Wanderweg Etwas weiter liegt das 1836 von George Papworth (Erbauer der Heuston Bridge und der Malahide Station, beide in Dublin) in „Zuckerbäcker-Gotik“ errichtete Killevy Castle. Nahe der Westflanke liegen der Cairn und Dolmen von Ballykeel An der Ostflanke liegen die Megalithanlagen Clonlum north und south. Weiter nördlich liegen die Kirchen von Killevy Die Steinsäule von Kilnasaggart steht in einer kleinen Einfriedung beim Weiler Jonesborough. Bergan an der Quelle „St. Bline’s Well“ vorbei, geht es zu den aus vulkanischem Material mittlerer Größe errichteten Cairns: die Cairns – der einfachste Weg, sie zu besuchen, ist die Fahrt durch Slieve Gullion Forest Park (offiziell geöffnet nur im Sommer) Bis zum höchsten Punkt, von wo aus ein beschilderter Weg zum Gipfel führt. Nordcairn Der kleinere, nur drei Meter hohe, randsteinlose Nordcairn hat etwa 18 m Durchmesser. Er liegt auf dem 533 m hohen nördlichen Nebengipfel. Bei der im Jahre 1961 erfolgten Ausgrabung wurden innerhalb des Cairns zwei kleine bronzezeitliche, rechteckige Steinkisten entdeckt. Eine enthielt eine Brandbestattung und die Überreste eines dekorierten Gefäßes, die andere war fundleer. Nahe dem Cairn liegt „Calliagh Berra’s Lough“ (der See der Hexe Beara), ein kleiner Kratersee. Südcairn Der Südcairn (lokal als „Calliagh Berra’s House“ bezeichnet) auf dem Gipfel des Slieve Gullion ist das höchstgelegene erhaltene Passage Tomb der Britischen Inseln. Die Anlage hat 30 m Durchmesser und besteht aus einem massiven Cairn, der eine polygonale, beinahe kreuzförmige Kammer (mit deutlich ausgeprägter Kopfnische) ähnlich jenen Nischen der Anlagen von Loughcrew (ein Dolmen mit Seitenkammern) enthält und ist – für Nordirland untypisch – mit den Resten von Randsteinen gefasst ist. Der 4,5 m lange niedrige Gang aus fünf erhaltenen Tragsteinen ist mit vier horizontalen Decksteinen bedeckt, während die teilweise eingestürzte Kammer ein Kraggewölbe besitzt. Bei der im Jahre 1961 erfolgten Ausgrabung wurden im Hauptcairn verbrannte Knochen und Flintstücke gefunden. Eine Ausbuchtung auf der Nordseite ist ein später angefügter kleinerer Rundcairn. Der Südcairn ist der Öffentlichkeit in den Sommermonaten zugänglich. Literatur Alfred E.…"} {"instruction": "Write a python script to sort the given array", "input": "[10, 15, 7, 8, 12]", "output": "arr = [10, 15, 7, 8, 12]\narr.sort()\nprint(arr)"} {"instruction": "Implement an algorithm in Python to sort a list of integers.", "input": "List: [3, 9, 8, 5, 6, 4, 2, 1, 10, 7]", "output": "def sort(arr):\n for i in range(len(arr)):\n min_idx = i\n for j in range(i+1, len(arr)):\n if arr[min_idx] > arr[j]:\n min_idx = j\n arr[i], arr[min_idx] = arr[min_idx], arr[i]\n\nlist = [3, 9, 8, 5, 6, 4, 2, 1, 10, 7]\nsort(list)\nprint(list) # [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"} {"text": "[EN Wikipedia] 1969 Motor Trend 500\n\nThe 1969 Motor Trend 500 was a NASCAR Grand National Series event that was held on February 1, 1969, at Riverside International Raceway in Riverside, California. The transition to purpose-built racecars began in the early 1960s and occurred gradually over that decade. Changes made to the sport by the late 1960s brought an end to the \"strictly stock\" vehicles of the 1950s. The Permatex 200 for sportsman cars was run as a companion event. The winner after a 10 year break from motorsports was Hershel McGriff, 2nd was Ron Grable, followed by Clem Proctor, J.R. Skinner and Vic Irvan, Ron Hornaday Sr. was 6th. Race report One hundred and eighty-six laps were done on a paved road course spanning . Although A. J. Foyt won the pole position with a qualifying speed of , Richard Petty would win the race, beating Foyt by 25 seconds druving a 1969 Ford Torino. This was the first time Petty won a race in any car other than a Plymouth and the first time he ran a Cup race in any car but a Plymouth since he switched to the Mopar brand from Oldsmobile near the end of 1959. More than forty-six thousand fans would watch 44 vehicles start and only 13 finish the race. Most of the DNFs were caused by engine issues. Ford vehicles and Chevrolet vehicles made up most of the starting grid. Other notable drivers included: LeeRoy Yarbrough, Ray Elder, Neil Castles, Mario Andretti (his final start), and Elmo Langley. Al Unser would get his last top-five finish at this event, he wouldn't make another NASCAR Grand National Series start until 1986. Engine reliability was awful during this race, approximately 25% of the racing grid was afflicted with engine failures and mechanical issues. Notable crew chiefs at the race were Harry Hyde, Dale Inman, Glen Wood, and Jake Elder. West Coast racer Marty Kinerk made his top NASCAR Series debut at this event. The entire race was completed under the green flag without any laps being taken for either yellow or red flags; with the final race to go the entire distance without a caution was the 2002 EA Sports 500. Average speeds for the entire race approached and the duration of the race was four hours, forty-five minutes, and thirty-seven seconds. The race's top prize would be $19,650 in American dollars ($ when adjusted for inflation). The overall winnings of this race would be $79,660 in American dollars ($ when adjusted for inflation). While individual owners would make up the majority of the NASCAR teams during this era, multi-car teams like Holman Moody, Wood Brothers Racing, and K&K Insurance Racing began to emerge during the late 1960s and early 1970s. Qualifying Finishing order Section reference: Richard Petty A. J. Foyt David Pearson Al Unser James Hylton LeeRoy Yarbrough* Ray Elder Scott Cain John Sears Harold Hardesty Ray Johnstone…"} {"instruction": "Create a Python function to convert a temperature from Fahrenheit to Celsius.", "input": "", "output": "def fahrenheit_to_celsius(fahrenheit):\n celsius = (fahrenheit - 32) * 5.0/9.0\n return celsius"} {"instruction": "Convert the following equation into a Python program: y = x^2 - 3x + 2", "input": "", "output": "def equation(x):\n return (x**2 - 3*x + 2)"} {"instruction": "You need to write a Python program to convert a decimal number into its binary equivalent.", "input": "num = 8", "output": "def get_binary(num):\n return bin(num)[2:]\n\nres = get_binary(num)\nprint(res)"} {"instruction": "Create a JavaScript function to check if an integer n is a perfect square.", "input": "", "output": "function isPerfectSquare(n) { for (int i = 0; i <= n; i++) { if (i * i == n) { return true; } } return false; }"} {"instruction": "Create a SQL query to retrieve the name, address and contact number of the customers with the highest spending record.", "input": "", "output": "SELECT name, address, contact_number FROM customers ORDER BY spending DESC LIMIT 1;"} {"instruction": "You need to code a program that prints the absolute difference between two numbers.", "input": "15 and 10", "output": "def difference(num1, num2): return abs(num1 - num2)"} {"text": "[CS Wikipedia] Slovenská hokejbalová reprezentace\n\nSlovenská hokejbalová reprezentace je výběrem nejlepších slovenských hráčů v hokejbale. Od roku 1996 se účastní mistrovství světa a do roku 2000 hrálo i mistrovství Evropy. Tým je řízen Slovenskou hokejbalovou únií, která je členem ISBHF. Největším úspěchem slovenského výběru je pět zlatých medailí z mistrovství světa 1999, 2013, 2015, 2017 a 2019. Účast na mistrovství světa Účast na mistrovství Evropy Externí odkazy Oficiální stránky Slovenské hokejbalové únie Hokejbalové reprezentace Hokejbal na Slovensku"} {"instruction": "Write a SQL query to update the value of column b in the table called a.", "input": "Table name: a Columns: a, b Current state of table a: a | b 1 | 10 2 | 11 3 | 12", "output": "UPDATE a SET b = 20 WHERE a = 3;"} {"instruction": "Edit the given HTML so that it renders as a centered, level-two heading.", "input": "

      Heading Text

      ", "output": "

      Heading Text

      "} {"text": "[DE Wikipedia] Gotthardleitung\n\nDie Gotthardleitung ist eine 1958 von Motor-Columbus errichtete Drehstrom-Hochspannungsleitung über den Gotthardpass von Mettlen bei Inwil nach Airolo. Eigentümer der Gotthardleitung ist die schweizerische Netzgesellschaft Swissgrid. Linienführung Auf dem 52 Kilometer langen Abschnitt von Mettlen bis Amsteg verläuft sie meist parallel zur Lukmanierleitung. Zwischen Immensee und Amsteg teilt sie ihre Masten mit der Stromschleife Amsteg–Rotkreuz der Schweizerischen Bundesbahnen (SBB) und ist somit eine Hybridleitung. Beide Energietrassen tangieren von Immensee bis Ingenbohl die Rigi. In der Gemeinde Ingenbohl, die von den CKW beliefert wird, ist die Gotthardleitung mit drei von sechs Stromkreisen an ein Unterwerk angeschlossen. Von Ingenbohl nach Morschach folgt ein Aufstieg, so dass die Gotthard- und die Lukmanierleitung dort verstärkte Masten enthalten. Die beiden Leitungen verlaufen rechts des Vierwaldstättersees bzw. des Urnersees und durchqueren anschliessend das Urner Reusstal. Während sich die Lukmanierleitung meist in der Ebene befindet, führt die Gotthardleitung dem Berghang links der Reuss entlang. Die Gotthardleitung ist dreipolig und führt drei weitere Stromkreise, die im Unterwerk Plattischachen enden. Ab Amsteg geht sie ihren eigenen Weg. Sie ist nicht zu verwechseln mit der vierpoligen Übertragungsleitung der Schweizerischen Bundesbahnen, die ebenfalls den Gotthard passiert. Es kommen 160 Maste zum Einsatz: einige Donaumasten bei Mettlen, Tonnenmasten bis Immensee, dann Tannenbaummasten zugunsten der SBB. Für den 56,8 Kilometer langen Leitungsabschnitt zwischen Amsteg und Lavorgo über den Gotthardpass wurden 171 Gittermasten, grösstenteils Deltamasten mit breitem Fundament, für einen Stromkreis in Einebenenanordnung errichtet. Ihre mittlere Höhe beträgt 24,13 Meter. Zwischen Andermatt und Realp überquert sie das Tal der Furkareuss. Dort erhielten der Blitzableiter und alle Stromkreise auf beiden Seiten je einen eigenen Mast. Diese Massnahme wurde an verschiedenen Stellen getroffen, um die Gefahr, dass sich zwei der Doppeldrähte berühren könnten, was bei der Vorableitung geschah, auf ein Minimum zu reduzieren. Ab 2027 soll die Gotthardleitung zwischen Göschenen und Airolo in einen Betonkanal unter dem Pannenstreifen der noch nicht gebauten zweiten Röhre des Gotthard-Strassentunnels verlegt werden. Konstruktion Die mittlere Spannweite der Leitung beträgt 350 Meter, die grösste Spannweite zwischen zwei Masten 1240 Meter. Als Leiter kommen Zweierbündel aus Aldrey mit einem Querschnitt von 550 mm² zum Einsatz. Der Durchmesser jedes Teilseils beträgt 30,5 mm. Als Erdseil werden zwei Stahlseile mit einem Durchmesser von 11,5 mm und einem Querschnitt von 80 mm² verwendet. Die Gotthardleitung wird, obwohl die verwendeten Freileitungsmaste für…"} {"text": "[HI Wikipedia] बास्किन-रॉबिन्स\n\nबास्किन-रॉबिन्स एक श्रृंखला है आइसक्रीम प्रतिष्ठानों है कि प्रकृति में वैश्विक है, बर्ट Baskin और Irv रॉबिन्स 1953 में स्थापना की। उत्पादित आइसक्रीम में शामिल किया गया है Glendale, कैलिफोर्निया. कंपनी भी आइसक्रीम 5.800 से अधिक स्थानों, जिसमें से 2.800 शाखाओं संयुक्त राज्य अमेरिका में उपलब्ध थे के साथ दुनिया की सबसे बड़ी के एक विशेषज्ञ श्रृंखला है। बास्किन रॉबिन्स दुनिया भर में 30 से अधिक देशों में आइसक्रीम वितरण किया गया है। कंपनी में मुख्यालय है गुआंगज़ौ, मैसाचुसेट्स. सन्दर्भ अमेरिकी कम्पनियाँ"} {"instruction": "Write an HTML page to display a form for user registration.", "input": "", "output": " User Registration Form

      User Registration Form

      "} {"instruction": "Create a SQL statement that changes the value of a column in the \"students\" table.", "input": "student_id = 123 new_score = 90", "output": "UPDATE students SET score = 90 WHERE student_id = 123;"} {"instruction": "Using Python, write a piece of code to convert Celsius temperatures to Fahrenheit.", "input": "Celsius: 20", "output": "Fahrenheit = 68"} {"instruction": "Write a Python class for storing student ID and name", "input": "", "output": "class Student:\n\n def __init__(self, student_id, name):\n self.student_id = student_id\n self.name = name\n \n def get_details(self):\n return self.student_id, self.name"} {"instruction": "Write a Python code to sort the names into ascending order.", "input": "names = [\"Vladimir Putin\",\"Joe Biden\",\"Xi Jinping\"]", "output": "names.sort()"} {"instruction": "Find the largest value in an array of numbers.", "input": "[5, 9, 40, 0.5, 3]", "output": "40"} {"instruction": "Create a CSS style for a div element to have a width of 200px and a height of 50px.", "input": "", "output": "div { width: 200px; height: 50px; }"} {"instruction": "Compute the hamming distance between two strings and print the result.", "input": "String1: 'hello' String2: 'world'", "output": "\"\"\" Compute the hamming distance between two strings and print the result \"\"\" def calc_hamming_distance(str1, str2): # Calculate the hamming distance dist = 0 for i, j in zip(str1, str2): if i != j: dist+=1 # Print the Hamming Distance print('Hamming Distance: ', dist) calc_hamming_distance('hello','world')"} {"instruction": "Convert the HTML code below to its corresponding DOM elements.", "input": "

      Hello, World!

      ", "output": "// Create a `div` element let divElement = document.createElement('div'); // Create a `p` element let pElement = document.createElement('p'); // Add the content to the `p` element pElement.textContent = 'Hello, World!'; // Append the `p` element to the `div` element divElement.appendChild(pElement);"} {"instruction": "Create a Python Exception to handle Nonetype Error.", "input": "", "output": "try: my_list = [1, 2, 3] my_list[3] except TypeError: print(\"Error: Nonetype Found\")"} {"instruction": "Create an artificial neural network in Python to predict the stock price for a given company.", "input": "Historical stock price data for the company.", "output": "import numpy as np \nimport pandas as pd \nimport matplotlib.pyplot as plt \n\nfrom sklearn.preprocessing import MinMaxScaler \nfrom keras.models import Sequential \nfrom keras.layers import LSTM, Dense \n\ndf = pd.read_csv(input_data)\n\n# feature scaling \nsc = MinMaxScaler(feature_range= (0,1)) \ndf_scaled = sc.fit_transform(df) \n\n# split into training and test sets \nx_train, y_train = df_scaled[:train_len, 3], df_scaled[:train_len, 3] \nx_test, y_test = df_scaled[train_len:, 3], df_scaled[train_len:, 3] \n\n# reshape the data \nx_train = np.reshape(x_train, (x_train.shape[0], 1, x_train.shape[1]) \nx_test = np.reshape(x_test, (x_test.shape[0], 1, x_test.shape[1]) \n\n# build model \nmodel = Sequential() \nmodel.add(LSTM(50, return_sequences=True)) \nmodel.add(LSTM(50, return_sequences=False)) \nmodel.add(Dense(1)) \nmodel.compile(loss='mean_squared_error', optimizer='adam') \n\n# fit model \nmodel.fit(x_train, y_train, batch_size=1, epochs=1) \n\n# make prediction \npredicted_stock_price = model.predict(x_test) \npredicted_stock_price = sc.inverse_transform(predicted_stock_price) \n\n# visualize the result \nplt.plot(real_stock_price, color = 'red', label = 'Real Stock Price') \nplt.plot(predicted_stock_price, color = 'blue', label = 'Predicted Stock Price') \nplt.title('Stock Price Prediction') \nplt.xlabel('Time') \nplt.ylabel('Stock Price') \nplt.legend() \nplt.show()"} {"text": "[DE Wikipedia] Willi Ulfig\n\nWilli Ulfig (* 26. November 1910 in Breslau; † 5. Februar 1983 in Regensburg) war ein deutscher Maler und Graphiker. Leben Nach dem Studium an der Breslauer Kunstgewerbeschule (bei Peter Kowalski) und Kunstakademie 1928 bis 1932 verbrachte er ein halbes Jahr als Stipendiat der Kunstakademie in Italien. Nach der Rückkehr verhinderte die politische Situation mit der Machtergreifung der Nationalsozialisten eine künstlerische Etablierung Ulfigs, dessen Frühwerk auf dem damals geächteten Expressionismus fußt. Ulfig arbeitete notgedrungen als Schriftenmaler und Bühnenbildner am Stadttheater Breslau, war als Soldat im Zweiten Weltkrieg in Frankreich stationiert (hier lernte er eine französisch geprägte, elegante Spielart expressionistischer Kunst kennen und schätzen) und schließlich Kriegsgefangener in Böhmen (CSR). 1945 freigelassen, begann er seine eigentliche künstlerische Entfaltung nun in der Freiheit der späteren Bundesrepublik mit der Ankunft in Regensburg (fast das gesamte malerische Werk vor 1945 ist verschollen). 1946 wurde er Mitglied der neu gegründeten Künstlervereinigung Donauwaldgruppe; 1947 bis 1949 hatte er erste Galerie-Ausstellungen, seit Anfang der 1950er Jahre stellte sich zunehmender künstlerischer Erfolg ein, der ihn zum wohl wichtigsten bildenden Künstler Ostbayerns in der zweiten Hälfte des 20. Jahrhunderts machte. Mit Studienreisen nach Italien, Griechenland, Ägypten, Irland, Südfrankreich und Holland schon in den frühen 1960er Jahren erweiterte er nun seine künstlerischen Themenkreise um die Landschaften Europas. Zahlreiche Einzelausstellungen im In- und Ausland, die Mitgliedschaft in der Münchner Künstlergenossenschaft und der Esslinger Künstlergilde zeugen von Ulfigs Wertschätzung. Werk Das künstlerische Schaffen Willi Ulfigs von den Anfängen an der berühmten Breslauer Kunstakademie bis zum reifen Spätstil der 1970er Jahre ist geprägt von der Auseinandersetzung mit den grundlegenden Entwicklungen der Moderne: die deutschen Expressionisten, Kubismus und die Fauves, orphistische Farbtheorien, später Informel und Tachismus wirkten auf eine überaus empfindsame, sensible Künstlernatur ein. Ulfigs ganz kompromisslos eigenständige Bildsprache bezieht sich auf diese Strömungen und verwandelt sie in lyrisch-expressive Empfindungsmalerei, die sanft und melancholisch, freundlich und tiefsinnig mystisch eine innere Welt beschreibt, die erfüllt ist von meditativer Gelassenheit. Wurde Ulfigs Kunst zu Lebzeiten eigentlich immer nur bildimmanent interpretiert, so eröffnet sich seit der Jahrtausendwende zunehmend ein neuer Zugang zum künstlerischen Wollen einer ganzen Generation von Kunstschaffenden, denen Ulfig zugehört, genannt Verschollene Generation: eine aus dem Expressionismus erwachsene, mit realistischen Tendenzen der Neuen Sachlichkeit…"} {"instruction": "Develop a Python generator to generate all prime numbers in range of 0 - 100.", "input": "", "output": "def generate_prime_numbers(n):\n for num in range(2, n):\n prime = True\n for i in range(2, num):\n if num % i == 0:\n prime = False\n break\n if prime:\n yield num\n\nfor prime_number in generate_prime_numbers(100):\n print(prime_number)"} {"instruction": "Design a function to clean binary data (strings) by keeping only printable characters.", "input": "binary_data = b'h\\x9Fl\\x04o'", "output": "def clean_binary_data(binary_data): return ''.join(map(lambda x:chr(x) if 32 <= x <= 126 else '', binary_data))"} {"instruction": "Describe what is a linked list data structure in 10 words or less.", "input": "", "output": "A linear data structure of linked nodes."} {"instruction": "Generate a random 6 character string in Python", "input": "", "output": "import string\nimport random\n\ncharacters = string.ascii_lowercase + string.digits + string.ascii_uppercase\npassword = \"\".join(random.choice(characters) for x in range(6))\nprint(password)"} {"instruction": "Compose a function that takes in two strings and produces an array of characters that are only in the first string.", "input": "stringA = \"abcdefg\" stringB = \"hijklmn\"", "output": "def to_array(strA, strB): output = [] for char in strA: if char not in strB: output.append(char) return output result = to_array(stringA, stringB) print(result)"} {"instruction": "Develop a Python program to optimize the given linear equation using the simplex method.", "input": "Maximise: 2x + 4y\nSubject to:\nx + 2y ≤ 14\n3x – 4y ≤ 18\nx ≥ 0, y ≥ 0", "output": "def simplex(resultMatrix):\n n = len(resultMatrix[0]) - 1\n c = []\n for i in range(n):\n c.append(resultMatrix[0][i])\n \n a = []\n for i in range(1, len(resultMatrix)):\n a.append(resultMatrix[i][:n])\n \n b = []\n for i in range(1, len(resultMatrix)):\n b.append(resultMatrix[i][n])\n\n # Initialize the basic and non-basic variables\n basic_variables = [n + i for i in range(len(b))]\n non_basic_variables = [i for i in range(n)]\n\n iteration_count = 0\n optimal = True\n\n while optimal is True:\n iteration_count += 1\n\n # Compute the coefficient of the objective function\n coef = [-c[i] for i in non_basic_variables]\n\n # Compute the column index of the entering variable\n entering_var = non_basic_variables[coef.index(max(coef))]\n\n # Compute the vector of reduced costs\n red_cost = [b[i]/a[i][entering_var] for i in range(len(b))] \n\n # Compute the leaving variable\n # If any reduced cost is negative, then the current solution is unbounded\n min_red_cost = min(red_cost)\n if min_red_cost <= 0:\n return \"unbounded\"\n\n # Compute the leaving variable\n # If all reduced costs are positive, the solution is optimal and iteration stops\n leaving_var = basic_variables[red_cost.index(min_red_cost)]\n if min_red_cost > 0:\n optimal = False\n break\n\n # Compute the new table\n for i in range(len(b)):\n row = [] \n for j in range(len(c) + 1):\n if j == entering_var:\n row.append(a[i][j])\n elif j == leaving_var:\n row.append(0)\n else:\n row.append(a[i][j] - (a[i][entering_var] * a[i][j])/a[i][entering_var])\n a[i] = row\n\n # Compute the objective function\n obj_func = 0\n for i in range(len(c)):\n obj_func += c[i] * resultMatrix[0][i]\n for i in range(len(b)):\n obj_func += b[i] * resultMatrix[i + 1][-1]\n resultMatrix[0][-1] = obj_func\n\n # Compute the basic and non-basic variables\n basic_variables[red_cost.index(min_red_cost)] = entering_var\n non_basic_variables[coef.index(max(coef))] = leaving_var\n\n print(\"Objective function on the optimal solution: \", resultMatrix[0][-1])\n print(\"Optimal solution: \")\n for i in range(len(b)):\n print(\"x{0} = {1}\".format(basic_variables[i], a[i][-1]))\n\nsimplex([[2, 4], [1, 2, 14], [3, -4, 18]])"} {"instruction": "Write a function to classify a text as positive or negative.", "input": "text = \"This is an amazing product.\"", "output": "def classify_text(text): score = 0 words = text.split(\" \") for word in words: if word in positive_words: score += 1 elif word in negative_words: score -= 1 if score > 0: return \"positive\" elif score == 0: return \"neutral\" else: return \"negative\""} {"instruction": "Generate Python Plotly chart that shows the trend of stock prices over the past 3 years.", "input": "Apple (AAPL) Stock Prices", "output": "import plotly.offline as py\nimport plotly.graph_objs as go\nimport pandas as pd\n\n# Read in the data\ndata = pd.read_csv('AAPL_data.csv')\n\n# Create traces\napple_trace = go.Scatter(\n x = data['date'],\n y = data['close'],\n name = 'Apple'\n)\n\n# Create the layout\nlayout = go.Layout(\n title = 'Apple Stock Price Trends',\n xaxis = dict(\n title = 'Past 3 Years'\n ),\n yaxis = dict(\n title = 'Closing Price ($)'\n )\n)\n\n# Create the figure and plot it\nfig = go.Figure(data = [apple_trace], layout = layout)\npy.plot(fig, filename = 'apple_chart.html')"} {"text": "[HI Wikipedia] राष्ट्रीय खनन शोध संस्थान\n\nराष्ट्रीय खनन शोध संस्थान या इंडियन स्कूल ऑफ माइंस भारत के खनन संबंधी शोध संस्थानों में सबसे प्रमुख है। यह संस्थान नवनिर्मित झारखंड प्रान्त के धनबाद नामक शहर में स्थित है। बहिर्गामी कडीयाँ राष्ट्रीय खनन शोध संस्थान वेबसाइट (अंग्रेज़ी)"} {"instruction": "Write a code to convert a given spredsheet in csv format to json format.", "input": "", "output": "import csv import json def csv_to_json(): # Path of csv file file_csv = 'mycsvfile.csv' # Path of json file file_json = 'myjsonfile.json' with open(file_csv, 'r') as input_file: reader = csv.DictReader(input_file) data = list(reader) with open(file_json, 'w') as output_file: json.dump(data, output_file) csv_to_json()"} {"instruction": "Create a class in Python that checks if a given integer is prime.", "input": "", "output": "class PrimeChecker:\n def __init__(self, number):\n self.number = number\n\n def is_prime(self):\n for i in range(2, self.number // 2):\n if self.number % i == 0:\n return False\n\n return True\n\n# Create an instance of PrimeChecker\nprime_checker = PrimeChecker(7)\n\n# Check if the number is prime\nis_prime = prime_checker.is_prime()\n\nif is_prime:\n print('The number is prime')\nelse:\n print('The number is not prime')"} {"text": "[CS Wikipedia] Civilizační konflikt v Súdánu\n\nStřet civilizací podle Samuela Huntingtona V roce 1993 vyšel vědecký článek Střet civilizací? od amerického profesora politologie Harvardovy univerzity Samuela Huntingtona, který vyvolal rozporuplné reakce. Zatímco většina autorů doby mluvila o usmíření, Huntington hovoří o rozděleném světu a konfliktu. V roce 1996 následovala kniha Střet civilizací: boj kultur a proměna světového řádu, ve které Huntington rozvádí a vysvětluje své předchozí úvahy. Ústředním motivem jsou tzv. civilizace, které mají klíčový vliv na světové uspořádání. Celkem existuje 8 velkých civilizací, které soupeří o nejzákladnější hodnoty a filosofické předpoklady jako náhled na boha, postavení jednotlivce ve společnosti nebo důležitost práv a svobody. Rozdíly v celkovém životním názoru produkují konflikty, a proto Huntington mluví o střetu civilizací. Války na civilizačních zlomech Nejvážnější jsou podle Huntingtona střety na civilizačních hranicích. Tyto války jsou charakterizovány tím, že jsou vleklé a mimořádně násilné. Téměř vždy jsou účastníci lidé vyznávající odlišná náboženství a jejich cílem je většinou dobýt území druhého a zbavit se jeho obyvatel, a to buď vyhnáním nebo i vyvražděním. Války na civilizačních zlomech jde stěží vyřešit příměřím, protože jde o války o základní otázky identity, u níž je nemožné najít kompromis. Pokud už se podaří dosáhnout příměří, tak se jedná pouze o krátkodobý stav. Do civilizačních konfliktů mohou zasahovat aktéři až na třech úrovních. Primární aktéři se přímo účastní bojů. Jsou to ti, kteří bojují o svoji identitu a se svým protějškem mají velmi nevraživý vztah. Dohoda mezi primárními aktéry je přes vzájemné animozity téměř nemožná. Dále se do střetu mohou připojit sekundární aktéři. Jedná se o státy, které mají blízký vztah k primárním aktérům, ať už se jedná o geografickou či politickou proximitu. Nejvyšší úrovní jsou terciární aktéři, kteří jsou napojeni na primární aktéry skrze civilizační vazbu. Terciárními aktéry jsou zpravidla ústřední státy (ústřední stát je stát, který tvoří vůdčí roli uvnitř dané civilizace a je považován za hlavní zdroj její kultury). Vlády sekundárních a terciárních aktérů sice primární účastníky podporují, ale zároveň mají zájem na zastavení bojů zavčas, aby se konflikt nerozšířil a nevtáhl je do něj. Proto se v průběhu střetu snaží sekundární a terciární účastníci vyjednávat se svými protějšky, aby zabránili další eskalaci. Dochází tak k situaci, kdy civilizační konflikty sice vyvěrají zdola od primárních aktérů, ale mír se musí snést shora od sekundárních, spíše až terciárních aktérů. Občanská válka v Súdánu Občanská válka v Súdánu v mnohých ohledech odpovídá Huntingtonově civilizačnímu střetu. Súdánem navíc přímo probíhala hranice mezi islámskou a africkou civilizací, jednalo se tak o válku na…"} {"instruction": "Edit the given code to delete a node from a linked list", "input": "void deleteNode(struct node *node) { struct node *temp = node->next; node->data = temp->data; node->next = temp->next; free(temp); }", "output": "void deleteNode(struct node *node) { struct node *temp = node->next; node->data = temp->data; // Store pointer to the next of node struct node *next_next = temp->next; // Unlink node from linked list free(temp); node->next = next_next; }"} {"instruction": "Develop a program in Python to extract the substring between two given strings", "input": "input_string = \"This is an example string\"\nstart_string = \"an\"\nend_string = \"string\"", "output": "import re\n\ninput_string = \"This is an example string\"\nstart_string = \"an\"\nend_string = \"string\"\n\n regex = re.compile(start_string + '(.*?)' + end_string)\nresult = re.search(regex, input_string) \nif result: \n print(result.group(1))"} {"instruction": "Write a python program to sort a given list of tuples based on its first element in increasing order.", "input": "[(3, 'ape'), (1, 'cat'), (4, 'dog'), (2, 'bee')]", "output": "def sortTuplesByFirstElement(lst):\n lst.sort(key = lambda x: x[0])\n return lst\n\nsortedList = sortTuplesByFirstElement([(3, 'ape'), (1, 'cat'), (4, 'dog'), (2, 'bee')])\nprint(sortedList)"} {"text": "[HI Wikipedia] जम्मू और कश्मीर\n\nजम्मू और कश्मीर (Jammu and Kashmir,J&K) ५ अगस्त २०१९ तक भारत का एक राज्य था जिसे अगस्त २०१९ में द्विभाजित कर जम्मू और कश्मीर एवं लद्दाख नामक दो केंद्र शासित प्रदेश के रूप में स्थापित कर दिया गया। यह राज्य पूर्वतः ब्रिटिश भारत में जम्मू और कश्मीर रियासत नामक शाही रियासत हुआ करता था। इस राज्य का क्षेत्र भारत के विभाजन के बाद से ही भारत, पाकिस्तान और चीन के बीच विवादित रहा है, जिनमे से तीनों ही पूर्व रियासत के विभिन्न हिस्सों पर आज भी नियंत्रण रखते हैं। जम्मू और कश्मीर हिमालय पर्वत शृंखला के सबसे ऊँचे हिस्सों में स्थित है, और इसे अपनी प्राकृतिक सौंदर्य एवं संसाधनों के लिए जाना जाता है। साथ ही जम्मू , कश्मीर और लद्दाख का इलाका अपनी विशिष्ट संस्कृति के लिए जाना जाता है। यहाँ स्थित वैष्णो देवी तथा अमरनाथ की गुफाएँ हिंदुओं के अत्यंत महत्वपूर्ण तीर्थ का केंद्र रहा है। पूर्व जम्मू और कश्मीर रियासत के विभिन्न इलाकों पर अधिकार होने का दावा भारत, पाकिस्तान तथा चीन, तीनो देश करते हैं, जिसमें भारतीय नियंत्रण वाले क्षेत्र को ही जम्मू और कश्मीर कहा जाता है, जिसपर वैध रूप से जम्मू कश्मीर की राजा द्वारा भारतीय संघ के अंतर्गत हस्तांतरित किया गया था। पूर्व रियासत का उत्तरी और पश्चिमी पट्टी पर पाकिस्तान का क़ाबिज़ है एवं रियासत के उत्तरपूर्वी क्षत्र पर चीन का नियंत्रण है, जिसे उसने भारत से १९६२ के युद्ध के बाद कब्ज़ा कर लिया था, इस इलाके को अक्साई चिन कहा जाता है। भारत इन कब्ज़ों को अवैध मानता है। जम्मू नगर जम्मू प्रांत का सबसे बड़ा नगर तथा राज्य की शीतकालीन राजधानी थी, वहीं कश्मीर में स्थित श्रीनगर गर्मी के मौसम में राज्य की राजधानी रहती थी (जो अब केंद्रशासित प्रदेश जम्मू- कश्मीर की है) जम्मू और कश्मीर में जम्मू (पूंछ सहित), कश्मीर, बल्तिस्तान एवं गिलगित के क्षेत्र सम्मिलित थे। इस राज्य का पाकिस्तान अधिकृत भाग को लेकर क्षेत्रफल 2,22,236 वर्ग कि॰मी॰ एवं जो भारत में है उसका क्षेत्रफल 1,38,124 वर्ग कि॰मी॰ था। यहां अधिकांश मुसलमान हैं। जम्मू - कश्मीर के सीमांत क्षेत्र पाकिस्तान, अफगानिस्तान, सिंक्यांग तथा तिब्बत से मिले हुए थे। भारतीय संसद ने 5 अगस्त 2019 को इस राज्य की राजनीतिक स्थिति में भारी बदलाव करते हुए विधानसभा सहित केंद्रशासित प्रदेश बना दिया तथा लद्दाख को भी जम्मू कश्मीर से अलग करके उसे भी अलग केंद्रशासित प्रदेश का दर्जा दिया गया। इतिहास बुर्ज़होम पुरातात्विक स्थल (श्रीनगर के उत्तरपश्चिम में 16 किलोमीटर (9.9 मील) स्थित) में पुरातात्विक उत्खनन ने 3000 ईसा पूर्व और 1000 ईसा पूर्व के बीच सांस्कृतिक महत्व के चार चरणों का खुलासा किया है। अवधि I और II नवपाषाण युग का प्रतिनिधित्व करते हैं; अवधि ईएलआई मेगालिथिक युग (बड़े पैमाने पर पत्थर के मेन्शर और पहिया लाल मिट्टी के बर्तनों में बदल गया); और अवधि IV प्रारंभिक ऐतिहासिक अवधि (उत्तर-महापाषाण काल) से संबंधित है। प्राचीनकाल में कश्मीर (महर्षि कश्यप के नाम पर) हिन्दू और बौद्ध संस्कृतियों का पालना रहा है। मध्ययुग में मुस्लिम आक्रान्ता कश्मीर पर क़ाबिज़ हो गये। कुछ मुसलमान शाह और राज्यपाल हिन्दुओं से अच्छा व्यवहार करते थे 1947 ई. में कश्मीर का विलयन भारत में हुआ। पाकिस्तान अथवा तथाकथित 'आजाद कश्मीर सरकार', जो पाकिस्तान की…"} {"instruction": "Find the frequency of each letter in the given string.", "input": "string = \"banana\"", "output": "freq = {} for i in string: if i in freq: freq[i] += 1 else: freq[i] = 1 # freq is {'b': 1, 'a': 3, 'n': 2}"} {"instruction": "What is the ASCII character for the code “97”?", "input": "", "output": "The ASCII character for the code “97” is 'a'."} {"text": "[EN Wikipedia] Mbwasa language\n\nThe Mbwasa language is a Southern Bantoid language of Cameroon. It is very similar to Ki, and is sometimes considered a dialect of it. References Blench, Roger, 2011. The membership and internal structure of Bantoid and the border with Bantu. Bantu IV, Humboldt University, Berlin. Mbam languages Languages of Cameroon"} {"instruction": "You are given some HTML code, write a function to strip the tags from it.", "input": "", "output": "def strip_tags(string): stripped_str = '' skip = False for i in range(len(string)): if string[i] == '<' and skip == False: skip = True elif string[i] == '>': skip = False elif skip == False: stripped_str += string[i] return stripped_str"} {"instruction": "Construct an XML document using Python which contains the following data.", "input": "Item1, Item2, Item3", "output": "import xml.etree.ElementTree as ET\n\n# creating the root element\ndata = ET.Element('data')\n\nitems = ['Item1', 'Item2', 'Item3']\n\n# loop over items\nfor item in items:\n # creating sub elements\n item_element = ET.SubElement(data, 'item')\n\n # assign the value for the sub elements\n item_element.text = item\n\n# write the XML Tree\ntree = ET.ElementTree(data)\ntree.write('data.xml')"} {"instruction": "Write a python program to parse and print out the name, email, and phone number from a given string.", "input": "John Doe, foobar@example.com, 123-456-7890", "output": "def parse_contact_info(string):\n name = string.split(\", \")[0]\n email = string.split(\", \")[1]\n phone_number = string.split(\", \")[2]\n print(f\"Name: {name} \\nEmail: {email} \\nPhone Number: {phone_number}\")"} {"instruction": "Write a SQL query to select all entries in a given table with a value larger than 100.", "input": "", "output": "SELECT * FROM table WHERE col > 100;"} {"instruction": "Create a Python function that takes in a list of numbers and returns the first occurrence of a prime number.", "input": "[2, 4, 6, 8]", "output": "def findPrime(nums):\n for num in nums:\n if isPrime(num):\n return num\n\ndef isPrime(num):\n if num <= 1:\n return False\n for i in range(2, num):\n if (num % i == 0):\n return False\n return True"} {"text": "[DE Wikipedia] Elbe Holding\n\nDie Elbe Holding GmbH & Co. KG mit Sitz in Bietigheim-Bissingen, Baden-Württemberg, ist ein Familienunternehmen, das Antriebslösungen für den Fahrzeug- und Maschinenbau herstellt. Sie ist die Holding-Gesellschaft der Unternehmen der Elbe Group, welche weltweit über 1100 Mitarbeiter an sieben Standorten in Deutschland, Ungarn, Italien, Brasilien und den USA beschäftigt. Unternehmensdaten Am Hauptsitz in Bietigheim-Bissingen werden Kardan-Gelenkwellen und Doppel-Gelenkwellen für den Serien- und Erstausrüstungsbedarf gefertigt. Ein weiterer Standort befindet sich im unterfränkischen Hofheim. Hier produziert das Unternehmen Kardan-, Präzisions-, Kreuz-, Kugel-Gelenkwellen, Gelenkkreuze sowie An- und Abtriebs-Flansche. Mit insgesamt über 1100 Mitarbeitern an 7 Standorten in Deutschland, Italien, Ungarn, Brasilien und USA sowie 35 Vertriebspartnern beliefert die Unternehmensgruppe weltweit Kunden in den Bereichen Baumaschinen, Landwirtschaft, Nutz- und Sonderfahrzeuge, Militär, Bahn und Anlagenbau. Geschichte Der Unternehmensgründer Gottlob Elbe gründete im Jahr 1919 im schwäbischen Bissingen sein Unternehmen und begann, Dreh- und Frästeile für Auftraggeber aus dem Maschinenbau und der Fahrzeugfertigung herzustellen. Seit 1935 werden auch Kugel- und Kreuzgelenkwellen für den Fahrzeug- und Maschinenbau hergestellt. Im Jahr 1950 begann das Unternehmen Kardan-Gelenkwellen und kleine Doppelgelenkwellen zu produzieren. 1973 wurde die Tochtergesellschaft von ELSO Elbe in Hofheim/Unterfranken gegründet. Der Familienbetrieb internationalisierte sich 1993 und 1994 mit zwei Werken in Italien in den Städten Abbadia Lariana und Grumento Nova sowie einem weiteren Standort in South Haven, USA. 1999 gründete die Elbe Group die Elso Hungária im ungarischen Eger. In 2007 wurde mit dem Erwerb von Anteilen an einem brasilianischen Hersteller die Grundlage für den Aufbau von Elbe do Brasil in Passo do Sobrado geschaffen. 2021 wurden die intelligenten Gelenkwellen mit Elbe Sensing Technology EST für Anwendungen in der Industrie 4.0 im Markt eingeführt. Tätigkeitsgebiet Die Elbe Group liefert weltweit Antriebskomponenten an Hersteller von Fahrzeugen. So kommen die Komponenten z. B. in LKWs, Traktoren, Motorrädern, und auch in den Bereichen Bau, Landwirtschaft, Nutz- und Sonderfahrzeuge, Militär sowie Bahn zum Einsatz. Neben dem Fahrzeugbau finden die Produkte der Elbe Group auch im industriellen Maschinen- und Anlagenbau Anwendung. Produkte Verschiedene Typen von Gelenkwellen (z. B. Kardan-Gelenkwellen, Präzisions-/Kreuz- und Kugel-Gelenkwellen, Doppel-Gelenkwellen), Achs- und Getriebeflansche, Gelenkkreuze, sowie viele Sonderformen. Seit 2021 bietet die Elbe Group sensorische Gelenkwellen Elbe Sensing Technology (EST) für den Maschinen-, Anlagen- und Fahrzeugbau an. Durch die…"} {"text": "[DE Wikipedia] Henrik Freischlader\n\nHenrik Freischlader (* 3. November 1982 in Köln) ist ein deutscher Bluesgitarrist und -sänger. Leben Bereits in früher Kindheit begann Henrik Freischlader, Gitarre und Schlagzeug zu spielen. Darüber hinaus spielt er auch Bass und diverse andere Instrumente, deren Beherrschung er sich autodidaktisch aneignete. Erste Erfolge als Gitarrist und Sänger verzeichnete Henrik Freischlader mit diversen Blues-Bands, darunter Lash und Bluescream, vor allem im Bergischen Land und am Niederrhein. Seine Hauptwirkungsstätte war sein damaliger Wohnort Wuppertal. Der Durchbruch auf nationaler Ebene gelang ihm mit dem im März 2006 bei ZYX Music erschienenen Album The Blues der 2004 gegründeten Henrik Freischlader Band, deren Mitglieder neben ihm Oliver Schmellenkamp am Bass und zunächst Daniel Guthausen, dann Dirk Sengotta und ab 2012 Björn Krüger am Schlagzeug waren. Ende 2014 löste Freischlader die Band nach der Night Train to Budapest Farewell Tour auf – letzte Mitglieder waren Theofilos Fotiadis (Bass), Dirk Sengotta (Schlagzeug) und Moritz Fuhrhop (Hammond-Orgel). 2016 tat er sich mit Alex Grube (Bass) und Carl-Michael Grabinger (Schlagzeug) zusammen und nahm unter dem Namen Henrik Freischlader Trio das Album Openness auf. 2009 gründete Freischlader sein eigenes Musiklabel Cable Car Records, mit dem er nach eigenem Bekunden „seine musikalischen Projekte und Experimente verwirklichen“ will. Seine Studio-Soloalben hat er quasi im Alleingang eingespielt. Auf seinem Album Still Frame Replay wirkt Joe Bonamassa mit. Seit einigen Jahren arbeitet Freischlader als Multiinstrumentalist und Komponist auch mit anderen Künstlern zusammen. Zudem produzierte er vier Alben für die kanadische Künstlerin Layla Zoe sowie zwei für den Saxophonisten und Sänger Tommy Schneller. 2017 gründete er wieder eine neue Henrik Freischlader Band, der außer ihm Moritz Meinschäfer (Schlagzeug), Harrison Larner-Main (Gesang und Gitarre), Armin Alic (Bass), Dániel Szebényi (Keyboard), Marco Zügner (Saxofon), Linda Sutti und Joanne Kasner (beide Gesang) angehören. Zwischenzeitlich haben die beiden Sängerinnen und Larner-Main die Band wieder verlassen. Szebényi wurde zwischenzeitlich durch Roman Babik ersetzt. Mit den verbleibenden Musikern tourte Freischlader durch Deutschland und die umgebenden Länder. Nach zwei Jahren coronabedingter Live-Zwangspause geht die Henrik Freischlader Band 2022 und 2023 wieder als Quartett auf Tournee: Neben Freischlader werden Armin Alic am Bass, Hardy Fischötter am Schlagzeug und Moritz „Mr. Mo“ Fuhrhop an der Hammondorgel auf der Bühne stehen. Freischlader kündigte an: „Es geht wieder mehr Richtung Bluesrock“. Seit 2018 ist er außerdem Gitarrist in der Liveband von Helge Schneider. Dessen Album Partypeople erschien 2019 bei Freischladers Plattenfirma Cable Car…"} {"text": "[EN Wikipedia] Electric Power Systems Research\n\nElectric Power Systems Research is a peer-reviewed scientific journal covering research on new applications of transmission, generation, distribution and uses of electric power. Its current editor-in-chief is Maria Teresa Correia de Barros. According to the Journal Citation Reports, the journal has a 2010 impact factor of 1.396. References External links Power engineering Electric power Elsevier academic journals Electrical and electronic engineering journals Academic journals established in 1977 Monthly journals English-language journals"} {"instruction": "Can you suggest a pure python alternative to declaring a Float32 array with numbers from 0 to 10?", "input": "", "output": "myArray = [float(i) for i in range(0,11)]"} {"instruction": "Write SQL code to insert a row into this table called \"tbl_users\".", "input": "Table Structure: tbl_users user_id (int, primary key) user_name (varchar) user_email (varchar)", "output": "INSERT INTO tbl_users (user_name, user_email) VALUES ('John Doe', 'john@example.com');"} {"instruction": "Describe the steps of creating an application using the Flask framework.", "input": "", "output": "Steps to creating a Flask application include importing the Flask module, creating an instance of Flask, creating an HTML template file, and creating a route for the app that renders the HTML template. The next step is to create a file containing the code to execute on each route; this could include performing a database query, calling a web API, running functions, etc. Once the application has been built, it can be run using a Flask client, such as the flask command line interface."} {"instruction": "Create a webhook in Python to listen to webhook requests.", "input": "", "output": "import time from flask import Flask, request app = Flask(__name__) @app.route('/webhook', methods=['POST']) def webhook(): data = request.get_json() print(data) if __name__ == '__main__': app.run(host='0.0.0.0', port=5000)"} {"instruction": "Design a basic ticket reservation system using Python dictionaries.", "input": "", "output": "# Create a dictionary to store ticket information\ntickets = {}\n\n# Function to book ticket\ndef book_ticket(name, ticket_type, ticket_price):\n\t# Check if the ticket exists\n if ticket_type in tickets:\n tickets[ticket_type]['availability'] -= 1\n tickets[ticket_type]['ticket_holders'].append(name)\n else:\n tickets[ticket_type] = {\n 'availability': 10 - 1,\n 'price': ticket_price,\n 'ticket_holders': [name]\n }\n\n# Function to cancel ticket\ndef cancel_ticket(name, ticket_type): \n if ticket_type in tickets:\n tickets[ticket_type]['availability'] += 1\n tickets[ticket_type]['ticket_holders'].remove(name)"} {"instruction": "Implement k-means clustering algorithm in python.", "input": "Not applicable", "output": "#import necessary libraries\nimport pandas as pd\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\n#get data \nurl = 'https://raw.githubusercontent.com/krishnaik06/KNN-K-means/master/Dataset/dataset.csv'\ndata = pd.read_csv(url,header=None).values\n\n#apply K-means algorithm \nk=3\nx = data[:,0]\ny = data[:,1]\n\n\n#generate random centroid \nC_x = np.random.randint(0, np.max(x), size=k)\nC_y = np.random.randint(0, np.max(y), size=k)\n\nC = np.array(list(zip(C_x, C_y)), dtype=np.float32)\nprint book\n\n#plot initial centroid \nfig, ax = plt.subplots(figsize = (5,5))\nax.scatter(x, y, marker='o', c='#f0f0f0', s=7)\nax.scatter(C_x, C_y, marker='*', s=300, c='g')\n\n#calculate euclidean distance between datapoints and centroid \ndist = np.zeros(K)\nfor i in range(K):\n dist[i] = np.sqrt(np.power(x-C_x[i],2) + np.power(y-C_y[i],2))\n\n# find the cluster center \nclusters = np.zeros(len(x))\nfor i in range(len(x)):\n clusters[i] = np.argmin(dist[i])\n\n# plot cluster center\nx1 = x[clusters==0]\ny1 = y[clusters==0]\nx2 = x[clusters==1]\ny2 = y[clusters==1]\nx3 = x[clusters==2]\ny3 = y[clusters==2]\nfig, ax = plt.subplots(figsize = (5,5))\nax.scatter(x1, y1, marker='o', c='r', s=7)\nax.scatter(x2, y2, marker='o', c='b', s=7)\nax.scatter(x3, y3, marker='o', c='y', s=7)\nax.scatter(C_x, C_y, marker='*', s=300, c='g')\n\n#update the centroid \nfor i in range(K):\n points = [X[j] for j in range(len(X)) if clusters[j] == i]\n C_x[i] = np.mean(points[0])\n C_y[i] = np.mean(points[1])\n\nC = np.array(list(zip(C_x, C_y)), dtype=np.float32)"} {"instruction": "Design a genetic algorithm in Python to maximize the value of a given function.", "input": "f(x) = x^2 - 4x + 3", "output": "import random\n\n# function to calculate the value of a function\ndef func(x): \n return x**2 - 4*x + 3\n\n# population size\npop_size = 50\n\n# range of initial values of x\nx_range = [-20, 20]\n\n# mutation rate\nmutation_rate = 0.02\n\n# maximum generation allowed\nmax_generation = 100\n\n# function to generate a random population\ndef initial_population(pop_size, x_range):\n population = []\n for _ in range(pop_size): \n x = random.randint(*x_range)\n population.append(x)\n return population\n\n# function to calculate the current fitness of a given population\ndef calculate_fitness(population): \n fitness = []\n for x in population:\n fx = func(x)\n fitness.append(fx)\n return fitness\n\n# function to evolve the population to the next generation\ndef evolve_population(population, mutation_rate): \n population_fitness = calculate_fitness(population)\n idx_max_fit = population_fitness.index(max(population_fitness))\n\n new_population = []\n for idx, x in enumerate(population):\n if idx == idx_max_fit: \n new_population.append(x)\n else:\n mutation_chance = random.random()\n if mutation_chance <= mutation_rate: \n new_x = x + random.randint(-1, 1)\n new_population.append(new_x)\n else: \n new_population.append(x)\n return new_population\n\n# generate the population\npopulation = initial_population(pop_size, x_range)\n\n# main loop of the genetic algorithm\nfor i in range(max_generation):\n population = evolve_population(population, mutation_rate)\n\n# obtain the fittest solution\npopulation_fitness = calculate_fitness(population)\nidx_max_fit = population_fitness.index(max(population_fitness))\nmax_fitness_solution = population[idx_max_fit]\n\n# print out the fittest solution\nprint(\"Max fitness: \", max(population_fitness))\nprint(\"Max fitness solution: \", max_fitness_solution)"} {"instruction": "Create an object in JavaScript named 'user' with the following attributes: name, age, and gender.", "input": "", "output": "let user = { name: \"\", age: 0, gender: \"\" };"} {"text": "[CS Wikipedia] Salar de Olaroz (lithiový důl)\n\nSalar de Olaroz je povrchový důl na lithium, který se nachází ve stejnojmenné solné laguně v departamentu Susques provincie Jujuy na severozápadě Argentiny. Solné jezero Olaroz je zároveň - podobně, jako některé další solné laguny v Argentině, Bolívii a Chile - zdrojem lithia a uhličitanu draselného (potaše), jež jsou zde těženy. Těžba Salar de Olaroz je prezentován jako vlajkový projekt nadnárodní společnosti Orocobre Ltd., sídlící v australském Brisbane. Projekt byl realizovaný od roku 2012 pod názvem Olaroz Lithium Facility společně s japonskou firmou Toyota Tsusho Corporation (TTC) a ve spolupráci s argentinskou vládou prostřednictvím dohody se společností Jujuy Energia y Mineria Sociedad del Estado (JEMSE), která je těžební a investiční společností jujuyské provincie. Studie, publikovaná v roce 2011, hovoří o 1 752 miliónech krychlových metrů solanky v laguně Olaroz. Podle uvedené studie, zpracované na základě předchozích průzkumu a testů, 1 litr této solanky obsahuje 690 miligramů lihia, 5730 mg potaše a 1 050 mg boru. Lithium a další suroviny jsou získávány ze solanky postupným odpařování a posléze dalšími procesy. První lithium, vytěžené ze solného jezera Olaroz, bylo dodáno odběratelům na počátku roku 2015.V roce 2016 byla plánována roční produkce 17,500 tuny uhličitanu lithého v nejvyšší kvalitě (battery grade = >99.5% ) a 25,000 tuny Li2CO3 v průmyslové kvalitě (>99 %). Těžba lithia v této lokalitě je považována za velmi perspektivní s výhledem na více než čtyři desetiletí. Odkazy Reference Související články Salar de Atacama Salar de Uyuni Externí odkazy Prezentace ekonomických výsledků společnosti Orocobre k 31. 12. 2017 (video - anglicky) Geologie Argentiny Lithiové doly v Argentině Stavby v Jujuy"} {"instruction": "Construct a Python code to find the maximum in a given list.", "input": "[10, 3, 16, 17, 8]", "output": "def find_max(list): \n max = list[0] \n for i in list: \n if i > max: \n max = i \n return max \n \nlist = [10, 3, 16, 17, 8]\nprint(\"Maximum number in the list:\", find_max(list))"} {"instruction": "This code defines a Python class for controlling an Andor3 camera. To use it, import the necessary modules and create an instance of the Andor3 class. Then, call the appropriate methods to control the camera's settings and acquire images.", "input": "", "output": "############################################################################\n# This file is part of LImA, a Library for Image Acquisition\n#\n# Copyright (C) : 2009-2014\n# European Synchrotron Radiation Facility\n# BP 220, Grenoble 38043\n# FRANCE\n#\n# This is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 3 of the License, or\n# (at your option) any later version.\n#\n# This software is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, see .\n############################################################################\n#=============================================================================\n#\n# file : Andor3.py\n#\n# description : Python source for the Andor3 and its commands. \n# The class is derived from Device. It represents the\n# CORBA servant object which will be accessed from the\n# network. All commands which can be executed on the\n# Pilatus are implemented in this file.\n#\n# project : TANGO Device Server\n#\n# copyleft : European Synchrotron Radiation Facility\n# BP 220, Grenoble 38043\n# FRANCE\n#\n#=============================================================================\n# (c) - Bliss - ESRF\n#=============================================================================\n#\nimport PyTango\nimport sys, types, os, time\n\nfrom Lima import Core\nfrom Lima import Andor3 as Andor3Module\n# import some useful helpers to create direct mapping between tango attributes\n# and Lima interfaces.\nfrom Lima.Server import AttrHelper\n\nclass Andor3(PyTango.Device_4Impl):\n\n Core.DEB_CLASS(Core.DebModApplication, 'LimaCCDs')\n \n#==================================================================\n# Andor3 Class Description:\n#\n#\n#==================================================================\n\nclass Andor3(PyTango.Device_4Impl):\n\n#--------- Add you global variables here --------------------------\n Core.DEB_CLASS(Core.DebModApplication, 'LimaCCDs')\n\n#------------------------------------------------------------------\n# Device constructor\n#-"} {"instruction": "Given the below data, find the sum of all the numbers in the array.", "input": "data = [5, 15, 7, 20]", "output": "Sum = 47"} {"instruction": "Describe the effects when sorting a list using bubble sort", "input": "", "output": "Bubble sort works by comparing adjacent elements of the list and swapping them if they are out of order. It passes through the list multiple times, with each pass through the list moving the highest value elements to their correct position. This process continues until the list is fully sorted."} {"instruction": "Write a function in Python to generate a random alphanumeric string with a length of 5 characters.", "input": "", "output": "import random import string def generate_random_str(): letters = string.ascii_letters + string.digits return ''.join(random.choice(letters) for i in range(5))"} {"instruction": "Create a function in Python that calculates the sum of all even numbers in a given list", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "def sum_evens(nums):\n total = 0\n for num in nums:\n if num % 2 == 0:\n total += num\n return total\n\na = [1, 2, 3, 4, 5, 6, 7, 8, 9]\nprint(sum_evens(a)) # 20"} {"instruction": "Develop a Python program to find the sum of first n even numbers.", "input": "7", "output": "def find_sum(n):\n    sum = 0\n    for i in range(1, n+1):\n        if i % 2 == 0:\n            sum += i\n    return sum\n\nn = 7\nprint(\"The sum of first n even numbers is:\", find_sum(n))"} {"instruction": "Create a Python dictionary that includes the keys \"name\", \"age\", and \"location\", and set the values to your name, age, and location.", "input": "", "output": "my_dict = { \"name\": \"John Smith\", \"age\": 28, \"location\": \"New York\" }"} {"text": "[EN Wikipedia] 1965–66 Norwegian 1. Divisjon season\n\nThe 1965–66 Norwegian 1. Divisjon season was the 27th season of ice hockey in Norway. Six teams participated in the league, and Valerenga Ishockey won the championship. Regular season External links Season on eliteprospects.com Nor Eliteserien (ice hockey) seasons 1965 in Norwegian sport 1966 in Norwegian sport"} {"instruction": "Design and write a Python program to extract all public email addresses from a given string", "input": "\"My email is john@example.com and yours is john@gmail.com.\"", "output": "import re\n\ndef extract_emails(text):\n emails = re.findall(r\"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+\", text)\n return emails\n\nextracted_emails = extract_emails(\"My email is john@example.com and yours is john@gmail.com\")\nprint(extracted_emails)"} {"instruction": "Describe the role of the constructors in a Java class.", "input": "", "output": "The role of the constructors in a Java class is to initialize the fields of an object. A constructor is a special method that is called when an object is instantiated. Constructors typically have the same name as the class and take in parameters. The parameters are used to initialize the fields of the object. Constructors are important because they allow us to create uniform objects with a well-defined state. Constructors can also be used to set up desired behaviors on objects and to make sure they are initialized properly."} {"instruction": "Create a function called `convert_csv_to_json` to convert the following csv to the corresponding JSON formatt.", "input": "city,country,latitude,longitude Frankfurt,Germany,50.1117,8.6785 London,UK,51.4667,-0.25", "output": "import json def convert_csv_to_json(csv_string): lines = csv_string.split(\"\\n\") keys = lines[0].split(\",\") out_list = [] for line_num in range(1, len(lines)): line = lines[line_num] values = line.split(\",\") item = {} for key_num in range(0, len(keys)): key = keys[key_num] val = values[key_num] item[key] = val out_list.append(item) return json.dumps(out_list)"} {"instruction": "Query all values from the table \"users\" in a MySQL database and sort them by descending order of the column \"age\".", "input": "", "output": "SELECT * FROM users ORDER BY age DESC;"} {"text": "[EN Wikipedia] 1956 World Professional Match-play Championship\n\nThe 1956 World Professional Match-play Championship was a snooker tournament that took place from 9 January to 10 March 1956 with the final being held at the Tower Circus in Blackpool, England from 5 to 10 March. Fred Davis won his eighth and last world snooker title by defeating John Pulman by 38 to 35 in the final. Pulman led 31–29 going into the last day of the final on 10 March, but Davis won 8 of the first 10 frames on that day to take a winning lead of 37–33. The event, organised by the Professional Billiards Players' Association, is now recognised as an edition of the World Snooker Championship. There were four participants. Rex Williams made the highest break of the tournament with 141, a championship record, in frame 48 of his semi-final match against Fred Davis in Aston. Pulman defeated Jackie Rea in the other semi-final, which was held in Belfast. Background The World Snooker Championship is a professional tournament and the official world championship of the game of snooker. The sport was developed in the late 19th century by British Army soldiers stationed in India. Professional English billiards player and billiard hall manager Joe Davis noticed the increasing popularity of snooker compared to billiards in the 1920s, and with Birmingham-based billiards equipment manager Bill Camkin, persuaded the Billiards Association and Control Council (BACC) to recognise an official professional snooker championship in the 1926–27 season. In 1927, the final of the first professional snooker championship was held at Camkin's Hall; Davis won the tournament by beating Tom Dennis in the final. The annual competition was not titled the World Championship until 1935, but the 1927 tournament is now referred to as the first World Snooker Championship. Davis also won the title each year until 1940, when the contest was cancelled during World War II, and again when the championship resumed in 1946, accumulating a total of 15 titles before retiring from the event. In 1952, the World Professional Match-play Championship was created following a dispute between the Professional Billiards Players' Association (PBPA) and the BACC. In response to player complaints that the BACC was taking too large a percentage of income from the tournament, the BACC claimed that the championship \"has always been, and in theory is to be, regarded as an affair of honour and a test of merit\", and that \"every effort is made to arrange terms advantageous to the professionals competing in the championship, compatible with securing an equitable return for the promoters of it, the B.A.& C.C.\" The PBPA members established an alternative competition which became known as the World Professional Match-play Championship, now recognised as world championships. There were four entrants for the…"} {"text": "[HI Wikipedia] मुक्त शिक्षा\n\nमुक्त शिक्षा (Open education) से मतलब उन शैक्षिक संस्थानों से है जो प्रवेश से सम्बन्धित अवरोधों को समाप्त करने के पक्ष में है। उदाहरण के लिए, हो सकता है कि ऐसे संस्थानों में प्रवेश के लिए कोई भी शैक्षिक योग्यता आवश्यक न हो। इन्हें भी देखें राष्ट्रीय मुक्त विद्यालयी शिक्षा संस्थान मुक्त विश्वविद्यालय दूरस्थ शिक्षा मुक्त अधिगम (ओपेन लर्निंग) बाहरी कड़ियाँ The Open Textbooks Statement of Intent Connexions - Sharing Knowledge and Building Communities Open Learning Initiative Open and free courses from Carnegie Mellon University openSpace- Free specialist Art, Design, Media & Performance courses Open Education from University College Falmouth Wikiversity WikiEducator Free Elearning Content शिक्षा"} {"instruction": "Design a function in Python that takes a positive integer and finds its prime factors.", "input": "", "output": "def prime_factors(num):\n factors = []\n n = 2\n while n * n <= num:\n if num % n == 0:\n factors.append(n)\n num //= n\n else:\n n += 1\n if num > 1:\n factors.append(num)\n\n return factors"} {"instruction": "Generate a JavaScript code that prints all the numbers from 1 to 30.", "input": "", "output": "for(let i=1; i<=30; i++){ console.log(i); }"} {"instruction": "Extract the strings that match the following regex pattern from a text block", "input": "text block = “hotel #9888, school #9876, airport #987” regex pattern = #[0-9]{4}", "output": "['#9888', '#9876', '#987']"} {"text": "[HI Wikipedia] पुरी\n\nपुरी (Puri) भारत के ओड़िशा राज्य के पुरी ज़िले में बंगाल की खाड़ी से तटस्थ एक नगर है। यह ज़िले का मुख्यालय भी है। पुरी भारत के चार धाम में से एक है और यहाँ 12वीं शताब्दी के जगन्नाथ मंदिर स्थित होने के कारण इसे श्री जगन्नाथ धाम भी कहा जाता है। विवरण भारत के चार पवित्रतम स्थानों में से एक है पुरी, जहाँ समुद्र इस शहर के पांव धोती है। कहा जाता है कि यदि कोई व्यक्ति यहां तीन दिन और तीन रात ठहर जाए तो वह जीवन-मरण के चक्कर से मुक्ति पा लेता है। पुरी, भगवान जगन्नाथ (संपूर्ण विश्व के भगवान), सुभद्रा और बलभद्र की पवित्र नगरी है, हिंदुओं के पवित्र चार धामों में से एक पुरी संभवत: एक ऐसा स्थान है जहां समुद्र के आनंद के साथ-साथ यहां के धार्मिक तटों और 'दर्शन' की धार्मिक भावना के साथ कुछ धार्मिक स्थलों का आनंद भी लिया जा सकता है। पुरी एक ऐसा स्थान है जिसे हजारों वर्षों से कई नामों - नीलगिरी, नीलाद्रि, नीलाचल, पुरुषोत्तम, शंखक्षेत्र, श्रीक्षेत्र, जगन्नाथ धाम, जगन्नाथ पुरी - से जाना जाता है। पुरी में दो महाशक्तियों का प्रभुत्व है, एक भगवान द्वारा सृजित है और दूसरी मनुष्य द्वारा सृजित है। पुरी मूलरूप से भील शासकों द्वारा शासित क्षेत्र था , सरदार विश्वासु भील जिन्हें , सदियों पहले भगवान जगन्नाथ जी की मूर्ति प्राप्त हुई थी। स्मारक एवं दर्शनीय स्थल जगन्नाथ मंदिर यह 65 मी. ऊंचा मंदिर पुरी के सबसे शानदार स्मारकों में से एक है। इस मंदिर का निर्माण 12वीं शताब्दी में चोड़गंग ने अपनी राजधानी को दक्षिणी उड़ीसा से मध्य उड़ीसा में स्थानांतरित करने की खुशी में करवाया था। यह मंदिर नीलगिरी पहाड़ी के आंगन में बना है। चारों ओर से 20 मी. ऊंची दीवार से घिरे इस मंदिर में कई छोट-छोटे मंदिर बने हैं। मंदिर के शेष भाग में पारंपरिक तरीके से बना सहन, गुफा, पूजा-कक्ष और नृत्य के लिए बना खंबों वाला एक हॉल है। इस मंदिर के विषय में वास्तव में यह एक आश्चर्यजनक सत्य है कि यहां जाति को लेकर कभी भी मतभेद नहीं रहे हैं। सड़क के एक छोर पर गुंडिचा मंदिर के साथ ही भगवान जगन्नाथ का ग्रीष्मकालीन मंदिर है। यह मंदिर ग्रांड रोड के अंत में चार दीवारी के भीतर एक बाग में बना है। यहां एक सप्ताह के लिए मूर्ति को एक साधारण सिंहासन पर विराजमान कराया जाता है। भुवनेश्वर में लिंगराज मंदिर की भांति इस मंदिर में भी गैर-हिंदुओं का प्रवेश वर्जित है। उन्हें मंदिर परिसर के बाहर से ही दर्शन करने पड़ते हैं। यहां बड़ा प्रसाद भंडार है। बालीघई बीच पुरी से 8 कि॰मी॰ दूर नुआनई नदी के मुहाने पर बालीघई बीच, एक प्रसिद्ध पिकनिक-स्पॉट है, यह चारों ओर कॉसरीना पेड़ों से घिरा है। सत्यवादी (साक्षीगोपाल) - भगवान साक्षीगोपाल का मंदिर पुरी से केवल 20 कि॰मी॰ की दूरी पर है। केवल 'अनTला नवमी' के दिन यहां श्री राधा जी के पवित्र पैरों के दर्शन किए जा सकते हैं। बड़ा डांडा यहाँ का शॉपिंग का एक आदर्श स्थान है। पर्व हिन्दू नव वर्ष हिन्दू नव वर्ष की खुशी में यहां चंदन यात्रा निकाली की जाती है। जून माह की पूर्णिमासी (ज्येष्ठ) को यहां स्नान यात्रा का आयोजन किया जाता है, जिसमें भगवान जगन्नाथ को विधि-विधान से स्नान कराया जाता है। इस दौरान जनता मूल मूर्तियों के दर्शन करती है। झुला यात्रा के दौरान विशाल शोभा यात्रा के रूप में 21 दिनों के लिए मूर्तियों के…"} {"instruction": "Generate a valid regular expression to catch URLs in strings.", "input": "", "output": "r\"(https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|www\\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9]+\\.[^\\s]{2,}|www\\.[a-zA-Z0-9]+\\.[^\\s]{2,})\""} {"instruction": "Develop a function in Python that takes in a list and sorts the elements alphabetically.", "input": "my_list = [\"word\", \"translate\", \"language\", \"computer\"]", "output": "def sort_list(my_list):\n my_list.sort()\n return my_list \n\nprint(sort_list(my_list))"} {"instruction": "Given two lists, write a Python program to return a list that contains the elements from both the lists, except for the elements that are duplicated.", "input": "List1: [1,2,3,4,5] \nList2: [4,5,6,7,8]", "output": "new_list = [1,2,3,6,7,8]"} {"instruction": "Write a CSS code to make all h2 headings bold and red.", "input": "", "output": "h2 { font-weight: bold; color: red; }"} {"instruction": "Write a snippet of code for looping over a list of numbers.", "input": "myList = [1, 2, 3, 4]", "output": "for x in myList: print(x)"} {"text": "[HI Wikipedia] अवधी\n\nअवधी हिंदी क्षेत्र की एक उपभाषा है। यह उत्तर प्रदेश के \"अवध क्षेत्र\" (लखनऊ, रायबरेली, सुल्तानपुर, बाराबंकी, उन्नाव, हरदोई, सीतापुर, लखीमपुर, अयोध्या, जौनपुर, प्रतापगढ़, प्रयागराज, कौशाम्बी, अम्बेडकर नगर, गोंडा,बस्ती, बहराइच,बलरामपुर, सिद्धार्थनगर, श्रावस्ती तथा फतेहपुर) में बोली जाती है। इसके अतिरिक्त इसकी एक शाखा बघेलखंड में बघेली नाम से प्रचलित है। 'अवध' शब्द की व्युत्पत्ति \"अयोध्या\" से है। इस नाम का एक सूबा के राज्यकाल में था। तुलसीदास ने अपने \"मानस\" में अयोध्या को 'अवधपुरी' कहा है। इसी क्षेत्र का पुराना नाम 'कोसल' भी था जिसकी महत्ता प्राचीन काल से चली आ रही है। भाषा शास्त्री डॉ॰ सर \"जार्ज अब्राहम ग्रियर्सन\" के भाषा सर्वेक्षण के अनुसार अवधी बोलने वालों की कुल आबादी 1615458 थी जो सन् 1971 की जनगणना में 28399552 हो गई। मौजूदा समय में शोधकर्ताओं का अनुमान है कि 6 करोड़ से ज्यादा लोग अवधी बोलते हैं। भारत के उत्तर प्रदेश प्रान्त के 19 जिलों- सुल्तानपुर, अमेठी, बाराबंकी, प्रतापगढ़, प्रयागराज, कौशांबी, फतेहपुर, रायबरेली, उन्नाव, लखनऊ, हरदोई, सीतापुर, लखीमपुर खीरी, बहराइच, श्रावस्ती, बलरामपुर, गोंडा, अयोध्या व अंबेडकर नगर में पूरी तरह से यह बोली जाती है। जबकि 7 जिलों- जौनपुर, मिर्जापुर, कानपुर, शाहजहांपुर, आजमगढ़,सिद्धार्थनगर, बस्ती और बांदा के कुछ क्षेत्रों में इसका प्रयोग होता है। बिहार प्रांत के 2 जिलों के साथ पड़ोसी देश नेपाल के कई जिलों - बांके जिला, बर्दिया जिला, दांग जिला, कपिलवस्तु जिला, पश्चिमी नवलपरासी जिला, रुपन्देही जिला, कंचनपुर जिला आदि में यह काफी प्रचलित है। इसी प्रकार दुनिया के अन्य देशों- मॉरिशस, त्रिनिदाद एवं टुबैगो, फिजी, गयाना, सूरीनाम सहित आस्ट्रेलिया, न्यूजीलैंड व हॉलैंड (नीदरलैंड) में भी लाखों की संख्या में अवधी बोलने वाले लोग हैं। अवधी भाषी क्षेत्र का भौगोलिक विस्तार अवधी प्रमुख रूप से भारत, नेपाल और फिजी में बोली जाती है। भारत में अवधी मुख्यतः उत्तर प्रदेश राज्य में बोली जाती है। मध्य प्रदेश, छत्तीसगढ़ और बिहार के कुछ जिलों में बोली जाती है। उत्तर प्रदेश के अवधी भाषी जिले: अमेठी, प्रतापगढ़, सुल्तानपुर, रायबरेली, प्रयागराज, कौशांबी, अम्बेडकर नगर, सिद्धार्थ नगर, गोंडा, बलरामपुर, बाराबंकी, अयोध्या, लखनऊ, हरदोई, सीतापुर, लखीमपुर खीरी, बहराइच, बस्ती एवं फतेहपुर। नेपाल के अवधी भाषी जिले कपिलवस्तु, बर्दिया, डांग, रूपनदेही, नवलपरासी, कंचनपुर, बांके आदि तराई नेपाल के जिले। इसी प्रकार दुनिया के अन्य देशों- मॉरिशस, त्रिनिदाद एवं टुबैगो, फिजी, गयाना, सूरीनाम सहित आस्ट्रेलिया, न्यूजीलैंड व हॉलैंड (नीदरलैंड) में भी लाखों की संख्या में अवधी बोलने वाले लोग हैं। परिचय गठन की दृष्टि से हिंदी क्षेत्र की उपभाषाओं को दो वर्गों-पश्चिमी और पूर्वी में विभाजित किया जाता है। अवधी पूर्वी के अंतर्गत है। पूर्वी की दूसरी उपभाषा छत्तीसगढ़ी है। अवधी को कभी-कभी बैसवाड़ी भी कहते हैं। परंतु बैसवाड़ी अवधी की एक बोली मात्र है जो उन्नाव, लखनऊ, रायबरेली,फतेहपुर और सिंगरौली जिले के कुछ भागों में बोली जाती है। तुलसीदास कृत रामचरितमानस एवं मलिक मुहम्मद जायसी कृत पद्मावत सहित कई प्रमुख ग्रंथ इसी बोली की देन है। इसका केन्द्र अयोध्या है। अयोध्या लखनऊ से १२० किमी की दूरी पर…"} {"instruction": "Write a function to create a retail price tag given a cost, taxes and discounts.", "input": "cost = 5 tax = 0.08 discount = 0.2", "output": "def price_tag(cost, tax, discount): tax_amount = cost * tax discounted_price = cost + tax_amount - (discount * cost) return \"Retail Price: $\" + str(round(discounted_price, 2)) price_tag(cost, tax, discount) # returns \"Retail Price: $7.20\""} {"instruction": "Create a Swift code that show the number of days in the given month.", "input": "int month = 5", "output": "let month = 5 let daysEndingInth = [3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3] let daysInMonth = daysEndingInth[month - 1] print(\"The number of days in the month of \\(month) is \\(daysInMonth).\")"} {"instruction": "Generate a regular expression that matches strings containing any number of digits, but does not contain any non-digit character.", "input": "", "output": "^[0-9]+$"} {"text": "[EN Wikipedia] 1863 in Denmark\n\nEvents from the year 1863 in Denmark. Incumbents Monarch – Frederick VII (until 15 November), Christian IX Prime minister – Carl Christian Hall (until 31 December), Ditlev Gothard Monrad Events 6 June Frederick VII receives a Greek deputation at Christiansborg. 22 October – The first tramway in Copenhagen begins operations. The Horse-drawn tram cars run along a single track between Sankt Annæ Plads and Frederiksberg Runddel. 15 November – With Christian IX's accent to the Danish throne, the House of Glücksburg succeeded the House of Oldenburg. Christian IX signs the so-called November Constitution establishing a shared law of succession and a common parliament for both Schleswig and Denmark. This is seen by the German Confederation as a violation of the 1852 London Protocol. 24 December – Saxon and Hanoverian troops marched into Holstein on behalf of the Confederation. Supported by the German soldiers and by loyal Holsteiners, Frederick VIII, Duke of Schleswig-Holstein took control of the government of Holstein. Births JanuaryMarch 12 March Carl Holsøe, painter (died 1935) AprilJune 22 April Karl Hansen Reistrup, sculptor, illustrator and ceramist. (died 1929) 25 April – Carl Wentorf, painter (died 1914) 5 May Ole Olsen, filmmaker and Nordisk Film-founder (died 1943) 21 June – Anne Marie Carl-Nielsen, sculptor (died 1945) 25 June – Frederik Jensen, stage and film actor (died 1934) JulySeptember 5 July Anton Carl Illum, businessman (died 1938) 23 July Thomas Ebert, rower 1 September Aage Giødesen, painter (died 1939) 7 September – Jens Ferdinand Willumsen, painter (died 1958) OctoberDecember 5 October Louise Janssen, operatic soprano (died 1938 in France) 11 October – Ingeborg Raunkiær, author (died 1921) Deaths 2 May Hans Ditmar Frederik Feddersen, civil servant and politician (died 1805) 17 June – Ferdinand, Hereditary Prince of Denmark (born 1792) 15 November – Frederick VII, king of Denmark (born 1808) References 1860s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Write a Python program to find the first non-repeated character of a given string.", "input": "string = \"teststring\"", "output": "def first_non_repeated_char(string):\n for ch in string:\n if string.count(ch) == 1:\n return ch"} {"instruction": "Generate an array of random integers between 1 and 50 inclusive.", "input": "", "output": "let randomIntegersArray = []; for (let i = 0; i < 50; i++) { randomIntegersArray.push(Math.floor(Math.random() * (50 - 1 + 1)) + 1); }"} {"instruction": "Suggest a completion for the following python code to randomly select an element from a given list.", "input": "import random\n\ndef random_element(lst):", "output": "import random\n\ndef random_element(lst):\n return random.choice(lst)"} {"instruction": "Suggest an API endpoint in Ruby on Rails for creating a new blog post.", "input": "", "output": "post \"/posts\" do post = Post.new(params[:post]) if post.save status 202 json post.to_json else status 400 json post.errors end end"} {"instruction": "Write a Python program to randomly generate a 5x5 matrix of integers between 1 and 10, and then find the sum of each row of the matrix.", "input": "Not applicable", "output": "import random\n\n# Create a 5x5 matrix of random integers between 1-10\nmatrix = [[ random.randint(1,10) for _ in range(5)] for _ in range(5)]\n\n# Print the matrix\nfor row in matrix:\n print(row)\n\n# Find the sum of each row\nrow_sums = [sum(row) for row in matrix]\n\n# Print the row sums\nprint(row_sums)"} {"instruction": "Create a Python module that utilizes machine learning to predict the selling price of an item from its description.", "input": "{\n “description”: “Gently used Apple iPhone 8 Plus, 64GB, unlocked. Great condition!”\n}", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\n\n# Create data frame from input\ndf = pd.DataFrame([{\n “description”: “Gently used Apple iPhone 8 Plus, 64GB, unlocked. Great condition!”\n}])\n\n# Create feature columns\ndf['Length'] = df['description'].apply(len)\n\n# Create target column\ndf['Sale Price'] = np.nan\n\n# Split data into X (features) and y (target)\nX = df[['Length']]\ny = df['Sale Price']\n\n# Create and fit model\nmodel = LinearRegression()\nmodel.fit(X, y)\n\n# Make prediction\ndf.loc[0, 'Sale Price'] = model.predict(X)[0]\n\nprint('Predicted Sale Price:', df.loc[0, 'Sale Price'])"} {"instruction": "Write a SQL query to get the count of records in a table.", "input": "", "output": "SELECT COUNT(*) FROM myTable;"} {"instruction": "Create a Python dictionary with the student's name as the key and marks as the value.", "input": "data = { \"Ann\": 78, \"John\": 92, \"Bob\": 67 }", "output": "student_marks = { \"Ann\": 78, \"John\": 92, \"Bob\": 67 }"} {"instruction": "Create a query in SQL that will display the first name, last name and department of all employees in the table.", "input": "Employee Table: |first_name | last_name | department | -------------------------------------- | John | Doe | Marketing |", "output": "SELECT first_name, last_name, department FROM Employee;"} {"instruction": "Develop a code in R that returns the maximum from a list.", "input": "", "output": "#function to return maximum max <- function(x) { max_num <- 0 #Initialize maximum number for (i in x) { if (i > max_num) { max_num <- i } } return (max_num) } #Test list <- c(10, 30, 20, 5, 100) maximum <- max(list) print(maximum)"} {"instruction": "Write a Python code to generate a random password string of length 8, consisting of upper and lower case characters, special characters and digits.", "input": "", "output": "import random\nimport string\n\ndef generate_password_string(length):\n # Generate a random password string of length 8, consisting of upper and lower case characters, special characters and digits\n password_characters = string.ascii_letters + string.digits + string.punctuation\n return ''.join(random.choice(password_characters) for i in range(length))\n\nif __name__ == '__main__':\n print(generate_password_string(8))"} {"instruction": "Write a Python code snippet that takes a list of numbers as argument and prints the average.", "input": "[2, 3, 4, 5, 6]", "output": "def average(numbers: list):\n if numbers:\n return sum(numbers) / len(numbers)\n else:\n return 0\n \nnumbers = [2, 3, 4, 5, 6]\nprint(f\"Average of {numbers} is {average(numbers)}\")"} {"instruction": "How can you utilize SQL in machine learning?", "input": "", "output": "SQL is useful in machine learning projects because it allows the data scientist to organize and store large datasets. SQL can also be used to join different datasets and merge unstructured datasets efficiently. Further, with SQL, data scientists can filter and prepare the dataset for further machine learning modeling. Also, SQL can be used to find out the statistical properties of a dataset, such as maximum values, mean, median and other summary outputs, which are very useful for machine learning projects. Finally, SQL can be used to predict future values through statistical models."} {"text": "[CS Wikipedia] Elevační úhel\n\nElevační úhel při šikmém vrhu je úhel mezi vektorem počáteční rychlosti a vodorovnou rovinou. Na elevačním úhlu závisí délka a výška šikmého vrhu. Největší délky se při hodu ve vakuu dosáhne při úhlu 45°, pro hod ve vzduchu (tzn. s nezanedbatelným odporem vzduchu) je tento úhel o něco nižší. (Přesná hodnota závisí na konkrétních podmínkách, zhruba se může pohybovat kolem 35°.) Související články Náměr Balistika Gravitace"} {"text": "[CS Wikipedia] Lavrov\n\nExistuje více nositelů příjmení Lavrov, Lavrovová: Alexandr Vasiljevič Lavrov (* 1949) – ruský literární vědec Andrej Lavrov (* 1962) – ruský házenkář Pjotr Lavrov (1823–1900) – ruský filozof a politik Sergej Lavrov (* 1950) – ruský diplomat a politik Natalja Lavrovová (1984–2010) – ruská moderní gymnastka"} {"instruction": "Create a function that takes two strings and removes all the white spaces from them.", "input": "string_1 = \"Hello World !\" string_2 = \" Goodbye! \"", "output": "def remove_whitespace(string_1, string_2): return string_1.replace(\" \", \"\") + string_2.replace(\" \", \"\")"} {"instruction": "Iterate over a list and count the number of occurrences of each item.", "input": "list1 = [10, 20, 30, 10, 10, 40, 10]", "output": "def count_instances(list1): count_dict = dict() for item in list1: if (item in count_dict): count_dict[item] += 1 else: count_dict[item] = 1 for key, value in count_dict.items(): print(f\"{key} : {value}\") count_instances(list1) Output: 10 : 4, 20 : 1, 30 : 1, 40 : 1"} {"text": "[HI Wikipedia] मेसेंजर\n\nमेसेंजर (MESSENGER → MErcury Surface, Space ENvironment, GEochemistry, and Ranging), बुध ग्रह की परिक्रमा कर रहा नासा का एक रोबोटिक अंतरिक्ष यान है | ऐसा करने वाला यह कभी का पहला अंतरिक्ष यान भी है। सन्दर्भ अंतरिक्ष यान"} {"instruction": "Write a PHP script that prints out \"Hello, World!\" on the web page.", "input": "", "output": ""} {"instruction": "Create a function to retrieve a random element from a given list in Java.", "input": "", "output": "public static Object getRandomElement(List list) { Random rand = new Random(); int randIndex = rand.nextInt(list.size()); return list.get(randIndex); }"} {"instruction": "Write a Python program to find the largest common substring between two strings.", "input": "'killerbees','python'", "output": "def largest_common_substring(string1, string2):\n substring = \"\"\n len1, len2 = len(string1), len(string2)\n for i in range(len1):\n match = \"\"\n for j in range(len2):\n if (i + j < len1 and string1[i + j] == string2[j]):\n match += string2[j]\n else:\n if (len(match) > len(substring)): substring = match\n match = \"\"\n return substring\n\nstring1 = \"killerbees\"\nstring2 = \"python\"\n\nprint(largest_common_substring(string1,string2)) # Output: 'll'"} {"instruction": "Write a function in JavaScript to get the first 10 prime numbers.", "input": "", "output": "function getFirstTenPrimeNumbers() { let primeNumbers = []; let num = 2; while (primeNumbers.length < 10) { if (isPrime(num)) { primeNumbers.push(num); } num++; } return primeNumbers; } function isPrime(num) { for(let i = 2; i < num; i++) { if (num % i === 0) { return false; } } return true; }"} {"instruction": "In the following code, identify the bug and suggest a fix.", "input": "def add_two_strings(string1, string2): return string1 + string2", "output": "def add_two_strings(string1, string2): \"\"\"A function to add two strings together and return the concatenated result.\"\"\" if isinstance(string1, str) and isinstance(string2, str): return string1 + string2 else: raise TypeError(\"Both arguments must be strings\")"} {"instruction": "Build a web scraper in Python that extracts the title, author, and publication date of articles published on a given website.", "input": "", "output": "import requests\nfrom bs4 import BeautifulSoup\n \n# Get the html content\nurl = \"https://www.example.com/articles\"\nr = requests.get(url)\nhtml_content = r.content\n \n# Parse the html content\nsoup = BeautifulSoup(html_content, 'html.parser')\n \n# Extract the title, author and publication date\ntitles = soup.find_all('h1', class_='title')\nauthors = soup.find_all('span', class_='author')\ndates = soup.find_all('span', class_='date')\n \nfor title, author, date in zip(titles, authors, dates):\n print('Title: {}'.format(title.text))\n print('Author: {}'.format(author.text))\n print('Publication Date: {}'.format(date.text))"} {"instruction": "Write a python program to sort an array with n elements in ascending order.", "input": "arr = [7, 5, 2, 9, 6, 4, 1, 3, 8]", "output": "def sort(arr): \n \n n = len(arr) \n \n # Traverse through all array elements \n for i in range(n): \n \n # The last element has already been sorted \n for j in range(0, n-i-1): \n \n # traverse the array from 0 to n-i-1 \n # Swap if the element found is greater \n # than the next element \n if arr[j] > arr[j+1] : \n arr[j], arr[j+1] = arr[j+1], arr[j] \n \n # Driver code to test above \narr = [7, 5, 2, 9, 6, 4, 1, 3, 8] \nsort(arr) \n \nprint (\"Sorted array is:\") \nfor i in range(len(arr)): \n print (arr[i]),"} {"instruction": "Implement a function to calculate the total amount of money earned from a given array of stock prices.", "input": "arr = [5, 7, 15.5, 6, 10, 11]", "output": "def calculateTotalEarnings(arr): totalEarnings = 0 for i in range(1, len(arr)): totalEarnings += max(arr[i] - arr[i - 1], 0) return totalEarnings arr = [5, 7, 15.5, 6, 10, 11] totalEarnings = calculateTotalEarnings(arr) print(\"Total earnings: \", totalEarnings) # Output # Total earnings: 9.5"} {"instruction": "Construct a regex expression that will check if a email is valid.", "input": "", "output": "^[A-Za-z0-9\\.\\'\\+\\-\\_]+(\\@)[A-Za-z0-9.-]+([\\.][a-zA-Z]{2,4})+$"} {"text": "[HI Wikipedia] पोरबन्दर\n\nपोरबन्दर (Porbandar) भारत के गुजरात राज्य के पोरबन्दर ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। यह महात्मा गाँधी और श्रीकृष्ण के मित्र, सुदामा, का जन्मस्थान है। विवरण पोरबन्दर बहुत ही पुराना बंदरगाह हुआ करता था। पोरबन्दर में गुजरात का सबसे अच्छा समुंद्र किनारा है। पोरबंदर गुजरात राज्य के दक्षिण छोर पर अरब सागर से घिरा हुआ है। पोरबंदर जिले का निर्माण जूनागढ़ से हुआ था। पोरबंदर महात्मा गाँधीजी का जन्म स्थान है इसलिए स्वाभाविक रूप से पोरबंदर में उनके जीवन से जुड़े कई स्थान हैं जो आज दर्शनीय स्थलों में बदल चुके हैं। महाभारत काल में अस्मावतीपुर नाम से प्रसिद्ध पोरबंदर को 10वीं शताब्दी में पौरावेलाकुल कहा जाता था और बाद में इसे सुदामापुरी भी कहा गया। स्थिति पोरबंदर गुजरात राज्य का एक ऐतिहासिक ज़िला है। पोरबंदर उत्तर-पश्चिम में देवभूमि द्वारका, उत्तर-पूर्व में जामनगर, दक्षिण-पूर्व में जूनागढ़, पूर्व में राजकोट से और दक्षिण-पश्चिम में अरब सागर से घिरा है। इतिहास महात्मा गाँधी के जन्म स्थल के रूप में प्रसिद्ध इस स्थान पर 16वीं शताब्दी के आसपास जेठवा राजपूतों का नियंत्रण था। ज़िला बनने से पहले पोरबंदर भूतपूर्व पोरबंदर रियासत (1785-1948) की राजधानी था। पोरबंदर में गाँधीजी का तिमंजिला पैतृक निवास है जहाँ ठीक उस स्थान पर एक स्वस्तिक चिन्ह बनाया गया है जहाँ गाँधीजी की माँ पुतलीबाई ने उन्हें जन्म दिया था। लकड़ी की संकरी सीढ़ी अभ्यागतों को ऊपरी मंजिल तक ले जाती है, जहाँ गाँधीजी का अध्ययन कक्ष है। गाँधीजी के जन्म की स्मृति को अमर बनाने के लिए 79 फीट ऊँची एक इमारत का निर्माण उस गली में किया गया जहाँ 2 अक्टूबर 1869 को बापू का जन्म हुआ था। कीर्तिमंदिर के पीछे नवी खादी है जहाँ गाँधीजी की पत्नी कस्तूरबा गाँधी का जन्म हुआ था। पोरबंदर का महत्त्व केवल यहाँ तक सीमित नहीं है। भगवान श्री कृष्ण के बालसखा सुदामाजी भी यही के थे। इसलिए इसका महत्त्व सुदामापुरी के रूप में भी खास है। यातायात और परिवहन वायु मार्ग पोरबंदर हवाईअड्डा और सबसे नजदीकी हवाईअड्डा जामनगर हवाईअड्डा है और अच्छे सड़क प्रसार की दृष्टि से राजकोट हवाईअड्डा नजदीक पड़ता है। रेल मार्ग पोरबंदर रेलवे स्टेशन एक टर्मिनस (अंतिम स्टेशन) है। राजकोट और सोमनाथ के साथ-साथ हावड़ा, सांत्रागाची, दिल्ली सराई रोहिल्ला, मुजफ्फरनगर, सिकंदराबाद और कोचुवेली से पोरबंदर के लिए रेल सुविधाएँ उपलब्ध हैं। सड़क मार्ग राज्य परिवहन की बसें पोरबंदर को ज़िले व राज्य के अन्य हिस्सों से जोड़ती हैं। इसके अलावा हर घंटे नरसंग टेकरी से गैर-वातानुकूलित के साथ-साथ आलिशान और वातानुकूलित निजी वॉल्वो बसे राजकोट और अहमदाबाद के लिए चलती रहती है, जिसका आरक्षण 'PayTM', 'RedBus' इत्यादि जैसी वेबसाइट पर उपलब्ध रहता है। राजकोट और अहमदाबाद देश के सभी शहरो से जुड़े हुए हैं। उद्योग और व्यापार पोरबंदर शहर भवन निर्माण में काम आने वाले पत्थरों के लिए विख्यात है और पोरबंदर में कई प्रकार के उत्पादन का काम भी होता है। जनसंख्या 2001 की गणना के अनुसार पोरबंदर की कुल जनसंख्या 5,36, 854 थी और 2011 की गणना के अनुसार 5,86,062 थी। पर्यटन पोरबंदर का गुजरात के पर्यटन स्थलों में महत्त्वपूर्ण स्थान है। पोरबंदर में कई ऐतिहासिक इमारतें हैं। पोरबंदर में महात्मा गाँधी का जन्म…"} {"instruction": "Construct a boolean check to detect if a given string contains the word \"hello\".", "input": "", "output": "def contains_hello(input_string): return \"hello\" in input_string"} {"instruction": "How would you implement Skip-Gram model in TensorFlow?", "input": "", "output": "To implement a Skip-Gram model in TensorFlow, you would need to define the model architecture. You would then need to define the training data, which can be done using tf.data packages. Finally, you would need to use an optimization algorithm such as the AdamOptimizer to train the model."} {"instruction": "Write a Python class to define a fraction and include methods to add and subtract fractions.", "input": "", "output": "class Fraction:\n\n def __init__(self, numerator, denominator):\n self.numerator = numerator\n self.denominator = denominator\n\n def __str__(self):\n return f\"{self.numerator}/{self.denominator}\"\n\n def __add__(self, other):\n denom = self.denominator * other.denominator\n num1 = self.numerator * other.denominator\n num2 = other.numerator * self.denominator\n numerator = num1 + num2\n return Fraction(numerator, denom)\n\n def __sub__(self, other):\n denom = self.denominator * other.denominator\n num1 = self.numerator * other.denominator\n num2 = other.numerator * self.denominator\n numerator = num1 - num2\n return Fraction(numerator, denom)"} {"instruction": "Create a Python module for a spiral matrix with the following functions: createSpiralMatrix, printSpiralMatrix, and transposeSpiralMatrix.", "input": "Not applicable", "output": "def createSpiralMatrix(n):\n matrix = [[0] * n for i in range(n)]\n row = 0\n col = -1\n total = n * n\n spiral = 1\n\n while total > 0:\n # move left -> right\n while col + 1 < n and matrix[row][col + 1] == 0:\n col += 1\n matrix[row][col] = spiral\n total -= 1\n spiral += 1\n\n # move up -> down\n while row + 1 < n and matrix[row + 1][col] == 0:\n row += 1\n matrix[row][col] = spiral\n total -= 1\n spiral += 1\n\n # move right -> left\n while col - 1 >= 0 and matrix[row][col - 1] == 0:\n col -= 1\n matrix[row][col] = spiral\n total -= 1\n spiral += 1\n\n # move down -> up\n while row - 1 >= 0 and matrix[row - 1][col] == 0:\n row -= 1\n matrix[row][col] = spiral\n total -= 1\n spiral += 1\n\n # move left -> right\n while col + 1 < n and matrix[row][col + 1] == 0:\n col += 1\n matrix[row][col] = spiral\n total -= 1\n spiral += 1\n\n return matrix\n\ndef printSpiralMatrix(matrix):\n for row in matrix:\n print(*row)\n\ndef transposeSpiralMatrix(matrix):\n return [list(x) for x in zip(*matrix)]"} {"instruction": "Describe the differences between np.array and a list.", "input": "", "output": "Numpy arrays are more efficient than lists as they are homogeneous in nature. This means that all the items in a numpy array must be of the same data type, while a list can contain items of any data type. Additionally, numpy arrays can be multi-dimensional while lists are only one-dimensional. Numpy arrays can be indexed and sliced the same way as lists. However, operations on numpy arrays are much faster than operations on lists. Lastly, numpy arrays support vectorization which allows for efficient computation."} {"instruction": "Write a function to sort a dictionary of dictionaries in descending order based on a given key.", "input": "d = {'dict1': {'name':'tom','age':20}, 'dict2': {'name':'jerry','age':25}, 'dict3': {'name':'bill','age':24}} key = 'age'", "output": "def sort_dict_of_dicts(d, key): sorted_dict = dict(sorted(d.items(), key = lambda kv:(kv[1][key], kv[0]),reverse=True)) return sorted_dict"} {"instruction": "Count the number of characters in a sentence that begin with a consonant.", "input": "", "output": "def count_consonants(sentence): consonants = 'bcdfghjklmnpqrstvwxyz' count = 0 for ch in sentence: if ch.lower() in consonants: count += 1 return count"} {"instruction": "Create a web page that contains three input boxes for a user to input name, age, and gender.", "input": "", "output": " Input Form
      Name:

      Age:

      Gender:
      Male
      Female

      "} {"instruction": "Create a code that takes in a sentence and outputs counts of each word and its frequency (how often it occurred).", "input": "sentence = \"This is an example sentence to test the word count code.\"", "output": "def count_words(sentence): word_count = {} for word in sentence.split(): if word in word_count: word_count[word] += 1 else: word_count[word] = 1 return word_count count_words(sentence)"} {"text": "[EN Wikipedia] 1935–36 Hovedserien season\n\nThe 1935–36 GET-ligaen season was the second season of ice hockey in Norway. Eight teams participated in the league, and Grane won the championship. Regular season External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1935–36 in Norwegian ice hockey"} {"text": "[CS Wikipedia] Seznam osobností Horní Libchavy\n\nVýznamné osobnosti Horní Libchavy, které se nějakým způsobem zapsaly do dějin obce, se objevují již na počátku 19. století. Rozsáhlé změny revolučních let 1848–1849 přinesly novou sociální vrstvu podnikatelů. Střední vrstvy tvořily v monarchii po celé 19. století významnou část společnosti. Právě z ní se modifikovala tehdejší inteligence (advokáti, lékaři, profesoři, novináři, umělci atd.) I když zanikla skupina patrimoniálních úředníků, státní správa nabízela vzdělaným mužům (od posledních desetiletích 19. století i ženám) široké uplatnění. Augustin Michael Hiebel Augustin Michael Hiebel (* 3. října 1720, Oberliebich / Horní Libchava; † 5. září 1752, Osek), cisterciák, prof. teologické etiky (Theologische Ethik, též Moraltheologie), do cisterciáckého řádu vstoupil roku 1742 v Oseckém klášteře, primici slavil 5. října 1749. Franz a Josef Scheiner Franciscus Antonius Scheiner (* 25. března 1780, Horní Libchava čp. 115), se narodil otci Johannu Georgovi Scheinerovi (Joannus Georgius Scheiner, * 5. října 1755, Horní Libchava - † 19. listopadu 1822, Horní Libchava čp. 122) a matce Marii Elisabeth, rozené Scheineriana († 11. srpna 1789, Horní Libchava čp. 115 ve věku 34 let). Po smrti první manželky Marie Elisabethy se otec 14. června 1790 na čp. 115 ve věku 35 let podruhé oženil s 22letou Theresou Brix (* 10. července 1768). Dne 11. května 1791 se manželům Scheinerovým na čp. 122 narodil syn Josef Anton Scheiner, nevlastní bratr F. A. Scheinera. Franz Scheiner patřil k prvním brazilským osadníkům na zač. 19. století a v Rio de Janeiru se usadil po té, co Jan VI. Portugalský, pozdější král Spojeného království Portugalska, Brazílie a Algarve, otevřel brazilské přístavy zahraničnímu obchodu (r. 1808). Po příjezdu Marie Leopoldiny Habsbursko-Lotrinské (r. 1817) patřil k jejím důvěrníkům. O synovi Josefu Scheinerovi, vojákovi c. k. pěšího pluku prince Neuß-Plauena (k. k. Prinz Neuß-Plauen Linien-Infanterie-Regiment) a účastníkovi bitvy u Lipska, neměl ještě v roce 1816 jeho otec Johann Georg Scheiner (sedlák z Horní Libchavy na čp. 122), žádné zprávy a snažil se jej proto vyhlásit úředně za mrtvého. První informace o území Nového světa se dostávaly do zemí Koruny české především díky jezuitům, později skrze obchodní kontakty sklářských kompanií. V roce 1769 byla v účetní zprávě pěti společníků sklářské kompanie: Johann Gottfried Ostritz (Chomouty), Ludovit Gertner (Sloup), Johann Antoni Grosmann (Skalice), Athanasius Palme (Prysk), Johann George Hansel (Radvanec), vydané v Amsterdamu 15. prosince 1769, zmíněna mezi mnoha dalšími také sklářská kompanie Scheiner & Comp. Firma Hiecke, Rautenstrauch, Zincke & spol., v Hamburku zastupovaná firmou J. F. Scheinert & spol., otevřela v roce 1784 pobočku v peruánské Limě, v roce 1787 v Mexiku. Oficiální a přímé…"} {"text": "[EN Wikipedia] Allocution\n\nAn allocution, or allocutus, is a formal statement made to the court by the defendant who has been found guilty prior to being sentenced. It is part of the criminal procedure in some jurisdictions using common law. Concept An allocution allows the defendant to explain why the sentence should be lenient. In plea bargains, an allocution may be required of the defendant. The defendant explicitly admits specifically and in detail the actions and their reasons in exchange for a reduced sentence. In principle, that removes any doubt as to the exact nature of the defendant's guilt in the matter. The term \"allocution\" is used generally only in jurisdictions in the United States, but there are vaguely similar processes in other common law countries. In many other jurisdictions, it is for the defense lawyer to mitigate on their client's behalf, and the defendant rarely has the opportunity to speak. Australia In Australia, the term allocutus is used by the Clerk of Arraigns or another formal associate of the court. It is generally phrased as, \"Prisoner at the Bar, you have been found Guilty by a jury of your peers of the offense of XYZ. Do you have anything to say as to why the sentence of this Court should not now be passed upon you?\" The defense counsel will then make a plea in mitigation (also called submissions on penalty) in an attempt to mitigate the relative seriousness of the offense and heavily refer to and rely upon the defendant's previous good character and good works, if any. The right to make a plea in mitigation is absolute. If a judge or magistrate refuses to hear such a plea or does not properly consider it, the sentence can be overturned on appeal. United States In most of the United States, defendants are allowed the opportunity to allocute before a sentence is passed. Some jurisdictions hold that as an absolute right. In its absence, a sentence but not the conviction may be overturned, resulting in the need for a new sentencing hearing. In the federal system, Federal Rules of Criminal Procedure 32(i)(4) provides that the court must \"address the defendant personally in order to permit the defendant to speak or present any information to mitigate the sentence.\" The federal public defender recommends that defendants speak in terms of how a lenient sentence will be sufficient but not greater than necessary to comply with the statutory directives set forth in . See also Confession (law) References Criminal procedure Evidence law"} {"instruction": "Write a Python program to sort data from the largest to the smallest.", "input": "[44, 23, 11, 33, 5]", "output": "unsorted_list = [44, 23, 11, 33, 5]\nsorted_list = sorted(unsorted_list, reverse=True)\n\nprint(sorted_list)"} {"text": "[HI Wikipedia] यो यो हनी सिंह\n\nहिरदेश सिंह (जन्म 15 मार्च 1983), जिन्हें पेशेवर तौर पर यो यो हनी सिंह या बस हनी सिंह के नाम से जाना जाता है, एक भारतीय संगीत निर्माता, रैपर, गायक, गीतकार हैं। और एक अभिनेता. उन्होंने 2003 में एक सत्र और रिकॉर्डिंग कलाकार के रूप में शुरुआत की, और एक भांगड़ा और हिप हॉप संगीत निर्माता बन गए। बाद में, वह अपने गानों से सफल हो गए और बॉलीवुड फिल्मों के लिए गाने बनाने लगे।रैप गायन इन्होने इंगलैंड के ट्रिनिटी विश्वविद्दालय (स्कूल ऑफ ट्रिनिटी) में सीखा था। See also विवाद 2012 दिल्ली सामूहिक बलात्कार मामला के ततपश्चात इन्होंने एक अश्लील गीत गाया था स्त्रियों का अपमान हुआ इस कारण हनी सिंह के खिलाफ रिपोर्ट दर्ज कराई गई और मामला उच्च न्यायालय तक पहुंचा था। इसी प्रकार अक्षय कुमार की बॉस फ़िल्म में इन्होंने एक पार्टी ऑल नाइट नामक गीत गाया था जिसमें कुछ अश्लील शब्द बोले गए थे जो बाद में हटाए गए। इस कारण सिंह को दिल्ली उच्च न्यायालय तक चक्कर काटना पड़ा था। बिम्बचित्रण एकल फ़िल्मी संगीत सन्दर्भ भारतीय संगीतकार जीवित लोग गायक पंजाबी गायक भारतीय गायक रैपर 1983 में जन्मे लोग होशियारपुर के लोग"} {"instruction": "Write a JavaScript code to add two numbers using a prompt.", "input": "", "output": "let a = prompt('Enter the first number:'); let b = prompt('Enter the second number:'); let sum = parseInt(a) + parseInt(b); console.log(sum);"} {"instruction": "Create an API in node.js to get the details of a user using an ID", "input": "id = \"12345\"", "output": "var express = require(\"express\"); var app = express(); // API to get user details app.get(\"/user/:id\", function(req,res) { var id = req.params.id; var user = { name: \"John Doe\", age: 30 }; res.status(200).send(JSON.stringify(user)); }); app.listen(3000);"} {"instruction": "Write a JavaScript statement to extract the last four characters from the string", "input": "This is a sample string.", "output": "var lastFour = myString.slice(-4);"} {"instruction": "Create a mySQL script to create a table called \"User\" with columns user_id, name, and mobile_number?", "input": "", "output": "CREATE TABLE User ( user_id int NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(50) NOT NULL, mobile_number varchar(20) NOT NULL );"} {"instruction": "Create a web crawler to extract all the links within a given web page", "input": "url = \"https://www.example.com\"", "output": "import requests from bs4 import BeautifulSoup def get_links(url): response = requests.get(url) soup = BeautifulSoup(response.text, 'html.parser') links = [link.get('href') for link in soup.find_all('a')] return links if __name__ == '__main__': print(get_links(url))"} {"text": "[EN Wikipedia] WHHW\n\nWHHW (1130 AM) is a radio station broadcasting a Regional Mexican radio format. It is licensed to Hilton Head Island, South Carolina. The station is currently owned by Dick Broadcasting, through licensee Dick Broadcasting Company, Inc. of Tennessee. WHHW broadcasts at 1,000 watts by day. But because AM 1130 is a clear channel frequency, it must reduce power to 500 watts at night to avoid interference. WHHW simulcasts its programming on an FM translator, W241CV at 96.1 MHz, broadcasting at a power level of 99 watts. History On February 14, 1983, the station went on the air as WHHR with the call sign referring to Hilton Head Radio. It was a sister station to 106.1 WFXH-FM. WHHR changed its call sign on June 11, 1987, to WHHQ. On December 23, 1994, it changed its call sign back to WHHR, only to change the call sign again on New Year's Day 1995 to WFXH. On February 28, 2011, the call sign was changed to WHHW. Prior to March 6, 2011, the station was an ESPN Radio Network affiliate, WFXH. It previously featured programming from CNN Radio. Monty Jett, formerly morning host on co-owned WLOW, moved to WHHW with its change to \"1130 the Island\", a soft AC/adult standards format. In 2015, WHHW changed to Adult Album Alternative with the slogan \"True. Music. Variety.\" In September 2017, Dick Broadcasting announced the purchase of Alpha Media stations in three markets, including Savannah. In 2018, WHHW switched to oldies as \"The Island\". On October 4, 2021, WHHW changed its format from oldies to Regional Mexican, branded as \"La Pantera 96.1\". Previous logos References External links HHW Radio stations established in 1983 1983 establishments in South Carolina Regional Mexican radio stations in the United States"} {"instruction": "Develop a python program to find the maximum depth of a binary tree.", "input": "", "output": "class Node:\n def __init__(self, data):\n self.data = data\n self.left = None\n self.right = None\n \ndef maxDepth(node):\n if node is None:\n return 0\n else:\n leftDepth = maxDepth(node.left)\n rightDepth = maxDepth(node.right)\n \n if leftDepth > rightDepth:\n return leftDepth+1\n else:\n return rightDepth+1\n \nif __name__ == '__main__':\n root = Node(1)\n root.left = Node(2)\n root.right = Node(3)\n root.left.left = Node(4)\n print(maxDepth(root))"} {"text": "[HI Wikipedia] मुफ़्त\n\nमुफ़्त या नि:शुल्क या बेदाम व्यापार में ऐसी सेवा या वस्तु को कहते हैं, जो ग्राहक को बिना किसी पैसे के दी जाए। व्यापारिक संस्थाएँ व दुकानदार ग्राहकों को भविष्य में किसी बड़ी ख़रीद के लिये आकर्षित करने की आशा में चीज़ें मुफ़्त देते हैं। उदाहरण के लिये उस्तरे बनाने वाली जिलॅट कम्पनी अपने उस्तरे मुफ़्त बांटा करती थी, लेकिन इन उस्तरों का आकार ऐसा था कि इनमें केवल जिलॅट के बनाए ब्लेड ही लग सकते थे। इस से ग्राहकों में यह उस्तरें तेज़ी से फैल गए और फिर जिलॅट के ब्लेडों की माँग बहुत बढ़ गई। व्यापार के अलावा कभी-कभी वस्तुएँ व सेवाएँ दान-स्वरूप या सामाजिक सहायता के तौर पर भी मुफ़्त दी जाती हैं। सन्दर्भ व्यापार प्रणालियाँ"} {"text": "[DE Wikipedia] Sigismund von Lamberg\n\nSigismund von Lamberg († 8. Juni 1488 in Laibach) war der erste Bischof von Laibach (Ljubljana), ernannt 1461, bestätigt 1463; das Bistum Laibach war ebenfalls 1461 gegründet worden. Er entstammte der im Mannesstamm erloschenen Lambergschen Linie auf Stain und Gutenberg in Oberkrain, als das sechste von acht Kindern des Georg von Lamberg, des Besitzers der Herrschaft Gutenberg bei Tržič (Neumarktl). Wappen Gevierter Schild, 1 und 4 gespalten von Silber und Rot, vorne zwei blaue Balken, 2 und 3 in goldenem Feld ein springender schwarzer Bracke. Auf dem Schild zwei gekrönte Spangenhelme; Helmdecken: rot- silbern und schwarz - gold. Helmkleinod: rechte Krone daraus zwei wachsende Büffelhörner, bestückt mit blauen Blättern, vorne wie Feld 1, hinten rot. Auf der linken Krone ein silber-blau schräglinks gestreiftes, mit goldenen Troddeln versehenes Kissen darauf der Bracke sitzend. Vita Pfarrer Sigismund von Lamberg war im Jahre 1444 Pfarrer in St. Martin (Šmartin) bei Krainburg (Kranj) in Oberkrain. Zu seiner Pfarrei erhielt er zwei Benefiziate: Die Pfarrei St. Michael bei Bleiburg (Pliberk) und das Kanonikat in Freising. In den Jahren 1446–1449 widmete er sich vermutlich in Italien weiteren theologischen Studien. Auf dem Hof zu Wien Er schien gute Beziehungen zum Kaiserhaus gehabt zu haben, denn im Jahre 1449 wurde er auf den Hof nach Wien als Hofkaplan und Beichtvater des Kaisers Friedrich III. (IV.) berufen, wo ihm auch das Hofamt des Almoseniers übertragen wurde. Dort schloss er auch nähere Bekanntschaft zu Aeneas Sylvius Piccolomini, dem späteren Papst Pius II. Bischof von Laibach Kaiser Friedrich III. (IV.) gründete im Jahre 1461 im Einvernehmen mit dem Papst das Bistum Laibach und bestimmte Sigismund von Lamberg zum Bischof. Dem neuen Bistum sollte auch das Benediktinerkloster Oberburg (Gornji Grad) in der Untersteiermark inkorporiert werden. Aufgrund des vehementen Widerstands der dortigen Mönche, die sich gegen die Unterstellung ihres Klosters unter das Bistum Laibach wehrten, denn dadurch hätte der Bischof von Laibach auch das Recht, die Prioren ein- und abzusetzen, verzögerte sich auch die päpstliche Bestätigung Sigismunds zum Bischof bis in das Frühjahr 1463. Erst nachdem dem Kloster 120 Dukaten als Entschädigung für die Aushändigung der Urkunden und für die Abtretung der Rechte und Privilegien gezahlt worden waren, wurde der Streit beigelegt. Wegen des moralischen und sittlichen Verfalls im Kloster und auch wegen der Abwanderung der Bevölkerung angesichts der türkischen Gefahr, wurde das Kloster auf Initiative des Bischofs Lamberg von Papst Sixtus IV. im Jahre 1473 aufgelassen. Dem Bischof wurde aufgetragen, dort ein Kollegium für weltliche Priester einzurichten. Sigismund gelang es, allerdings nicht ohne Schwierigkeiten, auch die rechtliche…"} {"text": "[CS Wikipedia] Intense (album, Armin van Buuren)\n\nIntense je pátým studiovým albem nizozemského trance DJe Armina van Buurena. První představenou písní (21. leden 2013), a zároveň druhým singlem na albu je \"Waiting for the Night\" je též ústřední melodií nizozemského filmu Loving Ibiza () a vznikl při spolupráci se zpěvačkou Fiora. Druhou představenou písní na albu je \"Forever is Ours\", která vznikla ve spolupráci se zpěvačkou Emma Hewitt. Na třetí představené písni (17. březen 2013) a zároveň na prvním oficiálním singlu, kterým je \"This Is What It Feels Like\" spolupracoval kanadský zpěvák a skladatel Trevor Guthrie. V doprovodném hudebním videoklipu se též zahrál Ron Jeremy. Album bylo přednostně vydáno na Spotify dne 29. dubna 2013, oficiální vydání na digitálních a fyzických médiích následováno 3. květen 2013. Seznam skladeb Kompozice Během rozhovoru s britským DJ Pete Tongem popsal Armin žánrové složení Intense jako \"\" Odkazy Reference Externí odkazy Alba Armina van Buurena Alba z roku 2013 Alba Armada Music"} {"text": "[CS Wikipedia] Pablatnice tekalitská\n\nPablatnice tekalitská (Borneophrys edwardinae) je jediný druh žabího rodu Borneophrys čeledi pablatnicovitých (Megophryidae), který se vyskytuje na jediném místě ostrova Borneo. O životě a biologii tohoto druhu nejsou zatím žádné bližší informace. synonymum: Megophrys edwardinae (dříve řazen do rodu Megophrys – jiného rodu čeledi pablatnicovitých) Reference Externí odkazy Pablatnicovití Fauna Asie"} {"instruction": "Generate a Python code snippet to compute the sum of the digits of a given number.", "input": "", "output": "def sum_digits(num):\n summation = 0\n while num > 0:\n summation += num % 10\n num = num // 10\n return summation"} {"instruction": "Create a React component for displaying a simple profile card with the properties of name and age.", "input": "", "output": "const ProfileCard = (props) => { return (

      {props.name}

      Age: {props.age}

      ); }"} {"text": "[EN Wikipedia] Robertas Antinis\n\nRobertas Antinis (born 9 June 1946 in Kaunas) is a Lithuanian Sculptor, performance artist and poet. He is a winner of the National Culture and Art Prize. Life He graduated from the Applied Arts School in Riga in 1965, and the Latvian State Art Academy in 1970. He worked as a teacher at Kaunas children's art school in 1973–75. From 1997, he was a lecturer of Vilnius Art Academy, and was a docent at the Kaunas Art Institute. He has been a member of the Lithuanian Artists’ Union since 1974. He started participating in exhibitions from 1969. He is a member of Post Ars group. Picture-shows 1971 Dailininkų sąjungos Kauno skyrius, Kaunas, Lithuania. 1987 Kauno paveikslų galerija, Kaunas, Lithuania. 1989 Lietuvos dailės muziejus, Vilnius, Lithuania. 2000 Lietuvos ambasada, Riga, Latvia. 2002 Lietuvos dailininkų sąjungos parodų salė, Vilnius, Lithuania. See also List of Lithuanian painters References 1946 births Living people Artists from Kaunas Lithuanian painters"} {"instruction": "About a given number n, can you write a JavaScript program to find the sum of all the numbers that are greater than 0 and less than n?", "input": "n = 5", "output": "var sum = 0; for (var i = 1; i < n; i++) { sum = sum + i; } console.log(sum)"} {"instruction": "Use features of the Python language to implement 3-way partitioning of a given array.", "input": "Array: [9,6,7,4,1,6,3]", "output": "\"\"\" Use features of the Python language to implement 3-way partitioning of a given array. \"\"\" def threeWayPartition(array, pivot): less = [] equal = [] greater = [] for i in array: if i < pivot: less.append(i) elif i == pivot: equal.append(i) else: greater.append(i) return less + equal + greater if __name__ == '__main__': array = [9,6,7,4,1,6,3] pivot = 6 print(threeWayPartition(array, pivot))"} {"instruction": "Using Python, reverse a given string \"Hello World!\".", "input": "", "output": "\"!dlroW olleH\""} {"text": "[EN Wikipedia] KJIA\n\nKJIA is a Christian radio station licensed to Spirit Lake, Iowa, broadcasting on 88.9 MHz FM. KJIA serves Northwest Iowa and Southwest Minnesota. The station is owned by Minn-Iowa Christian Broadcasting, Inc. References External links KJIA's official website JIA Radio stations established in 2002 2002 establishments in Iowa"} {"text": "[EN Wikipedia] 1838 in Denmark\n\nEvents from the year 1838 in Denmark. Incumbents Monarch – Frederick VI Prime minister – Otto Joachim Events 17 September – After almost four decades in Rome, Bertel Thorvaldsen, accompanied by his art collections and most of his own works, returns to Copenhagen. Undated Births JanuaryMarch 1 February Christian Blache, painter (died 1920) 6 February – Johan Peter Christian Hansen, businessman (died 1913) 22 February – Johan Peter Andreas Anker, military officer (died 1876) AprilJune 19 June – Julius Lange, art historian (died 1896) JulySeptember 10 July Philip Schou, businessman (died 1922) 16 July Ejler Andreas Jorgensen, painter (died 1876) 31 July – Vilhelm Rosenstand, artist (died 1915) Deaths 13 March – Poul Martin Møller, academic, writer, and poet (born 1794) 20 April – Marie Kofoed, businessperson and philanthropist (born 1760) 31 October – Poul Reichhardt, actor (born 1913) References 1830s in Denmark Denmark Years of the 19th century in Denmark"} {"text": "[HI Wikipedia] तिब्बत\n\nतिब्बत तिब्बत एक देश था। जिसकी सीमा भारतऔर चीनी जनवादी गणराज्य अफगानिस्तानवबर्मा से लगती है। दलाई लामा यहां के प्रसिद्ध धार्मिक नेता हैं। यह 1950 में चीन की साम्राज्यवादी नीति का शिकार हो गया। अब यह चीन का राष्ट्रीय स्वायत्त क्षेत्र है, और इसकी भूमि मुख्य रूप से पठारी है। इसे पारंपरिक रूप से बोड या भोट भी कहा जाता है। चीन द्वारा तिब्बती लोगों पर काफी अत्याचार किए गए व अब भी किये जा रहें हैं। भारत स्थिति व भूगोल ३२ अंश ३० मिनट उत्तर अक्षांश (लैटीट्यूड) तथा ८६ अंश ० मिनट पूर्वी देशान्तर (लॉन्गीट्यूड)। तिब्बत मध्य एशिया की उच्च पर्वत श्रेंणियों के मध्य कुनलुन एवं हिमालय के मध्य स्थित है। इसकी ऊँचाई १६,००० फुट तक है। यहाँ का क्षेत्रफल ४७,००० वर्ग मील है। तिब्बत का पठार पूर्व में शीकांग से, पशिचम में कश्मीर से दक्षिण में हिमालय पर्वत से तथा उत्तर में कुनलुन पर्वत से घिरा हुआ है। यह पठार पूर्वी एशिया की बृहत्तर नदियों हवांगहो, मेकांग आदि का उद्गम स्थल है, जो पूर्वी क्षेत्र से निकलती हैं। पूर्वी क्षेत्र में कुछ वर्षा होती है एवं ३६५.७६ मी॰ (१२०० फुट) की ऊँचाई तक वन पाए जाते है। यहाँ कुछ घाटियाँ १५२४ मी॰(५,००० फुट) ऊँची हैं, जहाँ किसान कृषि करते हैं। जलवायु की शुष्कता उत्तर की ओर बढ़ती जाती है एवं जंगलों के स्थान पर घास के मैदान अधिक पाए जाते है। जनसंख्या का घनत्व धीरे-धीरे कम होता जाता है। कृषि के स्थान पर पशुपालन बढ़ता जाता है। साइदान घाटी एवें कीकोनीर जनपद पशुपालन के लिये विशेष प्रसिद्ध है। बाह्य तिब्बत की ऊबड़-खाबड़ भूमि की मुख्य नदी यरलुंग त्संगपो (ब्रह्मपुत्र) है, जो मानसरोवर झील से निकल कर पूर्व दिशा की ओर प्रवाहित होती है और फिर दक्षिण की ओर मुड़कर भारत एवं बांग्लादेश में होती हुई बंगाल की खाड़ी में गिर जाती है। इसकी घाटी के उत्तर में खारे पानी की छोटी - छोटी अनेक झीलें हैं, जिनमें नम त्सो (उर्फ़ तेन्ग्री नोर) मुख्य है। इस अल्प वर्षा एवं स्वल्प कृषि योग्य है। त्संगपो की घाटी में वहाँ के प्रमुख नगर ल्हासा, ग्यान्त्से एवं शिगात्से आदि स्थित है। बाह्य तिब्बत का अधिकांश भाग शुष्क जलवायु के कारण केवल पशुचारण के योग्य है और यही यहाँ के निवासियों का मुख्य व्यवसाय हो गया है। कठोर शीत सहन करनेवाले पशुओं में याक(Yak: a wooly animal) मुख्य है जो दूध देने के साथ बोझा ढोने का भी कार्य करता है। इसके अतिरिक्त भेड़, बकरियाँ भी पाली जाती है। इस विशाल भूखंड में नमक के अतिरिक्त स्वर्ण एवं रेडियमधर्मी खनिजों के संचित भंडार प्रचुर मात्रा में उपलब्ध हैं। ऊबड़ खाबड़ पठार में रेलमार्ग बनाना अत्यंत दुष्कर और व्ययसाध्य है अत: पर्वतीय रास्ते एवं कुछ राजमार्ग (सड़कें) ही आवागमन के मुख्य साधन है, हालांकि चिंगहई-तिब्बत रेलमार्ग तैयार हो चुका है। सड़के त्संगपो नदी की घाटी में स्थित नगरों को आपस में मिलाती है। पीकिंग-ल्हासा राजमार्ग एवं ल्हासा काठमांडू राजमार्ग का निर्माण कार्य पूर्ण होने की अवस्था में है। इनके पूर्ण हो जोने पर इसका सीधा संबंध पड़ोसी देशों से हो जायेगा। चीन और भारत ही तिब्बत के साथ व्यापार में रत देश पहले थे। यहाँ के निवासी नमक, चमड़े तथा ऊन आदि के बदले में चीन से चाय एवं भारत से वस्त्र तथा खाद्य सामग्री प्राप्त करते थे। तिब्बत एवं शिंजियांग को मिलानेवाले…"} {"instruction": "Write a SQL statement to select the names and IDs of customers from the customers table that live in California.", "input": "", "output": "SELECT name, id FROM customers WHERE state = 'California';"} {"instruction": "Create a function in Python to produce a ``new_list`` which contains substring elements from the given ``list``", "input": "list = [\"apple\",\"banana\",\"orange\",\"carrot\"]", "output": "def produce_new_list(list):\n '''This function will return a new list containing substrings from the given list'''\n new_list = []\n\n for item in list:\n for i in range(0, len(item)):\n new_list.append(item[0:i+1]) \n\n return new_list"} {"instruction": "Write an R program to check if an array is in ascending order.", "input": "x <- c(2, 4, 8, 10, 15)", "output": "is_ascending <- function(x) { sorted_x <- sort(x) if (sorted_x == x) { return TRUE } else { return FALSE } }"} {"text": "[HI Wikipedia] अंबानी परिवार\n\nअंबानी परिवार भारत का एक औद्योगिक घराना है। धीरूभाई अंबानी द्वारा छोटे स्तर पर शुरु किया गयी एक कंपनी भारत और एशिया के सबसे बड़े औद्योगिक घरानों में से है। तेल, टेलीकाम से ले कर बहुत से क्षेत्रों में इस परिवार का दबदबा है। आजकल धीरूभाई के बेटों अनिल अंबानी और मुकेश अंबानी में चल रहे पारिवारिक विवाद के कारण यह परिवार विवाद और चर्चा का विषय बना | अम्बानी परिवार के व्यवसाय देश की निजी क्षेत्र की सबसे बड़ी कंपनी रिलायंस इंडस्ट्रीज के चेयरमैन और मैनेजिंग डायरेक्टर मुकेश अंबानी देश के सबसे अमीर बिजनेसमैन हैं। 19 अप्रैल को उन्होंने 59वां बर्थडे मनाया। मुकेश अंबानी ने 1981 में रिलायंस का काम संभाला और रिलायंस इंडस्ट्रीज को नए मुकाम तक पहुंचाया। दुनिया की सबसे बड़ी पेट्रोलियम रिफायनरी बनाई... भारतीय परिवार"} {"text": "[DE Wikipedia] Sagen aus Uri\n\nZwischen 1903 und 1925 sammelte Pfarrer Josef Müller im Kantonsspital Uri Erzählungen über eigenartige Begebenheiten und Geschichten von Berglern. Die etwa 1600 Sagen wurden als Sagen aus Uri in drei Bänden und einem Bildband veröffentlicht. Die Geschichten findet man zum Teil im ganzen Alpenraum. Bei der Sammlung handelt es sich um die ausführlichste Sagensammlung aus dem Alpenraum. Die Sagen wurden früher vor allem im Winter an langen Abenden erzählt. Sie dienten der Unterhaltung und der Belehrung. Inhalt der Sagen Bei den Sagen handelt es sich vor allem um Volkssagen. Sie sind sprachlich und stilistisch eher karg und ein-episodisch. Einzig bei klassischen Sagen wie der Sage der Teufelsbrücke, der Surenensage oder der Urnerbodensage handelt es sich um reich ausgeschmückte Sagen. Die Geschichten geben einen Einblick in die Seele der Bergbevölkerung und sind genauso eng und abgründig wie die Welt, in der die Erzähler leben. Beispiele Lebendig Begraben „Man erzählte in Altdorf von einer Frau, die im ehemals Crivellischen Hause wohnte, dass sie in der Nacht nach ihrer Beerdigung, mit einer Laterne versehen, zu Hause läutete und, als man sie mit Schrecken erkannte, erklärte, der Totengräber sei gekommen, habe den Sarg geöffnet, um einen kostbaren Ring von ihren Fingern zu nehmen. Da der Ring aber nicht leicht zu entfernen war, habe er ihr in den Finger geschnitten, was sie auch geweckt habe. Als sie sich aufrichtete, sei der Totengräber davongesprungen und habe seine Laterne stehen gelassen. Die Frau soll nachher in ihrem Leben nie mehr gelacht haben.“ (Erzählt: Frau Oberst Epp-Schmid) Tatsächlich gibt es im Kirchenbuch von Altdorf UR zweimal einen Eintrag vom Tode derselben Frau. Die Einträge liegen innerhalb von 14 Tagen. Der gespenstige Hirte „Am Bristenstock, nämlich in der Blackialp, sehen die Älpler alle Jahre an einem bestimmten Tage einen jungen Burschen, der mit grosser Mühe eine Kuh auf dem Rücken durch ein Tobel hinaufträgt. Bevor er sein Ziel erreicht, fällt ihm das Tier hinunter, und wehklagend und jämmerlich schreiend verlässt der Bursche das Tobel. Das sei ein ehemaliger Küher der Alp, der aus sträflicher Nachlässigkeit eine Kuh hatte 'erdrohlen' lassen.“ (Erzählt: Josef Zgraggen) Die Sage greift das Thema der Sisyphosstrafe auf und warnt davor, „sträflich nachlässig“ zu sein. Literatur und Weblinks Theodor Vernaleken: Alpensagen. Volksüberlieferungen aus der Schweiz, aus Vorarlberg, Kärnten, Steiermark, Salzburg, Ober- und Niederösterreich. Seidel, Wien 1858, (Digitalisat). Josef Müller: Sagen aus Uri. Aus dem Volksmunde gesammelt. Band 1–2: (= Schriften der Schweizerische Gesellschaft für Volkskunde. Bd. 18, 20, ). Herausgegeben und mit Sachregister und Anmerkungen versehen durch Hanns Bächtold-Stäubli. Schweizerische Gesellschaft für…"} {"instruction": "Create a Python program which takes two parameters and outputs the difference between them.", "input": "21, 49", "output": "def diff(a, b): \n return abs(a - b) \n \na = 21\nb = 49\n \nprint(diff(a, b)) # Output 28"} {"instruction": "Given a list of strings, create a Python program to find the longest common substring", "input": "strings = [\"cat\",\"car\",\"hat\"]", "output": "def find_longest_common_substring(strings):\n if len(strings) == 0:\n return ''\n elif len(strings) == 1:\n return strings[0]\n else:\n # sort the strings\n strings.sort(key=len)\n\n # take the first string as longest\n longest = strings[0]\n\n for s in strings:\n # check if the first string is a substring of the next string\n if longest in s:\n # if so, keep the longest\n longest = s\n else:\n # if not, find the longest substring \n for i in range(len(longest)):\n if longest[0:len(longest) - i] in s:\n longest = longest[0:len(longest) - i]\n break\n\n return longest"} {"instruction": "Write a VBA code to return the last row where a certain value appears", "input": "Table Name: Employees Column Name: State Value: New York", "output": "Sub FindLastRowNY() LastRow = Range(\"A1\").End(xlDown).Row For i = LastRow To 1 Step -1 If Cells(i, 2).Value = \"New York\" Then MsgBox i Exit Sub End If Next i End Sub"} {"instruction": "Generate a list of 20 strings containing random characters of length 10.", "input": "", "output": "['Kj9F7VAl1q', '28jVYbueph', 'f7VZRif5uP', '2jf5CHXyt7', '3qBtyKjDIY', 'hE5wrRmIP6', 'V7jQcfhIBz', 'UQy6gCwPa5', '6Ujpu7NfMk', 'Z6DFhBoK8e', 'DIFpjgrhT7', 'TzdGsvhRO2', '1Kv4RyZoF8', 'RKjUXviPca', 'yO2PCtEjx1', 'qchomMdP9X', '9ydNHCaTZX', 'TFrhYdgSjp', 'BYeH12I4th', '4XNgJfKCAd']"} {"instruction": "Develop a python program to add two arrays of the same size.", "input": "a = [2, 3, 4]\nb = [5, 6, 7]", "output": "def add_arrays(a, b):\n c = []\n n = len(a)\n for i in range(n):\n c.append(a[i] + b[i])\n return c\n\na = [2, 3, 4]\nb = [5, 6, 7]\nresult = add_arrays(a, b)\nprint(result) # prints [7, 9, 11]"} {"instruction": "Create a Python script to filter a list of numbers by a given filter. The script should use a function that takes a list of numbers and a filter as arguments and returns the filtered list.", "input": "List: [1,2,5,6,-4,7,8]\nFilter: x > 0", "output": "def filterList(nums, filter):\n \n # Initialize a filtered list \n filtered_list = [] \n \n # Iterate over the list \n for num in nums: \n \n # Check if filter is true \n if eval(str(num)+filter): \n filtered_list.append(num) \n \n # Return the filtered list\n return filtered_list\n\nresult = filterList([1,2,5,6,-4,7,8], '> 0')\nprint(result)\n# Output: [1,2,5,6,7,8]"} {"instruction": "Explain what is Closure in Python Programming?", "input": "", "output": "In Python, a closure is a higher order function (a function that takes one or more functions as arguments or returns a function) that allows a function to remember or access the variables or arguments of the enclosing scope—even after the execution of the outer function has finished. A closure is created when a nested function is defined, and an inner function remembers the variables of its enclosing scope even after the execution of the outer function has finished."} {"text": "[DE Wikipedia] Special Olympics Syrien\n\nSpecial Olympics Syrien (englisch Special Olympics Syria) ist der von Syrien gegründete Verband von Special Olympics International mit Sitz in Damaskus. Ziel des Verbandes ist es, das ganze Jahr über Sport für Kinder, Jugendliche und Erwachsene mit geistiger Beeinträchtigung und Mehrfachbehinderung anzubieten, damit sie körperlich fit sind, ihren Mut zeigen können und Freundschaften zu anderen Athleten knüpfen können. Seine Arbeit soll auch die Inklusion fördern. Außerdem betreut der Verband die syrischen Athletinnen und Athleten bei den internationalen Special Olympics Wettbewerben. Geschichte Special Olympics Syrien wurde 1994 gegründet. Seit 1999 nahm der Verband regelmäßig an den MENA-Region Games von Special Olympics teil und war 2010 Gastgeber dieser Spiele, die in Damaskus stattfanden. Aktivitäten Im Jahr 2016 waren 11.656 Athletinnen, Athleten und Unified Partner sowie 539 Trainer in dem Verband registriert. Special Olympics Syrien bietet folgende Sportarten an: Badminton, Basketball, Boccia, Bowling, Floor Hockey, Fußball, Gymnastik, Handball, Judo, Kraftdreikampf, Leichtathletik, Radsport, Reiten, Roller Skating, Schwimmen, Tischtennis und Volleyball. Bei den Special Olympics World Summer Games 2019 traten syrische Athleten zusätzlich in den Sportarten Beach-Volleyball, Tennis und Triathlon an. Der Verband nimmt an dem Programm Athlete Leadership teil, das von Special Olympics International ins Leben gerufen wurde. Teilnahme an vergangenen Weltspielen 1999 Special Olympics World Summer Games, North Carolina, USA 2003 Special Olympics World Summer Games, Dublin, Irland 2005 Special Olympics World Winter Games, Nagano, Japan 2007 Special Olympics World Summer Games, Shanghai, China 2011 Special Olympics World Summer Games, Athen, Griechenland 2015 Special Olympics World Summer Games, Los Angeles, USA (15 Athletinnen und Athleten) 2017 Special Olympics World Winter Games, Graz-Schladming-Ramsau, Österreich 2019 Special Olympics, World Summer Games, Abu Dhabi (98 Athletinnen und Athleten) Teilnahme an den Special Olympics World Summer Games 2023 in Berlin Der Verband Special Olympics Syrien nahm an den Special Olympics World Summer Games 2023 in Berlin teil. Arendsee (Altmark) betreute die Delegation aus Syrien vor den Spielen im Rahmen des Host Town Programs. Die Delegation bestand aus 40 Personen. Das Team gewann bei diesen Weltspielen sieben Gold-, acht Silber- und zehn Bronzemedaillen. Erfolgreiche Athletinnen und Athleten (Auswahl) Nina Mohamed Basam Al Rifai, Schwimmen Weblinks Offizielle Website von Special Olympics Syrien Einzelnachweise Syrien Sportverband (Syrien) Behindertensport (Syrien) Organisation (Damaskus) Gegründet 1994 Sport (Damaskus) Nationaler Sportverband"} {"instruction": "Write a Java program to print the sum of all integers from 1 to given integer.", "input": "integer = 5", "output": "public class SumIntegers { public static void main(String[] args) { int n = 5; int sum = 0; for (int i = 1; i <= n; i++) { sum += i; } System.out.println(\"Sum of integers from 1 to \"+n+\": \"+sum); } } // Output: Sum of integers from 1 to 5: 15"} {"instruction": "Explain why the result of the following code is 4.", "input": "x = 2 x = x+x", "output": "The result of the code is 4 because in the second statement, the value of x is modified to equal twice its original value (2 + 2 = 4)."} {"instruction": "Write Python code to replace all the vowels with underscore.", "input": "string = \"Hello World!\"", "output": "string = \"Hello World!\" vowels = [\"a\", \"e\", \"i\", \"o\", \"u\"] def replace_vowels_with_underscore(string): result = \"\" for char in string: if char in vowels: result += \"_\" else: result += char return result print(replace_vowels_with_underscore(string)) # Output: \"H_ll_ W_rld!\""} {"instruction": "Generate a random list of numbers ranging from 1 to 10 without duplicates in Python.", "input": "Not applicable", "output": "import random\n\n# Generate a list of numbers ranging from 1 to 10 without duplicates\nnumbers = list(range(1,11))\nrandom.shuffle(numbers)\n\n# Print shuffled numbers\nprint(numbers)"} {"text": "[CS Wikipedia] Matthias Müller\n\nMatthias Müller (* 12. září 1982, Švýcarsko) je švýcarský reprezentant v orientačním běhu, jenž v současnosti žije ve švýcarském Winterthuru. Jeho největším úspěchem je mistrovský titul ze sprintu na Mistrovství světa v roce 2010 v Trondheimu. V současnosti běhá za švédský klub Södertälje-Nykvarn a za švýcarský klub Bussola OK, za který startuje ve Skandinávii. Sportovní kariéra Reference Externí odkazy Profil na World of O Švýcarští orientační běžci Narození v roce 1982 Žijící lidé Muži Narození 12. září"} {"instruction": "Split a string by a number greater than the length of the string in Python.", "input": "string = \"Hello World\"", "output": "split_string = string[:11] print(split_string) # Output = \"Hello World\""} {"instruction": "Generate a valid HTML tag that can be used to link to an external website.", "input": "", "output": "Link to Website"} {"instruction": "Create a function in Python that removes duplicates from a list of items.", "input": "[1, 2, 3, 2, 4, 1]", "output": "def remove_duplicates(items):\n no_duplicates = []\n for item in items:\n if item not in no_duplicates:\n no_duplicates.append(item)\n return no_duplicates\n\nitems = [1, 2, 3, 2, 4, 1]\n\nresult = remove_duplicates(items)\n\nprint(result) # [1, 2, 3, 4]"} {"text": "[EN Wikipedia] Gmina Trojanów\n\nGmina Trojanów is a rural gmina (administrative district) in Garwolin County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Trojanów, which lies approximately 27 kilometres (16 mi) south-east of Garwolin and 81 km (50 mi) south-east of Warsaw. The gmina covers an area of , and as of 2006 its total population is 7,757. Villages Gmina Trojanów contains the villages and settlements of Babice, Budziska, Damianów, Dębówka, Derlatka, Dudki, Elżbietów, Jabłonowiec, Korytnica, Kozice, Kruszyna, Majdan, Mika, Mościska, Mroków, Ochodne, Piotrówek, Podebłocie, Prandocin, Ruda, Skruda, Trojanów, Więcków, Wola Korycka Dolna, Wola Korycka Górna, Wola Życka, Żabianka and Życzyn. Neighbouring gminas Gmina Trojanów is bordered by the gminas of Kłoczew, Maciejowice, Ryki, Sobolew, Stężyca and Żelechów. External links Polish official population figures 2006 Trojanow Garwolin County"} {"instruction": "Create a loop that prints each letter in the given string one by one on a new line.", "input": "string str = \"Hello World\"", "output": "for i in str: print(i)"} {"instruction": "Create a HTTP GET request in Python to retreive an API request.", "input": "", "output": "import requests\n\nurl = \"https://example.com\"\n\n# Send Get request to the API\nresponse = requests.get(url)\n\n# Store the response text\nresponse_text = response.text"} {"text": "[DE Wikipedia] Helmut Wöstmann\n\nHelmut Wöstmann, auch Helmut Woestmann (* 1. Juli 1931 in Osnabrück) ist ein deutscher Schauspieler, Hörspiel- und Off-Sprecher. Leben und Wirken Wöstmann hatte nach seiner Schauspielausbildung sein Theaterdebüt 1953 in seiner Heimatstadt Osnabrück gegeben. Anschließend folgten Verpflichtungen, die ihn nach Erfurt (damals DDR), Bonn, Saarbrücken und Darmstadt führten. Seitdem band er sich nicht mehr an ein festes Ensemble, sondern war freischaffend tätig. Für den Hörfunk war Helmut Wöstmann ebenso häufig tätig wie für das Fernsehen, das seit Mitte der 1960er Jahre zunehmend an Bedeutung gewann. Dort erhielt Wöstmann überwiegend Nebenrollen, Hauptrollen wie in Sabina Englender (1968) waren die Ausnahme. Während er in den vergangenen Jahrzehnten von dort keine Angebote mehr erhielt, machte sich Wöstmann vor allem in den späten Jahren einen Namen als Hörbuchsprecher und als Off-Sprecher von Dokumentarfilmen, darunter Menschen und Straßen: Alaskas Dalton Highway (2006), Izbica -- Drehkreuz des Todes (2007) und Hunger (2009). Aus der Ehe mit der Schauspielerin Vera Schult hat Helmut Wöstmann einen Sohn. Filmografie 1965: Ankunft bei Nacht 1966: Großer Ring mit Außenschleife 1967: Der Tag, an dem die Kinder verschwanden 1967: Der falsche Prinz 1968: Sabina Englender 1968: Anna Böckler 1969: Kollege Bindelmann 1969: Saids Schicksale 1969: Stewardessen (TV-Serie, eine Folge) 1969: Sie schreiben mit – Folge: Der Zeitungsverkäufer (TV-Serie) 1970: Die große Familie 1970: Recht oder Unrecht (TV-Serie, eine Folge) 1972: Tatort: Wenn Steine sprechen 1974: Tatort: Playback oder die Show geht weiter 1976: Sonntag 1977: Räuber und Gendarm 1978: Das Einhorn 1979: Parole Chicago (TV-Serie, eine Folge) 1980: Leiche auf Urlaub 1981: Histoires de voyous: Opération Primevère 1984: Ich, Christian Hahn (TV-Serie, eine Folge) 1988: Die Schwarzwaldklinik (TV-Serie, eine Folge) Hörfunk-Feature 2007: Thomas Gaevert: Kundschafterin im Auftrag des Sozialismus – Die Geschichte der Gabriele Gast. Prod.: SWR2 Dschungel, 25 Min. Weblinks Kundschafterin im Auftrag des Sozialismus Hörspiele-Übersicht I Hörspiele-Übersicht II Theaterschauspieler Person (Hörfunk) Hörspielsprecher Filmschauspieler Off-Sprecher Deutscher Geboren 1931 Mann"} {"instruction": "Use the given code to extract date information from sentences. The code includes helper functions to normalize annotations, split sentences, tag parts of speech, find key verbs, and extract date information using DBpedia. To use the code, call the main function with appropriate arguments.", "input": "", "output": "from subprocess import *\nimport re\nimport treetaggerwrapper\nimport sparqlQuerypy\nfrom bs4 import BeautifulSoup\n\nCONSTANTKEYVERBS=\"die, died, death, born, birth, sworn in\" #Set of words that if present in the sentence, then don't discard the sentence, we are interested.\ntagger = treetaggerwrapper.TreeTagger(TAGLANG = 'en', TAGDIR = '/home/vedu29/python/Gsoc/treetagger')\n\n\ndef jarWrapper(*args): # The helper function to use the jar file.\n process = Popen(['java', '-jar']+list(args), stdout=PIPE, stderr=PIPE)\n ret=[]\n while process.poll() is None:\n line = process.stdout.readline()\n if line != '' and line.endswith('\\n'):\n ret.append(line[:-1])\n stdout, stderr = process.communicate()\n ret += stdout.split('\\n')\n if stderr != '':\n ret += stderr.split('\\n')\n ret.remove('')\n return ret\n\ndef returnProperty(word): #helper function to map the verb to a property. This will be small considering the number of date properties in DBpedia.\n if word in ['death', 'die']: return 'http://dbpedia.org/ontology/deathDate'\n if word in ['birth', 'born', 'bear']: return 'http://dbpedia.org/ontology/birthDate'\n\n\ndef normalizeAnnotations(sentence): # helper function to remove the references annotation, that appear as square brackets at the end of the sentence.\n return re.sub(r'\\[[0-9]*\\]', ' ', sentence)\n\ndef sentenceSplitter(sentence): # helper regular function to correctly find end of sentences.\n return re.split(r'(?', 'TIME', sentence)\n\ndef treetag(sentence, encoding = None): # TreeTagger helper function.\n if encoding != None:\n return treetaggerwrapper.make_tags(tagger.tag_text(unicode(sentence, \"utf-8\")))\n else:\n return treetaggerwrapper.make_tags(tagger.tag_text(sentence))\n\ndef returnKeyverbs(): #formats the key verbs above.\n return '|'.join(verb for verb in CONSTANTKEYVERBS.split(', '))\n\n\ndef findSubVerbsTime(tagsentence): # The main helper function that figures out the subject in the sentence and finds the correct core verbs marked "} {"instruction": "Create a class in Java that can store a list of students and the courses they are enrolled in.", "input": "", "output": "public class StudentList { private ArrayList students; private ArrayList courses; public StudentList() { this.students = new ArrayList(); this.courses = new ArrayList(); } public void addStudent(Student student) { this.students.add(student); } public void addCourse(String course) { this.courses.add(course); } public ArrayList getStudents() { return this.students; } public ArrayList getCourses() { return this.courses; } }"} {"instruction": "Create a function in Python that takes two list of strings as parameters and returns a third list of strings which are the elements common in both lists.", "input": "list1 = [\"apple\", \"orange\", \"banana\", \"cherry\"] list2 = [\"apple\", \"grapes\", \"banana\", \"watermelon\"]", "output": "def common(list1, list2): ans_list = [] for i in list1: for j in list2: if i == j: ans_list.append(i) return ans_list if __name__ == \"__main__\": list1 = [\"apple\", \"orange\", \"banana\", \"cherry\"] list2 = [\"apple\", \"grapes\", \"banana\", \"watermelon\"] print(common(list1, list2)) # ['apple', 'banana']"} {"instruction": "Create a program in Python to merge two dictionaries into a new one.", "input": "Dictionary 1\n`{'name': 'John', 'age': 25}`\n\nDictionary 2\n`{'company': 'Google', 'city': 'New York'}`", "output": "# Dictionaries\ndict1 = {'name': 'John', 'age': 25}\ndict2 = {'company': 'Google', 'city': 'New York'}\n\n# Merge two dictionaries\ndict3 = {**dict1, **dict2}\n\n# Print the merged dictionary\nprint(dict3)\n\n# Output:\n# {'name': 'John', 'age': 25, 'company': 'Google', 'city': 'New York'}"} {"instruction": "Remove all HTML tags from a string.", "input": "\"

      Hello World

      \"", "output": "function stripHTMLTags(str) { return str.replace(/<[^>]*>/g, \"\"); } // Usage stripHTMLTags(\"

      Hello World

      \"); // result: \"Hello World\""} {"text": "[CS Wikipedia] Eugen Michalski\n\nEugen Michalski (, 21. ledna 1897 Letyčiv – 14. října 1937 Kyjev) byl ruský učitel a básník. Dílo Jeho původní díla jsou: La unua ondo Prologo Kantoj de L'amo kaj sopiro Du poemoj Fajro kuracas – má sociální a třídní obsah. Externí odkazy Esperantská literatura Narození v roce 1897 Úmrtí v roce 1937 Muži"} {"instruction": "Write a while loop that adds 1 to the value of ‘var’ each time it is iterated until it reaches 5.", "input": "var = 0", "output": "while var < 5: var += 1"} {"instruction": "Using the JavaScript language, write a code snippet to display the current date.", "input": "", "output": "var today = new Date() var date = today.getDate() + \"/\" + (today.getMonth()+1) + \"/\" + today.getFullYear() console.log(date)"} {"text": "[DE Wikipedia] Hugh Percy Wilkins\n\nHugh Percy Wilkins (geboren am 4. Dezember 1896 in Carmarthen; gestorben am 23. Januar 1960 in Bexleyheath, London) war ein walisischer Ingenieur und Amateur-Astronom. Besonders bekannt wurde er durch seine großen, handgezeichneten Mondkarten. Leben Wilkins wurde in Carmarthen geboren, wo er seine frühe Ausbildung erhielt. Anschließend lebte er in der Nähe von Llanelli, bevor er nach England zog. Während des Ersten Weltkriegs diente er im Royal Army Corps. Er war gelernter Maschinenbauingenieur und Beamter, seine Bekanntheit beruht jedoch auf seinen Leistungen als Amateurastronom, insbesondere als Selenograph. Als Amateurastronom beobachtete Wilkins vor allem von seiner Heimat in Kent aus, zunächst mit 12½-Zoll-Reflektor; später mit einem 15½-Zoll-Reflektor. Er machte auch Beobachtungen mit den Teleskopen an professionellen Observatorien in Europa und den Vereinigten Staaten. Im Jahr 1918 wurde er in die British Astronomical Association gewählt und war von 1946 bis 1956 Direktor der dortigen Lunar Section. Er erstellte eine handgezeichnete, 100 Zoll (2,54 m) große Karte des Mondes, bestehend aus 25 einzelnen Seiten, die zum Zeitpunkt ihrer Veröffentlichung die Karte mit den meisten jemals dokumentierten Details war. Sie enthielt für eine Reihe von Details und Merkmalen auch neue Namen, die Wilkins selbst festgelegt hatte. 1948 beantragte er bei der International Astronomical Union (IAU) die Annahme von 22 von ihm festgelegten, neuen Namen. Seine Vorschläge wurden abgelehnt mit der Begründung, dass diese Merkmale sehr klein waren, oder bereits Buchstabenbezeichnungen trugen. Die Karte wird im Royal Greenwich Observatory aufbewahrt; wurde aber zur Feier des 50-jährigen Jubiläums der Mondlandung von Apollo 11 gerahmt und 2019 in der Sonderausstellung zum Mond gezeigt. Im Jahr 1951 veröffentlichte er eine Mondkarte mit einem Durchmesser von 300 Zoll (7,62 m), die von einigen als „der Höhepunkt der Kunst der Selenographie vor dem Weltraumzeitalter“ angesehen wurde. Seine Karten waren sehr detailreich, jedoch waren einige Details frei erfunden, was sie weniger nützlich machte. In den Jahren 1952 und 1955 stellte er zusätzliche Anfragen an die IAU, die jedoch auch abgelehnt wurden. Jedoch wurden Namen, die Wilkins auf seiner 1926 erstellten Karte vergeben hatte später, im Jahr 1935, doch Teil der Mondnomenklatur, nämlich die Krater Goodacre und Mee. Wilkins besuchte viele Jahre lang Astronomie-Abendkurse im Crayford Manor House in Crayford, wo im Observatorium weiterhin eine Kopie seiner 300-Zoll-Karte verwendet wurde. Er veröffentlichte eine Reihe von Büchern zur Popularisierung der Astronomie, darunter zwei Werke in Zusammenarbeit mit Sir Patrick Moore. Das bemerkenswerteste war sein Werk Der Mond, das seine gezeichnete Mondkarte beinhaltete. Wilkins…"} {"instruction": "Generate a random boolean value using JavaScript.", "input": "", "output": "# Using JavaScript: let boolean = Math.random() >= 0.5; console.log(boolean);"} {"instruction": "Create a Python program to split a given string into two parts according to a given character.", "input": "Str = \"apple-banana-orange\"\nChar = \"-\"", "output": "def split_string(s, char):\n new_list = s.split(char)\n return new_list\n\nresult = split_string(\"apple-banana-orange\", \"-\")\nprint(result)"} {"instruction": "Create a Node.js server which serves a static HTML page.", "input": "", "output": "// Import the necessary modules const http = require('http'); const fs = require('fs'); // Create a simple server which serves a static HTML page http.createServer((req, res) => { fs.readFile('./index.html',(err, data) => { res.writeHead(200, {'Content-Type': 'text/html'}); res.write(data); res.end(); }); }).listen(3000);"} {"instruction": "Write a shell script to perform a binary search of an array", "input": "[2, 3, 6, 8, 10], 8", "output": "#!/bin/bash arr=(2 3 6 8 10) target=8 function binary_search() { left=0 right=${#arr[@]}-1 while [ $left -le $right ] do mid=$(( ($left+$right)/2 )) if [ ${arr[$mid]} -eq $target ] then echo \"Number found at position: $(($mid+1))\" return elif [ ${arr[$mid]} -lt $target ] then left=$(($mid + 1)) else right=$(($mid - 1)) fi done echo \"Number not found!\" } binary_search ${arr[@]} $target"} {"instruction": "Build a web service in Python that performs sentiment analysis on a passed string using the TextBlob library. The web service should return a JSON object containing the sentiment score between -1 and 1.", "input": "Not applicable", "output": "from flask import Flask, request, jsonify\nfrom textblob import TextBlob\n\napp = Flask(__name__)\n\n@app.route('/sentiment/analyze', methods=['POST'])\ndef sentiment():\n request_data = request.get_json()\n sentence = request_data['sentence']\n blob = TextBlob(sentence)\n sentiment = blob.sentiment.polarity\n response_object = {\n 'sentiment': sentiment\n }\n return jsonify(response_object)\nif __name__ == '__main__':\n app.run()"} {"instruction": "Develop a Python script that augments a given sentence with additional data from a given dictionary.", "input": "Sentence: \"I went to the store.\"\nDictionary: {\"Noun\": [\"apple\", \"banana\", \"orange\"], \"Verb\": [\"bought\"]}", "output": "sentence = \"I went to the store.\"\n\ndictionary = {\"Noun\": [\"apple\", \"banana\", \"orange\"], \"Verb\": [\"bought\"]}\n\nwords = sentence.split()\n\nfor i, word in enumerate(words):\n if word in dictionary[\"Noun\"]:\n words[i] += \"s\"\n\nif words[-1] == \"store.\":\n words[-2] = dictionary[\"Verb\"][0]\n\nnew_sentence = \" \".join(words)\n\nprint(new_sentence)\n\n# Output: I bought apples at the store."} {"instruction": "What should this Python program do?", "input": "def is_palindrome(s):\n '''Write your code here.'''", "output": "def is_palindrome(s):\n '''This function returns True if the string s is a palindrome and False if it isn't.''' \n return s == s[::-1] # Checks if s is the same as its reverse."} {"instruction": "Create a MySQL query to delete all the entries with the name \"John\" in the table \"users\".", "input": "", "output": "DELETE FROM users WHERE name=\"John\";"} {"instruction": "Create a Python script to scrape a website to extract the text from all the web-pages.", "input": "", "output": "import requests\nfrom bs4 import BeautifulSoup\n\ndef scrape_website(url):\n # sending get request and saving the response as response object \n r = requests.get(url) \n \n # extracting data in json format \n data = r.text\n soup = BeautifulSoup(data, 'html.parser')\n \n contents = soup.find_all('p')\n for content in contents:\n print(content.text)\n\nscrape_website(\"https://example.com\")"} {"instruction": "Write a C++ program to generate Fibonacci numbers up to a maximum of n values.", "input": "n = 20", "output": "#include int main() { int n = 20; int a = 0, b = 1, c; std::cout << a << \" \" << b << \" \"; for (int i = 2; i < n; ++i) { c = a + b; std::cout << c << \" \"; a = b; b = c; } return 0; }"} {"text": "[CS Wikipedia] Serie A 2014/2015\n\nSoutěžní ročník Serie A 2014/15 byl 113. ročník nejvyšší italské fotbalové ligy a 83. ročník od založení Serie A. Soutěž začala 30. srpna 2014 a skončila 31. května 2015. Účastnilo se jí opět 20 týmů z toho 17 se kvalifikovalo z minulého ročníku. Poslední tři týmy předchozího ročníku, jimiž byli Calcio Catania, Bologna FC 1909 a poslední tým ročníku - AS Livorno Calcio, sestoupily do druhé ligy. Opačným směrem putovaly US Città di Palermo (vítěz druhé ligy), Empoli FC a AC Cesena, která po obsazení 4. místa v ligové tabulce, zvítězila v play-off. Titul v soutěži obhajoval opět Juventus FC, který v minulém ročníku získal již 30. prvenství v soutěži a třetí v řadě. Přestupy hráčů Složení ligy v tomto ročníku Tabulka Poznámky Z = Odehrané zápasy; V = Vítězství; R = Remízy; P = Prohry; VG = Vstřelené góly; OG = Obdržené góly; B = Body 1 Janov CFC si vybojovala účast v Evropské lize. Jenže nebyla ji udělena licence UEFA. 2 Parma FC přišla během sezóny o 7 bodů za nezaplacené mzdy. Střelecká listina Nejlepším střelcem tohoto ročníku Serie A se staly dva hráči. Argentinský útočník Mauro Icardi z klubu FC Inter Milán a italský útočník Luca Toni z klubu Hellas Verona FC. Oba vstřelili 22 branek. Vítěz Odkazy Reference Externí odkazy Serie A Fotbal v Itálii v roce 2014 Fotbal v Itálii v roce 2015"} {"instruction": "Generate a list that has the all even numbers between 1 and 50, inclusive.", "input": "", "output": "even_nums_list = [x for x in range(1,51) if x % 2 == 0]"} {"instruction": "Design a class in Python to store a student's name, age and subject of interest.", "input": "", "output": "class Student:\n def __init__(self, name, age, subject):\n self.name = name\n self.age = age\n self.subject = subject"} {"instruction": "Write a code in Python to toggle all characters in a string.", "input": "The string is: \"Hello World!\"", "output": "s = \"Hello World!\" res = \"\" for char in s: if char.islower(): res += char.upper() elif char.isupper(): res += char.lower() print(res)"} {"instruction": "Create a Python function that checks whether a given list contains any repeated elements.", "input": "", "output": "def has_duplicates(arr): \n # Create an empty set \n s = set() \n \n # Traverse through the list \n for item in arr:\n # If the element is present \n # in the set then it is a duplicate \n if item in s:\n return True \n else:\n s.add(item) \n\n # No duplicate element found \n return False"} {"text": "[CS Wikipedia] Jakub Bitman\n\nJakub Bitman (* 22. července 1988) je český badmintonista, šestnáctinásobný mistr ČR v badmintonu, jeden z nejúspěšnějších českých hráčů v historii. Úspěchy 24násobný juniorský Mistr ČR šestinásobný mistr ČR smíšených družstev (2006, 2009, 2012, 2015, 2017, 2018) trojnásobný mistr ČR ve čtyřhře (2009 – 2011) 11násobný mistr ČR ve smíšené čtyřhře (2010 – 2020) vicemistr ČR ve dvouhře (2013, 2014) vítěz Polish International 2018 ve smíšené čtyřhře vítěz na Slovak Open (2012, 2013, 2016) – smíšená čtyřhra vítěz Slovak Open (2007) - čtyřhra vítěz Czech International (2017,2019) ve smíšené čtyřhře 2. místo MMČR 2013 ve smíšené čtyřhře 2. místo na Hungarian International 2012, 2014 – smíšená čtyřhra 2. místo na Slovak Open 2012 – dvouhra Jakub Bitman a Alžběta Bášová se kvalifikovali ve smíšené čtyřhře na mistrovství světa 2013 v čínském Kantonu. Externí odkazy Osobní stránky Čeští badmintonisté Mistři České republiky v badmintonu Narození 22. července Narození v roce 1988 Narození v Praze Žijící lidé Muži"} {"text": "[EN Wikipedia] Sökündüzü, Ergani\n\nSökündüzü is a neighbourhood in the municipality and district of Ergani, Diyarbakır Province in Turkey. Its population is 195 (2022). References Neighbourhoods in Ergani District"} {"instruction": "Create a python program that calculates the total cost of an item given the quantity and price.", "input": "Quantity: 5, Price: 10", "output": "def calcTotalCost(quantity, price):\n totalCost = quantity * price\n return totalCost\n\nresult = calcTotalCost(5, 10)\nprint(result)"} {"instruction": "Write a JavaScript function to print a specific pattern.", "input": "", "output": "function printPattern(n) { for (var i = 1; i <= n; i++) { for (var j = 1; j <= i; j++) { document.write(j + \" \"); } document.write(\"
      \"); } } printPattern(7);"} {"instruction": "Create a program to find the frequency of characters in a given string in Python.", "input": "Example string: \"abbccccdddde\"", "output": "def find_character_frequency(string):\n freq = {} \n for i in string: \n if i in freq: \n freq[i] += 1\n else: \n freq[i] = 1\n return freq\n \n# example\nstring = \"abbccccdddde\"\nprint(find_character_frequency(string))\n# Output: {'a': 1, 'b': 2, 'c': 4, 'd': 4, 'e': 1}"} {"instruction": "Optimize this code in Python to reduce the time complexity from O(n^2) to O(nlogn).", "input": "def maximum_two(arr):\n m1 = m2 = float('-inf')\n for n in arr:\n if n > m2:\n if n > m1:\n m1, m2 = n, m1\n else:\n m2 = n\n\n return (m1, m2)", "output": "def maximum_two(arr):\n arr.sort(reverse=True) \n m1 = arr[0] \n m2 = arr[1]\n return (m1, m2)"} {"instruction": "Modify the following SQL query to list all the job titles that start with the letter \"A\".", "input": "", "output": "SELECT * FROM jobs WHERE job_title LIKE 'A%';"} {"instruction": "Create a class in Python which contains three attributes and a method.", "input": "", "output": "class MyClass: def __init__(self, x, y, z): self.x = x self.y = y self.z = z def get_values(self): return self.x, self.y, self.z"} {"instruction": "Design an algorithm to swap two numbers in Python.", "input": "Swap 10 and 20", "output": "def swapNumbers(a, b): temp = a a = b b = temp print(\"After swapping: a =\", a, \" b =\", b) # Driver program a = 10 b = 20 swapNumbers(a, b)"} {"instruction": "Create a CSS rule for making all text elements bold.", "input": "", "output": "* { font-weight: bold; }"} {"instruction": "Design a class in C# to store employee details.", "input": "", "output": "public class Employee { public string Name; public int Age; public string Department; public int Salary; public Employee(string name, int age, string department, int salary) { Name = name; Age = age; Department = department; Salary = salary; } }"} {"instruction": "Write a SQL query to fetch the name of employees and the sum of their salaries from the database.", "input": "", "output": "SELECT name, SUM(salary) FROM employees GROUP BY name;"} {"instruction": "Explain the concept of parameter estimation in machine learning.", "input": "", "output": "Parameter estimation is the process of determining the optimal values for the parameters of a machine learning algorithm. The values that produce the best performance on the training data are typically used as the parameters for the model. By optimizing the parameters, the model can fit the data more accurately and lead to improved generalization performance. Parameter estimation can involve manual tuning, or the use of automated techniques such as grid search or stochastic optimization."} {"text": "[EN Wikipedia] Aleksandr Gvardis\n\nAleksandr Petrovich Gvardis (; born March 2, 1965) is a retired Russian football referee. He became a FIFA international referee in 2003, and his last known activity as a referee was in 2010. He lives in Kaliningrad and is a businessman. He has refereed games in the qualification rounds for the UEFA Champions League and UEFA Cup, as well as 2010 World Cup qualifiers. He is currently the executive director of the Russian First Division club FC Baltika Kaliningrad. References External links 1965 births Living people Sportspeople from Kaliningrad Russian football referees"} {"text": "[CS Wikipedia] Padesát odstínů (filmová série)\n\nFilmová trilogie Padesát odstínů je zpracováním stejnojmenné knižní předlohy americké autorky E. L. James. Tři filmy (Padesát odstínů šedi, 2015; Padesát odstínů temnoty, 2017 a Padesát odstínů svobody, 2018) byly natočeny ve spolupráci s autorkou i jejím manželem, který natočil dva poslední díly. Nejúspěšnějším filmem byl první díl, který vydělal na celosvětových tržbách 571 milionů dolarů, celkově k 6. dubnu 2018 vydělala trojice těchto filmů téměř 1,325 miliardy dolarů (v průměru téměř 442 milionů dolarů na každý film) a stala se tak jednou z komerčně nejúspěšnějších sérií snímků tohoto žánru vůbec. Děj Filmová trilogie zpracovává příběh studentky anglické literatury Anastasie Steelové a miliardáře Christiana Greye na pozadí neortodoxních erotických choutek a záliby v BDSM praktikách. Zpočátku sobecký a nepřístupný Grey, který Anu pouze využívá však stále více podléhá svým probuzeným citům a stává se romantickým a přístupným. Příběh završí svatba a naznačené spokojené manželství původně nesourodého páru. Obsazení V hlavních rolích se ve všech třech filmech objevuje herečka Dakota Johnson jako Anastasie Steelová a herec Jamie Dornan jako Christian Grey. Odkazy Reference Externí odkazy Údaje o výdělcích filmů na webu Box Office Mojo Americké filmy Filmové série"} {"instruction": "Convert the following pseudocode into a JavaScript program.", "input": "Input: A, B Output: maximum of A and B", "output": "function max(A, B) { if (A > B) { return A; } else { return B; } };"} {"instruction": "You need to write a Python code to revert a given list back to its original form.", "input": "my_list = [3, 2, 1, 4]", "output": "my_list = my_list[::-1]"} {"instruction": "Write a Python program to check if a string contains any special characters.", "input": "CS 1501", "output": "def has_special_characters(s): special_characters = '!@#$%^&*()_+-=[]{};:,.<>/?' for char in special_characters: if char in s: return True return False"} {"text": "[CS Wikipedia] Výkon\n\nVýkon je skalární fyzikální veličina, která vyjadřuje množství práce vykonané za jednotku času. Rozlišuje se průměrný výkon, který se vztahuje k určitému časovému intervalu, a okamžitý výkon, který se vztahuje k určitému časovému okamžiku. Množství energie spotřebované za jednotku času se označuje jako příkon. Vzájemný poměr výkonu a příkonu vyjadřuje poměrnou fyzikální veličinu nazývanou účinnost, která se často vyjadřuje v procentech (poměr násobený 100). Značení Označení veličiny: P z anglického power Jednotka SI: watt (= J·s−1), značka jednotky: W Další jednotky: koňská síla, kalorie za sekundu Výpočet Průměrný výkon je podílem celkové práce a doby , za kterou byla práce vykonána, tzn. Okamžitý výkon získáme jako derivaci práce podle času, tzn. Teorie systémů Pro účely modelování výkonově kauzálních systémů se zavedly pojmy úsilí a tok, kde součin jejich veličin má být přímo výkon. Obecně však taková funkce musí mít totální diferenciál, jinak je potřeba ještě další faktor k přenásobení. Mechanický výkon Mechanický výkon je mechanická práce vykonaná za jednotku času. Stroj, který má větší výkon, vykoná za stejný čas více práce. Pro výpočet výkonu P během práce, při které působí stálá síla F působící na těleso pohybující se stálou rychlostí v, platí: , kde označuje složku síly ve směru pohybu (tečná složka síly) a je úhel mezi vektorem rychlosti a vektorem působící síly. V případě rotačního pohybu (M je moment síly, ϖ je úhlová rychlost) lze získat vztah Elektrický výkon Stejnosměrný elektrický výkon se spočítá jako součin napětí a proudu, což plyne z toho, že změnu práce lze vyjádřit jako změnu elektrického náboje při daném napětí, tzn. , odkud získáme kde Q je elektrický náboj, U je napětí a I je proud. U střídavého výkonu je výpočet složitější, protože závisí kromě velikosti napětí a proudu také na tvaru signálu a vzájemném fázovém posuvu napětí a proudu. Proto se do výpočtu přidává násobení členem cos , což je tzv. účiník. Starší jednotky Dříve se pro udávání výkonu používala jednotka koňská síla – zkratka k (kůň) nebo HP (z anglického \"horsepower\"). Dnes přežívá v udávání výkonu spalovacích motorů, správnější je ovšem použití jednotky kilowatt. Existuje více definic, tzv. metrická koňská síla (1 HP) odpovídá přibližně 735 W. Související články Účinnost Transformátor Gyrátor Kapacitor Externí odkazy Fyzikální veličiny Dynamika Elektrotechnika Energie"} {"text": "[DE Wikipedia] Vincent-Froideville\n\nVincent-Froideville ist eine französische Gemeinde mit Einwohnern (Stand ) im Département Jura in der Region Bourgogne-Franche-Comté. Sie gehört zum Kanton Bletterans im Arrondissement Lons-le-Saunier. Sie entstand als Commune nouvelle am 1. April 2016 aus den bisherigen Gemeinden Vincent und Froideville. Nachbargemeinden sind La Chaux-en-Bresse im Nordwesten, Bois-de-Gand im Norden, Recanoz im Nordosten, Lombard im Osten, Ruffey-sur-Seille im Süden, Desnes im Südwesten und Commenailles im Westen. Gliederung Weblinks Einzelnachweise Ort in Bourgogne-Franche-Comté Gemeindegründung 2016"} {"instruction": "Create a class in Python to convert raw text into a structured format.", "input": "", "output": "class TextParser: \n \"\"\"A class in Python to convert raw text into a structured format\"\"\"\n \n def __init__(self, text):\n self.text = text\n\n def parse(self):\n \"\"\"This method will parse the given text and return it in a structured format\"\"\"\n # initialize an empty output array\n output = []\n # loop over the lines in the text\n for line in self.text.split('\\n'):\n # split each line into it’s individual words separated by spaces\n words = line.split(' ')\n # add each line to the output array\n output.append(words)\n\n return output"} {"instruction": "Generate a list of odd numbers from 80 to 100.", "input": "", "output": "[81, 83, 85, 87, 89, 91, 93, 95, 97, 99]"} {"instruction": "Edit this HTML structure to add a footer at the bottom.", "input": " My Website ", "output": " My Website

      Copyright © 20"} {"text": "[CS Wikipedia] Prima Krimi\n\nPrima Krimi je kanál FTV Prima, který byl spuštěn 2. dubna 2018, na Velikonoční pondělí. Je zaměřený na nejrůznější zahraniční seriály a filmy, jako například Vraždy v Midsomeru, Sběratelé kostí, Castle na zabití, Námořní vyšetřovací služba L. A. nebo American Crime Story. Generální ředitel FTV Prima Marek Singr řekl, že si od nového kanálu slibuje větší tematickou rozmanitost kanálů skupiny. Kanál Prima Krimi ovlivnil především Prima Love, další kanál skupiny, který se začal zaměřovat více na ženské seriály a telenovely, přičemž detektivky jsou zastoupeny na Prima Krimi. Prima Krimi vysílá celoplošně v Multiplexu 22. Program je zařazen do většiny kabelových sítí, IPTV i satelitních platforem. Program American Crime Story (American Crime Story) Anatomie lži (Lie to me) Castle na zabití (Castle) Barva moci (Shots Fired) Big Ben (Big Ben) Closer: Nové případy (Major Crimes) Jake a tlusťoch (Jake and the Fatman) Julie Lescautová (Julie Lescaut) Myšlenky zločince (Criminal Minds) Námořní vyšetřovací služba L. A. (NCIS: Los Angeles) Odpadlík (Regenade) Policie – New York (NYPD Blue) Policie v akci USA (Cops) Rizzoli & Isles: Vraždy na pitevně (Rizzoli & Isles) Sběratelé kostí (Bones) Sherlock Holmes: Jak prosté (Elementary) Siska (Siska) Vraždy v Midsomeru (Midsomer Murders) Vraždy v Oxfordu (Lewis) Vražedné Miami (Rosewood) Odkazy Reference FTV Prima"} {"instruction": "Create a Python script to read CSV data and store the data in a Pandas DataFrame.", "input": "", "output": "import pandas as pd\n\n# Read CSV data\ndata = pd.read_csv(\"data.csv\")\n\n# Store data to DataFrame\ndf = pd.DataFrame(data)"} {"instruction": "Sort the given list of employee names alphabetically (A-Z).", "input": "employee_names = ['John', 'Lisa', 'Emily', 'Mia']", "output": "employee_names = ['John', 'Lisa', 'Emily', 'Mia'] sorted_employees = sorted(employee_names) print(sorted_employees)"} {"instruction": "Create a python function to count the number of unique elements from a given list.", "input": "arr = [1, 4, 2, 1, 5, 4, 3]", "output": "def count_unique_elements(arr):\n unique_elements = set(arr)\n return len(unique_elements)\n \nif __name__ == '__main__':\n arr = [1, 4, 2, 1, 5, 4, 3]\n print(count_unique_elements(arr))"} {"instruction": "Create a random forest model using Python to predict the type of wine from given data.", "input": "", "output": "import pandas as pd\nfrom sklearn.ensemble import RandomForestClassifier\n\n# create data\nwine_data = pd.read_csv('wine.csv')\n# set features\nfeatures = ['alcohol', 'type', 'sulphates', 'pH', 'quality']\nx_train = wine_data[features]\ny_train = wine_data['type']\n\n# create model\nmodel = RandomForestClassifier(n_estimators=100)\nmodel.fit(x_train, y_train)\n\n# save model\n# model.save('wine_random_forest.h5')"} {"instruction": "Implement a method in JavaScript to concatenate two strings together.", "input": "", "output": "function concatenate(string1, string2) { return string1 + string2; }"} {"text": "[HI Wikipedia] महाभारत\n\nमहाभारत भारत का एक प्रमुख काव्य ग्रंथ है, जो स्मृति के इतिहास वर्ग में आता है। इसे भारत भी कहा जाता है। यह काव्यग्रंथ भारत का अनुपम धार्मिक, पौराणिक, ऐतिहासिक और दार्शनिक ग्रंथ हैं। विश्व का सबसे लंबा यह साहित्यिक ग्रंथ और महाकाव्य, हिन्दू धर्म के मुख्यतम ग्रंथों में से एक है। इस ग्रन्थ को हिन्दू धर्म में पंचम वेद माना जाता है। यद्यपि इसे साहित्य की सबसे अनुपम कृतियों में से एक माना जाता है, किन्तु आज भी यह ग्रंथ प्रत्येक भारतीय के लिये एक अनुकरणीय स्रोत है। यह कृति प्राचीन भारत के इतिहास की एक गाथा है। इसी में हिन्दू धर्म का पवित्रतम ग्रंथ भगवद्गीता सन्निहित है। पूरे महाभारत में लगभग १,१०,००० श्लोक हैं, जो यूनानी काव्यों इलियड और ओडिसी से परिमाण में दस गुणा अधिक हैं। परंपरागत रूप से, महाभारत की रचना का श्रेय वेदव्यास को दिया जाता है। इसकी ऐतिहासिक वृद्धि और संरचनागत परतों को जानने के लिए कई प्रयास किए गए हैं। महाभारत के थोक को शायद तीसरी शताब्दी ईसा पूर्व और तीसरी शताब्दी के बीच संकलित किया गया था, जिसमें सबसे पुराने संरक्षित भाग ४०० ईसा पूर्व से अधिक पुराने नहीं थे। महाकाव्य से संबंधित मूल घटनाएँ संभवतः 9 वीं और 8 वीं शताब्दी ईसा पूर्व के बीच की हैं। पाठ संभवत: प्रारंभिक गुप्त राजवंश(c. ४ वीं शताब्दी सीई) द्वारा अपने अंतिम रूप में पहुंच गया। महाभारत के अनुसार, कथा को २४,००० श्लोकों के एक छोटे संस्करण से विस्तारित किया जाता है, जिसे केवल भारत कहा जाता है। हिन्दू मान्यताओं, पौराणिक संदर्भो एवं स्वयं महाभारत के अनुसार इस काव्य का रचनाकार वेदव्यास जी को माना जाता है। इस काव्य के रचयिता वेदव्यास जी ने अपने इस अनुपम काव्य में वेदों, वेदांगों और उपनिषदों के गुह्यतम रहस्यों का निरुपण किया हैं। इसके अतिरिक्त इस काव्य में न्याय, शिक्षा, चिकित्सा, ज्योतिष, युद्धनीति, योगशास्त्र, अर्थशास्त्र, वास्तुशास्त्र, शिल्पशास्त्र, कामशास्त्र, खगोलविद्या तथा धर्मशास्त्र का भी विस्तार से वर्णन किया गया हैं। मूल काव्य रचना इतिहास सम्पूर्ण महाभारत कथा (हिंदी)के सभी पर्व व अध्याय स्लोग संख्या सहित महर्षि वेदव्यास को महाभारत पूरा रचने में ३ वर्ष लग गये थे, इसका कारण यह हो सकता है कि उस समय लेखन लिपि कला का इतना विकास नही हुआ था, जितना की आज दिखाई देता है। उस काल में ऋषियों द्वारा वैदिक ग्रन्थों को पीढ़ी दर पीढ़ी परम्परागत मौखिक रूप से याद करके सुरक्षित रखा जाता था। उस समय संस्कृत ऋषियों की भाषा थी और ब्राह्मी आम बोलचाल की भाषा हुआ करती थी। इस प्रकार ऋषियों द्वारा सम्पूर्ण वैदिक साहित्य मौखिक रूप से याद कर पीढ़ी दर पीढ़ी सहस्त्रों वर्षों तक याद रखा गया। फिर धीरे धीरे जब समय के प्रभाव से वैदिक युग के पतन के साथ ही ऋषियों की वैदिक साहित्यों को याद रखने की शैली लुप्त हो गयी तब से वैदिक साहित्य को पाण्डुलिपियों पर लिखकर सुरक्षित रखने का प्रचलन हो गया। यह सर्वमान्य है कि महाभारत का आधुनिक रूप कई अवस्थाओं से गुजर कर बना है। विद्वानों द्वारा इसकी रचना की चार प्रारम्भिक अवस्थाएं पहचानी गयी हैं। ये अवस्थाएं संभावित रचना काल क्रम में निम्न लिखित हैं: प्रारम्भिक अवस्थाएं १२००-६०० ईसा पूर्व ४) सूत जी और ऋषि-मुनियों की इस वार्ता के रूप में कही गयी \"महाभारत\" का लेखन कला के विकसित होने पर…"} {"instruction": "Write a Python script that receives a string from the command line and prints out the string in reverse order.", "input": "\"This is my string.\"", "output": "import sys\n\ninput_string = sys.argv[1]\nprint(input_string[::-1])"} {"text": "[EN Wikipedia] Miss Marple\n\nMiss Jane Marple is a fictional character in Agatha Christie's crime novels and short stories. Miss Marple lives in the village of St. Mary Mead and acts as an amateur consulting detective. Often characterized as an elderly spinster, she is one of Christie's best-known characters and has been portrayed numerous times on screen. Her first appearance was in a short story published in The Royal Magazine in December 1927, \"The Tuesday Night Club\", which later became the first chapter of The Thirteen Problems (1932). Her first appearance in a full-length novel was in The Murder at the Vicarage in 1930, and her last appearance was in Sleeping Murder in 1976. Origins The character of Miss Marple is based on friends of Christie's step grandmother/aunt (Margaret Miller, née West). Christie attributed the inspiration for the character to multiple sources, stating that Miss Marple was \"the sort of old lady who would have been rather like some of my step grandmother's Ealing cronies – old ladies whom I have met in so many villages where I have gone to stay as a girl\". Christie also used material from her fictional creation, spinster Caroline Sheppard, who appeared in The Murder of Roger Ackroyd. When Michael Morton adapted the novel for the stage, he replaced the character of Caroline with a young girl. This change saddened Christie and she determined to give old maids a voice: Miss Marple was born. Christie is popularly believed to have taken the name from Marple railway station, through which she passed, though a letter she wrote to a fan appears to prove that the name was inspired by a visit to a sale at Marple Hall in the same town, near her sister Margaret Watts' home at Abney Hall. Character The character of Jane Marple in the first Miss Marple book, The Murder at the Vicarage, is quite different from how she appears in later books. This early version of Miss Marple is a gleeful gossip and not an especially nice woman. The residents of St. Mary Mead like her but are often tired of her nosy nature and the fact she seems to expect the worst of everyone. In later books, she becomes a kinder person. Miss Marple solves difficult crimes thanks to her shrewd intelligence, and St. Mary Mead, over her lifetime, has given her seemingly infinite examples of the negative side of human nature. Crimes always remind her of a previous incident, although acquaintances may be bored by analogies that often lead her to a deeper realisation about the true nature of a crime. She also has a remarkable ability to latch onto a casual comment and connect it to the case at hand. In several stories, she is able to rely on her acquaintance with Sir Henry Clithering, a retired commissioner of the Metropolitan Police, for official information when required. Miss Marple never married…"} {"instruction": "Parse the following JSON objects, convert all the values to strings and create a dictionary named \"parsed_data\".", "input": "{ \"name\": \"John Doe\", \"age\": 33, \"locations\": [\"NYC\", \"LA\"] }", "output": "import json parsed_data = {} data = { \"name\": \"John Doe\", \"age\": 33, \"locations\": [\"NYC\", \"LA\"] } for key, val in data.items(): parsed_data[key] = str(val)"} {"text": "[HI Wikipedia] केन्द्र-शासित प्रदेश\n\nकेन्द्र शासित प्रदेश या संघ-राज्यक्षेत्र या संघक्षेत्र भारत के संघीय प्रशासनिक ढाँचे की एक उप-राष्ट्रीय प्रशासनिक इकाई है। भारत के राज्यों की अपनी चुनी हुई सरकारें होती हैं, लेकिन केन्द्र शासित प्रदेशों में सीधे-सीधे भारत सरकार का शासन होता है। भारत का राष्ट्रपति हर केन्द्र शासित प्रदेश का एक सरकारी प्रशासक या उप राज्यपाल नामित करता है। वर्तमान में भारत में 8 केन्द्र शासित प्रदेश हैं। भारत की राजधानी नई दिल्ली जो कि दिल्ली नामक केन्द्र शासित प्रदेश भी था और पुडुचेरी को आंशिक राज्य का दर्जा दे दिया गया है। दिल्ली को राष्ट्रीय राजधानी प्रदेश-1992 के तौर पर पुनः परिभाषित किया गया है। दिल्ली व पुदुचेरी दोनो की अपनी चयनित विधानसभा, मंत्रिमंडल व कार्यपालिका हैं, लेकिन उनकी शक्तियाँ सीमित हैं - उनके कुछ कानून भारत के राष्ट्रपति के \"विचार और स्वीकृति\" मिलने पर ही लागू हो सकते हैं। भारत में वर्तमान में निम्नलिखित केन्द्र शासित क्षेत्र हैं :- दिल्ली - यह भारत का राष्ट्रीय राजधानी प्रदेश भी है। अण्डमान और निकोबार द्वीपसमूह चण्डीगढ़ दादरा और नगर हवेली एवं दमन और दीव - 26 नवंबर 2019 को घोषित और 26 जनवरी 2020 से प्रभावी। लक्षद्वीप पुडुचेरी जम्मू और कश्मीर - 5 अगस्त 2019 को घोषित और 31 अक्टूबर 2019 से प्रभावी। लद्दाख - 5 अगस्त 2019 को घोषित और 31 अक्टूबर 2019 से प्रभावी। इन्हें भी देखें भारत के राज्य भारत के राज्य और केन्द्र शासित प्रदेश और उनकी राजधानियाँ सन्दर्भ भारत के उपविभाग भारत के केन्द्र शासित प्रदेश"} {"instruction": "Generate a simple Flask route to handle a GET request.", "input": "", "output": "from flask import Flask app = Flask(__name__) @app.route(\"/myroute\", methods=[\"GET\"]) def myfunc(): # write code here if __name__ == '__main__': app.run()"} {"text": "[DE Wikipedia] Otto Schultz (Medailleur)\n\nOtto Schultz (* 16. Januar 1848; † 13. August 1911) war ein deutscher Medailleur und Münzeisenschneider. Leben Schultz’ Vater war Lokomotivführer. Otto Schultz lernte bei der Albert Wolff und Julius Moser. Er studierte drei Jahre an der Königlichen Akademie in Berlin und war danach sieben Jahre bei Friedrich Wilhelm Kullrich tätig. Später arbeitete er in London, Paris, Bonn und Wien. 1882 machte er sich in Berlin selbstständig und war u. a. für die Berliner Medaillen-Münze tätig. 1889 wurde er Zweiter Medailleur an der Königlichen Münze Berlin, wo er 1902 zum Ersten Medailleur aufstieg. Werke (Auswahl) 1895: Medaille auf die Eröffnung des Nord-Ostsee-Kanals Literatur K. Sommer: Münzen und Medaillen des Medailleurs Otto Schultz. In: money trend. Bd. 5 (1993), S. 4–12. Schultz, Otto. In: Andreas Beyer, Bénédicte Savoy, Wolf Tegethoff (Hrsg.): Allgemeines Künstlerlexikon – Internationale Künstlerdatenbank – Online. K. G. Saur, Berlin, New York 2021. (https://www-1degruyter-1com-1pmntdehj0398.han.wlb-stuttgart.de/database/AKL/entry/_00165097/html. Zugriff: 2023-04-27). Weblinks https://ikmk.smb.museum/ndp/person/184 Einzelnachweise Medailleur Geboren 1848 Gestorben 1911 Mann"} {"text": "[CS Wikipedia] Marisa Mell\n\nMarisa Mell, vlastním jménem Marlies Theres Moitzi (24. února 1939 Štýrský Hradec – 16. května 1992 Vídeň) byla rakouská herečka. Absolvovala vídeňský Max Reinhardt Seminar, v roce 1954 debutovala ve filmu Das Licht der Liebe. Hrála ve zfilmování Švejka, které natočil v roce 1960 západoněmecký režisér Axel von Ambesser, a v koprodukčních filmech Po francouzsku a Casanova '70. Uzavřela smlouvu v Hollywoodu, ale prosadila se především v horrorech, detektivkách a erotických filmech italské produkce nebo v televizním seriálu Mystery Science Theater 3000. Vystupovala v muzikálu Vincente Minnelliho Mata Hari, hrála také v divadle Vienna’s English Theatre, pózovala pro časopis Playboy, věnovala se zpěvu a malířství. Zemřela na rakovinu, jmenuje se po ní ulice Marisa-Mell-Gasse ve vídeňské čtvrti Liesing. Externí odkazy http://marisa-mell.blogspot.cz/ Rakouské herečky Narození v roce 1939 Úmrtí v roce 1992 Ženy Narození 24. února Úmrtí 16. května Narození ve Štýrském Hradci Úmrtí ve Vídni"} {"text": "[DE Wikipedia] Arto Bryggare\n\nArto Kalervo Bryggare (* 26. Mai 1958 in Kouvola) ist ein ehemaliger finnischer Leichtathlet und Olympiateilnehmer. Allgemeines Arto Bryggare gehörte ein Jahrzehnt lang zu den besten 110-Meter-Hürdenläufern Europas. Er war finnischer Meister auf seiner Spezialstrecke von 1977 bis 1987 und dann noch einmal 1992. Sein größter Erfolg war die Silbermedaille 1983 in 13,46 s bei den Heimweltmeisterschaften in Helsinki. Von 1995 bis 1999 und 2003 bis 2007 war Arto Bryggare für die Sozialdemokratische Partei Finnlands Mitglied des finnischen Parlaments. Im Januar 2019 heiratete Bryggare die ehemalige deutsche Leichtathletin Heike Drechsler, mit der er seit 2016 liiert ist. Weitere Erfolge Olympische Spiele Arto Bryggare nahm dreimal an Olympischen Spielen teil: 1980: Platz 6 in 13,76 s 1984: Platz 3 in 13,40 s 1992 schied er im Vorlauf aus. Europameisterschaften Arto Bryggare gewann drei Medaillen bei Freiluft-Europameisterschaften: 1978: Platz 3 in 13,56 s 1982: Platz 3 in 13,60 s 1986: Platz 2 in 13,42 s Erfolge in der Halle Arto Bryggare gewann fünf Medaillen bei Halleneuropameisterschaften im 60-Meter-Hürdenlauf, bzw. 1981 im 50-Meter-Hürdenlauf: 1977 Platz 3 in 7,79 s 1979 Platz 2 in 7,67 s 1981 Platz 1 in 6,47 s 1983 Platz 2 in 7,60 s 1987 Platz 1 in 7,59 s 1987 belegte er bei den Hallenweltmeisterschaften Platz 5 in 7,68 s. Weblinks Einzelnachweise Olympiateilnehmer (Finnland) Teilnehmer der Olympischen Sommerspiele 1980 Teilnehmer der Olympischen Sommerspiele 1984 Teilnehmer der Olympischen Sommerspiele 1992 Finnischer Meister (Leichtathletik) Hürdenläufer (Finnland) Mitglied der Sozialdemokratischen Partei Finnlands Reichstagsabgeordneter (Finnland) Finne Geboren 1958 Mann"} {"instruction": "Describe how language models can be used in natural language processing.", "input": "", "output": "Language models are used in natural language processing to enable machines to understand and generate natural language. Language models assign a probability to a sequence of natural language words to improve the accuracy of predictions in language processing tasks. They are used for automatic speech recognition, machine translation, text summarization, essay grading, and natural language understanding."} {"instruction": "Generate a correct JavaScript program to convert a string into an array", "input": "s = \"hello world\";", "output": "//function to split a string into an array function stringToArray(s) { return s.split(' '); } //create a string s = \"hello world\"; //convert string to array array = stringToArray(s); //print the array console.log(array);"} {"text": "[CS Wikipedia] Autorské právo\n\nAutorské právo (anglicky ) je odvětví práva, které se zabývá právními vztahy uživatelů a tvůrců tzv. „autorských děl“ k příslušným dílům. Tvůrci mohou být například spisovatelé, hudebníci, filmaři, architekti, urbanisté a programátoři apod. Prostřednictvím autorského práva stát poskytuje autorům po jistou omezenou dobu určitá výlučná práva k jejich dílu. Autorské právo je součástí tzv. duševního vlastnictví. Autorské právo nechrání samotné myšlenky či ideje; chrání pouze konkrétní díla, konkrétní vyjádření takových myšlenek, dílo v objektivně vnímatelné podobě. Autorským dílem je pouze jedinečný výsledek tvůrčí činnosti autora, dílem není námět, zpráva, informace, metoda, teorie, vzorec, graf, tabulka fyzikálních konstant, výstup počítačového programu apod. samy o sobě. Vedle autorského práva v užším smyslu jsou chráněna také tzv. práva související s právem autorským, kam patří práva výkonného umělce k vlastnímu výkonu, práva výrobců zvukových a zvukově obrazových záznamů, právo rozhlasového a televizního vysílatele a právo nakladatele. Obdobná je také ochrana databáze. Autorské právo je v Česku upraveno autorským zákonem (zákon č. 121/2000 Sb. ve znění pozdějších novelizací), v mezinárodním právu je základem několik mezinárodních úmluv, hlavně tzv. Bernská úmluva z roku 1886 a Všeobecná úmluva o autorském právu uzavřená v Ženevě v roce 1952. Pro podporu ochrany duševního vlastnictví vznikla v roce 1967 Světová organizace duševního vlastnictví (World Intellectual Property Organization, WIPO). Fakt, že dané dílo je chráněným autorským dílem, se často signalizuje symbolem © následovaným jménem autora a rokem. Tento symbol má však v Česku (i ve většině jiných zemí) pouze ryze informativní význam – dílo je plně chráněno i tehdy, není-li to na něm nijak uvedeno. Historie a koncepce Ve starověku autorské právo neexistovalo, autoři byli za svá díla odměňováni jen formou „čestných darů“ – honorářů – od mecenášů. Historicky má autorské právo počátky v privilegiích udělovaných ve středověku panovníkem – ten mohl (čistě podle své vůle, aniž by na to měl kdokoli právní nárok) rozhodnout o vytvoření speciálního výlučného režimu pro danou osobu (častěji spíše vydavatele než přímo autora). Pak šlo spíše o jakýsi druh kartelu. V 17. století začal v Anglii vznikat systém (na základě precedenčního práva), kterým se definovaly objektivní právní podmínky, za kterých k takové ochraně vznikl právní nárok. Tamtéž pak v roce 1709 vznikl vůbec první plnohodnotný autorský zákon nazývaný Statute of Anne („zákon královny Anny“). Podmínkou ochrany byla registrace díla (tento princip zákona měl kořeny ve starším systému, jehož původním účelem byla cenzura). Autorské zákony vznikaly podle různých základních koncepcí, mezi základní patří: Přirozeněprávní – autorské dílo je…"} {"instruction": "Generate a logistic regression classifier in Python that classifies data into two classes (0 or 1).", "input": "X: An array containing 8 feature values (floats).\n\n[1.0472, 2.1930, 1.6025, 0.8886, 2.5850, 1.4692, 1.2548, 0.8496]\n\nY: An array containing labels for the data points (1 or 0).\n\n[0, 0, 1, 0, 0, 0, 0, 1]", "output": "# Import the necessary libraries\nimport numpy as np\nfrom sklearn.linear_model import LogisticRegression\n\n# Load in the feature values and labels\nX = np.array([1.0472, 2.1930, 1.6025, 0.8886, 2.5850, 1.4692, 1.2548, 0.8496]).reshape(-1, 1)\ny = np.array([0, 0, 1, 0, 0, 0, 0, 1])\n\n# Create the logistic regression model\nmodel = LogisticRegression(solver='liblinear').fit(X, y)\n\n# Evaluate the model\nscore = model.score(X, y)\nprint('Model accuracy is:', score) # Output: 0.75"} {"instruction": "Using Python, create a function to convert HTML to plain text.", "input": "Input HTML:\n```\n

      Hello world!

      \n
      \n

      This is a test.

      \n
      \n```", "output": "import lxml.html as lh\n\ndef html_to_text(html):\n tree = lh.fromstring(html)\n return tree.text_content()\n\nhtml = \"

      Hello world!

      This is a test.

      \"\n\nprint(html_to_text(html))"} {"instruction": "Given a list of numbers, sort them in increasing order.", "input": "nums = [2, 3, 1, 4, 5]", "output": "def sort_numbers(nums): return sorted(nums)"} {"text": "[DE Wikipedia] Gemma Chan\n\nGemma Chan (* 29. November 1982 in London) ist eine britische Schauspielerin und ein Model. Sie war in Jack Ryan: Shadow Recruit zu sehen, spielte eine Hauptrolle in der Serie Humans und eine Nebenrolle in Phantastische Tierwesen und wo sie zu finden sind aus dem Jahr 2016 sowie die Anführerin der Eternals (2021). Leben Chan ist die Tochter eines Ingenieurs aus Hongkong und einer chinesischen Apothekerin. Sie wuchs in Sevenoaks in Kent auf. Vor ihrer Schauspielausbildung am Drama Centre London studierte sie Rechtswissenschaften am Worcester College in Oxford. Im Jahr 2006 war sie eine der Teilnehmerinnen von Project Catwalk, der britischen Version von Project Runway, dort erreichte sie das Finale der ersten Staffel. Während ihres Schauspielstudiums arbeitete sie als Model für verschiedene Kampagnen von Nivea, Nokia oder die Kaufhauskette Selfridges. Ihr Debüt im Fernsehen war die Miniserie When Evil Calls aus dem Jahre 2006, im Kino war sie erstmals in dem Thriller Exam – Tödliche Prüfung zu sehen. Im Jahr 2012 stand sie im Hampstead Theatre in London erstmals auf der Bühne in einer Inszenierung von Brechts Turandot. Im September 2013 erschien Chan am zentralen Strafgerichtshof, dem Old Bailey in London, als Zeugin einer tödlichen Messerattacke vor der Putney Bridge-Station. Gemma Chan war von 2011 bis 2017 mit dem britischen Comedian und Schauspieler Jack Whitehall liiert. Im Dezember 2018 hatten Chan und der britische Schauspieler Dominic Cooper ihren ersten gemeinsamen Auftritt als Paar bei den British Fashion Awards. Filmografie (Auswahl) 2009: Exam – Tödliche Prüfung (Exam) 2009: Doctor Who (Fernsehserie) 2010: Shanghai 2010: Sherlock (Fernsehserie) 2010: Submarine 2011: Geständnisse einer Edelhure (Secret Diary of a Call Girl, Fernsehserie) 2012: Bedlam (Fernsehserie) 2013: The Double 2013: Dates (Fernsehserie) 2013: Mord auf Shetland (Shetland, Fernsehserie, 2 Folgen) 2013: Death in Paradise (Fernsehserie, 1 Folge) 2014: Jack Ryan: Shadow Recruit 2014: The Game (Miniserie) 2015: Brotherhood (Fernsehserie) 2015–2018: Humans (Fernsehserie) 2016: Phantastische Tierwesen und wo sie zu finden sind (Fantastic Beasts and Where to Find Them) 2017: Transformers: The Last Knight 2017: Stratton 2018: Crazy Rich (Crazy Rich Asians) 2018: Maria Stuart, Königin von Schottland (Mary Queen of Scots) 2018: London Fields 2019: Captain Marvel 2020: Let Them All Talk 2021: Raya und der letzte Drache (Raya and the Last Dragon, Stimme) 2021: Eternals 2022: Don’t Worry Darling 2023: Extrapolations (Fernsehserie) 2023: The Creator Weblinks Einzelnachweise Filmschauspieler Theaterschauspieler Brite Geboren 1982 Frau"} {"instruction": "Create an HTML page that has an input field and a button. When the button is clicked, the text from the input field should be printed to the console.", "input": "", "output": " "} {"text": "[EN Wikipedia] Troyte River\n\nThe Troyte River is a river of the West Coast region of New Zealand's South Island. It rises in the Hooker Range, 15 kilometres west of Aoraki / Mount Cook, flowing west then north to reach the Karangarua River. See also List of rivers of New Zealand References Rivers of the West Coast, New Zealand Westland District Rivers of New Zealand"} {"instruction": "Generate a Python program to convert a given binary string to its equivalent decimal value.", "input": "1110", "output": "def binary_to_decimal(n):\n num = n\n dec_value = 0\n base = 1\n temp = num\n \n while temp > 0:\n last_digit = temp % 10\n temp = temp // 10\n dec_value += last_digit * base\n base = base * 2\n return dec_value"} {"text": "[CS Wikipedia] 24. prosinec\n\n24. prosinec je 358. den roku podle gregoriánského kalendáře (359. v přestupném roce). Do konce roku zbývá 7 dní. V tento den je Štědrý den. Události Česko 1796 – Ve starorožmitálském chrámu Povýšení svatého Kříže se konala premiéra Rybovy České mše vánoční 1926 – Zaveden simultánní rozhlasový přenos mezi Prahou – Brnem – Bratislavou. 1937 – Pražský rozhlas odvysílal poselství Karla Čapka Rabíndranáthu Thákurovi a Františka Křižíka Albertu Einsteinovi 1953 – Železniční nehoda u Šakvic – při střetu rychlíku s osobním vlakem zahynulo 103 lidí a 83 bylo zraněno. 1948 – V Československu bylo zavedeno nové krajské uspořádání, které již nerespektovalo zemské hranice. Svět 1144 – Vítězstvím Turků skončilo téměř měsíční obléhání Edessy, které v důsledku vyvolalo druhou křížovou výpravu. 1800 – Francouzská revoluce: Šuani provedli neúspěšný atentát na prvního konzula Napoleona Bonaparta. 1943 – Rudá armáda zahájila Žytomyrsko-berdyčevskou operaci. Bojů se účastnila i 1. československá samostatná brigáda 1951 – Libye vyhlásila nezávislost na Itálii. 1968 – Program Apollo: Členové posádky Apolla 8, Frank Borman, James Lovell a William Anders, se stali prvními lidmi, kteří na vlastní oči viděli odvrácenou stranu Měsíce. Narození Česko 1678 – Karel Slavíček, český misionář v Číně († 24. srpna 1735) 1782 – Therese Brunetti, herečka Stavovského divadla v Praze († 15. května 1864) 1799 – František Adam Petřina, fyzik a matematik († 27. června 1855) 1814 – Emanuel Seydl, český stavitel († 1. dubna 1894) 1824 – Josef Arnold, rakouský stavitel a kameník († 12. srpna 1887) 1828 – Emanuel Tuschner, český politik, starosta Plzně († 1. května 1882) 1844 – František Borgia Krásl, metropolitní probošt, zemský prelát, historik a spisovatel († 27. července 1907) 1846 – Emanuel Miřiovský, pedagog, spisovatel a překladatel († 10. ledna 1914) 1848 – Ladislav Jan Pospíšil, knihkupec a náměstek purkmistra Hradce Králové († 6. března 1893) 1856 Ján Vanovič, československý politik († 4. září 1942) Juraj Janoška, československý biskup a politik († 27. ledna 1930) 1863 – Cyril Bartoň z Dobenína, průmyslník a filantrop († 29. května 1953) 1872 – František Lorenc, profesor a esperantista († 24. května 1957) 1873 – Emanuel Kubíček, kněz, jezuita, pedagog a církevní historik († 31. května 1933) 1875 Emanuel Hauner, český spisovatel a překladatel († 14. června 1943) Emanuel Maršík, český hudební skladatel († 5. března 1936) 1880 – Arnošt Winter, československý politik († 1944) 1882 – Jakub Obrovský, český sochař, malíř, grafik a spisovatel († 31. března 1949) 1896 – Alois Schneiderka, český malíř († 7. září 1958) 1899 – Emanuel Šimandl, orientalista a astrolog († 24. prosince 1971) 1906 – Václav Tikal, malíř († 26. listopadu 1965) 1911 – Miloš Morávek, člen protinacistického a…"} {"instruction": "You are given a string and asked to find the frequency of each character in the string", "input": "str = \"GPT Model\"", "output": "from collections import Counter def char_frequency(str): return Counter(str) str = \"GPT Model\" print (char_frequency(str)) # Output: {'G': 1, 'P': 1, 'T': 1, ' ': 1, 'M': 1, 'o': 2, 'd': 1, 'e': 1, 'l': 1}"} {"text": "[EN Wikipedia] Rhabdochaeta spinosa\n\nRhabdochaeta spinosa is a species of tephritid or fruit flies in the genus Rhabdochaeta of the family Tephritidae. Distribution Seychelles. References Tephritinae Insects described in 1914 Diptera of Asia"} {"instruction": "Modify the following code to convert it from JavaScript to Java.", "input": "function getAverage(a, b) { return (a + b) / 2; }", "output": "public float getAverage(float a, float b) { return (a + b) / 2; }"} {"instruction": "Modify the following python code to print the count of values greater than 5.", "input": "data = [1,2,3,4,5,6,7,8,9]", "output": "data = [1,2,3,4,5,6,7,8,9]\n\ncount = 0\nfor value in data:\n if value > 5:\n count += 1\n\nprint(count)"} {"instruction": "From the given list, create a dictionary where keys will be the elements and the values will be their corresponding indices.", "input": "elements = [\"one\", \"two\", \"three\", \"four\"]", "output": "def list_to_dict(elements): return {el: i for i, el in enumerate(elements)}"} {"instruction": "Create a variable in Python to store the length of a list.", "input": "example_list = [1, 2, 3, 4]", "output": "list_length = len(example_list)"} {"instruction": "Create a python script to find the palindromic sub-string with the longest length from a given string.", "input": "Example String: \"forgeeksskeegfor\"", "output": "def longestPalSubstr(string): \n maxLength = 1\n \n start = 0\n length = len(string) \n \n low = 0\n high = 0\n \n for i in range(1, length): \n low = i - 1\n high = i \n while low >= 0 and high < length and string[low] == string[high]: \n if high - low + 1 > maxLength: \n start = low \n maxLength = high - low + 1\n low -= 1\n high += 1\n \n low = i - 1\n high = i + 1\n while low >= 0 and high < length and string[low] == string[high]: \n if high - low + 1 > maxLength: \n start = low \n maxLength = high - low + 1\n low -= 1\n high += 1\n \n print(\"Longest palindrome substring is:\", \n string[start:start + maxLength]) \n\n return maxLength\n\n# Driver Program \nstring = \"forgeeksskeegfor\"\nprint(\"Length is: \" + str(longestPalSubstr(string)))"} {"instruction": "Using Python, find the number of unique characters in the string \"hello world\".", "input": "", "output": "len(set(\"hello world\")) # 10 unique characters"} {"instruction": "Create a dictionary comprehension for the given data.", "input": "{\"A\":1, \"B\":2, \"C\":3, \"D\":4}", "output": "Dict = {key: value for key, value in {\"A\":1, \"B\":2, \"C\":3, \"D\":4}.items()}"} {"instruction": "Correct the syntax errors in this piece of Python code.", "input": "def greet(name):\nprint(\"Hello \"name)", "output": "def greet(name):\n print(\"Hello\", name)"} {"instruction": "Design a Python script for encrypting text using AES encryption.", "input": "Example text: \"hello world\"", "output": "import base64\nfrom Crypto.Cipher import AES\n\ndef encrypt(key, text):\n cipher = AES.new(key, AES.MODE_EAX)\n nonce = cipher.nonce\n ciphertext, tag = cipher.encrypt_and_digest(text.encode('utf-8'))\n return (nonce, tag, ciphertext)\n\nkey = b'Sixteen byte key'\ntext = \"hello world\"\n\nnonce, tag, ciphertext = encrypt(key, text)\n\nencoded_nonce = base64.b64encode(nonce)\nencoded_tag = base64.b64encode(tag)\nencoded_ciphertext = base64.b64encode(ciphertext)\n\nprint(\"Encrypted Text:\", encoded_nonce, encoded_tag, encoded_ciphertext)"} {"instruction": "Generate a PHP program to accept a string as an input and convert it to uppercase.", "input": "", "output": ""} {"instruction": "Given two unsorted lists, create a Python program to identify the common elements between them.", "input": "list1 = [5, 3, 2, 6, 8, 9] \nlist2 = [4, 2, 1, 6, 7]", "output": "def common_elements(list1, list2):\n return [element for element in list1 if element in list2]\n\ncommon_elements(list1, list2) # Output: [2, 6]"} {"text": "[EN Wikipedia] SS Milwaukee\n\nNine steamships have been named SS Milwaukee (or derivation). SS Milwaukee (1852), U.S. package freighter. SS Milwaukee (1868), U.S. steam barge. SS Milwaukee (1879), also known as Yonkers, U.S. package freighter. SS Milwaukee (1889), U.S. tugboat. SS Milwaukee (1902), U.S. package freighter. SS Manistique-Marquette & Northern No. 1 (1902), also known as , U.S. ferry. SS Juniata (1904), also known as , U.S. passenger ship. (1931), U.S. ferry. See also , a German transatlantic cruise ship of the Hamburg-America Line. As spoils of war, it entered British service in 1945 as Empire Waveney. References Ship names"} {"text": "[HI Wikipedia] भारत में संगीत-शिक्षण\n\n१८ वीं शताब्दी में घराने एक प्रकार से औपचारिक संगीत-शिक्षा के केन्द्र थे परन्तु ब्रिटिश शासनकाल का आविर्भाव होने पर घरानों की रूपरेखा कुछ शिथिल होने लगी क्योंकि पाश्चात्य संस्कृति के व्यवस्थापक कला की अपेक्षा वैज्ञानिक प्रगति को अधिक मान्यता देते थे और आध्यात्म की अपेक्षा इस संस्कृति में भौतिकवाद प्रबल था। भारतीय संस्कृति की आध्यात्मिक पृष्ठभूमि के अन्तर्गत कला को जो पवित्रता एवं आस्था का स्थान प्राप्त था तथा जिसे कुछ मुसलमान शासकों ने भी प्रश्रय दिया और संगीत को मनोरंजन का उपकरण मानते हुए भी इसके साधना पक्ष को विस्मृत न करते हुए संगीतज्ञों तथा शास्त्रकारों को राज्य अथवा रियासतों की ओर से सहायता दे कर संगीत के विकासात्मक पक्ष को विस्मृत नहीं किया। परन्तु ब्रिटिश राज्य के व्यस्थापकों ने संगीत कला के प्रति भौतिकवादी दृष्टिकोण अपना कर उसे यद्यपि व्यक्तित्व के विकास का अंग माना परन्तु यह दृष्टिकोण आध्यात्मिकता के धरातल पर स्थित न था। उन्होंने अन्य विषयों के समान ही एक विषय के रूप में ही इसे स्वीकार किया, परन्तु वैज्ञानिक प्रगति की प्रभावशीलता के कारण यह विषय अन्य पाठ्य विषयों के बीच लगभग उपेक्षित ही रहा। शास्त्रीय संगीत का पुनरुत्त्थान संगीत के पुनरुत्थान की दृष्टि से इस समय में घरानों की अन्तिम कड़ी के रूप में पं. भारतखण्डे एवं पं. विष्णु दिगम्बर पलुस्कर यह दो ऐसे महान संगीतज्ञ हुए जिन्होंने संगीत के पुनरुद्धार के लिए परिश्रम किए और संगीत के आध्यात्मिक धरातल को सुदृढ़ रखते हुए ही उसको सर्वजन सुलभ बनाने में महत्त्वपूर्ण योगदान दिया। पं. भातखण्डे जी स्वयं एक शिक्षित व्यक्ति थे जिन्होंने प्रमुख रूप से 'विधि' (law) शिक्षा ग्रहण की थी परन्तु संगीत में विशेष रूचि रखने के कारण उन्होंने संगीत के ग्रन्थों का अध्ययन तथा विशद विश्लेषण करके संगीत को वर्तमान स्थिति के अनुकूल बनाने की दृष्टि से संगीत के कुछ मान्य सिद्धान्तों एवं क्रियात्मक प्रयोगों में परिवर्तन व परिवर्द्धन किए। 'संगीत शास्त्र' (१-४) 'संगीत पद्धतियों का तुलनात्मक अध्ययन', 'उत्तररभारतीय संगीत का इतिहास', 'श्री मल्लक्ष्य संगीतम्', 'क्रमिक पुस्तक मालिका' (१-६) आदि ग्रन्थ लिखकर संगीत को विद्यार्थियों के लिए सुलभ बनाने का प्रयत्न किया। अनेकानेक संगीतज्ञों से मिलकर प्राचीन बन्दिशें एकत्रित करने तथा सरल स्वरलिपि पद्धति का निर्माण कर उन बन्दिशें के संरक्षण प्रदान किया। आप ही ने रागों को दस थाटों में वर्गीकृत करने का सफल प्रयास किया। इसी प्रकार पं॰ विष्णु दिगम्बर पलुस्कर ने भिन्न-भिन्न स्थानों का भ्रमण करके संगीत का प्रचार एवं प्रसार करते हुए समाज में पुन: संगीत के प्रति सम्मानीय भाव स्थापित किया जो सम्भवत: मध्यकाल एवं उत्तर मध्यकाल की राजनीतिक परिस्थितियों के कारण लुप्त हो चुका था और संगीत साधारण जनता के लिए केवल मात्र विलासिता का उपकरण ही रह गया था। पं॰ विष्णु दिगम्बर ने भी 'संगीत बाल प्रकाश', 'संगीत बाल बोध' आदि पुस्तकें लिखकर विद्यार्थियों के लिए संगीत सामग्री को उपलब्ध कराया तथा स्वतंत्र रूप से एक स्वरलिपि पद्धति का निर्माण करके उसके माध्यम से स्वर व लय के सूक्ष्म विभाजनों को सांकेतिक चिन्हों द्वारा इंगित करने तथा प्राप्त बन्दिशों को संरक्षण प्रदान करने का कार्य किया। इसके अतिरिक्त इन दोनों महान…"} {"instruction": "Create a class named \"Car\" with attributes like \"model\" and \"speed\".", "input": "", "output": "class Car { constructor(model, speed) { this.model = model; this.speed = speed; } getModel() { return this.model; } getSpeed() { return this.speed; } }"} {"text": "[EN Wikipedia] Gmina Grójec\n\nGmina Grójec is an urban-rural gmina (administrative district) in Grójec County, Masovian Voivodeship, in east-central Poland. Its seat is the town of Grójec, which lies approximately south of Warsaw. The gmina covers an area of , and as of 2006 its total population is 23,140 (out of which the population of Grójec amounts to 14,990, and the population of the rural part of the gmina is 8,150). Villages Apart from the town of Grójec, Gmina Grójec contains the villages and settlements of Bikówek, Częstoniew, Dębie, Duży Dół, Falęcin, Głuchów, Gościeńczyce, Grudzkowola, Janówek, Kępina, Kobylin, Kociszew, Kośmin, Krobów, Las Lesznowolski, Lesznowola, Lisówek, Maciejowice, Marianów, Mieczysławówka, Mięsy, Mirowice, Pabierowice, Piekiełko, Podole, Skurów, Słomczyn, Szczęsna, Uleniec, Wola Krobowska, Wola Worowska, Wólka Turowska, Worów, Zakrzewska Wola, Załącze, Zalesie and Żyrówek. Neighbouring gminas Gmina Grójec is bordered by the gminas of Belsk Duży, Chynów, Jasieniec, Pniewy, Prażmów and Tarczyn. References Polish official population figures 2006 Grojec Grójec County"} {"instruction": "Create a regular expression to check if a given string contains any the letter 'X'.", "input": "", "output": "RegExp(\"X\", \"i\")"} {"instruction": "You have a list of temperature values. Write a python program to find the day which has the highest temperature.", "input": "[58, 59, 61, 63, 66, 68, 71, 72, 75]", "output": "def highest_temp(temp_list):\n highest_temp_day = 0 \n highest_temp_val = temp_list[0]\n\n for i in range(1, len(temp_list)):\n if temp_list[i] > highest_temp_val:\n highest_temp_day = i\n highest_temp_val = temp_list[i]\n \n return highest_temp_day"} {"text": "[CS Wikipedia] Ota VIII. z Wittelsbachu\n\nOta VIII. z Wittelsbachu (1180 – 5. března 1209, Oberndorf) byl bavorský falckrabě a vrah římského krále Filipa Švábského. Život Ota byl jediným synem Oty III. Wittelsbašského a poprvé je doložen roku 1193. Byl straníkem Filipa Švábského a ten jej okolo roku 1203 zasnoubil se svou dcerou Beatrix. Král však roku 1207 změnil názor, dceřino zasnoubení zrušil a dokonce zabránil Otovi v uzavření nového sňatku s Gertrudou, dcerou slezského knížete Jindřicha I. Bradatého a Hedviky Meranské, což se mu zřejmě stalo osudným. Výbušný Wittelsbach se zúčastnil sjezdu knížat a svatby Filipovy neteře Beatrix v Bamberku. V rámci svatebních oslav se stalo něco \"u Němců dosud neslýchaného\", při siestě v biskupském paláci, řečeno slovy českého kronikáře: Vrah prořízl nic netušícímu králi krční tepnu a poté se mu i se společníky podařilo utéct. Pro svůj hrůzný čin byl exkomunikován a stín spoluviny padl i na příslušníky rodu Andechsů. Bamberský biskup Ekbert raději uprchl na uherský dvůr ke své sestře a Jindřich mezi pomstu a svou osobu postavil překážku v podobě moře – odešel do Palestiny. Rodový hrad Andechs byl rozbořen a rodina přišla o rozsáhlé majetky v Bavorsku a Frankách. Královraždu pomstil říšský maršálek Jindřich z Kalden, který vraha našel ukrytého ve stodole ve vsi Oberndorf. V březnu 1209 byl Ota zabit, hlava byla vhozena do Dunaje a tělo zůstalo nepohřbeno. Otovy ostatky našly klid až roku 1217, když po osmi letech vyjednávání bylo bezhlavé tělo vyndáno ze sudu a pohřbeno v augustiniánském klášteře Indersdorf. Odkazy Reference Literatura Andreas Bihrer: König Philipp von Schwaben – Bamberg, 21. Juni 1208. In: Michael Sommer (Hrsg.): Politische Morde. Vom Altertum bis zur Gegenwart. Darmstadt 2005, S. 117–126. Bernd Ulrich Hucker: Der Königsmord von 1208 – Privatrache oder Staatsstreich? In: Die Andechs-Meranier in Franken. Europäisches Fürstentum im Mittelalter. Mainz 1998, S. 111–128 (nicht unproblematisch). Eberhard Straub: Die Wittelsbacher. Wolf Jobst Siedler Verlag GmbH, Berlin 1994, . Externí odkazy Genealogie Biografie Wittelsbachové Bavorská falckrabata Atentátníci Narození ve 12. století Úmrtí v roce 1209 Muži Úmrtí 5. března"} {"instruction": "What is the advantage of using dictionary comprehension in Python?", "input": "", "output": "The main advantage of using dictionary comprehension in Python is that it offers an efficient and concise way to create dictionaries. It can be used to create dictionaries from existing sequences or iterables, or to create new dictionaries from scratch. It also eliminates the need for writing multiple lines of code to create dictionaries."} {"instruction": "Generate a machine learning algorithm in Python for recognizing hand-written digits from the MNIST dataset.", "input": "Not applicable", "output": "import numpy as np\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Conv2D, Flatten\n\n# Create a Sequential model\nmodel = Sequential()\n\n# Add Conv2D and Dense layers\nmodel.add(Conv2D(64, kernel_size=3, activation='relu', input_shape=(28,28,1)))\nmodel.add(Conv2D(32, kernel_size=3, activation='relu'))\nmodel.add(Flatten())\nmodel.add(Dense(10, activation='softmax'))\n\n# Compile the model\nmodel.compile(optimizer='adam', \n loss='sparse_categorical_crossentropy', \n metrics=['accuracy'])\n \n# Train the model on the MNIST dataset\nmodel.fit(x_train, y_train, validation_data=(x_val, y_val), epochs=3)"} {"instruction": "Create a Python script to perform the following transformation on a given string?", "input": "\"HELLO WORLD\"", "output": "inp_str = \"HELLO WORLD\"\n\nresult_str = ''\n\nfor c in inp_str:\n if c.isupper():\n result_str += c.lower()\n else:\n result_str += c.upper()\n \nprint(result_str)"} {"instruction": "Identify the ‘time complexity’ of an algorithm written in Java that calculates average of all elements in a list.", "input": "", "output": "The time complexity of the algorithm is O(n) since it needs to loop through all the elements in the list in order to calculate the average."} {"instruction": "Given a list of integers, calculate the sum of only the first 3 numbers.", "input": "List: [1,4,5,7,2]", "output": "list = [1,4,5,7,2] sum = list[0] + list[1] + list[2] #Result: 10"} {"text": "[EN Wikipedia] The Temptation of Saint Anthony (Savoldo)\n\nThe Temptation of Saint Anthony or The Torment of Saint Anthony is an oil-on-panel painting executed c. 1521–1525 by the Italian Renaissance artist Giovanni Girolamo Savoldo. It is now in the Timken Museum of Art in San Diego. It may relate to the same artist's The Temptation of Saint Jerome on a similar theme. Originally produced for a private studiolo, it is a homage to the work of Hieronymus Bosch, which Savoldo would have seen in cardinal Domenico Grimani's collection in Venice. From Bosch's The Hermit Saints he draws the motif of the saint fleeing to the left away from demons in a rocky infernal landscape on the right. References Paintings by Girolamo Savoldo 1525 paintings Paintings in the Timken Museum of Art Paintings of Anthony the Great"} {"instruction": "Write a script in python that outputs all even numbers between 0 and 10.", "input": "", "output": "for number in range(0,11):\n if (number % 2 == 0):\n print(number)"} {"instruction": "Implement an algorithm to split a string of numbers (integers or floats) in to two parts with an even sum", "input": "inputString: '1,2,3,4,5,6'", "output": "public int[] splitEvenSum(string inputString) { List nums = new List(); // Split inputString at , and add elements to the list foreach (var num in inputString.Split(',')) { nums.Add(int.Parse(num)); } // Initialize variables int targetSum = 0; int sum1 = 0; int sum2 = 0; List list1 = new List(); List list2 = new List(); // Loop through and calculate sums foreach (var num in nums) { targetSum += num; } targetSum /= 2; // Backtrack and find the two subarrays with the same sum foreach (var num in nums) { if (sum1 + num <= targetSum) { sum1 += num; list1.Add(num); } else { sum2 += num; list2.Add(num); } } // Return results int[] result = new int[2] {sum1, sum2}; return result; }"} {"instruction": "Find the angle between two given vectors", "input": "", "output": "The angle between two vectors can be found using the following formula: theta = arccos(v1.v2 / (||v1||*||v2||)), where v1 and v2 represent the two given vectors and ||v1|| and ||v2|| are the magnitudes of the vectors."} {"instruction": "Suggest a way to the generate a random number between 0 and 1 in JavaScript.", "input": "", "output": "function getRandom() { return Math.random(); }"} {"instruction": "Generate a correct python script to identify the output of a given expression.", "input": "expression: (4 + 2) * 3", "output": "a = (4 + 2) * 3\nprint(a)"} {"text": "[HI Wikipedia] नाशिक\n\nनासिक (Nasik) या नाशिक (Nashik) भारत के महाराष्ट्र राज्य के नाशिक ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय और महाराष्ट्र का चौथा सबसे बड़ा नगर है। नाशिक गोदावरी नदी के किनारे बसा हुआ है। यह महाराष्ट्र के उत्तर पश्चिम में, मुम्बई से १५० किमी और पुणे से २०५ किमी की दुरी में स्थित है। यह शहर प्रमुख रूप से हिन्दू तीर्थयात्रियों का प्रमुख केन्द्र है। इस शहर का सबसे प्रमुख भाग पंचवटी है। इसके अलावा यहां बहुत से मंदिर भी है। नाशिक में त्योहारों के समय में बहुत अधिक संख्या में भीड़ दिखाई पड़ती है। इतिहास नाशिक शक्तिशाली सातवाहन वंश के राजाओं की राजधानी थी। मुगल काल के दौरान नासिक शहर को गुलशनबाद के नाम से जाना जाता था। इसके अतिरिक्त नाशिक शहर ने भारतीय स्वतंत्रता संघर्ष में भी अपनी एक महत्वपूर्ण भूमिका निभाई है। डॉ॰ भीमराव अम्बेडकर ने १९३२ में नाशिक के कालाराम मंदिर में अस्पृश्योंको प्रवेश के लिये आंदोलन चलाया था। मुख्य आकर्षण नाशिक आस्था का शहर है। यहां आपको बहुत से सुंदर मंदिर और घाट देखने को मिलेगें। यहां विभिन्न त्योहारों को बहुत ही उत्साह के साथ मनाया जाता है। यहां ज्‍यादातर भगवान के प्रति आस्‍था रखने वाले पर्यटक अधिक संख्‍या में आर्कषित होते है। कुंभ मेला नाशिक में लगने वाला कुंभ मेला, जिसे यहाँ सिंहस्थ के नाम से जाना जाता है, शहर के आकर्षण का सबसे बड़ा केन्द्र है। भारतीय पंचांग के अनुसार सूर्य जब कुंभ राशी में होते है, तब प्रयागराज में कुंभमेला लगता है और सूर्य जब सिंह राशी में होते है, तब नाशिक में सिंहस्थ होता है। इसे कुंभमेला भी कहते है। अनगिनत श्रद्धालु इस मेले में आते हैं। यह मेला बारह साल में एक बार लगता है। इस मेले का आयोजन महाराष्ट्र पर्यटन निगम द्वारा किया जाता है। भारत में यह धार्मिक मेला चार जगहों पर लगता है। यह जगह नाशिक, प्रयागराज, उज्जैन और हरिद्वार में हैं। प्रयागराज में लगने वाला कुंभ का मेला सबसे बड़ा धार्मिक मेला है। इस मेले में हर बार विशाल संख्या में भक्त आते हैं। इस मेले में आए लाखों श्रद्धालु गोदावरी नदी में स्नान करते हैं। यह माना जाता है कि इस पवित्र नदी में स्नान करने से आत्मा की शुद्धि और पापों से मुक्ति मिलती है। इसके अलावा प्रत्येक वर्ष आने वाले शिवरात्रि के त्योहार को भी यहां बहुत ही धूमधाम के साथ मनाया जाता है। हजारों की संख्या में आए तीर्थयात्री इस पर्व को भी पूरे उमंग और उत्साह के साथ मनाते हैं। इस त्योहार में आने वाले तीर्थयात्रियों के लिए राज्य सरकार कुछ विशेष प्रकार का प्रबंध करती है। यहां दर्शन करने आए तीर्थयात्रियों के रहने के लिए बहुत से गेस्ट हाउस और धर्मशाला की सुविधा मुहैया कराई जाती है। यहां स्थित घाट बहुत ही साफ और सुंदर है। त्योहारों के समय यहां सुरक्षा के कड़े इंतजाम किए जाते हैं। पंचवटी पंचवटी नाशिक के उत्तरी भाग में स्थित है। माना जाता है कि भगवान राम, सीता और लक्ष्मण के साथ कुछ समय के लिए पंचवटी में रहे थे। इस कारण भी पंचवटी प्रसिद्ध है। वर्तमान समय में पंचवटी में जिस जगह से सीता का अपहरण किया गया था वह जगह पांच बरगद के पेडों के समीप है। सीता गुम्फा गुम्फा का शब्दिक अर्थ गुफा होता है। सीता गुम्फा पंचवटी में पांच बरगद के पेड़ के समीप स्थित है। यह नाशिक का एक अन्य प्रमुख आकर्षण जगह है। इस गुफा में…"} {"text": "[EN Wikipedia] Larentiini\n\nLarentiini is a tribe of geometer moths under subfamily Larentiinae. The tribe was first described by Philogène Auguste Joseph Duponchel in 1845. Recognized genera Anticlea Stephens, 1831 Antilurga Herbulot, 1951 Earophila Gumppenberg, 1887 Ennada Blanchard, 1852 Entephria Hübner, 1825 Herbulotina Pinker, [1971] Idiotephria Inoue, 1943 Kuldscha Alphéraky, 1883 Kyrtolitha Staudinger, 1892 Larentia Treitschke, 1825 Mesoleuca Hübner, 1825 Neotephria Prout, 1914 Pelurga Hübner, 1825 Photoscotosia Warren, 1888 Plesioscotosia Viidalepp, 1986 Pseudentephria Viidalepp, 1976 Spargania Guenée, 1857 References External links Larentiinae Moth tribes"} {"text": "[HI Wikipedia] वैशाली\n\nवैशाली बिहार प्रान्त के वैशाली जिला में स्थित एक गाँव है। ऐतिहासिक स्थल के रूप में प्रसिद्ध यह गाँव मुजफ्फरपुर से अलग होकर १२ अक्टुबर १९७२ को वैशाली के जिला बनने पर इसका मुख्यालय हाजीपुर बनाया गया। मगही,वज्जिका यहाँ की मुख्य भाषा है। ऐतिहासिक प्रमाणों के अनुसार वैशाली में ही विश्व का सबसे पहला गणतंत्र यानि \"रिपब्लिक\" कायम किया गया था। भगवान महावीर की जन्म स्थली होने के कारण जैन धर्म के मतावलम्बियों के लिए वैशाली एक पवित्र स्थल है। भगवान बुद्ध का इस धरती पर तीन बार आगमन हुआ, यह उनकी कर्म भूमि भी थी। महात्मा बुद्ध के समय सोलह महाजनपदों में वैशाली का स्थान मगध के समान महत्त्वपूर्ण था। अतिमहत्त्वपूर्ण बौद्ध एवं जैन स्थल होने के अलावा यह जगह पौराणिक हिन्दू तीर्थ एवं पाटलीपुत्र जैसे ऐतिहासिक स्थल के निकट है। मशहूर राजनर्तकी और नगरवधू आम्रपाली, अपनी सुंदरता के लिए प्रसिद्ध था, और इस शहर को समृद्ध बनाने में एक बड़ी मदद की। आज वैशाली पर्यटकों के लिए भी बहुत ही लोकप्रिय स्थान है। वैशाली में आज दूसरे देशों के कई मंदिर भी बने हुए हैं। इतिहास वैशाली जन का प्रतिपालक, विश्व का आदि विधाता, जिसे ढूंढता विश्व आज, उस प्रजातंत्र की माता॥रुको एक क्षण पथिक, इस मिट्टी पे शीश नवाओ,राज सिद्धियों की समाधि पर फूल चढ़ाते जाओ|| (रामधारी सिंह दिनकर की पंक्तियाँ) वैशाली का नामाकरण महाभारत काल एक राजा ईक्ष्वाकु वंशीय राजा विशाल के नाम पर हुआ है। विष्णु पुराण में इस क्षेत्र पर राज करने वाले ३४ राजाओं का उल्लेख है, जिसमें प्रथम नमनदेष्टि तथा अंतिम सुमति या प्रमाति थे। इस राजवंश में २४ राजा हुए। राजा सुमति अयोध्या नरेश भगवान राम के पिता राजा दशरथ के समकालीन थे। ईसा पूर्व सातवीं सदी के उत्तरी और मध्य भारत में विकसित हुए १६ महाजनपदों में वैशाली का स्थान अति महत्त्वपूर्ण था। नेपाल की तराई से लेकर गंगा के बीच फैली भूमि पर वज्जियों तथा लिच्‍छवियों के संघ (अष्टकुल) द्वारा गणतांत्रिक शासन व्यवस्था की शुरुआत की गयी थी। लगभग छठी शताब्दी ईसा पूर्व में यहाँ का शासक जनता के प्रतिनिधियों द्वारा चुना जाने लगा और गणतंत्र की स्थापना हुई। विश्‍व को सर्वप्रथम गणतंत्र का ज्ञान करानेवाला स्‍थान वैशाली ही है। आज वैश्विक स्‍तर पर जिस लोकशाही को अपनाया जा रहा है, वह यहाँ के लिच्छवी शासकों की ही देन है। प्राचीन वैशाली नगर अति समृद्ध एवं सुरक्षित नगर था जो एक-दूसरे से कुछ अन्तर पर बनी हुई तीन दीवारों से घिरा था। प्राचीन ग्रन्थों में वर्णन मिलता है कि नगर की किलेबन्दी यथासम्भव इन तीनों कोटि की दीवारों से की जाए ताकि शत्रु के लिए नगर के भीतर पहुँचना असम्भव हो सके। चीनी यात्री ह्वेनसांग के अनुसार पूरे नगर का घेरा १४ मील के लगभग था। मौर्य और गुप्‍त राजवंश में जब पाटलीपुत्र (आधुनिक पटना) राजधानी के रूप में विकसित हुआ, तब वैशाली इस क्षेत्र में होने वाले व्‍यापार और उद्योग का प्रमुख केन्द्र था। भगवान बुद्ध ने वैशाली के समीप कोल्‍हुआ में अपना अन्तिम सम्बोधन दिया था। इसकी याद में महान मौर्य सम्राट अशोक ने तीसरी शताब्दी ईसा पूर्व सिंह स्‍तम्भ का निर्माण करवाया था। महात्‍मा बुद्ध के महापरिनिर्वाण के लगभग १०० वर्ष बाद वैशाली में दूसरे बौद्ध परिषद् का आयोजन किया गया था। इस आयोजन की याद में दो बौद्ध स्‍तूप बनवाये गये।…"} {"instruction": "Write a Python program to print the elements of a list from the last to the first.", "input": "_list = [1,2,3,4,5]", "output": "_list = [1,2,3,4,5]\n\n# Iterate through the list in reverse order\nfor i in range(len(_list) - 1, -1, -1): \n print(_list[i]) \n \n# Output: \n# 5 \n# 4 \n# 3 \n# 2 \n# 1"} {"instruction": "Create a script to multiply each element in a list by 10.", "input": "input_list = [1,2,3,4]", "output": "def multiply_by_10(input_list): new_list = [] for i in input_list: new_list.append(i*10) return new_list"} {"instruction": "Edit the existing code to focus the cursor in the input field.", "input": " ", "output": " "} {"text": "[EN Wikipedia] 1964–65 Norwegian 1. Divisjon season\n\nThe 1964–65 Norwegian 1. Divisjon season was the 26th season of ice hockey in Norway. Six teams participated in the league, and Valerenga Ishockey won the championship. Regular season External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1964 in Norwegian sport 1965 in Norwegian sport"} {"instruction": "Optimize an existing Python function to reverse a string. This function should take a string as input and return the reversed string.", "input": "'Hello World!'", "output": "def reverse_string(input):\n return input[::-1]"} {"instruction": "Implement a function in Python that takes an array of strings and returns a list of all strings that have length greater than 6", "input": "[\"testing\", \"this\",\"array\"]", "output": "def getStringsWithLength(array):\n output = []\n for x in array:\n if len(x) > 6:\n output.append(x)\n return output\n\nprint(getStringsWithLength([\"testing\", \"this\",\"array\"]))"} {"instruction": "Create an HTML page to display a table of students", "input": "Data of students: First name, LastName and Age", "output": " My Student Table {% for firstName, lastName, age in studentsList %} {% endfor %}
      First Name Last Name Age
      {{ firstName }} {{ lastName }} {{ age }}
      "} {"instruction": "Generate a random password of length 8 using Python.", "input": "", "output": "import random def generate_password(length): chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\" password = \"\" for i in range(length): index = random.randint(0, len(chars)-1) password += chars[index] return password length = 8 password = generate_password(length) print(\"Here's your random password:\", password)"} {"instruction": "Complete the following code to shuffle an array of elements.", "input": "#Declaring an array arr = [1, 2, 3, 4, 5] # Your code def shuffle(arr):", "output": "#Declaring an array arr = [1, 2, 3, 4, 5] # Your code def shuffle(arr): for i in range(len(arr)-1, 0, -1): j = random.randint(0, i+1) arr[i], arr[j] = arr[j], arr[i] return arr"} {"instruction": "Implement a bubble sort on the given array of integers.", "input": "[4, 8, 1, 3, 9]", "output": "def bubble_sort(arr): for _ in range(len(arr) -1): for i in range(len(arr)-1): if arr[i] > arr[i+1]: arr[i], arr[i+1] = arr[i+1], arr[i] return arr print(bubble_sort([4, 8, 1, 3, 9])) # [1, 3, 4, 8, 9]"} {"instruction": "Write a Python program to find the maximum and minimum of three numbers.", "input": "", "output": "def findMinMax(num1, num2, num3):\n if num1 >= num2 and num1 >= num3:\n maximum = num1\n minimum = num3 if num3 <= num2 else num2\n elif num2 >= num1 and num2 >= num3:\n maximum = num2\n minimum = num1 if num1 <= num3 else num3\n else:\n maximum = num3\n minimum = num1 if num1 <= num2 else num2\n return (maximum, minimum)\n\nnum1 = int(input(\"Enter first number: \"))\nnum2 = int(input(\"Enter second number: \"))\nnum3 = int(input(\"Enter third number: \"))\n\nmaximum, minimum = findMinMax(num1, num2, num3)\n\nprint(\"Maximum of three numbers is:\", maximum)\nprint(\"Minimum of three numbers is:\", minimum)"} {"text": "[CS Wikipedia] Rada Evropy\n\nRada Evropy (RE) (anglicky Council of Europe, CoE, francouzsky Conseil de l'Europe) je mezinárodní organizace spojující 46 zemí Evropy. Tato instituce dále zahrnuje šest pozorovatelských zemí: Vatikán, Kanadu, USA, Mexiko, Japonsko a Izrael. Rada Evropy je nezávislá na Evropské unii a funguje na principu diskuze a hledání společných řešení v ekonomických, sociálních, kulturních, vědeckých, právních a administrativních otázkách a v udržování a rozvoji základních lidských práv a svobod. Zatímco Evropská unie funguje na principu supranacionality, Rada Evropy je založená na mezivládním principu. Sídlo se nachází ve Štrasburku, přičemž pod tuto instituci spadá rovněž Evropský soud pro lidská práva sídlící ve stejném městě. Vznik Rady Evropy Za ideového otce Rady Evropy je považován Winston Churchill, který po druhé světové válce prosazoval politiku francouzsko-německého smíření. V projevu na univerzitě v Curychu prosazoval kromě federace nekomunistických států i sjednocení Evropy. Churchillova snaha vyústila v květnu roku 1948 v konferenci v Haagu, na které byly položené základy Rady Evropy. Klíčovým momentem pro vznik Rady bylo podepsání Statutu Rady Evropy (tzv. Londýnská smlouva) v Londýně 5. května 1949. Mezi signatáře patřily státy Belgie, Dánsko, Francie, Irsko, Itálie, Lucembursko, Nizozemsko, Norsko, Švédsko a Velká Británie. Trvalé sídlo, o které v minulosti soupeřily Německo a Francie, bylo ustanoveno ve Štrasburku. Toto gesto mělo symbolizovat sjednocení Evropy. Původním záměrem organizace byla evropská integrace. Tento úkol se nezdařil, časem jej převzala Evropská společenství a Rada Evropy se zaměřila na problematiku lidských práv a svobod. Její význam postupně upadal, obnovení nastalo po roce 1990 v souvislosti s pádem komunistických režimů ve východní Evropě. Následně se jejími členy staly mnohé východoevropské a postsovětské státy včetně dnešního Ruska a význam této instituce jako platformy pro celoevropskou diskuzi se obnovil. Členové V současnosti jsou jejími členy všechny evropské státy kromě Vatikánu, který má statut pozorovatele, Ruska, které bylo vyloučeno v březnu 2022 kvůli svému útoku na Ukrajinu, Běloruska, které nebylo přijato kvůli nedodržování demokratických zásad a svobody slova, Kazachstánu (4 % území státu leží v Evropě), který je kandidátskou zemí, a sporných evropských států – Abcházie, Jižní Osetie, Kosova, Náhorního Karabachu, Podněstří a Severního Kypru. Poslední zemí, která vstoupila do Rady Evropy, byla Černá Hora v roce 2007. Československo bylo členem Rady Evropy od roku 1991 až do svého rozpadu v roce 1993. V červnu téhož roku do Rady Evropy vstoupily samostatně Česká i Slovenská republika. Funkce, orgány a výstupy Rady Evropy Funkce Rady Evropy Článek 1 Statutu Rady Evropy uvádí, že cílem Rady Evropy je dosažení…"} {"text": "[HI Wikipedia] मैदानी हॉकी\n\nमैदानी हॉकी अथवा फ़ील्ड हॉकी (Field hockey) अथावा सामान्यतः हॉकी, हॉकी परिवार का टीम का खेल है। खेल का उद्भव मध्यकाल में स्कॉटलैण्ड, नीदरलैण्ड और इंग्लैण्ड में माना जाता है। यह खेल घास के मैदान अथवा कृत्रिम घास के मैदान पर खेला जा सकता है। प्रत्येक टीम में गोलकीपर सहित ग्याहरह खिलाड़ी होते हैं। खिलाड़ी गोल और दृढ़ जैसी रबर की गेंद पर प्रहार करने के लिए लकड़ी अथवा फायबर काँच की बनी यष्टिक (स्टिक) का प्रयोग करते हैं। यष्टिक की लम्बाई खिलाड़ी की व्यक्तिगत लम्बाई पर निर्भर करती है। मैदानी हॉकी में बायें हाथ की कोई यष्टिक नहीं होती और यष्टिक के एक ओर से ही मारा जा सकता है। इसकी पोशाक में शिन-गार्ड्स (घुटने के नीचे सामने की ओर बाँधी जाने वाली गद्दी), क्लीट, स्कर्ट या नीकर और जर्सी शामिल हैं। २१वीं सदी तक आते-आते यह वैश्विक रूप से खेला जाने लगा। इसका प्रचलन मुख्य रूप से पश्चिमी यूरोप, भारतीय उपमहाद्वीप और ऑस्ट्रेलिया में हुआ। हॉकी पाकिस्तान का राष्ट्रीय खेल है और सामान्यतः भारत के भी राष्ट्रीय खेल के रूप में गिना जाता है यद्यपि आधिकारिक रूप से भारत का कोई राष्ट्रीय खेल नहीं है। शब्द \"फील्ड हॉकी\" प्राथमिक रूप से कनाडा, संयुक्त राज्य अमेरिका, पूर्वी यूरोप और विश्व के अन्य हिस्सो में लोकप्रिय हुआ जहाँ आइस हॉकी खेला जाता है। इतिहास हॉकी लाठी (स्टिक) व गेंद से खेले जाने वाले प्राचीनतम खेलों में से एक है। ऐतिहासिक तथ्य हमें बताते हैं कि यह काफी प्राचीन सभ्यताओं में भी खेला जाता था। आधुनिक हाकी मध्य १८वीं शताब्दी में उभर कर आई पर यह १९वीं शताब्दी में ही ढंग से स्थापित हो पाई जब ब्लैक हीथ नाम का क्लब दक्षिण-पूर्व लंदन में बना। पहले यह घास पर खेला जाता था और फिर १९७० से कृत्रिम घास(प्‍लास्टिक टर्फ) पर खेला जाने लगा जिसने खेल के काफी पहलुओं में बदलाव ला दिया। अब एशियाई देशों का बोलबाला कम हो गया। खेल की गति, खेलने के सामान में बदलाव आने से नये नये नियम, योजनायें बनने लगीं और स्थापित हो गईं। खेल का मैदान पहले हॉकी मैदान में उपयोग किये जाने वाले पैमाने शाही नियमों के अनुसार होते थे। अंतरराष्ट्रीय हॉकी महासंघ (एफआईएच) के गठन के पश्चात मीट्रिक मापन को आधिकारिक रूप से स्वीकार किया गया। अब मीट्रिक मापन की इकाइयों के साथ कोष्ठक में शाही इकाइयों का उपयोग किया जाता है। मैदान 91.40 मीटर × 55 मीटर (100 × 60 यार्ड) के आयताकार क्षेत्र का होता है। दोनों छोर पर गोल पोस्ट होते हैं जिनकी ऊँचाई 2.14 मीटर (7 फीट) होती है और 3.66 मीटर (12 फुट) चौड़ाई होती है, यह खिलाडी के लिए लक्ष्य होता है। इसके साथ 23.90 मीटर (25 यार्ड ) दोनों छोर पर लाइन होती हैं और इतनी ही लम्बाई की लाइन मैदान के मध्य में(सेंटर लाइन) रहती है। पेनल्टी स्ट्रोक के लिए एक 0.15 मीटर (6 इंच) के व्यास का एक स्पॉट होता है जो की गोल पोस्ट के मध्य से 6.40 मीटर (7 यार्ड) पर स्थित होता है। 'शूटिंग सर्किल' बेस लाइन से 15 मीटर (16 यार्ड ) की दूरी पर होता है। परंपरागत घास पिचों सबसे हॉकी के साथ कम आधुनिक हॉकी में आम दूर जा रहा है सिंथेटिक सतहों पर निभाई. 1970 के दशक के बाद से, रेत आधारित पिचों के रूप में वे नाटकीय रूप से इस खेल की गति गति इष्ट थे। हालांकि, हाल के वर्षों में वहाँ \"जल आधारित\" कृत्रिम तृखाच्छादित मैदान की संख्या में…"} {"instruction": "Write a function which takes in a list containing integers, strings and floats and returns the sum of all numbers in the list.", "input": "list = [2, 'John', 8.2, 3.4, 11]", "output": "def sum_numbers(lst): sum = 0 for item in lst: if type(item) == int or type(item) == float: sum += item return sum"} {"text": "[CS Wikipedia] Emil Šulc\n\nEmil Šulc (1. května 1891 – 3. ledna 1957, Praha, Československo) byl český architekt, jehož návrhy se realizovaly především v Praze. Dle jeho plánů se roku 1921 na domě na pražském Vyšehradě (Vratislavova 28/VI) upravily fasády v přízemí. O tři roky později realizoval zastřešení části dvora a zbudoval kavárnu v Havlíčkově ulici na Novém Městě pražském. V letech 1927 a 1928 vyprojektoval rodinný dvojdům na Břevnově a v následujícím roce navrhl rodinný dům na Smíchově. Roku 1930 vyprojektoval polovinu rodinného dvojdomu v Košířích (ulice Nad Kuliškou). Roku 1932 vyprojektoval novobarokní vilu, jež stojí v pražských Střešovicích, a v následujícím roce činžovní vilu v Libni (Na Truhlářce 1456/11). Odkazy Reference Literatura Externí odkazy Čeští architekti Narození 1. května Narození v roce 1891 Úmrtí 3. ledna Úmrtí v roce 1957 Muži Úmrtí v Praze"} {"instruction": "Use Python and SQL to create a basic database for a fictional company. The company has a list of products, employees, and customers. The database should include models and relations for these three.", "input": "Not applicable", "output": "from sqlalchemy import Column, Integer, String, ForeignKey\nfrom sqlalchemy.ext.declarative import declarative_base\n\nBase = declarative_base()\n\nclass Product(Base):\n __tablename__ = 'product'\n id = Column(Integer, primary_key=True)\n name = Column(String)\n\nclass Employee(Base):\n __tablename__ = 'employee'\n id = Column(Integer, primary_key=True)\n name = Column(String)\n\nclass Customer(Base):\n __tablename__ = 'customer'\n id = Column(Integer, primary_key=True)\n name = Column(String)\n\nclass Purchase(Base):\n __tablename__ = 'purchase'\n id = Column(Integer, primary_key=True)\n product_id = Column(Integer, ForeignKey('product.id'))\n employee_id = Column(Integer, ForeignKey('employee.id'))\n customer_id = Column(Integer, ForeignKey('customer.id'))"} {"instruction": "What is the Big O time complexity of selection sort?", "input": "", "output": "Selection sort has a time complexity of O(N2) in the worst case."} {"instruction": "Generate code to construct a deck of cards with Python.", "input": "Not applicable", "output": "class Card():\n # suits is a set of all possible suits\n suits = {\"spades\", \"hearts\", \"diamonds\", \"clubs\"}\n\n # ranks is a set of all possible ranks\n ranks = {\"Ace\", 2, 3, 4, 5, 6, 7, 8, 9, 10, \"Jack\", \"Queen\", \"King\"}\n\n # Create a new card\n def __init__(self, suit, rank):\n # Check if the suit is valid\n if suit not in self.suits:\n raise ValueError(f\"{suit} is not a valid suit\")\n\n # Check if the rank is valid\n if rank not in self.ranks:\n raise ValueError(f\"{rank} is not a valid rank\")\n\n # Set the attributes of the card\n self.suit = suit\n self.rank = rank\n\n # Print the card as a string\n def __str__(self):\n return f\"{self.rank} of {self.suit}\"\n\nclass Deck():\n # Create a deck of 52 cards\n def __init__(self):\n self.cards = []\n for suit in Card.suits:\n for rank in Card.ranks:\n self.cards.append(Card(suit, rank))\n\n # Generate a random card from the deck\n def get_random_card(self):\n return self.cards.pop()"} {"instruction": "Create a SQL table which has 3 columns id, name and price.", "input": "", "output": "CREATE TABLE products ( id INTEGER AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, price DECIMAL(10,2) NOT NULL );"} {"text": "[CS Wikipedia] Polární soustava souřadnic\n\nPolární soustava souřadnic je taková soustava souřadnic v rovině, u které jedna souřadnice (označovaná ) udává vzdálenost bodu od počátku souřadnic, druhá souřadnice (označovaná ) udává úhel spojnice tohoto bodu a počátku od zvolené osy ležící v rovině (nejčastěji jí odpovídá osa kartézských souřadnic). Polární soustava souřadnic je vhodná v případech takových pohybů, při nichž se nemění vzdálenost tělesa od jednoho bodu (počátku souřadnic), například u pohybu po kružnici, případně se tato vzdálenost mění s nějakou jednoduchou závislostí. ] Transformace Transformace polárních souřadnic na kartézské: Převod kartézských souřadnic na polární: Tato převodní funkce však funguje jen na intervalu - pro jiné intervaly bychom museli změnit znaménko funkce arctg(x). Abychom mohli popsat inverzi pro daný úhel na celém jeho definičním intervalu, bývá často používána funkce arctg2(y,x) definovaná jako Převod kartézských souřadnic na polární má potom zápis: Vlastnosti Jedná se o ortogonální soustavu souřadnic s Lamého koeficienty . Délka infinitesimální úsečky se spočte jako tedy délka křivky obecně jako kde t je parametr dané křivky a s je její délka od do . Obsah infinitesimálního elementu plochy spočteme jako takže celkový obsah spočteme integrací tohoto výrazu přes danou oblast vyjádřenou v polárních souřadnicích. Christofelovy koeficienty Levi-Civitovy konexe generované Euklidovskou metrikou jsou dány vztahy Diferenciální operátory v polárních souřadnicích Externí odkazy Polární souřadnice na MathWorldu Soustavy souřadnic"} {"instruction": "Update the below Python code to the dynamic programming approach, for finding a maximum subarray of elements, given in an array.", "input": "arr- [2, 3, -6, 5, -1,1]", "output": "def max_subarray(arr):\n n = len(arr)\n max_sum_so_far = arr[0]\n ending_here_max_sum = arr[0]\n\nfor i in range(1, n):\n current_max_sum_with_last_element_i = max(arr[i], ending_here_max_sum + arr[i])\n max_sum_so_far = max(max_sum_so_far, current_max_sum_with_last_element_i)\n ending_here_max_sum = current_max_sum_with_last_element_i\n\nreturn max_sum_so_far"} {"instruction": "How do you calculate the sum of a list of numbers in Python?", "input": "", "output": "The sum of a list of numbers in Python can be calculated using the built-in sum() function. This function takes an iterable object (such as a list or tuple) containing numbers as its argument and returns the sum of all the elements in the object. For example, sum([1,2,3]) will return 6."} {"instruction": "Generate a class in Python for representing customers in a banking application. It should include attributes for customer name, account number, and account balance.", "input": "Not applicable", "output": "class Customer:\n def __init__(self, name, account_number, balance):\n self.name = name\n self.account_number = account_number\n self.balance = balance\n \n def get_balance(self):\n return self.balance\n \n def deposit(self, amount):\n self.balance += amount\n \n def withdrawal(self, amount):\n self.balance -= amount"} {"instruction": "Generate a classification model to classify spam messages using logistic regression in python.", "input": "", "output": "\"\"\"\nGenerate a classification model to classify spam messages using logistic regression in python\n\"\"\"\n\n# Import libraries\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split \nfrom sklearn.linear_model import LogisticRegression \n\n# Read the dataset\ndataset = pd.read_csv('spam.csv')\n\n# Split the dataset into features and labels\nX = dataset.iloc[:, :-1].values \ny = dataset.iloc[:, -1].values\n\n# Split the dataset into training and test data\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=1)\n\n# Create a Logistic Regression model and train it\nlog_reg = LogisticRegression() \nlog_reg.fit(X_train, y_train)\n\n# Calculate the accuracy score\naccuracy = log_reg.score(X_test, y_test)\n\nprint('Accuracy of logistic regression classifier on test set: {:.2f}'.format(accuracy))"} {"instruction": "Construct an MySQL query to select records from a table named 'employees' where salary is between 50000 and 100000.", "input": "", "output": "SELECT * FROM employees WHERE salary BETWEEN 50000 AND 100000;"} {"instruction": "Write a Python function to find the maximum from 3 numbers.", "input": "10, 7, 4", "output": "def find_max(a, b, c):\n max = a\n if b > max:\n max = b\n if c > max:\n max = c\n return max\n\nmax_number = find_max(10, 7, 4)\nprint('Maximum number is', max_number)"} {"instruction": "Write a query to count the number of movies released in 2020 from the database.", "input": "", "output": "SELECT COUNT(*) AS total_movies FROM movies WHERE year = 2020;"} {"instruction": "Design python code to optimize the following function: ⅇ͏^(−𝐱^2)", "input": "", "output": "import math\nfrom scipy.optimize import minimize\n\ndef objective(x):\n return math.exp(-x**2)\n\nx0 = 5\nprint('Initial objective: ' + str(objective(x0)))\n\nsolution = minimize(objective, x0)\nprint('Optimized objective: ' + str(objective(solution.x)))"} {"text": "[CS Wikipedia] Widescreen eXtended Graphics Array++\n\nWXGA++, neboli Widescreen eXtended Graphics Array je standard displejů s grafickým rozlišením 1600 × 900 pixelů. Z CRT monitorů tímto rozlišením disponovalo jen několik málo nejdražších profesionální modelů. Nyní je využíván na LCD obrazovkách ve větších noteboocích s úhlopříčkou 16,4 palců a poměrem stran 16:9. Standardy počítačových displejů"} {"text": "[DE Wikipedia] Kieferorthopädie\n\nDie Kieferorthopädie ist das Teilgebiet der Zahnmedizin, das sich mit der Erkennung und Behandlung von Fehlstellungen der Kiefer und der Zähne (Zahnfehlstellung) befasst. Der Inhalt des Fachbereichs wird besser durch die Bezeichnung Dento-Maxilläre Orthopädie (Kieferregulierung) wiedergegeben. Der Begriff Orthodontie (Zahnregulierung) wird vor allem in nichtdeutschsprachigen Ländern verwendet. Geschichte Das erste orthodontische Spezialwerk schrieb 1836 Friedrich Christian Kneisel, der Leibzahnarzt von Carl von Preußen mit Der Schiefstand der Zähne […]. Die ersten systematischen Lehrbücher über Kieferorthopädie wurden von Norman Kingsley 1880 und von Edward H. Angle, dem „Vater der Kieferorthopädie“, ab 1887 veröffentlicht. Bis in die Mitte des 19. Jahrhunderts waren in England die ersten, von Joseph Fox (1755–1816) publizierten Anleitungen zur Zahnregulierung in Gebrauch. Die 1927 erfolgte Einführung der Orthodontie (Zahnregulierung) als Prüfungsfach in Deutschland war das Verdienst des unter anderem für die Entwicklung der modernen Kieferorthopädie und der Schulzahnpflege bedeutsamen Zahnmediziners Alfred Kantorowicz. Kieferorthopädische Diagnostik Vor jeder kieferorthopädischen Behandlung muss eine ausführliche Diagnostik erfolgen. Diese besteht aus einer ausführlichen allgemein- und zahnärztlichen Anamnese sowie der ätiologischen Beurteilung der Patientensituation. Anschließend folgt die klinische Untersuchung, eine Funktionsanalyse, Modellanalyse und eine fernröntgenologische Untersuchung. Mit Hilfe dieser Untersuchung wird die Kieferrelation, die Lagebeziehung zwischen dem Oberkiefer und Unterkiefer, dargestellt. Gleichzeitig werden die dentoalveolären Befunde erhoben und das Dentitionsstadium festgestellt. Klassifikation Zur Einteilung und Abgrenzung der Anomalien existieren verschiedene Klassifikationen. Die in der alltäglichen medizinischen Kommunikation nach wie vor gebräuchlichste Klassifikation ist die Einteilung in Angle-Klassen. Die Klassifikation nach Angle teilt Zahnfehlstellungen in drei Klassen ein, je nach Stellung der Sechsjahrmolaren zueinander. Diese Klassen werden mit römisch I bis III beziffert, wobei Klasse I eine eugnathe (d. h. regelrechte/neutrale) Relation, beschreibt. Klasse II eine distale (d. h. eine dorsale (zum Rücken hin gelegen)) Lage des ersten UK-Molaren zum ersten OK-Molaren beschreibt. Klasse III eine mesiale Verzahnung der Backenzähne beschreibt. Sie wird auch Prognathie genannt. Sie kann mit einer Progenie einhergehen. Nachteil dieser Einteilung ist die Betrachtung entlang nur einer Raumachse in der Sagittalebene im Schlussbiss. Abweichungen in anderen Raumachsen, asymmetrische Abweichungen, funktionelle Störungen usw. werden nicht erfasst. In Deutschland ist für den Versicherten der gesetzlichen…"} {"instruction": "Write a Python program to optimize the given linear objective function using the Simplex algorithm.", "input": "", "output": "import numpy as np\nfrom scipy.optimize import minimize\n\ndef optimize_function(objective):\n bounds = ((0, None), (0, None), (0, None))\n res = minimize(objective, [1,1,1], method=\"Nelder-Mead\", bounds=bounds)\n return res"} {"instruction": "Create a text-based user interface for a simple game using Python. The game should allow the user to start a game, make moves, and view the game status.", "input": "Not applicable", "output": "import os\nimport sys\n\nclass game:\n def __init__(self):\n self.board = [[0, 0, 0],\n [0, 0, 0],\n [0, 0, 0]]\n self.turn = 'X'\n self.score = [0, 0]\n\n def move(self, x, y):\n self.board[x][y] = self.turn\n if self.turn == 'X':\n self.turn = 'O'\n else:\n self.turn = 'X'\n\n def display(self):\n os.system('clear')\n for i in range(3):\n print(self.board[i])\n\n def winCondition(self):\n for player in ['X', 'O']:\n # check rows\n for i in range(3):\n if self.board[i] == [player, player, player]:\n self.score[0 if player == 'X' else 1] += 1\n return True\n\n # check columns\n for i in range(3):\n if self.board[0][i] == player and self.board[1][i] == player and self.board[2][i] == player:\n self.score[0 if player == 'X' else 1] += 1\n return True\n\n # check diagonals\n if self.board[0][0] == player and self.board[1][1] == player and self.board[2][2] == player:\n self.score[0 if player == 'X' else 1] += 1\n return True\n\n if self.board[2][0] == player and self.board[1][1] == player and self.board[0][2] == player:\n self.score[0 if player == 'X' else 1] += 1\n return True\n\n return False\n\ndef main():\n myGame = game()\n while True:\n myGame.display()\n print(\"Turn: {}\".format(myGame.turn))\n move = input(\"Please input move (x, y): \").split(',')\n x, y = int(move[0]), int(move[1])\n if 0 <= x < 3 and 0 <= y < 3 and myGame.board[x][y] == 0:\n myGame.move(x, y)\n if myGame.winCondition():\n myGame.display()\n print(\"Player X: {} | Player O: {}\".format(myGame.score[0], myGame.score[1]))\n sys.exit(0)\n\nif __name__ == \"__main__\":\n main()"} {"text": "[DE Wikipedia] Hermann von Sachsenheim (Landhofmeister)\n\nHermann von Sachsenheim (* um 1428/1430; † 15. November 1508) war ein deutscher Politiker aus dem Rittergeschlecht der Sachsenheimer und Sohn des gleichnamigen Minnesängers. Als Landhofmeister und Diplomat stand er im Dienst der württembergischen Herrscher. Die Stadt Sachsenheim verdankt ihm die Verleihung des Stadtrechts 1495 durch den späteren Kaiser Maximilian I. Leben Herkunft Hermann von Sachsenheim wurde zwischen 1428 und 1430 geboren als Sohn des Minnedichters Hermann von Sachsenheim und seiner ersten Frau Agnes Mönch. Sein Vater entstammte einem alten Rittergeschlecht aus Sachsenheim, war Rat der württembergischen Grafen und wandte sich im hohen Alter der Minnesangdichtung zu. → Familie. Ausbildung Hermann von Sachsenheim begann im Wintersemester 1446/1447 ein Studium an der Universität Heidelberg. Wahrscheinlich beendete er das Studium wie sein Bruder Jörg von Sachsenheim als Baccalaureus Artium. Falls er sich wie dieser mit 18 Jahren immatrikulierte, wäre er 1428 geboren worden. War er jünger, aber mindestens 16 Jahre alt, wäre er spätestens 1429 oder 1430 geboren worden. In jedem Fall wäre er ein Sohn von Agnes Mönch, der ersten Frau des Minnedichters, die 1431 starb. Politik und Diplomatie Um 1462 begann Hermann seine politische Karriere. Er bekleidete hohe Ämter in Württemberg und war oft als Gesandter unterwegs, zuerst in den 1460er Jahren unter Graf Ulrich dem Vielgeliebten. Von 1466 bis 1471 hatte er zum ersten Mal das Amt eines Landhofmeisters inne. „Der Landhofmeister war der erste Beamte, der zunächst für staatliche, nicht für Geschäfte des Hofhalts aufgestellt war. Ihm wurden solche Geschäfte aus dem ganzen Lande übertragen; ihm lag vor allem die Aufsicht über die Amtleute ob. Er war oberste Instanz für alle Finanzsachen.“ 1468 begleitete er Graf Eberhard im Bart auf einer Pilgerfahrt nach Jerusalem, wo er und die übrigen adligen Begleiter in der Grabeskirche zum Ritter vom Heiligen Grab geschlagen wurden. in den 1470er Jahren stand Hermann im Dienst von Mechthild von der Pfalz, verwitwete Gräfin von Württemberg und Mutter von Graf Eberhard im Bart, die in Rottenburg am Neckar ihren Sitz hatte. Daneben war Hermann Landvogt in Horb und in Rottenburg. 1474 war er im Gefolge von Graf Eberhard im Bart, als dieser nach Mantua reiste, um sich dort mit Markgräfin Barbara Gonzaga zu verheiraten. 1481 wurde Hermann für 15 Jahre zum Landhofmeister des Stuttgarter Teils von Württemberg bestellt. Im Münsinger Vertrag 1482, an dessen Abschluss er zusammen mit Ludwig Vergenhans beteiligt war, wurden der Uracher und der Stuttgarter Teil von Württemberg wieder vereinigt. Eberhard im Bart, bisher Graf in Urach, übernahm die Regierung in Stuttgart und sein bisheriger Landhofmeister trat an Hermanns Stelle. Hermann diente nun dem Grafen als Rat, zu…"} {"instruction": "Write an HTML page that displays one heading and two paragraphs.", "input": "", "output": " Page Title

      Heading

      Paragraph 1

      Paragraph 2

      "} {"text": "[EN Wikipedia] Çukur\n\nÇukur () is a Turkish action, drama and thriller television series Produced by Ay Yapım, directed by Sinan Öztürk and written by Gökhan Horzum and Damla Serim. It premiered on 23 October 2017 and concluded on 7 June 2021 with a total of 131 episodes (four seasons). Plot The Koçovalı family is in control of Çukur, the crime-ridden neighborhood of Istanbul. Despite being so involved in crime, the family has its own rules. One of these rules is the prohibition of drugs. No drugs are produced, used or sold in Çukur. But the groups that are new to the game try to break the ban. Filming Çukur is shot in the Balat district of Istanbul's Fatih district. Some scenes of the first and second episodes of the first season were shot in Paris, the capital of France, and some scenes of the third season were shot in Berlin, the capital of Germany. After the series ended, in 2022, a fire broke out in the building of the coffee house where the series was shot. Cast Soundtracks Series overview International broadcasting on Gem TV since 2019 as Godal (گودال). Dubbed in Persian language. on Kana TV since 2019 as የኛ ሰፈር () on beIN Drama since 2019 as Alhufra (الحفرة). Dubbed in Arabic language. South Africa in Eextra since 2022 as in Afrikaans as Die Put (english as The Pit) on Nova BH since 2022 as Jama Serbia on Nova S since 2021 as Jama (Only 1. season) Albania on TV Klan since November 2022 Bookmaking Gökhan Horzum, the screenwriter of the series, published a book about the first season of the series called Yamaç's Return - Çukur in October 2019. The cover design of the book was made by Serçin Çabuk and Banu Üstündağ Hatip. Reviews Çukur has a story that reduces the neighborhood to a bad image (pit), unlike the Turkish TV series of the 2000s that deal with the neighborhood culture. Nurdan Gürbilek commented on \"family, masculinity and the mafia series\" by devoting a separate section to the line in his work titled Second Life. In the series, first the hero leaves the house and then returns to the threatened neighborhood as a savior. Gürbilek interprets this as a classic return story and evaluates it as a popular version of the \"man returning home\" narrative. According to him, the music of the TV series (mainly the songs of Gazapizm and Eypio) that integrates with the scenes of violence are rap pieces that have been converted into close combat music. In the series, the name of the struggle of the heirs (self and stepchildren) created by the father's image and the fall of the father is \"brothers' fight\". On the other hand, those under the command of Baba (Idris et al.) and the neighborhood leader (Yamaç et al.), who stand out as the saviors and protectors of the poor (neighbourhood), are \"fatherless children\". According to Gürbilek, the neighborhood is seen as a…"} {"instruction": "Generate a Random Forest classifier in Python to categorize emails into two classes - spam and not-spam.", "input": "Not applicable", "output": "# Random Forest classifier setup\nfrom sklearn.ensemble import RandomForestClassifier\n\n# Sample data \nX = [['email_1'], ['email_2'], ...]\ny = [0, 1, ...] # 0 is not-spam, 1 is spam\n\n# Train the model\nmodel = RandomForestClassifier(n_estimators=100)\nmodel.fit(X, y)\n\n# Make predictions\npredictions = model.predict(X_test)"} {"instruction": "What's the output of this program in Python given the following input?", "input": "input_string = \"Hello, World!\" list_of_chars = list(input_string) for current_char in list_of_chars: print(current_char)", "output": "H e l l o , W o r l d !"} {"instruction": "Implement a validator in Python that checks the format of user input for a given field and throws an error if it is not valid.", "input": "Not applicable", "output": "def validate(data, field, regex):\n # makes sure data is not empty\n if not data:\n raise ValueError('Data is required.')\n # makes sure data contains field\n if not field in data:\n raise ValueError('Field ' + field + ' is required.')\n # check format of data\n import re\n if not re.match(regex, data[field]):\n raise ValueError('Field ' + field + ' is not valid.')"} {"instruction": "Write an SQL query to count the number of people with a given last name in a table of people.", "input": "lastName = 'Smith'", "output": "SELECT COUNT(*) FROM people WHERE lastName = 'Smith';"} {"instruction": "Write a Python program that can generate all permutations of a given list.", "input": "list_a = [1, 2, 3]", "output": "def generate_permutations(list_a):\n import itertools \n return list(itertools.permutations(list_a))\n \ngenerate_permutations(list_a)"} {"text": "[HI Wikipedia] सुदास (ऋग्वेद)\n\nसुदास भारत में एक प्राचीन राजा थे जिनका उल्लेख ऋग्वेद में मिलता है। वे दशराज्ञ युद्ध के विजेता थे जिसका वर्णन ऋग्वेद ७:१८, ७:३३ और ७:८३:४-८ में है। उनका जीवनकाल अलग-अलग स्रोतों में १७०० ईसापूर्व से लेकर ११०० ईसापूर्व के बीच के किसी समय में अनुमानित किया जाता है। नामार्थ 'सुदास' के नाम के अर्थ पर कुछ विवाद है। वैदिक संस्कृत में इसके दो सम्भव मतलब हैं: 'पूजा वाला कूआँ' - यह वैदिक संस्कृत में 'सुदा' होता है, जो स्त्रिलिंग है और जिसमें अंत में '-स' जोड़कर पुल्लिंग बनता है। 'सुंदर या अच्छे उपहारों का दाता' - यह सु+दा जोड़कर बनता है। साथ ही मद्र के लोग अन्त के विसर्ग पर ज़ोर देकर उसे '-स' उच्चारित करते थे। कुल सुदास हिन्द-आर्यों के 'भारत' नामक समुदाय के 'तृत्सु' नामक क़बीले के नरेश थे। वे दिवोदास के पुत्र थे, जो स्वयं सृंजय के पुत्र थे। सृंजय के पिता का नाम देववत था। दशराज्ञ युद्ध के बाद भारत समुदाय का हिन्द-आर्य लोगों में बोलबाला हो गया और आगे चलकर यही पूरे देश का नाम भी पड़ गया। उस काल में राजनैतिक व्यवस्था गणतांत्रिक क़बीलों से परिवर्तित होकर राजाओं पर केन्द्रित भी हो रही थी। दशराज्ञ युद्ध में विजयी भारत क़बीला राजा-प्रथा पर आधारित था जबकि उनके विरोध में खड़े १० क़बीले लगभग सभी लोकतांत्रिक थे। इन्हें भी देखें दिवोदास (ऋग्वेद) ऋग्वेद सन्दर्भ ऋग्वेद"} {"text": "[HI Wikipedia] शहर\n\nशहर बड़ी और स्थायी मानव बस्ती होती है। शहर में आम तौर पर आवास, परिवहन, स्वच्छता, भूमि उपयोग और संचार के लिए निर्मित किया गया एक व्यापक सिस्टम होता हैं। ऐतिहासिक रूप से शहरवासियों का समग्र रूप से मानवता में छोटा सा अनुपात रहा है। लेकिन आज दो शताब्दियों से अभूतपूर्व और तेजी से शहरीकरण के कारण, कहा जाता है कि आज आधी आबादी शहरों में रह रही हैं। वर्तमान में शहर आमतौर पर बड़े महानगरीय क्षेत्र और शहरी क्षेत्र के केंद्र होते हैं। सबसे आबादी वाला उचित शहर शंघाई है। एक शहर अन्य मानव बस्तियों से अपने अपेक्षाकृत बड़े आकार के कारण भिन्न होता है। शहर अकेले आकार से ही अलग नहीं है, बल्कि यह एक बड़े राजनीतिक संदर्भ में भूमिका निभाता है। शहर अपने आसपास के क्षेत्रों के लिए प्रशासनिक, वाणिज्यिक, धार्मिक और सांस्कृतिक केंद्रों के रूप में सेवा देता है। एक विशिष्ट शहर में पेशेवर प्रशासक, नियम-कायदे होते हैं और सरकार के कर्मचारियों को खिलाने के लिए कराधान भी। शहर शब्द फारसी से हिन्दी भाषा में आया है। पुराना संस्कृत शब्द नगर भी उपयोग किया जाता विशेषकर सरकारी कार्य में जैसे कि नगर निगम। यह भी देखिए भारत के शहर संदर्भ सभ्यता देशीय उपविभागों के प्रकार"} {"instruction": "Produce a chart of linear equations in Python.", "input": "Equations:\ny = 5x + 2\ny = -3x + 6", "output": "import matplotlib.pyplot as plt\n\nx = [i for i in range(-10, 10)]\ny1 = [5*i + 2 for i in x]\ny2 = [-3*i + 6 for i in x]\n\nplt.plot(x, y1, label='y = 5x + 2')\nplt.plot(x, y2, label='y = -3x + 6')\nplt.legend()\nplt.show()"} {"text": "[HI Wikipedia] ओरेनबूर्ग ओब्लास्त\n\nओरेनबूर्ग, रूस का एक ओब्लास्त (области या प्रांत) है। सोवियत संघ के ज़माने में, १९३८ से १९५७ तक, इसका नाम बदलकर च्कालोव ओब्लास्त रखा गया था। विवरण ओरेनबूर्ग ओब्लास्त की दक्षिणी सीमाएँ काज़ाख़स्तान से लगती हैं। यूराल नदी इस ओब्लास्त की प्रमुख जलधारा है। लोग २०१० की जनगणना के हिसाब से ओरेनबूर्ग ओब्लास्त के समुदाय इस प्रकार थे: रूसी (७५.९%), तातार (७.६%), काज़ाख़ (६%), युक्रेनी (२.५%), बाशक़ीर (२.३%), मोर्दवीनी (१.९%), जर्मन (०.६%), चुवाश (०.६%), अज़ेरी (०.४%) और बेलारूसी (०.३%)। सन्दर्भ ओरेनबूर्ग ओब्लास्त रूस के ओब्लास्त रूस के प्रशासनिक विभाग"} {"instruction": "Write a python program to generate an array filled with the first n prime numbers.", "input": "n = 10", "output": "# Python3 code to generate an \n# array containing first n primes \nimport math \n\ndef generatePrimeArray(n): \n\tprime = [True for i in range(n + 1)] \n\tp = 2\n\twhile (p * p <= n): \n\t\tif (prime[p] == True): \n\t\t\tfor i in range(p * 2, n + 1, p): \n\t\t\t\tprime[i] = False\n\t\tp += 1\n\n\t# prime[0]= False\n\t# prime[1]= False\n\n\t# Store prime numbers \n\tprime_numbers = [] \n\tfor p in range(n + 1): \n\t\tif prime[p]: \n\t\t\tprime_numbers.append(p) \n\n\t# Print the array \n\treturn prime_numbers \n\nresult = generatePrimeArray(n)\nprint(result)"} {"instruction": "Generate a Python function that takes two three-dimensional vectors as parameters and computes the magnitude of the cross product.", "input": "Not applicable", "output": "def cross_product_magnitude(vector_a, vector_b):\n \"\"\" Calculate the magnitude of the cross product of two 3D vectors \"\"\"\n vector_a_x, vector_a_y, vector_a_z = vector_a\n vector_b_x, vector_b_y, vector_b_z = vector_b\n \n # Calculate the cross product\n cross_x = vector_a_y * vector_b_z - vector_a_z * vector_b_y\n cross_y = vector_a_z * vector_b_x - vector_a_x * vector_b_z\n cross_z = vector_a_x * vector_b_y - vector_a_y * vector_b_x\n \n # Calculate the magnitude\n magnitude = math.sqrt(cross_x ** 2 + cross_y ** 2 + cross_z ** 2)\n \n return magnitude"} {"instruction": "You need to write an API request in Python to return JSON data from an API endpoint.", "input": "", "output": "import requests API_ENDPOINT = 'api.example.com/data' response = requests.get(API_ENDPOINT) if response.status_code == 200: data = response.json()"} {"instruction": "Write a regular expression to extract the city names from the following string.", "input": "address: #38 number street, new york city, san jose, CA", "output": "import re address_string = \"#38 number street, new york city, san jose, CA\" pattern = r'(?:,|^)([\\s\\w]*)(?:,|$)' result = re.findall(pattern, address_string) print(result) // ['new york city', 'san jose']"} {"instruction": "Create a class in Python to store employee details like name, age and salary.", "input": "", "output": "class Employee:\n def __init__(self, name, age, salary):\n self.name = name\n self.age = age\n self.salary = salary\n \n def get_details(self):\n print(f\"Name: {self.name}\")\n print(f\"Age: {self.age}\")\n print(f\"Salary: {self.salary}\")"} {"instruction": "Create a class called 'Address' with four string fields: address line 1, address line 2, city, and zipCode.", "input": "", "output": "class Address { String addressL1; String addressL2; String city; String zipCode; public Address(String addressL1, String addressL2, String city, String zipCode) { this.addressL1 = addressL1; this.addressL2 = addressL2; this.city = city; this.zipCode = zipCode; } }"} {"instruction": "Design a Python algorithm to merge two sorted lists.", "input": "", "output": "def merge_two_lists(list1, list2):\n merged_list = []\n \n while list1 and list2:\n if list1[0] < list2[0]:\n merged_list.append(list1.pop(0))\n else:\n merged_list.append(list2.pop(0))\n merged_list.extend(list1 or list2)\n return merged_list"} {"instruction": "Write a Python program that predicts the future price of a stock in two weeks.", "input": "Current stock prices: IBM $145, AAPL $285, MSFT $181", "output": "# Import necessary libraries\nimport numpy as np\nimport pandas as pd\nfrom sklearn.linear_model import LinearRegression\n\n# Load the data\ndata = [[145, 285, 181], [149, 290, 184], [153, 295, 187]]\ndata = pd.DataFrame(data, columns=['IBM', 'AAPL', 'MSFT'])\n\n# Define and fit the linear regression model\nmodel = LinearRegression()\nmodel.fit(data[['IBM', 'AAPL', 'MSFT']], data.shift(-1))\n\n# Make predictions for the future stock prices\npredictions = model.predict([[145, 285, 181], [149, 290, 184]])[0]\nprint('Predicted future stock prices: IBM: %f, AAPL: $%f, MSFT: $%f.' %\n (predictions[0], predictions[1], predictions[2]))"} {"instruction": "Write a Python program that takes a URL and checks for broken links.", "input": "", "output": "import requests\n\ndef check_for_broken_links(url):\n # Request webpage\n response = requests.get(url)\n\n # Parse webpage for all links\n links = response.html.find_all('a')\n \n # Check response code of each link\n for link in links:\n link_url = link['href']\n response = requests.get(link_url)\n if not response.ok:\n # Link is broken\n print('Broken link found:', link_url)\n\ncheck_for_broken_links('http://example.com')"} {"instruction": "Write a Python 3 script that reads input from stdin line by line and prints the number of occurrences of each word.", "input": "The quick brown fox jumps over the lazy dog", "output": "import sys\n\ndictionary={}\n\nfor line in sys.stdin:\n words_in_line = line.split()\n for word in words_in_line:\n word=word.lower()\n if word in dictionary:\n dictionary[word]+=1\n else:\n dictionary[word]=1\n\nfor word in dictionary:\n print(word +\":\"+ str(dictionary[word]))"} {"instruction": "Write a procedure in PL/SQL to find the sum of numbers from 1 to 10.", "input": "", "output": "create or replace procedure addNums(sum OUT NUMBER) begin sum := 0; for i in 1 .. 10 loop sum := sum + i; end loop; end addNums;"} {"instruction": "Create a program in Java that finds the maximum element in an array.", "input": "", "output": "public static int getMaxElement(int[] arr) { int max = Integer.MIN_VALUE; for (int el : arr) { if (el > max) max = el; } return max; }"} {"instruction": "Develop a Python program to calculate the mean of a given array.", "input": "60, 54, 77, 78, 37, 35", "output": "def mean(arr):\n total = 0\n for num in arr:\n total += num\n return total/len(arr)\n\narr = [60, 54, 77, 78, 37, 35]\nprint(\"Mean: \", mean(arr))"} {"instruction": "Create a PHP function to calculate the total amount of tax to be paid given the income and tax rate.", "input": "income = 50000, tax rate = 0.2", "output": "function calcTax(income, rate) { return income * rate; } var totalTax = calcTax(50000, 0.2); console.log(totalTax); //10000"} {"instruction": "Generate a Python program to construct a hash table that stores strings as keys and integers as values.", "input": "", "output": "def create_hash_table():\n hash_table = dict(zip(list_of_strings, list_of_integers))\n return hash_table"} {"instruction": "Create a program to create a new string where the first and last occurrence of each character is removed.", "input": "'Hello World'", "output": "def strip_string(s): new_str = \"\" counts = {} # Create a dictionary to record the number of occurrences of each character for letter in s: if letter not in counts: counts[letter] = 1 else: counts[letter] += 1 for char in s: if counts[char] > 1: new_str += char counts[char] -= 1 return new_str"} {"instruction": "Transform the given XML data into a Python dictionary.", "input": "\n \n John\n 27\n \n Movies\n Photography\n \n \n", "output": "import xml.etree.ElementTree as et\nroot = et.fromstring('John27MoviesPhotography')\n\ndata_dict = {}\n\nfor elem in list(root):\n key = elem.tag\n data_dict[key] = {}\n for subelem in list(elem):\n data_dict[key][subelem.tag] = subelem.text\n\nprint(data_dict)\n\n# Output\n{'person': {'name': 'John', 'age': '27', 'hobbies': {'hobby': ['Movies', 'Photography']}}}"} {"instruction": "Generate a class in Python to represent a Person with the following attributes: name, age, gender.", "input": "", "output": "class Person:\n def __init__(self, name, age, gender):\n self.name = name\n self.age = age\n self.gender = gender\n \n def get_name(self):\n return self.name\n \n def get_age(self):\n return self.age\n \n def get_gender(self):\n return self.gender"} {"instruction": "Create a Java program to implement the classic Tic Tac Toe game.", "input": "", "output": "import java.util.Scanner; public class TicTacToe { public static char[][] board = new char[3][3]; public static boolean playerX; public static Scanner scan; public static void main(String[] args) { scan = new Scanner(System.in); playerX = true; initializeBoard(); while(true) { printBoard(); nextMove(playerX); if(checkWinner()) { break; } playerX = !playerX; } } public static void initializeBoard() { for(int i=0;i<3;i++) for(int j=0;j<3;j++) board[i][j] = '-'; } public static void printBoard() { System.out.println(\"-------------\"); for (int i = 0; i < 3; i++) { System.out.print(\"| \"); for (int j = 0; j < 3; j++) { System.out.print(board[i][j] + \" | \"); } System.out.println(); } System.out.println(\"-------------\"); } public static void nextMove(boolean player) { if(player) System.out.print(\"Player X, enter your move row,col: \"); else System.out.print(\"Player O, enter your move row,col: \"); int row = scan.nextInt() - 1; int col = scan.nextInt() - 1; board[row][col] = player ? 'X' : 'O'; } public static boolean checkWinner() { // Horizontal win for(int i=0;i<3;i++) { if(board[i][0] == board[i][1] && board[i][1] == board[i][2]) return true; } // Vertical win for(int j=0;j<3;j++) { if(board[0][j] == board[1][j] && board[1][j] == board[2][j]) return true; } // Diagonal win if(board[0][0] == board[1][1] && board[1][1] == board[2][2]) return true; if(board[2][0] == board[1][1] && board[1][1] == board[0][2]) return true; return false; } }"} {"text": "[CS Wikipedia] Kytarový efekt\n\nKytarový efekt je elektronické zařízení, které upravuje signál elektrické kytary vedený do zesilovače. Původní signál má tvar sinusoidy, ovšem kytarové efekty jej různě deformují, slangově „mrší“, proto jsou nazývány „mršítka“ nebo podle tvaru „krabičky“ či „pastičky“. V zahraničí se pro kytarový efekt užívá výraz „stompbox“. Nejpoužívanějším typem kytarového efektu je zkreslovač (distortion). Ten výrazným způsobem mění původní signál z kytary tím, že jej zkresluje. Pokud není zvuk elektrické kytary zkreslen samotným zesilovačem, zní podobně jako běžná akustická kytara. Takový zvuk označujeme jako čistý (clean). Rozdělení efektů booster – zesiluje a prodlužuje signál delay – efekt umožňující opakování tónů distortion – zkreslovač, který využívá zapojení diody proti zemi (hard clipping) feed backer flanger – zvuk připomínající startující tryskové letadlo fuzz – prapůvodní efekt, který zkresluje zvuk přebuzenými tranzistory chorus – modulační efekt – k původnímu signálu se přidá další signál (či více) různě zpožděný kompresor – upravuje úroveň signálu (nízký signál zvýší a silný sníží) kvákadlo (wah–wah) limiter octaver – přidá k původnímu zvuku signál o oktávu (i více) níž overdrive – zkreslovač – diody zapojené ve zpětné vazbě operačního zesilovače – měkčí zkreslení reverb, hall, echo – dozvukové efekty sustainer – podobný princip jako u kompresoru s cílem delšího a plynulejšího sustainu (dozvuku kytary) Výrobci efektů Existují desítky výrobců efektů. Mezi nimi se proslavil především Boss, který má v nabídce všechny druhy efektů, jež jsou zároveň velmi spolehlivé. Dalšími jsou např. MXR, Digitech, DOD (již zaniklý, spojený s firmou Digitech). V podstatě každá firma vyrábějící kytarové zesilovače produkuje i nějaké krabičky. Mimoto existuje množství malých výrobců krabiček; z českých například VHRelief (specializace na overdrivy). Slavné krabičky Electro Harmonix BIG MUFF π Ibanez Tubescreamer Boss MT-2 Metal Zone Boss DS-1 Distortion Fuzz Face aj. Pořadí efektů v pedalboardu Standardní řazení efektů bývá ve schématu: kvákadlo, comprese, zkreslení, modulace, delay. Nejčastější zapojení: 1. wah-wah, 2. compressor/limiter, 3. overdrive, 4. distortion, 5. chorus, 6. delay/echo, 7. reverb. Multiefekty a kytarové procesory Jestliže je několik krabiček integrováno do jednoho šasi, vznikne multiefekt. Jednotlivé zvuky jsou stále tvořeny analogovými součástkami. U kytarových procesorů je situace jiná, neboť zde je zvuk vytvářen procesorem. Kytarové procesory mají lepší ovládání doplněné různými displeji a disponují větší škálou efektů. Externí odkazy Instrumento.cz: seznam a recenze efektů Kytarové efekty VHRelief overdrive – český výrobce overdrivů efekty Aleše Bajgera – konstruktéra známé firmy George Dennis Great Guitar Gear – zajímavé efekty Multiefekty…"} {"instruction": "Generate a list of 100,000 random numbers from 0 to 1 using NumPy in Python.", "input": "Not applicable", "output": "import numpy as np\n\nrandom_numbers = np.random.uniform(0, 1, 100000)"} {"text": "[CS Wikipedia] Vasilij Erošenko\n\nVasilij Erošenko (12. ledna 1890 – 23. prosince 1952) byl ruský spisovatel esperanta, nevidomý, přes svoji slepotu procestoval velkou část světa, hlavně Čínu a Japonsko. Psal japonsky a přednášel ruskou literaturu na pekingské univerzitě. Je autorem původních děl: Ĝemo de unu soleca animo (Povzdech osamělé duše) Unu paĝo el mia lerneja vivo (Jedna stránka z mého školního života) Turo por falo (Věž na spadnutí) Malvasta kaĝo (Úzká klec) báseň Ciganino (Cikánka) povídky Lumo kaj ombro (Světlo a stín) La tundro ĝemas (Tundra vzdychá) Jeho dílo patří třem literaturám: esperantské, ruské a japonské. Sloh výborný, sentimentální. Externí odkazy Ruští esperantisté Spisovatelé píšící esperantem Esperantská literatura Nevidomí spisovatelé Narození v roce 1890 Narození 12. ledna Úmrtí v roce 1952 Úmrtí 23. prosince Muži"} {"instruction": "Create a web crawling program using Python", "input": "", "output": "import requests \nfrom bs4 import BeautifulSoup \n \n# Function to crawl a given website \ndef web_crawl(url): \n \n # Get the content from the given URL \n page = requests.get(url) \n \n # Create a bs4 object with the content \n soup = BeautifulSoup(page.content, 'html.parser') \n \n # Find all links on the page \n links = soup.find_all(\"a\") \n \n # Iterate over all links \n for link in links: \n \n # Get the URL from the link \n link_url = link.get(\"href\") \n \n # Check if the URL is valid \n if link_url is not None and link_url != \"#\": \n \n #parse the URL to crawl further \n web_crawl(link_url) \n \n# Driver code \nif __name__ == \"__main__\": \n \n # Crawl the given website \n web_crawl(\"https://www.example.com\")"} {"instruction": "Create a Python dictionary which contains the student name and their grade for the course.", "input": "{ \"John\": 85, \"Alice\": 91, \"Bob\": 74 }", "output": "student_grades = { \"John\": 85, \"Alice\": 91, \"Bob\": 74 }"} {"text": "[EN Wikipedia] WEMY\n\nWEMY is a Christian radio station broadcasting on 91.5 FM, serving the Green Bay, Wisconsin area. The station's format consists of Christian adult contemporary music with some Christian talk and teaching. WEMY is also heard in the Manitowoc–Two Rivers area through a translator on 95.5. It is part of \"The Family\" radio network based at WEMI in Appleton. Prior to being a Christian radio station, 91.5 in Green Bay was established as WGBW, the radio station of the University of Wisconsin–Green Bay (UWGB), which later was absorbed into the Wisconsin Public Radio (WPR) network. The establishment of the higher-powered WHID (88.1 FM) superseded WGBW as a public station and led to the sale of the frequency to its present owners. History Early years When UWGB was founded in 1968, there was consideration of building a radio station on the campus, but the idea was not immediately pursued. However, by 1973, the project was revived. The 91.5 frequency had become available that January when the Wisconsin Educational FM Network, WPR's predecessor, replaced its transmitters at Suring (WHMD-FM) and Chilton with one transmitter on Scray Hill; at the time, the only Green Bay-centric opt-outs on the network were weather reports. On October 4, the Federal Communications Commission granted UWGB a construction permit for a new 3,000-watt radio station on the campus. It took longer than expected to acquire equipment and train students to run the new WGBW, which debuted August 26, 1974. Some of the equipment used came from the defunct Suring state transmitter. Offering a broad mix of \"alternative radio\" six days a week (expanding to Sundays in 1975), WGBW was among the stronger campus stations in the UW system, also airing coverage of UWGB athletics. Students were heavily involved in the operation; in 1979, one student's entire semester credit load at UWGB consisted of programming WGBW for six hours a day, which represented a major increase in the station's output. A transition to public radio By 1981, there were 11 campus stations in the UW System and nine in Wisconsin Public Radio, run by the Educational Communications Board. In January 1981, the board accepted a proposal that would make it the sole public broadcasting agency in the state of Wisconsin, as fears of budget cuts and new technologies prompted a proposal to team campus stations and WPR outlets covering the same areas. No changes were immediately felt after the move, with student programming continuing to air on the station. In 1985, however, a complaint about obscene descriptions of sexual activity led the station to temporarily halt broadcasting after 5 p.m. The self-imposed cutback lasted into October, when station staffers sought ways to restore evening programming. In late 1985, WGBW became the new home for…"} {"instruction": "Create a HTML page to show a result of the sum of two numbers.", "input": "", "output": " Sum of Two Numbers "} {"text": "[CS Wikipedia] Nobujuki Hijama\n\nNobujuki Hijama (檜山 修之, Hijama Nobujuki, Hiyama Nobuyuki) se narodil 25. srpna, 1967. Nobujuki je populární japonský seijú, který se narodil v Hirošimě. V současnosti je člen Arts Vision. Vybrané role Anime RockMan.EXE (Rei Saiko) (西古 レイ) Bleach (Ikkaku Madarame) Kapitán Cubasa J (Kodžiró Hjúga) (日向 小次郎) Kovboj Bebop (Šin) Fušigi Júgi (Hikicu) Initial D (Takeši Nakazato) Velká zkouška (Hiei) Dabing Zjizvená tvář (Chi-Chi, Angel Salazar) Japonští dabéři Narození v roce 1967 Narození 25. srpna Muži Žijící lidé"} {"instruction": "Using a for loop, count the number of words in the below string.", "input": "string = \"This is a test string\"", "output": "count = 0 for word in string.split(): count += 1 print(\"Number of words:\", count)"} {"instruction": "Generate a python program which prints a formatted list containing the elements from two input lists.", "input": "list_1 = [1, 2, 3] \nlist_2 = [4, 5, 6]", "output": "def print_list(list_1, list_2): \n formatted_list = [list_1 + list_2 for i in range(len(list_1))] \n for x in formatted_list: \n for y in x: \n print(y) \n \nlist_1 = [1, 2, 3] \nlist_2 = [4, 5, 6]\nprint_list(list_1, list_2)\n\n# Output:\n# 1\n# 2\n# 3\n# 4\n# 5\n# 6"} {"text": "[DE Wikipedia] Wolxheim\n\nWolxheim (elsässisch: Wolixe) ist eine französische Gemeinde mit Einwohnern (Stand ) im Département Bas-Rhin in der Region Grand Est (bis 2015 Elsass). Sie ist Mitglied der Communauté de communes de la Région de Molsheim-Mutzig. Wappen Blasonierung: Eine goldene Wolfsangel auf blauem Grund. Geografie Wolxheim liegt an der Departementsstraße D45 zwischen Ergersheim und Soultz-les-Bains. Außerorts ist die Landwirtschaft mit dem Acker- und dem Weinbau ansässig. Durch das Dorf fließt der Fluss Bruche. Geschichte Erstmals urkundlich erwähnt wird Wolxheim als „Olcishaim“ im Besitz des Klosters Murbach (Als.Dipl., Nr. 14). Als „Folcoladesheim“ erscheint es 739 und 742 auch in den Aufzeichnungen des Klosters Weißenburg (Trad.Wiz. 017 + 052). Für die karolingischen Herrscher scheint es im Gegensatz zu vielen Nachbarorten keine Bedeutung gehabt zu haben. 1003 soll es im Besitz der Straßburger Bischöfe und 1183 im Besitz des Klosters Odilienberg gewesen sein. Sicher nachweisbar ist es als „Wolganseheim“ im Besitz des Klosters Etival durch die Bestätigungsbulle Papst Lucius III. von 1182 (Regesta Imperii IV, 112). König Sigmund erwähnt in einer Urkunde von 1418 einen Ortsadligen, nämlich Helte de Wolfgangesheim (Regesta Imperii XI, 3339). Alle Heimatforscher meinen, dass der heutige Name Wolxheim erst ab 1453 verwendet wird, ohne einen Beleg dafür anzuführen. Von 1871 bis 1918 und dann noch einmal von 1940 bis 1944 gehörte Wolxheim zum Deutschen Reich. Weinbau Der Riesling von Wolxheim war der Lieblingswein Napoleons. Der Altenberg de Wolxheim ist eine Weinlage im Elsass. Seit dem 17. Dezember 1992 ist der Altenberg de Wolxheim Teil der Alsace Grand Cru Appellation und gehört damit zu den 51 potentiell besten Lagen des Elsass. Insgesamt wurden 31,20 Hektar Rebfläche zugelassen. Sehenswürdigkeiten Kirche St. Etienne (18. Jahrhundert) besteht aus einem einzigen Schiff mit Front- und Giebel-Portal. Sie hat einen polygonalen mit vertieften axialen gebauten Chor und einen Glockenturm. Der Chor wird mit vier großen Bildern geschmückt. Die Kanzel und das gesamte Mobiliar des Kirchenschiffs sind aus der Bauzeit. Auf dem Altar steht eine Statue von St. Urbain, dem Patron der Winzer. St. Etienne hat ein silbernes Prozessionskreuz, das mit Symbolen der Evangelisten verziert ist. Auch besitzt sie eine bemerkenswerte Orgel. Sie wurde um 1847 von Claude-Ignace Callinet (1803–1874), einem Mitglied der berühmten Orgelbauerfamilie Callinet gebaut. Diese Familie hat viele Orgelbauten in dieser Region errichtet. Chapelle St-Armuth / Sankt-Armuthskapelle von 1738. Hervorzuheben ist hier die Figurengruppe gegenüber der Lourdes-Grotte neben der Kapelle. Christus ist nicht mehr am Kreuz. Er liegt auf dem Schoß der Maria liegt in einer Pieta Pose. Maria Magdalena weint an ihrer Seite.…"} {"instruction": "Create an HTML form with one input field which requests the user's name.", "input": "", "output": "
      "} {"instruction": "Generate a Python class to compare two strings.", "input": "", "output": "class StrComparer:\n def __init__(self, str1, str2):\n self.str1 = str1\n self.str2 = str2\n \n def is_same(self):\n if self.str1 == self.str2:\n return True\n else:\n return False"} {"instruction": "Write a Python program to convert a binary number to decimal.", "input": "", "output": "def bin_to_dec(binary):\n decimal, i, n = 0, 0, 0\n while(binary != 0): \n dec = binary % 10\n decimal = decimal + dec * pow(2, i) \n binary = binary//10\n i += 1\n return decimal"} {"instruction": "Develop a python class that checks if a given number is a prime number or not.", "input": "", "output": "class CheckPrime(object):\n\n def __init__(self, number):\n self.number = number\n\n def is_prime(self):\n if self.number < 2:\n return False\n\n for i in range(2, self.number):\n if self.number % i == 0:\n return False\n \n return True\n\nif __name__ == '__main__':\n number = int(input('Please input a number: \\n'))\n check_prime = CheckPrime(number)\n if check_prime.is_prime():\n print('The number {} is a prime number.'.format(number))\n else:\n print('The number {} is not a prime number.'.format(number))"} {"instruction": "Construct a query to find all movies released since a given year.", "input": "year: 2000", "output": "SELECT * FROM movies WHERE year > 2000;"} {"instruction": "Write a C# program to remove all adjacent duplicates from a string.", "input": "string str = \"azxxzy\";", "output": "string removeAdjacentDuplicates(string str) { int l = str.Length; char[] array = str.ToCharArray(); int index = 0; for (int i = 0; i < l; i++) { if (i == 0 || array[i - 1] != array[i]) array[index++] = array[i]; else while (i + 1 < l && array[i + 1] == array[i]) i++; } return new string(array, 0, index); }"} {"instruction": "Construct a python program that prints a multiplication table given two numbers (x and y).", "input": "int x = 5; \nint y = 10;", "output": "int x = 5; \nint y = 10;\n\nfor i in range(1, y+1):\n for j in range(1, x+1):\n print('{} x {} = {}'.format(i, j, i*j))"} {"instruction": "Build a decison tree in Python to classify emails as spam or not spam.", "input": "", "output": "import pandas as pd\nfrom sklearn.tree import DecisionTreeClassifier \n\n# Create dataframe\ndf = pd.DataFrame({'content': ['This is a great deal!', 'Buy now!'], 'spam': [0, 1]})\n\n# Create features and labels\nX = df['content'] \ny = df['spam']\n\n# Create decision tree\ndtree_model = DecisionTreeClassifier(max_depth = 2).fit(X, y) \ndtree_predictions = dtree_model.predict(X) \n\n# Print accuracy\nprint(\"Accuracy:\", dtree_model.score(X, y))"} {"text": "[HI Wikipedia] आईएफबीडीओ\n\nरक्त दाता संगठन अंतर्राष्ट्रीय महासंघ (अंग्रेजी में संक्षिप्त आईएफबीडीओ फ्रेंच और स्पेनिश में फियोडस) एक अंतरराष्ट्रीय संगठन जिसका मुख्य उद्देश्य स्वैच्छिक गैर रक्तदाताओं से रक्त कार्यवाही में सदस्य राज्यों की अच्छी तरह से रक्त दान और निरीक्षण प्रक्रियाओं के लिए सुरक्षा मानकों के रूप में आत्मनिर्भर है। सांविधिक लक्ष्य सांविधिक लक्ष्य: दुनिया के सभी देशों में नियमित रूप से, गुमनाम, स्वैच्छिक रक्त की गैर उपहार को बढ़ावा देने के लिए सक्षम संस्थाओं के साथ सहयोग में उच्च गुणवत्ता वाले मानव और हर देश में रक्त उत्पादों के लिए जरूरतों को पूरा करने की दिशा में काम करने के लिए यह सुनिश्चित करने के लिए कि दोनों तरीकों दाता और रिसीवर की सुरक्षा की गारंटी लागू कर रहे हैं सिद्धांत के तहत है कि मानव शरीर अविच्छेद्य है विपणन के सभी रूपों का मुकाबला करने और रक्त और रक्त डेरिवेटिव के लिए सम्मान के साथ प्राप्त करने के लिए सभी अध्ययनों, गतिविधियों, चर्चा, या तो रक्त आधान और रक्त दाता संघों के संगठन या ज्ञान और रक्त आधान तकनीक में अनुसंधान करने के लिए संबंधित घटनाओं में भाग लेते हैं। इतिहास आईएफबीडीओ मुख्यालय ४ दिसम्बर १९५५ को लक्समबर्ग में संस्थापित किया गया था| मोनाको में स्थापित हैं| संघ की आधिकारिक भाषा अंग्रेजी, फ्रेंच और स्पेनिश हैं। आईएफबीडीओ में ७२ सदस्य राज्य हैं। प्रत्येक देश एक ही रक्त दाताओं राष्ट्रीय संगठन द्वारा प्रतिनिधित्व किया है। सदस्यता के सक्रिय सदस्यों एसोसिएट सदस्यों पर्यवेक्षकों और मानद सदस्यों में चार प्रकार के होते हैं। संघ महासभा और कार्यकारी परिषद द्वारा संचालित है। संगठन में दो सबसे प्रमुख पदों अध्यक्ष (वर्तमान में श्री Gianfranco Massaro, इटली द्वारा आयोजित) और महासचिव (वर्तमान में श्री जीन-मेरी Durant, फ्रांस द्वारा आयोजित)| आईएफबीडीओ अंतर्राष्ट्रीय हस्तियों को रक्त भेद के लिए मेरिट के आदेश जो उनके समर्पण और अपने कौशल से उद्देश्यों की सफलता के लिए एक विशेष योगदान देते है। आईएफबीडीओ एकजुटता (आईएफबीडीओ एकात्मकता फाउंडेशन) नींव करने के लिए फेडरेशन के सदस्यों के साथ अंतरराष्ट्रीय सहयोग कार्यक्रमों का है। १९९५ के बाद से एक विशेष आईएफबीडीओ अंतर्राष्ट्रीय पहल के रूप में रक्त दाता दिवस का आयोजन लेकिन २००२ में आईएफबीडीओ तीन सबसे महत्वपूर्ण अंतरराष्ट्रीय संगठनों ने रक्तदान को बढ़ावा देने के साथ वार्ता शुरू की है| विश्व स्वास्थ्य संगठन (डब्ल्यूएचओ), इंटरनेशनल फेडरेशन ऑफ रेड क्रॉस और रेड क्रीसेंट सोसायटी (आईएफआरसिएस) और रक्ताधान के इंटरनेशनल सोसायटी (आईएसबीटी), जो २००४ में सभी चार संगठनों विश्व रक्त दाता दिवस की स्थापना के समझौते पर हस्ताक्षर किए एक परिणाम के रूप में है। २००५ में विश्व स्वास्थ्य सभा डब्ल्यूएचओ के सभी स्वास्थ्य मंत्री के सदस्य राज्यों ने सर्वसम्मति एक संकल्प है कि एक सुरक्षित, पर्याप्त और टिकाऊ रक्त की आपूर्ति की आधारशिला के रूप में स्वैच्छिक गैर रक्त दाताओं को मान्यता दी. तब से विश्व रक्त दाता दिवस १४ जून को हर साल मनाया जाता है और यह संस्थापक आईएफबीडीओ डब्ल्यूएचओ आईएफआरसिएस और आईएसबीटी भागीदारों द्वारा प्रायोजित है। ** Membership approved, pending ratification by General Assembly. References Supraorganizations Federations Blood…"} {"instruction": "Write a PHP function for calculating the average of an array of numbers.", "input": "", "output": "function calculateAverage($numbers) { $sum = array_sum($numbers); $n = count($numbers); $average = $sum/$n; return $average; }"} {"text": "[DE Wikipedia] Santa Mariana\n\nSanta Mariana ist ein brasilianisches Munizip im Norden des Bundesstaats Paraná. Es hatte 2021 geschätzt 11.523 Einwohner, die sich Santa-Marianenser nennen. Seine Fläche beträgt 427 km². Es liegt 462 Meter über dem Meeresspiegel. Etymologie Der Name stellt eine Ehrung von Mariana Junqueira dar, der Gattin des ersten Eigentümers des Großgrundbesitzes, Francisco Junqueira Geschichte Besiedlung Im Jahr 1934 entstand auf dem Land von Francisco Junqueira ein kleines Dorf. Es entwickelte sich zusehends, da die Fruchtbarkeit des Bodens einen ständigen Zustrom von Fremden aus verschiedenen Ländern begünstigte. Durch den wirtschaftlichen Aufschwung der Gemeinde, der mit der Entwicklung des Kaffeeanbaus einherging, bot Santa Mariana bald die Voraussetzungen für eine politische und administrative Emanzipation, so dass es 1947 zum Munizip erhoben werden konnte. Erhebung zum Munizip Santa Mariana wurde durch das Staatsgesetz Nr. 2 vom 2. Oktober 1947 aus Bandeirantes ausgegliedert und in den Rang eines Munizips erhoben. Es wurde am 1. November 1947als Munizip installiert. Geografie Fläche und Lage Santa Mariana liegt auf dem Terceiro Planalto Paranaense (der Dritten oder Guarapuava-Hochebene von Paraná). Seine Fläche beträgt 427 km². Es liegt auf einer Höhe von 462 Metern. Vegetation Das Biom von Santa Mariana ist Mata Atlântica. Klima In Santa Mariana herrscht tropisches Klima. Die meisten Monate im Jahr sind durch Niederschläge gekennzeichnet. Auf das Gesamtklima im Jahr haben die wenigen trockenen Monate nur wenig Einfluss. Die Klimaklassifikation nach Köppen und Geiger lautet Am. Im Jahresdurchschnitt liegt die Temperatur bei 22,2 °C. Innerhalb eines Jahres gibt es 1506 mm Niederschlag. Gewässer Santa Mariana liegt am Paranapanema, der die nördliche Grenze zum Staat São Paulo bildet. Der Rio das Cinzas bildet die nordöstliche Grenze des Munizips. Dessen linker Nebenfluss Rio Laranjinha bildet die südöstliche Grenze. Straßen Santa Mariana liegt an der BR-369 von Londrina nach Ourinhos im Staat São Paulo. Nachbarmunizipien Stadtverwaltung Bürgermeister: José Marcelo Piovan Guimarães, PSD (2021–2024) Vizebürgermeister: José Luiz Amadeu, DEM (2021–2024) Demografie Bevölkerungsentwicklung Quelle: IBGE (2011) Ethnische Zusammensetzung Quelle: IBGE (Stand: 1991, 2000 und 2010) Weblinks Website der Stadtpräfektur, Prefeitura Municipal (brasilianisches Portugiesisch) Atlas do Desenvolvimento Humano no Brasil: Santa Mariana, PR (sozialstatistische Angaben, brasilianisches Portugiesisch) Einzelnachweise Ort in Paraná Município in Paraná Stadtrechtsverleihung 1947"} {"instruction": "Convert the following code to Python and make it object-oriented.", "input": "function celsius_to_fahrenheit(celsius) { let fahrenheit = (celsius * 9/5) + 32 return fahrenheit }", "output": "class TemperatureConverter: def celsius_to_fahrenheit(self, celsius): fahrenheit = (celsius * 9/5) + 32 return fahrenheit"} {"instruction": "Write a Java method to transform a String input into a String array with each element the length of 4.", "input": "String input = \"HelloWorld\";", "output": "public static String[] stringToArray(String input) { String[] stringArray = new String[input.length()/4]; int count = 0; for (int i = 0; i < input.length(); i += 4) { stringArray[count] = input.substring(i, i+4); count++; } return stringArray; }"} {"text": "[DE Wikipedia] Thomas Oppermann (Jurist)\n\nThomas Oppermann (* 15. Februar 1931 in Heidelberg; † 26. Januar 2019) war ein deutscher Staatsrechtler. Von 1967 bis 1999 war er ordentlicher Professor für Öffentliches Recht und Auswärtige Politik an der Eberhard Karls Universität Tübingen. Leben und Wirken Thomas Oppermann stammte aus einer Gelehrtenfamilie. Der Großvater Otto Gustav August Oppermann war Stadtschuldirektor. Sein Vater war der Altphilologe Hans Oppermann, der 1926 die promovierte Kunsthistorikerin Ella Maria Borchers heiratete. Das Paar hatte mit Thomas Oppermann ein gemeinsames Kind. Von 1951 bis 1956 studierte er Rechtswissenschaft an den Universitäten Frankfurt, Lyon, Oxford und Freiburg. 1959 wurde er bei Joseph H. Kaiser und Konrad Hesse in Freiburg über das Thema Britisches Unterhauswahlrecht und Zweiparteiensystem promoviert. Von 1960 bis 1967 arbeitete Oppermann in der Europa-Abteilung des Bundeswirtschaftsministeriums. Dort war er zuletzt als Regierungsdirektor tätig. 1967 erfolgte bei Herbert Krüger seine Habilitation über Kulturverwaltungsrecht: Bildung, Wissenschaft, Kunst an der Universität Hamburg. Ab 1967 lehrte Oppermann mit 36 Jahren bis zu seiner Emeritierung 1999 als ordentlicher Professor für Öffentliches Recht und Auswärtige Politik an der Universität Tübingen. Oppermann erhielt Rufe nach Hamburg (1972) und Bonn (1979). Er blieb jedoch in Tübingen. Er lehrte als Gastprofessor unter anderem in Chicago (1991), Aix-en-Provence (1993), Jerusalem (1999) und Yokohama (2000). Sein Nachfolger in Tübingen wurde Martin Nettesheim. Oppermanns Arbeitsschwerpunkte waren das Europarecht, Internationales Wirtschaftsrecht, Verfassungsrecht sowie Bildungs- und Medienrecht. Er legte 1991 ein Lehrbuch zum Europarecht vor, das zu einem Standardwerk wurde und 2018 in 8. Auflage erschienen ist. Oppermann wurden Ehrendoktorwürden in Aix-en-Provence (1978) und in Piräus (2002) verliehen. 1998 erhielt Oppermann die Verdienstmedaille des Landes Baden-Württemberg und 2004 das Große Verdienstkreuz der Bundesrepublik Deutschland. Von 1983 bis 1985 war er Vizepräsident der Universität Tübingen. Von 1985 bis 1989 war Oppermann Vorsitzender der Deutschen Gesellschaft für Völkerrecht. Von 1991 bis 1993 hatte er den Vorsitz der Vereinigung Deutscher Staatsrechtslehrer inne und war von 1999 bis 2002 Präsident des Arbeitskreises Europäische Integration in Bonn. Von 2002 bis 2003 war er Berater von Ministerpräsident Erwin Teufel beim Europäischen Verfassungskonvent. Oppermann starb im Januar 2019 kurz vor seinem 88. Geburtstag. Er wurde auf dem Stadtfriedhof Tübingen beigesetzt. Schriften Monographien Europarecht. Ein Studienbuch. 8., neu bearbeitete Auflage. Beck, München 2018, ISBN 978-3-406-72633-0. Ius Europaeum: Beiträge zur europäischen Einigung (= Tübinger Schriften zum internationalen und…"} {"instruction": "Using Java, create a program to compute the area of a circle given the radius.", "input": "", "output": "\"\"\" Using Java, create a program to compute the area of a circle given the radius. \"\"\" public class AreaCircle { public static void main(String[] args) { double radius = 7.5; double area; area = Math.PI * Math.pow(radius, 2); System.out.println(\"Area of the circle is: \" + area); } }"} {"instruction": "Create a python script to take in a number as input and output its binary equivalent.", "input": "", "output": "# Input number\nn = int(input(\"Enter a number: \"))\n\n# Using format() \nprint(\"The binary equivalent of {} is:\".format(n), format(n, 'b'))"} {"text": "[CS Wikipedia] Sven-Ove Svensson\n\nSven-Ove Svensson (1923 – leden 1987) byl švédský fotbalista a později trenér, který hrával na pozici záložníka. V roce 1954 získal ve Švédsku ocenění Guldbollen pro nejlepšího fotbalistu roku. Díky svému jménu měl přezdívku SOS. Klubová kariéra Téměř celou svou kariéru strávil v klubu Helsingborgs IF (HIF). Dalším klubem, kde působil, byl BK Drott. Byl znám svým bojovným duchem a vitalitou. Celkem odehrál v letech 1944–1956 za HIF 546 zápasů, v nejvyšší lize Allsvenskan oficiálně 216. Po ukončení aktivní hráčské kariéry vedl Helsingbors IF jako trenér. V roce 1958 prodělal zranění menisku a musel skončit s fotbalem. Reprezentační kariéra Nastupoval za švédskou fotbalovou reprezentaci, ve které debutoval ve svých 29 letech. Celkem odehrál v národním týmu 31 zápasů a vstřelil 8 gólů. Odkazy Reference Externí odkazy Profil hráče na National-football-teams.com Švédští fotbalisté Švédští fotbaloví trenéři Fotbalisté Helsingborgs IF Narození v roce 1923 Úmrtí v roce 1987 Muži Fotbaloví obránci"} {"instruction": "Write a Python code snippet for a function to calculate the number of words in a given string.", "input": "myString = \"The sky is blue\"", "output": "def countWords (myString): return len(myString.split()) num = countWords(myString) print(\"Number of words =\", num)"} {"instruction": "Implement a quicksort algorithm in Python to sort a list of 6 integers [52,85,23,6,37,77].", "input": "[52,85,23,6,37,77]", "output": "def quicksort(nums): if len(nums) <= 1: return nums else: pivot = nums[0] less = [i for i in nums[1:] if i <= pivot] greater = [i for i in nums[1:] if i > pivot] return quicksort(less) + [pivot] + quicksort(greater) print(quicksort([52,85,23,6,37,77]))"} {"instruction": "Write a Python function to sort a dictionary (key: value) by its values in descending order.", "input": "my_dict = {1: 4, 2: 3, 3: 2, 4: 1}", "output": "def desc_sort_dict(my_dict):\n return {k: v for k, v in sorted(my_dict.items(), key=lambda item: item[1], reverse=True)}"} {"instruction": "Write a Python program to generate a random array of integers of length N with values between 1 and M (inclusive).", "input": "- N = 10 \n- M = 100", "output": "import random \n\nN = 10\nM = 100\n\nrandom_array = [random.randint(1, M) for _ in range(N)] \nprint(random_array) \n# Output: [3, 82, 83, 32, 45, 44, 6, 67, 25, 29]"} {"text": "[DE Wikipedia] Tadeusz Gede\n\nTadeusz Gede (* 28. Dezember 1911 in Tiflis, Georgien; † 4. März 1982 in Warschau) war ein Politiker der Polnischen Vereinigten Arbeiterpartei PZPR (Polska Zjednoczona Partia Robotnicza) in der Volksrepublik Polen, der unter anderem zwischen 1949 und 1952 Außenhandelsminister sowie von 1952 bis 1956 Vizepräsident des Ministerrates war. Er war darüber hinaus zwischen 1957 und 1959 Botschafter in der Sowjetunion sowie später von 1969 bis 1973 Botschafter in der DDR. Leben Tadeusz Gede, der von Beruf Elektroingenieur war, engagierte sich in der Zwischenkriegszeit in der Union der Unabhängigen Sozialistischen Jugend „Życie“ OMS (Związek Niezależnej Młodzieży Socjalistycznej „Życie”) und im Kommunistischen Jugendverband Polens KZMP(Komunistyczny Związek Młodzieży Polski). 1945 wurde er Mitglied der Polnischen Arbeiterpartei PPR (Polska Partia Robotnicza) sowie 1948 der Polnischen Vereinigten Arbeiterpartei PZPR (Polska Zjednoczona Partia Robotnicza). Gede übernahm am 7. März 1949 in der ersten Regierung von Ministerpräsident Józef Cyrankiewicz das Amt des Ministers für Außenhandel (Minister handlu zagranicznego) und hatte dieses bis zum 20. November 1952 inne. Im Anschluss wurde er am 20. November 1952 als Vizepräsident des Ministerrates stellvertretender Ministerpräsident (Wicepremier). Diesen Posten bekleidete er bis zum 24. Oktober 1956 auch in der Regierung von Ministerpräsident Bolesław Bierut sowie der zweiten Regierung Cyrankiewicz. Am 20. November 1952 wurde er zudem für die PZPR Mitglied des Sejm und vertrat in diesem bis zum 20. November 1956 den Wahlkreis Nr. 14 Inowrocław. 1953 wurde er ferner Mitglied des Zentralkomitees der Polnischen Vereinigten Arbeiterpartei (ZK der PZPR) und gehörte diesem Gremium bis zum VI. Parteitag (6. bis 11. Dezember 1971) an. 1957 löste Tadeusz Gede Wacław Lewikowski als Botschafter in der Sowjetunion ab und bekleidete diesen Posten bis 1959, woraufhin Bolesław Jaszczuk seine dortige Nachfolge antrat. Zugleich war er als Botschafter in der Mongolischen Volksrepublik akkreditiert. Nach seiner Rückkehr aus Moskau fungierte er zwischen dem 24. Oktober 1959 und dem 16. Dezember 1968 als Erster Stellvertretender Vorsitzender der Staatlichen Planungskommission des Ministerrates. Er wurde am 15. Mai 1961 abermals Mitglied des Sejm und vertrat dort nunmehr bis zum 29. April 1969 den Wahlkreis nN. 39 Tarnów. Während der dritten und vierten Legislaturperiode war er zwischen 1961 und 1969 auch Mitglied des Präsidiums der PZPR-Fraktion. Danach übernahm er 1969 von Feliks Baranowski den Posten als Botschafter in der DDR und verblieb dort bis zu seiner Ablösung durch Marian Dmochowski 1973. Zudem wurde er auf dem VI. Parteitag (6. bis 11. Dezember 1971) Mitglied der Zentralen Revisionskommission der PZPR, der er bis zum VII.…"} {"text": "[HI Wikipedia] अग्नि-२\n\nअग्नि द्वितीय (अग्नि-२) भारत की मध्यवर्ती दुरी बैलिस्टिक प्रक्षेपास्त्र है। इसे रक्षा अनुसंधान एवं विकास संगठन ने विकसित किया है। यह अत्याधुनिक तकनीक से बनी 21 मीटर लंबी और 1.3 मीटर चौड़ी अग्नि-२ मिसाइल परमाणु हथियारों से लैस होकर 1 टन पेलोड ले जाने में सक्षम है। 3 हजार किलोमीटर तक के दायरे में इस्तेमाल की जाने वाली इस मिसाइल में तीन चरणों का प्रोपल्शन सिस्टम लगाया गया है। इसे हैदराबाद की प्रगत (उन्नत) प्रणाली प्रयोगशाला (Advanced Systems Laboratory) ने तैयार किया है। इन्हें भी देखें बाहरी कड़ियाँ Defense Forum India Home Bharat-Rakshak Home# सन्दर्भ भारत की बैलिस्टिक मिसाइलें मध्यम दूरी की बैलिस्टिक मिसाइल"} {"instruction": "Build a GUI application in Python to take user input and display a message.", "input": "", "output": "import tkinter as tk\n\nroot = tk.Tk()\nroot.title(\"GUI Application\")\n\ntk.Label(root, text=\"Enter your name:\").grid(row=0, column=0, sticky=\"W\")\nname_entry = tk.Entry(root)\nname_entry.grid(row=0, column=1)\n\ndef on_button_click():\n name = name_entry.get()\n tk.Label(root, text=\"Hello \"+name).grid(row=1, column=1)\n\ntk.Button(root, text=\"Click Me\", command=on_button_click).grid(row=0, column=2)\n\nroot.mainloop()"} {"text": "[DE Wikipedia] Liberalerna\n\nLiberalerna (kurz L; deutsch Die Liberalen; bis 2015 Folkpartiet liberalerna, „Volkspartei Die Liberalen“) sind eine im schwedischen Reichstag vertretene Partei. Sie erreichte in der jüngsten Reichstagswahl 2018 5,5 Prozent der Stimmen und 20 von 349 Mandaten. Von 2006 bis 2014 beteiligte sie sich als Teil der Allianz für Schweden an der schwedischen Regierung. Die Liberalen sind wirtschaftsliberal ausgerichtet und entschieden proeuropäisch. Geschichte Vorläufer, Spaltung, Fusion Die Partei hat ihre Wurzeln in älteren liberalen Strömungen, die für eine Demokratisierung des politischen Systems Schwedens eintraten. 1900 vereinigten sich mehrere Parlamentsfraktionen in der Liberalen Sammlungspartei, die sich 1902 mit der Freisinnigen Vereinigung (Frisinnade Landsföreningen) eine landesweite Wahlorganisation schuf. Die liberalen Regierungen unter Karl Staaff setzten sich für eine Parlaments- und Wahlrechtsreform ein, welche von einer sozialdemokratisch-liberalen Regierungskoalition unter Nils Edén 1920 verwirklicht werden konnte. Nach dem erfolgreichen Kampf gegen Privilegien der Oberschicht und monarchische Machtbefugnisse stellte sich eine gewisse inhaltliche Leere ein. Zusätzlich wurde die liberale Bewegung durch unterschiedliche Standpunkte in der Alkoholpolitik geschwächt. 1923 brach die Freisinnige Vereinigung auseinander: Die Mehrheit stützte die Abstinenzbewegung und rief die Freisinnige Volkspartei (Frisinnade Folkpartiet) ins Leben; eine Minderheit sprach sich gegen ein generelles Alkoholverbot aus und sammelte sich in der Liberalen Partei (Sveriges liberala parti), die vorzugsweise in den Städten verankert war. Beide Parteien bildeten von 1926 bis 1928 die erste Regierung von Carl Gustaf Ekman. Folkpartiet Erst 1934 vereinigten sich die beiden Richtungen wieder unter dem Namen Folkpartiet (dt. Volkspartei). Die neue Partei gab sich ein marktliberales Programm und attackierte die Sozialisierungsbestrebungen der Sozialdemokratie. Nach Ausbruch des Zweiten Weltkriegs gehörte die Partei ab 13. Dezember 1939 zur Sammlungsregierung unter Per Albin Hansson. Sie agierte weniger deutschlandfreundlich als die anderen Parteien. Ära Ohlin 1944–1967 Unter dem Parteivorsitzenden Bertil Ohlin hielten sich markt- und sozialliberale Ansätze die Waage. Der Wirtschaftsprofessor Ohlin befürwortete eine aktive Finanzpolitik im Sinne des Keynesianismus. Die Marktwirtschaft galt es jedoch entschlossen zu verteidigen. So betrieb die Folkpartiet seit Ende der 1940er Jahre gemeinsam mit den anderen bürgerlichen Parteien und Vertretern der Wirtschaft Opposition gegen die planwirtschaftlichen Initiativen der Sozialdemokraten. Besonders die steigenden Steuern wurden attackiert, die als zu hoch kritisierte Steuerlast schränke die Freiheit des Einzelnen ein und belaste die…"} {"instruction": "Generate a python code to sum the elements in the given array.", "input": "arr = [1, 2, 3, 4, 5]", "output": "def sum_array(arr):\n total = 0\n for num in arr:\n total += num\n return total\n\nsum_array(arr)"} {"text": "[HI Wikipedia] मानव लिंग का आकार\n\nमानव लिंग आकार में, जिसमें लम्बाई और परिधि शामिल हैं, अपनी तनी हुई और नरम अवस्था में विभिन्न माप का हो सकता है। सामान्य रूप से मानव लिंग की प्राकृतिक परिवर्तनशीलता के अलावा, कई ऐसे कारक हैं जो किसी भी पुरुष में मामूली भिन्नता पैदा करते हैं, जैसे कि उत्तेजना का स्तर, दिन का समय, कमरे का तापमान और यौन गतिविधि की आवृत्ति। Lol अन्य मानव सदृश जानवरों की तुलना में, गोरिल्ला जैसे बड़े उदाहरणों सहित, मानव लिंग सबसे and मोटाa है, दोनों ही पूर्ण अकार में और शरीर के बाकी हिस्सों के सापेक्ष। विभिन्न अध्ययनों के अनुसार लिंग के माप अलग-अलग होते हैं। जो अध्ययन स्व-माप पर निर्भर करते हैं, उन अध्ययनों में स्वास्थ्य कर्मचारियों के द्वारा मापे गए अध्ययन की तुलना में काफी अधिक औसत है। 2015 तक, 15,521 पुरुषों की एक व्यवस्थित समीक्षा, और जो इस विषय पर अभी तक के लिए सबसे अच्छा शोध है, क्योंकि विषयों को आत्म-माप की जगह स्वास्थ्य पेशेवरों द्वारा मापा गया था, ने निष्कर्ष निकाला है कि एक सीधे तने हुए मानव मानव लिंग की औसत लम्बाई 13.12 सेमी है (5.17 इंच) है, जबकि एक तने हुए लिंग की औसत परिधि 11.66 सेमी (4.59 इंच) है | नरम लिंग की लम्बाई कभी-कभी तने हुए लिंग की लम्बाई का गलत अनुमान दे सकती है । अधिकांश मानव लिंग वृद्धि बचपन और पाँच साल की उम्र के बीच होती है, और उसके बाद यौवन की शुरुआत के लगभग एक साल बाद से लेकर लगभग 17 साल की उम्र तक । लिंग के आकार और शरीर के अन्य अंगों के आकार के बीच सांख्यिकीय रूप से महत्वपूर्ण सम्बन्ध अनुसंधान में नहीं पाया गया है | आनुवांशिकी के अलावा कुछ पर्यावरणीय कारक, जैसे अंतःस्रावी व्यवधानों की उपस्थिति, लिंग वृद्धि को प्रभावित कर सकते हैं। 7 सेमी (2.8 इंच) से कम की लम्बाई वाली एक वयस्क लिंग, जो अन्यथा सामान्य है, को एक सूक्ष्म लिंग (माइक्रो पेनिस) के रूप में चिकित्सा में संदर्भित किया जाता है। अध्ययन जबकि प्रतिष्ठित अध्ययनों में परिणाम थोड़ा भिन्न होते हैं, आम सहमति यह है कि औसत मानव लिंग, जब तना होता है, लंबाई में 12.9 - 14 सेमी (5.1 - 5.9 इंच) होता है । वीले एट. अल द्वारा 2015 में प्रकाशित, बीजेयू इंटरनेशनल में प्रकाशित पिछले 30 वर्षों के विषय पर चिकित्सा अनुसंधान की व्यवस्थित समीक्षा में, इसी तरह के परिणाम दिखाए। फ्लैसिड यानि नर्म / गैर-स्तम्भ लिंग की औसत लम्बाई 9.16 सेमी , खींचा हुआ नर्म / गैर-स्तम्भ की औसत लम्बाई 13.24 सेमी और तने हुए / स्तम्भ लिंग की लम्बाई 13.12 सेमी , और फ्लैसिड यानि नर्म / गैर-स्तम्भ लिंग की औसत परिधि 9.31 सेमी और और तने हुए / स्तंभ लिंग स्तम्भों की औसत परिधि 11.66 सेमी । शामिल किए गए अध्ययनों में सही लम्बाई को पूर्व-जलीय वसा पैड को हड्डी में धकेलने से मापा गया था, और लिंग के आधार या मध्य-शाफ्ट पर फ्लेसीड या इरेक्ट ग्रिथ (परिधि) को मापा गया था | लंबाई नरम एक अध्ययन में पाया गया कि लाड औसत नरम / गैर-स्तंभ लिंग की लम्बाई 3.5 इंच (8.9 सेमी) (कर्मचारियों द्वारा मापा गया) है कई अध्ययनों की समीक्षा में औसतन लम्बाई में 9-10 सेंटीमीटर (3.5–3.9 इंच) पाया गया | नरम / गैर-स्तम्भ लिंग की लम्बाई जरूरी नहीं कि तने हुए / स्तम्भन लिंग की लम्बाई के अनुरूप हो; कुछ छोटे नरम लिंग लंबे समय तक बढ़ते हैं, जबकि कुछ बड़े गैर-स्तम्भ लिंग तुलनात्मक…"} {"instruction": "Design a loop in Python to iterate over the elements of a list and print the elements in reverse order.", "input": "[10, 15, 20]", "output": "my_list = [10, 15, 20]\nfor i in my_list[::-1]:\n print(i)"} {"text": "[DE Wikipedia] Hölk-Hochhäuser\n\nAls Hölk-Hochhäuser werden zwei Hochhäuser an den Straßen Im Hölk und Poggenbreeden in Bad Oldesloe nordöstlich von Hamburg bezeichnet. Die beiden 13-stöckigen Wohntürme wurden 1972/73 durch die Wohnungsbaugenossenschaft Neue Lübecker errichtet, umgeben von Einfamilienhäusern. In ca. 230 Wohnungen leben etwa 500 Menschen. Ab dem Jahr 2000 wurden die Hochhäuser zum Spielball von Finanzinvestoren und wechselten ständig den Besitzer. Die Hochhäuser machen immer wieder Schlagzeilen wegen katastrophaler Zustände, wie Rohrbrüche, Schimmel, Heizungs- und Wasserausfall. 2018 übernahm Adler Real Estate in Berlin die Häuser und erneuerte die Heizungsanlage. Die LEG aus Düsseldorf erwarb die Objekte Ende 2021. Spiegel online berichtete über den katastrophalen Zustand der Immobilien, die zu diesem Zeitpunkt in den Händen der LEG waren. Die LEG führte die noch von der Adler beauftragte Fahrstuhlsanierung durch. Nach nur einem Jahr übernahm 2023 die Lietmeyer-Gruppe in Hildesheim. Anfang 2023 wurde mit der energetischen Sanierung der Asbest-Fassade Poggenbreeden 2 und der Versorgungsstränge begonnen. Das Wandgemälde musste der Sanierung weichen. Quartiersmanagement Seit 2017 gibt es den Treffpunkt Plan B in einem der Hochhäuser. Plan B ist ein Projekt im Rahmen der Q8-Quartiersentwicklung der Evangelischen Stiftung Alsterdorf. Es besteht eine Kooperation mit der Stadt Bad Oldesloe. Das soziale Quartiersprojekt hat sich zur Aufgabe gemacht, der Spaltung des gesamten Quartiers entgegenzuwirken. Neben Mieterberatung, Hausaufgabenhilfe, Trommelkurs und vielen anderen Beratungsangeboten entstand auch im Rahmen eines großen Beteiligungsprojektes in Zusammenarbeit mit dem Kreis Stormarn und der Theodor-Storm-Schule ein riesiges Wandgemälde der Streetart-Künstlerin Hera am Hochhaus Poggenbreeden 2, das bis 2023 bestand. Die Hochhäuser kamen zum ersten Mal bundesweit positiv in die Schlagzeilen. Dieser Intention folgte auch die Wanderausstellung „Hölk. Ein Quartier zeigt Gesicht“ mit Menschen aus dem gesamten Quartier. Schirmfrau ist die Sozialministerin des Landes Schleswig-Holstein, Aminata Touré. Weblinks Einzelnachweise Bad Oldesloe Wohngebäude im Kreis Stormarn Hochhaus in Schleswig-Holstein Hochhaus in Europa Wohnhochhaus Erbaut in den 1970er Jahren"} {"instruction": "Create a function that sorts a list of dictionaries using the values.", "input": "animals = [{\"name\": \"Dog\", \"age\": 5}, {\"name\": \"Cat\", \"age\": 3}, {\"name\": \"Fish\", \"age\": 1}, {\"name\": \"Deer\", \"age\": 8}]", "output": "def sort_dict_list(animals): sorted_animals = sorted(animals, key=lambda k: k['age']) return sorted_animals result = sort_dict_list(animals) print(result) # Output: [{'name': 'Fish', 'age': 1}, {'name': 'Cat', 'age': 3}, {'name': 'Dog', 'age': 5}, {'name': 'Deer', 'age': 8}]"} {"instruction": "What would you change in the following function to sort a list of numbers in increasing order?", "input": "let arr = [ 4, 2, 5, 1, 3 ] function bubbleSort(arr) { for (let i = 0; i < arr.length; i++) { for (let j = 0; j < arr.length - i - 1; j++) { if (arr[j] > arr[j + 1]) { let temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp } } } }", "output": "let arr = [ 4, 2, 5, 1, 3 ] function bubbleSort(arr) { for (let i = 0; i < arr.length; i++) { for (let j = 0; j < arr.length - i - 1; j++) { if (arr[j] < arr[j + 1]) { let temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp } } } }"} {"text": "[HI Wikipedia] अण्डमान और निकोबार की जनजातियाँ\n\nअण्डमान और निकोबार की जनजातियाँ भारत के अण्डमान और निकोबार द्वीपसमूह की जनजातियों को कहते हैं। यहाँ की प्रमुख जनजातियाँ और उनकी संख्या इस प्रकार है: निकोबारी - ३०,००० ओजे - १०० जारवा - २७० महान अण्डमानी - ४५ शेम्पेन - २०० अण्डमान और निकोबार द्वीपसमूह अंदमान निकोबार द्वीप समूह में कुल 572 छोटे व बड़े द्वीप आते है अंडमान निकोबार की राजधानी पोर्टब्लेयर है जो की दक्षिणी अंडमान द्वीप पर स्थित है अंडमान निकोबार के सभी क़ानूनी मामला कोलकता उच्च न्ययालय में देखे जाते ह|"} {"instruction": "Write a code that returns a 2-dimensional array of size n by m containing all 0s", "input": "n = 3 and m = 5", "output": "def create2DArray(n, m): array = [[0 for x in range(m)] for y in range(n)] return array print(create2DArray(3, 5)) # prints [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]"} {"instruction": "Write a SQL query to get the top 5 scores for a given game.", "input": "", "output": "SELECT * FROM Scores ORDER BY score DESC LIMIT 5;"} {"instruction": "Create a Python class to implement a multiplication table", "input": "", "output": "class MultiplicationTable:\n def __init__(self, limit):\n self.limit = limit\n\n def create_table(self):\n for i in range(1, self.limit+1):\n for j in range(1, self.limit+1):\n print(i*j, sep= '\\t', end='')\n print()"} {"instruction": "Create an array of strings containing the names of the seven days of the week.", "input": "", "output": "let daysOfWeek = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"];"} {"instruction": "Create a program in JavaScript that takes in a positive integer and returns the sum of its digits.", "input": "824", "output": "function sumDigits(num) { let str = num.toString(); let result = 0; for (let char of str) { result += Number(char); } return result; }"} {"instruction": "Write code to establish a connection between a Python backend and a MySQL database.", "input": "Host = 'localhost'\nUsername = 'root'\nPassword = '123456'\nDatabase = 'sample_database'", "output": "import mysql.connector \n \n#Create MySQL Connection \nconnection = mysql.connector.connect(host = Host, database = Database, user = Username, password = Password) \n\n#Check whether connection is established or not\nif connection.is_connected(): \n print(\"Connection established successfully\")"} {"instruction": "Create an algorithm in Python to generate random numbers between 1 and 10 without repetition.", "input": "Number of random numbers needed is 5", "output": "import random\n\ndef generate_random_numbers(n):\n result = random.sample(range(1, 11), n)\n return result\n\nrandom_numbers = generate_random_numbers(5)\nprint(random_numbers) # Example output: [4, 9, 2, 6, 8]"} {"instruction": "Edit the code below so that the condition outcome is true. if 3 > 5: outcome = True", "input": "", "output": "if 5 > 3: outcome = True"} {"text": "[EN Wikipedia] Grounding in communication\n\nGrounding in communication is a concept proposed by Herbert H. Clark and Susan E. Brennan. It comprises the collection of \"mutual knowledge, mutual beliefs, and mutual assumptions\" that is essential for communication between two people. Successful grounding in communication requires parties \"to coordinate both the content and process\". The concept is also common in philosophy of language. Elements of theory Grounding in conversation Grounding in communication theory has described conversation as a form of collaborative action. While grounding in communication theory has been applied to mediated communication, the theory primarily addresses face-to-face conversation. Groups working together will ground their conversations by coming up with common ground or mutual knowledge. The members will utilize this knowledge in order to contribute to a more efficient dialogue. Grounding criterion is the mutual belief between conversational partners that everyone involved has a clear enough understanding of the concept to move forward. Clark and Schaefer (1989) found that, to reach this state of grounding criterion, groups use three methods of reaching an understanding that they can move forward. New contribution: A partner moves forward with a new idea, and waits to see if their partner expresses confusion. Assertion of acceptance: The partner receiving the information asserts that he understands by smiling, nodding, or verbally confirming the other partner. They may also assert their understanding by remaining silent. Request for clarification: The partner receiving the information asks for clarification. Phases in grounding The parties engaging in grounding exchange information over what they do or do not understand over the course of a communication and they will continue to clarify concepts until they have agreed on grounding criterion. There are generally two phases in grounding. Presenting utterance – speaker presents utterance to addressee Accepting utterance – addressee accepts utterance by providing evidence of understanding According to this theory, mere utterance qualifies as presentation in conversation whereas contribution to conversation demands both utterance and assurance of mutual understanding. The presentation phase can become complex when meanings are embedded or repairs are made to utterances. An example of a repair is \"Do you and your husband have a car,\" but rather the messier, \"now, – um do you and your husband have a j-car\". The acceptance phase often clarifies any ambiguities with grounding. For example: Presentation phase: Alan: Now, – um do you and your husband have a j-car Acceptance phase: Barbara: – have a car? Alan: Yeah Barbara: No The acceptance phase is completed once Barbara indicates that the answer is \"no\" and Alan accepts…"} {"text": "[EN Wikipedia] GuaraníSat-1\n\nGuaraníSat-1 was the first Paraguayan satellite. The nanosatellite's development was part of a collaboration between the Paraguayan Space Agency and the fourth Joint Global Multination Birds Satellite (Birds-4) multi-national project initiated by the Kyushu Institute of Technology of Japan. Launch and mission GuaraníSat-1 was launched to the International Space Station (ISS) through Northrop Grumman's Cygnus NG-15 launch. The S.S. Katherine Johnson Cygnus, carrying cargo including GuaraníSat-1, was launched to space via the Antares rocket on 20 February 2021 from Pad 0A of the Mid-Atlantic Regional Spaceport in Virginia, United States. The Cygnus spacecraft made a rendezvous with the ISS two days later, berthing to the Unity module of the space station. The satellite was deployed into low Earth orbit from the ISS on 14 March 2021. The satellite's mission involved monitoring the prevalence of the Chagas disease in the Chaco region of Paraguay. The satellite was operated from ground stations at the Universidad Nacional de Asunción and the Chaco area. GuaraníSat-1 reentered the atmosphere on 5 July 2022. References CubeSats First artificial satellites of a country Satellites of Paraguay Spacecraft launched in 2021 Spacecraft which reentered in 2022"} {"instruction": "Create a Python program that takes two lists of integers and prints the common elements between the two lists.", "input": "list1 = [2, 4, 6, 8]\nlist2 = [4, 8, 10]", "output": "list1 = [2, 4, 6, 8]\nlist2 = [4, 8, 10]\n\ncommon_elements = list(set(list1).intersection(list2))\n\nprint(common_elements)\n# Output: [4, 8]"} {"instruction": "Write a Python program to find the minimum cost of a path from top left cell to bottom right cell of a matrix.", "input": "matrix = [[2, 0, 3, 5], [4, 5, 1, 2], [3, 1, 2, 7]]", "output": "def min_path_sum(matrix): # initialize the solution matrix res = [[0 for _ in range(len(matrix[0]))] for _ in range(len(matrix))] # copying the first row elements res[0] = matrix[0] # iterate over the remaining rows for i in range(1, len(matrix)): # copy the first element res[i][0] = res[i-1][0] + matrix[i][0] for j in range(1, len(matrix[0])): # choose the smaller of the two res[i][j] = min(res[i-1][j], res[i][j-1]) + matrix[i][j] # return the bottom-right element return res[len(matrix)-1][len(matrix[0])-1]"} {"text": "[HI Wikipedia] दामेली भाषा\n\nदामेली या दामेड़ी (Dameli, ) कुनर (कुनड़) शाखा की एक दार्दी भाषा है जो पाकिस्तान के चित्राल ज़िले की दोमेल वादी में बोली जाती है। इसे लगभग ५,००० लोग मातृभाषा के रूप में बोलते हैं। इनमें से पुरुष अक्सर पश्तो भी बोलना जानते हैं और बहुतों को खोवार और उर्दू भाषाएँ आती हैं। इसके बावजूद यह भाषा जीवित है और बच्चे भी इसे सीखते-बोलते हैं। सन्दर्भ हिन्द-आर्य भाषाएँ दार्दी भाषाएँ पाकिस्तान की भाषाएँ चित्राल ज़िला"} {"instruction": "Generate a list of output values by multiplying the input values from two array in Python.", "input": "[1, 2, 3] and [4, 5, 6]", "output": "array1 = [1, 2, 3]\narray2 = [4, 5, 6]\n\noutput = [val1 * val2 for val1, val2 in zip(array1, array2)] \nprint(output)\n\n# Output \n[4, 10, 18]"} {"text": "[CS Wikipedia] Armstrong Siddeley Sapphire\n\nArmstrong Siddeley Sapphire byl britský proudový motor vyráběný v 50. letech firmou Armstrong Siddeley. Jednalo se o konečný vývoj prací, které začaly na motoru Metrovick F.2 v roce 1940 a vyvinuly se do pokročilého motoru s axiálním kompresorem a prstencovou spalovací komorou, čímž tento motor poskytoval tah 49 kN. Poháněl starší verze letounů Hawker Hunter, Handley Page Victor a letouny Gloster Javelin. Licenční výroba probíhala také ve Spojených státech ve společnosti Wright Aeronautical jako J65, kde poháněl řadu amerických letounů. Hlavním konkurentem motoru Sapphire byl Rolls-Royce Avon. Použití Pozn.: English Electric P.1 FFA P-16 Gloster Javelin Handley Page Victor B.1 Hawker Hunter F.2 Hawker Hunter F.5 SNCASO SO.4050 Vautour (3. prototyp) Specifikace (ASSa.7 / 7LR) Data: Technické údaje Typ: proudový motor Průměr: 954 mm Délka: ASSa.7 - 3 180 mm, ASSa.7LR - 7 442 mm Hmotnost suchého motoru: ASSa.7 - 1 383 kg, ASSa.7LR - 1 442 kg Součásti Kompresor: třináctistupňový axiální kompresor Spalovací komora: prstencová Turbína: dvoustupňová Palivo: Kerosin DERD 2482 nebo DERD 2486 Výkony Maximální tah: ASSa.7 49 kN na úrovni mořské hladiny při 8 000 rpm, ASSa.7LR 55 kN v 6 096 m Měrná spotřeba paliva: 90,214 kg/kN/hr Poměr tah/hmotnost: 0,035 kN/kg Reference Externí odkazy Sapphire Proudové motory"} {"instruction": "Write a function to retrieve the last element of a given array of strings.", "input": "arr = [\"word\", \"sentence\", \"paragraph\"];", "output": "def get_last_element(arr): return arr[-1] # Testing arr = [\"word\", \"sentence\", \"paragraph\"] last_element = get_last_element(arr) print(\"The last element is: \", last_element)"} {"instruction": "Write a class in Python to store the objects of student and their grades.", "input": "", "output": "# Class to store student and grades class StudentGrades: def __init__(self, student_name): self.student_name = student_name self.grades = {} def add_grade(self, course_name, grade): self.grades[course_name] = grade def get_total_grade(self): total_grade = 0 for grade in self.grades.values(): total_grade += grade return total_grade"} {"text": "[DE Wikipedia] Mole-Nationalpark\n\nDer Mole-Nationalpark (englisch Mole National Park) ist ein Nationalpark in Ghana, der 1971 als erstes Tierreservat des Landes gegründet wurde. Mit 4840 km² ist er vor dem Digya-Nationalpark der größte Nationalpark Ghanas. Der Mole-Nationalpark liegt im Nordwesten des Landes in der Savannah Region, die im Vergleich zu den Küstengebieten Ghanas touristisch etwas schlechter erschlossen ist. Geographie Bei einer Meereshöhe von 100 bis 500 Metern sind Baumsavanne und Galeriewälder entlang der Flüsse typisch. Der Jahresniederschlag beträgt 1000 mm, Wasser ist während des ganzen Jahres – auch in den heißen Monaten März und April – verfügbar. Er wird vom Fluss Mole durchzogen. Die Nordgrenze wird von Unterlauf des Kulpawn gebildet. Fauna, Flora und Management Der Mole-Nationalpark beheimatet 93 Tierarten, unter denen sich Reptilien (33 Arten) und Amphibien (9 Arten), einige Affenarten und wenige Elefanten befinden. Auffällig artenreich ist die Raubtierbesiedlung mit Löwen, Leoparden, Streifenschakalen, Hyänenhunden und Hyänen. Neben Büffeln, Kobantilopen, Busch- und Wasserböcken gibt es Pferdeantilopen und Riedböcke. Daneben sind etwa 300 verschiedene Vogelarten im Park zu finden, die zu etwas mehr als der Hälfte aus Zugvögeln bestehen. So finden sich hier beispielsweise in der trockenen Jahreszeit in größerer Zahl Graukopfsperlinge ein. Löwen gelten im Park mittlerweile als sehr selten oder beinahe ausgestorben. Allerdings ist das für Safaris erschlossene Gebiet des Parks sehr klein. Neben Elefanten gibt es noch eine größere Büffelherde im Park. Hyänen sind nachts gelegentlich zu hören. Auch soll es Leoparden geben. Zu den Affenarten gehören Paviane, die westliche Grünmeerkatze und Husarenaffen. Zu den Antilopenarten gehören die größeren Arten Wasserbock, Pferdeantilope, Buschbock, Grasantilopen, Kuhantilopen sowie die kleine Antilopenart der Ducker. Der Parkeintritt ist Touristen gebührenpflichtig. Es sind Lodges für Touristen vorhanden und es werden geführte Touren angeboten. Bei allen Aktivitäten ist ein Ranger dabei. Im Park befindet sich eine kleine Siedlung mit Schule und Krankenstation. Siehe auch Nationalparks in Ghana Literatur Philippe Bouché (2007): Northern Ghana elephant survey. African Wildlife Foundation. Department of Information Services, ISSN 1026-2881 Wally und Horst Hagen: Die afrikanischen Nationalparks als Lebensräume der Elefanten. In: Vitus B. Dröscher (1990): Rettet die Elefanten Afrikas (S. 213–214) Weblinks Einzelbelege Nationalpark in Ghana Nationalpark in Afrika Savannah Region"} {"instruction": "What is a use case for inheritance in object-oriented programming?", "input": "", "output": "In object-oriented programming, inheritance is used to create and maintain a hierarchical relationship between classes. By inheriting properties and methods from a parent class, a child class can reuse and extend the functionalities of the parent class. This allows developers to write less code and keep their codebase organized by logically grouping similar classes into a hierarchy, which can then be further extended with new features."} {"instruction": "Construct a for loop in Python for outputting the numbers in the range of 5-15.", "input": "", "output": "for i in range(5, 16): \n print (i)"} {"instruction": "You need to design a database for a school where multiple students can have a tutor of a subject. What is the best way to design the database?", "input": "", "output": "The best way to design the database is to create three tables: students, tutors and subjects. The students table would contain columns for each student's name, ID and contact details. The tutors table would contain the tutor's name, ID and contact details. The subjects table would contain the subject name, description and number of available tutors. The three tables would then be linked by a linking table, which would contain two columns - one for the student ID, one for the tutor ID - and an extra column to identify which subject the tutor-student pair is associated with."} {"instruction": "Design an algorithm in Python that checks if a given number is even or odd.", "input": "", "output": "def is_even(n):\n if n % 2 == 0:\n return True\n else:\n return False"} {"instruction": "Write an HTML code snippet to create a checkbox with the label “Terms of Service”", "input": "", "output": " "} {"instruction": "Generate a python program to display the largest and smallest elements in a given array", "input": "[2, 3, 8, 5, 10, 6]", "output": "def display_min_max(arr):\n # initializing max and min element\n max_element = arr[0]\n min_element = arr[0]\n\n # traverse through the array elements\n for x in arr:\n if (x > max_element):\n max_element = x\n if (x < min_element):\n min_element = x\n\n # display max and min element\n print(\"The largest element is\", max_element)\n print(\"The smallest element is\", min_element)\n\n# Driver code\narr = [2, 3, 8, 5, 10, 6]\ndisplay_min_max(arr)"} {"instruction": "Edit the previous code to print out the total salary of all employees whose salary is between 40,000 and 50,000.", "input": "", "output": "SELECT SUM(salary) as total_salary FROM employees WHERE salary BETWEEN 40000 AND 50000;"} {"instruction": "Write a code to convert a given string of English characters to corresponding Morse code.", "input": "\"Hello World!\"", "output": "def morse_encode(input_string): morse_encoder = { \"A\":\".- \", \"B\":\"-... \", \"C\":\"-.-. \", \"D\":\"-.. \", \"E\":\" . \", \"F\":\"..-. \", \"G\":\"--. \", \"H\":\".... \", \"I\":\".. \", \"J\":\".--- \", \"K\":\"-.- \", \"L\":\".-.. \", \"M\":\"-- \", \"N\":\"-. \", \"O\":\"--- \", \"P\":\".--. \", \"Q\":\"--.- \", \"R\":\".-. \", \"S\":\"... \", \"T\":\"- \", \"U\":\"..- \", \"V\":\"...- \", \"W\":\".-- \", \"X\":\"-..- \", \"Y\":\"-.-- \", \"Z\":\"--.. \", \" \": \" \" } morse_string = [] for char in input_string.upper(): encoded_char = morse_encoder.get(char) morse_string.append(encoded_char) return ''.join(morse_string) print(morse_encode(\"Hello World!\")) # Output: \".... . .-.. .-.. --- .-- --- .-. .-.. -.. ! \""} {"text": "[HI Wikipedia] रेलवे प्लेटफार्म\n\nमहत्वपूर्ण तथ्य कॉपर का उपयोग बिजली के तारों को बनाने में किया जाता है। आयरन का उपयोग, खाना बनाने के बर्तनों और दरवाजों की कुंडियो को बनाने में किया जाता है। गोल्ड और सिल्वर का उपयोग, आभूषण बनाने में किया जाता है। मर्करी का उपयोग, थर्मोमीटर बनाने में किया जाता है। धातुओं को पोलिश किया जा सकता है। ये आघात वर्धी तथा तन्य होती है। [धातुओं के गुण धर्म] धातुएं इलेक्ट्रॉन को त्यागकर घनायन बनाने की प्रवृति रखती हैं। उनके संयोजकता कोश में एक दो अथवा तीन इलेक्ट्रॉन होते है। धातु के परमाणु द्वारा त्यागे गए इलेक्ट्रान की संख्या को संयोजकता कहलाती हैं। धातुओं के कुछ उदाहरण- सोना, चांदी, कॉपर,लोहा आदि। [भौतिक अवस्था] अधिकांश धातुएं सामान्य दाब एवं ताप पर ठोस होती है। कमरे के ताप पर केवल पर ही एक ऐसी धातु है जो द्रव होती है। अधिकांश धातुएं जैसे, आयरन,कॉपर,अथवा जिंक कठोर होती है, परंतु सोडियम,पोटेशियम जैसी कुछ धातुएं नरम होती है जिन्हे चाकू से आसानी से काटा जा सकता है। लिथियम, पोटेशियम अथवा सोडियम का घनत्व जल के घनत्व से कम होता है। धातु की सतह चमकदार होती है ,धातु की इस गुण धर्म को धात्विक चमक कहते है। उदाहरण-: गोल्ड की सतह पीली होती हैं। कॉपर की सतह भूरी होती हैं। धातुओं को जब किसी वस्तु से टकराया जाता है तो एक निनाद ध्वनि उत्पन्न होती है जिसे धवानिकता कहते है। गैलियम और सीजियम का गलनांक बहुत कम होता है। सोडियम तथा पोटैशियम के अलावा,धातुओं का गालनांक अथवा क्वाथनंक अधिक होता है। गुणधर्म वैसे प्लेटफार्म का उपर से बन्द होना आवश्यक नहीं है क्योंकि कुछ स्टेशनों पर बने प्लेटफार्म केवल चबुतरा बनाकर भी निर्मित किए जाते हैं। लेकिन सामान्य रूप से देखा जाए तो प्रत्येक प्लेटफार्म पर धुप व बारिस से बचने की कुछ व्यवस्था जरूर होती है। अतः सामान्य रूप से प्लेटफार्म की ऊँचाई रेलगाडी की उँचाई से अधिक रखी जाती है। सन्दर्भ बाहरी कड़ियाँ Schematic maps of all tracks, junctionsswitches and platforms in the Netherlands (point at an area and open detail map in a new window) (UK-centric information)"} {"text": "[EN Wikipedia] Newham Generals\n\nNewham Generals are a grime duo from East London, currently consisting of MCs D Double E and Footsie. They are best known for their singles \"Frontline\", \"Hard\" and \"Like It Or Not\" as well as their live performances. The group was founded in 2004, after D Double E had a disagreement with fellow members of his previous group N.A.S.T.Y Crew. Newham Generals built up a name for themselves through regular appearances on pirate radio stations and released a number of their singles on white label vinyl. Dizzee Rascal idolised D Double E as an MC in his youth and the group was signed to his record label Dirtee Stank in 2005 after D Double E showed Dirtee Stank a CD of the groups work, and promptly released a mix CD on the label in 2006 entitled The Best of Newham Generals Vol. 1. Founding member Monkstar left the group in 2007. The group released their debut album Generally Speaking on Dirtee Stank in April 2009 which was their last release to feature Monkstar. They followed Generally Speaking with the release of the Bag of Grease EP the following year, as well as various solo projects. The group's name is taken from Newham General Hospital, now known as Newham University Hospital. Discography EPs 2010: Bag of Grease 2013: 5 Star General 2015: N to the G's\" Albums 2006: The Best of Newham Generals2009: Generally SpeakingSide projects DJ Tubby and Footsie ran their own record label Braindead Entertainment from 2002 to 2007 through which they released their own instrumentals. Footsie revived the label in 2012 to release his first solo vocal EP Zoot Break 2, this was followed by a joint instrumental EP with DJ Tubby entitled The Gray Area and by a 3 volume instrumental album series called King Original. D Double E has appeared as a featured artist on numerous releases as well as having released singles and a solo EP on Dirtee Stank, he also founded his own record label Bluku Music in 2014. Over the years he has featured on a number of prominent releases such as Skepta's \"Ladies Hit Squad\" from the 2016 album Konnichiwa alongside A$AP Nast. Footsie's single \"Work All Day\" produced by Sukh Knight featured on Apple Inc.'s TV commercial for the IPhone 13 launched in September 2021. D Double E discography Albums 2018: JackuumSingles 2010: \"Street Fighter Riddim\" 2012: \"Pumpin' It Out\" 2012: \"Be Like Me\" (featuring Smurfie Syco) 2014: \"Wolly\" 2014: \"Lovely Jubbly\" 2015: \"Like This\" 2016: \"Grim Reaper\" (produced by Footsie) 2017: \"How I Like It\" (produced by Diamondz) 2017: “Shenanigans” (produced by Swifta Beater) EPs 2011: Bluku Bluku EP2012: Pumpin' It Out EPFootsie discography Singles 2012: \"1 Spliff\" 2012: \"B.O.G. (Bag of Grease)\" (featuring Darq E Freaker) 2013: \"Spookfest\" (featuring JME, D Double E, Jammer, P Money and Chronic) 2014: \"Work All Day\" (produced…"} {"instruction": "Optimize an existing Python program using the scikit-learn library.", "input": "An existing Python program to classify spam emails.", "output": "# Load required modules\nimport pandas as pd\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer\n\n# Load spam emails\nspam_df = pd.read_csv(\"spam.csv\")\n\n# Split into independent and dependent features\nX = spam_df['Email']\ny = spam_df['Label']\n\n# Create a pipeline\nmodel = make_pipeline(CountVectorizer(),\n TfidfTransformer(),\n MultinomialNB())\n\n# Fit the pipeline\nmodel.fit(X, y)\n\n# Resize the dataset\nfrom sklearn.model_selection import train_test_split\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Fit the model\nmodel.fit(X_train, y_train)\n\n# Generate predictions\ny_pred = model.predict(X_test)\n\n# Generate accuracy score\nfrom sklearn.metrics import accuracy_score\nprint(accuracy_score(y_test, y_pred))"} {"instruction": "Write a Python program to divide a list of numbers into two equal lists.", "input": "[1,2,3,4,5,6,7,8,9,10]", "output": "list_a = [1,2,3,4,5]\nlist_b = [6,7,8,9,10]"} {"instruction": "Implement an algorithm in C++ for finding the largest number in an array.", "input": "int arr[] = {3, 7, 1, -2, 9, 5};", "output": "#include using namespace std; int largestNumber(int arr[], int n) { int max = arr[0]; for (int i = 0; i < n; i++) { if (arr[i] > max) max = arr[i]; } return max; } int main() { int arr[] = {3, 7, 1, -2, 9, 5}; int n = sizeof(arr) / sizeof(arr[0]); cout <<\"The largest element is \"<< largestNumber(arr, n); return 0; }"} {"text": "[HI Wikipedia] कन्हैयालाल शर्मा\n\nडॉ कन्हैयालाल शर्मा (24 जनवरी सन् 1924 ई. -) हिन्दी के कवि, हिन्दी-विभागाध्यक्ष एवं भाषा-शोधक थे। उनका जन्म राजस्थान के कोटा जिले के कनवास नामक ग्राम में एक अल्प-मध्यवर्गीय परिवार में हुआ था। कृतियाँ हाड़ोती बोली और साहित्य (1965) हाड़ोती साहित्य और स्वरूप (1973) तेजाजी-लोक गाथा बाहरी कड़ियाँ कीर्तिशेष डॉ॰ कन्हैयालाल शर्मा : भाषा शोध साहित्य के प्रज्ञापुरुष (राजस्थान साहित्य अकादमी) हिन्दी भाषा शोधार्थी"} {"instruction": "What is the reason for the failure of a unit test?", "input": "", "output": "The reason for the failure of a unit test can be any number of things, including incorrect expectations, incorrect or missing test data, or a problem with the code being tested. It can also be due to a lack of suitable code coverage. In any case, it is important to identify the source of the failure to ensure that the issue can be resolved."} {"text": "[DE Wikipedia] Amt Hüttenberg\n\nDas Amt Hüttenberg war ein hessen-darmstädtisches und nassau-weilburgisches kondominial verwaltetes Amt. Nach einer Realteilung bestand sowohl ein hessisches als auch ein nassauisches „Amt Hüttenberg“. Geografie Im 16. Jahrhundert bestand es aus: dem Hüttenberg mit den Orten Allendorf/Lahn, Annerod, Dornholzhausen, Dutenhofen, Ebersgöns, Hausen, Hochelheim, Hörnsheim, Kirch-Göns, Lang-Göns, Leihgestern, Lützellinden, Pohl-Göns, Rechtenbach, Volpertshausen, Reiskirchen und Niederwetz; dem „gemeinen Land an der Lahn“, bestehend aus dem Gericht Wißmar, dem Gericht Krofdorf, Launsbach, Fellingshausen, Rodheim an der Bieber (gemeinschaftlich), Krofdorf (nassauisch), Wieseck (hessisch), dem Gericht Heuchelheim und Kinzenbach (seit 1967 →Heuchelheim). dem Gericht Lollar, bestehend aus Lollar, Daubringen, Mainzlar, Kirchberg und Ruttershausen; Staufenberg (hessisch); Großen-Linden; Niederkleen. Geschichte Das Amt Hüttenberg war Teil des Erbes der im 12. Jahrhundert ausgestorbenen Grafen von Gleiberg. Seit dem 14. Jahrhundert war es ein Hessen-Darmstadt und verschiedenen Linien des Hauses Nassau gemeinsames Kondominium. In der Endphase gehörte es zur Landgrafschaft Hessen-Darmstadt und zu Nassau-Saarbrücken. Teilungen Erste Teilung Mit der Einführung der Reformation erwies sich die Zweiherrigkeit als Problem, da Nassau reformiert, Hessen-Darmstadt aber lutherisch geworden war. 1585 entschieden sich die Kondominialherren daher für eine Realteilung. Dabei erhielt Nassau: Wißmar, Launsbach, Kinzenbach, Weidenhausen, Volpertshausen, Reiskirchen und der Hüttenberger Anteil an Nieder-Wetz, Wüstungen, Werzhausen sowie Gehringshausen und Hessen-Marburg: das Gericht Lollar mit Lollar, Daubringen, Mainzlar, Kirchberg, Ruttershausen, sowie Heuchelheim, Rodheim an der Bieber, Fellingshausen und Großen-Linden. Das übrige Gebiet blieb zunächst kondominial. Seitdem bestanden ein hessen-darmstädtisches Amt Hüttenberg und ein nassauisches Amt Hüttenberg nebeneinander. Zweite Teilung Aufgrund fortschreitender Ausbildung von Staatlichkeit aber auch wegen unterschiedlicher Konfessionen wurden Kondominate in den Territorien des Alten Reiches zunehmend als Störfaktoren empfunden. Die Landgrafschaft Hessen-Darmstadt und die Grafschaft Nassau-Weilburg einigten sich deshalb mit einem Vertrag vom 16. Juni 1703 darauf, auch das verbliebene Kondominium real zu teilen. Mit dem Vertrag vom 16. Juni 1703 erhielt Grafschaft Nassau-Weilburg: Dutenhofen, Lützellinden, Hörnsheim, Hochelheim, Niederkleen, Dornholzhausen, Groß-Rechtenbach und die bisher hessen-darmstädtischen Orte Vollnkirchen und Klein-Rechtenbach. Landgrafschaft Hessen-Darmstadt: Allendorf an der Lahn, Annerod, Hausen, Leihgestern, Langgöns, Kirchgöns, Pohlgöns, Schloss Schiffenberg und den Neuhof. Amt Hüttenberg in Hessen…"} {"instruction": "Create a class in Python which can be used to store data about books.", "input": "", "output": "class Book:\n def __init__(self, title, author, pages):\n self.title = title\n self.author = author\n self.pages = pages\n\n def __str__(self):\n return '{} by {} ({} pages)'.format(self.title, self.author, self.pages)"} {"instruction": "Develop a Python program to check if a triangle is valid or not.", "input": "Length of sides: 3, 4, 5", "output": "# A function to check if the triangle is valid \ndef valid_triangle(side1, side2, side3): \n # Check the sum of any two sides should be\n # greater than the third one. \n a = side1 + side2 \n b = side1 + side3 \n c = side2 + side3 \n \n if (a > side3) and (b > side2) and (c > side1): \n return True\n else: \n return False\n\n# Driver Code \nside1 = 3 \nside2 = 4 \nside3 = 5 \nif valid_triangle(side1, side2, side3): \n print(\"The triangle is valid\")\nelse: \n print(\"The triangle is not valid\")"} {"instruction": "Optimize the following Python code for counting the number of words in an input string.", "input": "s = \"This is a sample string\"", "output": "# Count number of words in a string\n\ndef count_words(s):\n # remove unnecessary characters\n s = s.replace(',', '').replace('.', '')\n # split string into list of words\n words = s.split(' ')\n # return the length of the list (number of words)\n return len(words)\n\ns = \"This is a sample string\"\nwords_count = count_words(s)\nprint(words_count)"} {"instruction": "Create an HTML document to display \"Hello, World!\" in bold.", "input": "", "output": " Hello World Hello, World! "} {"text": "[EN Wikipedia] Robert Dawson\n\nRobert or Bob Dawson may refer to: Academia Robert MacGregor Dawson (1895–1958), Canadian political scientist and academic Robert L. Dawson (1943–2007), American professor of French language and literature Robert Dawson (photographer) (born 1950), American photographer and instructor of photography Politics and government Robert Peel Dawson (1818–1877), Irish Member of Parliament for Londonderry Robert T. Dawson (born 1938), U.S. federal judge Robert K. Dawson (public official) (born 1946), U.S. Assistant Secretary of the Army (Civil Works) Sports Bob Dawson (footballer) (1921–2023), Australian rules footballer for St Kilda Bob Dawson (Canadian football) (1932–2017), Canadian football player Bobby Dawson (1935–1980), English footballer Robert Dawson (footballer) (born 1963), Scottish footballer Robert Dawson (wrestler) (born 1963), Canadian freestyle wrestler Bobby Dawson (Canadian football) (born 1966), Canadian football player Robert Dawson (cricketer) (born 1970), English cricketer Other people Robert Dawson (bishop) (1589–1643), Anglican bishop in Ireland Robert Dawson Esq. (1782–1866), AA Co. company agent and pastoralist Robert K. Dawson (surveyor) (1798–1861), English surveyor and cartographer W. R. A. Dawson (1891–1918), known as Bob, British Army officer in the First World War Bob Dawson (television host) (1924–2014), American television personality, meteorologist, and producer Bob Dawson (actor) (c. 1955–2001), Canadian actor and radio personality"} {"instruction": "Come up with a Python program to print out the sum of all the numbers from 0 to a given number.", "input": "", "output": "def sum_numbers(n):\n total = 0\n for i in range(n+1):\n total += i\n return total\n\nprint(sum_numbers(20))"} {"text": "[CS Wikipedia] Milan Kratochvíl (fotbalista)\n\nMilan Kratochvíl (26. listopadu 1939) je bývalý český fotbalista, útočník. Sportovní kariéra V československé lize hrál za Bohemians Praha. Nastoupil ke 116 ligovým utkáním a dal 8 gólů. Ligová bilance Literatura JEŘÁBEK, Luboš: Český a československý fotbal: lexikon osobností a klubů 1906-2006, Praha, Grada 2007. Čeští fotbalisté Fotbalisté FC Bohemians Praha Narození v roce 1939 Žijící lidé Muži"} {"instruction": "Find the number of elements in an array of integers [1,2,3,4,5].", "input": "arr = [1,2,3,4,5]", "output": "length = len(arr) print(length) # Output 5"} {"instruction": "Write a Python function to compare two lists and return the elements that are not common in both lists.", "input": "list1=[1, 2, 3, 4, 5]\nlist2=[4, 5, 6, 7, 8]", "output": "def get_unique_elements(list1, list2):\n return list(set(list1) - set(list2))"} {"instruction": "Create a Java method that takes two integer arguments and returns their multiplication.", "input": "", "output": "public static int multiply(int a, int b) { return a * b; }"} {"instruction": "Create an algorithm in JavaScript to merge two sorted arrays into one.", "input": "arr1 = [1, 3, 5, 7] arr2 = [2, 4, 6, 8]", "output": "function mergeArrays(arr1, arr2) { let result = []; let index1 = 0; let index2 = 0; while (index1 < arr1.length && index2 < arr2.length) { if (arr1[index1] < arr2[index2]) { result.push(arr1[index1]); index1++; } else { result.push(arr2[index2]); index2++; } } while (index1 < arr1.length) { result.push(arr1[index1]); index1++; } while (index2 < arr2.length) { result.push(arr2[index2]); index2++; } return result; }"} {"instruction": "Write a Python program to compare the results of two sorting algorithms.", "input": "Algorithms: QuickSort, MergeSort \nArray: [3, 8, 1, 9, 5, 2]", "output": "def quicksort(arr): \n if len(arr) <= 1:\n return arr\n else:\n pivot = arr[len(arr) // 2]\n left = [x for x in arr if x < pivot]\n middle = [x for x in arr if x == pivot]\n right = [x for x in arr if x > pivot]\n return quicksort(left) + middle + quicksort(right)\n\ndef mergesort(arr): \n if len(arr) > 1: \n mid = len(arr) // 2 # Finding the mid of the array \n L = arr[:mid] # Dividing the array elements \n R = arr[mid:] # into 2 halves \n left_arr = mergesort(L) # Sorting the first \n right_arr = mergesort(R) # half \n arr =[] \n while len(left_arr) > 0 and len(right_arr) > 0: \n if left_arr[0] < right_arr[0]: \n arr.append(left_arr[0]) \n left_arr.pop(0) \n else: \n arr.append(right_arr[0]) \n right_arr.pop(0) \n # Checking if any element was left \n for i in left_arr: \n arr.append(i) \n for i in right_arr: \n arr.append(i) \n return arr\n\n# Test array \narr = [3, 8, 1, 9, 5, 2] \n# Sorted array using QuickSort \nprint(\"Sorted array using QuickSort:\", quicksort(arr)) \n# Sorted array using MergeSort \nprint(\"Sorted array using MergeSort:\", mergesort(arr))\n\nOutput:\nSorted array using QuickSort: [1, 2, 3, 5, 8, 9]\nSorted array using MergeSort: [1, 2, 3, 5, 8, 9]"} {"instruction": "Build a linear regression model using Python's scikit learn library.", "input": "import pandas as pd import numpy as np data = pd.DataFrame({ 'x': [2.5, 0.5, 2.2, 1.9, 3.1, 2.3, 2, 1, 1.5, 1.1], 'y': [2.4, 0.7, 2.9, 2.2, 3, 2.7, 1.6, 1.1, 1.6, 0.9] }) X = data['x'].values.reshape(-1, 1) y = data['y'].values.reshape(-1, 1)", "output": "from sklearn.linear_model import LinearRegression # Create linear regression model model = LinearRegression() # Train the model using the training set model.fit(X, y) # Make predictions using the testing set y_pred = model.predict(X)"} {"text": "[EN Wikipedia] Allegiance\n\nAn allegiance is a duty of fidelity said to be owed, or freely committed, by the people, subjects or citizens to their state or sovereign. Etymology The word allegiance comes from Middle English (see Medieval Latin , \"a liegance\"). The al- prefix was probably added through confusion with another legal term, allegeance, an \"allegation\" (the French comes from the English). Allegiance is formed from \"liege,\" from Old French , \"liege, free\", of Germanic origin. The connection with Latin , \"to bind,\" is erroneous. Usage Traditionally, English legal commentators used the term allegiance in two ways. In one sense, it referred to the deference which anyone, even foreigners, was expected to pay to the institutions of the country where one lived. In the other sense, it meant national character and the subjection due to that character. Types Local allegiance Natural allegiance United Kingdom The English doctrine, which was at one time adopted in the United States, asserted that allegiance was indelible: \"Nemo potest exuere patriam\". As the law stood prior to 1870, every person who by birth or naturalisation satisfied the conditions set forth, even if removed in infancy to another country where their family resided, owed an allegiance to the British crown which they could never resign or lose, except by act of parliament or by the recognition of the independence or the cession of the portion of British territory in which they resided. This refusal to accept any renunciation of allegiance to the Crown led to conflict with the United States over impressment, which led to further conflicts during the War of 1812, when thirteen Irish American prisoners of war were executed as traitors after the Battle of Queenston Heights; Winfield Scott urged American reprisal, but none was carried out. Allegiance was the tie which bound the subject to the sovereign, in return for that protection which the sovereign afforded the subject. It was the mutual bond and obligation between monarch and subjects, whereby subjects were called their liege subjects, because they are bound to obey and serve them; and the monarch was called their liege lord, because they should maintain and defend them (Ex parte Anderson (1861) 3 El & El 487; 121 ER 525; China Navigation Co v Attorney-General (1932) 48 TLR 375; Attorney-General v Nissan [1969] 1 All ER 629; Oppenheimer v Cattermole [1972] 3 All ER 1106). The duty of the crown towards its subjects was to govern and protect them. The reciprocal duty of the subject towards the crown was that of allegiance. At common law, allegiance was a true and faithful obedience of the subject due to their sovereign. As the subject owed to their sovereign their true and faithful allegiance and obedience, so the sovereign (Calvin's Case (1608) 7 Co Rep 1a; Jenk…"} {"text": "[HI Wikipedia] कुंचन नम्बियार\n\nकुंचन नंबियार (लगभग १७०५- १७७० ई.) मलयालम के आरम्भिक कवि, व्यंगकार थे। परिचय इनका जन्म मध्य केरल के कोच्चिस्थान में हुआ था। अंपलप्पुष के देवनारायण नामक शासक के संरक्षण में वहीं बस गए और बाद में त्रावणकोर के शासक मार्तण्ड वर्मा के दरबार में प्रविष्ट हुए। अपने यौवनकाल के प्रारंभिक दिनों में कुंचन नंबियार ने भिन्न शैलियों में काव्यरचना की। उनकी प्रारंभिक कविताओं में भगवत्द्दूत, भागवतम्, नलचरितम् और चाणक्यसूत्रम् के नाम गिनाए जा सकते हैं। वह नवीन एवं अद्भत मलयालम काव्यशैली 'तुक्कलप्पाट्ट' के प्रवर्त्तक हैं। तुक्कल द्रुत गति से प्रचालित करनेवाला नृत्य है जिसमें नर्तक स्वयं पद्यबद्ध कहानियों का गायन करत है। नंबियार ने लगभग साठ तुक्कल कविताएँ लिखी हैं जिनमें कल्याणसौंगधिकम्, कार्त्तवीरार्जुनविजयम्, किरातम् सभाप्रवेशम्, त्रिपुरदहनम्, हरिणीस्वयम्वरम्, रूग्मिणीस्वयम्वरम्, प्रदोषमाहात्म्यम्, स्यमन्तकम् एवं घोषयात्रा सम्मिलित हैं। नंबियार ने अपनी तुक्कल कविताओं में नम्र काव्य-शैली का विकास किया है जिसने समाज के सभी वर्गों को आकृष्ट किया है और जिसके द्वारा उन्होंने समाज की वास्तविकताओं को प्रतिबिंबित करने का प्रयत्न किया है। यद्यपि उन्होंने इतिहास एवं पुराण से ही अपनी कविताओं के लिए कहानियों का चुनाव किया है तथापि समकालीन सामाजिक जीवन के प्रसग में ही उन्हें चित्रित किया है। हास्य एवं व्यंग के भी वे महान कवि माने जा सकते हैं। उन्होंने मलयालम में अहंकारी सामंतों, भ्रष्ट कर्मचारियों, लोभी और स्त्रीपरायण ब्राह्मणों ओर तुच्छ नायरों इत्यादि समस्त श्रेणी के लोगों पर व्यंग किया है। उनकी अनेक पदोक्तियाँ सर्वसाधारण में यथेष्ट प्रचलित हैं और उन्होंने लोकोक्तियों का स्थान ग्रहण कर लिया है। मलयालम कवि"} {"text": "[EN Wikipedia] Şölen, Ergani\n\nŞölen is a neighbourhood of the municipality and district of Ergani, Diyarbakır Province, Turkey. Its population is 1,556 (2022). Before the 2013 reorganisation, it was a town (belde). References Neighbourhoods in Ergani District"} {"text": "[EN Wikipedia] Gmina Górzno, Masovian Voivodeship\n\nGmina Górzno is a rural gmina (administrative district) in Garwolin County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Górzno, which lies approximately 8 kilometres (5 mi) south-east of Garwolin and 64 km (40 mi) south-east of Warsaw. The gmina covers an area of , and as of 2006 its total population is 6,112. Villages Gmina Górzno contains the villages and settlements of Chęciny, Gąsów, Górzno, Górzno-Kolonia, Goździk, Józefów, Kobyla Wola, Łąki, Mierzączka, Piaski, Potaszniki, Reducin, Samorządki, Unin and Wólka Ostrożeńska. Neighbouring gminas Gmina Górzno is bordered by the town of Garwolin and by the gminas of Borowie, Garwolin, Łaskarzew, Miastków Kościelny, Sobolew and Żelechów. References Polish official population figures 2006 Gorzno Garwolin County"} {"text": "[HI Wikipedia] भारत-चीन सम्बन्ध\n\nभारत - चीन‌ सम्बन्ध ( ; देवनागरीकृत : च्रुङ्ग्¹यिन्² क्वाङ्¹शी² ); दो पड़ोसी एवं विश्व की दो उभरती शक्तियाँ हैं। दोनों के बीच लम्बी सीमारेखा है। इन दोनों में प्रचीन काल से ही सांस्कृतिक तथा आर्थिक सम्बन्ध रहे हैं। भारत से बौद्ध धर्म का प्रचार चीन की भूमि पर हुआ है। चीन के लोगों ने प्राचीन काल से ही बौद्ध धर्म की शिक्षा ग्रहण करने के लिए भारत के विश्वविद्यालयों अर्थात् नालन्दा विश्वविद्यालय एवं तक्षशिला विश्वविद्यालय को चुना था क्योंकि उस समय संसार में अपने तरह के यही दो विश्वविद्यालय शिक्षा के महत्वपूर्ण केन्द्र थे। उस काल में यूरोप के लोग जंगली अवस्था में थे। यद्यपि 1946 में चीन के साम्यवादी शासन की स्थापना हुई तदपि दोनों देशों के बीच मैत्री सम्बन्ध बराबर बने रहे। चीन के संघर्ष के प्रति भारत द्वारा विकासशील देश नीति की गई एवं पंचशील पर आस्था भी प्रकट की गई। वर्ष 1949 में नये चीन की स्थापना के बाद के अगले वर्ष, भारत ने चीन के साथ राजनयिक सम्बन्ध स्थापित किये। इस तरह भारत, चीन लोक गणराज्य को मान्यता देने वाला प्रथम गैर-समाजवादी देश बना। वर्ष 1954 के जून माह में चीन, भारत व म्यान्मार द्वारा शान्तिपूर्ण सहअस्तित्व के पाँच सिद्धान्त यानी पंचशील प्रवर्तित किये गये। पंचशील चीन व भारत द्वारा दुनिया की शान्ति व सुरक्षा में किया गया एक महत्वपूर्ण योगदान था, और आज तक दोनों देशों की जनता की जबान पर है। देशों के सम्बन्धों को लेकर स्थापित इन सिद्धान्तों की मुख्य विषयवस्तु है- एक-दूसरे की प्रभुसत्ता व प्रादेशिक अखण्डता का सम्मान किया जाये, एक-दूसरे पर आक्रमण न किया जाये, एक-दूसरे के आन्तरिक मामलों में हस्तक्षेप न किया जाये और समानता व आपसी लाभ के आधार पर शान्तिपूर्ण सह-अस्तित्व बरकारार रखा जाये। परन्तु चीन नें मैत्री सम्बन्धों को ताख पर रख कर 1962 में भारत पर आक्रमण कर दिया और भारत की बहुत सारी भूमि पर कब्जा करते हुए 21 नवम्बर 1962 को एकपक्षीय युद्धविराम की घोषणा कर दी। उस समय से दोनों देशों के सम्बन्ध आज-तक सामान्य नहीं हो पाए हैं। जवाहरलाल नेहरू की मृत्यु के बाद लाल बहादुर शास्त्री ने चीन से दोस्ती का हाथ आगे बढ़ाया, परन्तु भारत को सफलता नहीं मिली, क्योंकि चीन ने 1965 के भारत-पाकिस्तान युद्ध में अन्यायपूर्ण ढँग से पाकिस्तान का एकतरफा सर्मथन किया था। 23 सितम्बर 1965 को भारत-पाकिस्तान युद्धविराम का समझौता हो गया। अतः चीन के सारे इरादों पर पानी फिर गया। पाकिस्तान ने भारत के शत्रु की हैसियत से चीन को काराकोरम क्षेत्र में बसा दिया एवं पाकिस्तान अधिकृत कश्मीर का 2,600 वर्ग मील भू–भाग चीन को सौंप दिया। जिससें चीन के साम्यवादी दल के सर्वाधिक शक्तिशाली नेता एवं चीन के राष्ट्रपति जियांग जोमीन ने नवम्बर 1966 में तीन दिन की भारत यात्रा की थी। यह चीन के राष्ट्रपति द्वारा की गई पहली यात्रा थी। इस यात्रा के दौरान एक एतिहासिक समझौता किया गया, जिसके अर्न्तगत वास्तविक नियन्त्रण रेखा पर एक दूसरे द्वारा आक्रमण नही करने का वचन दिया गया। दोनों देशों ने अपने सैनिक बल का प्रयोग न करने का एवं हिमालय की झगड़े वाली सीमा पर शान्ति व्यवस्था बनायें रखने का समझौता किया। इस यात्रा के समय 11 सूत्रीय समझौता किया गया। अक्टूबर 1967 में भारत और चीन के मध्य तेल एवं गैस को प्राप्ति करने की भागीदारी…"} {"instruction": "You need to generate a Javascript program that prints \"Hello World\".", "input": "", "output": "console.log(\"Hello World\");"} {"instruction": "Edit this code snippet to reverse a string in Python.", "input": "def reverse_string(s): # Edit here return reversed_string", "output": "def reverse_string(s): reversed_string = \"\" for char in s: reversed_string = char + reversed_string return reversed_string"} {"text": "[CS Wikipedia] Aneroid\n\nAneroid (barometre anéroide, holosterikbarometer) je deformační přístroj určený k měření atmosférického tlaku (tlaku vzduchu). Aneroid (kovový tlakoměr) vynalezl v roce 1843 francouzský fyzik Lucien Vidie. Principem činnosti mechanického aneroidu je deformace pružného systému (čidla) působením tlaku vzduchu. Konstrukce Vidieova z roku 1845 používá k deformaci tenkostěnnou vzduchoprázdnou (téměř vzduchoprázdnou) kovovou krabičku (Vidieho dózu) nebo sadu těchto krabiček. Jiný typ přístroje – Bourdonův aneroid z roku 1850, nahradil pružné krabičky vzduchoprázdnou trubicí eliptického průřezu, stočenou do kruhového tvaru. Velikost deformace čidla (krabiček nebo trubice) je přenášena na ručičku ukazující velikost tlaku vzduchu na stupnici. Stupnice aneroidu může být označena v jednotkách tlaku (dříve Torr, milibar, dnes hektoPascal) a nebo druhotně v metrech nebo stopách u výškoměrných aneroidů – leteckých altimetrů (výškoměrů) nebo zeměměřických aneroidů. Měření je založeno na faktu, že tlak vzduchu klesá s rostoucí nadmořskou výškou. Pro větší přesnost měření byly aneroidy vybavovány sadou spojených deformačních krabiček. Sady krabiček byly použity zejména v barografech. S přídavným závažím také u kyvadlových hodin při kompenzaci změn hustoty (tlaku) vzduchu mající vliv na přesnost chodu hodin (tzv. Rieflerova aneroidová kompensace tlaková). Pro přístroj se někdy používal název pérový tlakoměr (pérový barometr). Ocelové péro (pružina) zajišťovala potřebnou pružnost krabiček. Používání aneroidu bylo oproti práci se rtuťovým tlakoměrem podstatně jednodušší, protože přístroj je menší, přenosný, uzavřený (nehrozí únik rtuti) a odolnější (nehrozí rozbití skleněných částí). Částečnou nevýhodou je jeho menší přesnost a elastické dopružování, které se projevuje opožděnou indikací změn tlaku vzduchu. Galerie Odkazy Reference Související články Barometr Barometrické měření výšky Mechanika Mechanika tekutin Výškoměr Externí odkazy heslo v Ottově slovníku naučném Mechanika tekutin Meteorologické přístroje"} {"instruction": "Write a procedure to subtract two numbers in MySQL.", "input": "", "output": "CREATE PROCEDURE subtract_numbers ( IN num_1 INT, IN num_2 INT ) BEGIN SET num_1 = num_1 - num_2; END;"} {"instruction": "Can you detect if a given number is even or odd?", "input": "", "output": "def is_even(n): return n % 2 == 0"} {"instruction": "Write a C++ program that prints the Fibonacci numbers up to the number specified by the user.", "input": "", "output": "#include using namespace std; int main() { int n, t1 = 0, t2 = 1, nextTerm; cout << \"Enter the number of terms: \"; cin >> n; cout << \"Fibonacci Series: \"; for (int i = 1; i <= n; ++i) { if (i == 1) { cout << \" \" << t1; continue; } if (i == 2) { cout << t2 << \" \"; continue; } nextTerm = t1 + t2; t1 = t2; t2 = nextTerm; cout << nextTerm << \" \"; } return 0; }"} {"instruction": "Develop a code to predict the sentiment of a sentence using a pre-trained sentiment analysis model in Python.", "input": "", "output": "from textblob import TextBlob\nfrom textblob.sentiments import NaiveBayesAnalyzer\n\n# Create a TextBlob object using the NaiveBayesAnalyzer\nsentiment_analyzer = TextBlob(analyzer=NaiveBayesAnalyzer())\n\n# Method to predict the sentiment of a given sentence\ndef predict_sentiment(sentence):\n # Get the polarity score of the sentence\n polar_score = sentiment_analyzer.sentiment.polarity\n # class the sentiment of the given sentence\n if polar_score > 0:\n sentiment = \"positive\"\n elif polar_score == 0:\n sentiment = \"neutral\"\n else:\n sentiment = \"negative\"\n # Print out the sentiment of the given sentence\n print(\"The sentiment of the given sentence is:\", sentiment)\n\nsentence = \"This movie is amazing!\"\npredict_sentiment(sentence)"} {"instruction": "Using recursion, write a Python program to find the Nth Fibonacci number.", "input": "", "output": "def Fibonacci(n): \n if n<0: \n print(\"Incorrect input\") \n elif n==0: \n return 0\n elif n==1: \n return 1\n else: \n return Fibonacci(n-1)+Fibonacci(n-2)"} {"text": "[DE Wikipedia] Fred Etchen\n\nFred Rudolph Etchen (* 25. September 1884 in Coffeyville; † 6. November 1961 in Phoenix) war ein US-amerikanischer Sportschütze. Erfolge Fred Etchen nahm an den Olympischen Spielen 1924 in Paris im Trap teil. Im Mannschaftswettbewerb belegte er mit der US-amerikanischen Mannschaft vor Kanada und Finnland den ersten Platz. Mit insgesamt 363 Punkten und damit drei Punkten Vorsprung hatten sich die Amerikaner, deren Team neben Etchen noch aus Frank Hughes, John Noel, Clarence Platt, Samuel Sharman und William Silkworth bestand, knapp die Goldmedaille gesichert. Etchen war mit 89 Punkten der viertbeste Schütze der Mannschaft. In der Einzelkonkurrenz belegte er mit dieser Punktzahl den 24. Platz. Etchen gewann auf Staatenebene viele Titel. Er schrieb ein Buch über das Tontaubenschießen und half bei der Gründung der American Trapshooting Association. Während des Zweiten Weltkriegs unterrichtete er Schießtrainer der Schützenschulen des Militärs. Weblinks Sportschütze (Vereinigte Staaten) Olympiasieger (Sportschießen) Olympiateilnehmer (Vereinigte Staaten) Teilnehmer der Olympischen Sommerspiele 1924 US-Amerikaner Geboren 1884 Gestorben 1961 Mann"} {"instruction": "Given a list of names, capitalize the first letter of each name.", "input": "names = [\"john\", \"sarah\", \"joe\", \"dave\"]", "output": "def capitalize_names(names): capitalized_names = [] for name in names: capitalized_name = name[0].upper() + name[1:] capitalized_names.append(capitalized_name) return capitalized_names"} {"instruction": "Calculate the result of XORing two binary numbers.", "input": "1010, 0101", "output": "The result of XORing 1010 and 0101 is 1111."} {"instruction": "Write a function in Python that takes a string of text as an input and returns a list of all possible anagrams of the string.", "input": "\"aabc\"", "output": "def getAnagrams(string):\n #base case\n if len(string) <= 1: \n return [string] \n\n #recursive case\n all_possible_anagrams = []\n for i, letter in enumerate(string): \n #recursively iterate over the string without the fixed letter\n sub_string = string[:i] + string[i+1:]\n\n #get anagrams of sub string\n anagrams_of_substring = getAnagrams(sub_string)\n\n for sub_anagram in anagrams_of_substring:\n #add the fixed letter to all the anagrams of sub string\n anagram = letter + sub_anagram\n all_possible_anagrams.append(anagram)\n\n return all_possible_anagrams\n\nprint(getAnagrams(\"aabc\"))"} {"text": "[CS Wikipedia] Štěpán Kučera (spisovatel)\n\nŠtěpán Kučera (* 13. února 1985 Jablonec nad Nisou) je český spisovatel. Vystudoval žurnalistiku a mediální studia na Karlově univerzitě v Praze, pracuje jako redaktor Salon Práva. Napsal sbírku povídek Tajná kronika Rychlých šípů… a jiné příběhy (Host, 2006), povídkovou knihu Jidáš byl ufon… a jiné příběhy (Druhé město, 2016) a jeho texty vyšly v řadě sborníků, například v česko-německé čítance Naše krajina slov / Unsere Wortlandschaft (KAL, 2012), v povídkové sbírce Miliónový časy: Povídky pro Adru (Argo, 2014) nebo v povídkové knize Krvavý Bronx (povídka Divocí koně aneb kdo to byl Yankton Bill?, 2020). Roku 2019 vydal svůj první román Projekt Gilgameš (Druhé město, 2019); jeho hlavním hrdinou je převozník Uršanábi, zmiňovaný v eposu o Gilgamešovi. Nesmrtelný, může cestovat časem a díky tomu potkává výjimečné osobnosti; koná při tom dobré skutky. Do vyprávění se mísí dialog robopsychologa a superinteligentního počítače, jenž je naprogramován, aby hledal smysl lidské existence; místo přesných faktů překvapí nečekanou pointou. Dílo Tajná kronika Rychlých šípů… a jiné příběhy, 2006 Jidáš byl ufon… a jiné příběhy, 2016 Projekt Gilgameš, 2019 Největší lekce dona Quijota: Důmyslný derviš Sidi Hamet Ibn Enheli a voják Saavedra, 2021 Gablonz / Jablonec, 2022 Alžírské arabesky, 2023 Externí odkazy Štěpán Kučera Čeští spisovatelé 21. století Narození v roce 1985 Narození 13. února Narození v Jablonci nad Nisou Žijící lidé Muži"} {"instruction": "Generate a random array of size n in Python.", "input": "Size of array: 5", "output": "import numpy as np size = 5 # Create an array of size 5 arr = np.random.randint(100, size = (size)) print (arr)"} {"instruction": "Create a Machine Learning algorithm in Python that predicts the price of a car based on its features.", "input": "Not applicable", "output": "import pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import RandomForestRegressor\n\n# Read the data\ndata = pd.read_csv('cars.csv')\n\n# Split the data in features (X) and labels (y)\nX = data.drop('price', axis=1)\ny = data['price']\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) \n\n# Train the model\nmodel = RandomForestRegressor()\nmodel.fit(X_train, y_train)\n\n# Predict the price of the cars in the test set\ny_pred = model.predict(X_test)\n\n# Compare the predictions with the actual values\nfor prediction, actual in zip(y_pred, y_test):\n print(prediction, actual)"} {"instruction": "Improve the following Python code by making it faster and more efficient.", "input": "def multiply(a, b):\n result = 0\n for x in range(a):\n result += b\n return result", "output": "def multiply(a, b):\n result = 0\n while a != 0:\n if a & 1:\n result += b\n a >>= 1\n b <<= 1\n return result"} {"instruction": "Invert the given dictionary.", "input": "Dictionary: {'a': 1, 'b': 2, 'c':3}", "output": "Inverted dictionary: {1: 'a', 2: 'b', 3: 'c'}"} {"instruction": "Create a function in Python to construct a 3-dimensional array from two 2-dimensional arrays.", "input": "[[0, 0, 0], [1, 1, 1]]\n[[2, 2, 2], [3, 3, 3]]", "output": "def construct_3d_array(arr1, arr2):\n result = []\n for i in range(len(arr1)):\n sub_arr = []\n for j in range(len(arr1[i])):\n sub_arr.append([arr1[i][j], arr2[i][j]])\n result.append(sub_arr)\n return result\n\narr1 = [[0, 0, 0], [1, 1, 1]]\narr2 = [[2, 2, 2], [3, 3, 3]]\n\nprint(construct_3d_array(arr1, arr2))"} {"instruction": "Given an array of strings, build an algorithm in Python to determine the index of the element that contains the smallest number of characters.", "input": "[\"Hello\", \"World\", \"Python\", \"is\", \"Fun\"]", "output": "def min_length_index(arr):\n min = float('infinity')\n min_i = 0\n for i in range(len(arr)):\n if len(arr[i]) < min:\n min = len(arr[i])\n min_i = i\n return min_i\n\nprint(min_length_index([\"Hello\", \"World\", \"Python\", \"is\", \"Fun\"])) # 3"} {"instruction": "Generate a Python program to scrape the content of an HTTPS website and output the result.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup \n\n# make a get request to fetch the contents of the page\nr = requests.get('https://example.com')\n\n# parse the html content\nsoup = BeautifulSoup(r.content, 'html.parser')\n\n# print out the result\nprint(soup.prettify())"} {"instruction": "Using JavaScript, convert the following JSON object into a string.", "input": "JObj = { “name” : “John”, “age” : 42 }", "output": "const JString = JSON.stringify(JObj); console.log(JString); // { “name” : “John”, “age” : 42 }"} {"instruction": "Construct a database schema for a \"Products\" table.", "input": "", "output": "CREATE TABLE Products ( id INTEGER PRIMARY KEY AUTOINCREMENT, product_name TEXT NOT NULL, product_price REAL NOT NULL, product_image TEXT, product_description TEXT );"} {"instruction": "Create a program in Python that takes a URL as input and prints out all the links (href) that appear in the page.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = 'http://www.example.com'\n\nhtml = requests.get(url).text\nsoup = BeautifulSoup(html, 'html.parser')\n\nfor link in soup.find_all('a'):\n print(link.get('href'))"} {"instruction": "Explain the process of quicksort.", "input": "", "output": "Quicksort is a sorting algorithm that uses a divide-and-conquer approach to sort a given array. The process starts by selecting a pivot which is used to partition the array into two subarrays: one containing elements smaller than the pivot, and the other containing elements larger than the pivot. The same process is then repeated for the subarrays recursively until the array is sorted."} {"text": "[CS Wikipedia] Pala (přítok Minije)\n\nPala je řeka na západě Litvy (Telšiaiský kraj). Je dlouhá 20,2 km. Řeka teče směrem jihozápadním, od Tverského lesa směrem severozápadním, později severním. Vlévá se do řeky Minija 172,3 km od jejího ústí jako levý přítok. Průběh toku Horní tok začíná velikým obloukem obkružujícím ves Užpelai (na cestě Tverai – Giliogiris, neplést se stejnojmennou vsí na dolním toku) na pravém břehu. Most cesty Medingėnai – Rietavas. Na levém břehu ves Patyris, na pravém Užduobulis, do Minije se vlévá za vsí Užpeliai (na cestě Medingėnai – Plungė, neplést se stejnojmennou vsí na horním toku). Přítoky Do Paly byl sveden původně horní tok řeky Aitra nyní pod jménem Aitralė. Levé: Pravé: Reference Literatura Lietuvos autokelių atlasas (Autoatlas Litvy) 1:200 000 : Jāņa Sēta Map publishers Ltd. : Rīga, Lotyšsko, 2008 – 222 stran Externí odkazy Řeky v Litvě Vodstvo Telšiaiského kraje Povodí Němenu Povodí Minije"} {"instruction": "Generate a Python code to multiply all the items of a given list.", "input": "[2, 3, 4]", "output": "product = 1\nfor value in [2, 3, 4]:\n product *= value\nprint(product)"} {"instruction": "Suggest a python code to merge two sorted list and maintain the order", "input": "list1 = [1, 5, 11, 15]\nlist2 = [3, 10, 12]", "output": "def merge_sorted_lists(list1, list2):\n result = []\n while len(list1) > 0 and len(list2) > 0:\n if list1[0] < list2[0]:\n result.append(list1.pop(0))\n else:\n result.append(list2.pop(0))\n\n if len(list1) > 0:\n result += list1\n else:\n result += list2\n\n return result\n\nlist1 = [1, 5, 11, 15]\nlist2 = [3, 10, 12]\n\nprint(merge_sorted_lists(list1, list2))"} {"instruction": "Suggest a code to execute when a condition is met.", "input": "if volume > 10:", "output": "if volume > 10: # Do something print(\"Volume is greater than 10\")"} {"text": "[EN Wikipedia] Gmina Szczawin Kościelny\n\nGmina Szczawin Kościelny (1943-1945, German Schauenkirch) is a rural gmina (administrative district) in Gostynin County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Szczawin Kościelny, which lies approximately south-east of Gostynin and west of Warsaw. The gmina covers an area of , and as of 2022 its total population is 4,830. Villages Gmina Szczawin Kościelny contains the villages and settlements of Adamów, Annopol, Białka, Budki Suserskie, Budy Kaleńskie, Dobrów, Gołas, Gorzewo-Kolonia, Helenów, Helenów Słupski, Helenów Trębski, Holendry Dobrowskie, Janki, Jesionka, Józefków, Kaleń, Kamieniec, Krzymów, Kunki, Lubieniek, Mellerów, Misiadla, Modrzew, Mościska, Osowia, Pieryszew, Przychód, Reszki, Sewerynów, Słup, Smolenta, Staw, Stefanów Suserski, Suserz, Swoboda, Szczawin Borowy-Kolonia, Szczawin Borowy-Wieś, Szczawin Kościelny, Szczawinek, Teodorów, Trębki, Tuliska, Waliszew, Witoldów, Wola Trębska and Wola Trębska-Parcel. Neighbouring gminas Gmina Szczawin Kościelny is bordered by the gminas of Gąbin, Gostynin, Łąck, Oporów, Pacyna and Strzelce. References Polish official population figures 2006 External links Szczawin Koscielny Gostynin County"} {"text": "[HI Wikipedia] मनोरंजन\n\nमनोरंजन एक ऐसी क्रिया है जिसमें सम्मिलित होने वाले को आनन्द आता है एवं मन शान्त होता हैं। मनोरंजन सीधे भाग लेकर हो सकता है या कुछ लोगों को कुछ करते हुए देखने से हो सकता है। मनोरंजन के साधन क्रेजी ज्ञान टेलिविज़न चलचित्र रेडियो नाटक नौटंकी संगीत नृत्य डिस्को हास्य रस गोष्ठी कवि सम्मेलन जादू सर्कस मेला खेल मनोरंजन"} {"instruction": "Create a Supplier model with a name, type, stock management, module identifier, and module data fields. The model should implement the ModuleInterface and ShuupModel. It should also have methods to get orderability errors, stock statuses, suppliable products, and adjust/update stock. Finally, define a SupplierLogEntry model using the define_log_model function.", "input": "", "output": "# -*- coding: utf-8 -*-\n# This file is part of Shuup.\n#\n# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.\n#\n# This source code is licensed under the AGPLv3 license found in the\n# LICENSE file in the root directory of this source tree.\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\nfrom enumfields import Enum, EnumIntegerField\nfrom jsonfield import JSONField\n\nfrom shuup.core.fields import InternalIdentifierField\nfrom shuup.core.modules import ModuleInterface\nfrom shuup.utils.analog import define_log_model\n\nfrom ._base import ShuupModel\n\n\nclass SupplierType(Enum):\n INTERNAL = 1\n EXTERNAL = 2\n\n class Labels:\n INTERNAL = _('internal')\n EXTERNAL = _('external')\n\n\n@python_2_unicode_compatible\nclass Supplier(ModuleInterface, ShuupModel):\n default_module_spec = \"shuup.core.suppliers:BaseSupplierModule\"\n module_provides_key = \"supplier_module\"\n\n identifier = InternalIdentifierField(unique=True)\n name = models.CharField(verbose_name=_(\"name\"), max_length=64)\n type = EnumIntegerField(SupplierType, verbose_name=_(\"supplier type\"), default=SupplierType.INTERNAL)\n stock_managed = models.BooleanField(verbose_name=_(\"stock managed\"), default=False)\n module_identifier = models.CharField(max_length=64, blank=True, verbose_name=_('module'))\n module_data = JSONField(blank=True, null=True, verbose_name=_(\"module data\"))\n\n def __str__(self):\n return self.name\n\n def get_orderability_errors(self, shop_product, quantity, customer):\n \"\"\"\n :param shop_product: Shop Product\n :type shop_product: shuup.core.models.ShopProduct\n :param quantity: Quantity to order\n :type quantity: decimal.Decimal\n :param contect: Ordering contact.\n :type contect: shuup.core.models.Contact\n :rtype: iterable[ValidationError]\n \"\"\"\n return self.module.get_orderability_errors(shop_product=shop_product, quantity=quantity, customer=customer)\n\n def get_stock_statuses(self, product_ids):\n \"\"\"\n :param product_ids: Iterable of product IDs\n :return: Dict of {product_id: ProductStockStatus}\n :rtype: dict[int, shuup.core.stocks.ProductStockStatus]\n \"\"\"\n return self.module.get_stock_statuses(product_ids)\n\n def get_stock_status(self, product_id):\n \"\"\"\n :param product_id: Product ID\n :type product_id: int\n :rtype"} {"instruction": "Output the 5th Fibonacci number.", "input": "", "output": "5"} {"text": "[EN Wikipedia] Taumona River\n\nThe Taumona River is a small river of the Manawatū-Whanganui region of New Zealand's North Island. It flows southwest from its origins west of Taumarunui to reach the Ohura River. See also List of rivers of New Zealand References Rivers of Manawatū-Whanganui Rivers of New Zealand"} {"instruction": "Create an array of 10 integers, starting from 0 and increasing with each element.", "input": "", "output": "my_array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]"} {"instruction": "Suggeste a completion of the following code:", "input": "def flatten(nested_list):", "output": "def flatten(nested_list): flat_list = [] for item in nested_list: if isinstance(item, list): flat_list.extend(flatten(item)) else: flat_list.append(item) return flat_list"} {"instruction": "Generate a program which accepts a sentence as an input and returns the total number of characters in it?", "input": "\"\"", "output": "# Python program to find number of characters in a sentence \n \n# Function to calculate number of characters \ndef find_char(s): \n return(len(s)) \n \n# Taking the sentence from the user \nstr = input(\"Enter a sentence: \") \n \n# Calling the function \ncount = find_char(str) \n \n# Printing the result \nprint(\"Number of characters:\", count)"} {"text": "[EN Wikipedia] Juho Reinvall\n\nJuho Reinvall (born 24 August 1988) is a Finnish judoka. He competed at the 2016 Summer Olympics in the men's 60 kg event, in which he was eliminated in the second round by Tsogtbaatar Tsend-Ochir. References External links 1988 births Living people Finnish male judoka Olympic judoka for Finland Judoka at the 2016 Summer Olympics European Games competitors for Finland Judoka at the 2015 European Games Place of birth missing (living people)"} {"instruction": "Read the provided string and print the number of vowels in it.", "input": "\"GPT-3 is an advanced language model\"", "output": "7"} {"instruction": "Create a program in Python that asks the user for a number, multiplies the number by 7, and then prints the result.", "input": "", "output": "num = int(input(\"Please enter a number: \"))\nprint(\"The result of multiplying your number by 7 is \" + str(num * 7))"} {"instruction": "Generate a SQL query to select all the columns from a table named 'department' where the department name is 'Marketing'.", "input": "", "output": "SELECT * FROM department WHERE department_name = 'Marketing';"} {"instruction": "Explain the purpose of a web browser.", "input": "", "output": "A web browser is a software application used to retrieve, render and traverse information on the World Wide Web. It uses Hypertext Transfer Protocol (HTTP) to request pages from from web servers, receive them, and display them in an organised way on our device. It also provides tools to allow users to traverse the web and access content such as email, videos, music, social networks, etc."} {"instruction": "Propose a fast sorting algorithm for a list of integers", "input": "", "output": "The QuickSort algorithm is a fast sorting algorithm for a list of integers. QuickSort is a divide and conquer algorithm, meaning it divides a list into smaller lists and then sorts and combines the lists. It starts by partitioning the input list around a pivot element, then recursively sorts the two partitions and recombines them. Its average time complexity is O(n log n) with a space complexity of O(n)."} {"instruction": "Modify the following Python code for calculating the factorial of a number.", "input": "def factorial(n):\n fact = 1\n for i in range(1,n+1):\n fact = fact*i\n return fact", "output": "def factorial(n):\n if n == 0:\n return 1\n else:\n fact = 1\n for i in range(1,n+1):\n fact = fact*i\n return fact"} {"instruction": "Create a GUI in Python with 4 buttons.", "input": "", "output": "import tkinter\n\nroot = tkinter.Tk()\nframe = tkinter.Frame(root)\nframe.pack()\n\nbutton1 = tkinter.Button(frame, text = \"Button 1\", fg = \"red\")\nbutton2 = tkinter.Button(frame, text = \"Button 2\", fg = \"blue\")\nbutton3 = tkinter.Button(frame, text = \"Button 3\", fg = \"green\")\nbutton4 = tkinter.Button(frame, text = \"Button 4\", fg = \"yellow\")\n\nbutton1.pack(side = tkinter.LEFT)\nbutton2.pack(side = tkinter.LEFT)\nbutton3.pack(side = tkinter.LEFT)\nbutton4.pack(side = tkinter.LEFT)\n\nroot.mainloop()"} {"instruction": "Create a Mastermind game in any language of your choice.", "input": "", "output": "#include #include #include #include using namespace std; int main() { srand(time(0)); //define random numbers to be guessed int max_limit = 6; vector ans; for (int i = 0; i < 4; i++) { ans.push_back((rand() % max_limit) + 1); } int attempts = 0; while (true) { //Take input from user int num; int i = 0; cout << \"Guess a 4 digit number: \"; while (i < 4) { cin >> num; ans[i] = num; i++; } //Check input against random answer int correctplace = 0; int wrongplace = 0; for (i = 0; i < 4; i++) { int j = 0; while (j < 4) { if (ans[i] == ans[j] && i == j) correctplace++; else if (ans[i] == ans[j]) wrongplace++; j++; } } attempts++; if (correctplace == 4) { cout << \"You win in \" << attempts << \" attempts.\"; break; } else cout << \"Wrong place: \" << wrongplace << \" Correct place: \" << correctplace << endl; } return 0; }"} {"text": "[HI Wikipedia] कुम्भ मेला\n\nकुम्भ मेला हिन्दू धर्म का एक महत्वपूर्ण पर्व है, जिसमें करोड़ों श्रद्धालु कुम्भ पर्व स्थल प्रयाग, हरिद्वार, उज्जैन और नासिक में एकत्र होते हैं और नदी में स्नान करते हैं। इनमें से प्रत्येक स्थान पर प्रति १२वें वर्ष तथा प्रयाग में दो कुम्भ पर्वों के बीच छह वर्ष के अन्तराल में अर्धकुम्भ भी होता है। २०१३ का कुम्भ प्रयाग में हुआ था। फिर २०१९ में प्रयाग में अर्धकुम्भ मेले का आयोजन हुआ था। खगोल गणनाओं के अनुसार यह मेला मकर संक्रान्ति के दिन प्रारम्भ होता है, जब सूर्य और चन्द्रमा, वृश्चिक राशि में और वृहस्पति, मेष राशि में प्रवेश करते हैं। मकर संक्रान्ति के होने वाले इस योग को \"कुम्भ स्नान-योग\" कहते हैं और इस दिन को विशेष मंगलकारी माना जाता है, क्योंकि ऐसा माना जाता है कि इस दिन पृथ्वी से उच्च लोकों के द्वार इस दिन खुलते हैं और इस प्रकार इस दिन स्नान करने से आत्मा को उच्च लोकों की प्राप्ति सहजता से हो जाती है। यहाँ स्नान करना साक्षात् स्वर्ग दर्शन माना जाता है। इसका हिन्दू धर्म मे बहुत अधिक महत्व है। 'कुम्भ' का शाब्दिक अर्थ “घड़ा, सुराही, बर्तन” है। यह वैदिक ग्रन्थों में पाया जाता है। इसका अर्थ, अक्सर पानी के विषय में या पौराणिक कथाओं में अमरता (अमृत) के बारे में बताया जाता है। मेला शब्द का अर्थ है, किसी एक स्थान पर मिलना, एक साथ चलना, सभा में या फिर विशेष रूप से सामुदायिक उत्सव में उपस्थित होना। यह शब्द ऋग्वेद और अन्य प्राचीन हिन्दू ग्रन्थों में भी पाया जाता है। इस प्रकार, कुम्भ मेले का अर्थ है “अमरत्व का मेला” है। ज्योतिषीय महत्व पौराणिक विश्वास जो कुछ भी हो, ज्योतिषियों के अनुसार कुम्भ का असाधारण महत्व बृहस्पति के कुम्भ राशि में प्रवेश तथा सूर्य के मेष राशि में प्रवेश के साथ जुड़ा है। ग्रहों की स्थिति हरिद्वार से बहती गंगा के किनारे पर स्थित हर की पौड़ी स्थान पर गंगा जल को औषधिकृत करती है तथा उन दिनों यह अमृतमय हो जाती है। यही कारण है ‍कि अपनी अन्तरात्मा की शुद्धि हेतु पवित्र स्नान करने लाखों श्रद्धालु यहाँ आते हैं। आध्यात्मिक दृष्टि से अर्ध कुम्भ के काल में ग्रहों की स्थिति एकाग्रता तथा ध्यान साधना के लिए उत्कृष्ट होती है। हालाँकि सभी हिन्दू त्योहार समान श्रद्धा और भक्ति के साथ मनाए जाते है, पर यहाँ अर्ध कुम्भ तथा कुम्भ मेले के लिए आने वाले पर्यटकों की संख्या सबसे अधिक होती है। पौराणिक कथाएँ कुम्भ पर्व के आयोजन को लेकर दो-तीन पौराणिक कथाएँ प्रचलित हैं जिनमें से सर्वाधिक मान्य कथा देव-दानवों द्वारा समुद्र मन्थन से प्राप्त अमृत कुम्भ से अमृत बूँदें गिरने को लेकर है। इस कथा के अनुसार महर्षि दुर्वासा के शाप के कारण जब इन्द्र और अन्य देवता कमजोर हो गए तो दैत्यों ने देवताओं पर आक्रमण कर उन्हें परास्त कर दिया। तब सब देवता मिलकर भगवान विष्णु के पास गए और उन्हे सारा वृतान्त सुनाया। तब भगवान विष्णु ने उन्हे दैत्यों के साथ मिलकर क्षीरसागर का मन्थन करके अमृत निकालने की सलाह दी। भगवान विष्णु के ऐसा कहने पर सम्पूर्ण देवता दैत्यों के साथ सन्धि करके अमृत निकालने के यत्न में लग गए। अमृत कुम्भ के निकलते ही देवताओं के इशारे से इन्द्रपुत्र जयन्त अमृत-कलश को लेकर आकाश में उड़ गया। उसके बाद दैत्यगुरु शुक्राचार्य के आदेशानुसार दैत्यों ने अमृत को वापस लेने के लिए जयन्त का पीछा…"} {"instruction": "Change this code to print the reversed version of a string.", "input": "string s = \"Hello World!\";", "output": "string s = \"Hello World!\"; reverse(s.begin(), s.end()); cout << s; // Outputs: !dlroW olleH"} {"instruction": "Design an algorithm that can efficiently search for an element in a given sorted array", "input": "", "output": "def binary_search(arr, x): start = 0 end = len(arr) - 1 while start <= end: mid = start + (end - start)//2 if arr[mid] == x: return mid elif arr[mid] < x: start = mid + 1 else: end = mid - 1 return -1"} {"instruction": "Create a Python program to render a grid of numbers and letters.", "input": "Not applicable", "output": "def print_grid(rows, columns):\n for i in range(rows):\n for j in range(columns):\n print(chr(i*j+65), end=' ')\n print('\\n')\n\nprint_grid(5,5)\n\n#Output:\nA B C D E \nA C E G I \nA F K P U \nA I P W E \nA N U E N"} {"instruction": "Create a Deep Learning Program in Python to Predict Stock Price.", "input": "", "output": "from keras.models import Sequential\nfrom keras.layers import Dense\nfrom keras.layers import LSTM\nfrom keras.layers import Dropout\nimport numpy as np\n\n# define constants\ntime_steps = 60\nbatch_size = 32\n\n# build the model\nmodel = Sequential()\nmodel.add(LSTM(units=50, return_sequences=True, input_shape=(time_steps, 1)))\nmodel.add(Dropout(0.2))\n\nmodel.add(LSTM(units=50, return_sequences=True))\nmodel.add(Dropout(0.2))\n\nmodel.add(LSTM(units=50))\nmodel.add(Dropout(0.2))\n\nmodel.add(Dense(units=1))\n\nmodel.compile(optimizer='adam', loss='mean_squared_error')\n\n# read the data \ndataset = np.loadtxt('data.csv', delimiter=',')\n\ndata = dataset[:, 0:1]\n\n# create train and test data\nx_train = data[:int(len(data)*0.8)]\nx_test = data[int(len(data)*0.8):]\n\n# reshape the data for input format\nx_train = np.reshape(x_train, (x_train.shape[0], time_steps, 1))\nx_test = np.reshape(x_test, (x_test.shape[0], time_steps, 1))\n\n# train the model\nmodel.fit(x_train, x_train, epochs=50, batch_size=batch_size, validation_data=(x_test, x_test))"} {"instruction": "Write a Python program to classify the set of strings into two categories based on their length.", "input": "strings = ['short', 'longer_string', 'medium_length', 'very_long_string']", "output": "def classify_strings(strings):\n # initialize lists for each classification\n short = []\n long = []\n # classify each string\n for s in strings:\n if len(s) <= 6:\n short.append(s)\n else:\n long.append(s)\n # return classified lists\n return [short, long]\n\nif __name__ == '__main__':\n strings = ['short', 'longer_string', 'medium_length', 'very_long_string']\n print(classify_strings(strings))"} {"text": "[CS Wikipedia] Vladimir Šilykovskij\n\nVladimir Sergejevič Šilykovskij (; 3. dubna 1933 Vladimir – 7. dubna 1987 Moskva) byl sovětský rychlobruslař. Na mezinárodní scéně se poprvé představil v roce 1956, kdy startoval na Zimních olympijských hrách (10 000 m – 16. místo). Největších úspěchů dosáhl v sezóně 1958/1959, kdy na Mistrovství Evropy i Mistrovství světa získal stříbrné medaile. Zúčastnil se také ZOH 1960 (10 000 m – 20. místo). Poslední závody absolvoval v roce 1962. Externí odkazy Sovětští rychlobruslaři Sovětští olympionici Narození 3. dubna Narození v roce 1933 Úmrtí 7. dubna Úmrtí v roce 1987 Muži"} {"instruction": "Classify the following words as noun, verb, adverb or adjective.", "input": "Words: slowly, frog, kick", "output": "Adverb: slowly Noun: frog Verb: kick"} {"text": "[CS Wikipedia] Megumi Ogata\n\nMegumi Ogata (, Ogata Megumi) (6. června, 1965 v Tokiu) je J-popová zpěvačka a hlasová herečka. Jako zpěvačka působí pod pseudonymem em:óu. Chodila na univerzitu Tókai, ale odešla z ní kvůli nedostatku zájmu. V roce 2004 se podruhé vdala. Megumi měří 168 cm a má krevní skupinu B. Vybrané role Významné role jsou zvýrazněny. Jú jú hakušo jako Kurama, Šúichi Minamino, Masaruova matka Cardcaptor Sakura (Jukito Cukiširo, Jue) Á Megami-sama jako Keiiči Morisato Sailor Moon jako Haruka Tenó, Sailor Uranus Naruto jako Cunade Neon Genesis Evangelion jako Šindži Ikari Bleach jako Tia Harribel Magic Knight Rayearth jako princezna Esmeraude, Eagle Vision Jú☆Gi☆Ó jako Júgi Mutó Kjúkecuki Miju'' jako Macukaze, Reiha Reference Externí odkazy Japonské zpěvačky Japonští dabéři Narození 6. června Narození v roce 1965 Narození v Tokiu Žijící lidé Ženy"} {"text": "[DE Wikipedia] Kleinstböckchen\n\nDas Kleinstböckchen (Neotragus pygmaeus), manchmal auch Zwergböckchen genannt, ist eine Antilopenart, die zu den kleinsten Vertretern der Hornträger gehört. Sie bewohnt die westafrikanischen Regenwälder zwischen Sierra Leone und Ghana. Über die Lebensweise ist nur wenig bekannt. Die Ersterwähnung erfolgte im Jahr 1758, der Bestand wird als nicht bedroht angesehen. Merkmale Mit einer Kopf-Rumpf-Länge von 38 bis 51 cm zuzüglich eines 5 bis 8 cm langen Schwanzes, einer Schulterhöhe von 24 bis 26 cm und einem Gewicht von 2 bis 3 kg stellt das Kleinstböckchen den kleinsten der heutigen Vertreter der Hornträger dar; unter den Paarhufern sind nur die Hirschferkel noch kleiner. Der Körperbau ist relativ kompakt, die Hinterbeine sind gegenüber den Vorderbeinen ausgesprochen lang. Typisch erscheint auch der aufgewölbte Rücken, der in der etwa in der Mitte seinen höchsten Punkt erreicht. Allerdings kann dies nur im Ruhestand deutlich erkannt werden, da er beim Laufen etwas abflacht. Das Fell ist weich und die Haare stehen vor allem am Rumpf sehr dicht. Der Rücken, die Beinaußenseiten und der Kopf zeigen eine rot- bis goldenbraune Färbung, die zu den Seiten hin aufhellt, der Bauch und die Beininnenseiten sind weiß gefärbt. Im Nacken zeichnet sich ein breites, gelblichbraunes Band ab, das sich deutlich von der Färbung des Halses abhebt. Der Schwanz wird meist dicht am Körper getragen. Er ist von weißer Farbe und besitzt einen Pinsel am Ende, die Basis ist dunkel gefärbt. Dicht oberhalb der Hufe können helle Flecken ausgebildet sein. Eine besondere Gesichtszeichnung liegt nicht vor. Die Augen sind groß, die Ohren gerundet und an der Basis weißfleckig. Die Voraugendrüsen wirken äußerlich eher unauffällig und werden von einem kurzhaarigen Hautfeld markiert. Subdermal bilden sie aber einen großen, pflaumenförmigen Drüsenkörper, der das dunkle Sekret enthält. Hörner sind nur beim Männchen ausgebildet und werden zwischen 1,8 und 3,5 cm lang. Sie sind nach hinten gerichtet und folgen der Nasen- und Stirnlinie. Ihr Querschnitt ist konisch, ihre Oberfläche glatt und von schwarzer Färbung. Die Schädellänge variiert zwischen 9,9 und 10,8 cm. Verbreitung Das Kleinstböckchen ist im westlichen Afrika verbreitet und kommt vom südlichen Guinea über Sierra Leone bis nach Ghana etwa westlich des Volta vor. Es bevorzugt tropische Regenwälder mit dichtem Untergrundbewuchs, wobei die Art häufiger in Wald-Savannen-Mischlandschaften anzutreffen ist. Zudem wurde sie auch in kleinen Waldflecken in landwirtschaftlich genutzten Gebieten beobachtet. Lebensweise Über die Lebensweise des Kleinstböckchens ist recht wenig bekannt. Es ist nachtaktiv, kann in dichter Vegetation aber auch tagsüber aktiv sein. Männchen und Weibchen bilden monogame Paare, die einzelne Territorien okkupieren, die…"} {"instruction": "What will be the output of this code snippet?", "input": "a = [1, 2, 3, 4, 5] b = [x**2 for x in a] print(b)", "output": "[1, 4, 9, 16, 25]"} {"text": "[DE Wikipedia] Konzentrationselement\n\nEin Konzentrationselement (auch Konzentrationszelle) ist eine galvanische Zelle, in der aufgrund chemischer Reaktionen ähnlich einer Batterie eine nutzbare elektrische Spannung entsteht. Das Besondere an einer solchen Konzentrationskette ist, dass sie aus zwei Halbzellen besteht, die gleichartig aufgebaut sind und sich nur in der Elektrolyt­konzentration unterscheiden. Die beiden Elektroden bestehen also aus dem gleichen Material und die Elektrolyte enthalten die gleichen Ionensorten. Die chemische Reaktion in der einen Halbzelle ist daher bei Stromfluss die Umkehrung der Reaktion in der anderen. Da die beiden Halbzellen jedoch die Tendenz haben, die Konzentrationen anzugleichen, entsteht dennoch eine messbare Spannung. Die Konzentrationskette dient heute vor allem zu Demonstrationszwecken, da man mit ihr die Konzentrationsabhängigkeit des Elektrodenpotentials bzw. des chemischen Potentials qualitativ zeigen und quantitativ überprüfen kann. Dadurch kann man sie nutzen, um die Nernst-Gleichung herzuleiten. Beispiel: Metall-Auflösung und -Abscheidung Häufig werden Konzentrationszellen benutzt, bei denen Metallelektroden in Lösungen eines Salzes desselben Metalls tauchen, z. B. Zinkelektroden in Zinksalzlösungen, Eisenelektroden in Eisenchloridlösungen oder Kupferelektroden in Kupfersulfatlösung. Dann wird in der einen Zelle das Metall in Lösung gehen, in der anderen wird es wieder abgeschieden. Da sich beim Stromfluss die Konzentrationen angleichen, wird sich das Metall in der Halbzelle mit dem verdünnten Elektrolyten lösen und in derjenigen mit dem konzentrierteren abscheiden. Schließt man die Zelle kurz, so dass Strom fließen kann und die Reaktionen stattfinden können, wird Folgendes ablaufen: Auf der Seite mit der verdünnteren Lösung wird das Metall der Elektrode unter Abgabe von Elektronen zu Metallionen oxidiert; es geht als Ionen in die verdünnte Lösung über und erhöht die Konzentration in der Halbzelle. Aufgrund der Elektronenabgabe ist dies die negative Elektrode, der Minuspol. Da hier eine Oxidation erfolgt, ist es definitionsgemäß die Anode. Wie bei den Batterien ist also hier der Minuspol die Anode. Die freiwerdenden Elektronen wandern über einen elektrischen Leiter zur anderen Elektrode. Dort reduzieren sie die in der konzentrierten Lösung vorhandenen Metallionen zu elementarem Metall, das sich an der Elektrode anlagert. Aufgrund der Reduktion ist dies die Kathode. Da die Metallionen eine positive Ladung mitbringen, wenn sie sich anlagern, ist dies der Pluspol. Die Konzentration dieser Halbzelle sinkt. Der Konzentrationsausgleich zwischen den beiden Halbzellen erfolgt über eine Salzbrücke. Diese Salzbrücke ist so konzipiert, dass sie nach Möglichkeit weder Elektronen, noch die positiv geladenen Metallionen (Kationen) hindurchlässt. Die…"} {"instruction": "Find the minimum among a list of integers.", "input": "[1, 15, 22, -5, 87]", "output": "def find_min(numbers): min_value = numbers[0] for n in numbers: if n < min_value: min_value = n return min_value if __name__ == '__main__': numbers = [1, 15, 22, -5, 87] print(find_min(numbers))"} {"instruction": "Generate a list of integers in Python with no duplicates.", "input": "", "output": "def generate_unique_list(n): \n res = [] \n \n for i in range(n): \n res.append(random.randint(1, n)) \n \n # ensure no duplicates occur\n while len(res) != len(set(res)): \n res.pop() \n res.append(random.randint(1, n)) \n \n return res"} {"instruction": "Using regex, search for all occurrences of the substring \"cat\" in the following string:", "input": "The dog ran away, but the cat stayed", "output": "The regular expression to search for all occurrences of the substring \"cat\" in the string is /\\bcat\\b/g."} {"instruction": "Write an algorithm in Python to convert a given binary string to decimal number.", "input": "\"11010\"", "output": "def bin2dec(binary):\n decimal, i = 0, 0\n while binary != 0:\n dec = binary % 10\n decimal = decimal + dec * pow(2, i)\n binary = binary//10\n i += 1\n return decimal\n\nbinary = 11010\nprint(bin2dec(binary))"} {"instruction": "Generate a Python program to fetch data from a website.", "input": "", "output": "import requests\n\ndef main():\n url = 'https://www.example.com'\n \n r = requests.get(url)\n if r.status_code == 200:\n content = r.content\n print(content)\n else:\n print(\"Failed to fetch data.\")\n\nif __name__ == \"__main__\":\n main()"} {"instruction": "Update a given line of code to make a function return 'True' if both values are equal.", "input": "def compare(val1, val2): if val1 == val2:", "output": "def compare(val1, val2): if val1 == val2: return True"} {"text": "[CS Wikipedia] Marc Almond\n\nMarc Almond, rodným jménem Peter Mark Sinclear Almond, (* 9. července 1957 Southport, Spojené království) je anglický zpěvák, skladatel a herec. Ve své hudbě míchal new wave se synthpopem, popem a dancem. Proslavil se zejména členstvím ve vlivné kapele Soft Cell, se kterým měl i několik hitů. Kapela ovlivnila hudebníky jako Pulp, Blur, Pet Shop Boys či Divine Comedy. On sám se nechal ovlivnit hudbou, kterou poslouchali rodiče. Mezi tuto hudbu patří Chubby Checker, Eartha Kitt či Dave Brubeck. Později už jako teenager, když poslouchal Radio Luxembourg, jeho ovlivnitelé byli Marc Bolan, Roxy Music, David Bowie, New York Dolls, Brian Eno, Lou Reed a Alice Cooper. V roce 1999 vstoupil do Církve Satanovy. Satanská bible ho rovněž ovlivnila. V roce 1999 Marc Almond vydal knižně svou biografii nazvanou tained Life. Zde popisuje svůj intimní život, svoji sexuální orientaci (Almond je gay) a také drogovou závislost, kvůli které musel být hospitalizován v roce 1994. Diskografie Soft Cell 1981 – Non–Stop Erotic Cabaret 1982 – Non–Stop Ecstatic Dancing 1983 – The Art Of Falling Apart 1984 – This Last Night... In Sodom 2002 – Cruelty Without Beauty Kompilace 1986 – The Singles 1991 – Memorabilia: The Singles 1994 – Down In The Subway 1996 – Say Hello To Soft Cell 1999 – The Twelve Inch Singles 2002 – The Very Best Of Soft Cell 2003 – Live 2003 – Soft Cell At The BBC 2005 – The Bedsit Tapes – Early/Rare Demos 1978–1982 2006 – Demo Non Stop Marc And The Mambas 1983 – Untitled 1984 – Torment And Toreros 1984 – Bite Black And Blues (mini LP) Marc Almond 1984 – Vermin In Ermine 1985 – Stories Of Johnny 1986 – Violent Silence (mini LP) 1986 – A Woman's Story (mini LP) 1987 – Flesh Volcano / Slut (mini LP z Foetus) 1987 – Mother Fist And Her Five Daughters 1988 – The Stars We Are 1989 – Jacques 1990 – Enchanted 1991 – Tenement Symphony 1993 – Absinthe: The French Album 1996 – Fantastic Star 1999 – Open All Night 2001 – Stranger Things 2003 – Heart On Snow 2007 – Stardom Road 2009 – Orpheus in Exile 2010 – Varieté 2011 – Feasting with Panthers 2014 – The Tyburn Tree 2014 – The Dancing Marquis 2014 – Ten Plagues - A Song Cycle 2015 – The Velvet Trail 2015 – Against Nature 2016 – Silver City Ride 2017 – Shadows and Reflections 2018 – A Lovely Life to Live 2020 – Chaos and a Dancing Star Kompilace 1987 – Singles 1984–1987 1992 – A Virgin's Tale Volume I 1992 – A Virgin's Tale Volume II 1993 – Twelve Years Of Tears (Live At The Royal Albert Hall) 1995 – Treasure Box 1998 – Marc Almond & La Magia Live In Concert 2000 – Liverpool Philharmonic Hall 2001 – Live At The Union Chapel 2002 – Little Rough Rhinestones Volume I 2003 – The Willing Sinner 2003 – In Session Volume I 2003 – In Session Volume II 2006 – Little Rough Rhinestones Volume II 2017 – Hits & Pieces Externí odkazy…"} {"instruction": "Design a JavaScript function that will accept two numbers and return their sum.", "input": "", "output": "function add(a, b) { return a + b; }"} {"instruction": "Create a class in Python that has five methods:", "input": "", "output": "class MyClass:\n def __init__(self):\n pass\n\n def method1(self):\n pass\n\n def method2(self):\n pass\n\n def method3(self):\n pass\n\n def method4(self):\n pass\n\n def method5(self):\n pass"} {"instruction": "Provide the output from executing the given program.", "input": "matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ] for row in matrix: print(row[1])", "output": "2 5 8"} {"instruction": "Generate a predictive model using Python that can accurately determine the average temperature in a city according to previous temperature records.", "input": "Temperature data for the previous 5 years.", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\n\ndata = pd.read_csv(\"temperature_data.csv\")\nX = data[[\"Year\", \"Month\", \"Day\"]]\ny = data[\"Temperature\"]\n\nmodel = LinearRegression()\nmodel.fit(X, y)\n\n#The model is now created and we can use it to make predictions"} {"instruction": "Generate a numerical sequence in a given range using Python.", "input": "start = 3\nend = 15", "output": "def generate_sequence(start, end):\n nums = []\n for i in range(start, end+1):\n nums.append(i)\n return nums\n\nnums = generate_sequence(3, 15)\nprint(nums) // [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]"} {"instruction": "Edit the following Python code to print out “The answer is X”", "input": "print(\"X + 5 = 10\")", "output": "print(\"The answer is \" + str(10 - 5))"} {"instruction": "What is the value of variable \"a\" at the end of the code?", "input": "a = 0 for i in range (10): a += i", "output": "45"} {"instruction": "Write a code snippet to declare two string variables.", "input": "", "output": "string1 = \"a\" string2 = \"b\""} {"instruction": "Create a function that returns a randomly selected element from a list.", "input": "list = [1, 2, 3, 4, 5]", "output": "import random def get_random_element(list): \"\"\" A function to return a randomly selected element from a list. Args: list (list): a list Returns: element (int): a randomly selected element \"\"\" index = random.randint(0, len(list)-1) element = list[index] return element if __name__ == '__main__': list = [1, 2, 3, 4, 5] print(get_random_element(list))"} {"instruction": "Create a function to check an array of strings and return a list of strings that have length of 5.", "input": "[\"Ironman\", \"Spiderman\", \"Hulk\", \"Captain America\", \"Thor\"]", "output": "def filter_5_length(arr): res = [] for string in arr: if len(string) == 5: res.append(string) return res"} {"instruction": "Write a Python program to print the following pattern using a \"for loop\".", "input": "", "output": "for i in range(1,6):\n for j in range(1,i+1):\n print('*',end='')\n print()\n\nOutput:\n*\n**\n***\n****\n*****"} {"instruction": "Find the closest match in a given string using the Levenshtein edit distance.", "input": "String: helpful Closest match: healthful", "output": "editDistance(helpful, healthful) = 2"} {"instruction": "Develop a function in Python to remove all the whitespaces from a given string.", "input": "", "output": "def remove_whitespace(s):\n return s.replace(\" \", \"\")"} {"instruction": "Create a python script to split a string into its word components.", "input": "String: Hello,World!", "output": "def split_words(s): \n words = s.split(\" \") \n return words \ns = \"Hello,World!\"\nwords = split_words(s) \nprint(words)"} {"instruction": "Design an algorithm in Python which takes an array as an input and sorts them in ascending order using selection sort.", "input": "[76, 25, 16, 15, 88]", "output": "def selection_sort(arr): \n\tfor i in range(len(arr)): \n\t\tmin_idx = i \n\t\tfor j in range(i+1, len(arr)): \n\t\t\tif arr[min_idx] > arr[j]: \n\t\t\t\tmin_idx = j \n\t\tarr[i], arr[min_idx] = arr[min_idx], arr[i]\n\narr = [76, 25, 16, 15, 88]\nselection_sort(arr)\nprint(\"Sorted array:\", arr) # [15, 16, 25, 76, 88]"} {"instruction": "Write a script in Python to generate a dictionary of words from a given string.", "input": "def words_dict(string):", "output": "def words_dict(string):\n \"\"\"This function returns a dictionary with words as keys and their count as values.\"\"\"\n words = string.split()\n word_dict = {}\n \n for word in words:\n if word in word_dict:\n word_dict[word] += 1\n else: \n word_dict[word] = 1\n \n return word_dict"} {"text": "[EN Wikipedia] Abjad\n\nAn abjad (, ; also abgad) is a writing system in which only consonants are represented, leaving vowel sounds to be inferred by the reader. This contrasts with alphabets, which provide graphemes for both consonants and vowels. The term was introduced in 1990 by Peter T. Daniels. Other terms for the same concept include: partial phonemic script, segmentally linear defective phonographic script, consonantary, consonant writing, and consonantal alphabet. Impure abjads represent vowels with either optional diacritics, a limited number of distinct vowel glyphs, or both. Etymology The name abjad is based on the Arabic alphabet's first (in its original order) four letters—corresponding to a, b, j, and d—to replace the more common terms \"consonantary\" and \"consonantal alphabet\", in describing the family of scripts classified as \"West Semitic\". Similar to other semitic languages such as Phoenician, Hebrew and Semitic proto-alphabets: specifically, aleph, bet, gimel, dalet. Terminology According to the formulations of Peter T. Daniels, abjads differ from alphabets in that only consonants, not vowels, are represented among the basic graphemes. Abjads differ from abugidas, another category defined by Daniels, in that in abjads, the vowel sound is implied by phonology, and where vowel marks exist for the system, such as nikkud for Hebrew and ḥarakāt for Arabic, their use is optional and not the dominant (or literate) form. Abugidas mark all vowels (other than the \"inherent\" vowel) with a diacritic, a minor attachment to the letter, a standalone glyph, or (in Canadian Aboriginal syllabics) by rotation of the letter. Some abugidas use a special symbol to suppress the inherent vowel so that the consonant alone can be properly represented. In a syllabary, a grapheme denotes a complete syllable, that is, either a lone vowel sound or a combination of a vowel sound with one or more consonant sounds. The contrast of abjad versus alphabet has been rejected by other scholars because abjad is also used as a term for the Arabic numeral system. Also, it may be taken as suggesting that consonantal alphabets, in contrast to e.g. the Greek alphabet, were not yet true alphabets. Florian Coulmas, a critic of Daniels and of the abjad terminology, argues that this terminology can confuse alphabets with \"transcription systems\", and that there is no reason to relegate the Hebrew, Aramaic or Phoenician alphabets to second-class status as an \"incomplete alphabet\". However, Daniels's terminology has found acceptance in the linguistic community. Origins The first abjad to gain widespread usage was the Phoenician abjad. Unlike other contemporary scripts, such as cuneiform and Egyptian hieroglyphs, the Phoenician script consisted of only a few dozen symbols. This made the script easy to…"} {"text": "[HI Wikipedia] पणजी\n\nपणजी (Panaji) भारत के गोवा राज्य की राजधानी और उत्तर गोवा ज़िले का मुख्यालय है। प्रशासनिक रूप से यह तिस्वाड़ी तालुका में स्थित है। पणजी मांडवी नदी के ज्वारनदीमुख पर बसा हुआ है। पणजी वास्को द गामा और मडगाँव के बाद गोवा का सबसे बड़ तीसरा शहर है। विवरण पणजी मांडोवी नदी के बाएँ किनारे पर एक छोटे और आकर्षक शहर है। यह लैटिन शैली में निर्मित है और इसमें लाल छत वाले मकान, आधुनिक घर, अच्छी तरह से रखे उद्यान, मूर्तियाँ दिखती हैं। सड़को के किनारे गुलमोहर, अकेशिया और अन्य पेड़ हैं। मुख्य चौराहे, बारोक शैली की वास्तुकला, पहाड़ों पर लगी सीढ़ियाँ, उपलिका (कोबलस्टोन) से बनी सड़कें और गिरजे पणजी को एक पुर्तगाली माहौल देते हैं। शब्द-साधन पणजी का अर्थ है, \"वह भूमि जहाँ बाढ़ कभी नहीं होती\"। आरम्भ में पुर्तगाली नाम \"Pangim\" था, जिसे अंग्रेज़ी में पंजिम कहा जाता था। 1960 के दशक के बाद इसकी \"पणजी\" के रूप में वर्तनी की गई। स्थानीय कोंकणी भाषा में इसे पोणजिम (Ponnjim) कहा जाता है। इतिहास सन् 1843 तक यह एक छोटा सा गाँव था। उस समय गोवा और पुर्तगाली भारत की राजधानी उस स्थान पर थी जो आज पुराना गोवा कहलाता है। पुराने गोवा में प्लेग के प्रकोप से बहुत तबाही मची और 1843 में उपनिवेशी सरकार को उसे छोड़ना पड़ा। तब पणजी राजधानी बना। सन् 1961 में गोवा मुक्ति संग्राम के अंतर्गत भारत ने ऑपरेशन विजय नामक सैन्य हस्तक्षेप में गोवा से पुर्तगाली सरकार को हटा दिया और उसे फिर भारत में विलय कर लिया। 1961 से 1987 तक पणजी गोवा, दमन और दीव नामक केन्द्रशासित प्रदेश की राजधानी रहा। 1987 में गोवा को राज्य का दर्जा दिया गया और तक से पणजी उस राज्य की राजधानी है। एक नई विधानसभा परिसर का मार्च 2000 में मांडवी नदी के पार आल्तो पोरवोरिम में उद्घाटन किया गया। जनसांख्यिकी 2011 की भारत की जनगणना के अनुसार पणजी की कुल आबादी 114,405 थी, जिसमें से 52% पुरुष और 48% स्त्रियाँ थी। कुल साक्षरता दर 90.9% था - पुरुषों का 94.6% और स्त्रियों का 86.9%। आबादी का 9.6% अंश 7 वर्ष से कम के बच्चे थे। मौसम पणजी का मौसम गर्मी में गरम और जाड़ों में अच्छा है। गर्मियों में मार्च से मई तक तापमान 32 °सेल्सियस और सर्दियों में नवम्बर से फरवरी तक 31 °सेल्सियस से 23 °सेल्सियस के बीच रहता है। जून से सितम्बर में मॉनसून के दौरान भारी वर्षा और तेज़ हवाएँ चलती हैं। वार्षिक औसत वर्षण 2,932 मिलिमीटर (115.43 इंच) होती है। प्रमुख स्थान शहर के बीच में प्रासा दा इग्रेजा नामक चौक है, जिसमें नगर उद्यान है और पुर्तगाली बारोक शैली का गिरजा है, जिसका निर्माण मूल रूप से 1541 में हुआ था। अन्य पर्यटक आकर्षणों में पुनर्निर्मित सोलहवी शताब्दी का आदिलशाही महल, , इंस्टिट्यूट मेनेज़ेस ब्रगान्ज़ा, सेंट सेबैस्टेन का गिरजा और फोन्टेन्हास क्षेत्र है (जिसे लैटिन क्वारटर भी कहा जाता है)। समीप ही सागर से सटा मिरामर बालूतट (बीच) है। 21 अगस्त 2011 तक यहाँ डोन बोस्को ओरेटरी में जॉन बोस्को नामक ईसाई पादरी की अस्तियाँ रखी जाती थी। दादा वैद्य मार्ग पर महालक्ष्मी मन्दिर है, जिसका आदर सभी धर्मों के स्थानीय निवासी करते हैं और जो नगर का एक मुख्य आकर्षण है। फरवरी में यहाँ कार्निवाल मनाया जाता है, जिसमें एक भव्य परेड सड़कों पर निकाली जाती है। उसके बाद शिग्मो (होली) का पर्व आता है।…"} {"instruction": "Write a Java method that takes a string and prints out the number of occurrences of each letter in the string.", "input": "String = \"adda123de3f\"", "output": "public static void printLetterOccurrences(String str) { int[] alphabet = new int[26]; for (int i = 0; i < str.length(); i++) { if (str.charAt(i) >= 'a' && str.charAt(i) <= 'z') alphabet[str.charAt(i) - 'a']++; } for (int i = 0; i < 26; i++) { if (alphabet[i] > 0) { System.out.println(\"Number of Occurrences of \" + (char)(i + 'a') + \" is \" + alphabet[i]); } } } // Output // Number of Occurrences of a is 2 // Number of Occurrences of d is 2 // Number of Occurrences of e is 1 // Number of Occurrences of f is 1"} {"instruction": "Write a function in Python that takes three string arguments and returns a list where the elements are the concatenation of each pair of strings.", "input": "str1 = \"This\"\nstr2 = \"is\"\nstr3 = \"fun\"", "output": "def strJoin(str1, str2, str3):\n return [str1 + str2, str2 + str3, str1 + str3]"} {"instruction": "Create a SQL query to select the first 3 rows of a table named 'users'.", "input": "", "output": "SELECT * FROM users LIMIT 3;"} {"text": "[EN Wikipedia] 1957–58 Norwegian 1. Divisjon season\n\nThe 1957–58 Norwegian 1. Divisjon season was the 19th season of ice hockey in Norway. Eight teams participated in the league, and Gamlebyen won the championship. Regular season External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1957 in Norwegian sport 1958 in Norwegian sport"} {"instruction": "Develop a GUI application in Java to reverse a string.", "input": "User should be able to enter a string in the text field.", "output": "import java.awt.BorderLayout; import java.awt.event.*; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; class Reverse extends JFrame { JTextField inputTF; JTextField outputTF; JButton reverseBtn; Reverse() { inputTF = new JTextField(20); outputTF = new JTextField(20); outputTF.setEditable(false); reverseBtn = new JButton(\"Reverse\"); JPanel panel = new JPanel(); panel.add(inputTF); panel.add(reverseBtn); panel.add(outputTF); reverseBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { String userInput = inputTF.getText(); StringBuilder sb = new StringBuilder(); sb.append(userInput); sb = sb.reverse(); outputTF.setText(sb.toString()); } }); add(panel, BorderLayout.CENTER); setVisible(true); } }"} {"instruction": "Write a function that checks if a string is a palindrome or not.", "input": "string = \"ana\"", "output": "def is_palindrome(string): rev = ''.join(reversed(string)) if rev == string: return True else: return False"} {"text": "[CS Wikipedia] Pilot Pen Tennis 2008 – ženy\n\nTenisový turnaj na okruhu WTA Pilot Pen Tennis 2008 se konal ve dnech 15. - 23. srpna v americkém New Havenu venku na kurtech s tvrdým povrchem. Odměny činily 600,000 USD. Dvouhra Nasazení hráček Ceny a body do žebříčku Pavouk Finálová fáze Horní polovina Dolní polovina Čtyřhra Nasazení hráček Ceny a body do žebříčku Pavouk Související články Pilot Pen Tennis Pilot Pen Tennis 2008 - muži Reference Pavouk dvouhry a čtyřhry Externí odkazy Oficiální stránka turnaje WTA Tour 2008 Connecticut Open Tenis v USA v roce 2008"} {"instruction": "Design a web application that allows users to enter a text query and get results in an arranged format.", "input": "", "output": "Design a web application with a search bar and a structured view to display search results. The application should accept a text query from the user and use a search engine to retrieve relevant results. The application should also display the results in an organized format such as a table or a list."} {"instruction": "Create a function in Python that determines if a given number is an Armstrong number or not.", "input": "371", "output": "def isArmstrongNumber(number):\n num_str = str(number)\n result = 0\n power = len(num_str)\n\n for c in num_str:\n result += int(c) ** power\n\n if result == number:\n return True\n else:\n return False\n\nif isArmstrongNumber(371):\n print('It is an Armstrong number.')\nelse:\n print('It is not an Armstrong number.')"} {"text": "[CS Wikipedia] Kinematika\n\nKinematika je část mechaniky, která se zabývá klasifikací a popisem různých druhů pohybu, ale nezabývá se jeho příčinami. Naproti tomu dynamika zkoumá pohyb z hlediska působení sil. Kinematika se tedy zaměřuje na sledování polohy, rychlosti apod. Nesleduje však dynamické veličiny, jako např. hybnost a energii, kterými se zabývá dynamika. Pomocné pojmy Důležitým kinematickým pojmem je hmotný bod. Jedná se o idealizaci, kdy libovolné těleso při popisu jeho pohybu nahrazujeme bodem s danou hmotností. Tento bod obvykle umísťujeme do těžiště tělesa. Poloha tělesa je údaj, vyjadřující umístění tělesa vzhledem ke vztažné soustavě. Jednou z možností, jak zadat polohu tělesa je polohový vektor neboli průvodič. Je to spojitá vektorová funkce času, kterou je zvykem psát ve tvaru ( jsou jednotkové bázové vektory). Od obecného polohového vektoru můžeme přejít ke konkrétní soustavě souřadnic. V rovině jsou nejpoužívanější kartézská soustava souřadnic a polární soustava souřadnic. Základní pojmy Mechanickým pohybem se ve fyzice označuje takový pohyb, při kterém dochází ke změně polohy tělesa, popř. hmotného bodu vzhledem ke vztažné soustavě. Kudy se hmotný bod pohybuje popisuje trajektorie, geometrická čára prostorem, kterou hmotný bod při pohybu opisuje. Podle tvaru trajektorie rozlišujeme přímočarý pohyb (probíhá podél konstantně směřujícího vektoru) a křivočarý pohyb (nepřímočarý). Délku trajektorie nazýváme dráha. Při pohybu se mění velikost i směr polohového vektoru. První časovou derivaci polohového vektoru nazýváme okamžitá rychlost. Průměrnou rychlost zavádíme jako . Limitním přechodem od průměrné rychlosti zavádíme (zpětně) rychlost okamžitou: . První časovou derivaci rychlosti nazýváme zrychlení. , kde je jednotkový tečný vektor. Výraz můžeme dále rozepsat jako , což lze interpretovat, jako že se zrychlení skládá z tečné a normálové složky, tedy , kde , přičemž je poloměr křivosti a jednotkový vektor ve směru normály. Je-li tečné zrychlení nulové, jedná se o rovnoměrný pohyb, v opačném případě o nerovnoměrný pohyb. Skládání pohybů - Princip nezávislosti pohybů - Skládání rychlostí - Relativita pohybu - Vztažná soustava - Galileiho princip relativity - Einsteinův princip relativity Popis jednotlivých druhů pohybů Rovnoměrný přímočarý pohyb - Rovnoměrně zrychlený přímočarý pohyb - Nerovnoměrný přímočarý pohyb - Rovnoměrný pohyb po kružnici - Rovnoměrně zrychlený pohyb po kružnici - Nerovnoměrný pohyb po kružnici Veličiny Dráha - Rychlost - Zrychlení - Úhlová dráha - Úhlová rychlost - Úhlové zrychlení - Dostředivé zrychlení - Perioda (fyzika) - Frekvence (Kmitočet) Reference Literatura Související články Mechanika Dynamika Externí odkazy Pohyb"} {"instruction": "Create a for loop that iterates from 10 to 20 by 4's.", "input": "", "output": "for i in range(10, 21, 4): print(i)"} {"instruction": "Write a SQL query to print the name and total orders of each customer", "input": "", "output": "SELECT customer_name, COUNT(*) FROM orders GROUP BY customer_name;"} {"instruction": "Update a MongoDB document with the following information.", "input": "Database name: products Collection name: items Document ID: 5e9697d50a5173c078b5306b Field to update: description Value: This item is now available in 3 sizes", "output": "db.items.updateOne( { _id: ObjectId(\"5e9697d50a5173c078b5306b\") }, { $set: { description: \"This item is now available in 3 sizes\" } } )"} {"instruction": "Create a command-line tool in Python that can calculate the sum of two numbers.", "input": "Not applicable", "output": "import argparse\n\n# Create a parser\nparser = argparse.ArgumentParser()\n# Add the arguments\nparser.add_argument('--num1', type=int, help='First number')\nparser.add_argument('--num2', type=int, help='Second number')\n# Execute the parse_args() method\nargs = parser.parse_args()\n\n#Calculate the sum\nsum = args.num1 + args.num2\n#Print the sum\nprint(sum)"} {"instruction": "Parse the following JSON using JavaScript.", "input": "{\"courseName\":\"Python\"}", "output": "const jsonData = JSON.parse('{\"courseName\":\"Python\"}'); const courseName = jsonData.courseName;"} {"text": "[EN Wikipedia] Sergen, Hani\n\nSergen () is a neighbourhood in the municipality and district of Hani, Diyarbakır Province in Turkey. It is populated by Kurds and had a population of 1,186 in 2022. References Neighbourhoods in Hani District Kurdish settlements in Diyarbakır Province"} {"text": "[DE Wikipedia] Boulevard Anspach\n\nBoulevard Anspach (französisch) oder Anspachlaan (niederländisch) ist ein Boulevard in der Innenstadt von Brüssel, Belgien. Der Boulevard Anspach verbindet den Place de Brouckère (de Brouckèreplein) mit dem Place Fontainas (Fontainasplein). Er ist nach Jules Anspach benannt, einem ehemaligen Bürgermeister von Brüssel. Vor 1879 hieß er Boulevard Central. Er wurde über die Senne gebaut, der Fluss wurde kanalisiert. Viele Sehenswürdigkeiten liegen am Boulevard Anspach, zum Beispiel die Brüsseler Börse und die Konzerthalle „Ancienne Belgique“, sowie viele Geschäfte und Restaurants. Entsprechend dem Motto „De voetganger wordt koning“ („Der Fußgänger wird König“) wurde der Boulevard Anspach ab Juni 2015 provisorisch in eine Fußgängerzone umgewandelt; der definitive Ausbau ist für 2017/2018 vorgesehen. Der Boulevard Anspach und einige umliegende Straßen bilden gemeinsam mit dem Großen Rathausplatz und angrenzenden Gassen einen großen Fußgängerbereich. Weblinks Martin Randelhoff: Der Boulevard Anspach – In Brüssel entsteht die zweitgrößte Fußgängerzone Europas, Porträt auf zukunft-mobilitaet.det vom 3. Juli 2016 Verkehrsbauwerk in Brüssel Straße in Belgien"} {"text": "[CS Wikipedia] Princip nezávislosti pohybů\n\nPrincip nezávislosti pohybů zní: Koná-li těleso pohyb složený z více pohybů, pak jeho výsledná poloha je stejná, jako kdyby konalo tyto pohyby postupně. Principu nezávislosti pohybů se využívá při zkoumání složitějších pohybů, protože každý složitější pohyb lze rozložit na jednodušší pohyby, které je možno zkoumat nezávisle na sobě. Příklad Skládání rychlostí je postup, kterým se do výsledné rychlosti složitějšího pohybu složí dvě nebo více rychlostí jednodušších pohybů tělesa. Protože veličina rychlost je vektor, je třeba rychlosti skládat vektorově (závisle na směrech rychlostí). V případě stejných směrů se velikosti rychlostí sčítají, v případě opačných směrů se velikosti rychlostí odčítají. Rychlosti různých směrů se skládají podle pravidel pro operace s vektory. Kinematika"} {"instruction": "Translate the given Python program into C++ code.", "input": "def say_hello(name=\"\"):\n if name == \"\":\n print(\"Hello World\")\n else:\n print(\"Hello, \" + name + \"!\")", "output": "#include \n#include \n\nvoid say_hello(std::string name=\"\") {\n if (name.empty()) {\n std::cout << \"Hello World\" << std::endl;\n } else {\n std::cout << \"Hello, \" << name << \"!\" << std::endl;\n }\n}\n\nint main() {\n say_hello();\n say_hello(\"John\");\n return 0;\n}"} {"instruction": "What is the command to install Flask using pip?", "input": "", "output": "The command to install Flask using pip is \"pip install flask\"."} {"text": "[HI Wikipedia] नयागढ़\n\nनयागढ़ (Nayagarh) भारत के ओड़िशा राज्य के नयागढ़ ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। विवरण पूर्वी उड़ीसा में 3954 वर्ग किलोमीटर में फैले नयागढ़ जिले का 40 प्रतिशत हिस्सा जंगलों से घिरा है। बुधबुधियानी का सिंचाई पावर प्रोजेक्ट और गर्म पानी का झरना यहां का मुख्य आकर्षण है। इसके साथ ही यह स्थान चमड़े की कारीगरी, पीतल आदि धातुओं के उपकरणों और चीनी मिल के लिए प्रसिद्ध है। बरतुंगा नदी यहां बहने वाली प्रमुख नदी हे। बारामुल, कंतिलो, ओदागांव, जामुपटना, सारनकुल, रानापुर और कुअनरिया आदि यहां के प्रमुख पर्यटन स्थल हैं। यहां से गुजरने वाला राष्ट्रीय राजमार्ग 5 इसे देश के अन्य हिस्सों से जोड़ता है। भूगोल नयागढ़ की स्थिति पर है। यहाँ की औसत ऊंचाई 178 मीटर (583 फीट) है। प्रमुख आकषण शरणकुल यह स्थान नयागढ़ से 20 किलोमीटर दूर नयागढ़- ओडगांव रोड पर स्थित है। भगवान लाडुकेश्वर मंदिर यहां का मुख्य आकर्षण है, जिन्हें लाडुबाबा नाम से जाना जाता है। शरणकुल शैव भक्तों के बीच काफी लोकप्रिय है। शिवरात्रि पर्व मनाने के लिए उड़ीसा के अनेक हिस्सों से लोगों का यहां आगमन होता है। अन्य धार्मिक स्थल ओडगांव यहां से 5 किलोमीटर दूर है। ओडगांव ओडगांव भगवान रघुनाथ जी के मंदिर के लिए काफी प्रसिद्ध है। भगवान राम को समर्पित इस मंदिर में रामनवमी पर्व काफी धूमधाम से मनाई जाती है। माना जाता है कि इस मंदिर का निर्माण 1903 के आसपास हुआ था। मान्यता है कि उड़ीसा के लोकप्रिय कवि उपेन्द्र भांजा ने यहां ध्यान लगाया था और राम तरक मंत्र में निपुणता हासिल की थी। यहां होने वाली रामलीला बहुत लोकप्रिय है। सारनकुल से यह स्थान मात्र 5 किलोमीटर दूर है। कण्टिलो महानदी के किनारे स्थित कण्टिलो नीलमाधब मंदिर के लिए प्रसिद्ध है। मंदिर दो पहाड़ियों के शिखर पर बना है और इसके चारों तरफ की हरियाली पर्यटकों पर्यटकों को बहुत भाती है। भगवान नारायणी का मंदिर भी यहां देखा जा सकता है। कण्टिलो नयागढ़ से 33 किलोमीटर की दूर है। अनेक धातुओं से बने यहां के बर्तन भी बड़े प्रसिद्ध हैं। कुआंरिया बांध यह बांध नयागढ़ के दसपल्ला के निकट स्थित है। महानदी की सहायक कुआंरिया नदी पर बने इस बांध को बनवाने का मुख्य उद्देश्य इस पिछडे क्षेत्र में सिंचाई की व्यवस्था करना था। बांध के आसपास की प्राकृतिक सुंदरता के कारण यह पिकनिक स्थल बन गया है। बांध के निकट कुआंरिया हिरण उद्यान भी देखा जा सकता है। श्री गोपाल जी मठ यह मठ निम्बार्क समुदाय के लिए एक पवित्र स्थल माना जाता है। कांतिलो के निकट स्थित यह मठ नयागढ़ से 25 किलोमीटर की दूरी पर है। मठ में श्रीगोपाल की प्रतिमा भगवान राम, सीता, लक्ष्मण, राधा-कृष्ण और हनुमान के साथ देखी जा सकती है। यह प्रतिमाएं अष्ठ धातुओं से बनी हैं। यहां का मुख्य प्रवेश नक्कासियों से सुसज्‍जित है और लोगों के आकर्षण का केन्द्र है। ताराबालो भुवनेश्वर से 75 किलोमीटर दूर नयागढ़ जिले में स्थित ताराबालो गर्म पानी के झरनों का समूह है। 8 एकड़ में फैले इन झरनों के जल को औषधीय गुणों से भरपूर माना जाता है। प्रकृति के शांत वातावरण में सुकून से समय बिताने के लिए यह एक आदर्श जगह है। बारमुल महानदी के किनारे स्थित बारमुल एक शांत गांव है। महानदी की एक खूबसूरत तंगघाटी गांव की प्रमुख विशेषता है। यहां से सूर्यास्त और सूर्योदय के…"} {"instruction": "Create a Python program to fetch data from an HTTPS resource.", "input": "url = \"https://example.com/data\"", "output": "import requests\n\nurl = \"https://example.com/data\"\n\n# Send a GET request to the URL\nr = requests.get(url)\n\n# Check the status of the request\nif r.status_code == 200:\n data = r.json()\n # Process the fetched data\nelse:\n print('Error: status code {}'.format(r.status_code))"} {"instruction": "Write a JavaScript function that takes an array of words and returns an array of the lengths of each of those words.", "input": "", "output": "function lengths(words) { var length = []; for (var i = 0; i < words.length; i++) { length.push(words[i].length); } return length; }"} {"instruction": "Convert this integer to its corresponding binary representation in 8 bits.", "input": "32", "output": "def int_to_binary(num): return '{0:08b}'.format(num)"} {"instruction": "Create a SQL query to select the top five customers based on purchase amount", "input": "", "output": "SELECT TOP 5 * FROM customers ORDER BY purchase_amount DESC"} {"instruction": "Create an RNN model to classify emails into spam and not spam.", "input": "", "output": "#imports import tensorflow as tf from tensorflow.keras.layers import Embedding, LSTM, Dense, Dropout #Model model = tf.keras.models.Sequential([ Embedding(vocab_size, embedding_dim, input_length = max_len), LSTM(128), Dense(64, activation = 'relu'), Dropout(0.25), Dense(1, activation = 'sigmoid') ])"} {"instruction": "Add a method called \"printTitle\" to the “Book” class defined above.", "input": "", "output": "class Book(): def __init__(self, name, author): self.name = name self.author = author def printTitle(self): print(\"The book title is: \"+ self.name)"} {"instruction": "Create a data structure to store an employee's details including his personal details and salary information.", "input": "", "output": "class Employee: def __init__(self, name, age, salary): self.name = name self.age = age self.salary = salary"} {"text": "[CS Wikipedia] John Dinwoodie\n\nJohn S. Dinwoodie (1904–1980) byl skotský duchovní a básník. Jeho sbírka básní vyšla v KVAROPO pod názvem KASTELO EL REVOJ. Související články Esperantská literatura Esperantská literatura Skotští duchovní Narození v roce 1904 Úmrtí v roce 1980 Muži"} {"instruction": "Develop a Python function to classify place names.", "input": "place_name = \"New York City\"", "output": "def get_place_type(place_name):\n # Split the place name into its constituent parts \n parts = place_name.split()\n \n # Initialize a variable for the type of place\n place_type = None\n \n # Check for certain keywords to indicate the place type \n if 'City' in parts:\n place_type = 'City'\n elif 'Town' in parts:\n place_type = 'Town'\n elif 'Village' in parts:\n place_type = 'Village'\n elif 'River' in parts:\n place_type = 'River'\n elif 'Mountain' in parts:\n place_type = 'Mountain'\n elif 'Island' in parts:\n place_type = 'Island'\n \n # Return the detected place type\n return place_type"} {"instruction": "Update the values of the variables x, y and z using the given expression.", "input": "x=1, y=2, z=3, expression: x+2*y-z", "output": "x = 3, y = 2, z = 3"} {"instruction": "Make a program that finds the reverse of a string in Python.", "input": "Hello World", "output": "def reverse(s): \n return s[::-1] \n\nreverse(\"Hello World\")"} {"instruction": "Classify numbers into odd and even using Python.", "input": "list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "odd_list = []\neven_list = []\n\nfor x in list:\n if x % 2 == 0:\n even_list.append(x)\n else:\n odd_list.append(x)\n \nprint(\"Odd numbers: \", odd_list)\nprint(\"Even numbers: \", even_list)"} {"instruction": "Create a Python function to tokenize sentences into words.", "input": "The quick brown fox jumped over the lazy dog.", "output": "def tokenize(sentence):\n tokens = []\n current_word = \"\"\n for char in sentence:\n if char.isalpha():\n current_word += char\n else:\n if current_word:\n tokens.append(current_word)\n current_word = \"\"\n if char.isnumeric():\n tokens.append(char)\n if current_word:\n tokens.append(current_word)\n return tokens\n\nprint(tokenize('The quick brown fox jumped over the lazy dog.'))\n# ['The', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy', 'dog']"} {"text": "[CS Wikipedia] SMS Wien\n\nSMS Wien byla pobřežní bitevní loď Rakousko-uherského námořnictva. Byla to druhá ze tří jednotek třídy Monarch. Koncepčně navazovala na tehdejší moderní bitevní lodě, označované dnes jako predreadnoughty, oproti nim však měla přibližně třetinový výtlak. Plavidlo bylo ve službě v letech 1897–1917. Účastnilo se bojů první světové války, ve které bylo nasazováno především při ostřelování pozemních cílů. Dne 10. prosince 1917 bylo potopeno italským torpédovým člunem MAS, který pronikl do Terstu. Stavba Plavidlo postavila loděnice Stabilimento Tecnico Triestino (STT) v Terstu. Kýl lodi byl založen 16. února 1893, trup lodi byl spuštěn na vodu 6. července 1895 a hotová bitevní loď Wien byla do služby přijata 13. května 1897. Konstrukce Trup byl vybaven klounem. Hlavní výzbroj představovaly čtyři 24cm kanóny Krupp L/40 C94 ve dvou dvoudělových věžích. Výzbroj střední a malé ráže dodala Strojírna Škoda.. Sekundární výzbroj tvořilo šest 15cm kanónů Škoda L/40, umístěných v jednopatrové kasematě. Lodě dále nesly deset 4,7cm kanónů Škoda L/44, čtyři 47mm rychlopalné kanóny Hotchkiss L/33 a jeden vodou chlazený 8mm kulomet Škoda M1893. Výzbroj doplňovaly dva 450mm torpédomety se zásobou čtyř torpéd. Roku 1917 byl na Wien instalován jeden protiletadlový kanón 7cm Škoda L/50 K 10 BAG. Pancéřování bylo dodáno Vítkovickými železárnami. Boční pancéřový pás měl sílu 120–270 mm. Kasematy měly sílu 80 mm, dělové věže 250 mm a velitelská věž 220 mm. Pancéřová paluba měla sílu 40 mm. Pohonný systém plavidel tvořilo pět kotlů a dva trojčité parní stroje o výkonu 8000 hp, pohánějící dva třílisté lodní šrouby o průměru 4,42 m. Nejvyšší rychlost dosahovala 17,5 uzlu. Neseno bylo 500 tun uhlí. Dosah byl 3500 námořních mil při rychlosti 9 uzlů. Operační služba Wien byl nasazen v bojích první světové války, sloužil v druhé linii a byl využíván při ostřelování pozemních cílů, nebo jako strážní loď. Už září 1914 se Wien a jeho sesterské lodě přesunuly z Puly do Boky Kotorské, aby se zapojily do ostřelování černohorských pozic v okolí hory Lovćen. Po bitvě u Caporetta v říjnu až listopadu 1917 se fronta posunula do italského vnitrozemí a stabilizovala na řece Piavě. Rakousko-uhersko-německý pokus o novou ofenzivu představovala bitva na Piavě, ve které byly při ostřelování pozemním cílů nasazeny i obrněnce Budapest a Wien. Dne 16. listopadu 1916 ostřelovaly Cortellazzo poblíž ústí Piavy. Dne 10. prosince 1917 pronikly do zátoky Muggia v Terstu italské torpédové čluny MAS 9 (velitel Luigi Rizzo) a MAS 13 (Andrea Ferrarini), kde svá torpéda vypustily na Wien a Budapest. Zatímco Wien obě torpéda zasáhla, torpéda mířící na Budapest cíl minula. Wien se během pěti minut převrátil. Zemřelo 46 mužů a 17 jich bylo zraněno. Jedním z námořníků, kteří potopení lodi přežili, byl i pozdější…"} {"instruction": "Construct an if/else block to convert a given score to a grade.", "input": "score = 25", "output": "if (score >= 90) { grade = 'A'; } else if (score >= 80) { grade = 'B'; } else if (score >= 70) { grade = 'C'; } else if (score >= 60) { grade = 'D'; } else { grade = 'F'; }"} {"instruction": "Create a method in Python to flatten a 2-Dimentional array.", "input": "array = [[1, 2], [3, 4], [5, 6]]", "output": "def flatten(arr):\n flat_list = []\n for sublist in arr:\n for item in sublist:\n flat_list.append(item)\n return flat_list\n\nflatten(array)"} {"instruction": "Construct a python program which takes in input the size of a jagged array and prints it(no values).", "input": "", "output": "def print_jagged_array(array_size): \n # Initialize a jagged array with the given size\n array = [None] * array_size\n \n # Populate the array with empty arrays\n for i in range(array_size):\n array[i] = []\n \n # Print the output array\n print(array)\n\nif __name__ == \"__main__\":\n array_size = 4\n print_jagged_array(array_size)"} {"instruction": "Build a recommendation system in Python for finding similar items.", "input": "", "output": "# import libraries \nimport numpy as np\nimport scipy \nfrom nltk.stem.porter import * \nimport pandas as pd \nfrom scipy.spatial.distance import cosine, correlation \nfrom sklearn import metrics \n \n# Read the metadata \nmetadata = pd.read_csv('movies_metadata.csv') \n \n# select the required columns \nmetadata = metadata[['title', 'genres']] \n \n# calculate the genre of the movie by using any tokenizer like \n# RegexpTokenizer or PorterStemmer tokenizer \nstemmer = PorterStemmer() \n\n# Function to get genre \ndef get_genre(x): \n genre1 = [] \n try: \n mylist = x['genres'].split('|') \n for i in mylist:\n # print(stemmer.stem(i))\n genre1.append(stemmer.stem(i)) \n except: \n pass\n return genre1\n \n# create a new column having all the genres \nmetadata['genre_new'] = metadata.apply(get_genre, axis = 1) \n\n# Function to calculate the similarity between moviess \n# based on their genres \ndef genre_similarity(x): \n sim = [] \n for i in x['genre_new']: \n indx = metadata[metadata['genre_new'].map(lambda d: i in d)].index \n sim.extend(list(metadata['title'][indx])) \n \n return sim[:20] \n \n# create a new column having the similar movies to each movie \nmetadata['sim_movies'] = metadata.apply(genre_similarity, axis = 1)"} {"instruction": "Implement a Python program to find the longest common subsequence of characters.", "input": "s1 = 'acefhjkb'\ns2 = 'bcdefhi'", "output": "def longest_common_subsequence(s1, s2):\n n1 = len(s1)\n n2 = len(s2)\n\n dp_table = [[0]*(n2+1) for _ in range(n1+1)]\n for i in range(n1):\n for j in range(n2):\n if s1[i] == s2[j]: \n dp_table[i+1][j+1] = dp_table[i][j] + 1\n else:\n dp_table[i+1][j+1] = max(dp_table[i][j+1], \n dp_table[i+1][j])\n lcs_length = dp_table[-1][-1]\n lcs_string = \"\" \n i, j = n1, n2\n while i > 0 and j > 0: \n if dp_table[i][j] == dp_table[i-1][j]: \n i -= 1\n elif dp_table[i][j] == dp_table[i][j-1]: \n j -= 1\n else: \n lcs_string = s1[i-1] + lcs_string \n i -= 1\n j -= 1\n \n return lcs_string, lcs_length"} {"instruction": "Write a function to split a string of words by comma.", "input": "string = 'apple,orange,banana,grapes'", "output": "def split_by_comma(string): return string.split(\",\")"} {"text": "[EN Wikipedia] Tangahoe River\n\nThe Tangahoe River is a river of the Taranaki Region of New Zealand's North Island. It flows generally southwest from its origins in hill country to the east of Lake Rotorangi, reaching the Tasman Sea in the South Taranaki Bight southeast of Hawera. Name An elder, of Tangahoe and Ngati Hine descent, said the origin of the name, Tangahoe, is that it was given to the river following the loss of a steering oar (hoe) from a fishing waka (boat) at sea, trying to return to its tauranga waka (landing place). It was said that, had it had two steering oars, as on the Aotea waka, then it would have reached its landing. Pre colonial value The Ngati Ruanui Claims Settlement Act 2003 said the river was a major source of resources, providing shellfish and fish, including piharau, kōkopu, tuna and pātiki, birds such as kererū, pūkeko, tiwaiwaka, kāhu, kākāpō, kiwi, korimako, miromiro and pīpīwharauroa and plants, including koromiko, kohia, hinau, piripiri, mamaku, and rewarewa. Defensive sites The steep valley sides of the lower river provided good defensive sites, as marked on the 1:50,000 map. Otapawa pā was held by Tangahoe, Pakakohi and Ngāti Ruanui when it was attacked on 16 January 1866, during the Second Taranaki War. The account of the attack in 'The adventures of Kimble Bent put Māori losses at 7, but others estimated 30 killed and 30 wounded. The Imperial troops lost 11 dead and 10 wounded. A bulldozer has destroyed most of the site. Te Ruaki Pa has also been damaged - by cattle. Tangahoe and Inman's Redoubts date from 17 March 1865. They remain in good condition under pasture. Geology The river rises on a sandy mid-Pliocene Tangahoe Mudstone, formed in a shallow sea, then its valley is cut down to early-Pliocene Whenuakura Group rocks (bioclastic limestone, pebbly and micaceous sandstones and massive siltstone), whilst the surrounding land is covered by mid-Pleistocene beach deposits of conglomerate, sand, peat and clay. The river carries about 43,900 tonnes of sediment to the sea each year. It enters the sea between 30 and 50 m tall cliffs, eroded over the last 15,000 years, following tectonic uplift. Of the rivers flowing into the S Taranaki Bight, the Tangahoe ranks 13th for flow but 9th for sediment input, with a sediment rate of 1.39 kg/s. Water quality Water quality in Taranaki has been under pressure. Quality varies over the length of the river, as shown in the table - In the summer of 2016 the MCI level at the viaduct was the lowest ever, probably due to earthworks by Fonterra, causing the rating to drop to poor. Tangahoe is listed 5th in Taranaki for modification, with of consented stream modification in its catchment. Fonterra's Whareroa dairy has a consent to draw of water a day from the Tangahoe's tributary, the Tawhiti Stream, where flows,…"} {"instruction": "Create a game in Python based on personal preferences", "input": "", "output": "Create a game in Python that involves the user's personal preferences. The game should allow the user to input their interests, goals, and preferences to produce a dynamic and personalised experience. The game should use a combination of text, graphics and sounds to create an engaging and immersive experience."} {"instruction": "Generate a method in C++ to sort a given array in descending order.", "input": "arr = [3,5,1]", "output": "void sort_descending(int arr[], int n) { int temp; for (int i=0; i 18;"} {"instruction": "Create a class in Python that represents a 3D Cube and initializes all side lengths to 10.", "input": "", "output": "class Cube:\n def __init__(self):\n self.sideLengthA = 10\n self.sideLengthB = 10\n self.sideLengthC = 10"} {"instruction": "Write a python program to classify a given email as spam or not.", "input": "Subject: 50% Off Discount!!!\n\nHey there,\n\nWe are giving away a 50% discount on all our products today only. Hurry up and claim your offer now!", "output": "def is_spam(email):\n words = [\"discount\", \"offer\", \"free\", \"cheap\", \"50% off\", \"purchase now\"]\n email_words = email.lower().split()\n word_list = [word for word in email_words if word in words]\n if len(word_list) > 0:\n return 'spam'\n else:\n return 'not spam'"} {"text": "[DE Wikipedia] Drahtbürste\n\nDie Drahtbürste ist ein Werkzeug, das hauptsächlich zum Entfernen von Rost, Farbe und anderen hartnäckigen Verschmutzungen von verschiedenen Oberflächen eingesetzt wird. Sie bestehen aus metallischen Borsten, die in der Regel aus Stahl, Edelstahl, Messing oder Kupfer bestehen. Je nach Einsatzgebiet und Material können diese Bürsten unterschiedlich hart und elastisch sein. Es gibt handgeführte Modelle, die über Griffe aus Holz oder Kunststoff verfügen, und solche, die als Räder oder Aufsätze an Elektrowerkzeugen befestigt werden können. In Drahtbürsten werden die metallischen Borsten auf verschiedene Weisen befestigt, darunter durch Verdrillen, Klammern, Epoxidharzbindung oder mechanische Anker-Einstellungen. Formen Handbürsten: Diese haben einen Handgriff und sind für manuelle Arbeiten vorgesehen. Topfbürsten: Sie sind rund und eignen sich besonders gut als Aufsatz für Bohrmaschinen. Rundbürsten: Ideal für schwer zugängliche Stellen oder Rohrinnenseiten. Walzen- und Kegelbürsten: Diese speziellen Formen werden in der Industrie verwendet. Einsatzbereiche Reinigung: Entfernen von Rost, Farbresten und anderen groben Verschmutzungen. Schweißnahtbearbeitung: Vor und nach dem Schweißen werden sie eingesetzt, um Oberflächen zu reinigen oder Schlacken zu entfernen. Oberflächenveredelung: Durch das \"Bürsten\" von Oberflächen, beispielsweise von Metallen, Holz oder Leder, kann eine spezielle Optik erzielt werden. Geschichte der Drahtbürste Die genaue Herkunft der Drahtbürste ist nicht bekannt, doch die Verwendung von Draht in Bürstenform ist nicht neu. Bereits in der Antike gab es unterschiedliche Bürstentypen. Ihre prominente Entwicklung und Anwendung in der Metallbearbeitung fand wahrscheinlich während der Industrialisierung statt, als die Massenproduktion von Draht möglich wurde. Dieser Zeitpunkt korreliert mit dem Bedürfnis nach effizienten Reinigungswerkzeugen in Industrie und Haushalt. Einzelnachweise Bürste (Werkzeug) Reinigungsgerät Burste"} {"instruction": "Write a Python code that prints out all the even numbers between 2 and 100.", "input": "", "output": "for i in range(2, 101):\n if i % 2 == 0:\n print(i)"} {"instruction": "Generate a MySQL query to display all the columns of a table called \"employee\"", "input": "", "output": "SELECT * FROM employee;"} {"instruction": "Design an algorithm that determines the greatest common multiple of two numbers.", "input": "", "output": "def gcm(x, y): if(x > y): gcm = x else: gcm = y while(True): if((gcm % x == 0) and (gcm % y == 0)): return gcm gcm = gcm + 1 # Driver Program x = 12 y = 18 print(gcm(x, y))"} {"instruction": "Develop a Python program that takes in an URL and extracts all the text content from the page.", "input": "'https://www.example.com/'", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = 'https://www.example.com/'\n\npage = requests.get(url)\nhtml = BeautifulSoup(page.content, 'html.parser')\n\ntexts = []\nfor txt in html.find_all('p'):\n texts.append(txt.text)\n\nprint(texts)"} {"instruction": "Create a variable to store your name.", "input": "", "output": "name = \"John\""} {"instruction": "Write a Python code to print the following output: day temperature Monday 20 Tuesday 25", "input": "", "output": "print(\"day temperature\") print(\"Monday 20\") print(\"Tuesday 25\")"} {"instruction": "Write a Java method to convert a given integer to its equivalent English words", "input": "", "output": "public static String intToEnglish(int input) { // create an array of string representations of numbers 1 to 19 String[] numbers1_19 = {\"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"ten\", \"eleven\", \"twelve\", \"thirteen\", \"fourteen\", \"fifteen\", \"sixteen\", \"seventeen\", \"eighteen\", \"nineteen\"}; // create an array of string representations of multiples of ten // from 20 to 90 String[] multiplesOfTen = {\" twenty\", \" thirty\", \" forty\", \" fifty\", \" sixty\", \" seventy\", \" eighty\", \" ninety\"}; String output = \"\"; // extract each digit from the input and convert it to its // string representation if (input > 0 && input < 20) { output += numbers1_19[input - 1] + \" \"; } else if (input >= 20 && input < 100) { output += multiplesOfTen[input / 10 - 2] + \" \"; if (input % 10 != 0) { output += intToEnglish(input % 10); } } else if (input >= 100 && input < 1000) { output += intToEnglish(input / 100) + \" hundred \"; if (input % 100 != 0) { output += intToEnglish(input % 100); } } // return the output string return output; }"} {"instruction": "Edit the following Python code to handle unexpected errors.", "input": "def add_numbers(a,b): \n return a + b", "output": "def add_numbers(a,b): \n try:\n return a + b\n except TypeError as e:\n print(e)\n return None"} {"instruction": "Classify the following Python statement as a type of loop.", "input": "for i in range(10):\n print(i)", "output": "for loop."} {"instruction": "Generate a python program to delete duplicate elements from the given array.", "input": "Input: [1, 2, 3, 4, 4, 5, 6, 7, 8, 8]", "output": "def delete_duplicates(array):\n seen = set()\n non_duplicates = []\n for val in array:\n if val not in seen:\n non_duplicates.append(val)\n seen.add(val)\n return non_duplicates"} {"instruction": "Write a code snippet to find all combinations of 3 numbers in the array that sum to zero.", "input": "[3, 5, -2, 1, -1, 0, 4]", "output": "[[3, -2, 1], [5, -1, -4], [5, 1, -4], [-2, 0, 2]]"} {"instruction": "Explain in brief the concept of type casting in programming languages.", "input": "", "output": "Type casting is the process of converting one data type into another. It is generally used to convert values from one type to another in order to perform specific operations. In programming languages, type casting involves converting a value of one data type such as an integer or a string into a new data type such as a float or a boolean. Type casting ensures that the operations performed on the data are valid and helps reduce the chances of errors due to incompatibility of data types."} {"instruction": "Replace the following comma-separated values with tabs.", "input": "boats,cars,planes", "output": "boats\\tcars\\tplanes"} {"instruction": "From a given list of words, create a new list with only the words that contain the letter 'a'.", "input": "my_list = [\"cat\", \"dog\", \"apple\", \"pear\"]", "output": "new_list = [word for word in my_list if \"a\" in word] # Output: [\"cat\", \"apple\", \"pear\"]"} {"instruction": "Write a SQL query to count the total number of customers who haven't placed an order yet.", "input": "Table Name: customers", "output": "SELECT COUNT(*) FROM customers WHERE id NOT IN (SELECT customer_id FROM orders);"} {"instruction": "Create a JavaScript array from a given Object.", "input": "my_obj = {\"a\": 1, \"b\": 2, \"c\": 3}", "output": "my_arr = [1, 2, 3]"} {"instruction": "Write a Python code snippet to count the number of occurrences of a given letter in a string.", "input": "string = \"Mississippi\",\nletter = \"s\"", "output": "letter = 's'\nstring = \"Mississippi\"\ncount = 0\nfor char in string:\n if char == letter:\n count += 1\nprint(count)"} {"instruction": "Create a method in Python that receives a list of strings and prints out the longest string.", "input": "strings = [“ABC”, “AAA”, “AB”, “ABCDE”]", "output": "def longest_string(strings):\n longest = \"\"\n for s in strings:\n if len(s) > len(longest):\n longest = s\n print(longest)\n\nlongest_string(strings)\n# Output: ABCDE"} {"instruction": "Compact a given list into a dictionary with unique items as keys.", "input": "given_list = [1,1,1,2,2,3]", "output": "uniques = {} for item in given_list: if item not in uniques: uniques[item] = 1 else: uniques[item] += 1 # result: {1: 3, 2: 2, 3: 1}"} {"instruction": "Design a pipeline in Scikit-learn to preprocess a given dataset.", "input": "", "output": "from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA pipeline = Pipeline(steps=[ ('scaler', StandardScaler()), ('pca', PCA()) ])"} {"instruction": "Develop a function in C++ to find the roots of a quadratic equation ax^2 + bx + c = 0.", "input": "", "output": "double findRoots(double a, double b, double c) { double result; if ((b*b - 4*a*c) < 0) { return INT_MIN; } else { result = (-b + sqrt(b*b - 4*a*c)) / (2*a); return result; } }"} {"instruction": "Given a string, write code to remove all the consecutive characters and output the new string.", "input": "string='AAABBBCCC'", "output": "def remove_consecutive_chars(string): # create an empty string new_string = '' # iterate over the characters of the given string for i in range(len(string)-1): if string[i] != string[i+1]: new_string += string[i] # add the last character of the string to the output new_string += string[-1] # return the new string return new_string string='AAABBBCCC' result = remove_consecutive_chars(string) print(\"The new string is:\", result)"} {"instruction": "Write a SQL query to select the employees who are in their 30s.", "input": "", "output": "SELECT * FROM employee WHERE YEAR(CURDATE()) - YEAR(dob) BETWEEN 30 and 39;"} {"instruction": "Use NumPy to extract the top 10 rows from a given matrix.", "input": "import numpy as np arr = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])", "output": "top_10 = arr[:10,] print(top_10)"} {"text": "[DE Wikipedia] Backfisch\n\nBackfisch steht für: Backfisch (Gericht), gebackener oder frittierter Fisch, teilweise in einem Teigmantel Backfisch (Mädchen), veraltete Bezeichnung für ein Mädchen in der Pubertät Michael Backfisch, deutscher Journalist Robert Backfisch (1895–1946), deutscher Gauleiter, Politiker der NSDAP, siehe Robert Wagner (Gauleiter) Siehe auch: Backfischroman Wormser Backfischfest Bratfisch (Begriffsklärung)"} {"instruction": "Design a function for ordering a pizza in Python and use it to order a pizza with 3 toppings.", "input": "Toppings: Pepperoni, Mushroom, Olives", "output": "def orderPizza(toppings):\n print(\"Ordering a pizza with the following toppings:\")\n for topping in toppings:\n print(topping)\n print(\"Thank you!\")\norderPizza([\"Pepperoni\", \"Mushroom\", \"Olives\"])"} {"instruction": "Generate two for loops that would execute concurrently in Python.", "input": "", "output": "for i in range(0, n):\n for j in range(i + 1, n):\n # Do some processing"} {"instruction": "Train a Logistic Regression model in Python on a dataset containing 5000 samples and 5 features.", "input": "", "output": "from sklearn.linear_model import LogisticRegression\n\n# Load the dataset\nX = ...\ny = ...\n\n# Initialize model\nmodel = LogisticRegression()\n\n# Fit the model\nmodel.fit(X, y)\n\n# Evaluate the model\nmodel.score(X, y)"} {"text": "[DE Wikipedia] Duncan-Jones\n\nDuncan-Jones ist der Familienname folgender Personen: Austin Duncan-Jones (1908–1967), britischer Philosoph und Hochschullehrer Elsie Duncan-Jones (1908–2003), britische Literaturwissenschaftlerin Katherine Duncan-Jones (1941–2022), britische Literaturwissenschaftlerin und Hochschullehrerin Richard Duncan-Jones (* 1937), britischer Historiker"} {"instruction": "Implement an algorithm in Python to check if a linked list is palindrome or not.", "input": "nodelist: 3, 5, 6, 6, 5, 3", "output": "class Node: \n def __init__(self, data): \n self.data = data\n self.next = None\n \nclass LinkedList: \n def __init__(self): \n self.head = None\n \n def push(self, new_data): \n new_node = Node(new_data) \n new_node.next = self.head \n self.head = new_node \n \n def reverseList(self): \n prev = None\n current = self.head \n while(current is not None): \n next = current.next\n current.next = prev \n prev = current \n current = next\n self.head = prev \n \n def compareLists(self, head1, head2): \n while(head1 and head2): \n if head1.data != head2.data: \n return 0\n head1 = head1.next\n head2 = head2.next\n if (head1 and not head2) or (head2 and not head1): \n return 0\n return 1\n \n def checkPalindrome(self): \n slow_ptr = self.head \n fast_ptr = self.head \n count = 0\n while(fast_ptr is not None and fast_ptr.next is not None): \n fast_ptr = fast_ptr.next.next\n slow_ptr = slow_ptr.next\n count+=1\n second_half = self.reverseList() \n isPalindrome = self.compareLists(self.head, second_half) \n \n self.reverseList() \n if isPalindrome: \n return True\n else: \n return False\n \nllist = LinkedList() \nllist.push(3)\nllist.push(5)\nllist.push(6)\nllist.push(6)\nllist.push(5)\nllist.push(3)\nllist.checkPalindrome() # Output: True"} {"instruction": "Suggest a regular expression pattern that identifies 3 consecutive numbers.", "input": "", "output": "The regular expression pattern that identifies 3 consecutive numbers is: \\d{3}"} {"instruction": "Create a REST API endpoint in Python to handle a POST request and make updates to a database.", "input": "Not applicable", "output": "from flask import Flask\nimport mysql.connector\n\n# create the app and connect to the database\napp = Flask(__name__) \nconn = mysql.connector.connect(\n host=\"localhost\",\n user=\"db_user\", \n passwd=\"password\", \n database=\"my_db\"\n)\n\n# handle POST request\n@app.route(\"/my_endpoint\", methods=[\"POST\"])\ndef handle_post_request():\n # get the data from the request\n data = request.get_json()\n\n # connect to the database\n cursor = conn.cursor()\n\n # write data to database\n query = \"INSERT INTO my_table (field1, field2) VALUES (%s, %s)\"\n cursor.execute(query, (data[\"field1\"], data[\"field2\"]))\n conn.commit()\n\n return \"Success!\""} {"instruction": "Design a Bubble Sort algorithm for a list of numbers.", "input": "", "output": "def bubbleSort(arr): n = len(arr) for i in range(n): for j in range(0, n-i-1): if arr[j] > arr[j+1]: arr[j], arr[j+1] = arr[j+1], arr[j] return arr"} {"text": "[EN Wikipedia] Good Morning Good Night\n\nGood Morning Good Night is a collaborative album by Sachiko M, Toshimaru Nakamura, and Otomo Yoshihide. It was released in 2004 by Erstwhile Records. Background The music consists of sine waves produced by a sampler, mixing console feedback, and turntable-based sounds. The music is sparse and divided into several segments ranging from approximately 8 to 37 minutes in length. Track listing Personnel Adapted from Erstwhile Records Sachiko M – sine waves, sampler Toshimaru Nakamura – no-input mixing board Otomo Yoshihide – turntables, electronics Reception The album was given a 7.3 by Pitchfork, with reviewer Dominique Leone praising the album for its complexity and meticulous instrumentation. References Electronic albums by Japanese artists Minimal music albums 2004 albums"} {"instruction": "Generate a Python program to edit a given list of strings and remove the duplicates in-place.", "input": "[\"AB\", \"AC\", \"AB\", \"CD\", \"AC\"]", "output": "list = [\"AB\", \"AC\", \"AB\", \"CD\", \"AC\"]\n\nseen = set()\nres = []\n\nfor item in list:\n if item in seen:\n continue\n seen.add(item)\n res.append(item)\n\nlist[:] = res\n\nprint(list)"} {"instruction": "Write a Python program to remove duplicates from a list of strings. The program should maintain the order of the strings in the list.", "input": "['abc', 'def', 'abc', 'ghi', 'ghi', 'ghi', 'xyz']", "output": "def remove_duplicates(list_strings):\n # Create an empty list to store unique strings\n unique_strings = []\n\n # Iterate over the list\n for string in list_strings:\n # Append string to unique_strings if it is not already present\n if string not in unique_strings:\n unique_strings.append(string)\n return unique_strings\n\nlist_strings = ['abc', 'def', 'abc', 'ghi', 'ghi', 'ghi', 'xyz']\nprint(remove_duplicates(list_strings))"} {"instruction": "Write an SQL query to select distinguish the records with 'Yes' and 'No' for the field 'full_time' from 'employees' table.", "input": "", "output": "SELECT full_time FROM employees WHERE full_time IN ('Yes','No');"} {"instruction": "Construct a class in Python that will represent a shopping cart. The class should contain methods for making a purchase, adding products to the cart, and calculating the total price.", "input": "products = [\n { 'name': 'Chocolate', 'price': 6.00 },\n { 'name': 'Milk', 'price': 3.00 },\n { 'name': 'Cheese', 'price': 12.00 },\n]", "output": "class ShoppingCart:\n def __init__(self, products):\n self.products = products\n self.total_price = 0\n\n def add_product(self, product):\n self.products.append(product)\n\n def calculate_total_price(self):\n self.total_price = 0\n for product in self.products:\n self.total_price += product['price']\n return self.total_price\n\n def make_purchase(self):\n self.total_price = self.calculate_total_price()\n print('You purchased {} items with a total price of {}'.format(len(self.products), self.total_price))"} {"instruction": "The given code is a Python script that translates a Wikivoyage article from one language to another. The script takes the title of the article and the source and destination languages as input and generates a new article in the destination", "input": "", "output": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# transvoyage.py\n# Version 0.3\n# \n# Copyright 2014 Guénaël Muller \n# \n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 3 of the License, or\n# (at your option) any later version.\n# \n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n# \n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n# MA 02110-1301, USA.\n# \n#TODO\n# - se conformer à la PEP 8\n# - commentaires et TODO bilingue.\n# - optimisations\n# -\ttraduction inversé amélioré\n# - nouveau langages\n# - debugage de certains regex et autres\n\n\nimport sys\nimport os\nimport subprocess \nimport re\nimport urllib\nimport argparse\n\n# traductions des types Articles\n\nlistTypeFr=('Ville','Région continentale','Région','Pays' ,'Quartier','Itinéraire','Parc')\nlistTypeEn=('city' ,'continent' ,'region','country','district','itinerary' ,'park')\n\n\n#Equivalences sections\nlistSectionFr=[\"Comprendre\",\"Aller\" ,\"Circuler\" ,\"Voir\",\"Faire\",\"Acheter\",\"Manger\",\"Boire un verre / Sortir\",\"Se loger\",\"Aux environs\",\"Travailler\",\"Apprendre\",\"Gérer le Quotidien\",\"Sécurité\",\"Communiquer\"]\nlistSectionEn=[\"Understand\",\"Get in\",\"Get around\",\"See\" ,\"Do\" ,\"Buy\" ,\"Eat\" ,\"Drink\" ,\"Sleep\" ,\"Go next\",\"Work\" ,\"Learn\" ,\"Cope\" ,\"Stay safe\", \"Connect\" ]\n\nlistSectionFr.extend([\"Respecter\",\"Parler\",\"Éléctricité\"])\nlistSectionEn.extend([\"Respect\",\"Talk\",\"Electricity\"])\n\nlistSectionFr.extend([\"Se préparer\",\"Étapes\",\"Autres destinations\",\"Lire\",\"Douanes\",\"En taxi\",\"Santé\",\"Monnaie\",\"Villes\",\"Régions\",\"Quartiers\",\"Bureaux d'information touristique\"])\nlistSectionEn.extend([\"Prepare\",\"Route\",\"Other destinations\",\"Read\",\"Customs\",\"By taxi\",\"Stay healthy\",\"Currency\",\"Cities\",\"Regions\",\"Districts\",\"Tourist office\"])\n\nlistSectionFr.extend(['Histoire', 'Paysage', 'Flore et faune',\"Climat\",\"Randonnée\",\"Droits d'accès\",\"Droits d'accès\",\"Activités\",\"Météo\",\"Nature\"])\nlistSectionEn.extend(['History', 'Landscape', 'Flora and fauna',\"Climate\",\"Hiking\",\"Fees/permits\","} {"instruction": "Convert a given string into Pig Latin.", "input": "string = \"Hello\"", "output": "def pig_latin(string): vowels = \"aeiou\" if string[0].lower() in vowels: return string+\"way\" else: return string[1:]+string[0]+\"ay\""} {"text": "[HI Wikipedia] भरतपुर\n\nभरतपुर (Bharatpur) भारत के राजस्थान राज्य के भरतपुर ज़िले में स्थित एक नगर है। यह उस ज़िले का मुख्यालय भी है। विवरण भरतपुर राजस्थान का एक प्रमुख शहर होने के साथ-साथ देश का सबसे प्रसिद्ध पक्षी उद्यान भी है। 29 वर्ग कि॰मी॰ में फैला यह उद्यान पक्षी प्रेमियों के लिए किसी स्वर्ग से कम नहीं है। विश्‍व धरोहर सूची में शामिल यह स्थान प्रवासी पक्षियों का भी बसेरा है। और यह अपने समय में जाटों का गढ़ हुआ करता था। यहाँ के मंदिर, महल व किले जाटों के कला कौशल की गवाही देते हैं। राष्ट्रीय उद्यान के अलावा भी देखने के लिए यहाँ अनेक जगह हैं इसका नामकरण राम के भाई भरत के नाम पर किया गया है। लक्ष्मण इस राज परिवार के कुलदेव माने गये हैं। इसके पूर्व यह जगह सोगडिया जाट सरदार रुस्तम के अधिकार में था जिसको महाराजा सूरजमल ने जीता और 1733 में भरतपुर नगर की नींव डाली भरतपुर राज्य भरतपुर नाम से यह एक स्वतंत्र राज्य भी था जिसकी नींव महाराजा सूरजमल ने डाली। महाराजा सूरजमल के समय भरतपुर राज्य की सीमा आगरा,अलवर,धौलपुर, मैनपुरी, हाथरस, अलीगढ़, इटावा, मेरठ, रोहतक, फर्रुखनगर, मेवात, रेवाड़ी,पलवल, गुरुग्राम (गुड़गाँव), तथा मथुरा तक के विस्तृत भू-भाग पर फैली हुई थी। भरतपुर के महाराजाओं की सूची भरतपुर वंश के पूर्वज सिनसिनवार गोत्र के जाट थे, गोकुला, ? - 1670 राजाराम (भरतपुर), 1670 - 1688 चूड़ामन, 1695 - 1721 बदन सिंह, 1722 - 1756 महाराजा सूरजमल, 1756 - 1767 महाराजा जवाहर सिंह, 1767 - 1768 महाराजा रतन सिंह, 1768 - 1769 महाराजा केहरी सिंह, 1769 - 1771 महाराजा नवल सिंह, 1771 - 1776 महाराजा रणजीत सिंह, 1776 - 1805 महाराजा रणधीर सिंह, 1805 - 1823 महाराजा बलदेव सिंह, 1823 - 1825 महाराजा बलवन्त सिंह, 1825 - 1853 महाराजा जशवन्त सिंह, 1853 - 1893 महाराजा राम सिंह, 1893 - 1900 (Exiled) महारानी गिरिराज कौर, regent 1900-1918 महाराजा किशन सिंह, 1900 - 1929 महाराजा ब्रजेन्द्र सिंह, 1929-1947 (Joined the Indian Union) महाराजा विश्वेन्द्र सिंह, वर्तमान महाराजाcabinet minister of rajasthsan(dismissed from position in 2020) मुख्य आकर्षण भरतपुर राष्ट्रीय उद्यान भरतपुर राष्ट्रीय उद्यान केवलादेव घना के नाम से भी जाना जाता है। केवलादेव नाम भगवान शिव को समर्पित मंदिर से लिया गया है जो इस उद्यान के बीच में स्थित है। घना नाम घने वनों की ओर संकेत करता है जो एक समय इस उद्यान को घेरे हुए था। यहाँ करीब ३७५ प्रजातियों के पक्षी पाये जाते हैं जिनमें यहाँ रहने वाले और प्रवासी पक्षी शामिल हैं। यहाँ भारत के अन्य भागों से तो पक्षी आते ही हैं साथ ही यूरोप, साइबेरिया, चीन, तिब्बत आदि जगहों से भी प्रवासी पक्षी आते हैं। पक्षियों के अलावा साम्भर, चीतल, नीलगाय आदि पशु भी यहाँ पाये जाते हैं। गंगा महारानी मंदिर यह मंदिर शहर का सबसे सुंदर मंदिर है। वास्तुकला की राजपूत, मुगल और दक्षिण भारतीय शैली का खूबसूरत मिश्रण गंगा महारानी मंदिर का निर्माण भरतपुर के शासक महाराजा बलवंत सिंह ने करवाया था। मंदिर की दीवारों और खम्भों पर की गयी बारीक और सुंदर नक्काशी दर्शनीय है। मंदिर को पूरा होने में 91 वर्ष समय लगा। यहाँ पूरे देश तथा विदेशों से हजारों श्रद्धालु दर्शन करने आते हैं। केवल श्रद्धा की दृष्टि से ही नहीं बल्कि अपने अद्भुत वास्तुशिल्प के…"} {"text": "[HI Wikipedia] मूलक\n\nमूलक (radical) तत्वों के ऐसे समूह को कहते हैं, जो यौगिकों में एक रासायनिक तत्व सा व्यवहार करता है। यौगिकों में यह किसी तत्व का स्थान ले सकता है अथवा उसे विस्थापित कर सकता है। मूलक में असंयुक्त बंधुता होती है, जिससे यह असंयुक्त दशा में साधारणतया स्थायी नहीं होता, यद्यपि कुछ मूलक, जैसे कार्बोनिल (CO) और नाइट्रोसिल (NO) असंयुक्त पाए गए हैं। मूलक अकार्बनिक और कार्बनिक दोनों प्रकार के हो सकते हैं। अकार्बनिक मूलकों में ऐमोनियम (NH4-), सल्फेट (SO4) और फास्फेट (≡ PO4) एवं कार्बनिक मूलकों में सायनोजन (-CN), बेंजायल (C6H7O-) और मेथाइल (- CH3) उल्लेखनीय हैं। मूलक का विचार गे लुसैक (gay lussac) ने पहले १८१५ ई० में रसायनज्ञों के संमुख रखा था और लिबिख (liebig) और वलर (wohler) ने १८३२ ई० में बेंजायल मूलक पर एक निबंध लिखकर इसके महत्व को बढ़ाया। मूलक में संयोजकता भी होती है। कुछ मूलक एकसंयोजी, कुछ द्विसंयोजी और कुछ त्रिसंयोजी होते हैं। कुछ समय तक कार्बनिक यौगिकों के अध्ययन में मूलकों का बड़ा महत्व था और उनसे अध्ययन में बड़ी सहायता मिलती थी, पर आज इनका महत्व उतना नहीं रह गया है। सन्दर्भ रसायन विज्ञान"} {"instruction": "Create a class in Python to represent books.", "input": "", "output": "class Book:\n def __init__(self, title, author, year, isbn):\n self.title = title\n self.author = author\n self.year = year\n self.isbn = isbn\n \n def __str__(self):\n return '{} by {} published in {}. ISBN: {}'.format(self.title, self.author, self.year, self.isbn)"} {"text": "[CS Wikipedia] Skládání rychlostí\n\nSkládáním rychlostí se ve fyzice zpravidla označuje důsledek speciální teorie relativity, přesněji Lorentzovy transformace. Pohybují-li se dva objekty vůči vztažné soustavě S rovnoběžnými rychlostmi , , pak ve vztažné soustavě S' spojené s prvním z nich se bude druhý pohybovat rychlostí Když jsou obě rychlosti malé ve srovnání s rychlostí světla ve vakuu , je jmenovatel zlomku téměř roven jedné, takže rychlosti lze skládat prostým odčítáním (resp. sčítáním, když se tělesa pohybují opačnými směry). Při malých rychlostech tedy dobře funguje klasická fyzika, při velkých rychlostech se začnou projevovat relativistické efekty. Výsledek skládání rychlostí menších než bude podle relativistického vztahu také vždy menší než . Rychlost světla ve vakuu představuje horní mez rychlosti, jakou se mohou tělesa pohybovat. Pro obecné směry rychlostí platí kde (což je Lorentzův faktor). Zajímavé je, že existuje fyzikální veličina podobná rychlosti, která také popisuje míru pohybu, ale není shora omezená a umožňuje skládání obyčejným sčítáním. Nazývá se rapidita. Související články Lorentzova grupa Lorentzův faktor Rapidita Speciální teorie relativity Rychlost"} {"instruction": "Given a string consisting of alphanumeric characters, separate it into left and right parts so that the left part contains only digits and the right part contains only letters.", "input": "String: Ab243rG", "output": "left, right = '', '' for char in string: if char.isdigit(): left += char else: right += char"} {"instruction": "Convert the following C++ program to Python.", "input": "#include int main() { int i = 0; int x = 0; while(i<5){ x=x+i; i++; } std::cout << x; return 0;", "output": "i = 0 x = 0 while i < 5: x += i i += 1 print(x)"} {"text": "[HI Wikipedia] पारा जिला\n\nपारा सूरीनाम का जिला है, यह देश के उत्तर में स्थित है। इसकी उत्तरी सीमा अटलांटिक महासागर के साथ लगती है। 2004 की जनगणना के अनुसार जिले की आबादी 18,958 है। इसका क्षेत्रफल 5,393 वर्ग किलोमीटर तथा घनत्व 3.5 प्रति वर्ग किलोमीटर है। जिले में पाँच रिसॉर्ट हैं। जिला सूरीनाम में होने वाले खनिकर्म और वानिकी का केंद्र है। यहाँ बड़ी मात्रा में बॉक्साइट का खनन होता है। सूरीनाम के जिले"} {"text": "[CS Wikipedia] Farní sbor Českobratrské církve evangelické v Opatově\n\nFarní sbor Českobratrské církve evangelické v Opatově je sborem Českobratrské církve evangelické v Opatově. Sbor spadá pod Horácký seniorát. V Opatově se nachází evangelický kostel. Farářkou sboru je Pavla Jandečková a kurátorem Libor Zajíček. Historie sboru Evangelický sbor se školou byl po svém vzniku součástí tehdejšího sboru ve Vyskytné. Po vydání tolerančního patentu v roce 1781 se více než polovina obyvatel přihlásila k evangelické víře. Sídlo prvního farního sboru bylo v Moravči, opatovští evangelíci byli součástí filiálního sboru ve Strměchách. V roce 1857 podali evangelíci z Opatova, Jankova, Dušejova, Zbilid, Dudína, Ústí, Nového Rychnova, Vyskytné, Hojkova a Milíčova žádost o zřízení samostatného sboru se sídlem v Opatově. Začátkem roku 1862 byla sepsána Základní listina, ve které se evangeličtí občané uvedených obcí zavázali vydržovat faráře, zřídit faru a postavit kostel. K vyhlášení samostatnosti sboru došlo v roce 1863. V roce 1858 byla zakoupena zemědělská usedlost č. p. 10, která byla upravena na faru. V letech 1864–1868 byl postaven uprostřed návsi kostel v pseudorománském slohu, obdélníkový s poligonálně uzavřeným presbytářem a věží v západním průčelí. Roku 1870 byl na pozemku za farou zřízen hřbitov. 7. září 1879 poškodil značnou část obce požár, postiženo bylo 28 usedlostí a také kostel, fara a škola. Všechny sborové budovy se podařilo v krátkém čase opravit. K evangelickému vyznání se ještě při sčítání lidu v roce 1931 hlásilo 215 z celkového počtu 401 obyvatel. Při posledním sčítání v roce 2001 už to bylo pouze 41 obyvatel z 202. Náboženství se vyučovalo v evangelické škole ve Strměchách až do roku 1832, kdy bylo zahájeno vyučování na soukromé evangelické škole. Tu postavili a učitele zde vydržovali evangelíci z širokého okolí - Opatova, Jankova, Dušejova, Dudína, Milíčova a Hojkova. Vedle dětí z těchto obcí sem postupem času začaly docházet také děti evangelíků z Vyskytné a ze Zbilid. Katolické děti z Opatova chodily do vyskytenské školy až do roku 1916. Tehdy byla soukromá evangelická škola zrušena a zřízena z ní veřejná jednotřídní škola. Za Opatovem se nachází tzv. Farský kázek, jenž je oblíbeným výletním místem. Faráři sboru 1. 8. 1869 - 30. 11. 1912: Vincenc/Čeněk Šimek (farář) 18. 10. 1915 - 31. 7. 1922: Josef Potoček (farář) 1930 - 1932: Josef Štulc (diakon) 1. 9. 1932 - 2. 9. 1934: Miloš Šourek ThB. (vikář) 3. 9. 1934 - 31. 7. 1936: Miloš Šourek ThB. (farář) 16. 2. 1937 - 30. 6. 1938: Bohuslav Pospíšil (farář) 16. 11. 1938 - 30. 11. 1943: Rudolf Šimsa (farář) 1. 12. 1943 - 30. 9. 1947: Jiří Ruml (vikář) 1. 10. 1947 - 14. 9. 1971: Jiří Ruml (farář) 1. 10. 1972 - 14. 2. 1981: Jana Kašparová (vikářka) 1. 7. 1987 - 30. 9. 1991: Vladimír Doule (farář) 1. 3. 1992 - 1. 12. 1995: Jaroslava Soušková (farářka) 1. 9. 2017 - 31.…"} {"instruction": "Implement find_difference() to calculate the absolute difference between two integers.", "input": "input_int1 = 5 input_int2 = 9", "output": "def find_difference(input_int1, input_int2): '''This function calculates the absolute difference between two integers.''' return abs(input_int1 - input_int2) # returns 4"} {"instruction": "Create a function in Python which takes a name as an argument and returns a message “Hello, ”", "input": "", "output": "def hello(name):\n return \"Hello, \"+ name"} {"instruction": "Develop a python program to convert the given text into a list", "input": "Text: Apples, oranges, and bananas", "output": "text = \"Apples, oranges, and bananas\"\n\nlist_from_text = text.split(\", \")\n\nprint(\"List:\", list_from_text)"} {"instruction": "Write a Python program to check whether two strings are anagrams or not.", "input": "s1 = \"listen\"\ns2 = \"silent\"", "output": "def is_anagram(s1, s2):\n s1 = s1.replace(\" \", \"\")\n s2 = s2.replace(\" \", \"\")\n if len(s1) != len(s2):\n return False\n s1_count = Counter(s1)\n s2_count = Counter(s2)\n for i in s1_count:\n if s1_count[i] != s2_count[i]:\n return False\n return True\n\ns1 = \"listen\"\ns2 = \"silent\"\nprint(is_anagram(s1, s2))\n# Output: True."} {"text": "[DE Wikipedia] Mexikanische Sonnenblume\n\nDie Mexikanische Sonnenblume (Tithonia diversifolia) ist eine Pflanzenart aus der Gattung Tithonia innerhalb der Familie der Korbblütler (Asteraceae). Die Mexikanische Sonnenblume gehört nicht zur Gattung der Sonnenblumen (Helianthus). Aber sie zählt genau so wie die Gewöhnliche Sonnenblume und die Topinambur zur Tribus Heliantheae. Vorkommen Die Mexikanische Sonnenblume kommt in der Ruderalvegetation in Mexiko, Guatemala, Honduras, Belize, El Salvador, Nicaragua, Costa Rica und Panama vor. Sie ist ein Neophyt im tropischen und südlichen Afrika, im tropischen Asien, in China, Taiwan, Australien, in Südamerika, in Texas, Florida, auf Inseln in der Karibik, im Pazifik und im Indischen Ozean. Beschreibung und Phänologie Tithonia diversifolia wächst als buschige, ausdauernde krautige Pflanze und erreichen eine Wuchshöhe von bis zu 3 Metern. In den Gesamtblütenständen stehen jeweils bis zu 14 körbchenförmige Blütenstände. Weil diese Spezies zur Unterfamilie Asteroideae zählt, besitzt sie sowohl Röhrenblüten als auch Zungenblüten. Die Zungen- und Röhrenblüten sind rein gelb gefärbt. Die Blütezeit beginnt mit dem Eintritt der zeitlich verminderten Sonneneinstrahlung des Winterhalbjahres und dauert nördlich des Äquators bis März, südlich des Äquators entsprechend von April bis August (Kurztagspflanze). In Mexiko (Estado de Guerrero) gibt es Pflanzen, die nicht von Tageslichtlängen im Blühen beeinflusst werden, sondern durch die Menge und zeitliche Dauer der unregelmäßigen Niederschläge. Die Chromosomenzahl beträgt 2n = 34. Verwendung Die Mexikanische Sonnenblume findet außerhalb Mittelamerikas als Zierpflanze Verwendung. In einigen Ländern, vor allem in Afrika und Asien, gibt es verwilderte Bestände; dort ist sie ein Neophyt. In Südamerika gibt es Ansätze, Tithonia diversifolia als proteinreiche Futterpflanze zu etablieren. Des Weiteren wird versucht, die sich durch gute Biomasseproduktion und hohe Nährstoffgehalte auszeichnende Art zur Gründüngung zu verwenden. Seit den 1990er-Jahren beschäftigt sich die medizinische Forschung unter verschiedenen Aspekten mit den Inhaltsstoffen der Mexikanischen Sonnenblume, insbesondere mit Sesquiterpenen – speziell mit Tagitinin C. In Mexiko werden die Blätter volksheilkundlich in getrockneter Form im Mörser mit Tequila angefeuchtet und zerstampft, dann oral gegen Parasiten des Magen- und Darmtraktes eingenommen. Der Geschmack ist extrem bitter, daher ist der Zusatz von Mangos oder Beeren üblich, die den Geschmack verbessern. Die autonome Universität von Mexiko (UNAM) versucht, dieses Wissen der Naturheiler (Curanderos) wissenschaftlich zu belegen. Quellen Literatur Clara Inés Ríos Katto: Guía para el cultivo y aprovechamiento del botón de oro (Tithonia diversifolia) Hemsl. Gray. In: Serie Ciencia y Tecnología. No. 104.…"} {"instruction": "Find the most frequent character in an inputted string.", "input": "input_string = \"Hello, world\"", "output": "def find_most_frequent_character(input_string): char_count_dict = {} for char in input_string: if char in char_count_dict.keys(): char_count_dict[char] += 1 else: char_count_dict[char] = 1 max_count = 0 max_char = '' for char in char_count_dict.keys(): if char_count_dict[char] > max_count: max_count = char_count_dict[char] max_char = char return max_char"} {"instruction": "Modify the following Java code snippet to include an \"else if\" statement.", "input": "int val=20; if (val > 15) System.out.println(\"val is greater than 15\");", "output": "int val=20; if (val > 15) System.out.println(\"val is greater than 15\"); else if (val == 15) System.out.println(\"val is equal to 15\");"} {"instruction": "Generate a Python program that finds the most frequent element in a list and returns a dictionary containing the element and the number of occurrences.", "input": "Example list: [1, 1, 2, 3, 3, 3, 4, 4, 4, 4]", "output": "def find_frequent(list):\n dictionary = {}\n for element in list:\n if element not in dictionary:\n dictionary[element] = 1\n else:\n dictionary[element] += 1\n\n frequency = max(dictionary.values())\n\n most_frequent = [key for key in dictionary if dictionary[key] == frequency]\n\n return { most_frequent[0] : frequency }\n\nprint(find_frequent([1, 1, 2, 3, 3, 3, 4, 4, 4, 4]))"} {"text": "[HI Wikipedia] सोन्घाई साम्राज्य\n\nसोन्घाई साम्राज्य (Songhai Empire) पश्चिम अफ्रीका में स्थित एक राज्य था, जो आरंभिक पंद्रह सदी से सोलहवीं सदी के अंत तक स्थापित रही। सोन्घाई इतिहास में सबसे बड़ी इस्लामी सलतंनतो में से एक थी। सोंघाई का आरंभ गाव के नदी शहर से हुआ था। शहर के अभिजात वर्ग ने 9 वीं शताब्दी ce के दौरान नाइजर नदी के क्षेत्र में अपने नियंत्रण का विस्तार किया। 14 वीं शताब्दी में माली साम्राज्य के तहत सोंघाईराज्य को शामिल किया गया था, लेकिन 15 वीं शताब्दी में माली के कमजोर पड़ने के कारण इसकी स्वतंत्रता पर फिर से जोर दिया गया। युद्ध के डिब्बे और एक घुड़सवार सेना के साथ सशस्त्र, सोननी अली ने सफल सैन्य अभियानों का नेतृत्व किया जिसमें सोंघाईकी सीमाओं का विस्तार करते हुए टिम्बकटू (1468) और जेने (1473) शहर शामिल थे। सन्दर्भ"} {"instruction": "Is the following statement valid in C++?", "input": "a = (b + c)", "output": "Yes, the statement is valid in C++."} {"instruction": "Write a Python script to find the common elements in two given lists.", "input": "list1 = [1, 2, 3, 5, 7] list2 = [2, 3, 4, 5, 6]", "output": "def common_elements(list1, list2): common_ele = [] for i in list1: for j in list2: if i==j: common_ele.append(i) return common_ele"} {"instruction": "Write a code to find elements in an array that is divisible by a given number.", "input": "arr = [5, 15, 20, 25, 30]", "output": "# Function to find elements in an array that is # divisible by a given number def isDivisible(arr, num): # Stores result res = [] # Iterate over all elements for i in range(0,len(arr)): # If remainder is 0 then add elements # to result if (arr[i] % num == 0): res.append(arr[i]) return res # Driver code arr = [5, 15, 20, 25, 30] num = 5 # Print result print(isDivisible(arr,num))"} {"instruction": "Ensure the string is formatted correctly according to JSON standard.", "input": "{\"name\": shivam\"", "output": "{\"name\": \"shivam\"}"} {"instruction": "Re-write the following Java program in Python.", "input": "public class HelloWorld {\npublic static void main(String[] args) {\n System.out.println(\"Hello World\");\n }\n}", "output": "def main():\n print(\"Hello World\")\n \nif __name__ == \"__main__\":\n main()"} {"instruction": "Create a function to lexicographically compare two strings in\nPython.", "input": "", "output": "def stringCompare(str1, str2):\n if str1 < str2: \n return -1\n elif str1 > str2: \n return 1\n else: \n return 0\n\nstr1 = \"Hello\"\nstr2 = \"World\"\n\nresult = stringCompare(str1, str2)\nif result == -1:\n print (\"str1 is less than str2\")\nelif result == 1:\n print (\"str2 is less than str1\")\nelse:\n print (\"str1 is equal to str2\")"} {"text": "[HI Wikipedia] क्रोएशिया\n\nक्रोएशिया दक्षिण पूर्व यूरोप यानि बाल्कन में पानोनियन प्लेन, और भूमध्य सागर के बीच बसा एक देश है। देश का दक्षिण और पश्चिमी किनारा एड्रियाटिक सागर से मिलता है। देश की राजधानी और सबसे बड़ा शहर जगरेब है, जो तट से भीतर स्थित है। एड्रियाटिक सागर के किनारे कई हज़ार द्वीप हैं, इस समुद्र के किनारे पर्यटन के लिए उपयुक्त परिस्थितियाँ हैं। पूर्व यूगोस्लाविविया के देश इनके पड़ोसी हैं जैसे - उत्तर में स्लोवेनिया और हंगरी, उत्तर पूर्व में सर्बिया, पूर्व में बॉस्निया और हर्ज़ेगोविना और दक्षिण पूर्व में मोंटेंग्रो से इसकी सीमाएं मिलती हैं। एड्रियाटिक सागर के पार इटली है (350 km) जिसका द्वितीय विश्वयुद्ध के दौरान यहाँ उपस्थिति थी। यहाँ के निवासी मुख्यतः क्रोएट हैं जो अपने आपको ह्राओत कहते हैं। यहाँ की भाषा भी पूर्वी स्लाविक वर्ग में आती है। आज जिसे क्रोएशिया के नाम से जाना जाता है, वहां सातवीं शताब्दी में क्रोट्स ने कदम रखा था। उन्होंने राज्य को संगठित किया। तामिस्लाव प्रथम का 925 ई. में राज्याभिषेक किया गया और क्रोएशिया राज्य बना। राज्य के रूप में क्रोएशिया ने अपनी स्वायत्तता करीबन दो शताब्दियों तक बरकरार रखी और राजा पीटर क्रेशमिर चतुर्थ और जोनीमिर के शासन के दौरान अपनी ऊंचाई पर पहुंचा। वर्ष 1102 में पेक्टा समझौता के माध्यम से क्रोएशिया के राजा ने हंगरी के राजा के साथ विवादास्पद समझौता किया। वर्ष 1526 में क्रोएशियन संसद ने फ्रेडिनेंड को हाउस ऑफ हाब्सबर्ग से सिहांसन पर आरुढ़ किया। 1918 में क्रोएशिया ने आस्ट्रिया-हंगरी से अलग होने की घोषणा कर यूगोस्लाविया राज्य में सहस्थापक के रूप में जुड़ गया। द्वितीय विश्व युद्ध के समय नाजियों ने क्रोएशिया के क्षेत्र पर कब्जा जमा स्वतंत्र राज्य क्रोएशिया की स्थापना की। युद्ध खत्म होने के बाद क्रोएशिया दूसरे यूगोस्लाविया के संस्थापक सदस्य के रूप में शामिल हो गया। 25 जून 1991 में क्रोएशिया ने स्वतंत्रता की घोषणा करते हुए संप्रभु राज्य बन गया। भूगोल मध्य में पहाड़ी और तट पर एड्रियाटिक का महत्वपूर्ण स्थान है। औसत तापमान -३ से १८ डिग्री तक रहता है। भूमध्य सागर के किनारे होने से तटीय इलाक़ों में भूमध्यसागरीय जलवायु है। क्षेत्र मध्य क्रोएशिया स्लावोनिया इस्त्रिया डाल्मेशिया महत्वपूर्ण शहर ज़ाग्रेब स्प्लिट ज़दरी रिजेका सलोना पोला ओसिजेक यह भी देखिए wikt:क्रोएशिया (विक्षनरी) सन्दर्भ यूरोप के देश"} {"instruction": "Put the following JavaScript snippet into Standard Form.", "input": "onMouseOver=\"this.style.cursor='pointer'\"", "output": "this.addEventListener(\"mouseover\", function() { this.style.cursor = \"pointer\"; });"} {"instruction": "Implement a Neural Network written in Python using TensorFlow for predicting the local weather.", "input": "Not applicable.", "output": "import tensorflow as tf\n\n# Build the neural network model\nmodel = tf.keras.Sequential([\n tf.keras.layers.Input(shape=(24,)),\n # 8 neurons on the first hidden layer\n tf.keras.layers.Dense(8, activation='relu'),\n # 4 neurons on the second hidden layer\n tf.keras.layers.Dense(4, activation='relu'),\n # Output layer, which will have 3 neurons since we have 3 classes\n tf.keras.layers.Dense(3, activation='softmax')\n])\n\nmodel.compile(optimizer='adam',\n loss=tf.losses.CategoricalCrossentropy(),\n metrics=['accuracy'])\n\n# Train the model\nmodel.fit(X_train, y_train, epochs=10, validation_data=(X_test, y_test))\n\n# Save the model\nmodel.save('weather_predictor_model.h5')"} {"instruction": "Write a Python program for predicting the score of a tennis match given the probabilities of various outcomes.", "input": "An array of 8 floats representing the probabilities for a player to win a point on their serve, break the opponent's serve, win a game on their serve and break the opponent's serve.", "output": "import numpy as np\n\ndef predict_match_score(probabilities):\n p_serve_win = probabilities[0]\n p_opp_serve_win = probabilities[1]\n p_serve_game_win = probabilities[2]\n p_opp_serve_game_win = probabilities[3]\n\n expected_score_serve = p_serve_game_win * (4*p_serve_win + 3*p_opp_serve_win)\n expected_score_opp_serve = p_opp_serve_game_win*(4*p_opp_serve_win + 3*p_serve_win)\n\n total_expected_score = expected_score_serve + expected_score_opp_serve\n return total_expected_score\n\nprobabilities = np.random.random(4)\nprint(predict_match_score(probabilities))"} {"instruction": "Make a Python program to create a rolling average over a list. Rolling average means return the average of the last 3 items of the list.", "input": "mylist = [10, 20, 30, 40, 50]", "output": "def rolling_average(arr):\n last_three = arr[-3:]\n return sum(last_three) / len(last_three)\n\nmylist = [10, 20, 30, 40, 50]\nrolling_avg = rolling_average(mylist)\nprint(\"Rolling average:\", rolling_avg)\n\n# Output:\n# Rolling average: 33.333333333333336"} {"text": "[EN Wikipedia] Cis festivus\n\nCis rotundulus is a species of minute tree-fungus beetle in the family Ciidae. It is found in western Europe. References Ciidae Beetles described in 1793"} {"instruction": "Write a JavaScript function that takes two numbers and returns the sum of all numbers in between the two.", "input": "", "output": "function sumNumbers(x, y) { let sum = 0 for(let i = x; i <= y; i++) { sum += i } return sum }"} {"instruction": "Which type of loops can be used in Python?", "input": "", "output": "Python supports for loops, while loops, and nested loops. Additionally, the loop statement can be used to construct an infinite loop."} {"instruction": "Given the following nested loop structure, write code to print all elements in the array.", "input": "arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "for row in arr: for elem in row: print(elem, end=' ') print() # Output # 1 2 3 # 4 5 6 # 7 8 9"} {"instruction": "Determine the code complexity for the following codse sample.", "input": "def get_sum(list): sum = 0 for num in list: sum += num return sum", "output": "The code complexity of the given function is O(n), where n is the length of the list."} {"instruction": "Create a function that takes in two integers and returns the greatest common divisor (g.c.d).", "input": "", "output": "def gcd(a, b): if a == 0: return b return gcd(b % a, a)"} {"instruction": "Generate a python program to find and print the count of each vowel present in the given string.", "input": "", "output": "vowels = \"aeiou\"\ninput_string = input(\"Input string: \")\n\nvowel_count = {}\nfor char in input_string:\n if char in vowels:\n if char in vowel_count:\n vowel_count[char] += 1\n else:\n vowel_count[char] = 1\n\nprint (vowel_count)"} {"text": "[HI Wikipedia] चाईबासा\n\nचाईबासा (Chaibasa) भारत के झारखंड राज्य के पश्चिमी सिंहभूम ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। यह ऐतिहासिक स्वतंत्रता सेनानी, बिरसा मुंडा, की जन्मभूमि भी है। उद्योग चाईबासा में अधिकांश रोजगार सरकारी संस्थाओं के कर्मचारियों के रूप में है। एसीसी (ACC) नामक सीमेन्ट बनाने वाली कम्पनी का कारखाना चैबासा से १८ किमी दूर झिनकपानी में स्थित है। एस आर रुंगटा समूह, ठाकुर प्रसाद साव ऐंड सन्स, साहा ब्रदर्स आदि कम्पनियाँ यहाँ पर बहुत सारा खनन कार्य करतीं हैं। चाईबासा में अनेकों लघुस्तरीय इस्पात निर्माता कम्पनियाँ स्थित हैं। शैक्षिक संस्थान महाविद्यालय जी सी जैन वाणिज्य महाविद्यालय महिला महाविद्यालय टाटा महाविद्यालय, चाईबासा चाईबासा इंजीनियरिंग महाविद्यालय, चाईबासा आईटीआई आईटीआई, चाईबासा राज आईटीआई इण्टर कॉलेज सूरजमल जैन डीएवी पब्लिक स्कूल डीपीएस इंटर कॉलेज कोल्हान इण्टर कॉलेज सेन्ट जेवियर इंटर कॉलेज, लुपुंगहुटु इन्हें भी देखें पश्चिमी सिंहभूम ज़िला चाईबासा (झारखंड विधानसभा निर्वाचन क्षेत्र) बाहरी कड़ियाँ चाईबासा जिला चाईबासा का लुपुंगहुटू: पेड़ की जड़ों से निकलती गर्म जलधारा सन्दर्भ झारखंड के शहर पश्चिमी सिंहभूम ज़िला पश्चिमी सिंहभूम ज़िले के नगर"} {"instruction": "Using the given input, sort a list containing both numerical and strings data types in Python.", "input": "[1, 'c', 3, 'a', 2, 'b']", "output": "# define list \nlst = [1, 'c', 3, 'a', 2, 'b']\n\n# sort list\nsorted_lst = sorted(lst, key=lambda x:str(x))\n\n# print sorted list\nprint(sorted_lst)"} {"instruction": "Create a Python program to generate a random password of 8 characters with 1 upper case, 1 lower case, 1 number, and 1 special character.", "input": "Not applicable", "output": "import string\nimport random\n\nchars = string.ascii_uppercase + string.ascii_lowercase + string.digits + string.punctuation\n\ndef generate_password(size=8, chars=chars):\n return ''.join(random.choice(chars) for _ in range(size))\n\nprint(generate_password())"} {"instruction": "Create a Bitcoin wallet application using Python. This application should have endpoints for creating a wallet, sending coins to another wallet, and retrieving the balance of a wallet.", "input": "Wallet address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "output": "import hashlib\nimport base58\n\nclass BitcoinWallet:\n def __init__(self):\n self.address = None\n self.public_key = None\n self.private_key = None\n self.balance = 0\n\n def generate_keys(self):\n priv_key = hashlib.sha256(os.urandom(64)).hexdigest()\n public_key = hashlib.sha256(priv_key.encode('utf-8')).hexdigest()\n self.private_key = priv_key\n self.public_key = public_key\n self.address = self.generate_address()\n\n def generate_address(self):\n address = hashlib.new('ripemd160', self.public_key.encode('utf-8')).hexdigest()\n address_encoded = base58.b58encode_check(address)\n return address_encoded\n\n def send_coins(self, recipient, amount):\n ...\n\n def check_balance(self):\n ..."} {"instruction": "Analyse the sentiment of the given sentence using python.", "input": "Sentence: I am so excited that I was chosen for the job.", "output": "from textblob import TextBlob\n\n# Get the sentiment of the sentence\nsentence = 'I am so excited that I was chosen for the job.'\nblob = TextBlob(sentence)\nsentiment = blob.sentiment\nprint('Polarity:', sentiment.polarity) # Output: Polarity: 0.8"} {"instruction": "Create a SQL query that returns 10 rows of the table 'exampleTable'.", "input": "", "output": "SELECT * FROM exampleTable LIMIT 10;"} {"instruction": "Convert the given SQL query into an equivalent MongoDB query.", "input": "SELECT * FROM users WHERE age BETWEEN 18 AND 24", "output": "db.users.find( { age: { $gte: 18, $lte: 24 } } )"} {"text": "[CS Wikipedia] Kino\n\nKino neboli biograf je místo (obvykle budova), které je určeno k hromadnému sledování filmových představení. Filmový projektor, který je umístěn vzadu v projekční kabině, promítá film na plátno, které je umístěno vpředu před hledištěm. Do hlediště se běžný divák dostane teprve po zaplacení vstupného, obvykle až po zakoupení vstupenky. Etymologie Název kino je odvozen z řeckého kinēma (pohyb) a graf (záznam, z grafō = píši). Starší označení biograf pochází z řeckého bios (život, bio- = životo-) . Původní název byl kinematograf (čili záznam pohybu) nebo biograf (záznam života). Thomas Alva Edison si dal roku 1889 patentovat pod označením kinematograf kameru, pod názvem kinetoskop filmovou promítačku, zvukový doprovod obstarával další Edisonův vynález - fonograf. V hovorové řeči došlo ke spojení a zkrácení obou termínů na kino (bio v období první republiky), ve slangové řeči na biák. Od výše uvedených slov je také odvozeno označení pro klasický fotografický materiál nazývaný kinofilm. Kino s více sály nazýváme multikino. Části kina hlediště - prostor určený pro diváky filmové plátno - promítací plocha, na níž je pomocí promítacího stroje zobrazován filmový obraz promítací kabina - místnost určená pro skladování filmových kopií a provoz promítacího stroje, pracoviště promítače vestibul, šatna, sociální zařízení (zejména záchod s umyvadlem) technické systémy promítací stroje ozvučení sálu - zvuková aparatura vnitřní osvětlení nouzové osvětlení vzduchotechnická zařízení, ventilace (odvětrávání sálu) vytápění sálu, případně klimatizační zařízení havarijní systémy, zde zejména protipožární zařízení Druhy kin Letní kino Termínem letní kino označujeme specializované kino, které není provozováno v zastřešeném sále, ale pod širým nebem. V zastřešeném prostoru se zde z praktických důvodů obvykle nachází pouze promítací přístroj a sklad filmů. Vzhledem k tomu, že prostor není možné vytápět a zatemnit, bývá takovéto kino v provozu pouze během letních měsíců a pouze v pozdních večerních hodinách. Bývá proto zřizováno např. ve velkých rekreačních oblastech, které jsou provozně vytížené pouze v létě. více o letním kinu... Autokino Termínem autokino se označuje kino, jehož hlediště je uzpůsobeno tak, že se na promítaný film mohou dívat diváci usazení ve svých automobilech. Zvuk je přehráván do jednotlivých automobilů prostřednictvím např. autorádií. Autokino se v Česku stalo populární zejm. kvůli pandemii covidu-19. Klasické kino a multikino Termínem klasické kino a multikino označujeme, kino ve vnitřních prostorách. Klasické kino má pouze 1 sál, oproti multikinu, který jich má víc (Mladá Boleslav 4). Jedním s nejrozšířenějším firem kin patří Cinestar. Více o multikinu... Galerie Historie…"} {"instruction": "Create a Python script to convert JSON data to CSV format.", "input": "{\n “name”: “John”,\n “age”: 30,\n “city”: “New York”\n}", "output": "import csv\nimport json\n\ndata = {\n “name”: “John”,\n “age”: 30,\n “city”: “New York”\n}\n\nwith open('data.csv', 'w') as csvfile:\n writer = csv.writer(csvfile)\n writer.writerow([\"Name\", \"Age\", \"City\"])\n writer.writerow([data[\"name\"], data[\"age\"], data[\"city\"]])"} {"instruction": "Write a function in Python that takes in a string and returns true if it is a palindrome, and false otherwise.", "input": "text = \"racecar\"", "output": "def is_palindrome(text):\n return text == text[::-1]"} {"instruction": "Construct a HTML page that displays a form with a text field and a submit button.", "input": "", "output": " Sample Form
      "} {"text": "[CS Wikipedia] Botzaris (stanice metra v Paříži)\n\nBotzaris je nepřestupní stanice pařížského metra na lince 7bis v 19. obvodu v Paříži. Nachází se na Rue de Botzaris u východního cípu rozsáhlého veřejného Parku des Buttes-Chaumont. Historie Stanice byla otevřena 18. ledna 1911 jako součást boční větve linky 7. Dne 3. prosince 1967 se severní větev linky 7 mezi stanicemi Louis Blanc a Pré Saint-Gervais stala samostatnou linkou s označením 7bis a stanice Botzaris se stala její součástí. Z této stanice směřuje linka do stanice Place des Fêtes už jako jednosměrná a po okruhu se sem vrací ze stanice Danube. Název Stanice nese jméno řeckého vlastence Markose Botzarise (1788-1823), který bojoval proti Turkům ve válce za nezávislost. Victor Hugo o něm psal ve své básnické sbírce z roku 1829 Východní zpěvy (Les Orientales). Zajímavosti v okolí Parc des Buttes-Chaumont Reference Externí odkazy Záznam v evidenci historických památek Stanice metra v 19. obvodu (Paříž) Stanice metra v Paříži chráněné jako historické památky Historické památky v 19. obvodu (Paříž) Stanice metra nazvané po osobách"} {"text": "[EN Wikipedia] Lagodon\n\nLagodon is a genus of saltwater fish in the family Sparidae, the breams and porgies. It is monotypic, being represented by the single species Lagodon rhomboides, commonly known as pinfish. Other common names include pin perch, sand perch, choffer, and butterfish. It inhabits mostly subtropical shallow coastal waters of the Atlantic and Gulf coasts of the United States and Mexico. Description The pinfish is a small fish, growing only to about . Both the male and the female have a silvery sheen with five to six vertical bars on the side. They have olive backs with yellow and white pigmentation and blue, green, and purple iridescence. The anterior dorsal fin has 12 rigid, spiny rays capable of superficially puncturing human skin, giving the species its common name, pinfish. Range The pinfish is found in Bermuda and along the United States coast from Massachusetts to Texas, and down along the Mexican Gulf Coast. It is also found along the northern Yucatán coast and near some northern Caribbean islands, but it is less common in the tropical portions of its range. Habitat The adult pinfish prefers waters between 30 and 50 feet deep, while the juvenile is more common where there is some cover, such as seagrass beds, rocky bottoms, jetties, pilings, and mangroves. It prefers higher-salinity water. It rarely schools, but it associates with other individuals, especially where food items such as barnacles are abundant. Diet Pinfish undergo ontogenetic changes in the morphology of their dentition and gut tracts which affect diet throughout their life history. Juvenile pinfish are carnivorous and primarily eat shrimp, fish eggs, insect larvae, polychaete worms, and amphipods. As pinfish become older and larger they become increasingly more herbivorous, with plant matter comprising >90% of the diet for pinfish greater than 100mm. Predators The pinfish is prey for alligator gar, longnose gar, ladyfish, spotted sea trout, red drum, southern flounder, pelicans, grouper, cobia, snook and bottlenose dolphins. Reproduction Sexual maturity is reached at about one year, when the fish is 80 to 100 mm in length. Spawning season is in the fall and winter. Eggs are broadcast in the water by the female, then fertilized by the male. The number of eggs varies from 7,000 to 90,000. They hatch after about 48 hours. Larvae are not protected by adults. The larval stage ends when the fish is about 12 mm in length, and the juvenile reaches maturity when it is about 80 mm. Because this species is eaten by many other animals, its life span is generally short. Commercial and recreational significance The pinfish are not generally sought as sport or food in the United States due to its small size and numerous small bones. It is used as live bait by anglers targeting tarpon, red drum,…"} {"instruction": "Use Python to create a dictionary whose keys are strings and whose values are lists containing numbers.", "input": "keys = [\"cat\", \"dog\", \"mouse\"]\nvalues = [1, 2, 3]", "output": "my_dict = {\"cat\": [1], \"dog\": [2], \"mouse\": [3]}"} {"instruction": "Develop an API in Python to convert between different units of measurement.", "input": "Not applicable", "output": "# Dictionary with conversion factors\nFACTORS = {\n 'in': 2.54,\n 'cm': 0.39,\n 'ft': 30.48,\n 'm': 1\n}\n\ndef convert(from_unit, to_unit, value):\n \"\"\"\n Convert between measurement units.\n \"\"\"\n factor = FACTORS[from_unit]/FACTORS[to_unit]\n return factor * value\n\n# Test the function\nprint(convert('in', 'cm', 10)) # Output: 25.4\nprint(convert('ft', 'm', 15)) # Output: 4.572"} {"instruction": "Create a Python script to parse a JSON string and return the value of the given field.", "input": "{\"name\": \"John\", \"age\": 30}", "output": "def get_value(json_string, field):\n json_dict = json.loads(json_string)\n return json_dict[field]"} {"instruction": "Create an AI-friendly program in Python to remove duplicates from a list of numbers.", "input": "list1 = [1, 2, 3, 2, 4, 5, 1];", "output": "def remove_duplicates(list1): \n new_list = [] \n for num in list1: \n if num not in new_list: \n new_list.append(num) \n return new_list \n\nremove_duplicates(list1)"} {"text": "[DE Wikipedia] Stanley-Cup-Playoffs 1952\n\nDie Playoffs um den Stanley Cup des Jahres 1952 begannen am 25. März 1952 und endeten am 15. April 1952 mit dem 4:0-Erfolg der Detroit Red Wings über die Canadiens de Montréal. Die Red Wings gewannen damit ihren zweiten Titel in den letzten drei Jahren sowie den insgesamt fünften ihrer Franchise-Geschichte. Zudem gewannen sie in den Playoffs jedes ihrer acht Spiele, was zuvor nur den Boston Bruins (1929) und den Canadiens de Montréal (1924) gelungen war, die allerdings jeweils weniger Partien bestritten. Unterdessen ließ Terry Sawchuk, der Torwart Detroits, kein einziges Gegentor auf heimischem Eis zu. Die Canadiens hingegen verloren ihr zweites Endspiel in Serie, nachdem sie im Vorjahr mit 1:4 an den Toronto Maple Leafs gescheitert waren. Die Maple Leafs wiederum wurden zum ersten amtierenden Stanley-Cup-Sieger, der in der ersten Playoff-Runde durch einen Sweep ausschied. Modus Für die Playoffs qualifizierten sich die vier besten Teams der Liga. Im Halbfinale standen sich der Erste und der Dritte sowie der Zweite und der Vierte der Abschlusstabelle gegenüber. Die jeweiligen Sieger bestritten anschließend das Stanley-Cup-Finale. Alle Serien wurden dabei im Best-of-Seven-Modus ausgetragen, das heißt, dass ein Team vier Siege zum Weiterkommen benötigte. Das höher gesetzte Team hatte dabei in den ersten beiden Spielen Heimrecht, die nächsten beiden das gegnerische Team. Sollte bis dahin kein Sieger aus der Runde hervorgegangen sein, wechselte das Heimrecht von Spiel zu Spiel. So hatte die höher gesetzte Mannschaft in den Spielen 1, 2, 5 und 7, also vier der maximal sieben Spiele, einen Heimvorteil. Von diesem üblichen Modus wurde in diesem Endspiel allerdings abgewichen, so hatte in diesem Jahr das niedriger gesetzte Team zuerst Heimrecht. Bei Spielen, die nach der regulären Spielzeit von 60 Minuten unentschieden blieben, folgte die Overtime. Sie endete durch das erste erzielte Tor (Sudden Death). Qualifizierte Teams (1) (2) (3) (4) Playoff-Baum Halbfinale (1) Detroit Red Wings – (3) Toronto Maple Leafs (2) Canadiens de Montréal – (4) Boston Bruins Stanley-Cup-Finale (1) Detroit Red Wings – (2) Canadiens de Montréal Stanley-Cup-Sieger Bill Tibbs (Tor) und Hugh Coflin (Abwehr) wurden ursprünglich auf der Trophäe verewigt, werden heute allerdings nicht mehr offiziell zum Siegerkader gezählt. Beide absolvierten kein Spiel für die Red Wings. Beste Scorer Abkürzungen: GP = Spiele, G = Tore, A = Assists, Pts = Punkte, PIM = Strafminuten; Fett: Bestwert Beste Torhüter Die kombinierte Tabelle zeigt die drei besten Torhüter in der Kategorie Gegentorschnitt sowie den jeweils Führenden in Shutouts und Siegen. Abkürzungen: GP = Spiele, Min = Eiszeit (in Minuten), W = Siege, L = Niederlagen, GA = Gegentore, SO = Shutouts, GAA = Gegentorschnitt; Fett: Bestwert;…"} {"text": "[HI Wikipedia] समारा ओब्लास्त\n\nसमारा ओब्लास्त (रूसी: Сама́рская о́бласть, अंग्रेज़ी: Samara Oblast) रूस का एक ओब्लास्त (области या प्रांत) है। सोवियत संघ के ज़माने में, १९३६ से १९९० तक, इसका नाम कुय्बिशेव ओब्लास्त (Ку́йбышевская о́бласть, Kuybyshev Oblast) था। इस ओब्लास्त की राजधानी भी 'समारा' नामक शहर ही है। लोग २०१० की जनगणना के हिसाब से समारा ओब्लास्त के समुदाय इस प्रकार थे: रूसी (८५.६%), तातार (४.१%), चुवाश (२.७%), मोर्दवीनी (२.१%), युक्रेनी (१.४%) और आर्मेनियाई (०.७%)। सन्दर्भ समारा ओब्लास्त रूस के ओब्लास्त रूस के प्रशासनिक विभाग"} {"instruction": "Create a program in Python that takes a list as input and returns a new list with every element doubled.", "input": "[1, 2, 3, 4]", "output": "def double_list(numbers):\n doubled_list = []\n for num in numbers:\n doubled_list.append(num*2)\n return doubled_list"} {"instruction": "Write a Python code to generate a random number between 10 and 50.", "input": "", "output": "import random \n \nrandom_number = random.randint(10, 50) \n \nprint(\"Random number between 10 and 50 is\", random_number)"} {"instruction": "Identify the data structure most suitable for storing 100 unique integers.", "input": "", "output": "Hash Table"} {"instruction": "Design a recursanve function in Python that prints a given string in reverse.", "input": "hello", "output": "def print_string_reverse(str): if not str: return else: print_string_reverse(str[1:]) print(str[0], end='')"} {"instruction": "Find the mean of the elements in this array.", "input": "Array: [2, 3, 5, 4, 9]", "output": "The mean of the elements in this array is 4.8."} {"instruction": "Construct a HTML table with four columns.", "input": "", "output": "
      Column 1 Column 2 Column 3 Column 4
      "} {"instruction": "Produce a 3D array from a given list of numbers.", "input": "[1, 2, 3, 4, 5, 6]", "output": "[[[1], [2], [3]], [[4], [5], [6]]]"} {"instruction": "Can you develop a Python script that takes in a URL and prints out the source code?", "input": "url = 'http://www.example.org/'", "output": "import urllib.request\n \nurl = 'http://www.example.org/'\n\nresponse = urllib.request.urlopen(url)\n\nprint(response.read())"} {"instruction": "Given a list of numbers, extend the list such that it contains the square of the elements present in the list.", "input": "numbers = [1,2,3]", "output": "numbers = [1,2,3,1,4,9]"} {"instruction": "Write a function in Python to convert a year from Roman Numerals to Arabic numbers.", "input": "Provide the year in Roman Numerals `MCMXCVIII`", "output": "# define a dictionary of Roman Numerals to Arabic numbers\nroman = {\n 'I': 1,\n 'V': 5,\n 'X': 10,\n 'L': 50,\n 'C': 100,\n 'D': 500,\n 'M': 1000\n}\n\ndef roman_to_arabic(roman_string):\n total = 0\n #Split the Roman number into characters\n chars = [char for char in roman_string]\n\n #If the length of the Romans is 0, return 0\n if (len(chars)==0):\n return 0\n\n # Start from the end\n x = len(chars)-1\n\n #Stores previous character\n last_char = 'I'\n\n #Loop through all characters of string\n while (x>=0):\n #Store current character\n current_char = chars[x]\n\n #Check if the current character is greater than or equal to last character\n if (current_char == last_char or roman[current_char]<=roman[last_char]):\n total+=roman[current_char]\n\n else:\n total-=roman[current_char]\n\n last_char = current_char\n x-=1\n\n return total\n\n#Convert MCMXCVIII to Arabic numbers\nprint(roman_to_arabic('MCMXCVIII')) # Output: 1998"} {"instruction": "Generate a C code snippet to print a given string with a width of 20 characters.", "input": "Hello", "output": "#include #include int main(){ char str[20] = \"Hello\"; printf(\"%-20s\\n\", str); return 0; }"} {"text": "[CS Wikipedia] Amennacht\n\nAmennacht (v překladu z egyptštiny „Amon je silný“) je staroegyptské jméno, které může označovat: Amennachta – místokrále Núbie v době panovnice Hatšepsuty Amennachta – písaře a kresliče v Dér el-Medíně v době Ramesse III. a Ramesse IV. Amennachta – hrdinu stejnojmenné povídky, kterou napsal na motivy starověkého Egypta František Lexa Související články Amennachtovo naučení – hrdinu stejnojmenné povídky Egyptská jména"} {"text": "[HI Wikipedia] पर्सनल डिजिटल एसिस्टेंट\n\nपीडीए या पर्सनल डिजिटल असिस्टंट एक ऐसा छोटा कंप्यूटर है जिसे आप डिजिटल डायरी की तरह जेब में कहीं भी ले जा सकते हैं। यह एक साधारण कंप्यूटर की तरह ही काम करता है लेकिन आप इसे मोबाइल फ़ोन की तरह या फिर इंटरनेट पर जाने के भी इस्तेमाल कर सकते हैं। पीडीए में लिखने के लिए एक विशेष पेन्सिल का इस्तेमाल होता है। इसके ज़रिए आप ठीक वैसे ही लिख सकते हैं जैसे की स्कूल में कॉपी में लिखा करते थे। वैसे कई पीडीए में कीबोर्ड पर टाइप करने की सुविधा भी होती है। अब बाज़ार में ऐसे पीडीए भी मिलने लगे हैं जो आपकी आवाज़ पहचान कर उसे शब्दों में उतार सकते हैं। लेकिन ये सुविधा अभी बहुत कम भाषाओं में ही उपलब्ध है"} {"text": "[CS Wikipedia] Šroub\n\nŠroub (z něm. Schraube) je typ spojovacího materiálu, součástka tvořená hlavou umožňující otáčení pomocí šroubováku nebo klíče a dříkem opatřeným vnějším závitem. Společně s maticí a případně podložkou umožňuje vytvořit rozebíratelný šroubový spoj. Šroub lze zašroubovat i do jiného otvoru opatřeného závitem, tím se liší od vrutu a samořezného šroubu, které se šroubují přímo do materiálu. Stavěcí šroub nemá hlavu a slouží podobně jako závlačka k zajištění. Síla otáčení Závit na šroubu (šroubovice) působí jako nakloněná rovina, obtočená kolem jeho dříku. Otáčením se šroub posouvá vůči matici nebo součásti s vnitřním závitem, a to s podstatně větší silou než jaká šroubem otáčí. Proto se šrouby užívají například u mechanických zvedáků, šroubových lisů a dalších zařízení, kde je třeba vyvinout velkou sílu. Závit běžných šroubů je samosvorný, takže šroubový spoj drží spojované součástky pohromadě velkou silou a trvale. Toho využívají například šroubové uzávěry. Jen tam, kde se součásti například trvale otřásají, jako v motorech, v letadlech a dopravních strojích, se musí šroub i matka zajistit proti samovolnému povolení spoje. Síla F1 potřebná k otáčení šroubu: kde F2 je síla, která posouvá šroub, d je výška jednoho závitu (stoupání) , r je poloměr šroubu. V praxi se ještě počítá s třením a veličina potřebná pro utažení (povolení) šroubu se udává jako krouticí moment. Jemný a přesný posuv Otáčivý pohyb šroubu se převádí na daleko menší podélný posuv a díky tomu vyvozuje značnou sílu. Jedna otočka šroubu způsobí posuv o stoupání závitu, čehož lze využít k jemnému podélnému pohybu. Měřicí šroub mikrometru se každou otáčkou posune o 1 mm a je-li opatřen větší válcovou hlavou se stupnicí, dovoluje odměřovat setiny nebo i tisíciny milimetru. Posuvové šrouby obráběcích strojů umožňují přesné nastavení nástroje vůči obrobku a tím i přesnou výrobu. Technické vlastnosti V technické praxi patří šroub mezi rozebíratelné spojovací součástky, ať už spolu s maticí nebo bez matice tvoří šroubový spoj. V případě, kdy ve spoji není použita matice, bývá šroub zašroubován (zavrtán) do otvoru se závitem. Rozměry a materiály šroubů jsou dány mezinárodními standardy ISO, EN ISO, ASTM nebo národními např. ČSN, DIN nebo podnikovými normami (např. PN nebo LiAB). Typ hlavy Podle účelu se používají šrouby s různě upravenou hlavou. Pro malé průměry šroubů se nejčastěji používají hlavy s následujícími tvary se zapuštěnou hlavou, s čočkovou hlavou, s válcovou hlavou, s půlkulatou, šestihrannou ostatní typy (okrasné, vratové). Drážka Drážka je vnitřní prohlubeň v hlavě, do které se vkládá utahovací nástroj odpovídajícího tvaru. Dříve se používala jednoduchá (plochá) drážka, tedy zářez do hlavy šroubu, který ovšem vede nástroj jen jednom směru, kdežto ve směru drážky může nástroj…"} {"instruction": "Write a recursive function to calculate the Fibonacci sequence.", "input": "", "output": "def fibo(n): if n <= 1: return n else: return(fibo(n-1) + fibo(n-2)) # take input from the user nterms = 10 # check if the number of terms is valid if nterms <= 0: print(\"Please enter a positive integer\") else: print(\"Fibonacci sequence:\") for i in range(nterms): print(fibo(i))"} {"instruction": "Create an SQL query that sums all the numbers from the 'number' column in the table 'test_data'?", "input": "Table Name: test_data Columns: number", "output": "SELECT SUM(number) FROM test_data;"} {"text": "[DE Wikipedia] Xanthinurie\n\nDie hereditäre Xanthinurie ist eine autosomal-rezessiv vererbte Stoffwechselkrankheit. Dabei handelt es sich um eine Störung im Purinstoffwechsel. Es liegt eine Schwäche des Enzyms Xanthin-Oxidase (XO) vor. Epidemiologie Die Xanthinurie ist eine sehr seltene Erkrankung. Aber noch wesentlich seltener wird sie erkannt. Der Zeitpunkt der Erstmanifestation kann extrem variieren. Es können zum einen bereits im Säuglingsalter, zum anderen aber erst im fortgeschrittenen Senium die ersten Symptome entstehen. Tendenziell betrifft die Xanthinurie aber Kinder. Subklinische (symptomlose) Verlaufsformen finden sich nicht selten. Eine iatrogene (ärztlich verursachte) Xanthinurie kommt manchmal bei Gichtpatienten durch Applikation des XO-Inhibitors (Xanthinoxidasehemmer) Allopurinol vor. Auch ein Kofaktormangel (Eisen, FAD, Molybdän) des Enzyms kann dessen Aktivität drosseln, und eine Xanthinurie bedingen. Pathogenese Die Xanthinoxidase katalysiert die Umwandlung von Hypoxanthin und Xanthin zu Harnsäure. Dies geschieht hauptsächlich in der Leber und in den Darmepithelien. Dort ist die Xanthinoxidaseaktivität am höchsten. Als Nebenprodukt dieses Oxidierungsprozesses entsteht Wasserstoffperoxid (H2O2), welches mittels Peroxidasen entfernt werden muss. Ein Mangel an Xanthinoxidase führt zu einer Senkung des Harnsäurespiegels, sowie zum Rückstau und somit eines Anstiegs der Blutspiegel von Xanthin und Hypoxanthin. Für Hypoxanthin besitzt der menschliche Stoffwechsel (Intermediärmetabolismus) die alternative Möglichkeit des Abbaus über den Salvage-Pathway (mittels des Enzyms Hypoxanthin-Phosphoribosyltransferase und Rückführung in den Purinstoffwechsel) – deshalb ist der Hypoxanthinspiegel weniger stark erhöht. Das sehr gut nierengängige Xanthin hingegen kann nicht wiederverwertet werden, es muss ausgeschieden werden, und wird nun massenhaft über den Harn ausgeschieden. In den ableitenden Harnwegen kommt es infolge zu den o. g. Krankheitssymptome. Diagnose Richtungsweisend für die Diagnose sind die hohen Xanthinspiegel in Blut und Harn. Die Xanthinausscheidung kann um das 15fache gesteigert sein. Der Hypoxanthinspiegel ist, aufgrund dessen Wiederverwertung weniger deutlich erhöht. Symptomatik Da Xanthin eine ausgezeichnete Nierengängigkeit (renale Clearance) besitzt, beschränken sich die Symptome fast ausschließlich auf die ableitenden Harnwege. Nur sehr selten kann es auch zu Xanthinablagerungen in anderen Organen, wie z. B. der Muskulatur kommen. Die Xanthinurie Typ II geht einher mit verlangsamter geistigen Entwicklung, Autismus, kortikalen Nierenzysten, einer Nephrokalzinose, Osteopenie, gestörter Haarbildung und Zahnentwicklungsstörungen. Man findet Nephrolithiasis bzw. Urolithiasis: Xanthinsteine in den Nieren und ableitenden Harnwegen, Kristallurie: Ausscheiden…"} {"instruction": "Parse data from a given JSON object.", "input": "data: { \"data\": [ { \"name\": \"John\", \"age\": 24 }, { \"name\": \"Bob\", \"age\": 26 } ] }", "output": "import json data = '{\"data\":[{\"name\":\"John\",\"age\":24},{\"name\":\"Bob\",\"age\":26}]}' parsed_data = json.loads(data) for item in parsed_data['data']: print(item['name'] + \" is \" + str(item['age']) + \"years old.\")"} {"text": "[CS Wikipedia] Kawasaki Zephyr 1100\n\nKawasaki Zephyr 1100 je motocykl firmy Kawasaki kategorie nakedbike, vyráběný v letech 1992-1998. Slabší modely jsou Kawasaki Zephyr 750, Kawasaki Zephyr 550 a pro Japonsko vyráběný Zephyr 400. Popis Nakedbike klasické koncepce se vzduchem chlazeným řadovým čtyřválcem a dvěma tlumiči vzadu místo centrálního tlumiče. Slabinou je vyšší hmotnost a spotřeba při jízdě po dálnici. Technické parametry pro modelový rok 1992 Motor: čtyřdobý řadový čtyřválec Zdvihový objem: 1062 cm³ Ventilový rozvod: DOHC 2 ventily na válec Vrtání x zdvih: 73,5x62,6 mm Výkon při otáčkách: 67,9 kW (93k) při 8000/min Točivý moment: 88,26 Nm při 7000/min Kompresní poměr: 9:1 Chlazení: vzduchem Počet rychlostí: 5 Sekundární převod: řetěz Rám: dvojitý kolébkový ocelový Rozvor: Délka: Šířka: Výška: Výška sedla: 795 mm Brzdy vpředu: 2 kotouče Brzdy vzadu: 1 kotouč Pneu vpředu: 120/70 ZR18 Pneu vzadu: 160/70 ZR17 Suchá hmotnost: 242 kg Pohotovostní hmotnost: 266 kg Objem nádrže: 19 l Maximální rychlost: 207 km/h Externí odkazy Bikez.com model 1992 Ojetina Kawasaki Zephyr Zephyr 1100"} {"instruction": "Create a python function for calculating the total cost of an item after tax and discounts are applied.", "input": "Price: 150\nDiscount: 20\nTax Rate: 0.1", "output": "def calculate_cost(price, discount, tax_rate):\n discount_amount = price * (discount / 100.0)\n total = price - discount_amount\n tax = total * (tax_rate / 100.0)\n final_cost = total + tax\n return final_cost\n\nprice = 150\ndiscount = 20\ntax_rate = 0.1\nfinal_cost = calculate_cost(price, discount, tax_rate)\nprint(final_cost)"} {"instruction": "Create a Python program that takes a string as input and returns its top 3 most frequent characters", "input": "", "output": "def most_frequent_chars(s):\n d = {}\n for i in s:\n if i not in d:\n d[i] = 0\n d[i]+=1\n d = sorted(d.items(),key = lambda x:x[1], reverse=True)\n return [k for k ,v in d[:3]]"} {"instruction": "Create a C++ class for a student with the attributes \"first name\", \"last name\" and \"marks\".", "input": "", "output": "class Student { private: string firstName; string lastName; int marks; public: // constructor and methods };"} {"instruction": "Write a Python function to compare two lists and return the elements that are in both of them.", "input": "list1 = [3, 5, 7, 8] list2 = [3, 5, 10, 12]", "output": "def compare_lists(list1, list2): return [x for x in list1 if x in list2]"} {"text": "[DE Wikipedia] Tokanui\n\nTokanui steht für: Tokanui (Southland), Ortschaft in der Region Southland, Neuseeland Tokanui (Waikato), Ortschaft in der Region Waikato, Neuseeland"} {"text": "[HI Wikipedia] अष्टाध्यायी\n\nअष्टाध्यायी (अष्टाध्यायी = आठ अध्यायों वाली) महर्षि पाणिनि द्वारा रचित संस्कृत व्याकरण का एक अत्यंत प्राचीन ग्रंथ (8वी ई पू) है। इसमें आठ अध्याय हैं; प्रत्येक अध्याय में चार पद हैं; प्रत्येक पद में 38 से 220 तक सूत्र हैं। इस प्रकार अष्टाध्यायी में आठ अध्याय, बत्तीस पद और सब मिलाकर लगभग 4000 सूत्र हैं। अष्टाध्यायी पर महामुनि कात्यायन का विस्तृत वार्तिक ग्रन्थ है और सूत्र तथा वार्तिकों पर भगवान पतंजलि का विशद विवरणात्मक ग्रन्थ महाभाष्य है। संक्षेप में सूत्र, वार्तिक एवं महाभाष्य तीनों सम्मिलित रूप में 'पाणिनीय व्याकरण' कहलाता है और सूत्रकार पाणिनी, वार्तिककार कात्यायन एवं भाष्यकार पतंजलि - तीनों व्याकरण के 'त्रिमुनि' कहलाते हैं। अष्टाध्यायी छह वेदांगों में मुख्य माना जाता है। अष्टाध्यायी में 3155 सूत्र और आरंभ में वर्णसमाम्नाय के 14 प्रत्याहार सूत्र हैं। अष्टाध्यायी का परिमाण एक सहस्र अनुष्टुप श्लोक के बराबर है। महाभाष्य में अष्टाध्यायी को \"सर्ववेद-परिषद्-शास्त्र\" कहा गया है। अर्थात् अष्टाध्यायी का संबंध किसी वेदविशेष तक सीमित न होकर सभी वैदिक संहिताओं से था और सभी के प्रातिशरूय अभिमतों का पाणिनि ने समादर किया था। अष्टाध्यायी में अनेक पूर्वाचार्यों के मतों और सूत्रों का संनिवेश किया गया। उनमें से शाकटायन, शाकल्य, अभिशाली, गार्ग्य, गालव, भारद्वाज, कश्यप, शौनक, स्फोटायन, चाक्रवर्मण का उल्लेख पाणिनि ने किया है। अष्टाध्यायी का समय अष्टाध्यायी के कर्ता पाणिनि कब हुए, इस विषय में कई मत हैं। भंडारकर और गोल्डस्टकर इनका समय 7वीं शताब्दी ई.पू. मानते हैं। मैकडानेल, कीथ आदि कितने ही विद्वानों ने इन्हें चौथी शताब्दी ई.पू. माना है। भारतीय अनुश्रुति के अनुसार पाणिनि नंदों के समकालीन थे और यह समय 5वीं शताब्दी ई.पू. होना चाहिए। पाणिनि में शतमान, विंशतिक और कार्षापण आदि जिन मुद्राओं का एक साथ उल्लेख है उनके आधार पर एवं अन्य कई कारणों से हमें पाणिनि का काल यही समीचीन जान पड़ता है। संरचना अष्टाध्यायी में आठ अध्याय हैं और प्रत्येक अध्याय में चार पद हैं। पहले दूसरे अध्यायों में संज्ञा और परिभाषा संबंधी सूत्र हैं एवं वाक्य में आए हुए क्रिया और संज्ञा शब्दों के पारस्परिक संबंध के नियामक प्रकरण भी हैं, जैसे क्रिया के लिए आत्मनेपद-परस्मैपद-प्रकरण, एवं संज्ञाओं के लिए विभक्ति, समास आदि। तीसरे, चौथे और पाँचवें अध्यायों में सब प्रकार के प्रत्ययों का विधान है। तीसरे अध्याय में धातुओं में प्रत्यय लगाकर कृदंत शब्दों का निर्वचन है और चौथे तथा पाँचवे अध्यायों में संज्ञा शब्दों में प्रत्यय जोड़कर बने नए संज्ञा शब्दों का विस्तृत निर्वचन बताया गया है। ये प्रत्यय जिन अर्थविषयों को प्रकट करते हैं उन्हें व्याकरण की परिभाषा में वृत्ति कहते हैं, जैसे वर्षा में होनेवाले इंद्रधनु को वार्षिक इंद्रधनु कहेंगे। वर्षा में होनेवाले इस विशेष अर्थ को प्रकट करनेवाला \"इक\" प्रत्यय तद्धित प्रत्यय है। तद्धित प्रकरण में 1,190 सूत्र हैं और कृदंत प्रकरण में 631। इस प्रकार कृदंत, तद्धित प्रत्ययों के विधान के लिए अष्टाध्यायी के 1,821 अर्थात् आधे से कुछ ही कम सूत्र विनियुक्त हुए हैं। छठे, सातवें और आठवें अध्यायों में उन परिवर्तनों का उल्लेख है जो शब्द के अक्षरों में होते हैं। ये परिवर्तन या तो मूल शब्द में…"} {"text": "[CS Wikipedia] Věda\n\nVěda jako celek je systematický způsob racionálního a empirického poznávání skutečnosti zaměřený na spolehlivost výsledků a často i na možnosti predikce a aplikace (aplikované vědy). Předmětem vědeckého poznání jsou objekty a procesy reálného světa. Základní dělení reálného světa pro účely poznání je na živý a neživý. Tak předmětem zkoumání jsou např. procesy ve vesmíru, vlastnosti a vztahy mikročástic hmoty, procesy myšlení nebo procesy a vztahy v lidské společnosti. Do vědy zahrnujeme i abstraktní exaktní svět vytvořený lidským intelektem: matematika, formální logiky, geometrie a další. Vztah obou těchto světů je ten, že za jistých podmínek (viz dále Věda exaktní a neexaktní) může být reálný svět modelován exaktním světem, jinými slovy věda matematizována. Vědou se často rozumějí i jednotlivé vědní obory obvykle charakterizované svou metodou a předmětem (oblastí zkoumání). Výsledky věd mohou sloužit i k různým aplikacím, například technickým, společenským, ekonomickým, pedagogickým nebo válečným. Nové poznatky ve vědě jsou rozvíjeny výzkumem vědců. Etymologie Slovo věda převzali obrozenci z polštiny a souvisí se slovesem věděti, které má ve všech slovanských jazycích i řadu odvozenin. V češtině například vědomí, dověděti se, vědma atd. Staročeský présens je vědě a později vjem. Podle prof. Machka je nejstarší tvar voidém, který souvisí s veid a viděti. Definice vědy Věda je propracované a obecné empirické a rozumové poznávání vycházející z pozorování, rozvažování nebo experimentu. Věda je systém metodicky podložených, objektivních vět o určité předmětné oblasti. Předmětem může přitom být každý fakt uchopitelný buďto bezprostředně, anebo pomocí instrumentálních, pomocných prostředků. Další definice Nepřetržitý proces lidského poznávání přírody, společnosti, člověka, lidského myšlení a kultury. Na rozdíl od běžného poznávání jde ve vědě o systematické racionální a metodické vyvozování a zobecňování nových poznatků na základě abstraktního myšlení a teoretické činnosti. V širokém smyslu nepřetržitý společensky podmíněný proces systematického racionálního poznávání přírody, společnosti a myšlení, při němž vzniká stále bohatší a přesnější odraz objektivní reality ve vědomí. Věda také znamená stále hlubší chápání a pronikání od povrchových jevů k jejich příčinám, což umožňuje stále rozsáhlejší využívání a ovládání přírodních i společenských procesů a stále účinnější praktické přetváření světa člověkem. Její výsledky jsou i nenahraditelnou kulturní hodnotou. V evropském novověku se věda rozdělila na jednotlivé vědy, když se už v pozdním starověku začala oddělovat od filozofie, podobně jako se řecká filozofie kdysi oddělila od mytologie a náboženství. Na rozdíl od umění, jež si osvojuje pouze určité aspekty reality, spjaté s životem člověka obraznou formou…"} {"instruction": "Place the missing parenthesis in the given algorithm.", "input": "for i = 1 to n if (A[i] == x) start = i; end = i + k – 1;", "output": "for (i = 1; i <= n; i++) if (A[i] == x) start = i; end = i + k - 1;"} {"instruction": "Use a random number generator to generate random numbers between 1 and 10.", "input": "", "output": "import random def random_numbers(): for _ in range(10): num = random.randint(1, 10) print(num) random_numbers()"} {"instruction": "Explain what a REST API is.", "input": "", "output": "A REST API is a web interface that uses HTTP methods (GET, POST, PUT, DELETE) to access resources identified by URLs, typically exchanging JSON."} {"text": "[EN Wikipedia] Mboro\n\nMboro is a town in the Thiès Region of western Senegal. It is in the Tivaouane Department. The population in 2013 was 27,693. The town received commune status in 2002. Mboro is situated 25 km west of Tivaouane and 117 km north of Dakar. There is a phosphate mine and factory in Mboro. References Populated places in Thiès Region Communes of Senegal"} {"instruction": "Create a function \"distance\" that takes two sets of coordinates in the form of [x1, y1] and [x2, y2] and computes the Euclidean distance between them.", "input": "", "output": "def distance(c1, c2): \"\"\"Function to calculate Euclidean distance between two sets of coordinates\"\"\" x1, y1 = c1 x2, y2 = c2 return math.sqrt((x2 - x1)**2 + (y2 - y1)**2)"} {"instruction": "Create a Python program to detect the presence of outliers in a dataset.", "input": "Check for outliers in the following dataset: [30, 45, 12, 18, 32, 44, 25]", "output": "def find_outlier(arr):\n mean = sum(arr)/len(arr)\n stdev = (sum([(x-mean)**2 for x in arr])/len(arr))**(0.5)\n\n for i in arr:\n z_score = (i - mean)/stdev\n if z_score >= 3 or z_score <= -3:\n return i\n \n # no outliers found\n return None\n \narr = [30, 45, 12, 18, 32, 44, 25]\n \noutlier = find_outlier(arr)\nprint(outlier)"} {"instruction": "Write a function to extract a specific key from a dictionary.", "input": "{'a':1, 'b':2, 'c':3}", "output": "def extract_key(dictionary, key): return dictionary.get(key)"} {"instruction": "Generate a complete SQL query to select fields from a table", "input": "Table name: Orders Fields: Orderid, Price", "output": "SELECT OrderID, Price FROM Orders;"} {"text": "[DE Wikipedia] Liste der Naturdenkmale in Offenau\n\nDie Liste der Naturdenkmale in Offenau nennt die verordneten Naturdenkmale (ND) der im baden-württembergischen Landkreis Heilbronn liegenden Gemeinde Offenau. In Offenau gibt es zwei als Naturdenkmal geschützte Objekte, beide sind flächenhafte Naturdenkmale (FND), keines ist ein Einzelgebilde-Naturdenkmal (END). Stand: 1. November 2016. Flächenhafte Naturdenkmale (FND) Weblinks Schutzgebietsverzeichnis der Landesanstalt für Umwelt, Messungen und Naturschutz Baden-Württemberg Übersichtstabelle: FND Naturdenkmale Offenau"} {"instruction": "Create a for loop that prints the first five numbers of the Fibonacci sequence.", "input": "", "output": "let x = 0; let y = 1; for (let i = 0; i < 5; i++) { let z = x + y; console.log(z); x = y; y = z; }"} {"text": "[CS Wikipedia] Pardubice\n\nPardubice () jsou univerzitní a statutární město v okrese Pardubice na východě Čech, metropole Pardubického kraje s výraznou správní, obytnou, obslužnou a výrobní funkcí pardubicko-hradecké aglomerace. Leží ve východní části Polabí na soutoku řek Labe a Chrudimky, přibližně 100 kilometrů východně od Prahy a 20 kilometrů jižně od Hradce Králové v nadmořské výšce přibližně 220 metrů. Pardubice mají obyvatel, a jsou tak devátým největším městem Česka, jsou také největším městem Pardubického kraje i okresu Pardubice. Výměra území města je 82,7 km². Pardubice se dělí na 8 samosprávných městských obvodů a 20 katastrálních území. První dochovaná zmínka o existenci Pardubic pochází z roku 1295, k roku 1340 jsou už připomínány jako město. Největší rozkvět prodělaly za pánů z Pernštejna. Na konci 16. století a v 17. století nastal úpadek. Nový rozvoj města přišel od poloviny 19. století s připojením města na železnici. Vznikla zde řada průmyslových podniků jako lihovar, cukrovar, továrna na mlýnské stroje, Fantova rafinérie minerálních olejů a další. Po druhé světové válce došlo k masivní výstavbě nových čtvrtí především na okraji města a počet obyvatel se rychle zdvojnásobil. Sídlí zde Univerzita Pardubice, dále např. okresní soud a pobočka krajského soudu. Historické centrum je od roku 1964 městskou památkovou rezervací. Hlavními průmyslovými odvětvími jsou průmysl chemický, strojírenský a elektrotechnický. Už od 16. století jsou proslulé výrobou perníku. Významné sportovní události jsou slavné koňské dostihy Velká pardubická, motocyklový závod Zlatá přilba, Mezinárodní festival šachu Czech Open či tenisová Pardubická juniorka. Známá je železniční a letecká doprava. Od roku 1909 tu sídlí Východočeské divadlo, působí zde profesionální Komorní filharmonie Pardubice. Etymologie Původní ves, doložená v roce 1295, nesla název Pordoby. Místní jméno tedy dříve znělo Pordobice (1318 „de Pordobitz“), tj. „ves lidí Pordobových“. Pordobice se nacházely na území dnešní čtvrti Pardubičky, jihovýchodně od středu města. Dle jedné teorie jméno do Polabí přinesli z Polska mniši řádu cyriaků (podle polského místního jména Porydęb), kteří spravovali zdejší kapli sv. Jiljí. Dle jiné teorie existovalo pojmenování „in Pordabii“ v listině z roku 1295, tedy ještě před příchodem zmíněných mnichů, a naopak polská místní jména jsou odkazem na české Pardubice. Hláskovou změnu Pordob- na Pardub- lze vysvětlit snahou po disimilaci dvou -o- a možná i mylnou asociací se spojením „pár dubů“, popřípadě osobním jménem Pardus; výklad není zcela jistý. Německá podoba názvu města zní Pardubitz. Dějiny První dochovaná zmínka o existenci Pardubic pochází z roku 1295, kdy papež Bonifác VIII. potvrdil zdejší klášter cyriaků a kostel sv. Bartoloměje. Pánové z Pardubic a Pernštejnové Prvním…"} {"instruction": "Create a Python class that constructor prints “Hello World”.", "input": "", "output": "class HelloWorld:\n def __init__(self):\n print(“Hello World”)"} {"instruction": "Generate a function in Python which takes an array as an argument and returns an array of length two, with the first element being the maximum value and the second element being the minimum value of the array.", "input": "[1, 5, 7, 3, 9]", "output": "def minmax(array):\n max_val = max(array)\n min_val = min(array)\n return [max_val, min_val]"} {"text": "[HI Wikipedia] सचिन\n\nसचिन तेंदुलकर - भारतीय क्रिकेट खिलाड़ी सचिन पिलगांवकर - हिंदी फ़िल्म अभिनेता, निर्माता व निर्देशक सचिन पायलट - भारतीय संसद सदस्य सचिन देव बर्मन - हिन्दी और बांग्ला फिल्मों के विख्यात संगीतकार व गायक"} {"instruction": "Create a numerical sequence using Ruby code with 4 elements.", "input": "", "output": "[1, 2, 4, 8]"} {"instruction": "Create a new list that is the combination of two other given lists.", "input": "list_a = [\"A\", \"B\", \"C\"] list_b = [1, 2, 3]", "output": "new_list = [\"A\", \"B\", \"C\", 1, 2, 3]"} {"text": "[CS Wikipedia] Kyselina m-chlorperoxybenzoová\n\nKyselina meta-chlorperoxybenzoová (též kyselina m-chlorperoxybenzoová) je karboxylová peroxokyselina často používaná v organické syntéze jako oxidační činidlo. Obvykle se upřednostňuje před ostatními peroxokyselinami, protože se snáze skladuje. Mezi hlavní způsoby jejího použití patří přeměna ketonů na estery (Baeyerova-Villigerova oxidace), epoxidace alkenů (Priležajevova reakce), přeměna silylenoletherů na silyl α-hydroxyketony (Rubottomova oxidace), oxidace thioetherů na sulfoxidy a sulfony a oxidace aminů na aminoxidy. Je to silné oxidační činidlo, které při styku s hořlavými látkami může způsobit požár. Příprava Kyselina m-chlorperoxybenzoová se dá připravit reakcí m-chlorbenzoylchloridu s peroxidem vodíku za přítomnosti síranu hořečnatého, hydroxidu sodného a 1,4-dioxanu a následným okyselením. Dostupnost a čistota Jako čistá látka může kyselina m-chlorperoxybenzoová vybouchnout při nárazu nebo dotekem s jiskrami. Z tohoto důvodu se prodává jako méně než 72% směs. Peroxykyselina může být přečištěna promytím komerčního materiálu mírně zásaditým pufrem a následným sušením. Peroxykyseliny jsou obecně o něco slabší než odpovídající karboxylové kyseliny a tak lze zvýšit jejich čistotu opatrným pozměněním pH. Čistá kyselina je dostatečně odolná vůči rozkladu, pokud je skladována při nízkých teplotách v plastových nádobách. V případech, kdy musí být známa přesná koncentrace kyseliny meta-chlorperoxybenzoové, může být vzorek titrován za účelem zjištění přesné koncentrace aktivního oxidačního činidla. Příklad reakce Na následujícím obrázku je znázorněna reakce kyseliny cyklohexenu s kyselinou meta-chlorperoxybenzoovou za vzniku epoxidu: Cis nebo trans izomerie alkenového výchozího materiálu zůstává zachována. Odkazy Externí odkazy Reference m-chlorperoxybenzoová Organochloridy Oxidační činidla Organické peroxidy Reagencia pro organickou chemii"} {"instruction": "Create a PHP code to check if an array contains a given item.", "input": "$input_array = array(1,2,3,4,5); $item_to_check = 3;", "output": ""} {"text": "[CS Wikipedia] Symplektická varieta\n\nSymplektická varieta je pojem z matematiky, přesněji z diferenciální geometrie. Formalizuje v rámci matematiky fyzikální pojem fázového prostoru. Definice Dvojici nazveme symplektická varieta, pokud je (hladká) varieta a je tzv. symplektická diferenciální forma na , tj. pro každé je symplektický vektorový prostor a navíc , tj. je uzavřená. Poznámka je tzv. tečný prostor k v bodě a je vyčíslení diferenciální -formy v bodě , tj. bilineární forma. Operátor je tzv. de Rhamův diferenciál či vnější diferenciál. Příklady 1) Kotečný bandl libovolné hladké variety konečné dimenze vybavený diferenciálem tzv. Liouvilleovy formy je symplektická varieta. Speciálně symplektický vektorový prostor je symplektická varieta. Kotečné bandly jsou matematické modely fázových prostorů. 2) Torus spolu s formou , kde a jsou tzv. poledníkové a rovnoběžníkové souřadnice na toru, je symplektická varieta. Analogicky pro tory vyšších dimenzí. Obdobně libovolný torus sudé dimenze je symplektickou varietou. Eliptická křivka nad tělesem komplexních čísel, protože je z hlediska diferenciální geometrie torem, je rovněž symplektická. 3) Sféra spolu s formou kde a jsou std. souřadnice na sféře, je symplektická varieta. Jde o jedinou sféru, na níž existuje symplektická forma, jak plyne z tvrzení níže a z toho, že -tá (ko)homologická grupa sfér je až na první a -tou nula. 4) Každá Kahlerova varieta je symplektická. Existují ale symplektické variety, které nejsou Kahlerovy. Tvrzení 1. Pokud je kompaktní symplektická varieta, potom není exaktní, tj. speciálně druhá kohomologická grupa 2. Darbouxova věta: Pokud je symplektická varieta dimenze , pak pro každé existuje mapa (), že , kde jsou standardní souřadnice na . Darbouxova věta říká, že symplektická varieta nemá žádné lokální diferenciálně geometrické invarianty, tj. lokálně vypadá symplektická forma vždy stejně. Globální alespoň částečné invarianty existují, viz předchozí větu. Aplikace Teorie symplektických variet nabízí matematický model Hamiltonovy mechaniky. Je podstatnou složkou tzv. zrcadlité symetrie pocházející z teorie strun. Postupuje se takto. Nechť je symplektická varieta a nechť je hladká funkce na (každá taková funkce se v klasické mechanice nazývá Hamiltonián). Vektorové pole na se nazývá Hamiltonovo vektorové pole pro Hamiltonovský systém, pokud , kde je kontrakce tenzorového pole omega polem X. Integrální křivky pole jsou možnými pohyby mechanického systému s Hamiltoniánem . Poissonova závorka je -bilineární zobrazení definované , a . Z toho, že symplektická forma je uzavřená, plyne tzv. Jacobiho identita pro Poissonovu závorku Diferenciální geometrie"} {"instruction": "Build a linear regression model using python.", "input": "", "output": "import pandas as pd \nfrom sklearn.linear_model import LinearRegression \nfrom sklearn.metrics import mean_squared_error\n\n# Read data\ndata = pd.read_csv('data.csv')\nX = data[['x']]\ny = data['y']\n\n# Create a linear regression model\nmodel = LinearRegression()\nmodel.fit(X,y)\n\n# Make predictions\npredictions = model.predict(X)\n\n# Calculate the mean squared error\nmse = mean_squared_error(y, predictions)\nprint(mse)"} {"instruction": "Create a Python class that encodes a given number using the Base58 algorithm.", "input": "number = 123456789", "output": "class Base58Encoder: '''This class encodes numbers using the Base58 algorithm''' def __init__(self,number): self.number = number def encode(self): encoded = \"\" alphabet = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\" while self.number > 0: remainder = self.number % 58 self.number = self.number // 58 encoded = alphabet[remainder] + encoded return encoded"} {"text": "[DE Wikipedia] Rainer Schumann\n\nRainer Schumann (* 5. Mai 1964 in Hannover) ist ein deutscher Schlagzeuger und ist Mitglied der Rockband Fury in the Slaughterhouse. Leben 1987 gründete Schumann zusammen mit den Brüdern Kai und Thorsten Wingenfelder, Christof Stein-Schneider und Hannes Schäfer die Rockband Fury in the Slaughterhouse, die sich im Jahr 2008 vorübergehend aufgelöst hat. 2013 gab die Band nochmals ein Konzert auf der Expo Plaza in Hannover vor 25.000 Zuschauern. 2017 erschien das Best-of-Album „30“ mit 6 neuen Titeln. Es gab Open-Air-Konzerte und 3 ausverkaufte Shows in der Tui Arena Hannover. Seitdem besteht die Band weiter und veröffentlicht im Jahr 2021 das Album \"Now\". 2022 folgt eine ausgedehnte Open-Air Tournee. Von 2011 bis 2012 gibt Rainer Schumann Trommelseminare in Schulen im Rahmen von Vorträgen zum Thema Suchtprävention. 2013 veröffentlicht Schumann unter dem gleichen Namen das Album „Sunshine, Love, Music and Football“. Die SCHUMANN-BAND formiert sich 2014 und spielt mehrere Konzerte. 2022 erscheint das SCHUMANN-Album \"Bin Dran\". Schumann ist Initiator des Projektes „KLANG & LEBEN“, einem Projekt zur musikalischen und rhythmischen Begleitung demenzkranker Menschen. Film Das Lied meines Lebens. Wie Musik die Erinnerung zurückbringt. Ein Film von Thomas Karp für die ARD-Reihe „Gott und die Welt“. Weblinks Fury in the Slaughterhouse https://www.facebook.com/rainer.schumann.5 https://www.facebook.com/furyintheslaughterhouseofficial Schlagzeuger Fury in the Slaughterhouse Musiker (Deutschland) Person (Hannover) Deutscher Geboren 1964 Mann"} {"instruction": "Code a program in Python to calculate the mean from a dataset", "input": "[0.07, 0.69, 0.29, 0.17, 0.11, 0.51, 0.5]", "output": "def calculate_mean(numbers):\n total = 0\n for num in numbers:\n total += num\n return total / len(numbers)\n \ndataset = [0.07, 0.69, 0.29, 0.17, 0.11, 0.51, 0.5]\nmean = calculate_mean(dataset)\nprint(mean) # Output: 0.3542857142857143"} {"text": "[HI Wikipedia] ऋग्वेद\n\nसनातन धर्म का सबसे आरम्भिक स्रोत है। इसमें १० मण्डल, १०२८ सूक्त और वर्तमान में १०,४६२ मन्त्र हैं, मन्त्र संख्या के विषय में विद्वानों में कुछ मतभेद है। मन्त्रों में देवताओं की स्तुति की गयी है। इसमें देवताओं का यज्ञ में आह्वान करने के लिये मन्त्र हैं। यही सर्वप्रथम वेद है। ऋग्वेद को इतिहासकार हिन्द-यूरोपीय भाषा-परिवार की अभी तक उपलब्ध पहली रचनाओं में एक मानते हैं। यह संसार के उन सर्वप्रथम ग्रन्थों में से एक है जिसकी किसी रूप में मान्यता आज तक समाज में बनी हुई है। यह सनातन धर्म का प्रमुख ग्रन्थ है। ऋग्वेद की रचनाओं को पढ़ने वाले ऋषि को होत्र कहा जाता है। ऋग्वेद सबसे पुराना ज्ञात वैदिक संस्कृत पुस्तक है। इसकी प्रारम्भिक परतें किसी भी इंडो-यूरोपीय भाषा में सबसे पुराने मौजूदा ग्रन्थों में से एक हैं। ऋग्वेद की ध्वनियों और ग्रन्थों को दूसरी सहस्राब्दी ईसा पूर्व से मौखिक रूप से प्रसारित किया गया है। दार्शनिक और भाषायी साक्ष्य इंगित करते हैं कि ऋग्वेद संहिता के थोक की रचना भारतीय उपमहाद्वीप के उत्तर-पश्चिमी क्षेत्र में हुई थी। ऋक् संहिता में १० मण्डल तथा बालखिल्य सहित १०२८ सूक्त हैं। वेद मन्त्रों के समूह को सूक्त कहा जाता है, जिसमें एकदैवत्व तथा एकार्थ का ही प्रतिपादन रहता है। ऋग्वेद में ही मृत्युनिवारक त्र्यम्बक-मंत्र या मृत्युंजय मन्त्र (७/५९/१२) वर्णित है, ऋग्विधान के अनुसार इस मन्त्र के जप के साथ विधिवत व्रत तथा हवन करने से दीर्घ आयु प्राप्त होती है तथा मृत्यु दूर हो कर सब प्रकार का सुख प्राप्त होता है। विश्व-विख्यात गायत्री मन्त्र (ऋ० ३/६२/१०) भी इसी में वर्णित है। ऋग्वेद में अनेक प्रकार के लोकोपयोगी-सूक्त, तत्त्वज्ञान-सूक्त, संस्कार-सुक्त उदाहरणतः रोग निवारक-सूक्त (ऋ॰ १०/१३७/१-७), श्री सूक्त या लक्ष्मी सूक्त (ऋग्वेद के परिशिष्ट सूक्त के खिलसूक्त में), तत्त्वज्ञान के नासदीय-सूक्त (ऋ॰ १०/१२९/१-७) तथा हिरण्यगर्भ सूक्त (ऋ॰ १०/१२१/१-१०) और विवाह आदि के सूक्त (ऋ॰ १०/८५/१-४७) वर्णित हैं, जिनमें ज्ञान विज्ञान का चरमोत्कर्ष दिखलाई देता है। इस ग्रन्थ को इतिहास की दृष्टि से भी एक महत्त्वपूर्ण रचना माना गया है। ईरानी अवेस्ता की गाथाओं का ऋग्वेद के श्लोकों के जैसे स्वरों में होना, जिसमें कुछ विविध भारतीय देवताओं जैसे अग्नि, वायु, जल, सोम आदि का वर्णन है। कालनिर्धारण और ऐतिहासिक सन्दर्भ ऋग्वेद किसी भी अन्य इण्डो-आर्यन पाठ की तुलना में कहीं अधिक पुरातन है। इस कारण से, यह मैक्स मूलर और रूडोल्फ रोथ के समय से पश्चिमी विद्वानों के ध्यान के केन्द्र में था। ऋग्वेद वैदिक धर्म के प्रारम्भिक चरण को दर्ज करता है। प्रारम्भिक ईरानी अवेस्ता के साथ मजबूत भाषायी और सांस्कृतिक समानताएं हैं, जो प्रोटो-इंडो-ईरानी काल से व्युत्पन्न हैं, अक्सर प्रारम्भिक एण्ड्रोनोवो संस्कृति (या बल्कि, प्रारम्भिक एण्ड्रोनोवो के भीतर सिंटाष्ट संस्कृति) से जुड़ी हैं। क्षितिज) २००० ईसा पूर्व। ऋग्वेद का समय ईपू १०००० से अधिक प्राचीनतम माना गया है। =प्रमुख विषय ऋग्वेद के विषय में कुछ प्रमुख बातें निम्नलिखित है- ॠग्वेद में कुल दस मण्डल हैं जिनमें १०२८ सूक्त हैं और कुल १०,५८० ऋचाएँ हैं। इन मण्डलों में कुछ मण्डल छोटे हैं और कुछ बड़े हैं। ऋग्वेद विश्व का सबसे प्राचीन ग्रंथ है जो वर्तमान समय में उपलब्ध है।…"} {"instruction": "Compare two objects and return 0 if the objects are equal, greater than 0 if the first object is larger, and less than 0 if the second object is larger.", "input": "Object 1 - [name: John, age: 30] Object 2 - [name: Jane, age: 28]", "output": "int compareObjects(Object obj1, Object obj2) { if (obj1.name == obj2.name) { return obj1.age - obj2.age; } else { return obj1.name.compareTo(obj2.name); } }"} {"text": "[CS Wikipedia] Thérèse Schwartze\n\nThérèse Schwartze (20. prosince 1851, Amsterdam – 23. prosince 1918, Amsterdam) byla nizozemská malířka a litografka. Převážnou část její tvorby tvoří portréty. Život Mládí a studia Narodila se do umělecké rodiny, její otec Johann Georg Schwartze byl malíř a byl prvním, kdo jí dával lekce malířství. Sestra Georgine byla sochařka a dcera její druhé sestry Clary Theresie, Lizzy Ansingh byla též malířka. V letech 1873 – 1875 navštěvovala uměleckou akademii Rijksakademie van beeldende kunsten v Amsterdamu. Pak studovala rok u Gabriela Maxe a Franze von Lenbacha v Mnichově. V roce 1879 odjela do Paříže pokračovat ve studiích malířství u Jean-Jacques Hennera. V roce 1906 se provdala za Antona van Duyla, šéfredaktora časopisu Algemeen Handelsblad. Kariéra Jako jedna z mála žen, malířek, byla ceněna za přínos světové portrétní malbě a byla přizvána vystavovat svá díla v Galleria degli Uffizi ve Florencii.Byla nejen talentovanou malířkou, ale i zdatnou obchodnicí. Zobrazovala „beau monde“ 19. století a její představitele z královské rodiny, což jí zajišťovalo značný finanční příjem. Získala mezinárodní renomé řadou výstav v Evropě i v zámoří a stala se velmi úspěšnou ve svém oboru. To ale bylo zároveň předmětem kritiky v její vlastní zemi, ve společnosti s příslovečnou kalvinistickou zaujatostí. Ta přijímala s nelibostí její, na tehdejší dobu, moderní portréty, její aktivní roli ve veřejném životě i velké honoráře, které dostávala za své obrazy, zvláště, když „jejím zákazníkem byl král“. Její portréty se vyznačovaly elegancí, vytříbenou malířskou technikou, při které používala široké a rázné tahy štětcem a také sytou barevností. Zároveň dokázala přesně vystihnout charakter zobrazovaných osob. Mezi těmi, které portrétovala byli ženy i muži z královského rodu, mladé dívky a ženy z vážených rodin, ale také dívky ze sirotčince, děti bohatých rodičů, uznávaní profesoři z Universiteit Leiden, ale i židovský obchodník se starožitnostmi. Na autoportrétech z různých časových období, dokázala věrně zachytit i vlastní proces stárnutí. Portréty zpracovávala nejen technikou olejomalby na plátně, ale také jako pastely na papíru. Kromě malířské techniky se věnovala též leptu a litografii. Závěr života 22. července 1918 zemřel její manžel Anton van Duyl. Malířka byla již tou dobou sama nemocná a také se velmi trápila jeho smrtí. Zemřela náhle 23. prosince téhož roku. Je pohřbena na hřbitově Nieuwe Ooster v Amsterdamu. Dílo Významná díla Thérèse Schwartze jsou zastoupena ve třech velkých amsterdamských muzeích a na Universiteit Leiden. Museum Van Loon Poetret van Louise van Loon-Borski, (1867) Portret van Jacoba Johanna Borski-van Hoey Smit, (1867) Portret van Hendrik Maurits van Loon (1890) Joods Historisch Museum (Židovské historické museum) Joodse antiekhandelaar…"} {"instruction": "Write an SQL query to count the number of records with age greater than 25 from a given table.", "input": "", "output": "SELECT COUNT(*) FROM table WHERE age > 25;"} {"instruction": "Can you create a program for web scraping using Python?", "input": "", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# Send a request to the URL\nres = requests.get(\"https://www.example.com\")\n\n# Parse the response\nsoup = BeautifulSoup(res.text, 'html.parser')\n\n# Extract the data\ndata = soup.find_all('div')"} {"text": "[HI Wikipedia] पाकिस्तान\n\nइस्लामी जम्हूरिया पाकिस्तान () या पाकिस्तान इस्लामी गणतंत्र या सिर्फ पाकिस्तान भारत के पश्चिम में स्थित एक इस्लामी गणराज्य है। 21 करोड़ की आबादी के साथ ये दुनिया का पाँचवी बड़ी आबादी वाला देश है। पाकिस्तान में दुनिया की दूसरी सबसे बड़ी मुस्लिम आबादी है। यह 8,81,913 वर्ग किलोमीटर (3,40,509 वर्ग मील) क्षेत्र में फैला 33 वाँ सबसे बड़ा देश है। यहाँ की प्रमुख भाषाएँ उर्दू, पंजाबी, सिंधी, बलूची और पश्तो हिंदी हैं। पाकिस्तान की राजधानी इस्लामाबाद और अन्य महत्वपूर्ण नगर कराची व लाहौर रावलपिंडी हैं। पाकिस्तान के चार सूबे हैं: पंजाब, सिंध, बलोचिस्तान और खैबर पख्तूनख्वा। कबाइली इलाके और इस्लामाबाद भी पाकिस्तान में शामिल हैं। इन के अलावा आजाद कश्मीर और गिलगित-बल्तिस्तान भी पाकिस्तान द्वारा नियंत्रित हैं। पाकिस्तान का अस्तित्व सन् 1947 में भारत के विभाजन के फलस्वरूप आया था। सर्वप्रथम सन् 1930 में कवि (शायर) मुहम्मद इकबाल ने द्विराष्ट्र सिद्धांत का जिक्र किया था। उन्होंने भारत के उत्तर-पश्चिम में सिंध, बलूचिस्तान, पंजाब तथा अफगान (सूबा-ए-सरहद) को मिलाकर एक नया राष्ट्र बनाने की बात की थी। सन् 1933 में कैंब्रिज विश्वविद्यालय के छात्र चौधरी रहमत अली ने पंजाब, सिंध, कश्मीर तथा बलोचिस्तान के लोगों के लिए पाक्स्तान (जो बाद में पाकिस्तान बना) शब्द का सृजन किया। सन् 1947 से 1970 तक पाकिस्तान दो भागों में बँटा रहा - पूर्वी पाकिस्तान और पश्चिमी पाकिस्तान। दिसंबर, सन् 1971 में भारत के साथ हुई लड़ाई के फलस्वरूप पूर्वी पाकिस्तान बांग्लादेश बना और पश्चिमी पाकिस्तान पाकिस्तान रह गया। नाम का उदभव पाकिस्तान शब्द का जन्म सन् 1933 में कैंब्रिज विश्वविद्यालय के छात्र चौधरी रहमत अली के द्वारा हुआ पाक्स्तान के रूप में हुआ था। आज के पाकिस्तानी भूभाग का मानवीय इतिहास कम से कम 5000 वर्ष पुराना है, यद्यपि इतिहास पाकिस्तान शब्द का जन्म सन् 1933 में कैंब्रिज विश्वविद्यालय के छात्र चौधरी रहमत अली के द्वारा हुआ। आज का पाकिस्तानी भूभाग कई संस्कृतियों का गवाह रहा है। ईसापूर्व 3300-1800 के बीच यहाँ सिंधु घाटी सभ्यता का विकास हुआ। यह विश्व की चार प्राचीन ताम्र-कांस्यकालीन सभ्यताओं में से एक थी। इसका क्षेत्र सिंधु नदी के किनारे अवस्थित था पर गुजरात (भारत) और राजस्थान में भी इस सभ्यता के अवशेष पाए गए हैं। मोहनजोदड़ो, हड़प्पा इत्यादि स्थल पाकिस्तान में इस सभ्यता के प्रमुख अवशेष-स्थल हैं। इस सभ्यता के लोग कौन थे इसके बारे में विद्वानों में मतैक्य नहीं है। कुछ इसे आर्यों की पूर्ववर्ती शाखा कहते हैं तो कुछ इसे द्रविड़। कुछ इसे बलोची भी ठहराते हैं। इस मतभेद का एक कारण सिंधु-घाटी सभ्यता की लिपि का नहीं पढ़ा जाना भी है। ऐसा माना जाता है कि 1500 ईसापूर्व के आसपास आर्यों का आगमन पाकिस्तान के उत्तरी क्षेत्रों के मार्फत भारत में हुआ। आर्यों का निवास स्थान कैस्पियन सागर के पूर्वी तथा उत्तरी हिस्सों में माना जाता है जहाँ से वे इसी समय के करीब ईरान, यूरोप और भारत की ओर चले गए थे। सन् 543 ईसापूर्व में पाकिस्तान का अधिकांश इलाका ईरान (फारस) के हखामनी साम्राज्य के अधीन आ गया। लेकिन उस समय इस्लाम का उदय नहीं हुआ था; ईरान के लोग जरदोश्त के अनुयायी थे और देवताओं की पूजा करते थे। सन् 330 ईसापूर्व में मकदूनिया (यूनान)…"} {"instruction": "Rewrite the following code in Python to print a 5x5 matrix of random integers between 0 and 4.", "input": "Not applicable", "output": "import numpy as np\n\nx = np.random.randint(0,5,(5,5))\nprint(x)"} {"instruction": "Using PHP, write a program to check if a string contains only alphabets.", "input": "", "output": " 64 && ord($str[$i]) < 91) || (ord($str[$i]) > 96 && ord($str[$i]) < 123)) { return true; } else { return false; } } } // Driver code $str = \"Hello World\"; $str2 = \"HELLO123\"; if (checkAlphabetical($str)) echo \"The string contains only alphabets\"; if (checkAlphabetical($str2)) echo \"The string contains only alphabets\"; else echo \"The string does not contain only alphabets\"; ?>"} {"instruction": "Write a function to generate the nth Fibonacci number.", "input": "< noinput >", "output": "def fib(n): if n == 0: return 0 elif n == 1: return 1 else: return fib(n-2) + fib(n-1)"} {"instruction": "Determine whether a given string is a palindrome using stack data structure.", "input": "string = \"racecar\"", "output": "\"\"\" Determine whether a given string is a palindrome using stack data structure. \"\"\" def is_palindrome(string): # reverse the string stack = [] for char in string: stack.append(char) rev_string = \"\" while stack: rev_string = rev_string + stack.pop() # compare reversed string with original string if rev_string == string: return True else: return False if __name__ == '__main__': string = \"racecar\" print(is_palindrome(string))"} {"instruction": "Generate an HTML page to display text", "input": "The text to be displayed: \"Hello World\"", "output": " Hello World

      Hello World

      "} {"text": "[HI Wikipedia] बिर्ख खड़का डुबर्सेली\n\n'बिर्ख खड़का डुबर्सेली का जन्म 1 अक्तूवर 1954 को कटलगुड़ी, जलपाईगुड़ी (डुवर्स) पश्चिम बंगाल में हुआ था। ये हिन्दी और नेपाली के समानान्तर लेखक व अनुवादक हैं। सन्दर्भ नेपाली साहित्यकार 1954 में जन्मे लोग जीवित लोग"} {"instruction": "Summarize the given article using the Gensim summarizer.", "input": "[Article about Gensim summarizer](https://gensim.readthedocs.io/en/latest/summarization.html)", "output": "Gensim summarizer uses text preprocessing, tokenization, and summarization to generate extracted summaries from the given text. It supports manual summarization, latent semantic analysis, Latent Dirichlet Allocation, baseline summarization, and phrases-based summarization. Gensim summarizer provides a variety of ways to summarize text documents including manual summarization and auto summarization techniques."} {"instruction": "Write Python code to find the maximum distance between two elements in a given array", "input": "x = [2, 4, 8, 11, 13, 18, 19, 21]", "output": "def maxdistance(x): \n # Initialize max distance \n max_distance = 0\n \n for i in range(0, len(x)):\n for j in range(i + 1, len(x)):\n # Find the current distance between two elements\n d = abs(x[i] - x[j])\n # Update the maximum distance \n if max_distance < d: \n max_distance = d\n \n return max_distance"} {"instruction": "Write a Python program for calculating the sum of a given array of numbers.", "input": "[2, 3, 4, 5]", "output": "def calculateSum(arr): sum = 0 for num in arr: sum += num return sum print(calculateSum([2, 3, 4, 5]))"} {"instruction": "Create a Python program that shuffles the elements of an array.", "input": "arr = [\"A\", \"B\", \"C\", \"D\"]", "output": "import random\n\ndef shuffleArray(arr):\n n = len(arr)\n\n for i in range(n-1, 0, -1):\n j = random.randint(0, i)\n arr[i], arr[j] = arr[j], arr[i] \n \n return arr\n\narr = [\"A\", \"B\", \"C\", \"D\"]\nshuffleArray(arr)\nprint(arr)"} {"instruction": "Write a code snippet to replace the given character in a string with another given character.", "input": "str = \"This is a string\" old_char = 's' new_char = 'x'", "output": "str = str.replace(old_char, new_char)"} {"text": "[CS Wikipedia] Pascal (jednotka)\n\nPascal (značka Pa) je jednotka tlaku. Udává, jak velká síla (v newtonech) působí na jednotkovou plochu (1 m²), tzn. je ekvivalentní N/m² nebo také kg·m−1·s−2. Jednotka byla pojmenována po francouzském matematikovi a fyzikovi Blaise Pascalovi (1623–1662). Hektopascal (hPa) je jednotka, ve které se v meteorologii měří tlak vzduchu. 1 Pa = 1 N/m² 1 hPa = 100 Pa = 1 mbar (milibar) 1 kPa = 1000 Pa V minulosti se užívaly též jednotky pièze, která odpovídala 1 kPa a atmosféra (technická a fyzikální), odpovídající 0.1 Mpa. Megapascal (MPa) odpovídá síle jednoho newtonu působící na plochu jednoho čtverečního milimetru (1 N/mm² = 1 MPa). Proto je běžný ve strojírenství, kde je milimetr běžně používanou jednotkou délky (v zemích používajících soustavu SI). Megapascal je ve strojírenství používán nejen jako jednotka tlaku (např. stlačeného plynu apod.), ale též jako jednotka napětí pro kontinuum vystavené působení vnější síly. Vzorec pro výpočet 1 pascalu: udává se v jednotkách: Externí odkazy Blaise Pascal Odvozené jednotky SI Jednotky tlaku"} {"instruction": "Write a python program to calculate the longest increasing subsequence of an array.", "input": "", "output": "def longest_increasing_subsequence(arr): \n n = len(arr) \n \n # Declare the list (array) for LIS and \n # initialize LIS values for all indexes \n lis = [1]*n \n \n # Compute optimized LIS values in bottom up manner \n for i in range (1 , n): \n for j in range(0 , i): \n if arr[i] > arr[j] and lis[i]< lis[j] + 1 : \n lis[i] = lis[j]+1\n \n # Initialize maximum to 0 to get the maximum of all \n # LIS \n maximum = 0\n \n # Pick maximum of all LIS values \n for i in range(n): \n maximum = max(maximum , lis[i]) \n \n return maximum"} {"instruction": "Write a Pub/Sub program in Python for a simple chatroom application.", "input": "Not applicable", "output": "import zmq\nimport sys\nimport threading\n\n# define constants\nHOST = \"127.0.0.1\"\nPORT = 6680\n\ncontext = zmq.Context()\n\n# Socket 1 \npub = context.socket(zmq.PUB)\npub.bind(\"tcp://%s:%s\" % (HOST, PORT))\n\n# Socket 2\nsub = context.socket(zmq.SUB)\nsub.connect(\"tcp://%s:%s\" % (HOST, PORT))\nsub.setsockopt_string(zmq.SUBSCRIBE, '')\n\n# Function to receive message from subscriber\ndef get_message():\n while True:\n message = sub.recv()\n print(message.decode('utf-8'))\n\n# Start thread\nthread = threading.Thread(target=get_message)\nthread.start()\n\n# Send messages\nwhile True:\n message = input('Say something: ')\n pub.send_string(str(message))"} {"text": "[CS Wikipedia] Somatochlora\n\nSomatochlora je rod vážek z čeledi lesklicovitých. Česky je rod pojmenovaný lesklice, stejně jako rody Antipodochlora, Cordulia, Epitheca a Oxygastra. Na celém světě existuje asi 42 druhů tohoto rodu. V Česku se vyskytují 4 druhy, lesklice horská, lesklice jižní, lesklice severská, lesklice skvrnitá a lesklice zelenavá. Kromě hojné lesklice zelenavé se u nás všechny ostatní vyskytují vzácně. Reference Externí odkazy Lesklicovití"} {"text": "[HI Wikipedia] खेरवाड़ा तहसील\n\nखेरवाड़ा तहसील भारत के राजस्थान राज्य के उदयपुर जिले की एक तहसील है। जनसांख्यिकी 2011 के सेन्सस अनुसार तहसील की कुल जनसँख्या 206777 है जिसमें से 7581 शहरी है व 199196 ग्रामीण है। सन्दर्भ उदयपुर जिले की तहसीलें"} {"instruction": "Create a selector for a page element with the id \"main-heading\".", "input": "", "output": "const mainHeading = document.getElementById('main-heading');"} {"instruction": "Create a function in Python that takes a list and returns the first two elements that adds up to 0.", "input": "[1, 5, 2, -7, 3]", "output": "def zero_sum_pair(list): # loop through the list for i in range(len(list)): for j in range(i + 1, len(list)): if list[i] + list[j] == 0: return [list[i], list[j]] return None"} {"instruction": "Create a Python program to predict the sentiment of user reviews using a Naive Bayes classifier.", "input": "User Reviews: \n\n1. 'The food was amazing!' \n2. 'I was not happy with the customer service.' \n3. 'The quality of the food was fantastic!'", "output": "import nltk\nfrom nltk.classify import NaiveBayesClassifier\n\n# Define the training set\nreviews_train = [('The food was amazing!', 'positive'),\n ('I was not happy with the customer service.', 'negative'),\n ('The quality of the food was fantastic!', 'positive')]\n\n# Train Naive Bayes Classifier\nclassifier = NaiveBayesClassifier.train(reviews_train)\n\n# Make Predictions\nreviews_test = ['The food was not good.']\nprediction = classifier.classify(reviews_test)\n\nprint('Predicted sentiment is:', prediction)"} {"instruction": "Create a function in Python to calculate the power of a number.", "input": "", "output": "def power(num, pow):\n return num**pow"} {"instruction": "Calculate the maximum sum of a subarray of length k.", "input": "Array: [1, 3, 4, 5, 20, 32] K: 3", "output": "The maximum sum of a subarray of length 3 is 51 (20 + 5 +26)."} {"instruction": "Develop a Python program to calculate the largest sum of a consecutive sequence of n numbers given in an array.", "input": "array = [1, 2, -5, 4, 5, 7, -8]", "output": "def max_consecutive_sum(array):\n max_val = 0\n cur_man = 0\n for x in array:\n cur_man = max(cur_man + x, 0)\n max_val = max(cur_man, max_val)\n return max_val"} {"instruction": "Build a Python command-line program that takes in a string and encrypts it with a password.", "input": "", "output": "import hashlib \n \ndef encrypt_string(string, password):\n md5_string = hashlib.md5(string.encode()).hexdigest()\n password_string = hashlib.md5(password.encode()).hexdigest()\n result = \"\"\n\n for i in range(32):\n result += md5_string[i] + password_string[i]\n return result\n\nstring = \"Hello World!\"\npassword = \"password\"\n\nresult = encrypt_string(string, password)\nprint(result)"} {"instruction": "Suggest a SQL query to get the average order total from last year's orders.", "input": "", "output": "SELECT AVG(total) FROM orders WHERE YEAR(order_date) = YEAR(CURDATE()) - 1"} {"instruction": "Generate a complete python code to print the output shown.", "input": "I love Python", "output": "print(\"I love Python\")"} {"instruction": "Create a basic HTML form with two text inputs, one for email and one for a password.", "input": "", "output": "
      "} {"instruction": "Generate a function in Python to compute the maximum of two numbers without using any comparison operator.", "input": "", "output": "def maximum(x, y): \n \n # subtract two numbers \n # and return the sign of the result \n s = (x - y) >> 63 \n \n # return x if s = 0 \n # else return y \n return x - s * (x - y)"} {"text": "[CS Wikipedia] Historie esperanta\n\nHistorie esperanta začíná nápadem Ludvíka Lazara Zamenhofa na vytvoření mezinárodního jazyka. Vznik esperanta Zamenhof se narodil se v Bělostoku, v městě národnostně velmi smíšeném. Obyvatelstvo žilo ve stálém nepřátelství, společenské a národnostní rozbroje byly na denním pořádku. To přivedlo Zamenhofa na myšlenku, že kdyby si lidé rozuměli, stýkali by se přátelsky a v míru. Již jako gymnazista se začal zabývat myšlenkou vytvořit mezinárodní jazyk pro dobro lidstva a ke konci jeho studií v r. 1878 byl jeho projekt Lingwe Uniwersala víceméně hotov. Otec Zamenhofa, který byl učitelem jazyků, považoval tuto práci za marnou a utopistickou a tak rukopis, který mu byl svěřen, zničil. Zamenhof studoval lékařství v Moskvě a Varšavě v letech 1879-1885. V té době začal opět pracovat na mezinárodním jazyce, po šest let jej opravoval a zlepšoval, toto období esperanta se nazývá proto-esperanto a v roce 1887 vydal pod pseudonymem dr. Esperanto (dr.Doufající). Podle tohoto pseudonymu byl nový jazyk pojmenován. První opravy Přišly stovky nadšených a souhlasných dopisů a také rady, návrhy na úpravu apod. Zamenhof si všechny tyto návrhy zaznamenával a začal je uveřejňovat v roce 1894 v prvním esperantském časopise Esperantisto, který začal vycházet v r. 1889 v Norimberku. Vydávání časopisu umožnil L. Einstein, německý novinář, jeden z nejoddanějších a idealistických spolupracovníků dr. Zamenhofa, který svými brožurami a články položil základy esperantského hnutí v Německu. Z dalších finančních nesnází zachránil časopis H. Trompeter, Němec, zeměměřič, který vzal na sebe všechny výlohy s vydáváním časopisu. Jeho pomocí vyšlo v esperantu také několik významných děl. V tomto časopise dal dr. Zamenhof dvakrát hlasovat o návrzích na změny v jazyce, ale většina hlasovala proti a přála si, aby jazyk zůstal beze změny. Po hlasování skončily všechny jazykové debaty, skončila neplodná doba a začala doba volného rozvoje. Časopis měl nejvíce odběratelů v carském Rusku. Proto bylo velkou ranou, když ruská cenzura nepovolila časopis do Ruska pro článek L. N. Tolstého, velkého přítele esperanta, který byl také čestným členem několika esperantských spolků. Časopis proto zanikl v roce 1895, ale po několika měsících začal vycházet v Uppsale nový časopis pod názvem Lingvo Internacia. Časopis vycházel ve Švédsku až do roku 1899, v letech 1900 - 1906 jej tiskl a redigoval P. Lengyel v Maďarsku. P. Lengyel se později přestěhoval i s časopisem do Paříže a tam se stal redaktorem časopisu P. Fruictier a později Théophile Cart až do první světové války, kdy časopis přestal vycházet. Rozvoj esperanta Roku 1912 trvalo esperantské hnutí již 25 let. V Krakově se tehdy konal osmý světový sjezd, kde se Zamenhof během slavnostního projevu vzdal své oficiální vedoucí role v hnutí. Desátý sjezd se…"} {"instruction": "Implement a recursive method to find the sum of all numbers from 1 to n. The method should take an integer n as its argument.", "input": "4", "output": "def sumNums(n): if n == 0: return 0 else: return n + sumNums(n-1) # Driver Code n = 4 print(sumNums(n))"} {"instruction": "Given a two-dimensional array, write a code to sum the values in each row.", "input": "A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "row_sum = [] for row in A: row_sum.append(sum(row)) print(row_sum) # prints [6, 15, 24]"} {"text": "[CS Wikipedia] Canon EOS M\n\nCanon EOS M je první bezzrcadlovka systému EOS společnosti Canon. Podle periodika DPReview se jedná de facto o lehčí verzi zrcadlovky Canon EOS 650D. Design Fotoaparát má 18megapixelový senzor typu CMOS velikosti 22,3 × 14,9 mm (APS-C), závit pro objektivy EF-M (na nějž jdou i typy EF a EF-S), 1,04megapixelový multidotykový displej s úhlopříčkou 3 palce (7,7 cm) o poměru stran 3:2 a s podporou gest. Jako médium používá paměťové karty SD/SDHC/SDXC. Vše je řízeno obrazovým procesorem DIGIC 5, který zvládá sekvenční snímání o rychlosti 3,4 snímku za sekundu, ale i SD, HD a Full HD videa o 24, 25 a 30 snímcích/s. Elektronická vertikální závěrka zvládá časy od 30 do 1/4000 sekundy a bulb, citlivost jde do 6400 ISO s možností rozšíření na 12800. To, co oproti řadě EOS nemá, je integrovaný blesk, avšak nechybí „hot shoe“ sáňky na blesk systémový (například Canon Speedlite 90EX, s kterým je tento fotoaparát v některých krajinách prodáván). Přístroj má rozměry 108,6 × 66,5 × 32,3 mm a váží 262 gramů. Jako baterie používá typ LP-E12. Canon EOS M byl oznámen v červenci a začal se prvně prodávat v listopadu 2012 ve Spojených státech za cca 800 dolarů spolu s 22mm objektivem EF-M, v Kanadě pak spolu se zoomem 18-55 mm f/3,5–5,6 IS a v EU s jedním, druhým, i oběma objektivy. Odkazy Reference Související články Bezzrcadlovka Canon EOS Externí odkazy http://www.canon.cz/For_Home/Product_Finder/Cameras/Digital_SLR/EOS_M Fotoaparáty Canon EOS EOS M"} {"text": "[DE Wikipedia] Leonhard Horowski\n\nLeonhard Horowski (* 1972 in Berlin) ist ein deutscher Historiker, Buchautor und Publizist. Über Fachkreise hinaus bekannt wurde er 2017 mit seinem Buch Das Europa der Könige über die höfische Gesellschaft des 17. und 18. Jahrhunderts, das für den Sachbuchpreis der Leipziger Buchmesse 2017 nominiert war. Leben und Wirken Leonhard Horowski wuchs als Sohn eines Arztes in Berlin-Frohnau auf. Nach seinem 1991 bestandenen Abitur studierte er in Durham und an der FU Berlin Geschichte, Politik und Anglistik und schloss das Studium 2001 als Magister Artium ab. Horowski war Stipendiat der Studienstiftung des deutschen Volkes. 2003 promovierte er an der TU Berlin in Geschichte und bildete angehende Diplomaten aus. Bis 2009 war er an der TU Berlin Wissenschaftlicher Assistent. Horowski arbeitete an der ZDF-Serie Die Deutschen (2010) mit und trat beim Fernsehsender Phoenix als Sachverständiger zum Liebes- und Familienleben in europäischen Königshäusern auf. 2017 war er im ZDF zu Gast bei Markus Lanz und bei 3 nach 9. Horowski ist Gastautor der Wochenzeitung Die Zeit und Lehrbeauftragter an der Humboldt-Universität zu Berlin. Publikationen (Auswahl) Die Belagerung des Thrones. Machtstrukturen und Karrieremechanismen am Hof von Frankreich 1661-1789 (= Beihefte der Francia. 74), Jan Thorbecke Verlag, Ostfildern 2012. Das Europa der Könige. Macht und Spiel an den Höfen des 17. und 18. Jahrhunderts. Rowohlt Verlag, Reinbek bei Hamburg 2017. Herrlichkeit und Ewigkeit : Drei Familien bauen das vormoderne Europa. dtv Verlagsgesellschaft, München 2022. Weblinks Einzelnachweise Historiker (Frühe Neuzeit) Autor Deutscher Geboren 1972 Mann Absolvent der Freien Universität Berlin"} {"text": "[EN Wikipedia] Kęstutis Andziulis\n\nKęstutis Andziulis (born January 20, 1948, in Jieznas) is a Lithuanian artist and art restorer. Life In 1973 he graduated from the Lithuanian Art Institute. Since 1973, he has contributed to the restoration of cultural monuments in Vilnius and since 1981, a Kaunas artist. In 1978, he studied art restoration in Erfurt, and 1998 in Florence. He has contributed to restoring many churches and secular buildings, the decoration of wall paintings including: 1973–1974 Verkiai palace in Vilnius 1974–1979 St. Ion church in Vilnius, with others 1976–2000 Pažaislis church and monastery, frescoes 2005–2008 John Mackeviciaus panel Kaunas Chamber, the Great Hall of Duke Vytautas References External links Artist webpage 1948 births Living people People from Prienai District Municipality Lithuanian painters Vilnius Academy of Arts alumni"} {"instruction": "Develop a Python program which will take a string and print out the total number of characters in it.", "input": "", "output": "def num_chars(string):\n char_count = 0\n for i in string:\n char_count += 1\n print(\"The number of characters in the string is\", char_count)"} {"instruction": "Write an array filter to remove any element with the value 0.", "input": "[0,1,2,3,4,0,6]", "output": "const result = arr.filter(item => item !== 0); // result will be [1,2,3,4,6]"} {"instruction": "Use the input to generate a loop in JavaScript to print an increasing count starting from the given number.", "input": "num = 5", "output": "for (let i = num; i < num + 10; i++) { console.log(i); } # Output # 5 # 6 # 7 # 8 # 9 # 10 # 11 # 12 # 13 # 14"} {"instruction": "Write a function to find the path from a source point to a destination point in a given 2D array.", "input": "Array: [[0, 1, 0, 0, 0], [0, 1, 0, 1, 0], [1, 0, 0, 1, 0], [0, 0, 0, 1, 0]] Source Point: [0, 0] Destination Point: [3, 4]", "output": "def find_path(array, source, dest): path = [source] sx, sy = source while path[-1] != dest: dx, dy = path[-1] if dx > 0 and array[dx - 1][dy] == 0: path.append([dx-1, dy]) elif dy > 0 and array[dx][dy-1] == 0: path.append([dx, dy-1]) elif dx < len(array)-1 and array[dx + 1][dy] == 0: path.append([dx+1, dy]) elif dy < len(array[0])-1 and array[dx][dy+1] == 0: path.append([dx, dy+1]) return path"} {"instruction": "Create a program which calculates the median of an array.", "input": "[3, 5, 4, 1, 7]", "output": "\"\"\" Create a program which calculates the median of an array \"\"\" def median(arr): n = len(arr) arr.sort() if n % 2 == 0: return (arr[n//2] + arr[n//2-1])/2 else: return arr[n//2] if __name__ == '__main__': print(median([3, 5, 4, 1, 7]))"} {"text": "[EN Wikipedia] Gmina Magnuszew\n\nGmina Magnuszew is a rural gmina (administrative district) in Kozienice County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Magnuszew, which lies approximately north-west of Kozienice and south-east of Warsaw. The gmina covers an area of , and as of 2006 its total population is 6,595. Villages Gmina Magnuszew contains the villages and settlements of Aleksandrów, Anielin, Basinów, Boguszków, Bożówka, Chmielew, Dębowola, Gruszczyn, Grzybów, Kępa Skórecka, Kłoda, Kolonia Rozniszew, Kurki, Latków, Magnuszew, Mniszew, Osiemborów, Ostrów, Przewóz Stary, Przewóz Tarnowski, Przydworzyce, Rękowice, Rozniszew, Trzebień, Tyborów, Wilczkowice Dolne, Wilczowola, Wola Magnuszewska, Wólka Tarnowska, Zagroby, Żelazna Nowa and Żelazna Stara. Neighbouring gminas Gmina Magnuszew is bordered by the gminas of Głowaczów, Grabów nad Pilicą, Kozienice, Maciejowice, Warka and Wilga. References Polish official population figures 2006 Magnuszew Kozienice County"} {"instruction": "Develop an algorithm to sort a list of numbers from low to high inPython.", "input": "[5, 7, 1, 6, 10, 4, 2]", "output": "def sort_numbers(nums):\n for i in range(len(nums)):\n for j in range(i+1, len(nums)):\n if nums[i] > nums[j]:\n temp = nums[j]\n nums[j] = nums[i]\n nums[i] = temp\n return nums\n\nprint(sort_numbers([5, 7, 1, 6, 10, 4, 2]))"} {"instruction": "Write a JavaScript code to pop up a window that says \"Hello, World!\" when you open up the webpage.", "input": "", "output": ""} {"text": "[EN Wikipedia] Arvydas Bagdžius\n\nArvydas Bagdžius (23 November 1958, in Vilnius, Lithuania – 2 June 2008) was a Lithuanian painter. See also List of Lithuanian painters References 1958 births 2008 deaths Artists from Vilnius 20th-century Lithuanian painters"} {"instruction": "Write a script for filtering out records who are older than 18 years old.", "input": "[ { \"name\": \"John Doe\", \"age\": 20 }, { \"name\": \"Jane Smith\", \"age\": 16 }, { \"name\": \"Dan Roberts\", \"age\": 25 } ]", "output": "const data = [ { \"name\": \"John Doe\", \"age\": 20 }, { \"name\": \"Jane Smith\", \"age\": 16 }, { \"name\": \"Dan Roberts\", \"age\": 25 } ]; let filteredRecords = data.filter(record => { return record.age > 18; }); console.log(filteredRecords);"} {"instruction": "Create a Python loop that iterates for 10 times.", "input": "", "output": "for i in range(10): ..."} {"instruction": "Calculate the mean of the following list of numbers: 4, 6, 8, 10.", "input": "", "output": "mean = (4 + 6 + 8 + 10) / 4 = 7.5"} {"instruction": "Write a Python program to generate a random integer between 0 and 9.", "input": "", "output": "\"\"\"\nGenerate a random integer between 0 and 9\n\"\"\"\n\nimport random\n\ndef generate_random_integer():\n # Generate a random number in the range [0, 9] \n x = random.randint(0,9) \n return x\n\nif __name__ == '__main__':\n print(generate_random_integer())"} {"instruction": "Design a program using Python to scrape data from a website.", "input": "The target website is https://www.amazon.com/.", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nURL = 'https://www.amazon.com/'\npage = requests.get(URL)\nsoup = BeautifulSoup(page.content, 'html.parser')\n\n#find all products\nproducts = soup.find_all('span', class_ = 'a-size-medium a-color-base a-text-normal')\n\n# iterate through products\nfor product in products:\n # find product title, price, etc. \n title = product.find('span', class_ = 'a-size-medium a-color-base a-text-normal')\n price = product.find('span', class_ = 'a-price-whole')\n\n print(title.text)\n print(price.text)"} {"text": "[EN Wikipedia] Acir Gurgacz\n\nAcir Marcos Gurgacz (born February 5, 1962) is a Brazilian politician and journalist. He has represented Rondônia in the Federal Senate since 2009. He is a member of the Democratic Labour Party. References Living people 1962 births Brazilian people of Polish descent Members of the Federal Senate (Brazil) Democratic Labour Party (Brazil) politicians People from Cascavel"} {"instruction": "Write a C program to implement a simple calculator that adds two numbers.", "input": "", "output": "#include int main() { double x, y, sum; printf(\"Enter two numbers: \"); scanf(\"%lf%lf\", &x, &y); sum = x + y; printf(\"Sum of the entered numbers: %lf\", sum); return 0; }"} {"instruction": "Write a PHP script that creates a MySQL database table with three fields: \"ID\", \"name\", and \"age\".", "input": "", "output": "connect_error) { die(\"Connection failed: \" . $conn->connect_error); } // sql to create table $sql = \"CREATE TABLE MyTable ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, age VARCHAR(255) )\"; if ($conn->query($sql) === TRUE) { echo \"Table MyTable created successfully\"; } else { echo \"Error creating table: \" . $conn->error; } $conn->close(); ?>"} {"instruction": "Represent the function y = 3x + 4 in JavaScript.", "input": "", "output": "y = 3*x + 4;"} {"instruction": "Generate a Python class for an online store item that includes fields for ID, name, price, and description.", "input": "Not applicable", "output": "class StoreItem:\n def __init__(self, item_id, name, price, description):\n self.item_id = item_id\n self.name = name\n self.price = price\n self.description = description\n\n def __str__(self):\n return f'{self.name}, ${self.price}'\n\n def to_dict(self):\n return {\n 'item_id': self.item_id,\n 'name': self.name,\n 'price': self.price,\n 'description': self.description\n }"} {"instruction": "Fill in the below code to extract specific data from the given JSON object.", "input": "const jsonObj = { 'name': 'John Doe', 'locations': ['Los Angeles', 'New York', 'Las Vegas'], 'qualifications': {'degree': 'Master', 'university': 'Stanford'} }", "output": "const name = jsonObj['name']; const locations = jsonObj['locations']; const degree = jsonObj['qualifications']['degree']; const university = jsonObj['qualifications']['university'];"} {"text": "[EN Wikipedia] Pariwhakaoho River\n\nThe Pariwhakaoho River is a river of the Tasman Region of New Zealand's South Island. It flows northeast from sources within Kahurangi National Park to reach Golden Bay 10 kilometres northwest of Tākaka. See also List of rivers of New Zealand References Rivers of the Tasman District Kahurangi National Park Rivers of New Zealand"} {"instruction": "Design the algorithm to perform a depth-first search on given binary tree", "input": "", "output": "def DFS(root): s = Stack() s.push(root) while (s.size() > 0): node = s.pop() # Do something with the node if (node.left != NULL): s.push(node.left) if (node.right != NULL): s.push(node.right)"} {"instruction": "Write JavaScript code to add the following data to the web page.", "input": "[ { name: \"John\", age: 25 }, { name: \"Rob\", age: 27 }, { name: \"Mia\", age: 22 } ]", "output": "let data = [ { name: \"John\", age: 25 }, { name: \"Rob\", age: 27 }, { name: \"Mia\", age: 22 } ]; let table = document.createElement(\"table\"); table.setAttribute(\"id\", \"personTable\"); let thead = document.createElement(\"thead\"); let tr = document.createElement(\"tr\"); let th = document.createElement(\"th\"); th.innerText = \"Name\"; tr.appendChild(th); let th1 = document.createElement(\"th\"); th1.innerText = \"Age\"; tr.appendChild(th1); thead.appendChild(tr); let tbody = document.createElement(\"tbody\"); data.map(value => { let tr1 = document.createElement(\"tr\"); Object.values(value).map(val => { let td = document.createElement(\"td\"); td.innerText = val; tr1.appendChild(td); }) tbody.appendChild(tr1); }); table.appendChild(thead); table.appendChild(tbody); document.body.appendChild(table);"} {"instruction": "Create a function to extract the top 10 keywords from a given text.", "input": "text = \"This is some text that I am using to test the extractKeywords function.\"", "output": "import nltk def extractKeywords(text): tokens = nltk.word_tokenize(text) tags = nltk.pos_tag(tokens) keywords = [word for word,pos in tags if (pos == 'NN' or pos == 'NNP' or pos == 'NNS' or pos == 'NNPS')] freqs = nltk.FreqDist(keywords) top_ten = freqs.most_common(10) return top_ten if __name__ == \"__main__\": text = \"This is some text that I am using to test the extractKeywords function.\" top_ten = extractKeywords(text) print(top_ten)"} {"instruction": "Create a Python program that takes a string as input and prints all permutations of it in lexicographical order.", "input": "ABC", "output": "def permutations(string):\n if len(string) == 0:\n return\n\n else:\n first_char = string[0]\n remainder = string[1:]\n permutations(remainder)\n for perm in permutations(remainder):\n for i in range(len(perm)+1):\n result = perm[:i] + first_char + perm[i:]\n print(result)\n\npermutations(\"ABC\") #run the code\n\n# Output\nABC\nACB\nBAC\nBCA\nCBA\nCAB"} {"instruction": "Write a code to fetch the last ten news headlines from HackerNews using their API.", "input": "", "output": "\"\"\" Fetch the last ten news headlines from HackerNews using their API \"\"\" import requests def get_headlines(): url = \"https://hacker-news.firebaseio.com/v0/topstories.json\" ids = requests.get(url).json() headlines = [] for id in ids[:10]: item = requests.get(f\"https://hacker-news.firebaseio.com/v0/item/{id}.json\").json() headlines.append(item['title']) return headlines if __name__ == '__main__': headlines = get_headlines() for headline in headlines: print(headline)"} {"text": "[CS Wikipedia] Oisemont\n\nOisemont je francouzská obec v departementu Somme v regionu Hauts-de-France. V roce 2010 zde žilo 1 189 obyvatel. Vývoj počtu obyvatel Související články Seznam obcí v departementu Somme Externí odkazy Reference Obce v departementu Somme"} {"instruction": "Edit the output of a C program so that the last line prints \"Hello World!\"", "input": "#include int main() { printf(\"Hello!\"); return 0; }", "output": "#include int main() { printf(\"Hello!\"); printf(\"Hello World!\"); return 0; }"} {"instruction": "Implement a python class named 'Temperature' that ranks a temperature value as cold, warm, or hot given a threshold value of 30.", "input": "", "output": "class Temperature: def __init__(self, value, threshold=30): self.value = value self.threshold = threshold def rank(self): if self.value < self.threshold: return \"cold\" elif self.value == self.threshold: return \"warm\" else: return \"hot\""} {"instruction": "Publish an article to Medium using the Medium Python SDK.", "input": "No input", "output": "import medium\n\n# Create a client\nclient = medium.Client(\n application_id=\"YourApplicationID\",\n application_secret=\"YourApplicationSecret\",\n)\n\n# Log in to your account\nclient.access_token = \"\"\n\n# Create a post to publish\npost = medium.Post(\n title=\"Article Title\",\n content=\"This is the article content that will be published on Medium.\",\n content_format=\"html\",\n tags=[\"Python\", \"Medium\"],\n canonical_url=\"\",\n publish_status=\"draft\",\n)\n\n# Publish the post\npublished_post = client.create_post(post, author_id=\"\")"} {"instruction": "Create a Python program that takes a list of numbers, and finds a pair of numbers in the list whose sum equals the given number", "input": "[2, 3, 4, 5], 5", "output": "def find_pair_with_sum(nums, target):\n seen = set()\n for num in nums:\n if target - num in seen:\n return [target - num, num]\n seen.add(num)\n\nprint(find_pair_with_sum([2, 3, 4, 5], 5))"} {"instruction": "Identify which elements in an array are even numbers.", "input": "nums = [1, 2, 3, 4, 5]", "output": "def is_even_num(nums): result = [] for num in nums: if num % 2 == 0: result.append(num) return result"} {"instruction": "Design a Python class to accommodate a stack of characters.", "input": "", "output": "class Stack():\n def __init__(self):\n self.items = []\n\n def push(self, item):\n self.items.append(item)\n\n def pop(self):\n return self.items.pop()\n\n def isEmpty(self):\n return self.items == []\n\n def peek(self):\n if not self.isEmpty():\n return self.items[-1]"} {"instruction": "Write a C# script to print the string \"Hello, World!\" three times", "input": "", "output": "for (int i=0; i < 3; i++) { Console.WriteLine(\"Hello, World!\"); }"} {"instruction": "Given a dictionary, write a Python function to print all the key-value pairs in the dictionary.", "input": "", "output": "def print_dict_key_value(dic): for key, value in dic.items(): print(f\"{key}: {value}\")"} {"instruction": "What is the purpose of the method in line 4 of the code?", "input": "def random_number_generator(min, max):\n \"\"\"Return a random number between the given range.\"\"\"\n rng = random.range(min, max)\n return rng", "output": "The purpose of the method in line 4 is to generate a random number within the given range of min and max. It uses the Python's random.range() method which returns a random integer from the range of min to max, inclusive."} {"text": "[DE Wikipedia] Sven Brajer\n\nSven Brajer (* 1984 in Löbau) ist ein deutscher Historiker, Museologe und Journalist. Leben Brajer wuchs in der Oberlausitz auf. Er lernte zunächst Einzelhandelskaufmann. An der Technischen Universität Dresden studierte er Geschichte, Soziologie und Politikwissenschaft. Brajer beschäftigt sich mit deutscher und europäischer Sozial-, Kultur- und Wirtschaftsgeschichte des 19. bis 21. Jahrhunderts, Parteien und Bewegungen, Revolutionsforschung, Ostdeutschland, Geopolitik mit Schwerpunkt Mittel- und Osteuropa. Ihm wurde der Hermann-Knothe-Preis – Wissenschaftspreis der Oberlausitz 2014/15 zuerkannt für seine Arbeit Der wirtschaftliche Strukturwandel in der südlichen Oberlausitz im Textilgewerbe in der zweiten Hälfte des 19. Jahrhunderts am Beispiel der Firmen Carl Gottlieb Hoffmann aus Neugersdorf und Hermann Wünsches Erben aus Ebersbach/Sa. Für die Erarbeitung seiner Promotionsschrift Am Rande Dresdens? Das völkisch-nationale Spektrum einer »konservativen Kulturstadt« 1879-1933 erhielt er ein Stipendium der Rosa-Luxemburg-Stiftung. Im April 2023 wurde er in Görlitz zum Vizepräsidenten der Oberlausitzischen Gesellschaft der Wissenschaften gewählt. Journalistische Tätigkeit Seit 2022 betreibt Sven Brajer den Blog „Im Osten. Perspektiven wider den Zeitgeist“. Veröffentlichungen Der wirtschaftliche Strukturwandel in der südlichen Oberlausitz im Textilgewerbe in der zweiten Hälfte des 19. Jahrhunderts am Beispiel der Firmen Carl Gottlieb Hoffmann aus Neugersdorf und Hermann Wünsches Erben aus Ebersbach/Sa. In: Berghausen, Björn; Schaal, Dirk (Hg.). Tagung „Die beiden Lausitzen. Wirtschaft, Geschichte und Industriekultur in Brandenburg und Sachsen“ LIT Verlag. Münster, Berlin, Zürich. 2015 ISBN 9783643129291 Rechtspopulistische Milieus in der „konservativen Kulturstadt“ Dresden (1879–1933) In: Freiheit, Angst und Provokation: zum gesellschaftlichen Zusammenhalt in der postdiktatorischen Gesellschaft. Social coherence studies 2. Thelem Universitätsverlag und Buchhandel. Dresden ISBN 9783945363393 „Görlitz wird preußisch?!“: Identitätenwandel – Beobachtungen in Görlitz 1815 und in den Folgejahren. In: Neues lausitzisches Magazin. Heft 139. Oberlausitzischen Gesellschaft der Wissenschaften. Görlitz 2017 Angst vor dem Fremden in Zeiten des Umbruchs?: Aspekte von Antisemitismus und Rassismus im Kaiserreich in der Oberlausitz. In: Neues lausitzisches Magazin. Heft 141. Oberlausitzischen Gesellschaft der Wissenschaften. Görlitz 2019 Marcus Hawel & Herausgeber*innenkollektiv: Hanna Al Taher, Riccardo Altieri, Sven Brajer, Darija Davidovic, Marieluise Mühe, Jonas Riepenhausen (Hrsg.) Work In Progress. Work On Progress. Beiträge kritischer Wissenschaft: Doktorand*innen Jahrbuch 2019 der Rosa-Luxemburg-Stiftung. VSA Verlag Hamburg 2019 ISBN 978-3-96488-042-0…"} {"instruction": "Identify the endpoint of a given API request.", "input": "Request: GET https://www.example.com/1", "output": "The endpoint of this API request is https://www.example.com/1."} {"instruction": "Write a SQL statement to get all records from a table which has id between 5 and 10.", "input": "", "output": "SELECT * FROM table_name WHERE id BETWEEN 5 AND 10;"} {"text": "[EN Wikipedia] 1934–35 Hovedserien season\n\nThe 1934–35 Hovedserien season was the first season of ice hockey in Norway. Seven teams participated in the league, and Ski- og Fotballklubben Trygg won the championship. Regular season External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1934–35 in Norwegian ice hockey"} {"instruction": "What is the name of the attribute for creating a hover effect for an element in CSS?", "input": "", "output": "The attribute used in CSS to create a hover effect for an element is the ':hover' pseudo-class."} {"instruction": "Create a function in Python that takes three numerical inputs and returns the maximum value.", "input": "", "output": "def max_value(num1, num2, num3): max_num = max(num1, num2, num3) return max_num"} {"instruction": "Sort a list of dictionaries in Python by a given key.", "input": "[{'food': 'apple', 'color': 'red'}, {'food': 'banana', 'color': 'yellow'}, {'food': 'pear', 'color': 'green'}]", "output": "list_of_dicts = [{'food': 'apple', 'color': 'red'}, {'food': 'banana', 'color': 'yellow'}, {'food': 'pear', 'color': 'green'}]\n\n# Sort list by given key\nsorted_list = sorted(list_of_dicts, key=lambda item:item['color'])\n\nprint(sorted_list)"} {"text": "[DE Wikipedia] Becco di Filadonna\n\nDer Becco di Filadonna (2.150 m) ist der östlichste Gipfel im Höhenzug zwischen Etschtal und Valsugana, südöstlich von Trient (italienisch: Trento) und westlich der Hochebene von Lavarone. Er ist ein besonderer Aussichtsberg mit fast 360 Grad Rundumblick von der Brentagruppe über den Alpenhauptkamm zur Schiara-Gruppe. Die Besteigung erfolgt am besten von der Straße aus, die zum Passo della Fricca führt (von Trient, wahlweise vom Lago di Caldonazzo auf der SS 349 über Vigolo Vattaro). Für einigermaßen erfahrene Bergwanderer ist die Besteigung unproblematisch. Berg im Trentino Berg in Europa Berg in den Alpen Vizentiner Alpen"} {"text": "[CS Wikipedia] Blind Before I Stop\n\nje páté studiové album amerického rockového zpěváka Meat Loafa. Vydáno bylo v září roku 1986 prostřednictvím společnosti Atlantic Records v Severní Americe a společnosti Arista Records ve zbytku světa. Nahrávání alba proběhlo během ledna téhož roku v německém studiu Far Studios s producentem Frankem Farianem. Meat Loaf plánoval počkat na písně, které by pro něj napsal Jim Steinman, dle smlouvy s vydavatelstvím na něj ale nemohl čekat, nýbrž musel vydat album. Na skládání se tedy podílelo mnoho různých autorů, sám zpěvák byl spoluautorem třech písní. Seznam skladeb Obsazení Meat Loaf – zpěv, kytara Ostatní John Parr – zpěv Mats Björklynd – kytara, basová kytara, klávesy, programování, bicí Johan Daansen – kytara Peter Weihe – kytara Dieter Petereit – basová kytara John Golden – basová kytara Harry Baierl – piano, klávesy, programování Pit Löw – klávesy, programování Mel Collins – saxofon Curt Cress – bicí Amy Goff – zpěv, doprovodný zpěv Frank Farian – doprovodný zpěv Peter Bischof – zpěv Bert Gebhard – zpěv Bimey Oberreit – zpěv Elaine Goff – zpěv The Jackson Singers – chorály Technická podpora Frank Farian – produkce Odkazy Reference Externí odkazy Oficiální stránky umělce Alba Meat Loafa Alba v angličtině Alba z roku 1986 Alba Arista Records Alba Atlantic Records"} {"instruction": "What is the time complexity for this for loop?", "input": "nums = [1,2,3,4,5] for num in nums: print(num)", "output": "The time complexity for this loop is O(n) where n is the length of the list."} {"instruction": "Edit a given Python program to use regex to extract the phone numbers from the text.", "input": "import re\n\ntxt = \"My number is 666-111-1111 and my office number is 888-666-1234.\"", "output": "import re\n\ntxt = \"My number is 666-111-1111 and my office number is 888-666-1234.\"\n\nphone_numbers = re.findall(r'\\d{3}-\\d{3}-\\d{4}', txt)\nprint(phone_numbers) # output: ['666-111-1111', '888-666-1234']"} {"instruction": "Read the given date string in the specified format and print out the day of the week.", "input": "Date String: 03/02/2020 Format: mm/dd/yyyy", "output": "Thursday"} {"text": "[CS Wikipedia] Rochdale\n\nRochdale je město v severozápadní Anglii. Je součástí stejnojmenného metropolitního distriktu a metropolitního hrabství Velký Manchester. Leží na úpatí jižních Pennin necelých 16 km severovýchodně od centra Manchesteru a 8 km severozápadně od města Oldham. Historie Název města pochází od řeky Roch, na které leží. V Domesday Book se však objevuje i jméno Recedham, pocházející ze staroangličtiny. V průběhu let se název změnil na Rachedale až se ustálil na dnešním Rochdale. Starověká římská silnice, která spojovala hradiště Eboracum (dnešní York) a Mancunium (dnešní Manchester), procházela v blízkosti dnešního Rochdale. Její součástí bylo přemostění bažinatého území v oblasti Blackstone Edge. V 9. a 10. století bylo dnešní Rochdale součástí oblasti Danelaw, v které bylo tzv. dánské právo nadřazeno právu anglosaskému. V té době bylo město částým cílem nájezdů kmenů Dánů a Sasů. Dnešní předměstí Castleton je pojmenováno podle hradiště, pocházejícího z té doby, avšak zničeného při pozdějších střetech Dánů a Sasů, takže v současnosti již po něm neexistují žádné pozůstatky. Ve středověku se Rochdale stalo tržním městem, od roku 1250 se trhy konaly každý týden a jednou ročně byl pořádán jarmark. Od dob průmyslové revoluce začalo Rochdale intenzívně růst a jeho význam jako průmyslového města se stále zvyšoval. Vybudováním železničního spojení, sítě kanálů pro lodní dopravu a mnoha továren se stalo atraktivním pro bohaté obchodníky. Geografie Rochdale se rozkládá v údolí řeky Roch asi 16 kilometrů severovýchodně od centra v Manchesteru v nadmořské výšce 137 m. Je obklopeno menšími sídly jako Whitworth, Littleborough, Milnrow, Royton, Heywood a Shaw and Crompton, se kterými díky mohutné výstavbě zejména ve 20. století stavebně téměř splynulo. Podnebí ve městě je jako na většině území Britských ostrovů mírné, bez výraznějších extrémů počasí a teplotních výkyvů. Významné stavby Architektonicky nejvýznamnějším objektem ve městě je budova radnice, postavená v novogotickém stylu. Je hlavním sídlem úřadů zodpovědných za správu metropolitního distriktu, který zahrnuje nejen samotné město Rochdale, ale i města a vesnice v širším okolí. Budova radnice je všeobecně považována za jednu z architektonicky nejvýznamnějších budov svého druhu v zemi a je zařazena na seznam památkově chráněných budov s hodnocením stupněm I, tedy jako stavba výjimečného významu. V těsném sousedství radnice na zalesněném návrší se nachází novogotický kostel svatého Ceady z druhé poloviny 19. století. Druhým významným duchovním stánkem ve městě je kostel svatého Jana. Vybudován byl v roce 1927 v novobyzantském slohu a záměrně měl svou podobou připomínat chrám Hagia Sophia v Istanbulu. Sport Ve městě sídlí dva profesionální kluby, fotbalový Rochdale AFC a Rochdale Hornets, provozující rugby league…"} {"instruction": "Write a Python program to calculate the average monthly temperature of a given city for the last 10 years.", "input": "City: Los Angeles, California\n10 year average temperature from 2010 to 2020", "output": "import csv\n\ndef avg_month_temp(city):\n result = 0\n counter = 0\n temperatures = csv.reader(open('weatherdata.csv'))\n for row in temperatures:\n if row[1] == city:\n result += float(row[2])\n counter += 1\n return result/counter"} {"instruction": "In the given CSS stylesheet, change all the h1 heading text to purple.", "input": "h1 { font-size: 3rem; font-weight: bold; color: #b0b0b0; }", "output": "h1 { font-size: 3rem; font-weight: bold; color: #9100ff; }"} {"text": "[EN Wikipedia] Taylor River (New Zealand)\n\nThe Taylor River is one of the two rivers that flow across the Wairau Plain into Blenheim, New Zealand, where it joins the Ōpaoa River. It arises near Taylor Pass to the south of the Wither Hills and flows north-east and north. The river and pass were named for Joseph Taylor, a New Zealand Company surveyor who worked in the area from 1842. At the time Blenheim was settled and for some years thereafter, floods were frequent occurrences in winter at the confluence of the two rivers and occasioned the nickname \"Beavertown\" for Blenheim because of the fancied resemblance to beaver lodges of buildings in the town when surrounded by floodwaters. The town mascot is a beaver in spite of the fact that none have ever existed in New Zealand, as they are a prohibited animal. See also List of rivers of New Zealand References Rivers of the Marlborough Region Rivers of New Zealand"} {"text": "[HI Wikipedia] मन्दिर\n\nभारतीय धर्मों (सनातन धर्म, जैन धर्म, बौद्ध धर्म, सिख धर्म आदि) हिन्दुओं के उपासनास्थल को मन्दिर कहते हैं। यह अराधना और पूजा-अर्चना के लिए निश्चित की हुई जगह या देवस्थान है। यानी जिस जगह किसी आराध्य देव के प्रति ध्यान या चिन्तन किया जाए या वहां मूर्ति इत्यादि रखकर पूजा-अर्चना की जाए उसे मन्दिर कहते हैं। मन्दिर का शाब्दिक अर्थ 'घर' है। वस्तुतः सही शब्द 'देवमन्दिर', 'शिवमन्दिर', 'कालीमन्दिर' आदि हैं। और मठ वह स्थान है, जहां किसी सम्प्रदाय, धर्म या परम्परा विशेष में आस्था रखने वाले शिष्य आचार्य या धर्मगुरु अपने सम्प्रदाय के संरक्षण और संवर्द्धन के उद्देश्य से धर्म ग्रन्थों पर विचार विमर्श करते हैं या उनकी व्याख्या करते हैं, जिससे उस सम्प्रदाय के मानने वालों का हित हो और उन्हें पता चल सके कि, उनके धर्म में क्या है। उदाहरण के लिए बौद्ध विहारों की तुलना हिन्दू मठों या ईसाई मोनेस्ट्रीज़ से की जा सकती है। लेकिन 'मठ' शब्द का प्रयोग शंकराचार्य के काल यानी सातवीं या आठवीं शताब्दी से शुरु हुआ माना जाता है। [ Hindi]] में मन्दिर को कोईल या कोविल (கோவில்) कहते हैं। मन्दिर निर्माण का इतिहास गुप्तकाल (चौथी से छठी शताब्दी) में मन्दिरों के निर्माण का उत्तरोत्तर विकास दृष्टि गोचर होता है। पहले लकड़ी के मन्दिर बनते थे या बनते होंगे लेकिन जल्दी ही भारत के अनेक स्थानों पर पत्थर और ईंट से मन्दिर बनने लगे। 7वीं शताब्दी तक देश के आर्य संस्कृति वाले भागों में पत्थरों से बने मंदिरों का निर्माण होना पाया गया है। चौथी से छठी शताब्दी में गुप्तकाल में मन्दिरों का निर्माण बहुत द्रुत गति से हुआ। मूल रूप से हिन्दू मन्दिरों की शैली बौद्ध मन्दिरों से ली गयी होगी जैसा- कि उस समय के पुराने मन्दिरो में मूर्तियों को मन्दिर के मध्य में रखा होना पाया गया है और जिनमें बौद्ध स्तूपों की भांति परिक्रमा मार्ग हुआ करता था। गुप्तकालीन बचे हुए लगभग सभी मन्दिर अपेक्षाकृत छोटे हैं,जिनमें काफी मोटा और मजबूत कारीगरी किया हुआ एक छोटा केन्द्रीय कक्ष है, जो या तो मुख्य द्वार पर या भवन के चारों ओर बरामदे से युक्त है। गुप्तकालीन आरम्भिक मन्दिर, उदाहरणार्थ सांची के बौद्ध मन्दिरों की छत सपाट है; तथापि मन्दिरों की उत्तर भारतीय शिखर शैली भी इस काल में ही विकसित हुयी और शनै: शनै: इस शिखर की ऊंचाई बढती रही। 7वीं शताब्दी में बोध गया में निर्मित बौद्ध मन्दिर की बनावट और ऊंचा शिखर गुप्तकालीन भवन निर्माण शैली के चरमोत्कर्ष का प्रतिनिधित्व करता है। भारत के प्रसिद्ध मन्दिर एवम मठ जैसे-उज्जैन का महाकालेश्वर,ओमकारेश्वर,जगन्नाथ पुरी एवम महाभारत काल से जुड़ी मान्यताओं में खाटू श्याम जी का मन्दिर आज ख्याति प्राप्त मन्दिर हैं। बौद्ध और जैन पन्थियों द्वारा धार्मिक उद्देश्यों के निमित्त कृत्रिम गुफाओं का प्रयोग किया जाता था और हिन्दू धर्मावलम्बियों द्वारा भी इसे आत्मसात कर लिया गया था। फिर भी हिन्दुओं द्वारा गुफाओं में निर्मित मन्दिर तुलनात्मक रूप से बहुत कम हैं और गुप्तकाल से पूर्व का तो कोई भी साक्ष्य(प्रमाण) इस सम्बन्ध में नहीं पाया जाता है। गुफा मन्दिरों और शिलाओं को काटकर बनाये गये मन्दिरों के सम्बन्ध में अधिकतम जानकारी जुटाने का प्रयास करते हुए हैं हम जितने स्थानों का पता लगा सके वो पृथक सूची में सलंग्न की है। मद्रास…"} {"instruction": "Generate a correct HTML anchor tag for a link to \"example.com\"", "input": "", "output": "example.com"} {"text": "[HI Wikipedia] गागाउज़ भाषा\n\nगागाउज़ (Gagauz dili) एक तुर्की भाषा है जो मोल्दोवा के गागाउज़िया क्षेत्र की सरकारी भाषा है और जिसे मुख्य रूप से गागाउज़ समुदाय के लोग बोलते हैं। ध्यान दें कि एक अन्य 'बालकनी गागाउज़ तुर्की' नामक भाषा भी है लेकिन भाषावैज्ञानिक इन दोनों को भिन्न मानते हैं। इन्हें भी देखें क़शक़ाई भाषा तुर्की भाषाएँ सन्दर्भ तुर्की भाषाएँ मोल्दोवा"} {"text": "[EN Wikipedia] Angelina Banytė\n\nAngelina Banytė (born 1949) is a Lithuanian painter. She graduated from the Lithuanian Institute of Art in 1974. Since 1978, she has been a member of Lithuanian artists' association. Her work appears at the Clock Museum. Since 1976, she has lived in Klaipėda. Works Dainavos šalis – \"Dainavos\" sanatorija, Druskininkai, 1974 m. Jūros dugnas – \"Gintaro\" poilsio namai, Palanga, 1976 m. Medicina – Klaipėdos ligoninė, 1976 m. Gamtos dovanos – \"Pušyno\" poilsio namai, Palanga 1978 m. Mūsų kraštas – su Natalija Daškova ir Sofija Veiveryte, Agrarinės ekonomikos institutas, Vilnius, 1980 m. Paukščiai – Klaipėdos gimdymo namai, 1981 m. Laikas ir Klaipėda – su Juozu Vosyliumi, Klaipėdos laikrodžių muziejus, 1996 m. Dievas Tėvas – Klaipėdos Marijos Taikos Karalienės bažnyčia, 1996 m. See also List of Lithuanian painters References 1949 births Living people Lithuanian painters People from Mažeikiai 20th-century Lithuanian women artists 21st-century Lithuanian women artists"} {"text": "[DE Wikipedia] König (Kartenspiel)\n\nKönig (türkisch: Rifki, französisch: Le jeu du roi, englisch und italienisch: King) ist ein Kartenspiel, das mit Barbu verwandt ist und die Grundregeln der einfacheren Spiele Herzeln und Kein Stich eingebaut hat. Gespielt wird es vor allem in Frankreich, Belgien und Italien. Es ist aber auch in Teilen von Portugal, Russland, Türkei, Kolumbien und Brasilien bekannt. Die Spielregeln sind in den einzelnen Ländern unterschiedlich. Spielregeln Gespielt wird mit vier Spielern und einem Set von 52 Karten in französischen Spielfarben. Französische Variante Die Wertfolge ist von Ass absteigend bis Zwei. Es spielen vier Spieler gegeneinander. Es wird in zehn Runden gespielt, jede Runde hat ihre eigenen Regeln (Kontrakte). In den ersten sechs Runden gibt es keine Trumpffarbe. Regeln (Kontrakte) pro Runde: Jeder Stich zählt minus zwei Punkte für den Gewinner. Im Total gibt es minus 26 Punkte. (13 Stiche pro Runde.) Jede Herz zählt minus zwei Punkte. Im Total sind ebenfalls minus 26 Punkte möglich. Herz dürfen erst dann wie normale Farben gelegt werden, wenn einmal eine Herz von einem Spieler verworfen wurde, weil er die gelegte Farbe nicht angeben konnte. Die vier Könige und die vier Buben zählen je minus sechs Punkte. Diese Runde verteilt insgesamt minus 48 Punkte. Jede Königin zählt minus zehn Punkte. Total werden in dieser Runde minus 40 Punkte vergeben. Der Herzkönig zählt minus vierzig Punkte. Herz dürfen erst dann wie normale Farben gelegt werden, wenn einmal eine Herz von einem Spieler verworfen wurde, weil er die gelegte Farbe nicht angeben konnte. Der letzte Stich zählt minus zwanzig Punkte. Jeder Stich bringt dem Gewinner plus vier Punkte. Kreuz ist Trumpffarbe. Jeder Stich bringt vier Punkte. Karo ist Trumpffarbe. Jeder Stich bringt vier Punkte. Herz ist Trumpffarbe. Jeder Stich bringt vier Punkte. Pik ist Trumpffarbe. Gewinner ist der Spieler mit der höchsten Punktzahl nach diesen zehn Runden. Brasilianische Variante Die Wertfolge ist ebenfalls von Ass absteigend bis Zwei. Ebenso wie in der französischen Variante werden zehn Runden gespielt. Regeln (Kontrakte) pro Runde: Jeder Stich zählt minus 20 Punkte. Im Total werden minus 260 Punkte vergeben. Jedes Herz zählt minus 20 Punkte. Im Total werden minus 260 Punkte vergeben. Ein Spieler darf mit keiner Herz-Karte einen Stich beginnen, wenn er noch andere Farben in der Hand hält. Jeder König und jeder Bube zählt minus 30 Punkte. Im Total werden minus 240 Punkte vergeben. Jede Königin zählt minus 50 Punkte. Im Total werden minus 200 Punkte vergeben. Der Herzkönig zählt minus 160 Punkte. Ein Spieler darf mit keiner Herz-Karte einen Stich beginnen, wenn er noch andere Farben in der Hand hält. Der Herzkönig muss bei der ersten Möglichkeit verworfen werden. Der zweitletzte und der letzte Stich kosten minus…"} {"instruction": "Create a search algorithm in Python using a binary search, that takes an array of integers and a number as an argument and returns the position of the number within the array if the number exists.", "input": "array = [1, 3, 8, 10, 12, 15, 17, 20, 22, 34, 38, 40]\nnumber = 15", "output": "def binary_search(array, target):\n left = 0\n right = len(array) - 1\n while left <= right:\n middle = (left + right)//2\n if array[middle] < target: \n left = middle + 1\n elif array[middle] > target: \n right = middle - 1\n else: \n return middle \n return -1 \n\nposition = binary_search(array, number) \nif position == -1:\n print(\"Number not found in array.\")\nelse:\n print(f\"{number} found at position {position}\")"} {"instruction": "Construct an algorithm in Python to sort the elements of an array in decreasing order.", "input": "[4, 7, 1, 3, 5, 2]", "output": "def sortDecreasing(arr):\n for i in range(len(arr)): \n for j in range(i+1, len(arr)): \n if arr[i] < arr[j]: \n arr[i], arr[j] = arr[j], arr[i] \n return arr\narr = [4, 7, 1, 3, 5, 2]\nprint(sortDecreasing(arr))\n\n# Output: [7, 5, 4, 3, 2, 1]"} {"instruction": "Write a python program to submit the following operation", "input": "Calculate the maximum sum of a contiguous subarray in the given array.", "output": "def max_contiguous_sum(arr):\n max_sum = 0\n current_sum = 0\n for i in range(len(arr)):\n current_sum += arr[i]\n if current_sum > max_sum:\n max_sum = current_sum\n if current_sum < 0:\n current_sum = 0\n return max_sum"} {"instruction": "Edit the following Python class such that it can accept a variable number of parameters.", "input": "class Person:\n def __init__(self, name, age, weight):\n self.name = name\n self.age = age\n self.weight = weight", "output": "class Person:\n def __init__(self, *args):\n self.name = args[0]\n self.age = args[1]\n self.weight = args[2]"} {"text": "[EN Wikipedia] National Federation of Retail Newsagents\n\nThe National Federation of Retail Newsagents (NFRN) is an employers association representing more than 10,000 stores across the United Kingdom and the Republic of Ireland. Its roots go back to the latter part of the nineteenth century. History The roots of the NFRN can be traced back to late nineteenth century when local groups across the north of England, formed to bring together retailers in locations such as Blackburn, Accrington and Burnley. The Retail Newsagents and Booksellers Union was formed in 1891 at the Congregational Memorial Hall, Farringdon Street. The Union had branches in Edinburgh, Glasgow, Brighton and Reading but broke up amid infighting in 1901. Whilst one union was faltering, another, the Northern Counties Union, was formed in Manchester. The NCU is the first organisation who can claim unbroken descendants to today. A third union - the National Union, was founded in 1902 but was dissolved in 1915. The NCU was strengthened in 1911 when a conference in Leeds agreed its merger with the United Kingdom Federation, which had been formed in White City, London, in 1908. Other local federations from across the north of the country joined the newly enlarged organization. While the movement towards one national organization may have been welcomed by many, progress was not to be smooth as two years later, another organization, the London and Provincial Newsagents, was formed. More London and southern based than the NCU, the LPN nether the less built a significant membership. With the formation of the Scottish Federation in 1915, the three organizations were to merge in the early interwar years to work to represent their members. It was in the aftermath of the First World War that Alexander MacLaren, a member of a Glasgow newsagents family contacted representatives of the various organizations with the view to forming a national organization, an objective he had worked towards while recovering from serious injuries he sustained during the war. The result was the National Unity Conference held in Birmingham in 1918. This conference agreed the formation of the National Joint Board of Retailers whose role was to lay the ground work for a new organization. Alongside Maclaren, who acted as Secretary, was F. A. Ratcliffe, of the LPC, who took the role of chairman. On the 9 and 10 July 1919, at a conference in Leicester, the National Federation of Retail Newsagents, Booksellers and Stationers was formed. Structure National Council is the body that runs the NFRN between Annual Conferences. It meets four times a year to debate key issues and to decide national policy. National Council comprises representatives from all 15 NFRN Districts. These National Councillors are elected by members of the district councils during the AGM's. The National…"} {"instruction": "Construct a Python function which takes two strings as input arguments and returns their concatenation.", "input": "\"Hello \", \"World!\"", "output": "def concat_strings(str1, str2):\n return str1 + str2\n\nresult = concat_strings(\"Hello \", \"World!\")\nprint(result)"} {"instruction": "Create a Python program which takes a list of integers and prints a list containing only those integers which have more than 2 occurrences in the input list.", "input": "list = [1, 2, 3, 4, 5, 2, 3, 1, 6, 3]", "output": "list = [1, 2, 3, 4, 5, 2, 3, 1, 6, 3]\n\ndef findDuplicates(list):\n result = []\n seen = set()\n \n for num in list:\n if num not in seen:\n seen.add(num)\n else:\n result.append(num)\n \n return result\n\nprint(findDuplicates(list))"} {"instruction": "Compose Python code to remove all elements from a list by value.", "input": "mylist = [1,2,3,4,2]", "output": "def remove_by_val(mylist, val):\n return [i for i in mylist if i != val]\n\nmylist = [1,2,3,4,2]\nresult = remove_by_val(mylist, 2)\nprint(\"Updated list after removing elements are: \", result)"} {"instruction": "Create a class in Python that implements a method to convert a decimal to a binary number.", "input": "Not applicable", "output": "class DecimalToBinary:\n def __init__(self, num):\n self.num = num\n\n def convert(self):\n if self.num > 1:\n self.convert(self.num // 2)\n print(self.num % 2, end='')\n\nnumber = DecimalToBinary(14)\nnumber.convert()"} {"instruction": "Write a method that prints out all the prime numbers between 1 and 100.", "input": "", "output": "public static void printPrimeNumbers(){ System.out.println(\"Prime numbers between 1 to 100 are : \"); for (int i = 1; i <= 100; i++) { boolean isPrime = true; for (int j = 2; j < i; j++) { if (i % j == 0) { isPrime = false; break; } } if (isPrime) System.out.print(i + \" \"); } } // Output: // Prime numbers between 1 to 100 are : // 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97"} {"instruction": "You receive an array of numbers as input and you need to calculate the median number.", "input": "arr = [3, 2, 4, 1, 5]", "output": "3.0"} {"instruction": "Create a Python program to generate random strings using a given character set.", "input": "Character Set: 'abc'\nString Length: 5", "output": "import random\n\ndef generate_random_string(length, char_set):\n random_string = ''\n \n for _ in range(length):\n random_string += random.choice(char_set)\n \n return random_string\n\nchar_set = 'abc'\nlength = 5\n\nprint(generate_random_string(length, char_set))"} {"text": "[HI Wikipedia] लीवर सिरोसिस\n\nसिरोसिस यकृत की कैंसर के बाद सबसे गंभीर बीमारी है, इस बीमारी का इलाज लीवर प्रत्यारोपण के अलावा और कोई नहीं है। इस रोग में यकृत कोशिकाएं बडे पैमाने पर नष्ट हो जाती हैं और उनके स्थान पर फाइबर तंतुओं का निर्माण हो जाता है। यकृत की बनावट भी असामान्य हो जाती है, जिससे पोर्टल हाइपरटैंशन की स्थिति बन जाती है। रोग के लक्षण लीवर सिरोसिस होने पर व्यक्ति स्वयं को बीमार महसूस करता है, शुरूआती चरण में कोई खास लक्षण नहीं दिखते, लेकिन जैसे ही बीमारी बढ़ती है लक्षण दिखने शुरू हो जाते हैं। इनमें से कुछ प्रमुख लक्षण इस प्रकार है. भूख कम लगना और ऊर्जा का कम होना ( थकान),वजन में कमी या फिर अचानक वजन का बढ़ जाना,चोट के निशान की तरह शरीर पर लाल-Inलाल चकते आना,त्वचा व आंखों का रंग पीलापनयुक्त होना,त्वचा में खुजलाहट,एड़ी के जोड़ पर एडिमा होना, सुजन होना तथा पैर और पेट में भी सुजन के लक्षण दिख सकते है,मूत्र का रग भूरां या संतरे के रंग का होना,मल का रंग बदल जाना भ्रम, अनिर्णय, स्थितिभ्रांति जैसी स्थिति का होना या फिर व्यक्तित्व में अन्य कई तरह के बदलाव आना,ल में रक्त आना, बुखार होना इत्यादी लीवर सिरोसिस की पहचान कैसे होगी? लीवर रोग के विशेषज्ञ चिकित्सक इस बीमारी का बड़ी आसानी से पहचान कर लेते हैं. बस उन्हें कुछ शारीरिक जांच या बहुत हुआ तो कुछ रक्त जांच कराने की जरुरत होती है, इस जांच लीवर फंक्शन टेस्ट औक कंप्यूट टोमोग्राफी ( सीटी स्कैन), अल्ट्रासाउंड या फिर एक विशेष जांच फाइब्रोस्कैन से आसानी से इस बीमारी की डायग्नोसिस किया जा सकता है. कारण शराब का अत्यधिक मात्र में सेवन, हेपेटाइटिस बी और वायरल सी का संक्रमण, रक्तवर्णकता (इसमें रुधिर में लौह तत्व की मात्रा बढ़ जाती है।) गैर मादक स्टीटोहेपेटाइटिस (लीवर में वसा का जमाव हो जाने से लीवर धीरे-धीरे नष्ट हो जाता है। मोटापा, डायबिटीज लीवर सिरोसिस का प्रमुख कारण है।) पित्त नली के रोग, सिस्टिक फाइब्रोसिस (सिस्टिक फाइब्रोसिस एक वंशानुगत विकार है जो फेफड़ों, पाचन तंत्र और शरीर के अन्य अंगों को गंभीर नुकसान पहुंचाता है।) विल्सन रोग, जहां जिगर में बहुत अधिक तांबा जमा हो जाता है, ऑटोइम्यून रोग, जो आपके शरीर को यकृत कोशिकाओं पर हमला करने का कारण बनते हैं, कुछ आनुवंशिक पाचन विकार, सिफलिस और ब्रुसेलोसिस सहित कुछ संक्रमण, कुछ दवाओं के लिए खराब प्रतिक्रिया। निदान लीवर सिरोसिस के लिए अब तक कोई शर्तिया इलाज नहीं है, दवाओं से इसके बढ़ने की प्रक्रिया की रोकथाम की जा सकती है, लीवर की कोशिकाओं को क्षतिग्रस्त होने से बचाया जा सकता है और इस बीमारी से होने वाली परेशानियों को कम किया जा सकता है. लीवर सिरोसिस का इलाज उसके कारणों पर निर्भर होता है: – शराब पीने से सिरोसिस होता है, तो पहले शराब पीना छोड़े, इससे बीमारी बढ़ने की रफ्तार धीमी हो जाएगी. हेपेटाइटिस बी या सी से पीड़ित सिरोसिस के मरीजों को डाक्टर पहले एंटीवायरल दवाए दे कर लीवर कोशिकाओं को क्षतिग्रस्त होने से बचाए. अगर कोई मरीज आॅटोइम्युन बीमारी के कारण से या फिर विल्सन डिजिज, या हेमोक्रोमैटोसिस से सिरोसिस से पीड़ित है तो उसके इलाज अलग-अलग होंगे. दवा के जरिये सिरोसिस के लक्षणों को नियंत्रित किया जा सकता है. एडिमा या जलोदर का इलाज आहार में नमक को नियंत्रित कर किया जा सकता है. इस दवा को ड्यूराइटिस के…"} {"text": "[DE Wikipedia] Specific-Pathogen-Free\n\nSpecific-pathogen-free (SPF, deutsch: spezifisch pathogenfrei) bezeichnet in der Versuchstierhaltung und der Zellkultur-Technik die Abwesenheit bestimmter Krankheitserreger (Pathogene), wie Bakterien, Pilze und Viren. Die Federation of Laboratory Animal Science Associations (FELASA, der Dachverband der europäischen Gesellschaften für Versuchstierkunde) hat in ihre Empfehlungen zur Gesundheitsüberwachung von Versuchstierhaltungen (Recommendations for the health monitoring of rodent and rabbit colonies in breeding and experimental units, in: Laboratory Animals, 2002) mehrere Listen von Erregern veröffentlicht, auf die bestimmte Tierarten untersucht werden sollen. In SPF-Bereichen herrscht ein besonders hoher Hygienestatus. Das Personal betritt den Bereich über Schleusen (Umkleiden, Luftduschen oder Naßduschen) und darf sich nur mit Schutzkleidung in diesem keimarmen Milieu aufhalten, um beispielsweise die Tiere zu versorgen oder Tiere für einen Versuch zu entnehmen. Dieser Bereich ist durch weitere Material-Schleusen von der Außenwelt abgeschottet. Durch sie werden zuvor autoklavierte Käfige, Futtersäcke, Wasserflaschen oder ähnliches Enrichment eingeschleust. Im SPF-Bereich herrscht ein geringfügiger höherer Luftdruck (je Stufe Außenwelt → Arbeitsbereich/Versorgungsgang → Tierraum circa 50 Pa), damit beim Öffnen der Schleusen keine Keime von der Außenwelt nach innen dringen können. Gehalten werden meistens Nager wie Mäuse, Ratten und Hamster, häufig in Laminarströmungs-Schränken wie Scantainern oder in einzelbelüfteten Käfigen [individual ventilated cages (IVC)]. Seltener sind auch Tiere wie Schafe, Ziegen, Minischweine und Hausschweine anzutreffen. Tierversuche Tiermedizin"} {"instruction": "Generate a dictionary with the key-value pairs {1:1, 2:4, 3:9, 4:16}", "input": "", "output": "def generate_dict(): \"\"\"Generate a dictionary with the key-value pairs {1:1, 2:4, 3:9, 4:16}\"\"\" my_dict = {} for i in range(1, 5): my_dict[i] = i**2 return my_dict generate_dict() # Outputs {1:1, 2:4, 3:9, 4: 16}"} {"instruction": "Compute the result of the following mathematical expression in Python.", "input": "(4 + 5 * 7 - 9) / 2", "output": "result = 17"} {"instruction": "Create an SQL query that returns the names of all the people born in the year 1990.", "input": "SELECT name FROM People WHERE yearOfBirth = 1990", "output": "SELECT name FROM People WHERE yearOfBirth = 1990;"} {"text": "[CS Wikipedia] Mladí zelení\n\nMladí zelení, z.s. (zkratka \"MZ\") je spolek sdružující mladé lidi, kteří se zajímají mj. o témata klimatické krize, genderové rovnosti, práv LGBTQIA+ osob, sociálně ohrožených skupin a dalších. Členstvo MZ se o těchto tématech vzdělává a snaží se pro ně získávat větší pozornost ve veřejném prostoru. Členem nebo členkou spolku se může stát osoba ve věku do 30 let se zájmem o cíle spolku. Mezi hlavní hodnoty Mladých zelených patří rovnost, sociální spravedlnost, boj o environmentálně udržitelnou společnost, práva zvířat, participativní demokracie a zapojení mladých lidí do rozhodovacích procesů. Mladí zelení po vypovězení memoranda již nejsou úzce navázaní na Stranu zelených. Jsou součástí Federace mladých evropských zelených. Před rozdělením spolku byli členy Asociace mládežnických politických organizací a partnerskou organizací Cooperation and Development Network Eastern Europe. Mladí zelení se aktivně angažují v mnoha oblastech občanské společnosti, jako jsou například environmentalismus, feminismus, lidská práva či práva LGBT komunity. Zároveň spolupracují i s dalšími mládežnickými organizacemi v Česku i v zahraničí. Struktura Nejvyšším orgánem spolku je sněm, který se koná pravidelně každý rok. Sněm volí dva spolumluvčí a 1-5 řadových členů nebo členek, kteří dohromady tvoří předsednictvo. V období mezi zasedáním sněmu spolku je předsednictvo nejvyšším orgánem. Volba spolumluvčích a řadových členů a členek předsednictva probíhá tzv. systémem jednoho přenosného hlasu a uplatňuje genderovou kvótu, kdy minimálně jeden spolumluvčí nesmí být cisgender muž a jedna řadová členka předsednictva nesmí být cisgender muž. Na výkon mandátu předsednictva a dodržování stanov spolku dohlíží Revizní komise, která se skládá z alespoň tří členů a rovněž uplatňuje totožnou genderovou kvótu, jako při volbách spolumluvčích a řadových členkách předsednictva. Základní organizační jednotkou jsou místní organizace, které mají vymezené území působnosti. Pokud má místní organizace nad 10 členek, je pak vedena tzv. radou místní organizace, kterou tvoří mluvčí a dvě až čtyři řadové členky rady. Velikost rady místní organizace volí místní organizace na svých schůzích. Pokud místní organizace má ale pod 10 členek, namísto rady jí vede koordinátorka. Mladí zelení mají v současnosti místní organizace v Praze, Plzni, Olomouci, Ostravě a Táboře. Rozdělení spolku Na mimořádném sněmu 20. června 2020 došlo k odtržení části členské základny, která chtěla navázat spolupráci s nově vzniklým hnutím Budoucnost. Tato část členstva následně založila spolek Budoucí. Po jejím odtržení byli Mladí zelení určitou dobu neaktivní, a to až do jara 2022, kdy spolek nabral nové zájemce o členství a uspořádal mimořádný sněm, na kterém si zvolil nové vedení. Veřejné aktivity 30 pro Prahu Budoucnost…"} {"text": "[HI Wikipedia] पारामारिबो जिला\n\nपारामारिबो सूरीनाम का जिला है। जिले में पारामारिबो शहर और आसपास के क्षेत्र शामिल हैं। 2004 की जनगणना के अनुसार जिले की आबादी 243,640 है और इसका क्षेत्रफल 183 वर्ग किलोमीटर है। आबादी और सघनता के अनुसार यह सूरीनाम का सबसे बड़ा जिला है। इतिहास क्षेत्र को सबसे पहले 17वी शताब्दी में विलोबे किले के निर्माण के साथ ब्रिटेन ने उपनिवेश बनाया गया था। किला बाद में नीदरलैण्ड के अधीन आ गया तथा इसका नाम बदल कर ज़ीलैण्डिया कर दिया गया। द्वितीय एंग्लो-डच युद्ध के अंत में हुई ब्रीडा की संधि से पहले पारामारिबो और इसके आसपास के क्षेत्र पर अदलबदल कर डच और ब्रिटिश अधिकार रहा। संधि के पश्चात सूरीनाम पर एकाधिकार नीदरलैण्ड का हो गया। सूरीनाम के जिले"} {"instruction": "What should this function take as input and return?", "input": "def find_longest_word(words):", "output": "def find_longest_word(words): '''This function takes a list of words as input and returns a string containing the longest word''' longest_word = '' for word in words: if len(word) > len(longest_word): longest_word = word return longest_word"} {"instruction": "How to remove the last character of a string in Python?", "input": "word = \"Hello\"", "output": "word = word[:len(word)-1]"} {"instruction": "Write a Python program to find the common elements between two lists", "input": "list1: [2, 4, 6, 8]\nlist2: [4, 6, 10, 12]", "output": "def common_elements(list1, list2):\n # Make a copy of list \n list_copy = list2[:] \n\n # Iterate the original list \n for item in list1: \n if item in list_copy: \n list_copy.remove(item) \n\n # Return the common elements \n return list(set(list1) & set(list2))"} {"instruction": "Write an R program to find the square of a number", "input": "", "output": "x <- 5 square_x <- x * x; print(paste0('The square of ',x,' is ',square_x))"} {"instruction": "Write pseudocode for the merge sort algorithm.", "input": "", "output": "Mergesort(A): if A has 1 item : return A else divide A into two parts (left and right) of roughly equal size B = Mergesort(left) C = Mergesort(right) D = Merge(B,C) return D Merge(B,C): create an empty list D while B and C are not empty: if B[0] ≤ C[0]: add the first item of B to the end of D remove the first item of B else: add the first item of C to the end of D remove the first item of C while B is not empty: add the first item of B to the end of D remove the first item of B while C is not empty: add the first item of C to the end of D remove the first item of C return D"} {"instruction": "Build a Python program which takes an integer number as input and checks if it is an Armstrong number.", "input": "A number (integer).", "output": "def isArmstrong(number):\n sum = 0\n temp = number\n\n while temp > 0:\n remainder = temp % 10\n sum += remainder ** 3\n temp //= 10\n\n if (number == sum):\n return True\n else:\n return False\n \nnumber = 153\n\nif (isArmstrong(number)):\n print(number,\"is an Armstrong number\")\nelse:\n print(number,\"is not an Armstrong number\")"} {"instruction": "Implement this algorithms in Python.", "input": "Algorithm: Depth-first Search", "output": "def dfs(graph, start):\n visited = []\n stack = [start]\n while stack:\n vertex = stack.pop()\n if vertex not in visited:\n visited.append(vertex)\n for node in graph[vertex]:\n stack.append(node)\n return visited"} {"instruction": "Create a Python dictionary with customer details provided.", "input": "Name: John Age: 25 Gender: Male Occupation: Chef", "output": "customer = { 'name': 'John', 'age': 25, 'gender': 'Male', 'occupation': 'Chef' }"} {"instruction": "The given code is a Python script that defines a class called \"ManyJetsHiggsVarFiller\" which adds new variables to a ROOT tree. To use this class, you need to import it from the \"tree.gardening\" module and create an instance of it. Then, you can call the \"process\" method of the instance, passing the input and output ROOT files as arguments. The new variables that will be added to the output tree are: \"m4j\", \"m3j\", \"mW1jj\", \"mW2jj\", \"pt4j\", \"pt3j\", \"eta4j\", \"eta3j\", \"phi4j\", \"phi3j\", \"dphill4j\", \"dphill3j\", \"best1\", and \"best2\".", "input": "", "output": "from tree.gardening import TreeCloner\n\n\nimport optparse\nimport sys\nimport ROOT\nimport numpy\nimport re\nimport os.path\nimport math\nfrom math import *\nfrom array import array;\n\n\n#\n#\n# \\ | | | | | _)\n# |\\/ | _` | __ \\ | | | _ \\ __| | | | _` | _` | __|\n# | | ( | | | | | \\ | __/ | ___ | | ( | ( | \\__ \\\n# _| _| \\__,_| _| _| \\__, | \\___/ \\___| \\__| _| _| _| \\__, | \\__, | ____/\n# ____/ |___/ |___/ \n#\n#\n\n\n\n#\n# Examples:\n#\n# cd /HWWAnalysis/ShapeAnalysis\n# source test/env.sh\n#\n# gardener.py manyJetHiggsVar /data2/amassiro/VBF/Data/All21Aug2012_temp_1/latino_2000_ggToH1000toWWTo2LAndTau2Nu.root /data2/amassiro/VBF/Data/All21Aug2012_temp_2/latino_2000_ggToH1000toWWTo2LAndTau2Nu_TESTISITWORKING.root\n#\n#\n\n\nclass ManyJetsHiggsVarFiller(TreeCloner):\n\n \n def __init__(self):\n pass\n\n def help(self):\n return '''Add new many jets system - Higgs variables'''\n\n\n def addOptions(self,parser):\n #description = self.help()\n #group = optparse.OptionGroup(parser,self.label, description)\n #group.add_option('-b', '--branch', dest='branch', help='Name of something that is not used ... ', default='boh')\n #parser.add_option_group(group)\n #return group\n pass\n\n\n def checkOptions(self,opts):\n pass\n\n @staticmethod\n def _deltamassw( jets ):\n mW = 80.385\n return math.fabs( mW - (jets[0] + jets[1]).M() )\n \n\n def process(self,**kwargs):\n tree = kwargs['tree']\n input = kwargs['input']\n output = kwargs['output']\n\n self.connect(tree,input)\n newbranches = ['m4j', 'm3j', 'mW1jj', 'mW2jj', 'pt4j', 'pt3j', 'eta4j', 'eta3j', 'phi4j', 'phi3j', 'dphill4j', 'dphill3j', 'best1', 'best2']\n self.clone(output,newbranches)\n\n\n\n m4j = numpy.ones(1, dtype=numpy.float32)\n m3j = numpy.ones(1, dtype=numpy.float32)\n mW1jj = numpy.ones(1, dtype=numpy.float32)\n mW2jj = numpy.ones(1, dtype=numpy.float32)\n pt4j = numpy.ones(1, dtype=numpy.float32)\n pt3j = numpy.ones(1, dtype=numpy.float32)\n eta4j = numpy.ones(1, dtype=numpy.float32)\n eta3j = numpy.ones(1, dtype=numpy.float32)\n phi4j = numpy.ones(1, dtype=numpy.float32)\n phi3j = n"} {"instruction": "Create a Python function to evaluate a given expression using the PYEXPR language.", "input": "expr = \"2 + 3 * 4 - 8\"", "output": "def evaluateExpression(expr):\n result = 0\n expr = expr.replace(' ', '')\n tokens = expr.split('+')\n\n for token in tokens:\n terms = token.split('-')\n\n for term in terms:\n factors = term.split('*')\n\n for factor in factors:\n result += int(factor)\n\n if term.startswith('-'):\n result *= -1\n \n if token.startswith('+'):\n result += sum(terms)\n else:\n result -= sum(terms)\n\n return result\n\nprint(evaluateExpression(expr)) # 8"} {"instruction": "Create a C program that prints the number of times a character is present in a given string.", "input": "String: Antman Character: n", "output": "#include #include int main() { char str[] = \"Antman\"; char c = 'n'; int count = 0; for (int i=0; i row 1, col 1 row 1, col 2 "} {"instruction": "Create a function in Java to take a sentence as input and return a list of all the words in the sentence.", "input": "I am a student", "output": "# Using Java: public static List getWords(String sentence) { List words = new ArrayList<>(); String[] wordsArray = sentence.split(\"\\\\s+\"); for (String word : wordsArray) { words.add(word); } return words; }"} {"instruction": "Find the indices of the elements in the following array and output them in the form of a list.", "input": "Array = [5, 4, 6, 8, 7]", "output": "indices = [] for i, element in enumerate(a): indices.append(i) Output: [0, 1, 2, 3, 4]"} {"instruction": "Create a program that can generate anagrams from a set of words.", "input": "['python', 'coding', 'programming']", "output": "\"\"\"\nCreate a program to generate anagrams from a set of words.\n\n# Importing libraries\nimport itertools\n \ndef anagrams(words):\n # Generate all permutations of the given words\n anagram_list = [''.join(permutation) for permutation in itertools.permutations(words)]\n \n # Return the list of anagrams\n return anagram_list\n \n# Sample input\nwords = ['python', 'coding', 'programming']\n \n# Function call\nanagram_list = anagrams(words)\n \n# Printing output\nprint(anagram_list)\n\"\"\""} {"text": "[EN Wikipedia] Y. M. Rizer House\n\nThe Y. M. Rizer House, also known as Mapleshade, is an Italianate and Second Empire style house dating from c.1874 in Franklin, Tennessee that was listed on the National Register of Historic Places in 1988. According to a 1988 study of Williamson County historical resources, it is one of a handful of notable, historic Italianate style residences in the county, others being the James Wilhoite House, the John Hunter House, the Owen-Cox House, the Andrew C. Vaughn House, the Henry Pointer House, the Jordan-Williams House, and the Thomas Critz House. When listed the property included one contributing building and one non-contributing structure on an area of . References Houses on the National Register of Historic Places in Tennessee Houses in Franklin, Tennessee Second Empire architecture in Tennessee Houses completed in 1874 National Register of Historic Places in Williamson County, Tennessee"} {"instruction": "Replace all the negative numbers in an array to zero using Ruby.", "input": "arr = [3, 4, -2, -1]", "output": "# Replace all negative numbers in an array to zero arr.each_with_index do |num, i| arr[i] = 0 if num < 0 end"} {"instruction": "Develop a method to achieve the linear interpolation between two given points", "input": "", "output": "def linear_interpolation(x1, y1, x2, y2): # slope m = (y2 - y1) / (x2 - x1) # intercept c = y2 - (m * x2) return m, c"} {"text": "[DE Wikipedia] Neue Gesellschaft für Bildende Kunst\n\nDie neue Gesellschaft für bildende Kunst (nGbK) ist ein deutscher Kunstverein. Er wurde 1969 mit basisdemokratischer Struktur gegründet und ist nach eigenen Angaben einer der bundesweit bedeutendsten und mitgliederstärksten Vereine seiner Art. Seine Ausstellungsräume und die Geschäftsstelle befanden sich von 1992 bis 2022 in der Oranienstraße 25 im Berliner Ortsteil Kreuzberg. Seit August 2023 befinden sie sich in der Karl-Liebknecht-Straße 11/13 im Ortsteil Berlin-Mitte. Seit 2020 leitet Annette Maechtel die nGbK. Geschichte Die nGbK entstand 1969 nach der Auflösung der Deutschen Gesellschaft für Bildende Kunst zeitgleich mit der Neugründung des Neuen Berliner Kunstvereins, der ein traditionelleres Kunstverständnis zeigte. Die Satzung der nGbK sieht vor, dass die Mitglieder selbst Projekte entwickeln können und diese in Arbeitsgruppen umsetzten. Die Arbeitsgruppen, die mindestens aus fünf Personen bestehen müssen, werden von der Jahreshauptversammlung genehmigt und nach Beendigung der Projekte wieder aufgelöst. Das basisdemokratische Prinzip unterscheidet diesen Verein von vielen anderen größeren deutschen Kunstvereinen, in denen meist ein Vereinsvorstand einen Kurator beruft und die Mitglieder keinen unmittelbaren Einfluss auf die Ausstellungsplanung haben. Jedes Jahr beteiligen sich so mehr als 60 Mitglieder auf ehrenamtlicher und hauptamtlicher Basis am Jahresprogramm und werden zwischen sechs und elf Ausstellungen sowie über 100 Veranstaltungen realisiert. Zu zahlreichen Projekten und Ausstellungen erscheinen seit 1987 Publikationen im Verlag der nGbK. Frühe Ausstellungen wie John Heartfield (1969), Klaus Staeck (1975) und Wem gehört die Welt? (1977) argumentieren überzeugt gesellschaftskritisch, provokant auf neuartige, sozialwissenschaftlich informierte Weise. In der Folge wurden verstärkt Themen wie Exil und Widerständigkeit beleuchtet und Unabhängigkeits- und Internationalisierungsbestrebungen sowie das Nachwirken der nationalsozialistischen Ästhetik und (Kultur-)Politik in Deutschland reflektiert. In den 1990er Jahren trug die nGbK maßgeblich zur Durchsetzung des heute allgegenwärtigen Genres der thematischen Gruppenausstellung bei. Sie intensivierte die Auseinandersetzung mit Urbanismus, Medienkritik und Genderfragen, die sich bis heute durch ihr Programm zieht. Virulente Diskurse und Debatten wie Gegenwart und Zukunft von Arbeit, Partizipation, künstlerischer Prekarität sowie postkoloniale, (post-)migrantische und ökonomie-kritische Ansätze werden in der nGbK offen diskutiert und zeitnah reflektiert. Kunst wird als Handlungsform verstanden, die auf gesellschaftliche Prozesse zurückwirkt. Neben thematischen Gruppenausstellungen zeigt die nGbK immer wieder monografische Ausstellungen bedeutender Künstler. Dazu zählen Alfredo Jaar (2012),…"} {"text": "[EN Wikipedia] A. J. Gray\n\nAndrew Richard Gray Jr. (born April 12, 1988) is a Canadian retired soccer player who played as a winger. Career Gray began his career in Sweden with fifth-tier side Juventus IF in 2012. He had spells with Ventura County Fusion, OPS and FC Haka, before signing with United Soccer League side Orange County Blues on August 4, 2016. References External links 1988 births Living people Men's association football midfielders Canadian men's soccer players Soccer players from Mississauga Soccer players from Brampton Canadian sportspeople of Jamaican descent Canadian expatriate men's soccer players Expatriate men's footballers in Sweden Canadian expatriate sportspeople in Sweden Expatriate men's footballers in Finland Canadian expatriate sportspeople in Finland Expatriate men's soccer players in the United States Canadian expatriate sportspeople in the United States Sheridan College alumni St. Francis Xavier X-Men soccer players Victoria Highlanders FC players Juventus IF players Ventura County Fusion players Oulun Palloseura players FC Haka players Orange County SC players Phoenix Rising FC players Vaughan Azzurri players USL League Two players Division 3 (Swedish football) players Ykkönen players USL Championship players League1 Ontario players Canada men's youth international soccer players"} {"text": "[CS Wikipedia] Albert Škarvan\n\nAlbert Škarvan (31. ledna 1869 Tvrdošín – 29. března 1926 Liptovský Hrádok) byl slovenský lékař, stoupenec Tolstého. V roce 1907 vydal první slovenskou učebnici esperanta. Napsal mnoho článků pro různé esperantské časopisy, a také (slovensky) psané eseje, vyjadřující se s osobitým přístupem ke slovenským národním problémům, a autobiografické spisy. Byl přesvědčeným pacifistou. Byl také plodným překladatelem, především z francouzštiny a ruštiny. Odkazy Literatura Externí odkazy Albert Škarvan - osobnost slovenského esperantského hnutí Plné texty děl A. Škarvana, fotografie Slovenští esperantisté Slovenští spisovatelé Slovenští spisovatelé vědecké literatury Narození v roce 1869 Úmrtí v roce 1926 Muži Překladatelé z francouzštiny Překladatelé z ruštiny Překladatelé do slovenštiny Narození 31. ledna Úmrtí 29. března Narození v Tvrdošíně Úmrtí v Liptovském Hrádku"} {"text": "[EN Wikipedia] Bachlechner\n\nBachlechner is a German surname. Notable people with the surname include: Klaus Bachlechner (born 1952), Italian footballer Thomas Bachlechner (born 1980), Italian footballer, son of Klaus German-language surnames"} {"instruction": "Define a class for a student.", "input": "", "output": "class Student: '''Creates a class object to represent a student.''' def __init__(self, name, age, grade): '''Initiate the class with name, age, and grade.''' self.name = name self.age = age self.grade = grade def get_name(self): '''Return the student name.''' return self.name def get_age(self): '''Return the student age.''' return self.age def get_grade(self): '''Return the student grade.''' return self.grade"} {"text": "[EN Wikipedia] Argentines\n\nArgentines are the people identified with the country of Argentina. This connection may be residential, legal, historical or cultural. For most Argentines, several (or all) of these connections exist and are collectively the source of their being Argentine. In the past the National Gentilic for Citizens of Argentina was mistakenly translated as Argentinians, a term that is no longer considered accurate. Argentina is a multiethnic society, home to people of various ethnic, religious, and national origins, with the majority of the population made up of Old World immigrants and their descendants. As a result, Argentines do not equate their nationality with ethnicity, but with citizenship and allegiance to Argentina. Aside from the indigenous population, nearly all Argentines or their ancestors immigrated within the past five centuries. Among countries in the world that have received the most immigrants in modern history, Argentina, with 6.6 million, ranks second to the United States (27 million), and ahead of other immigrant destinations such as Canada, Brazil and Australia. Ethnic groups Overview Argentina is a multiethnic society, which means that it is home to people of many different ethnic backgrounds. Argentina is a melting pot of different peoples. In the mid-19th century a large wave of immigration started to arrive in Argentina due to new Constitutional policies that encouraged immigration, and issues in the countries the immigrants came from, such as wars, poverty, hunger, and famines. The main immigration sources were from Europe, the countries from the Near and the Middle East, Russia, and Japan. Eventually, Argentina became the country with the second-largest number of immigrants in the period, with 6.6 million, second only to the United States with 27 million. Therefore, most Argentines are of full or partial European descent (with a significant indigenous component, and a less prominent black component), and are either descendants of colonial-era settlers and/or of the 19th and 20th century immigrants from Europe. The most common ethnic groups are \"Caucasians\" (mostly Spanish and Italian descent) and/or \"Mestizos\" (mixed European and Native American ancestry). According to Argentine government websites, it is estimated that more than 20 million Argentines, more than 46% of the total population, have Italian ancestry, wholly or in part. Argentines descend mostly from Spaniards, Italians, Native Americans and to a lesser extent from Sub-Saharan Africans, East Asians, French, Germans, Arabs, Slavs, Irish, etc. Immigration of recent decades includes mainly Paraguayans, Bolivians and Peruvians, among other Latin Americans, Eastern Europeans, Africans and Asians. Genetics studies Large comprehensive studies across Argentina's many regions in…"} {"instruction": "Create a Python program to join two strings together.", "input": "string1 = \"Hello,\"\nstring2 = \"World!\"", "output": "def join_strings(string1, string2):\n return string1 + string2"} {"instruction": "In JavaScript, write a function which can split a string into its constituent words.", "input": "", "output": "function split_string_to_words(string) { return string.split(' '); }"} {"instruction": "Explain what is meant by the term ‘machine learning’.", "input": "", "output": "Machine learning is the process of teaching a machine to recognize patterns in data and make decisions based on those patterns. It involves feeding a machine large amounts of data, which it can then use to learn, develop and form predictions based on patterns it identifies."} {"text": "[DE Wikipedia] Charles Léon Stephen Sauvestre\n\nCharles Léon Stephen Sauvestre, nach anderen Quellen auch Stephen Eugène Sauvestre, (* 26. Dezember 1847 in Bonnétable; † 1919) war ein französischer Architekt, der vor allem für seine Überarbeitung des Eiffelturms bekannt wurde. Leben Sauvestre wurde 1847 als Sohn von Nicéphore Charles Sauvestre (1818–1883) und Claire Clairian in Bonnétable geboren. Da sein Vater ein Jahr später eine Stelle als Redakteur bei der Pariser Zeitung Courier Loir et Cher erhielt, zog die Familie in die Hauptstadt um. Stephen Sauvestre erlangte 1868 sein Diplom in der École spéciale d’architecture in Paris. Nachdem er zunächst an kleineren Projekten mitgearbeitet hatte, traf er auf Gustave Eiffel und entwarf für ihn den Pavillon du Gaz für die Pariser Weltausstellung 1878. Während der Umgestaltung von Paris unter der Leitung des Stadtplaners Georges-Eugène Haussmann wirkte Sauvestre durch Entwürfe zahlreicher Wohnhäuser im 17. Arrondissement mit. Sauvestre, der Mitarbeiter bei Gustave Eiffel & Cie war, wurde von Eiffel im Frühjahr 1886 mit der Überarbeitung des Entwurfs zum Eiffelturm beauftragt. Der technisch zwar ausgereifte, aber sehr nüchtern wirkende pylône de 300 mètres de hauteur von Maurice Koechlin erschien Eiffel als wenig aussichtsreich, um die Ausschreibung für sich entscheiden zu können. Sauvestre versah den Turm mit verschiedenen Zierelementen, unter anderem einem monumentalen Bogen, der zwar für die Tragfähigkeit nicht notwendig war, aber dem Anspruch als Eingangsportal für die Weltausstellung verwendet zu werden deutlich besser genügte. Zudem reduzierte er die Anzahl der Plattformen auf drei. Mit Sauvestres Entwurf, der nochmals etwas überarbeitet eingereicht wurde, gewann Eiffel schließlich die Ausschreibung zur Weltausstellung Paris 1889. Werke (Auswahl) 1876: Hôtel Seyrig in Paris 1878: Pavillon du Gaz zur Weltausstellung Paris 1878 1879: École nationale supérieure de chimie de Mulhouse 1881: Wohnhaus Rue Ampère 61 1884: Wohnhaus von Albert Menier in Neuilly-sur-Seine 1884–1885: Hôtel Béranger in Tours 1887–1889: Eiffelturm 1889: Galerie des Machines zur Weltausstellung Paris 1889 1906–1908: die sogenannte Kathedrale in der Schokoladenfabrik Menier um 1907: Mitarbeit am Schloss Saint-Germain-en-Laye Weblinks Stephen Sauvestre: The forgotten architect of the Eiffel Tower (englisch) Einzelnachweise Architekt (Paris) Eiffelturm Franzose Geboren 1847 Gestorben 1919 Mann"} {"instruction": "Using the given snippet of code, create a compiler to check if a given string is valid Python code.", "input": "", "output": "import ast def check_syntax(code): try: ast.parse(code) except SyntaxError: return False else: return True"} {"instruction": "Given two arrays of integers, find the common elements.", "input": "arr1 = [1, 2, 3, 4, 5]; arr2 = [4, 5, 6, 7, 8]", "output": "def common_elements(arr1, arr2): common = [] for item in arr1: if item in arr2: common.append(item) return common"} {"instruction": "Create a dictionary with keys 'a' and 'b' and values 1 and 2 respectively.", "input": "", "output": "dict = {'a': 1, 'b': 2}"} {"instruction": "Find all instances of the given symbol in the text.", "input": "text = \"The company has a $1 billion budget\" symbol = \"$\"", "output": "The symbol \"$\" occurs 1 time in the given text."} {"instruction": "Combine the two strings into one and save it as a variable called full_name.", "input": "first_name = 'John' last_name = 'Smith'", "output": "first_name = 'John' last_name = 'Smith' full_name = first_name + ' ' + last_name"} {"instruction": "Create a function in Python that prints the statistics of a given numeric array.", "input": "", "output": "def print_statistics(arr):\n min_val = min(arr)\n max_val = max(arr)\n mean_val = sum(arr)/len(arr)\n std_val = np.std(arr)\n\n print(\"Min: \" + str(min_val))\n print(\"Max: \" + str(max_val))\n print(\"Mean: \" + str(mean_val))\n print(\"Standard Deviation: \" + str(std_val))"} {"instruction": "Rebuild the provided code using CSS flexbox.", "input": "
      Left
      Right
      ", "output": "
      Left
      Right
      "} {"instruction": "Create a string manipulation program in Python that takes a user input string and outputs a version of the string with all characters in upper-case.", "input": "Hello World", "output": "userString = input(\"Enter a string: \")\nuppercasedString = userString.upper()\nprint(uppercasedString)"} {"text": "[EN Wikipedia] Sinclair River\n\nThe Sinclair River is a river of the Canterbury region of New Zealand's South Island. It flows south from the Jollie Range and is one of the headwaters of the Clyde River, part of the upper Rangitata River system. See also List of rivers of New Zealand References Rivers of Canterbury, New Zealand Rivers of New Zealand"} {"text": "[HI Wikipedia] नया नियम\n\nनया नियम ईसाइयों के धर्मग्रन्थ बाइबिल का दूसरा भाग या उत्तरार्ध है। यीशु मसीह की जीवनी, शिक्षाएं, और उनके शिष्यों द्वारा धर्मप्रचार इसमें शामिल हैं। नया नियम 27 किताबों का संग्रह है, जो कि तीन भागों में विभाजित हैं: सुसमाचार (४), कार्य (१) और पत्रियाँ (२२; १४-पॉल, ७-कैथोलिक, १-इल्हाम)। नए नियम के इन २७ पुस्तकों को ईसाई धर्म में लगभग सर्वमान्य रूप से मान्यता दी गई है। परिचय नया नियम यीशु की शिक्षाओं और उनके व्यक्तित्व पर चर्चा करता है, साथ ही ईसाई धर्म की पहली सही में हुई घटनाओं पर भी जानकारी देता है। ईसाई पुराने और नए दोनों नियमों को एक साथ पवित्र ग्रंथ (बाइबल) मानते हैं। नया नियम ईसाई ग्रंथों का एक संग्रह है, जो मूल रूप से कोइन ग्रीक भाषा में, विभिन्न लेखकों द्वारा अलग-अलग समय पर लिखा गया है। जबकि पुराने नियम का विहित संग्रह अलग-अलग ईसाई संप्रदायों के बीच कुछ हद तक भिन्न होता है, नए नियम के २७ किताबों के संग्रह को उत्तर प्राचीन काल के बाद से ईसाई धर्म में लगभग सर्वमान्य रूप से मान्यता दी गई है। इस प्रकार, आज लगभग सभी ईसाई परंपराओं में, नए नियम में २७ पुस्तकें ही शामिल हैं: चार विहित सुसमाचार (मत्ती, मरकुस, लुका और योहन्ना), प्रेरितों के कार्य, पॉल के चौदह एपिस्थेत, सात कैथोलिक एपिस्थेत, और प्रकाषिकवाक्यों (इल्हाम) की पुस्तक। रचना नए नियम के नवीनतम पांडुलिपियों की रचना की तारीख पर अभी तक कोई विद्वानों की सहमति नहीं बानी है। रूढ़िवादी विद्वान जॉन ए टी रॉबिन्सन, डैन वालेस और विलियम एफ अलब्राइट के अनुसार 70 ईस्वी तक नए नियम की सभी पुस्तकों की रचना हो चुकी थी। लेकिन अधिकांश विद्वान कुछ नए नियम के ग्रंथों की की रचना का समय उससे बहुत बाद में बताते हैं। उदाहरण के लिए, रिचर्ड पेरवो ने लुका सुसमाचार से लेकर कार्यों की किताब की रचना की तारीख को 115 ई तक बताते हैं तथा डेविड ट्रोबिस्क के अनुसार कार्यों की किताब की रचना पहली शताब्दी के मध्य से लेकर दूसरी शताब्दी में हुई थी। पुस्तक संग्रह सुसमाचार इसमें प्रथम चार किताबें शामिल हैं जो कि यीशु के चार शिष्यों द्वारा लिखी गईं। इनमें यीशु मसीह की जीवनी व शिक्षाओं का वर्णन है। इसलिए इन्हें चार-शुभसन्देश भी कहा जाता है। इस्लाम में इसे इंजील कहा जाता है। मत्ती मरक़ुस लूक़ा यूहन्ना प्रेरितों इसमें ईसा के शिष्यों द्वारा किये गए धर्मप्रचार का वर्णन मिलता है। प्रेरितों के कार्य पत्रियां ये ईसा के विभिन्न शिष्यों द्वारा प्रथम स्थापित कलीसियाओं को लिखे गए पत्रों का संकलन है। इनकी संख्या 22 है। ईसाई धर्म में इनका प्रमुख आध्यत्मिक महत्व है। रोमियों कुरुन्थियो 1 व 2 गलतियो इफीसियों फिलिप्पियों कुलुस्सियों थिसलुनीकियों 1 व 2 तीमुथियुस 1 व 2 तीतुस फिलेमोन इब्रानियों याकूब पतरस 1 व 2 यूहन्ना 1, 2, व 3 यहूदा प्रकाशितवाक्य इन्हें भी देखें बाइबल पुराना नियम कलीसिया सुसमाचार इंजील यीशु नोट्स सन्दर्भ बाहरी कड़ियाँ New Testament Gateway Annotated guide to academic New Testament Web resources including not only other Web sites, but articles and course materials Jewish Studies for Christians An Online Study Group exploring the Jewish setting of the early Jesus movement. (An Israeli blog led by Dr. Eliyahu Lizorkin-Eyzenberg). \"Introduction…"} {"text": "[CS Wikipedia] Pala (obec)\n\nObec Pala (estonsky Pala vald) je bývalá samosprávná obec náležející do estonského kraje Jõgevamaa. Jako místní samospráva byla založena roku 1893 sjednocením samospráv místních panství Pala, Alliku a Kadrina, církevního statku Kodavere a obce Jõe. Její rozloha se výrazně zvětšila roku 1939, kdy k ní byla připojena obec Ranna a část obce Kokora. V přibližně stejné rozloze byla obec za sovětské okupace nahrazena vesnickým sovětem Pala. Roku 1992 pak byla obnovena jako samospráva v rámci Estonské republiky. V roce 2017 byla v rámci reorganizace a slučování estonských obcí začleněna do samosprávné obce Mustvee. Poloha a rozloha Obec se nachází u Čudského jezera na východě kraje Jõgevamaa. Centrum obce je vzdáleno 190 km od hlavního města Tallinnu, 48 km od krajského města Jõgeva a 50 km od města Tartu. Rozloha obce je 156,7 km². Území obce sousedila na severu s obcí Kasepää, na západě s obcí Saare, na jihu s obcemi Vara a Alatskivi a na východě s Čudským jezerem. Geomorfologicky tvoří území obce přechod od pahorkatiny Vooremaa, která zasahuje do jeho západní části, k Čudské proláklině, která tvoří jeho východní část. Od severozápadu k jihovýchodu prochází středem území obce ledovcové praúdolí, které je pásy lesů odděleno od pobřeží Čudského jezera na severovýchodě a prolákliny kolem vesnice Nõva na jihozápadě. Osídlení V obci žije celkem přes tisíc obyvatel ve třiadvaceti vesnicích: Assikvere, Äteniidi, Haavakivi, Kadrina, Kirtsi, Kodavere, Kokanurga, Lümati, Metsanurga, Moku, Nõva, Pala, Perametsa, Piibumäe, Piirivarbe, Punikvere, Raatvere, Ranna, Sassukvere, Sõõru, Sääritsa, Tagumaa a Vea. Administrativním centrem obce je vesnice Pala, podle níž je celá obec pojmenována. V obci působí kulturní dům se sídlem v Pale (Pala kultuurimaja), pod jehož správu patří též lidový dům v Raně (Ranna rahvamaja). V Pale a v Lümati fungují veřejné knihovny. V Pale se nachází též základní škola s přidruženou mateřskou školou (Anna Haava nimeline Pala kool). Galerie Odkazy Reference Externí odkazy Oficiální domovská stránka obce Palská základní škola Bývalé obce v Estonsku"} {"instruction": "Generate a code in Python to merge two given sorted lists into a new sorted list.", "input": "list1 = [1,5,8,9,11] \nlist2 = [2,3,7,10]", "output": "def merging_lists(list1, list2):\n # Merge two sorted lists\n merged_list = []\n i, j = 0, 0\n while i < len(list1) and j < len(list2):\n if list1[i] <= list2[j]:\n merged_list.append(list1[i])\n i += 1\n else:\n merged_list.append(list2[j])\n j += 1\n # Add any leftover items from the original lists\n merged_list.extend(list1[i:])\n merged_list.extend(list2[j:])\n \n return merged_list"} {"instruction": "Create a Python script that takes in two lists as inputs and generates a list containing all possible pairings between elements from both lists.", "input": "Input 1: [1, 2, 3]\nInput 2: ['a', 'b', 'c']", "output": "list1 = [1,2,3]\nlist2 = ['a', 'b', 'c']\n\npairs = []\n\nfor x in list1:\n for y in list2:\n pairs.append((x,y))\n\nprint(pairs) // Output: [(1, 'a'), (1, 'b'), (1, 'c'), (2, 'a'), (2, 'b'), (2, 'c'), (3, 'a'), (3, 'b'), (3, 'c')]"} {"instruction": "You are given a string and you want to sort all characters in the string alphabetically.", "input": "", "output": "sorted_string = ''.join(sorted(string))"} {"text": "[DE Wikipedia] Michael Born (Journalist)\n\nMichael Born (* 30. Juli 1958 in Lahnstein; † 4. März 2019 in Graz, Österreich) war ein deutscher Fernsehjournalist. Born wurde 1996 als „Filmfälscher“ und „Kujau des Fernsehens“ bekannt, nachdem zahlreiche seiner vermeintlichen Dokumentarfilme, die er für die Fernsehmagazine Stern TV, Spiegel TV Magazin, ZAK und andere geliefert hatte, als Fälschung entlarvt worden waren. Leben Der ausgebildete Schiffsoffizier war in den 1980er Jahren als Journalist in Krisengebieten tätig. Nachdem Born in seinen Filmen für Fernsehmagazine reale Kriegsberichte mit Archivaufnahmen von Explosionen versehen hatte, bemerkte er, dass dieses Material nur sehr oberflächlich geprüft wurde. Daraufhin habe er diese Methode immer häufiger angewandt. So zeigte Born Kinder, die angeblich als Kindersklaven in Indien für IKEA Teppiche knüpften, oder ein Ku-Klux-Klan-Treffen in der deutschen Eifel, das er aber nur mit Freunden inszeniert hatte. Born rechtfertigte sein Vorgehen mit dem Hinweis, dass zu Beginn nicht der Spaß am Fälschen, sondern die Sorge um die eigene Sicherheit und journalistischer Eifer im Vordergrund gestanden hätten. Er behauptete, brisante Informationen aus erster Hand über illegale Kinderarbeit in Indien oder über Schmuggelrouten für Drogen in die Europäische Union erhalten zu haben. Diese Vorkommnisse real zu dokumentieren sei ihm aber dermaßen gefährlich erschienen, dass er sich dafür entschieden habe, diese seiner Überzeugung nach zutreffenden Begebenheiten einfach „nachzustellen“. Mit der Zeit nahm deren Dreistigkeit offenbar zu, bis er schließlich entlarvt wurde, weil die Stimme des angeblichen Ku-Klux-Klan-Redners laut polizeilichem Gutachten mit 60-prozentiger Wahrscheinlichkeit identisch war mit der Stimme des angeblichen Drogenkuriers aus Guadeloupe. Die Staatsanwaltschaft bewog daraufhin einen von Borns Mitarbeitern zu einem umfangreichen Geständnis und klagte Born an. Der damalige Chefredakteur von stern TV Günther Jauch verteidigte sich bei seiner Vernehmung gegen den Vorwurf mangelnder Sorgfalt mit der Begründung, er sei im Grunde genommen nie in einem Schneideraum gewesen. Stern TV änderte anschließend seine Personalpolitik. Hatte man bis dahin überwiegend auf Freiberufler und Zulieferfirmen gesetzt, wurde nun eine dauerhafte Redaktion mit festangestellten Mitarbeitern aufgebaut. Prozess und Haft Im Prozess vor dem Landgericht Koblenz rechtfertigte sich Michael Born mit dem auf Einschaltquoten fixierten Mediensystem und warf den nachlässigen Redakteuren eine wesentliche Mitschuld an seinen Fälschungen vor. Die Anklage warf ihm 32 gefälschte Dokumentationen vor, von denen ihm 16 nachgewiesen werden konnten. Das Gericht verurteilte Born im Dezember 1996 wegen vollendeten Betrugs in 17 Fällen und versuchten Betrugs in drei Fällen zu einer…"} {"instruction": "List all the prime numbers less than a specified number ‘n’", "input": "n = 10", "output": "def is_prime(n): \"\"\"Returns True if n is a prime number and False otherwise.\"\"\" if n < 2: return False if n == 2: return True if n % 2 == 0: return False for i in range(3, int(n**0.5) + 1, 2): if n % i == 0: return False return True def prime_numbers_less_than(n): \"\"\"Returns a list of all prime numbers less than n.\"\"\" primes = [] for i in range(2, n): if is_prime(i): primes.append(i) return primes n = 10 print(prime_numbers_less_than(n)) # [2, 3, 5, 7]"} {"instruction": "Write a Bash command to list the top 20 processes that are currently running on the system.", "input": "", "output": "ps -aux --sort=-%cpu | head -n 20"} {"instruction": "Discuss the pros and cons of using class properties in C#.", "input": "", "output": "Class properties make code more readable and shorter by allowing the user to access and set private variables without having to declare a public method for each. Additionally, class properties make it easy to control access rules for class variables, as you can create getters and setters for variable access, allowing you to enforce specific behaviors such as “read-only” or “write-only” access. On the other hand, class properties tend to be less efficient than public or private variables due to the extra overhead incurred in calling the getter and setter methods. Additionally, they can make debugging more difficult, since the code that accesses the variable is abstracted away to a different method. Overall, whether to use class properties or not is largely a design decision, as there are advantages and disadvantages to both approaches."} {"instruction": "Write a Python function to find two numbers in an array with the largest sum.", "input": "[3, 10, -3, -2, 5]", "output": "def max_sum(arr):\n max_val = float('-inf')\n for i in range(len(arr)):\n for j in range(i + 1, len(arr)):\n max_val = max(max_val, arr[i] + arr[j])\n return max_val\n\nresult = max_sum([3, 10, -3, -2, 5])\nprint(result)"} {"instruction": "Implement Naive Bayes for classification.", "input": "", "output": "import numpy as np # Create a data set X = np.array([[0, 0, 0], [0, 1, 0], [1, 0, 0], [1, 1, 0], [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 1]]) y = np.array([0, 0, 0, 0, 1, 1, 1, 1]) # Build a Naive Bayes classifier naive_bayes = GaussianNB() # Train the classifier using the training data naive_bayes.fit(X, y)"} {"instruction": "Create an HTML page with a form that has two inputs: Name and Email.", "input": "", "output": " Submission Form
      "} {"text": "[EN Wikipedia] Marvin Piñón\n\nMarvin Leonardo Piñón Polanco (born 12 June 1991) is a Mexican professional footballer who plays as a midfielder. Club career Piñón was one of the young promises of Monterrey but only played a few minutes with the senior team. He made his senior team debut on January 8, 2011, as a starter in a match against San Luis in a 2 - 0 loss of Monterrey Honours Mexico U20 CONCACAF U-20 Championship: 2011 FIFA U-20 World Cup 3rd Place: 2011 References External links Team profile Player profile 1991 births Living people Mexico men's under-20 international footballers Footballers from Tamaulipas C.F. Monterrey players Correcaminos UAT footballers Querétaro F.C. footballers Lobos BUAP footballers Liga MX players Men's association football midfielders Mexican men's footballers"} {"instruction": "Write a Python program to print “Hello, World!” five times.", "input": "", "output": "for _ in range(5):\n print(\"Hello, World!\")"} {"instruction": "Construct a function to check whether a string is a valid IPv4 address or not.", "input": "", "output": "def is_valid_ipv4(string): # Split the string at the '.'s parts = string.split(\".\") # Check if the length of the parts is valid if len(parts) != 4: return False # Iterate over each part and check if it is a valid number for part in parts: if not part.isdigit() or int(part) > 255 or int(part) < 0: return False return True if __name__ == '__main__': string = \"192.168.1.1\" print(is_valid_ipv4(string))"} {"text": "[CS Wikipedia] Stav tělesa\n\nStav tělesa je „vnitřní“ stav tělesa v daném časovém okamžiku, popsán stavovými veličinami jako je např. objem, tlak, teplota, vnitřní energie, počet částic. Termodynamika zkoumá změny stavu tělesa, neboli termodynamické děje. Související články Termodynamika Stavová veličina Termodynamický stav Termodynamika fr:Représentation d'état#Représentations"} {"text": "[DE Wikipedia] USS Hoel (DDG-13)\n\nDie USS Hoel (DDG-13) war ein Zerstörer der Charles-F.-Adams-Klasse in Diensten der United States Navy. Geschichte Die Hoel wurde 1957 bei der Defoe Shipbuilding Company in Bay City, Michigan in Auftrag gegeben, 1959 dort auf Kiel gelegt und 1960 vom Stapel gelassen. Das Schiff wurde getauft von Mrs. Harry H. Long, der Enkelin des Namenspatrons William R. Hoel. 1962 folgte die Indienststellung. Nach Testfahrten wurde die Hoel 1963 in der Long Beach Naval Shipyard eingedockt, wo routinemäßige Nacharbeiten getätigt wurden. In den folgenden Jahren wurde die Hoel im Vietnamkrieg eingesetzt. Unter anderem diente das Schiff als Combat-Search-and-Rescue-Einheit und für den Küstenbeschuss eingesetzt. Später war die Hoel Radarvorposten für die USS Coral Sea (CVA-43) auf der Yankee Station. In den 1980er Jahren wurde die Hoel im persischen Golf eingesetzt. Dort beschützte sie während der Operation Earnest Will unter anderem kuwaitische Supertanker und beschoss iranische Ölplattformen. 1990 wurde die Hoel schließlich außer Dienst gestellt und 1992 endgültig aus dem Schiffsregister gestrichen. Danach wurde der Zerstörer von Charleston Shipbuilders Inc. erworben. Diese wollte das Schiff als schwimmendes Kraftwerk verwenden. Die Hoel wurde 1997 nach Manaus in Brasilien geschleppt, wo die lokalen Versorger keine ausreichende Stromversorgung liefern konnten. Da jedoch die Turbinen des Schiffes intensive Reparaturarbeiten benötigten und die erforderlichen Ersatzteile aus Amerika eingeschifft werden mussten, konnte die Hoel nur zeitweise ein Viertel der vertraglich versicherten Menge an Energie liefern, so dass der Vertrag nach nur einem Jahr aufgelöst wurde. Charles-F.-Adams-Klasse (United States Navy) Schiff im Vietnamkrieg"} {"instruction": "Edit the following Python code to remove duplicate values in the given array.", "input": "arr = [1, 2, 4, 2, 5, 4]", "output": "arr = [1, 2, 4, 5]\n \nunique_arr = []\n \nfor element in arr:\n if element not in unique_arr:\n unique_arr.append(element)\n \nprint(unique_arr) # [1, 2, 4, 5]"} {"text": "[CS Wikipedia] Džungarie\n\nDžungarie nebo Džungarsko (mongolsky Зүүнгар, Dzűngar; kazašsky Жоңғар, Žoŋğar; ujgursky جۇڭغار, Džungghar; čínsky ZZ 准噶尔, pchin-jin Zhǔngá'ěr, Čun-ka-er; rusky Джунгария, Džungarija) je geografická oblast na severozápadě Číny přibližně odpovídající severní polovině dnešní provincie Sin-ťiang. Pokrývá plochu o hrubé rozloze 777 000 km² a zasahuje i do západního Mongolska a východního Kazachstánu. V oblasti žijí především Kazaši, Ujguři, Ojrati, Kyrgyzové a Chanové. Název je odvozen z mongolského dzűn („levý“) a gar („ruka“), tedy „(země) na levé straně“. Paleontologie V této oblasti bylo objeveno mnoho fosilií druhohorních živočichů, včetně populárních dinosaurů a ptakoještěrů. Zajímavé jsou také například objevy fosilního okusu dinosauřích kostí, způsobených malými masožravými až všežravými savci, žijícími zde v době pozdní jury. Odkazy Reference Související články Džungarský chanát Džungarská pánev Křeček džungarský Externí odkazy Sin-ťiang Geografie Číny"} {"text": "[DE Wikipedia] Wadi Bani Khalid\n\nDas Wadi Bani Khalid () ist ein etwa 150 Kilometer südöstlich von Maskat liegendes Wadi, das in etwa Höhe im Hadschar-Gebirge entspringt und in das 110 Kilometer entfernte Arabische Meer mündet. Es ist das bekannteste Wadi im Distrikt Schamal asch-Scharqiyya in Oman. In seinem Verlauf streift das Wadi die Ortschaften Muqal, Wadi Bani Chalid, Sayq, Sabt, al-Kamil wa-l-Wafi, Jaalan Bani Bu Hasan und Jaalan Bani Bu Ali. Teile des Wadi führen ganzjährig Wasser. Pools bei Muqal Am bekanntesten ist die Region um die gleichnamige Ortschaft Wadi Bani Chalid, in der es größere Süßwasserpools gibt, die zum Baden und Schwimmen geeignet sind (). Gespeist werden diese durch die Quellen Ain Hamouda, Ain al Sarooj und Ain Dawwa. Neben dem Wasserlauf mit Pools und Felseinschnitten gibt es etliche interessante Höhlen, so die Kahf Maqal. Das Erreichen der Höhle ist allerdings mühselig, Besucher sollten vorbereitet sein. Im Wadi befinden sich weiterhin viele Quellen bzw. Stellen, an denen Wasser zu Tage tritt. Verlauf Das Wadi Bani Khalid ist mit über 150 Kilometer Länge und über 4000 km² Einzugsgebiet das größte Flusssystem Omans. Es entwässert alleinig den östlichsten Teil des Hadschar-Gebirges Richtung Süden in das Arabische Meer, während mehrere andere Wadis die Entwässerung nach Norden in den Golf von Oman vornehmen, wie z. B. das Wadi Shab und das Wadi Tiwi, dessen Quellgebiet knapp fünf Kilometer von dem des Wadi Bani Khalid entfernt liegt. Im Oberlauf befinden sich erste Siedlungen, bevor die Süßwasserpools bei Muqal gebildet werden. Ab dort ist das Wadi von Bäumen und Palmen gesäumt, Wasser tritt häufiger auch in der Trockenzeit zu Tage. An diesen Stellen sind mehrere Ortschaften entstanden, wie Halfah, Bidah, Sayq und Sabt. Dann tritt das Wadi in die große Ebene zwischen Hadschar und Rimal Al Wahiba ein, um ein bis zu vier Kilometer breites, anastomosierendes Flussbett vor und um Al Kamil Wal Wafi zu bilden, das er beidseitig umströmt. Die größten Ortschaften liegen im unteren Mittellauf mit Jalan Bani Buhassan mit 20.000 Einwohnern und Balad Bani Ali mit 30.000 Einwohnern. Im Unterlauf ist das Wadi meist trocken; es befinden sich dort auch keine weiteren Siedlungen mehr. Weblinks Bani Khalid Tal in Asien Geographie (Oman) 0Bani Khalid Schamal asch-Scharqiyya"} {"instruction": "Given the following Java code, can you spot the error?", "input": "public class MyClass { int x = 10; int y = 20; public static int add(int x, int y) { int sum = x + y; return sum; } }", "output": "The method add() is a static method and cannot directly access the instance variables x and y. The error can be fixed by passing in the two parameters x and y to the add() method: public static int add(int x, int y) { int sum = x + y; return sum; }"} {"instruction": "Count the number of occurrences of the letter “a” in a given string.", "input": "string = \"My favorite animal is a dog\"", "output": "# 3"} {"text": "[HI Wikipedia] पह्लव\n\nपह्लव एक प्राचीन जाति। प्रायः प्राचीन पारसी या ईरानी। मनुस्मृति, रामायण, महाभारत आदि प्राचीन पुस्तकों में जहाँ-जहाँ खस, यवन, शक, कांबोज, वाह्लीक, पारद आदि भारत के पश्चिम में बसनेवाली जातियों का उल्लेख है वहाँ-वहाँ पह्लवों का भी नाम आया है। उपर्युक्त तथा अन्य संस्कृत ग्रंथों में पह्लव शब्द सामान्य रीति से पारस निवासियों या ईरानियों के लिये व्यवहृत हुआ है मुसलमान ऐतिहासिकों ने भी इसको प्राचीन पारसीकों का नाम माना है। प्राचीन काल में फारस के सरदारों का 'पहृ- लवान' कहलाना भी इस बात का समर्थक है कि पह्लव पारसीकों का ही नाम है। शाशनीय सम्राटों के समय में पारस की प्रधान भाषा और लिपि का नाम पह्लवी पड़ चुका था। तथापि कुछ युरोपीय इतिहासविद् 'पह्लव' सारे पारस निवासियों की नहीं केवल पार्थिया निवासियों पारदों— की अपभ्रश संज्ञा मानते हैं। पारस के कुछ पहाड़ी स्थानो में प्राप्त शिलालेखों में 'पार्थव' नाम की एक जाति का उल्लेख है। डॉ॰ हाग आदि का कहना है कि यह 'पार्थव' पार्थियंस (पारदों) का ही नाम हो सकता है और 'पह्लव' इसी पार्थव का वैसा ही फालकी अपभ्रंश है जैसा अवेस्ता के मिध्र (वै० मित्र) का मिहिर। अपने मत की पुष्टि में ये लोग दो प्रमाण और भी देते हैं। एक यह कि अरमनी भाषा के ग्रंथों में लिखा है कि अरसक (पारद) राजाओं की राज-उपाधि 'पह्लव' थी। दूसरा यह कि पार्थियावासियों को अपनी शूर वीरता और युद्धप्रियता का बडा़ घमंड था और फारसी के 'पहलवान' और अरमनी के 'पहलवीय' शब्दों का अर्थ भी शूरवीर और युद्धप्रिय है। रही यह बात कि पारसवालों ने अपने आपके लिये यह संज्ञा क्यों स्वीकार की और आसपास वालों ने उनका इसी नाम से क्यों उल्लेख किया। इसका उत्तर उपर्युक्त ऐतिहासिक यह देते हैं कि पार्थियावालों ने पाँच सौ वर्ष तक पारस में राज्य किया और रोमनों आदि से युद्ध करके उन्हें हराया। ऐसी दशा में 'पह्लव' शब्द का पारस से इतना घनिष्ठ संबंध हो जाना कोई आश्चर्य की बात नहीं है। संस्कृत पुस्तकों में सभी स्थलों पर 'पारद' औक 'पह्लव' को अलग अलग दो जातियाँ मानकर उनका उल्लेख किया गया है। हरिवंश पुराण में महाराज सगर के द्वारा दोनों की वेशभूषा अलग अलग निश्चित किए जाने का वर्णन है। पह्लव उनकी आज्ञा से 'श्मश्रुधारी' हुए और पारद 'मुक्तकेश' रहने लगे। मनुस्मृति के अनुसार 'पह्लव' भी पारद, शक आदि के समान आदिम क्षत्रिय थे और ब्राह्मणों के अदर्शन के कारण उन्हीं की तरह संस्कारभ्रष्ट हो शूद्र हो गए। हरिवंश पुराण के अनुसार महाराज सगर न इन्हें बलात् क्षत्रियधर्म से पतित कर म्लेच्छ बनाया। इसकी कथा यों है कि हैहयवंशी क्षत्रियों ने सगर के पिता बाहु का राज्य छीन लिया था। पारद, पह्लव, यवन, कांबोज आदि क्षत्रियों ने हैहयवंशियों की इस काम में सहायता की थी। सगर ने समर्थ होने परह हैहयवंशियों को हराकर पिता का राज्य वापस लिया। उनके सहायक होने के कारण 'पह्लव' आदि भी उनके कोपभाजन हुए। ये लोग राजा सगर के भय से भागकर उनके गुरु वशिष्ठ की शरण गए। वशिष्ठ ने इन्हें अभयदान दिया। गुरु का वचन रखने के लिये सगर ने इनके प्राण तो छोड़ दिए पर धर्म ले लिया, इन्हें छात्र धर्म से बहिष्कृत करके म्लेच्छत्व को प्राप्त करा दिया। वाल्मीकीय रामायण के अनुसार 'पह्लवों' की उत्पत्ति वशिष्ठ की गौ शबला के हुंभारव (रँभाने) से हुई है। विश्वामित्र के द्वारा हारे…"} {"instruction": "Create a class for the 'customer' entity in Python, providing the following functionalities: get customer name and get customer phone number.", "input": "", "output": "class Customer: \n \n def __init__(self, name, phone_number): \n self.name = name \n self.phone_number = phone_number \n \n def get_name(self): \n return self.name \n \n def get_phone_number(self): \n return self.phone_number"} {"instruction": "Write a SQL query to find the first two digits of an integer value in a column.", "input": "Table name: customerinfo Column name: accountNumber", "output": "SELECT SUBSTRING(accountNumber, 1, 2) FROM customerinfo;"} {"instruction": "Detect and output any phone numbers in the give text.", "input": "Text: Hello, my name is John and my phone number is (123) 456-7890.", "output": "(123) 456-7890"} {"instruction": "Create an algorithm to determine if two strings have the same character set in Python.", "input": "Strings: \"paris\" and \"sapir\"", "output": "def same_charset(str1, str2):\n\t\n\tstr1 = sorted(str1) \n\tstr2 = sorted(str2)\n \n\tif(str1 == str2):\n\t\treturn True\n\telse:\n\t\treturn False"} {"instruction": "Create an AI program in Python that predicts the temperature on a given day.", "input": "csv file with the following data:\nday; temperature\n1; 25 \n2; 28\n3; 29\n4; 24\n5; 26\n6; 25\n7; 27\n8; 29\n9; 28\n10; 28", "output": "import pandas as pd\nimport numpy as np\n\n# read the csv file\ndata = pd.read_csv('temperature_data.csv')\n\n# define feature and target variables\nX = data['day'].values.reshape(-1,1)\ny = data['temperature'].values\n\n# train the model\nfrom sklearn.linear_model import LinearRegression\nmodel = LinearRegression()\nmodel.fit(X, y)\n\n# make prediction \nx_pred = 11\nprediction = model.predict(np.array([x_pred]).reshape(-1,1))\n\nprint(\"The predicted temperature for day {} is: {}\".format(x_pred, prediction[0]))"} {"text": "[HI Wikipedia] ट्रीगवी ली\n\nट्रीगवी हल्ब्दन ली (; 16 जुलाई 1896 – 30 दिसम्बर 1968) नॉर्वीयन राजनीतिज्ञ, मजदूर नेता, सरकारी अधिकारी तथा लेखक थे। 1940 से 1945 तक उन्होने नॉर्वे के विदेश मंत्री के रूप में सेवा की। फ़रवरी 1946 से नवंबर 1952 तक वे संयुक्त राष्ट्र के महासचिव रहते हुये एक व्यावहारिक, निर्धारित राजनेता के रूप में ख्याति अर्जित की। जीवनी ली का जन्म 16 जुलाई 1896 को ओस्लो नॉर्वे में हुआ था। उनके पिता बढ़ई थे। 1902 में जब वह छ: साल के थे तो उनके पिता परिवार का साथ छोडकर अमेरिका चले गए। ऐसी परिस्थिति में उनकी माँ ने उन्हें एक अच्छा नागरिक बनने में मदद की। 1911 में ली नॉर्वेजियन लेबर पार्टी में शामिल हो गए और आगे चलकर वे इस पार्टी के महासचिव भी बने। 1919 में उन्होने [ओस्लो विश्वविद्यालय] से कानून की डिग्री ली। 1919 से 1921 तक वे \"डेट 20 डे अर्हंडर\" के प्रधान संपादक रहे। 1922 से 1931 तक वे श्रमिक नेशनल ट्रेड यूनियन के कानूनी सलाहकार रहे साथ ही इस दौरान अर्थात 1931 से 1935 तक वे नॉर्वेजियन श्रमिक परिसंघ के अध्यक्ष भी रहे। राजनीतिक कार्यक्षेत्र स्थानीय स्तर की राजनीति में वे 1922 से 1931 तक आकेर नगर पालिका परिषद नॉर्वे की कार्यकारी समिति के सदस्य के रूप में कार्य किया। 1937 में वे नॉर्वीयन संसद के लिए चुने गए और नॉर्वे के न्याय मंत्री बनाए गए। जुलाई से अक्टूबर 1939 तक वे नॉर्वे के आपूर्ति मंत्री और 1939 से 1941 तक नॉर्वे के व्यापार मंत्री रहे। 1941 से 1945 तक वे नॉर्वे के विदेश मंत्री रहे। बचपन से समाजवादी सोच वाले ली की एकबार व्लादिमीर लेनिन से मुलाक़ात हुयी, जब ये लेबर पार्टी की ओर से मास्को की यात्रा पर थे। उस समय उन्होने लीओन ट्रोट्स्की को, जिन्हें अपने देश से निर्वासित कर दिया गया था, को नॉर्वे में बसने की इजाजत दी। हालांकि बाद में उन्होने जोसेफ स्टालिन के दबाव में उन्हें देश छोड़ने पर मजबूर कर दिया। संयुक्त राष्ट्र कार्यक्षेत्र ली ने 1945 में सैन फ्रांसिस्को में आयोजित संयुक्त राष्ट्र सम्मेलन में नॉर्वेजियन प्रतिनिधिमंडल का नेतृत्व किया और संयुक्त राष्ट्र सुरक्षा परिषद के प्रावधानों का मसौदा तैयार करने में महत्वपूर्ण भूमिका निभाई। उन्हें 1946 में संयुक्त राष्ट्र महासभा के लिए नॉर्वे के प्रतिनिधिमंडल का नेता नियुक्त किया गया। 1 फ़रवरी 1946 को वे संयुक्त राष्ट्र के पहले महासचिव बने और इस पद पर वे नवंबर 1952 तक रहे। फरवरी 1953 में नए महासचिव के द्वारा कार्यभार ग्रहण करने पर वे इस पद से मुक्त हुये। संयुक्त राष्ट्र के बाद ली संयुक्त राष्ट्र से अपने इस्तीफे के बाद नॉर्वे की राजनीति में सक्रिय रहे। वे ऊर्जा बोर्ड के अध्यक्ष बनाए गए। उन्होने कई पुस्तकें भी लिखी। व्यक्तिगत जीवन उनकी शादी हिजोर्दिस जोर्गेंसन (1900-1960) से हुयी। इनकी तीन बेटियाँ है शीशेल, गुरी और मेटे। उनकी मृत्यु 30 दिसम्बर 1968 को अचानक हृदय गति रुक जाने से गीलों, नॉर्वे में हुयी, जब वे 72 वर्ष के थे। सम्मान और पुरस्कार ली को नॉर्वे और विदेशों में बड़ी संख्या में सम्मानित किया गया। इनमें नॉर्वेजियन सर्वोच्च नागरिक पुरस्कार (1966), ग्रैंड क्रॉस (1953), ग्रैंड क्रॉस (1954) और चोकोस्लोवाक का सम्मान (1948) के अलावा उन्हें अमेरिका और यूरोप भर में विश्वविद्यालयों द्वारा कई मानद डॉक्टरेट की उपाधि से सम्मानित किया गया।…"} {"instruction": "Edit the following code to make it print out the sum of two numbers.", "input": "num1 = 10 num2 = 5 print(num1 * num2)", "output": "num1 = 10 num2 = 5 print(num1 + num2)"} {"text": "[DE Wikipedia] Stammzelltherapie beim Pferd\n\nDie Stammzelltherapie des Pferdes ist die Behandlung bestimmter Lahmheiten beim Pferd durch Injektion von Stammzellen. Keine der bisherigen präklinischen oder klinischen Studien zu dieser Therapieform haben bisher umfassende und nachhaltige Knorpelregeneration nachgewiesen. Die Therapie kann zu einer Linderung der Symptome und zu schnellerer Rückkehr zur Einsatzbereitschaft bei Rennpferden führen. Seit dem Jahr 2018 sind in der Europäischen Union mehrere Medikamente zur Stammzelltherapie des Pferdes durch den Ausschuss für Tierarzneimittel der EMA (CVMP) zugelassen. Zur Behandlung werden aus Pferdeblut gewonnene mesenchymale Stammzellen eingesetzt. Grundlagen Bei den meisten der derzeit verfügbaren Behandlungsmöglichkeiten bei Knorpelschäden gelingt es nicht, die Knorpelstruktur zu regenerieren. Chirurgische Verfahren, wie die Induktion von Mikrofrakturen, subchondrale Knochenbohrungen, Lavage und Debridement, perichondrale Arthroplastik, periostale Arthroplastik, autologe osteochondrale Transplantation und autogene Spongiosa-Transplantate, können Gelenkknorpel nicht wirksam regenerieren. Aus diesem Grund wird der Einsatz von Zellen zur Knorpelregeneration erforscht. Als Zellen werden entweder Stammzellen oder gewebespezifische Chondrozyten eingesetzt. Für die Mehrzahl der zellulären Therapien in der regenerativen Knorpelmedizin werden Chondrozyten eingesetzt. Im Jahr 2006 hatten Stammzelltherapien einen circa 15-prozentigen Anteil an den zellulären Therapien. Stammzellen sind körpereigene „Ur-Zellen“, die sich unendlich teilen und zu verschiedenen Zelltypen differenzieren können. Sie sind noch nicht auf ihre spätere Funktion im Körper festgelegt. Je nach Art und Beeinflussung entwickeln sie sich im Rahmen der Zelldifferenzierung zu bestimmten Gewebezellen. Unter den verschiedenen Arten von Stammzellen werden bei regenerativen Therapeutika hauptsächlich die adulten, multipotenten, mesenchymalen Stammzellen verwendet. Diese Zellen sind aus zahlreichen Quellen verfügbar, können leicht gewonnen werden und haben die Fähigkeit, sich in mesodermales Gewebe zu differenzieren. Darüber hinaus bestehen bei der Anwendung von mesenchymalen Stammzellen keine teratogenen und ethischen Probleme, die mit der Therapie mit embryonalen Stammzellen und induzierten pluripotenten Stammzellen verbunden sind. Die Chondrogenese von mesenchymalen Stammzellen variiert stark in Bezug auf die Zellquellen, die Kulturtechniken, die Anzahl der Zellkulturdurchgänge, die Anzahl der erforderlichen Implantationen und die Zugabe von Wachstumsfaktoren und extrazellulären Gerüsten (scaffolds). Die meisten präklinischen oder klinischen Studien mit mesenchymalen Stammzellen bei Pferden konnten keine umfassende und nachhaltige Knorpelregeneration belegen. Sie zeigten jedoch eine Linderung…"} {"instruction": "In JavaScript construct a function to obtain the number of digits in an integer", "input": "", "output": "function getNumOfDigits(num) { return num.toString().length; }"} {"instruction": "Create a Python class to represent a college student and its attributes.", "input": "", "output": "class CollegeStudent:\n def __init__(self, name, age, major):\n self.name = name\n self.age = age\n self.major = major\n \n def get_name(self):\n return self.name\n \n def get_age(self):\n return self.age\n \n def get_major(self):\n return self.major"} {"text": "[DE Wikipedia] Palitzsch (Mondkrater)\n\nPalitzsch ist ein Einschlagkrater im Osten der Mondvorderseite, der unmittelbar am südöstlichen Rand des großen Kraters Petavius liegt. Der Krater ist stark erodiert und das Innere uneben. Nördlich des Kraters beginnt das Mondtal Vallis Palitzsch, das in nördlicher Richtung entlang des Walls von Petavius bis zum Nebenkrater Petavius D verläuft. Der Krater wurde 1935 von der IAU nach dem deutschen Astronomen Johann Georg Palitzsch offiziell benannt. Weblinks Palitzsch auf The-Moon Wiki mondkarte.org/.../Vallis-Palitzsch Einzelnachweise Einschlagkrater (Mond) Johann Georg Palitzsch"} {"instruction": "What is the syntax for creating an array in JavaScript?", "input": "", "output": "let myArray = [element1, element2, ...elementN];"} {"text": "[EN Wikipedia] Punakaiki River\n\nThe Punakaiki River is a river of the West Coast Region of New Zealand's South Island. It flows predominantly northwest from its sources in the Paparoa Range, reaching the Tasman Sea two kilometres south of the town of Punakaiki. Most of the river's length is within Paparoa National Park. The Inland Pack Track and the Paparoa Track both commence from the south bank of the river at Waipori Road, where there is a suspension bridge across the river. The section of the trail from the Punakaiki River to the Pororari River is dual-use – shared between walkers and mountain bikers, and serves as the northern entry or exit point of the Paparoa Track. See also List of rivers of New Zealand References External links Punakaiki River at NZ Gazeteer Rivers of the West Coast, New Zealand Rivers of New Zealand Paparoa National Park"} {"instruction": "Generate a two-dimensional array of random integers in JavaScript.", "input": "", "output": "function generateRandomArray(rows, cols) { let array = []; for (let i=0; i < rows; i++) { array.push(Array.from({length: cols}, () => Math.floor(Math.random() * 10))); } return array; }"} {"instruction": "Create a TextBlob classifier in Python which takes in a string and outputs whether the sentiment of the string is positive or negative.", "input": "Not applicable", "output": "from textblob import TextBlob\n\nclass SentimentClassifier:\n\n def classify(self, text):\n # Create TextBlob object\n analysis = TextBlob(text)\n # Set sentiment \n if analysis.sentiment[0]>0: \n return 'positive'\n elif analysis.sentiment[0]<0: \n return 'negative'\n else: \n return 'neutral'"} {"text": "[HI Wikipedia] हकलाना\n\nहकलाना (अंग्रेज़ी: stammering या stuttering, स्टैमरिन्ग या स्टटरिन्ग) मानव वाक-शक्ति में एक प्रकार की वाक बाधा होती है जिसमें बोलने वाले न चाह कर भी शब्दों की ध्वनियाँ दोहराता है, उन्हें खींचता है और कभी-कभी अटककर आवाज़ निकालने में असमर्थ हो जाता है। अक्सर देखा गया है कि हकलाने वाले बहुत बुद्धिमान होते हैं और हकलाने का बुद्धिमानी से कोई सम्बंध नहीं है। यह एक आम वाक बाधा है और अध्ययन से पाया गया है कि अमेरिका के १% लोग, यानि ३० लाख अमेरिकी, हकलाते हैं। अनुमान लगाया गया है कि अपने जीवनकाल में लगभग ५% लोग किसी-न-किसी आयु में हकलाते हैं। लड़कों में यह स्थिति लड़कियों से दो से पाँच गुना ज़्यादा पाई जाती है। इन्हें भी देखें वाक बाधा सन्दर्भ वाक बाधाएँ"} {"text": "[CS Wikipedia] Mluv, mluv, zajímáš mě\n\nMluv, mluv, zajímáš mě (originální francouzský název Cause toujours... tu m'intéresses !) je francouzská filmová komedie z roku 1979, kterou režíroval Edouard Molinaro podle scénáře Francise Vebera. Hlavní role ve filmu ztvárnili Jean-Pierre Marielle společně s Annie Girardotovou. Děj François Perrin pracuje jako rozhlasový hlasatel. Vede osamělý a nudný život. Když se jednoho dne rozhodne, že si zkrátí čas zatelefonováním na nahodné telefonní číslo, sluchátko zvedne právě Christine Clémentová. Ta nejen že při prvním rozhovoru nezavěsí, ale postupně nalézá v neznámém mužském hlasu útěchu ve vlastní samotě. Po měsíci na popud svého okolí Christine žádá Françoise o osobní setkání. François neví, jak dál, nechce v žádném případě na schůzku jít, nakonec je však přemluven. Na samém místě však ztrácí odvahu, nepřiznává se k sobě a oslovuje Christine jako jiný muž, pod svým pravým jménem. Christine netuší, že jde o toho samého muže jako v telefonu a nějaký čas je z celé situace zmatená a neví, jak dál. François však nakonec přece jen nalézá odvahu přiznat se jí ke všemu a příběh končí happy endem - sblížením dvou dosud osamělých lidí. Obsazení Externí odkazy Francouzské filmové komedie Filmy Édouarda Molinara Filmy natočené podle knižní předlohy Filmy odehrávající se ve Francii Filmy z roku 1979"} {"instruction": "Given a list of words, write a Python program to generate all valid anagrams.", "input": "Python", "output": "def generate_anagrams(words):\n anagrams = []\n for word in words:\n anagrams_list = []\n if len(word) == 1:\n return [word]\n for anagram in generate_anagrams(words.difference({word})):\n for i in range(len(word)):\n anagrams_list.append(anagram[:i]+ word[0] + anagram[i:])\n anagrams += anagrams_list\n return anagrams\n\nwords = set(['python', 'typhon'])\nprint(generate_anagrams(words))\n# Output: ['typhon', 'python', 'hynopt', 'ptyhon']"} {"text": "[EN Wikipedia] Tautuku River\n\nThe Tautuku River originates in the Maclennan Range of The Catlins in New Zealand. It continues through native bush for almost its entire length, including McLean Falls. Near its mouth at Tautuku Bay, just north of Tautuku Peninsula, the river flows through the Tautuku Estuary, a breeding ground for fernbirds. The river's lowermost stretch through the estuary can be used for kayaking. See also List of rivers of New Zealand References Rivers of Otago The Catlins Rivers of New Zealand Clutha District"} {"instruction": "Write SQL code to select records from a table whose ID is greater than 200.", "input": "", "output": "SELECT * FROM table WHERE ID > 200;"} {"text": "[EN Wikipedia] Rangitane River\n\nThe Rangitane River is a short river of the Northland Region of New Zealand's North Island. It flows east to reach the Tahoranui River north of Kerikeri. See also List of rivers of New Zealand References Far North District Rivers of the Northland Region Rivers of New Zealand"} {"instruction": "Read the string ‘Hello World’ and identify the lengths of the words using Python", "input": "", "output": "def word_lengths(string):\n words = string.split(' ')\n lengths = []\n for word in words:\n lengths.append(len(word))\n return lengths \n\nword_lengths('Hello World') // [5, 5]"} {"instruction": "Edit the following array in JavaScript so that all the strings are in uppercase.", "input": "let array = ['cat', 'dog', 'fish'];", "output": "let array = ['CAT', 'DOG', 'FISH'];"} {"instruction": "Write a C program to find the root of a quadratic equation", "input": "", "output": "#include #include // A utility function to calculate the discriminant float discriminant(float a, float b, float c) { return (b*b - 4*a*c); } // Function to calculate the roots of Quadratic Equations void findRoots(float a, float b, float c) { float discriminant = discriminant(a, b, c); if (discriminant > 0) { float x1 = (-b + sqrt(discriminant)) / (2*a); float x2 = (-b - sqrt(discriminant)) / (2*a); printf(\"Roots are real and distinct.\\nx1 = %f, x2 = %f\", x1, x2); } else if (discriminant == 0) { float x = -b / (2*a); printf(\"Roots are real and same.\\nx1 = x2 = %f\", x); } else { printf(\"Roots are complex.\\n\"); } } // Driver program int main() { float a = 3, b = 2, c = 1; findRoots(a, b, c); return 0; }"} {"text": "[HI Wikipedia] साउण्डेक्स\n\nसाउण्डेक्स (Soundex) एक ध्वन्यात्मक कलन विधि है जिसका उपयोग नामों को उनकी अंग्रेजी ध्वनि के अनुसार व्यवस्थित किए जाने में किया जाता है। इसका उद्देश्य यह है कि समान रूप से उच्चारित (homophones) नामों को समान प्रकार से कोडित किया जाय यद्यपि उनके वर्तनियों में मामूली अन्तर क्यों न हो। यह अल्गोरिद्म मुख्यतः व्यंजनों की कोडिंग करता है ; स्वर की कोडिंग नहीं की जाती यदि वह शब्द के आरम्भ में न आया हो। सभी फोनेटिक अल्गोरिद्मों में साउण्डेक्स सबसे अधिक प्रसिद्ध है। इसकी प्रसिद्धि का एक कारण यह भी है कि यह PostgreSQL,[2] MySQL,[3] MS SQL Server[4] and Oracle[5]) आदि लोकप्रिय डेटाबेस सॉफ्टवेयरों में शामिल कर लिया गया है। बाहरी कड़ियाँ भारतीय साउण्डेक्स (शिल्पा) The Soundex Indexing System (U.S. National Archives and Records Administration) उपयोग के लिए तैयार साउण्डेक्स परिवर्तक Eastman's Online Genealogy Newsletter Online soundex converter van der Harg - Geanealogie: Soundex Dutch soundex converter Indic Soundex Converts from all Indian languages and English (developed by the Swatantra Malyalam Group) साउण्डेक्स के प्रोग्रामिंग एल्गोरिद्म Soundex on Rosetta Code Implementations in around twenty languages. Text::Soundex Perl module from CPAN PHP soundex function SimMetrics an open source (sourceforge) library of similarity metrics including a number of soundex variants Soundex in C# Soundex in Haskell Soundex in Java Soundex in JavaScript (view page source for code) (wrong: fails if first letter doubled, or vowel separates 2 similar letters) Soundex in Python Soundex in STATA Soundex in PostgreSQL Soundex Tcl package from the tcllib library Indic Soundex's Source Code Code for above example. Soundex and Refined Soundex in Scala ध्वन्यात्मक कलन विधियाँ"} {"instruction": "Explain the result of the following one-liner command.", "input": "echo Apple Banana Cat | cut -d\" \" -f2", "output": "This command prints the second word of the list of words, i.e., \"Banana\". The echo command prints out the words 'Apple', 'Banana', and 'Cat', and the cut command is used to extract the parts of each word delimited by spaces. The -d flag specifies the delimiter, which in this case is a space, and the -f flag specifies the field number, which in this case is 2. Therefore, the output is \"Banana\"."} {"instruction": "Generate a Monte-Carlo simulation program in Python to estimate the value of Pi.", "input": "", "output": "import random\n \n# Function to generate random points\ndef generate_random_point():\n x = random.uniform(-1, 1)\n y = random.uniform(-1, 1)\n return (x, y)\n \n# Function to calculate Pi\ndef calculate_pi(num_samples):\n # Number of points inside the circle\n num_inside = 0\n for i in range(num_samples):\n # Generate a random point \n point = generate_random_point()\n # Check if the point is inside the circle\n if (point[0]**2 + point[1]**2 <= 1):\n num_inside += 1\n # Calculate pi\n return 4*num_inside/num_samples"} {"instruction": "Create a Java program to determine whether a given string is a palindrome. A palindrome is a string which reads the same forwards and backwards.", "input": "", "output": "public class Palindrome { public static boolean isPalindrome(String s) { int i = 0, j = s.length()-1; while (i < j) { if (s.charAt(i) != s.charAt(j)) return false; i++; j--; } return true; } public static void main(String[] args) { String s = \"madam\"; if (isPalindrome(s)) System.out.println(\"The string is a palindrome.\"); else System.out.println(\"The string is not a palindrome.\"); } }"} {"instruction": "Develop a python script that takes in 2 strings and outputs the longest common subsequence.", "input": "string1 = 'GeeksforGeeks' \nstring2 = 'GeeksQuiz'", "output": "def longest_common_subsequence(string1, string2):\n \"\"\"\n Find the longest common subsequence of two strings.\n\n Args:\n string1 (str): first string\n string2 (str): second string\n\n Returns:\n str: longest common subsequence\n \"\"\"\n m = len(string1)\n n = len(string2)\n dp = [[None]*(n+1) for i in range(m+1)]\n\n for i in range(m+1):\n for j in range(n+1):\n if i == 0 or j == 0:\n dp[i][j] = 0\n\n elif string1[i-1] == string2[j-1]:\n dp[i][j] = dp[i-1][j-1] + 1\n\n else:\n dp[i][j] = max(dp[i-1][j], dp[i][j-1])\n\n lcs = ''\n i, j = m, n\n while i > 0 and j > 0:\n if string1[i-1] == string2[j-1]:\n lcs += string1[i-1]\n i -= 1\n j -= 1\n\n elif dp[i-1][j] > dp[i][j-1]:\n i -= 1\n else:\n j -= 1\n\n return lcs[::-1]"} {"instruction": "Using regular expressions, extract all telephone numbers from a given string in JavaScript.", "input": "", "output": "let string = \"My telephone numbers are 123-456-7890 and 012-345-6789\"; let regex = /\\d{3}-\\d{3}-\\d{4}/g; let numbers = string.match(regex); console.log(numbers);"} {"instruction": "Translate the following sentiment analysis model written in Python to JavaScript", "input": "model = tf.keras.models.Sequential([ tf.keras.layers.Dense(128, activation='relu', input_shape=(tem_train_data.shape[1],)), tf.keras.layers.Dense(2, activation='softmax') ])", "output": "const model = tf.sequential(); model.add(tf.layers.dense({units: 128, activation: 'relu', inputShape: tem_train_data.shape[1]})); model.add(tf.layers.dense({units: 2, activation: 'softmax'}));"} {"instruction": "Design a data structure to keep track of a student's marks for a given course.", "input": "", "output": "class StudentMark{ //stores student ID int student_id; //stores course name string course_name; //stores marks int marks; //constructor StudentMark(int student_id, string course_name, int marks) { this->student_id = student_id; this->course_name = course_name; this->marks = marks; } }"} {"text": "[CS Wikipedia] Lionel Richie\n\nLionel Richie, rodným jménem Lionel Brockman Richie, Jr. (* 20. června 1949, Tuskegee, Alabama, USA) je americký zpěvák, skladatel i herec. Byl frontmanem kapely Commodores. Má adoptovanou dceru Nicole Richie. Životopis V roce 1984 získal dvě Grammy Award ocenění v kategorii The Album of the Year 1984 za album Can't Slow Down. Společně s Michaelem Jacksonem zkomponoval píseň We Are the World, kterou nahrála superskupina USA for Africa, která chtěla pomoct Africe. Jeho poslední hit je slow jam \"Just Go\" z alba Just Go z roku 2009. Diskografie Alba Lionel Richie (1982) Can't Slow Down (1983) Dancing on the Ceiling (1986) Louder Than Words (1996) Time (1998) Renaissance (2000) Just for You (2004) Coming Home (2006) Just Go (2009) Kompilace Back to Front (1992) Truly - The Love Songs (1997) Encore (album Lionela Richie) (2002) Singly Hello (1984) Time (1998) Filmografie Scott Joplin (1977) (s The Commodores) Thank God It's Friday (1978) (s The Commodores) Madonna: Truth or Dare (1991) (dokument) Żona Pastora (The Preacher's Wife 1996) Pariah (1998) Externí odkazy Američtí herci Afroameričtí zpěváci Popoví zpěváci Souloví hudebníci Držitelé ceny Grammy Držitelé ceny Zlatý glóbus za nejlepší filmovou píseň Hollywoodský chodník slávy Afroameričané Umělci Island Records Narození v roce 1949 Narození 20. června Žijící lidé Muži"} {"instruction": "Using the input provided, write a Python program to find the longest pattern in the given string.", "input": "string = \"abccbaabcabccba\"", "output": "def find_longest_pattern(string):\n \"\"\"Function to find the longest pattern in the given string\"\"\"\n longest_pattern = \"\"\n for i in range(len(string)):\n for j in range(i+1, len(string)+1):\n pattern = string[i:j]\n if pattern == pattern[::-1]:\n longest_pattern = max(pattern, longest_pattern, key=len)\n return longest_pattern"} {"instruction": "Create an algorithm to produce a Fibonacci number.", "input": "", "output": "def fibonacci(n): if n <= 1: return n else: return fibonacci(n-1) + fibonacci(n-2)"} {"instruction": "Create a regex that matches any five-digit zip code.", "input": "[noinput]", "output": "^[0-9]{5}$"} {"instruction": "Write a code to get the median of four numbers", "input": "x = 11, y = 12, z = 13, w = 14", "output": "def median(x,y,z,w): nums = [x,y,z,w] nums.sort() mid =len(nums)//2 if len(nums)%2 == 0: median = (nums[mid] + nums[mid-1])/2 else: median = nums[mid] return median if __name__ == '__main__': print(median(11,12,13,14))"} {"instruction": "Suggest an algorithm and write Python code to solve the following problem: classify a list of colours into warm and cool colours.", "input": "Colours list = [\"Red\", \"Yellow\", \"Orange\", \"Green\", \"Blue\", \"Purple\", \"Pink\"]", "output": "def classify_colours(colours_list):\n warm_colours = [\"Red\", \"Yellow\", \"Orange\"]\n cool_colours = [\"Green\", \"Blue\", \"Purple\", \"Pink\"]\n warm_values = []\n cool_values = []\n \n for colour in colours_list:\n if colour in warm_colours:\n warm_values.append(colour)\n elif colour in cool_colours:\n cool_values.append(colour)\n \n return warm_values, cool_values"} {"instruction": "Update the following Node.js function so that it can handle an array of objects.", "input": "function someFunction(obj1, obj2){ console.log('someFunction called'); return `object 1 is ${obj1.key1} object 2 is ${obj2.key2}`; }", "output": "function someFunction(arr){ console.log('someFunction called'); let str = \"\" for (const obj of arr){ str += `object is ${obj.key1} ` } return str; }"} {"instruction": "Write a function in Python to find the sum of all even numbers between 0 and a given number.", "input": "", "output": "def sum_of_even_numbers(n): result = 0 for i in range(0, n + 1): if i % 2 == 0: result += i return result"} {"text": "[HI Wikipedia] सम्मोहन\n\nसम्मोहन से कोई कुछ भी करवा सकता है कहना या सोचना गलत होगा। यह एक सरल और सामान्य प्रक्रिया है जिसके समझने में जटिलता है, ये कोई दैवीय शक्ति या काला जादू नहीं है। यह Sycology से सम्मंधित (related) है। सम्मोहन (Hypnosis) वह कला है जिसके द्वारा मनुष्य उस अर्धचेतनावस्था में लाया जा सकता है जो समाधि, या स्वप्नावस्था, से मिलती-जुलती होती है, किन्तु सम्मोहित अवस्था में मनुष्य की कुछ या सब इन्द्रियाँ उसके वश में रहती हैं। वह बोल, चल और लिख सकता है; हिसाब लगा सकता है तथा जाग्रतावस्था में उसके लिए जो कुछ सम्भव है, वह सब कुछ कर सकता है, किन्तु यह सब कार्य वह सम्मोहनकर्ता के सुझाव पर करता है।कभी कभी यह सम्मोहन बिना किसी सुझाव के भी काम करता है और केवल लिखाई और पढ़ाई में भी काम करता है जैसे के फलाने मर्ज की दवा यहाँ मिलती है इस प्रकार के हिप्नोसिस का प्रयोग भारत में ज्यादा होता है। जैसे की किसी के शरीर पे चोट लगी है और उसको बहुत दर्द हो रहा है; तो उसको सम्मोहीत करके उसका ध्यान किसी और दूसरी जगह पे ले जाया जा सकता है और उसका दर्द कम कर सकते है। इतिहास भारत में अति प्राचीन काल से सम्मोहन तथा इसी प्रकार की अन्य रहस्यमय, अद्भुत प्रभावोत्पादक, गुप्त क्रियाएँ प्रचलित हैं। अन्य पूर्वी देशों में भी ये अज्ञात नहीं रही हैं। यह निश्चय है कि यदि सबने नहीं तो इनमें से अधिकांश ने इन क्रियाओं का ज्ञान भारत से प्राप्त किया, जैसे तिब्बत ने। नटों, साधुओं तथा योगियों में इन क्रियाओं के जाननेवाले पाए जाते हैं। इन विशिष्ट मण्डलों के लोगों को छोड़कर अन्य मनुष्यों में इनका ज्ञान बहुत थोड़ा, या कुछ भी नहीं, रहता। अनधिकारी के ज्ञाता होने से अनिष्ट की आशंका समझ, पूर्वी देशों में इस विषय के समर्थ लोगों ने इसे सर्वथा गोपनीय रखा। इस कारण आज भी इस सम्बन्ध में जो कुछ निश्चित रूप से लिखा जा सकता है वह यूरोप की देन है, जहाँ इसका वैज्ञानिक अध्ययन करने की चेष्टा की गई है। अठारहवीं सदी के मध्य में फ्रांज़ ए. मेस्मर नामक वियना के एक चिकित्सक ने सर्वप्रथम सम्मोहन का अध्ययन प्रारम्भ किया। इन्होंने कुछ सफलता तथा बड़ी प्रसिद्धि प्राप्त की, किन्तु इस सम्बन्ध में जिन सिद्धान्तों की इन्होंने कल्पना की वे गलत सिद्ध हुए। जो सिद्धान्त आजकल स्वीकृत हैं, उनका विवेचन लीबाल्ट (Liebault) तथा वेर्नहाइम (Bernheim) नामक दो फ्रांसीसी डाक्टरों ने किया था। इनके अनुसार सम्मोहन का अनिवार्य प्रवर्तक सुझाव या प्रेरणा का संकेत होता है। स्वरूप यह निश्चित रूप से समझ लेना चाहिए कि सम्मोहनकर्ता जादूगर, अथवा दैवी शक्तियों का स्वामी, नहीं होता। मनुष्यों में से अधिकांश प्रेरणा या सुझाव के प्रभाव में आ जाते हैं। यदि कोई आज्ञा, जैसे \"आप खड़े हो जाँए\" या \"कुर्सी छोड़ दें\", हाकिमाना ढंग से दी जाए, तो बहुत से लोग इसका तुरन्त पालन करते हैं। यह तो सभी ने अनुभव किया है कि यदि हम किसी को उबासी लेते देखते हैं, तो इच्छा न रहने पर भी स्वयं उबासी लेने लग जाते हैं। दूसरों के हँसने पर स्वयं भी हँसते या मुस्कराते हैं तथा दूसरों को रोते देखकर उदास हो जाते हैं। जो लोग दूसरों के सुझावों को इच्छा न रहते हुए भी मान लेते हैं, वे सरलता से सम्मोहित हो जाते हैं। सम्मोहित व्यक्ति के व्यवहार में निम्नलिखित समरूपता पाई जाती है : आज्ञाकारिता कुछ लोगों का मत है…"} {"instruction": "Create a procedure in C# to print a string.", "input": "my_string", "output": "void PrintString(string my_string) { Console.WriteLine(my_string); } PrintString(\"my_string\");"} {"instruction": "Implement an algorithm to find all the sets of three numbers in an array which adds up to a given number.", "input": "Array: [2, 5, 8], Number: 10", "output": "def three_sum(array, number): result_sets = [] for i in range(len(array) - 2): for j in range(i+1, len(array) - 1): for k in range(j+1, len(array)): if array[i] + array[j] + array[k] == number: result_sets.append([array[i], array[j], array[k]]) return result_sets print(three_sum([2, 5, 8], 10)) # Result: [[2, 5, 8]]"} {"instruction": "Create a python script to generate a random password consisting of a combination of 10 alphabetic characters, 9 digits and the symbols @, # and $.", "input": "", "output": "import random\nimport string\n\ndef randomPasswordGenerator(length):\n # Generate a random password consisting of 10 alphabet characters, 9 digits and the symbols @, # and $\n generated_password = ''.join(random.choice(\n string.ascii_letters + string.digits + \"@#$\") for i in range(length))\n return generated_password\n\nlength = 10\nprint(\"Random Password:\", randomPasswordGenerator(length))"} {"instruction": "Develop an algorithm in Python to remove duplicates from a list.", "input": "", "output": "# remove_duplicates function takes a list as a parameter\n# and returns a list with all the duplicates removed\ndef remove_duplicates(input_list):\n # Create an empty list to store the result\n result = []\n \n # Iterate through the given list\n for element in input_list:\n \n # Check if the element is already in the result list\n # and if not, add it to the result\n if element not in result:\n result.append(element)\n \n # Return the result\n return result"} {"instruction": "Create a function to find the total area of a triangle, given its base and height.", "input": "", "output": "def findAreaOfTriangle(base, height): return 0.5 * base * height"} {"instruction": "Create an HTML form for inputting user details.", "input": "name, age, email", "output": "
      Name:

      Age:

      Email:


      "} {"instruction": "Generate a Python script that iterates over a list and prints each item.", "input": "list = [1, 2, 3, 4]", "output": "for item in list: print(item)"} {"instruction": "Create an object in Ruby that stores a student's name, age, and GPA.", "input": "", "output": "student = { name: \"John Smith\", age: 22, gpa: 3.5 }"} {"instruction": "Write a code snippet to check if all characters in a given string are letters or numbers.", "input": "string = \"Welcome123\"", "output": "function checkString(string) { var lettersOnly = /^[0-9a-zA-Z]+$/; if (string.match(lettersOnly)) console.log(\"The string contains only letters and numbers.\"); else console.log(\"The string contains other characters too.\"); }"} {"instruction": "Develop a web scraper in Python that collects data from a web page. The scraper should capture the product title, description, and price for each item on the page.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = 'https://www.example.com/products'\nhtml = requests.get(url).text\nsoup = BeautifulSoup(html, 'html.parser')\n\nproducts = soup.find_all('div', class_='product')\n\nfor product in products:\n title = product.find('h3', class_='title').text\n description = product.find('p', class_='description').text\n price = product.find('div', class_='price').text\n\n print(title, description, price)"} {"instruction": "Using a regular expression, extract all prices of items from a given HTML string.", "input": "
      Price of tea is £1.45, price of burger is £2.50, price of coffee is £2.00.
      ", "output": "let prices = []; let pricesRegex = /£\\d+(?:\\.\\d+)?/g; let matches = str.match(pricesRegex); for (let i= 0; i < matches.length; i++) { prices.push(matches[i]); } console.log(prices); // [\"£1.45\",\"£2.50\",\"£2.00\"]"} {"instruction": "Convert the following Python loop into a list comprehension.", "input": "for x in range(0, 5):\n if (x%2 == 0):\n print(x)", "output": "# Solution\n[x for x in range(0,5) if (x%2 == 0)]"} {"instruction": "Construct a Python script to create a dictionary containing the numbers from 1 to 10 and their squares.", "input": "", "output": "numbers = dict((num, num*num) for num in range(1,11)) \nprint(numbers)"} {"text": "[DE Wikipedia] Easy Love\n\nEasy Love ist ein deutscher dokumentarischer Spielfilm von Tamer Jandali aus dem Jahr 2019, der verschiedene junge Paare in ihrem Sex- und Liebesleben inszeniert. Handlung Sören hat Erfolg bei Frauen, bei denen er dann jeweils gleich einzieht. Und unverbindlich bleibt, bis er sich in Maria verliebt. Stella und Nic experimentieren mit der freien Liebe. Sophia findet Sex und Geld via die App Ohlala, die eine Mischung ist aus Dating App und Sexarbeits-Vermittlung. Und streitet mit ihrer Mutter, ob das feministisch sei. Lenny hat eine lesbische Beziehung mit Pia und fürchtet, dass Pia Homosexualität nur einmal ausprobieren will, bevor sie sich wieder Männern zuwendet. Rezeption Easy Love hatte Uraufführung an den Internationalen Filmfestspielen Berlin 2019. Die taz attestierte „genau beobachtete Szenen, die in loser Dramaturgie, aber ohne betonte Zuspitzung andeuten, wie schwierig es fällt, das theoretisch wunderbar funktionierende Lebensmodell mit den Fallstricken der Praxis in Einklang zu bringen.“ Auszeichnungen 2019 Filmpreis Made in NRW Weblinks Website von Easy Love Archiv der berlinale.de Einzelnachweise Filmtitel 2019 Deutscher Film Dokumentarfilm"} {"text": "[DE Wikipedia] Dmitrij Prokopcov\n\nDmitrij Prokopcov (; * 5. Januar 1980 in Simferopol, Oblast Krim, Ukrainische SSR, Sowjetunion) ist ein ukrainisch, später tschechischer Tischtennisspieler. Von 1996 bis 2017 nahm er an 11 Weltmeisterschaften, 13 Europameisterschaften und einmal an Olympischen Spielen teil. Werdegang Dmitrij Prokopcov wurde in der Ukraine geboren, er begann im Alter von sechs Jahren mit dem Tischtennissport. Zweimal wurde er ukrainischer Meister im Einzel. 1998 wechselte Prokopcov zum tschechischen Klub TJ Nová huť Ostrava. In der Folgezeit überwarf er sich mit dem ukrainischen Tischtennisverband, weil er die geforderte Teilnahme an nationalen Trainingslagern wegen besserer Trainingsbedingungen in Ostrava verweigerte. Unter der ukrainischen Flagge trat Prokopcov deshalb bei der Europameisterschaft 2003 letztmals bei einem internationalen Turnier an. In Tschechien beantragte er die Einbürgerung. 2008 erhielt er die tschechische Staatsbürgerschaft und vertrat danach Tschechien bei internationalen Auftritten. 2010, 2011 und 2013 wurde er tschechischer Meister im Einzel, 2010 zudem auch im Doppel. In den Jahren 2001, 2004 und 2010 siegte Prokopcov bei den Prague Open. Zwischen 2007 und 2011 holte Prokopcov mit der Mannschaft von El Niňo Praha in Folge den tschechischen Meistertitel. Bei der Europameisterschaft 2010 gewann er mit der Mannschaft Bronze. 2016 qualifizierte er sich für die Teilnahme an den Olympischen Spielen. Hier verlor er in der ersten Runde gegen den Nigerianer Segun Toriola. Mit den Vereinen TJ Nová huť Ostrava und SKK El Niňo Praha spielte er von 2004 bis 2011 in der europäischen Superliga. In der Weltrangliste belegte er 2010 Platz 49. Im August 2018 wurde Prokopcov aus der Nationalauswahl verabschiedet. Privat Dmitrij Prokopcov ist seit 2011 mit Sabina Růžičková verheiratet. Bei der Hochzeit auf Schloss Chvaly waren sein Teamkollege Josef Simončík und der Starfriseur Jan Cigánik als Trauzeugen anwesend. Weblinks (abgerufen am 19. Oktober 2019) Kurzporträt (tschechisch) (abgerufen am 19. Oktober 2019) Porträt auf tischtennis.de (Dieter Laibach) (abgerufen am 19. Oktober 2019) Einzelnachweise Tischtennisspieler (Tschechien) Tischtennisspieler (Ukraine) Olympiateilnehmer (Tschechien) Teilnehmer der Olympischen Sommerspiele 2016 Teilnehmer an den Europaspielen (Tschechien) Teilnehmer der Europaspiele 2015 Sowjetbürger Ukrainer Tscheche Geboren 1980 Mann"} {"instruction": "Create a Python program to solve the following equation.", "input": "2x + 3y = 5", "output": "#!/usr/bin/env python\n\ndef solve_equation(eqn):\n eqn_parts = eqn.split(' ')\n\n # co-efficients of x and y\n a = int(eqn_parts[0].replace('x', ''))\n b = int(eqn_parts[2].replace('y', ''))\n\n # RHS value\n c = int(eqn_parts[4])\n\n # solving the equation\n x = (c - (b * 3)) / (2 * a)\n y = (5 - (2 * x)) / 3\n\n return x, y\n\n\nif __name__ == '__main__':\n eqn = '2x + 3y = 5'\n x, y = solve_equation(eqn)\n\n print(f'Equation: {eqn}\\n')\n print(f'x = {x}')\n print(f'y = {y}')"} {"instruction": "Write a SQL statement to join table1 and table 2 on the \"name\" column.", "input": "", "output": "SELECT table1.name, table1.city, table2.email FROM table1 INNER JOIN table2 ON table1.name=table2.name;"} {"instruction": "Given the following HTML, change the text to \"Hello World\".", "input": "

      Hi there

      ", "output": "

      Hello World

      "} {"instruction": "Generate a list of numbers starting from 10 to 50.", "input": "", "output": "myList = list(range(10,51))"} {"text": "[DE Wikipedia] James Ulmer\n\nJames „Blood“ Ulmer (* 2. Februar 1942 in St. Matthews, South Carolina) ist ein US-amerikanischer Jazz- und Bluesgitarrist. Er stand seit Ende der 1970er Jahre wie auch Ornette Coleman und Ronald Shannon Jackson im Mittelpunkt eines den Free Jazz mit dem Jazzrock neu verschmelzenden Free Funk. Leben Ulmer spielte schon als Vierjähriger Gitarre; sein Vater zeigte ihm die ersten Griffe. Bis zum Stimmbruch war er im Gospelquartett The Southern Sons aktiv. 1959 ging er als Berufsmusiker nach Pittsburg, wo er zunächst in R&B-Bands wie The Savoys oder The Swing Kings tätig war, mit denen er auch in Kanada und auf den Virgin Islands gastierte. Zwischen 1964 und 1966 spielte er in orgeldominierten Soul-Jazz-Bands und nahm mit dem Orgeltrio von Hank Marr auf. Zwischen 1967 und 1971 lebte er in Detroit, wo er auch komponierte und mit einer aus Schlagzeug, Bass, Posaune und Altsaxophon bestehenden Gruppe probte. Gelegentlich trat er mit Dionne Warwick, Chuck Jackson, George Adams oder John Patton auf. 1971 zog er nach New York City, wo er neun Monate lang jeden Abend in Minton’s Playhouse auftrat. 1973 war er kurz bei Art Blakey und spielte mit Paul Bley, Larry Young und Joe Henderson. Er nahm Unterricht bei Ornette Coleman und trat 1974 mit ihm beim Ann Arbor Blues & Jazz Festival auf. Er spielte 1976 auf Schallplatten mit Coleman und trat bei weiteren Auftritten von Colemans Prime Time auch in Europa (1978) auf. Daneben war er an zwei Alben mit Arthur Blythe beteiligt. Ab 1980 leitete Ulmer sein eigenes Trio (zumeist Calvin Weston und Amin Ali), mit dem er Kompositionen spielte, die auf dem harmolodischen Konzept von Coleman aufbauten und die zu einer Art abstraktem Jazzfunk führten. Im weiteren Verlauf der 1980er Jahre arbeitete er auch mit George Adams und mit dem Music Revelation Ensemble (unter anderem mit Pharoah Sanders, David Murray und John Zorn) zusammen. In den 1990er Jahren spielte er einerseits in der Odyssey Band mit Geiger Charles Burnham und Schlagzeuger Warren Benbow, wendete aber auch die mit dem harmolodischen Konzept gewonnenen Erkenntnisse in deutlicher auf den Blues bezogenen Ensembles an, unter anderem mit Vernon Reid, Amina Claudine Myers und Bill Laswell, wie dies auf seinem Album Blue Blood (2001) dokumentiert ist. Er arbeitete auch mit James Carter, Jayne Cortez und dem World Saxophone Quartet. Stil Ulmer hat eine eigenständige Spielweise mit sprödem Klang und starkem Wiedererkennungswert. Er baut auf dem elektrischen Blues mit seinen Verzerrungseffekten und verzogenen Tönen auf und überschreitet gelegentlich die Grenzen der Tonalität. Der Gitarrist verwendet für seine schneidenden, ausschließlich mit dem Daumen gespielten Klänge eine Spezialstimmung und Spezialbesaitung und behandelt sein Instrument betont perkussiv. Diskografie…"} {"instruction": "This code defines a Python class called \"Plugin\" that can be used to send push notifications using the Pushover service. To use this class, you need to provide a user key and an API key, as well as a list of devices to send notifications to (if desired), a message title, and a Mako template file (if desired). To send a notification, call the \"send_results\" method of the Plugin instance with the source of the notification (e.g. the name of the torrent), and a dictionary of results (e.g. the files that were downloaded). The notification will be sent to all devices specified in the constructor.", "input": "", "output": "\"\"\"\n Emonoda -- A set of tools to organize and manage your torrents\n Copyright (C) 2015 Devaev Maxim \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\"\"\"\n\n\nimport urllib.parse\n\nfrom typing import List\nfrom typing import Dict\nfrom typing import Any\n\nfrom ...optconf import Option\nfrom ...optconf import SecretOption\nfrom ...optconf.converters import as_string_list\nfrom ...optconf.converters import as_path_or_empty\n\nfrom . import STATUSES\nfrom . import ResultsType\nfrom . import WithWeb\nfrom . import WithStatuses\nfrom . import templated\n\n\n# =====\nclass Plugin(WithWeb, WithStatuses):\n PLUGIN_NAMES = [\"pushover\"]\n\n def __init__( # pylint: disable=super-init-not-called\n self,\n user_key: str,\n api_key: str,\n devices: List[str],\n title: str,\n template: str,\n **kwargs: Any,\n ) -> None:\n\n self._init_bases(**kwargs)\n self._init_opener()\n\n self.__user_key = user_key\n self.__api_key = api_key\n self.__devices = devices\n self.__title = title\n self.__template_path = template\n\n @classmethod\n def get_options(cls) -> Dict[str, Option]:\n return cls._get_merged_options({\n \"user_key\": SecretOption(default=\"CHANGE_ME\", help=\"User key\"),\n \"api_key\": SecretOption(default=\"CHANGE_ME\", help=\"API/Application key\"),\n \"devices\": Option(default=[], type=as_string_list, help=\"Devices list (empty for all)\"),\n \"title\": Option(default=\"Emonoda ({source})\", help=\"Message title\"),\n \"template\": Option(default=\"\", type=as_path_or_empty, help=\"Mako template file name\"),\n })\n\n def send_results(self, source: str, results: ResultsType) -> None:\n for status in self._statuses:\n for (file_name, result) in results[status].items():\n post = {\n \"toke"} {"instruction": "Print the positions of all vowels in the given string.", "input": "String: mississippi", "output": "The positions of all vowels in the string \"mississippi\" are: [1, 4, 7, 10]."} {"instruction": "Calculate the sum of these two numbers in assembly language.", "input": "x = 27, y = 11", "output": "mov ax, 27 ; put x = 27 in ax mov bx, 11 ; put y = 11 in bx add ax, bx ; add ax and bx, sum is stored in ax ; ax = 38"} {"instruction": "Create a Python script that fetches a web page and scrapes the HTML to extract the top 5 headlines from the page.", "input": "URL to scrape: https://www.nytimes.com/", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = 'https://www.nytimes.com/'\n\nresponse = requests.get(url)\n\nif response.status_code == 200:\n html_data = response.text\n soup = BeautifulSoup(html_data, 'html.parser')\n\n headlines = soup.find_all('h2', {'class': 'e1voiwgp0'})\n \nfor headline in headlines[:5]:\n print(headline.text)"} {"instruction": "Examine a given Python program and modify it to only print out characters which are palindromes.", "input": "my_string = \"I like mangoes\"", "output": "my_string = \"I like mangoes\"\n\nfor char in my_string:\n\tif char == char[::-1]:\n\t\tprint(char)"} {"instruction": "Edit the following code to remove the bugs.", "input": "def reverse_string(user_string): if len(user_string) == 0: return \"\" else: return reverse_string(user_string[1:]) + user_string[0] print(reverse_string(“test”))", "output": "def reverse_string(user_string): reversed_string = '' if len(user_string) == 0: return \"\" else: reversed_string = reverse_string(user_string[1:]) + user_string[0] return reversed_string user_string = 'test' print(reverse_string(user_string))"} {"instruction": "Create a method to find all valid IP addresses that can be formed using a given string.", "input": "string = \"25525511135\"", "output": "def find_all_valid_ip_addresses(string): valid_ips = [] for i in range(1,4): for j in range(1,4): for k in range(1,4): if i+j+k == len(string): ip_string = string[:i]+\".\"+string[i:i+j]+\".\"+string[i+j:i+j+k]+\".\"+string[i+j+k:] if is_valid_ip_address(ip_string): valid_ips.append(ip_string) return valid_ips def is_valid_ip_address(ip_string): nums = ip_string.split(\".\") for num in nums: if (int(num) < 0 or int(num) > 255): return False return True"} {"instruction": "Implement a function that takes a list and reverses its order", "input": "lst = [1,2,3,4]", "output": "def reverse(lst): return lst[::-1] reverse(lst)"} {"instruction": "Create a Python script to remove all punctuation from a string.", "input": "String: A text containing punctuation marks.", "output": "import string\n\n# Define the input string\ninp_str = \"A text containing punctuation marks.\"\n\n# Remove all punctuation\nout_str = inp_str.translate(str.maketrans('', '', string.punctuation))\n\nprint(out_str) # Output: A text containing punctuation marks"} {"text": "[DE Wikipedia] Idrizi\n\nIdrizi ist der Familienname folgender Personen: Ammar Idrizi (* 2001), Schweizer Handballspieler Blendi Idrizi (* 1998), kosovarisch-deutscher Fußballspieler Meris Idrizi (* 2003), Schweizer Kickboxer Shpëtim Idrizi (* 1967), albanischer Politiker Valdete Idrizi (* 1973), kosovarische Friedensaktivistin und Politikerin"} {"instruction": "Update the below Python code to run in multiprocess mode.", "input": "import time\n\ndef add(a, b):\n return a + b\n\nif __name__ == '__main__':\n start = time.time()\n result = add(2, 3)\n end = time.time()\n print(end-start)", "output": "import multiprocessing\nimport time\n\ndef add(a, b):\n return a + b\n\nif __name__ == '__main__':\n pool = multiprocessing.Pool()\n start = time.time()\n result = pool.apply_async(add, (2, 3))\n pool.close()\n pool.join()\n end = time.time()\n print(result.get())\n print(end-start)"} {"instruction": "Create a Python algorithm to solve the classic game \"Connect 4\".", "input": "Not applicable", "output": "ROW_COUNT = 6\nCOLUMN_COUNT = 7\n\ndef create_board():\n board = [[0 for i in range(COLUMN_COUNT)] for j in range(ROW_COUNT)]\n return board\n \ndef drop_piece(board, row, col, piece):\n board[row][col] = piece\n\ndef is_valid_location(board, col):\n return board[ROW_COUNT - 1][col] == 0\n\n## Check for a win\ndef check_win(board):\n # Check all horizontal locations for win\n for c in range(COLUMN_COUNT-3):\n for r in range(ROW_COUNT):\n if board[r][c] == board[r][c + 1] == board[r][c + 2] == board[r][c + 3] != 0:\n return board[r][c]\n\n # Check all vertical locations\n for c in range(COLUMN_COUNT):\n for r in range(ROW_COUNT-3):\n if board[r][c] == board[r + 1][c] == board[r + 2][c] == board[r + 3][c] != 0:\n return board[r][c]\n\n # Check both diagonals\n for c in range(COLUMN_COUNT-3):\n for r in range(ROW_COUNT-3):\n if board[r][c] == board[r + 1][c + 1] == board[r + 2][c + 2] == board[r + 3][c + 3] != 0:\n return board[r][c]\n if board[r][c + 3] == board[r + 1][c + 2] == board[r + 2][c + 1] == board[r + 3][c] != 0:\n return board[r][c + 3]\n\n # No win found\n return 0"} {"instruction": "Compare two strings and return \"bigger\", \"smaller\" or \"equal\" depending on the lexicographical order.", "input": "string1 = \"zebra\" string2 = \"zeal\"", "output": "def compare_strings(string1, string2): i = 0 length = min(len(string1), len(string2)) while i < length: if string1[i] < string2[i]: return 'smaller' elif string1[i] > string2[i]: return 'bigger' i += 1 if len(string1) > len(string2): return 'bigger' else: return 'equal'"} {"instruction": "Create an algorithm to find the median of a given list of numbers.", "input": "[2, 5, 7, 4, 3]", "output": "def find_median(list_of_numbers): sorted_list = sorted(list_of_numbers) length = len(sorted_list) if length % 2 == 0: median1 = sorted_list[length // 2] median2 = sorted_list[(length // 2) - 1] median = (median1 + median2) / 2 else: median = sorted_list[length // 2] return median"} {"instruction": "Create a class in Java named 'Person' that has the following fields: name, age, and gender.", "input": "", "output": "public class Person { private String name; private int age; private String gender; public Person(String name, int age, String gender) { this.name = name; this.age = age; this.gender = gender; } }"} {"instruction": "Create a basic Python program to list all the odd numbers from 0 to a user-specified number", "input": "user_number = 10", "output": "def odd_numbers(num):\n for n in range(num+1):\n if n % 2 != 0:\n print(n)\n\nodd_numbers(user_number)\n# Output: 1, 3, 5, 7, 9"} {"instruction": "Find the index of a given item in an array", "input": "arr = [1, 4, 6, 8, 9] item = 8", "output": "def find_index(arr, item): \"\"\" Finds the index of a given item in an array \"\"\" for i, num in enumerate(arr): if num == item: return i return -1"} {"instruction": "Write an SQL query to pick distinct elements from a table named 'students'.", "input": "", "output": "SELECT DISTINCT * FROM students;"} {"instruction": "Create a code that take an input of the list of integers, and outputs even numbers from the list.", "input": "numbers = [2, 3, 4, 5, 6, 7, 8]", "output": "def get_even_numbers(numbers): even_numbers = [] for number in numbers: if number % 2 == 0: even_numbers.append(number) return even_numbers get_even_numbers(numbers)"} {"instruction": "Write code to delete all elements in a given Python list which are NOT integer type.", "input": "lst = [1, \"a\", 2.3, False, 4, \"abc\"]", "output": "for item in lst[:]: if not isinstance(item, int): lst.remove(item)"} {"instruction": "Write a code that computes the sum and difference of two numbers in JavaScript.", "input": "var x = 10; var y = 5;", "output": "var x = 10; var y = 5; var sum = x + y; var diff = x - y; console.log(\"The sum of \" + x + \" and \" + y + \" is: \" + sum); console.log(\"The difference of \" + x + \" and \" + y + \" is: \" + diff);"} {"instruction": "Suggest a way to automate a process that extracts the data from a web page.", "input": "", "output": "The process of extracting data from a web page can be automated by using web scraping techniques. Web scraping is a process of extracting data from websites using programming languages such as Python or JavaScript. It involves making web requests to the respective web pages using tools like BeautifulSoup and then parsing the data from the response using libraries like lxml or html5lib."} {"instruction": "Using the given information, write a function to calculate a 5-digit ISBN number.", "input": "Author name: Bob Smith Title of Book: Learn Programming Publisher: Aztec Publishing Year Published: 2020", "output": "def calculate_isbn(authorname, title, publisher, yearpublished): authorname_string = authorname.replace(' ', '') title_string = title.replace(' ', '') publisher_string = publisher.replace(' ', '') isbn_total = 0 for letter in authorname_string: isbn_total += ord(letter) for letter in title_string: isbn_total += ord(letter) for letter in publisher_string: isbn_total += ord(letter) isbn_total += yearpublished while isbn_total > 9999: isbn_total = isbn_total % 10000 isbn_string = str(isbn_total).zfill(5) return isbn_string"} {"instruction": "Split a sentence into an array of words using C++.", "input": "Sentence: Today is a sunny day.", "output": "#include #include #include std::string sentence = \"Today is a sunny day.\"; std::istringstream iss(sentence); std::vector words; for(std::string word; iss >> word; ) words.push_back(word); //words[] now contains the sentence split into words"} {"instruction": "Construct a for-loop in Python to repeat a code snipet 10 times.", "input": "", "output": "for i in range(10):\n print(\"This code is being repeated 10 times\")"} {"instruction": "Create a function to create a simple calculator for addition, subtraction, multiplication and division.", "input": "", "output": "def simple_calculator(action, a, b): if action == \"add\": return a + b elif action == \"subtract\": return a - b elif action == \"multiply\": return a * b elif action == \"divide\": return a / b else: return 0"} {"instruction": "Write a CSS rule to set the text size of all elements with the class “big-header” to 24px.", "input": "", "output": ".big-header { font-size: 24px; }"} {"instruction": "Recognize the type of error in the given code and provide which line of code is causing the error.", "input": "def divide(numerator, denominator): return numerator / denominator number = int(input(\"Enter a number: \")) result = divide(100, number)", "output": "Line 4 is causing a syntax error due to improper indentation."} {"instruction": "Write a Python program to find the list of words that are longer than given length", "input": "word_list = [\"Red\", \"Green\", \"Blue\", \"Yellow\", \"Orange\"]\nlength = 5", "output": "# Create a list to store the result\nlong_words_list = []\n\n# Iterate the list to find words longer than the given length\nfor word in word_list:\n if len(word) > length:\n long_words_list.append(word)\n\n# Print the result\nprint(long_words_list)"} {"text": "[CS Wikipedia] Seznam obcí v departementu Horní Savojsko\n\nToto je seznam obcí v departementu Horní Savojsko ve Francii, jichž je celkem 294: Reference Externí odkazy Horní Savojsko"} {"instruction": "Generate a Python program to classify text documents by topic.", "input": "text = [\"The quick brown fox jumps over the lazy dog.\", \n\"This is a sample text used to determine how well the classification model works.\", \n\"This text belongs to the Animal topic.\"]", "output": "import sklearn\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.preprocessing import LabelEncoder\nfrom sklearn.naive_bayes import MultinomialNB\n\n# Sentences\nsentences = []\nsentences.append(\"The quick brown fox jumps over the lazy dog.\") \nsentences.append(\"This is a sample text used to determine how well the classification model works.\")\nsentences.append(\"This text belongs to the Animal topic.\")\n\n# Topics\ntopics = [\"Animal\",\"Sports\",\"Weather\"]\n\n# Create feature vectors \nvectorizer = CountVectorizer(stop_words='english') \nX = vectorizer.fit_transform(sentences).toarray()\n \n# Create label encoder \nlabel_encoder = LabelEncoder()\ny = label_encoder.fit_transform(topics)\n\n# Instantiate the model \nclassifier = MultinomialNB() \nclassifier.fit(X, y) \n\n# Classify new sample \nsample = vectorizer.transform([\"A warm and sunny day\"]).toarray()\nprediction = classifier.predict(sample) \nprint(prediction)\nprint(label_encoder.inverse_transform(prediction))"} {"instruction": "Count the number of integers in the given 2D array.", "input": "[ [1, 2, 3], [4, 5, 6], [7, 8] ]", "output": "8"} {"text": "[DE Wikipedia] Kami-kama\n\nKami-kama () ist eine halbkreisförmige Depression an der Prinz-Harald-Küste des ostantarktischen Königin-Maud-Lands. Sie liegt im oberen Abschnitt des Simo-kama im südlichen Teil der Langhovde. Japanische Wissenschaftler kartierten sie anhand von Vermessungen und Luftaufnahmen aus den Jahren zwischen 1957 und 1962. Die Benennung erfolgte 1972. Weblinks Kami-kama im Composite Gazetteer of Antarctica (englisch) Senke Langhovde Geographie (Antarktika)"} {"instruction": "Create a list in Python that contains the first 10 multiples of 3.", "input": "", "output": "multiples_list = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]"} {"text": "[CS Wikipedia] Robert Bresson\n\nRobert Bresson (* 25. září 1901, Bromont-Lamothe, Puy-de-Dôme, Auvergne, Francie - 18. prosince 1999, Paříž, Francie) byl francouzský režisér. Původně byl malíř, který se posléze prosadil ve čtyřicátých letech jako filmový režisér a dalších čtyřicet let zůstal jednou z nejvlivnějších postav světové kinematografie. Nestál o popularitu vlastní osoby a informace o svém soukromí celý život skrýval. Proslavil ho jedinečný přístup k filmu, originální práce se všemi jeho složkami. Jeho díla jsou neobvykle citlivá, harmonická, plná zvláštní spirituality i tragiky. Biografie Narodil se 25. 9. 1901 v Auvergne, menším městě ležícím jižně od Paříže (donedávna se z neznámých důvodů uváděl rok 1907). S nevalným zájmem o studia absolvoval gymnázium a podle některých zdrojů poté studoval filozofii. Byl hudebníkem a fotografem. Teprve později ho začala fascinovat literatura, především Stendhal, Dickens, Dostojevskij, Mallarmé, Valéry, Montaigne a Proust. Celý život se věnoval také malířství. Roku 1926 si vzal Leidii van der Zee, později (neznámo kdy) se rozvedli. V letech 1940/41 byl 18 měsíců německým válečným zajatcem. Roku 1949 založil s Jeanem Cocteauem a Rogerem Leenhardtem společnost Objectif 49, z níž později vzešel časopis Cahiers du Cinéma. Několik let byl prezidentem Societé des realisateurs de films. Na začátku 90. let se oženil podruhé. Tu čest měla Marie-Madeleine van der Mersch, asistentka režie u jeho filmu Čtyři noci jednoho snílka. Společně s violoncellistou Mstislavem Rostropovičem založil v Paříži Společnost Andreje Tarkovského, pečující o Tarkovského odkaz. Snad pro vyznění svých filmů byl považován za jansenistu, sám to ale popíral a hlásil se jen obecně ke katolicismu. Zemřel bez výraznějšího zájmu médií 18. prosince 1999 na svém venkovském sídle v Droue-sur-Drouette západně od Paříže. Film K filmu se dostává počátkem 30. let, psal dialogy ke komedii To byl muzikant (1933). Roku 1934 natáčí svou prvotinu, pětadvacetiminutovou surreálnou satirickou frašku, která hýří vizuálními nápady a gagy. Film Les Affaires publiques (Veřejné záležitosti) ale neměl divácký úspěch a posléze byl dokonce ztracen a objeven až v roce 1988. Devět let Bresson nedostal příležitost režírovat. V tomto období se podílel na dvou scénářích. Krátce také asistoval u Reného Claira (v jednom rozhovoru to ale popřel), film nebyl nikdy dokončen. Celovečerním debutem byly v roce 1943 Andělé hříchu, příběh z prostředí kláštera o dvou ženách protikladných povah. Film se na první pohled odlišoval od ostatních snímků té doby evidentní nevyklenutostí fabulačního oblouku, rozdrobením dějové linie a vyústěním, které dbá daleko více o duchovní poselství příběhu než o logické vyvrcholení jeho dějových peripetií. To vše se stane pro Bressonovy filmy typické. Film znovu neměl úspěch u…"} {"instruction": "How can you convert a number from one base to another?", "input": "", "output": "def convert_base(num, from_base, to_base): if isinstance(num, str): n = int(num, from_base) else: n = int(num) alphabet = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\" if n < to_base: return alphabet[(n)] else: return convert_base(n // to_base, from_base, to_base) + alphabet[n % to_base]"} {"text": "[DE Wikipedia] NetApp\n\nNetApp, Inc., zuvor bekannt als Network Appliance, Inc., ist ein Unternehmen, das im Bereich der Datenspeicherung, des Cloud Computing und des Datenmanagements arbeitet. Es hat seinen Sitz seit 2021 in San José im US-Bundesstaat Kalifornien. Geschichte NetApp wurde 1992 unter dem Namen Network Appliance von David Hitz, James Lau und Michael Malcolm gegründet. Im Jahr 1995 erfolgte der Börsengang an der amerikanischen Börse NASDAQ unter dem Tickersymbol NTAP. Das Unternehmen firmierte zwar stets unter dem Namen Network Appliance, wurde aber im Markt häufig als NetApp bezeichnet. Am 10. März 2008 benannte sich das Unternehmen dann offiziell in NetApp um. In Deutschland repräsentiert die NetApp Deutschland GmbH mit Sitz in Dornach (Aschheim) das Unternehmen. Weitere Geschäftsstellen in Deutschland befinde sich in Düsseldorf und Hamburg. 2023 wurde NetApp von U.S. News & World Report als „Best Company to Work For“ ausgezeichnet. Am 1. März 2021 wurde eine Partnerschaft mit dem Aston Martin F1 Team bekanntgegeben. NetApp übernimmt dabei die Datenbereitstellung sowie Clouddienste für das Rennteam. Eine ähnliche Partnerschaft existiert seit 2018 mit dem MotoGP-Team Ducati Corse, sowie seit Juli 2022 mit dem TAG Heuer Porsche Formula E Team. Akquisitionen 1997 - Internet Middleware (IMC) wird für 10,5 Millionen Dollar übernommen. Die Web-Proxy-Caching-Software von IMC wurde zur NetCache-Produktlinie (die 2006 weiterverkauft wurde). 2000 - Orca Systems, Inc. ist ein in Waltham, Massachusetts, ansässiger Entwickler von RDMA-Software (Remote Direct Memory Access). Dies führte zur Entwicklung des Direct Access File System. 2004 - Übernahme von Spinnaker Networks für 300 Millionen Dollar. Technologien von Spinnaker werden in Data ONTAP GX integriert und 2006 erstmals veröffentlicht; später wird Data ONTAP GX zu Clustered Data ONTAP. 2005 - Übernahme von Alacritus für 11 Millionen US-Dollar. Die Tape-Virtualisierungstechnologie, die Alacritus in NetApp einbrachte, wurde in die NetApp NearStore Virtual Tape Library (VTL) Produktlinie integriert, die 2006 eingeführt wurde. 2005 - Decru: Storage-Sicherheitssysteme und Key-Management. Decru wird als eigenständige Geschäftseinheit weitergeführt. 2006 - Übernahme von Topio für 160 Millionen US-Dollar. Software für die Replikation, Wiederherstellung und den Schutz von Daten über beliebige Entfernungen, unabhängig von der zugrunde liegenden Server- oder Speicherinfrastruktur. Diese Technologie wurde unter dem Namen ReplicatorX (Open System SnapVault) bekannt und wurde inzwischen aufgegeben. 2008 - Übernahme von Onaro für 120 Millionen Dollar. Software für die Verwaltung von Speicherservices, die Kunden hilft, Speicher effizienter zu verwalten und garantierte Service-Levels für Verfügbarkeit und Leistung zu bieten. Die…"} {"instruction": "Given a list of numbers, determine whether they are a perfect square or not.", "input": "[1, 2, 3, 4]", "output": "[True, False, False, True]"} {"instruction": "Name the Java keyword used to define a class", "input": "", "output": "The Java keyword used to define a class is \"class\"."} {"instruction": "Create a program in Java that calculates the average of two test scores.", "input": "test1 = 85 test2 = 90", "output": "public static double average(int test1, int test2){ double avg = (test1+test2)/2; return avg; }"} {"instruction": "Write a Python code to normalize a list of numbers.", "input": "list_numbers = [1, 4, 4, 5, 7]", "output": "\"\"\"\nNormalize a list of numbers using Python\n\"\"\"\n\ndef normalize_list(list_numbers):\n max_val = max(list_numbers)\n normalized = [n/max_val for n in list_numbers]\n return normalized\n\nif __name__ == '__main__':\n list_numbers = [1, 4, 4, 5, 7]\n print(normalize_list(list_numbers))"} {"instruction": "Develop a Python code to replace all occurrences of a specified phrase in a string.", "input": "string = \"This is a sample string. This has to be replaced.\" phrase = \"This\" newString = \"That\"", "output": "string = string.replace(phrase, newString) print(string) # Output: That is a sample string. That has to be replaced."} {"text": "[CS Wikipedia] Danė\n\nAkmena-Danė , nebo také Dangė, je řeka na západě Litvy (Klaipėdský kraj), v Žemaitsku, v okresech Kretinga a Klaipėda. Je dlouhá 62,5 km. Povodí má rozlohu 580,2 km². Pramení u vsi Mažieji Žalimai, protéká okresem Kretinga, městem Kretinga, okresem Klaipėda a v Klaipėdě se vlévá do Kurského zálivu, 3 km od jeho ústí do Baltského moře. Od pramene až k hranici okresu Klaipėda, která prochází po jižním okraji jižní městské čtvrti Kretingy „Bajorai“ se řeka jmenuje Akmena, od této hranice až k ústí se jmenuje Danė (úřední název), dříve (do roku 1984 pouze) také Dangė. Poprvé byla tato řeka zmíněna 29. července1252 ve smlouvě mezi vedením Livonského řádu a kuršským biskupem Heinrichem (viz Historie města Klaipėdy) o stavbě Klaipėdského hradu, zde je pojmenována Dange (r. 1253 – Danghe, r. 1290 – Dange). Mezi 55–57 km a v Klaipėdě je řeka zregulována. Střední tok prochází erozním údolím, je tu mnoho balvanitých peřejí. Pod Kretingou teče širokým údolím. Průměrná šířka údolí je 400–500 m, výška strání je 5–10 m. Šíře koryta v horním a středním toku průměrně 5–18 m, v dolním toku do 40 m. Hloubka 0,3–1,3 m, v Klaipėdě 5–7 m. Průměrný spád je 88 cm/km, v dolním toku (posledních 15 km) 7 cm/km. Rychlost proudu je 0,1–0,2 m/s. Průtok u ústí: max. 90, min. 0,7 m3/s. Jarní povodňové zvýšení hladiny: v horním toku do +3 m, u Klaipėdy do 1,7 m. Má se za to, že název kuršského původu Dangė vznikl od toho, že řeka u Klaipėdy tvoří ostrý „roh/úhel“. O původu názvu horního toku – Akmena – sledujte v rozcestníku Akmena. Přítoky Levé: Pravé: Obce na březích Mažieji Žalimai Knėžai Akmenalės Rubiniškė Darataičiai Vaineikiai Kašučiai Užparkasai Žiogeliai Genčiai Tūbausiai Kurmaičiai Tinteliai Padvariai Kretinga Bajorai Egliškiai Šlikiai Vitiniai Kretingalė Stančiai Pipirai Paupuliai Pipirai Gvildžiai Purmaliai Tauralaukis Klaipėda Další objekty Na řece jsou 4 vodní nádrže: Tūbausiai (vzdálenost od ústí 41,2 km, plocha 84,9 ha) Padvariai (Kretinga) (34,2 km, 82 ha, založen r. 1981) Kretingský (31,4 km, 7,1 ha) Bajorų (28 km, 1,5 ha) Další: Chráněná krajinná oblast Grūšlaukė (založena 1992), do ní spadá úsek asi 3 km horního toku řeky Akmeny Hradiště (piliakalnis) jménem Kurmaičių piliakalnis na soutoku řek Akmena a Pilsupis Mlýn v Kretinze postavený kolem roku 1786 Most cesty Kretingalė-Smilgynai, postavený roku 1880 Botanická zahrada v klaipėdské čtvrti Pakrantės sodai (na pravém břehu) „Čertův kámen“ (litevsky: Velnio akmuo) (délka: 4 m, šířka: 3,3 m, váží kolem 50 t) na levém břehu řeky Danė, v klaipėdské čtvrti Tauralaukis I. přívoz do Smiltynė (na pravém břehu) zbytky (základy + sklepení) Klaipėdského hradu (na levém břehu) Význam řeky pro Klaipėdu Na pravém břehu, asi 150 m od ústí do Kuršského zálivu je I. přívoz z Klaipėdy na Kuršskou kosu, do čtvrti Smiltynė. Řeku…"} {"instruction": "Design a stack in Python to hold strings.", "input": "", "output": "class Stack: \n \n def __init__(self): \n self.stack = [] \n \n def isEmpty(self): \n return len(self.stack) == 0\n \n def push(self, item): \n self.stack.append(item) \n \n def pop(self): \n if (self.isEmpty()): \n return \"Stack is empty\"\n \n return self.stack.pop() \n \n def peek(self): \n if (self.isEmpty()): \n return \"Stack is empty\"\n\n return self.stack[-1] \n \n def size(self): \n return len(self.stack)"} {"instruction": "Modify the above program to sort the array in descending order.", "input": "[3,8,5,1,2,6,4]", "output": "public class SortDescending { public static void main(String[] args) { int[] numbers = {3,8,5,1,2,6,4}; int temp = 0; for (int i = 0; i < numbers.length; i++) { for (int j = i+1; j < numbers.length; j++) { if (numbers[i] < numbers[j]) { //swap elements temp = numbers[i]; // assign value of i to temp numbers[i] = numbers[j]; // assign value of j to i numbers[j] = temp; // assign value of temp to j } } } System.out.println(\"Array elements in descending order:\"); for (int i = 0; i < numbers.length; i++) { System.out.print(numbers[i]+\" \"); } } }"} {"instruction": "Using the given NumPy array, print out all the elements that are greater than 5.", "input": "import numpy as np arr = np.array([4, 6, 2, 8, 0, 7, 5])", "output": "import numpy as np arr = np.array([4, 6, 2, 8, 0, 7, 5]) print(\"Elements greater than 5:\") for element in arr: if element > 5: print(element)"} {"instruction": "Create a python program to find the largest prime factor of a number.", "input": "Number: 331", "output": "import math\n\ndef largest_prime_factor(n):\n\n# Separate the list of larger factors of the number into prime and composite numbers \n factors = []\n for i in range(2, int(math.sqrt(n)) + 1):\n if n % i == 0:\n factors.append(i)\n factors.append(int(n/i))\n# Find the largest prime factor in the list\n prime_factors = []\n for potential_factor in factors:\n is_prime = True\n for j in range(2,int(math.sqrt(potential_factor))+1):\n if potential_factor % j == 0 and potential_factor != j: \n is_prime = False\n if is_prime:\n prime_factors.append(potential_factor)\n\n# Return the largest prime factor\n return max(prime_factors)\n\nprint(largest_prime_factor(331))"} {"instruction": "Generate the for loop in Java for iterating from 0 to the given number.", "input": "4", "output": "for (int i = 0; i < 4; i++) { //code to be executed }"} {"instruction": "Create an algorithm in Python to reverse an array in place.", "input": "", "output": "def reverse_in_place(arr): \n \n # Initializing start and end \n start = 0\n end = len(arr) - 1\n \n while start < end: \n # swapping the elements \n arr[start], arr[end] = arr[end], arr[start] \n start += 1\n end -= 1\n return arr \n \narr = [1, 2, 3, 4, 5, 6] \nprint(reverse_in_place(arr))"} {"text": "[EN Wikipedia] 1839 in Denmark\n\nEvents from the year 1839 in Denmark. Incumbents Monarch – Frederick VI (until 3 December), then Christian VIII Prime minister – Otto Joachim Events Undated Births JanuaryMarch 25 January – Frederikke Federspiel, photographer (died 1913) 6 February – Caroline Testman, women's rights activist (d. 1919) 18 February – Hermann Baagøe Storck, architect (died 1922) 13 March – Tage Reedtz-Thott, politician, prime minister of Denmark (died 1923) AprilJune 10 June – Ludvig Holstein-Ledreborg, politician, prime minister of Denmark (died 1912) JulySeptember 21 August Otto Bache, painter (died 1927) 26 August – Kristen Feilberg, photographer (died 1919) 23 September - Wilhelmine Schröder, royal favorite (died 1924) OctoberDecember 2 October – Hans Smidth, artist (died 1917) 31 November Niels Steenberg, engineer (died 1915) 4 December Louise Hegermann-Lindencrone, playwright and salonist (died 1833) Deaths 29 March – Giuseppe Siboni opera singer and director (b. 1780) 18 August Bendix Frantz Ludwig Schow, mayor (born 1778) 3 December – Frederick VI, King of Denmark (born 1768) Full date missing Hans Wassard, businessman and landowner (born 1756) References 1830s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Create a Python program to detect whether a given number is even or odd.", "input": "", "output": "def detect_even_or_odd(num):\n if num % 2 == 0:\n print(num, \"is Even\")\n else:\n print(num, \"is Odd\")\n\nif __name__ == \"__main__\":\n num = int(input(\"Enter a number: \"))\n detect_even_or_odd(num)"} {"instruction": "Can you write a Python program to take a list and create a new list with unique elements of the first list?", "input": "list=[1,2,2,3,3,3]", "output": "def unique_list(list):\n unique_list = []\n for element in list:\n if element not in unique_list:\n unique_list.append(element)\n return unique_list\n\nunique_elements = unique_list([1,2,2,3,3,3])\nprint(unique_elements)"} {"instruction": "Create a Python function to calculate the Fibonacci sequence with a given number as the input.", "input": "6", "output": "def fibonacci_sequence(num): \n \n a = 0\n b = 1\n \n if num < 0: \n print(\"Incorrect input\") \n elif num == 0: \n return a \n elif num == 1: \n return b \n else: \n for i in range(2,num): \n c = a + b \n a = b \n b = c \n return b \n \nprint(fibonacci_sequence(num))"} {"instruction": "Implement a linear search algorithm in C language that takes an array and a value as input and returns the index of the value’s first occurrence in the given array.", "input": "Array: [3, 4, 6, 9, 10] value: 9", "output": "int linearSearch(int array[], int size, int key) { for (int i = 0; i < size; i++) { if (array[i] == key) return i; } return -1; }"} {"instruction": "Write a CSS rule to set the font family of all

      tags to be \"Roboto\".", "input": "", "output": "h1 { font-family: 'Roboto'; }"} {"text": "[HI Wikipedia] तबला\n\nतबला भारतीय संगीत में प्रयोग होने वाला एक तालवाद्य है जो मुख्य रूप से दक्षिण एशियाई देशों में बहुत प्रचलित है। यह लकड़ी के दो ऊर्ध्वमुखी, बेलनाकार, चमड़ा मढ़े मुँह वाले हिस्सों के रूप में होता है, जिन्हें रख कर बजाये जाने की परंपरा के अनुसार \"दायाँ\" और \"बायाँ\" कहते हैं। यह तालवाद्य हिन्दुस्तानी शास्त्रीय संगीत में काफी महत्वपूर्ण है और अठारहवीं सदी के बाद से इसका प्रयोग शास्त्रीय एवं उप शास्त्रीय गायन-वादन में लगभग अनिवार्य रूप से हो रहा है। इसके अतिरिक्त सुगम संगीत और हिंदी सिनेमा में भी इसका प्रयोग प्रमुखता से हुआ है। यह बाजा भारत, पाकिस्तान, नेपाल, बांग्लादेश, और श्री लंका में प्रचलित है। पहले यह गायन-वादन-नृत्य इत्यादि में ताल देने के लिए सहयोगी वाद्य के रूप में ही बजाय जाता था, परन्तु बाद में कई तबला वादकों ने इसे एकल वादन का माध्यम बनाया और काफी प्रसिद्धि भी अर्जित की। नाम तबला की उत्पत्ति अरबी-फ़ारसी मूल के शब्द \"तब्ल\" से बतायी जाती है। हालाँकि, इस वाद्य की वास्तविक उत्पत्ति विवादित है - जहाँ कुछ विद्वान् इसे एक प्राचीन भारतीय परम्परा में ही उर्ध्वक आलिंग्यक वाद्यों का विकसित रूप मानते हैं वहीं कुछ इसकी उत्पत्ति बाद में पखावज से निर्मित मानते हैं और कुछ लोग इसकी उत्पत्ति का स्थान पच्छिमी एशिया भी बताते हैं। उत्पत्ति तबले का इतिहास सटीक तौर पर नामालूम है और इसकी उत्पत्ति के बारे में कई उपस्थापनायें मौजूद हैं। इसकी उत्पत्ति के सम्बन्ध में वर्णित विचारों को दो समूहों में बाँटा जा सकता है: तुर्क-अरब उत्पत्ति औपनिवेशिक शासन के दौरान इस परिकल्पना को काफी बलपूर्वक पुरःस्थापित किया गया कि तबले की मूल उत्पत्ति मुस्लिम सेनाओं के साथ चलने वाले जोड़े ड्रम से हुई है; इस स्थापना का मूल अरबी के \"तब्ल\" शब्द पर आधारित है जिसका अर्थ \"ड्रम (ताल वाद्य)\" होता है। बाबर द्वारा सेना के साथ ऐसे ड्रम लेकर चलने को उदाहरण के रूप में प्रस्तुत किया जाता है, हालाँकि तुर्क सेनाओं के साथ चलने वाले ये वाद्ययंत्र तबले से कोई समानता नहीं रखते बल्कि \"नक्कारा\" (भीषण आवाज़ पैदा करने वाले) से समानता रखते हैं। दूसरी स्थापना के मुताबिक़, अलाउद्दीन खिलजी के समय में, अमीर ख़ुसरो ने \"आवाज़ बाजा\" (बीच में पतला तालवाद्य) को काट कर तबले का रूप देने की बात कही जाती है। हालाँकि, यह भी संभव नहीं लगता क्योंकि उस समय के कोई भी चित्र इस तरह के किसी वाद्य यंत्र का निरूपण नहीं करते। मुस्लिम इतिहासकारों ने भी अपने विवरणों में ऐसे किसी वाद्ययंत्र का उल्लेख नहीं किया है। उदाहरण के लिए, अबुल फैजी ने आईन-ए-अकबरी में तत्कालीन वाद्ययंत्रों की लंबी सूची गिनाई है, लेकिन इसमें तबले का ज़िक्र नहीं है। एक अन्य तीसरे मतानुसार दिल्ली के ख़यात गायक सदारंग के शिष्य और प्रसिद्ध पखावज वादक रहमान खान के पुत्र, अमीर खुसरो (द्वितीय) ने 1738 ई॰ में पखावज से तबले का आविष्कार किया। इससे पहले ख़याल गायन में भी पखावज से संगत की जाती थी। इस सिद्धांत में सत्यता संभावित है क्योंकि उस समय की लघु कलाकृतियों (मिनियेचर पेंटिंग) में तबले से मिलते-जुलते वाद्ययंत्र के प्रमाण मिलते हैं। हालाँकि, इससे यह प्रतीत होता है की इस वाद्ययंत्र की उत्पत्ति भारतीय उपमहादीप के मुस्लिम समुदायों में दिल्ली के आसपास हुई न कि यह अरब देशों से आयातित…"} {"instruction": "Write a CSS code snippet to give all paragraphs a font size of 16px.", "input": "", "output": "p { font-size: 16px; }"} {"instruction": "Generate a Python program which can produce the sum of all even numbers between 0 and n, including zero.", "input": "", "output": "def sum_even_nums(n):\n sum = 0\n for i in range(0, n+1):\n if i%2 == 0:\n sum += i\n return sum"} {"instruction": "Write a SQL query to select users who have a username that starts with \"S\".", "input": "", "output": "SELECT * FROM users WHERE username LIKE 'S%';"} {"instruction": "Implement a gradient descent algorithm for a classification task in Python.", "input": "", "output": "def grad_descent_classifier(input_data, weights, learning_rate):\n \n # finding the gradient of our weights w.r.t to cost function\n N = len(input_data)\n grad = np.zeros(weights.shape)\n \n error = 0\n # looping through each training datapoint\n for i in range(N):\n x = input_data[i]\n y = input_data[i][-1]\n \n # calculating the error\n error += (np.dot(x, weights)-y)**2\n \n # update grad\n for j in range(len(x)):\n grad[j] += -(2/N)*(y-np.dot(x,weights))*x[j]\n \n # updating the weights\n weights = weights - learning_rate*grad\n \n # return the weights\n return weights"} {"instruction": "What is the best way to sort an array of integers in descending order using Python?", "input": "[99, 65, 43, 87, 21]", "output": "def sortDesc(arr):\n arr.sort(reverse=True)\n return arr\n\narr = [99, 65, 43, 87, 21]\nprint(sortDesc(arr)) // Output: [99, 87, 65, 43, 21]"} {"instruction": "Can you develop a basic web server in Python that serves a webpage when queried?", "input": "", "output": "from http.server import HTTPServer, BaseHTTPRequestHandler\nfrom urllib.parse import urlparse\n\nclass RequestHandler(BaseHTTPRequestHandler):\n\n def do_GET(self):\n self.send_response(200)\n self.send_header('Content-Type', 'text/html')\n self.end_headers()\n self.wfile.write(b\" Home Page

      Welcome to my website!

      \")\n\ndef run(server_class = HTTPServer, handler_class = RequestHandler):\n server_address = ('', 8000)\n httpd = server_class(server_address, handler_class)\n httpd.serve_forever()\n\nrun()"} {"text": "[HI Wikipedia] ऐलिस प्रयोग\n\nऐलिस प्रयोग का पूर्ण नाम ए लार्ज आयन कोलाइडर एक्सप्रिमेंट जिसका हिन्दी अनुवाद एक विशाल आयन संघट्ट प्रयोग () है। यह सर्न लार्ज हैड्रान कोलाइडर नामक त्वरक पर आँकड़े इकट्ठा करने वाले ७ कण भौतिकी प्रयोगो में से एक है। यह भारी आयनों की टक्कर के अध्ययन के लिए इष्टतम है। भौतिक उद्देश्य इस प्रयोग को भारी आयनों की टक्कर के अध्ययन के लिए निर्मित किया गया है। इसकी सहायता क्वार्क-ग्लुओन प्लाज्मा का अध्ययन किया जाता है जो पदार्थ की चार मूल अवस्थावों (ठोस, द्रव, गैस व प्लाज़्मा) से भिन्न है। संसूचक परिचय आँकड़े विश्लेषण इस प्रयोग के आँकड़ों को विश्लेषित करने के लिए सर्न द्वारा विकसित अलिरूट (ALIROOT) नामक संसूचक विशेष सॉफ्टवेयर का में लिया जाता है। यह रूट का संसूचक के लिए विशेष रूप से दिशात्मक संशोधन किया गया सॉफ्टवेयर है। उपलब्धियाँ अगस्त २०१२ में ऐलिस प्रयोग के वैज्ञानिकों ने दावा किया कि उनके प्रयोग ने ५.५×१०१२ (५.५ टेरा) डिग्री ताप के साथ क्वार्क-ग्लूऑन प्लाज्मा का निर्माण किया, जो कि किसी भी प्रयोग द्वारा आजतक प्राप्त अधिकतम तापमान है। सन्दर्भ बाहरी कड़ियाँ ऐलिस प्रयोग का आधिकारिक वेबपृष्ठ एक त्रिविम दृश्य भौतिकी कण भौतिकी अनुसंधान सर्न लार्ज हैड्रॉन कोलाइडर"} {"text": "[HI Wikipedia] हेनरी का नियम\n\nभौतिकी में हेनरी का नियम गैस के भौतिक गुणों से सम्बन्धित एक नियम है जिसे विलियम हेनरी ने १८०३ में प्रतिपादित किया था। हेनरी के नियम के अनुसार- किसी नियत ताप पर, किसी द्रव के निश्चित आयतन में घुल सकने वाली किसी गैस की मात्रा उस गैस के उस द्रव के साथ साम्यावस्था की स्थिति में आंशिक दाब के समानुपाती होती है। प्रतिबन्ध यह है कि घुलने वाली गैस उस द्रव के साथ कोई रासायनिक क्रिया न करे। इस नियम को दूसरे शब्दों में इस प्रकार भी कह सकते हैं- किसी गैस की किसी द्रव में घुलनशीलता उस गैस के उस द्रव के उपर स्थित आंशिक दाब के समानुपाती होता है। सामान्य जीवन में हेनरी के नियम का उदाहरण बार्बोनित मृदु पेयों में देखने को मिलता है। हेनरी के नियम की सीमाएँ निम्न हैं: दाब बहुत अधिक न हो। ताप बहुत कम न हो। विलयन तनु हो। गैस,विलायक से रासायनिक अभिक्रिया न करे। इन्हें भी देखें राउल्ट का नियम बाहरी कड़ियाँ Ethanol solubility in EPDM, Solubility of chemicals in polymers using Henry's law R. Battino and H. Lawrence Clever, \"The solubility of gases in liquids\", Chemical Reviews, 66, (4), pp. 395-463, (1966). Henry's gas law calculator H. Lawrence Clever, \"Setchenov salt-effect parameter\", J. Chem. Eng. Data, 28, (3), pp. 340–343, (1983). Hans Ulrich Borgstedt and Cezary Guminskib (Editors), \"IUPAC-NIST Solubility Data Series. 75. Nonmetals in Liquid Alkali Metals\", J. Phys. Chem. Ref. Data, 30, (4), pp. 835-1158, (2001) भौतिक रसायन साम्य रसायन रासायनिक इंजीनियरी गैस के नियम"} {"text": "[CS Wikipedia] Tennie\n\nTennie je francouzská obec v departementu Sarthe v regionu Pays de la Loire. V roce 2010 zde žilo 1 051 obyvatel. Vývoj počtu obyvatel Související články Seznam obcí v departementu Sarthe Externí odkazy Reference Obce v departementu Sarthe"} {"instruction": "Write a python program to calculate the discount rate based on a given purchase price and discount amount.", "input": "The purchase price is $100, the discount amount is $10.", "output": "discount_rate = 10/100\ndiscount = purchase_price * discount_rate\n\npurchase_price = 100\ndiscount_rate = 10/100\ndiscount = purchase_price * discount_rate\n\nprint(\"The discount is: ${}\".format(discount))"} {"instruction": "Write a python program for searching for a specific product within a given list of products.", "input": "products = [\"Apple\", \"Banana\", \"Cherry\", \"Grape\"]\n\nsearch_query = \"Grape\"", "output": "# Define a search function\ndef search (products, query):\n # Loop through list\n for product in products:\n if product == query: \n # Return the product index if it matches the query\n return products.index(product)\n\n# Get the index of the item\nresult = search(products, search_query)\n\n# Print the result\nprint(result)"} {"instruction": "Create a Python program to detect anagrams. An anagram is a word or phrase formed by rearranging the letters of another word or phrase.", "input": "words: \"dear\", \"read\"", "output": "def isAnagram(word1, word2): \n \n # Get lengths of both strings \n n1 = len(word1) \n n2 = len(word2) \n \n # If both strings have different lengths, they \n # cannot be anagrams \n if (n1 != n2): \n return False\n \n # Sort both strings \n word1 = sorted(word1) \n word2 = sorted(word2) \n \n # Compare sorted strings \n for i in range(n1): \n if word1[i] != word2[i]: \n return False\n \n return True\n \n# Driver program \nwords = (\"dear\", \"read\")\n \nif isAnagram(words[0], words[1]): \n print(\"The word\", words[0], \"and\", words[1], \"are anagrams\") \nelse: \n print(\"The word\", words[0], \"and\", words[1], \"are not anagrams\")"} {"instruction": "Generate a code that takes an array of integers and splits them into two equal halves", "input": "arr = [1, 2, 3, 4, 5, 6]", "output": "def split_array(arr): n = len(arr) mid = n//2 left_half = arr[:mid] right_half = arr[mid:] return left_half, right_half"} {"instruction": "Suggest a way to complete the following Python program which takes two strings as input and prints out the longer string.", "input": "first_str = 'hello' second_str = 'world'", "output": "if len(first_str) == len(second_str): print('The two strings are of equal length.') elif len(first_str) > len(second_str): print(first_str) else: print(second_str)"} {"instruction": "Generate a Python program to find the longest sequence of increasing numbers in a given list.", "input": "data = [1, 10, 3, 11, 7, 8, 4, 2]", "output": "data = [1, 10, 3, 11, 7, 8, 4, 2]\n\nmax_sequence = 0\ncurr_sequence = 0\nprev = -1\n\nfor num in data:\n # Check if the current number is larger than the previous one\n if num > prev:\n curr_sequence += 1\n max_sequence = max(max_sequence, curr_sequence)\n else: # Reset the length of the current sequence to 1\n curr_sequence = 0\n\nprint(max_sequence) # Output 3"} {"instruction": "Write a Python program to iterate the given list and print the square or each element.", "input": "my_list = [1, 2, 3, 4]", "output": "my_list = [1, 2, 3, 4] for i in my_list: print(i**2) # Output: 1, 4, 9, 16"} {"text": "[DE Wikipedia] Thomas de Bourlémont\n\nThomas de Bourlémont (auch Thomas d’Anglure de Bourlemont; * vor 1311; † April 1353) war ein französischer Bischof. Leben Die erste Erwähnung findet Thomas de Bourlémont im Juli 1311 zusammen mit seinen Eltern, Pierre, Herr von Bourlémont, und Jeanne de Choiseul, als er für eine kirchliche Laufbahn bestimmt wurde. Seine Erziehung erfolgte am Hof des Herzogs von Lothringen, danach besuchte er das Seminar in Toul. Durch Balduin, Erzbischof von Trier, empfing er die Tonsur, zu jener Zeit Symbol der Aufnahme in den Klerus. Der Bischof von Toul Jean d’Arzillières ernannte ihn um 1315 zum Archidiakon, und etwa zur selben Zeit ernannte der Papst ihn zum Dekan der Kirche von Verdun. Schließlich wurde er 1330 zum Bischof von Toul erwählt und empfing zwischen dem 1. März 1331 und dem 16. September 1332 die Bischofsweihe. Wirken Thomas de Bourlémont führte einige Reformen innerhalb seines Bistums durch, so regelte er etwa die Rechtsprechung in der Stadt Toul. Mit der kleinen Armee, die er aufgestellt hat, suchte er die Region zu befrieden. Als er zwei seiner Vasallen zwang, ihre Missbräuche einzustellen, verheerte er das Land des Herzogs von Lothringen und musste diesem als Entschädigung eine Summe von 2000 Livres zahlen. Im Jahr 1335 übernahm er die Rolle des Schiedsrichters, als Jean de Joinville, Herr von Vaucouleurs, zustimmte, diesen befestigten Platz gegen Besitzungen in der Gegend von Paris einzutauschen. Seine Stellung als Bischof hinderte Thomas de Bourlémont nicht daran, die Burgen Séraumont, Montbras und Taillancourt als persönliches Eigentum zu halten. Vom König beschuldigt, die beiden letzteren Festungen vorsätzlich in Brand gesetzt zu haben, wurde er in seiner Burg Séraumont verhaftet und in Chaumont festgesetzt. Um seine Freiheit wiederzuerlangen, musste er 1200 Livres zahlen. Er wurde in der Kathedrale von Toul in jener Kapelle beigesetzt, die er zu Ehren der Himmelfahrt der Jungfrau Maria erbaut hatte. Anmerkungen Literatur Georges Poull: Le Château et les seigneurs de Bourlémont. Bd. I, 1962, S. 49. Weblinks Charles Cawley: Trier Archbishopric. Chapter 3.: Bishops of Toul. In: Medieval Lands, 16. Dezember 2021 (englisch). Einzelnachweise Römisch-katholischer Bischof (14. Jahrhundert) Franzose Geboren im 13. oder 14. Jahrhundert Gestorben 1353 Mann Bischof von Toul"} {"instruction": "Create a Python script to calculate the total number of visitors on a Web page.", "input": "Number of visitors per day (example: 2000, 1500, 2500, 1800)", "output": "visitors_per_day = [2000, 1500, 2500, 1800]\ntotal_visitors = sum(visitors_per_day)\n\nprint(\"Total number of visitors:\", total_visitors)"} {"instruction": "Transform an input string to its uppercase equivalent with JavaScript.", "input": "inputString=\"This sentence should be in uppercase\"", "output": "let inputString = \"This sentence should be in uppercase\"; let outputString = inputString.toUpperCase(); console.log(outputString);"} {"instruction": "Create a class in Python with the attributes name and age.", "input": "", "output": "class Person: def __init__(self, name, age): self.name = name self.age = age"} {"instruction": "Write code to find the depth of a binary tree.", "input": "", "output": "// Recursive function to find the maximum depth // of a binary tree int maxDepth(Node *root) { // Base case if (root == NULL) return 0; // Recur for left subtree and right subtree int lDepth = maxDepth(root->left); int rDepth = maxDepth(root->right); // Use the larger one if (lDepth > rDepth) return lDepth + 1; else return rDepth + 1; }"} {"instruction": "Create a visualization to compare the customer preferences of two websites.", "input": "Website 1 has 4000 customers and their favourite products are video games and consoles. Website 2 has 5000 customers and their favourite products are movies, music and books.", "output": "The customer preferences can be compared using a bar chart. The X-axis can have the labels ‘Website 1’ and ‘Website 2’ and the Y-axis can have ‘Video games/Consoles’, ‘Movies’, ‘Music’ and ‘Books’ on the axis. The bars can represent the percentage of customers with the corresponding favourite product."} {"text": "[CS Wikipedia] Uli Hoeneß\n\nUlrich „Uli“ Hoeneß (* 5. leden 1952, Ulm) je bývalý německý fotbalista a fotbalový manažer. Hrával na pozici útočníka nebo záložníka. S reprezentací někdejšího Západního Německa se stal mistrem Evropy roku 1972 (zařazen i do all-stars turnaje) a mistrem světa roku 1974. Získal též stříbro na evropském šampionátu 1976 a byl to právě on, kdo neproměnil pokutový kop ve finálovém penaltovém rozstřelu a otevřel tak cestu k zisku titulu mužstvu Československa. Celkem za národní tým odehrál 35 utkání, v nichž dal 5 gólů. Takřka celou svou hráčskou kariéru strávil v jediném klubu, v Bayernu Mnichov (až na hostování v 1. FC Norimberk na úplném sklonku kariéry). Třikrát s ním vyhrál Pohár mistrů evropských zemí (1973/74, 1974/75, 1975/76), roku 1976 i Interkontinentální pohár. Třikrát též vyhrál Bundesligu (1972, 1973, 1974) a jednou německý pohár (1971). Sehrál v dresu Bayernu 239 ligových utkání, v nichž vstřelil 86 gólů. 11 zápasů přidal do bilance ještě v Norimberku. Po skončení hráčské kariéry se stal fotbalovým funkcionářem, byl generálním manažerem a posléze prezidentem Bayernu Mnichov. Roku 2013 se přiznal ke značným daňovým únikům ve výši zhruba 745 milionů korun. Byl odsouzen 14. března 2014 k odnětí svobody na tři a půl roku. Trest si odseděl ve věznici v Landsbergu. Reference Externí odkazy Biografie ve slovníku Who is who Statistiky na Fussball daten.de Němečtí fotbalisté Fotbaloví útočníci Fotbaloví záložníci Mistři světa ve fotbale Mistři Evropy ve fotbale Fotbalisté FC Bayern Mnichov Fotbalisté 1. FC Norimberk Narození v roce 1952 Žijící lidé Muži Vítězové Poháru mistrů evropských zemí Vítězové Interkontinentálního poháru Narození 5. ledna Členové Síně slávy německého sportu Hráči Mistrovství Evropy ve fotbale 1976 Hráči Mistrovství Evropy ve fotbale 1972 Hráči Mistrovství světa ve fotbale 1974"} {"instruction": "Implement a search algorithm in C++ that takes in a list of integers and a target value and finds the index of the target if it exists in the list.", "input": "List: [2, 4, 6, 8, 10], Target: 8", "output": "// C++ Program to implement Search #include using namespace std; // function to implement search int search(vector list, int x) { // traversing the list for (int i = 0; i list({2, 4, 6, 8, 10}); int x = 8; int index = search(list, x); if (index != -1) cout << \"Element found at index \" << index; else cout << \"Element not found\"; return 0; }"} {"instruction": "Formulate a regular expression in Python that matches words that starts with any two letters followed by two digits.", "input": "", "output": "regex = r\"^[a-zA-Z]{2}\\d{2}\""} {"instruction": "Create an if-else statement that prints \"Welcome!\" if the input is \"John\" and \"Goodbye!\" if the input is \"Caroline\".", "input": "", "output": "if name == \"John\": print(\"Welcome!\") else: print(\"Goodbye!\")"} {"text": "[DE Wikipedia] Weldolet\n\nEin Weldolet ist ein Bauteil, das im Rohrleitungsbau Verwendung findet. Einsatz Das Weldolet ermöglicht beim Leitungsbau eine 90°-Abzweigung und stellt somit eine Alternative zum T-Stück dar. Erforderlich ist eine Bohrung im Rohr, in die das Kopfende des Weldolets eingeschweißt wird. Ein ähnlicher Bauteil mit einem anderen Abzweig-Winkel als 90°, meist 45°, wird als Latrolet bezeichnet. Literatur Günter Wossog (Hrsg.): Handbuch Rohrleitungsbau. 2. Auflage, Vulkan Verlag, Essen 2003, ISBN 3-8027-2723-1. Siehe auch Nipolet Latrolet Weblinks Weldolet (abgerufen am 8. Mai 2017) Einzelnachweise Fluidelement"} {"instruction": "Generate a program in Python that takes two strings and returns a list containing the combined string.", "input": "(\"Hello \", \"World!\")", "output": "def combine_strings(str1, str2):\n return [str1 + str2]\n\ncombined_string = combine_strings(\"Hello \", \"World!\")\nprint(combined_string) # [\"Hello World!\"]"} {"instruction": "Create an array of 5 students and output their names.", "input": "var students = [ {name: 'John', age: 19}, {name: 'Amy', age: 22}, {name: 'Luke', age: 17}, {name: 'Alex', age: 18}, {name: 'Tom', age: 20} ];", "output": "names = [students[0].name, students[1].name, students[2].name, students[3].name, students[4].name]; console.log(names); // output: ['John', 'Amy', 'Luke', 'Alex', 'Tom']"} {"text": "[HI Wikipedia] हिन्दुत्व\n\nहिंदुत्व (शाब्दिक अर्थ: हिंदूपन) एक राजनीतिक विचारधारा है जिसमें हिंदू राष्ट्रवाद के सांस्कृतिक औचित्य को शामिल किया गया है I हिंदुत्व शब्द का इस्तेमाल पहली बार १८९२ में चंद्रनाथ बसु ने किया था और बाद में इस शब्द को १९२३ में विनायक दामोदर सावरकर ने लोकप्रिय बनाया। यह हिंदू राष्ट्रवादी स्वयंसेवी संगठन राष्ट्रीय स्वयंसेवक संघ (रा॰स्व॰सं), विश्व हिंदू परिषद (वि॰हिं॰प), भारतीय जनता पार्टी (भा॰ज॰पा) और अन्य संगठनों द्वारा संयुक्त रूप से संघ परिवार कहा जाता है। हिंदुत्व आंदोलन को दक्षिणपन्थी राजनीति के रूप में और \"शास्त्रीय अर्थों में लगभग फासीवादी\" के रूप में वर्णित किया गया है, जो समरूप बहुसंख्यक और सांस्कृतिक आधिपत्य की एक विवादित अवधारणा का पालन करता है। कुछ लोग फासीवादी लेबल पर विवाद करते हैं, और सुझाव देते हैं कि हिंदुत्व \"रूढ़िवाद\" या \"नैतिक निरपेक्षता\" का एक चरम रूप है। २०१४ में प्रधानमंत्री के रूप में नरेंद्र मोदी के चुनाव के साथ हिंदुत्व को भारतीय राजनीति में मुख्य धारा में लाया गया। इतिहास विचारधारा \"हिंदुत्व\" शब्द पहली बार 1870 के मध्य में बंकिम चंद्र चट्टोपाध्याय के उपन्यास आनंदमठ में आया था। बंगाल में चंद्रनाथ बसु द्वारा 1890 के दशक के उत्तरार्ध में हिंदुत्व शब्द का उपयोग पहले से ही किया जा रहा था [2] और राष्ट्रीय व्यक्ति बाल गंगाधर तिलक। [35] इस शब्द को 1923 में दक्षिणपंथी राष्ट्रवादी और भारतीय स्वतंत्रता आंदोलन के कार्यकर्ता विनायक दामोदर सावरकर ने अपनाया था, जबकि उन्हें ब्रिटिश राज के अधीन करने और इसके खिलाफ युद्ध के लिए उकसाने के लिए कैद किया गया था। [36] उन्होंने इस शब्द का इस्तेमाल अपनी विचारधारा और \"एक सार्वभौमिक और आवश्यक हिंदू पहचान के विचार\" को करने के लिए किया, जहां \"हिंदू पहचान\" वाक्यांश को व्यापक रूप से \"दूसरों के जीवन और मूल्यों के तरीकों\" से व्याख्यायित और प्रतिष्ठित किया गया है, एक धार्मिक अध्ययन डब्ल्यूजे जॉनसन कहते हैं। हिंदू धर्म पर ध्यान देने वाला विद्वान। दत्तक ग्रहण सावरकर की हिंदुत्व विचारधारा 1925 में नागपुर (महाराष्ट्र) में केशव बलिराम हेडगेवार के पास पहुंची और उन्होंने सावरकर के हिंदुत्व को प्रेरणादायक पाया। [57] [58] उन्होंने कुछ ही समय बाद रत्नागिरी के सावरकर का दौरा किया और उनके साथ 'हिंदू राष्ट्र' के आयोजन के तरीकों पर चर्चा की। [59] [60] सावरकर और हेडगेवार ने उस मिशन के साथ राष्ट्रीय स्वयंसेवक संघ (आरएसएस, \"राष्ट्रीय स्वयंसेवक समाज\") की शुरुआत करते हुए हेडगेवार को उस साल सितंबर में नेतृत्व किया। यह संगठन तेजी से विकसित होकर सबसे बड़ा हिंदू राष्ट्रवादी आंदोलन बन गया। विकास भारत के पहले प्रधानमंत्री जवाहरलाल नेहरू की कैबिनेट ने हिंदुत्व विचारधारा आधारित आरएसएस पर प्रतिबंध लगा दिया और आरएसएस के पूर्व स्वयंसेवक नाथूराम गोडसे के बाद, महात्मा गांधी को स्वीकार करते हुए, 200,000 से अधिक आरएसएस स्वयंसेवकों को गिरफ्तार किया। नेहरू ने हत्या और संबंधित परिस्थितियों की जांच के लिए सरकारी आयोग भी नियुक्त किए। इन सरकारी आयोगों द्वारा जांच की श्रृंखला, राजनीति विज्ञान की विद्वान नंदिनी देव कहती है, बाद में आरएसएस नेतृत्व और \"हत्या में आरएसएस की भूमिका निर्दोष\" पाया गया। [68] गिरफ्तार किए गए बड़े पैमाने पर आरएसएस के स्वयंसेवकों…"} {"instruction": "Create a SQL query to join two tables called Employees and Departments.", "input": "Employees table has the following columns: Emp_ID: int Name: string Age: int Dept_ID: int Departments table has the following columns: Dept_ID: int Dept_Name: string Location: string", "output": "SELECT e.Name, e.Age, d.Dept_Name, d.Location FROM Employees e INNER JOIN Departments d ON e.Dept_ID = d.Dept_ID;"} {"instruction": "Create a neural network using TensorFlow.", "input": "", "output": "import tensorflow as tf model = tf.keras.Sequential([ tf.keras.layers.Dense(units=128, activation='relu', input_shape=(10,)), tf.keras.layers.Dense(units=128, activation='relu'), tf.keras.layers.Dense(units=128, activation='softmax') ]) model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])"} {"text": "[CS Wikipedia] Christoph Amberger\n\nChristoph Amberger (1505 v Augsburgu – 1562) byl německý renesanční portrétista, který v polovině 16. století působil v Norimberku. Byl hlavním představitelem augsburské školy a stal se jedním z nejlepších portrétistů německé renesance. Své vzdělání získal Amberger u malíře Leonharda Becka. Ambergerovu tvorbu ovlivňoval Hans Holbein mladší a jeho portrétní obrazy, inspirován byl i koloritem a dekorativním stylem benátského malířství. Ve svých obrazech kladl velký důraz na zachycení rysů charakteristických pro portrétovanou osobu. Jeho dílo se vyznačuje manýristickou strohostí a odtažitostí. Kromě portrétů Amberger v pozdním období tvoří také oltářní obrazy podle italských vzorů. K jeho nejznámějším dílům patří: Císař Karel V. – rok 1532, Gemäldegalerie, SMPK, Berlín Christoph Baumgartner, 1543, Kunsthistorisches Museum, Vídeň Panna Marie s dítětem a svatými Ulrichem a Afrou, 1554, dóm, Augsburg Christoph Fugger, 1541, Alte Pinakothek, Mnichov Kosmograf Sebastian Münster, 1552, Gemäldegalerie, SMPK, Berlín Kosmograf Sebastian Münster, olej na dřevě, rozměry 54 × 42 cm. Jedná se o portrét významného německého učence a pozdějšího rektora basilejské university krátce před jeho smrtí (1488–1552). Ke zdůraznění trojrozměrnosti zde malíř používá stínování. Frontálním osvětlením Amberger zdůraznil chrakteristický výraz přemýšlivého člověka. Zářivý kolorit a použití frontálního osvětlení portrétovaného objektu jsou typickým rysem Ambergerova pozdního stylu. Christoph Fugger, olej na dřevě, rozměry 97,5 × 80 cm. Podobizna dvacetiletého syna mocného augsburského obchodníka Raymonda Fuggera (1489–1535). Mladík je zachycen v elegantní a sebevědomé póze. Postava je obklopena velkým prostorem, motiv architektury v pozadí a dvorský postoj mladíka zdůrazňuje postavení a vliv rodiny Fuggerů. Amberger zde navazuje na italské umění a spojuje jej s tradiční německou strohostí měšťanského portrétu. Reference Související články Seznam malířů Externí odkazy http://www.artrenewal.org/asp/database/art.asp?aid=219 http://www.artcyclopedia.com/artists/amberger_christoph.html Němečtí malíři Narození v roce 1505 Úmrtí v roce 1562 Muži Renesanční umělci Renesance Narození v Augsburgu"} {"instruction": "Find the mean of the following set of numbers: 10, 20, 30, 40", "input": "", "output": "25"} {"instruction": "Classify an input sentence with a given set of labels in Python.", "input": "The car is blue", "output": "def classify_sentence(sentence):\n labels = [‘color’, ‘object’]\n features = sentence.split(' ')\n feature_dict = {}\n for f in features:\n if f == 'blue':\n feature_dict['color'] = 'blue'\n elif f == 'car':\n feature_dict['object'] = 'car'\n return feature_dict\n\nsentence = 'The car is blue'\nlabels = [‘color’, ‘object’]\nprint(classify_sentence(sentence, labels))"} {"text": "[CS Wikipedia] Arcis-sur-Aube\n\nArcis-sur-Aube je francouzská obec v departementu Aube v regionu Grand Est. V roce 2011 zde žilo 2 988 obyvatel. Je centrem kantonu Arcis-sur-Aube. Sousední obce Le Chêne, Nozay, Ormes, Saint-Étienne-sous-Barbuise, Torcy-le-Grand, Villette-sur-Aube Vývoj počtu obyvatel Související články Seznam obcí v departementu Aube Bitva u Arcis-sur-Aube Odkazy Reference Externí odkazy Oficiální stránky obce Obce v departementu Aube"} {"instruction": "Output the number of words in a given sentence stored as a string.", "input": "\"Welcome to the world of coding!\"", "output": "def count_words(sentence): return len(sentence.split()) if __name__ == '__main__': sentence = \"Welcome to the world of coding!\" print(count_words(sentence))"} {"instruction": "Write a SQL query to get the names of all customers who have placed orders from a given store in the last week.", "input": "Given store name: \"ABC Store\"", "output": "SELECT DISTINCT c.name FROM customer c INNER JOIN order o ON c.customer_id = o.customer_id WHERE o.store_name = \"ABC Store\" AND o.date_ordered >= DATE_SUB(CURDATE(), INTERVAL 7 DAY);"} {"instruction": "Create a python function to extract the intersection of two lists.", "input": "listOne = [5,4,3]\nlistTwo = [3,2,1]", "output": "def intersection(listOne, listTwo):\n return list(set(listOne).intersection(set(listTwo)))"} {"instruction": "Write a CSS code to center align the given text.", "input": "", "output": "p { text-align: center; }"} {"instruction": "How can we remove duplicate elements from a given array?", "input": "", "output": "We can use a set data structure to remove duplicate elements from a given array. Sets are collections of unique elements, so when the elements are added to the set, the duplicate elements are automatically removed. Example: arr = [1,2,3,3,4,5,5] arr = list(set(arr)) # arr will be [1,2,3,4,5]"} {"instruction": "Create a CSS style to make all paragraphs with a bottom margin of 10px.", "input": "", "output": "p { margin-bottom: 10px; }"} {"instruction": "Generate a random integer between 4 and 8 (inclusively).", "input": "", "output": "import random x = random.randint(4, 8)"} {"instruction": "Write a python program to verify if the given DNA strand is a palindrome or not.", "input": "", "output": "def is_palindrome_dna(dna):\n # Step 1: Extract the complementary strand by replacing each nucleotide with its complement in the strand \n complement = \"\"\n for letter in dna:\n if letter == 'A':\n complement += 'T'\n elif letter == 'C':\n complement += 'G'\n elif letter == 'G':\n complement += 'C'\n elif letter == 'T':\n complement += 'A'\n else:\n print(\"Invalid nucleotide detected\")\n \n # Step 2: Reverse the strand and compare it to its complementary strand\n reverse = complement[::-1]\n return reverse == dna\n\nprint(is_palindrome_dna(\"ATGCTATCG\")) # prints True"} {"text": "[HI Wikipedia] नगाँव\n\nनगाँव (Nagaon) भारत के असम राज्य के नगाँव ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। नगाँव गुवाहाटी से 120 किमी पूर्व में कोलोंग नदी के किनारे बसा हुआ है, और असम का पाँचवा सबसे बड़ा नगर है। विवरण नगांव कृषि व्यापार केंद्र है और यहाँ गुवाहाटी विश्वविद्यालय से संबद्ध कई होमोयोपैथिक चिकित्सा महाविद्यालय स्थित हैं। नगांव से पांच किमी दक्षिण-पश्चिम में संचोआ में एक रेल जंक्शन हैं। नगांव के आसपास का क्षेत्र ब्रह्मपुत्र नदी घाटी का एक हिस्सा है और इसमें कई दलदल और झीलें हैं, जिनमें से कई मत्स्यपालन की दृष्टि से महत्त्वपूर्ण हैं। इसके इर्द-गिर्द के जंगल सागौन व साल की इमारती लकड़ियां और लाख उपलब्ध कराते हैं कृषि उत्पादों में चावल, जूट, चाय और रेशम शामिल हैं। नगाँव जिला इसके उत्तर में दरें, पूर्व एवं दक्षिण में संयुक्त मिकिर उत्तरी कछार पहाड़ियाँ, पश्चिम तथ उत्तर-पश्चिम में क्रमश: उत्तरी कछार और जयंतिया पहाड़ियाँ एव दरं जिले हैं। यह जिला पहाड़ी है। इसके किनारे की ढालें खड़ी तथा जंगलों से युक्त हैं। यहाँ की प्रमुख नदी ब्रह्मपुत्र है जो उत्तरी सीमा पर बहती है। इसके अतिरिक्त अन्य कई छोटी नदियाँ भी यहाँ बहती हैं। ब्रह्मपुत्र के उत्तर में हिमखंडित हिमालय दिखलाई पड़ता है। ब्रह्मपुत्र नदी के किनारे १,५०० फुट ऊँची कामाख्या पहाड़ी है जिसकी चोटी पर कामाख्या देवी का प्रसिद्ध मंदिर है। जिले का मैदानी भाग जलोढ मिट्टी से बना है। जंगलों में अनेक जानवर पाए जाते हैं। नवंबर से लेकर मध्य मार्च तक का जलवायु ठंडा तथा आनंदायक रहता है। वर्ष के शेष भाग में जलवायु गरम रहता है। गरम से गरम दिन का ताप ३८डिग्री सेल्सियस तक पहुँच जाता है, किंतु वायु में नमी की मात्रा अधिक रहती है। वर्षा का वार्षिक औसत ७० इंच से ८० इंच तक रहता है। धान मुख्य उपज है। इसके अतिरिक्त चाय, गन्ना, तिल, कपास की भी खेती होती है। यहाँ थोड़ी मात्रा में कच्चा लोहा, चूने का पत्थर तथा कोयले का भी खनन होता है। चाय उद्योग के अतिरिक्त यहाँ अन्य कोई उन्नतिशील उद्योग नहीं है, केवल कुछ घरेलू उद्योग धंधे हैं, जिनमें सूती एवं रेशमी कपड़े बुनना, आभूषणों के काम, चटाइयाँ तथा टोकरियाँ बनाना, पीतल के बरतन बनाना आदि मुख्य हैं। यहाँ एक प्रकार की पत्तियों से टोप बनाए जाते हैं। चाय, तिलहन, कपास, लाख, बाँस की चटाइयाँ इत्यादि यहाँ से बाहर जाती हैं तथा चावल, चना एवं अन्य अनाज, चीनी, नमक तथा मिट्टी का एवं अन्य तेल, घी आदि बाहर से यहाँ आते हैं। यातायात के साधन अच्छे हैं। यहाँ के मुख्य नगर नगांव, लामडिं, होजय और ढिंग हैं। नगाँव नगर नगाँव जिले में इसी नाम का कोलोंग नदी के बाएँ किनारे पर स्थित नगर है। सन् १८९७ में इस नगर को भूचाल से बहुत हानि उठानी पड़ी, मकान नष्ट हो गए तथा दलदलों का तल ऊपर उठ जाने से चारों तरफ पानी फैल गया था। यहाँ के प्राकृतिक दृश्य अच्छे हैं, किंतु गरमी के कारण जलवायु अस्वास्थ्यप्रद है। यहाँ का अधिकांश व्यापार मारवाड़ी लोगों के हाथ में है। यहाँ से सरसों, कपास, लाख आदि बाहर भेजे जाते हैं तथा नमक, तेल, सूती कपड़े, अनाज आदि बाहर से मँगाए जाते हैं। यहाँ शिक्षा का प्रबंध भी है। इन्हें भी देखें कोलोंग नदी नगाँव ज़िला सन्दर्भ नगाँव ज़िला असम के नगर नगाँव ज़िले के नगर"} {"instruction": "Write a React component to render a table with 4 columns and 5 rows.", "input": "", "output": "class MyTable extends Component { render() { return (
      1 2 3 4
      1 2 3 4
      1 2 3 4
      1 2 3 4
      1 2 3 4
      ); } }"} {"instruction": "Generate a Python algorithm to multiply two number.", "input": "x = 8\ny = 3", "output": "def mul_numbers(x, y):\n return x*y"} {"instruction": "Implement a Python function to calculate the sum of all prime numbers between two given numbers, inclusive.", "input": "2 5", "output": "def prime_sum(start,end):\n total = 0 \n for num in range(start, end + 1):\n if num > 1:\n for i in range(2, num):\n if (num % i) == 0:\n break \n else: \n total += num\n return total\n\nif __name__ == \"__main__\":\n lower_limit = int(input('Input lower limit: '))\n upper_limit = int(input('Input upper limit: '))\n print(prime_sum(lower_limit, upper_limit))"} {"instruction": "Given the following code in C, modify it to increment `num` by 1.", "input": "int num = 0;", "output": "int num = 0; num++;"} {"text": "[CS Wikipedia] Musée Cognacq-Jay\n\nMusée Cognacq-Jay je městské muzeum v Paříži. Nachází se v historické čtvrti Marais ve 3. obvodu v ulici Rue Elzévir v městském paláci Hôtel de Donon. Muzeum vystavuje sbírku evropského umění 18. století, kterou vytvořili a městu odkázali obchodník Ernest Cognacq a jeho manželka Marie-Louise Jaÿ. Historie Dne 21. února 1928 se po smrti Ernesta Cognacqa, zakladatele obchodního domu La Samaritaine město Paříž stalo majitelem sbírky umění 18. století a budovy na Boulevardu des Capucines č. 25, která byla určena k umístění sbírky. Muzeum otevřel 4. června 1929 francouzský prezident Gaston Doumergue. Dne 27. června 1988 bylo muzeum uzavřeno a své sbírky přesunulo do paláce Hôtel de Donon, který byl pro tuto příležitost restaurován. Muzeum bylo v novém sídle opět otevřeno pro veřejnost 18. prosince 1990. Sbírky Sbírku evropského umění 18. století shromažďovali společně Ernest Cognacq (1839-1928) a jeho manželka Marie-Louise Jaÿ (1838-1925) v letech 1895-1925 a poté ji odkázali městu Paříži. Místnosti v přízemí jsou zdobeny dřevěným obložením. Muzeum uchovává díla malířů jako Nicolas de Largillière, Jean-Baptiste Siméon Chardin, Rembrandt (Balaam et son ânesse, 1626), Jacob van Ruisdael, Canaletto, Giovanni Battista Tiepolo (Le banquet de Cléopâtre, kolem 1742-1743), Élisabeth Vigée-Lebrun, Jean-Baptiste Greuze, François Boucher, Maurice Quentin de La Tour, Antoine Watteau nebo Jean-Honoré Fragonard. Dále jsou vystaveny díla sochařů Houdona a Clodiona. Každý sál je vybaven dobovým nábytkem a předměty. Ve vitrinách jsou vystaveny míšeňský porcelán, tabatěrky nebo toaletní předměty. Odkazy Reference Externí odkazy Cognacq-Jay Muzea založená roku 1929 3. obvod (Paříž) Le Marais Cognaqu"} {"instruction": "Parse the sentence and find the sentence structure.", "input": "Sentence: I arrived at the destination late in the evening.", "output": "Subject: I Verb: arrived Prepositional phrase: at the destination Adverb clause: late in the evening Sentence structure: (S (NP I) (VP arrived) (PP at the destination) (AdvCl late in the evening))"} {"instruction": "Create a Python program to find the sum of the Fibonacci sequence.", "input": "", "output": "def fibonacci_sum(n): \n if n <= 1: \n return n \n previous = 0\n current = 1\n sum = 1\n \n for _ in range(n - 1): \n previous, current = current, previous + current \n sum += current \n \n return sum"} {"text": "[HI Wikipedia] २०१३ शाहबाग विरोध\n\n२०१३ के बांग्लादेश के शहबाघ जन आन्दोलन की शुरुवात ५ फ़रवरी २०१३ को ढाका, बांग्लादेश में हुई, जिसमे अब्दुल कादिर मोल्लाह और अतिरिक्त सभी बांग्लादेशी मुक्ति संग्राम के आरोपित युद्ध अपराधियों के लिए मौत की सज़ा की मांग करी गयी, | ५ फ़रवरी २०१३ को बांग्लादेश अंतर्राष्ट्रीय अपराध न्यायलय ने मोल्लाह को आजीवन कारावास की सज़ा सुनाई क्यूंकि वह मुक्ति संग्राम के दौरान नरसंघार, हत्या और बलात्कार (नाबालिक लड़कियों के बलात्कार का भी) का दोषी पाया गया। Reference राजनैतिक आन्दोलन"} {"instruction": "Given the following code snippet, write the code to achieve the expected output", "input": "def convert_to_title_case(input): # Expected Output: # input = \"this is a Title\" # Output = This Is A Title", "output": "def convert_to_title_case(input): words = input.split(' ') output = [] for word in words: output.append(word.capitalize()) return ' '.join(output) # Expected Output: input = \"this is a title\" # Output = This Is A Title print(convert_to_title_case(input))"} {"instruction": "Fix the bug in the following Python program.", "input": "def calculateArea(width, height):\n return width * height\n\nlength = 8\nbreadth = 10\narea = calculateArea(length)\nprint(\"Area of the rectangle:\", area)", "output": "def calculateArea(width, height):\n return width * height\n\nlength = 8\nbreadth = 10\narea = calculateArea(length, breadth)\nprint(\"Area of the rectangle:\", area)"} {"text": "[CS Wikipedia] Karel Mareš\n\nKarel Mareš může být: Karel Mareš (starosta) (1872–1952), sociálnědemokratický politik a starosta Olomouce Karel Mareš (vojenský letec) (1898–1960), brigádní generál a první velitel 311. československé bombardovací perutě RAF Karel Mareš (skladatel) (1927–2011), hudební skladatel, scenárista, režisér a divadelní organizátor Karel Mareš (historik) (* 1947), historik a pedagog, čestný občan města Louny"} {"instruction": "Write a JavaScript statement to create a new object, Person, with the fields \"name\", \"age\" and \"city\".", "input": "", "output": "let Person = { name: '', age: 0, city: '' };"} {"instruction": "Write a class definition in python that will initialize an object of the class with given parameters", "input": "name, age", "output": "class Person:\n def __init__(self, name, age):\n self.name = name\n self.age = age"} {"text": "[HI Wikipedia] कड़ाही चिकन\n\nकड़ाही चिकन एक उत्तर भारतीय मांसाहारी व्यंजन हैं। यह आमतौर पर चिकन से बनाया जाता है। केवल एक ही बर्तन इस पकवान पकाने के लिए पर्याप्त है और यह एक कड़ाही है। सन्दर्भ रसोई भारतीय खाना खान पान"} {"instruction": "Design a visualization using Dash in Python that displays hospitality data. This visualization should include an interactive 3D line chart that shows the trend in data input by the user.", "input": "Not applicable", "output": "import dash\nimport dash_cytoscape as cyto\nimport plotly.graph_objects as go\n\napp = dash.Dash(__name__)\n\n# create 3D line chart using Plotly\nx_values = [0,0.2,0.4,0.6,0.8,1] # just example values\ny_values = [0,0.5,1,2,1.5,3] # just example values\nz_values = [0,1,2,3,4,4] # just example values\n\ntrace1 = go.Scatter3d(x = x_values,\n y = y_values,\n z = z_values,\n mode = 'lines',\n line = dict(\n color = 'red',\n width = 5\n )\n)\n\nlayout= go.Layout(scene=dict(aspectmode='cube'))\n\n# create Dash Cytoscape component\ncyto_comp = cyto.Cytoscape(\n id='dash-cyto',\n elements=[],\n stylesheet=[],\n layout={'name': 'preset'}\n)\n\n# display elements\napp.layout = dash.Div([\n dash.Div([\n trace1\n ], style={'width': '50%'}),\n cyto_comp\n ])\n\nif __name__ == '__main__':\n app.run_server(debug=True)"} {"instruction": "Write a JavaScript program that will console log the first 10 numbers of the Fibonacci sequence.", "input": "", "output": "let x = 0; let y = 1; for (let i = 0; i < 10; i++) { let z = x + y; console.log(z); x = y; y = z; }"} {"instruction": "Write an SQL query to return the most frequently used keyword from the table.", "input": "Table Name: \"Keywords\" Column Name: \"keyword\"", "output": "SELECT keyword, COUNT(*) as occurrence FROM Keywords GROUP BY keyword ORDER BY occurrence DESC LIMIT 1;"} {"text": "[EN Wikipedia] KHGN\n\nKHGN may refer to: KHGN (FM), a radio station (106.7 FM) licensed to serve Hugoton, Kansas, United States KVSR, a radio station (90.7 FM) licensed to serve Kirksville, Missouri, United States, which held the call sign KHGN from 1996 to 2010"} {"text": "[CS Wikipedia] Francouzská nová vlna\n\nFrancouzská nová vlna (francouzsky La Nouvelle Vague) byl termín, kterým kritici označovali skupinu formálně progresivních francouzských filmových režisérů, tvořících v pozdních 50. a v 60. letech minulého století. Byli ovlivněni italským neorealismem, klasickým hollywoodským filmem, stejně jako francouzským poetickým realismem. Přestože nikdy nebyli formálně organizovaným hnutím, měli společnou tendenci jejich tvorby, totiž odmítání tradičních filmových forem. Mnozí z nich svým dílem přispívali k sociálním a politickým změnám doby, jejich radikální experimenty se střihem, vizuálním stylem nebo narativem byly tedy součástí všeobecné změny konzervativního paradigmatu ve společnosti, nejen v oblasti kinematografie. Prominentní členové skupiny, mezi něž patřili François Truffaut, Jean-Luc Godard, Éric Rohmer, Claude Chabrol a Jacques Rivette, začínali jako kritici pro filmový časopis Cahiers du cinéma. Spoluzakladatel Cahiers du cinema a filmový teoretik André Bazin, společně se zakladatelem a kurátorem Cinémathèque française Henri Langloisem, byli otcovskými figurami a hlavním zdrojem inspirace pro celé hnutí Nové vlny. Původ hnutí Socioekonomická situace krátce po druhé světové válce silně ovlivnila hnutí. Politicky a finančně vyčerpaná Francie tíhla k tomu, ustoupit od staré předválečné populární tradice. Jedna takováto tradice byla striktně narativní film. Hnutí tedy mělo svůj základ v rebelii proti tradičnímu filmovému syžetu a stylu, kritizovalo konkrétně to, že tyto filmy byly zcela podřízeny dějové linii. Mladí kritici byli obzvláště proti tzv. „filmu kvality“, seriózních filmových děl, často literárních adaptací, jež se úspěšně promítaly na francouzských filmových festivalech a těšily se přízni oficiální filmové kritiky. Naproti tomu kritici a následní režiséři Nové vlny obdivovali práci západních filmařů. Charles Chaplin, Alfred Hitchcock, Orson Welles, Howard Hawks, John Ford a mnozí další výjimeční režiséři byli oslavováni, zatímco ostatní studioví režiséři, řemeslní rutinéři, kteří natáčeli „neinvenční“ standardní hollywoodské filmy, které byly svázány tradičním narativem, byli naopak silně kritizováni, protože ve svém díle postrádali autorský podpis. V roce 1948 uveřejnil filmový kritik Alexandre Astruc manifest, který předznamenával některé myšlenky, které později rozšířil Francois Truffaut a další kritici z Cahiers du cinéma. V tomto manifestu Astruc použil termín „kamera-pero“ pro označení myšlenky, že by režisér měl používat kameru, jako spisovatel používá pero a neměl by být svázán konvencemi tradičního vyprávění. Tento manifest tedy předznamenal auteurskou teorii, kterou ve filmové kritice rozšířili budoucí představitelé Francouzské nové vlny. Auteurská teorie tvrdila, že někteří režiséři jsou „auteuři“, tedy absolutní autoři, v…"} {"instruction": "Improve the following code by implementing a more efficient algorithm.", "input": "def FunctionA(arr): output = [] for elem in arr: if elem > 0 and not elem in output: output.append(elem) return output", "output": "def FunctionA(arr): output = set() for elem in arr: if elem > 0: output.add(elem) return list(output)"} {"instruction": "Develop an algorithm in Python for parsing a given text and counting the number of occurrences of a given word.", "input": "This is an example text.", "output": "def parse_text(text, word):\n word_count = 0\n words = text.split()\n for w in words:\n if w == word:\n word_count += 1\n return word_count\n \ntext = 'This is an example text.'\nword = 'example'\nword_count = parse_text(text, word)\nprint('The word \"{}\" appears {} times in the text.'.format(word, word_count))"} {"instruction": "Using an object-oriented programming language, create a class that has two methods - one to calculate the area of a circle and another to calculate the circumference.", "input": "", "output": "class Circle(): def __init__(self, radius): self.radius = radius def area(self): return self.radius ** 2 * 3.14 def circumference(self): return 2 * self.radius * 3.14"} {"instruction": "Edit the code below to sort the list of integers given in the input.", "input": "list_in = [40, 32, 12, 19]", "output": "list_in = [40, 32, 12, 19] list_in.sort() print(list_in) #output: [12, 19, 32, 40]"} {"instruction": "Convert the following JSON string into a Python dictionary.", "input": "{\"a\":1, \"b\": \"Hello\", \"c\": {\"d\": [34, 56]}}", "output": "import json\n\njson_string = '{\"a\":1, \"b\": \"Hello\", \"c\": {\"d\": [34, 56]}}'\nparsed_json = json.loads(json_string)\n\nprint(parsed_json) # Output: {'a': 1, 'b': 'Hello', 'c': {'d': [34, 56]}}"} {"instruction": "Write a python program to detect palindromes in a given list of strings", "input": "['malayalam', 'rotator', 'civic']", "output": "def is_palindrome(word):\n # reverse word\n reverse_word = word[::-1]\n # Compare reverse word and original word\n if reverse_word == word:\n return True\n else:\n return False\n\n# main\nwords = ['malayalam', 'rotator', 'civic']\n\nfor word in words:\n if is_palindrome(word):\n print(f'{word} is a palindrome.')\n else:\n print(f'{word} is not a palindrome.')"} {"instruction": "Write a function to perform buble sort.", "input": "", "output": "public void bubbleSort(int[] array) { int n = array.length; for (int i = 0; i < n-1; i++) { for (int j = 0; j < n-i-1; j++) { if (array[j] > array[j+1]) { int temp = array[j]; array[j] = array[j+1]; array[j+1] = temp; } } } }"} {"instruction": "Please write an SQL query to find the records that have a value higher than the average of all values.", "input": "", "output": "SELECT * FROM table_name WHERE value > (SELECT AVG(value) FROM table_name);"} {"text": "[EN Wikipedia] Çardaklı, Hani\n\nÇardaklı () is a neighbourhood in the municipality and district of Hani, Diyarbakır Province in Turkey. It is populated by Kurds and had a population of 1,706 in 2022. References Neighbourhoods in Hani District Kurdish settlements in Diyarbakır Province"} {"instruction": "Create a command to delete a folder with all its contents.", "input": "/root/folder", "output": "import os def remove_folder(folder): for filename in os.listdir(folder): file_path = os.path.join(folder, filename) try: if os.path.isfile(file_path) or os.path.islink(file_path): os.unlink(file_path) elif os.path.isdir(file_path): shutil.rmtree(file_path) except Exception as e: print('Failed to delete %s. Reason: %s' % (file_path, e)) remove_folder('/root/folder')"} {"instruction": "Create a method that returns all elements in an array that are larger than the given value x.", "input": "[2, 3, 5, 7, 11, 13] and x = 4", "output": "def elements_greater_than_x(arr, x): result = [] for el in arr: if el > x: result.append(el) return result"} {"instruction": "Design a python function to tokenise a given sentence into basic components like words and punctuations.", "input": "", "output": "# Importing the essential library \nimport nltk\n \n# Defining a function to tokenize a sentence\ndef tokenize(text):\n tokens = nltk.word_tokenize(text)\n tok_words = [tok for tok in tokens if tok.isalpha()]\n tok_punct = [tok for tok in tokens if not tok.isalpha()]\n return tok_words, tok_punct\n \nif __name__ == '__main__':\n text = \"This is a sample sentence.\"\n words, puncts = tokenize(text)\n print(\"Words:\", words)\n print(\"Punctuations:\", puncts)"} {"instruction": "Create a neural network in Python to recognize the handwritten digits from 0 to 9.", "input": "", "output": "\"\"\"\nCreate a neural network in Python to recognize the handwritten digits from 0 to 9.\n\"\"\"\n\nimport tensorflow as tf\nimport numpy as np\nfrom tensorflow import keras\n\n# load the MNIST dataset\nmnist = keras.datasets.mnist\n(x_train, y_train), (x_test, y_test) = mnist.load_data()\n\n# normalize the data\nx_train, x_test = x_train/255.0, x_test/255.0\n\n# build the model\nmodel = keras.Sequential([\n keras.layers.Flatten(input_shape=(28, 28)),\n keras.layers.Dense(256, activation='relu'),\n keras.layers.Dense(10, activation='softmax')\n])\n\n# compile and fit the model\nmodel.compile(optimizer='adam', \n loss='sparse_categorical_crossentropy',\n metrics=['accuracy'])\nmodel.fit(x_train, y_train, epochs=10)\n\n# evaluate the model\ntest_loss, test_acc = model.evaluate(x_test, y_test)\nprint(\"Test accuracy: \", test_acc)"} {"text": "[EN Wikipedia] Klobučar\n\nKlobučar is a Croatian and Slovenian surname (from klobučar, \"hatter\") and toponym, which may refer to: People with the surname Anđelko Klobučar (1931–2016), Croatian composer, organist and professor Berislav Klobučar (1924–2014), Croatian opera conductor Jaka Klobučar (born 1987), Slovenian professional basketball player Jan Klobučar (born 1992), Slovenian volleyball player Mira Klobučar (1888–1956), Croatian painter Geography Klobučar (island), uninhabited island in Croatia See also Klobuchar (surname) Surnames of Croatian origin Slovene-language surnames"} {"text": "[EN Wikipedia] O'Dayne Richards\n\nO'Dayne Valentin Richards (born 14 December 1988 in St. Andrew) is a Jamaican athlete competing in the shot put and discus throw. He studied at the University of Technology, Jamaica. Achievements Personal bests Outdoor Shot Put – 21.96 (Rabat 2017) Discus Throw – 58.31 (Kingston 2012) Indoor Shot Put – 19.93 (Birmingham 2018) References External links 1986 births Living people Athletes (track and field) at the 2015 Pan American Games Jamaican male shot putters Athletes (track and field) at the 2014 Commonwealth Games Athletes (track and field) at the 2018 Commonwealth Games People from Saint Andrew Parish, Jamaica World Athletics Championships athletes for Jamaica World Athletics Championships medalists Athletes (track and field) at the 2016 Summer Olympics Olympic athletes for Jamaica Commonwealth Games gold medallists for Jamaica Pan American Games gold medalists for Jamaica Commonwealth Games medallists in athletics Pan American Games medalists in athletics (track and field) Universiade medalists in athletics (track and field) Competitors at the 2018 Central American and Caribbean Games Central American and Caribbean Games gold medalists for Jamaica FISU World University Games gold medalists for Jamaica Jamaican Athletics Championships winners Central American and Caribbean Games medalists in athletics Medalists at the 2011 Summer Universiade Medalists at the 2015 Pan American Games 20th-century Jamaican people 21st-century Jamaican people Medallists at the 2014 Commonwealth Games"} {"instruction": "Create a PHP script to iterate through a list of numbers and determine if any of the numbers are divisible by 5.", "input": "my_list = [18, 22, 10, 27]", "output": " 0:\n\t\trem = num % 10 \n\t\tsum_of_the_power_of_digits = sum_of_the_power_of_digits + np.power(rem, length)\n\t\tnum //= 10\n\t\t\n\tif (sum_of_the_power_of_digits == number) : \n\t\treturn True \n\telse : \n\t\treturn False"} {"instruction": "Create a method in Python to sum up all the elements of a given list.", "input": "", "output": "# sum_list function takes in a list and \n# returns the sum of the elements of the list\ndef sum_list(input_list):\n # Set sum to 0\n sum = 0\n \n # Iterate through the list and \n # add each element to the sum\n for element in input_list:\n sum = sum + element\n \n # Return the sum\n return sum"} {"instruction": "Create a random forest regressor in Python to predict house prices from square footage, number of bedrooms, and neighborhood.", "input": "Not applicable", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import RandomForestRegressor\n\n# get data\ndf = pd.read_csv('house_prices.csv')\n\n# split the dataset into input and target variables\nX = df[['square_footage', 'bedrooms', 'neighborhood']]\ny = df['price']\n\n# one-hot encode categorical variables\nX = pd.get_dummies(X)\n\n# split the dataset into train and test sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\n\n# create the regressor\nrf = RandomForestRegressor()\n\n# fit the model\nrf.fit(X_train, y_train)\n\n# make predictions\ny_pred = rf.predict(X_test)"} {"text": "[CS Wikipedia] Jindřich III. Kastilský\n\nJindřich III. Kastilský zvaný el Doliente (churavý) (4. října 1379, Burgos – 25. prosince 1406, Toledo) byl kastilský král v letech 1390–1406. Biografie Původ, mládí Narodil se jako prvorozený ze dvou synů kastilského krále Jana I. a jeho první manželky Eleonory Aragonské, dcery aragonského krále Petra IV.; byl tak synovcem současného aragonského krále Ferdinanda I. V dětství byli jeho vychovateli biskup Diego de Anaya Maldonado, později arcibiskup sevillský, Álvaro de Isorna, později arcibiskup v Santiagu de Compostela, a Juan Hurtado de Mendoza, zpovědníkem pak dominikán Alonso de Cusanza, pozdější biskup Salamanky a Leónu. Manželství Krátce po narození byl zaslíben dědičce portugalského trůnu infantce Beatrix na potvrzení mírové smlouvy, kterou Kastilie a Portugalsko uzavřely za příměří v tzv. ferdinandských válkách; k tomuto manželství však nakonec nedošlo, neboť když Jindřichův otec Jan I. Kastilský v roce 1382 ovdověl, oženil se 17. května roku 1383 s tehdy jedenáctiletou Beatrix sám. Král Ferdinand krátce nato 22. října téhož roku zemřel a dívka byla podle výše uvedené smlouvy mezi Portugalskem a Kastilií prohlášena portugalskou následnicí trůnu a královnou pod regentstvím své matky Eleonory. Infanta Jindřicha oženili na stvrzení smlouvy z Bayonne v jeho devíti letech v roce 1388 s Kateřinou z Lancasteru, dcerou Jana z Gentu, vévody z Lancasteru, a Konstancie Kastilské, dědičky a následnice kastilského krále Petra I. Krutého. Sňatkem, který se uskutečnil v katedrále v Palencii, byl zažehnán dynastický konflikt, který vznikl po smrti Petra I., neboť v osobách Jindřicha a Kateřiny byly spojeny dvě nástupnické větve kastilského krále Alfonse XI. a do budoucna eliminovány jejich střety stran nároků na kastilský trůn. Toto spojení upevnilo na kastilském trůně dynastii Trastámara a nastolilo mír mezi Anglickým královstvím a Kastilií. Kníže z Asturie Souběžně byl Jindřichovi se svolením kortesů z Briviesky udělen titul kníže z Asturie. Jindřich byl prvním nositelem tohoto titulu, do té doby se prvorození kastilských králů nazývali infantes mayores (nejstarší n. přední infanti). V roce 1390 král Jan I. Kastilský zvažoval možnost abdikovat v Jindřichův prospěch, aby získal uznání Portugalska, kde usiloval uplatnit nároky své druhé manželky Beatrix Portugalské, královská rada ho však od toho odradila, majíc na paměti neblahé dopady podobných předchozích rozhodnutí; v říjnu tohoto roku pak král Jan I. v Alcalá po pádu s koně zemřel a infant Jindřich byl prohlášen králem. Král Královskou moc však převzal fakticky až o tři roky později, 2. srpna 1393, ve věku 13 let. Během svého panování pacifikoval šlechtu a obnovil královskou moc, opíraje se o drobnou šlechtu a odsunuv své nejmocnější příbuzné (jako např. Alfonsa Enríqueze a Eleonor z Trastámary).…"} {"instruction": "Generate a program written in Python that takes in two numbers from the user and prints out the greatest common divisor of the two.", "input": "Not applicable", "output": "def GCD(a, b): \n \n # base case \n if (a == 0): \n return b \n \n if (b == 0): \n return a \n \n # a is greater \n if (a > b): \n return GCD(a % b, b)\n else: \n return GCD(a, b % a) \n \n# Driver Program \na = 98\nb = 56\nif(GCD(a, b)): \n print('GCD of', a, 'and', b, 'is', GCD(a, b)) \nelse: \n print('not found')"} {"instruction": "Suggest a command to check for any available updates for a package called 'foo' using the package manager 'apt'?", "input": "", "output": "sudo apt-get update foo"} {"instruction": "Generate a list with the numbers from 1 to 10 using Python.", "input": "", "output": "# Generate a list with the numbers from 1 to 10 listA = [] for i in range(1,11): listA.append(i) print(listA)"} {"instruction": "Write a Java Program to print the Fibonacci numbers for a given range.", "input": "", "output": "public class Fibonacci { public static void main(String[] args) { int range = 10; int i = 0; int fibo = 0; int fibo1 = 1; int fibo2 = 1; while(i <= range) { System.out.print(fibo + \" \"); fibo = fibo1 + fibo2; fibo1 = fibo2; fibo2 = fibo; i++; } } }"} {"instruction": "Subtract the given list of numbers using JavaScript.", "input": "List: [8, 3, 6]", "output": "-9"} {"text": "[CS Wikipedia] Zemské volby v Čechách 1901\n\nZemské volby v Čechách 1901 byly volby konané v Českém království od 8. do 15. října 1901 (užší volby, tj. druhá kola volebních klání v některých obvodech, se konaly ještě 16. a 17. října), kterými byli zvoleni poslanci Českého zemského sněmu coby zákonodárného sboru zemské samosprávy v rámci rakousko-uherského, respektive předlitavského ústavního systému. Probíhaly podle kuriového systému. Dobové souvislosti V roce 1901 nadále dominovala české politice mladočeská strana, ale její pozice ve společnosti již nebyla tak jednoznačná jako v první polovině 90. let, kdy ve volbách do Říšské rady roku 1891 a zemských volbách roku 1895 rozdrtila pozice staročeské strany a sjednotila velkou část městských, maloměstských i venkovských elit pod radikálně opozičním programem obhajoby českých národních zájmů. Mladočeši se od poloviny 90. let vydali pod vedením Josefa Kaizla prostřednictvím takzvané etapové politiky směrem k realističtějšímu a pragmatičtějšímu postoji. V celostátních volbách do Říšské rady roku 1897 zaznamenali výrazný úspěch a díky početní síle jejich klubu se stali významnou silou, o jejíž podporu se ucházela vláda Kazimíra Badeniho. Mladočeši pak roku 1897 skutečně přešli do provládního tábora. Klíčovým ústupkem vlády měla být Badeniho jazyková nařízení, která výrazně zvyšovala oficiální status češtiny, ale která nebyla pro německou opozici uvedena v platnost a vedla nakonec k pádu Badeniho kabinetu. V následujících letech se mladočeši dále pokoušeli o provládní politiku, Kaizl se dokonce stal ministrem financí ve vládě Franze Thuna, ale ani toto přímé vládní angažmá neuspokojilo české jazykové, autonomistické a státoprávní požadavky. Na celostátní politické scéně zároveň takzvaná Badeniho volební reforma zavedla všeobecné volební právo (byť nadále bez rovnosti hlasů a se zachováním kuriálního systému). Díky dramatickému nárůstu počtu oprávněných voličů se otevřel prostor pro nové politické subjekty. Poprvé se do Říšské rady jako relevantní síla dostali čeští sociální demokraté, jako nezávislá politická síla se ustavili čeští agrárníci, politický katolicismus nebo národní sociálové. V době vyostřeného česko-německého konfliktu v českých zemích přestávali zároveň být provládní mladočeši výlučnými nositeli opozičního a nacionálního radikalismu a tuto roli přejaly radikální státoprávní formace. Samostatně se také vyhranila skupina realistů okolo Tomáše Masaryka. Po Kaizlově demisi roku 1899 mladočeši zaujali opět opoziční stanovisko a periodicky se vraceli k ostré obstrukční politice. Předlitavský parlament ve Vídni zažíval opakované slovní i fyzické potyčky. Roku 1900 nastoupila vláda Ernesta von Koerbera, která se pokoušela překlenout národnostní rozpory programem ekonomické modernizace, ale česko-německý konflikt pokračoval. Výsledky voleb…"} {"text": "[EN Wikipedia] Chinese cruiser Hai Yung\n\nHai Yung () was a protected cruiser of the Imperial Chinese Navy. Hai Yung was one of a class of three ships built in Germany for the Chinese after the losses of the First Sino-Japanese War. The ship was a small protected cruiser with quick-firing guns, a departure from the prewar Chinese navy's emphasis on heavy but slow-firing weapons for its cruisers. Hai Yung resembled the British protected cruisers of the and Italian , and may have been modeled on the similar Dutch cruisers. Germany itself would increase the number of similar ships for its own navy starting with the and its faster successors up until World War I. In 1906 Hai Yung was sent on a six-month journey to survey the conditions of overseas Chinese communities in South-East Asia. Much of the navy switched loyalties to the rebellion that overthrew the Manchu dynasty in 1911.. On 24 April 1916, Hai Yung collided with the Chinese Army transport ship in the East China Sea south of the Chusan Islands. Hsin-Yu sank with the loss of about 1,000 lives. Hai Yung and her sister ships survived the revolution and were obsolete by 1935, when they were discarded. They all were scuttled as blockships in the Yangtze on 11 August 1937 during the Second Sino-Japanese War. References Bibliography Wright, R., The Chinese Steam Navy, 1862–1945 (London, 2001) Ships built in Stettin Naval ships of China 1897 ships Cruisers of the Beiyang Fleet Second Sino-Japanese War cruisers of China Maritime incidents in 1916 Maritime incidents in 1937 Cruisers of Imperial China"} {"instruction": "Write a Python program to detect and remove the duplicates in a list.", "input": "The list is [1, 20, 4, 6, 20, 4, 1, 6].", "output": "def remove_duplicates(lst): \n return list(dict.fromkeys(lst)) \n \nlst = [1, 20, 4, 6, 20, 4, 1, 6] \nprint(remove_duplicates(lst))"} {"text": "[CS Wikipedia] Trans žena\n\nTrans žena (též MtF, jakožto zkratka z anglického Male to Female, nebo česky chybně transžena) je osoba, která byla při narození označena za muže (protože se narodila s mužskými pohlavními orgány), ale která sama sebe identifikuje jako ženu. Trans ženy mohou pociťovat genderovou dysforii (genderový nesoulad) a toužit proto po tranzici. Tento proces může mít formu úřední (změna občanského průkazu), sociální (změna používaného jména, oblečení, účesu či zájmen, aby více odpovídaly genderovým rolím) nebo lékařskou (hormonální terapie, operativní změna pohlaví). Genderová identita není spjata se sexuální orientací a transgender ženy tak mohou být homo-, hetero-, bi- nebo i asexuální. Trans ženy v průměru čelí větší míře diskriminace než ostatní ženy. Kromě misogynie se totiž potýkají i s transfobií, v této souvislosti je někdy užíván pojem transmisogynie. Známé trans ženy Anna Grodzká, historicky první trans žena zvolená do polského parlamentu April Ashley, modelka Ataru Nakamura, J-pop zpěvačka Caitlyn Jennerová, olympijská vítězka a televizní osobnost Danica Roemová, americká novinářka a politička Deirdre McCloskey, americká ekonomka Jan Morris, britská spisovatelka Jayne County, americká rocková zpěvačka Kim Petras, německá zpěvačka Laverne Cox, americká zpěvačka Lili Elbe, původně úspěšná dánská malířka; patří mezi první doložené osoby, které podstoupily operativní změnu pohlaví Mina Caputo, americká zpěvačka Munroe Bergdorf, britská modelka a aktivistka R. W. Connell, australská socioložka Sylvia Rivera, americká LGBTQ aktivistka Tereza Spencerová, česká novinářka sestry Wachowské, americké filmařky a režisérky Odkazy Poznámky Reference Související články shemale kathoey hidžra transgender trans muž Externí odkazy Transsexualita LGBT Žena"} {"instruction": "Implement a code to print the indices of all occurrences of a number x in an array arr.", "input": "x = 5 arr = [1, 5, 2, 8, 5, 10]", "output": "def print_indices(x, arr): indices = [] for i in range(len(arr)): if arr[i] == x: indices.append(i) return indices print(print_indices(x, arr)) # [1, 4]"} {"instruction": "Explain how you would use the givew array to create a valid JSON output.", "input": "array = [ \"firstname\" => \"Nikola\", \"lastname\" => \"Tesla\", \"birthdate\" => \"10-07-1856\" ]", "output": "We can use the given array to create a valid JSON output by first converting it into an object by wrapping it in curly brackets and then assign keys for each value. For example, { \"firstname\": \"Nikola\", \"lastname\": \"Tesla\", \"birthdate\": \"10-07-1856\" } Once the object is created, it need to be converted to a JSON string using a JSON library such as JSON.stringify() method in JavaScript. The resulting string looks like this: \"{\\\"firstname\\\":\\\"Nikola\\\",\\\"lastname\\\":\\\"Tesla\\\",\\\"birthdate\\\":\\\"10-07-1856\\\"}\""} {"instruction": "Imagine you have an array with the following elements: [3, 7, 2, 8, 1, 4]. Sort the array so that the elements are in ascending order.", "input": "", "output": "[1, 2, 3, 4, 7, 8]"} {"instruction": "Create a Python program that compares two given lists to check if they have any common element.", "input": "list1 = [1,2,3] list2 = [4,5,6]", "output": "def compare_lists(list1, list2): '''This function checks if two lists have any common element''' found_common = False for x in list1: if x in list2: found_common = True break return found_common"} {"instruction": "Create a python program that categorizes a given list of numbers into odd and even numbers.", "input": "list N = [1, 2, 3, 4, 5, 6]", "output": "even = []\nodd = []\n\nfor num in N:\n if num % 2 == 0:\n even.append(num)\n else:\n odd.append(num)"} {"instruction": "Describe the result of running this code.", "input": "obj = { 'a': 1, 'b': 2, 'c': 3 } for key in obj.keys(): print(key + ': ' + obj[key])", "output": "The result of running this code is that it prints each key-value pair in the object with key and value separated by a colon and a space, e.g, 'a: 1', 'b: 2', 'c: 3'."} {"instruction": "Write a line of JavaScript code to create a variable `x` and assign the number `7` to it.", "input": "", "output": "let x = 7;"} {"instruction": "Update the code to add a class attribute \"var\" with the value \"value\".", "input": "class MyClass(): def __init__(self): pass", "output": "class MyClass(): var = \"value\" def __init__(self): pass"} {"text": "[CS Wikipedia] Marty Balin\n\nMarty Balin, rodným jménem Martyn Jerel Buchwald, (30. ledna 1942 Cincinnati, Ohio, USA – 27. září 2018) byl americký zpěvák a kytarista. V roce 1965 založil skupinu Jefferson Airplane, kde byl jedním z jejích hlavních zpěváků až do roku 1971. Mezitím, v letech 1969–1970 působil ještě ve skupině Hot Tuna a v letech 1975–1978 hrál s Jefferson Starship, kam se vrátil v roce 1993 a hrál zde až do roku 2008. V letech 1985–1987 byl spolu s několika dalšími dřívějšími členy Jefferson Airplane členem kapely KBC Band a v roce 1989 se účastnil reunionu klasické sestavy Jefferson Airplane. V roce 1973 nahrál jedno album s krátce existující skupinou Bodacious DF. Od roku 1981 vydal své první sólové album Balin, poslední nazvané The Witcher vydal o třicet let později. Zemřel roku 2018 ve věku 76 let. Odkazy Reference Externí odkazy Oficiální web Američtí zpěváci Rockoví zpěváci Členové Jefferson Airplane Členové Jefferson Starship Členové Hot Tuna Narození v Cincinnati Narození 30. ledna Narození v roce 1942 Úmrtí v roce 2018 Úmrtí 27. září Muži"} {"instruction": "Reverse the words of the sentence \"The quick brown fox jumps over the lazy dog\".", "input": "", "output": "dog lazy the over jumps fox brown quick The"} {"instruction": "Write a method in Python to calculate the sum of two numbers without using any built-in functions.", "input": "3, 5", "output": "def sum_two_numbers(a, b):\n result = 0\n\n for i in range(b):\n result += a\n\n return result\n\na = 3\nb = 5\n\nprint(sum_two_numbers(a, b))"} {"instruction": "Create a function to calculate the total cost after N discounts.", "input": "discounts = [10, 15, 20]", "output": "def calculate_total(discounts): total = 0 for discount in discounts: total -= total * (discount / 100) return total"} {"instruction": "Generate a piece of code for raising an exception in Python.", "input": "", "output": "raise Exception(\"This is an exception\")"} {"instruction": "Programmatically generate a random password of length 8 that contains at least one lowercase letter, one uppercase letter, one number, and one special character.", "input": "", "output": "import string import random def generate_password(): letters = string.ascii_letters numbers = string.digits symbols = string.punctuation chars = letters + numbers + symbols length = 8 password = \"\".join(random.sample(chars, length)) if any(char.islower() for char in password) \\ and any(char.isupper() for char in password) \\ and any(char.isdigit() for char in password) \\ and any(char in symbols for char in password): return password random_password = generate_password() print(random_password) # Output: eQ@0?St$"} {"instruction": "Create a new list where the elements are the square of the elements in the given list.", "input": "list = [1, 2, 3, 4]", "output": "new_list = [x**2 for x in list]"} {"text": "[HI Wikipedia] प्रक्षेप्य\n\nएक प्रक्षेप्य वह वस्तु कहलाती है जिसे दिक् (खाली अथवा नहीं) में किसी बल के अधीन प्रक्षेपित किया जाता है। यद्यपि समष्टि (दिक्) में किसी भी वस्तु की गति (उदाहरण के लिए क्रिकेट के खेल में क्षेत्ररक्षक द्वारा गेंद को फैंकना) को प्रक्षेप्य कहा जा सकता है, यह शब्द सामान्यतः कम मारक क्षमता वाली वस्तुओं के लिए काम में ली जाती है। प्रक्षेप्य वक्र के विश्लेषण के लिए गणितीय गति के समीकरणों का उपयोग किया जाता है। वाहक बल वाहक प्रक्षेप्य बहुत प्रक्षेप्य, उदाहरण के लिए शैल, विस्फोटक पदार्थ अथवा अन्य रासायनिक या जैविक पदार्थ ले जा सकता है। साथ ही एक प्रक्षेप्य को विस्फोटक पेलोड से विशेष क्षति के लिए भी बनाया जा सकता है जैसे : आग (प्रारंभिक थर्मल हथियार देखें), विषप्रयोग (विषेले तीर)। गतिज प्रक्षेप्य प्ररूपी प्रक्षेप्य चाल ये भी देखें प्रक्षेपिकी बारूद संघात गंभीर्य प्रक्षेप्य बिन्दु Projectile use by living systems बाण प्रक्षेपास्त्र भाला तॉरपीडो प्रक्षेप्य की परास प्रक्षेप्य का प्रक्षेप्य वक्र सन्दर्भ बाहरी कड़ियाँ Open Source Physics computer model Projectile Motion Applet Another projectile Motion Applet गोला-बारूद"} {"text": "[EN Wikipedia] Üçkardeş, Ergani\n\nÜçkardeş is a neighbourhood in the municipality and district of Ergani, Diyarbakır Province in Turkey. Its population is 180 (2022). References Neighbourhoods in Ergani District"} {"instruction": "Create a for-loop in Python for printing all numbers from 1 to 9 (inclusive).", "input": "", "output": "for x in range(1, 10): print(x)"} {"instruction": "Create a Python function that takes in a list and prints a dictionary with the elements and the product of each element.", "input": "list = [7, 8, 5]", "output": "def product_of_list(list):\n output = {}\n for element in list:\n output[element] = element * element\n return output\n\nprint(product_of_list([7, 8, 5]))"} {"instruction": "Generate a random string of length 10 using the string library of Python.", "input": "", "output": "import random\nimport string\n\ndef randomString():\n letters = string.ascii_lowercase\n length = 10\n return ''.join(random.choice(letters) for i in range(length))"} {"instruction": "Design an algorithm in Python to perform binary search.", "input": "", "output": "def binary_search(arr, target):\n start = 0\n end = len(arr) - 1\n while start <= end:\n mid = (start + end) // 2\n if arr[mid] == target:\n return mid\n elif arr[mid] > target:\n end = mid - 1\n else:\n start = mid + 1\n return -1"} {"text": "[DE Wikipedia] SegWit\n\nSegregated Witness, auch kurz SegWit, ist der Name für einen implementierten Soft Fork Change im Transaktionsformat der Kryptowährung Bitcoin. Der formale Titel „Segregated Witness (Consensus layer)“ hatte die Bitcoin Improvement Proposal Nummer BIP141. Ziel war es, die Transaktions-Verformbarkeit (englisch transaction malleability) zu lösen. Es war auch beabsichtigt, ein Problem mit der Größenbeschränkung der Blockchain abzuschwächen, das die Transaktionsgeschwindigkeit von Bitcoin verringert. Dazu wird die Transaktion in zwei Segmente aufgeteilt, die Entsperrsignatur („Zeugendaten“) aus dem Originalteil entfernt und am Ende als separate Struktur angehängt. Der ursprüngliche Abschnitt würde weiterhin die Sender- und Empfängerdaten enthalten und die neue „witness“-Struktur würde Skripte und Signaturen enthalten. Das ursprüngliche Datensegment wird normal gezählt, aber das „Zeugensegment“ wird in Wirklichkeit als ein Viertel seiner tatsächlichen Größe gezählt. Geschichte Blockgrößenbegrenzung Bitcoin ist eine Kryptowährung, also eine Form von Geld, die Kryptographie verwendet, um Transaktionen sicher zu halten. Jeder Datensatz einer Einheit von Bitcoin wird als „Block“ bezeichnet. Blöcke werden sequentiell miteinander verbunden, indem ein kryptographischer Hash aus dem vorherigen Block berechnet und im nächsten gespeichert wird. Dies bildet eine Kette von Blöcken oder eine Blockkette. Jeder Bitcoin-Block enthält Informationen darüber, wer eine bestimmte Bitcoin-Einheit (eine Transaktion) sendet und empfängt, sowie die Signatur, die jede Transaktion genehmigt. Ursprünglich gab es keine Begrenzung der Größe dieser Blöcke. Dies bedeutete jedoch, dass böswillige Personen gefälschte „Blockdaten“ erfinden konnten, die als eine Art Denial-of-Service-Angriff (DoS-Angriff) sehr lang waren. Ihre gefälschten Blöcke könnten erkannt werden, aber dies würde sehr lange dauern und das ganze System verlangsamen. Die von Satoshi Nakamoto entwickelte Lösung sollte die Blockgröße auf 1 MB begrenzen. Auf diese Weise würden Angriffe mit großen Blöcken sofort erkannt und abgewiesen werden, ohne das Netzwerk signifikant zu verlangsamen. Skalierbarkeit und Verformbarkeit Je populärer Bitcoin geworden ist, desto langsamer sind die Transaktionen, bedingt durch das Limit. Alle zehn Minuten wird ein Block an die Kette angehängt (Proof of Work führt zu dieser Verzögerung). Die Begrenzung der Blockgröße begrenzt die Anzahl der Transaktionen, die in die Blockgröße passen. Einige Websites umgehen dieses Problem, indem sie „Off-Chain-Zahlungen“ durchführen und Transaktionen durchführen, ohne auf die Bestätigung durch die Blockkette zu warten. Andere haben Änderungen an Bitcoin vorgeschlagen, die die Art und Weise, wie es gemacht wird, reformieren würden, aber das wäre nicht…"} {"instruction": "Create a class 'Stack' that has a method 'max_stack' that returns the maximum element in the stack.", "input": "", "output": "class Stack(): def __init__(self): self.stack = [] # Inserts an element in the stack def push(self, item): self.stack.append(item) # Return the maximum element in a stack def max_stack(self): max_elem = self.stack[0] for i in range(1,len(self.stack)): if self.stack[i]>max_elem: max_elem = self.stack[i] return max_elem"} {"text": "[CS Wikipedia] Pension pro svobodné pány\n\nPension pro svobodné pány je český film natočený režisérem Jiřím Krejčíkem v roce 1967 podle divadelní hry Seána O'Caseyho. Situační komedie se odehrává v pensionu, do něhož si svobodný mládenec (Josef Abrhám) tajně přivede svou milenku (Iva Janžurová) a snaží se jí skrýt jednak před přísnou paní domácí (Věra Ferbasová), jednak před svým nenadále se navrátivším spolubydlícím (Jiří Hrzán). Zajímavost Mladého pána, kterého posléze hrál Jiří Hrzán měl původně hrát Vladimír Pucholt (kamerové zkoušky proběhly), k čemuž ale nedošlo z důvodů jeho emigrace. Externí odkazy České filmové komedie Filmové situační komedie Filmy z roku 1967 Filmy natočené podle divadelních her Filmy studia Barrandov Filmy Jiřího Krejčíka"} {"instruction": "Write a JavaScript function to find all words in a string.", "input": "This is a string", "output": "function findWords(str) { let words = []; let start = 0; for (let i = 0; i < str.length; i++) { if (str[i] == ' ') { let word = str.substring(start, i); if (word != '') words.push(word); start = i + 1; } } let lastWord = str.substring(start, str.length); if (lastWord != '') words.push(lastWord); return words; }"} {"instruction": "Using the given array, write a Javascript program to sort the elements in descending order.", "input": "let numbers = [2, 10, 5, 4, 3];", "output": "let numbers = [2, 10, 5, 4, 3]; numbers.sort((a,b) => b - a); console.log(numbers); //output: [10, 5, 4, 3, 2]"} {"instruction": "Write a custom python sorting algorithm.", "input": "List of numbers: [3, 2, 1, 4]", "output": "def custom_sort(list_a):\n # Creating a list to store the sorted elements\n sorted_list = []\n\n while list_a:\n # Find the smallest number from the list\n min_item = min(list_a)\n \n # Append the smallest number to the sorted list\n sorted_list.append(min_item)\n \n # Remove the number from the original list\n list_a.remove(min_item)\n \n # Return the sorted list\n return sorted_list\n\nprint(custom_sort([3, 2, 1, 4]))"} {"text": "[HI Wikipedia] ऋषिकेश\n\nहृषीकेश (तद्भव: ऋषिकेश) भारतीय राज्य उत्तरखण्ड के देह्रदून ज़िले में देह्रदून के निकट एक नगर है। यह गंगा नदी के दाहिने किनारे पर स्थित है और हिन्दुओं हेतु एक तीर्थस्थल है, जहाँ प्राचीन सन्त उच्च ज्ञानान्वेषण में यहाँ ध्यान करते थे। नदी के किनारे कई मन्दिर और आश्रम बने हुए हैं। इसे \"गढ़वाल हिमालय का प्रवेश द्वार\" और \"विश्व की योगनगरी\" के रूप में जाना जाता है। नगर ने 1999 से मार्च के पहले सप्ताह में वार्षिक \"अन्तर्राष्ट्रीय योग महोत्सव\" की आतिथ्य की है। हृषीकेश एक शाकाहारी और मद्यमुक्त नगर है। टिहरी बाँध केवल 86 किमी दूर है और उत्तरकाशी, एक लोकप्रिय योग स्थल है, जो गंगोत्री के मार्ग में 170 किमी की पर्वतोर्ध्व पर स्थित है। हृषीकेश छोटा चार धाम तीर्थ स्थानों जैसे बद्रीनाथ, केदारनाथ, गंगोत्री और यमुनोत्री और हरसिल, चोपता, औली जैसे हिमालयी पर्यटन स्थलों की यात्रा हेतु प्रारम्भिक बिन्दु है और शिविरवास और भव्य हिमालय के मनोरम दृश्यों हेतु डोडीताल, दयारा बुग्याल, केदारकण्ठ, हर की दून घाटी जैसे प्रसिद्ध ग्रीष्मकालीन और शीतकालीन पदयात्रा गन्तव्य हैं। सितम्बर 2015 में, भारतीय पर्यटन मन्त्री महेश शर्मा ने घोषणा की कि हृषीकेश और हरिद्वार पहले \"जुड़वाँ राष्ट्रीय विरासत नगर\" होंगे। 2021 तक, हृषीकेश की कुल जनसंख्या 322,825 है, जिसमें नगर और इसके निकट के 93 ग्राम अन्तर्गत हैं। शब्दोत्पत्ती हृषीकेश नगर का नाम भगवान विष्णु के नाम से लिया गया है, जो हृषीक अर्थात् 'इन्द्रियों' और ईश अर्थात् 'ईश्वर' की समास से बना है, और 'इन्द्रियों के ईश्वर' का संयुक्तार्थ देता है। यह नाम रैभ्य ऋषि को, उनके तपस्या के फलस्वरूप, भगवान विष्णु की एक साक्षात दर्शन का स्मरण कराता है। ऋषि रैभ्य ने अपनी इन्द्रियों पर विजय प्राप्त कर इन्द्रियों के विजेता भगवान विष्णु को प्राप्त किया। स्कन्द पुराण में, इस क्षेत्र को कुब्जाम्रक के रूप में जाना जाता है, क्योंकि भगवान विष्णु एक आम्र वृक्ष के नीचे प्रकट हुए थे। आकर्षण लक्ष्मण झूला गंगा नदी के एक किनार को दूसर किनार से जोड़ता यह झूला नगर की विशिष्ट की पहचान है। इसे विकतमसंवत 1996 में बनवाया गया था। कहा जाता है कि गंगा नदी को पार करने के लिए लक्ष्मण ने इस स्थान पर जूट का झूला बनवाया था। झूले के बीच में पहुँचने पर वह हिलता हुआ प्रतीत होता है। 450 फीट लम्बे इस झूले के समीप ही लक्ष्मण और रघुनाथ मन्दिर हैं। झूले पर खड़े होकर आसपास के खूबसूरत नजारों का आनन्द लिया जा सकता है। लक्ष्मण झूला के समान राम झूला भी नजदीक ही स्थित है। यह झूला शिवानन्द और स्वर्ग आश्रम के बीच बना है। इसलिए इसे शिवानन्द झूला के नाम से भी जाना जाता है। ऋषिकेश मैं गंगाजी के किनारे की रेेत बड़ी ही नर्म और मुलायम है, इस पर बैठने से यह माँ की गोद जैसी स्नेहमयी और ममतापूर्ण लगती है, यहाँ बैठकर दर्शन करने मात्र से हृदय मैं असीम शान्ति और रामत्व का उदय होने लगता है।.. त्रिवेणी घाट ऋषिकेश में स्नान करने का यह प्रमुख घाट है जहाँ प्रात: काल में अनेक श्रद्धालु पवित्र गंगा नदी में डुबकी लगाते हैं। कहा जाता है कि इस स्थान पर हिन्दू धर्म की तीन प्रमुख नदियों गंगा यमुना और सरस्वती का संगम होता है। इसी स्थान से गंगा नदी दायीं ओर मुड़ जाती है। गोधूलि वेला में यहाँ की नियमित पवित्र आरती का दृश्य अत्यन्त…"} {"instruction": "Write a Python program to divide two numbers and return the quotient and remainder of the division.", "input": "x = 10 y = 3", "output": "x = 10 y = 3 quotient = int(x / y) remainder = x % y print(\"Quotient:\", quotient) print(\"Remainder:\", remainder) # Output: Quotient: 3, Remainder: 1"} {"instruction": "Develop an efficient Python program to find the longest common sub-sequence from two given strings.", "input": "String1 = \"ACDFSCD\" \nString2 = \"ACBCD\"", "output": "def LongestCommonSubsequence(X, Y, m, n): \n if m == 0 or n == 0:\n return 0; \n elif X[m-1] == Y[n-1]:\n return 1 + LongestCommonSubsequence(X, Y, m-1, n-1); \n else:\n return max(LongestCommonSubsequence(X, Y, m, n-1), LongestCommonSubsequence(X, Y, m-1, n)); \n \n# Driver Code \nX = \"ACDFSCD\"\nY = \"ACBCD\"\nm = len(X) \nn = len(Y) \nprint(LongestCommonSubsequence(X, Y, m, n))"} {"instruction": "Create a Python script to generate random numbers with using a certain range.", "input": "Minimum = 5, Maximum = 15", "output": "import random\n\nmin_n = 5\nmax_n = 15\n\ndef random_number_generator(min_n, max_n):\n return random.randint(min_n, max_n)\n\nfor num in range(0, 10):\n print (random_number_generator(min_n, max_n))"} {"text": "[CS Wikipedia] Zemské volby v Čechách 1889\n\nZemské volby v Čechách 1889 byly volby konané v Českém království 2. a 5. července 1889, kterými byli zvoleni poslanci Českého zemského sněmu coby zákonodárného sboru zemské samosprávy v rámci rakousko-uherského, respektive předlitavského ústavního systému. Probíhaly podle kuriového systému. Ve volbách výrazně uspěla mladočeská strana, která se po ostré kampani téměř vyrovnala dosud dominantní staročeské straně. Dobové souvislosti V roce 1889 byla v Předlitavsku již po více než deset let u moci konzervativní vláda Eduarda Taaffeho, kterou na Říšské radě (celostátní parlament) podporovala staročeská strana společně s polskými poslanci a německorakouskými konzervativci (takzvaný železný kruh pravice). V druhé polovině 80. let ale v české společnosti sílila kritika provládní orientace české politiky. Na opoziční a liberální rétorice se profilovala mladočeská strana, která se postupně aktivizovala jako nezávislá politická síla a kritizovala chabé výsledky české účasti na vládě ve Vídni. Mladočeši například roku 1887 vedli kampaň proti takzvaným Gautschovým ordonancím, tedy reformě rozmístění středních škol, která neměla apriori protičeský motiv, ale fakticky mohla poškodit úroveň školství v některých českých regionech. V této době mladočesky orientované Národní listy otiskly výrok, jenž měl pronést staročeský předák František Ladislav Rieger o tom, že „když se nám nepodařilo vymoci svá práva jedním rázem, pasivním odporem, musíme je nyní sbírati po drobtech, a kdybychom ty drobty sbírati měli pod stolem.“ Následovala takzvaná drobečková aféra, v níž se již mladočeši a staročeši otevřeně pustili do konfliktu. Skupina mladočechů roku 1888 opustila i Český klub (střechová poslanecká frakce na Říšské radě) a začala praktikovat samostatnou politiku. Zatímco ve volbách do Říšské rady roku 1885 ještě čeští poslanci staro- i mladočeské orientace kandidovali společně v předem dohodnutých volebních obvodech (přičemž zastoupení mladočechů v Českém klubu bylo spíše menšinové a tón české politiky ve Vídni určovali staročeši), zemské volby v Čechách roku 1889 byly prvním zcela konkurenčním měřením sil obou hlavních proudů české politiky. V Českém království se kromě rivality mezi staročechy a mladočechy stupňovalo i napětí mezi oběma zemskými etniky. Čeští (sudetští) Němci, respektive jejich hlavní politická síla Pokroková strana, reagovali na sílící český vliv (Stremayrova jazyková nařízení, rozdělení pražské univerzity), podpořený českou účastí na vládě, prostřednictvím požadavků na administrativní rozdělení Čech podle etnických hranic. Od roku 1886 po neúspěchu těchto návrhů zahájili pasivní rezistenci na Českém zemském sněmu a fakticky se neúčastnili jeho práce. Staročeši do voleb šli s hesly o pokračování v dosavadní politické práci a výzvami k umírněnosti.…"} {"instruction": "Write a regular expression to match a word, which has at least five letters and that only consists of lowercase alphabets.", "input": "", "output": "[a-z]{5,}"} {"instruction": "Generate HTML table with a given list of dictionaries.", "input": "[{'name': 'John', 'age': 20}, {'name': 'Alice', 'age': 22}]", "output": "
      Name Age
      John 20
      Alice 22
      "} {"instruction": "Write a Python program to take two numbers as input and find the greatest common divisor.", "input": "36 and 18", "output": "def gcd(a, b):\n if a == 0:\n return b\n\n while b != 0:\n if a > b:\n a = a - b\n else:\n b = b - a\n return a\n\n# Test\nprint(gcd(36, 18)) # Output: 18"} {"instruction": "Create a Python program to find the most common element in a list.", "input": "[3, 5, 3, 3, 3, 4, 5]", "output": "def most_common_element(list_of_numbers):\n # Initialize the dictionary and count the number of each element in the list\n frequency_dict = {}\n for element in list_of_numbers:\n if element not in frequency_dict:\n frequency_dict[element] = 1\n else:\n frequency_dict[element] += 1\n \n # Find the element with the highest frequency \n max_frequency = 1\n element_with_max_frequency = None\n for element in frequency_dict:\n if frequency_dict[element] > max_frequency:\n max_frequency = frequency_dict[element]\n element_with_max_frequency = element\n \n return element_with_max_frequency\n\nif __name__ == '__main__':\n print(most_common_element([3, 5, 3, 3, 3, 4, 5]))\n\n# Output\n3"} {"text": "[CS Wikipedia] Enigma (rozcestník)\n\nEnigma (ze starořeckého αἴνιγμα – hádanka) má více významů: Enigma – německý šifrovací stroj z druhé světové války Enigma (hudební skupina) – německý studiový projekt, částečně zaměřený na taneční diskotéky Enigma Records – americké hudební vydavatelství alternativní hudby osmdesátých let Publius Enigma – označení pro sérii hádanek spojených s albem Pink Floyd The Division Bell Enigma (časopis) – časopis o záhadách Enigma (film) – název několika filmů, například Enigma z roku 1982 (režie Jeannot Szwarc) nebo Enigma z roku 2001 (režie Michael Apted) Enigma2 – aplikace a speciální linuxová distribuce pro set-top boxy Příbuzné termíny Enigmail – rozšíření aplikace Mozilla Thunderbird či Mozilla Suite Externí odkazy"} {"instruction": "Write a Python script to find all the numbers which are divisible by 7, but are not multiples of 5; between 2000 and 3200 (both included).", "input": "", "output": "res = [] for i in range(2000, 3200): if (i%7 == 0) and (i%5 != 0): res.append(str(i)) print(','.join(res))"} {"instruction": "Create a MySQL query to get the names of all users who are over 18.", "input": "", "output": "SELECT name FROM users WHERE age > 18;"} {"text": "[CS Wikipedia] Coriolisova síla\n\nCoriolisova síla je setrvačná síla působící na tělesa, která se pohybují v rotující neinerciální vztažné soustavě tak, že se mění jejich vzdálenost od osy otáčení. Coriolisova síla má směr kolmý ke spojnici těleso – osa otáčení a způsobuje stáčení trajektorie tělesa proti směru otáčení soustavy (v případě pohybu tělesa od středu otáčení. Pokud se těleso pohybuje směrem ke středu otáčení, působí síla ve směru otáčení. Například na těleso padající volným pádem nad rovníkem působí Coriolisova síla směrem k východu, tedy po směru otáčení). Patří mezi zdánlivé síly (nekoná práci). Je pojmenována po Gaspardu Gustavu de Coriolisovi, který se silami v rotujících soustavách zabýval v 19. století. Ovšem tento koncept již roku 1651 popsal i Giovanni Battista Riccioli. Působení Coriolisovy síly se označuje jako Coriolisův efekt. Jedná se o viditelné odchylování přímočaře se pohybujících objektů od přímého směru, pokud je pozorujeme z neinerciální vztažné soustavy. Na Zeměkouli se jakákoliv hmota díky rotaci Země, pohybující se ve směru poledníků, odklání na severní polokouli doprava, na jižní polokouli pak doleva. Významné a jasně viditelné jsou projevy Coriolisovy síly v meteorologii. Na severní polokouli se otáčejí tlakové níže vždy doleva a tlakové výše doprava, na jižní přesně opačně. Coriolisova síla má vliv i na mořské proudy. Výpočet Vektorový vztah pro Coriolisovo zrychlení (zrychlení částice v rotujícím systému) je neboli (po vynásobení hmotností) vztah pro Coriolisovu sílu kde Fc je Coriolisova síla, m je hmotnost tělesa, v je vektor rychlosti tělesa v neinerciální vztažné soustavě, ω je vektor úhlové rychlosti otáčení soustavy a označuje vektorový součin. Velikost Coriolisovy síly spočteme jako kde je úhel sevřený mezi vektorem úhlové rychlosti a vektorem rychlosti. Ze vzorce vyplývá, že Coriolisova síla je kolmá na směr pohybu tělesa a na osu otáčení. Pro její směr platí: pokud je vektor rychlosti rovnoběžný s osou otáčení, Coriolisova síla je nulová pokud vektor rychlosti směřuje kolmo k ose otáčení, Coriolisova síla působí ve směru rotace pokud vektor rychlosti směřuje kolmo od osy otáčení, Coriolisova síla působí proti směru rotace pokud vektor rychlosti směřuje po směru otáčení, Coriolisova síla působí směrem od osy pokud vektor rychlosti směřuje proti směru otáčení, Coriolisova síla působí směrem k ose Pokud bychom uvažovali určité místo na Zemi o zeměpisné šířce a soustavu souřadnic, jejíž osa x směřuje na východ, osa y na sever a osa z směrem vzhůru, potom úhlovou rychlost, rychlost tělesa a Coriolisovu sílu vypočítáme jako: Díky vertikální složce Coriolisovy síly jsou tělesa v pohybu na východ odchylovány nahoru (nadlehčovány), v pohybu na západ jsou odchylovány dolů. Tento jev je známý jako Eötvösův efekt. V praxi není jev příliš…"} {"instruction": "Update a MySQL table to increase the salary of all employees by 10%.", "input": "Employess table contains the following columns: - id: Integer - name: Text - salary: Number", "output": "UPDATE Employees SET salary = salary * 1.1;"} {"instruction": "Create a program to find the smallest number in a given list using a for loop in Python.", "input": "Example list: [12, 4, 16, 15]", "output": "def find_smallest_number(lst):\n smallest = lst[0]\n for number in lst:\n if number < smallest:\n smallest = number\n return smallest\n\nprint(find_smallest_number([12, 4, 16, 15]))\n# Output: 4"} {"text": "[DE Wikipedia] Bogdan Andrejewitsch Reichmen\n\nBogdan Andrejewitsch Reichmen (; * 26. Mai 2002 in Jewpatorija, Ukraine) ist ein russischer Fußballspieler. Karriere Reichmen begann seine Karriere beim FK Krasnodar. Im August 2018 spielte er erstmals für die dritte Mannschaft Krasnodars in der Perwenstwo PFL. In der Saison 2018/19 kam er zu drei Drittligaeinsätzen. In der COVID-bedingt abgebrochenen Saison 2019/20 absolvierte er sieben Partien für Krasnodar-3. In der Saison 2020/21 kam er ausschließlich für die U-19 des Vereins zum Einsatz. Zur Saison 2021/22 rückte Reichmen in den Kader der zweiten Mannschaft. Im Juli 2021 debütierte er für diese gegen die Reserve von Spartak Moskau in der Perwenstwo FNL. Im Dezember 2021 gab der Mittelfeldspieler bei seinem Kaderdebüt für die erste Mannschaft gegen den FK Sotschi sein Debüt in der Premjer-Liga. Bis Saisonende kam er zu vier Erstliga- und 31 Zweitligaeinsätzen in Krasnodar. Zur Saison 2022/23 wechselte Reichmen innerhalb der Premjer-Liga zu Torpedo Moskau. Nach acht Einsätzen für Torpedo wurde er im Januar 2023 an den Zweitligisten Kamas Nabereschnyje Tschelny verliehen. Weblinks Einzelnachweise Fußballspieler (FK Krasnodar) Fußballspieler (Torpedo Moskau) Fußballspieler (Kamas Nabereschnyje Tschelny) Russe Geboren 2002 Mann"} {"instruction": "Create a list of students which contains a nested list of the student’s name and age.", "input": "students = [\"Sam\", 19], [\"Alice\", 20], [\"Linda\", 21]", "output": "student_list = [[student[0], student[1]] for student in students]"} {"instruction": "Construct an algorithm in Python to find the top three numbers in a list.", "input": "[10, 8, 3, 11, 7, 14, 13]", "output": "def top_three(lst): \n sorted_lst = sorted(lst, reverse=True) \n return sorted_lst[:3]\n\nprint(top_three([10, 8, 3, 11, 7, 14, 13]))"} {"text": "[EN Wikipedia] Academia for Equality\n\nAcademia for Equality (A4E; ) is a members' organization working to promote democratization, equality and access to higher education for all communities living in Israel. The organization numbers more than 600 Israeli members, from universities and colleges both in Israel and abroad, including students, researchers, and lecturers. The members of the organization struggle against the complicity of Israeli academia in the occupied Palestinian territories, and actively combat abusive labour relations, sexual harassment, and the silencing of critical voices in Israel and around the world. Prominent members include Joel Beinin, Uri Davis, Neve Gordon, Alon Harel, Rela Mazali, Vered Slonim-Nevo, and Oren Yiftachel. Establishment and goals Academy for Equality is a members’ organization established in 2015, which numbers more than 600 members from different higher education institutions. Academy for Equality is an extra-institutional organization, which accommodates academics of all levels, who are committed to promoting structural changes for achieving an academy free of violence and discrimination. The organization operated democratically, and holds public discussion on different issues, according to the principles of transparency and wide consent. The organizations board is elected in an annual meeting, in which every member can participate. Academia for Equality is a grassroots movement that is organized through small teams or projects led by members, which are supported by the elected board. Each team is responsible for organizing its own members in Israel and abroad, and for communicating its actions and plans to the board and to the broader membership. Teams and projects Academy for Equality has several teams who are regularly working to promote the organizations vision and goals. First-generations in higher education The team advances awareness to \"first-generation\" as an intersectional policy tool in an effort to tackle institutional blindness to the issue, and address the enormous challenges of diversity work in the context of Israeli academia. Academia for Equality attempts to deal with these multiple forms and challenges of inequality, exclusion and discrimination in higher education through raising awareness, setting the agenda, and supporting and participating in a special workshop designed to provide a space of learning and support for first-generation graduate students in Israeli academia. These workshops are held both in Hebrew and in Arabic, and have taken place in Tel Aviv University, Ben Gurion University in the Negev, and the Hebrew University in Jerusalem. Fighting sexual harassment The team advances a political discourse, that encourages taking responsibility for the widespread complicity in its perpetuation. The team supports and…"} {"text": "[HI Wikipedia] महाराष्ट्र\n\nमहाराष्ट्र भारत का एक राज्य है जो भारत के पश्चिमी प्रायद्वीपीय क्षेत्र में स्थित है। इसकी गिनती भारत के सबसे धनी एवं समृद्ध राज्यों में की जाती है। महाराष्ट्र शब्द संस्कृत का है जो दो शब्दों द्वारा मिलकर बना है महा तथा राष्ट्र इसका अर्थ होता है महान देश। यह नाम यहाँ के संतों की देन है। इसकी राजधानी मुंबई है जो भारत का सबसे बड़ा शहर और देश की आर्थिक राजधानी के रूप में भी जानी जाती है। और यहाँ का पुणे शहर भी भारत के बड़े महानगरों में गिना जाता है। यहाँ का पुणे शहर भारत का छठवाँ सबसे बड़ा शहर है। महाराष्ट्र की जनसंख्या सन २०११ में ११,२३,७२,९७२ थी, विश्व में सिर्फ़ ग्यारह ऐसे देश हैं जिनकी जनसंख्या महाराष्ट्र से ज़्यादा है। इस राज्य का निर्माण १ मई, १९६० को मराठी भाषी लोगों की माँग पर की गयी थी। यहां मराठी भाषा ज्यादा बोली जाती है। मुंबई, अहमदनगर, पुणे, औरंगाबाद, भोकरदन, कोल्हापूर, नाशिक, नागपुर, ठाणे, शिर्डी, मालेगांव, सोलापुर, अकोला, लातुर, उस्मानाबाद, अमरावती और नांदेड महाराष्ट्र के अन्य मुख्य शहर हैं! इतिहास(प्राचीन- मध्ययुगीन) ऐसा माना जाता है कि सन १००० ईसा पूर्व से पहले महाराष्ट्र में खेती होती थी लेकिन उस समय मौसम में अचानक परिवर्तन आया और कृषि रुक गई थी। सन् ५०० इसापूर्व के आसपास बम्बई (प्राचीन नाम शुर्पारक, सोपर) एक महत्वपूर्ण पत्तन बनकर उभरा था। यह सोपर ओल्ड टेस्टामेंट का ओफिर था या नहीं इस पर विद्वानों में विवाद है। प्राचीन १६ महाजनपद, महाजनपदों में अश्मक या अस्सक का स्थान आधुनिक अहमदनगर के आसपास है। सम्राट अशोक के शिलालेख भी मुम्बई के निकट पाए गए हैं। मौर्यों के पतन के बाद यहाँ बघेल (गडेरिया) का उदय वर्ष 230 में हुआ। वकटकों के समय अजन्ता गुफाओं का निर्माण हुआ। चालुक्यों का शासन पहले सन् 550-760 तथा पुनः 973-1180 रहा। इसके बीच राष्ट्रकूटों का शासन आया था। अलाउद्दीन खिलजी वो पहला मुस्लिम शासक था जिसने अपना साम्राज्य दक्षिण में मदुरै तक फैला दिया था। उसके बाद मुहम्मद बिन तुगलक (१३२५) ने अपनी राजधानी दिल्ली से हटाकर दौलताबाद कर ली। यह स्थान पहले देवगिरि नाम से प्रसिद्ध था और औरंगाबाद के निकट स्थित है। बहमनी सल्तनत के टूटने पर यह प्रदेश गोलकुण्डा के आशसन में आया और उसके बाद औरंगजेब का संक्षिप्त शासन। इसके बाद मराठों की शक्ति में उत्तरोत्तर वुद्धि हुई और अठारहवीं सदी के अन्त तक मराठे लगभग पूरे महाराष्ट्र पर तो फैल ही चुके थे और उनका साम्राज्य दक्षिण में कर्नाटक के दक्षिणी सिरे तक पहुँच गया था। १८२० तक आते आते अंग्रेजों ने पेशवाओं को पूर्णतः हरा दिया था और यह प्रदेश भी अंग्रेजी साम्राज्य का अंग बन चुका था। देश को आजादी के उपरान्त मध्य भारत के सभी मराठी इलाकों का संमीलीकरण करके एक राज्य बनाने की मांग को लेकर बड़ा आंदोलन चला। आखिर १ मई १९६० से कोकण, मराठवाडा, पश्चिमी महाराष्ट्र, दक्षिण महाराष्ट्र, उत्तर महाराष्ट्र (खानदेश) तथा विदर्भ, संभागों को एकजुट करके महाराष्ट्र की स्थापना की गई। राज्य के दक्षिण सरहद से लगे कर्नाटक के बेलगांव शहर और आसपास के गावों को महाराष्ट्र में शामील करने के लिए एक आंदोलन चल रहा है। नासिक गजट २४६ ईसा पूर्व में महाराष्ट्र में मौर्य सम्राट अशोक एक दूतावास भेजा जो करने के लिए स्थानों में से एक के रूप में उल्लेख किया है जो…"} {"instruction": "Create a TicTacToe game in Python.", "input": "", "output": "class TicTacToe:\n\ndef __init__(self):\n self.board = [['_' for _ in range(3)] \n for _ in range(3)]\n self.turn = 'x'\n \ndef display(self):\n for row in self.board:\n print(' '.join(row))\n\ndef check_win(self):\n board = self.board\n\n # check if the player with the current turn has a row of three\n for row in self.board:\n if row.count(self.turn) == 3:\n return True\n \n # check if the player with the current turn has a column of three\n for col in range(3):\n if board[0][col] == board[1][col] and board[1][col] == board[2][col] and board[2][col] == self.turn:\n return True\n \n # check for the two diagonals\n if board[0][0] == board[1][1] and board[1][1] == board[2][2] and board[2][2] == self.turn:\n return True\n if board[0][2] == board[1][1] and board[1][1] == board[2][0] and board[2][0] == self.turn:\n return True\n return False"} {"text": "[DE Wikipedia] Anand\n\nAnand steht für: Anand (Film), Hindi-Film von Hrishikesh Mukherjee (1971) anderer Name für die keltische Gottheit Anu (Göttin) Orte: Anand (Gujarat), Stadt in Indien Anand (Distrikt), Distrikt in Gujarat, Indien Personen: Anita Anand (* 1967), kanadische Anwältin und Politikerin (Liberale Partei), Verteidigungsministerin Kanadas Dev Anand (1923–2011), indischer Schauspieler, Regisseur und Produzent Jojo Anand (* 1959), indischer Bischof von Hazaribag Margot Anand (* 1944), französische Esoterikerin Mulk Raj Anand (1905–2004), indischer Schriftsteller und Kunstkritiker Sunaina Anand (* 1980), indische Gewichtheberin Vijay Anand (1934–2004), indischer Filmregisseur Viswanathan Anand (* 1969), indischer Schachspieler und Schachweltmeister (2007–2013) sowie Anand Batbileg (* 2001), deutscher Schauspieler"} {"text": "[DE Wikipedia] Touros\n\nTouros, amtlich , ist eine Gemeinde in Rio Grande do Norte in der Nordostregion Brasiliens. Der Ort ist auch als „Esquina Brasiliera“ (Brasilianische Ecke) bekannt, da er sich an der nordöstlichsten Ecke des Landes befindet und die nächstgelegene südamerikanische Stadt zu Afrika ist (2841 km von Kabrousse im südwestlichen Senegal entfernt). Die Gemeinde hatte mit Schätzung zum 1. Juli 2021 33.716 Einwohner, die Tourenser genannt werden und auf einer Gemeindefläche von rund 754 km² leben. Die Entfernung zur Hauptstadt Natal beträgt 91 km. Touros hat viele Fische und es gibt ein nahe gelegenes Meerwasserbecken (parracho) im Ozean, das von Korallenriffen gebildet wird. Toponymie Die Namensherkunft ist ungesichert. Geographie Zu den angrenzenden Gemeinden gehören Rio do Fogo im Südosten, Pureza im Süden, João Câmara im Südwesten, Parazinho weiter im Westen und São Miguel do Gostoso im Nordwesten. In der Nähe von Touros liegt Rio Carnaubinha. Die Höhe liegt zwischen 2 Metern (Zentrum der Stadt am Meer) und 72 Metern im Landesinneren. Klima In Touros herrscht tropisches Klima. Im Südwinter gibt es deutlich weniger Niederschläge als im Südsommer. Die Klimaklassifikation nach Köppen und Geiger lautet Aw. Im Jahresdurchschnitt liegt die Temperatur bei 26,2 °C. Innerhalb eines Jahres gibt es 976 mm Niederschlag. Geschichte In den 1790er Jahren (1792 bis 1796) kam es zu einer Dürre im damaligen Kapitanat Rio Grande, die landwirtschaftliche Betriebe und Arbeiter nach Touros brachte, da dort das Land fruchtbar war und für die Landwirtschaft genutzt werden konnte. Die anfängliche Siedlung, ein Fischerdorf, wurde am 5. September 1823 zu einem Bezirk, dem Distrito de Touros. 1832 wurde der Pfarrbezirk Freguesia do Bom Jesus dos Navegantes do Porto de Touros gegründet. Am 11. April 1833 erhob der Beschluss des Provinzrates der Provinz Rio Grande do Norte Touros zu einer Vila (Vila de Touros), die auch von Ceará-Mirim getrennt wurde. Dies wurde im Landesgesetz Nr. 21 vom 27. März 1835 bestätigt, was auch als Gründungsdatum des Munizips gilt. Das Gemeindegebiet war ursprünglich sehr groß, sie hatte 180 km Küste. Später wurden aus Touros eigene Gemeinden gegründet, darunter 1962 Maxaranguape, Pureza und São Miguel do Gostoso. Verwaltungsgliederung Touros besteht aus einem Gesamtbezirk mit 27 benannten Siedlungen: Arribão Assentamento Aracati Assentamento Canudos Assentamento Chico Mendes I Assentamento Chico Mendes II Assentamento Planalto do Retiro Santo Antônio Baixa do Quinquim Boa Cica Boqueirão Cajá Cajueiro Carnaubal Carnaubinha Geral Golandim Lagoa de Serra Verde Lagoa do Sal Monte Alegre Perobas Santa Luzia São José Tubiba Vila Assis Vila Israel Vila Maine Zabelê. Demografie Ethnische Zusammensetzung * Anmerkung: Das IBGE verwendet für Volkszählungen…"} {"instruction": "Design a program in Python to generate a random password.", "input": "", "output": "import random, string\n\ndef genRandomPassword():\n length = 8\n random_password= ''.join([random.choice(string.ascii_letters + string.digits + string.punctuation) for n in range(length)])\n return random_password\n\npassword = genRandomPassword()\nprint(password)"} {"instruction": "Write a Django code to print the name of all the users in the database.", "input": "", "output": "from django.contrib.auth.models import User users = User.objects.all() for user in users: print(user.username)"} {"instruction": "Use expand tabs to replace all the tabs in the following text with four spaces.", "input": "text = '\\thello \\tworld \\t'", "output": "import re text = '\\thello \\tworld \\t' text = re.sub('\\t', ' ', text) print(text)"} {"instruction": "Write a Python program to create a symmetric matrix (with the same elements along the diagonal axis) from a given list of integers.", "input": "[1,2,3]", "output": "input_list = [1,2,3]\n\nnum_elements = len(input_list)\n\ndef create_symmetric_matrix(input_list):\n matrix = [[0 for x in range(num_elements)] for y in range(num_elements)]\n \n for i in range(num_elements):\n for j in range(num_elements):\n if i == j:\n matrix[i][j] = input_list[i]\n else:\n matrix[i][j] = input_list[j]\n \n return matrix\n\nres = create_symmetric_matrix(input_list)\nprint(res)"} {"instruction": "Write an HTML page to display three columns with headings ‘Name’, ‘Age’ and ‘Occupation’ in a table layout.", "input": "", "output": " Simple Table Layout

      Table with Three Columns

      Name Age Occupation
      "} {"instruction": "Write a Python program to solve the quicksort algorithm.", "input": "Array = [10, 7, 8, 9, 1, 5]", "output": "def quicksort(arr): \n if len(arr) <= 1:\n return arr\n pivot = arr[len(arr) // 2]\n left = [x for x in arr if x < pivot]\n middle = [x for x in arr if x == pivot]\n right = [x for x in arr if x > pivot]\n return quicksort(left) + middle + quicksort(right)"} {"instruction": "Create a test harness in C++ to verify the correctness of the following function", "input": "// A function to calculate the nth Fibonacci number // Input: nth Fibonacci number // Output: nth Fibonacci number int calcFib(int n) { if (n<=1) return n; return calcFib(n-1) + calcFib(n-2); }", "output": "#include // Function to calculate the // nth Fibonacci number int calcFib(int n) { if (n <= 1) return n; return calcFib(n - 1) + calcFib(n - 2); } // Test Harness to verify the correctness // of the calcFib implementation int main() { // Input value to calculate const int n = 10; // Expected Output value const int expected_output = 55; // Calculate nth fibonacci number int output = calcFib(n); // Verify correctness if (output == expected_output) std::cout << \"Test Passed\" << std::endl; else std::cout << \"Test Failed\" << std::endl; return 0; }"} {"text": "[DE Wikipedia] Kathedrale St. Jakobus (Görlitz)\n\nDie Kathedrale St. Jakobus in Görlitz ist die Bischofskirche des römisch-katholischen Bistums Görlitz. Geschichte Die heutige Kathedrale wurde in den Jahren 1898 bis 1900 nach Plänen des Architekten Joseph Ebers errichtet und am 6. Oktober 1900 geweiht. Ursprünglich war geplant, das neue Gotteshaus als Filialkirche der Pfarrei Hl. Kreuz zu errichten. Der Breslauer Fürstbischof Adolf Kardinal Bertram (damals gehörte Görlitz zum Erzbistum Breslau) erhob die neue Kirche jedoch im Jahr 1918 zur Pfarrkirche der neuen Pfarrei St. Jakobus. Im März 1947 musste der damalige deutsche Kapitelsvikar Ferdinand Piontek die Bischofsstadt Breslau als Ergebnis des Zweiten Weltkriegs verlassen. Seine Tätigkeit als Breslauer Kapitelsvikar setzte er in Görlitz fort. Görlitz wurde somit Exilsitz des Breslauer Metropolitankapitels sowie des Breslauer Ordinariats und die Pfarrkirche St. Jakobus zusätzlich die Bischofskirche für das Diözesangebiet Görlitz-Cottbus. Dieses wurde 1972 zur Apostolischen Administratur erhoben. Die Kirche St. Jakobus erhielt den Titel einer Prokathedrale. Apostolischer Administrator wurde der bisherige Weihbischof Bernhard Huhn. Seit der Neuordnung ostdeutscher Bistümer Anfang der 1990er Jahre erfolgte 1994 die Gründung des Bistums Görlitz und die Erhebung der St.-Jakobus-Kirche zur Kathedrale dieses Bistums. Seit 2012 gehört die Jakobuskathedrale zur Pfarrei Hl. Wenzel Görlitz. Ende November 2019 wurde bekannt, dass die Kathedrale St. Jakobus ab Februar 2020 für rund zwei Jahre für den Publikumsverkehr geschlossen wird. Das geschehe, um den Innenraum zu sanieren und Kriegsschäden zu beseitigen, teilte das Bistum Görlitz der Presse mit. Die zu veranschlagenden Kosten wurden auf bis zu 3,7 Millionen Euro geschätzt. Die Wiedereröffnung erfolgte am 28. November 2021 in einem Festgottesdienst unter Leitung des Görlitzer Bischofs Wolfgang Ipolt mit weiteren deutschen und polnischen Bischöfen. Architektur Die neugotische dreischiffige Hallenkirche in Ziegelbauweise mit dem 68 Meter hohen Turm steht auf einer Anhöhe und ist deshalb von weither sichtbar. Im Innern finden sich Fragmente von bauzeitlichen Ausmalungen und ornamental verwendete Glasurziegel. In den letzten Tagen des Zweiten Weltkrieges wurde die Kirche durch Artilleriebeschuss stark zerstört, danach mit vereinfachter Turmspitze und ohne die Zwerchhäuser wiederhergestellt. 2004 wurde der Westflügel saniert. Ab 2013 erfolgte eine vollständige grundlegende Außensanierung für 4,5 Millionen Euro – einschließlich einer Erneuerung des Glockenstuhls und der Ergänzung zweier Glocken. Im Jahr 2014 wurden im Rahmen der Fassadensanierung auch die vier kleinen Nebentürmchen am Glockenturm, die Dachaufbauten sowie das Fries aus gelben und roten Dachziegeln rekonstruiert. Ausstattung Orgel Die Firma…"} {"instruction": "Create a Python loop that will iterate through the following list and will print each item's value multiplied with 5.", "input": "numbers = [5, 10, 15, 20, 25]", "output": "for number in numbers: print(number*5)"} {"instruction": "Given an array containing words and a string, find the shortest word in the array that is a substring of the string", "input": "words = [\"apple\", \"banana\", \"cat\", \"dog\"], string = \"aquickbrownfoxjumpsoverthelazydog\"", "output": "\"\"\" Given an array containing words and a string, find the shortest word in the array that is a substring of the string. \"\"\" def find_shortest_substring(words, string): min_length = float(\"inf\") min_word = None for word in words: j = string.find(word) if j>-1 and len(word) elements", "input": "", "output": "
      Content
      Content
      "} {"instruction": "Develop an algorithm to remove the duplicate words in a given string.", "input": "\"I love coding love coding Python\"", "output": "def remove_duplicates(string): \n words = string.split(\" \") \n res = [] \n for word in words: \n if word not in res: \n res.append(word) \n return (\" \".join(res)) \n\nstring = \"I love coding love coding Python\"\nres = remove_duplicates(string) \nprint(\"String after removing duplicates:\")\nprint(res)"} {"instruction": "Develop a python class to model a book with attributes title and authors.", "input": "", "output": "class Book:\n def __init__(self, title, authors):\n self.title = title\n self.authors = authors\n\nmyBook = Book('The Great Gatsby', 'F. Scott Fitzgerald')\nprint(myBook.title, myBook.authors)"} {"text": "[CS Wikipedia] Jaguár americký\n\nJaguár americký (Panthera onca) je kočkovitá šelma patřící do rodu Panthera. Je jediným zástupcem tohoto rodu v Americe. Po tygrovi (P. tigris) a lvu (P. leo) je největší kočkovitou šelmou a na západní polokouli úplně největší. Vyskytuje se od Mexika přes velkou část Střední Ameriky jižně do Paraguaye a severní Argentiny. Několik jedinců žije nedaleko Tucsonu v americkém státě Arizona. Stavbou těla a zbarvením se nejvíce podobá levhartovi (P. pardus), i když je robustnější a obvykle většího vzrůstu. Jeho chování a areál jsou spíše podobné chování a areálu tygra. Preferuje deštné lesy, ale vyskytuje se i v zalesněných a otevřených terénech. Žije poblíž vody a stejně jako tygr je zdatným plavcem. Je to samotářský predátor lovící různé druhy živočichů. V potravním řetězci je na vrcholu (v hierarchii nemá vyššího predátora) a má velký význam pro přírodní rovnováhu. Jeho skus je mimořádně silný, a to i v poměru k ostatním velkým kočkám (lev, levhart, tygr). To mu umožňuje lovit krunýřem opatřené plazy a používat neobvyklou metodu usmrcování – prokousnutí lebky oběti mezi ušima a usmrcení narušením mozku. Podle klasifikace IUCN patří mezi téměř ohrožené druhy a jeho populace klesá například z důvodu ztráty přirozeného prostředí. Mezinárodní obchod s jaguáry je zakázaný, ale každoročně zemře při konfliktech s lidmi, hlavně s farmáři v Jižní Americe, mnoho jedinců. Jaguár byl důležitým symbolem mnoha původních amerických kultur, například Mayů a Aztéků. Etymologie Mezinárodní slovo jaguar se rozšířilo z portugalštiny, kam se dostalo z některého jazyka ze skupiny tupí-guaraní. V něm slovo yaguara znamená „zvíře“, někdy se překládá jako „pes“, ale označují se jím všichni masožraví savci. Pro jaguára se v tomto jazyku používá výraz yaguareté, kde přípona -eté znamená „pravý“ nebo „opravdový“. První část jeho vědeckého jména, Panthera, je latinský výraz pocházející z řeckého slova πάνθηρ, což znamená levhart a je to typový druh tohoto rodu. Toto slovo je pravděpodobně složenina dvou slov: παν, což znamená „všechno“, a θήρ, „predátor“, dohromady tedy „predátor všech“ (zvířat). To může být ale jen lidová etymologie a namísto toho může mít slovo původ ve slově pundarikam, což v sanskrtu znamená „tygr“. Onca pochází z portugalského slova onça, které má z typografických důvodů přidanou cedillu. To pochází z latinského lyncea, lynx, kdy bylo písmeno l nesprávně považováno za člen určitý (italsky lonza, starofrancouzsky l'once). V mnoha středoamerických a jihoamerických zemích se jaguárovi říká el tigre („tygr“). Ameriští indiáni nazývají jaguára mnoha názvy, například Aztékové: tecuani nebo ocelotl, Mayové: balam, Zapotékové: beedxe, Aravakové: kabadaro, Chívarové: yawáa, Karibové: kaikusi, Mapučové: nahuel, Šipivové: 'inú, Takanové: iba, Witótové: janallari,…"} {"instruction": "You are given a string. Count the total number of lowercase letters in the string.", "input": "", "output": "def count_lowercase(string): count = 0 for char in string: if char.islower(): count += 1 return count"} {"instruction": "Edit the given Python program so that it prints the current date, in the format YYYY-mm-dd.", "input": "print(\"Hello!\")", "output": "from datetime import date\n\nprint(\"Hello!\")\n\ncurrent_date = date.today().strftime(\"%Y-%m-%d\")\nprint(\"Today's date is\", current_date)"} {"instruction": "Write an SQL query to select the data of all the employees who joined in the last 5 years and earn more than $100,000.", "input": "", "output": "SELECT * FROM employees WHERE start_date > DATE_SUB(NOW(), INTERVAL 5 YEAR) AND salary > 100000;"} {"text": "[DE Wikipedia] Departamento Formosa\n\nDas Departamento Formosa liegt im Südosten der Provinz Formosa im Norden Argentiniens und ist eine von neun Verwaltungseinheiten der Provinz. Es grenzt im Norden an das Departamento Pilcomayo, im Osten an Paraguay, im Süden an das Departamento Laishí und im Westen an das Departamento Pirané. Die Hauptstadt des Departamento Formosa ist das gleichnamige Formosa. Bevölkerung Nach Schätzungen des INDEC stieg die Zahl der Einwohner im Departamento Formosa von 210.071 (2001) auf 248.349 Einwohner im Jahre 2005. Gliederung Das Departamento Formosa gliedert sich in Formosa, eine Gemeinde erster Kategorie, die Comisiones de Fomento Colonia Pastoril, Gran Guardia und San Hilario, die Juntas Vecinales Provinciales Mariano Boedo, Mojón de Fierro, Villa del Carmen und Villa Trinidad. Formosa"} {"instruction": "Find a way to calculate the power of a number without using * or **", "input": "base = 3 exponent = 4", "output": "def power(base, exponent): result = 1 for _ in range(exponent): result *= base return result"} {"instruction": "Identify the best algorithm to find the maximum sum of a subarray in a given array and write a Python code snippet accordingly.", "input": "arr = [-2, 1, -3, 4, -1, 2, 1, -5, 4]", "output": "def maxSubarraySum(arr): \n max_so_far = 0\n max_ending_here = 0\n \n for i in range(0, len(arr)): \n max_ending_here += arr[i] \n if max_ending_here < 0: \n max_ending_here = 0\n if (max_so_far < max_ending_here): \n max_so_far = max_ending_here \n return max_so_far"} {"instruction": "Using Java, create a class that implements sorting of an array of integers.", "input": "", "output": "public class Sorting { public void sort(int[] array) { for (int i = 0; i < array.length - 1; i++) { int index = i; for (int j = i + 1; j < array.length; j++) { if (array[j] < array[index]) { index = j; // index of lower number } } int smallerNumber = array[index]; array[index] = array[i]; array[i] = smallerNumber; } } }"} {"instruction": "Write a dictionary comprehension to mapp the following list", "input": "[('a',0),('b',1),('c',2)]", "output": "{key: value for (key,value) in [('a',0),('b',1),('c',2)]}"} {"instruction": "Create a class called RelatedManagerListSerializerField that inherits from ListSerializerField. The class should have an __init__ method that takes in a serializer, sort_by, and use_prefetch as arguments. The class should also have a pre_value method that takes in fields and exclude as arguments, and a set_value method that takes in a value as an argument. The set_value method should check if the value is None, an Iterable, a QuerySet, or a Manager, and then set the items, _native_items, and _python_items attributes accordingly. Finally, the set_value method should loop through the values and add each item to the class using the add_item method.", "input": "", "output": "# -*- coding: utf-8 -*-\nfrom collections import Iterable\ntry:\n from django.db.models.query import QuerySet\n from django.db.models import Manager\nexcept ImportError:\n QuerySet = None\n Manager = None\n\nfrom aserializer.fields import ListSerializerField\nfrom aserializer.django.utils import get_local_fields, get_related_fields\n\n\nclass RelatedManagerListSerializerField(ListSerializerField):\n\n def __init__(self, serializer, sort_by=None, use_prefetch=False, *args, **kwargs):\n super(RelatedManagerListSerializerField, self).__init__(serializer=serializer, sort_by=sort_by, *args, **kwargs)\n self.use_prefetch = use_prefetch\n\n def pre_value(self, fields=None, exclude=None, **extras):\n super(RelatedManagerListSerializerField, self).pre_value(fields=fields, exclude=exclude, **extras)\n self.use_prefetch = extras.get('use_prefetch', self.use_prefetch)\n\n def set_value(self, value):\n if value is None:\n return\n elif isinstance(value, Iterable):\n values = value\n elif isinstance(value, (QuerySet, Manager)):\n # if using prefetch_related, we can't use only as it will re-fetch the data\n if not self.use_prefetch and (self.only_fields or self.exclude):\n local_fields = get_local_fields(value.model)\n related_fields = get_related_fields(value.model)\n only_fields = [f.name for f in local_fields]\n if self.only_fields:\n only_fields = [f for f in only_fields if f in self.only_fields]\n exclude_fields = [f.name for f in local_fields if f.name in self.exclude]\n if exclude_fields:\n only_fields = [f for f in only_fields if f not in exclude_fields]\n only_fields += [f.name for f in related_fields]\n # .only() returns a QuerySet of RelatedDjangoModel_Deferred objects?\n values = value.only(*only_fields)\n else:\n values = value.all()\n else:\n return\n self.items[:] = []\n self._native_items[:] = []\n self._python_items[:] = []\n for item in values:\n self.add_item(source=item)"} {"instruction": "Create an MySQL query that finds customers whose age is between 18 and 25", "input": "", "output": "SELECT * FROM customers WHERE age BETWEEN 18 AND 25;"} {"text": "[DE Wikipedia] Scott Harrington\n\nScott Harrington ist der Name folgender Personen: * Scott Harrington (Rennfahrer) (* 1963), US-amerikanischer Automobilrennfahrer Scott Harrington (Eishockeyspieler) (* 1993), kanadischer Eishockeyspieler"} {"instruction": "Write a function that takes two arguments, an array arr and a value x, and returns the number of times x appears in the array arr.", "input": "arr = [1, 2, 3, 4, 5, 6, 7, 8, 5] x = 5", "output": "def count_val(arr, x): count = 0 for i in arr: if i == x: count += 1 return count count_val(arr, x)"} {"text": "[HI Wikipedia] मूर्वा\n\nमूर्वा (वानस्पतिक नाम : Clematis Gouriana) या 'मरोड़फली' नाम की लता हिमालय के उत्तराखण्ड को छोड़ भारतवर्ष में और सब जगह होती है। इसमें सात-आठ डंठल निकलकर इधर उधर लता की तरह फैलते हैं। फूल छोटे छोटे, हरापन लिए सफेद रंग के होते हैं। इसके रंशे बहुत मजबूत होते हैं जिससे प्राचीन काल में उन्हें वटकर धनुष की डोरी बनाते थे। उपनयन में क्षत्रिय लोग मूर्वा की मेखला धारण करते थे। एक मन पत्तियों से आधा सेर के लगभग सुखा रेशा निकलता है, जिससे कहीं कहीं जाल बुने जाते हैं। त्रिचिनापल्ली में मूर्वा के रेशों से बहुत अच्छा कागज बनता है। ये रेशे रेशम की तरह चमकीले और सफेद होते हैं। मूर्वा की जड़ औषध के काम में भी आती है। वैद्य लोग इसे यक्ष्मा और खांसी में देते हैं। आयुर्वेद में यह अति तिक्त, कसैली, उष्ण तथा हृदयरोग, कफ, वात, प्रमेह, कुष्ठ और विषमज्वर को दूर करनेवाली मानी जाती है। पादप"} {"instruction": "Write a C program to calculate the order of a particular number in ascending order.", "input": "input_number = 4", "output": "int input_number = 4; int order = 0; for(int i=0; i < input_number; i++){ order++; } printf(\"The order of the number %d in ascending order is %d.\", input_number, order);"} {"instruction": "Design a Node.js program to send a push notification to users when the deadline of a task is reached.", "input": "", "output": "const { Notifications } = require('node-notifier'); function sendPushNotification() { const message = \"This is a reminder that your deadline is approaching\"; const notification = new Notifications({message}) notification.send(); }; // Function to monitor the deadline function deadlineMonitor() { setInterval(function(){ // Call function to check if the deadline has been reached deadlineReached(); }, 5000); } // Function to check if the deadline has been reached function deadlineReached() { // Set deadline let deadline = new Date(); deadline.setMinutes(deadline.getMinutes() + 15); // Current date const date = new Date(); // If the current date is equal to the deadline, call the push notification if (date === deadline) { sendPushNotification(); } }"} {"instruction": "Write a SQL statement that updates the value of attribute 'salary' to 80000 where the attribute 'deptname' is equal to 'sales'.", "input": "", "output": "UPDATE employees SET salary = 80000 WHERE deptname = 'sales';"} {"instruction": "Derive the formula for calculating the circumference of a circle.", "input": "", "output": "The formula for calculating the circumference of a circle is C = 2*π*r, where r is the radius of the circle."} {"instruction": "Create a function to check if two strings are an anagram of one another using Python.", "input": "str1 = 'cat' str2 = 'tac'", "output": "def anagram_checker(str1, str2): if (len(str1)==len(str2)): if (\"\".join(sorted(str1.lower())) == \"\".join(sorted(str2.lower()))): return True else: return False"} {"instruction": "Generate a Python program that takes in two dates and prints the gap between them in number of days.", "input": "", "output": "from datetime import datetime\n\ndef days_gap(date1, date2):\n d1 = datetime.strptime(date1,\"%m/%d/%Y\")\n d2 = datetime.strptime(date2,\"%m/%d/%Y\")\n day_gap = abs((d2 - d1).days)\n return day_gap"} {"instruction": "Create a python function that can receive a list of integers and return a list of tuples with consecutive numbers.", "input": "[1, 2, 3, 7, 8, 9, 10]", "output": "def get_consecutive(arr):\n result = []\n i = 0\n while i < len(arr):\n s = i\n while (i + 1 < len(arr)) and (arr[i + 1] == arr[i] + 1):\n i += 1\n result.append((arr[s], arr[i]))\n i += 1\n return result\n\n# Test \narr = [1, 2, 3, 7, 8, 9, 10]\nprint(get_consecutive(arr))\n# Output [(1, 3), (7, 10)]"} {"instruction": "Develop a function to find all elements in a given array which appear more than once.", "input": "nums = [4, 3, 6, 7, 3, 8, 4, 9]", "output": "def find_duplicates(nums): duplicates = [] for i in range(len(nums)): for j in range(i+1, len(nums)): if nums[i] == nums[j]: duplicates.append(nums[i]) return duplicates"} {"instruction": "Write a SQL query to select everyone from the table named 'users' with the first name equal to 'John'.", "input": "", "output": "SELECT * FROM users WHERE firstname = 'John';"} {"instruction": "Create a data visualization of the following data set with the target variable as red and the predictor variables as blue.", "input": "data = [[1, 2, 1, 0], [2, 4, 0, 1], [2, 3, 0, 1], [3, 6, 1, 0]]", "output": "import matplotlib.pyplot as plt x_1 = [1, 2, 2, 3] x_2 = [2, 4, 3, 6] target = [1, 0, 1, 0] for i in range(len(x_1)): c = 'r' if target[i] == 1 else 'b' plt.scatter(x_1[i], x_2[i], marker='o', c=c) plt.title(\"Data Visualization\") plt.xlabel(\"x_1\") plt.ylabel(\"x_2\") plt.show()"} {"instruction": "Modify this string in such a way that it should start with \"Hello \" and must end with \" World\".", "input": "str = \"World, say hello\"", "output": "str = \"Hello World\""} {"text": "[EN Wikipedia] William G. Saywell\n\nlink title William George Gabriel Saywell (born 1936) is a Canadian historian. He is the former president and Vice-Chancellor of Simon Fraser University Early life and education Saywell was born in 1936 in Regina, Saskatchewan to parents John Ferdinand Tupper Saywell and Vera Marguerite Saywell, alongside his elder brother John Saywell. In 1937, the family moved to British Columbia as his father had received a job position to become Lake Cowichan first high school principal. He attended the University of Toronto (U of T) for his Bachelor of Arts, Master's degree, and PhD. While in his second year at U of T, Saywell enrolled in a course called \"the Far East\" which sparked his interest China and Japan. In 1970, once Canada and China established diplomatic relations, Saywell became the first \"resident Sinologist\" at Canada's embassy in Beijing. Career After earning his PhD, he joined the faculty of the Department of East Asian Studies at the University of Toronto. In 1983, Saywell was offered a position as president of Simon Fraser University. During his tenure as SFU's longest-serving president, he helped initiate the development of SFU's downtown Vancouver campus and increased gender equality in SFU's hiring practices. Upon the end of his term as president in 1993, Saywell was named president and chief executive officer of the Asia Pacific Foundation. The next year, he was named a Member of the Order of British Columbia. In 1999, Saywell was appointed a Member of the Order of Canada. A few years later, he joined the Board of Directors of Palcan Fuel Cells Ltd. In 2009, Simon Fraser University formally named their new arts and social sciences complex Saywell Hall. References Living people 1936 births People from Regina, Saskatchewan 20th-century Canadian historians University of Toronto alumni Academic staff of the University of Toronto Simon Fraser University people Academic staff of Simon Fraser University Members of the Order of Canada Members of the Order of British Columbia Businesspeople from Saskatchewan"} {"instruction": "Create a function in PHP to check a given string for palindromes.", "input": "", "output": ""} {"instruction": "Explain what a while loop is.", "input": "", "output": "A while loop is a control flow statement that repeats a set of instructions while a certain condition is true. It consists of a loop condition and a set of instructions that are to be executed as long as the condition remains true. The loop condition is evaluated first, and if it returns true then the instruction set is executed, after which the condition is evaluated again. This process is repeated until the condition returns false, at which point the loop terminates and execution continues at the statement after the loop."} {"instruction": "Generate a python program to extract all the words from a given string and store them in a list.", "input": "", "output": "def extract_words_from_string(s): \n return s.split(' ')"} {"instruction": "Create a recursive function with python as the language to find the sum of all elements in a list.", "input": "", "output": "def sumOfList(list):\n if len(list) == 1:\n return list[0]\n else:\n return list[0] + sumOfList(list[1:])"} {"instruction": "Create a program to apply upper case to a given string.", "input": "String = \"welcome to The world Of gEEks\"", "output": "def upperCaseString(str): res = \"\" for i in range(len(str)): if i==0 or (str[i-1]==' '): res = res + str[i].upper() else: res = res + str[i] return res str = \"welcome to The world Of gEEks\" print(upperCaseString(str))"} {"instruction": "Create a CSS script that centers the login form on the webpage.", "input": "", "output": ".login-form { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }"} {"instruction": "Build a state machine in Python to process incoming keyboard events", "input": "", "output": "# Define a StateMachine class class StateMachine: def __init__(self): self.handlers = {} self.startState = None self.endStates = [] def add_state(self, state): self.handlers[state.name] = state def set_start(self, name): self.startState = name def set_end(self, name): self.endStates.append(name) def run(self): try: handler = self.handlers[self.startState] except: raise(Exception, \"Must call .set_start() before .run()\") while True: # Get the next keyboard event event = get_event() if event: newState = handler.run(event) if newState.name in self.endStates: break else: handler = self.handlers[newState.name]"} {"instruction": "Create a function to generate a random password of length n", "input": "", "output": "import random def generate_password(n): \"\"\" Create a function to generate a random password of length n :param n: the length of the password :return: a random password of length n \"\"\" # create a character list of symbols, alphabets, and numbers characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+-=' # create a list of length n with random characters password = [random.choice(characters) for _ in range(n)] # convert the list to a string password = ''.join(password) # return the password return password"} {"text": "[HI Wikipedia] पेत्रोज़ावोद्स्क\n\nपेत्रोज़ावोद्स्क (रूसी: Петрозаводск, अंग्रेज़ी: Petrozavodsk) रूस के सुदूर पश्चिमोत्तर में स्थित एक शहर है जो उस देश के कारेलिया गणतंत्र नामक संघीय खंड की राजधानी भी है। यह ओनेगा झील के पश्चिमी छोर पर बसा हुआ है और उसके तट पर २७ किमी तक विस्तृत है। पेत्रोज़ावोद्स्क घटना २० सितम्बर १९७७ में अचानक आकाश में बहुत ऊँचाई पर तैरती हुई एक भीमकाय जेलीफ़िश जैसी कई भुजाओं वाली वस्तु देखी। यह अफ़वाह फैल गई कि यह किसी अन्य ग्रह से आये यात्रियों का यान है। कुछ विद्वानों के अनुसार यह किसी सोवियत रॉकेट की उड़ान से पैदा होने वाले अजीब आकृति वाले धुएँ के मोटे बादल थे। अन्य लोगों का मानना था कि यह किसी गुप्त सोवियत परमाणु परीक्षण से उतपन्न बादल थे। सोवियत वैज्ञानिकों के अनुसार यह एक प्राकृतिक घटना थी। विवाद आज भी जारी है और इसे 'पेत्रोज़ावोद्स्क घटना' (Petrozavodsk phenomenon) के नाम से जाना जाता है। कुछ दृश्य इन्हें भी देखें कारेलिया गणतंत्र ओनेगा झील सन्दर्भ कारेलिया गणतंत्र रूस के नगर रूस के गणतंत्रों की राजधानियाँ"} {"instruction": "Using an array, create a web page that prints out all of the array elements.", "input": "arr = [1, 2, 3, 4, 5]", "output": " Array values
        <% for (let i = 0; i < arr.length; i++) { %>
      • <%= arr[i] %>
      • <% } %>
      "} {"instruction": "Update the given function to return a list of tuples where each tuple contains the name and age of each person.", "input": "def get_person_info(name, age): \"\"\"Returns a tuple containing name and age.\"\"\" return \"Person \" + name + \" is \" + age + \" years old.\"", "output": "def get_person_info(name, age): \"\"\"Returns a list of tuples containing name and age.\"\"\" return [(name, int(age))]"} {"instruction": "Create a SQL query to find the employees with the highest salary in each job role.", "input": "", "output": "SELECT a.job_role, a.emp_name, a.salary FROM employees a INNER JOIN ( SELECT job_role, MAX(salary) car_max FROM employees GROUP BY job_role ) b ON a.job_role=b.job_role AND a.salary=b.car_max;"} {"instruction": "Insert a line of code to change the value of the string \"text\" to \"Hello World\".", "input": "String text = \"\";", "output": "String text = \"\"; text = \"Hello World\";"} {"instruction": "Use JavaScript to filter an array of numbers such that only even numbers are returned.", "input": "[1, 4, 6, 7, 8, 3, 10]", "output": "const arr = [1, 4, 6, 7, 8, 3, 10]; const evenArr = arr.filter(num => num % 2 == 0); console.log(evenArr); // Output: [4, 6, 8, 10]"} {"instruction": "Implement a function to find the longest common subsequence between two strings in Python.", "input": "str1 = \"abcdabcd\", str2 = \"bcdee\"", "output": "def lcs(str1, str2):\n n = len(str1) \n m = len(str2) \n \n # Create a matrix to store \n # results of subproblems \n LCSuff = [[0 for k in range(m+1)] for l in range(n+1)] \n \n # Fill the LCSuff matrix in \n # bottom up manner \n for i in range(n+1): \n for j in range(m+1): \n if (i == 0 or j == 0): \n LCSuff[i][j] = 0\n elif (str1[i-1] == str2[j-1]): \n LCSuff[i][j] = LCSuff[i-1][j-1] + 1\n else: \n LCSuff[i][j] = max(LCSuff[i-1][j], LCSuff[i][j-1]) \n \n # finding the common substring \n index = LCSuff[n][m] \n \n # Create a character array \n # to store the lcs string \n lcs = [\"\"] * (index+1) \n lcs[index] = \"\" \n \n # Start from the right-most-bottom-most \n # corner and one by one store characters \n # in lcs[] \n i = n \n j = m \n while (i > 0 and j > 0): \n \n # If current character in str1 and \n # str2 are same, then current\n # character is part of LCS \n if (str1[i-1] == str2[j-1]): \n lcs[index-1] = str1[i-1] \n i -= 1\n j -= 1\n index -= 1\n \n # If not same, then find the larger \n # of two and go in the direction \n # of larger value \n elif (LCSuff[i-1][j] > LCSuff[i][j-1]): \n i -= 1\n else: \n j -= 1\n \n return \"\".join(lcs) \n \nstr1 = \"abcdabcd\"\nstr2 = \"bcdee\"\n\nprint(lcs(str1, str2)) #\"bcd\""} {"instruction": "Write a code in Python to sort a list of integers with the following conditions:\n- Numbers greater than zero should be sorted in ascending order.\n- Numbers equal to zero should remain unchanged.\n- Numbers less than zero should be sorted in descending order.", "input": "[-2, 7, 0, 8, -3]", "output": "def sort_list(numbers):\n result = []\n positive_numbers = []\n negative_numbers = []\n \n #separate negative and positive numbers\n for i in numbers:\n if i > 0:\n positive_numbers.append(i)\n elif i < 0:\n negative_numbers.append(i)\n else:\n result.append(i)\n \n #sort the positive numbers\n positive_numbers.sort()\n #sort the negative numbers in descending order\n negative_numbers.sort(reverse=True)\n \n #concatenate all of the separate lists\n result += positive_numbers\n result += negative_numbers\n \n return result"} {"instruction": "Write a SQL query to filter out records that contains an empty string.", "input": "Table 1: Name | Job | City -----|-----|------- John | Programmer | Jane | Office Assistant | San Francisco Bob | Designer |", "output": "SELECT * FROM Table_1 WHERE Job != '' AND City != '';"} {"instruction": "Convert the given input string to lower case keeping all other characters same.", "input": "FEDCbA", "output": "fedcba"} {"instruction": "Find the largest and smallest number in a given list.", "input": "[5, 10, 20, 7, -8, 15]", "output": "import math my_list = [5, 10, 20, 7, -8, 15] largest = max(my_list) smallest = min(my_list) print(\"Largest element is:\", largest) print(\"Smallest element is:\", smallest)"} {"instruction": "Write a Python function to convert a given floating point number to binary.", "input": "19.66", "output": "def decimal_to_binary(f_num):\n b_str = \"\"\n int_num = int(f_num)\n f_num = f_num - int_num\n\n while int_num > 0:\n b_str = str(int_num % 2) + b_str\n int_num //= 2\n\n b_str = \"1.\" + b_str\n\n while f_num > 0: \n f_num *= 2\n int_num = int(f_num)\n if int_num == 1:\n b_str += \"1\"\n else:\n b_str += \"0\"\n f_num = f_num - int_num\n\n return b_str"} {"instruction": "Convert a list of strings to a list of integers.", "input": "list_of_strings = [\"1\", \"2\", \"3\"]", "output": "list_of_ints = [1, 2, 3]"} {"instruction": "Design an API in Python that stores a list of books in a database. The API should be capable of retrieving the list, inserting a new book, deleting a book, and updating a book's data.", "input": "Not applicable", "output": "import sqlite3\n\nclass LibraryAPI:\n \n def __init__(self):\n self.db_conn = sqlite3.connect('library.db')\n self.db_cursor = self.db_conn.cursor()\n \n def get_books(self):\n book_list = []\n self.db_cursor.execute('SELECT * FROM books')\n books = self.db_cursor.fetchall()\n for book in books:\n book_dict = {}\n book_dict['id'] = book[0]\n book_dict['title'] = book[1]\n book_dict['author'] = book[2]\n book_dict['publisher'] = book[3]\n book_list.append(book_dict)\n return book_list\n \n def insert_book(self, title, author, publisher):\n self.db_cursor.execute('INSERT INTO books(title, author, publisher) VALUES(?, ?, ?)', \n (title, author, publisher))\n self.db_conn.commit()\n \n def delete_book(self, id):\n self.db_cursor.execute('DELETE from books WHERE id = ?', (id,))\n self.db_conn.commit()\n \n def update_book(self, id, title, author, publisher):\n self.db_cursor.execute('UPDATE books SET title=?, author=?, publisher=? WHERE id = ?', \n (title, author, publisher, id))\n self.db_conn.commit()"} {"instruction": "Write a function to generate a set of random numbers in Python.", "input": "", "output": "import random\n\ndef generate_randoms(n):\n # generate a set of n random numbers\n rands = []\n for _ in range(n):\n rands.append(random.randint(1,100))\n return rands\n\ngenerate_randoms(10)"} {"instruction": "Write the output for the following Java program.", "input": "public class OddNumber { public static void main(String[] args) { for(int i=10; i<20; i++) { if(i % 2 == 1) { System.out.println(i); } } } }", "output": "11 13 15 17 19"} {"instruction": "Create a SQL query to update the 'name' on table 'employees' with the value 'User 1' where the id is 1.", "input": "", "output": "UPDATE employees SET name = 'User 1' WHERE id = 1;"} {"instruction": "Write a Python script to perform linear regression on a given dataset.", "input": "[[5, 6], [3, 4], [7, 9], [4, 5]]", "output": "import numpy as np\nfrom sklearn.linear_model import LinearRegression\n\nx = np.array([[5, 6], [3, 4], [7, 9], [4, 5]])\ny = np.array([7, 5, 11, 7])\n\nmodel = LinearRegression().fit(x, y)\n\nprint(model.coef_)\nprint(model.intercept_)"} {"instruction": "Generate code using Python to find the largest and smallest number in a given list.", "input": "[2, 3, 5, 8, 1, 9, 4]", "output": "def min_max(array):\n min_val = array[0]\n max_val = array[0]\n for element in array:\n if(element > max_val):\n max_val = element\n if(element < min_val):\n min_val = element\n return (min_val, max_val)"} {"instruction": "Normalize a given vector.", "input": "vector = [2, 5, 6]", "output": "# Calculate sum of vector elements vector_sum = 0 for x in vector: vector_sum += x # Normalize vector normalized_vector = [x/vector_sum for x in vector] # Print the normalized vector print(normalized_vector)"} {"text": "[HI Wikipedia] तुएनसांग\n\nतुएनसांग (Tuensang) भारत के नागालैण्ड राज्य के तुएनसांग ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। विवरण यह पूर्व में स्थित बर्मा देश से कुछ ही दूरी पर है। नागालैण्ड का सबसे ऊँचा पहाड़, सारामाती पर्वत, तुएनसांग के काफ़ी पास है और भारत-बर्मा सीमा पर स्थित है। ट्वेनसांग शहर की स्थापना १९४७ में की गई थी और इसका नाम पास में बसे हुए इसी नाम के ट्वेनसांग गाँव पर रखा गया। इन्हें भी देखें सारामाती पर्वत तुएनसांग ज़िला सन्दर्भ तुएनसांग ज़िला नागालैण्ड के नगर तुएनसांग ज़िले के नगर"} {"instruction": "Create a HTML page containing an input field, a submit button and a table for displaying the results.", "input": "", "output": " A Sample HTML Page
      Results
      "} {"instruction": "Write an SQL query that returns the sum of inventories in the Inventory table.", "input": "", "output": "SELECT SUM(Amount) FROM Inventory;"} {"instruction": "Write a Python program to generate the first n Fibonacci numbers.", "input": "", "output": "def generate_fibonacci_numbers(n): if n==1: return [0] elif n==2: return [0,1] else: fib_list = [0,1] for i in range(2,n): fib_list.append(fib_list[i-1]+fib_list[i-2]) return fib_list"} {"instruction": "Create a Python program to parse a HTML page and extract all the hyperlinks from it.", "input": "let html = \n`\n \n Link 1\n Link 2\n Link 3\n \n`", "output": "from html.parser import HTMLParser\n\nclass LinkParser(HTMLParser):\n def handle_starttag(self, tag, attrs):\n if tag == 'a':\n for (attrs,value) in attrs:\n if attrs=='href':\n print(value)\n\nparser = LinkParser()\nparser.feed(html)"} {"instruction": "Implement a function in Python that takes a 2-dimensional list of integers and returns a list with the same shape, containing the sums of previous elements from left to right.", "input": "[[1, 2, 1],\n [2, 3, 4],\n [1, 4, 6]]", "output": "def accumulator_add(matrix):\n output_matrix = []\n #iterates over all sublists\n for row in matrix:\n #creates a new sublist to store the sums\n output_sublist = []\n sum = 0\n #iterates over all elements in the sublist\n for sublist_element in rows:\n #adds the element to the total sum\n sum +=sublist_element\n #appends the updated total sum to the new sublist\n output_sublist.append(sum)\n #appends the new sublist to the new list\n output_matrix.append(output_sublist)\n #returns the new matrix\n return output_matrix"} {"instruction": "Create a Python program that returns the index of an integer in a sorted array.", "input": "Given a sorted array arr[] = {1, 2, 3, 5, 6, 8, 9}, and an integer x = 8", "output": "def binarySearch(arr, x): \n l = 0\n r = len(arr)-1\n while l <= r: \n mid = l + (r - l)//2\n if arr[mid] == x: \n return mid \n elif arr[mid] < x: \n l = mid + 1\n else: \n r = mid - 1\n return -1"} {"instruction": "Edit the given HTML code so that the paragraphs are numbered.", "input": "

      These are some sample paragraphs.

      This is another one.

      ", "output": "
      1. These are some sample paragraphs.

      2. This is another one.

      "} {"instruction": "Optimize the following Python code to sort a set of numbers (set = [2, 6, 3, 8, 4]) in O(n) time complexity.", "input": "unsorted_list = [2, 6, 3, 8, 4]", "output": "def sort_list(unsorted_list):\n sorted_list = []\n while unsorted_list:\n min_elem = min(unsorted_list)\n unsorted_list.remove(min_elem)\n sorted_list.append(min_elem)\n return sorted_list"} {"text": "[HI Wikipedia] ज़ूग कैन्टन\n\nज़ूग कैन्टन (जर्मन व अंग्रेज़ी: Zug), जिसे कभी-कभी त्ज़ूग कैन्टन भी उच्चारित किया जाता है, स्विट्ज़रलैंड के मध्य भाग में स्थित एक कैन्टन (प्रान्त से मिलता-जुलता प्रशासनिक विभाग) है। यह कैन्टन सन् १३५२ में स्विस परिसंघ का हिस्सा बना था। केवल २३९ वर्ग किमी का यह कैन्टन ज़िलों में विभाजित नहीं है और स्विट्ज़रलैंड के सबसे छोटे कैन्टनों में से एक है। इन्हें भी देखें स्विट्ज़रलैंड के कैन्टन सन्दर्भ ज़ूग कैन्टन स्विट्ज़रलैंड के कैन्टन"} {"instruction": "Create a JavaScript class to represent a rectangle with properties for width and height.", "input": "", "output": "class Rectangle { constructor(width,height) { this.width = width; this.height = height; } }"} {"instruction": "Find the first unique number in the list.", "input": "[1,2,3,4,5,5,4,3,2,1,6]", "output": "6"} {"instruction": "Write a Python program to extract all words from a sentence and print them.", "input": "The quick brown fox", "output": "sentence = \"The quick brown fox\"\nwords = sentence.split(\" \")\n\nfor word in words:\n print(word)\n\n# Output\n# The\n# quick\n# brown\n# fox"} {"instruction": "Create a jQuery function that animates an element's background color from red to green over 3 seconds.", "input": "", "output": "$(\"#element\").animate({ backgroundColor: \"green\" }, { duration: 3000, easing: \"linear\" });"} {"instruction": "Implement a Python code that takes a string and reverses the characters in place.", "input": "string = \"This is easy\"", "output": "def reverse_in_place(string): return string[::-1]"} {"instruction": "This code sends data to a USB device and waits for a reply, then displays it. To use it, run the script with the device and data to send as arguments. The device argument should be in the form of either \"/dev/ttyUSB0\" or \"COM1\". The data can be in the form of either \"0xhexcodes\" or \"string\". If the first data argument is \"icarus\", the script will send 2 known block payloads for an icarus device and show the expected and actual answers if it's a working V3 icarus. After any command is sent, it waits up to 30 seconds for a reply.", "input": "", "output": "#!/usr/bin/env python\n# Copyright 2012-2013 Xiangfu\n# Copyright 2012-2013 Andrew Smith\n# Copyright 2013 Luke Dashjr\n#\n# This program is free software; you can redistribute it and/or modify it under\n# the terms of the GNU General Public License as published by the Free Software\n# Foundation; either version 3 of the License, or (at your option) any later\n# version. See COPYING for more details.\n\n# Linux usage: ./usbtest.py /dev/ttyUSB0 0xhexcodes|string|icarus\n# OR python usbtest.py /dev/ttyUSB0 0xhexcodes|string|icarus\n#\n# Windows usage: ./usbtest.py COM1 0xhexcodes|string|icarus\n#\n# sends the data sepcified to the USB device and waits\n# for a reply then displays it\n#\n# the data can be:\n#\t0xhexcodes: e.g. 0x68656c6c6f20776f726c640a\n#\t\t\twould send \"hello world\\n\"\n#\n#\tstring: e.g. sendsometext\n#\n#\ticarus: sends 2 known block payloads for an icarus device\n#\t\tand shows the expected and actual answers if it's\n#\t\ta working V3 icarus\n\nimport sys\nimport serial\nimport binascii\n\nif len(sys.argv) < 2:\n\tsys.stderr.write(\"Usage: \" + sys.argv[0] + \" device strings...\\n\")\n\tsys.stderr.write(\" where device is either like /dev/ttyUSB0 or COM1\\n\")\n\tsys.stderr.write(\" and strings are either '0xXXXX' or 'text'\\n\")\n\tsys.stderr.write(\" if the first string is 'icarus' the rest are ignored\\n\")\n\tsys.stderr.write(\" and 2 valid icarus test payloads are sent with results displayed\\n\")\n\tsys.stderr.write(\"\\nAfter any command is sent it waits up to 30 seconds for a reply\\n\");\n\tsys.exit(\"Aborting\")\n\n# Open with a 10 second timeout - just to be sure\nser = serial.Serial(sys.argv[1], 115200, serial.EIGHTBITS, serial.PARITY_NONE, serial.STOPBITS_ONE, 10, False, False, 5)\n\nif sys.argv[2] == \"icarus\":\n\n\t# This show how Icarus use the block and midstate data\n\t# This will produce nonce 063c5e01\n\tblock = \"0000000120c8222d0497a7ab44a1a2c7bf39de941c9970b1dc7cdc400000079700000000e88aabe1f353238c668d8a4df9318e614c10c474f8cdf8bc5f6397b946c33d7c4e7242c31a098ea500000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000\"\n\tmidstate = \"33c5bf5751ec7f7e056443b5aee3800331432c83f404d9de38b94ecbf907b92d\"\n\n\trdata2 = binascii.a2b_hex(block.encode('ascii'))[95:63:-1]\n\trmid = binascii.a2b_hex(midstate.encode('ascii'))[::-1]\n\tpayload = rmid + rdata2\n\n\tprint(\"Push payload to icarus: \" + binascii.hexlify(payload).decode('ascii'))\n\tser.write(payload)\n\n\tb=ser.read(4)\n\tprint(\"Result:(should be: 063c5e01): \" + binascii.hexlify(b).decode('ascii'))\n\n\t# Just "} {"instruction": "Write a loop that prints the numbers from 0 to 9 on the console.", "input": "", "output": "for (let i = 0; i < 10; i++) { console.log(i); }"} {"instruction": "Create a class in Python to represent a bank account and add methods to display, withdraw, deposit and transfer money.", "input": "The bank account has the following details: - Customer Name: John Doe - Account Number: 12345 - Balance: $1000", "output": "class BankAccount: def __init__(self, customer_name, account_number, balance): self.customer_name = customer_name self.account_number = account_number self.balance = balance def display_balance(self): print('Your balance is', self.balance) def withdraw_amount(self, amount): self.balance -= amount print('You withdrew', amount, 'from your account.') def deposit_amount(self, amount): self.balance += amount print('You deposited', amount, 'into your account.') def transfer_amount(self, target_account, amount): self.balance -= amount target_account.balance += amount print('You transferred', amount, 'to the account', target_account.account_number)"} {"instruction": "Write a Python script to validate the following input", "input": "Validate a Date type field with the following format: YYYY/MM/DD", "output": "# Import the required datetime module import datetime def validate_date(date): # Check if the date matches with the given format try: datetime.datetime.strptime(date, '%Y/%m/%d') return True except ValueError: return False"} {"instruction": "Using the code snippet given below, add a unique class called btn which will remove the default styles from the submit button.", "input": "
      ", "output": "
      "} {"text": "[DE Wikipedia] Liste der Kulturgüter im Bezirk Aigle\n\nDie Liste der Kulturgüter im Bezirk Aigle enthält alle Objekte in den Gemeinden des Bezirks Aigle im Kanton Waadt, die gemäss der Haager Konvention zum Schutz von Kulturgut bei bewaffneten Konflikten, dem Bundesgesetz vom 20. Juni 2014 über den Schutz der Kulturgüter bei bewaffneten Konflikten sowie der Verordnung vom 29. Oktober 2014 über den Schutz der Kulturgüter bei bewaffneten Konflikten unter Schutz stehen. Kulturgüterlisten der Gemeinden * Diese Gemeinde besitzt keine Objekte der Kategorien A oder B, kann aber (z. Zt. nicht dokumentierte) C-Objekte besitzen. Weblinks Einzelnachweise"} {"instruction": "Create a program in Python to print out the elements in a list in reverse order.", "input": "List = [\"A\", \"B\", \"C\", \"D\"]", "output": "list = [\"A\", \"B\", \"C\", \"D\"]\n\nfor i in range(len(list)-1, -1, -1):\n print(list[i])"} {"instruction": "Can you generate a Python loop to print out each item in a given list?", "input": "", "output": "myList = [\"item1\", \"item2\", \"item3\"]\n\nfor item in myList:\n print(item)"} {"instruction": "Create a program that assigns an ID to each element of an array.", "input": "arr = [\"Car\", \"Bike\", \"Bus\"]", "output": "# Create program that assigns an ID to each element of an array arr = [\"Car\", \"Bike\", \"Bus\"] # Initialize a counter counter = 0 # Loop over each element of the array for element in arr: # Assign an ID to the element (in this case, the counter value) element_id = counter # Print the assigned ID print(f\"Element {element} is assigned ID {element_id}\") # Increment the counter counter += 1"} {"text": "[DE Wikipedia] Karl-Heinz Warnholz\n\nKarl-Heinz Warnholz (* 24. April 1944 in Geesthacht) ist ein Hamburger Politiker der CDU. Leben und Politik Karl-Heinz Warnholz ist gelernter Bautechniker und trat 1964 in die Bundeswehr als Berufssoldat ein. 1994 beendete er seine Arbeit dort und begann im selben Jahr mit der Geschäftsführung seiner Immobilienfirma, was er bis heute fortsetzt. Karl-Heinz Warnholz ist Vorsitzender der CDU im Ortsverband Hamburg-Rahlstedt und Mitglied des Landesvorstandes in der Hansestadt. Von 1986 bis 1997 war er Abgeordneter in der Bezirksversammlung Wandsbek. Seit Frühjahr 2008 ist er stellvertretender Kreisvorsitzender der CDU im Kreisverband Hamburg-Wandsbek. Seit dem 8. Oktober 1997 ist er gewähltes Mitglied der Hamburgischen Bürgerschaft. Dort ist er Mitglied im Fraktionsvorstand der CDU-Bürgerschaftsfraktion und für seine Fraktion als einfaches Mitglied im Umweltausschuss und als Vorsitzender im Innenausschuss. Des Weiteren ist er in den Kontrollgremien Verfassungsschutz, Wohnraumüberwachung sowie Brief-, Post- und Fernmeldegeheimnis tätig. Er ist Fachsprecher für Inneres. Seine Schwerpunkte in diesem Bereich sind Bundeswehr, Bundespolizei (ehemals BGS), Zoll und Technisches Hilfswerk (THW). 2001 stellte sich Warnholz gegen den Verkauf der Roten Flora. In der Nacht vom 26. auf den 27. April 2001 wurde auf sein Haus ein Anschlag mit Steinen verübt. Im Mai 2007 und Juli 2009 fanden erneut Angriffe auf sein Haus statt. Zur Bürgerschaftswahl 2020 trat er nicht erneut an. Weblinks und Quellen Karl-Heinz Warnholz auf der Homepage der CDU-Bürgerschaftsfraktion Ortsvorsitz der CDU Rahlstedt Einzelnachweise Mitglied der Hamburgischen Bürgerschaft CDU-Mitglied Politiker (20. Jahrhundert) Politiker (21. Jahrhundert) Deutscher Geboren 1944 Mann"} {"instruction": "Construct a program in Python that computes the sum of 3rd and 7th elements of a list.", "input": "list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "def sum_elements(list):\n Sum = list[2] + list[6]\n return Sum\nprint(sum_elements(list))"} {"text": "[EN Wikipedia] Hamamelistes\n\nHamamelistes is a genus of true bugs belonging to the family Aphididae. The species of this genus are found in Europe and Northern America. Species: Hamamelistes betulinus (de Horváth, 1896) Hamamelistes cristafoliae (Monzen, 1954) Hamamelistes spinosus (Shimer, 1867) — Spiny Witch-Hazel Gall Aphid References Hemiptera of Europe Aphididae"} {"instruction": "Optimize the performance of a given Python script.", "input": "", "output": "import time\n\ndef optimize_performance(function):\n start_time = time.time()\n function\n end_time = time.time()\n execution_time = end_time - start_time\n print(\"Function took\", execution_time, \"seconds to execute.\")\n\n # perform optimizations\n optimized_function = function\n start_time = time.time()\n optimized_function\n end_time = time.time()\n execution_time = end_time-start_time\n print(\"Optimized Function took\", execution_time, \"seconds to execute\")"} {"text": "[HI Wikipedia] भारतीय दर्शन में परमाणु\n\nभारतीय दर्शन में परमाणु का उल्लेख पाश्चात्य विज्ञान से कई सदी पहले ही हो गया था। परमाणु और अणु, कई मतों के अनुसार एक ही तत्व से दो नाम हैं। भिन्न भिन्न दर्शन के अनुसार परमाणुओं का अपने तरीके से वर्णन किया गया हैं। परंतु इसका सारांश यह ही निकलता हैं कि परमाणु पदार्थ का सबसे सूक्ष्म अंग हैं, जिसका अधिक विभाजन साध्य नहीं। व्युपत्ति परमाणु संस्कृत भाषा के दो शब्दों का मेल हैं - परम + अणु। परम अर्थात सर्वोत्कृष्ट तथा अणु अर्थात सबसे छोटा हिस्सा। ततः, परमाणु और अणु का स्थूल रूप से अर्थ एक ही हैं। पर चूँकि विज्ञान में अणु से लघु, उसके विभाजित अंगो को संबोधित किया गया हैं, इसलिए अविभाज्य परमाणु को अणु से भिन्न समझना गलत नहीं। वैशेषिक दर्शन वैशेषिक में चार भूतों के चार तरह के परमाणु माने हैं — पृथ्वी परमाणु, जल परमाणु, तेज परमाणु और वायु-परमाणु। पाँचवा भूत आकाश विभु है। इससे उसके टुकड़े नहीं हो सकते। परमाणु इसलिये मानने पड़े हैं कि जितने पदार्थ देखने में आते हैं सब छोटे छोटे टुकड़ों से बने हैं। इन टुकड़ों में से किसी एक को लेकर बराबर टुकड़े करते गए तो अंत में ऐसे टुकड़े होंगे जो दिखाई न पड़ेंगे। वैशेषिकों का सिद्धांत है कि कारण गुणपूर्वक ही कार्य के गुण होते हैं, अतः जैसे गुण परमाणु में होंगे वैसे ही गुण उनसे बनी हुई वस्तुओं में होगे। जैसे, गंध, गुरुत्व आदि जिस प्रकार पृथ्वी परमाणु में रहते हैं उसी प्रकार सब पार्थिव वस्तुओं में होते हैं। परमाणुवाद न्याय और वैशेषिक के मत से इन्हीं परमाणुओं के संयोग से पृथ्वी आदि द्रव्यों की उत्पत्ति हुई है जिसका क्रम प्रशस्तपाद भाष्य में इस प्रकार लिखा गया हैं - जब जीवों के कर्मकल के भोग का समय आता है तब महेश्वर की उस भोग के अनुकूल सृष्टि करने की इच्छा होती है। इस इच्छा के अनुसार जीवों के अद्दष्ट के बल से वायु परमाणुओं में चलन उत्पन्न होता है। इस चलन से उन परमाणुओं में परस्पर संयोग होता है। दो दो परमाणुओं के मिलने से 'द्वयणुक' उत्पन्न होते हैं। तीन द्वयणुक मिलने से 'त्रसरेणु'। चार द्वयणुक मिलने से 'चतुरणुक' इत्यादि उत्पन्न हो जाते हैं। इस प्रकार एक महान वायु उत्पन्न होता है। उसी वायु में जल परमाणुओं के परस्पर संयोग से जलद्वयणुक जलत्रसेरणु आदि की योजना होते होते महान जलनिधि उत्पन्न होता है। इस जलनिधि में पृथ्वी परमाणुओं के संयोग से द्वयणुकादी क्रम से महापृथ्वी उत्पन्न होती है। उसी जलनिधि में तेजस् परमाणुओं के परस्पर संयोग से महान तेजोराशि की उत्पत्ति होती है। इसी क्रम से चारो महाभूत उत्पन्न होते हैं। यही संक्षेप में वैशेषिकों का परमाणुवाद है। तर्कामृत परमाणु अत्यंत सूक्ष्म और केवल अनुमेय है। अतः किसी छेद से आती हुई सूर्य की किरणों में जो छोटे छोटे धुल के कण दिखाई पड़ते हैं उनके टुकड़े करने से अणु होंगे। ये अणु भी जिन सूक्ष्मतिसूक्ष्म कणों से मिलकर बने होंगे उन्हीं का नाम परमाणु रखा गया है। तर्कामृत नाम के एक नवीन ग्रंथ में जो यह लिखा गया है कि सूर्य की आती हुई किरणों की बीच जो धूल के कण दिखाई पड़ते हैं उनके छठे भाग को परमाणु कहते हैं। जालान्तरस्थसूर्यांशौ यत् सूक्ष्मं दृश्यते रजः। भागस्तस्य च षष्ठो यः परमाणुः स उच्यते ॥ निम्नलिखित श्लोक में जाले से आने वाले प्रकाश में दिखने वाले धूल के कणों के ३०वें भाग को परमाणु कहा गया है।…"} {"instruction": "Using C++, write a program to sort an array of strings alphabetically.", "input": "[\"Hello\", \"World\", \"This\", \"Is\", \"A\", \"Test\"]", "output": "#include #include using namespace std; int main() { string arr[] = { \"Hello\", \"World\", \"This\", \"Is\", \"A\", \"Test\" }; int n = sizeof(arr) / sizeof(arr[0]); sort(arr, arr + n); for (int i = 0; i < n; i++) cout << arr[i] << \" \"; return 0; }"} {"instruction": "Create an algorithm to detect if a string is a palindrome or not.", "input": "", "output": "def isPalindrome(s): reversedString = s[::-1] if (s == reversedString): return True return False"} {"instruction": "Take in an array of integers and return the sum of all odd numbers.", "input": "[1,2,3,4,5]", "output": "9"} {"instruction": "List the layers of an artificial neural network.", "input": "", "output": "The layers of an artificial neural network typically include an input layer, one or more hidden layers and an output layer. In addition, some ANNs also include a convolutional layer and/or a pooling layer."} {"instruction": "Write a Python function to check if a given string is an anagram of another or not.", "input": "word1 = \"cat\" word2 = \"tac\"", "output": "def is_anagram(word1, word2): return sorted(word1) == sorted(word2)"} {"instruction": "Create a Python class that defines a circle with a radius.", "input": "", "output": "class Circle:\n def __init__(self, radius):\n self.radius = radius\n \n def get_area(self):\n return 3.14 * (self.radius ** 2)\n \n def get_circumference(self):\n return 2 * 3.14 * self.radius"} {"instruction": "Print only the odd numbers from the given list.", "input": "list_items = [2, 3, 4, 5, 6, 7, 8]", "output": "\"\"\" Print only the odd numbers from the given list \"\"\" list_items = [2, 3, 4, 5, 6, 7, 8] for item in list_items: if item % 2 != 0: print(item)"} {"instruction": "Create a function that takes in an integer \"n\" and prints all perfect numbers between 0 to n.", "input": "n = 20", "output": "def perfect_numbers(n): perfect_numbers = [] for number in range(1, n+1): sum_divisors = 0 for divisor in range(1, number): if number % divisor == 0: sum_divisors += divisor if sum_divisors == number: perfect_numbers.append(number) return perfect_numbers print(perfect_numbers(n))"} {"instruction": "Write a code to count the occurrences of a particular element in a given list.", "input": "list1 = [1, 2, 3, 3, 3, 4, 5] element = 3", "output": "def count_occurrences(list1, element): count = 0 for elem in list1: if elem == element: count += 1 return count if __name__ == \"__main__\": print(\"Number of occurrences of\", element, \"in the list:\", count_occurrences(list1, element))"} {"instruction": "Write a nod.js code to return the current system time.", "input": "", "output": "let currentTime = new Date().toLocaleTimeString(); console.log(currentTime);"} {"instruction": "What is a function pointer?", "input": "", "output": "A function pointer is a variable that holds the address of a function. It can be used to invoke a specific function based on the address stored in the pointer. It is commonly used in C and C++."} {"instruction": "Given a class definition, write a method to count the number of objects created in the class.", "input": "class Student: def __init__(self, name, age): self.name = name self.age = age", "output": "class Student: _count = 0 def __init__(self, name, age): self._count += 1 self.name = name self.age = age @classmethod def get_count(cls): return cls._count"} {"instruction": "Write a Python program to search for a specific word in a given string and return the number of times the string appears.", "input": "String: \"Hello, world! This is a sample message.\"\nWord: \"hello\"", "output": "string = \"Hello, world! This is a sample message.\"\nword = \"hello\"\n\ncount = string.lower().split().count(word.lower())\nprint(f\"The word {word} appears {count} times in the given string.\")"} {"instruction": "Explain the importance and use of an algorithm in computing.", "input": "", "output": "An algorithm is a step-by-step process that a computer can use to solve a problem or achieve a goal. Algorithms are essential to computing systems, as they provide methods for inputting, storing, interpreting, manipulating, and outputting data. Algorithms can process data with speed, accuracy, and reliability, and can be used for a variety of tasks including calculations, simulations, database manipulation, decision making, and artificial intelligence."} {"text": "[HI Wikipedia] सनातन धर्म\n\nसनातन धर्म हिंदू धर्म का एक संप्रदाय है जिसका उपयोग आम हिंदू धर्म के साथ-साथ संस्कृत और अन्य भारतीय भाषाओं में भी किया जाता है। सनातन धर्म को हिंदू धर्म का एक संप्रदाय माना जाए या नहीं, इस पर दुनिया भर के हिंदुओं में मतभेद है, क्योंकि सनातन धर्म ऐतिहासिक वैदिक धर्म पर आधारित है, या हिंदू धर्म का एक वैकल्पिक नाम है। वैदिक काल में भारतीय उपमहाद्वीप के धर्म के लिए सनातन धर्म नाम मिलता है। 'सनातन' का अर्थ है - शाश्वत या 'सदा बना रहने वाला', अर्थात् जिसका न आदि है न अन्त।सनातन धर्म मूलतः भारतीय धर्म है, जो किसी समय पूरे बृहत्तर भारत (भारतीय उपमहाद्वीप) तक व्याप्त रहा है और यह एक समय पर विश्व व्याप्त था परंतु विभिन्न कारणों से हुए भारी धर्मान्तरण के उपरांत भी विश्व के इस क्षेत्र की बहुसंख्यक जनसंख्या इसी धर्म में आस्था रखती है। इतिहास सनातन धर्म जिसे हिन्दू धर्म अथवा वैदिक धर्म भी कहा जाता है। भारत (और आधुनिक पाकिस्तानी क्षेत्र) की सिन्धु घाटी सभ्यता में हिन्दू धर्म के कई चिह्न मिलते हैं। इनमें एक अज्ञात मातृदेवी की मूर्तियाँ, शिव पशुपति जैसे देवता की मुद्राएँ, लिंग, पीपल की पूजा, इत्यादि प्रमुख हैं। इतिहासकारों के एक दृष्टिकोण के अनुसार इस सभ्यता के अन्त के दौरान मध्य एशिया से एक अन्य जाति का आगमन हुआ, जो स्वयं को आर्य कहते थे और संस्कृत नाम की एक हिन्द यूरोपीय भाषा बोलते थे। एक अन्य दृष्टिकोण के अनुसार सिन्धु घाटी सभ्यता के लोग स्वयं ही आर्य थे और उनका मूलस्थान भारत ही था। प्राचीन काल में भारतीय सनातन धर्म में गाणपत्य, शैवदेव, कोटी वैष्णव, शाक्त और सौर नाम के पाँच सम्प्रदाय होते थे। गाणपत्य गणेशकी, वैष्णव विष्णु की, शैवदेव, कोटी शिव की, शाक्त शक्ति की और सौर सूर्य की पूजा आराधना किया करते थे। पर यह मान्यता थी कि सब एक ही सत्य की व्याख्या हैं। यह न केवल ऋग्वेद परन्तु रामायण और महाभारत जैसे लोकप्रिय ग्रन्थों में भी स्पष्ट रूप से कहा गया है। प्रत्येक सम्प्रदाय के समर्थक अपने देवता को दूसरे सम्प्रदायों के देवता से बड़ा समझते थे और इस कारण से उनमें वैमनस्य बना रहता था। एकता बनाए रखने के उद्देश्य से धर्मगुरुओं ने लोगों को यह शिक्षा देना आरम्भ किया कि सभी देवता समान हैं, विष्णु, शिव और शक्ति आदि देवी-देवता परस्पर एक दूसरे के भी भक्त हैं। उनकी इन शिक्षाओं से तीनों सम्प्रदायों में मेल हुआ और सनातन धर्म की उत्पत्ति हुई। सनातन धर्म में विष्णु, शिव और शक्ति को समान माना गया और तीनों ही सम्प्रदाय के समर्थक इस धर्म को मानने लगे। सनातन धर्म का सारा साहित्य वेद, पुराण, श्रुति, स्मृतियाँ, उपनिषद्, रामायण, महाभारत, गीता आदि संस्कृत भाषा में रचा गया है। कालान्तर में भारतवर्ष में मुसलमान शासन हो जाने के कारण देवभाषा संस्कृत का ह्रास हो गया तथा सनातन धर्म की अवनति होने लगी। इस स्थिति को सुधारने के लिये विद्वान संत तुलसीदास ने प्रचलित भाषा में धार्मिक साहित्य की रचना करके सनातन धर्म की रक्षा की। जब औपनिवेशिक ब्रिटिश शासन को ईसाई, मुस्लिम आदि धर्मों के मानने वालों का तुलनात्मक अध्ययन करने के लिये जनगणना करने की आवश्यकता पड़ी तो सनातन शब्द से अपरिचित होने के कारण उन्होंने यहाँ के धर्म का नाम सनातन धर्म के स्थान पर हिंदू धर्म रख दिया। स्वरूप सनातन में आधुनिक और समसामयिक…"} {"instruction": "Create a Python program to remove the characters from specific index within a string.", "input": "mystring = \"Hello, World!\" index = 5", "output": "mystring = \"Hello, World!\" index = 5 result = mystring[:index] + mystring[index+1:] print(\"Result after removing characters from index {}: {}\".format(index, result))"} {"text": "[EN Wikipedia] Laura Emma Marshall Jamieson\n\nLaura Emma Marshall Jamieson (December 29, 1882 – June 30, 1964) was an educator and political figure in British Columbia. She represented Vancouver Centre in the Legislative Assembly of British Columbia from 1939 to 1945 and from 1952 to 1953 as a Co-operative Commonwealth Federation (CCF) member. She was born Laura Emma Marshall in Park Head, Ontario, the daughter of Joseph Marshall and Lucy Smith, and was educated in Owen Sound and at University of Toronto. In 1901, she married John Stewart Jamieson. Jamieson was a member of the BC Public Library Commission and served as a juvenile court judge in Burnaby. She was first elected to the assembly in a 1939 by-election held following the death of Fred Crone and reelected in 1941 and again in 1952. Jamieson was defeated when she ran for reelection in 1945 and 1953. She also served as alderman for the city of Vancouver. Jamieson died in hospital in Vancouver at the age of 81 after a short illness. References 1880s births 1964 deaths British Columbia Co-operative Commonwealth Federation MLAs 20th-century Canadian politicians 20th-century Canadian women politicians Women MLAs in British Columbia"} {"instruction": "Create a Python function that takes in two parameters (n,k) and returns the value of n^k.", "input": "", "output": "def power(n,k):\n result = 1\n for i in range(0,k):\n result *= n\n return result"} {"instruction": "Use Java to send an HTTP request to an API endpoint with a login form.", "input": "", "output": "import java.net.*; import java.io.*; public class HttpClient { public static void main(String[] args) { try { URL url = new URL(\"http://example.com/api/login\"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); // Request headers con.setRequestMethod(\"POST\"); con.setRequestProperty(\"Content-Type\", \"application/json\"); // Request body String body = \"{\\\"username\\\":\\\"john_doe\\\", \\\"password\\\":\\\"password123\\\"}\"; // Send POST request con.setDoOutput(true); DataOutputStream wr = new DataOutputStream(con.getOutputStream()); wr.writeBytes(body); wr.flush(); wr.close(); // Output response int responseCode = con.getResponseCode(); System.out.println(\"Response code: \" + responseCode); BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null) { content.append(inputLine); } in.close(); System.out.println(content.toString()); } catch (Exception ex) { ex.printStackTrace(); } } }"} {"instruction": "Write a code snippet that prints the current date and time in the format YYYY-MM-DD HH:MM:SS.", "input": "", "output": "import datetime # Get the current datetime now = datetime.datetime.now() # Prints the current datetime in YYYY-MM-DD HH:MM:SS format print(now.strftime(\"%Y-%m-%d %H:%M:%S\"))"} {"instruction": "Predict the output of the following Python program.", "input": "my_list = [1,2,3,4,5]\nx = 0\n\nfor i in my_list:\n x += i\n\nprint(x)", "output": "15"} {"instruction": "Using CSS, create a simple page layout with two columns of equal width.", "input": "width: 600px", "output": "
      Content for the first column
      Content for the second column
      "} {"instruction": "Rewrite the following Python class as an JavaScript class with equivalent functions:\n\nclass Person:\n def __init__(self, name):\n self.name = name\n\n def greet(self):\n print(f\"Hello, my name is {self.name}\")", "input": "Not applicable", "output": "class Person {\n constructor(name) {\n this.name = name;\n }\n\n greet() {\n console.log(`Hello, my name is ${this.name}`);\n }\n}"} {"instruction": "Write a regular expression to match the email address \"test@example.com\".", "input": "", "output": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$"} {"instruction": "Write a Python program to clean a given text from unwanted words and punctuations.", "input": "A raw string", "output": "import string\n\ndef clean_text(text):\n # remove punctuation \n translator = str.maketrans('', '', string.punctuation)\n text = text.translate(translator)\n \n # remove unwanted words\n unwanted_words = {'the', 'and', 'a'}\n words = text.split(' ')\n words = [word for word in words if word not in unwanted_words]\n \n return ' '.join(words)"} {"text": "[HI Wikipedia] पर्दा प्रथा\n\nपर्दा एक इस्लामी शब्द है जो अरबी भाषा में फारसी भाषा से आया। इसका अर्थ होता है \"ढकना\" या \"अलग करना\"। पर्दा प्रथा का एक पहलू है बुर्क़ा का चलन। बुर्का एक तरह का घूँघट है जो मुस्लिम समुदाय की महिलाएँ और लड़कियाँ कुछ खास जगहों पर खुद को पुरुषों की निगाह से अलग/दूर रखने के लिये इस्तेमाल करती हैं। कुछ मुस्लिम समुदायों में प्रचलित महिला अलगाव की एक धार्मिक और सामाजिक प्रथा है। यह दो रूप लेता है: लिंगों का शारीरिक अलगाव और आवश्यकता यह है कि महिलाएं अपने शरीर को ढकती हैं ताकि उनकी त्वचा को ढंका जा सके और उनके रूप को छुपाया जा सके। पर्दा प्रथा करने वाली महिला को परदानाशीन या पर्दानिशन कहा जा सकता है। पर्दा शब्द कभी-कभी दुनिया के अन्य हिस्सों में इसी तरह की प्रथाओं पर लागू होता है। प्राचीन काल से मुस्लिम देशों में महिलाओं की गतिशीलता और व्यवहार को प्रतिबंधित करने वाली प्रथाएं मौजूद थीं और इस्लाम के आगमन के साथ तेज हो गईं। 19वीं शताब्दी तक हिंदू अभिजात वर्ग के बीच पर्दा प्रथा बन गई। पर्दा पारंपरिक रूप से निम्न वर्ग की महिलाओं द्वारा नहीं किया जाता था। दीवारों, पर्दों और पर्दों के विवेकपूर्ण उपयोग से इमारतों के भीतर भौतिक अलगाव प्राप्त किया जाता है। एक महिला के परदे में वापसी आमतौर पर उसके घर के बाहर उसकी व्यक्तिगत, सामाजिक और आर्थिक गतिविधियों को प्रतिबंधित करती है। पहना जाने वाला सामान्य पर्दा वस्त्र बुर्का होता है, जिसमें चेहरे को छुपाने के लिए यशमक, घूंघट शामिल हो भी सकता है और नहीं भी। आंखें उजागर हो भी सकती हैं और नहीं भी। अफगानिस्तान में तालिबान के तहत पर्दा सख्ती से किया जाता था, जहां महिलाओं को सार्वजनिक रूप से हर समय पूर्ण पर्दा का पालन करना पड़ता था। केवल करीबी पुरुष परिवार के सदस्यों और अन्य महिलाओं को उन्हें पर्दे से बाहर देखने की अनुमति थी। अन्य समाजों में, पर्दा अक्सर केवल धार्मिक महत्व के निश्चित समय के दौरान ही प्रचलित होता है। उत्तरी भारत के कुछ हिस्सों में विवाहित हिंदू महिलाएं पर्दा का पालन करती हैं, कुछ महिलाएं अपने पति की ओर से बड़े पुरुष संबंधों की उपस्थिति में घूंघट पहनती है। कुछ मुस्लिम महिलाएं बुर्का पहनकर पर्दा करती हैं। दुपट्टा मुस्लिम और हिंदू दोनों महिलाओं द्वारा इस्तेमाल किया जाने वाला घूंघट होता है, जो अक्सर धार्मिक घर में प्रवेश करते समय होता है। भारत में पहले भी हिंदू महिलाओं द्वारा इस प्रथा का पालन कम किया जाता है। पूर्व-इस्लामी मूल प्राचीन भारतीय समाज में, दुनिया भर में अन्य जगहों की तरह, \"महिलाओं की सामाजिक गतिशीलता और व्यवहार को प्रतिबंधित करने वाली प्रथाएं\" मौजूद थीं, लेकिन भारत में इस्लाम के आगमन ने \"इन हिंदू प्रथाओं को तेज कर दिया, और 19 वीं शताब्दी तक पर्दा पूरे भारत में कुलीन समुदाय और उच्च जाति के हिंदुओं की प्रथा थी। हालांकि पर्दा आमतौर पर इस्लाम के साथ जुड़ा हुआ है, कई विद्वानों का तर्क है कि महिलाओं को पर्दा करना और एकांत में रहना इस्लाम से पहले का है; ये प्रथाएं आमतौर पर मध्य पूर्व में विभिन्न समूहों जैसे ड्रूज़, ईसाई और यहूदी समुदायों में पाई जाती थीं। उदाहरण के लिए, बुर्का इस्लाम से पहले अरब में मौजूद था, और उच्च वर्ग की महिलाओं की गतिशीलता बेबीलोनिया, फ़ारसी में प्रतिबंधित थी। इतिहासकारों का मानना ​​है कि 7वीं…"} {"text": "[HI Wikipedia] अटल बिहारी वाजपेयी हिन्दी विश्वविद्यालय\n\nअटल बि‍हारी वाजपेयी हि‍न्‍दी वि‍श्‍ववि‍द्यालय भोपाल में स्थित एक विश्वविद्यालय है। 6 जून 2013 में भारत के तत्कालीन राष्ट्रपति श्री प्रणव मुखर्जी ने इसकी की आधारशि‍ला रखी। यह विश्वविद्यालय तकनीकी, चिकित्सा, कला और वाणिज्य से जुड़े विषयों की शिक्षा प्रदान करेगा। मध्यप्रदेश और भारतवासियों के स्वभाषा और सुभाषा के माध्यम से ज्ञान की परम्परागत और आधुनिक विधाओं में शिक्षण-प्रशिक्षण की व्यवस्था और हिन्दी को गौरवपूर्ण स्थान दिलाने के लिये मध्य प्रदेश सरकार द्वारा इसकी स्थापना 19 दिसम्बर 2011 को की गयी। भारत के पूर्व प्रधानमन्त्री अटल बिहारी वाजपेयी राष्ट्रभाषा हिन्दी के प्रबल पक्षधर रहे हैं। इसीलिये इस विश्वविद्यालय का नाम उनके नाम पर रखा गया। भोपाल चूँकि भारतवर्ष के केन्द्र में स्थित है अत: इस विश्वविद्यालय को वहाँ स्थापित किया गया। इस विश्वविद्यालय का प्रमुख उद्देश्य हिन्दी भाषा को अध्यापन, प्रशिक्षण, ज्ञान की वृद्धि और प्रसार के लिये तथा विज्ञान, साहित्य, कला और अन्य विधाओं में उच्चस्तरीय गवेषणा हेतु शिक्षण का माध्यम बनाना है। यह विश्वविद्यालय मध्य प्रदेश में हिन्दी माध्यम से ज्ञान के सभी अनुशासनों में अध्ययन, अध्यापन एवं शोध कराने वाला प्रथम विश्वविद्यालय है। यहाँ विद्यार्थियों के लिये प्रशिक्षण, प्रमाण‍-‍‍पत्र, पत्रोपाधि, स्नातक, स्नातकोत्तर,जैसे अनेक उपाधि कार्यक्रम संचालित हैं। 30 जून 2012 को प्रो॰ मोहनलाल छीपा इस विश्वविद्यालय के संस्थापक कुलपति नियुक्त किये गये। इससे पूर्व वे महर्षि दयानन्द सरस्वती विश्वविद्यालय, अजमेर के कुलपति थे। भारत के राष्ट्रपति प्रणब मुखर्जी ने 6 जून 2013 को भोपाल के ग्राम मुगालिया कोट में विश्वविद्यालय भवन का शिलान्यास किया। विश्वविद्यालय का भवन 50 एकड़ में बनेगा। अगस्त 2013 से विश्वविद्यालय ने शिक्षण कार्य प्रारम्भ भी कर दिया है। वर्तमान में प्रो.रामदेव भारद्वाज इस विश्वविद्यालय के माननीय कुलपति हैं दिनांक 8/03/2017 को अंतरराष्ट्रिय महिला दिवस के मौके पर विकिपीडिया की टीम के द्वारा कार्य शाला का आयोजन किया गया। प्रथम दीक्षान्त समारोह विश्वविद्यालय का प्रथम दीक्षांत समारोह दिनांक 18 अप्रैल 2017 ,विक्रम संवत 2074,वैशाख कृष्ण ,सप्तमी को सम्पन्न हुआ। समारोह की अध्यक्षता श्री ओम प्रकाश कोहली जी महामहीम राज्यपाल मध्यप्रदेश ने की।सारस्वत अतिथि श्री सीताशरण शर्मा जी,मध्यप्रदेश विधानसभा अध्यक्ष थे। मुख्य अतिथि मुख्यमंत्री शिवराज सिंह चौहान थे।श्री जयभान सिंह पवैया ,उच्च शिक्षा मंत्री मध्यप्रदेश ने दीक्षांत भाषण दिया। उद्देश्य एवं दृष्टि विश्वविद्यालय का मुख्य उद्देश्य हिन्दी भाषा को अध्ययन, प्रशिक्षण, ज्ञान की वृद्धि और प्रसार के लिये तथा विज्ञान साहित्य, कला व अन्य विधाओं में उच्चस्तरीय गवेषणा हेतु शिक्षण का माध्यम बनाना है। उपर्युक्त उद्देश्य की व्यापकता को प्रभावित किये बिना विश्वविद्यालय के निम्नलिखित उद्देश्य होंगे:- विज्ञान, साहित्य, संस्कृति, कला, दर्शन और अन्य विधाओं के अध्ययन और गवेषणा को प्रोन्नत करना, संकलित करना और संरक्षित करना। हिन्दी भाषा में शिक्षा और ज्ञान को प्रोन्नत करना और उसका प्रसार करना और इस प्रयोजन के लिए अन्य भाषाओं से अनुवाद करना, प्रकाशन, उद्देश्य , सूचना प्रौद्योगिकी और रोजगारकौशल का उपयोग संचालित करना।…"} {"text": "[CS Wikipedia] Fakulta informačních technologií ČVUT\n\nFakulta informačních technologií ČVUT v Praze (FIT ČVUT) byla založena 1. července 2009 jako osmá fakulta ČVUT. Jejím prvním děkanem se stal Pavel Tvrdík, který byl děkanem zvolen znovu i v roce 2013. Pro období 2017–2021 byl v červnu 2017 novým děkanem zvolen Marcel Jiřina. Svůj post obhájil i pro funkční období 2021-2025. Historie FIT ČVUT byla založena 1. července 2009, první rok výuky byl zahájen 21. září 2009. Vznikla rozšířením a rozdělením katedry počítačů na Fakultě elektrotechnické ČVUT. Do prvního ročníku se v roce 2009 imatrikulovalo necelých 500 studentů, z toho asi 10 % tvořily ženy a dívky. Asi 10 % studentů pocházelo ze Slovenska a dalších 10 % ze zemí východní Evropy. Studium od začátku probíhá v češtině a v některých oborech i v angličtině. Rozběh fakulty byl v prvním roce hrazen z grantu Operačního programu Praha – Adaptabilita, z fondů ČVUT, půjček a ze sponzorských darů firem. V dalším roce také z dotací Ministerstva školství ČR. Studium Studenti bakalářského a magisterského programu si volí specializaci během studia, nejpozději však se zadáním bakalářské/diplomové práce . Cest do bakalářského programu vede víc – od úspěšné reprezentace v konkrétních soutěžích, dobrého výsledku ve SCIO testech z matematiky nebo obecných studijních předpokladů až po přijímací zkoušku z matematiky. Absolventi bakaláře na FIT mohou pokračovat magisterským programem bez přijímaček. Studijní programy a specializace Specializace bakalářského studijního programu Informatika (BSP) Standardní délka studia 3 roky, titul Bc. Informační bezpečnost Manažerská informatika Počítačová grafika Počítačové inženýrství Počítačové sítě a Internet Počítačové systémy a virtualizace Softwarové inženýrství Teoretická informatika Umělá inteligence Webové inženýrství Specializace magisterského studijního programu Informatika (MSP) Standardní délka studia 2 roky, titul Ing. Program navazuje na bakalářský studijní program Informatika. Teoretická informatika Manažerská informatika Návrh a programování vestavných systémů Počítačová bezpečnost Počítačové systémy a sítě Systémové programování Softwarové inženýrství Webové inženýrství Znalostní inženýrství FIT ČVUT pořádá každý rok algoritmickou soutěž FIKS určenou pro studenty středních škol . Pod záštitou FIT se také konají praktické týmové programovací soutěže UnIT a BEST Hack Day, pořádané pražskou pobočkou mezinárodní studentské organizace BEST. Pro své studenty FIT každoročně pořádá soutěž Výzkumné léto na FIT (VýLeT), který finančně podporuje nadané bakalářské a magisterské studenty a umožňuje jim zapojit se do vědecko-výzkumných aktivit na fakultě. Konference, akce, semináře FIT každoročně pořádá řadu českých a mezinárodních akcí. Mezi nejdůležitější patří akce COFIT, což je kariérní veletrh pro studenty pořádaný 2x ročně.…"} {"instruction": "Generate a program in Python to extract all numbers from a given string", "input": "string = \"The 3 monkeys had 2 apples\"", "output": "import re\n\ndef extract_numbers(string): \n numbers = re.findall('\\d+', string)\n return numbers\n\nstring = \"The 3 monkeys had 2 apples\"\nprint(extract_numbers(string))"} {"instruction": "Perform sentiment analysis on the given text using NLTK library in Python.", "input": "The food here is amazing.", "output": "from nltk.sentiment.vader import SentimentIntensityAnalyzer sentences = [\"The food here is amazing!\"] sid = SentimentIntensityAnalyzer() for sentence in sentences: ss = sid.polarity_scores(sentence) print(\"for sentence: {}, sentiment analysis: {}\".format(sentence, ss)) # Output # for sentence: The food here is amazing!, sentiment analysis: {'neg': 0.0, 'neu': 0.436, 'pos': 0.564, 'compound': 0.6249}"} {"instruction": "Implement a Python function to check if an integer is even or odd.", "input": "", "output": "def is_even(num): return num % 2 == 0"} {"instruction": "Using the input, classify whether the number is even or odd.", "input": "num = 5", "output": "if num % 2 == 0 puts \"The number is even\" else puts \"The number is odd\" end"} {"text": "[HI Wikipedia] ज़ैन-उल-अबिदीन\n\nसुल्तान ग़ियास​-उद​-दीन ज़ैन​-उल-अबिदीन (Zain-ul-Abidin, ) मध्यकालीन कश्मीर में १४२३-१४७४ काल में राज करने वाले एक सुल्तान थे जिनका राज्य आधुनिक भारत के जम्मू व कश्मीर राज्य पर विस्तृत था। वे मध्यकालीन कश्मीर के सबसे महान शासकों में से एक गिने जाते हैं जिन्होनें सर्वधार्मिक उदारता और प्रशासनिक निपुणता के साथ राज किया। हिन्दू व मुस्लिम कश्मीरी लोग इज़्ज़त से बुड शाह (यानि 'बड़े शाह' या 'महान शाह') के नाम से याद करते हैं। उनके देहांत के बाद कश्मीर में शाह मीर वंश का पतन होना शुरु हो गया। उनके शासन के पहले पैंतीस वर्ष उनके समकालीन कश्मीरी इतिहासकार जोनराज की 'द्वितीय राजतरंगिणी' में और बाक़ी के राजकाल जोनराज के शिष्य श्रीवर की 'तृतीय राजतरंगिणी' नामक इतिहास-ग्रन्थ में वर्णित हैं। इन्हें भी देखें जोनराज सन्दर्भ कश्मीर के लोग भारत का इतिहास कश्मीर का इतिहास भारतीय राजा"} {"instruction": "Write a Python script to check for syntactic correctness of an algorithm.", "input": "Algorithm = \"1. Read input 2. Initialize variables 3. Process input 4. Output result\"", "output": "def is_algorithm_syntactically_correct(algorithm): algorithm = algorithm.replace('\\n', ' ').replace('\\t ', ' ').lower() required_words = ['read', 'input', 'initialize', 'variables', 'process', 'output', 'result'] for word in required_words: if word not in algorithm: return False return True"} {"text": "[HI Wikipedia] घर्षणमारक धातु एवं मिश्रातु\n\nघर्षणमारक धातु एवं मिश्रातु (Antifriction metals and alloys) वे धातुएँ तथा मिश्रातु है जो परस्पर घिसकर चलने वाले दो मशीन-पुर्जों के बीच घर्षण गुणांक को कम करने में सहायक होती हैं तथा घर्षण के कारण स्वयं भी कम घिसती हैं। परिचय घूमनेवालों चक्कों अथवा पहियों के अबाध गति से चलते रहने के लिये यह आवश्यक है कि जिस धुरी पर वे घुमते हैं, वह घिसकर पतली न होने पाए और न गरम ही हो सके। साधारणत: इस कठिनाई से बचने के लिये स्नेहक (लुब्रिकेटिंग आयल, lubricating oil) का प्रयोग किया जाता रहा है, किंतु तेज चलनेवाली मशीनों के लिये केवल स्नेहक का उपयोग घिसाई एव रगड़ को रोकने में असफल सिद्ध होता है। इसी प्रकार जब किसी मशीन का एक भाग उसके दूसरे भाग पर बराबर घूमता है, तब वहाँ भी रगड़ तथा घिसाई से बचने का उपाय आवश्यक होता है। इस उपाय के लिये मशीनों एवं चक्कों के ऐसे बिंदुओं पर, जहाँ घिसाई एवं रगड़ का प्रभाव पड़ता है, गेंद अथवा बेलन के आकार के कुछ विशेष धातुओं से बने ठोस काम में लाए जाते हैं। ये उस मशीन अथवा चक्के के घूमने के साथ-साथ स्वयं भी अपनी जगह पर घूमते रहते हैं। इनपर मशीन की घिसाई का पूरा दबाव पड़ता है। इन ठोसों को बेयरिंग (bearing) कहा जाता है। ये बेयरिंग धातु के बने मजबूत खाँचे वा नाल (casing) में बैठा दिए जाते हैं, जिसमें स्वयं घूमते रहने पर भी ये अपनी नियत स्थिति से हटने न पाएँ। बेयरिंग बनाने के लिये विशेष धातु एवं मिश्रधातुओं का प्रयोग किया जाता है, जो गति से घूमते रहने पर भी घर्षण एवं ताप के कारण न तो घिसने पाती हैं और न दबाव पड़ने पर टूट ही पाती हैं। घर्षण के प्रभाव से घिसाई को कम से कम करने के लिये कड़ी धातुओं का प्रयोग सदा उपयोगी नहीं होता, क्योंकि कड़ी धातुओं में रगड़ पड़ने पर ताप शीघ्र उत्पन्न होता है और मशीन के उस भाग पर, जो ऐसी कड़ी धातु की बेयरिंग पर चल रहा हो, घिसाई का हानिकारक प्रभाव पढ़ता है। इस कुप्रभाव को रोकने तथा घर्षणगुणांक (Coefficient of friction) को कम से कम रखने के लिये ऐसी मुलायम धातु एवं मिश्रधातुओं का प्रयोग किया जाता है जो अधिक से अधिक अघर्षणीय हों तथा साथ ही टिकाऊ भी हों। प्रयोग की जाने वाली धातुएंम् तथा मिश्रातुएँ मशीनों की गति बढ़ने के साथ साथ नए प्रकार की बेयरिंग धातुओं एवं मिश्रधातुओं का आविष्कार होता जाता है। किसी विशेष गति एवं मशीन के उपयुक्त ही बेयरिंग धातुओं का चुनाव किया जाता है। इसके लिये मिश्रधातु बनाने में वंग, सीसा, ताँबा, लोहा, ऐंटिमनी, जस्ता, आर्सेनिक, बिस्मथ, कैडमियम, निकल, चाँदी एवं फास्फोरस जैसी धातुओं का न्यूनाधिक मात्रा में प्रयोग किया जाता है। नीचे कुछ ऐसी महत्वपूर्ण मिश्रधातुएँ दी गई हैं, जिनका प्रयोग अघर्षणीय धातु के रूप में बड़े पैमाने पर होता है : वंग एवं सीसा मिश्रितधातु पिछली एक शताब्दी से अधिक समय से 'बैबिट मेटल' के नाम से वंग, ताँबा तथा ऐंटिमनी मिश्रित धातु का प्रयोग बेयरिंग बनाने में होता रहा है। १८३९ ई. में आइज़क बैबिट ने इस मिश्रधातु का आविष्कार बेयरिंग बनाने के लिये किया। इसमें लगभग ८९.३ प्रति शत वंग, ८.९ प्रति शत ऐंटिमनी, तथा १.८ प्रतिशत ताँबा रहता है। वंग स्वयं बहुत मुलायम धातु है, किंतु ताँबा तथा ऐंटिमनी के साथ मिलकर यह बहुत कड़ी मिश्रधातु बनाता है। बैबिट मेटल में कुछ विशेष प्रकार की बेयरिंग बनाने के…"} {"instruction": "Edit a given Python program to add error handling to it.", "input": "def read_csv(filename):\n with open(filename, 'r') as f: \n data = f.readlines()\n return data", "output": "def read_csv(filename):\n try:\n with open(filename, 'r') as f: \n data = f.readlines()\n return data\n except FileNotFoundError: \n print(\"File not found. Please provide a valid filename\")"} {"text": "[HI Wikipedia] अरुणाचल प्रदेश\n\nअरुणाचल प्रदेश भारत का एक उत्तर-पूर्वी राज्य है। अरुणाचल का अर्थ \"उगते सूर्य का पर्वत\" है (अरूण + अचल ; 'अचल' का अर्थ 'न चलने वाला' = पर्वत होता है।)। प्रदेश की सीमाएँ दक्षिण में असम दक्षिणपूर्व में नागालैंड पूर्व में बर्मा/म्यांमार पश्चिम में भूटान और उत्तर में तिब्बत से मिलती हैं। ईटानगर राज्य की राजधानी है। प्रदेश की बोलचाल की मुख्य भाषा हिन्दी है। अरुणाचल प्रदेश चीन के तिब्बत स्वायत्त क्षेत्र के साथ 1,129 किलोमीटर सीमा साझा करता है। भारत की जनगणना २०११ के अनुसार, अरुणाचल प्रदेश की आबादी 1,382,611 और 83,743 वर्ग किलोमीटर (32,333 वर्ग मील) का क्षेत्रफल है। यह एक नैतिक रूप से विविध राज्य है, जिसमें मुख्य रूप से पश्चिम में मोनपा लोग, केन्द्र में तानी लोग, पूर्व में ताई लोग और राज्य के दक्षिण में नागा लोग हैं। राज्य का एक बड़ा हिस्सा दक्षिण तिब्बत के क्षेत्र के हिस्से के रूप में पीपुल्स रिपब्लिक ऑफ़ चाइना और चीन गणराज्य (ताइवान) दोनों द्वारा दावा किया जाता है। भौगोलिक दृष्टि से पूर्वोत्तर के राज्यों में यह सबसे बड़ा राज्य है। पूर्वोत्तर के अन्य राज्यों की तरह इस प्रदेश के लोग भी तिब्बती-बर्मी मूल के हैं। वर्तमान समय में भारत के अन्य भागों से बहुत से लोग आकर यहाँ आर्थिक और सांस्कृतिक गतिविधियाँ कर रहे । इतिहास अरुणाचल प्रदेश को पहले पूर्वात्तर सीमान्त एजेंसी (नॉर्थ ईस्ट फ़्रण्टियर एजेंसी- नेफ़ा) के नाम से जाना जाता था। यहाँ का इतिहास लिखित रूप में उपलब्ध नहीं है। मौखिक परंपरा के रूप में कुछ थोड़ा सा साहित्य और ऐतिहासिक खंडहर हैं जो इस पर्वतीय क्षेत्र में मिलते हैं। इन स्थानों की खुदाई और विश्लेषण के द्वारा पता चलता है कि ये ईस्वी सन प्रारम्भ होने के समय के हैं। ऐतिहासिक प्रमाणों से पता चलता है कि यह जाना-पहचाना क्षेत्र ही नहीं था वरन जो लोग यहाँ रहते थे और उनका देश के अन्य भागों से निकट का सम्बन्ध था। अरुणाचल प्रदेश का आधुनिक इतिहास 24 फरवरी 1826 को 'यण्डाबू सन्धि' होने के बाद असम में ब्रिटिश शासन लागू होने के बाद से प्राप्त होता हैं। सन 1962 से पहले इस राज्य को नार्थ-ईस्ट फ़्रण्टियर एजेंसी (नेफ़ा) के नाम से जाना जाता था। संवैधानिक रूप से यह असम का ही एक भाग था परन्तु सामरिक महत्त्व के कारण 1965 तक यहाँ के प्रशासन की देखभाल विदेश मन्त्रालय करता था। 1965 के पश्चात असम के राज्पाल के द्वारा यहाँ का प्रशासन गृह मन्त्रालय के अन्तर्गत आ गया था। सन 1972 में अरुणाचल प्रदेश को केन्द्र शासित राज्य बनाया गया था और इसका नाम 'अरुणाचल प्रदेश' किया गया। इस सब के बाद 20 फरवरी 1987 को यह भारतीय संघ का 24वाँ राज्य बनाया गया। भूगोल इस राज्य के पश्चिम, उत्तर और पूर्व में क्रमश: भूटान, तिब्बत, चीन और म्यांमार देशों की अन्तरराष्ट्रीय सीमाएँ हैं। अरुणाचल प्रदेश की सीमा नागालैंड और असम से भी मिलती है। इस राज्य में पहाड़ी और अर्द्ध-पहाड़ी क्षेत्र है। इसके पहाड़ों की ढलान असम राज्य के मैदानी भाग की ओर है। 'कामेंग', 'सुबनसिरी', 'सिआंग', 'लोहित' और 'तिरप' आदि नदियाँ इसे अलग-अलग घाटियों में विभाजित कर देती हैं। अरुणाचल का अधिकांश भाग हिमालय से ढका है, लेकिन लोहित, चांगलांग और तिरप पतकाई पहाडि़यों में स्थित हैं। काँग्तो, न्येगी कांगसांग, मुख्य गोरीचन चोटी और पूर्वी गोरीचन चोटी इस…"} {"instruction": "Explain what is hyperparameter tuning and provide a basic example.", "input": "", "output": "Hyperparameter tuning is the process of selecting the optimal hyperparameters of a machine learning algorithm. Hyperparameters are static values that define the behaviors and characteristics of the algorithm, such as learning rate, activation functions and regularization terms. An example of hyperparameter tuning is selecting the optimal learning rate for a neural network so that it converges faster and produces better results."} {"instruction": "Write a function to calculate median of array elements", "input": "", "output": "def get_median(arr): sorted_arr = sorted(arr) length = len(sorted_arr) if length % 2 == 0: median1 = sorted_arr[int(length/2) - 1] median2 = sorted_arr[int(length/2)] median = (median1 + median2) / 2 else: median = sorted_arr[int((length-1)/2)] return median"} {"text": "[EN Wikipedia] Shuwaikh Industrial Area\n\nShuwaikh Industrial Area () is an area of Kuwait City in Kuwait. It comprises three separate districts: Shuwaikh Industrial-1, Shuwaikh Industrial-2, and Shuwaikh Industrial-3. The industrial area is also located nearby to Shuwaikh proper, Shuwaikh Port, Shuwaikh Commercial Area, Shuwaikh Educational Area and Shuwaikh Health Area; all of which form their own census-designated districts. See also Shuwaikh Port Shuwaikh proper References Suburbs of Kuwait City"} {"instruction": "Using a dictionary, store the given student's name and marks as key value pairs.", "input": "name = \"John Doe\" marks = { \"maths\" : 90, \"physics\" : 80, \"chemistry\" : 85 }", "output": "student_data = {} student_data[name] = marks"} {"instruction": "Develop a Python program to generate a list with numbers in range 3 to 12.", "input": "", "output": "# Generate a list with numbers in range 3 to 12 my_list = list(range(3, 13)) print(my_list) # [3, 4, 5, 6, 7, 8, 9, 10, 11, 12]"} {"instruction": "Write a SQL statement that returns the average age of people in the table.", "input": "", "output": "SELECT AVG(age) FROM people;"} {"instruction": "Create a list comprehension in Python to double each element in the list.", "input": "list = [1, 2, 3, 4, 5]", "output": "result = [x*2 for x in list]"} {"instruction": "How can you access the last element of the following Python array?", "input": "arr = [\"A\",\"B\",\"C\",\"D\",\"E\"]", "output": "arr[-1]"} {"text": "[HI Wikipedia] दक्षिण एशिया\n\nदक्षिण एशिया एक अनौपचारिक शब्दावली है जिसका प्रयोग एशिया महाद्वीप के दक्षिणी भाग के लिये किया जाता है। सामान्यतः इस शब्द से आशय हिमालय के दक्षिणवर्ती देशों से होता है। भारत, पाकिस्तान, श्री लंका और बांग्लादेश को दक्षिण एशिया के देश या भारतीय उपमहाद्वीप के देश कहा जाता है जिसमें नेपाल और भूटान को भी शामिल कर लिया जाता है। सन् (2007) अफगानिस्तान भी इसका सदस्य देश बन चुका है। अब दक्षिण एशिया में आठ देश अवस्थित हैं। दक्षिण एशिया के देशों का एक संगठन दक्षेस भी है जिसके सदस्य देश निम्नवत हैं: जलवायु इस विशाल क्षेत्र की जलवायु उत्तर में शीतोष्ण करने के लिए दक्षिण में उष्णकटिबन्धीय मानसून से इस क्षेत्र के लिए क्षेत्र से काफी भिन्न है। विविधता भी है लेकिन इस तरह के समुद्र तट से निकटता और मानसून एस के मौसमी प्रभाव जैसे कारकों से, ऊँचाई न केवल से प्रभावित है। दक्षिण एशियाई क्षेत्रीय सहयोग संगठन दक्षिण एशियाई क्षेत्रीय सहयोग संगठन (दक्षेस) दक्षिण एशिया के आठ देशों का आर्थिक और राजनीतिक संगठन है। संगठन के सदस्य देशों की जनसंख्या (लगभग १.५ अरब) को देखा जाए तो यह किसी भी क्षेत्रीय संगठन की तुलना में ज्यादा प्रभावशाली है। इसकी स्थापना 8 दिसम्बर 1985 को भारत, पाकिस्तान, बांग्लादेश, श्रीलंका, नेपाल, मालदीव और भूटान द्वारा मिलकर की गई थी। अप्रैल [[२००७|2007 में संघ के 14 वें शिखर सम्मेलन में अफ़गानिस्तान इसका आठवाँ सदस्य बन गया। यह भी देखें सन्दर्भ बाहरी कड़ियाँ दक्षिण एशिया"} {"text": "[EN Wikipedia] Abraham Cykiert\n\nAbraham Cykiert (26 April 1926 – 6 March 2009) was an Australian Holocaust survivor and Melburnian playwright and Zionist activist of the 1970s. Abraham Cykiert was born 26 April 1926 in Łódź, Second Polish Republic. As a child, he was forced to live in Łódź Ghetto during the German occupation of Poland and then was forcibly moved first to Auschwitz death camp, from which he escaped, and then to Buchenwald. The translation of his diaries from Yiddish language was published after the war in The Manchester Guardian. Cykiert died in Melbourne. Bibliography Notes External links Abraham Cykiert (1926-2009) 1926 births 2009 deaths Australian Zionists Jewish Australian writers Łódź Ghetto inmates Polish emigrants to Australia Quadrant (magazine) people Writers from Melbourne Australian dramatists and playwrights"} {"instruction": "Create a function that returns the sum of all elements in a given array of numbers.", "input": "", "output": "def array_sum(arr): sum = 0 for num in arr: sum += num return sum"} {"instruction": "Create a Python program that takes in a list of strings, sorts them, and then prints each string in sorted order.", "input": "[\"banana\", \"apple\", \"orange\", \"pear\"]", "output": "def sortStrings(arr):\n arr.sort()\n \n for string in arr:\n print(string)\n\n#Test\narr = [\"banana\", \"apple\", \"orange\", \"pear\"]\nsortStrings(arr) # Outputs: apple banana orange pear"} {"text": "[HI Wikipedia] भारतीय डाक\n\nभारतीय डाक सेवा () भारत सरकार द्वारा संचालित डाकसेवा है जो ब्रांड नाम के तौर पर इंडिया पोस्ट या भारतीय डाक के नाम से काम करती है। सैकड़ों साल से जारी सफर भारतीय डाक प्रणाली का जो उन्नत और परिष्कृत स्वरूप आज हमारे सामने है, वह हजारों सालों के लंबे सफर की देन है। अंग्रेजों ने डेढ़ सौ साल पहले अलग-अलग हिस्सों में अपने तरीके से चल रही डाक व्यवस्था को एक सूत्र में पिरोने की जो पहल की, उसने भारतीय डाक को एक नया रूप और रंग दिया। पर अंग्रेजों की डाक प्रणाली उनके सामरिक और व्यापारिक हितों पर केंद्रित थी। भारत की आजादी के बाद हमारी डाक प्रणाली को आम आदमी की जरूरतों को केंद्र में रख कर विकसित करने का नया दौर शुरू हुआ। नियोजित विकास प्रक्रिया ने ही भारतीय डाक को दुनिया की सबसे बड़ी और बेहतरीन डाक प्रणाली बनाया है। राष्ट्र निर्माण में भी डाक विभाग ने ऐतिहासिक भूमिका निभाई है और इसकी उपयोगिता लगातार बनी हुई है। आम आदमी डाकघरों और पोस्टमैन पर अगाध भरोसा करता है। तमाम उतार-चढ़ाव के बावजूद इतना जन विश्वास कोई और संस्था नहीं अर्जित कर सकी है। यह स्थिति कुछ सालों में नहीं बनी है। इसके पीछे बरसों का श्रम और सेवा छिपी है। बाहरी कड़ियाँ (अंग्रेजी में) भारतीय डाक और उसकी उत्‍कृष्‍ट सेवाएँ भारतीय डाक के डेढ़ सौ साल पूरे डाक प्रणाली मई २०१३ के लेख जिनमें स्रोत नहीं हैं भारत"} {"instruction": "Given a matrix, write a program to traverse it spirally.", "input": "matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "def spiral_traverse(arr): res = [] top_row, bottom_row = 0, len(arr) - 1 left_col, right_col = 0, len(arr[0]) - 1 while top_row <= bottom_row and left_col <= right_col: for i in range(left_col, right_col + 1): res.append(arr[top_row][i]) top_row += 1 for i in range(top_row, bottom_row + 1): res.append(arr[i][right_col]) right_col -= 1 for i in range(right_col, left_col - 1, -1): res.append(arr[bottom_row][i]) bottom_row -= 1 for i in range(bottom_row, top_row - 1, -1): res.append(arr[i][left_col]) left_col += 1 return res print(spiral_traverse(matrix))"} {"instruction": "Create a Python function called `fitForecast` that takes in the following parameters:\n* `y` (pandas DataFrame): A pandas DataFrame of the time series to be forecasted. The first column should be the date or time period, and the remaining columns should be the time series data.\n* `h` (int): The number of periods ahead to forecast.\n* `sumMat` (numpy array): A numpy array that specifies the hierarchical structure of the time series. It should be a matrix of 0s and 1s, where the rows represent the bottom-level series and the columns represent the higher-level series. If the ith bottom-level series belongs to the jth higher-level series, then the (i,j) entry of the matrix should be 1; otherwise, it should be 0.\n* `nodes` (list): A list of lists that specifies the hierarchical structure of the time series. The ith element of the list should be a list of the indices of the bottom-level series that belong to the ith higher-level series.\n* `method` (string): The method to use for forecasting. It should be one of the following: \"BU\", \"AHP\", \"PHA\", \"FP\", \"OLS\", \"WLSS\", or \"WLSV\".\n* `freq` (string): The frequency of the time series data. It should be one of the following: \"D\", \"W\", \"M\", \"Q\", or \"Y\".\n* `include_history` (boolean): Whether or not to include the historical data in the forecast.\n* `cap` (pandas DataFrame or None): A pandas DataFrame that specifies the capacity of the time series data. It should have the same number of columns as `y`, and the same number of rows as the bottom", "input": "", "output": "# -*- coding: utf-8 -*-\n\"\"\"\nName: fitForecast.py\nAuthor: Collin Rooney\nLast Updated: 7/18/2017\nThis script will contain functions for all types of hierarchical modeling approaches.\nIt will use the prophet package as a forecasting tool.\nThe general idea of it is very similar to the hts package in R, but it is a little\nmore specific with how the dataframe is put together.\nCredit to Rob J. Hyndman and research partners as much of the code was developed with the help of their work\nhttps://www.otexts.org/fpp\nhttps://robjhyndman.com/publications/\nCredit to Facebook and their fbprophet package\nhttps://facebookincubator.github.io/prophet/\nIt was my intention to make some of the code look similar to certain sections in the Prophet and (Hyndman's) hts packages\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\nfrom fbprophet import Prophet\nimport contextlib, os\nfrom scipy.special import inv_boxcox\n\n#%%\ndef fitForecast(y, h, sumMat, nodes, method, freq, include_history, cap, capF, changepoints, n_changepoints, \\\n yearly_seasonality, weekly_seasonality, daily_seasonality, holidays, seasonality_prior_scale, \\\n holidays_prior_scale, changepoint_prior_scale, mcmc_samples, interval_width, uncertainty_samples, \\\n boxcoxT, skipFitting):\n \n forecastsDict = {}\n mse = {}\n resids = {}\n nForecasts = sumMat.shape[0]\n ##\n # If you have a ditionary of Prophet Dataframes already, skip the prophet part, and put all the values into a dictionary\n ##\n if skipFitting == True:\n for key in range(len(y.columns.tolist())-1):\n forecastsDict[key] = pd.DataFrame(y.iloc[:,key+1])\n forecastsDict[key] = forecastsDict[key].rename(columns = {forecastsDict[key].columns[0] : 'yhat'})\n \n if skipFitting == False:\n \n if method == 'FP':\n nForecasts = sum(list(map(sum, nodes)))+1\n \n for node in range(nForecasts):\n nodeToForecast = pd.concat([y.iloc[:, [0]], y.iloc[:, node+1]], axis = 1)\n if isinstance(cap, pd.DataFrame):\n cap1 = cap.iloc[:, node]\n else:\n cap1 = cap\n if isinstance(capF, pd.DataFrame): \n cap2 = capF.iloc[:, node]\n else:\n cap2 = capF\n if isinstance(changepoints, pd.DataFrame):\n changepoints1 = changepoints[:, node]\n else:\n changepoints1 = changepoints\n if isinstance(n_cha"} {"instruction": "Rewrite the following Python code to make it run at least 30% faster.", "input": "def binary_search(arr, x):\n left = 0\n right = len(arr) - 1\n while left <= right:\n mid = (left + right)//2\n if arr[mid] == x:\n return mid\n elif arr[mid] < x:\n left = mid + 1\n else:\n right = mid - 1\n return -1", "output": "def binary_search(arr, x):\n left = 0\n right = len(arr) - 1\n while left <= right:\n mid = left + (right - left)//2\n if arr[mid] == x:\n return mid\n elif arr[mid] < x:\n left = mid + 1\n else:\n right = mid - 1\n return -1"} {"text": "[EN Wikipedia] Ancient Egypt\n\nAncient Egypt was a civilization in Northeast Africa situated in the Nile Valley. Ancient Egyptian civilization followed prehistoric Egypt and coalesced around 3100BC (according to conventional Egyptian chronology) with the political unification of Upper and Lower Egypt under Menes (often identified with Narmer). The history of ancient Egypt occurred as a series of stable kingdoms, separated by periods of relative instability known as Intermediate Periods: the Old Kingdom of the Early Bronze Age, the Middle Kingdom of the Middle Bronze Age and the New Kingdom of the Late Bronze Age. Egypt reached the pinnacle of its power in the New Kingdom, ruling much of Nubia and a sizable portion of the Levant, after which it entered a period of slow decline. During the course of its history, Egypt was invaded or conquered by a number of foreign powers, including the Hyksos, the Nubians, the Assyrians, the Achaemenid Persians, and the Macedonians under Alexander the Great. The Greek Ptolemaic Kingdom, formed in the aftermath of Alexander's death, ruled Egypt until 30BC, when, under Cleopatra, it fell to the Roman Empire and became a Roman province. The success of ancient Egyptian civilization came partly from its ability to adapt to the conditions of the Nile River valley for agriculture. The predictable flooding and controlled irrigation of the fertile valley produced surplus crops, which supported a more dense population, and social development and culture. With resources to spare, the administration sponsored mineral exploitation of the valley and surrounding desert regions, the early development of an independent writing system, the organization of collective construction and agricultural projects, trade with surrounding regions, and a military intended to assert Egyptian dominance. Motivating and organizing these activities was a bureaucracy of elite scribes, religious leaders, and administrators under the control of a pharaoh, who ensured the cooperation and unity of the Egyptian people in the context of an elaborate system of religious beliefs. The many achievements of the ancient Egyptians include the quarrying, surveying, and construction techniques that supported the building of monumental pyramids, temples, and obelisks; a system of mathematics, a practical and effective system of medicine, irrigation systems, and agricultural production techniques, the first known planked boats, Egyptian faience and glass technology, new forms of literature, and the earliest known peace treaty, made with the Hittites. Ancient Egypt has left a lasting legacy. Its art and architecture were widely copied, and its antiquities were carried off to far corners of the world. Its monumental ruins have inspired the imaginations of travelers and writers for millennia. A…"} {"instruction": "Rewrite the following python code using a lambda expression", "input": "def function_name(x): \n return x * 2", "output": "function_name = lambda x: x * 2"} {"instruction": "Classify the following sentence as offensive or non-offensive.", "input": "Sentence: Your work is terrible!", "output": "Offensive."} {"instruction": "What is the command line to create a tar archive in Linux?", "input": "", "output": "The command line to create a tar archive in Linux is \"tar -cvf .tar \". This will create a tar archive with the given name from the provided target directory."} {"text": "[EN Wikipedia] Hurricane Julia (2010)\n\nHurricane Julia was the easternmost Category 4 hurricane recorded in the Atlantic basin since reliable satellite observations became available. The twelfth tropical cyclone, fifth hurricane and fourth major hurricane of the 2010 Atlantic hurricane season, Julia rapidly developed on September 12 from a tropical wave near Cape Verde. Passing near the islands, the system quickly organized into Tropical Storm Julia the next day. On September 14, Julia attained hurricane status and subsequently entered a trend of rapid intensification; the storm strengthened from a minimal hurricane to a low-end Category 4 in only 24 hours. After peaking in intensity, further development was impeded as interaction with nearby Hurricane Igor began to occur; the storm was downgraded to a tropical storm by September 18. It subsequently moved into a region of unfavorable conditions, heading toward lower sea surface temperatures. Correspondingly, Julia entered an extratropical transition on September 20, and advisories on the storm were discontinued by that time. As Julia never posed any significant threat to land, damage related to the storm was minimal. Trace amounts of rain reportedly fell across the Cape Verde islands, causing locally light flooding and minor inconveniences. Gusts battering the territory peaked at , resulting in some wind damage to crops. In addition, these winds produced rough sea conditions, and high waves posed few threats along coastlines. Meteorological history The origins of Julia trace back to a vigorous tropical wave, or an equatorward low-pressure area, which emerged into the Atlantic along the western coast of Africa on September 11. At the time, the system maintained deep convection and strong easterly winds, prompting the National Hurricane Center (NHC) to commence tracking the system as an area of interest. As the wave moved generally westward at , a quick increase in organization as well as a significant drop in surface pressure became notable. The system continued to organize, and several hours later, the NHC noted only a slight increase would suffice for the development of a tropical cyclone. By September 12, a tropical depression developed, and the NHC initiated advisories at 1500 UTC that day. At the time, the cyclone was situated southeast of the southernmost islands of Cape Verde. For several hours, steady strengthening continued as the depression maintained a westward track. Operationally, it was upgraded to Tropical Storm Julia early on September 13, though post-analysis confirmed the storm had reached winds of twelve hours after formation. For several hours, no significant change occurred in its intensity or organization as Julia passed near Cape Verde, though the storm gradually retraced to the west-northwest along the southern…"} {"instruction": "Write a Python program to format a number with leading zeros.", "input": "", "output": "def leading_zeros(num, zeros=6):\n return str(num).zfill(zeros)"} {"instruction": "Create a function to output a nested dictionary from a given list of keys and values.", "input": "list_keys = [\"a\", \"b\", \"c\"] list_vals = [1, 2, 3]", "output": "def dictionary(list_keys, list_vals): dict1 = dict(zip(list_keys, list_vals)) return dict1 final_dict = dictionary(list_keys, list_vals) print(\"Final dictionary:\", final_dict)"} {"instruction": "Provide a Python program to find the average number of elements in the nested list.", "input": "[[1, 2, 3], [4, 5], [6, 7, 8, 9]]", "output": "def avg_elements(list_of_lists):\n total_elements = 0\n for sublist in list_of_lists:\n total_elements += len(sublist)\n return total_elements / len(list_of_lists)"} {"instruction": "How do you use the built-in function filter() in Python?", "input": "", "output": "The filter() function in Python takes a function and an iterable as input arguments. The filter() function filters out elements from the given iterable (for example, a list) that don't satisfy the given condition determined by the function. It returns an iterator containing the filtered elements. Syntax: filter(function, iterable) Example: my_list = [1,4,5,6,7] filtered_list = filter(lambda x: x % 2 == 0, my_list) print(list(filtered_list)) Output: [4, 6]"} {"text": "[EN Wikipedia] Mircea Ştefănescu\n\nMircea Ştefănescu (born 2 December 1936) is a Romanian water polo player. He competed at the 1960 Summer Olympics and the 1964 Summer Olympics. See also Romania men's Olympic water polo team records and statistics List of men's Olympic water polo tournament goalkeepers References External links 1936 births Living people People from Arad County Romanian male water polo players Water polo goalkeepers Olympic water polo players for Romania Water polo players at the 1960 Summer Olympics Water polo players at the 1964 Summer Olympics"} {"instruction": "Given two strings, write a Python code to delete all occurrences of the second string from the first string.", "input": "str1 = \"abcabcabcabcabcabcabcabcabcabc\" str2 = \"abc\"", "output": "def delete_occurrences(str1, str2): return str1.replace(str2, '')"} {"text": "[EN Wikipedia] Graham Smith (priest)\n\nGraham Charles Morell Smith (born 7 November 1947) is a priest in the Church of England. Smith was educated at Whitgift School and Durham University. He was ordained in 1977 and began his ministry as a curate at All Saints', Tooting Graveney. Following this he was vicar of St Paul's Thamesmead. He was also Rural Dean of Oxford and then rector of Leeds Parish Church, a position he held until his appointment as Dean of Norwich. Smith retired from this position on 29 September 2013. References 1947 births People educated at Whitgift School Deans of Norwich Living people Alumni of St Chad's College, Durham"} {"instruction": "Write a Java program to take in 3 strings and combine them into one.", "input": "string1 = \"hello\" string2 = \"world\" string3 = \"!\"", "output": "public class CombineStrings { public static void main(String[] args) { String string1 = \"hello\"; String string2 = \"world\"; String string3 = \"!\"; String output = string1 + string2 + string3 ; System.out.println(output); //hello world! } }"} {"instruction": "Write a function that takes three integers and returns the maximum of the three.", "input": "-2, 5, 7", "output": "def max_of_three(x, y, z): return max(x, y, z) print(max_of_three(-2, 5, 7)) # Output: 7"} {"instruction": "Assign the values of list_2 to the same positions of list_1.", "input": "list_1 = [1, 2, 5, 8] list_2 = [3, 6, 9, 12]", "output": "list_1[0] = 3 list_1[1] = 6 list_1[2] = 9 list_1[3] = 12"} {"text": "[EN Wikipedia] Kimberley Leggett\n\nKimberley Leggett (born 23 March 1993) is a Malaysian British beauty pageant titleholder who was crowned Miss Universe Malaysia 2012. She represented Malaysia at Miss Universe 2012. Personal life Leggett was born and raised in Tanjung Bungah, Penang, Malaysia to Jillian Estrop and Stephen Leggett. She is of Eurasian (British–Serani) descent. She is fluent in English, Malay and French as well as understands Hokkien and Cantonese. She attended St. Christopher International Primary School and later went on to The International School of Penang (Uplands). She graduated with a bachelor's degree in Media Communications and Screen Studies from University of Melbourne, Australia in 2016. Miss Universe Pageant Miss Universe Malaysia 2012 Leggett was crowned Miss Universe Malaysia 2012 on 10 November 2011 at the Sunway Pyramid Convention Centre by Deborah Priya Henry. She also won some subsidiary titles which are Miss Photogenic, Best Bikini Body, and Nestle Fitnesse Award. As the winner, she was chosen to be the ambassadress for WWF Malaysia, Relay for Life and the Malaysian Nature Society amongst others. She worked as a model for various print ads, commercials and fashion shows and most notably appeared on the covers of NewMan Magazine, 260 Celsius and Shape Malaysia. In 2012, Leggett also worked as an emcee and hosted several shows for Malaysian International Fashion Week. Miss Universe 2012 She participated in the 2012 Miss Universe pageant on 19 December which was held in Las Vegas, United States. Although she was considered as a front runner by many pageant portals, she failed to secure a place in the Top 16. Post-Miss Universe 2012 Hosting Leggett co-hosted the Gala Night dinner of Miss Universe Malaysia 2018 alongside actor, Stephen Rahman-Hughes. Other ventures Leggett is currently focusing on a career as a personal trainer and nutrition coach after getting both her Certificate in Fitness and Precision Nutrition. She hopes to take up Physiotherapy in order to complement her practice in the fitness line. She has been a regular attendee of the Australian Health & Fitness Expo and has featured alongside The Biggest Loser Australia's Commando Steve in Women's Health & Fitness Magazine in 2015. References External links Living people Malaysian beauty pageant winners Malaysian female models Malaysian people of British descent Malaysian people of English descent Miss Universe 2012 contestants Malaysian people of Kristang descent Kristang people 1993 births People from Penang Miss Universe Malaysia"} {"instruction": "Develop a Python program to send a mail notification when a certain event is triggered.", "input": "", "output": "import smtplib\n\n# Chnage this variable when the event is triggered\nmessage_sent = False\n\nif not message_sent:\n # Replace sender_email and receiver_email with valid email\n sender_email = \"SENDER EMAIL\"\n receiver_email = \"RECEIVER EMAIL\"\n message = \"The event has been triggered.\"\n \n server = smtplib.SMTP('smtp.gmail.com', 587)\n server.ehlo()\n server.starttls()\n server.login(sender_email, \"YOUR PASSWORD\")\n server.sendmail(sender_email, receiver_email, message)\n message_sent = True"} {"instruction": "Write a Python program using NumPy to generate a random array of 10 values between 0 and 1.", "input": "Not applicable", "output": "import numpy as np\n\n# Generate an array of 10 random values between 0 and 1\narray = np.random.random(10)\n\nprint(array)"} {"instruction": "Generate a code to transform the list of strings into the upper case.", "input": "list = ['apple', 'banana', 'cherry']", "output": "list = ['apple', 'banana', 'cherry'] def transform_list(list): upper_list = [i.upper() for i in list] return upper_list print(transform_list(list))"} {"text": "[CS Wikipedia] Římskokatolická farnost Týn nad Vltavou\n\nŘímskokatolická farnost Týn nad Vltavou je územním společenstvím římských katolíků v rámci vikariátu České Budějovice - venkov českobudějovické diecéze. O farnosti Historie Týn nad Vltavou byl původně součástí majetků pražského biskupství a místní hrad sloužil jako letní rezidence pražských biskupů. Ve 14. století je zde doložena při kostele svatého Kryštofa kolegiátní kapitula. Kapitula zanikla za husitských válek. V 17. století vznikla v Týně farnost s titulem děkanství. Tehdy již bylo zasvěcení místního kostela změněno ze svatého Kryštofa na svatého Jakuba Staršího. V letech 1790–1952 existoval vltavotýnský vikariát. Duchovenstvo farnosti Duchovní správci 1849-1859 R.D. Karel Alois Vinařický 1880-1898 R.D. Václav Kovál 1898-1911 R.D. Josef Lhotský 1912-1917 R.D. Josef Bouše 1917-1918 R.D. Rudolf Šuchman 1918-1938 R.D. Jan Koubek 1938-1946 Mons. Václav Přibek 1946-1958 R.D. Josef Noska 1958-1982 R.D. Václav Štěpán 1982 (březen-srpen) R.D. Adolf Pintíř 1982-1990 D. Hroznata František Janoušek, O.Praem. 1990-2002 R.D. František Pich 2002 (srpen-říjen) R.D. ThLic. Piotr Szkobel († 30. října 2002) 2002-2016 R.D. Marek Antoni Donnerstag, ThD. od r. 2016 R.D. Václav Hes Kněží pocházející z farnosti R.D. Antonín Jaroslav Puchmajer (7. ledna 1769 Týn nad Vltavou – 29. září 1820 Praha), vlastenecký kněz, někdejší farář v Kamenném Újezdě, později v Radnicích u Plzně, spisovatel, básník a překladatel. Současnost Farnost má kontinuálně od svého vzniku sídelního duchovního správce. Od r. 2016 je jím R.D. Václav Hes, který předtím působil v Sušici. Mimo Týna nad Vltavou spravuje také jako administrátor ex currendo farnosti Chrášťany, Křtěnov, Neznašov a Zálší. Odkazy Externí odkazy Profil farnosti na webu Českobudějovické diecéze Týn nad Vltavou Náboženství v Týně nad Vltavou Náboženství v okrese České Budějovice"} {"instruction": "Create a search engine in Python that searches the web for relevant information on a given topic.", "input": "", "output": "import requests\n\n# Perform a google search and returns the first page of results\ndef search(query):\n # Use a custom user-agent to avoid being blocked by Google\n headers = {\n 'User-Agent': 'MySearchEngine/1.0'\n }\n\n # Build the query string\n query_string = {\n 'q': query\n }\n\n # Send the GET request and extract the response details\n result = requests.get('https://www.google.com/search', params=query_string, headers=headers)\n response = result.text\n details = {\n 'url': result.url,\n 'response': result.text\n }\n\n return details\n\nif __name__ == '__main__':\n query = 'cats'\n print(search(query))"} {"instruction": "Create a new dictionary in Python with the given keys and values.", "input": "Keys: A, B Values: 1, 2", "output": "d = {'A': 1, 'B': 2}"} {"instruction": "To use the Vlcclient class for communication with VLC player, follow these steps:\n\n1. Import the necessary modules: threading, time, urllib, player.client.baseplayer, vlc.Meta, vlc.EventType, queue, and util.fileutil.\n\n2. Create an instance of the Vlcclient class.\n\n3. Call the start_client() method to start the threads for handling VLC events.\n\n4. Call the set_proxy() method to create a new VLC player.\n\n5. Call the play() method to start playing a specified track/station.\n\n6. Call the stop() method to stop playback.\n\n7. Call the seek() method to jump to a specified position in the track.\n\n8. Call the play_pause() method to play/pause playback.\n\n9. Call the set_volume() method to set the volume level.\n\n10. Call the mute() method to mute the audio.\n\n11. Call the current() method to return the current song.\n\n12. Call the shutdown() method to shutdown the player.\n\n13. Call the get_current_track_time() method to return the current track time.\n\n14. Call the get_current_playlist() method to return the current playlist.", "input": "", "output": "# Copyright 2016-2021 Peppy Player peppy.player@gmail.com\n# \n# This file is part of Peppy Player.\n# \n# Peppy Player is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n# \n# Peppy Player is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n# \n# You should have received a copy of the GNU General Public License\n# along with Peppy Player. If not, see .\n\nimport threading\nimport time\nimport urllib\n\nfrom player.client.baseplayer import BasePlayer\nfrom vlc import Meta\nfrom vlc import EventType\nfrom queue import Queue\nfrom util.fileutil import FILE_PLAYLIST, FILE_AUDIO\n\nclass Vlcclient(BasePlayer):\n \"\"\" This class extends base player and provides communication with VLC player \n using Python binding for 'libvlc' library \"\"\"\n \n def __init__(self):\n \"\"\" Initializer. Starts separate threads for handling VLC events \"\"\"\n \n self.RADIO_MODE = \"radio\"\n BasePlayer.__init__(self)\n self.mode = self.RADIO_MODE\n self.instance = None\n self.player = None\n self.media = None\n self.current_track = \"\"\n self.seek_time = \"0\"\n self.cd_track_id = None\n self.cd_drive_name = None\n self.END_REACHED = \"end reached\"\n self.TRACK_CHANGED = \"track changed\"\n self.PAUSED = \"paused\"\n self.player_queue = Queue()\n self.threads_running = False\n self.changing_volume = False\n\n def start_client(self):\n \"\"\" Start threads. \"\"\"\n \n self.threads_running = True\n thread_1 = threading.Thread(target = self.radio_stream_event_listener)\n thread_1.start()\n thread_2 = threading.Thread(target = self.handle_event_queue)\n thread_2.start()\n\n def stop_client(self):\n \"\"\" Stop threads \"\"\"\n\n with self.lock:\n self.threads_running = False\n\n def set_proxy(self, proxy_process, proxy=None):\n \"\"\" Create new VLC player \"\"\"\n \n self.instance = proxy_process\n self.proxy = proxy\n self.player = self.instance.media_player_new()\n player_mgr = self.player.event_manager()\n player_mgr.event_attac"} {"text": "[CS Wikipedia] Kruhová rychlost\n\nKruhová rychlost (u Země při povrchu jde o 1. kosmickou rychlost) je rychlost, kterou se pohybuje po kruhové dráze kolem centrálního tělesa v dané výši těleso zanedbatelně malé hmotnosti. Velikost kruhové rychlosti závisí na hmotnosti M (respektive gravitačním parametru ) centrálního tělesa a na poloměru kruhové dráhy podle vztahu , kde G je gravitační konstanta. Kruhová rychlost tedy nepřímo úměrně závisí na odmocnině vzdálenosti. V tabulce vpravo jsou uvedeny hodnoty kruhové rychlosti pro různé výšky kruhových drah v gravitačním poli Země, v následující tabulce kruhové rychlosti přepočítané na povrch (resp. u plynných obrů horní hranici mraků a u Slunce na hranici fotosféry – označeno hvězdičkou) u některých těles sluneční soustavy. Související články Kosmická rychlost Úniková rychlost 2. kosmická rychlost 3. kosmická rychlost 4. kosmická rychlost Rychlost Gravitace Nebeská mechanika Astrodynamika"} {"instruction": "Write a SQL query to retrieve the total amount of purchase each customer has made.", "input": "Table:Customer_orders |userid|product |purchase_price| |------|--------|--------------| |1 |shoes |50 | |2 |socks |30 | |1 |pants |20 |", "output": "SELECT userid, SUM(purchase_price) as total_purchase FROM Customer_orders GROUP BY userid;"} {"instruction": "Create a python script to display a grid pattern.", "input": "", "output": "def printgrid(rows, columns): \n for i in range(1, rows+1): \n for j in range(1, columns+1): \n print(\"*\", end=\" \") \n print(\"\\r\") \n \nprintgrid(4, 4)"} {"instruction": "Design a program to compute the median of 3 integers.", "input": "", "output": "def median(a,b,c): if a >= b: if c >= a: return a elif b >= c: return b else: return c else: if c >= b: return b elif a >= c: return a else: return c"} {"text": "[DE Wikipedia] Hohe Flum\n\nDer oder die Hohe Flum ist mit die höchste Erhebung des Gebirgszugs Dinkelberg. Er liegt zwischen den Ortschaften Wiechs und Nordschwaben im baden-württembergischen Landkreis Lörrach. Auf dem Berg steht der Aussichtsturm Hohe Flum. Geographie Lage Der Hohe Flum befindet sich östlich des Zentrums des Dinkelbergs, der – abgesehen vom westlichsten, auf Schweizer Territorium gelegenen Teil – vollständig innerhalb des Naturparks Südschwarzwald liegt. Die flache Gipfelkuppe liegt rund 500 m südlich vom Ortsrand Wiechs', dem südlichsten Stadtteil von Schopfheim auf Wiechser Gemarkung, und etwa 800 m nordwestlich vom Ortsrand Nordschwabens, dem nördlichsten Stadtteil von Rheinfelden (Baden). Nach Norden fällt die Landschaft in das Wiesental ab, nach Süden leitet sie über die Hochlagen des Dinkelbergs zum Tal des Hochrheins über. Naturräumliche Zuordnung Der Hohe Flum gehört in der naturräumlichen Haupteinheitengruppe Hochrheingebiet (Dinkelberg und Hochrheintal) (Nr. 16) und in der Haupteinheit Dinkelberg (161) zum Naturraum Östliches Dinkelbergplateau (161.02). Aussichtsturm Hohe Flum Auf der Hohen Flum steht ein steinerner Aussichtsturm. Der Turm hat eine quadratische Grundfläche von 5,10 Meter Seitenlänge und ist 13,5 Meter hoch. 62 Stufen führen zur Aussichtsplattform. 1873 wurde eine Turmbaukommission gegründet, die Spenden für den Turmbau sammelte. Carl August Friesenegger (1798–1875), ein Bruder des Malers Gustav Wilhelm Friesenegger, hatte die Pläne für den Turm erstellt. Anfang des Jahres 1874 wurden die Aufträge vergeben und die Arbeiten begannen im März. Am 4. Mai 1874 erfolgte die Grundsteinlegung, wobei verschiedene Urkunden, Zeitungen, Fotografien und Münzen eingemauert wurden. Zu den Förderern des Turmbaus gehörte schon 1874 der Badische Schwarzwaldverein, Ortsverein Schopfheim. Am 8. und 9. August 1874 fand auf dem Hohen Flum das Schopfheimer Bezirks-Sängerfest statt in dessen Rahmen am 8. August der Turm an die Gemeinde Wiechs übergeben und am 9. August eingeweiht wurde. Da der Kostenvoranschlag aus verschiedenen Gründen um etwa 100 % überschritten wurde, war die Turmbaukommission verschuldet und die Gemeinde Wiechs übernahm den Turm, samt den Schulden. Auch die Gemeinde hatte Mühe mit der Last der Schulden und des Unterhalts, da die Eintrittsgelder für den Turm nicht ausreichend waren und auch immer wieder die Forderung nach freiem Eintritt erhoben wurde. 1897 bot die Gemeinde den Turm dem Schwarzwaldverein an, der 1894 den Hohe-Möhr-Turm errichtet hatte. Der Verein sah sich jedoch nicht in der Lage, die Doppelbelastung zu schultern. Es wurde jedoch vereinbart, dass der Verein der Gemeinde eine Pauschale für die Eintrittsgelder bezahlen würde, sofern diese Besuchern freien Eintritt gewähren und den Bauunterhalt übernehmen würde. Die…"} {"text": "[HI Wikipedia] बिभा इंटरनॅशनल स्कूल\n\nबिभा इंटरनेशनल स्कूल (English - Bivha International School), जिसे बिभा अंतरराष्ट्रीय चिकित्सा एंव विज्ञान विद्यालय के नाम से भी जाना जाता हैं। ये अंतरराष्ट्रीय स्तर की नामचीन संस्था हैं, जिसे डाँ पमल(Dr. Pamal) ने सुपौल जिलाके सिमराही बाजार नामक शहर में 8 मई २०११ को स्थापित किया गया था। ये बिभा अंतरराष्ट्रीय विद्यालय की ओर से चलाई जाने वाली शिक्षण परियोजना है। इस संस्था की स्थापना विशेष रूप से ग्रामीण समुदाय के बच्चों के लिए की गई थी। आज यह गुणवत्ता वाले शैक्षिक और अंतरराष्ट्रीय शिक्षा प्रदान करने वाले संस्था के रूप में उच्च ख्याति अर्जित की हैं। यह सर्वश्रेष्ठ ग्रामीण प्रतिभाओं को आगे लाने का उत्तम प्रयास करता है। इस विद्यालय का प्रमुख उद्देश् गांव-गांव तक उत्तम शिक्षा पहुचाना है। ये विद्यालय पूर्णतः आवासीय और गैर मुनाफ़ा प्राप्त करने वाले होते हैं जहाँ विद्यार्थियों को नि:शुल्क आवास, भोजन, शिक्षा एवं खेलकूद सामग्री उपलब्ध कराई जाती है। प्रवेश हेतु कक्षा शिशु वर्ग से स्नातक वर्ग के विद्यार्थियों के लिये प्रवेश परीक्षा होती है एवं हर वर्ष १८० छात्रों का चयन किया जाता है। वर्तमान में बिभा इंटरनॅशनल स्कूल के ३ शाखाएँ हैं। उत्तम शिक्षा के लिए, इसे \"स्कूल ऑफ ईयर\" से भी सम्मानित किया गया हैं। यह स्कूल एक ग़रीब और ग्रामीण समुदाय के लिए दुनिया भर में अंतरराष्ट्रीय शिक्षा की उच्च गुणवत्ता कार्यक्रम प्रदान करता हैं। वर्तमान में इसकी मुख्य अधिकारिक परिसर : बिभा नलेज पार्क, National Highway No - 106, में स्थित हैं। सन्दर्भ बाहरी कडी बिभा अंतरराष्ट्रीयविद्यालय समीति की आधिकारिक वेबसाइट Bivha Corporation University of Bivha"} {"text": "[HI Wikipedia] मीन सॉस\n\nमीन सॉस, एक पीले रंग का तरल है जिसे, मछली और समुद्री नमक के किण्वन से प्राप्त किया जाता है। इसका प्रयोग विभिन्न व्यंजनों में एक मसाले के रूप में प्रयोग किया जाता है। मीन सॉस, दक्षिण पूर्व एशिया और पूर्व एशिया के तटीय क्षेत्रों की कई संस्कृतियों के भोजन का एक मुख्य घटक है और मुख्यत: थाई, कंबोडियाई, वियतनामी और फिलिपीनी भोजन में प्रयोग किया जाता है। सन्दर्भ"} {"instruction": "Create a Python program to generate a random password that satisfies a given set of criteria.", "input": "A password should contain at least one upper case character, one lower case character, one special character and one number.", "output": "import random\nimport string\n\ndef generate_password():\n \n # generate a random string of 8 characters\n characters = string.ascii_letters + string.digits + '!@#$%^&*'\n password = ''.join(random.choice(characters) for i in range(8))\n\n # check if the password satisfies all criteria\n while not satisfy_criteria(password):\n password = ''.join(random.choice(characters) for i in range(8))\n\n return password\n\n# function to check if a given password satisfies all criteria\ndef satisfy_criteria(password):\n\n lower_chars = [c for c in password if c.islower()]\n upper_chars = [c for c in password if c.isupper()]\n special_chars = [c for c in password if c in string.punctuation]\n numbers = [c for c in password if c.isdigit()]\n\n # check if all criteria are met\n if len(lower_chars) == 0 or len(upper_chars) == 0 or len(special_chars) == 0 or len(numbers) == 0:\n return False\n else:\n return True\n\nif __name__ == '__main__':\n \n # generate a random password\n password = generate_password()\n \n # print the generated password\n print('Generated Password: ' + password)"} {"instruction": "Write a function in the Python language to convert a string to a list.", "input": "my_string = \"Welcome to the world of GPT models\"", "output": "def string_to_list(my_string): return my_string.split()"} {"instruction": "Create a PHP function to trim a string and remove all leading and trailing whitespace.", "input": "$string = \" Hello World \";", "output": "function trimString($string) { return preg_replace('/^\\s+|\\s+$/', '', $string); } //calling the function trimString($string); //Returns \"Hello World\""} {"instruction": "Compose a JavaScript code to sum all odd numbers in the range", "input": "From 1 to 10,", "output": "let sum = 0; for (let i = 1; i <= 10; i++) { if (i % 2 != 0) { sum += i; } } console.log(sum); //25"} {"instruction": "Construct a code to find the sum of a series of numbers entered by the user using Python.", "input": "", "output": "total = 0\ncount = 0\n\nwhile True:\n user_input = int(input(\"Enter an integer (enter 0 to stop): \"))\n if user_input == 0:\n break\n \n else:\n total += user_input\n count += 1\n\nprint(\"The sum of\", count, \"numbers is\", total)"} {"instruction": "Construct a declaration in Java to store the coordinates of a point in 3D space.", "input": "", "output": "public class point3D { int x; int y; int z; }"} {"instruction": "Create an HTML web page that has a \"Hello World!\" heading.", "input": "", "output": " Hello World

      Hello World!

      "} {"text": "[EN Wikipedia] Doppler fetal monitor\n\nA Doppler fetal monitor is a hand-held ultrasound transducer used to detect the fetal heartbeat for prenatal care. It uses the Doppler effect to provide an audible simulation of the heart beat. Some models also display the heart rate in beats per minute (BPM). Use of this monitor is sometimes known as Doppler auscultation. The Doppler fetal monitor is commonly referred to simply as a Doppler or fetal Doppler. It may be classified as a form of Doppler ultrasonography (although usually not technically -graphy but rather sound-generating). Doppler fetal monitors provide information about the fetus similar to that provided by a fetal stethoscope. One advantage of the Doppler fetal monitor over a (purely acoustic) fetal stethoscope is the electronic audio output, which allows people other than the user to hear the heartbeat. One disadvantage is the greater complexity and cost and the lower reliability of an electronic device. The device was invented in 1958 by Dr. Edward H. Hon, Originally intended for use by health care professionals, this device is becoming popular for personal use. Types Dopplers for home or hospital use differ in the following ways: Manufacturer: popular manufacturers Baby Doppler, Sonoline, Ultrasound Technologies, Newman Medical, Nicolet (purchased by Natus), Arjo-Huntleigh, and Summit Doppler (now Cooper Surgical). Probe type: waterproof or not. Waterproof probes are used for water births. Probe frequency: 2-MHz or 3-MHz probes. Most practitioners can find the heart rate with either probe. A 3-MHz probe is recommended to detect a heart rate in early pregnancy (8–10 weeks gestation). A 2-MHz probe is recommended for pregnant women who are overweight. The newer EchoHeart 5-MHz transvaginal probes aids in the detection of fetal heart tones (FHT) early in pregnancy (6–8 weeks) and for patients who have a retroverted uterus or throughout pregnancy for FHT detection for women who are obese. Heart rate display: some Dopplers automatically display the heart rate on a built-in LCD; for others the fetal heart rate must be counted and timed by the practitioner. A major advantage of being able to record and share the recording is that it can be emailed to a healthcare professional to be checked if there are any concerns about whether or not it is the fetus's heart rate and whether or not is normal. Typically, they work from about 12 weeks. In response to increasing home usage of clinical fetal doppler systems, the FDA issued a formal statement recommending against at-home use. Fetal dopplers using 2-3MHz ultrasound are prescription devices designed and developed for use by licensed and trained health care professionals. System misuse (duration, angulation) and systems operating outside of intended range can produce thermal and non-thermal…"} {"instruction": "Write a function in Python for printing a given 2D array.", "input": "arr = [[1,2,3], [4,5,6], [7,8,9]]", "output": "def print_2D_array(arr): for row in arr: for element in row: print(element,end=\" \") print() print_2D_array(arr)"} {"instruction": "Create a SQL query that lists all entries from a table that have a given parameter in the distinct column.", "input": "Table: employee Parameter: name", "output": "SELECT DISTINCT name FROM employee;"} {"text": "[EN Wikipedia] Neohermenias thalassitis\n\nNeohermenias thalassitis is a moth of the family Tortricidae. It is found in Thailand and Java. References Moths described in 1910 Eucosmini"} {"text": "[EN Wikipedia] Éric Delaunay\n\nÉric Delaunay (born 4 December 1987) is a French sports shooter. He competed in the men's skeet event at the 2016 Summer Olympics. He qualified to represent France at the 2020 Summer Olympics. References External links 1987 births Living people French male sport shooters Olympic shooters for France Shooters at the 2016 Summer Olympics People from Saint-Lô Skeet shooters Sportspeople from Manche European Games competitors for France Shooters at the 2015 European Games Shooters at the 2019 European Games Shooters at the 2020 Summer Olympics Shooters at the 2023 European Games"} {"text": "[DE Wikipedia] ʿAbdul-Bahāʾ\n\nʿAbdul-Bahāʾ (; geboren 23. Mai 1844 in Teheran, Iran; gestorben 28. November 1921 in Haifa, Israel, damals Völkerbundsmandat für Palästina) war der Sohn des Religionsstifters Bahāʾullāh. Nach dessen Tod wurde er das religiöse Oberhaupt der Bahāʾī-Gemeinde und Ausleger der Heiligen Schriften seines Vaters. Durch sein humanitäres Engagement, seine Schriften und Ansprachen in vielen Ländern, erlangte er als Verfechter des Friedens und der Gerechtigkeit hohe Anerkennung. Den Bahāʾī gilt ʿAbdul-Bahāʾ als moralisches Vorbild. Sein bürgerlicher Name war ʿAbbas Effendi (). Er selbst wählte für sich den Ehrentitel ʿAbdul-Bahāʾ (), der sich von Abd (arabisch, Diener) und Bahāʾ (arabisch, Herrlichkeit) ableitet. Leben ʿAbdul-Bahāʾ wurde in der Nacht des 23. Mai 1844 in Teheran geboren. In dieser Nacht erklärte der Bāb, der im Bahaitum als Bahāʾullāhs Vorläufer verehrt wird, seine Sendung. Seine Mutter war Bahāʾullāhs erste Frau Asie Chanum. In seiner Kindheit erlebte er sowohl die Inhaftierungen und Verbannungen (die finale 1852) seines Vaters aufgrund religiöser Verfolgung als auch den Rückzug seines Vaters in die Berge Kurdistans (1854–1856). In enger Beziehung zu seinem Vater stehend arbeitete er bereits in seiner Jugend als dessen Sekretär und Vertreter gegenüber den Behörden und der Öffentlichkeit. Über die Jahre wurde seine Verantwortung immer umfangreicher. 1873 heiratete er Munire Chanum (1847–1938, bürgerlicher Name Fatime Nahri). Sie hatten neun Kinder, von denen vier Töchter das Erwachsenenalter erreichten. Einen Großteil seines Lebens verbrachte ʿAbdul-Bahāʾ mit seinem Vater und seiner Familie in Gefangenschaft und Verbannung, unter anderem im Gefängnis Akkon. Sein Vater hatte ihn in seinem Testament, dem Buch des Bundes, eingesetzt, seine Schriften zu erläutern und die Gemeinde seiner Anhänger zu leiten. Noch als Gefangener begann er nach dem Tod seines Vaters, Bahāʾī nach Europa und den Vereinigten Staaten zu senden. Auf diese Weise entstanden unter anderem 1894 erste Gemeinden in Nordamerika und 1905 in Deutschland. Zur Jahreswende 1898–99 trafen die ersten amerikanischen Pilger in Haifa ein. Gleichzeitig begann er im Iran, die ersten gewählten Gremien aufzubauen. Ebenso ließ er dort zunächst eine Knaben- und später eine Mädchenschule gründen. Erst im Alter von 64 Jahren erlangte er im Jahr 1908 infolge der jungtürkischen Revolution die Freiheit. Er ließ den Schrein des Bāb in Haifa fertigstellen und konnte 1909 dessen Leichnam endgültig beisetzen. Im Jahr 1910 begann ʿAbdul-Bahāʾ seine Reisen, die ihn durch Ägypten, Europa, die Vereinigten Staaten und Kanada führten, um die Lehren seines Vaters bekannt zu machen. Die Themen seiner Ansprachen im Westen vor den Mitgliedern der jungen Bahāʾī-Gemeinden und in der Öffentlichkeit drehten sich um…"} {"instruction": "How can you pass multiple parameters in a function?", "input": "", "output": "You can pass multiple parameters in a function by using either argument lists, or by using objects or arrays to group multiple parameters together."} {"instruction": "Develop a Python program to sort a given array of numbers in ascending order by selection sort.", "input": "Sort the following array in ascending order: [2, -3, 1, 10, 0]", "output": "def selection_sort(arr):\n \n # Iterate through array \n for i in range(0, len(arr)-1): \n # Find the minimum element in the unsorted subarray \n min_index = i \n for j in range(i+1, len(arr)): \n if arr[min_index] > arr[j]: \n min_index = j \n \n # Swap the found minimum element with the first element \n arr[i], arr[min_index] = arr[min_index], arr[i] \n \n# Driver code \narr = [2, -3, 1, 10, 0] \nselection_sort(arr) \n \nfor i in range(len(arr)): \n print(arr[i]),"} {"instruction": "Explain what a Python dictionary is.", "input": "", "output": "\"\"\" Explain what a Python dictionary is. \"\"\" A Python dictionary is a collection of key-value pairs. Each key is associated with a single value, and each key is unique. Dictionaries are mutable, meaning that their values can be changed after they are created. Dictionaries are commonly used for storing data in a structured form, as well as for rapidly looking up values associated with a given key. They are also commonly used for storing metadata and other related information."} {"instruction": "Create a SQL query to fetch the data from the following tables.", "input": "Table A id name 1 John 2 Mary Table B id age 1 20 2 25", "output": "SELECT a.name, b.age FROM tableA a INNER JOIN tableB b ON a.id = b.id;"} {"instruction": "Create a set of python functions and classes to build a shell command processor.", "input": "", "output": "class Command():\n def __init__(self, command_name, params):\n self.command_name = command_name\n self.params = params\n\n def is_valid_command(self):\n # Your code here\n pass\n\ndef process_command(command):\n # Your code here\n pass"} {"instruction": "Create a function to encrypt and decrypt a string using a Caesar cipher in Python.", "input": "Not applicable", "output": "def encrypt(string, shift):\n encrypted_string = \"\"\n \n for char in string:\n if char == ' ':\n encrypted_string += char\n else:\n encrypted_ascii = ord(char) + shift\n if encrypted_ascii > ord('z'):\n encrypted_ascii -= 26\n encrypted_string += chr(encrypted_ascii)\n \n return encrypted_string\n\ndef decrypt(encrypted_string, shift):\n decrypted_string = \"\"\n \n for char in encrypted_string:\n if char == ' ':\n decrypted_string += char\n else:\n decrypted_ascii = ord(char) - shift\n if decrypted_ascii < ord('a'):\n decrypted_ascii += 26\n decrypted_string += chr(decrypted_ascii)\n return decrypted_string"} {"instruction": "Develop a Python program to calculate the sum of two integers provided as command line arguments.", "input": "Not applicable", "output": "import sys\n\n# Get the command line arguments\na = int(sys.argv[1])\nb = int(sys.argv[2])\n\n# Calculate the sum\nsum = a + b\n\n# Print the result\nprint(sum)"} {"instruction": "Build a Python script to remove all punctuation from a given string.", "input": "\"This is a cool string!\"", "output": "import string\n\ninput_str = \"This is a cool string!\"\npunctuation_removed = input_str.translate(str.maketrans('', '', string.punctuation))\nprint(punctuation_removed)"} {"text": "[HI Wikipedia] मुकेश (गायक)\n\nमुकेश चंद माथुर जुलाई २२, १९२३, दिल्ली, भारत - अगस्त २७, १९७६, लोकप्रिय तौर पर सिर्फ मुकेश के नाम से जाने वाले, हिन्दी सिनेमा के एक प्रमुख पार्श्व गायक थे। मुकेश की आवाज बहुत मधुर थी लेकिन उनके एक दूर के संबंधी मोतीलाल ने उन्हें तब पहचाना जब उन्होंने उसे अपनी बहन की शादी में गाते हुए सुना। मोतीलाल उन्हें बम्बई ले गये और अपने घर में रहने दिया। यही नहीं उन्होंने मुकेश के लिए गायन अभ्यास का पूरा इन्तजाम किया। इस दौरान मुकेश को एक हिन्दी फिल्म निर्दोष (१९४१) में मुख्य कलाकार का काम मिला। पार्श्व गायक के तौर पर उन्हें अपना पहला काम १९४५ में फिल्म पहली नजर में मिला। मुकेश ने हिन्दी फिल्म में जो पहला गाना गाया, वह था दिल जलता है तो जलने दे जिसमें अभिनय मोतीलाल ने किया। इस गीत में मुकेश के आदर्श गायक के एल सहगल के प्रभाव का असर स्पष्ट दिखाई देता है। 1959 में अनाड़ी फ़िल्म के ‘सब कुछ सीखा हमने न सीखी होशियारी’ गाने के लिए सर्वश्रेष्ठ पार्श्व गायन का फिल्मफेयर पुरस्कार मिला था। १९७४ में मुकेश को रजनीगन्धा फिल्म में \"कई बार यूँ भी देखा है\" गाना गाने के लिए राष्ट्रीय फ़िल्म पुरस्कार मिला। १९७६ में जब वे अमेरीका के डेट्रॉएट शहर में दौरे पर थे, तब उन्हें हृदयाघात हुआ और उनकी मृत्यु हो गयी। प्रारम्भिक जीवन इनका जन्म 22 जुलाई 1923 को लुधियाना के जोरावर चंद माथुर और चांद रानी के घर हुआ था। इनकी बड़ी बहन संगीत की शिक्षा लेती थीं और मुकेश बड़े चाव से उन्हें सुना करते थे। मोतीलाल के घर मुकेश ने संगीत की पारम्परिक शिक्षा लेनी शुरू की, लेकिन इनकी दिली ख्वाहिश हिन्दी फ़िल्मों में बतौर अभिनेता प्रवेश करने की थी। गायन करियर मुम्बई आने के बाद इन्हें 1941 में \"निर्दोष\" फ़िल्म में बतौर एक्टर सिंगर पहला ब्रेक मिला। इंडस्ट्री में शुरुआती दौर मुश्किलों भरा था। लेकिन के एल सहगल को इनकी आवाज़ बहुत पसंद आयी। इनके गाने को सुन के एल सहगल भी दुविधा में पड़ गये थे। 40 के दशक में मुकेश का अपना पार्श्व गायन शैली था। नौशाद के साथ उनकी जुगलबंदी एक के बाद एक सुपरहिट गाने दे रही थी। उस दौर में मुकेश की आवाज़ में सबसे ज़्यादा गीत दिलीप कुमार पर फ़िल्माए गये। 50 के दशक में इन्हें एक नयी पहचान मिली, जब इन्हें राजकपूर की आवाज़ कहा जाने लगा। कई साक्षात्कार में खुद राज कपूर ने अपने दोस्त मुकेश के बारे में कहा है कि मैं तो बस शरीर हूँ मेरी आत्मा तो मुकेश है। पार्श्व गायक मुकेश को फ़िल्म इंडस्ट्री में अपना मकाम हासिल कर लेने के बाद, कुछ नया करने की चाह जगी और इसलिए इन्होंने फ़िल्म निर्माता (प्रोड्यूसर) बन गये। साल 1951 में फ़िल्म ‘मल्हार’ और 1956 में ‘अनुराग’ निर्मित की। अभिनय का शौक बचपन से होने के कारण ‘माशूका’ और ‘अनुराग’ में बतौर हीरो भी आये। लेकिन बॉक्स ऑफिस पर ये दोनों फ़िल्में फ्लॉप रहीं। कहते हैं कि इस दौर में मुकेश आर्थिक तंगी से जूझ रहे थे। बतौर अभिनेता-निर्माता मुकेश को सफलता नहीं मिली। गलतियों से सबक लेते हुए फिर से सुरों की महफिल में लौट आये। 50 के दशक के आखिरी सालों में मुकेश फिर पार्श्व गायन के शिखर पर पहुँच गये। यहूदी, मधुमती, अनाड़ी जैसी फ़िल्मों ने उनकी गायकी को एक नयी पहचान दी और फिर ‘जिस देश में गंगा बहती है’ के गाने के लिए वे फ़िल्मफ़ेयर पुरस्कार के लिए नामांकित हुए। 60 के दशक की…"} {"text": "[CS Wikipedia] Farní sbor Českobratrské církve evangelické v Praze 10 – Uhříněves\n\nFarní sbor Českobratrské církve evangelické v Praze 10 – Uhříněves je sborem Českobratrské církve evangelické v Praze. Sbor spadá pod Pražský seniorát. Využívá evangelický kostel na uhříněveském Husově náměstí. Sbor byl ustaven jako samostatný roku 1930. Duchovním sboru je farář Jiří Ort, kurátorem sboru Pavol Bargár. Faráři sboru Jaroslav Dobiáš (prozatímní duchovní správce) (1927–1928) Jiří Petřík (1930–1967) Jaroslav Voříšek (1967–1979) Jindřiška Krpálková (1981–1992) Irena Škeříková (1993–2000) Vladimír Pír (2002–2012) Jiří Ort (od 2013) Externí odkazy Oficiální stránky sboru Údaje o sboru na portálu Evangnet Facebookové stránky sboru Praha 10 - Uhříněves Náboženství v Uhříněvsi Organizace založené roku 1930"} {"instruction": "Create an algorithm in C# with a time complexity of O(n2).", "input": "", "output": "public static void printAllPairs(int[] array, int n) { for (int i = 0; i < n; i++) for (int j = i + 1; j < n; j++) Console.Write(\"(\" + array[i] + \", \" + array[j] +\") \"); }"} {"instruction": "Create a python program to read an integer from the keyboard and print a message saying whether the number is even or odd?", "input": "", "output": "def read_int_even_odd():\n number = int(input(\"Enter an integer: \"))\n if number % 2 == 0:\n print(\"The number is even\")\n else:\n print(\"The number is odd\")\n \nread_int_even_odd()"} {"text": "[DE Wikipedia] Tito Larriva\n\nHumberto Lorenzo Rodriquez Larriva (* 1953 in Ciudad Juárez, Chihuahua, Mexiko) ist ein mexikanischer Sänger, Musiker und Schauspieler. Leben Larriva wuchs auf in Fairbanks, Alaska und El Paso, Texas. Als Kind lernte er, Flöte und Geige zu spielen. Mitte der 1970er-Jahre zog er nach Los Angeles, Kalifornien. Er lebte einige Jahre in Berlin. Momentan lebt er in Austin (Texas). Musikkarriere Larriva war der Sänger und Rhythmus-Gitarrist der 1970er Punkband The Plugz, der 1980er Rockband Los Cruzados, Psychotic Aztecs und ist es noch bei Tito & Tarantula. The Plugz Er gründete The Plugz 1978 in Los Angeles, Kalifornien. Auch wenn die Band kommerziell nie wirklich erfolgreich war, so garantierte ihre Präsenz während der Geburt des „West Coast Punk“ doch einen anhaltenden Einfluss auf ganze Generationen von Rockbands. Das Plattenlabel Rhino würdigte ihre Rolle in der Los Angeles Musikszene, indem es ihre Version von „La Bamba“ auf „We’re Desperate: The L.A. Scene (1976–1979)“ veröffentlichte. The Plugz veröffentlichten die beiden Alben Electrify Me (1978) und Better Luck (1981). Sie steuerten außerdem drei Lieder zum Repo-Man-Soundtrack bei und spielten 1984 mit Bob Dylan bei der Sendung Late Night With David Letterman. 2007 gab es in Austin ein Reunion-Konzert der Plugz. Cruzados Hauptartikel: Cruzados Nachdem sich „The Plugz“ aufgelöst hatten, gründeten Larriva und zwei weitere Mitglieder der Band (Tony Marsico und Charlie Quintana) 1984 die Band „Los Cruzados“. Steven Hufsteter (war früher bei The Dickies) trat als Gitarrist bei. The Cruzados wurden von der Kritik gelobt und waren Vorgruppen für Bands wie INXS oder Fleetwood Mac. 1985 veröffentlichten sie das nach ihnen benannte Album Cruzados. 1987 erschien das Album After Dark mit einem neuen Gitarristen (Marshall Rohner). Die Band löste sich 1988 auf, aber Larriva fuhr fort mit allen Bandmitgliedern außer Rohner im späteren Verlauf seiner Karriere zu arbeiten. So spielten Quintana und Marsico als Gastmusiker auf dem Debütalbum seiner nächsten Band „Tito & Tarantula“. Außerdem war ein Lied auf dem Album, an dem Marsico mitgeschrieben hatte und eins, bei dem Hufsteter mitgeschrieben hatte. Auf Tito & Tarantulas drittem Album spielte Hufsteter als Gastmusiker bei einigen Liedern, bei anderen schrieb er mit. 2002 trat Hufsteter der Band offiziell als zweiter Lead-Gitarrist bei. Tito & Tarantula Hauptartikel: Tito & Tarantula „Tito & Tarantula“ begann als Improvisations-Jam-Band, bei der jeder mitspielen konnte, der Lust hatte. „Wir hatten immer eine Art ungeschriebene Regel“, sagte Larriva 1997 zum Tucson Weekly „und diese Regel besagt, dass jeder so ziemlich das spielt, was er will. Die Band studiert niemals vorher etwas ein.“ Die Geschichte der Band geht bis 1992 zurück, als Larriva und der…"} {"text": "[CS Wikipedia] Palembang P2\n\nPalembang P2 či Palembang II (též jenom P2, P.2, P II nebo Gloembang a Karangendah) bylo utajované vojenské letiště vybudované Nizozemci asi 32 mil (asi 51 km) jihozápadně od dnešního Palembangu na Sumatře a používané za druhé světové války. Jeho poloha je uváděna jako nebo . Dnes je letiště mimo provoz a areál bývalého letiště využívá indonéská armáda. Výstavba a využití Spojenci S narůstajícím napětím na dálném východě přistoupilo ML-KNIL (Vojenské letectvo královské nizozemsko–indické armády) v roce 1941 k budování druhého letiště u Palembangu (oním prvním bylo civilní P1). Nové letiště bylo součástí sítě pěti nových skrytých letišť, která tvořila vnější obranu Jávy. Další čtyři letiště byla Singkawang II a Samarinda II na Borneu, Kendari II na Celebesu a Ambon II na Ambonu. P2 bylo budováno asi 42 mil (67,6 km) od tehdejšího Palembangu na cestě do Prabumulih. Cestou z Palembangu bylo třeba přívozem překonat řeku Musi. Letiště maximálně využívalo terénu, který byl pouze vysušen a vyčištěn. Díky tomu, že bylo ukryto v džungli, zůstalo skryto před pozorností Japonců. Již v prosinci 1941 začaly ještě nedokončené letiště používat Glenn Martiny od 2-Vl.G.I. Ty z letiště operovaly až do 26. ledna 1942, kdy 2-Vl.G.I ustoupila na Jávu. V rámci společné obrany před japonskou invazí operovaly z letiště i stroje RAF a RAAF. Dne 31. ledna 1942 se velení na P2 ujal Grp Cpt (kapitán) McCauley (RAF). Z P2 operovaly 1. squadrona RAAF a 62. squadrona RAF vybavené Lockheed Hudsony a 27., 84. a 211. squadrona RAF létající s Bristol Blenheimy. Obrana letiště byla od konce ledna 1942 zajištěna „šesti těžkými děly a šesti Boforsy“, pro které byl ale nedostatek munice. Pozemní obranu zajišťovaly dva nizozemské obrněné automobily a 150 domorodých vojáků. V únoru 1942 bylo P2 podřízeno teritoriálnímu velitelství KNIL Jižní Sumatra. Japonská okupace Když se 14. února 1942 japonští výsadkáři zmocnili P1 a začali obsazovat Palembang, zůstalo P2 nepovšimnuto. P2 ale bylo ohroženo, a tak 16. února začala evakuace. I když nad letištěm často přelétávala japonská letadla, byla jeho existence Japonci objevena teprve 21. února. Prvních 29 rikkó typu 96 (G3M) a transportní letoun od Genzan kókútai (元山航空隊 ~ Genzanský námořní letecký pluk/skupina) zde přistálo 24. února. Japonci označovali P2 jako Gloembang podle nedaleké vesnice. Během japonské okupace bylo P2 domácí základnou 87. sentai (戦隊 ~ armádní letecký pluk/skupina) s Ki-44 Šóki která chránila ropné rafinérie v Plaju a Sungei Gerong. Kromě 87. sentai z letiště operovaly i stroje 21., 33. a 77. sentai. Koncem války našli Britové na P2 sedm Ki-45, dvanáct Ki-46, K-30 a Ki-79. Po válce S vyhlášením samostatnosti se P2 ocitlo na území nárokovaném Indonésií, ale zpočátku kontrolovaném Nizozemci. Dne 7. července 1947 bylo letiště…"} {"instruction": "Make a Swift program to print out the first three characters of a given string.", "input": "String word = \"Hello\";", "output": "import Foundation let word = \"Hello\" let characters = word.prefix(3) print(characters)"} {"instruction": "Analyze the following modified code and explain what the modified code does", "input": "int x = 10; if (x == 10) x = x + 10; else x = x - 10;", "output": "The modified code checks if the value of the variable x is equal to 10. If it is, it adds 10 to x, otherwise it subtracts 10. So the value of x will now be 20 if it was 10 initially, or 0 if it was not."} {"instruction": "Write a factorial program without using the inbuilt factorial function in Python.", "input": "", "output": "def factorial(n): if n == 0: return 1 else: return n * factorial(n-1)"} {"instruction": "Create a Python program which takes a list of words as input, and prints out the frequent words.", "input": "Words: [\"python\", \"is\", \"a\", \"programming\", \"language\"]", "output": "from collections import Counter\n\nwords = [\"python\", \"is\", \"a\", \"programming\", \"language\"]\n\nword_count = Counter(words) \n\nfor k,v in word_count.items(): \n print(k,v) \n\n# To get the most frequent word \nmost_freq_word = max(word_count, key=word_count.get) \n\nprint(\"Most frequent word is:\", most_freq_word)"} {"text": "[CS Wikipedia] Farní sbor Českobratrské církve evangelické v Praze 10 – Vršovice\n\nFarní sbor Českobratrské církve evangelické v Praze 10 - Vršovice je sborem Českobratrské církve evangelické v Praze. Sbor spadá pod Pražský seniorát. Sbor byl ustaven jako samostatný roku 1951. Farářem sboru je Matěj Opočenský, kurátorem Tomáš Vokatý. Faráři sboru Vilém Jelínek (1952–1965) Jaromír Dus (1968–1971) Michael Otřísal (1976–1995) Bohumil Baštecký (1995–1997) Jiří Ort (1998–2013) Matěj Opočenský (2013 – dosud) Externí odkazy Oficiální stránky sboru Facebooková stránka sboru Údaje o sboru na portálu Evangnet Praha 10 - Vršovice Organizace ve Vršovicích Náboženství ve Vršovicích Organizace založené roku 1951"} {"instruction": "Suggest a completion for the following Python code to sort a given list of dictionaries by a given key.", "input": "my_list = [{'name': 'Bob', 'age': 20}, {'name': 'Alice', 'age': 10}]", "output": "def sort_dicts(my_list, key):\n return sorted(my_list, key=lambda x: x[key])\n\n# Main\nif __name__ == \"__main__\":\n my_list = [{'name': 'Bob', 'age': 20}, {'name': 'Alice', 'age': 10}]\n key = 'age'\n print(sort_dicts(my_list, key)) # [{'name': 'Alice', 'age': 10}, {'name': 'Bob', 'age': 20}]"} {"instruction": "Create a function in SQL to return the average of all values in a column.", "input": "", "output": "SELECT AVG(column_name) FROM table_name;"} {"instruction": "Assume that we have an array of integers. Create code to input the array and output the sum of all the elements of the array.", "input": "arr = [1, 2, 3, 4, 5]", "output": "def calculate_sum(arr): \"\"\"Calculates sum of all elements in the given array\"\"\" total = 0 for num in arr: total += num return total if __name__ == '__main__': arr = [1, 2, 3, 4, 5] print(calculate_sum(arr))"} {"text": "[EN Wikipedia] Francis Oats\n\nFrancis Oats (29 October 1848 – 1 September 1918) was a Cornish miner who became chairman of De Beers diamond company. He made extensive investments in the Cornish tin mining industry, which collapsed after he had died. He is known for Porthledden, a mansion he built at the tip of Cornwall. Early years Francis Oats was born on 29 October 1848, at South Torfrey Farm, Golant, near Fowey, Cornwall, England, in the parish of St Sampson. His parents were Francis Oats (1794–1871) and Maria Rundle (1810–97). His father was a farmer. His younger sister Maria was born in 1850. The family moved to St Just in Penwith, a mining district, about 1854. Like most young men in the district Oats became a miner when he left school, but every week he would walk to Penzance, seven miles away, to attend evening classes so he could become a mining engineer. At the age of 17, Oats placed second in the mineralogy examination for the British Isles, and obtained a high grade in mining, a subject in which he had not been instructed. He was offered free tuition at the London School of Mines but would have to pay his expenses, and no scholarship was available. Francis Oats was first appointed Mine Agent in 1871. He was mining captain at Botallack Mine. For a while Oats also gave science classes in the Botallack district. He married Elizabeth Ann Olds on 17 August 1874, in St Just in Penwith, daughter of a butcher. Two of their children died in infancy. Their surviving children were Francis Freathey (b. 1879), Wilfred (b. 1883), Giles (b. 1885) and Marie Elise (b. 1887). South Africa Government mines inspector On 9 December 1874, Oats was appointed Cape Colony Government Mining Engineer at Kimberley, South Africa, at the age of 26. Oats left for South Africa on a 20-month mission in January 1875. The colony's government had recently passed ordinances in favour of small miners which prevented mine concession owners from imposing excessive rentals on the diggers and shopkeepers, and did not allow an individual or company to hold more than ten claims. The British government had overridden some of these measures. The proprietors continued to accumulate claims and raise rents, causing mounting unrest. Oats, as Provincial Engineer, gave the decisive opinion that \"fostering a large number of individual holdings is most adverse to economy of working. Oats made it clear that the restriction on the number of claims would be an obstacle to obtaining foreign capital. He wrote of the 10 claim limit, Oats resumed his position at Botallack as soon as he returned. Mining executive In May 1877 Oats was asked to take a position in Kimberley, which he accepted. The job was to run the Kimberley mines for Baring-Gould and Atkins Co. In 1883, he joined the Victoria Mine company. De Beers Mining,…"} {"instruction": "Write a JS code that returns the items in an alphabetical order.", "input": "let items = [\"Cat\", \"Dog\", \"Elephant\", \"Rabbit\", \"Fox\"]", "output": "let items = [\"Cat\", \"Dog\", \"Elephant\", \"Rabbit\", \"Fox\"] function sortAlphabetically(items) { return items.sort(); } let result = sortAlphabetically(items); console.log(result);"} {"instruction": "Make a POST request to the same server and download the response content", "input": "", "output": "import requests url = 'http://example.com/' data = {'key': 'value'} response = requests.post(url, data=data) #Download response content with open('response_content.txt', 'wb') as f: f.write(response.content)"} {"text": "[DE Wikipedia] Schulmuseum Steinhorst\n\nDas Schulmuseum Steinhorst liegt im Heideort Steinhorst im Landkreis Gifhorn in Niedersachsen und ist Teil der Museen des Landkreises Gifhorn und damit der Bildungs- und Kultur gGmbH des Landkreises Gifhorn. Über das Museum Das Schulmuseum Steinhorst befindet sich im Gebäudeensemble am Schmiedeberg. Zur dreiteiligen Hofanlage gehören das Museums-Hauptgebäude (ein restauriertes Fachwerk-Bauernhaus aus dem 17. Jahrhundert), die „alte Schmiede“ (ein 1822 errichtetes kleineres Fachwerk-Nebengebäude) und das Erich-Weniger-Haus. Dieses wurde nach dem in Steinhorst geborenen Pädagogen und Didaktiker Erich Weniger benannt. Es ist ein Neubau anstelle der nicht mehr vorhandenen Scheune und ist ein Tagungshaus mit Räumlichkeiten für Veranstaltungen und Sonderausstellungen des Schulmuseums und des Fördervereins. Die Dauerausstellung des Schulmuseums befindet sich im Hauptgebäude. Sie umfasst zum einen ein originalgetreu eingerichtetes Klassenzimmer der Zeit um 1900. Sämtliche Einrichtungsgegenstände sind original. Das Klassenzimmer ist begehbar und kann von Besuchern „ausprobiert“ werden. Es wird auch für museumspädagogische Veranstaltungen mit Schulklassen genutzt. Die Dauerausstellung zeigt außerdem Aspekte der Geschichte von Schule und Bildung in Deutschland. Das älteste Objekt ist ein mittelalterlicher Schreibgriffel der „Harzer Gruppe“ aus der Zeit um 1200. Die Dauerausstellung wurde 2021–2022 komplett neu gestaltet. Jedes Jahr widmen sich wechselnde Sonderausstellungen verschiedenen Themen, vor allem aus den Bereichen Schul- und Kindheitsgeschichte. Das Museum leitete von 1992 bis 2016 Wolfgang Böser. Nach einer Vakanz leitete Arne Homann von 2018 bis 2020 das Museum. Seitdem (Stand 2023) gibt es keine wissenschaftlich qualifizierte Museumsleitung. Im Schulmuseum Steinhorst und dem Erich-Weniger-Haus findet seit 1994 jährlich vor allem im Juli und August der „Steinhorster Lesesommer“ mit einer Reihe kultureller Veranstaltungen statt. Trotz starker Einschränkungen durch die Corona-Pandemie gelang es auch im Jahr 2020 einen – reduzierten und planerisch angepassten – Lesesommer durchzuführen. 2022 wurde das Museum zum zweiten Mal nach 2015 mit dem Museumsgütesiegel des Museumsverbands Niedersachsen und Bremen e.V. ausgezeichnet. Das Schulmuseum Steinhorst hat eigene Publikationen zur Schul- und Kindheitsgeschichte herausgebracht. Insgesamt 11 Bände erschienen von 1989 bis 2008 in den Steinhorster Schriften und Materialien zur regionalen Schulgeschichte und Schulentwicklung. Nach deren Einstellung erschien im November 2020 der erste Band der thematisch breiter aufgestellten, neuen Schriftenreihe des Schulmuseums, der Steinhorster Beiträge zur Geschichte von Schule, Kindheit und Jugend. Publikationen Wolfgang Böser: Archivquellen zur Entwicklung des…"} {"instruction": "Generate a SQL command to update the salary by 5% for all the employees.", "input": "", "output": "UPDATE employees SET salary = salary * 1.05;"} {"instruction": "Create a CSS style to make all headings (h1, h2, h3, h4, h5, h6) bold and blue.", "input": "", "output": "h1, h2, h3, h4, h5, h6{ font-weight: bold; color: blue; }"} {"instruction": "Find the maximum value from a Python dictionary.", "input": "sample_dict = {'a': 10, 'b': 20, 'c': 40, 'd': 30}", "output": "def find_max(sample_dict): max_val = 0 for key, val in sample_dict.items(): if val > max_val: max_val = val return max_val"} {"text": "[DE Wikipedia] Pfadicorps Patria Bern\n\nDas Pfadicorps Patria Bern ist ein Stadtberner Pfadfinder-Korps, das am 13. Februar 1913 gegründet wurde. Das Mitteilungsorgan des Pfadicorps Patria heisst Hallo und erscheint seit 1924 vierteljährlich. Geschichte Der Verein wurde 1913 in Bern als Pfadfinderabteilung Patria von Walther von Bonstetten und den Gebrüdern André Lombard und Eduard Lombard gegründet. 1921 gründeten drei ehemalige Mitglieder der Pfadi Patria, darunter der ehemalige Abteilungsleiter Edgar Crasemann, in Zürich die Pfadfinderabteilung Flamberg. Bei einem Besuch in Kandersteg im Jahr 1922 Walther von Bonstetten ein verlassenes Chalet und schlug Robert Baden-Powell die Schaffung eines internationalen Heims für Pfadfinder vor. 19:29, 28. Jan. 2019 (CET) Im darauf folgenden Jahr legte von Bonstetten mit der Gründung der Scouts International Home Association den Grundstein für die Entstehung des Kandersteg International Scout Center (KISC), welches das Weltzentrum der World Organization of the Scout Movement (WOSM) im schweizerischen Kandersteg betreibt. Im gleichen Jahr wurde das Patria-Hauptquartier, das Mauerrainheim beim Obergericht in Bern, gekauft. Im Jahr 1925 nahm das Pfadicorps Patria mit über 200 Teilnehmern am ersten Schweizer Bundeslager in Bern teil, wobei Robert Baden-Powell der Abteilung Patria einen Besuch abstattete. Die Freundschaft zu Bonstetten führte ihn 1929 erneut zum Besuch der Patria. Am ersten World Scout Moot 1931 im Kandersteg International Scout Center waren die Patrianer als Helfer und in der Hauptleitung engagiert. Für die Gründung und Betreuung des KISC in Kandersteg erhielt Bonstetten 1937 von Robert Baden-Powell die höchste Auszeichnung der Pfadfinder-Bewegung, den Bronze Wolf. Am 23. Juni 1939 unterzeichnete Abteilungsleiter Bonstetten den Kaufvertrag für das Lagergelände Gwatt am Thunersee. Im folgenden Frühjahr wurde das erste Baulager durchgeführt. Aufgrund der hohen Mitgliederzahl wurde die Abteilung 1949 in die vier Stämme Bantiger, Grauholz, Manneberg und Stockeren aufgeteilt. Das 1955 erschienene Buch Mein Name ist Eugen vom Patrianer Klaus Schädelin befeuerte das Wachstum der Abteilung Patria zusätzlich. 1957 kaufte der Stamm Mannenberg das Berghaus Ramslouenen im Kiental. 1962 konnte das 60'000m² grosse Pfadigelände Hartlisberg ob Steffisburg gekauft werden, welches als zukünftiger Ersatz für das damals noch nicht veräusserte Gelände in Gwatt dienen sollte. Ein fünfter Stamm Lutzeren wurde 1964 eröffnet. Während dieser Zeit zählte die Abteilung weit über tausend Mitglieder. Im Zuge der Gründung der Pfadibewegung Schweiz in 1987 wurde die Abteilung Patria in das Corps Patria umgewandelt, dabei wurden die Stämme zu Abteilungen, welche bis zur Umstrukturierung des Pfadicorps Patria im März 2003 Bestand hatten. Um dem in der Pfadibewegung…"} {"instruction": "Create a program that takes in an array of integers as input and returns a sorted array in ascending order.", "input": "[7, 3, 5, 9, 11, 10]", "output": "def sort_ints(arr): return sorted(arr) my_list = [7, 3, 5, 9, 11, 10] print(sort_ints(my_list)) #Output: [3, 5, 7, 9, 10, 11]"} {"instruction": "Create a Python program to capture the data from a web page.", "input": "https://www.example.com/", "output": "import requests\nimport lxml.html as lh\n\nurl = 'https://www.example.com/'\npage = requests.get(url)\ndoc = lh.fromstring(page.content)\n\n# parse and extract data from webpage\ndata = doc.xpath('//p/text()')"} {"instruction": "Write a simple script in JavaScript to reverse a string.", "input": "text = “hello world”", "output": "function reverseString(text) { return text.split(\"\").reverse().join(\"\"); } console.log(reverseString(text));"} {"instruction": "Calculate the distance between two points using Pythagoras theorem.", "input": "Point A: (3, 4) Point B: (7, 8)", "output": "distance = sqrt((7-3)^2 + (8-4)^2) = sqrt(16 + 16) = sqrt(32) = 5.657"} {"instruction": "Write a web crawler in Python to collect job postings from a list of job boards.", "input": "Job Boards:\n1. Monster.com\n2. LinkedIn.com\n3. Stack Overflow", "output": "import requests\nimport bs4\nimport lxml\n\njob_boards = ['Monster.com', 'LinkedIn.com', 'Stack Overflow']\n\nfor board in job_boards:\n # Create a request object for the job board url\n r = requests.get(board)\n\n # Create a BeautifulSoup object from the response\n soup = bs4.BeautifulSoup(r.content, 'lxml')\n\n # Get all job postings on the page\n job_postings = soup.find_all('div', {'class': 'job-posting'})\n\n for job in job_postings:\n # Extract the job details (title, company, location, etc)\n # and store in a dictionary\n job_details = {}\n job_details['title'] = job.find('div', {'class': 'title'}).text\n job_details['company'] = job.find('div', {'class': 'company'}).text\n job_details['location'] = job.find('div', {'class': 'location'}).text\n # ... and so on\n\n# Store the extracted job postings in a database\n# ..."} {"instruction": "Given a JSON object, code a JavaScript function to convert the object into a query string.", "input": "let obj = { name: 'John', age: 25, job: 'developer' }", "output": "function jsonToQueryString(jsonObject) { let queryString = ''; for(let key in jsonObject) { queryString += key + '=' + jsonObject[key] + '&'; } return queryString.substring(0, queryString.length-1); } console.log(jsonToQueryString(obj)); // prints \"name=John&age=25&job=developer\""} {"instruction": "Write a SQL query to select the names of all the students from the table \"students\".", "input": "", "output": "SELECT name FROM students;"} {"instruction": "Generate an HTML snippet for a basic two-column layout.", "input": "", "output": "
      "} {"text": "[EN Wikipedia] Joachim (surname)\n\nJoachim is a Germanic surname, ultimately derived from the Biblical king Jehoiakim. Pronunciation varies, and may be wa-keem' or jo'-akim. People with this surname Amalie Joachim (1839–1899), Austrian-German contralto and voice teacher, wife of Joseph Attila Joachim (1923–1947), Hungarian Holocaust victim Aurélien Joachim (born 1986), Luxembourgian footballer Benoît Joachim (born 1976), Luxembourgian professional road racing cyclist Charlie Joachim (1920–2002), American basketball player Ferenc Joachim (1882–1964), Hungarian (Magyar) painter of portraits and landscapes Harold H. Joachim (1868–1938), British idealist philosopher Irène Joachim (1913–2001), French soprano; grand-daughter of the violinist Joseph Joachim Joseph Joachim (1831–1907), Hungarian violinist, conductor, composer and teacher, husband of Amalie (1834–1904), Swiss author Julian Joachim (born 1974), English professional footballer Otto Joachim (composer) (1910–2010), German-born Canadian musician and composer of electronic music Suresh Joachim (fl. 2005), Sri Lankan (Tamil) international Record collector See also Joachim (given name) Joachim genannt Thalbach (disambiguation) German-language surnames Surnames of Jewish origin Hebrew-language surnames Yiddish-language surnames"} {"instruction": "Create a program to sum numbers in a given range m to n inclusive.", "input": "m = 4, n = 8", "output": "def sum_in_range(m, n): sum = 0 for i in range(m, n+1): sum+=i return sum"} {"text": "[CS Wikipedia] Benoît David\n\nBenoît David (* 19. dubna 1966 Montreal) je kanadský progressive rockový zpěvák, v letech 2008 až 2012 člen skupiny Yes. David vystupoval se skupinou Mystery od 1999–2013, a objevil se na jejich albech Beneath the Veil of Winter's Face (2007), One Among the Living (2010) a The World is a Game (2012). Současnost V roce 2008 byl David ohlášen jako sólový zpěvák nové sestavy Yes kterou kromě něho tvořili Steve Howe, Chris Squire a Alan White a byli tak skupinou sestavenou pro turné toho roku. David zaujal baskytaristu skupiny Yes Chris Squirea během jeho práce se skupinou Close to the Edge a tak jím nahradil Jon Andersona, který se nemohl zúčastnit turné kvůli akutním problémům s dýcháním, které jej postihly začátkem toho roku. Squire vyjádřil naději, že se Anderson ke skupině Yes v budoucnu vrátí. S onemocněním Chrise Squirea se turné odložilo znovu a David se vrátil k práci se skupinami Mystery a Close to the Edge. David se znovu připojil k Yes společně s Oliverem Wakemanem na jejich společném letním turné 2009 se superskupinou Asia. V roce 2011 vydal s Yes album Fly from Here. Na začátku roku 2012 ze skupiny kvůli respiračním potížím odešel. Reference Externí odkazy Kanadští zpěváci Narození v roce 1966 Narození 19. dubna Žijící lidé Členové Yes Muži Narození v Montréalu"} {"instruction": "Edit the given sql query to return all employee details having age greater than 30", "input": "SELECT * FROM employees;", "output": "SELECT * FROM employees WHERE age > 30;"} {"instruction": "Create a Python program for constructing a tree from a given inorder and preorder traversals.", "input": "Preorder Traversal: A, B, E, K, C, F, G, D\nInorder Traversal: E, B, K, A, F, C, D, G", "output": "class Node:\n def __init__(self, data):\n self.data = data\n self.left = None\n self.right = None\n\ndef construct_tree(preorder, inorder):\n if not preorder or not inorder:\n return None\n\n # first element of preorder is the root\n root = Node(preorder[0])\n\n # get index of root in inorder\n idx = inorder.index(root.data)\n\n # left and right subtrees are constructed recursively\n root.left = construct_tree(preorder[1: idx + 1], inorder[0:idx])\n root.right = construct_tree(preorder[idx + 1:], inorder[idx + 1:])\n\n return root\n\nif __name__ == \"__main__\":\n preorder = [\"A\", \"B\", \"E\", \"K\", \"C\", \"F\", \"G\", \"D\"]\n inorder = [\"E\", \"B\", \"K\", \"A\", \"F\", \"C\", \"D\", \"G\"]\n\n root = construct_tree(preorder, inorder)"} {"instruction": "Write a shell script to prompt a user for their name and display a personalized message.", "input": "", "output": "#!/bin/bash read -p \"Enter your name: \" name echo \"Hello $name, welcome to our website!\""} {"instruction": "Write an Algorithm in Python that takes in a comma-separated string of numbers and returns the sum of the numbers.", "input": "'1,2,3'", "output": "def sumString(s):\n nums = s.split(',')\n total = 0\n for num in nums:\n total += int(num)\n return total"} {"instruction": "Create a Python script to generate a random password with a length of 8 characters that includes both uppercase and lowercase letters.", "input": "", "output": "import string\nimport random\n\nlength = 8\n\nalphabet = string.ascii_letters + string.digits\npassword = ''.join(random.choice(alphabet) for i in range(length))\n\nprint(\"Generated password:\", password)"} {"instruction": "Formulate a linear programming problem in Python to minimize a given cost function.", "input": "", "output": "import pulp \n \n# Declare the problem \nprob = pulp.LpProblem(\"Cost Minimization Problem\", pulp.LpMinimize) \n \n# Define the decision variables \nx = pulp.LpVariable(\"x\", lowBound = 0) \ny = pulp.LpVariable(\"y\", lowBound = 0) \n \n# Define the objective function \nprob += 4 * x + 5 * y \n \n# Define the constraints \nprob += x + y <= 10\nprob += 2 * x + 3 * y <= 18\n \n# Solve the problem \nprob.solve() \n \n# Print the results \nprint(\"The value of x is {} and the value of y is {}\".format(x.varValue, y.varValue)) \nprint(\"The total cost is {}\".format(pulp.value(prob.objective)))"} {"instruction": "Identify any type error that is present in the following code.", "input": "def sum_of_values(num_list): total = 0 for value in num_list: total += value return total/len(num_list) square_value = sum_of_values(5)", "output": "Type error: The function sum_of_values() takes a list as an argument, but the argument provided is an integer (5)."} {"instruction": "Your job is to generate random numbers within a given range.", "input": "min = 20, max = 40", "output": "function getRandomNumber(min, max){ return Math.floor(Math.random() * (max - min + 1)) + min; } console.log(getRandomNumber(min, max));"} {"text": "[CS Wikipedia] Elektrické napětí\n\nElektrické napětí je jedna ze základních veličin při studiu a využívání elektřiny. Napětí jako rozdíl potenciálů mezi dvěma body může způsobit elektrický proud a v analogii s kapalinou odpovídá rozdílu tlaků mezi dvěma body potrubí. Definuje se jako rozdíl potenciálů mezi dvěma body elektrického pole, tj. práce, potřebná k přenesení jednotkového náboje mezi těmito body. Vztah mezi napětím a proudem ve vodiči s elektrickým odporem vyjadřuje Ohmův zákon. Napětí v elektrických rozvodech může být stejnosměrné (značí se ss, symbol =) nebo střídavé (značí se st, symbol ~), jehož směr toku i okamžitá velikost se v čase periodicky mění, příkladem může být elektrická síť se střídavým napětím 230 V a frekvencí 50 Hz (evropská norma), kde napětí vzniká pohybem elektrického vodiče v elektromagnetickém poli generátoru v elektrárně. V technické praxi se napětí často vztahuje vůči zemi s potenciálem nula. Značka elektrického napětí je velké (většinou efektivní hodnota) resp. malé (většinou okamžitá hodnota). Jednotkou elektrického napětí v soustavě SI je volt, značí se . Elektrické napětí se měří voltmetrem, který se zapojuje do obvodu paralelně. Definice Stacionární pole Elektrické napětí mezi dvěma body s polohovými vektory a lze vyjádřit vztahem: , kde je intenzita elektrického pole a je elektrický potenciál. Práci vykonanou při přemísťování kladného náboje při napětí lze vyjádřit vztahem: Nestacionární pole Elektrické napětí indukované ve smyčce vodiče je rovno časové změně celkového magnetického toku, který smyčkou prochází (Faradayův zákon elektromagnetické indukce): , kde je magnetický tok, a v integrálním tvaru kde se integruje po uzavřené vodivé smyčce s plochou : , kde je magnetická indukce. Pokud se polarita napětí mezi body určitého pole v čase nemění, takže lze rozlišit kladný a záporný pól, jedná se o stejnosměrné napětí Uss nebo U=. Typickým příkladem může být elektrický článek, baterie článků nebo akumulátor, kde napětí vzniká elektrochemickým procesem. Pokud se polarita v čase pravidelně mění, jedná se o střídavé napětí Ust nebo U~. Stejnosměrné napětí Stejnosměrné napětí je takové elektrické napětí, které v čase nemění svou polaritu. Jako zdroje stejnosměrného napětí se užívají: galvanický článek – jedná se buď o primární články (např. tužková baterie) určené k napájení spotřebičů s malým příkonem nebo články sekundární – akumulátory – určené pro energeticky náročnější přenosné spotřebiče (např. mobilní telefon) fotovoltaický článek – používaný k napájení malých kapesních kalkulátorů, ale i pro stavbu mohutných fotovoltaických elektráren termočlánek – napájí meziplanetární sondy jako součást radioizotopového termoelektrického generátoru dynamo – dříve nejrozšířenější stejnosměrný zdroj, nyní zcela vytlačen alternátorem s usměrňovačem usměrňovač –…"} {"instruction": "Write a JavaScript function that takes an array of numbers and a function as arguments and returns an array with the same numbers as the input, but sorted in ascending order.", "input": "[2, 4, 3, 1]", "output": "function sortArrayAsc(arr, func) { return arr.sort(func); } function compareNumbers(a, b) { return a - b; }"} {"instruction": "Write a regex pattern to extract all words containing the letter 'a' from a given string", "input": "", "output": "import re def extract_words(string): pattern = r'\\b\\w*a\\w*\\b' words = re.findall(pattern, string) return words"} {"text": "[DE Wikipedia] Behindertenrecht\n\nDas Behindertenrecht ist ein juristisches Querschnittsgebiet, das die Rechtsstellung von Menschen mit Behinderung betrifft. Es erstreckt sich insbesondere auf Regelungen im Sozial-, Arbeits- und Steuerrecht sowie auf gesetzliche Verpflichtungen zur Gleichstellung und Barrierefreiheit. Internationales Recht UN-Behindertenrechtskonvention Gleichbehandlungsrahmenrichtlinie der EU Nationales Recht Deutschland Benachteiligungsverbot (Art. 3 Abs. 3 Satz 2 GG) Behindertengleichstellungsgesetz (BGG) Neuntes Buch Sozialgesetzbuch (SGB IX) – Rehabilitation und Teilhabe von Menschen mit Behinderungen: Teil 1: Regelungen für Menschen mit Behinderungen und von Behinderung bedrohte Menschen; Teil 2: Besondere Leistungen zur selbstbestimmten Lebensführung für Menschen mit Behinderungen (Eingliederungshilferecht); Teil 3: Besondere Regelungen zur Teilhabe schwerbehinderter Menschen (Schwerbehindertenrecht). Österreich Bundesbehindertengesetz (BBG) Schweiz Behindertengleichstellungsgesetz (BehiG) Einzelnachweise Behindertenrecht (Deutschland) Behinderung (Österreich) Behinderung (Schweiz)"} {"instruction": "Find and list all the prime numbers between 0-100", "input": "", "output": "2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97."} {"instruction": "Create a Python program to store prices for grocery items in a dictionary and write a function to calculate the total cost of the items.", "input": "groceries = {'apple': 3.99, 'banana': 2.99, 'milk': 5.99, 'bread': 3.50}", "output": "groceries = {'apple': 3.99, 'banana': 2.99, 'milk': 5.99, 'bread': 3.50}\n\ndef total_cost(groceries):\n total = 0.0\n for key in groceries:\n total += groceries[key]\n return total\n\ntotal_cost = total_cost(groceries)\nprint(f'The total cost of all groceries is ${total_cost}.')"} {"text": "[HI Wikipedia] लिद्दर नदी\n\nलिद्दर नदी (Lidder River), जिसका मूल संस्कृत नाम लम्बोदरी नदी (Lambodari River) था, भारत के जम्मू व कश्मीर राज्य की कश्मीर घाटी में बहने वाली एक ७३ किमी लम्बी नदी है। सिन्द नदी के बाद यह झेलम नदी की दूसरी सबसे बड़ी उपनदी है। नामोत्पत्ति लिद्दर नदी का प्राचीन मूल नाम \"लम्बोदरी नदी\" था, और गणेशबल नामक स्थान पर नदी के बीच में एक गणेश (लम्बोदर) की मूर्ति थी। इसे सिकंदर शाह मीरी ने तोड़ा था। मान्यता है कि तोड़ते ही नदी में रक्त बहने लगा, और इस से डर के हिन्दू मन्दिरों व मूर्तियों को तोड़ने पर कुछ काल के लिए रोक लगा दी गई। समय के साथ \"लम्बोदरी\" नाम विकृत हो कर \"लिद्दर\" बन गया। मार्ग लिद्दर नदी गान्दरबल ज़िले में सोनमर्ग शहर से २ किमी दक्षिण में स्थित कोलाहोइ हिमानी से ४६५३ मीटर की ऊँचाई पर शुरू होती है। यहाँ से यह एक पहाड़ी मैदान (या मर्ग) से गुज़रती है जिसका नाम लिद्दरवाट है। इसी से इस नदी का नाम पड़ा है। यहाँ से यह सनोबर (फ़र वृक्ष) से ढकी पहाड़ियों से निकलती है। आरू नामक प्रसिद्ध पर्यटन स्थल इसी के किनारे बसा हुआ है। यहाँ से ३० किमी दूर यह पहलगाम पहुँचती है जहाँ इसका संगम शेषनाग झील से आ रही पूर्वी लिद्दर धारा से होता है। यहाँ से पश्चिम चलकर यह अनंतनाग ज़िले के गुरनार ख़ानाबल गाँव में झेलम में मिल जाती है। अन्य विवरण लिद्दर नदी का पानी स्वच्छ और किशनगंगा नदी के पानी जैसा नीला दिखता है। इसमें से कई सिंचाई की नहरे निकाली जाती हैं जिनमें से शाह कोल नहर सबसे जानी-मानी है। नदी में ट्राउट जैसी कई मछलियाँ हैं। इन्हें भी देखें झेलम नदी किशनगंगा नदी सिन्द नदी सन्दर्भ अनंतनाग ज़िला भारत की नदियाँ जम्मू और कश्मीर की नदियाँ"} {"instruction": "Generate a valid Python expression that multiplies the given numbers.", "input": "3 and 4", "output": "3 * 4"} {"instruction": "Change the code provided in the input so that it is compatible with Python version 3.", "input": "print \"Hello World\"", "output": "print(\"Hello World\")"} {"instruction": "Compute the nearest prime number less than the given number using a python program.", "input": "173", "output": "def nearest_prime(num):\n if num <= 2:\n return -1\n for i in range(num-1,2,-1):\n for j in range(2,i):\n if i % j == 0:\n break\n else:\n return i\n\nprint(nearest_prime(173))"} {"text": "[HI Wikipedia] सीवान\n\nसीवान(𑂮𑂲𑂫𑂰𑂢) या सिवान(𑂮𑂱𑂫𑂰𑂢) भारत गणराज्य के बिहार प्रान्त में सारन प्रमंडल के अंतर्गत एक शहर है। यह सीवान ज़िले का मुख्यालय है, जो बिहार के पश्चिमोत्तरी छोर पर उत्तर प्रदेश का सीमावर्ती जिला है। सिवान दाहा नदी के किनारे बसा है। इसके उत्तर तथा पूर्व में क्रमश: बिहार का गोपालगंज तथा सारण जिला तथा दक्षिण एवं पश्चिम में क्रमश: उत्तर प्रदेश का देवरिया और बलिया जिला है। भारत के प्रथम राष्ट्रपति डा॰ राजेन्द्र प्रसाद तथा कई अग्रणी स्वतंत्रता सेनानियों की जन्मभूमि एवं कर्मस्थली के लिए सिवान को जाना जाता है। नामकरण सिवान का नामकरण मध्यकाल में यहाँ के राजा 'शिव मान' के नाम पर हुआ है। उनके पूर्वज बाबर के यहाँ आने तक शासन कर रहे थे। इसका एक अनुमंडल महाराजगंज है जिसका नाम इस क्षेत्र पर राज कर रहे महाराजा का घर या किला स्थित होने के चलते पड़ा है। इसी जिला के एक सामंत अली बक्श के नाम पर इसे अलीगंज भी पुकारा जाता था। इतिहास पाँचवी सदी ईसापूर्व में सिवान की भूमि कोसल महाजनपद का अंग था। कोसल राज्य के उत्तर में नेपाल, दक्षिण में सर्पिका (साईं) नदी, पुरब में गंडक नदी तथा पश्चिम में पांचाल प्रदेश था। इसके अंतर्गत आज के उत्तर प्रदेश का फैजाबाद, गोंडा, बस्ती, गोरखपुर तथा देवरिया जिला के अतिरिक्त बिहार का सारन क्षेत्र (सारन, सिवान एवं गोपालगंज) आता है। आठवीं सदी में यहाँ बनारस के शासकों का आधिपत्य था। १५ वीं सदी में सिकन्दर लोदी ने यहाँ अपना आधिपत्य स्थापित किया। बाबर ने अपने बिहार अभियान के समय सिसवन के नजदीक घाघरा नदी पार की थी। बाद में यह मुगल शासन का हिस्सा हो गया। अकबर के शासनकाल पर लिखे गए आईना-ए-अकबरी के विवरण अनुसार कर संग्रह के लिए बनाए गए ६ सरकारों में सारन वित्तीय क्षेत्र एक था और इसके अंतर्गत वर्तमान बिहार के हिस्से आते थे। १७वीं सदी में व्यापार के उद्देश्य से यहाँ डच आए लेकिन बक्सर युद्ध में विजय के बाद सन १७६५ में अंग्रेजों को यहाँ का दिवानी अधिकार मिल गया। १८२९ में जब पटना को प्रमंडल बनाया गया तब सारन और चंपारण को एक जिला बनाकर साथ रखा गया। १९०८ में तिरहुत प्रमंडल बनने पर सारन को इसके साथ कर इसके अंतर्गत गोपालगंज, सिवान तथा सारन अनुमंडल बनाए गए। १८५७ की क्रांति से लेकर आजादी मिलने तक सिवान के निर्भीक और जुझारु लोगों ने अंग्रेजी सरकार के खिलाफ अपनी लड़ाई लड़ी। १९२० में असहयोग आन्दोलन के समय सिवान के ब्रज किशोर प्रसाद ने पर्दा प्रथा के विरोध में आन्दोलन चलाया था। १९३७ से १९३८ के बीच हिन्दी के मूर्धन्य विद्वान राहुल सांकृत्यायन ने किसान आन्दोलन की नींव सिवान में रखी थी। स्वतंत्रता की लड़ाई में यहाँ के मजहरुल हक़, राजेन्द्र प्रसाद, महेन्द्र प्रसाद,रामदास पाण्डेय फूलेना प्रसाद जैसे महान सेनानियों नें समूचे देश में बिहार का नाम ऊँचा किया है। स्वतंत्रता पश्चात १९८१ में सारन को प्रमंडल का दर्जा मिला। जून १९७० में बिहार में त्रिवेदी एवार्ड लागू होने पर सिवान के क्षेत्रों में परिवर्तन किए गए। सन 1885 में घाघरा नदी के बहाव स्थिति के अनुसार लगभग 13000 एकड़ भूमि उत्तर प्रदेश को स्थानान्तरित कर दिया गया जबकि 6600 एकड़ जमीन सिवान को मिला। १९७२ में सिवान को जिला (मंडल) बना दिया गया।सावधान जिले का एक मुख्य प्रखंड गोरयाकोठी है जो केंद्रीय असेम्बली को हिन्दी में संबोधित करने…"} {"instruction": "Write a test suite to test an arithmetic function that takes two arguments and returns the sum.", "input": "", "output": "import unittest class TestArithmeticFunction(unittest.TestCase): def test_sum(self): self.assertEqual(arithmetic_function(2, 5), 7) self.assertEqual(arithmetic_function(-4, 9), 5) self.assertEqual(arithmetic_function(-2, 0), -2) if __name__ == '__main__': unittest.main()"} {"instruction": "Write a function to output \"Thank you\" three times.", "input": "", "output": "def say_thanks(): for i in range(3): print(\"Thank you\")"} {"instruction": "Write a function in Python that takes an input list, multiplies each item in the list by two, and returns the resulting list.", "input": "", "output": "def double_list(lst):\n return [x * 2 for x in lst]"} {"instruction": "Create an HTML page that displays two columns consisting of the numbers 1 to 10.", "input": "", "output": " Two columns of numbers from 1 to 10

      Two columns of numbers from 1 to 10

      Column 1 Column 2
      1 6
      2 7
      3 8
      4 9
      5 10
      "} {"text": "[CS Wikipedia] Didaktika\n\nDidaktika je teorie vzdělávání, která se zabývá formami, postupy a cíli vyučování. Je součástí pedagogiky, zabývající se metodami a formami školního vyučování. Didaktika je pojem odvozený z řeckého slova didasko, které znamená učím nebo vyučuji. Předmět didaktika je nezbytnou součástí studia každého studenta, který má v úmyslu se někdy zabývat učitelským povoláním. Součásti didaktiky Didaktika se zabývá více oblastmi souvisejícími s vyučováním: obsahem a rozsahem vzdělávání (tj. procesu) obsahem a rozsahem vzdělání (tj. výsledkem procesu vzdělávání) metodami, zásadami a formami vyučování interakci mezi učitelem a žákem Rozdělení didaktiky Didaktiku rozdělujeme na obecnou a speciální didaktiku: Obecná didaktika – teorie vyučování, která se zabývá obecnými problémy výuky, to znamená jak probíhá výuka na základní, střední či vysoké škole. Řeší: obsah výuky – co je nutné nebo žádané vyučovat v hodinách determinanty výuky – co ovlivňuje efekty vyučování organizační formy vyučování – jak se bude ve škole organizovat výuka vyučovací metody – jak se má postupovat při výuce materiální didaktické prostředky – jak využívat učební pomůcky a didaktickou techniku Speciální didaktika – čerpá z obecné didaktiky a dále se dělí na: předmětovou didaktiku didaktiku druhů a typů škol Vývoj didaktiky Na vzniku a rozvoji didaktiky se podíleli: Marcus Fabius Quintilianus (1. století) Mnoho myšlenek o vyučování, ale nepatří mu prvenství v didaktice. Wolfgang Ratke (1571-1635) Jako první zavedl pojem didaktika. Jan Amos Komenský (1592-1670) Své názory na vyučování vyjadřuje v dílech „Didactica magna“ (Velká didaktika), Nejnovější metoda jazyků, Orbis pictus, Škola hrou. Prosazoval uplatňování zásady názornosti při výuce. Jean-Jacques Rousseau (1712-1778) Byl to zastánce svobodné výchovy. Ve svém díle „Emil aneb O výchově“ vyjádřil svoji kritiku tehdejšího způsobu vzdělávání. Jeho názor byl ten, že žáci ve škole pouze poslouchají výklad učitele a jsou jen málo aktivní anebo nejsou aktivní vůbec. Doporučoval, aby dítě do 12 let čerpalo poznatky ze svého okolí a pak aby z nich, respektive na jejich základě, získávalo vědomosti ve škole. Je ale třeba říci, že jeho názor o to, že se má dítě začít systematicky vzdělávat až po 12 roku je nesprávný. U Rousseaua je však cenné to, že upřednostňoval pozornost na dítě, na jeho aktivitu. I když Rousseau nebyl didaktik, tak právě pro zdůrazňování aktivity dítěte ho současná didaktika vnímá jako zástupce tvořivého vyučování. Dnešní škola preferuje samostatnost, tvořivost, iniciativu, využívání poznatků získaných v prostředí mimo školu apod. Tedy vše to, co zdůrazňoval i Rousseau. Johann Heinrich Pestalozzi (1746-1827) Významný přínos do didaktiky, jeho metodika pro základní vyučování byla na tehdejší dobu vynikající, jeho úsilím bylo dát…"} {"instruction": "Develop a program to determine if a given year is a leap year.", "input": "year = 2024", "output": "# Determining if a year is a leap year # Assigning the current year year = 2024 # Checking if the year is a leap year if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0): print(year, \"is a leap year\") else: print(year, \"is not a leap year\")"} {"instruction": "How would you write a query in SQL to return the names of all customers who have purchased over $100 in the last month?", "input": "", "output": "SELECT customer_name FROM customers WHERE orders.amount > 100 AND orders.date > NOW() - INTERVAL 1 MONTH;"} {"text": "[EN Wikipedia] Nachum Heiman\n\nNachum Heiman (; May 6, 1934 – August 17, 2016) was an Israeli composer and musician. Some of the over 1,000 songs he composed have become classics of Israeli folk music. Biography Nachum (Nakhche) Heiman was born in Riga, Latvia in 1934 to a musical family that immigrated to Mandatory Palestine when he was five years old. As a child he began playing the piano. After becoming ill with polio at the age of nine, he switched to playing the accordion and the harmonica. He was hospitalized for three and a half years in an iron lung until he recovered. At age 14, following his parents' divorce, he moved to Kibbutz Na'an as a yeled hutz (child from outside the kibbutz), where he studied with kibbutz members Yehuda Oren and composer David Zahavi. After his mother remarried, he moved with her to Rehovot, where he composed his first song, \"Nitzanim niru ba'aretz\" (text from the Song of Songs) at 17 years of age. Since he did not get along with his stepfather, he moved to Kfar HaMaccabi, where he met Matityahu Shalem from nearby Kibbutz Ramat Yohanan. He worked with Shalem as a shepherd and studied with him and his colleagues. Under the influence of Gurit Kadman, one of the pioneers of Israeli folk dance, Heiman began to work as an accordionist for folk-dancing events. In the army, Heiman coordinated song and dance classes and played the accordion for the first Nahal troupe. He fought in three wars and was wounded in all of them. When he married Dalia Colton, the mother of his two daughters – Billie and Si, a well-known singer – they moved to Kibbutz Beit Alpha. Heiman died in Meir Hospital in Kfar Saba on August 17, 2016, of a severe infection following prolonged ill health. He was 82. Music career Heiman worked as a music teacher and established the Gevatron choir. He composed dozens of songs for the poet Natan Yonatan, took young singers and bands under his wing in the 1960s, and wrote music for 122 films and TV shows. From the late 1960s to the mid-1980s he lived in Paris and London, where he ran a music production and record company, Hi-Man Music. He worked with artists such as Nana Mouskouri, Marie Laforêt, Serge Lama, Rika Zarai, Mike Brant, Carlos Miranda, Luis Jardim, Geoff Downes and Hanny Livne. In 1999, Heiman declared bankruptcy, but eventually repaid all his debts. In 2002, he established the Hebrew Song Heritage Association, a non-profit organization devoted to Israel's musical heritage. He devoted his time to restoring early Hebrew recordings, and served as the association's artistic director until his retirement in 2011. In 2009 he won the Israel Prize in the field of Hebrew song. In his latter years, twice divorced and separated from his third wife, Heiman suffered from ill health and financial hardship. A television feature about him…"} {"text": "[EN Wikipedia] List of Israeli films of 1975\n\nA list of films produced by the Israeli film industry in 1975. 1975 releases Unknown premiere date See also 1975 in Israel References External links Israeli films of 1975 at the Internet Movie Database Israeli Film 1975"} {"instruction": "Generate a random string of 12 characters using Python.", "input": "", "output": "import string import random ''.join(random.choices(string.ascii_letters + string.digits, k=12))"} {"instruction": "Develop a ML model in Python for predicting the winning team of football matches. Use data from the past 5 years of the Premier League.", "input": "Not applicable", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import GradientBoostingClassifier\n\n# Load data\ndata = pd.read_csv('data.csv')\n\n# Select features\nfeatures = data[['home_team_goals', 'away_team_goals', 'home_team_possession', 'away_team_possession',\n 'home_team_shots', 'away_team_shots', 'home_team_yellow_cards', 'away_team_yellow_cards',\n 'home_team_red_cards', 'away_team_red_cards']]\n\n# Select target\ntarget = data['winner']\n\n# Split data into training and test sets\nX_train, X_test, y_train, y_test = train_test_split(features, target, test_size=0.2, random_state=42)\n\n# Train the model\ngbm = GradientBoostingClassifier()\ngbm.fit(X_train, y_train)\n\n# Make predictions\ny_pred = gbm.predict(X_test)\n\n# Evaluate the model\nscore = gbm.score(X_test, y_test)\nprint(f'Model score: {score}')"} {"instruction": "Design a regex pattern to check if a given string is a valid URL or not.", "input": "", "output": "pattern = r'^(https?:\\/\\/)[\\da-z\\.-]+\\.[a-z\\.]{2,}\\/?[\\/\\w \\.-]*'"} {"instruction": "Write an SQL query to select all the customers who are from the US.", "input": "", "output": "SELECT * FROM customers WHERE country = 'US';"} {"text": "[CS Wikipedia] Stanislav Kamarýt\n\nStanislav Kamarýt (10. listopadu 1883 Velešín – 30. července 1956 Havlíčkův Brod) byl český esperantista, doktor filozofie a ředitel gymnázia v Chotěboři. Byl vůdčí osobnost československého esperantského hnutí. Dílo Díla v esperantu Stanislav Kamarýt byl mimo vlastní tvorby také redaktorem esperantské revue Esperantista. Publikoval mnoho esejí, filozofických pojednání a článků. Kromě literární činnosti ho lze považovat za historika esperantského hnutí v Československu, byl redaktorem děl Ĉeĥoslovaka antologio a Historio de esperanto-movado en Ĉeĥoslovakio. Filozofia vortaro Překlady Přeložil divadelní hru Vítězslava Nezvala Ještě dnes zapadá slunce nad Atlantidou, která však nebyla vydána a dosud zůstává v rukopise. Díla v češtině Přestože převážná část tvorby S. Kamarýta je v esperantu, napsal několik děl i v češtině. Mezinárodní jazyk O dvojí pravdě O jednoznačnosti mravního soudu Odkazy Související články Esperantská literatura Externí odkazy Autority Národní knihovny Stanislav Kamarýt Čeští esperantisté Čeští filozofové Narození v roce 1883 Úmrtí v roce 1956 Muži Akademie esperanta Úmrtí v Havlíčkově Brodě Narození ve Velešíně Úmrtí 30. července Narození 10. listopadu"} {"instruction": "Write a Python program to randomly split a list into two parts.", "input": "[1, 2, 3, 4, 5, 6, 7, 8]", "output": "import random\n\ndef split_list(input_list):\n index = random.randint(0, len(input_list)-1)\n part1 = input_list[:index]\n part2 = input_list[index:]\n return part1, part2\n\ninput_list = [1, 2, 3, 4, 5, 6, 7, 8]\nprint(\"Original list :\", input_list)\nresult1, result2 = split_list(input_list)\nprint(\"\\nPart 1 :\", result1)\nprint(\"Part 2 :\", result2)"} {"instruction": "Modify the code so that it checks if the number input is an integer or a decimal.", "input": "number = input(\"Please input a number: \")", "output": "number = input(\"Please input a number: \") if type(number) == int: print(\"Input is an integer\") else: print(\"Input is a decimal\")"} {"instruction": "Create a MySQL query to get the maximum salary from the employees table section.", "input": "Table structure: employees id | name | department | salary |", "output": "SELECT MAX(salary) FROM employees;"} {"instruction": "Create a class called 'Animal' that stores the attributes age and type.", "input": "", "output": "class Animal: def __init__(self, age, type): self.age = age self.type = type"} {"instruction": "Create a game using only Python code.", "input": "Not applicable", "output": "import random\nimport time\n\ndef game_loop():\n game_running = True\n display_intro()\n while game_running:\n user_input = input(\" What action do you choose? \")\n if user_input == \"run\":\n start_running()\n elif user_input == \"look\":\n enemy_random_number = random.randint(1, 10)\n if enemy_random_number > 3:\n print(\"You see a monster!\")\n continue_running = input(\"Do you continue running or do you fight? \")\n if continue_running == \"run\":\n start_running()\n elif continue_running == \"fight\":\n fight_monster()\n else:\n print(\"Nothing to see here.\")\n elif user_input == \"quit\":\n print(\"You quitted the game.\")\n game_running = False\n else:\n print(\"Invalid input!\")\n\ndef display_intro():\n print(\"Welcome to the game!\")\n print(\"Type 'run' to start the game or 'quit' to quit the game.\")\n\ndef start_running():\n print(\"You started running.\")\n time.sleep(3)\n print(\"You encountered an obstacle.\")\n obstacle_random_number = random.randint(1,10)\n if obstacle_random_number < 3:\n print(\"You were successful in overcoming the obstacle.\")\n print(\"You continue running.\")\n elif obstacle_random_number > 6:\n print(\"You were unsuccessful in overcoming the obstacle.\")\n print(\"You got stuck and had to turn back.\")\n else:\n print(\"You were lucky and the obstacle disappeared.\")\n print(\"You continue running.\")\n\ndef fight_monster():\n monster_random_number = random.randint(1,10)\n if monster_random_number < 5:\n print(\"You won the fight!\")\n elif monster_random_number > 6:\n print(\"You lost the fight!\")\n else:\n chance_random_number = random.randint(1,10)\n if chance_random_number < 5:\n print(\"You managed to escape the fight!\")\n else:\n print(\"You failed to escape the fight and lost!\")\n\n#Run game loop\ngame_loop()"} {"instruction": "Generate a Python program that takes a string and capitalizes the first character of each word.", "input": "\"this is an example\"", "output": "def capitalize_string(str):\n words = str.split(' ')\n capitalized_words = [word.capitalize() for word in words]\n return \" \".join(capitalized_words)\n\ncapitalized_string = capitalize_string(\"this is an example\")\nprint(capitalized_string)"} {"instruction": "Create an algorithm with pseudocode to find maximum and minimum element of an array.", "input": "", "output": "Algorithm findMaxMin(arr) Input: arr - an array of integers Output: maxEle - the maximum element in the array, minEle - the minimum element in the array Begin maxEle <- arr[0] minEle <- arr[0] for i = 0 to length(arr)-1 do if arr[i] > maxEle then maxEle <- arr[i] end if if arr[i] < minEle then minEle <- arr[i] end if end for return maxEle, minEle End"} {"text": "[HI Wikipedia] भीमस्वामी\n\nभीमस्वामी संस्कृत कवि थे। छठी शताब्दी ई० के अंतिम चरण में इनकी स्थिति मानी जाती है। इनका 'रावणार्जुनीय काव्य' प्रसिद्ध है। २७ सर्गों वाले इस काव्य में कार्तवीर्य अर्जुन तथा रावण के युद्ध का वर्णन है। भट्टिकाव्य की तरह इस काव्य में भी काव्य के बहाने संस्कृत व्याकरण के नियमों के उदाहरण उपस्थित किए गए हैं जिससे काव्यपक्ष कमजोर हो गया है। संस्कृत कवि संस्कृत व्याकरण"} {"instruction": "Rewrite the following Javascript code as a Python code that solves the same problem.\n\nGiven an array of numbers, find the square root of each number and print it.", "input": "[2, 3, 4, 5]", "output": "import math\n\nnumbers = [2, 3, 4, 5]\n\nfor number in numbers:\n print(math.sqrt(number))\n\n# Output\n# 1.414\n# 1.732\n# 2.000\n# 2.236"} {"instruction": "Generate a Python code to convert list of strings to list of integers.", "input": "strings = ['23', '45', '7', '67']", "output": "def convert_to_ints(strings): ints = [] for s in strings: ints.append(int(s)) return ints"} {"text": "[CS Wikipedia] Jaroslav Simonides\n\nJaroslav Simonides (17. května 1915 Holešov – 25. května 1996 v Praze ), organizátor společenského života, velmi plodný překladatel literatury z několika jazyků, především polštiny. Životopis Po absolvování gymnasia v rodném městě nastoupil na Filozofickou fakultu Univerzity Karlovy, obory germanistika a bohemistika. Když nacisté vysoké školy zavřeli, stal se načas knihkupcem. Překládání z polštiny jej dovedlo až k Chopinovi a tak se v roce 1959 stal spoluzakladatelem Společnosti F.Chopina a pak ji řadu let vedl. Společnost funguje dodnes. V letech 1968 až 1984 byl vedoucím klubu začínajících autorů Literarium, kde pomáhal např. Halině Pawlovské. Překladatel Do českého jazyka přeložil z polštiny, němčiny a francouzštiny přes 120 knižních titulů, ale také mnohé rozhlasové, televizní a divadelní hry. Zasloužil se za zpopularizování různých prozaických děl i pohádek celé řady polských autorů, např. R. Brandstaetter, J. Broszkiewicz, J. Dobraczyński, Stanislav Lem, S. Mrożek, J. Potocki. Vytvořil z povídek řady polských autorů i antologii SF povídek Rakety z Tantalu. V roce 1974 mu byl předán polský odznak Za zásluhy o polskou literaturu. Odkazy Externí odkazy Na webu Legie Web Obce překladatelů Web Pozitivní noviny Spojitost s Pawlovskou Čeští překladatelé Narození v roce 1915 Úmrtí v roce 1996 Muži Čeští překladatelé z polštiny Čeští překladatelé z němčiny Čeští překladatelé z francouzštiny Překladatelé do češtiny Narození v Holešově"} {"instruction": "Create a machine learning model in Python that can classify a set of samples into two classes.", "input": "Sample1: 0.8, 0.1, 0.3\nSample2: 1.0, 0.4, 0.7\nSample3: 0.4, 0.5, 0.9\nSample4: 0.2, 0.7, 0.8", "output": "import numpy as np\nfrom sklearn.svm import SVC\n\nX = np.array([[0.8, 0.1, 0.3],\n [1.0, 0.4, 0.7],\n [0.4, 0.5, 0.9],\n [0.2, 0.7, 0.8]])\n\ny = np.array([0, 1, 0, 1])\n\nmodel = SVC()\nmodel.fit(X, y)"} {"instruction": "Implement a naive bayes classifier in Python.", "input": "", "output": "class NaiveBayesClassifier:\n \"\"\"\n A simple Naive Bayes classifier implementation\n \"\"\"\n def __init__(self):\n self.classes = []\n self.word_counts = {}\n self.priors = {}\n\n def fit(self, X, y):\n \"\"\"\n Train the classifier \n X: List of documents\n y: List of labels\n \"\"\"\n # compute class priors\n self.classes = list(set(y))\n for c in self.classes:\n self.priors[c] = (y.count(c) / len(y))\n\n # compute count of words\n for x, c in zip(X, y):\n words = x.split()\n for word in words:\n if (c, word) not in self.word_counts:\n self.word_counts[(c, word)] = 0\n self.word_counts[(c, word)] += 1\n\n def predict(self, X):\n \"\"\"\n Predict classes for a list of documents\n X: List of documents\n \"\"\"\n pred_y = []\n for x in X:\n pred_classes = []\n # compute posterior for each class\n for c in self.classes:\n posterior = self.priors[c]\n for word in x.split():\n if (c, word) not in self.word_counts:\n count = 0\n else:\n count = self.word_counts[(c, word)]\n posterior *= (count + 1) / (sum([self.word_counts[(c, w)] for w in self.word_counts if w[0] == c]) + len(self.word_counts))\n pred_classes.append((c, posterior))\n # select the most probable class\n p = max(pred_classes, key=lambda x: x[1])\n pred_y.append(p[0])\n\n return pred_y"} {"instruction": "Rewrite the following code to use more efficient loops.", "input": "for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { System.out.println(\"hi\"); } }", "output": "for (int i = 0; i < 100; i++) { System.out.println(\"hi\"); }"} {"text": "[HI Wikipedia] जयपुर\n\nजयपुर शहर भारत के सबसे बड़े राज्य राजस्थान की राजधानी है। जयपुर राजस्थान का जोधपुर महानगर के बाद दूसरा बड़ा शहर है। जयपुर को पिंक सिटी अथवा गुलाबी नगरी भी कहते है, इसको सबसे पहले स्टैनली रीड ने पिंक सिटी बोला था । जयपुर की स्थापना आमेर के महाराजा सवाई जयसिंह (द्वितीय) ने की थी। यूनेस्को द्वारा जुलाई 2019 में जयपुर को वर्ल्ड हेरिटेज सिटी का दर्जा दिया गया है{{cite news|url=https://aajtak.intoday.in/story/rajasthan-pink-city-jaipur-world-heritage-site-unesco-prime-minister-narendra-modi-chief-minister-ashok-gehlot-atrc-1-1099225.html|title=पिंक सिटी जयपुर को UNESCO ने घोषित किया वर्ल्ड हेरिटेज, मोदी-गहलोत गदगद|accessdate=9 जुलाई 2019|publ जयपुर अपनी समृद्ध भवन निर्माण-परंपरा, सरस-संस्कृति और ऐतिहासिक महत्व के लिए प्रसिद्ध है। यह शहर तीन ओर से अरावली पर्वतमाला से घिरा हुआ है। जयपुर शहर की पहचान यहाँ के महलों और पुराने घरों में लगे गुलाबी धौलपुरी पत्थरों से होती है जो यहाँ के स्थापत्य की खूबी है। १८७६ में तत्कालीन महाराज सवाई रामसिंह ने इंग्लैंड की महारानी एलिज़ाबेथ प्रिंस ऑफ वेल्स युवराज अल्बर्ट के स्वागत में पूरे शहर को गुलाबी रंग से सजा दिया था। तभी से शहर का नाम गुलाबी नगरी पड़ा है। राजा जयसिंह द्वितीय के नाम पर ही इस शहर का नाम जयपुर पड़ा। जयपुर भारत के टूरिस्ट सर्किट गोल्डन ट्रायंगल (India's Golden Triangle) का हिस्सा भी है। इस गोल्डन ट्रायंगल में दिल्ली, आगरा और जयपुर आते हैं भारत के मानचित्र में उनकी स्थिति अर्थात लोकेशन को देखने पर यह एक त्रिभुज (Triangle) का आकार लेते हैं। इस कारण इन्हें भारत का स्वर्णिम त्रिभुज इंडियन गोल्डन ट्रायंगल कहते हैं। संघीय राजधानी दिल्ली से जयपुर की दूरी 280 किलोमीटर है। शहर चारों ओर से दीवारों और परकोटों से घिरा हुआ है, जिसमें प्रवेश के लिए सात दरवाजे हैं। बाद में एक और द्वार भी बना जो 'न्यू गेट' कहलाया। पूरा शहर करीब छह भागों में बँटा है और यह 111 फुट (३४ मी.) चौड़ी सड़कों से विभाजित है। पाँच भाग मध्य प्रासाद भाग को पूर्वी, दक्षिणी एवं पश्चिमी ओर से घेरे हुए हैं और छठा भाग एकदम पूर्व में स्थित है। प्रासाद भाग में हवा महल परिसर, व्यवस्थित उद्यान एवं एक छोटी झील हैं। पुराने शहर के उत्तर-पश्चिमी ओर पहाड़ी पर नाहरगढ़ दुर्ग शहर के मुकुट के समान दिखता है। इसके अलावा यहां मध्य भाग में ही सवाई जयसिंह द्वारा बनावायी गईं वैधशाला, जंतर मंतर, जयपुर भी हैं। जयपुर को आधुनिक शहरी योजनाकारों द्वारा सबसे नियोजित और व्यवस्थित शहरों में से गिना जाता है। देश के सबसे प्रतिभाशाली वास्तुकारों में इस शहर के वास्तुकार विद्याधर भट्टाचार्य का नाम सम्मान से लिया जाता है। ब्रिटिश शासन के दौरान इस पर कछवाहा समुदाय के राजपूत शासकों का शासन था। 19वीं सदी में इस शहर का विस्तार शुरु हुआ तब इसकी जनसंख्या 1,80,000 थी जो अब बढ़ कर 2001 के आंकड़ों के अनुसार 13,7,119 और 2012 के बाद 20 लाख हो चुकी है। यहाँ के मुख्य उद्योगों में धातु, संगमरमर, वस्त्र-छपाई, हस्त-कला, रत्न व आभूषण का आयात-निर्यात तथा पर्यटन-उद्योग आदि शामिल हैं। जयपुर को भारत का पेरिस भी कहा जाता है। इस शहर के वास्तु के बारे में कहा जाता है कि शहर को सूत से नाप लीजिये, नाप-जोख में एक…"} {"instruction": "Create a Python script to print the following output.", "input": "", "output": "for x in range(10): for y in range(10): print(\"*\" if (x + y) % 2 == 0 else \" \", end=\"\") print(\"\")"} {"instruction": "Write a SQL query to find the average credit score of users who are 18 years or younger.", "input": "", "output": "SELECT AVG(credit_score) FROM users WHERE age <= 18"} {"instruction": "Write a Python script to calculate the total and the average of an array of numbers.", "input": "arr = [56, 23, 89, 17, 13, 10]", "output": "total=sum(arr) avg=sum(arr)/len(arr) print(\"Total of the array elements is: \"+str(total)) print(\"Average of the array elements is: \"+str(avg))"} {"instruction": "Create a Python program to implement a web scraper for obtaining the latest news headlines from CNN.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# Function to web scrape news from CNN\ndef scrape_cnn():\n url = \"https://www.cnn.com/\"\n page = requests.get(url)\n if page.status_code != 200:\n return False\n soup = BeautifulSoup(page.content, 'html.parser')\n headlines = []\n for headline in soup.find_all('h3', {'class': 'cd__headline'}):\n headlines.append(headline.get_text().strip())\n return headlines\n\n# Call the function to scrape news from CNN\nheadlines = scrape_cnn()\n\n# Print out the headlines\nfor headline in headlines:\n print(headline)"} {"instruction": "Translate the following MATLAB code snippet into R.", "input": "A = [1 2 3; 4 5 6; 7 8 9]; B = A(1, :)", "output": "A <- matrix(c(1, 2, 3, 4, 5, 6, 7, 8, 9), nrow = 3, ncol = 3) B <- A[1,]"} {"text": "[DE Wikipedia] Marseille Blue Stars\n\nDie Marseille Blue Stars, auf französisch auch Blue Stars de Marseille, sind ein American-Football-Team aus dem französischen Marseille. Die erste Mannschaft spielt seit 2018 in der Division Elite, die Heimspiele finden im Stade Pierre-Delort statt. Die U19 wurde 2015 und 2022 französischer Meister. Der Verein betreibt außerdem Flag Football und Cheerleading. Geschichte Der Verein wurde 1994 gegründet. Die Mannschaft startete 1996 in der Division 3. 1998 gelang der Aufstieg in die Division 2 auf, aus der man 2002 wieder abstieg. In den 2010er Jahren hatte der Verein finanzielle Schwierigkeiten, die nur über eine Spendenkampagne gelöst werden konnte. Die Blue Stars legten in der Folgezeit größere Aufmerksamkeit auf die Nachwuchsarbeit. Die U19-Mannschaft wurde 2015 französischer Juniorenmeister. In der folgenden Saison 2016 gewannen die Senioren die Division 3 und stiegen in die Division 2 auf. Dort gelang ihnen 2017 der Durchmarsch in die Division Elite. Die Blue Stars zogen ungeschlagen in den Casque d’Or (das Finale der Division 2) ein, wo sie auf die Molosses d’Asnières trafen. Trotz einer 22:7-Halbzeitführung mussten sie sich am Ende 25:26 geschlagen geben. In ihrer ersten Saison 2018 in der Division Elite erreichten die Blue Stars das Halbfinale. Dort scheiterten sie am späteren Meister La Courneuve Flash mit 9:19. In der Saison 2022 gewannen die Blue Stars 2022 die Süd-Konferenz ohne Niederlage. Dadurch qualifizierten sie sich für das Play-off-Halbfinale, wo man den Thonon Black Panthers knapp mit 27:28 unterlag. Weblink Website der Marseille Blue Stars Einzelnachweise Französisches American-Football-Team Blue Stars Gegründet 1994"} {"text": "[HI Wikipedia] फ़ोर्तूना\n\nफ़ोर्तूना (अंग्रेज़ी : :en:Fortuna फ़ोर्चूना, लातिनी : Fortuna फ़ोर्तूना ) प्राचीन रोमन धर्म की प्रमुख देवियों में से एक थीं। वो भाग्य और दुनिया के छलावे की देवी थीं। उनके समतुल्य प्राचीन यूनानी धर्म की देवी थीं टाइकी। रोम के देवी-देवता रोमन धर्म"} {"instruction": "Validate whether the string contains only alphabets or not.", "input": "myString = \"abc123\"", "output": "def check_string_alphabets(myString): for character in myString: if (not character.isalpha()): return False return True myString = \"abc123\" if (check_string_alphabets(myString)): print(\"String contains only alphabets\") else: print(\"String contains numbers\")"} {"instruction": "Write a Python program to find the most efficient path for a robot to take from its current location to the destination", "input": "start = (4, 2) \nend = (9, 9)", "output": "# Function to find the most efficient path\ndef find_path(start, end):\n # Current location of the robot\n x = start[0]\n y = start[1] \n # Destination coordinates\n goal_x = end[0] \n goal_y = end[1] \n # set to record the cells already visited\n visited = set() \n # define a queue to store the tuple of current position and the path\n queue = [([x, y], [])] \n # define a neighbor list \n neighbor = [[1, 0], [0, 1], [-1, 0], [0, -1]] \n # define a maximum tries\n max_tries = 100 \n # define a while loop\n while queue:\n # get current position and current path\n position, path = queue.pop(0) \n # check if the goal is reached\n if position[0] == goal_x and position[1] == goal_y:\n return path + [position]\n # check if the current position is out of maximum tries and not visited before\n if position not in visited and max_tries > 0:\n visited.add(position)\n max_tries = max_tries - 1 \n #get all neighbors of the current position\n for neighbor_x, neighbor_y in neighbor:\n next_x = position[0] + neighbor_x\n next_y = position[1] + neighbor_y\n # add to the queue\n queue.append(([next_x, next_y], path + [position]))\n return None\n \nstart = (4, 2) \nend = (9, 9) \n# most efficient path from start to end\npath = find_path(start, end) \nprint(path)"} {"instruction": "Write a python program that selects five random elements from a list and prints them.", "input": "my_list = [1, 3, 5, 8, 7, 2, 10, 4, 6, 9]", "output": "import random\n\nmy_list = [1, 3, 5, 8, 7, 2, 10, 4, 6, 9]\nrandom.shuffle(my_list)\n\nfor i in range(5):\n print(my_list[i])"} {"instruction": "Create a program which finds patterns in a stream of numbers and prints out the start of the pattern.", "input": "87, 88, 89, 87, 88, 89, 87, 88, 89", "output": "Pattern detected: 87, 88, 89. Starting at index 0."} {"text": "[EN Wikipedia] Governor Penn\n\nGovernor Penn may refer to: John Penn (governor) (1729–1795), Governor of Colonial Pennsylvania from 1763 to 1771 and from 1773 to 1776 Richard Penn Sr. (1706–1771), Proprietary and Titular Governor of the Province of Pennsylvania from 1746 to 1771 See also Dancia Penn (born 1951), Deputy Governor of the British Virgin Islands from 2004 to 2007 Richard Penn (governor) (1730s–1811), Lieutenant Governor of the Province of Pennsylvania from 1771 to 1773"} {"instruction": "Write a python function to reverse the words in a given sentence.", "input": "sentence = \"hello world how are you\"", "output": "def reverseWords(sentence): \n words = sentence.split(' ') \n words = words[::-1] \n return ' '.join(words) \n \nprint(reverseWords(sentence))"} {"instruction": "Create a function that takes two strings's, two string length's and returns true if the second string is a rotation of the first.", "input": "string1 = \"Hello World\" string2 = \"WorldHello\" length1 = 11 length2 = 11", "output": "def isRotation(string1, string2, length1, length2): if length1 == length2 and len(string1)>0: string1string1 = string1 + string1 return string2 in string1string1"} {"instruction": "Write a Python script that generates a chess board with 8 rows and 8 columns of squares.", "input": "Not applicable", "output": "# create 8 rows\nfor row in range(8):\n # create 8 columns\n for col in range(8):\n # create a square\n square = {\"row\": row, \"col\": col}\n # If it is the first row or the last row of the board\n if row == 0 or row == 7:\n # if it is an odd square\n if (col % 2) == 0:\n # set the square to white\n square[\"color\"] = \"white\"\n else:\n square[\"color\"] = \"black\"\n # if it is the second row or the sixth row of the board\n elif row == 1 or row == 6:\n # if it is an even square\n if (col % 2) == 0:\n # set the square to white\n square[\"color\"] = \"white\"\n else:\n square[\"color\"] = \"black\"\n # if it is the third or fifth row of the board\n elif row == 2 or row == 5:\n # if it is an odd square\n if (col % 2) == 0:\n # set the square to black\n square[\"color\"] = \"black\"\n else:\n square[\"color\"] = \"white\"\n # if it is the fourth row of the board\n elif row == 3 or row == 4:\n # if it is an even square\n if (col % 2) == 0:\n # set the square to black\n square[\"color\"] = \"black\"\n else:\n square[\"color\"] = \"white\"\n print(square)"} {"instruction": "Create a table in PostgreSQL using the following columns: id, name, age and address.", "input": "", "output": "CREATE TABLE employees ( id SERIAL PRIMARY KEY, name VARCHAR(50) not null, age INTEGER not null, address VARCHAR(50) );"} {"instruction": "Create a function to generate random numbers from 0-99.", "input": "", "output": "import random def random_number(): return random.randint(0,99)"} {"instruction": "This code defines a class called ChefConf that has methods to load and validate data, as well as getters and setters for various fields. To use this class, create an instance of it and call its methods as needed. Make sure to provide the necessary data to the load_data method before calling validate.", "input": "", "output": "# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-\n\n# This file is part of Guadalinex\n#\n# This software is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This software is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this package; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n\n__author__ = \"Antonio Hernández \"\n__copyright__ = \"Copyright (C) 2011, Junta de Andalucía \"\n__license__ = \"GPL-2\"\n\nimport firstboot.validation as validation\n\n\nclass ChefConf():\n\n def __init__(self):\n self._data = {}\n self._data['chef_server_uri'] = ''\n self._data['chef_validation'] = ''\n self._data['chef_link'] = False\n self._data['chef_link_existing'] = False\n\n\n def load_data(self, conf):\n msg = 'ServerConf: Key \"%s\" not found in the configuration file.'\n try:\n self.set_url(conf['chef_server_uri'])\n except KeyError as e:\n print msg % ('chef_server_uri',)\n try:\n self.set_pem(conf['chef_validation'])\n except KeyError as e:\n print msg % ('chef_validation',)\n try:\n self.set_chef_link(conf['chef_link'])\n except KeyError as e:\n print msg % ('chef_link',)\n\n def validate(self):\n valid = validation.is_url(self._data['chef_server_uri']) and self._data['chef_validation'] != '' and self._data['chef_link'] != None and self._data['chef_link_existing'] != None\n return valid\n\n def get_url(self):\n return self._data['chef_server_uri'].encode('utf-8')\n\n def set_url(self, url):\n self._data['chef_server_uri'] = url\n return self\n\n def get_pem(self):\n return self._data['chef_validation'].encode('utf-8')\n\n def set_pem(self, pem):\n self._data['chef_validation'] = pem\n return self\n\n\n # --- Next fields are not present in the JSON file but are\n # setted on runtime by Firstboot ---\n def set_chef_link_exist"} {"instruction": "Develop a C# function to check if a given number is Armstrong or not. An Armstrong number is one which is equal to the sum of its digits raised to the power of the number of digits.", "input": "", "output": "static bool IsArmstrong(int num) { int origNum = num; int sum = 0; int digits = 0; while (num != 0) { digits++; num /= 10; } num = origNum; while (num != 0) { sum +=Math.Pow(num % 10, digits); num /= 10; } if (sum== origNum) return true; return false; }"} {"instruction": "Update the given list of numbers such that the first number is subtracted from the second one, the third is multiplied by the fourth, and the result is added to the fifth.", "input": "[2, 5, 4, 7, 9]", "output": "[2, 5, 28, 7, 37]"} {"instruction": "Update the below HTML snippet to make all the section heading elements center aligned.", "input": "

      Section 1

      Section 2

      Section 3

      ", "output": "

      Section 1

      Section 2

      Section 3

      "} {"instruction": "Create a regular expression to validate an e-mail address.", "input": "", "output": "^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)*$"} {"instruction": "Create a program in Python to generate an infinite sequence of random numbers.", "input": "Not applicable", "output": "# This program will generate an infinite sequence of random numbers\nimport random\n\n# Generate infinite sequence of random numbers\ndef rand_seq():\n while True:\n yield random.random()\n \n# Print 10 random numbers\nfor i in range(10):\n print(next(rand_seq()))"} {"instruction": "Rewrite this query using OR operator.", "input": "SELECT * FROM customers WHERE country = \"USA\" AND state = \"NC\"", "output": "SELECT * FROM customers WHERE country = \"USA\" OR state = \"NC\""} {"instruction": "Describe the difference between static and dynamic programming", "input": "", "output": "Static programming is when all of the instructions to perform a task are written out before the program is executed. In static programming, the order of instructions and the number of instructions does not change during execution. Dynamic programming is when the instructions and number or order of instructions can change at runtime. The instructions and order of instructions may also depend on inputs or external conditions. Dynamic programming is mainly used in optimization problems to reduce the number of calculations needed for a solution."} {"text": "[CS Wikipedia] Hydrostatický tlak\n\nHydrostatický tlak je tlak, který vzniká v kapalině její tíhou. Obdoba hydrostatického tlaku působícího v kapalinách se vyskytuje také v plynech, kde se označuje jako aerostatický tlak a pro tlak v atmosféře jako atmosférický tlak. Tlak působící v taveninách kovů se označuje jako metalostatický tlak. Popis vzniku a vlastnosti Hydrostatický tlak působí v kapalině, která je v dané souřadné soustavě v klidu a působí na ni nenulový součet gravitační a setrvačné síly (v nejběžnějším případě je to nenulové tíhové pole). Tlak v kapalině způsobený jinou vnější silou nebo pohybem kapaliny není hydrostatický tlak. Na kapalinu, která se nachází v tíhovém poli Země, působí tíhová síla. Tato síla má stejný vliv jako kterákoliv jiná vnější síla působící na kapalinu. Volný povrch kapaliny se tedy snaží zaujmout takovou polohu, aby byl kolmý k vnější síle, tedy k tíhové síle. Výsledkem je skutečnost, že volný povrch klidné kapaliny je vždy kolmý k tíhové síle. Např. v nádobách je volná hladina kapaliny vždy vodorovná, hladiny velkých vodních ploch (např. oceánů) jsou zakřiveny jako povrch Země apod. Hydrostatickým tlakem tlačí kapalina na tělesa do ní ponořená nebo na stěny nádoby nebo na své vlastní části (výše položené části tlačí svou tíhou na níže položené části kapaliny). Hydrostatický tlak působí všemi směry, díky rozkladu sil mezi částicemi kapaliny do různých směrů. Hydrostatický tlak závisí přímo úměrně na hloubce v kapalině (výšce kapalinového sloupce), hustotě kapaliny a na tíhovém zrychlení. Značení, jednotky, významné hodnoty Doporučené značení: p, ph, pg; pro aerostatický tlak přetrvává též zastaralé značení b Hlavní jednotka SI: pascal, značka Pa Další jednotky: viz Tlak Normální tlak, značka pn či p0, zastarale bn: pn = 101 325 Pa (přesně) Tato konstanta byla původně stanovena jako střední atmosférický tlak na hladině moře na 45° severní zeměpisné šířky (tj. v tíhovém poli s normálním tíhovým zrychlením) při teplotě 15 °C. Výpočet Hydrostatický tlak je přímo úměrný hloubce pod povrchem kapaliny (tj. výšce kapalinového sloupce nad daným místem, bez ohledu na jeho tvar), hustotě kapaliny a tíhovému zrychlení . Pokud je v nádobě o průřezu se svislými stěnami kapalina do výšky , je objem kapaliny v nádobě . Jestliže je hustota kapaliny , je hmotnost kapaliny v nádobě . Tíhová síla působící na dno nádoby je . Tlak u dna nádoby má tedy hodnotu . Hydrostatický tlak v hloubce pod hladinou kapaliny o hustotě lze tedy zapsat ve tvaru Působí-li na hladině kapaliny ještě nenulový aerostatický tlak b, je nutno ho přičíst: Odvození vzorce Základní vzorec pro tlak zní: . Sílu můžeme napsat jako tíhovou sílu kapaliny (protože to je právě ta, která způsobuje hydrostatický tlak). Vzorec nyní vypadá takto . Tíhová síla je součin tíhového zrychlení a hmotnosti tělesa,…"} {"instruction": "Create an array of 5 random numbers between 1 and 10 and output it to the console.", "input": "", "output": "let arr = []; for (let i = 0; i < 5; i++) { arr.push(Math.floor(Math.random() * 10 + 1)); } console.log(arr);"} {"instruction": "Find the closest pair of points from a list of points in Python?", "input": "points = [(1,1), (3,3), (-2, 4), (-3, -2), (2, 4)]", "output": "def closest_pair(points): \n min_distance = float('inf')\n n = len(points) \n for i in range(n-1): \n for j in range(i+1, n): \n distance = ((points[i][0] - points[j][0])**2 + \n (points[i][1] - points[j][1])**2)**0.5 \n if distance < min_distance: \n min_distance = distance\n min_pair = (points[i], points[j]) \n \n return min_distance, min_pair \n\npoints = [(1,1), (3,3), (-2, 4), (-3, -2), (2, 4)] \nprint(closest_pair(points))"} {"instruction": "Given a 2D matrix of integers, retrive the maximum sum submatrix.", "input": "[[2,-2,3,4],[-4,-3,1,1],[-1,5,5,-3]]", "output": "def max_sum_submatrix(matrix): rows, columns = len(matrix), len(matrix[0]) dp = [[0] * columns for _ in range(rows)] for i in range(rows): for j in range(columns): dp[i][j] = matrix[i][j] if i > 0: dp[i][j] += dp[i-1][j] if j > 0: dp[i][j] += dp[i][j-1] if i > 0 and j > 0: dp[i][j] -= dp[i-1][j-1] max_sum = float('-inf') for r1 in range(rows): for r2 in range(r1, rows): for c1 in range(columns): for c2 in range(c1, columns): current_sum = dp[r2][c2] if r1 > 0: current_sum -= dp[r1-1][c2] if c1 > 0: current_sum -= dp[r2][c1-1] if r1 > 0 and c1 > 0: current_sum += dp[r1-1][c1-1] max_sum = max(max_sum, current_sum) return max_sum"} {"text": "[HI Wikipedia] क्यूपिड\n\nक्यूपिड (लातिनी: Cupidus कूपिदुस) प्राचीन रोमन धर्म के देवताओं में से एक हैं। वह कामदेव की तरह प्रेम और काम-वासना के देवता हैं। उनके समतुल्य प्राचीन यूनानी धर्म के देवता थे ईरोस। उनका एक और लातिनी नाम है, आमोर। ये रोमन देवता ज्यूपिटर और देवी वीनस के पुत्र माने जाते हैं। उनको एक पंख लगे बच्चे की तरह चित्रित किया जाता है, हाथ में धनुष होता है जिससे ये बाण छोड़कर मनुष्यों में प्रेम भाव जागृत करते हैं। कहा जाता है कि क्यूपिड का बाण लगने पर मनुष्य जिससे भी सबसे पहले मिलता है उससे अत्यधिक प्रेम करने लगता है। इन्हें कहानियों में अत्यधिक चंचल, चपल और रसिक वर्णित किया जाता है। इनके तूणीर में दो तरह के बाण होते हैं - स्वर्णिम नोक वाले बाण जिनसे प्रेम जागृत होता है और सीसे की नोक वाले बाण जिनसे घृणा उत्पन्न होती है। कई चित्रों में इनके तीरों की नोक को हृदयाकार भी दिखाते हैं। वैलेंटाइन दिवस के मौके पर खास तौर पर क्यूपिड के चित्र देखने को मिलते हैं। रोम के देवी-देवता रोमन धर्म"} {"text": "[EN Wikipedia] Allah\n\nAllah (; , , ) is the common Arabic word for God. In the English language, the word generally refers to God in Islam. The word is thought to be derived by contraction from al-ilāh, which means \"the god\", and is linguistically related to the Aramaic words Elah and Syriac (ʼAlāhā) and the Hebrew word El (Elohim) for God. The word Allah has been used by Arabic people of different religions since pre-Islamic times. The pre-Islamic Arabs worshipped a supreme deity whom they called Allah, alongside other lesser deities. Muhammad used the word Allah to indicate the Islamic conception of God. Allah has been used as a term for God by Muslims (both Arab and non-Arab), Judaeo-Arabic-speaking Jews, and Arab Christians after the term \"al-ilāh\" and \"Allah\" were used interchangeably in Classical Arabic by the majority of Arabs who had become Muslims. It is also often, albeit not exclusively, used in this way by Bábists, Baháʼís, Mandaeans, Indonesian and Maltese Christians, and Sephardi Jews, as well as by the Gagauz people. Similar usage by Christians and Sikhs in Peninsular Malaysia has recently led to political and legal controversies. Etymology The etymology of the word Allāh has been discussed extensively by classical Arab philologists. Grammarians of the Basra school regarded it as either formed \"spontaneously\" (murtajal) or as the definite form of lāh (from the verbal root lyh with the meaning of \"lofty\" or \"hidden\"). Others held that it was borrowed from Syriac or Hebrew. Most considered it to be derived from a contraction of the Arabic definite article al- \"the\" and \"deity, god\" to meaning \"the deity, the God\". Indeed, there is \"the interchangeability of al-ilāh and allāh in early Arabic poetry even when composed by the Christian ʿAdī ibn Zayd\". The majority of modern scholars subscribe to the latter theory, and view the loanword hypothesis with skepticism. The use of \"Allah\" as the name of a deity appears as early as the first century. An inscription using the Ancient South Arabian script in Old Arabic from Qaryat al-Fāw reads, \"'to Kahl and lh and ʿAththar' (b-khl w-lh w-ʿṯr)\". Cognates of the name \"Allāh\" exist in other Semitic languages, including Hebrew and Aramaic. The corresponding Aramaic form is ʼElāh (), but its emphatic state is (). It is written as () in Biblical Aramaic and () in Syriac as used by the Assyrian Church, both meaning simply \"God\". The unusual Syriac form is likely an imitation of the Arabic. History of usage Pre-Islamic Arabians Regional variants of the word Allah occur in both pagan and Christian pre-Islamic inscriptions. Different theories have been proposed regarding the role of Allah in pre-Islamic polytheistic cults. According to the Islamic scholar Ibn Kathir, Arab pagans considered Allah as an unseen God who created and…"} {"instruction": "Construct a function which will take the name of a month as a parameter and return the number of days in that month.", "input": "", "output": "function daysInMonth(month) { switch (month) { case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": case \"October\": case \"December\": return 31; case \"April\": case \"June\": case \"September\": case \"November\": return 30; case \"February\": return 29; default: throw new Error('Invalid month'); } }"} {"text": "[CS Wikipedia] Antonin Artaud\n\nAntonin Artaud (výslovnost: arto, plným jménem Antoine Marie Joseph Artaud, 4. září 1896, Marseille, Francie – 4. března 1948, Ivry-sur-Seine) byl francouzský básník a divadelník; představitel francouzské meziválečné avantgardy, volně řazený do okruhu tzv. „prokletých básníků“. Život a dílo Jeho raná básnická tvorba byla silně ovlivněna surrealismem. Po roztržce se surrealistickou skupinou se zaměřil na divadelní tvorbu. Nejprve spolupracoval s představiteli francouzské divadelní avantgardy: v roce 1927 založil společně s Rogerem Vitracem a Robertem Aronem Divadlo Alfréda Jarryho, kde uváděl například Strindbergovy a Claudelovy hry. Později založil vlastní divadelní scénu, kterou nazval Divadlo krutosti. Svoji představu, jak má vypadat moderní divadlo, popsal jednak teoreticky ve spisu Manifest divadla krutosti (Manifeste du théâtre de la cruauté, 1932), jednak ji předvedl v představení divadelní adaptace Shelleyho tragédie a Stendhalovy povídky Cenciové (Les Cenci, 1935). V polovině 30. let odjel do Mexika, kde se účastnil náboženských rituálů mexických indiánů. Po návratu do Francie u něj naplno propukla duševní nemoc, v letech 1937-46 byl opakovaně internován v psychiatrické léčebně. Básnické sbírky Triktak nebe (Tric-trac du ciel, 1922) Pupek předpeklí (L’Ombilic des limbes, 1925) Heliogabalus aneb Korunovaný anarchista (Héliogabale ou l’Anarchiste couronné, 1935) – nejrozsáhlejší básnická skladba; na základě studia pramenů zde popsal život historické postavy syrského kněze, jenž se ve čtrnácti letech z vůle svého pohanského boha stal římským císařem. Van Gogh aneb Zasebevražděný společností (Van Gogh ou le Suicidé de la société, 1947, česky 1993) – báseň-esej, nejvýznamnější Artaudovo dílo. Vzniklo po návštěvě výstavy díla nizozemského malíře Vincenta van Gogha, jehož osud zneuznaného umělce připomněl Artaudovi osud vlastní a v němž našel spřízněnou duši. Teoretické práce Divadlo a jeho dvojenec (Le Théâtre et son double, 1938) – sbírka esejů, v níž popsal svoji vizi divadla. Význam Artaudovo dílo výrazně ovlivnilo moderní divadelní tvorbu, k jeho dramatickému odkazu se hlásili Eugène Ionesco, Samuel Beckett a Jean Genet. Odkazy Externí odkazy Antonin Artaud – webová stránka Arnauda Huberta věnovaná Artaudovu uměleckému odkazu, obsahuje kompletní blibliografii, linky apod. Prvky surového umění v Artaudově sbírce Artaud le Mômo – esej Matěje Turka. Artaudova definice surrealismu Narození v Marseille Francouzští výtvarníci Francouzští herci Prokletí básníci Francouzští dramatici Francouzští básníci Narození v roce 1896 Narození 4. září Úmrtí v roce 1948 Úmrtí 4. března Úmrtí v Ivry-sur-Seine Zemřelí na kolorektální karcinom Muži"} {"instruction": "Create an object data structure in JavaScript to represent a student and store details such as student's name, age, gender, and program.", "input": "", "output": "let student = { name: '', age: 0, gender: '', program: '' };"} {"instruction": "Write a function in Python Web scripting to update the value of a given list.", "input": "my_list = [1,2,3]\nnew_value = 5", "output": "def update_list(my_list, new_value):\n my_list[-1] = new_value\n return my_list\n\nmy_list = [1,2,3]\nnew_value = 5\n\nupdated_list = update_list(my_list, new_value)\nprint(updated_list)"} {"instruction": "Build a web application using Django and React that displays a list of products and provides user authentication.", "input": "Not applicable", "output": "# Setup Django\n\n# Create a Django project\ndjango-admin startproject myproject\n\n# Create an app inside the Django project\ncd myproject\npython manage.py startapp products\n\n# Add the app to INSTALLED_APPS in the settings.py file\nINSTALLED_APPS = [\n 'products.apps.ProductsConfig',\n # other apps\n]\n\n# Add the authentication app to INSTALLED_APPS in the settings.py file\nINSTALLED_APPS = [\n 'django.contrib.auth',\n\t# other apps\n]\n\n# Setup React\n\n# Create a React application\ncreate-react-app myapp\n\n# Add the dependecies \ncd myapp\nnpm install react-router-dom\nnpm install axios\nnpm install react-bootstrap\n\n# Create components\n# Create components for:\n# Home page\n# Product list page\n# Login page\n# Logout page\n# Authentication\n\n# Add routes for the components\n# Add routes for the login, logout, and product list components\n\n# Connect to the Django server\n# Add the Django API to the React application\naxios.defaults.baseURL = 'http://localhost:8000/'\n\n# Render the React application\n# Create the entry point for the application \n# Add a script tag pointing to the entry point\n# Render the application in the browser"} {"instruction": "Aggregate and calculate the mean of the following array by grouping them by the key 'region'.", "input": "array = [ {'name': 'John', 'region': 'West', 'score': 4}, {'name': 'Jane', 'region': 'West', 'score': 10}, {'name': 'Bob', 'region': 'East', 'score': 5}, {'name': 'Alice', 'region': 'East', 'score': 20} ]", "output": "import pandas as pd df = pd.DataFrame(array) mean_by_region = df.groupby('region')['score'].mean() print(mean_by_region)"} {"text": "[EN Wikipedia] Nkiru Sylvanus\n\nNkiru Sylvanus (born 21 April 1985) is a Nigerian actress and politician. She has featured in over two hundred movies and had been nominated for Best Actress of the Year at the Africa Magic Viewers Choice Awards and Best Actress in a Leading Role at the Africa Movie Academy Awards. Early life and education Sylvanus was born in Osisioma, Aba, a city located in Abia State, Nigeria. She attended Ohabiam Primary and Secondary School, where she obtained her first school leaving certificate and West African Senior School Certificate. She also attended the Enugu State University of Science and Technology, graduating with a BSc degree in mass communication. Acting career Described by The Punch newspaper as a veteran, Sylvanus began her acting career at the age of 16, in 2001. She has been featured in over 70 Nollywood movies. She has been featured twice (2017 & 2018) in The Guardian's publication on Celebrities Who Made Headlines. Political career In 2011, Sylvanus was included in the cabinet of former governor of Imo state Rochas Okorocha as his Special Assistant on Lagos State Affairs and later became his Special Adviser on Public Affairs. 2012 kidnap and release Sylvanus, who was a special assistant to former Governor of Imo state, Rochas Okorocha on Public affairs was kidnapped on 15 December 2012 at 2.30pm as reported by various reputable Nigerian media houses. A Vanguard media publication reported that a ransom of a ₦100,000,000 (One hundred million naira) which was (per exchange rate) in 2012 equivalent to $640,000 (Six Hundred and forty thousand U.S dollars) was demanded by her captors in exchange for her release. It was reported by Nigerian media houses that on 21 December 2012 at 10:30pm, Sylvanus was released from her kidnappers. Awards Best Actress of the Year at the Africa Magic Viewers Choice Awards Best Actress in a Leading Role at the Africa Movie Academy Awards Personal life For The first time in her life, On January 12, 2023 she married the love of her life Riches Sammy traditionally in her hometown in Osisioma local Government Area Abia state. Her husband is a Japan base actor/ business mogul & Investor who invested in Japanese Nightlife entertainment and Hospitality Industry.Mr Riches Sammy owns Hotel,Clubs,Bars and Restaurant in Japan and Nigeria he is also into Importation Of Beauty and Anti-Aging Equipments/Cars and few other businesses They had their white/church wedding in Enugu state on January 15, 2023. Selected filmography MY HEART Final Tussle (2008) Life Bullets (2007) Fine Things (2007) No More Love (2007) Secret Pain (2007) She Is My Sister (2007) The Last Supper (2007) Treasures Of Fortune (2007) Alice My First Lady (2006) Buried Emotion (2006) Divided Attention (2006) Pastor’s Blood (2006) Serious Issue (2006) Sweetest…"} {"text": "[DE Wikipedia] Evangelische Kirche (Wolfenhausen)\n\nDie Evangelische Kirche in Wolfenhausen im Taunus, Gemeinde Weilmünster im Landkreis Limburg-Weilburg in Hessen, ist eine einschiffige barocke Kirche. Sie wurde 1752 errichtet. Die Kirchengemeinde gehört zum Dekanat an der Lahn in der Propstei Nord-Nassau der Evangelischen Kirche in Hessen und Nassau. Geschichte Die Grundsteinlegung wurde 1752 vorgenommen. Die Bauzeit bis zur Fertigstellung betrug zwei Jahre. Zuvor stand auf diesem Standort wahrscheinlich eine kleine Kapelle, wofür das Datum von 1670 auf einer der Kirchenglocken spricht. Architektur Es handelt sich um einen breiten Saalbau, der wirkungsvoll auf einer Anhöhe über der Ortsmitte gelegen ist. Über der Giebelseite befindet sich ein mehrfach gestufter Haubenreiterturm mit Knauf und Kreuz. Ein identischer Haubenturm besteht bei der Pfarrkirche St. Margaretha in Hasselbach, der durch den Zimmermann Alexander Glöckner aus Weilburg erbaut wurde. Im Westmauerwerk hat die Kirche zwei Oculi. Auf beiden Seiten des Langhauses befinden sich drei schmale Rundbogenfenster. Ausstattung und Orgel Die Ausstattung stammt aus der Bauzeit der Kirche. Darunter befindet sich ein Altartisch aus schwarzem Lahnmarmor mit Balusterfuß. Eine grundlegende Innenrenovierung wurde im Jahre 1989 vorgenommen. Es wurde besonderen Wert darauf gelegt, dem Innenraum der Kirche so weit wie möglich seine ursprünglichen Farben zurückzugeben. Dies sind die Runkeler Farben Blau, Rot und Grau, sowie die vorhandene Deckenmalereien wieder freizulegen. Bei der Restaurierung wurden schwarze Engel mit ernsten Gesichtern in allen vier Ecken freigelegt, ebenso eine Sonne und ein Mond in der Mitte der Decke, die himmelblau ist. Die ernsten Gesichter sollen an die schwere Zeit und harte Arbeit der Bauern erinnern. Die ursprünglichen Sterne konnten nicht restauriert werden. Sie wurden neu aufgetragen, so dass der blaue Himmel mit Sonne, Mond und Sternen nun wieder komplett erstrahlt. An die bäuerliche Zeit erinnert die Predigtkanzel, die mit Kornähren geschmückt ist und von deren Schalldeckel verschiedene Früchte hängen. Die Orgel wurde 1778–1781 von dem Orgelbauer Dreuth aus Griedel erbaut. Glocken Im Turm hängen drei Glocken. Die älteste stammt aus dem Jahr 1670, die zwei jüngeren sind im Ersten Weltkrieg und im Zweiten Weltkrieg beschlagnahmt worden und mussten neu gegossen werden. Literatur R. Gorenflo u. a.: 800 Jahre Wolfenhausen, 1993 – Ein Dorf und seine Leute; 1194–1994. BRÜN-Verlag, Rüsselsheim 1993, ISBN 3-926759-31-3. Weblinks Kirchengemeinde Wolfenhausen-Haintchen auf der Website des Dekanats Kirchengebäude im Landkreis Limburg-Weilburg Evangelische Kirche Wolfenhausen Evangelische Kirche Wolfenhausen Kirchengebäude des Dekanats an der Lahn Saalkirche in Hessen Barocke Kirche Barockbauwerk in Hessen Erbaut in den 1750er Jahren…"} {"instruction": "Write a Ruby program to swap two given variables a and b.", "input": "a = 10, b = 5", "output": "a, b = b, a puts a # => 5 puts b # => 10"} {"text": "[DE Wikipedia] Phalerae\n\nDie Phalerae (lat. nur im Plural überliefert; griech. Plural τὰ φάλαρα tà phálara „die Metallbuckel“, Singular phálaron) sind in der griechisch-römischen Antike runde Platten aus Gold, Silber oder einem anderen Metall mit erhabenen Verzierungen oder Gravuren. Nach Sueton war es ursprünglich eine Sitte fremder Völker, die aber die Römer von den Etruskern übernahmen, bei denen die Phalerae als militärische Auszeichnung für bewiesene Tapferkeit dienten und vorne auf der Brust getragen wurden. Sie sind auf zahlreichen Denkmälern nachweisbar und auch noch vielfach im Original erhalten. Dargestellt werden neben einfachen Verzierungen Götter, Bilder eines Königs oder eines Kaisers. Die Adligen trugen diese Phalerae als Schmuck auf der Brust, die Soldaten bekamen sie als militärische Auszeichnungen. Phalerae dienten außerdem zum Schmuck von Geschirren für Pferde. Die ungerade Zahl wurde am Körper durch ein Riemenwerk zusammengehalten, breite Gurte, die um den Oberkörper liefen. Wurden sie als Halsschmuck getragen, konnten an den Metallbuckeln noch andere Schmuckstücke, wie zum Beispiel Halbmonde oder Glöckchen, hängen. Der Träger der Phalerae wird Phaleratus genannt. Die historische Hilfswissenschaft für Orden und Ehrenzeichen wird von diesem Begriff abgeleitet als Phaleristik bezeichnet. Siehe auch Medamus (zu den Phalerae von Lauersfort, die heute in der Antikensammlung Berlin aufbewahrt werden) Quellen Homer, Ilias, 16, 106, wo sie zum Schutz und Schmuck lederner Helme verwendet werden. Titus Livius 9, 46 Polybios, 6, 39, 3, wo der Fußsoldat eine Phiale, der Reiter für seine Leistung die Phalerae erhält. Silius Italicus 15, 255 (phaleris hic pectora fulget, hic torque aurato circumdat bellica colla, ille nitet celsus muralis honore coronae.) Vergil Aeneis 9, 359; 5, 310 Literatur Friedrich Matz: Die Lauersforter Phalerae. De Gruyter, Berlin 1932. Weblinks Universität Saarland: Bilder und weitere Informationen zur Technik der Gurtbefestigung Anmerkungen Römische Auszeichnung Römische Militärgeschichte Kostümkunde der römischen Antike Schmuckstück"} {"instruction": "Generate an SQL query to retrieve the data", "input": "Retrieve the name and salary of employees whose salary is more than $50000", "output": "SELECT name, salary FROM employees WHERE salary > 50000;"} {"instruction": "Use a for loop to sum the numbers in the list [4, 6, 5, 8].", "input": "", "output": "sum = 0 for num in [4,6,5,8]: sum = sum + num print(\"The sum is:\",sum)"} {"instruction": "Develop a Python program to find the common elements in two lists.", "input": "List 1: [3, 9, 15, 21, 27]\nList 2: [21, 7, 13, 29, 31]", "output": "common_elements = [] \n \n# using loop \nfor i in [3, 9, 15, 21, 27]: \n for j in [21, 7, 13, 29, 31]: \n if i == j: \n common_elements.append(i) \n \n# printing common elements \nprint(common_elements) \n# Output: [21]"} {"instruction": "Describe a greedy algorithm", "input": "", "output": "A greedy algorithm is an approach to solving a problem that involves making decisions based on the best immediate payoff, without considering the overall cost. It follows the principle of 'greedy', which involves making a decision with the largest immediate benefit and disregarding the overall cost of the solution. Greedy algorithms are used to solve optimization problems, such as finding the optimal path in a given graph, with the goal of maximizing the benefit of the overall solution."} {"instruction": "Design an API in Python that takes two parameters: a list of strings and a string. The API should return the number of times the string is seen in the list.", "input": "List of Strings: [\"this\", \"is\", \"a\", \"word\"]\n\nString: \"a\"", "output": "def find_string_count(string_list, target_string):\n count = 0\n for item in string_list:\n if item == target_string:\n count += 1\n return count\n\nlist_of_strings = [\"this\", \"is\", \"a\", \"word\"]\ntarget_string = \"a\"\nresult = find_string_count(list_of_strings, target_string)\nprint('Number of occurrences of', target_string, 'in list is', result)"} {"instruction": "Develop a Python program to check if a number is divisible by 3.", "input": "", "output": "def is_divisible_by_3(num):\n if num % 3 == 0:\n return True\n return False"} {"instruction": "Explain recursion in programming.", "input": "", "output": "Recursion is a programming technique where a function calls itself, either directly or indirectly. It is used to solve problems that involve repetition or breaking down a problem into simpler sub-problems. Recursion can be used to solve a wide range of problems, from sorting algorithms to defining recursive data structures. It can also reduce the amount of code needed to solve a problem, as the same code can be used to solve different sub-problems."} {"instruction": "Write pseudo code for finding the maximum element in an array.", "input": "", "output": "START SET max_element to 0 LOOP through array IF current element is greater than max_element SET max_element to current element END LOOP PRINT maximum element END"} {"instruction": "Design a die roll program in Java.", "input": "", "output": "import java.util.Random; public class RollDie { public static void main(String[] args) { // creating instance of Random class Random rand = new Random(); // Generate random integers in range 0 to 6 int rand_int = rand.nextInt(6); // Print random integers System.out.println(\"The die shows : \"+ (rand_int + 1)); } }"} {"instruction": "Design a python program to convert a given number of days into years, months, and days.", "input": "", "output": "# convert days\ndef convert_days(days):\n years = days // 365\n months = (days % 365) // 30\n days = (days % 365) % 30 \n return (years, months, days)\n\n# test\ndays = 900\nyears, months, days = convert_days(days)\nprint(\"Number of years =\", years) \nprint(\"Number of months =\", months) \nprint(\"Number of days =\", days)"} {"instruction": "Develop an algorithm in Python to sort a list of numbers using merge sort.", "input": "list = [10, 7, 8, 9, 1, 5]", "output": "def mergeSort(arr):\n if len(arr) > 1:\n mid = len(arr)//2\n left = arr[:mid]\n right = arr[mid:]\n \n mergeSort(left)\n mergeSort(right)\n\n i = 0\n j = 0\n k = 0\n\n while i < len(left) and j < len(right):\n if left[i] < right[j]:\n arr[k] = left[i]\n i += 1\n else:\n arr[k] = right[j]\n j += 1\n k += 1\n\n while i < len(left):\n arr[k] = left[i]\n i += 1\n k += 1\n\n while j < len(right):\n arr[k] = right[j]\n j += 1\n k += 1"} {"instruction": "Create a Python function that takes a list of numbers and returns the sum of the odd numbers in the list.", "input": "[1, 2, 3, 4, 5]", "output": "def sumOdds(nums):\n total = 0\n for num in nums:\n if num % 2 != 0:\n total += num\n return total\n\nnums = [1,2,3,4,5]\nsum_odds = sumOdds(nums)\nprint(sum_odds) #output: 9"} {"instruction": "Apply the given CSS style to the HTML element.", "input": "
      Hello World
      css: font-weight: bold;", "output": "
      Hello World
      "} {"instruction": "Produce a regular expression pattern in Python that validates emails.", "input": "Not applicable", "output": "import re\n\ndef validate_email(email):\n email_regex = r'^[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}$'\n return re.match(email_regex, email) != None"} {"text": "[DE Wikipedia] Reiner Solenander\n\nReiner Solenander (* 1524 in Büderich; † 5. Januar 1601 in Büderich), ursprünglich Reiner Gathmann, war Badearzt in Lucca und Leibarzt Wilhelms des Reichen in Düsseldorf. Leben Als Sohn einer angesehenen Büdericher Bürgerfamilie besuchte Reiner Gathmann die Weseler Lateinschule. Rektor der Schule war zu der Zeit der ebenfalls aus Büderich stammende Johannes Peringius. Bereits zu dieser Zeit wurde er von Herzog Johann III. von Kleve finanziell gefördert. Ein Stipendium des Herzogs ermöglichte ihm, der, wie Melchior Adam schreibt, von ingenio felici (glücklicher Begabung) war, ferner ein mehrjähriges Studium in Löwen, Bologna, Pisa, Rom und Neapel. Er latinisierte seinen Namen in „Reiner(us) Solenander“, und schaltete sich mit seiner ersten Publikation Apologia qua Iulio Alexandrino respondetur pro Argenterio in den von Paracelsus und Vesalius ausgelösten Streit um die Bedeutung und Verbindlichkeit der Lehre des Galenus ein. Giovanni Argenterio hatte Galenus angegriffen, Julius Alexandrinus nahm Galenus gegen diese Angriffe in Schutz. Solenander stellte sich auf die Seite des Angreifers, also der Befreiung von Galenus’ erdrückender Vormachtstellung in der bisherigen Medizin. Er kehrte später freilich zu den anerkannteren galenischen Prinzipien zurück. Er untersuchte und verglich die aus der Antike bekannten Thermalquellen von Ischia und wurde Badearzt in Lucca. Mit De caloris fontium medicatorum causa, eorumque temperatione libri duo wurde er zu einem frühen Balneologen. Unmittelbar nach dieser Veröffentlichung berief ihn 1559 Herzog Wilhelm der Reiche nach Düsseldorf, wo er neben dem acht Jahre älteren Johann Weyer als herzoglicher Leibarzt wirkte. Als Johannes Oporinus 1565 einen Brief über Paracelsus an die beiden Leibärzte richtete, wandte er sich an Solenander als den medicum illustrum ducis Juliacensis excellentissimum. 1566 erlitt der Herzog einen Schlaganfall. Solenander linderte das darauffolgende Siechtum durch diätetische Maßnahmen, musste sich aber bald auch der Geistesschwäche und Melancholie des Erbprinzen Johann Wilhelm annehmen, die zu beheben ihm nicht gelang. Erfolgreich hingegen behandelte er ein Augenleiden des Kartographen Gerhard Mercator in Duisburg mit Augentrost. Solenander heiratete in Düsseldorf Maria, eine Tochter des Arztes Johannes Lithodius (* 1510; † nach 1578). Solenander und Weyer nahmen 1573 an der Brautfahrt der Prinzessin Marie Eleonore von Jülich-Kleve-Berg zu ihrer Hochzeit mit Herzog Albrecht Friedrich von Preußen nach Königsberg teil. 1578 zog sich Johann Weyer aus dem Hofdienst zurück, sein Sohn Galenus Weyer folgte ihm nach. Von diesem, Solenander und Lambert Wolf stammt ein medizinisches Gutachten über den desolaten Gesundheitszustand Johann Wilhelms im Jahr 1589. 1592 starb Wilhelm der Reiche, 1595 zog…"} {"instruction": "Write a Python class to modify the case of the string", "input": "A String with the text: \"Hello World\"", "output": "class StringCaseModifier:\n def __init__(self, string):\n self.string = string\n\n def to_upper(self):\n return self.string.upper()\n\n def to_lower(self):\n return self.string.lower()\n \n def to_title(self):\n return self.string.title()\n\nif __name__ == '__main__':\n test_string = 'Hello World'\n string_modifier = StringCaseModifier(test_string)\n print(string_modifier.to_upper())\n print(string_modifier.to_lower())\n print(string_modifier.to_title())"} {"instruction": "Using C++, create a program to calculate the volume of a rectangular prism given the length, width and height.", "input": "", "output": "\"\"\" Using C++, create a program to calculate the volume of a rectangular prism given the length, width and height. \"\"\" #include int main() { double length, width, height; // Prompt for the dimensions std::cout << \"Enter the length, width and height: \"; std::cin >> length >> width >> height; // Calculate the volume double volume = length * width * height; // Print the volume std::cout << \"The volume of the rectangular prism is: \" << volume << std::endl; return 0; }"} {"instruction": "Create a Python program that takes in a list of email addresses as argument and stores them in a CSV.", "input": "", "output": "\"\"\"\nCreate a Python program that takes in a list of email addresses and stores them in a CSV.\n\"\"\"\n\nimport csv\n\ndef store_emails(emails):\n with open('emails.csv', 'w', newline='') as csvfile:\n writer = csv.writer(csvfile)\n for email in emails:\n writer.writerow([email])\n\nif __name__ == '__main__':\n emails = [\"example@gmail.com\",\"example2@gmail.com\",\"example3@gmail.com\"]\n store_emails(emails)"} {"text": "[EN Wikipedia] 1950–51 Norwegian 1. Divisjon season\n\nThe 1950–51 Norwegian 1. Divisjon season was the 12th season of ice hockey in Norway. Eight teams participated in the league, and Furuset IF won the championship. Regular season External links Norwegian Ice Hockey Federation Nor Eliteserien (ice hockey) seasons 1950–51 in Norwegian ice hockey"} {"instruction": "Write a MySQL query to update the price of all items that cost more than $50 to $50.", "input": "", "output": "UPDATE items SET price = 50 WHERE price > 50;"} {"instruction": "Write a regex expression to match the given input.", "input": "abbccd", "output": "^(a|b|c){2}d$"} {"text": "[DE Wikipedia] Wittmack\n\nWittmack ist der Familienname folgender Personen: Karlfranz Schmidt-Wittmack (1914–1987), deutscher Politiker (CDU), MdB Ludewig Wittmack (1839–1929), deutscher Botaniker Lilian Wittmack, dänische Springreiterin Siehe auch: Wittmaack"} {"instruction": "Write a Python program to find out the common items from two given arrays.", "input": "arr1 = [1, 2, 3, 5, 7 ] arr2 = [2, 3, 5, 6, 7]", "output": "common_items = [] for item in arr1: if item in arr2: common_items.append(item) print(common_items) # Output: [2, 3, 5, 7]"} {"instruction": "Write an SQL query to update the salary of employee with Id 4 to 80000", "input": "", "output": "UPDATE employees SET Salary = 80000 WHERE ID = 4;"} {"instruction": "Write a recursive version of the following code.", "input": "def factorial(n): result = 1 for i in range(1, n + 1): result *= i return result", "output": "def factorial(n): if n == 0: return 1 else: return n * factorial(n - 1)"} {"instruction": "Write a SQL query to find the name and occupation of all people older than 60.", "input": "", "output": "SELECT name, occupation FROM people WHERE age > 60;"} {"instruction": "Write a query in MongoDB to find all the documents in the collection \"Books\".", "input": "", "output": "db.Books.find({})"} {"instruction": "Write a code to generate a random password consisting of 8 characters with atleast one lowercase letter, one uppercase letter and one number.", "input": "", "output": "import string import random def generate_password(): password_characters = string.ascii_letters + string.digits password = ''.join(random.choice(password_characters) for i in range(8)) if not any(char.islower() for char in password): password = password[:7] + random.choice(string.ascii_lowercase) if not any(char.isupper() for char in password): password = password[:7] + random.choice(string.ascii_uppercase) if not any(char.isdigit() for char in password): password = password[:7] + random.choice(string.digits) return password"} {"instruction": "Construct an API using Flask that returns an array of integers in response to a request", "input": "", "output": "from flask import Flask, jsonify app = Flask(__name__) @app.route('/api/v1/get_data', methods=['GET']) def get_data(): data = [1, 2, 3, 4, 5] return jsonify(data) if __name__ == '__main__': app.run()"} {"instruction": "This code is an OTA firmware update script for ESP8226 implementation of the Homie MQTT IoT convention. To use it, you need to run the main function with the following arguments: broker-host, broker-port, broker-username, broker-password, base-topic, device-id, and firmware. The firmware argument should be the path to the firmware to be sent to the device. Once the script is running, it will connect to the MQTT broker and wait for device info. When the device info is received, the script will push the firmware binary to the device and update it. The script will print progress updates during the update process and disconnect from the broker when the update is complete.", "input": "", "output": "#!/usr/bin/env python\n\nfrom __future__ import division, print_function\nimport paho.mqtt.client as mqtt\nimport base64, sys, math\nfrom hashlib import md5\n\n# The callback for when the client receives a CONNACK response from the server.\ndef on_connect(client, userdata, flags, rc):\n if rc != 0:\n print(\"Connection Failed with result code {}\".format(rc))\n client.disconnect()\n else:\n print(\"Connected with result code {}\".format(rc))\n\n # calcluate firmware md5\n firmware_md5 = md5(userdata['firmware']).hexdigest()\n userdata.update({'md5': firmware_md5})\n\n # Subscribing in on_connect() means that if we lose the connection and\n # reconnect then subscriptions will be renewed.\n client.subscribe(\"{base_topic}{device_id}/$implementation/ota/status\".format(**userdata))\n client.subscribe(\"{base_topic}{device_id}/$implementation/ota/enabled\".format(**userdata))\n client.subscribe(\"{base_topic}{device_id}/$fw/#\".format(**userdata))\n\n # Wait for device info to come in and invoke the on_message callback where update will continue\n print(\"Waiting for device info...\")\n\n\n# The callback for when a PUBLISH message is received from the server.\ndef on_message(client, userdata, msg):\n # decode string for python2/3 compatiblity\n msg.payload = msg.payload.decode()\n\n if msg.topic.endswith('$implementation/ota/status'):\n status = int(msg.payload.split()[0])\n\n if userdata.get(\"published\"):\n if status == 206: # in progress\n # state in progress, print progress bar\n progress, total = [int(x) for x in msg.payload.split()[1].split('/')]\n bar_width = 30\n bar = int(bar_width*(progress/total))\n print(\"\\r[\", '+'*bar, ' '*(bar_width-bar), \"] \", msg.payload.split()[1], end='', sep='')\n if (progress == total):\n print()\n sys.stdout.flush()\n elif status == 304: # not modified\n print(\"Device firmware already up to date with md5 checksum: {}\".format(userdata.get('md5')))\n client.disconnect()\n elif status == 403: # forbidden\n print(\"Device ota disabled, aborting...\")\n client.disconnect()\n\n elif msg.topic.endswith('$fw/checksum'):\n checksum = msg.payload\n\n if userdata.get(\"published\"):\n if checksum == userdata.get('md5'):\n print(\"Device back online. Update Successful!\")\n "} {"instruction": "Extract the first 2 elements from a given array.", "input": "arr = [1, 2, 3, 4, 5]", "output": "def extract_first_two(arr): return arr[:2] arr = [1, 2, 3, 4, 5] result = extract_first_two(arr) print (result) # Output: [1, 2]"} {"text": "[CS Wikipedia] Laminární proudění\n\nLaminární proudění je takové proudění vazké kapaliny, při kterém jsou proudnice rovnoběžné a nemísí se. Částice kapaliny se pohybují vedle sebe jakoby ve vrstvách – „destičkách“ (destička = lat. lamina), které se vzájemně nepromíchávají. Odtud také laminární neboli vrstevnaté proudění. Mezi jednotlivými vrstvami se předpokládá existence vnitřního tření a platnost vztahu Newtonova zákona viskozity. Laminární proudění je tedy proudění kapaliny s vnitřním třením, které je potenciálové. Laminární proudění lze použít jako vhodnou aproximaci proudění reálných kapalin při malých rychlostech. Ustálené proudění v úzké trubici Proudění vazké kapaliny v úzké trubici lze při nízkých rychlostech považovat za laminární. Rychlostní profil Uvažujme v trubici o poloměru malý válec kapaliny o poloměru a délce . Na vstupní průřez tohoto válce působí tlak a na výstupní průřez tlak . Tlakový rozdíl na délce má hodnotu . Tlaková síla, která na válec působí ve směru toku, je Tato síla odpovídá odporu kapaliny proti proudění. Tento odpor je způsoben vnitřním tření mezi pláštěm válce a kapalinou, která jej obklopuje, přičemž jej lze vyjádřit jako , kde je tečné napětí. Při ustáleném proudění musí být a v rovnováze. Z předchozích vztahů tedy dostaneme Odtud po úpravě a integraci dostaneme pro rychlostní profil (tedy rozložení rychlostí v trubici) výraz , kde je integrační konstanta, kterou určíme z podmínky, že na vnitřní straně trubice je rychlost nulová, tzn. pro . Po dosazení úpravě dostaneme Podle tohoto vztahu je tedy závislost rychlosti na (tedy na vzdálenosti od středu trubice) parabolická. Hagen-Poiseuilleův zákon Ze znalosti rozložení rychlostí je možné spočítat objemový tok . Rychlost je v určité vzdálenosti od osy trubice konstantní. Plochou mezikruží ve vzdálenosti a šířce proteče za časovou jednotku kapalina o objemu Integrací přes celý průřez trubice dostaneme Tento vztah je matematickým vyjádřením tzv. Hagen-Poiseuilleova zákona, který zní: Objemový tok viskózní tekutiny při laminárním proudění trubicí kruhového průřezu je přímo úměrný tlakovému spádu a čtvrté mocnině poloměru trubice a je nepřímo úměrný dynamické viskozitě . Maximální a průměrná rychlost proudění Maximální rychlost, kterou se tekutina při laminárním proudění trubicí pohybuje má hodnotu a nachází se na ose trubice (). Průměrnou rychlost, kterou kapalina protéká trubicí při laminárním proudění můžeme určit jako podíl objemového toku a celkového průřezu trubice (), tzn. Vlastnosti Laminární proudění je vírové, neboť část kapaliny, která se nachází mezi dvěma vrstvami s různými rychlostmi má tendenci se otáčet. Vírová vlákna mají tvar soustředných kružnic, jejichž středy leží na ose trubice. O vírové povaze laminárního proudění se lze přesvědčit výpočtem podmínky pro potenciálové proudění po…"} {"instruction": "Convert the following chess board into a 2D array in JavaScript.", "input": "+---+ |BR | |BK | | BB| |BR | +---+", "output": "let chessBoard = [[\"BR\", \"BK\", \"BB\", \"BR\"]];"} {"instruction": "Write an algorithm to detect a cycle linked list in Python.", "input": "", "output": "def detect_cycle(head):\n \"\"\"Detects whether a linked list contains a cycle.\n\n Args:\n head (ListNode): The head node of the linked list.\n\n Returns:\n bool: True if there is a cycle, and False if there isn't.\n \"\"\"\n slow = head\n fast = head\n\n while fast and fast.next:\n # move slow and fast by one step\n slow = slow.next\n fast = fast.next.next\n # fast will catch up slow if a cycle exists\n if slow == fast:\n return True\n # fast has reached the end and no cycle\n return False"} {"instruction": "Write a Java program to remove comments from the Java program.", "input": "public class HelloWorld { /* This is a multiline comment. */ public static void main(String[] args) { System.out.println(\"Hello World!\"); // This is a single line comment. } }", "output": "public class HelloWorld { public static void main(String[] args) { System.out.println(\"Hello World!\"); } }"} {"instruction": "Create a SQL query to display the total number of sales in each year.", "input": "Table Name: \"Sales\" Table Columns: \"year\", \"total_sales\"", "output": "SELECT year, SUM(total_sales) FROM Sales GROUP BY year;"} {"instruction": "Reverse a linked list.", "input": "", "output": "def reverseList(node): prev = None while (node != None): next = node.next node.next = prev prev = node node = next return prev"} {"text": "[CS Wikipedia] Vaška\n\nVaška () je řeka v Komiské republice a v Archangelské oblasti v Rusku. Je dlouhá 605 km. Povodí řeky je 21 000 km². Nazývá se také Važka (). Průběh toku Pramení v mokřadech na rozvodí Mezeně a Severní Dviny. Na svém toku vytváří mnoho zákrut a mrtvých ramen. V jejím povodí je přibližně 900 jezer. Ústí zleva do Mezeně. Vodní režim Zdrojem vody jsou sněhové a dešťové srážky. Průměrný roční průtok vody u vesnice Reščelskaja činí 184 m³/s. Zamrzá na konci října a rozmrzá na začátku května. Využití Vodní doprava je možná do přístavu Usť-Vačerga. Externí odkazy Literatura Řeky v Archangelské oblasti Řeky v Komi Povodí Mezeně"} {"text": "[HI Wikipedia] शॉम्पनी\n\nअंडमान निकोबार की जनजातियों में शॉम्पनी (लगभग 200) एक विलुप्त होती हुई प्रजाति है। ये मंगोल नस्ल की है जबकि अंडमान और निकोबार की बाक़ी सभी जनजातियाँ नीग्रोईड यानी अफ्रीकियों जैसी हैं। अण्डमान और निकोबार की जनजातियां"} {"instruction": "Check this code and add an if statement to print out “even” if the number is divisible by 2 and “odd” if not.", "input": "for n in range (1,10): print(n)", "output": "for n in range (1, 10): if n % 2 == 0: print(n, \"even\") else: print(n, \"odd\")"} {"instruction": "Explain how a support vector machine works.", "input": "", "output": "A Support Vector Machine (SVM) is a supervised learning algorithm that can be used for binary classification, regression, or outlier detection. SVMs use a hyperplane to separate data points into two categories, each represented by a different class. The hyperplane divides data points into classes by minimizing the distance between them and maximizing the margin between the two classes, while creating a decision boundary. SVMs then use a kernel function to project the data into a higher dimensional space and maximize the distance between observations. This allows SVMs to identify non-linear patterns in data and find the optimal decision boundary. The support vectors are points closest to the decision boundary"} {"instruction": "Create a Java program which takes a year as input and prints whether it is a leap year or not.", "input": "year = 2020", "output": "public class LeapYear { public static void main(String args[]) { int year = 2020; if((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0))) System.out.println(\"The year is a leap year.\"); else System.out.println(\"The year is not a leap year.\"); } }"} {"instruction": "Create a Python function that takes a string and rotates the characters in the string by a specified integer.", "input": "\"Hello\", 3", "output": "def rotateString(s, n):\n output = \"\"\n for char in s:\n output += chr(ord(char) + n)\n return output\n\nresult = rotateString(\"Hello\", 3)\nprint(result)"} {"instruction": "Insert a breakpoint just before the return statement.", "input": "def calculate_the_total(fruit_list): total = 0 for item in fruit_list: total += item return total", "output": "def calculate_the_total(fruit_list): total = 0 for item in fruit_list: total += item import pdb; pdb.set_trace() return total"} {"instruction": "Enhance the following code to find the average of all the even numbers in the array:", "input": "my_array = [1,2,3,4,5,6]", "output": "even_numbers = [] for number in my_array: if number % 2 == 0: even_numbers.append(number) average = sum(even_numbers) / len(even_numbers) print(average)"} {"instruction": "Create a list comprehension to generate a list of all the words in the sentence \"Python is amazing\".", "input": "", "output": "words = [word for word in \"Python is amazing\".split(' ')]"} {"text": "[HI Wikipedia] अंग लिपि\n\nलगभग 2500 बर्ष पूर्व लिखे गये प्रसिद्ध प्राचीन बौद्ध ग्रंथ \"ललित विस्तर\" में वर्णित64 लिपियों में \"अंग लिपि\" का स्थान चौथा है। लिपि"} {"instruction": "Automate the process of building a Python program that takes in the names of two people as input, and outputs the age difference between them.", "input": "John Doe, Jane Doe", "output": "# Program to compute age difference between two persons\n\n# Input\nname1 = input('Enter name of first person: ')\nname2 = input('Enter name of second person: ')\n\n# Compute age difference\nages = {\n 'John Doe': 35,\n 'Jane Doe': 27\n}\n\ndiff = abs(ages[name1] - ages[name2])\n\n# Output\nprint(f'The age difference between {name1} and {name2} is {diff}.')"} {"text": "[DE Wikipedia] Pariacaca\n\nDer Nevado Pariacaca ist ein Berg in der Cordillera Huarochirí (auch „Pariacaca-Gebirgskette“ genannt) in der Westkordillere der peruanischen Anden. Der vergletscherte Berg besitzt zwei Gipfel: den Nordgipfel mit einer Höhe von sowie den Südgipfel mit . Der Nevado Pariacaca bildet die höchste Erhebung der Cordillera Huarochirí und befindet sich an der Grenze der Verwaltungsregionen Junin und Lima. Nordwestlich liegen die benachbarten Berge Colquepucro (5658 m) und Corihuasi (5200 m). Die Dominanz des Nevado Pariacaca beträgt 29 km. In dieser Entfernung liegt der weiter südlich gelegene Nevado Ticlla. Die Schartenhöhe beträgt 1098 m. Der einfacher besteigbare niedrigere Nordgipfel wurde 1936, der Südgipfel 1938 erstbestiegen, beide durch US-amerikanische Expeditionen geführt von T. A. Dodge. In der Mythologie der Inka wurde der Berg als Gottheit verehrt. Einzelnachweise Weblinks Berg in den Anden Region Lima Region Junín"} {"instruction": "Create a Python class for a basic calculator with an add and subtract function.", "input": "Not applicable", "output": "class Calculator:\n def __init__(self):\n self.values = []\n\n def add(self, x, y):\n self.values.append(x + y)\n\n def subtract(self, x, y):\n self.values.append(x - y)\n \ncalc = Calculator()\ncalc.add(2, 3)\ncalc.subtract(3, 4)\nprint(calc.values[-1])"} {"instruction": "Create a function to create a NxN matrix in Python with all elements equal to a given number.", "input": "N=5, num=7", "output": "def mat_gen(N, num):\n matrix = [[num for col in range(N)] for row in range(N)]\n return matrix\n\nmat_gen(5, 7)"} {"instruction": "Create a Python program that takes an email message as input and prints the sender's email address.", "input": "Email Message:\nFrom: \"John Doe\" \nTo: \"Jane Doe\" \nSubject: Example Email", "output": "import re\n\nemail_message = \"\"\" \nFrom: \"John Doe\" \nTo: \"Jane Doe\" \nSubject: Example Email\n\"\"\"\n\nsender_email = re.findall(r'From: .+?<(.+?)>', email_message)\n\nprint('Sender\\'s email address:', sender_email[0])"} {"instruction": "Calculate the sum of the first 10 Fibonacci numbers in Java.", "input": "", "output": "class Fibonacci { static int fib(int n) { if (n <= 1) return n; return fib(n-1) + fib(n-2); } public static void main (String args[]) { int num = 10, sum = 0; for (int i = 1; i <= num; i++) { sum += fib(i); } System.out.println(sum); } }"} {"instruction": "Edit the following Python code to improve its readability.", "input": "def calctrade():\n c=50\n b=50\n while (c > 0 and b > 0):\n c–\n b-=2\n return c + b", "output": "def calculate_trade():\n coal = 50\n barley = 50\n while coal > 0 and barley > 0:\n coal -= 1\n barley -= 2\n return coal + barley"} {"instruction": "Write a SQL query which will select column names from a certain table.", "input": "", "output": "SELECT column_name FROM table_name;"} {"instruction": "Explain the functional programming paradigm.", "input": "", "output": "Functional Programming is a programming paradigm that emphasizes the use of functions, or predefined sequences of commands, to produce desired results. This paradigm tries to avoid state and mutable data, and instead use higher-order functions to pass functions as arguments. This makes it easier to understand, debug, and test code as functions are isolated from one another, making it less prone to errors."} {"instruction": "Write a Python function to filter strings using a filter function as a parameter.", "input": "", "output": "def filter_strings(strings, filter_function):\n filtered = []\n for string in strings:\n if filter_function(string):\n filtered.append(string)\n return filtered"} {"instruction": "Complete the function below to make a list of n numbers and return the result.", "input": "n = 5", "output": "def create_list(n): result = [] for i in range(0,n): result.append(i) return result"} {"instruction": "Create a class named Person with two properties: name and age.", "input": "", "output": "class Person { private: string name; int age; public: Person(string name, int age) { this->name = name; this->age = age; } void setName(string name) { this->name = name; } void setAge(int age) { this->age = age; } string getName() { return name; } int getAge() { return age; } };"} {"instruction": "Fill in the blank to generate a SHA-256 hash in JavaScript:", "input": "", "output": "const crypto = require('crypto'); const hash = crypto.createHash('sha256');"} {"text": "[HI Wikipedia] देवघर\n\nदेवघर, () भारत के झारखण्ड राज्य का एक शहर है। यह देवघर जिले का मुख्यालय तथा हिन्दुओं का प्रसिद्ध तीर्थस्थल है। इसे 'बाबाधाम' नाम से भी जाना जाता है| यहाँ भगवान शिव का एक अत्यन्त प्राचीन मन्दिर स्थित है। हर सावन में यहाँ लाखों शिव भक्तों की भीड़ उमड़ती है। यहाँ भारत के विभिन्न भागों से तीर्थयात्री और पर्यटक आते ही हैं, विदेशों से भी पर्यटक आते हैं। इन भक्तों को 'काँवरिया' कहा जाता है। ये शिव भक्त बिहार में सुल्तानगंज से गंगा नदी से गंगाजल लेकर 105 किलोमीटर की दूरी पैदल तय कर देवघर में भगवान शिव को जल अर्पित करते हैं। शिव पुराण मे लिखा है ये मंदिर श्मशान मे है। परन्तु श्मशान नदी के तट पर होती है । श्मशान मे कोई कुआ नही होती जबकि देवघर के प्रांगण मे कुआ है । देवघर, उत्तरी अक्षांश 24.48 डिग्री और पूर्वी देशान्तर 86.7 पर स्थित है। इसकी मानक समुद्र तल से ऊँचाई 254 मीटर (833 फीट) है। नाम का उद्गम देवघर शब्द का निर्माण देव + घर हुआ है। यहाँ देव का अर्थ देवी-देवताओं से है और घर का अर्थ निवास स्थान से है। देवघर \"बैद्यनाथ धाम\", \"बाबा धाम\" आदि नामों से भी जाना जाता है। जनसांख्यिकी 2011 की भारत जनगणना के अनुसार देवघर की जनसंख्या 203,116 है जिसमें से 17.62% बच्चे 6 वर्ष से कम आयु के हैं। कुल जनसंख्या का 52% भाग पुरूष हैं एवं 48% महिलाएँ हैं। देवघर की औसत साक्षरता दर 66.34% है जो राष्ट्रीय औसत दर 74.4% से कम है। पुरूष साक्षरता 79.13% और महिला साक्षरता 52.39% है। मुख्य आकर्षण झारखंड कुछ प्रमुख तीर्थस्थानों का केंद्र है जिनका ऐतिहासिक दृष्टि से बहुत महत्व है। इन्हीं में से एक स्थान है देवघर। यह स्थान संथाल परगना के अंतर्गत आता है। देवघर शांति और भाईचारे का प्रतीक है। यह एक प्रसिद्ध हेल्थ रिजॉर्ट है। लेकिन इसकी पहचान हिंदु तीर्थस्थान के रूप में की जाती है। श्रावण मास में श्रद्धालु 100 किलोमीटर लंबी पैदल यात्रा करके सुल्तानगंज से पवित्र जल लाते हैं जिससे बाबा बैद्यनाथ का अभिषेक किया जाता है। देवघर की यह यात्रा बासुकीनाथ के दर्शन के साथ सम्पन्न होती है। बैद्यनाथ धाम के अलावा भी यहां कई मंदिर और पर्वत हैं। बैद्यनाथ मंदिर इस मंदिर की स्थापना १५९६ की मानी जाती है जब बैजू नाम के व्यक्ति ने खोए हुए लिंग को ढूंढा था। तब इस मंदिर का नाम बैद्यनाथ पड़ गया। कई लोग इसे कामना लिंग भी मानते हैं। दर्शन का समय: सुबह ४ बजे-दोपहर ३.३० बजे, शाम ६ बजे-रात ९ बजे तक। लेकिन विशेष धार्मिक अवसरों पर समय को बढ़ाया जा सकता है। यहाँ पर सावन के महीने में बड़ा मेला लगता है। मान्यता है कि भगवान शिवजी सावन में यहाँ बिराजते हैंं, इसलिये सुल्तानगंज से गंगा जल भर कर कांवरिया पैदल करीब 105 किलोमीटर की यात्रा करके यहाँ पहुंचते हैं और भगवान शिव को गंगा जल अर्पित करते हैं। मंदिर के मुख्य आकर्षण बैद्यनाथ का मुख्य मंदिर सबसे पुराना है जिसके आसपास अनेक अन्य मंदिर भी हैं। शिवजी का मंदिर पार्वती जी के मंदिर से जुड़ा हुआ है। पवित्र यात्रा बैद्यनाथधाम के यात्रा की शुरुआत श्रावण मास (जुलाई-अगस्त)से होती है जो महीने भर और भाद्र मास तक अनवरत चलता रहता है । उत्तरी भारत के कई राज्यों से श्रद्धालु भक्त _ तीर्थयात्री सर्वप्रथम उत्तरवाहिनी गंगा से जल लेकर सुल्तानगंज से ही यात्रा प्रारंभ करते हैं । जहां वे अपने-अपने…"} {"text": "[CS Wikipedia] Peñaflor (Chile)\n\nMěsto Peñaflor se nachází v Chile v Metropolitním regionu v provincii Talagante. Ve městě žije obyvatel. Ve městě sídlí také závod firmy Baťa, který zde byl otevřen roku 1939. Odkazy Reference Externí odkazy Města v Chile Sídla v Santiagu (metropolitní region) Baťovské satelity"} {"instruction": "Create a program which takes an integer input n and prints its factorial.", "input": "n = 5", "output": "def factorial(n): fact = 1 for i in range(1, n+1): fact = fact * i return fact print(factorial(n))"} {"instruction": "Can you build a Python program which calculates the sum of digits of an inputted number?", "input": "", "output": "def sumDigits(num): \n sum = 0\n while(num): \n sum += num % 10\n num = num//10\n return sum\n\n# main function\nnum = 12345\nprint(\"Sum of digits of specified number is: \", \n sumDigits(num))"} {"instruction": "Create a web scraper using Python and Beautiful Soup that collects data from a certain web page and stores it into a database.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\nimport sqlite3\n\n# Connect to the database\nconn = sqlite3.connect('data.db')\n\n# Scrape the webpage\nr = requests.get(\"http://example.com\")\nsoup = BeautifulSoup(r.content, 'html.parser')\n\n# Extract the necessary data\ndata = []\nfor tag in soup.find_all('div'):\n data.append(tag.text)\n\n# Insert the data into the database\nwith conn:\n c = conn.cursor()\n c.execute(\"CREATE TABLE IF NOT EXISTS example_data (data TEXT)\")\n c.executemany(\"INSERT INTO example_data VALUES (?)\", data) \n\n# Close connection\nconn.close()"} {"instruction": "Generate a Bash script that runs a Python program. The Python program should receive a string as input, print its size, and then sort the string in alphabetical order.", "input": "Sample string: \"Hello, world\"", "output": "#!/bin/bash\n# Script to run Python program\n\ninput_string=\"Hello, world\"\n\npython <"} {"instruction": "Write a function in C++ that takes in a string of text and removes all the punctuation from the string.", "input": "", "output": "#include #include string remove_punctuation(string s) { string str; for (char c : s) { if (ispunct(c) == false) str.push_back(c); } return str; }"} {"instruction": "Come up with a python code to find the mean of a list of numbers.", "input": "nums = [78, 79, 79, 79, 79, 80]", "output": "total = 0 for num in nums: total += num mean = total/len(nums) print(mean)"} {"instruction": "Design an algorithm in Python that can print all the prime numbers from 1 to a given number.", "input": "", "output": "def print_prime_numbers(num):\n for n in range(2, num+1):\n if n == 2 or n ==3 :\n print(n, end=\"\")\n continue\n for i in range(2, n):\n if n % i == 0:\n break\n else:\n print(n, end=\"\")"} {"instruction": "In python, write a function that takes in two numbers and returns the sum of their digits.", "input": "", "output": "def sum_digits(a,b):\n #convert each number to string\n a = str(a)\n b = str(b)\n #initialize sum\n sum = 0\n for i in range(len(a)): \n sum += int(a[i]) \n for i in range(len(b)): \n sum += int(b[i]) \n #return sum\n return sum"} {"text": "[HI Wikipedia] युवराज सिंह\n\nयुवराज सिंह (युवी) भारत के क्रिकेट खिलाड़ी हैं। उन्होंने 20-20 विश्व कप 2007 में इंग्लैंड के खिलाफ एक ओवर की 6 गेंदों में 6 छक्के मार कर विश्व रिकॉर्ड बनाया था। इसके साथ ही 20-20 में 12 गेंदों में अर्धशतक बनाने का विश्व रिकॉर्ड भी उनके नाम है। युवराज सिंह को २०११ क्रिकेट विश्व कप में अहम भूमिका निभाने में मैन ऑफ़ द टूर्नामेंट चुना गया। इंडियन प्रीमियर लीग में किंग्स इलेवन पंजाब, पुणे वॉरियर्स इंडिया, रॉयल चैलेंजर्स बैंगलोर, दिल्ली डेयरडेविल्स और सनराइजर्स हैदराबाद से खेल चुके हैं। युवराज सिंह ने १० जून २०१९ को अंतरराष्ट्रीय क्रिकेट से संन्यास की घोषणा की। प्रारंभिक वर्ष और व्यक्तिगत जीवन इनका जन्म 12 दिसंबर 1981 को चंडीगढ़ में भूतपूर्व क्रिकेट खिलाड़ी योगराज सिंह के यहाँ सिख परिवार में हुआ था। 12 नवंबर 2015 को, युवराज का हेज़ल कीच से सगाई हुआ था और 30 नवंबर 2016 को उससे शादी कर ली थी। सन्दर्भ बाहरी कड़ियाँ क्रिकेट खिलाड़ी पद्मश्री,2014 चंडीगढ़ के खिलाड़ी 1981 में जन्मे लोग जीवित लोग हरफनमौला खिलाड़ी बल्लेबाज गेंदबाज भारतीय एक दिवसीय अंतरराष्ट्रीय क्रिकेट खिलाड़ी भारतीय टेस्ट क्रिकेट खिलाड़ी भारतीय ट्वेन्टी २० क्रिकेट खिलाड़ी अर्जुन पुरस्कार के प्राप्तकर्ता"} {"text": "[HI Wikipedia] बीकानेर\n\n'> बीकानेर''' [[राजस्थान] एक बड़ा शहर है बीकानेर का पुराना नाम जांगल देश था। यांहा स्थानीय आदिवासी भील राजाओं का शासन था बिका नामक राजपूत सरदार ने स्थानीय आदिवासी भील राजा को मारकर इस नगर का नामकरण उन्हीं के नाम पर बीकानेर किया । बीकानेर राज्य महाभारत काल में जांगल देश था बीकानेर की भौगोलिक स्तिथि ७३ डिग्री पूर्वी अक्षांश २८.०१ उत्तरी देशंतार पर स्थित है। समुद्र तल से ऊँचाई सामान्य रूप से २४३मीटर अथवा ७९७ फीट है इतिहास बीकानेर एक अलमस्त शहर है, अलमस्त इसलिए कि यहाँ के लोग बेफिक्र के साथ अपना जीवन यापन करते है। बीकानेर नगर की स्थापना के विषय मे दो कहानियाँ लोक में प्रचलित है। एक तो यह कि, नापा साँखला जो कि बीकाजी के मामा थे उन्होंने राव जोधा से कहा कि आपने भले ही राव सातल जी को जोधपुर का उत्तराधिकारी बनाया किंतु बीकाजी को कुछ सैनिक सहायता सहित सारुँडे का पट्टा दे दीजिये। वह वीर तथा भाग्य का धनी है। वह अपने बूते खुद अपना राज्य स्थापित कर लेगा। जोधाजी ने नापा की सलाह मान ली। और पचास सैनिकों सहित पट्टा नापा को दे दिया। बीकाजी ने यह फैसला राजी खुशी मान लिया। उस समय कांधल जी, रूपा जी, मांडल जी, नाथा जी और नन्दा जी ये पाँच सरदार जो जोधा के सगे भाई थे साथ ही नापा साँखला, बेला पडिहार, लाला लखन सिंह बैद, चौथमल कोठारी, नाहर सिंह बच्छावत, विक्रम सिंह राजपुरोहित, सालू जी राठी आदि कई लोगों ने राव बीका जी का साथ दिया। इन सरदारों के साथ राव बीका जी ने बीकानेर की स्थापना की। बीकानेर की स्थापना के पीछे दूसरी कहानी ये हैं कि एक दिन राव जोधा दरबार में बैठे थे बीकाजी दरबार में देर से आये तथा प्रणाम कर अपने चाचा कांधल से कान में धीरे धीरे बात करने लगे यह देख कर जोधा ने व्यँग्य में कहा “मालूम होता है कि चाचा-भतीजा किसी नवीन राज्य को विजित करने की योजना बना रहे हैं\"। इस पर बीका और कांधल ने कहाँ कि यदि आप की कृपा हो तो यही होगा। और इसी के साथ चाचा – भतीजा दोनों दरबार से उठ के चले आये तथा दोनों ने बीकानेर राज्य की स्थापना की। इस संबंध में एक लोक दोहा भी प्रचलित है-पन्द्रह सौ पैंतालवे, सुद बैसाख सुमेर थावर बीज थरपियो, बीका बीकानेर बीकानेर के राजा राव बीकाजी की मृत्यु के पश्चात राव नरा ने राज्य संभाला किन्तु उनकी एक वर्ष से कम में ही मृत्यु हो गयी। उसके बाद राव लूणकरण ने गद्दी संभाली। बीकानेर के राठौड़ राजाओं के नाम राय सिंह (1573-1612) कर्ण सिंह (1631-1669) अनूप सिंह (1669-1698) सरूपसिंह (1698-1700) सुजान सिंह (1700-1736) जोरावर सिंह (1736-1746) गजसिंह (1746-1787) राजसिंह (1787) प्रताप सिंह (1787) सुरत सिंह (1787-1828) रतन सिंह (1828-1851) सरदार सिंह (1851-1872) डूंगरसिंह (1872-1887) गंगासिंह (1887-1943) सार्दुल सिंह (1943-1950) करणीसिंह (1950-1988) नरेंद्रसिंह (1988-2022) भूगोल ऐतिहासिक बीकानेर राज्य के उत्तर में पंजाब का फिरोजपुर जिला, उत्तर-पूर्व में हिसार, उत्तर-पश्चिम में भावलपुर राज्य, दक्षिण में जोधपुर, दक्षिण-पूर्व में जयपुर और दक्षिण-पश्चिम में जैसलमेर राज्य, पूर्व में हिसार तथा लोहारु के परगने तथा पश्चिम में भावलपुर राज्य थे। वर्तमान बीकानेर जिला राजस्थान के उत्तर-पश्चिमी भाग में स्थित है। यह २७ डिग्री ११ और २९ डिग्री ०३ उत्तर अक्षांश और ७१ डिग्री ५४ और…"} {"instruction": "Write a Python code to find all the prime numbers below a given number.", "input": "", "output": "def get_primes(n): primes = [] for num in range(2, n+1): is_prime = True for div in range(2, n): if (num % div == 0): is_prime = False if is_prime: primes.append(num) return primes"} {"text": "[CS Wikipedia] David Zayas\n\nDavid Zayas (* 15. srpna 1962) je portorický herec. Jeho nejznámější role jsou Angel Batista v seriálu Dexter a Enrique Morales v seriálu Oz. Životopis Narodil se v Portoriku. Byl vychováván ve čtvrti Bronx v New Yorku. Kariéra Poté, co sloužil u leteckých sil Spojených států, přidal se k newyorskému policejnímu sboru. Jeho kariéra policisty mu umožnila stát se hercem, což vedlo k tomu, že bral práce v televizi a filmu, kde hrál převážně právě policisty. Jeho zkušenosti v oblasti vymáhání práva mu také umožnili přesvědčivě zahrát postavy na druhé straně práva, jako Enriqua Moralese v seriálu Oz. Objevil se v dvaceti sedmi epizodách v letech 2000–2003 jako jeden z nejtvrdších vězňů, který se kdy v seriálu objevil. Také se od roku 2006 objevuje v jedné z hlavních rolí v seriálu Dexter. V roce 1992 se stal členem divadelní společnosti LAByrinth Theater Company. Dostal hostující role v seriálech jako New York Undercover, Lovci zločinců a Policie New York. V LAByrinthu se setkal se svou budoucí ženou, herečkou Lizou Colón-Zayas. V roce 2010 se objevil v nezávislém filmu Shadowboxing, ve filmu Sylvestera Stallona Postradatelní a ve snímku Skyline. Ztvárnil příslušníka newyorské policie ve filmu z roku 2007, Michael Clayton. Také si zahrál zkorumpovaného policistu ve filmu Bruce Willise, 16 bloků. Objevil se v epizodě thrillerového seriálu The Following, kde hrál postavu Tysona, nejlepšího přítele Ryana Hardyho. Osobní život Se svou manželkou, herečkou Lizou Colón-Zayas, žije v Los Angeles. Reference Externí odkazy Oficiální stránky Američtí herci Narození v roce 1962 Žijící lidé Muži Narození 15. srpna"} {"text": "[DE Wikipedia] Liste der Lieder von Hilary Duff\n\nDies ist eine Liste der aufgenommenen und veröffentlichten Lieder der US-amerikanischen Popsängerin Hilary Duff. Die Titel sind alphabetisch sortiert. Sie gibt Auskunft über die Urheber und auf welchem Tonträger die Komposition erstmals zu finden ist. Eigenkompositionen A B C D F G H I J L M N O P R S T U W Y Coverversionen Duff, Hilary"} {"instruction": "Using Java, write a program that calculates the average of 5 numbers entered by the user.", "input": "2, 4, 6, 8, 10", "output": "import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] numList = new int[5]; int sum = 0; for(int i=0;i
    1. 9
    2. 15
    3. 3
    4. 4
    "} {"text": "[DE Wikipedia] Nicolaus Rüdinger\n\nNicolaus Rüdinger (* ca. 1530 in Schefflenz; † 1581 in Wertheim) war ein deutscher neulateinischer Dichter sowie gräflicher Gymnasialrektor und Rentmeister in Wertheim. Leben und Werk Der auch als Nicolaus Rüdiger und Nicolaus Pisovernas bekannte Humanist wurde um 1530 im kurpfälzisch regierten Unterschefflenz geboren. Er studierte ab 1548 an der Universität Heidelberg und erwarb dort 1551 den Titel eines Magisters. Nach kurzer Lehrpraxis an der Klosterschule Bronnbach erhielt er 1555 eine Anstellung als Lehrer des Gymnasiums in Wertheim. Bereits im Folgejahr wurde er Rektor dieser aufstrebenden reformatorischen Lateinschule, die um 1525 von Graf Georg II. von Wertheim als solche eingerichtet worden war. Rüdingers Berufung fiel noch in die Regierungszeit von Michael III., mit dem das Geschlecht der Grafen von Wertheim 1556 ausstarb. Unter Michaels Schwiegervater und Regierungsnachfolger Graf Ludwig von Stolberg-Königstein war Rüdinger für die Bildungsreform in dem Kleinstaat verantwortlich. So erging 1564 die erste Wertheimer Schulordnung. Um 1572 zog das Gymnasium in größere Räumlichkeiten ein: das Obergeschoss der Wertheimer Kilianskapelle, wo es sich bis 1871 befand. 1575 wurde Rüdinger zum gräflichen Rentmeister (Kämmerer) ernannt und schied dabei offenbar aus dem Schuldienst aus. Rüdinger verband eine literarisch produktive Freundschaft mit dem in Würzburg tätigen Mediziner Johannes Posthius und den beiden Heidelberger Gelehrten Nikolaus Cisnerus und Paul Melissus. Im überkonfessionellen Netzwerk des pfälzischen Späthumanismus trug Rüdinger zahlreiche Kasualgedichte, zeitkritische Satiren und Fazetien sowie elegische Bibeldichtungen zu neulateinischen Sammelwerken bei, darunter das Collegii Posthimelissaei Votum von 1573 und Parerga Poetica von 1580 (2. erw. Aufl. 1595). Sein Hauptwerk sind die Graf Ludwig gewidmeten Evangelicarum Elegiarium Libri tres (Nürnberg 1573), eine Sammlung von 87 langen Perikopengedichten. Wenige Jahre vor seinem Tod wurde er zum poeta laureatus gekrönt. Rüdinger war dreimal verheiratet. Von seiner ersten Frau, Dorothea (gest. 1565), hatte er eine Tochter Margaretha (geb. 1560), die 1577 den Wertheimer Cantor und Gymnasiallehrer Jakob Gerhard heiratete. Rüdinger starb im Mai 1581. Literatur John L. Flood: Poets Laureate in the Holy Roman Empire. A Bio-Bibliographical Handbook. De Gruyter, Berlin, New York 2006, ISBN 978-3-11-018100-5, Bd. 3, S. 1763. Wilhelm Kühlmann, Karl Wilhelm Beichert: Literarisches Leben zwischen Rhein und Main. Der Wertheimer Dichter, Schulmann und Rentmeister Nikolaus Rüdinger (ca. 1530–1581) im Netzwerk des pfälzischen Späthumanismus. De Gruyter, Berlin, Boston 2021, ISBN 978-3-11-072381-6. Thomas Wehner: Die Wertheimer Lateinschule im Zeitalter der Reformation und Konfessionalisierung…"} {"instruction": "Write a script in Python to generate a histogram of a given data set.", "input": "data = [3, 5, 4, 6, 7, 8, 9, 3, 8, 5]", "output": "import matplotlib.pyplot as plt\nplt.hist(data, 10)\nplt.title(\"Frequency Histogram\")\nplt.xlabel(\"Values\")\nplt.ylabel(\"Frequency\")\nplt.show()"} {"text": "[DE Wikipedia] Dreisbach (Wiehl)\n\nDreisbach im Oberbergischen Kreis ist eine von 51 Ortschaften der Stadt Wiehl im Regierungsbezirk Köln in Nordrhein-Westfalen. Lage und Beschreibung Der Ort liegt rund vier km östlich des Zentrums von Wiehl. Dreisbach liegt zwischen den Dörfern Drespe (Reichshof) im Norden und Büttinghausen im Süden, an der Landesstraße 133. Geschichte 1464 wurde der Ort das erste Mal urkundlich erwähnt und zwar \"Homburger Grenzweistum\". Die Schreibweise der Erstnennung war Nyeder Dreyßpe. In der A.-Mercator-Karte von 1575 wird der Ort als Nider Dreisbach bezeichnet. Im Futterhaferzettel der Herrschaft Homburg von 1580 werden in der Dreyspe ein Wittgensteinischer und sieben Bergische Untertanen als Abgabepflichtige gezählt. Freizeit Wander- und Radwege Der Ortsrundwanderweg Δ durchläuft den Ort. Vereinswesen Gemeinnütziger Verein Dreisbach e.V. Dorfgemeinschaftshaus Literatur Hans Joachim Söhn, Lothar Wirths: Futterhaferzettel. Einwohner und Feuerstätten in der Herrschaft Homburg im Jahre 1580 (= Materialien und Quellen zur oberbergischen Regionalgeschichte. H. 3). Galunder, Gummersbach 2003, ISBN 3-89909-012-8. Einzelnachweise Ortsteil von Wiehl Ersterwähnung 1464"} {"instruction": "Develop a Python function that will compute the Fibonacci sequence up to n.", "input": "", "output": "def fibonacci(n):\n a, b = 0, 1 \n for i in range(0, n): \n a, b = b, a + b \n return a"} {"instruction": "Create a program in Python to print the sum of all the multiples of 3 and 5 below 1000.", "input": "", "output": "sum = 0\nfor i in range(1000):\n if (i % 3 == 0 or i % 5 == 0):\n sum = sum + i\n\nprint(sum)"} {"instruction": "Write a Python program to calculate the hypotenuse of a right-angled triangle.", "input": "a = 5, b = 12", "output": "import math\n\n# calculate the hypotenuse\ndef calc_hypotenuse(a, b):\n hyp = math.sqrt(a**2 + b**2)\n print(\"The length of the hypotenuse is\", hyp)\n\n# input lengths of triangle sides\na = 5\nb = 12\n\n# call the function\ncalc_hypotenuse(a, b)"} {"instruction": "Write a Python program to get all the information associated with an IPv4 address.", "input": "IPv4 address = \"8.8.8.8\"", "output": "import socket\nip = \"8.8.8.8\"\naddress_info = socket.getaddrinfo(ip, None)\n\nfor info in address_info:\n print(\"IP version :\", info[0])\n print(\"IP address as string:\", info[4][0])\n print(\"IP address as tuple:\", info[4])\n print(\"IP protocol:\", info[6])"} {"instruction": "Implement a stack data structure in Java.", "input": "", "output": "// Stack class class Stack { static final int MAX = 1000; int top; int a[] = new int[MAX]; // Maximum size of Stack boolean isEmpty() { return (top < 0); } Stack() { top = -1; } boolean push(int x) { if (top >= (MAX-1)) { System.out.println(\"Stack Overflow\"); return false; } else { a[++top] = x; System.out.println(x + \" pushed into stack\"); return true; } } int pop() { if (top < 0) { System.out.println(\"Stack Underflow\"); return 0; } else { int x = a[top--]; return x; } } int peek() { if (top < 0) { System.out.println(\"Stack Underflow\"); return 0; } else { int x = a[top]; return x; } } }"} {"instruction": "Using HTML and CSS, design a landing page for a blog website.", "input": "", "output": " My Blog
    Welcome to My Blog
    "} {"instruction": "Rewrite the following Python code using vectorization techniques to reduce the computation time.", "input": "squares = []\nfor x in range(100):\n squares.append(x * x)", "output": "squares = [x * x for x in range(100)] # vectorized code equivalent to the for loop, which will be faster"} {"text": "[HI Wikipedia] संघट्ट प्राचल\n\nसंघात प्राचल () (इम्पेक्ट पैरामीटर) उस लम्बवत दूरी को कहा जाता है जो प्रक्षेप्य पर लगने वाले क्षेत्र के केन्द्र बिन्दु व प्रक्षेप्य के पथ के मध्य होती है। (चित्र देखें)। यह बहुधा नाभिकीय भौतिकी (रदरफोर्ड प्रकीर्णन देखें) व चिरसम्मत यांत्रिकी में काम मे लिया जाता है। संघात प्राचल का प्रकीर्णन कोण θ से निम्न सम्बन्ध होता है। जहाँ प्रक्षेप्य का वेग है जब वह केन्द्र से बहुत दुर होता है और केन्द्र से निम्नतम दूरी है। सन्दर्भ https://web.archive.org/web/20130524155030/http://hyperphysics.phy-astr.gsu.edu/hbase/nuclear/rutsca2.html भौतिकी चिरसम्मत भौतिकी"} {"instruction": "Determine the number of ints in a list.", "input": "[2, 5, 7, 3, 8]", "output": "def count_int(arr): count = 0 for n in arr: if type(n) == int: count +=1 return count"} {"instruction": "Construct a SQL query to find the total salary spending of an organization by employees in the month of June.", "input": "", "output": "SELECT SUM(salary) AS TotalSalarySpending FROM Empolyees WHERE MONTH(date) = 6;"} {"instruction": "Create a program that reads a list of integers and returns the highest prime number in the list.", "input": "", "output": "def get_highest_prime(numbers): highest_prime = 0 for num in numbers: for i in range(2, num): if (num % i == 0): break else: highest_prime = max(highest_prime, num) return highest_prime"} {"instruction": "Write a Python program to print the multiplication table for a given number.", "input": "Number: 8", "output": "def printMultiplicationTable(num):\n\n for i in range(1, 11):\n print(\"{} x {} = {}\".format(num, i, num * i))\n\nprintMultiplicationTable(8) \n# Output:\n# 8 x 1 = 8\n# 8 x 2 = 16\n# 8 x 3 = 24\n# 8 x 4 = 32\n# 8 x 5 = 40\n# 8 x 6 = 48\n# 8 x 7 = 56\n# 8 x 8 = 64\n# 8 x 9 = 72\n# 8 x 10 = 80"} {"instruction": "Write a Python function to generate a random number between 1 and 5, given two numbers X and Y.", "input": "4, 8", "output": "import random\n\ndef generate_random_number(x, y):\n start = min(x, y)\n end = max(x, y)\n return random.randint(start, end)\n\nresult = generate_random_number(4, 8)\nprint(result)"} {"text": "[CS Wikipedia] Anna Ticho\n\nAnna Ticho (; 27. října 1894 Brno – 1. března 1980 Jeruzalém) byla izraelská umělkyně, známá svými kresbami Jeruzaléma a jeho okolí. Život Narodila se do židovské rodiny v Brně, kde prožila své rané dětství. Posléze se s rodinou přestěhovala do Vídně, kde v patnácti letech začala studovat malířství u Williho Nowaka na Akademii výtvarných umění. V roce 1912 přesídlila spolu se svým bratrancem, uznávaným očním lékařem Avrahamem Albertem Ticho (1883–1960), do osmanské Palestiny a později téhož roku se za něj provdala. Společně se usadili v Jeruzalémě, kde její manžel v zastoupení frankfurtské židovské organizace zřídil oční kliniku. V letech 1917 až 1919 žila spolu s manželem krátce v Damašku. Svá díla představila poprvé roku 1922 v Davidově věži, která je součástí jeruzalémských hradeb, v rámci výstavy místních umělců (v pozdějších letech měla samostatné výstavy jak v Izraeli, tak v zahraničí). V roce 1924 zakoupili v Jeruzalémě velký dům obklopený zahradami, postavený roku 1880 pro prominentní arabskou rodinu Našašíbů, kde následně žili a pracovali. V přízemí zřídil dr. Ticho soukromou kliniku, kde léčil židy, křesťany i muslimy (mimo jiné i emíra Abdalláha, pozdějšího jordánského krále), chudé i bohaté, a kde mu manželka pomáhala jako asistentka. Ve volném čase Anna Ticho občas vyrážela do blízké přírody, aby se věnovala své lásce v podobě malování a kreslení. Jejich dům se stal centrem kulturního a společenského života, hostili řadu místních a britských vládních představitelů, jakož i mnoho umělců, spisovatelů, akademiků a intelektuálů. V roce 1960 její manžel zemřel a klinika byla uzavřena. Začala se více věnovat umělecké tvorbě a vyrážela do přírody v okolí Jeruzaléma. Malovala tužkou, perem, pastelovými barvami a „ve svých figurálních malbách zachycovala okolní domy, zdi Starého Města, vesnice v jeruzalémských horách, lidi, stromy a květenu“. Ke sklonku života odkázala dům, svoji uměleckou sbírku, včetně řady svých kreseb, a manželovu rozsáhlou sbírku židovských předmětů, městu Jeruzalém. Zemřela v nemocnici Bikur cholim Jeruzalémě ve věku osmdesáti pěti let na infarkt myokardu. Dům Ticho (Bejt Ticho) funguje jako pobočka Izraelského muzea a jeho součástí je oblíbená restaurace a kavárna. Ocenění V roce 1970 byla Anně Ticho udělena cena Jakir Jerušalajim (významný občan Jeruzaléma) Roku 1980 byla oceněna Izraelskou cenou za přínos v oblasti malířství, která patří mezi nejvyšší izraelská vyznamenání V roce 2005 byla v internetové soutěži 200 největších Izraelců deníku Ynet zvolena 190. největším Izraelcem všech dob. Sandbergova cena Reference Externí odkazy Česká televize – Šumné stopy: Izrael – Do Svaté země! Jewish Telegraphic Agency – Anna Ticho Dead at 86 Izraelští malíři Židovští malíři Nositelé Izraelské ceny Rakousko-uherští Židé Narození…"} {"instruction": "Create a code to read a textfile line by line and print out the lines that have the word \"Python\".", "input": "", "output": "with open('textfile.txt') as f: for line in f: if 'Python' in line: print(line)"} {"instruction": "Design an algorithm to find out the top 5 characters with the highest occurrence from a string in Python.", "input": "This is a test sentence to use for the example.", "output": "from collections import Counter\n\ndef top_characters(string):\n counter = Counter(string).most_common(5)\n return counter\n \nstring = \"This is a test sentence to use for the example.\"\nprint(top_characters(string))\n# Output: [('e', 5), ('s', 4), ('t', 4), ('o', 3), ('i', 3)]"} {"instruction": "Create a function to get the root of a quadratic equation", "input": "1, 4, 4", "output": "def get_roots_of_quad_eqn(a, b, c): # compute discriminant d = (b**2) - (4 * a * c) # compute roots root1 = (-b + math.sqrt(d)) / (2 * a) root2 = (-b - math.sqrt(d)) / (2 * a) # return the roots return root1, root2 if __name__ == '__main__': a, b, c = 1, 4, 4 print(get_roots_of_quad_eqn(a, b, c))"} {"instruction": "Write an algorithm that finds the longest palindromic substring of a given input string.", "input": "\"forgeeksskeegfor\"", "output": "// Algorithm to find the longest palindromic substring int longestPalindromicSubstr(char* str) { // Variables to store the start and the end of the palindromic substring int maxLen = 1; int start = 0; int len = strlen(str); // Table to store boolean value at the index // dp[i][j] stores whether the substring str[i..j] is palindrome or not int dp[len][len]; // Initialize all entries to False memset(dp, 0, sizeof(dp)); // All characters of length 1 are palindrome for (int i = 0; i < len; i++) dp[i][i] = true; // Check for substring of length 2 for (int i = 0; i < len-1; i++) { if (str[i] == str[i+1]) { dp[i][i+1] = true; start = i; maxLen = 2; } } // Check for lengths greater than 2 for (int k = 3; k <= len; k++) { // looping until len-k+1, so that you can get ith character for (int i = 0; i < len-k+1; i++) { int j = i + k - 1; if (dp[i+1][j-1] && str[i] == str[j]) { dp[i][j] = true; if (k > maxLen) { start = i; maxLen = k; } } } } return maxLen; }"} {"instruction": "Build a python program to multiply two matrices.", "input": "Matrix A 2x3 \n1 2 3\n4 5 6 \n\nMatrix B 3x2\n7 8\n9 10\n11 12", "output": "def multiply(A, B):\n rows_A = len(A)\n cols_A = len(A[0])\n rows_B = len(B)\n cols_B = len(B[0])\n if cols_A != rows_B:\n # Check matrix dimensions\n print(\"Cannot multiply the two matrices. Incorrect dimensions.\")\n return\n\n result = [[0 for row in range(cols_B)] for col in range(rows_A)]\n \n for i in range(rows_A):\n for j in range(cols_B):\n for k in range(cols_A):\n result[i][j] += A[i][k] * B[k][j]\n return result"} {"instruction": "Write a command line script in Python to print the current day's date.", "input": "", "output": "import datetime\n \ndatetime_object = datetime.datetime.now()\nprint(datetime_object.strftime(\"%A, %B %d, %Y\"))"} {"instruction": "Generate a Python program to extract the domain name from a given URL.", "input": "url = \"https://www.google.com\"", "output": "import re\n\ndef extract_domain_name(url):\n pattern = r\"([a-z0-9][a-z0-9\\-]*?\\.(com|org|net|edu|co))(\\/|$)\"\n result = re.search(pattern, url)\n return result[1]\n\nprint(extract_domain_name(url))"} {"instruction": "Convert the following Python code to equivalent JavaScript code.", "input": "def add_two_numbers(a, b):\n return a + b", "output": "function add_two_numbers(a, b) {\n return a + b;\n}"} {"instruction": "Produce a SELECT query in PostgreSQL to search for all existing entries with a specified ID.", "input": "Property ID: 15", "output": "SELECT * FROM TableName WHERE PropertyID='15';"} {"text": "[DE Wikipedia] Julius Heinrich von Buggenhagen\n\nJulius Heinrich von Buggenhagen (* 18. September 1768 in Papitz; † 18. November 1827 in Duisburg) war ein preußischer Kriegs- und Domänenrat und Landrat. Leben Julius Heinrich entstammte der adeligen Familie Buggenhagen und war der Sohn von Julius Ernst von Buggenhagen (1736–1806) und dessen Cousine Marie Angelika Henrietta Digeon von Monteton (1749–1823). Sein Vater war von 1777 bis 1793 Kammerpräsident in Kleve und 1797 Etat- und Kriegsminister im Generaldirektorium und Chef der General-Tabaks-Administration. Julius Heinrich trat zunächst 1777 als Fahnenjunker für kurze Zeit dem Militär bei. Er musste sich jedoch seinem Vater fügen, der die Aufnahme eines Studiums für vorsah. Nachdem der Vater zum Kammerpräsidenten ernannt worden war, begleitete er ihn nach Kleve und wurde dort von Hauslehrern unterrichtet. 1784 besuchte er das Königliche Pädagogium und ab 1787 die Universität in Halle. 1789 ging er an die Universität Frankfurt (Oder), wo er sein dreijähriges Studium abschloss. Anschließend trat er in Kleve eine Stelle als Kammerreferendar an. 1793 wurde er Referendar bei Departement des Ministers von Heinitz in Berlin und wechselte später als Kammerassessor nach Küstrin. Beim Generaldirektorium war er für die General-Tabaksadministration zuständig. 1797 wurde er zum Kriegs- und Domänenrat in Küstrin ernannt. Auf eigenen Wunsch wurde er 1798 wieder bei der Kriegs- und Domänenkammer in Küstrin angestellt. 1802 wurde er Landrat des Kreises Wesel mit Sitz und Stimme in der Cleveschen Kammer. Bereits 1796 war das Gut Bärenkamp in seinen Besitz gelangt, wo er ab jetzt wohnte. Bei der Vereinigung des Kreises Wesel mit dem Kreis Emmerich verlor er sein Amt. Während der Befreiungskriege gehörte er dem Landsturm an. 1816 wurde er landrätlicher Kommissarius und Wirklicher Landrat des Kreises Dinslaken. 1823 wurde er Landrat des aus den Kreisen Dinslaken und Essen gebildeten Kreises Duisburg. 1824 siedelte er an den Amtssitz Duisburg über. Am 18. Januar 1826 wurde er mit dem Roten Adlerorden ausgezeichnet. Er war der erste Meister vom Stuhl der St. Johannis Freimaurerloge „Zur Deutschen Burg“ in Duisburg (1820–1822). Familie Er heiratete 1797 in Küstrin Juliane Frederike Schulz (* 1778; † 20. September 1799). Nach dem Tod seiner ersten Frau heiratete er am 24. April 1809 Johanne Luise Henriette (* 4. Februar 1789). Buggenhagen hatte drei Söhne: Heinrich Ferdinand († 17. Februar 1808), Adelslegitimation am 25. Juli 1806 Sohn (1810–1810) Melchior Julius (* 9. April 1811; † 21. März 1890) ⚭ Auguste Charlotte Geyer (* 24. April 1808; † 29. Januar 1857) Literatur Julius Heinrich v. Buggenhagen. In: Neuer Nekrolog der Deutschen. 1827, Band 5, Teil 2, Bernhard Friedrich Voigt, Ilmenau 1829, S. 957–960. Jahrbuch des Deutschen Adels, Band 1, 1896, S. 376 f Bernd…"} {"instruction": "Develop a Python script for encoding a message using the Caesar cipher.", "input": "message = \"hello world\"\nshift = 3", "output": "def caesar(message, shift):\n encoded_message = \"\"\n\n for char in message:\n if char.isalpha():\n num = ord(char)\n num += shift\n\n if char.isupper():\n if num > ord('Z'):\n num -= 26\n elif num < ord('A'):\n num += 26\n\n elif char.islower():\n if num > ord('z'):\n num -= 26\n elif num < ord('a'):\n num += 26\n encoded_message += chr(num)\n else:\n encoded_message += char\n\n return encoded_message\n\n# Test the code\nmessage = \"hello world\"\nshift = 3\nencoded_message = caesar(message, shift)\nprint(encoded_message) # khoor zruog"} {"text": "[CS Wikipedia] Miroslav Kráľ\n\nMiroslav Kráľ (* 2. listopadu 1947 Topoľčany) je bývalý slovenský fotbalista, útočník a fotbalový trenér. Sportovní kariéra V československé lize hrál za ZVL Žilina, nastoupil ke 171 ligovým utkáním a dal 26 gólů. Reprezentoval Československo na Olympijských hrách 1968 v Mexiku. Ligová bilance Trenérská kariéra V roce 1994 byl trenérem MŠK Žilina. Odkazy Reference Literatura JEŘÁBEK, Luboš: Český a československý fotbal: lexikon osobností a klubů 1906–2006, Praha, Grada 2007. Jindřich Horák, Lubomír Král: Encyklopedie našeho fotbalu – Libri 1997 Radovan Jelínek, Miloslav Jenšík a kol.: Atlas českého fotbalu – Radovan Jelínek 2006 Gól: fotbalový a hokejový týdeník - ročník 1975 Externí odkazy Miroslav Kráľ tušil, ako skončí Žilina, sám si hľadá angažmán CSFOTBAL Českoslovenští fotbalisté Slovenští fotbalisté Fotbaloví útočníci Fotbalisté MŠK Žilina Slovenští fotbaloví trenéři Trenéři MŠK Žilina Fotbalisté MFK Dubnica Narození 2. listopadu Narození v roce 1947 Narození v Topoľčanech Žijící lidé Muži"} {"instruction": "Modify the given dictionary such that any keys that start with the letter 'b' are removed.", "input": "my_dict = { \"ant\": \"animals\", \"ball\": \"toy\", \"cat\": \"pets\" }", "output": "my_dict = { \"ant\": \"animals\", \"cat\": \"pets\" }"} {"instruction": "Given a string, identify the count of each letter in the string.", "input": "String: \"apple\"", "output": "{'a': 1, 'p': 2, 'l': 1, 'e': 1}"} {"instruction": "Sort a given list of strings into alphabetical order.", "input": "my_list = [\"Python\", \"JavaScript\", \"Java\", \"C++\"]", "output": "def sort_alphabetically(my_list):\n return sorted(my_list)\n\nprint(sort_alphabetically(my_list)) # ['C++', 'Java', 'JavaScript', 'Python']"} {"instruction": "Change the code so that it swaps the contents of two variables in one line.", "input": "a = 5 b = 10", "output": "a, b = b, a"} {"instruction": "Create a Python class \"Point\" that has two instance variables x and y.", "input": "", "output": "class Point: def __init__(self, x, y): self.x = x self.y = y"} {"instruction": "Create an automated trading algorithm in Python.", "input": "", "output": "import datetime\nimport pandas as pd\n \ndef automated_strategy(data, window1, window2):\n # Calculating SMA\n short_rolling = data.rolling(window=window1).mean()\n long_rolling = data.rolling(window=window2).mean()\n \n # Creating signals\n data['short_mavg'] = short_rolling\n data['long_mavg'] = long_rolling\n data['signal'] = 0.0\n data['signal'][window1:] = np.where(data['short_mavg'][window1:] \n > data['long_mavg'][window1:], 1.0, 0.0) \n \n # Generating trading orders\n data['positions'] = data['signal'].diff()\n \n # Initializing the plot figure\n fig = plt.figure()\n \n # Plotting SMA\n ax1 = fig.add_subplot(111, ylabel='Price in $')\n data[['Close', 'short_mavg', 'long_mavg']].plot(ax=ax1, lw=2.)\n \n # Plotting the trading orders\n ax2 = fig.add_subplot(111, ylabel='Order', yticklabels=[])\n data['positions'].plot(ax=ax2, lw=2., color='r')\n \n # Plotting the trading orders\n ax3 = fig.add_subplot(111, ylabel='P&L', yticklabels=[])\n data['p&l'].plot(ax=ax3, lw=2., color='g')\n \n # Show the plot\n plt.show()"} {"instruction": "Write a Python program to make a dictionary that contains a number as a key, and its cube as the corresponding value.", "input": "", "output": "def cube_dictionary(n): d = {} for i in range(1, n+1): d[i] = i**3 return d"} {"instruction": "Clean the given data in Python by replacing NaN and None with 0.", "input": "import pandas as pd data = [[1, 'John', None], [2, 'Jane', 18], [3, 'Rudy', NaN]] df = pd.DataFrame(data, columns = ['id', 'name', 'age'])", "output": "import pandas as pd data = [[1, 'John', None], [2, 'Jane', 18], [3, 'Rudy', NaN]] df = pd.DataFrame(data, columns = ['id', 'name', 'age']) df.fillna(0, inplace = True)"} {"instruction": "Construct a pre-order traversal code to traverse a binary tree.", "input": "", "output": "def preOrder(root): if root: print(root.data) preOrder(root.left) preOrder(root.right)"} {"instruction": "Generate a Python script to calculate the sum of the following equation: 8x^2 + 5y^2 + 6x - 4y.", "input": "", "output": "def calculate_sum(x, y):\n '''This function calculates the sum of the following equation: 8x^2 + 5y^2 + 6x - 4y.'''\n return 8*x**2 + 5*y**2 + 6*x - 4*y\n\n# Call the function\nresult = calculate_sum(2, 3)\n\n# Print the result\nprint(\"The sum is\", result)"} {"instruction": "Design an algorithm to search for a particular node in a binary tree using breadth-first search.", "input": "", "output": "def breadthFirstSearch(root, target): if root is None: return False queue = [root] while len(queue) > 0: node = queue.pop(0) if node.val == target: return True if node.left is not None: queue.append(node.left) if node.right is not None: queue.append(node.right) return False"} {"instruction": "Design a class that stores the data of an individual employee", "input": "", "output": "class Employee: def __init__(self, name, age, salary): self.name = name self.age = age self.salary = salary def get_name(self): return self.name def get_age(self): return self.age def get_salary(self): return self.salary"} {"instruction": "Create a Python function to extract the largest prime factor from a given number.", "input": "number = 35", "output": "def largest_prime_factor(number):\n largest_factor = 1\n for i in range(2, number+1):\n while number % i == 0:\n largest_factor = i\n number //= i\n return largest_factor\n\nlargest_prime_factor(35) # Output: 5"} {"text": "[DE Wikipedia] Möttlingen\n\nMöttlingen ist ein Ortsteil der Stadt Bad Liebenzell im Landkreis Calw in Baden-Württemberg. Die Gemeinde trägt das Prädikat Erholungsort. Geographie Geographische Lage Möttlingen liegt 40 km westlich von Stuttgart und 15 km südsüdwestlich von Pforzheim im Heckengäu, einer Landschaft zwischen Neckarraum und nördlichem Schwarzwald auf einer Höhe von 530 m (Ortsmitte) bis 580 m ü. NN (Hörnle). Die Gemeinde hat sich im Laufe des 20. Jahrhunderts zu einer typischen Wohnsiedlung mit vielen Auspendlern in naheliegende große und mittelgroße Zentren wie Böblingen/Sindelfingen, Leonberg oder Stuttgart entwickelt. Politisch gehört die Gemeinde zur Region Nordschwarzwald. Ortsteilgliederung Zu Möttlingen gehören das Dorf Möttlingen und das Gehöft Hofgut Georgenau. Naturräumliche Gliederung und Siedlungsstruktur Die Region um das Dorf ist den Oberen Gäuen (122.45: „Würmbucht“) zuzuordnen. Die Flurböden bestehen aus Muschelkalk und Lehm und sind zumeist steinig. Vermehrt gibt es die für das Heckengäu charakteristischen Hecken, die aus Lesesteinriegeln entstanden. Ansonsten herrschen Kiefern-/Fichtengehölze und -wälder sowie Felder vor, häufig gibt es Streuobstwiesen. Das Naturschutzgebiet Monbach, Maisgraben und St. Leonhardquelle liegt zu einem kleinen Teil auf der Gemarkung Möttlingens. Nachbargemeinden Weil der Stadt-Münklingen (Landkreis Böblingen) im Nordosten Simmozheim (Landkreis Calw) im Südosten Neuhengstett und Ottenbronn (Althengstett) im Südwesten Unterhaugstett (ebenfalls Ortsteil von Bad Liebenzell) im Osten Neuhausen (Enzkreis) im Nordwesten Geschichte Entstehung und frühe Geschichte Wie bereits die Endung „-ingen“ des Ortsnamens hindeutet, gehört Möttlingen zu den Siedlungen der ältesten Siedlungsschicht des Altsiedellandes, was bedeutet, dass wahrscheinlich bereits vor 900 v. Chr. Menschen in etwa der heutigen Lage des Ortes dauerhaft gesiedelt haben. Tatsächlich wurden im Rahmen von Baumaßnahmen im April 1995 Frauengräber der Merowinger entdeckt. Dem ältesten Königsgeschlecht der Franken. Der Fundort lag an einem leicht geneigten Südhang an der heutigen Kreuzung „Im Gründle/Weil der Städter Straße“ in einer Tiefe von etwa einem bis anderthalb Metern. Neben insgesamt mindestens dreizehn Grabstätten konnten einige Grabbeilagen geborgen werden. Darunter befanden sich Glasperlen, eine Halskette und eine Eisenschnalle, welche aufgrund ihrer Gestaltung und Beschaffenheit auf das ausgehende 6. Jahrhundert datiert werden können. Zum ersten Mal schriftlich erwähnt wurde Möttlingen als „Mettelingen“ in einer Urkunde des Kloster Hirsaus, welches bereits vor 1075 hier Besitz hatte. Die Truchsessen von Waldeck, ein schwäbisches Adelsgeschlecht, besaßen im Mittelalter ein „Burgstadel“, von dem heute keine Spuren mehr zu finden sind, jedoch der Flurname…"} {"instruction": "Write a function to multiply two numbers in Java.", "input": "5, 8", "output": "public static int multiply(int x, int y){ return x * y; } System.out.println(multiply(5, 8));"} {"instruction": "Read the given CSS selector and explain what it does.", "input": "", "output": "The given CSS selector \"div > p:not(.special)\" will select all the

    elements that are children of

    which do not have a class of \"special\"."} {"instruction": "Create a bubble sort algorithm in Python.", "input": "", "output": "def bubble_sort(nums):\n # Repeat until the array is sorted\n sorted_array = False\n while not sorted_array:\n sorted_array = True\n for i in range(len(nums) - 1):\n if nums[i] > nums[i + 1]:\n # If the next element is greater, swap them\n nums[i], nums[i + 1] = nums[i + 1], nums[i]\n sorted_array = False\n # Return the sorted array\n return nums"} {"text": "[HI Wikipedia] केम्पटी जलप्रपात\n\nकेम्प्टी जलप्रपात (अंग्रेजी: Kempty Falls), एक शानदार और मनमोहक जलप्रपात है जो भारत के राज्य उत्तराखण्ड के शहर मसूरी से 15 किमी की दूरी पर चकराता सड़क पर स्थित है और इस क्षेत्र का सबसे बड़ा आकर्षण है। यह जलप्रपात समुद्र तल से 1364 मीटर की ऊंचाई 78°-02’ पूर्व देशांतर और 30° -29’ उत्तर अक्षांश पर स्थित है। यहां 4500 से नीचे गिरता जल पांच झरनों में विभाजित होता है और एक विहंगम दृश्य प्रस्तुत करता है। 1835 के बाद इस जगह को एक पर्यटन क्षेत्र के रूप में एक ब्रिटिश अधिकारी जॉन मेकिनन द्वारा विकसित किया गया था। संभवत: \"केम्पटी\" नाम दो अंग्रेजी शब्दों केम्प (शिविर) और टी (चाय) से मिल कर बना है, क्योंकि ब्रिटिश अक्सर यहां पर चाय पार्टियां आयोजित किया करते थे। जलप्रपात के तल में एक जलकुण्ड है जिसका पानी बहुत ठंडा है और लोग यहां पर नहाते हैं। अन्वेषण गिरता स्तर केम्पटी जलप्रपात के आसपास के क्षेत्र में होने वाले अनियंत्रित और निम्नस्तरीय निर्माण कार्य के चलते पूरे क्षेत्र की सुन्दरता धीरे धीरे नष्ट हो रही है। आसपास के पहाड़ पर्यटकों और स्थानीय लोगों द्वारा फैलाये जा रहे कूड़े से अटे पड़े है। सफाई की व्यवस्थता ना होने के कारण पूरा क्षेत्र बहुत गंदा नजर आता है रही सही कसर वहां कुकुरमुत्तों की तरह उग आई दुकानों नें पूरी कर दी है। विभिन्न निर्माणों के कारण पूरे प्रपात को देख पाना प्राय: असम्भव हो गया है। प्रपात के तल में स्थित कुण्ड पर्यटकों द्वारा फैलाये कूड़े से भरा पड़ा है। यदि समय रहते इस ओर ध्यान न दिया गया तो जल्द ही पर्यटक इस स्थान को अपने यात्रा कार्यक्रम से निकाल देंगे। सन्दर्भ उत्तराखण्ड के जलप्रपात उत्तराखण्ड का भूगोल उत्तराखण्ड में पर्यटन आकर्षण"} {"instruction": "Write a Python program to classify a given set of features as convex or non-convex.", "input": "[(1,0), (2,3), (3,1), (4,3)]", "output": "def classify_features(features):\n #number of edges\n edges = len(features)\n polygon_corners = 0\n convex_count = 0\n non_convex_count = 0\n # iterate through the list to check if the polygon is convex or non-convex\n for i in range(edges):\n polygon_corners += 1\n next_i = i+1\n if next_i >= edges:\n next_i = 0\n # use the vector cross product to calculate the angle between the two given points\n x1 = features[i][0]\n y1 = features[i][1]\n x2 = features[next_i][0]\n y2 = features[next_i][1]\n angle = (x2-x1)*(y2-y1)\n\n # if angle is positive, the polygon formed is considered convex\n if angle > 0:\n convex_count += 1\n # else, the polygon is considered non-convex\n else:\n non_convex_count += 1\n\n # check the results\n if convex_count == polygon_corners:\n return \"convex\"\n elif non_convex_count == polygon_corners:\n return \"non-convex\"\n # the polygon formed is neither convex nor non-convex\n else:\n return \"neither convex nor non-convex\"\n\nprint(classify_features([(1,0), (2,3), (3,1), (4,3)])) # prints \"non-convex\""} {"text": "[HI Wikipedia] पारसी धर्म\n\nपारसी पंथ अथवा ज़ोरोएस्ट्रिनिज़म फ़ारस का राजपंथ हुआ करता था। यह ज़न्द अवेस्ता नाम के ग्रन्थ पर आधारित है। इसके संस्थापक ज़रथुष्ट्र हैं, इसलिये इसे ज़रथुष्ट्री पंथ भी कहते हैं। जोरोएस्ट्रिनिइजम दुनिया के सबसे पुराने एकेश्वरवादी धर्मों में से एक है। दूसरी सहस्राब्दी ईसा पूर्व की संभावित जड़ों के साथ, पारसी धर्म 5वीं शताब्दी ईसा पूर्व में लिखित इतिहास में प्रवेश करता है। यह लगभग ६०० ईसा पूर्व से ६५० सीई तक एक सहस्राब्दी से अधिक के लिए प्राचीन ईरानी साम्राज्यों के राज्य धर्म के रूप में कार्य करता था, लेकिन ६३३-६५४ के फारस की मुस्लिम विजय और पारसी लोगों के बाद के उत्पीड़न के बाद ७ वीं शताब्दी सीई से इसमें गिरावट आई। हाल के अनुमानों में पारसी की वर्तमान संख्या लगभग ११०,०००–१२०,००० है, जिसमें से अधिकांश भारत, ईरान और उत्तरी अमेरिका में रहते हैं; माना जाता है कि उनकी संख्या घट रही है। अवेस्ता ज़न्द अवेस्ता के अब कुछ ही अंश मिलते हैं। इसकी भाषा अवेस्तन भाषा है। पारसी पंथ की शिक्षा हैः हुमत, हुख्त, हुवर्श्त जो संस्कृत में सुमत, सूक्त, सुवर्तन अथवा सुबुद्धि, सुभाष, सुव्यवहार हुआ। विश्वास अहुरा मज़्दा पारसी एक ईश्वर को मानते हैं, जिसे अहुरा मज़्दा (होरमज़्द) कहते हैं। अग्नि अग्नि को ईश्वरपुत्र समान और अत्यन्त पवित्र माना जाता है। उसी के माध्यम से अहुरा मज़्दा की पूजा होती है। पारसी मंदिरों को आतिश बेहराम कहा जाता है। स्पेन्ता अमेशा स्पेन्ता अमेशा इनके सात (अथवा छः) .फ़रिश्ते हैं। वेरिगोद् शैतान पारसी विश्वास के मुताबिक अहुरा मज़्दा का दुश्मन दुष्ट अंगिरा मैन्यु (आहरीमान) है। इतिहास ऐतिहासिक रूप से पारसी पंथ की शुरुआत 6वीं शताब्दी ईसा पूर्व में हुई। एक ज़माने में पारसी धर्म (जोरोएस्ट्रिनिइजम) ईरान का राजपंथ हुआ करता था। उन्होंने भारत में शरण ली। तब से आज तक पारसियों ने भारत के उदय में बहुत बड़ा योगदान दिया है। ईरान पारसी देश हुआ करता था। फारसियों के इस्लाम ग्रहण करने के उपरांत समस्त ईरान को मुस्लिम देश बना दिया गया। पारसी त्यौहार नौरोज़ खोरदादसाल जरथुस्त्रनो गहम्बर्स फ्रावार देगन पपेटी जमशोद नौरोज़ पंथ के बारे में प्राचीन फारस (आज का ईरान) जब पूर्वी यूरोप से मध्य एशिया तक फैला एक विशाल साम्राज्य था, तब पैगंबर जरथुस्त्र ने एक ईश्वरवाद का संदेश देते हुए पारसी पंथ की नींव रखी। Atd जरथुस्त्र व उनके अनुयायियों के बारे में विस्तृत इतिहास ज्ञात नहीं है। कारण यह कि पहले सिकंदर की फौजों ने तथा बाद में अरब के आक्रमणकारियों ने प्राचीन फारस का लगभग सारा मज़हबी एवं सांस्कृतिक साहित्य नष्ट कर डाला था। आज हम इस इतिहास के बारे में जो कुछ भी जानते हैं, वह ईरान के पहाड़ों में उत्कीर्ण शिला लेखों तथा वाचिक परंपरा की बदौलत है। सातवीं सदी ईस्वी तक आते-आते फारसी साम्राज्य अपना पुरातन वैभव तथा शक्ति गँवा चुका था। जब अरबों ने इस पर निर्णायक विजय प्राप्त कर ली तो अपने पंथ की रक्षा हेतु अनेक जरथोस्ती धर्मावलंबी समुद्र के रास्ते भाग निकले और उन्होंने भारत के पश्चिमी तट पर शरण ली। यहाँ वे 'पारसी' (फारसी का अपभ्रंश) कहलाए। आज विश्वभर में मात्र सवा से डेढ़ लाख के बीच जरथोस्ती हैं। इनमें से आधे से अधिक भारत में हैं। फारस के शहंशाह विश्तास्प के शासनकाल में पैंगबर जरथुस्त्र ने दूर-दूर तक भ्रमण…"} {"instruction": "Generate a program to convert a date in the format 'dd/mm/yyyy' to a date in the format 'yyyy/mm/dd'.", "input": "02/12/2020", "output": "def convert_date(date): date_list = date.split('/') return '{}/{}/{}'.format(date_list[2],date_list[1],date_list[0])"} {"text": "[CS Wikipedia] Zemské volby v Čechách 1895\n\nZemské volby v Čechách 1895 byly volby konané v Českém království od 20. do 26. listopadu 1895, kterými byli zvoleni poslanci Českého zemského sněmu coby zákonodárného sboru zemské samosprávy v rámci rakousko-uherského, respektive předlitavského ústavního systému. Probíhaly podle kuriového systému. Dobové souvislosti V roce 1895 dominovala české politice mladočeská strana, která na přelomu 80. a 90. let drtivým způsobem porazila dosavadní staročeské vedení, přičemž zlomovým bodem byla kampaň mladočechů proti punktacím roku 1890, tedy staročechy dojednanému pokusu o česko-německý smír v Čechách, jenž ale byl mladočechy kritizován jako přílišný ústupek německému etniku a jeho požadavkům na teritoriální a administrativní oddělení německých oblastí v rámci Čech. V zemských volbách roku 1889 i v celostátních volbách do Říšské rady roku 1891 triumfovali mladočeši. Kontroverze okolo punktací pokračovaly i v prvních letech 90. let a mladočeši blokovali i prostřednictvím násilných obstrukcí implementaci jednotlivých položek z punktační dohody. S mladočeským posunem v české politice se rozpadlo i trvalejší vládní uspořádání, kdy staročeská politická reprezentace společně s polskými poslanci a německorakouskými konzervativci tvořila na Říšské radě takzvaný železný kruh pravice, díky kterému se po téměř 15 let v Předlitavsku vládla vláda Eduarda Taaffeho, byť vlastní příčinou jejího pádu roku 1893 byla kontroverze okolo Taaffeho návrhu volební reformy. Vůči vídeňské vládě vystupovala mladočeská strana opozičně a radikálně, ovšem v průběhu let se v ní aktivizovalo realistické a umírněné křídlo, které vedl Josef Kaizl a které se začalo distancovat od radikálů. Výsledkem jejich aktivity pak byla takzvaná Nymburská rezoluce, kterou se mladočeská strana začala posouvat k pragmatické politice standardní liberálně orientované politické formace. Krátce před zemskými volbami se v Předlitavsku ujala moci vláda Kazimíra Badeniho, která jevila zájem o získání mladočeské podpory. V roce 1895 vypršelo funkční období předchozího zemského sněmu, jehož složení určily zemské volby roku 1889. Vyhláškou z 8. října 1895 vypsalo místodržitelství nové volby. V kurii venkovských obcí na 20. listopad, v kurii městské na 22. listopadu, v kurii obchodních a živnostenských komor na 25. a v kurii velkostatkářské na 26. listopadu. Výsledky voleb Volební systém do Českého zemského sněmu odpovídal parametrům, které zde nastavila již únorová ústava roku 1861. Zvoleno bylo 236 poslanců a to ve čtyřech skupinách: kurie venkovských obcí, skupina měst, skupina obchodních a živnostenských komor a kurie velkostatkářská, ve všech s omezeným volebním právem (volební cenzus). Na sněmu pak tyto čtyři volební skupiny tvořily tři kurie (poslanci zvolení za skupinu měst a skupinu obchodních a…"} {"instruction": "Construct a bubblesort algorithm in Python.", "input": "", "output": "def bubbleSort(array): n = len(array) for i in range (n): for j in range(0, n-i-1): if array[j] > array[j+1] : array[j], array[j+1] = array[j+1], array[j] arr = [64, 34, 25, 12, 22, 11, 90] bubbleSort(arr) print (\"Sorted array is:\") for i in range(n): print (\"%d\" %arr[i]),"} {"text": "[EN Wikipedia] 2019–20 NBL Canada season\n\nThe 2019–20 NBL Canada season was the ninth season of the National Basketball League of Canada. The regular season was supposed to run from December 26, 2019, to April 23, 2020. However, on March 12, the season was suspended due to the COVID-19 pandemic in Canada. On April 1, the season was officially cancelled with the league saying they will \"begin preparations for its tenth season in 2020–21\". The 2020–21 season was also cancelled. League changes Because of financial difficulties, two of the league's teams, Saint John Riptide and Cape Breton Highlanders, were granted a one-year sabbatical, with the goal of finding new sponsors in order to rejoin the league next season, reducing the league to eight teams. The decrease in the number of teams also caused a change in the playoff format with the top two teams in each division qualifying for the postseason. Offseason coaching changes The Halifax Hurricanes hired Ryan Marchand as head coach after the Hurricanes' head coach for the previous three seasons, Mike Leslie, was named team president and general manager. The London Lightning hired Doug Plumb, who had most recently been the head coach of the St. John's Edge. Plumb replaced Elliott Etherington who had been promoted during the previous season after the Lightning had fired Keith Vassell. The St. John's Edge removed the interim status of head coach Steven Marcus. Regular season Standings as of March 11: z – Clinched home court advantage for the entire playoffs c – Clinched home court advantage for the division playoffs x – Clinched playoff spot Attendance As of games played 11 March 2020 Awards Player of the Week award Coach of the Month award References External links NBL Canada website National Basketball League of Canada seasons 2019–20 in Canadian basketball NBL Canada"} {"instruction": "Write a function that takes a 2D array as input and returns the transposed array", "input": "[[1, 2], [3, 4], [5, 6]]", "output": "def transpose(arr): new_arr = [] for i in range(len(arr[0])): new_arr.append([row[i] for row in arr]) return new_arr"} {"instruction": "Create a variable that stores the result of the following function: 10 * 10 + 12 / 3.", "input": "", "output": "int result = 44;"} {"instruction": "Write a Python function to generate a random string of length 10.", "input": "", "output": "import random\nimport string\n\ndef generate_string():\n chars = string.ascii_uppercase + string.ascii_lowercase + string.digits\n random_string = ''.join(random.choice(chars) for i in range(10))\n return random_string\n\n# Example test\nrandom_string = generate_string()\nprint(random_string) # 5BZFz5S2Sd"} {"text": "[HI Wikipedia] चित्रकला\n\nचित्रकला एक द्विविमीय (two-dimensional) कला है। भारत में चित्रकला का एक प्राचीन स्रोत विष्णुधर्मोत्तर पुराण है। इतिहास चित्रकला का प्रचार चीन, मिस्र, भारत आदि देशों में अत्यंत प्राचीन काल से है। मिस्र से ही चित्रकला यूनान में गई, जहाँ उसने बहुत उन्नति की। ईसा से १४०० वर्ष पहले मिस्र देश में चित्रों का अच्छा प्रचार था। लंदन के ब्रिटिश संग्रहालय में ३००० वर्ष तक के पुराने मिस्री चित्र हैं। भारतवर्ष में भी अत्यंत प्राचीन काल से यह विधा प्रचलित थी, इसके अनेक प्रमाण मिलते हैं। रामायण में चित्रों, चित्रकारों और चित्रशालाओं का वर्णन बराबर आया है। विश्वकर्मीय शिल्पशास्त्र में लिखा है कि स्थापक, तक्षक, शिल्पी आदि में से शिल्पी को ही चित्र बनाना चाहिए। प्राकृतिक दृश्यों को अंकित करने में प्राचीन भारतीय चित्रकार कितने निपुण होते थे, इसका कुछ आभास भवभूति के उत्तररामचरित के देखने से मिलता है, जिसमें अपने सामने लाए हुए वनवास के चित्रों को देख सीता चकित हो जाती हैं। यद्यपि आजकल कोई ग्रंथ चित्रकला पर नहीं मिलता है, तथापि प्राचीन काल में ऐसे ग्रंथ अवश्य थे। कश्मीर के राजा जयादित्य की सभा के कवि दोमोदर गुप्त आज से ११०० वर्ष पहले अपने कुट्टनीमत नामक ग्रंथ में चित्रविद्या के 'चित्रसूत्र' नामक एक ग्रंथ का अल्लेख किया है। अजंता गुफा के चित्रों में प्राचीन भारतवासियों की चित्रनिपुणता देख चकित रह जाना पड़ता है। बड़े बड़े विज्ञ युरोपियनों ने इन चित्रों की प्रशंसा की है। उन गुफाओं में चित्रों का बनाना ईसा से दो सौ वर्ष पूर्व से आरंभ हुआ ता औरक आठवीं शताब्दी तक कुछ न कुछ गुफाएँ नई खुदती रहीं। अतः डेढ़ दो हजार वर्ष के प्रत्यक्ष प्रमाण तो ये चित्र अवश्य हैं। परिचय चित्रविद्या सीखने के लिये पहले प्रत्येक प्रकार की सीधी टेढ़ी, वक्र आदि रेखाएँ खींचने का अभ्यास करना चाहिए। इसके उपरांत रेखाओं के ही द्वारा वस्तुओं के स्थूल ढाँचे बनाने चाहिए। इस विद्या में दूरी आदि के सिद्धांत का पूरा अनुशीलन किए बिना निपूणता नहीं प्राप्त हो सकती। दृष्टि के समानांतर या ऊपर नीचे के विस्तार का अंकन तो सहज है, पर आँखों के ठीक सामने दूर तक गया हुआ विस्तार अंकित करना कठिन विषय है। इस प्रकार की दूरी का विस्तार प्रदर्शित करने की क्रिया को 'पर्सपेक्टिव' (Perspective) कहते हैं। किसी नगर की दूर तक सामने गई हुई सड़क, सामने को बही हुई नदी आदि के दृश्य बिना इसके सिद्धांतों को जाने नहीं दिखाए जा सकते। किस प्रकार निकट के पदार्थ बड़े और साफ दिखाई पड़ते हैं और दूर के पदार्थ क्रमशः छोटे और धुँधले होते जाते हैं, ये सब बातें अंकित करनी पड़ती हैं। उदाहरण के लिये दूर पर रखा हुआ एक चौखूँटा संदूक लीजिए। मान लीजिए कि आप उसे एक ऐसे किनारे से देख रहे हैं जहाँ से उसके दो पार्श्व या तीन कोण दिखाई पड़ते हैं। अब चित्र बनाने के निमित्त हम एक पेंसिल आँखों के समानांतर लेकर एक आँख दबाकर देखेंगे तो संदूक की सबके निकटस्थ खड़ी कोणरेखा (ऊँचाई) सबसे बड़ी दिखाई देगी; जो पार्श्व अधिक सामने रहेगा, उसके दूसरे ओर की कोणरेखा उससे छोटी और जो पार्श्व कम दिखाई देगा, उसके दूसरे ओर की कोणरेखा सबसे छोटी दिखाई पड़ेगी। अर्थात् निकटस्थ कोण रेखा से लगा हुआ उस पार्श्व का कोण जो कम दिखाई देता है, अधिक दिखाई पड़नेवाले पार्श्व के कोण से छोटा होगा। दूसरा…"} {"instruction": "Create a function in python that takes a string as an argument and prints out two copies of the string.", "input": "string = \"Hello World!\"", "output": "def print_twice(string): print(string) print(string) print_twice(string)"} {"instruction": "Generate a Python program that takes as its inputs two lists of numbers and returns the sum of the elements in mutually overlapping positions.", "input": "two lists [1, 2, 3] and [4, 5, 6]", "output": "def sum_overlap(list1, list2):\n result = 0\n # Loop through the lists and add overlapping elements\n for i in range(len(list1)):\n if i < len(list2):\n result += list1[i] + list2[i]\n # Return result\n return result\n\nlist1 = [1, 2, 3]\nlist2 = [4, 5, 6]\n\nresult = sum_overlap(list1, list2)\nprint(result) # Prints 12"} {"text": "[HI Wikipedia] हिरोडोटस\n\nहिरोडोटस (ग्रीक: Ἡρόδοτος Ἁλικαρνᾱσσεύς Hērodotos Halikarnāsseus) (मृत्‍यु ४२५ ई.पू), यूनान के इतिहासकार एवं भूगोलवेत्ता थे। उन्होंने अपने इतिहास का विषय पेलोपोनेसियन युद्ध को बनाया था। उनके द्वारा लिखित पुस्तक हिस्टोरिका थी। भूगोलवेत्ता यूनानी भूगोलवेत्ता"} {"instruction": "Create a class in Java that encapsulates a student's name and grade point average (GPA).", "input": "", "output": "public class Student { private String name; private double gpa; public Student(String name, double gpa) { this.name = name; this.gpa = gpa; } public String getName() { return name; } public double getGPA() { return gpa; } }"} {"instruction": "Identify the bug in the following python code: def foo(x): x[0] = 2", "input": "[0, 1, 2]", "output": "This code is trying to modify an immutable object (a tuple) as it is attempting to assign a value to the first element in a tuple. The correct way to do this is with a list, not a tuple. The code should be changed to: def foo(x): x[0] = 2 where the input x is a list instead of a tuple."} {"text": "[EN Wikipedia] Dicephalarcha herbosa\n\nDicephalarcha herbosa is a moth of the family Tortricidae. It is found in Thailand, India, southern Sulawesi, Java, Borneo, Bali and the Moluccas. The wingspan 10–13 mm. The forewings are dark fuscous on the costal half, while the lower half of the wing is pale bluish grey. The hindwings are dark grey, becoming blackish towards the apex. References Moths described in 1909 Olethreutini"} {"instruction": "Write a Python function to split a given string into equal parts in a loop.", "input": "string = \"Hello World\"", "output": "def split_string(string):\n result = []\n for i in range(0, len(string), int(len(string) / 2)):\n result.append(string[i: i + int(len(string) / 2)])\n return result"} {"instruction": "Use an if statement to determine if a number is negative or positive.", "input": "number = -5", "output": "if number < 0: print(\"The number is negative.\") else: print(\"The number is positive.\")"} {"instruction": "Write a Python function that prints the square of a given number.", "input": "", "output": "def square(num): return num ** 2"} {"instruction": "Insert a record into a database table named ‘customers’ with the following values.", "input": "ID: 123 Name: John Doe Age: 35", "output": "INSERT INTO customers (ID, Name, Age) VALUES (123, 'John Doe', 35);"} {"instruction": "Sort a given array in ascending order based on the second element of each array element pair.", "input": "arr = [(3, 5), (4, 1), (1, 4), (2, 2)]", "output": "arr = [(3, 5), (4, 1), (1, 4), (2, 2)] # sort the array based on the second element in each pair arr.sort(key=lambda x: x[1]) print(\"The array sorted in ascending order based on the second element of each array element pair is:\", arr)"} {"instruction": "Create an Angular component to display an \"about us\" page.", "input": "", "output": "@Component({ selector: \"app-about-us\", templateUrl: \"./about-us.component.html\" }) export class AboutUsComponent{ }"} {"instruction": "Explain the purpose of the %i in a Python format string.", "input": "", "output": "The %i in Python is a special format specifier used to format integer numbers. When used in a format string, it will convert the number to an integer and insert it into the output string. This can be used to easily format numbers when printing output."} {"instruction": "Write a Python script to compress a directory using the gzip library.", "input": "source directory: example_dir", "output": "import gzip\nimport os\n\n# Walk through the source directory\nfor root, dirs, files in os.walk('example_dir'):\n # Gzip each file\n for file in files:\n with open(os.path.join(root, file), 'rb') as f_in:\n with gzip.open(os.path.join(root, file + '.gz'), 'wb') as f_out:\n f_out.writelines(f_in)"} {"instruction": "Create a React component for a form with three text boxes.", "input": "", "output": "import React, { useState } from 'react'; const MyForm = () => { const [text1, setText1] = useState(''); const [text2, setText2] = useState(''); const [text3, setText3] = useState(''); return (
    setText1(e.target.value)} /> setText2(e.target.value)} /> setText3(e.target.value)} />
    ); }; export default MyForm;"} {"instruction": "Create a python program that applies mean normalization to the given data.", "input": "[1, 2, 3, 4, 5, 6]", "output": "def normalize_mean(data):\n mean = np.mean(data)\n normalized = [x - mean for x in data]\n return normalized"} {"instruction": "Write HTML code for a text input field with the placeholder \"Enter name\".", "input": "", "output": ""} {"instruction": "Write code to find the intersection of two sorted lists", "input": "list1 = [1, 3, 4, 6] list2 = [1, 2, 5, 6]", "output": "def find_intersection(list1, list2): \"\"\" Find the intersection of two sorted lists :param list1: the first sorted list :param list2: the second sorted list :return: a list with elements found in both lists \"\"\" intersection = [] p1 = p2 = 0 while p1 < len(list1) and p2 < len(list2): if list1[p1] == list2[p2]: intersection.append(list1[p1]) p1 += 1 p2 += 1 elif list1[p1] < list2[p2]: p1 += 1 else: p2 += 1 return intersection list1 = [1, 3, 4, 6] list2 = [1, 2, 5, 6] print(find_intersection(list1, list2))"} {"text": "[EN Wikipedia] Vicentinho Alves\n\nVicentinho Alves (born October 1, 1957) is a Brazilian politician. He has represented Tocantins in the Federal Senate since 2011. Previously he was a deputy from Tocantins from 2007 to 2011. He is a member of the Liberal Party (PL). References Living people 1957 births Members of the Federal Senate (Brazil) People from Porto Nacional Members of the Chamber of Deputies (Brazil) from Tocantins Liberal Party (Brazil, 2006) politicians Solidariedade politicians Liberal Party (Brazil, 1985) politicians Brazilian Social Democracy Party politicians Liberal Front Party (Brazil) politicians Democratic Labour Party (Brazil) politicians"} {"text": "[DE Wikipedia] Olympische Sommerspiele 2020/Hockey/Qualifikation\n\nFür die olympischen Hockeyturniere 2020 konnten sich bei sowohl bei den Männern als auch bei den Frauen 12 Mannschaften qualifizieren. Jede Mannschaft darf maximal 16 Spieler stellen. Herren Übersicht Asienspiele 2018 Der asiatische Vertreter wurde im Rahmen der Asienspiele 2018 in Jakarta, Indonesien ermittelt. Die japanische Nationalmannschaft gewann das Turnier, da diese bereits als Gastgebernation qualifiziert ist, gab es sieben statt sechs Playoff-Spiele. Panamerikanische Spiele 2019 Bei den Panamerikanischen Spielen 2019 in Peru wurde ein Quotenplatz an Argentinien als Sieger dieses Turniers vergeben. Afrikanisches Qualifikationsturnier Der dem afrikanischen Verband zustehende Quotenplatz wurde in einem Qualifikationsturnier ausgespielt. Südafrika konnte sich unter den sechs Mannschaften durchsetzen und qualifizierte sich für die Spiele. Europameisterschaft 2019 An der Europameisterschaft 2019 in Antwerpen spielten 8 Nationen um einen Quotenplatz, der dem Sieger des Turniers zusteht. Die belgische Nationalmannschaft gewann das Turnier im eigenen Land und ist somit für Tokio qualifiziert. Ozeanien Cup 2019 Am Ozeanien Cup nahmen nur Australien und Neuseeland teil. Diese spielten drei Mal gegeneinander um den Quotenplatz für Ozeanien. Mit zwei Siegen und einem Remis sicherte sich Australien den Quotenplatz. Playoff-Spiele Zusätzlich zu den kontinentalen Qualifikationswettbewerben wurden insgesamt sieben weitere Quotenplätze in Playoff-Spielen vom 25. Oktober bis 3. November vergeben. Damen Übersicht Asienspiele 2018 Der asiatische Vertreter wurde im Rahmen der Asienspiele 2018 in Jakarta, Indonesien ermittelt. Die japanische Nationalmannschaft gewann das Turnier, da diese bereits als Gastgebernation qualifiziert ist, gab es sieben statt sechs Playoff-Spiele. Panamerikanische Spiele 2019 Bei den Panamerikanischen Spielen 2019 in Peru wurde ein Quotenplatz an Argentinien als Sieger dieses Turniers vergeben. Afrikanisches Qualifikationsturnier Der dem afrikanischen Verband zustehende Quotenplatz wurde in einem Qualifikationsturnier ausgespielt. Südafrika konnte sich unter den fünf Mannschaften mit 4 Siegen und keinem Gegentor durchsetzen. Somit qualifizierte sich Südafrika für die Spiele. Europameisterschaft 2019 An der Europameisterschaft 2019 in Antwerpen spielten 8 Nationen um einen Quotenplatz spielen, der dem Sieger des Turniers zusteht. Die niederländische Nationalmannschaft gewann das Turnier und ist somit für Tokio qualifiziert. Ozeanien Cup 2019 Am Ozeanien Cup nahmen nur Australien und Neuseeland teil. Diese spielten drei Mal gegeneinander um den Quotenplatz für Ozeanien. Aufgrund gleicher Punktzahl entschied das Torverhältnis zu Gunsten von Neuseeland über die Olympiateilnahme. Playoff-Spiele Zusätzlich zu den kontinentalen…"} {"instruction": "Write a function which will print out a given pattern.", "input": "* ** *** ****", "output": "def print_pattern(n): for i in range(1, n+1): print(\"*\" * i) print_pattern(4)"} {"instruction": "Write a Python program to loop through a list and print each element of the list.", "input": "[1, 2, 3, 4]", "output": "for x in [1, 2, 3, 4]:\n print(x)"} {"instruction": "Create a function in Python to calculate the length of the longest palindrome in a given string.", "input": "String: abbaacba", "output": "def longest_palindrome(text):\n n = len(text) \n result = 0\n dp = [[False] * (n + 1) for _ in range(n + 1)] \n \n for l in range(1, n + 1): \n for i in range(n - l + 1): \n \n j = i + l - 1\n if l == 1: \n dp[i][j] = True\n elif l == 2 and text[i] == text[j]: \n dp[i][j] = True\n elif text[i] == text[j] and dp[i + 1][j - 1]: \n dp[i][j] = True\n \n if dp[i][j] and l > result: \n result = l \n \n return result \n\ntext = 'abbaacba'\nprint(longest_palindrome(text))"} {"instruction": "Write a loop to print the numbers from 10 to 1 in reverse order.", "input": "", "output": "for i in range(10, 0, -1): print(i)"} {"instruction": "Create a Python function to encrypt a string using the substitution method.", "input": "", "output": "def encrypt_substitution(s):\n result = ''\n for c in s:\n result += chr(ord(c) + 3)\n return result"} {"instruction": "Analyze the sentiment of the sentence \"I am so delighted\".", "input": "", "output": "Positive sentiment."} {"instruction": "Write a C program to print the numbers from 1 to 100, with the following conditions: if the number is divisible by 2, print \"fizz\" if the number is divisible by 3, print \"buzz\" if the number is divisible by both 2 and 3, print \"fizzbuzz\"", "input": "", "output": "#include int main(void) { int i; for (i=1; i<=100; i++) { // number divisible by 3 and 5 both if (i % 3 == 0 && i % 5 == 0) printf(\"fizzbuzz\\n\"); // number divisible by 3 only else if (i % 3 == 0) printf(\"fizz\\n\"); // number divisible by 5 only else if (i % 5 == 0) printf(\"buzz\\n\"); // number indivisible by both 3 and 5 else printf(\"%d\\n\", i); } return 0; }"} {"text": "[CS Wikipedia] John Lewis Partnership\n\nSpolečnost John Lewis Partnership je společnost družstevního typu, vzniklá v roce 1864 a vlastněná britskými zaměstnanci. Provozuje obchodní domy John Lewis, samoobslužné supermarkety Waitrose a několik dalších služeb. Charakteristika Společnost vlastní holdingem zastupujícím všechny jejich zaměstnance, označované za partnery, kteří mají vliv na způsob obchodování a také podíl na ročním zisku, který je obvykle znatelným přilepšením k jejich platu. Skupina je třetí největší soukromá společnost ve Spojeném království. John Lewis vyniká také tím, že v roce 2010 porazila jako nejlepší britský internetový prodejce v roce 2010, kdy porazila Marks & Spencer. Řetězec je tradičně zaměřený na vysokou kvalitu zboží a služeb a oslovoval výhradně střední a vyšší třídu nakupujících. V současnosti rozšířil záběr marketingové strategie na všechny typy zákazníků a uvedl na trh sortiment Value v prodejnách John Lewis a Essential ve Waitrose a zvětšila svůj obrat. Toto Partnerství také obsluhuje webový supermarket Ocado vlastními značkami potravin Waitrose a vlastními značkami spotřebního zboží John Lewis. Organizace Partnerství Každý zaměstnanec je partnerem v Partnerství (The John Lewis Partnership), a má možnost ovlivnit podnik prostřednictvím odvětvových fór, kde probíhá diskuze o místních záležitostech každého obchodu, a také prostřednictvím divizních rad. Vrcholným orgánem je Rada Partnerství, do níž partneři volí nejméně 80 procent z 82 zástupců. Ostatní členy rady jmenuje předseda společnosti. Rady mají pravomoc jednat o jakýchkoli záležitostech a odpovídají za nekomerční for stránky podnikání: rozvoj společenských aktivit Partnerství a jeho charitativní činnost. Rada partnerství dále volí pět ředitelů do správní rady (Partnership Board), která odpovídá za obchodní činnosti, a do které předseda jmenuje dalších pět členů. Zbývající dva členy správní rady jsou předseda a jeho zástupce. Každý řadový partner má také otevřený kanál pro vyjádření svých názorů vůči nadřízeným a předsedovi. Partnerství vydává vnitropodnikový časopis Noviny (The Gazette). Je to nejstarší vnitropodnikový zpravodaj ze všech dosud vycházejících v Británii. Partneři mohou psát anonymně dopisy oběma verzím časopisů na účet managementu holdingu. Společenské aktivity Partnerství Johna Lewise má velice široký program sociálních aktivit pro své partnery včetně dvou velkých venkovských usedlostí s parkem, hřišti a tenisovými kurty, golfového klubu, jachtařského klubu s pěti jachtami a třemi venkovskými hotely poskytující ubytování partnerům na dovolenou. Partneři jsou také zapojeni do velmi žádaného penzijního programu, platí jim zaměstnanecké životní pojištění a mají štědrou dovolenou. Navíc po 25 letech služby ve společnosti partneři dostávají placenou šestiměsíční dovolenou, známou jako Long…"} {"text": "[HI Wikipedia] बोत्सवाना\n\nबोत्सवाना गणराज्य (अंग्रेजी: Republic of Botswana, श्वाना: Lefatshe la Botswana), अफ्रीकी महाद्वीप के दक्षिण में स्थित एक स्थल-रुद्ध देश है। 30 सितम्बर 1960 को ब्रिटेन की यूनाइटेड किंगडम से स्वतंत्रता मिलने से पूर्व इसे ब्रिटिश संरक्षित राज्य, बेचुआनालैंड के नाम से जाना जाता था। स्वतंत्रता प्राप्ति के बाद ब्रिटिश राष्ट्रमंडल के अंतर्गत इस देश ने एक नया नाम बोत्सवाना अपना लिया। स्वतंत्रता प्राप्ति के बाद यहाँ लगातार स्वतंत्र और निष्पक्ष लोकतांत्रिक चुनाव आयोजित किये जा रहे हैं। जिम्बाब्वे,अंगोला, जांबिया और दक्षिण अफ्रीका इसके पड़ोसी देश हैं। भौगोलिक दृष्टि से बोत्सवाना एक सपाट देश है और इसके लगभग 70% भाग में कालाहारी मरुस्थल फैला है। इसके दक्षिण और दक्षिणपश्चिम में दक्षिण अफ्रीका, पश्चिम और उत्तर में नामीबिया तथा उत्तरपूर्व में जिम्बाब्वे स्थित है। यह सिर्फ एक बिंदु पर जाम्बिया से मिलता है। यह एक छोटा सा देश है, जिसकी जनसंख्या सिर्फ 20 लाख है। स्वतंत्रता के समय यह अफ्रीका के कुछ सबसे गरीब देशों मे से एक था जिसका सकल घरेलू उत्पाद प्रति व्यक्ति मात्र 70 अमेरिकी डॉलर था, लेकिन तब से लेकर अब तक बोत्सवाना ने आर्थिक रूप से तरक्की की है और अब इसकी गिनती अफ्रीका के मध्यम आय वाले देशों में होने लगी है। इसकी अर्थव्यवस्था विश्व की कुछ सबसे तेजी से बढ़ती अर्थव्यवस्थाओं में से है, जिसकी औसत वृद्धि दर 9% की है और अंतर्राष्ट्रीय मुद्रा कोष के 2010 के अनुमान के अनुसार इसका सकल घरेलू उत्पाद (क्रय शक्ति समता) प्रति व्यक्ति लगभग 14,800 अमेरिकी डॉलर के बराबर है। बड़े स्तर पर व्याप्त गरीबी, असमानता और निम्न मानव विकास सूचकांक के बावजूद बोत्सवाना ने, सुशासन और व्यापक आर्थिक वित्तीय प्रबंधन द्वारा समर्थित विकास के स्तरों पर प्रभावशाली रूप से तरक्की की है। सकल घरेलू उत्पाद का 10 प्रतिशत शिक्षा पर व्यय किए जाने से इस क्षेत्र में महत्वपूर्ण शैक्षिक उपलब्धियों हासिल हुई हैं और देश में लगभग लगभग सभी के लिए मुफ्त शिक्षा का प्रावधान किया गया है, हालाँकि इस सबके बावजूद देश में पर्याप्त कौशल और कार्यबल का अभाव है। बेरोजगारी की दर भी लगातार 20 प्रतिशत के साथ उच्च स्तर पर बनी हुई है। शहरी क्षेत्रों की तुलना में ग्रामीण क्षेत्रों में घरेलू आय काफी कम है, हालाँकि ग्रामीण क्षेत्रों में गरीबी की दर में गिरावट आई है, लेकिन अभी भी वो शहरी क्षेत्रों की तुलना में काफी अधिक है। सरकार की ओर से एचआईवी /एड्स की दवाओं की नि:शुल्क उपलब्धता के चलते एचआईवी/एड्स संक्रमण की दर में अभूतपूर्व कमी दर्ज की गयी है। हीरे और मांस बाजार पर बुरी तरह निर्भर देश की अर्थव्यवस्था में, विविधता लाने के प्रयास किए जा रहे हैं। सन्दर्भ इन्हें भी देखें सिंहावलोकन बीबीसी न्यूज- Country Profile: Botswana निर्देशियायें Open Directory Project - Botswana directory category Stanford University - Africa South of the Sahara: Botswana directory category The Index on Africa - Botswana directory category Botswana Map https://web.archive.org/web/20050924163355/http://www.sas.upenn.edu/African_Studies/Country_Specific/Botswana.html University of Pennsylvania - African Studies Center: Botswana] directory category Yahoo! - Botswana…"} {"instruction": "Write a function to generate the Cartesian product of 2 sets in Python.", "input": "A = {1, 2}; B = {'a', 'b'}", "output": "from itertools import product def get_cartesian_product(A, B): return set(product(A, B)) A = {1, 2}; B = {'a', 'b'} print(get_cartesian_product(A,B))"} {"text": "[HI Wikipedia] आप्रवास\n\nआप्रवास (अंग्रेज़ी: इम्मिग्रेशन)लोगों का उन क्षेत्रों में गमन होने को कहते हैं, जहां के वे मूल निवासी नहीं होते हैं। यह गमन वहां बसने की मंशा से किया जाता है।[1] आप्रवास कई कारणों से किया जा सकता है जिनमें मौसम, तापमान, प्रजनन, आर्थिक, राजनीतिक, परिवार के पुनःएकीकरण, प्राकृतिक आपदा, गरीबी या अपने परिवेश को स्वेच्छा से बदलने के लिए किया जाना आते हैं। आप्रवास कई कारणों से किया जा सकता है जिनमें मौसम, तापमान, प्रजनन, आर्थिक, राजनीतिक, परिवार के पुनःएकीकरण, प्राकृतिक आपदा, गरीबी या अपने परिवेश को स्वेच्छा से बदलने के लिए किया जाना आते हैं। सन्दर्भ बाहरी कड़ियाँ इम्मिग्रेशन एण्ड माइग्रेशन UCB लाईब्रेरीज़ से अन्तर्राष्ट्रीय प्रवास संयुक्त राष्ट्र से अन्तर्राष्ट्रीयप्रवास एवं बहुसंस्कृति नीतियों पर यूनेस्को कार्यक्रम OECD प्रवास आंकड़े ग्लोबलाइज़ेशन: मूल पाठ आव्रजन जनसांख्यिकी जनसंख्या बहुसंख्यक-अल्पसंख्यक संबंध"} {"instruction": "Create a MySQL query for finding customers who paid more than $100.", "input": "payment", "output": "SELECT customer.* FROM customer JOIN payment ON customer.ID = payment.customer_id WHERE payment.amount > 100;"} {"text": "[DE Wikipedia] Bernardino della Chiesa\n\nBernardino della Chiesa OFMRef (; * 8. Mai 1644 in der Republik Venedig als Antonius della Chiesa; † 21. Dezember 1721 in Linqing, Shandong, Kaiserreich China) war ein italienischer Geistlicher, Missionar in China und Bischof von Peking. Leben Della Chiesa legte am 16. August 1663 seine Profess bei den Franziskaner-Reformaten in Spineta ab und nahm den Namen Bernardino an. 1671 erhielt er die Priesterweihe. 1674 wurde er Oberer des Klosters San Lorenzo in Orvieto. 1679 bat er die Propaganda Fide, ihn in die Mission nach China zu entsenden. Am 20. März 1680 wurde er zum Koadjutor-Apostolischer Vikar des Erzbistums Fuzhou und Titularbischof von Argos. Am 31. März 1680 wurde er in Rom zum Bischof geweiht. Im Oktober 1680 reiste von Venedig aus über Tripolis, Aleppo, Surat und Siam nach China, wo er im August 1684 in Guangzhou eintraf. Nach dem Tod seines Vorgängers Pallu wurde er am 29. Oktober 1684 Apostolischer Vikar. Am 10. April 1690 wurde er zum Bischof von Peking ernannt. Weblinks DELLA CHIESA, Bernardino auf der Seite www.treccani.it (italienisch) Bernardino della Chiesa OFM, China-missionar und Bischof von Peking Römisch-katholischer Bischof (17. Jahrhundert) Römisch-katholischer Bischof (18. Jahrhundert) Apostolischer Vikar Katholischer Missionar Missionar (China) Historische Person (Italien) Geboren 1644 Gestorben 1721 Mann"} {"text": "[DE Wikipedia] Amy Jo Johnson\n\nAmy Jo Johnson (* 6. Oktober 1970 in Cape Cod, Massachusetts) ist eine US-amerikanisch-kanadische Schauspielerin und Musikerin. Leben und Karriere Amy Jo Johnson zog nach dem Abschluss der High School nach New York City, wo sie an der American Musical Dramatic Academy studierte. Zwei Jahre später zog sie nach Kalifornien. Johnson debütierte in der Fernsehserie Mighty Morphin Power Rangers (1993–1995) als Kimberly Ann Hart, dem ersten pinken Power Ranger und Ninja-Ranger. Dieselbe Rolle spielte sie in Power Rangers – Der Film (1995). In der Fernsehkomödie Susie Q – Engel in Pink (1996) spielte sie die Titelrolle von Maggie, die als Susie Q bezeichnet wird. Im Fernsehthriller Das mörderische Klassenzimmer (1997) spielte sie neben Scott Bairstow eine der Hauptrollen, im Sportdrama Erfolg um jeden Preis (1997) übernahm sie die Hauptrolle von Andie Bradley. In den Jahren 1998 bis 2002 spielte Johnson die Hauptrolle von Julie Emrick in der Fernsehserie Felicity, für die sie ebenfalls die Musik komponierte. Für diese Rolle wurde sie im Jahr 2000 für den Teen Choice Award nominiert. Von 2008 bis zum Serienende 2012 gehörte sie als Julianna „Jules“ Callaghan zur festen Besetzung der kanadischen Polizei-Serie Flashpoint – Das Spezialkommando. In dem den 2014 veröffentlichten Kurzfilm Lines war sie nicht nur vor der Kamera tätig, sondern schrieb auch das Drehbuch und führte Regie. Lines wurde 2014 auf dem Toronto Short Film Festival als Bester Kurzfilm (Komödie) und sie selbst für die Rolle der Amelia als beste Schauspielerin in einer Hauptrolle auf dem Buffalo Niagara Film Festival ausgezeichnet. Für die Komödie The Space Between schrieb sie das Drehbuch, führte Regie und spielte eine Hauptrolle. Im 2017 erschienen Power-Rangers-Film hat sie einen kurzen Cameo-Auftritt. Filmografie (Auswahl) 1993–1995: Mighty Morphin Power Rangers (Fernsehserie, 137 Episoden) 1995: Power Rangers – Der Film (Mighty Morphin Power Rangers: The Movie) 1996: Susie Q – Engel in Pink (Susie Q) 1997: Turbo: Der Power Rangers Film (Turbo: A Power Rangers Movie) 1997: Das mörderische Klassenzimmer (Killing Mr. Griffin) 1997: Erfolg um jeden Preis (Perfect Body) 1998: Grenzenlos (Without Limits) 1998–2002: Felicity (Fernsehserie, 50 Episoden) 1999: Cold Hearts 1999: Sweetwater (Sweetwater: A True Rock Story) 2001: Pursuit of Happiness 2001: Liars Club 2002: Interstate 60 2002: Eaten Alive – Invasion der Killer-Insekten (Infested) 2002: Chaos City (Fernsehserie, Episode 6x15) 2003: Hard Ground 2004: Lady Cops – Knallhart weiblich (The Division, Fernsehserie, 22 Episoden) 2005–2007: Wildfire (Fernsehserie, 7 Episoden) 2006: Islander 2006: Magma – Die Welt brennt (Magma: Volcanic Disaster) 2006: Fatal Trust (Fernsehfilm) 2008: Veritas, Prince of Truth 2008–2012: Flashpoint – Das…"} {"instruction": "Edit the given Python code to make it work for a list of dictionaries.", "input": "list_data = [{'id': 1, 'name': 'Tom'}, {'id': 2, 'name': 'Bob'}]\n\nfor element in list_data:\n print(element)", "output": "list_data = [{'id': 1, 'name': 'Tom'}, {'id': 2, 'name': 'Bob'}]\n\nfor element in list_data:\n print(element['name'])"} {"text": "[EN Wikipedia] Ivan Rudnytskyi\n\nIvan Rudnytskyi (; born 5 July 1991) is a Ukrainian former professional footballer. Career In 2016, he played for Neman Grodno. References External links 1991 births Living people Ukrainian men's footballers Ukrainian expatriate men's footballers Expatriate men's footballers in Belarus Expatriate men's footballers in Georgia (country) Ukrainian expatriate sportspeople in Belarus FC Zorya Luhansk players FC Zirka Kropyvnytskyi players FC Nyva Ternopil players FC Neman Grodno players FC Shukura Kobuleti players PFC Sumy players Men's association football midfielders Ukrainian First League players Footballers from Ternopil"} {"instruction": "Write a Python script that uses recursion to calculate the Fibonacci sequence for a given number of terms.", "input": "6", "output": "def Fibonacci(n): \n if n<0: \n print(\"Incorrect input\") \n elif n==1: \n return 0\n elif n==2: \n return 1\n else: \n return Fibonacci(n-1)+Fibonacci(n-2) \n \n# Driver Program \nn = 6\nprint(Fibonacci(n))"} {"instruction": "Create a python class object for the following data:", "input": "A customer has name, age, emailid and phone number as attributes.", "output": "class Customer:\n def __init__(self, name, age, emailid, phone_number):\n self.name = name\n self.age = age\n self.emailid = emailid\n self.phone_number = phone_number"} {"instruction": "Suggest a code for removing the first element from an array.", "input": "", "output": "arr.splice(0, 1);"} {"instruction": "Generate a structured array from a given dictionary in Python.", "input": "dictionary = {\n \"name\": \"John\",\n \"age\": 24,\n \"nationality\": \"American\"\n}", "output": "import numpy as np\ndata = np.array(list(dictionary.values()),\n dtype=[('name','U20'),('age','i4'),('nationality','U10')]\n)"} {"instruction": "Write a Python code for extracting numbers from a given text.", "input": "", "output": "import re\n\ndef extract_numbers(input_string):\n \"\"\"This function extracts numbers from a given textstring using regular expressions.\"\"\"\n \n # Compile the regular expression\n pattern = re.compile(r'\\d+')\n \n # Find all numbers in the string\n output_list = pattern.findall(input_string)\n \n return output_list\n \n# Sample Input\ninput_string = 'I have 2 cats and 3 dogs'\n \n# Print the output\nprint(extract_numbers(input_string))"} {"instruction": "Add two numbers using Python.", "input": "Numbers: 5, 7", "output": "def add_two_numbers(x, y): return x + y if __name__ == '__main__': print(add_two_numbers(5, 7))"} {"instruction": "Design a python script to build a tree from a list of parent-child relationships.", "input": "[ (1, 2), (1, 3), (2, 4), (2, 5), (4, 6), (4, 7) ]", "output": "# Python \nclass Node: \n def __init__(self, data): \n self.data = data \n self.children = [] \n \ndef buildTree(relationships): \n tree = {} \n for parent, child in relationships: \n if parent not in tree: \n tree[parent] = Node(parent) \n parent_node = tree[parent] \n if child not in tree: \n tree[child] = Node(child) \n child_node = tree[child] \n parent_node.children.append(child_node) \n return tree[1]"} {"instruction": "Create a machine learning algorithm in Python for predicting stock prices using historical data.", "input": "Historical Stock Price Data for AAPL (Apple stock) from Jan 1, 2010 to Dec 31, 2020", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\n\n# Read in the stock data\ndata = pd.read_csv('aapl_stock_data.csv')\n\n# Create the features and labels datasets\nX = data[['High', 'Low', 'Close', 'Volume']]\ny = data['Adj Close']\n\n# Create a linear regression model\nreg = LinearRegression().fit(X, y)\n\n# Make predictions\npredictions = reg.predict(X)\n\n# Calculate the error between predictions and actual values\nerror = np.mean(np.abs((y - predictions) / y) * 100)\n\n# Print out the results\nprint('Mean Absolute Percent Error: {:.2f}%'.format(error))"} {"instruction": "Given a list of strings, create a function that returns a list of only the unique strings.", "input": "[\"this\", \"is\", \"a\", \"list\", \"of\", \"strings\", \"this\", \"list\", \"has\", \"some\", \"duplicates\"]", "output": "def unique_strings(string_list): return list(set(string_list))"} {"instruction": "Generate a function that takes an array of integers and rearranges the elements in a cyclical fashion, such that the element at index 0 comes last, the element at index 1 goes to the front, the element at index 2 is inserted after the element at the last index and so on.", "input": "arr = [1, 2, 3, 4, 5]", "output": "def rearrange_array(arr): output = [] for i in range(len(arr)): idx = (i + 1) % len(arr) output.append(arr[idx]) return output"} {"instruction": "Generate a Python program to print out square numbers up to 10.", "input": "", "output": "for i in range(1,11):\n print(i**2)"} {"instruction": "Develop an AI chatbot program in Python.", "input": "", "output": "import re \nimport random \n\n# Define AI responses \nresponses = {\n \"Hi\": [\"Hello there!\", \"Howdy!\", \"Hi 👋\"], \n \"How are you\": [\"I'm doing great!\", \"Doing well!\", \"Never better 🤩\"],\n \"Bye\": [\"Goodbye!\", \"See you later!\", \"Bye bye\"] \n}\n\n# AI function \ndef chatbot(user_query):\n response = \"Sorry, I don't understand 🤔\"\n\n # Removing punctuation signs \n user_query = re.sub('[^a-zA-Z]', ' ', user_query)\n\n # tokenize user_query & convert to lowercase \n user_query = user_query.lower().split()\n\n for word in user_query: \n if word in responses:\n response = random.choice(responses[word])\n\n return response"} {"instruction": "Construct a function in Python that takes a list and returns the mean of the elements in the list.", "input": "[30, 10, 40, 20]", "output": "def mean(list): # Finding total of the list elements total = 0 for num in list: total += num # Calculate mean of the list mean = total / len(list) # Return the mean return mean"} {"instruction": "Write a Python code to sort a dictionary based on the values.", "input": "", "output": "def sort_dict_by_value(in_dict):\n \"\"\" Function to sort a dictionary by it's values\n \"\"\"\n return {k: v for k, v in sorted(in_dict.items(), key=lambda item: item[1])}"} {"instruction": "Create a graphical user interface using Python to perform the following function", "input": "Take two inputs from the user: a name and an age", "output": "import tkinter # Create an instance of tkinter root = tkinter.Tk() # Create two lables and two input boxes name_label = tkinter.Label(root, text ='Name: ') age_label = tkinter.Label(root, text ='Age: ') name_entry = tkinter.Entry(root) age_entry = tkinter.Entry(root) # Place the labels,entry boxes in the desired layout name_label.grid(row = 0, column = 0) name_entry.grid(row = 0, column = 1) age_label.grid(row = 1, column = 0) age_entry.grid(row = 1, column = 1) root.mainloop()"} {"instruction": "Generate a new class from the given prototype.", "input": "class Prototype { public String name; public int age; public String gender; public Prototype(String name, int age, String gender) { this.name = name; this.age = age; this.gender = gender; } }", "output": "class Person extends Prototype { public String address; public String phone; public Person(String name, int age, String gender, String address, String phone) { super(name, age, gender); this.address = address; this.phone = phone; } }"} {"text": "[EN Wikipedia] Andrija Radović\n\nAndrija Radović (; 1872–1947) was a Montenegrin and Yugoslav politician and statesmen, former Prime Minister and leader of the People's and then Democratic Party, fighter for parliamentary democracy and chief proponent of Montenegro's unification with Serbia. Youth Andrija Radović was born to father serdar (count) Jagoš in the village of Martinići, Danilovgrad into the Bjelopavlići clan, in the still unrecognized Principality of Montenegro on 28 January 1872. After finishing the elementary and secondary schools in Cetinje, he went to professionalize in the Kingdom of Italy studying engineering at the Artillery-Engineering Academy from 1890 to 1894 as Nicholas' Pioneer. Upon returning, he got the job as the Military Engineer later raising to the position of Secretary of the Military Council and Court Marshal. At the end of the century, he was appointed by President of the State Council Božo Petrović-Njegoš as State Engineer, Director of Public Works and Head of Department in the Ministry of Internal Affairs. His 1902 marriage with the Duke's daughter proved to be a decisive connection for his career, as he intimately befriended the dynasty and was frequently sent as its representer on numerous European courts, because of his multi-linguistic capabilities. He actively worked until the general governmental structure was reformed by drafting a Constitution for the Montenegrin Princedom in 1905. From 6 December 1905 to 11 November 1906 he was both Minister of Finance and Construction in the reformist Government of Lazar Mijušković. Democratic Activities Andrija Radović ran in his Captainy on the 27 September 1906 parliamentary elections and was elected into the very first session of the Montenegrin National Assembly that was formed in the capital of Cetinje on 31 October 1906. On 19 January 1907 he was sworn Prime Minister of the Princedom of Montenegro and took the post of Minister of Foreign Affairs and acted as the Representative of both the Ministers of War and Finance. 1907 was a year of great turmoil for Radović. He worked actively in an attempt to limit Prince Nicholas' autocracy and united all members of the Serbian National Assembly of the Princedom of Montenegro into the \"Club of People's Representatives\" (Клуб народних представника), which quickly transformed under the influence of neighboring parliamentary democracy in Serbia into the People's Party (Народна странка/Narodna stranka), the first and sole Montenegrin political party. Andrija became one of its two leaders. The movement quickly became known as \"The Clubists\" (Клубаши). Radović rapidly lead the NS into opposition with the Monarch, demanding freedom, democracy and more rights to the people and that the Parliament should be the supreme holder of national sovereignty, and the not the…"} {"text": "[DE Wikipedia] Theodor von Malortie\n\nTheodor Georg Louis Emil von Malortie (* 1. März 1844 in Hannover; † 1930) war ein sächsischer Generalmajor, Wirklich Geheimer Rat und Oberhofmeister der Königin Carola von Sachsen. Leben Herkunft Theodor von Malortie war ein Mitglied des bereits seit dem ersten Drittel des 12. Jahrhunderts nachweisbaren und ursprünglich französischen Adelsgeschlechtes von Malortie, das nach der Aufhebung des Edikts von Nantes als Hugenotten aus Frankreich floh. Karriere Malortie besuchte das Lyzeum in Hannover und trat nach Ablegung der Reifeprüfung am 18. Februar 1862 als Volontär in die königlich-hannoversche Armee ein, wo er 1863 als Sekondeleutnant dem Garde-Regiment aggregiert wurde. Nach Teilnahme am Deutschen Krieg, wo er unter anderem bei der Schlacht bei Langensalza teilnahm, der mit einer Niederlage des Königreichs Hannover und dessen Annexion durch das Königreich Preußen endete, wurde die hannoversche Armee 1866 aufgelöst. Er wechselte daher am 1. April 1867 in die königlich-sächsische Armee und erhielt den Rang eines Oberleutnants mit dem Patent vom 30. Juli 1866 im Grenadier-Regiment „Kaiser Wilhelm, König von Preußen“ (2. Königlich Sächsisches) Nr. 101. Den Deutsch-Französischen Krieg machte er als Regimentsadjutant des Regiments mit, wobei er am 29. September 1870 für seine Verdienste bei der Schlacht bei Gravelotte, er konnte als einer der ersten in das Dorf Gravelotte eindringen und zahlreiche Verwundete aus einer brennenden Kirche retten, mit dem Ritterkreuz des Militär-St.-Heinrichs-Ordens ausgezeichnet wurde. Er beteiligte sich im weiteren Kriegsverlaufe bei den Schlachten um Verdun, Nouart, Beaumont, Sedan und der Belagerung von Paris. Nach Kriegsende und der Gründung des Deutschen Kaiserreiches diente er nach Beförderung zum Hauptmann am 1. Januar 1872 und Auszeichnung mit dem Eisernen Kreuz II. Klasse als Kompaniechef im Regiment. Nach weiterer Beförderung zum Major am 17. September 1882 wurde er zum Flügeladjutanten des regierenden sächsischen König Albert ernannt. 1887 wurde er von dieser Position entbunden und als Bataillonskommandeur des II. Bataillons im 1. Königlich Sächsischen Leib-Grenadier-Regiment Nr. 100 eingesetzt. Nachdem Malortie dann 1889 zum Oberstleutnant befördert worden war, wurde er in das 9. Königlich-Sächsische Infanterie-Regiment Nr. 133 versetzt und nach weiterer Beförderung zum Oberst am 23. Mai 1891 als Kommandeur des Infanterie-Regiment „Kronprinz“ (5. Königlich Sächsisches) Nr. 104 verwendet. Malortie wurde am 21. Februar 1895 zur Disposition gestellt und erhielt dabei den Charakter eines Generalmajors. Im Ruhestand wurde er zum Oberhofmeister der sächsischen Königin Carola von Sachsen ernannt und blieb dies bis zu ihren Tode im Jahre 1907. 1899 wurde ihm der Titel Wirklich Geheimer Rat verliehen. Einzelnachweise…"} {"instruction": "Create a table in SQL to store details about 1000 employers.", "input": "", "output": "CREATE TABLE employers ( id INTEGER PRIMARY KEY, name VARCHAR(100) UNIQUE NOT NULL, age INT NOT NULL, gender VARCHAR(50) NOT NULL, street_address VARCHAR(100) NOT NULL, city VARCHAR(100) NOT NULL, state VARCHAR(100) NOT NULL, zip_code INT NOT NULL, phone_number VARCHAR(25) UNIQUE NOT NULL );"} {"instruction": "Write code in Java to sort an array of integers in ascending order.", "input": "[5, 2, 8, 10, 4, 9]", "output": "public static void sortAscending(int[] arr) { for(int i = 0; i < arr.length - 1; i++) { int min = i; for (int j = i + 1; j < arr.length; j++) { if (arr[j] < arr[min]) { min = j; } } int tmp = arr[i]; arr[i] = arr[min]; arr[min] = tmp; } }"} {"text": "[HI Wikipedia] टीपू सुल्तान\n\nइतिहास के पन्नों में टीपू सुल्तान के नाम पर भले ही विवाद चली आ रही है किन्तु टीपू सुल्तान का नाम मिटा पाना असम्भव है। 20 नवंबर 1750 में कर्नाटक के देवनाहल्ली में जन्मे टीपू का पूरा नाम सुल्तान फतेह अली खान शाहाब था। उनके पिता का नाम हैदर अली और माँ का फकरुन्निसाँ था। उनके पिता मैसूर साम्राज्य के एक सैनिक थे लेकिन अपनी ताकत के बल पर वो 1761 में मैसूर के शासक बने। उनकी वीरता से प्रभवित होकर उनके पिता हैदर अली ने ही उन्हें शेर-ए-मैसूर के खिताब से नवाजा था। अंग्रेजों से मुकाबला करते हुए श्रीरंगपट्टनम की रक्षा करते हुए 4 मई 1799 को टीपू सुल्तान वीरगति को प्राप्त हो गए। जीवनी 18वीं शताब्दी के अन्तिम चरण में हैदर अली का देहावसान एवं टीपू सुल्तान का राज्याभिषेक मैसूर की एक प्रमुख घटना है। अपने पिता हैदर अली के पश्चात 1782 में टीपू सुल्तान मैसूर की गद्दी पर बैठे। अपने पिता की तरह ही वह भी अत्याधिक महत्वाकाँक्षी कुशल सेनापति और चतुर कूटनीतिज्ञ थे यही कारण था कि वह हमेशा अपने पिता की पराजय का बदला अंग्रेजों से लेना चाहते थे, अंग्रेज उनसे काफी भयभीत रहते थे। टीपू सुल्तान की आकृति में अंग्रेजों को नेपोलियन की तस्वीर दिखाई पड़ती थी। वह अनेक भाषाओं के ज्ञाता थे अपने पिता के समय में ही उन्होंने प्रशासनिक सैनिक तथा युद्ध विधा लेनी प्रारम्भ कर दी थी परन्तु उनका सबसे बड़ा अवगुण जो उनकी पराजय का कारण बना वह फ्रांसिसियों पर बहुत अधिक निर्भरता और भरोसा । वह अपने पिता के समान ही निरंकुश थे । वह कट्टर व धर्मान्त मुस्लमान थे। उनके चरित्र के सम्बन्ध में विद्वानों ने काफी मतभेद है। मैसूर में एक कहावत है कि हैदर साम्राज्य स्थापित करने के लिए पैदा हुए थे और टीपू रक्षा के लिए। कुछ ऐसे भी विद्वान है जिन्होंने टीपू सुल्तान के चरित्र की काफी प्रशंसा की है। वस्तुत: टीपू एक परिश्रमी शासक मौलिक सुधारक और अच्छे योद्धा थे। इन सारी बातों के बावजूद वह अपने पिता के समान कूटनीतिज्ञ एवं दूरदर्शी थे, यह उनका सबसे बड़ागुण था। टीपू का नाम उर्दू पत्रकारिता के अग्रणी के रूप में भी याद किया जाएगा, क्योंकि उनकी सेना का साप्ताहिक बुलेटिन उर्दू में था, यह सामान्य धारणा है कि जाम-ए-जहाँ नुमा, 1823 में स्थापित पहला उर्दू अखबार था। वह गुलामी को खत्म करने वाले पहले शासक थे। कुछ मौलवियों ने इस उपाय को थोड़ा बहुत बोल्ड और अनावश्यक माना। टीपू अपनी बन्दूकों से चिपक गए। उन्होंने पूरे जोश के साथ उस लाइन को लागू करने के फैसले को लागू कर दिया जिसमें उनके देश में प्राप्त स्थिति को इस उपाय की आवश्यकता थी। टीपू सुल्तान का सामन्तवाद के प्रति दृष्टिकोण अलग था। उन्होंने इसे एक बार में समाप्त कर दिया और नतीजा यह है कि आज भी कर्नाटक के किसान - विशेष रूप से पूर्व मैसूर क्षेत्र में - उत्तरी भारत के किसानों से अलग हैं। जमीन के टिलर टीपू के दिनों से ही अपनी पकड़ के मालिक थे। इस उपाय के परिणामस्वरूप, यह क्षेत्र में एक विकसित प्रान्त है। कर्नाटक के किसान भूमि मालिक हैं और उनके बेटों और बेटियों ने शिक्षा में अच्छा किया है। टीपू सुल्तान भी अपने राज्य के ब्राह्मण पुरोहितों के प्रति निष्ठावान थे और उनके सहयोग की माँग करते थे - यहाँ तक कि उनके द्वारा देवताओं के आशीर्वाद के लिए विशेष प्रार्थना करने का भी अनुरोध किया जाता था। 1791…"} {"instruction": "Write a Python program to generate a Markov chain given a text input.", "input": "Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, `and what is the use of a book,' thought Alice `without pictures or conversation?'", "output": "import random\n\ndef generateMarkov(text):\n words = text.split(' ')\n markovChain = {}\n\n for i in range(len(words) - 2):\n current = words[i]\n next = words[i + 1]\n if current in markovChain:\n if next in markovChain[current]:\n markovChain[current][next] += 1\n else:\n markovChain[current][next] = 1\n else:\n markovChain[current] = {next: 1}\n\n generatedText = \"\"\n current = random.choice(list(markovChain))\n generatedText += current\n\n for i in range(100):\n choices = markovChain[current]\n choices = [\n key for key, value in choices.items()\n for i in range(value)\n ]\n try:\n current = random.choice(choices)\n generatedText += \" \" + current\n except:\n break\n\n return generatedText\n\ntext = 'Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, `and what is the use of a book,' thought Alice `without pictures or conversation?'\n\nprint(generateMarkov(text))"} {"instruction": "Design a linear search algorithm in Python that returns the index of an item in an array.", "input": "arr = [1,2,3,4,5]", "output": "def linear_search(arr, target):\n \"\"\"\n Searches through a given input array to find the index of a provided target number.\n Returns -1 if the target number is not found.\n \"\"\"\n for i in range(len(arr)):\n if arr[i] == target:\n return i\n return -1"} {"instruction": "Generate Python code to evaluate a mathematical expression containing parentheses, addition and subtraction operations and numbers from 0-9.", "input": "2-(8-3)", "output": "def evaluate_expr(expr):\n # Reverse the expression \n expr = expr[::-1] \n \n # Stack to store integer values. \n values = [] \n \n # Stack to store operators. \n ops = [] \n \n # Traverse the given expression. \n i = 0\n while i < len(expr): \n # Current character is a whitespace, skip it. \n if expr[i] == ' ': \n i += 1\n continue\n # Current character is an opening \n # brace, push it to 'ops' \n elif expr[i] == '(': \n ops.append(expr[i]) \n # Current character is a number, push \n # it to stack for numbers. \n elif expr[i].isdigit(): \n val = 0\n # There may be more than one \n # digits in number. \n while (i < len(expr) and\n expr[i].isdigit()): \n val = (val * 10) + int(expr[i]) \n i += 1\n values.append(val) \n # Closing brace encountered, solve \n # entire brace. \n elif expr[i] == ')': \n while (not ops[-1] == '('): \n val2 = values.pop() \n val1 = values.pop() \n op = ops.pop() \n \n values.append(str(eval(val1 + op + val2))) \n # pop opening bracket. \n ops.pop() \n # Current character is an operator. \n else: \n # While top of 'ops' has same or \n # greater precedence to current \n # token, which is an operator. \n # Apply operator on top of 'ops' \n # to top two elements in values stack. \n while(len(ops) != 0 and\n not ops[-1] == '(' and\n not isHigherPrecedence(ops[-1], expr[i])): \n \n val2 = values.pop() \n val1 = values.pop() \n op = ops.pop() \n \n values.append(str(eval(val1 + op + val2))) \n # Push current token to 'ops'. \n ops.append(expr[i]); \n \n i += 1\n \n # Entire expression has been parsed at this \n # point, apply remaining ops to remaining \n # values. \n while len(ops) != 0: \n val2 = values.pop() \n val1 = values.pop() \n op = ops.pop() \n \n values.append(str(eval(val1 + op + val2))) \n \n # Top of 'values' contains result, return it. \n return values[-1]\n\ndef isHigherPrecedence(op1, op2): \n if (op1 == '+' or op1 == '-') and (op2 == '*' or op2 == '/'): \n return False\n else: \n return True\n\nif __name__ == \"__main__\": \n expr = \"2-(8-3)\"\n print(evaluate_expr(expr))"} {"text": "[HI Wikipedia] विश्व की मुद्राएँ\n\nविश्व की कुछ प्रमुख मुद्राएँ निम्नलिखित हैं:- अफगानी - अफगानिस्तान बहत - थाईलैंड बलोबा - पनामा बिर्र - इथियोपिया बोलिविर - वेनेजुएला बोलिवियानो - बोलिविया चेदी - घाना कोलोन - कोस्टारीका, अल साल्वाडोर क्राउन - चेक गणराज्य, डेनमार्क एस्तोनिया, आइसलैंड, नार्वे, स्वीडन दलासी - जाम्बिया मेसिडोनियन दीनार - मेसिडोनिया दीनार - अल्जीरिया, बहरीन, ईराक, जार्डन, कुवैत, ट्यूनिशिया, सर्बिया दिरहम - मोरक्को, संयुक्त अरब अमीरात डालर - एंटीगुआ और बारबडोस, आस्ट्रेलिया, बहामा, बेलिजी, बरमुडा, ब्रिटिश वर्जिन आइलैंड, ब्रुनेई, कनाडा, डोमेनिका, फिजी, गुआम, गयाना, हांगकांग, जमैका, लाइबेरिया, नामिबिया, न्यूजीलैंड, सिंगापुर, सूरीनाम, ताईवान, त्रिनिनाद और टुबैगो, अमरीका, जिम्बाबवे डांग - वियतनाम द्रामचा - (यूनान/ग्रीस अब युरो) द्राम - आर्मीनिया युरो युरोपियन संघ (एक संगठन; हर देश में वैध नहीं. युरोपिय संघ के सदस्य: आस्ट्रिया, बेल्जियम, फिनलैंड, फ्रांस (प्रशांत क्षेत्रों को छोड़कर अन्य स्थानों पर फ्रैंक), जर्मनी, ग्रीस या यूनान, आयरलैंड, ईटली, लक्जम्बर्ग, नीदरलैंड, पुर्तगाल, स्पेन. देश जिनमें युरो प्रयोग करने की वैधानिक संधि है: मोनाको, सैन मरीनो, वेटिकन सिटी. वे क्षेत्र जहाँ सिर्फ़ युरो प्रयोग किये जाते हैं: अंदोरा, मोंटीनिगरो और कोसोवो. वे मुद्रा जिनका युरो केप वर्दियन एस्क्यूडो,फ्रैंक, कैमरुन फ्रैंक, बल्गेरियाई लेव, एस्तोनिया का क्रोन, लिथुआनिया का लितास, बोस्निया हर्जोगोविना का फोरिन्त - हंगरी फ्रैंक स्विस फ्रैंक - स्वीटजरलैंड, गोरदे - हैती गिल्डर - अरुबा, किना - पापुआ न्यू गिनी किप - लाओस कोरुना - चेक गणराज्य, स्लोवाकिया क्वाचा - मलावी, जाम्बिया क्वन्जा - अंगोला क्यात - म्यानमार लेत - लातिविया लारी - जार्जिया लेक - अल्बानिया लेम्पीरा - होंदुरास लेउ - रुउमानिया, मोलदोवा लेव - बुल्गारिया लीरा - साईप्रस, माल्टा और तुर्की; (ईटली, सैन मरीनो, वेटिकन सिटी अब युरो) लितास - लिथुआनिया मनात - अज़रबाइजान, तुर्कमेनिस्तान मार्क - (जर्मनी अब युरो) मार्का - बोस्निया हर्जोगोविना मारका - (फिनलैंड अब युरो) नाफ्का - एरिशिया नाइरा - नाइजीरिया पेसो - आर्जेन्टीना, चीली, कोलोंबिया, क्यूबा, डोमेनिकन गणराज्य, मेक्सिको, फिलिपिंस, उरुग्वे पाउंड - साइप्रस, माल्टा, मिश्र, फाल्कन द्वीप, जिब्राल्टर, इंग्लैंड (आयरलैंड अब युरो) पुला - बोत्सवाना रैंड - दक्षिण अफ्रीका रियाल - ईरान, ओमान, यमन रियेल - कम्बोडिया रिंगित - मलेशिया रियाल - कतर, सऊदी अरब रूबल - बेलारूस, रूस रूफिया - मालदीव रुपया - भारत, मारिशस, नेपाल, पाकिस्तान, सेशेल्स, श्रीलंका, इंडोनेशिया शिलिंग - (आस्ट्रिया अब युरो) शेकेल - इजरायल, शिलिंग - कीनिया, सोमालिया, तंजानिया, युगांडा सोल - पेरू सोम - किरगिस्तान, उज़बेकिस्तान टाका - बांग्लादेश तेंगे - कज़ाकिस्तान तुगरिक - मंगोलिया तोलर - स्लोवानिया वोन - उत्तर कोरिया, दक्षिण कोरिया येन - जापान अर्थव्यवस्था"} {"instruction": "How would you create a content management system (CMS) in Python?", "input": "", "output": "import flask\nfrom flask import request, redirect, url_for, render_template\nfrom functools import wraps\n\napp = flask.Flask(__name__)\napp.config[\"DEBUG\"] = True\n\ndef login_required(f):\n @wraps(f)\n def decorated_function(*args, **kwargs):\n if \"username\" not in flask.session:\n return redirect(url_for(\"login\", next=flask.request.url))\n return f(*args, **kwargs)\n return decorated_function\n\n@app.route(\"/\")\n@login_required\ndef home():\n pages = [\n {\"title\": \"Python\", \"slug\": \"python\"},\n {\"title\": \"JavaScript\", \"slug\": \"javascript\"},\n {\"title\": \"HTML/CSS\", \"slug\": \"html-css\"}\n ]\n\n return render_template(\"cms.html\", pages=pages)\n\n@app.route(\"/login/\", methods=[\"GET\", \"POST\"])\ndef login():\n if request.method == \"POST\":\n flask.session[\"username\"] = request.form[\"username\"]\n return redirect(url_for(\"home\"))\n\n return render_template(\"login.html\")\n\n@app.route(\"/logout/\")\ndef logout():\n flask.session.pop(\"username\", None)\n return redirect(url_for(\"login\"))\n\napp.run()"} {"text": "[DE Wikipedia] Reichsamt des Innern\n\nDas Reichsamt des Innern (auch Reichsamt des Inneren) war ein oberstes Reichsamt im Deutschen Kaiserreich. Es hatte die Aufgaben eines Innenministeriums, wurde aber erst in der Weimarer Republik zum Reichsinnenministerium. Geschichte Auf Vorschlag des Reichskanzlers Otto von Bismarck ging es am 24. Dezember 1879 durch Erlass von Kaiser Wilhelm I. aus dem Reichskanzleramt hervor, dem ehemaligen Bundeskanzleramt (nicht zu verwechseln mit der Reichskanzlei, der Behörde des Kanzlers ab 18. Mai 1878). Wie die anderen Reichsämter auch, war es dem Reichskanzler unmittelbar unterstellt. Der Sitz des Amtes befand sich in Berlin, seine Leitung unterstand dem Staatssekretär des Innern, der von 1881 bis 1916 stets zusätzlich das Amt des Vizekanzlers innehatte. Im Oktober 1880 erhielt das Reichsamt des Innern eine besondere II. Abteilung für Handel und Gewerbe, genannt wirtschaftliche Abteilung, die tatsächlich die Aufgabe hatte, die Arbeiterversicherungsgesetzgebung vorzubereiten. Erster und langjähriger Abteilungsdirektor wurde Robert Bosse. Im Frühjahr 1894 wurde von der I. Abteilung eine neue III. Abteilung für wirtschaftliche Fragen abgezweigt, die 1900 wiederum geteilt wurde, sodass seit Mai 1900 vier Abteilungen bestanden, in denen 16 Vortragende Räte tätig waren. Mit dem Gesetz über die vorläufige Reichsgewalt vom 11. Februar 1919 wurde aus dem Reichsamt das Reichsministerium des Innern; so hieß es auch in der Weimarer Republik. Die Staatssekretäre des Reichsamts des Innern Das Reichsministerialblatt Das zum Zweck öffentlicher Bekanntmachungen herausgegebene Amtsblatt des Reichsamts war ab 1880 das Central-Blatt bzw. ab 1903 das Zentralblatt für das Deutsche Reich (ZBl, ), das von 1873 bis 1879 bereits vom Reichskanzleramt herausgegeben worden war. In dieser Funktion ließ ihm das Reichsministerium des Innern ab 1923 das Reichsministerialblatt (RMBl, ) folgen. Literatur Ernst Ritter (Bearb.): 100 Jahre Innenressort. Vom Reichsamt zum Bundesministerium. Bundesministerium des Innern, Bonn, 2., durchges. Aufl. 1981. Rudolf Morsey: Die oberste Reichsverwaltung unter Bismarck 1867-1890, Münster 1957. Florian Tennstedt: Ministerialbürokratie in Preußen und im Reich – ihr Anteil bei der Grundlegung der sozialpolitischen Gesetzgebung von 1869 bis 1911, in: Sozialstaat im Werden. Band 2: Schlaglichter auf Grundfragen, Stuttgart 2021, ISBN 978-3-515-13005-9, S. 11–55 Das alljährlich erschienene Handbuch für das Deutsche Reich auf das Jahr ... informiert über Aufgaben und Ämterbesetzung im Einzelnen. Weblinks Inneres Deutsches Reich Gegründet 1879 Wilhelmstraße (Berlin)"} {"instruction": "Create a Python program to make a copy of an array.", "input": "", "output": "\"\"\"\nCreate a Python program to make a copy of an array. \n\"\"\"\n\ndef copy_array(arr):\n return arr[:]\n\nif __name__ == '__main__':\n arr = [1,2,3,4,5]\n print(copy_array(arr))"} {"instruction": "Generate a random alphanumeric string of length 8 in Java.", "input": "", "output": "String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" + \"0123456789\" + \"abcdefghijklmnopqrstuvxyz\"; StringBuilder sb = new StringBuilder(8); for (int i = 0; i < 8; i++) { int index = (int)(AlphaNumericString.length() * Math.random()); sb.append(AlphaNumericString .charAt(index)); } String string8Length = sb.toString(); System.out.println(\"Random Alphanumeric String of length 8: \" + string8Length);"} {"instruction": "Write a MySQL query to select the name of the customer and the total sales made by each customer in a given month.", "input": "customers_table = 'customers'; sales_table = 'sales'; month = '04'; year = '2021';", "output": "SELECT customers.name, sum(sales.amount) as total_sales FROM customers INNER JOIN sales ON customers.customer_id = sales.customer_id WHERE MONTH(sales.date) = '04' AND YEAR(sales.date) = '2021' GROUP BY customers.name"} {"instruction": "Create a program in Python that can generate a random password of 8 characters.", "input": "", "output": "import random\nimport string\n \ndef generate_password():\n password_length = 8\n all_characters = string.ascii_letters + string.digits + string.punctuation\n password = \"\".join(random.choice(all_characters) for i in range(password_length))\n \n return password"} {"instruction": "Given a word, remove all the vowels from it in C.", "input": "", "output": "void remove_vowels(char *s) { for (int i = 0; s[i] != '\\0'; i++) { if (s[i] == 'a' || s[i] == 'A' || s[i] == 'e' || s[i] == 'E' || s[i] == 'i' || s[i] == 'I' || s[i] == 'o' || s[i] == 'O' || s[i] == 'u' || s[i] == 'U') { for (int j = i; s[j] != '\\0'; ++j) { s[j] = s[j+1]; } } } }"} {"instruction": "Create a neural network model in Python to classify a large data set with five distinct classes.", "input": "", "output": "# import libraries\nimport tensorflow as tf\nfrom tensorflow.keras import models\nfrom tensorflow.keras import layers\n\n# define the model\nmodel = models.Sequential()\nmodel.add(layers.Dense(units=64, activation='relu', input_dim=5)) \nmodel.add(layers.Dense(units=32, activation='relu'))\nmodel.add(layers.Dense(units=16, activation='relu')) \nmodel.add(layers.Dense(units=5, activation='softmax'))\n\n# compile and fit the model\nmodel.compile(loss='categorical_crossentropy', optimizer = 'adam', metrics=['accuracy'])\nmodel.fit(X_train, y_train, epochs=50, batch_size=32)"} {"text": "[EN Wikipedia] Cymolomia phaeopelta\n\nCymolomia phaeopelta is a moth of the family Tortricidae. It is found in Vietnam, Thailand, India, western Java and eastern Borneo. References Moths described in 1921 Olethreutini Moths of Asia Moths of Indonesia Insects of Borneo Taxa named by Edward Meyrick"} {"text": "[DE Wikipedia] Håkon Evjen\n\nHåkon Evjen (anglisiert: Haakon Evjen; * 14. Februar 2000 in Narvik) ist ein norwegischer Fußballspieler, der seit Januar 2023 beim dänischen Erstligisten Brøndby IF unter Vertrag steht. Der Flügelspieler ist seit November 2020 norwegischer Nationalspieler. Karriere Verein Evjen begann mit dem Fußballspielen beim FK Mjølner in seiner Heimatstadt Narvik und galt bereits in jungen Jahren als das größte Talent der Region. Mit 15 Jahren debütierte er in der ersten Mannschaft und bereits im Alter von 16 Jahren gehörte er zu den Leistungsträgern des Viertligisten und geriet so in den Fokus von höherklassigen Vereinen. Im September 2016 wechselte er in die Nachwuchsabteilung des Zweitligisten FK Bodø/Glimt. Bereits ein Jahr später unterzeichnete er bei den Nordnorwegern seinen ersten professionellen Vertrag, war aber weiterhin nur für die Reserve im Einsatz. Am 22. Oktober 2017 (28. Spieltag) debütierte er beim bereits aufgestiegenen Verein, als er beim 4:1-Auswärtssieg gegen den FK Jerv in der zweiten Halbzeit für Jens Petter Hauge eingewechselt wurde. In den zwei weiteren Ligaspielen der Saison 2017 kam er jeweils als Einwechselspieler zum Einsatz. In der weiteren Spielzeit 2018 etablierte er sich als Rotationsspieler bei Glimt. Am 27. Mai (12. Spieltag) erzielte er beim 4:0-Heimsieg gegen Ranheim Fotball sein erstes Tor im professionellen Fußball. In diesem Spieljahr kam er in 15 Ligaspielen zum Einsatz, in denen er einen Treffer erzielte. In der Saison 2018 gelang im in der höchsten norwegischen Spielklasse der Durchbruch. Zuerst gelang ihm der Durchbruch in der Startformation Glimts. Nach der Hinrunde hatte der Flügelspieler bereits vier Tore und drei Vorlagen am Konto und stand mit seinem Verein überraschend auf dem ersten Tabellenplatz. Am 5. August (16. Spieltag) markierte er beim 3:1-Auswärtssieg gegen Strømsgodset IF seinen ersten Doppelpack. In der Folge konnte Evjen seine Torausbeute weiter verbessern und knackte am 29. September beim 4:0-Heimsieg gegen Tromsø IL die Zehn-Tore-Marke. Das Spieljahr beendete Evjen mit 13 Toren und sechs Vorlagen in 29 Ligaspielen. Bereits im September 2019 wurde sein Wechsel zum niederländischen Ehrendivisionär AZ Alkmaar bekanntgegeben, wo zum Stichtag 1. Januar 2020 einen 4-1/2-Jahresvertrag antrat. Sein Ligadebüt bestritt er am 31. Januar 2020 (21. Spieltag) beim 4:0-Heimsieg gegen den RKC Waalwijk, als er in der 65. Spielminute für Calvin Stengs eingewechselt wurde. In dieser aufgrund der COVID-19-Pandemie verkürzten Saison 2019/20 bestritt er drei Ligaspiele. Nationalmannschaft Evjen repräsentierte sein Heimatland in diversen Juniorennationalmannschaften. Mit der U17 nahm er an der U17-Europameisterschaft 2017 in Kroatien teil. Im Jahr 2019 wurde er für den Kader der norwegischen U20-Auswahl zur…"} {"instruction": "Compose a Python program that reads in a string and finds the position of the longest alphabetical substring", "input": "\"abcbcd\"", "output": "def longest_alphabet(string):\n max_length = 0\n start_pos = 0\n \n for x in range(len(string)):\n current_start_pos = x\n current_length = 0\n for y in range(x, len(string)):\n if string[y] >= string[y-1]:\n current_length += 1\n else:\n break\n if current_length > max_length:\n max_length = current_length\n start_pos = current_start_pos\n return start_pos"} {"instruction": "Generate a new Python List containing all of the even numbers from a given list.", "input": "my_list = [2, 3, 4, 5, 6, 7, 8, 9]", "output": "my_list = [2, 3, 4, 5, 6, 7, 8, 9]\n\neven_list = [x for x in my_list if x % 2 == 0]\nprint(even_list)"} {"instruction": "Write a code block to return a random value from a given list", "input": "[1, 4, 8, 12]", "output": "#Return a random value from a given list import random def get_random_value(lst): n = random.randint(0, len(lst) - 1) return lst[n] test_list = [1, 4, 8, 12] random_value = get_random_value(test_list) print('Random value:', random_value)"} {"instruction": "Create a dictionary with three items of your choice", "input": "", "output": "{ 'apple': 'fruit', 'carrot': 'vegetable', 'sugar': 'sweetener' }"} {"instruction": "Suggest a way to improve the C++ program.", "input": "#include int main() { std::cout << \"Hello, World!\" << std::endl; return 0; }", "output": "#include int main() { std::cout << \"Hello, World!\" << std::endl; std::cout << \"This is a C++ program.\" << std::endl; return 0; }"} {"instruction": "Create an optimization function in Python that takes in a list of integers and finds the smallest number that is greater than all of the other numbers in the list.", "input": "[1, 2, 3, 4]", "output": "def optimize(arr):\n smallest = None\n \n for num in arr:\n if (smallest is None) or (num > smallest):\n smallest = num\n \n return smallest + 1\n\nx = [1, 2, 3, 4]\nresult = optimize(x)\n\nprint(result) # 5"} {"instruction": "Create a function in C++ that capitalizes the first letter of every word in a given string.", "input": "", "output": "#include #include std::string capitalize(std::string s) { std::string result; for (int i = 0; i < s.length(); i++) { if (i == 0 || s[i - 1] == ' ') result += toupper(s[i]); else result += s[i]; } return result; }"} {"text": "[EN Wikipedia] Tiger Mask W\n\nis a Tiger Mask anime series which premiered on October 2, 2016, with 38 episodes. It has a mix of 2D and 3D CGI animation. It is a sequel of the original anime, whereas Tiger Mask II is only considered a parallel universe. Plot Over forty years since Naoto Date mysteriously vanished after killing his arch-nemesis Tiger the Great in a brutal deathmatch, the Global Wrestling Monopoly (GWM) challenged the Zipangu Pro-Wrestling team and single-handedly destroyed them along with their manager Daisuke Fuji, who was brutally defeated by GWM's top fighter Yellow Devil. The incident drove two young members, Naoto Azuma, the main protagonist of the series, and his friend Takuma Fuji, son of Daisuke, to seek revenge on the GWM and the two parted ways. While Naoto trained under Kentaro Takaoka, Naoto Date's former ally, Takuma trained under the Tiger's Den, under the leadership of Mr. X, after being recruited by Yellow Devil under the pretence of giving him the chance for revenge. Three years later, Naoto has taken the identity of Tiger Mask and signed for New Japan Pro-Wrestling (NJPW) while Takuma has taken on the identity of Tiger the Dark under the Tiger's Den, with none of them being aware of the other's identity but sharing the same goal. The GWM, under the leadership of Miss X, sees the new Tiger Mask as a threat that must be eliminated to ensure their control over the wrestling world and sends their fighters in several schemes to destroy him. Tiger Mask trains with the help of his current trainer and the aid of several pro wrestlers to become a stronger fighter with the ultimate goal to fight and defeat Yellow Devil. Both he and Takuma have their first chance at the Masked Tournament hosted in Miss X's new Max Dome, their first step to conquering Japan, and hosting none other than Yellow Devil as one of the participants. Tiger Mask. with the advice of the Indian wrestler Mister Question, decides to develop his own signature technique and trains with his co-workers at NJPW to develop his technique. He eventually fights and defeats Takuma using an unperfected version of the move, and manages to face and defeat Yellow Devil but, much to his surprise, finds another man to have taken on its identity, leaving Naoto's and Takuma's quest inconclusive but with the revelation to Takuma that Tiger Mask is also looking after Yellow Devil. Takuma is eventually demoted to undergo the Tiger's Execution, which would make him a living punching bag, but decides to take the \"Hell in the Hole\" trial, an illegal wrestling match with several bets carrying a special chance which can restore him as a main fighter but at the risk of losing his life if he fails. The \"Hell in the Hole\" trial begins, with its participants being wrestlers defeated by Tiger Mask, including Odin,…"} {"instruction": "Generate a Python script for analyzing a given dataset. The script should output the number of rows and columns, the data type of each column, the average of all numeric columns, and the count of unique values present in the dataset.", "input": "Input \n\nTitanic Dataset\n\nPassengerId, Survived, Pclass, Name, Sex, Age, SibSp, Parch, Ticket, Fare, Cabin, Embarked\n1,0,3,\"Braund, Mr. Owen Harris\",male,22,1,0,A/5 21171,7.25,,S\n2,1,1,\"Cumings, Mrs. John Bradley (Florence Briggs Thayer)\",female,38,1,0,PC 17599,71.2833,C85,C\n3,1,3,\"Heikkinen, Miss. Laina\",female,26,0,0,STON/O2. 3101282,7.925,,S\n4,1,1,\"Futrelle, Mr. Jacques Heath\",male,35,1,0,113803,53.1,C123,S\n\nOutput:\nNumber of rows: 4\nNumber of columns: 12\nData type of columns: ['int', 'int', 'int', 'string', 'string', 'float', 'int', 'int', 'string', 'float', 'string', 'string']\nAverage of all numeric columns: 28.425\nUnique values count: {'PassengerId': 4, 'Survived': 2, 'Pclass': 3, 'Name': 4, 'Sex': 2, 'Age': 4, 'SibSp': 3, 'Parch': 3, 'Ticket': 4, 'Fare': 3, 'Cabin': 3, 'Embarked': 3}", "output": "import pandas as pd\n\n# Read the dataset\ndf = pd.read_csv('dataset.csv')\n\n# Get the number of rows and columns\nnum_rows, num_cols = df.shape\nprint('Number of rows: {}'.format(num_rows))\nprint('Number of columns: {}'.format(num_cols))\n\n# Get the data type of each column\ndata_types = df.dtypes.tolist()\nprint('Data type of columns: {}'.format(data_types))\n\n# Calculate the average of all numeric columns\nnumeric_columns = df.select_dtypes(include=['int64', 'float64']).columns.tolist()\navg = df[numeric_columns].mean().round(2)\nprint('Average of all numeric columns: {}'.format(avg))\n\n# Count the unique values for each column\nunique_values_count = {}\nfor col in df.columns:\n unique_values_count[col] = len(df[col].unique())\nprint('Unique values count: {}'.format(unique_values_count))"} {"instruction": "Construct a SQL query to find all customers with a first name of \"John\" and a city of \"New York\".", "input": "", "output": "SELECT * from customers WHERE first_name = 'John' AND city = 'New York';"} {"instruction": "Develop a SQL query to count the number of people who are born before 1992.", "input": "", "output": "SELECT COUNT(*) FROM people WHERE year_of_birth < 1992;"} {"instruction": "Write a python code to insert a new node at the head of a linked list", "input": "", "output": "# Node class class Node: # Function to initialise the node object def __init__(self, data): self.data = data # Assign data self.next = None # Initialize next as null # Linked List class class LinkedList: # Function to initialize head def __init__(self): self.head = None # Function to insert a new node at the beginning def insert_at_head(self, new_data): # Create a new node new_node = Node(new_data) # update the new nodes next to old head new_node.next = self.head # update head to new node self.head = new_node"} {"instruction": "Construct a JSON structure from its respective python dictionaries", "input": "a = { \"name\": \"John\", \"age\": 32 } b = { \"cars\": [\"Ford\", \"BMW\", \"Fiat\"] }", "output": "import json data = {**a, **b} json_data = json.dumps(data)"} {"instruction": "Edit the given code to add a function that calculates the area of a circle given its radius.", "input": "def circumference(r): '''Calculates the circumference of a circle given its radius''' return 2* PI * r", "output": "def circumference(r): '''Calculates the circumference of a circle given its radius''' return 2* PI * r def area(r): '''Calculates the area of a circle given its radius''' return PI * r * r"} {"instruction": "Write a JavaScript function to validate a given URL.", "input": "", "output": "function isValidURL(url) { const regex = /^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$/; return regex.test(url); }"} {"text": "[CS Wikipedia] Eönwë\n\nEönwë je postava J. R. R. Tolkiena objevující se především v knize Silmarillion. Eönwë je jedním z Maiar, a jedním z těch, kteří dobrovolně vstoupili na Ardu. Jako takový je společně s Ilmarë největší valinorský Maia, a jeho sílu ve zbrani nikdo v Ardě nepřekoná. Je praporečníkem Manwëho. Jeho nejdůležitější úlohou je přivítání Eärendila, když dosáhl břehů Amanu, kde ho pozdravil Eönwë ve chvíli, kdy se chtěl Eärendil vrátit zpět do Středozemě. Poté Valar vyhlásili Morgothovi válku, která se nazývá Velká válka a Válka hněvu. Eönwë jako nejsilnější a nejlepší bojovník Ardy byl kapitánem celého vojska Valar, které pochodovalo pod bílými praporci, a když doplulo do Středozemě, obloha se ozvučila Eönwëho trubkami. Morgoth byl v této válce svržen, Eönwë si vzal na starost silmarily z Morgothovy koruny a Morgoth sám byl vystrčen za Hradby noci. Před Eönwëm prosil za odpuštění Sauron zdrcený pádem Morgotha, ale Eönwë nemohl odpustit bytosti vlastního řádu, řádu Maiar, a nakázal mu odejít do Amanu před Valar. Také nechal naživu dva syny Feänora, kteří ukradli v noci z tábora silmarily. Ve Druhém věku přišel Eönwë mezi Númenorejce a učil je velikému poznání. Maiar fr:Ainur#Liste des Ainur pl:Majar#Eönwë"} {"instruction": "Based on the following list, create a dictionary of each name and their corresponding birth date.", "input": "names = [\"John\", \"Mary\", \"James\", \"Susan\"] birth_dates = [\"1992-12-24\", \"1979-05-17\", \"1995-08-15\", \"1985-04-10\"]", "output": "name_birthdate_dict = dict(zip(names, birth_dates)) print(name_birthdate_dict) # Output: {'John': '1992-12-24', 'Mary': '1979-05-17', 'James': '1995-08-15', 'Susan': '1985-04-10'}"} {"text": "[CS Wikipedia] Štěpán Leška\n\nŠtěpán Leška, (* 21. října 1757 Vrbovce – 25. února 1818 Kiskőrös) byl evangelický duchovní, superintendent, filolog, spisovatel a žurnalista. Život Po studiích působil jako varhaník a učitel evangelického sboru v Bratislavě. Roku 1784 odešel do Čech, kde působil jako farář sboru augsburského vyznání v Černilově a český superintendent a. v. Od roku 1798 byl kazatelem v Dunaegyházu u Pešti a následně v Malém Kéreši (Kiskörös). Přispíval do Puchmajerových almanachů a do Palkovičova Týdeníku. V letech 1783–1784 redigoval Prešpurské noviny. Překládal z němčiny a sbíral materiály pro Německo-český slovář, kteŕý odevzdal poději Dobrovskému. Roku 1825 vyšlo jeho lingvistické dílo Elenchus vocabulorum Europaeorum cumprimis Slavicorum Magyarici usus. Jeho manželka Rebeka byla básnířkou. Luteráni Superintendenti Čeští básníci Slovenští básníci Čeští protestantští duchovní Slovenští protestantští duchovní Narození v roce 1757 Narození 21. října Narození ve Vrbovcích Úmrtí v roce 1818 Úmrtí 25. února Muži"} {"instruction": "Using Python, write a program to calculate the sum (full addition) of two decimal numbers.", "input": "3.4, 2.6", "output": "def addDecimals(a, b):\n return a + b\n\nx = 3.4\ny = 2.6\nprint (addDecimals(x, y)) # 6.0"} {"instruction": "Create an Oracle SQL statement for finding the average cost of a product.", "input": "", "output": "SELECT AVG(cost) FROM product;"} {"text": "[EN Wikipedia] Matelo Ferret\n\nJean Pierre \"Matelo\" Ferret (1918 – 24 January 1989) (also spelled Matelot, Matlo and Matlow, surname also later spelled Ferré on occasion) was a French musette and gypsy jazz guitarist and composer. He was an associate of Django Reinhardt and the youngest brother of guitarists Baro and Sarane Ferret. He recorded with his own sextet in Paris in the 1940s and continued performing there, with occasional recording sessions, until his death in 1989. He was noted for a musical style that incorporated Russian and Hungarian influences and lived long enough to see a resurgence of interest in gypsy jazz in which he was recognised as one of the great surviving players of the genre. Two of his sons, Boulou and Elios Ferré, continue to play a more modern and individualistic form of gypsy jazz-based guitar music in Paris. Biography Matelo Ferret was the youngest of the three Ferret brothers, Gitan gypsies from Rouen, France who made their way to Paris and there made the acquaintance of Django Reinhardt in 1931. He was known by his French nickname \"Matelo,\" which meant \"sailor\". He replaced guitarist Gusti Malha alongside accordionist Émile Vacher and later played with Guérino, another well known accordionist. From 1931, the Ferret brothers Matelo, Baro and Étienne \"Sarane\" Ferret, and cousin René \"Challain\" Ferret, were favorite sidemen of Reinhardt. At that time, Django and his companions frequently played at the Russian cabarets in Paris, notably the Casanova and the Shéhérazade and, while Django moved away into a more jazz direction for the major part of his career, Matelo spent much of his subsequent time in the Russian cabarets and developed a unique guitar style incorporating many Russian and Romanian gypsy (Tzigane) elements as well as musette-style waltzes and jazz. After recording as a sideman on various sessions in the 1930s and early 40s, his first sessions under his own name were cut in 1944 (as \"Jean Ferret et son Sixtette\"); he recorded sporadically through the 1950s and 1960s (including notable guitar contributions to the famous \"Manouche Partie\" LP) and summed up his life's work with the 2-LP set Tziganskaïa recorded for Charles Delaunay in 1978 (re-released on CD along with 4 unrecorded waltzes by Django Reinhardt which Matelo recorded in 1960) on which he was accompanied by his son Boulou on rhythm guitar, along with cimbalom (a favourite instrument of the Tzigane gypsy style) and double bass. Matelo died of cancer on 24 January 1989, aged 70, a contemporary of Django who survived long enough to see the revival of interest in gypsy jazz and related music and to leave several modern filmed performances. Two of his sons Boulou and Elios Ferré continue to perform. A third son, Michel \"Sarane\" Ferré (nickname after his uncle Sarane Ferret), has…"} {"instruction": "Edit the code to delete the element with value 6 from the array.", "input": "int arr[] = {2, 4, 6, 8, 10}", "output": "// remove element at index 2 for (int i=2; i< arr.length-1; i++) arr[i] = arr[i+1]; // Reduce size of array by 1 int len = arr.length -1; int[] newarr = new int[len]; for (int i=0; i { if (err) { console.log('Failed to fetch user', err); return; } const userData = JSON.parse(res.body); // insert userData into database }); }"} {"instruction": "Create a Python script to filter a list and return all elements which are divisible by a given number (i.e. create a filter function).", "input": "num_list = [1, 2, 3, 4, 5, 6]\ndivisor = 2", "output": "def filter_list(num_list, divisor):\n return list(filter(lambda n: n % divisor == 0, num_list))\n\nnum_list = [1, 2, 3, 4, 5, 6]\ndivisor = 2\n\ndivisible_nums = filter_list(num_list, divisor)\nprint(divisible_nums) # [2, 4, 6]"} {"instruction": "Explain what the expression \"variadic functions\" means.", "input": "", "output": "A variadic function is a function that can accept a variable number of arguments. It is a type of function in which the number of arguments that is passed to the function can vary, thus giving it more versatility than a function with a fixed number of arguments."} {"text": "[EN Wikipedia] Old Sloatsburg Cemetery\n\nThe Old Sloatsburg Cemetery is located at the end of Richard Street in Sloatsburg, New York, United States. It began as the Sloat family cemetery with the burial of Revolutionary War casualty John Sloat in 1781. After a half-century of inactivity, it gradually was expanded to include 1,200 graves by the time of the last burial in 1949. Its landscaping reflects several different eras of cemetery design. In the late 20th century, it became neglected and abandoned other than a few family plots that were maintained by those families. Residents of Sloatsburg organized a cleanup effort in the mid-1990s, which led to the cemetery's listing on the National Register of Historic Places in 1999. It continues to be maintained as a community effort. Property The cemetery occupies a rectangular parcel in the western section of the village, south of Eagle Valley Road and a short distance west of NY 17. The land slopes slightly westward, to a wooded hillside to the west, with a drum-shaped rise in the east where the members of the Sloat family are buried. A gravel road from Eagle Valley leads into the northeast corner of the cemetery, leading first to a circle around the Sloat graves, then heading west to a smaller circle in the Waldron section of the cemetery, near the more recent gravesites, connecting with a dirt path from the end of Richards Road, the only other public access point. Three copses of trees are located throughout the otherwise open lot. The Sloat family's section is a raised area above grade at the cemetery's eastern boundary. There are 30 gravestones here, starting with John Sloat's in 1781. The rest date from 1838 onward. To its west is a section known as \"The Hill\", with 72 stones dating to 1852, probably the date it was opened. They are laid out in a strict grid pattern of plots. The gently undulating ground, winding roadway and groves show the influence of the mid-19th century Rural Cemetery Movement. Continuing westward, two sections expanded in the early 20th century maintain the grid pattern but are much more level. The westernmost section of the cemetery, named the Waldron section after a local funeral director who oversaw much of the graves dug here in the second quarter of the 20th century, has four mausolea typical of that era. One memorializes a teenage girl who died in 1933 as a \"martyr to the automobile age\". Some section terraces nearby may have been meant for future expansions. History In 1781, as the Revolutionary War wound down, John Sloat was accidentally shot and killed near the family home by one of the sentries his father had hired. He was buried on the knoll that is now the family's section of the cemetery. His infant son John D. Sloat would eventually become the first Governor of California. No other Sloats are known to…"} {"text": "[DE Wikipedia] Die letzte Metro\n\nDie letzte Metro (Originaltitel: Le Dernier Métro) ist ein französisches Filmdrama von François Truffaut aus dem Jahr 1980 mit Catherine Deneuve und Gérard Depardieu in den Hauptrollen. Handlung Zu Fotografien und kurzen Ausschnitten aus zeitgenössischen Filmdokumenten führt ein aus dem Off gesprochener Kommentar mit wenigen Sätzen in den zeitgeschichtlichen Hintergrund der Handlung ein: Paris im September 1942, die nördliche Hälfte Frankreichs ist von der deutschen Armee besetzt, im Pariser Straßenbild die Uniformen der deutschen Soldaten, vor den Kinos die Aushänge mit den Namen deutscher Schauspieler, Menschen, die laufen, um „die letzte Metro“ noch zu erreichen, damit sie vor der um 23 Uhr einsetzenden Ausgangssperre zu Hause ankommen. Von diesem realen Hintergrund wechselt der Kommentar direkt zum fiktiven Ort der nun einsetzenden Handlung: Am Théâtre Montmartre werde gerade ein neues Stück geprobt, aber, so behauptet der Kommentar, der Intendant des Theaters, Lucas Steiner, habe Frankreich verlassen müssen. Das Théâtre Montmartre ist nun der Ort, an dem die unterschiedlichsten Geschichten – solche alltäglicher Art und solche politischer Art – aufeinandertreffen: Von der Anbändelei der Kostümbildnerin Arlette mit der jungen Schauspielerin Nadine bis zu den Bedrohungen des Spielbetriebs durch Daxiat, den Chefredakteur einer antisemitischen Zeitschrift, von kleineren Schwarzmarkt-Geschäften bis zur Durchsuchung des Theaters durch Gestapo-Leute sowie zahlreiche weitere – teils anekdotische – Geschichten mehr. Im Zentrum aber stehen drei Figuren. Bald zeigt sich, dass Lucas Steiner, ein deutscher Jude, Frankreich nicht verlassen hat, sondern sich im Keller des Theaters versteckt hält. Und so ist es seine Frau Marion, die versucht, die Gefahren der politischen Lage und die menschlichen Komplikationen zu meistern und das Theater weiterzuführen. Bernard Granger, ein Frauenheld und bekannter Schauspieler und – wie sich herausstellt – Mitglied der Résistance, bekommt neben Marion Steiner die zweite Hauptrolle in dem neuen Theaterstück. Lucas Steiner kann durch seinen Verbleib im Keller des Theaters, von dem auch niemand aus dem Ensemble etwas ahnt, nicht mehr am sozialen Leben teilnehmen. Über das Radio und Zeitungen bekommt er mit, wie auch französische Antisemiten gegen den Einfluss der Juden auf die Kultur Frankreichs hetzen. Seine einzige Verbindung zur Außenwelt ist seine Frau Marion sowie ein kleiner Lüftungsschacht, durch den er das Geschehen auf der Bühne verfolgt. Sein Tagesablauf besteht nun ausschließlich darin, die gehörten Theaterproben auszuwerten und mit Marion zu besprechen und gegebenenfalls zu korrigieren. Dadurch gerät ihre Beziehung ins Wanken. Lucas bemerkt, dass die von Marion und Bernard gespielte Liebesszene nicht authentisch…"} {"instruction": "Create a Python script for creating an Excel spreadsheet with 2 sheets, one with a list of expenses and another one with a chart showing the total expenses.", "input": "Not applicable", "output": "import openpyxl\n\ndef createSpreadsheet(name):\n # Create an Excel workbook\n workbook = openpyxl.Workbook()\n\n # Set up the first sheet with the list of expenses\n expenseSheet = workbook.active\n expenseSheet.title = 'Expenses'\n expenseSheet.cell(row=1, column=1).value = 'Item'\n expenseSheet.cell(row=1, column=2).value = 'Amount'\n\n # Set up the second sheet with the chart of expenses\n chartSheet = workbook.create_sheet('Chart')\n chartSheet.add_data(expenseSheet['A2':'B4'],\n from_rows=True,\n titles_from_data=True)\n chartSheet.add_chart(openpyxl.chart.BarChart(), 'C1')\n\n # Save the workbook\n workbook.save(name + '.xlsx')"} {"instruction": "Generate a program to reverse a string in python.", "input": "", "output": "def reverse_string(string): \n return string[::-1]"} {"instruction": "Write a Python code snippet to calculate the average of the given numbers.", "input": "[5, 10, 15, 20, 25]", "output": "def calc_avg(nums):\n total = 0\n for n in nums:\n total += n\n \n return total/len(nums)\n \navg = calc_avg([5, 10, 15, 20, 25])\nprint(avg)"} {"text": "[EN Wikipedia] Austin K5\n\nThe Austin K5 was a British heavy military truck built by Austin for use during the Second World War. The K5 was used with open body and cab for carrying the Ordnance QF 6 pounder anti-tank gun portee in the North African Campaign or with an enclosed cab for General Service (GS). Enclosed body versions were used for salvage and rescue work in the UK. It was nicknamed the \"Screamer\" because of a rather noisy transfer case. References External links http://www.armyvehicles.dk/austink5.htm Military trucks of the United Kingdom Off-road vehicles World War II vehicles of the United Kingdom Soft-skinned vehicles K5 Military vehicles introduced from 1940 to 1944"} {"instruction": "Edit the code to add each item to a dictionary.", "input": "def add_to_dict(input_dict, key, value): return", "output": "def add_to_dict(input_dict, key, value): if key in input_dict: input_dict[key].append(value) else: input_dict[key] = [value] return input_dict"} {"instruction": "Write a JavaScript function to filter all numbers in an array and return a new array containing only the even numbers.", "input": "arr = [1, 2, 3, 4, 5, 6]", "output": "function evenNumbers(arr) { return arr.filter(num => num % 2 === 0); } evenNumbers(arr) # returns [2, 4, 6]"} {"instruction": "Write a Python function to display the current time, formatted such that it will read \"It is currently 11:15am\".", "input": "", "output": "import time\n\ndef display_time():\n time_string = time.strftime('%I:%M%p', time.localtime())\n return f'It is currently {time_string}'"} {"instruction": "Implement a thread pool in Java.", "input": "", "output": "import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class ThreadPool { private ExecutorService executor; public ThreadPool(int size) { this.executor = Executors.newFixedThreadPool(size); } public void submit(Runnable task) { this.executor.execute(task); } public void shutdown() { this.executor.shutdown(); } }"} {"instruction": "Design a web scraper using Python's BeautifulSoup library that extracts data from HTML sites.", "input": "Not applicable", "output": "#Import libraries \nimport requests \nfrom bs4 import BeautifulSoup \n\n#Make a request to the url \nurl = 'http://www.example.com'\n\nr = requests.get(url)\nsoup = BeautifulSoup(r.content, 'html.parser') \n\n#Extract data \ndata = [] \n\nfor x in soup.find_all('div', class_=\"data-cell\"): \n data.append(x.text.strip()) \n\n#Print the data \nprint(data)"} {"instruction": "What is the workflow of a deep learning project?", "input": "", "output": "The workflow of a deep learning project typically consists of the following steps: 1. Data Collection, Preparation and Analysis: Collecting and preparing the data for the project, including data exploration, feature engineering, and data cleaning. 2. Model Design & Training: Designing the architecture of the deep learning model and selecting the best hyperparameters that will lead to the highest possible performance on a given task. 3. Model Evaluation: Evaluating the performance of the model on test data to determine its accuracy. 4. Model Deployment: Deploying the model in the form of an application or service."} {"instruction": "Use the following HTML to create an unordered list.", "input": "
    • First item
    • Second item
    • Third item
    ", "output": "
    • First item
    • Second item
    • Third item
    "} {"instruction": "Write a Python program to parse incoming JSON data and store it in a database.", "input": "{\n \"name\": \"John\",\n \"age\": 30,\n \"job\": \"Software Engineer\"\n}", "output": "import json\nimport sqlite3\n\ndata = {'name': 'John', 'age': 30, 'job': 'Software Engineer'}\n\nwith sqlite3.connect(\"database.db\") as con:\n cur = con.cursor()\n cur.execute(\"CREATE TABLE IF NOT EXISTS people(name TEXT, age INTEGER, job TEXT)\")\n cur.execute(\"INSERT INTO people (name, age, job) VALUES (?, ?, ?)\", (data['name'], data['age'], data['job']))\n con.commit()"} {"text": "[DE Wikipedia] Prowers County\n\nDas Prowers County ist ein County im Osten des US-Bundesstaats Colorado. Der Verwaltungssitz (County Seat) ist die größte Stadt des Countys, Lamar. Geographie Das County liegt im Südosten Colorados an der Grenze zum US-Bundesstaat Kansas. Im Norden grenzt das Kiowa County, im Süden Baca County an Prowers County. Im Osten liegen die Countys Hamilton und Stanton (beide Kansas). Der American Discovery Trail und der Santa Fe Trail verlaufen durch das County-Gebiet. Geschichte Das County ist nach John W. Prowers benannt, einem Pionier, der das untere Tal des Arkansas erkundete. Es entstand 1889 aus der Teilung des Bent County. 1942 wurde bei Granada das Internierungslager Granada War Relocation Center errichtet. Demografische Daten Nach der Volkszählung im Jahr 2000 lebten im County 14.483 Menschen. Es gab 5307 Haushalte und 3725 Familien. Die Bevölkerungsdichte betrug 3 Einwohner pro Quadratkilometer. Ethnisch betrachtet setzte sich die Bevölkerung zusammen aus 78,57 Prozent Weißen, 0,30 Prozent Afroamerikanern, 1,22 Prozent amerikanischen Ureinwohnern, 0,37 Prozent Asiaten, 0,03 Prozent Bewohnern aus dem pazifischen Inselraum und 17,17 Prozent aus anderen ethnischen Gruppen; 2,34 Prozent stammten von zwei oder mehr Ethnien ab. 32,91 Prozent der Gesamtbevölkerung waren spanischer oder lateinamerikanischer Abstammung. Von den 5307 Haushalten hatten 37,4 Prozent Kinder und Jugendliche unter 18 Jahre, die bei ihnen lebten. 54,6 Prozent waren verheiratete, zusammenlebende Paare, 10,9 Prozent waren allein erziehende Mütter. 29,8 Prozent waren keine Familien. 25,4 Prozent waren Singlehaushalte und in 11,5 Prozent lebten Menschen im Alter von 65 Jahren oder darüber. Die Durchschnittshaushaltsgröße betrug 2,67 und die durchschnittliche Familiengröße lag bei 3,21 Personen. Auf das gesamte County bezogen setzte sich die Bevölkerung zusammen aus 30,0 Prozent Einwohnern unter 18 Jahren, 10,7 Prozent zwischen 18 und 24 Jahren, 26,5 Prozent zwischen 25 und 44 Jahren, 20,2 Prozent zwischen 45 und 64 Jahren und 12,6 Prozent waren 65 Jahre alt oder darüber. Das Durchschnittsalter betrug 32 Jahre. Auf 100 weibliche Personen kamen 101,0 männliche Personen, auf 100 Frauen im Alter ab 18 Jahren kamen statistisch 98,7 Männer. Das jährliche Durchschnittseinkommen eines Haushalts betrug 29.935 USD, das Durchschnittseinkommen der Familien betrug 34.202 USD. Männer hatten ein Durchschnittseinkommen von 24.971 USD, Frauen 20.526 USD. Das Prokopfeinkommen betrug 14.150 USD. 19,5 Prozent der Bevölkerung und 14,5 Prozent der Familien lebten unterhalb der Armutsgrenze. Darunter waren 27,1 Prozent der Bevölkerung unter 18 Jahren und 13,9 Prozent der Einwohner ab 65 Jahren. Sehenswürdigkeiten 16 Bauwerke, Stätten und historische Bezirke (Historic Districts) im Montezuma County sind im…"} {"instruction": "Suggest a way to debug these lines of code.", "input": "// code int i = 0; while (i<10) { i++; System.out.println(\"Something is wrong!\"); }", "output": "One way to debug these lines of code is to add print statements before and after the loop to print the value of \"i\" both before and after the loop. Then, inside the loop, you can print out the value of \"i\" just before the ``println`` statement and you can also print out the value of ``i`` after the loop is exited. This will help you see which iteration is causing the issues."} {"instruction": "Evaluate the following Python program and determine its output.", "input": "arr = [20, 35, 10, 47]", "output": "[20, 35, 10, 47]"} {"instruction": "Use the requests library to write a Python program that sends an HTTP GET request.", "input": "url = \"http://example.com\"", "output": "import requests response = requests.get(url)"} {"instruction": "Develop a Python class for handling the API calls.", "input": "", "output": "class APIHandler: def __init__(self, base_url, api_key): self.base_url = base_url self.api_key = api_key def get(self, endpoint): response = requests.get(self.base_url + endpoint) return response def post(self, endpoint, data): headers = {'Authorization': 'Bearer ' + self.api_key} response = requests.post(self.base_url + endpoint, headers=headers, data=data) return response"} {"instruction": "Generate a machine learning model in Python to predict prices from the provided dataset.", "input": "", "output": "# Load data\nimport pandas as pd\ndf = pd.read_csv('data.csv')\n\n# Extract features and target\nX = df.drop('price', axis=1).values\ny = df['price'].values\n\n# Split into train and test \nfrom sklearn.model_selection import train_test_split\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Train machine learning model\nfrom sklearn.linear_model import LinearRegression\nregressor = LinearRegression()\nregressor.fit(X_train, y_train)\n\n# Generate predictions\ny_pred = regressor.predict(X_test)"} {"instruction": "Create a list comprehension in Python that takes a list of numbers and squares each number in the list.", "input": "[1, 2, 3, 4, 5]", "output": "[x**2 for x in [1, 2, 3, 4, 5]]"} {"text": "[DE Wikipedia] Grundwasserwerk Lobau\n\nDas Grundwasserwerk Lobau in der Unteren Lobau in Wien wurde zwischen 1964 und 1966 errichtet und wird zur Abdeckung von Verbrauchsspitzen in der Trinkwasserversorgung eingesetzt. Das Wasserwerk Lobau ist in der Lage, 80.000 Kubikmeter Trinkwasser pro Tag zu liefern. Vorgeschichte Der steigende Wasserverbrauch der Stadt Wien (1935: 95 Millionen Kubikmeter, 1965: 170 Mio. Kubikmeter Wasser) zwang die Verantwortlichen, die verschiedensten Maßnahmen zu setzen, um die Versorgung der Bevölkerung Wiens mit Trinkwasser zu sichern. So wurden zusätzliche Quellen gefasst und ins Leitungsnetz eingespeist und neue Behälter errichtet. Die Realisierung des geplanten Baues der 3. Wiener Wasserleitung wurde immer wieder verzögert, so dass die Wiener Wasserwerke auf dem Stadtgebiet gelegene Grundwassergebiete auf ihre Qualität und Ergiebigkeit untersuchten. Die Resultate waren aber nicht zufriedenstellend, so dass man als letzte Möglichkeit das Gebiet der Unteren Lobau – umschlossen von Donau, Donau-Oder-Kanal und Wiener Stadtgrenze – untersuchte. Dieses etwa 1.200 Hektar große Gebiet wurde auf Antrag der Wasserwerke 1960 zum Wasserschutzgebiet erklärt. Untersuchungen Um die zur Verfügung stehende Wassermenge, deren Qualität und die zu erwartende Dauerergiebigkeit zu ermitteln, waren Pumpversuche über den Zeitraum von mehreren Monaten nötig. Die dafür notwendige Genehmigung erhielt die Stadt Wien im Februar 1961. 1963 kam es nach immer wieder erfolgten Pumpversuchen bei gleichzeitiger Beobachtung der Wasserqualität, der geologischen und hydrologischen Verhältnisse und deren Veränderungen im Dezember zur entscheidenden wasserrechtlichen Verhandlung. Besonders beachtet mussten dabei der Ölhafen Lobau und das Zentraltanklager werden, die während des Zweiten Weltkriegs heftig bombardiert worden waren, was zu starken Verunreinigungen des Untergrunds durch Öl geführt hatte. Die Öl verarbeitende Industrie verlangte eine Ablehnung des städtischen Projekts, doch die Oberste Wasserrechtsbehörde wies diese Forderung als rechtlich und sachlich unbegründet zurück. Bau Die Baugenehmigung erteilte der Gemeinderat am 20. März 1964, die Baustelleneinrichtung erfolgte am 6. April des gleichen Jahres. Errichtet wurden ein Wasserbehälter mit 30.000 Kubikmeter Fassungsraum, ein Hebewerk und ein Betriebsgebäude. Um das Grundwasserwerk Lobau mit den drei Horizontalfilterbrunnen (Groß Rohrwörth, Alter Kreuzgrund und Gänshaufen) an das Leitungsnetz anschließen zu können, wurde eine Rohrleitung von insgesamt 12.140 Metern Länge errichtet (Durchmesser 1.000 beziehungsweise 1.200 Millimeter), durch die das Wasser in etwa 3,25 Stunden das Rohrnetz der Stadt erreicht. Der Brunnen Gänshaufen ist mit fast vier Kilometern am weitesten vom Hebewerk entfernt. Verzögert wurden die Bauarbeiten durch…"} {"instruction": "Create a function that returns the maximum element of a given list.", "input": "Given List: [3, 12, 2, 6, -9]", "output": "def max_val(list): max_val = list[0] for i in range(len(list)): if list[i] > max_val: max_val = list[i] return max_val"} {"instruction": "Create a code to rotate an array to the right by k steps.", "input": "arr = [1,2,3,4,5], k = 3", "output": "\"\"\" Function rotate array to the right by k steps \"\"\" const rotateArray = (arr, k) => { let rotatedArray = [...arr] // Create a shallow copy of the array for (let i = 0; i < k; i++) { let lastElement = rotatedArray.pop() rotatedArray.unshift(lastElement) } return rotatedArray } console.log(rotateArray(arr, k)) // [3,4,5,1,2]"} {"instruction": "Create a MySQL query to get the item names and their respective prices from the table \"Orders\".", "input": "", "output": "SELECT ItemName, ItemPrice FROM Orders;"} {"instruction": "What is a state machine in software engineering?", "input": "", "output": "A state machine in software engineering is a model of computation used to design programs and algorithms that have an input, a process, and an output. A state machine is built from a set of states, any of which can be the current state at any given time, and it transitions from one state to another in reaction to events or inputs. The process of the state machine is the set of predefined operations associated with each state and the set of transitions that dictate how the state machine moves from one state to another."} {"instruction": "You should write a MySQL command to count how many records in the table \"users\".", "input": "", "output": "SELECT COUNT(*) FROM users;"} {"text": "[CS Wikipedia] Greta Johanssonová\n\nAnna Teresa Margareta „Greta“ Johanssonová (9. ledna 1895 Stockholm, Švédsko – 28. ledna 1978 San Mateo, Kalifornie, USA) byla švédská reprezentantka ve skocích do vody a plavání. V roce 1912 se na olympijských hrách ve Stockholmu stala vítězkou ve skocích z desetimetrové věže. Na stejných hrách startovala také jako členka švédské štafety na 4×100 metrů volným způsobem. V roce 1912 emigrovala do Spojených států amerických. Zde se provdala za švédského skokana do vody Ernsta Brandstena. Externí odkazy Švédské plavkyně Švédští skokani do vody Švédské olympijské vítězky Olympijské vítězky ve skocích do vody Švédští emigranti a exulanti Narození v roce 1895 Narození 9. ledna Narození ve Stockholmu Úmrtí v roce 1978 Úmrtí 28. ledna Úmrtí v Kalifornii Ženy"} {"instruction": "Build a Naive Bayes classifier in Python.", "input": "", "output": "import numpy as np\n\nclass NaiveBayesClassifer():\n\n def __init__(self, x, y):\n self.x = x\n self.y = y\n self.classes = np.unique(y)\n\n def fit(self):\n n_samples, n_features = self.x.shape\n self.class_priors = np.zeros(len(self.classes))\n\n self.means, self.stds = [], []\n\n # calculate class prior probability\n for i, c in enumerate(self.classes):\n x_class = self.x[self.y == c]\n self.class_priors[i] = x_class.shape[0]/float(n_samples)\n # sample mean and std for each feature\n self.means.append(x_class.mean(axis=0))\n self.stds.append(x_class.std(axis=0))\n\n def predict(self, X):\n prediction = []\n for x in X:\n posteriors = []\n for i, c in enumerate(self.classes):\n # calculate prior probability\n prior = np.log(self.class_priors[i])\n # calculate conditional probability\n posterior = np.sum(np.log(self.pdf(x, self.means[i], self.stds[i])))\n posteriors.append(prior + posterior)\n\n # print posteriors\n prediction.append(self.classes[np.argmax(posteriors)])\n return prediction\n\n # calculate probability density function\n def pdf(self, x, mean, std):\n # probabilities\n probabilities = (1/(np.sqrt(2*np.pi)*std))*(np.exp((-(x-mean)**2)/(2*std**2)))\n return probabilities"} {"instruction": "Make an executable Bash shell script to print the factorial of a given number.", "input": "", "output": "#!/bin/bash # Print factorial of a given number echo \"Please enter a number:\" read num factorial=1 for (( i=1; i<=num; i++ )) do factorial=$[ $factorial * $i ] done echo \"$num!=$factorial\""} {"instruction": "This program needs an array containing the first 10 numbers of the Fibonacci sequence.", "input": "", "output": "let fibonacci = [0, 1]; let x = 0; let y = 1; for (let i = 1; i < 10; i++) { let z = x + y; x = y; y = z; fibonacci.push(z); }"} {"instruction": "Suggest a suitable language for developing iOS mobile applications.", "input": "", "output": "A suitable language for developing iOS mobile applications is Swift. Swift is an Apple-developed language which is optimized for performance, and is capable of providing a great user experience on iOS devices."} {"instruction": "Create a Python script to calculate the Fibonacci numbers up to a given number.", "input": "", "output": "def Fibonacci(n): \n\tif n==0: \n\t\treturn 0\n\tif n==1: \n\t\treturn 1\n\telse: \n\t\treturn Fibonacci(n-1)+Fibonacci(n-2)"} {"instruction": "Write a Python function to return an array of adjacent (horizontal and vertical) numbers of a given two-dimensional array.", "input": "[[1, 2, 3], [4, 5, 6], [7, 8, 9]]", "output": "def adjacent_numbers(array): # Create a set of all possible adjacent numbers # and add each array element to the set adjacent_set = set() for sublist in array: for element in sublist: adjacent_set.add(element) # Iterate over each array element and its neighbours for i in range(len(array)): for j in range(len(array[0])): # Check if the neighbour (left, right, top, bottom) exists if i+1 < len(array): adjacent_set.add(array[i+1][j]) if i-1 >= 0: adjacent_set.add(array[i-1][j]) if j+1 < len(array[0]): adjacent_set.add(array[i][j+1]) if j-1 >= 0: adjacent_set.add(array[i][j-1]) # Remove the original elements from the set for elem in array: for a in elem: adjacent_set.remove(a) return list(adjacent_set)"} {"instruction": "Create a program in Python that prints the Fibonacci Series up to N terms, where N is a user-input number.", "input": "", "output": "def fibonacci_series(N):\n a = 0\n b = 1\n \n if N < 0:\n print(\"Incorrect input\")\n elif N == 0:\n print(\"Series up to 0 terms: \")\n else:\n print(\"Series up to\", N,\"terms:\")\n \n for i in range(0, N):\n print(a, end=\" \")\n c = a + b\n a = b\n b = c\n\nN = int(input(\"Enter a number: \"))\nfibonacci_series(N)"} {"instruction": "Write a SQL query that returns all the distinct values in a given table.", "input": "table: Employees", "output": "SELECT DISTINCT * FROM Employees;"} {"text": "[DE Wikipedia] Hélène Huby\n\nHélène Huby (* 2. Hälfte des 20. Jahrhunderts) ist eine französische Unternehmerin auf dem Gebiet der Raumfahrt. Leben Huby studierte Mathematik und Wirtschaftswissenschaft an der École normale supérieure. Huby arbeitete zunächst im Politik- und Mediensektor. Sie war stellvertretende Leiterin der Abteilung für europäische Angelegenheiten im französischen Ministerium für Wissenschaft und Forschung. Dann wechselte sie für vier Jahre zu Fabernovel. Hier spezialisierte sie sich auf digitale Innovationen. Ab 2013 arbeitete sie bei der Airbus Defence and Space, von 2015 bis 2018 in der Ariane-Gruppe. Dort hatte sie hohe Positionen im Management inne. Sie war Vice President Orion European Services und Innovationsleiterin. The Exploration Company 2021 gründete Huby das deutsch-französische Unternehmen „The Exploration Company“, deren CEO sie ist. Diese Firma soll in naher Zukunft wiederverwendbare und wiederbetankbare Raumkapseln herstellen für Flüge in die Erdumlaufbahn, zu Raumstationen und zum Mond. Es soll das Monopol der Firma SpaceX auf diesem Gebiet brechen und ihr eine europäische Alternative gegenüber stellen. Bis Anfang 2023 gelang es Huby finanzielle Unterstützung für ihre Firma in Höhe von mehr als 40 Millionen Euro einzusammeln. Zur Zeit entwickelt die Exploration Company die wiederverwendbare und wiederbetankbare Raumkapsel Nyx. Diese soll Fracht und Menschen zu Raumstationen und zum Mond transportieren. Es soll möglich sein, diese Kapsel im Weltraum mit Biomethan zu betanken. Außerdem soll sie für die Beförderung mit unterschiedlichen Raketen geeignet sein. Noch im Jahr 2023 soll ein erster Prototyp dafür vorliegen. Die Exploration Company wählte als Firmensitz Weßling aus. Dieser Standort wurde ausgewählt, weil er in der Nähe der Technischen Universität München, des Deutschen Zentrums für Luft- und Raumfahrt in Oberpfaffenhofen und zahlreicher Luft- und Raumfahrt- sowie Software-Firmen gelegen ist. Die Firma listet auf ihrer Teamseite 39 Mitarbeiter auf, die meisten davon Ingenieure. Vertrag mit der ESA Am 29. Mai 2023 erhielt die Exploration Company von der Europäischen Weltraumorganisation (ESA) den Auftrag, Lösungen für künftige europäische Einweg- und wiederverwendbare Raumschiffe zu untersuchen, die Mikro-/Mini-, mittlere, schwere und bemannte Anwendungen abdecken. Insgesamt vergab die ESA zu diesem Thema vier Aufträge. Die anderen drei gingen an die Firmen ArianeGroup, Avio und SENER. Diese vier Aufträge sollen zur Verwirklichung der Vision 2030+ der ESA beitragen, die 2021 initiiert wurde. Sie zielt auf die Schaffung kleiner, mittlerer und schwerer Versorgungsraumschiffe, die auf einem gemeinsamen Sortiment wiederverwendbarer, standardisierter Module aufbauen. Weitere Aktivitäten Huby ist Vorsitzende und Gründerin von Urania Ventures.…"} {"instruction": "Build an AI assistant in Python for playing the game \"Tic-Tac-Toe\".", "input": "", "output": "# Define the board size \nBOARD_SIZE = 3 \n\n# Define the player moves \nPLAYER_X = 'X' \nPLAYER_O = 'O'\n\n# Define the empty cell \nEMPTY = ' '\n\n# Create a list to represent the board \nboard = [] \nfor i in range(BOARD_SIZE): \n row = [EMPTY] * BOARD_SIZE \n board.append(row)\n\n# Function to check the game status \ndef check_game_status(): \n # Check if the player has won \n if check_win(PLAYER_X): \n return \"X won!\" \n elif check_win(PLAYER_O): \n return \"O won!\" \n # Check if the game is a draw \n elif check_draw(): \n return \"Draw!\"\n # If the game is not over yet \n else:\n return \"Game in progress...\"\n\n# Function to check the winning condition \ndef check_win(player): \n # Check if the player has won in a row \n for row in board: \n if row.count(player) == BOARD_SIZE: \n return True\n # Check if the player has won in a column \n for col in range(BOARD_SIZE): \n if board[0][col] == board[1][col] == board[2][col] == player: \n return True \n # Check if the player has won in a diagonal \n if board[0][0] == board[1][1] == board[2][2] == player: \n return True \n if board[0][2] == board[1][1] == board[2][0] == player: \n return True\n # Return false if the player did not win \n return False \n\n# Function to check if the game is a draw \ndef check_draw(): \n for row in board: \n for cell in row: \n if cell == EMPTY: \n return False \n return True"} {"instruction": "Create an algorithm to determine if two strings are rotations of each other.", "input": "\"abcde\", \"eabcd\"", "output": "def is_rotation(str1, str2): return len(str1) == len(str2) and str2 in str1+str1"} {"text": "[EN Wikipedia] Deuce Carter\n\nDeuce Carter (born 28 September 1990) is a Jamaican athlete competing in the sprint hurdles. He represented his country at the 2016 Summer Olympics reaching the semifinals. His personal best in the 110 metres hurdles is 13.20 seconds (+0.2 m/s) set in Kingston in 2016. Competition record References 1990 births Living people Jamaican male hurdlers Athletes (track and field) at the 2016 Summer Olympics Olympic athletes for Jamaica"} {"instruction": "Rewrite the following JavaScript code in Python:\n\nfor (let i = 1; i <= 10; i++) {\n console.log(i);\n}", "input": "Not applicable", "output": "for i in range(1, 11):\n print(i)"} {"instruction": "Given a list of numbers, write a Python program to compute the average of all numbers.", "input": "[10, 20, 45, 60]", "output": "def compute_average(numbers):\n sum = 0\n for number in numbers:\n sum += number\n return sum/len(numbers)\n\nnumbers = [10, 20, 45, 60]\nresult = compute_average(numbers)\nprint(result)\n\n# Output:\n31.25"} {"instruction": "Write a code in Python for computing the edit distance between two strings.", "input": "", "output": "def edit_distance(str1, str2):\n m = len(str1)\n n = len(str2)\n\n dp = [[ 0 for x in range(n+1)] for x in range(m+1)]\n\n for i in range(m+1):\n for j in range(n+1):\n if i == 0:\n dp[i][j] = j\n elif j == 0:\n dp[i][j] = i\n elif 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-1][j], dp[i][j-1], dp[i-1][j-1])\n \n return dp[m][n]"} {"instruction": "Create a variable in Python and assign it the value 15.", "input": "", "output": "num = 15"} {"instruction": "Write code to find the powers of two in a given range.", "input": "Range: 0 to 20", "output": "def powers_of_two(start, end): powers = [] current_power = 1 while current_power < end: if current_power >= start: powers.append(current_power) current_power *= 2 return powers"} {"instruction": "Optimize a Python algorithm to find the greatest 2 numbers from a 10000 integers list.", "input": "myList = [1, 5, 3, 7, 4, 7, 8, 9, 2, 10, 6, 8]", "output": "def get_greatest_2(items):\n max1 = max2 = float('-inf')\n for item in items:\n if item > max1:\n max1, max2 = item, max1\n elif item > max2:\n max2 = item\n return max1, max2\n\nmyList = [1, 5, 3, 7, 4, 7, 8, 9, 2, 10, 6, 8]\nprint('The greatest 2 numbers from the array:', get_greatest_2(myList))\n\nOutput:\nThe greatest 2 numbers from the array: (9, 8)"} {"instruction": "Write a Java program to read in a list of integers and separate them into two lists of even and odd numbers.", "input": "[1, 4, 6, 7, 8, 10, 12]", "output": "List even = [4, 6, 8, 10, 12] List odd = [1, 7]"} {"text": "[HI Wikipedia] दक्षिण कोरिया\n\nदक्षिण कोरिया (कोरियाई: 대한민국 (देहान मिंगुक), 大韓民國 (हंजा)), पूर्वी एशिया में स्थित एक देश है जो कोरियाई प्रायद्वीप के दक्षिणी अर्धभाग को घेरे हुए है। 'शान्त सुबह की भूमि' के रूप में ख्यात इस देश के पश्चिम में चीन, पूर्व में जापान और उत्तर में उत्तर कोरिया स्थित है। देश की राजधानी सियोल दुनिया का दूसरा सबसे बड़ा महानगरीय क्षेत्र और एक प्रमुख वैश्विक नगर है। यहां की आधिकारिक भाषा कोरियाई है जो हंगुल और हंजा दोनो लिपियों में लिखी जाती है। राष्ट्रीय मुद्रा वॉन है। उत्तर कोरिया, इस देश की सीमा से लगता एकमात्र देश है, जिसकी दक्षिण कोरिया के साथ २३८ किलिमीटर लम्बी सीमा है। दोनो कोरियाओं की सीमा विश्व की सबसे अधिक सैन्य जमावड़े वाली सीमा है। साथ ही दोनों देशों के बीच एक असैन्य क्षेत्र भी है। कोरियाई युद्ध की विभीषिका झेल चुका दक्षिण कोरिया वर्तमान में एक विकसित देश है और सकल घरेलू उत्पाद (क्रय शक्ति) के आधार पर विश्व की तेरहवीं और सकल घरेलू उत्पाद (संज्ञात्मक) के आधार पर पन्द्रहवीं सबसे बड़ी अर्थव्यवस्था है।कोरिया मे १५ अंतराष्ट्रीय बिमानस्थल है और करीब ५०० विश्वविद्यालय है लोग बिदेशो यहा अध्ययन करने आते है। यहा औद्योगिक विकास बहुत हुऐ है और कोरिया मे चीन सहित १५ देशो के लोग रोजगार अनुमति प्रणाली(EPS) के माध्यम से यहा काम करते है। जिसमे दक्षिण एशिया के ४ देशो नेपाल बांग्लादेश श्रीलंका पाकिस्तान है। नामोत्पत्ति दक्षिण कोरियाई अपने देश को हांगुक कहते हैं, जिसका शाब्दिक अर्थ है \"हानों की भूमि\" (हंगुल: 한국, हांजा: 韩国)। हान एक प्रागएतिहासिक जनजाति का नाम है जो कोरियाई प्रायद्वीप पर रहते थे। ये हान, हान चीनियों से अलग हैं। देश का एक उपनाम है \"जोसिओन\" जिसका अर्थ है, शान्त सुबह की भूमि। दाइहान मिन्गुक देश का आधिकारिक नाम है, जिसका अर्थ है कोरिया गणराज्य या शाब्दिक अर्थ है महान हान गणराज्य (대한민국; 大韩民国)। इतिहास नवपाषाण काल के लोगों का कोरीयाई प्रायद्वीप पर प्रथम प्रवसन तीसरी शताब्दी ईसापूर्व का है। तबसे, यह देश चीन और जापान के बीच अपनी पहचान को बनाए हुए है। कोरिया की संस्कृति एक समृद्ध संस्कृति है जिसकी अपनी अलग पहचान है। कोरिया का समकालीन विभाजन १९१० में जापान के कोरियाई प्रायद्वीप के अधिग्रहण से आरम्भ हुआ था। १९४५ में द्वितीय विश्व युद्ध की समाप्ति पर, कोरियाई प्रायद्वीप का दो भागों में, उस समय की दो महाशक्तियों सोवियत संघ और संयुक्त राज्य अमेरिका द्वारा विभाजन किया गया। १९४८ में उत्तर और दक्षिण कोरिया स्वतन्त्र हुए और उत्तरी भाग साम्यवादी बना और दक्षिणी भाग अमेरिका द्वारा प्रभावित था। कोरियाई युद्ध जून १९५० से आरम्भ हुआ जिसमें उत्तर का समर्थन चीन और दक्षिण का समर्थन संयुक्त राज्य अमेरिका ने किया। १९५३ में दोनों पक्षों के बीच एक शान्ति समझौते पर हस्ताक्षर किए गए जिससे युद्ध पर विराम लगा। लेकिन आज भी दोनो कोरिया आधिकारिक रूप से युद्धरत हैं क्योंकि अभी तक किसी भी युद्ध समाप्ति पत्र पर हस्ताक्षर नहीं किए गए हैं। १९५३ से ही कोरियाई प्रायद्वीप उत्तर और दक्षिण कोरिया के बीच असैन्य क्षेत्र के रूप में ३८वें समानान्तर पर बँटा हुआ है और इनकी सीमा विश्व की सर्वाधिक सैन्य जमावड़े वाली सीमा है। युद्ध के बाद, कोरिया गणराज्य में सत्तावादी शासन प्रलाणी उभरी जो स्यंग्मन र्ही और फिर…"} {"instruction": "Reverse a string using the built-in function in R programming language.", "input": "", "output": "rev_string <- function(string) { rev_string <- paste(rev(strsplit(string, \"\")[[1]]), sep = \"\") return(rev_string) }"} {"instruction": "Create an array with 3 elements of your choice.", "input": "", "output": "my_array = [\"John\", 25, True]"} {"instruction": "Write a function in Python to shuffle an array.", "input": "[1, 2, 3, 4, 5, 6]", "output": "import random def shuffleArray(arr): # Create a copy of the array temp_arr = arr.copy() # Iterate through the array and randomly # swap elements for i in range(len(temp_arr)): j = random.randint(0, len(temp_arr)-1) temp_arr[i], temp_arr[j] = temp_arr[j], temp_arr[i] return temp_arr"} {"instruction": "Given a string of words, generate the n-grams of the string.", "input": "String: \"Dogs are the best pet\" Gram size: 2", "output": "['Dogs are', 'are the', 'the best', 'best pet']"} {"instruction": "Write a C++ program that prints the following pattern to the screen:", "input": "", "output": "#include int main() { // Print the pattern using nested for loop for (int i=0; i<5; i++) { for (int j=0; j error:\n print('pixel ne,', i1[i, j], i2[i, j], abs(i1[i, j][k] - i2[i, j][k]), error)\n return False\n else:\n return False\n\n return True\n\n def _driver(self, options=None, **kwargs):\n if not options and kwargs:\n options = kwargs\n\n if options and 'driver' in options and options['driver'] == 'wand':\n return self.helper.io.image.driver.wand\n\n return self.helper.io.image.driver.pillow\n\n def load(self, src, options=None, **kwargs):\n if not options and kwargs:\n options = kwargs\n\n tmp = None\n drivers = []\n\n pillow_image = self.helper.io.image.driver.pillow.Image\n wand_image = self.helper.io.image.driver.wand.Image\n\n if pillow_image:\n drivers.append(pillow_image)\n\n if wand_image:\n drivers.append(wand_image)\n\n try:\n if isinstance(src, tuple(drivers)):\n return src\n\n elif self.helper.web.url.validate(src):\n code, res = self.helper.web.http.get.raw(src)\n\n if code != 200:\n raise Exception('The specified image url is invalid.')\n\n tmp = tempfile.NamedTemporaryFile(delete=False)\n tmp.write(res)\n tmp.close()\n\n tmp = tmp.name\n\n else:\n tmp = None\n\n if not tmp and not src:\n raise Exception('The specified image is invalid.')\n\n img = self._driver(options=options).load(tmp if tmp else src)\n\n if not img:\n raise Exception('The specified image is invalid.')\n\n return img\n\n "} {"instruction": "What is data serialization?", "input": "", "output": "Data serialization is the process of transforming data structures into a format that can be stored, transmitted, or parsed. It is commonly used to send and receive data between different types of systems. The application programming interface of a system can determine which data is serialized and deserialized."} {"instruction": "Edit the following html code by bolding and italicizing the \"Hello World\" text.", "input": "

    Hello World

    ", "output": "

    Hello World

    "} {"instruction": "Create a function in Python that takes two integers and returns the larger with the smaller one as its divisor.", "input": "Input integers: 10, 20", "output": "def get_larger_number_divisible_by_smaller(num1, num2):\n max_num = max(num1, num2)\n min_num = min(num1, num2)\n\n return max_num if max_num % min_num == 0 else None\n\nresult = get_larger_number_divisible_by_smaller(10, 20)\nprint(result) # 20"} {"text": "[EN Wikipedia] Lever (surname)\n\nLever is a surname. Notable people with the surname include: Sir Arthur Lever, 1st Baronet (1860–1924), British politician Arthur Lever (footballer) (1920–2004), Welsh professional footballer and Wales international Asbury Francis Lever (1875–1940), member of the United States House of Representatives from South Carolina Sir Ashton Lever (1729–1788), English collector of natural objects Caitlin Lever (born 1985), Canadian softball player Charles Lever (1806–1872), Irish novelist of English descent Colin Lever (born 1939), English former cricketer Darcy Lever (c.1759–1839), British author and expert in seamanship Don Lever (born 1952), Canadian retired professional ice hockey left winger Eddie Lever, manager of English football club Portsmouth F.C. 1952–1958 Lafayette \"Fat\" Lever (born 1960), American retired professional basketball player Sir Hardman Lever, 1st Baronet (1869–1947), English accountant and civil servant Harold Lever, Baron Lever of Manchester (1914–1995), English barrister and politician Harry Lever (born 1886), Australian rules footballer who played with St Kilda in the VFL Hayley Lever (1876–1958), Australian-American painter, etcher, lecturer and art teacher Henry W. Lever (1883–1980), American sportsperson and educator, head football coach at Carroll College Jake Lever (born 1996), player for the Melbourne Demons in the Australian Football League James Darcy Lever (1854–1910), English co-founder of Lever Brothers Janet Lever, American professor of sociology John Orrell Lever (1824–1897), English shipping owner and politician John Lever (born 1949), English former cricketer Johnny Lever (born 1957), Indian film actor and comedian Laurie Lever (born 1947), English-Australian Olympic-level equestrian rider Leslie Lever, Baron Lever (1905–1977), British politician Mark Lever (born 1970), English former professional footballer Sir Paul Lever (born 1944), British retired ambassador Peter Lever (born 1940), English former cricketer Philip Lever, 3rd Viscount Leverhulme (1915–2000), British landowner and race-horse owner Steven Lever (born 1963), Founder of Levertech Engineering Services Ltd Thomas Lever (or Leaver, Leiver) (1521–1577), English Protestant reformer and Marian exile Tim Lever, member of British pop group Dead or Alive 1983–89 William Lever, 1st Viscount Leverhulme (1851–1925), English industrialist, philanthropist and politician; the primary founder of Lever Brothers William Lever, 2nd Viscount Leverhulme (1888–1949), English industrialist and philanthropist Yves Lever (1942–2020), Canadian film critic and historian See also Laver (surname) Leaver"} {"instruction": "What is a syntax error in programming?", "input": "", "output": "A syntax error is an error in writing code which causes the code to be incorrect according to the programming language's syntax rules. This type of error prevents the code from being executed and can be identified by the compiler or interpreter. Examples of syntax errors include: putting a string in the wrong form, forgetting to add a semicolon at the end of a line, or missing a bracket."} {"text": "[HI Wikipedia] रामायण\n\nरामायण (संस्कृत : रामायणम् = राम + आयणम् ; शाब्दिक अर्थ : 'राम की जीवन-यात्रा'), वाल्मीकि द्वारा रचित संस्कृत महाकाव्य है जिसमें श्रीराम की गाथा है। इसे आदिकाव्य तथा इसके रचयिता महर्षि वाल्मीकि को 'आदिकवि' भी कहा जाता है। संस्कृत साहित्य परम्परा में रामायण और महाभारत को इतिहास कहा गया है और दोनों सनातन संस्कृति के सबसे प्रसिद्ध और लोकप्रिय ग्रन्थ हैं। रामायण के सात अध्याय हैं जो काण्ड के नाम से जाने जाते हैं। इसमें कुल लगभग २४,००० श्लोक हैं। सातवां उत्तरकांड प्रक्षिप्त है, तत्वमार्तंड में भी उत्तरकांड को प्रक्षिप्त माना गया है । उसके बाद की संस्कृत एवं अन्य भारतीय भाषाओं के साहित्य पर इस महाकाव्य का बहुत अधिक प्रभाव है तथा रामकथा को लेकर अनेकों 'रामायण' रचे गये। रचनाकाल मान्यतानुसार रामायण का समय त्रेतायुग का माना जाता है। गोवर्धन पीठ के शंकराचार्य श्री निश्चलानन्द सरस्वती प्रभृति संतों के अनुसार श्रीराम अवतार श्वेतवाराह कल्प के सातवें वैवस्वत मन्वन्तर के चौबीसवें त्रेता युग में हुआ था जिसके अनुसार श्रीरामचंद्र जी का काल लगभग पौने दो करोड़ वर्ष पूर्व का है। इसके सन्दर्भ में विचार पीयूष, भुशुण्डि रामायण, पद्मपुराण, हरिवंश पुराण, वायु पुराण, संजीवनी रामायण एवं पुराणों से प्रमाण दिया जाता है। इस महाकाव्य के ऐतिहासिक विकास और संरचनागत परतों को जानने के लिए कई प्रयास किए गए हैं। आधुनिक विद्वान इसका रचनाकाल ७ वीं से ४ वीं शताब्दी ईसा पूर्व मानते हैं। कुछ विद्वान तो इसे तीसरी शताब्दी ई तक की रचना मानते हैं। कुछ भारतीय कहते हैं कि यह ६०० ईपू से पहले लिखा गया। उसके पीछे तर्क यह है कि महाभारत, बौद्ध धर्म के बारे में मौन है जबकि उसमें जैन, शैव, पाशुपत आदि अन्य परम्पराओं का वर्णन है। महाभारत, रामायण के पश्चात रचित है, अतः रामायण गौतम बुद्ध के काल के पूर्व का होना चाहिये। भाषा-शैली के अनुसार भी रामायण, पाणिनि के समय से पहले का होना चाहिये। मौलिक विशेषताएं शैली रामायण इतिहास की शैली से संबंधित है , जो अतीत की घटनाएं ( पुराणवृत्त ) की कथा है । इस शैली में मानव जीवन के लक्ष्य शिक्षाएँ भी शामिल हैं । इसमें आदर्श पिता, आदर्श सेवक, आदर्श भाई, आदर्श पति और आदर्श राजा जैसे आदर्श पात्रों का चित्रण किया गया है। महाभारत की तरह , रामायण सिद्धांत और नैतिक तत्वों को बढ़ावा दिया गया, कथा रूप में प्राचीन हिंदू ऋषियों की शिक्षाओं को प्रस्तुत किया गया है। प्राचीन विद्या संक्षेप में रामायण-कथा हिन्दू शास्त्रों के अनुसार भगवान राम, विष्णु के मानव अवतार थे। इस अवतार का उद्देश्य मृत्युलोक में मानवजाति को आदर्श जीवन के लिये मार्गदर्शन देना था। अन्ततः श्रीराम ने राक्षसों के राजा रावण का वध किया और धर्म की पुनर्स्थापना की। रामायण में सात काण्ड हैं - बालकाण्ड, अयोध्यकाण्ड, अरण्यकाण्ड, किष्किन्धाकाण्ड,सुन्दरकाण्ड, लङ्काकाण्ड और उत्तरकाण्ड। बालकाण्ड अयोध्या नगरी में दशरथ नाम के राजा हुये जिनकी कौशल्या, कैकेयी और सुमित्रा नामक पत्नियाँ थीं। सन्तान प्राप्ति हेतु अयोध्यापति दशरथ ने अपने गुरु श्री वशिष्ठ की आज्ञा से पुत्रकामेष्टि यज्ञ करवाया जिसे कि ऋंगी ऋषि ने सम्पन्न किया। भक्तिपूर्ण आहुतियाँ पाकर अग्निदेव प्रसन्न हुये और उन्होंने स्वयं प्रकट होकर राजा दशरथ को हविष्यपात्र (खीर, पायस) दिया…"} {"instruction": "Edit the following HTML form to add the required attribute.", "input": "
    ", "output": "
    "} {"instruction": "Edit the following code snippet to display the data in a structured table", "input": "data = {'name': ['John', 'Smith', 'Adam'], 'age' : [23, 45, 56]}", "output": " {% for item in data %} {% endfor %}
    Name Age
    {{ item.name }} {{ item.age }}
    "} {"text": "[CS Wikipedia] BNP Paribas Open 2018 – ženská čtyřhra\n\nŽenská čtyřhra BNP Paribas Open 2018 probíhala v první polovině března 2018. Do deblové soutěže indianwellského tenisového turnaje nastoupilo třicet dva dvojic. Obhájcem titulu byl tchajwansko-švýcarský pár Latisha Chan a Martina Hingisová, jehož členky nestartovaly společně. Hingisová po sezóně 2017 ukončila profesionální kariéru. Deblová světová jednička Chanová vytvořila druhou nasazenou dvojici s mladší sestrou Čan Chao-čching, s níž ve druhém kole dohrála na raketách Sie Šu-wej a Strýcové. Vítězem se stal tchajwansko-český nenasazený pár Sie Šu-wej a Barbora Strýcová, který ve finále za 83 minut zdolal ruské turnajové jedničky Jekatěrinu Makarovovou s Jelenou Vesninovou po dvousetovém průběhu 6–4 a 6–4 s „tenisem ze staré školy“. Ve druhé sadě dokázaly otočit ztrátu prohraného podání. Obě šampionky si do žebříčku WTA připsaly 1 000 bodů a získaly premiérovou společnou trofej. Sieová vybojovala jubilejní dvacátý deblový titul na okruhu WTA Tour, respektive třetí z kategorie Premier Mandatory a pro Strýcovou to bylo dvacáté první takové turnajové vítězství na okruhu. Strýcová se Sieovou odehrály první společný turnaj, když spolupráci navázaly těsně před startem. Bývalá světová jednička Sieová měla původně nastoupit s Niculescuovou, která se rozhodla pro účast se Sestini Hlaváčkovou a partnerkou Strýcové se měla stát Světlana Kuzněcovová. Pro Sieovou to byl druhý titul z Indian Wells Masters, když v kalifornské poušti vyhrála již v roce 2014. Strýcová získala premiérovou kariérní trofej z kategorie Premier Mandatory. Nasazení párů Jekatěrina Makarovová / Jelena Vesninová (finále) Čan Chao-čching / Latisha Chan (2. kolo) Gabriela Dabrowská / Sü I-fan (semifinále) Tímea Babosová / Kristina Mladenovicová (semifinále) Monica Niculescuová / Andrea Sestini Hlaváčková (čtvrtfinále) Barbora Krejčíková / Kateřina Siniaková (2. kolo) Kiki Bertensová / Johanna Larssonová (1. kolo) Andreja Klepačová / María José Martínezová Sánchezová (čtvrtfinále)'' Pavouk Finálová fáze Horní polovina Dolní polovina Odkazy Reference Externí odkazy BNP Paribas Open 2018"} {"instruction": "Create a Python program that uses a sentiment analysis library like TextBlob to analyze reviews provided as input and classify each review as either positive or negative.", "input": "\"The product is good quality and well made.\"", "output": "import textblob\n\nreview = \"The product is good quality and well made.\"\ntestimonial = textblob.TextBlob(review)\nsentiment = testimonial.sentiment.polarity\n \nif sentiment > 0:\n print(\"Review is positive.\")\nelif sentiment == 0: \n print(\"Review is neutral.\")\nelse:\n print(\"Review is negative.\")"} {"instruction": "Write a function to find the closest pair of points in a given array of points.", "input": "", "output": "def find_closest_pair(points): min_dist = float('inf') closest_pair = None for i in range(len(points)): for j in range(i + 1, len(points)): dist = ((points[i][0] - points[j][0])**2 + (points[i][1] - points[j][1])**2)**0.5 if dist < min_dist: min_dist = dist closest_pair = (points[i], points[j]) return closest_pair"} {"instruction": "Change the given Python code to an equivalent expression using list comprehension.", "input": "mylist = [] for x in range(1, 10): mylist.append(x*x)", "output": "mylist = [x*x for x in range(1, 10)]"} {"instruction": "Given two strings, return True if either of the strings appears at the very end of the other string, ignoring upper/lower case differences.", "input": "str1 = \"Strawberry\", str2 = \"berry\"", "output": "def check_case_ignore(str1, str2): return str1.lower().endswith(str2.lower()) print(check_case_ignore('Strawberry', 'berry')) Output: True"} {"instruction": "Write a JavaScript function to find the longest common subsequence between two given sequences.", "input": "sequence1 = [1, 5, 9, 3, 2] sequence2 = [8, 2, 5, 7]", "output": "function longestCommonSubsequence(sequence1, sequence2) { let dp = []; for(let i=0; i<=sequence1.length; i++) { dp.push([]); for(let j=0; j<=sequence2.length; j++) { dp[i][j] = 0; } } for(let i=1; i<=sequence1.length; i++) { for(let j=1; j<=sequence2.length; j++) { if(sequence1[i-1] == sequence2[j-1]) { dp[i][j] =1+ dp[i-1][j-1]; } else { dp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]); } } } return dp[sequence1.length][sequence2.length]; }"} {"instruction": "Create a loop in Python to print the fibonacci sequence of the given number.", "input": "n = 10", "output": "def fibonacci(n): a = 0 b = 1 print(\"Fibonacci Series:\") for i in range(n): print(a, end = \" \") c = a + b a = b b = c fibonacci(n)"} {"instruction": "Using the given class, write a constructor that creates an instance with age 10.", "input": "class Person: def __init__(self,age): self.age = age", "output": "class Person: def __init__(self,age=10): self.age = age"} {"instruction": "Create an ios app to display the content of a given RSS feed", "input": "Url: https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/section/world/rss.xml", "output": "You will need to use an API like RSS API which can help you fetch the contents of the given URL. The API can be used for displaying the content of the RSS feed in a UI. Once you have setup the API, you will then need to create a UI which uses the API and display the RSS feed content on the iOS app."} {"instruction": "Write a Python script to reduce an array of integers by their GCD.", "input": "[30, 20, 45]", "output": "def gcd(a, b):\n while a != 0:\n a, b = b % a, a\n return b\n\ndef reduce_by_gcd(arr):\n gcd_val = arr[0]\n for i in range(len(arr)):\n gcd_val = gcd(gcd_val, arr[i])\n return [a // gcd_val for a in arr]\n\nreduced_arr = reduce_by_gcd([30, 20, 45])\nprint(reduced_arr) # [2, 3, 5]"} {"instruction": "Explain what is a non-deterministic algorithm.", "input": "", "output": "A non-deterministic algorithm is an algorithm that can produce different results when run multiple times with the same inputs. This is because the algorithm may make use of randomness or take different paths based on the input, and the result of each run will be different. Non-deterministic algorithms are useful in solving problems that cannot be solved with traditional deterministic algorithms, such as certain AI problems or certain puzzles."} {"instruction": "Optimize the following Python program to run faster.", "input": "def remove_duplicates(lst):\n s = set()\n for item in lst:\n if item in s:\n pass\n else:\n s.add(item)\n return s\n\nlst = [1, 2, 4, 2, 5, 6, 3, 3]\nnew_list = remove_duplicates(lst)\nprint(new_list)", "output": "def remove_duplicates(lst):\n return list(set(lst))\n\nlst = [1, 2, 4, 2, 5, 6, 3, 3]\nnew_list = remove_duplicates(lst)\nprint(new_list)"} {"instruction": "Add the following comment to the following piece of code.", "input": "def func_name(val1): val2 = val1 * 5", "output": "def func_name(val1): # Multiply the value by 5 val2 = val1 * 5"} {"instruction": "Write a Rust program to find the lowest common ancestor in a given tree.", "input": "", "output": "fn lowestCommonAncestor(root: &TreeNode, p: &TreeNode, q: &TreeNode) -> i32 { if root == nil { return -1; } if root == p || root == q { return root.val; } let left = lowestCommonAncestor(root.left, p, q); let right = lowestCommonAncestor(root.right, p, q); if left != -1 && right != -1 { return root.val; } return left != -1 ? left : right; }"} {"text": "[DE Wikipedia] Hato-Lau\n\nHato-Lau (Hatu-Lau) ist eine osttimoresische Aldeia im Suco Mau-Ulo (Verwaltungsamt Ainaro, Gemeinde Ainaro). 2015 lebten in der Aldeia 134 Menschen. Geographie Die Aldeia Hato-Lau bildet den Westen des Sucos Mau-Ulo. Östlich befindet sich die Aldeia Dagamessa. Im Süden grenzt Hato-Lau an den Suco Mau-Nuno, im Westen an die Gemeinde Bobonaro mit dem Suco Colimau (Verwaltungsamt Bobonaro) und im Norden an die Gemeinde Ermera mit den Sucos Atara. Aus Osten führt eine Straße aus der Richtung der Gemeindehauptstadt Ainaro nach Hato-Lau, biegt aber früh nach Süden ab, in Richtung des Sucos Mau-Nuno. An der Straße liegen kleine Siedlungen und einzelne Häuser. Ansonsten ist der Suco unbesiedelt. Das Land liegt meist in einer Meereshöhe über , ein Berg an der Grenze zu Ermera erreicht . Ein Zufluss des Sarais, eines Nebenflusses des Belulik, entspringt in Hato-Lau. Einzelnachweise Aldeia in Ainaro (Gemeinde)"} {"instruction": "Design an algorithm in Python that takes a list of integers and returns a new list of integers such that the difference between every two adjacent elements in the new list is greater than 3.", "input": "[1, 2, 4, 5, 8, 14, 15]", "output": "def solution(list): \n result = [] \n \n for i in list: \n if len(result) == 0: \n result.append(i) \n elif i - result[-1] > 3: \n result.append(i) \n \n return result \n \nlist = [1, 2, 4, 5, 8, 14, 15]\nprint(solution(list)) \n# Result: [1, 4, 8, 14]"} {"instruction": "Compress the following string using LZW compression.", "input": "Input: ‘ABBBCDCDEFFG’", "output": "The compressed string would be ‘A1B3C1D1E1F2G1’."} {"instruction": "Write Python code to normalize the values of a list of numbers by subtracting each number from the maximum value in the list and dividing it by the maximum value.", "input": "[7, 8, 10],", "output": "def normalize(lst): \n max_num = max(lst)\n normalized_lst = [(num-max_num)/max_num for num in lst]\n return normalized_lst\n\nlst = [7,8,10]\nnormalized_values = normalize(lst)\nprint(normalized_values)"} {"instruction": "Create a web scraper in Python using the Requests library that can scrape information from a Wikipedia page.", "input": "https://en.wikipedia.org/wiki/Python_(programming_language)", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n\ndef scrape_wiki(url):\n response = requests.get(url)\n soup = BeautifulSoup(response.text, 'html.parser')\n\n # find all headlines\n headers = soup.find_all('h1', {'id': 'firstHeading'})\n for header in headers:\n print(header.get_text())\n\n # find all links\n links = soup.find_all('a')\n for link in links:\n print(link.get('href'))\n\n\nif __name__ == '__main__':\n url = 'https://en.wikipedia.org/wiki/Python_(programming_language)'\n scrape_wiki(url)"} {"instruction": "Construct a MongoDB query to retrieve all documents where the field 'name' contains the letter 'y'.", "input": "", "output": "db.collection.find({ \"name\": { \"$regex\": /.*y.*/i } })"} {"instruction": "Design an algorithm to add two given binary numbers", "input": "", "output": "def add_binary(b1, b2): # initalize result result = \"\" carry = 0 # iterate over the bits for i in range(max(len(b1), len(b2))): a = int(b1[-i-1]) if i < len(b1) else 0 b = int(b2[-i-1]) if i < len(b2) else 0 #calculate sum sum = carry ^ a ^ b result = str(sum) + result # calculate the carry carry = (carry&a) | (carry&b) | (a&b) #append the carry to the result if carry: result = '1' + result return result"} {"instruction": "Edit the following code so it prints out a message when the condition is true.", "input": "if condition:", "output": "if condition: print(\"Condition is true!\")"} {"instruction": "Produce a single Python statement that multiplies the values of the variables x, y, and z, and stores the result in the variable result.", "input": "x = 5, y = 10, z = 20", "output": "result = x * y * z"} {"instruction": "Create a basic web scraper in Python. The scraper should take a website URL as an input and extract all hyperlinks from it.", "input": "Not applicable", "output": "# import libraries\nimport requests\nfrom bs4 import BeautifulSoup\n\n# define the scrape_page function\ndef scrape_page(url):\n # make the request\n response = requests.get(url)\n # parse the response using BeautifulSoup\n soup = BeautifulSoup(response.text, 'html.parser')\n # an empty list to store the hyperlinks\n links = []\n # loop through all the anchor tags\n for link in soup.find_all('a'):\n # get the URL from the href attribute\n href = link.get('href')\n # add the URL to the list of links\n links.append(href)\n # return the list of links\n return links\n\n# call the function with a given URL\nurl = 'https://example.com'\nlinks = scrape_page(url)\nprint(links)"} {"instruction": "Create a function to print out a numbered list of items from an array.", "input": "array = [‘apple’, ‘banana’, ‘orange’]", "output": "def print_numbered_list(array): \"\"\"Prints out a numbered list based on an array of items.\"\"\" for i, item in enumerate(array, start=1): print(f\"{i}. {item}\")"} {"instruction": "Write a web scraper in Python that is able to collect the top 5 news headlines from your local news website.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# We can use requests to get the webpage data\nwebpage = requests.get('http://localnewwebsite.com')\n\n# Parse the HTML using BeautifulSoup\nsoup = BeautifulSoup(webpage.content, 'html.parser')\n\n# Find the div containing the headlines\nheadlines_div = soup.find('div', class_='headlines')\n\n# Find all the h2 elements within the headlines div\nheadlines = headlines_div.find_all('h2')\n\n# Print the top 5 headlines\nfor h in headlines[:5]:\n print (h.text)"} {"instruction": "Create an algorithm to encourage work balance and productivity in remote work.", "input": "", "output": "One algorithm to encourage work balance and productivity in remote work is a scheduling algorithm that assigns workloads over manageable working windows with rest periods in between to allow for breaks and recovery. This algorithm can be designed to set maximum and minimum limit for each allocated workload and for duration for the rest periods, based on the individual's productive and rest needs. It can be used to monitor and manage workloads to ensure that workers do not experience fatigue or workload overload. Additionally, the algorithm can be designed to keep track of work performance over time to provide appropriate feedback and recommendations in order to help workers optimize their performance."} {"text": "[EN Wikipedia] UCL Faculty of Life Sciences\n\nThe UCL Faculty of Life Sciences is one of the 11 constituent faculties of University College London (UCL). History The roots of UCL’s Faculty of Life Sciences can be traced back to 1826, when the Chairs of Botany and Comparative Anatomy were established; with the Departments of Zoology, Cell Biology, Genetics, Botany and Microbiology all stemming from the Chair of Botany. Since the Faculty’s establishment it has contributed to many major breakthroughs in history including Nobel Prize winner, James Black, work on β-blockers and histamine H2 receptor antagonists. Most recently, the School of Pharmacy, established in 1842, merged with UCL in 2012, becoming one of two divisions within the Faculty of Life Sciences. Departments and divisions The Faculty currently comprises the following departments, divisions and institutes: UCL Division of Biosciences UCL Research Department of Cell and Developmental Biology UCL Research Department of Genetics, Evolution and Environment UCL Research Department of Neuroscience, Physiology and Pharmacology UCL Research Department of Structural and Molecular Biology Laboratory for Molecular Cell Biology (LMCB) at UCL Gatsby Computational Neuroscience Unit UCL School of Pharmacy Sainsbury Wellcome Centre for Neural Circuits and Behaviour Rankings In the 2021 QS World University Rankings by Faculty, UCL is ranked 10th in the world (and 1st in London) for Life Sciences and Medicine. In the 2021 Subject QS World University Rankings UCL is ranked 7th in the world (and 1st in London) for Pharmacy and Pharmacology. UCL came top for research power in the main panels of ‘medicine, health and life sciences’ and ‘social sciences’ according to the Research Excellence Framework 2021 (REF). UCL is also ranked 10th in the world for Biological Sciences and 5th in the world for Pharmacy and Pharmaceutical Sciences in the 2021 Shanghai Rankings. Notable alumni and staff There are currently six Nobel Prize winners amongst the Faculty's alumni and current and former staff. Current staff David Attwell Nadia Bukhari David Colquhoun Stuart Cull-Candy Rob Horne Steve Jones John O'Keefe Rosalind Raine Geraint Rees Claudio Stern Seirian Sumner Gabriel Waksman Semir Zeki Ijeoma Uchegbu Frances Brodsky Susan Evans Kate Jones Linda Partridge Tara Keck Christine Orengo Matthew Todd Annette Dolphin Maria Fitzgerald Abdul Waseh Basit Muki Haklay Alumni/deceased Dame Georgina Mace Rebeccah Slater Carla J. Shatz Gillian Griffiths Mary Collins Nigel Bonner Andrew Huxley References External links UCL Faculty of Life Sciences MRC Laboratory for Molecular Cell Biology at UCL University College London Biology education in the United Kingdom Departments of University College London"} {"instruction": "Add code to make an API call using a library to a given JSON endpoint and retrieve the data.", "input": "API URL: https://example.com/endpoint/data", "output": "import requests url = \"https://example.com/endpoint/data\" response = requests.get(url) data = response.json()"} {"instruction": "Design a Python program to print out all prime numbers in a range", "input": "Number Range between 1 and 10", "output": "def is_prime(n):\n for i in range(2, n):\n if n%i == 0:\n return False\n return True\n\nfor num in range(1, 10):\n if is_prime(num):\n print(num)"} {"instruction": "Create an object in JavaScript that performs a task given a condition.", "input": "", "output": "const myObject = { doTask: (condition) => { if(condition) { // code to perform the task } } }"} {"text": "[CS Wikipedia] The Boston News-Letter\n\nThe Boston News-Letter byly noviny vydávané v Britské Severní Americe, jedné z kolonií britského impéria po ukončení americké války za nezávislost, v letech 1704 až 1776. Noviny byly vydávány v týdenní periodicitě a byly silně kontrolovány britskou vládou, taktéž měly omezený náklad. Tisk ukončily po britské evakuaci Bostonu v roce 1776. Obsah byl primárně o politice v Britském impériu, konkrétně v Londýně a o evropské, zvláště válečné situaci. Různé názvy The Boston news-letter. 24. dubna 1704 – 29. prosince 1726. The Weekly news-letter. 5. ledna 1727 – 29. října 1730. The Boston weekly news-letter. 5. listopadu 1730 – 25. srpna 1757. The Boston news-letter. 1. září, 1757 – 18. března 1762. The Boston news-letter, and New-England chronicle. 25. března 1762 – 31. března 1763. The Massachusetts gazette. And Boston news-letter. 7. dubna 1763 – 19. května 1768. Boston weekly news-letter. 26. května 1768 – 21. září 1769. The Massachusetts gazette; and the Boston weekly news-letter. 28. září 1769 – 29. únor 1776. Odkazy Reference Americké noviny Vzniklo 1704 Zaniklo 1776"} {"instruction": "How do you create a namespace in Java?", "input": "", "output": "In Java a namespace is created by declaring a package statement at the top of a source file. For example: package com.example.myapp; This will create a namespace named \"com.example.myapp\" and all class and interfaces declared within the source file will be under this namespace."} {"text": "[EN Wikipedia] Ytterøy Church\n\nYtterøy Church () is a parish church of the Church of Norway in Levanger municipality in Trøndelag county, Norway. It is located on the island of Ytterøya, just north of the village of Hokstad. It is the church for the Ytterøy parish which is part of the Stiklestad prosti (deanery) in the Diocese of Nidaros. The white, wooden church was built in a long church style in 1890 using plans drawn up by the architect Knut Guttormsen and the lead builder was O. Günther. The church seats about 350 people. History The earliest existing historical records of the church date back to the year 1533, but the church was built before that time. The first church on Ytterøya was a stave church that was known as Eid Church and it was located about southwest of the present church site. It may have been founded during the 14th century. The old church was torn down in 1651 and it was replaced with a new timber-framed long church on the same site. In 1814, this church served as an election church (). Together with more than 300 other parish churches across Norway, it was a polling station for elections to the 1814 Norwegian Constituent Assembly which wrote the Constitution of Norway. This was Norway's first national elections. Each church parish was a constituency that elected people called \"electors\" who later met together in each county to elect the representatives for the assembly that was to meet in Eidsvoll later that year. During the 1880s, the cemetery that had surrounded the church was moved about to the northeast to a better location on the property. The old cemetery location was very shallow and not suitable for use. When the new cemetery was completed (around 1889), about 100 bodies were exhumed from the old cemetery and moved to the new one. In 1890, the parish built a new church about northeast of the old church site. The new church was consecrated on 14 February 1890. Many people were unhappy with the new church site and this caused a big dispute among the people of the parish that raged until 1902. This ultimately caused 81 people to resign their membership in the Church of Norway over this. The old church was torn down around the year 1900. See also List of churches in Nidaros References Levanger Churches in Trøndelag Long churches in Norway Wooden churches in Norway 19th-century Church of Norway church buildings Churches completed in 1890 14th-century establishments in Norway Norwegian election church"} {"text": "[CS Wikipedia] Andrej Končalovskij\n\nAndrej Končalovskij, rodným jménem Andrej Sergejevič Michalkov-Končalovskij (* 20. srpna 1937, Moskva, Sovětský svaz) je ruský scenárista a režisér. Pochází ze známé umělecké rodiny, jeho děd Petr Končalovskij a praděd Vasilij Surikov byli malíři, otec Sergej Michalkov byl spisovatel, dramatik a překladatel, matka Natalja Končalovská je básnířka a překladatelka, bratr Nikita Michalkov je filmový režisér a herec. Filmografie 2016 Ráj 2009 Forbidden City, The 2009 Nutcracker: The Untold Story 2007 Chacun son cinéma ou Ce petit coup au coeur quand la lumière s'éteint et que le film commence 2003 Lev v zimě (TV film) 2002 Dům bláznů 2000 Royal Way, The 1997 Odysseus (TV film) 1995 Lumière & spol. 1994 Slepička Rjaba 1991 Uvnitř kruhu / Kruh moci 1989 Homer a Eddie 1989 Tango a Cash 1987 Nesmělí lidé 1986 Duet pro jednoho 1985 Splašený vlak 1984 Mariini milenci 1982 Split Cherry Tree 1979 Sibiriáda 1974 Romance o zamilovaných 1970 Strýček Váňa 1969 Šlechtické hnízdo 1966 Příběh Asji Klačinové, která milovala, ale nevdala se 1965 První učitel 1961 Hlapec a holub Herecká filmografie 1964 Je mi 20 let 1962 Ivanovo dětství Externí odkazy Narození v roce 1938 Žijící lidé Ruští režiséři Artoví režiséři Muži Narození v roce 1937 Narození 20. srpna Narození v Moskvě Držitelé ceny Emmy za nejlepší režii minisérie, TV filmu nebo dramatického speciálu"} {"text": "[EN Wikipedia] Noel Davis\n\nNoel Davis (born Edgar Davis; 1 March 1927 – 24 November 2002) was a British film and television actor; and latterly, a film and television casting director. Partial filmography Darling (1965) - Shop Assistant (uncredited) Fahrenheit 451 (1966) - Charles (uncredited) Two a Penny (1967) - Dennis Lancaster Isadora (1968) - Doctor Journey into Darkness (1968) - Charles Philips (episode 'Paper Dolls') Some Will, Some Won't (1970) - Stewart Clegg (1970) - Manager A Touch of the Other (1970) - Max Ronieau Macbeth (1971) - Seyton Freelance (1971) - Derek The Trouble with 2B (1972) Young Winston (1972) - Interviewer Yellow Dog (1976) - Norman Prick Up Your Ears (1987) - Philip References External links 1927 births 2002 deaths British male stage actors British male film actors British male television actors British casting directors Male actors from Liverpool"} {"instruction": "Write a JavaScript program to create a random string of 10 characters.", "input": "", "output": "function getRandomString() { var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var randomstring = ''; for (var i=0; i<10; i++) { var rnum = Math.floor(Math.random() * chars.length); randomstring += chars.substring(rnum,rnum+1); } return randomstring; }"} {"instruction": "How can you sort a list of integers by their absolute value in Python?", "input": "", "output": "You can sort a list of integers by their absolute value using the sort() method. For example: numbers = [2, -1, 5, 0, -4] numbers.sort(key = lambda x: abs(x)) print(numbers) # Output: [0, -1, 2, -4, 5]"} {"instruction": "How can you access the value of a key from a JavaScript object?", "input": "", "output": "You can access a value from a JavaScript object using either dot notation or square bracket notation. Using dot notation, you can do something like \"object.key\", where the key is the name of the property you want to access. Using bracket notation, you can do something like \"object[\"key\"]\", where the key is a string containing the name of the property you want to access."} {"text": "[CS Wikipedia] Synnøve Lieová\n\nSynnøve Lieová (22. srpna 1908 – 9. července 1980) byla norská rychlobruslařka. Závodila od roku 1932, v roce 1933 se zúčastnila prvního neoficiálního ženského Mistrovství světa (2. místo). Podobných umístění dosáhla i na neoficiálních mistrovstvích v letech 1934 (2. místo) a 1935 (3. místo). Na následujících oficiálních světových šampionátech vybojovala jednu stříbrnou (1937) a dvě bronzové medaile (1936, 1938). Na norských šampionátech stála v letech 1933–1940 osmkrát na stupních vítězů, přičemž v roce 1933 na Mistrovství Norska zvítězila. Poslední závody absolvovala v roce 1940. Externí odkazy Norské rychlobruslařky Narození 22. srpna Narození v roce 1908 Úmrtí 9. července Úmrtí v roce 1980 Ženy Narození v Norsku"} {"text": "[EN Wikipedia] Marjorie Silliman Harris\n\nMarjorie Silliman Harris (June 6, 1890 – March 27, 1976) was an American philosopher who wrote on the problem of determining meaningfulness in life. Influenced by Auguste Comte, Henri Bergson, and Francisco Romero, she addressed questions related to individual experience and its assimilation or transcendence. Education Marjorie Harris was born in 1890 in Wethersfield, Connecticut, to Elizabeth Mills Harris and George Wells Harris. She attended Mount Holyoke College, receiving her B.A. in 1913. She went on to complete a doctorate in philosophy at Cornell University (1921), where she was awarded the Susan Linn Sage Scholarship. Her dissertation was on the French philosopher Auguste Comte. Career Harris taught briefly at the University of Colorado (1921–22), but the bulk of her academic career was spent at Randolph-Macon Woman's College in Virginia (1922–58), where she rose to be a full professor and chair of the Philosophy Department. From 1934 onward, she was an emerita professor at the college. Harris wrote principally on the French philosophers Comte and Henri Bergson and the Latin-American philosopher Francisco Romero. A major theme of her writing is the role of philosophy in illuminating what is significant in an individual life, and here she shows the influence of Bergson's conception of 'life' as well as John Dewey's pragmatism. The title of one of her books, Sub Specie Aeternitatis (1937, 'from the perspective of eternity'), makes visible her concern to connect what is (or may be) universally true with the individual experiences that fall within our often narrow perceptions. She is much concerned with how the human quest for truth and meaning in a life are shaped by our notions of experience, transcendence (as developed by Romero), freedom, and will. One of her lines of argument holds that a satisfactory life requires a certain degree of detachment as well as the ability to resist trying to organize all experience through rigid and predetermined categories. Harris was a member of numerous professional organizations, including the American Philosophical Association. She died in 1976 in Rocky Hill, Connecticut. Selected publications Books The Function of Philosophy (1927) Sub Specie Aeternitatis (1937) Francisco Romero on Problems of Philosophy (1960) Articles \"Comte and James\" (1925) \"If We Have Life, Do We Need Philosophy?\" (1927) \"Beauty and the Good\" (1930) \"Bergson's Conception of Freedom\" (1933) \"A Transcendent Approach to Philosophy\" (1955) References 1890 births 1976 deaths American women philosophers Mount Holyoke College alumni Randolph–Macon College faculty Cornell University alumni 20th-century American philosophers 20th-century American women"} {"instruction": "Find the position of the substring \"is\" in the string.", "input": "string = \"This is an example\"", "output": "string = \"This is an example\" print(string.find(\"is\"))"} {"instruction": "Implement a regression algorithm in Python to predict housing prices.", "input": "Not applicable", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\n\n# Load the data\ndata = pd.read_csv('data.csv')\n\n# Define the inputs and labels\nX = data[['square_feet', 'beds', 'baths']]\ny = data['price']\n\n# Create and train the model\nmodel = LinearRegression()\nmodel.fit(X, y)\n\n# Test the model\npredictions = model.predict(X)"} {"instruction": "Create a Java program that reads in two strings and outputs their longest common substring.", "input": "myCodingSkillzz and AnotherCodingSkill", "output": "CodingSkill"} {"instruction": "Generate a C++ code to filter out an array containing odd numbers.", "input": "", "output": "#include // Function to filter out odd numbers void filter_odd(int arr[], int n) { int i, k; k = 0; // Traversing the given array // from first to last for (i = 0; i < n; i++) { // If arr[i] is even then // store it at current index if (arr[i] % 2 == 0) { arr[k++] = arr[i]; } } // Modifying original array // elements afterkth index while (k < n) { arr[k++] = 0; } // Print the array elements std::cout << \"Modified array is : \"; for (i = 0; i < n; i++) { std::cout << arr[i] << \" \"; } } // Driver Code int main() { int arr[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int n = sizeof(arr) / sizeof(arr[0]); filter_odd(arr, n); return 0; }"} {"instruction": "Write a JavaScript function to check if a given input number is perfect or not. A perfect number is a number whose sum of divisors equals the number itself.", "input": "", "output": "function isPerfect(n) { let sum = 0; for (let i = 1; i < n; i++) { if (n % i == 0) { sum += i; } } return sum === n; }"} {"text": "[CS Wikipedia] František Lašek\n\nFrantišek Lašek (30. března 1883 Duchcov – 13. března 1957 Praha) byl český divadelní a filmový herec. Život Narodil se v rodině duchcovského horníka Václava Laška a jeho ženy Kateřiny rozené Kosmatové, začal studovat na odborné keramické škole v Teplicích. Studium nedokončil, utekl k divadlu. Nejprve hrál u venkovských divadelních společností (Karel Kaňkovský, Eliška Zöllnerová), po konci 1. světové války v Jihočeském divadle v Českých Budějovicích a v divadle na Kladně. Později vystupoval v různých pražských kabaretech (např. v roce 1918 U Bílé labutě). Jeho první ženou, byla herečka Nina Lašková (Antonie roz. Táboříková) (1890 - 1936), po ovdovění se v roce 1942 oženil s Otilii Zykovou rozenou Obstovou (1904). František Lašek, je i se svou první ženou Ninou, pochován na Olšanských hřbitovech. Dílo Menší role získal už v němých filmech: 1926 Bludné duše – rebelující vesničan Rozhoda, 1927 Pražský kat – katův pacholek, 1927 Batalion – soudní úředník, 1930 Vendelínův očistec a ráj – rodinný přítel Theofil Drmola. V éře zvukového filmu ztvárnil několik epizodních rolí hlavně v komediích s Vlastou Burianem: 1931 To neznáte Hadimršku – člen delegace městské rady, 1931 Miláček pluku – host na tancovačce, 1933 V tom domečku pod Emauzy – klenotník, 1933 Sedmá velmoc – otec Rydvan, 1934 U nás v Kocourkově – bývalý starosta, 1934 Anita v ráji – zaměstnanec firmy, 1938 Zborov – ?, 1939 U pokladny stál... – kníratý pacient s bolavými zuby, 1939 Srdce v celofánu – městský radní, 1941 Gabriela – host v kavárně, 1942 Městečko na dlani – zraněný havíř. Jmenovec Jeho život byl připomínán u příležitosti 50. výročí jeho úmrtí. Primárním zdrojem byl patrně článek Mistr frašek Franta Lašek, jehož obsah byl později přejímán dál. V těchto zdrojích je ale jeho identita směšována s jeho současníkem a jmenovcem Františkem Laškem (1902–1970), který byl také umělecky činný, prosadil se ale hlavně jako autor mnoha frašek, operet a varietních scének. Právě ve snaze vymezit se oproti svému staršímu jmenovci začal mladší umělec používal přídomek Lukovič podle svého rodiště. Odkazy Poznámky Reference Externí odkazy Čeští herci Čeští herci němého filmu Narození v roce 1883 Úmrtí v roce 1957 Narození 30. března Úmrtí 13. března Muži"} {"instruction": "Given a list of integers and a target value, calculate two integers in the list that add up to the target value.", "input": "target = 6 list = [1, 2, 3, 4, 5]", "output": "(1, 5)"} {"instruction": "Design a data structure to store user information such as username, password, date of birth and email address.", "input": "", "output": "The information can be stored in a user class using the following structure: class User { string username; string password; string dateOfBirth; string emailAddress; } The information can then be accessed and modified using getter and setter methods."} {"instruction": "Create a code to create a userid from the given firstname and lastname.", "input": "Firstname: John Lastname: Smith", "output": "def create_userid(firstname, lastname): userid = firstname[0] + lastname[:5] return userid userid = create_userid(\"John\", \"Smith\") print(userid) # Output: JSmith"} {"instruction": "Create a JavaScript function to return the greatest value from the following array of numbers.", "input": "[2, 4, 8, 10, 15]", "output": "function getGreatestValue(arr) { let greatest = arr[0]; for(let i = 0; i < arr.length; i++) { if(arr[i] > greatest) { greatest = arr[i]; } } return greatest; }"} {"instruction": "Write a Python program to find the longest common prefix among all strings in the list.", "input": "strings = [\"code\", \"coder\", \"coding\"]", "output": "def find_longest_common_prefix(strings):\n first_str = strings[0]\n longest_prefix = \"\"\n for i in range(len(first_str)):\n current_prefix = first_str[:i]\n flag = True\n for string in strings[1:]:\n if not string.startswith(current_prefix):\n flag = False\n break\n if flag:\n longest_prefix = current_prefix\n return longest_prefix"} {"instruction": "Write an HTML element to create a checkbox in a form.", "input": "", "output": ""} {"instruction": "Replace the character at the second index with \"X\".", "input": "s = \"Hello!\"", "output": "s = \"Hello!\" new_str = s[:1] + \"X\" + s[2:] print(new_str) # Output: HXllo!"} {"instruction": "Given a person's name and the current time, print the difference in time from the person's birthday.", "input": "name = \"John\" time = datetime.datetime(2021, 3, 25, 10, 0, 0)", "output": "birthday = datetime.datetime.strptime(name + \" birthdate\", \"%Y-%m-%d\") time_diff = time - birthday print(\"The difference in time from \" + name + \"'s birthday is \" + str(time_diff))"} {"instruction": "Edit the following C code so that an infinite loop is created:", "input": "#include int main() { int i = 0; while(i<10) { printf(\"%d\\n\",i); i++; } return 0; }", "output": "#include int main() { int i = 0; while(1) { printf(\"%d\\n\",i); i++; } return 0; }"} {"instruction": "Write a Python function to generate a sequence of numbers of a given length which contain prime numbers only.", "input": "8", "output": "def generate_prime_sequence(length):\n prime_sequence = []\n prime_number = 2\n while len(prime_sequence) < length:\n is_prime = True\n for i in range(2, int(prime_number/2) + 1):\n if prime_number % i == 0:\n is_prime = False\n break\n if is_prime:\n prime_sequence.append(prime_number)\n prime_number += 1\n return prime_sequence\n\nprint(generate_prime_sequence(8))"} {"instruction": "Modify a Python program to encrypt a string using the XOR Cipher.", "input": "current program:\ndef xor_strings(xs, ys):\n return \"\".join(chr(ord(x) ^ ord(y)) for x, y in zip(xs, ys))\n\npassword = \"TestPassword\"\nstring = \"TopSecret\"\n\nprint(xor_strings(password, string))", "output": "def xor_strings(xs, ys):\n output = \"\"\n for i in range(0, len(xs)):\n output += format(ord(xs[i]) ^ ord(ys[i]), '02x').upper()\n\n return output\n\npassword = \"TestPassword\"\nstring = \"TopSecret\"\n\nprint(xor_strings(password, string))"} {"instruction": "Use the 'requests' library to retrieve the HTML content of a website.", "input": "url = \"https://www.example.com\"", "output": "import requests html = requests.get(url).text"} {"text": "[EN Wikipedia] Okurköy, Hani\n\nOkurköy () is a neighbourhood in the municipality and district of Hani, Diyarbakır Province in Turkey. It is populated by Kurds and had a population of 144 in 2022. References Neighbourhoods in Hani District Kurdish settlements in Diyarbakır Province"} {"instruction": "Write a JavaScript program to create an array of elements, representing the Fibonacci sequence, up to the given number n.", "input": "", "output": "function fibonacci_array(n) { let sequence = [0, 1]; while (sequence.length <= n) { let lastIndex = sequence.length - 1; sequence.push(sequence[lastIndex] + sequence[lastIndex - 1]); } return sequence; }"} {"instruction": "Create a Python function to find the probability of an event using the binomial distribution.", "input": "n = 10\np = 0.5\nx = 6", "output": "from math import factorial\n\ndef binomial_probability(n, p, x):\n \"\"\"Find the probability of an event using the binomial distribution.\n\n Args:\n n (int): The number of trials.\n p (float): The probability of success of the event.\n x (int): The number of successes.\n\n Returns:\n float: The probability of x successes in n trials.\n \"\"\"\n return factorial(n)/(factorial(x)*factorial(n-x)) * p**x * (1-p)**(n-x)\n\nif __name__ == '__main__':\n n = 10\n p = 0.5\n x = 6\n result = binomial_probability(n, p, x)\n print(result)"} {"instruction": "Generate an HTML page with a table containing all the elements of an array in JavaScript.", "input": "[1, 2, 3, 4]", "output": " Array Table
    Element Value
    1
    2
    3
    4
    "} {"instruction": "Create a SQL query to join two tables with the condition that the result should include all rows from the first table, even if there is no match in the second table.", "input": "Table1: id | name | addresses 1 | Alice | 123 street 2 | Bob | 456 avenue Table2: id | name 2 | Bob", "output": "SELECT * FROM Table1 LEFT JOIN Table2 ON Table1.id = Table2.id"} {"instruction": "Come up with a creative way to optimise the given code in Python.", "input": "# This code filters a list of numbers and prints out only the even ones\nnumbers = [1,2,3,4,5,6,7,8]\nfor num in numbers:\n if num % 2 == 0:\n print(num)", "output": "# This code filters a list of numbers and prints out only the even ones\nnumbers = [1,2,3,4,5,6,7,8]\n\n# Use list comprehension to filter the list\neven_numbers = [x for x in numbers if x % 2 == 0]\n\n# Print out the even numbers\nfor num in even_numbers:\n print(num)"} {"instruction": "How can you move an element from one array to another in JavaScript?", "input": "let array1 = [1, 2, 3]; let array2 = [4, 5, 6];", "output": "let array1 = [1, 2, 3]; let array2 = [4, 5, 6]; let el = array1.pop(); array2.push(el); console.log(array2);"} {"instruction": "Generate a list of valid HTML tags used to structure content in a page.", "input": "", "output": "- - - <head> - <body> - <header> - <nav> - <main> - <article> - <section> - <aside> - <footer> - <h1>, <h2>, <h3>, ... <h6> - <p> - <ul>, <ol> - <li> - <div> - <span> - <img> - <table> - <tr>, <th>, <td>"} {"instruction": "Calculate the mean of the following list of numbers using a for loop.", "input": "numbers = [3, 5, 8, 11, 15]", "output": "total = 0 for number in numbers: total += number mean = total / len(numbers) print(mean) # Output: 8.4"} {"instruction": "Write a Python program to print the day of week for a specific date.", "input": "Date: \"21 October 2020\"", "output": "import datetime\n\ndate_str = \"21 October 2020\"\ndate = datetime.datetime.strptime(date_str, \"%d %B %Y\")\nprint(date.strftime(\"%A\"))"} {"instruction": "Create a Java program to check for a palindrome.", "input": "", "output": "public class Palindrome { public static boolean isPalindrome(String str){ // Pointers pointing to the beginning // and the end of the string int i = 0, j = str.length() - 1; // While there are characters toc compare while (i < j) { // If there is a mismatch if (str.charAt(i) != str.charAt(j)) return false; // Increment first pointer and // decrement the other i++; j--; } // Given string is a palindrome return true; } }"} {"instruction": "Write a python program to which given a list of numbers, will calculate the mean value", "input": "", "output": "def mean(nums):\n total = 0\n for num in nums:\n total += num\n # Return the mean by dividing by the number of elements \n return total / len(nums)"} {"instruction": "Create a function in Java that takes two numbers as arguments and prints their product.", "input": "10 and 8", "output": "public static void printProduct(int n1, int n2){ System.out.println(n1 * n2); }"} {"instruction": "Create a new array containing the numbers from 10 to 100 in increments of 5.", "input": "[10, 15, 20, 25, 30, ..., 95, 100]", "output": "int[] array = new int[19]; int num = 10; for (int i=0; i<19; i++){ array[i] = num; num += 5; }"} {"instruction": "Create a function in Python that returns the longest increasing subsequence in a given array.", "input": "[3,4,2,1,6,7]", "output": "# Return the longest increasing subsequence\ndef lis(arr): \n n = len(arr) \n \n # Initialize LIS values for all indexes \n lis = [1]*n \n \n # Compute LIS values from left to right \n for i in range (1, n): \n for j in range(0, i): \n # lis[i] = max(lis[i], lis[j] + 1) if arr[i] > arr[j] \n if arr[i] > arr[j] and lis[i] < lis[j] + 1 : \n lis[i] = lis[j]+1\n \n # Return the maximum value\n return max(lis)"} {"instruction": "Read a given time-series dataset in Python and build a forecast model to predict future values.", "input": "", "output": "import pandas as pd\nfrom sklearn.linear_model import LinearRegression\n\n# Load data\ndf = pd.read_csv('data.csv')\n\n# Split data into train and test sets\nX_train = df.loc[:2000, ['time']].values\ny_train = df.loc[:2000, ['value']].values\nX_test = df.loc[2000:, ['time']].values\ny_test = df.loc[2000:, ['value']].values\n\n# Train model\nmodel = LinearRegression()\nmodel.fit(X_train, y_train)\n\n# Predict values\npredictions = model.predict(X_test)"} {"instruction": "Write an SQL query to display the first name and last name of all employees in the Employees table.", "input": "", "output": "SELECT first_name, last_name FROM Employees;"} {"instruction": "Edit the following Java program and make it compile without any errors.", "input": "public class Main { public static void main(String[] args) { System.print(\"Hello, World!\"); } }", "output": "public class Main { public static void main(String[] args) { System.out.println(\"Hello, World!\"); } }"} {"text": "[HI Wikipedia] वज्रच्छेदिकाप्रज्ञापारमितासूत्र\n\nवज्रच्छेदिका प्रज्ञापारमिता सूत्र (या वज्र सूत्र) महायान बौद्ध धर्म सूत्र है जो प्रज्ञापारमिता ('ज्ञान की पूर्णता') सूत्रों की शैली से है। एक व्यापक भौगोलिक सीमा में विभिन्न भाषाओं में अनुवादित, वज्र सूत्र पूर्वी एशिया में सबसे प्रभावशाली महायान सूत्रों में से एक है, और यह विशेष रूप से हृदय सूत्र के साथ झान परम्परा के भीतर प्रमुख है। थाङ राजवंश की एक प्रति - वज्र सूत्र का चीनी संस्करण - 1900 में दाओवादी भिक्षु वाङ युआन्लू द्वारा दुन्ह्वाङ पांडुलिपियों में पाया गया था और 1907 में ऑरल स्टाइन को बेच दिया गया था। वे 11 मई 868 को वापस दिनांकित हैं। यह, ब्रिटिश लाइब्रेरी की शब्दों में, \"सबसे पुरातन दिनांकित मुद्रित पुस्तक\" है। इन्हें भी देखें अष्टसाहस्रिका प्रज्ञापारमिता प्रज्ञापारमिता बोधिसत्व बाहरी कड़ियाँ वज्रच्छेदिकाप्रज्ञापारमितासूत्र: अंग्रेजी अनुवाद, Lapis Lazuli Texts World’s Oldest Printed Book Philosophist/2011 August/R3August2011.htm बोधिचर्यावतार में प्रज्ञा-पारमिता Diamond Sutra: English Translation, by A. F. Price and Wong Mou-Lam The Diamond of Perfect Wisdom Sutra: English Translation, by Chung Tai Translation Committee Romanized Sanskrit and Devanagari of the Diamond Sutra in the Digital Sanskrit Buddhist Canon. महायान सूत्र चीनी पाण्डुलिपियाँ"} {"instruction": "Create a Python code that takes two strings and combine them into a single string.", "input": "str1 = \"Hello\" str2 = \"World\"", "output": "combinedString = str1 + ' ' + str2 print(combinedString) # Hello World"} {"instruction": "The given code is a Python script that performs various natural language processing tasks on Twitter data. To use this script, you need to import the required libraries such as json, sklearn, nltk, wordcloud, matplotlib, and db. Then, you can define the DATASET_PATH variable to point to the location of the Twitter data file. The calc_frequencies function calculates the frequency of words in a list of words. The get_word_clouds function generates a word cloud for each user in a list of tweets. The save_wordcloud_image function saves a word cloud image to a file. The load_example_data function loads example Twitter data. The get_corpus_of_most_active_users function returns a corpus of tweets from the most active users. Finally, the main function calls the get_word_clouds function and saves the resulting word clouds to a database.", "input": "", "output": "import json\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nimport nltk\nfrom nltk.corpus import stopwords\nfrom wordcloud import WordCloud\nimport matplotlib.pyplot as plt\nimport db\nimport os\n\nDATASET_PATH = os.environ['HOME'] + '/nltk_data/corpora/twitter_samples/tweets.20150430-223406.json'\ndef calc_frequencies(words, words_n=50, lang='german'):\n words = [word for word in words if len(word) > 1]\n words = [word for word in words if not word.isnumeric()]\n words = [word.lower() for word in words]\n # words = [word for word in words if word not in all_stopwords]\n # Stemming words seems to make matters worse, disabled\n # stemmer = nltk.stem.snowball.SnowballStemmer(lang)\n # words = [stemmer.stem(word) for word in words]\n\n fdist = nltk.FreqDist(words)\n return fdist.most_common(words_n)\n\ndef get_word_clouds(tweets, users, words_n=50, lang='english'):\n default_stopwords = set(nltk.corpus.stopwords.words(lang))\n stopwords_file = '../data/stopwords.txt'\n custom_stopwords = set(open(stopwords_file, 'r').read().splitlines())\n all_stopwords = default_stopwords | custom_stopwords\n\n vectorizer = TfidfVectorizer(max_df=0.5, min_df=2, stop_words=list(all_stopwords))\n X = vectorizer.fit_transform(tweets)\n terms = vectorizer.get_feature_names()\n\n word_cloud_per_person = {}\n for doc in range(len(tweets)):\n feature_index = X[doc, :].nonzero()[1]\n tfidf_scores = zip(feature_index, [X[doc, x] for x in feature_index])\n doc_terms = []\n for word, score in [(terms[i], score) for (i, score) in tfidf_scores]:\n doc_terms.append((word, score))\n important_terms = [(word, score) for word, score in sorted(doc_terms, key=lambda x: x[1], reverse=True)][:words_n]\n word_cloud_per_person[users[doc]] = important_terms\n return word_cloud_per_person\n\ndef save_wordcloud_image(frequencies, filename):\n wordcloud = WordCloud(width=1024, height=786, min_font_size=1).fit_words(frequencies)\n fig = plt.figure()\n fig.set_figwidth(12)\n fig.set_figheight(16)\n plt.imshow(wordcloud)\n plt.axis(\"off\")\n plt.savefig(filename, facecolor='k', bbox_inches='tight')\n print('imaged created')\n\ndef load_example_data():\n tweets = []\n with open(DATASET_PATH) as f:\n for line in f:\n tweets.append(json.loads(line)['text'])\n return tweets\n\ndef get_corpus_of_most_active_users(n_users=5):\n tweets = []\n texts = []\n with open(DATASET_PATH) as f:\n "} {"instruction": "Write a Python program to calculate the sum of two integers without using the ‘+’ operator.", "input": "3, 4", "output": "def add_without_plus_operator(a, b):\n # Iterate till there is no carry\n while (b != 0):\n # Carry now contains common set bits of x and y\n carry = a & b\n\n # Sum of bits of x and y where at least one of the bits is not set\n a = a ^ b\n\n # Carry is shifted by one so that adding it to x gives the required sum\n b = carry << 1\n\n return a\n\nif __name__ == \"__main__\":\n a = 3\n b = 4\n print(add_without_plus_operator(a, b))"} {"instruction": "Create a program in Python to generate a Random Password of length 8 characters, which contains at least one of each character type (lowercase, uppercase, digits, special characters).", "input": "Not applicable", "output": "import string\nimport random\n\n# length of password\nlength = 8\n\n# special characters\nspecial_characters = \"!#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\"\n\n# generating password\npassword = random.choice(string.ascii_lowercase)\npassword += random.choice(string.ascii_uppercase)\npassword += random.choice(string.digits)\npassword += random.choice(special_characters)\n\nfor i in range(length):\n password += random.choice(string.ascii_lowercase + string.ascii_uppercase + string.digits + special_characters)\n\npassword = ''.join(random.sample(password,len(password)))\n\nprint (\"Password is: \", password)"} {"instruction": "Design a program that outputs the average value of a list in Python.", "input": "[1, 4, 10, 6]", "output": "# Given a list of numbers\nnums = [1, 4, 10, 6]\n\n# Calculate the average\ntotal = 0\nfor num in nums:\n total += num\n\naverage = total/ len(nums)\n\n# Output the average\nprint(average)"} {"instruction": "Edit a given HTML page and add a new link.", "input": "<html> <head> <title>My webpage Welcome to my webpage! ", "output": " My webpage Welcome to my webpage! Link "} {"instruction": "In a Python list, swap the items at index 3 and 4.", "input": "List: [10, 20, 30, 40, 50]", "output": "def swap(arr, idx1, idx2):\n arr[idx1], arr[idx2] = arr[idx2], arr[idx1]\n\narr = [10, 20, 30, 40, 50]\nswap(arr, 3, 4)\nprint(arr)"} {"instruction": "Implement a Python Script that prints out all the prime numbers between 0 and a given number.", "input": "", "output": "def find_primes(number):\n for num in range(1, number + 1):\n # prime numbers are greater than 1\n if num > 1:\n for i in range(2, num):\n if (num % i) == 0:\n break\n else:\n print(num)\n\nfind_primes(20)"} {"instruction": "Create a SQL query that returns the records with the highest salary from the Employees table.", "input": "Employees table columns: id | name | salary 1 | John | 120000 2 | Jane | 150000 3 | Jack | 160000", "output": "SELECT * FROM Employees ORDER by Salary DESC LIMIT 1;"} {"instruction": "Generate CNN-LSTM model in Keras.", "input": "", "output": "# define CNN model model_cnn = Sequential([ Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)), MaxPool2D(), Flatten(), Dense(100, activation='relu'), Dense(10, activation='softmax') ]) # define RNN model model_lstm = Sequential() model_lstm.add(LSTM(128, input_shape=(28, 28, 32))) model_lstm.add(Dense(100, activation='relu')) model_lstm.add(Dense(10, activation='softmax')) # define the model model = Sequential() model.add(Convolution2D(32, 3, 3, input_shape=(28, 28, 1), activation='relu')) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(LSTM(128)) model.add(Dense(100, activation='relu')) model.add(Dropout(.2)) model.add(Dense(10, activation='softmax'))"} {"instruction": "Create a new class called \"Rectangle\" with two properties: width and height", "input": "", "output": "class Rectangle { int width; int height; public Rectangle (int width, int height){ this.width = width; this.height = height; } }"} {"instruction": "Write Python code to implement this logic: if the number is even, then double the value; otherwise, subtract 1 from the value.", "input": "", "output": "def modify_number(number):\n if number % 2 == 0:\n return number * 2\n else:\n return number - 1"} {"instruction": "Create a Python program to determine if a given string is a palindrome and if so, print it.", "input": "String = \"racecar\"", "output": "# Function to check if a string is a palindrome\ndef isPalindrome(s):\n # Reverse the string\n rev_s = s[::-1]\n\n # Check if the string is the same as its reverse\n if (s == rev_s):\n return True\n return False\n\n# Driver code\ns = 'racecar'\n\n# Check if the given word is a palindrome\nif (isPalindrome(s)):\n print(s)"} {"instruction": "Create a while loop to iterate over the elements in the given list", "input": "my_list = [1, 2, 3, 4]", "output": "i = 0 while i < len(my_list): print(my_list[i]) i += 1"} {"instruction": "Sort these integers in ascending order.", "input": "6, 5, 10, 1", "output": "[1, 5, 6, 10]"} {"instruction": "Write a web page using HTML, CSS, and JavaScript that displays the following text: \"Welcome to my website!\".", "input": "", "output": " My website

    Welcome to my website!

    "} {"instruction": "Write a Python code that takes a given list of numbers and returns the mode of that list.", "input": "List = [1,2,3,4,2,2,2,5]", "output": "def find_mode(List): \n max_count = 0\n modes = [] \n for num in List: \n current_count = List.count(num) \n if current_count > max_count: \n max_count = current_count \n modes = [num] \n elif current_count == max_count: \n modes.append(num) \n return modes"} {"instruction": "Generate a Python program that calculates standard deviation of a set of numbers.", "input": "[20, 25, 30, 35, 40]", "output": "def std_dev(data_set):\n mean = sum(data_set) / len(data_set)\n total_sum = 0\n for i in data_set:\n total_sum += (i - mean) ** 2\n variance = total_sum / len(data_set)\n std_dev = variance ** (1/2)\n return std_dev\n\ndata_set = [20, 25, 30, 35, 40]\nprint(\"Standard Deviation: \" + str(std_dev(data_set)))"} {"instruction": "Create a Python program to check if given inputs are anagrams.", "input": "Input 1: 'listen'\nInput 2: 'silent'", "output": "def is_anagram(input1, input2):\n # turn the strings into sets\n s1 = set(input1)\n s2 = set(input2)\n \n # Compare the size of the sets\n if len(s1) != len(s2):\n return False\n \n # Iterate through the sets and compare the contents\n for element in s1:\n if element not in s2:\n return False\n \n # If all the conditions pass, then the strings are anagrams\n return True\n\n# Sample inputs\ninput1 = 'listen'\ninput2 = 'silent'\n\n# Check if the strings are anagrams\nif is_anagram(input1, input2):\n print(\"{} and {} are anagrams.\".format(input1, input2))\nelse:\n print(\"{} and {} are not anagrams.\".format(input1, input2))\n\n# Output\n# listen and silent are anagrams."} {"instruction": "Write a function in Python for sorting a given list of numbers.", "input": "[29, 11, 46, 7, 248, 1724]", "output": "def sort_list(numbers): return sorted(numbers)"} {"instruction": "Generate a batch of 10 code samples for a classification task that takes a piece of code as input and outputs its programming language.", "input": "Not applicable", "output": "Java\n// package com.example;\npublic class Example { \n public static void main(String[] args) {\n System.out.println(\"Hello World!\");\n }\n}\n\nPython\n# This program prints \"Hello World\"\nprint(\"Hello World\")\n\nSwift \n// This program prints \"Hello World\"\nprint(\"Hello World\")\n\nC\n#include \nint main() {\n printf(\"Hello World!\");\n return 0;\n}\n\nPHP\n\n\nC#\n// This program prints \"Hello World\"\nusing System;\n\npublic class Hello\n{\n public static void Main()\n {\n Console.WriteLine(\"Hello World!\");\n }\n}\n\nJavaScript\n// This program prints \"Hello World\"\nconsole.log(\"Hello World!\");\n\nGo\n// This program prints \"Hello World\"\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Println(\"Hello World!\")\n}"} {"text": "[HI Wikipedia] सरमक्का जिला\n\nसरमक्का सूरीनाम का जिला है, यह देश के उत्तर में स्थित है। जिले की राजधानी ग्रोनिंजन है। 2004 में हुई राष्ट्रीय जनगणना के अनुसार जिले की आबादी 16,135 है। इसका कुल क्षेत्रफल 3,636 वर्ग किलोमीटर है तथा घनत्व 4.4 प्रति वर्ग किलोमीटर है। जनसंख्या के अनुसार यह देश का आठवाँ सबसे बड़ा जिला है तथा क्षेत्रफल अनुसार सातवाँ सबसे बड़ा। जिले में छह रिसॉर्ट हैं। पारम्परिक तौर पर यहाँ पर छोटे-छोटे खेत होते हैं। हालांकि अब यहाँ बड़ी कृषि परियोजनाएँ भी खुलने लगी हैं, जो मुख्य रूप से केले और चावल का उत्पादन करती हैं। सूरीनाम के जिले"} {"text": "[DE Wikipedia] Helene Pflugshaupt\n\nHelene Pflugshaupt, geborene Helene Huber (* 17. Juli 1894 in Bern; † 12. November 1991 in Thun) war eine Schweizer Malerin und Zeichnerin. Leben Helene Pflugshaupt Huber verbrachte ihre Kindheit in Bern. Sie nahm von 1911 bis 1914 Unterricht bei Theodor Volmar. Von ihm lernte sie das Portrait- und Landschaftszeichnen. Es folgten weitere Ausbildungen in der Malschule von Ernst Linck (1914) und im Privatatelier bei Simon Hollósy, der an der Kunstakademie München lehrte. In Deutschland sah sie die Bilder von Paul Klee, Franz Marc oder August Macke. Studienreisen führten sie nach Rom und Florenz. 1926 heiratete sie Walter Pflugshaupt, der Lehrer an der Rudolf-Steiner-Schule in Basel war. Nach dem Unfalltod des Ehegatten 1928 gab sie an der Steiner-Schule Stellvertretungen. Ab 1930 lebte Pflugshaupt in Oberhofen am Thunersee, ab 1936 in Faulensee und ab 1959 bis zu ihrem Tod 1991 in Thun. Ihr Nachlass kam in die Kunstsammlung Hans & Marlis Suter und wurde dort mehrfach in Ausstellungen präsentiert. Hans Suter und Peter Killer würdigten Pflugshaupt 1994 mit einer Monografie. Das Kunstmuseum Thun zeigte 1984 eine repräsentativen Auswahl von Pflugshaupts Werken in einer Einzelausstellung. Werk Helene Pflugshaupt ist vor allem durch ausdrucksstarke Portraits von Frauen, Kindern und Mutter-Kind-Darstellungen bekannt. Die Malerin wurde 1914 in die Gesellschaft schweizerischer Malerinnen und Bildhauerinnen aufgenommen. Das Frühwerk entstand zur Zeit des Expressionismus. Als kunstschaffende Frau erlangte sie nicht die Bekanntheit ihrer männlichen Schweizer Kollegen. Bei vielen ihrer Bilder ist der Einfluss der Anthroposophischen Gesellschaft spürbar, bei der sie ab 1917 Mitglied war. Ausstellungen (Auswahl) 1966: Galerie Aarequai in Thun 1974: Gruppenausstellung Kunstmuseum Thun 1979: Gruppenausstellung Kunstmuseum Thun 1984: Kunstmuseum Thun: Helene Pflugshaupt, Ausstellung zum 90. Geburtstag 1994: Retrospektive, Kunstkommission Steffisburg 2004 und 2010: Kunstsammlung Hans & Marlis Suter, Wichterheergut Oberhofen 2014: «Höchhus» Steffisburg (mit Regula Hadorn und Nell Graber) Werke in Sammlungen und im öffentlichen Raum (Auswahl) Kunstmuseum Thun Kunstsammlung Hans & Marlis Suter, Steffisburg Schönau-Schulhaus Thun Literatur Peter Killer, Hans Suter: Helene Pflugshaupt. Stämpfli, 1994 Peter Killer, Irene Stoll-Kern: Kunstsammlung Hans & Marlis Suter. Stämpfli, 2005. Einzelnachweise Weblinks Kunstsammlung Hans & Marlis Suter: http://www.sammlung-suter.ch/galerie Helene Pflugshaupt bei Artnet Maler (Schweiz) Maler der Moderne Landschaftsmaler Maler des Expressionismus Person (Kanton Bern) Schweizer Geboren 1894 Gestorben 1991 Frau"} {"instruction": "Identify the bug in the following code and provide a solution.", "input": "def calculate_average(numbers): sum = 0 for number in numbers: sum += numbers return sum/len(numbers)", "output": "The bug in the code is that the variable \"number\" is not used inside the for loop. Instead, the variable \"numbers\" is used. To fix this, the line \"sum += numbers\" should be replaced with \"sum += number\". This will ensure that the correct variable is used inside the loop and the code will execute as expected."} {"instruction": "Create a vector in R to count the occurrences of a given number in an array", "input": "arr = c(1,1,2,2,2,2,3,3,4,4,4)", "output": "vector <- c() for (i in arr) { count <- length(which(arr == i)) vector <- c(vector, count) }"} {"instruction": "Generate a Java code snippet for declaring an empty list", "input": "", "output": "List list = new ArrayList<>();"} {"instruction": "Write an HTML page including the given text.", "input": "This is a test page", "output": " Test Page

    This is a test page

    "} {"text": "[CS Wikipedia] Architektura Paříže\n\nVe městě Paříž se nachází velké množství světských a církevních stavebních památek od dob římské Galie po současnost zastupující všechny architektonické slohy. Památky jako Eiffelova věž, bazilika Sacré-Cœur, Louvre, katedrála Notre-Dame, Invalidovna nebo Vítězný oblouk a Champs-Élysées jsou charakteristické symboly Paříže. Nachází se zde však i jiné historické i moderní architektonické struktury, které byly v průběhu věků formovány historií Paříže. Charakteristika Většina francouzských panovníků již od středověku zanechalo své stopy ve vzhledu města, které ve svých dějinách neprošlo nikdy rozsáhlým zničením, na rozdíl např. od Londýna (Velký požár v roce 1666), Lisabonu (zemětřesení roku 1755) nebo Berlína (bombardování v roce 1945). Dispoziční řešení mnoha základních ulic zůstalo během staletí zachováno a doplněno v 19. i 20. století během modernizace infrastruktury. Město se rozvíjelo po obou březích řeky Seiny, ve které se nacházelo asi deset ostrovů a písčin, z nichž se do dnešních dnů dochovaly jen dva. Současný vzhled města vychází z velké části z přestavby Paříže, kterou vedl prefekt Haussmann v období Druhého císařství, kdy byly proraženy dnešní nejrušnější trasy (Boulevard Saint-Germain, Boulevard de Sébastopol aj.) Tehdy ve většině Paříže zmizely labyrinty úzkých ulic a domy postavené v horních patrech ze dřeva nebo z hrázděného zdiva. Tehdy vznikla charakteristická zástavba bulvárů, tj. stejně vysokých domů s novoklasicistní fasádou, francouzskými okny a balkóny v pátém patře lemovanými stromořadím. Kvůli přísným regulačním vyhláškám o vzhledu a velikosti domů v 19. století tak dnes pařížská zástavba působí jednolitě a vyrovnaně. Některá nařízení o omezené výšce domů platí doposud, stavba nových budov vyšších než 37 metrů je povolována je ve výjimečných případech, v některých obvodech je tato hranice ještě nižší. Tour Montparnasse (210 metrů) z roku 1973 je nejvyšší stavbou v Paříži a do roku 2009 i ve Francii. V 70. letech vznikla skupina výškových budov (cca 100 m) ve čtvrti Beaugrenelle na břehu Seiny poblíž Eiffelovy věže a ve 13. obvodu (Operace Italie 13). Dnes mrakodrapy vznikají pouze mimo hranice Paříže v blízkém předměstí, a to zejména ve čtvrti La Défense ve městě Courbevoie. Pevně stanovené hranice města, přísné stavební podmínky a nedostatek stavebních pozemků vytváří jev zvaný muséification (muzeumifikace), kdy se městská správa snaží uchovat historickou podobu Paříže, což zamezuje vzniku velkých staveb uvnitř města. Tato restrikce je kritizována opozičními politiky. Mnoho pařížských institucí a podniků už bylo přemístěno, nebo plánují přesun na předměstí. Finanční a další instituce (např. ministerstvo dopravy) našly kanceláře v obchodní čtvrti La Défense, hlavní tržnice byla z centra Paříže přeložena v roce 1969 do Rungis,…"} {"text": "[HI Wikipedia] सुल्तानगंज\n\nसुल्तानगंज (अंग्रेजी: Sultanganj) भारत के बिहार राज्य के भागलपुर जिला में स्थित एक ऐतिहासिक स्थल है। यह गंगानदी के तट पर बसा हुआ है। यहाँ बाबा अजगबीनाथ का विश्वप्रसिद्ध प्राचीन मन्दिर है। उत्तरवाहिनी गंगा होने के कारण सावन के महीने में लाखों काँवरिये देश के विभिन्न भागों से गंगाजल लेने के लिए यहाँ आते हैं। यह गंगाजल झारखंड राज्य के देवघर स्थित बाबा बैद्यनाथ को चढाते हैं। बाबा बैद्यनाथ धाम भगवान शिव के बारह ज्योतिर्लिंगों में एक माना जाता है। सुल्तानगन्ज हिन्दू तीर्थ के अलावा बौद्ध पुरावशेषों के लिये भी विख्यात है। सन १८५३ ई० में रेलवे स्टेशन के अतिथि कक्ष के निर्माण के दौरान यहाँ से मिली बुद्ध की लगभग ३ टन वजनी ताम्र प्रतिमा आज बर्मिन्घम म्यूजियम में रखी है। धार्मिक महत्व सुल्तानगंज एक प्राचीन बौद्ध धर्म का केन्द्र है जहाँ कई बौद्ध विहारों के अलावा एक स्तूप के अवशेष भी प्राप्त हुए हैं। सुल्तानगंज में बाबा अजगबीनाथ का विश्वप्रसिद्ध और प्राचीन मन्दिर है। सुल्तानगंज से एक विशाल गुप्तकालीन कला की बौद्ध प्रतिमा मिली है, जो वर्तमान में बर्मिघम (इंग्लैण्ड) के संग्रहालय में सुरक्षित है। यह बुद्ध प्रतिमा दो टन से भी अधिक भारी तथा दो मीटर ऊँची है। इस प्रतिमा में महात्मा बुद्ध के शीश पर कुंचित केश तो हैं परन्तु उसके चारों ओर प्रभामण्डल नहीं है। यह ताम्र प्रतिमा नालंदा शैली की प्रतीत होती है जबकि सुप्रसिद्ध इतिहासकार राखाल दास बनर्जी ने इसे पाटलिपुत्र शैली में निर्मित्त माना है। सांख्यकीय आँकड़े 2001 की जनगणना के अनुसार सुल्तानगंज की कुल जनसंख्या 41,812 थी। इसमें 54% पुरुष तथा 46% स्त्रियाँ थीं। यहाँ की औसत सक्षरता दर 52% थी जो कि राष्ट्रीय औसत (59.5%) से कम थी। उस समय पुरुषों का साक्षरता अनुपात 60% तथा महिलाओं का 43% आँका गया था। कुल जनसंख्या में 17% बच्चे 6 वर्ष से कम आयु के थे।. प्रमुख दर्शनीय स्थल सुल्तानगंज में उत्तर वाहिनी गंगा (उत्तर दिशा में बहने वाली गंगा) के साथ एक बहुश्रुत किंवदन्ती भी प्रसिद्ध है। कहते हैं जब भगीरथ के प्रयास से गंगा का स्वर्ग से पृथ्वी पर अवतरण हुआ तो उनके वेग को रोकने के लिये साक्षात भगवान शिव अपनी जटायें खोलकर उनके प्रवाह-मार्ग में आकर उपस्थित हो गये। शिवजी के इस चमत्कार से गंगा गायब हो गयीं। बाद में देवताओं की प्रार्थना पर शिव ने उन्हें अपनी जाँघ के नीचे बहने का मार्ग दे दिया। इस कारण से पूरे भारत में केवल यहाँ ही गंगा उत्तर दिशा में बहती है। कहीं और ऐसा नहीं है। चूंकि शिव स्वयं आपरूप से यहाँ पर प्रकट हुए थे अत: श्रद्धालु लोगों ने यहाँ पर स्वायम्भुव शिव का मन्दिर स्थापित किया और उसे नाम दिया अजगवीनाथ मन्दिर। अर्थात एक ऐसे देवता का मन्दिर जिसने साक्षात उपस्थित होकर यहाँ वह चमत्कार कर दिखाया जो किसी सामान्य व्यक्ति से सम्भव न था। जो भी लोग यहाँ सावन के महीने में काँवर के लिये गंगाजल लेने आते हैं वे इस मन्दिर में आकर भगवान शिव की पूजा अर्चना और जलाभिषेक करना कदापि नहीं भूलते। इस दृष्टि से यह मन्दिर यहाँ का अति महत्वपूर्ण दर्शनीय स्थल है। यातायात के साधन सुल्तानगंज पूरे वर्ष भर भागलपुर, पटना और मुँगेर जिले से सड़क मार्ग द्वारा जुड़ा रहता है। पूर्व रेलवे की लूप लाइन से होकर यात्री किओल और कोलकाता भी सुगमता पूर्वक आ-जा सकते हैं। अब तो…"} {"instruction": "Design a Python program to read in a list of list of strings, eliminate duplicate entries, sort them and print out the result.", "input": "[['b', 'a', 'd'], ['c', 'a', 'd'], ['a', 'f', 'g']]", "output": "def removeduplicates(list_of_string):\n result = []\n for item in list_of_string:\n if item not in result:\n result.append(item)\n result.sort()\n return result\n\nlist_of_string = [['b', 'a', 'd'], ['c', 'a', 'd'], ['a', 'f', 'g']]\nprint(removeduplicates(list_of_string))"} {"instruction": "Define a function to remove all the even numbers from a list in Python.", "input": "sample_list = [1,2,3,4,5,6,7,8]", "output": "sample_list = [1,2,3,4,5,6,7,8] def remove_even_numbers(lst): for num in lst: if num % 2 == 0: lst.remove(num) return lst print(remove_even_numbers(sample_list))"} {"instruction": "Construct a decision tree in Python, based on the given input data.", "input": "Input = [Gender ('M' or 'F'), Age, Income, Vehicle]\nTarget = Loan Approval/Rejection (1 or 0)\n\n[\n ['M', 24, 33800, 'Petrol'], \n ['F', 35, 35000, 'Electric'], \n ['F', 40, 45000 , 'Petrol'], \n ['M', 20, 25000, 'Electric'],\n ['M', 30, 32000, 'Petrol'],\n [F', 50, 60000, 'Electric'], \n]", "output": "from sklearn import tree\n\n# Prepare Input\nInput = [['M', 24, 33800, 'Petrol'], \n ['F', 35, 35000, 'Electric'], \n ['F', 40, 45000 , 'Petrol'], \n ['M', 20, 25000, 'Electric'],\n ['M', 30, 32000, 'Petrol'],\n ['F', 50, 60000, 'Electric']]\n\n# Prepare Target\nTarget = [1, 0, 1, 0, 0, 1]\n\n# Create a decision tree\nmodel = tree.DecisionTreeClassifier()\n\n# Train the model \nmodel.fit(Input,Target)\n\n# Visualize the decision tree\ntree.plot_tree(model)"} {"text": "[DE Wikipedia] CFE738\n\nDas CFE738 ist ein Zweiwellen-Turbofan-Triebwerk, das für Geschäftsreiseflugzeuge entwickelt wurde und in der Dassault Falcon 2000 eingesetzt wird. Hersteller dieses Triebwerkes ist die CFE Company, ein Joint-Venture von General Electric und Garrett/AlliedSignal (später Honeywell). Weil es von General Electric vertrieben wird, wird es auch als General Electric CFE738 bzw. GE38 bezeichnet. Geschichte Die Entwicklung des Triebwerkes begann 1987 nach der Gründung der CFE Company. Als Basis diente die GE-Entwicklung eines Turboprop-Antrieb unter dem Namen T407 oder GLC38 für die Lockheed P-7 mit einer maximalen Startleistung von 4475 kW. GE lieferte das Kerntriebwerk sowie die Triebwerkssteuerung und Allied Signal/Honeywell den Fan, die Niederdruckturbine sowie das Getriebe für die Hilfsantriebe. Im Laufe des Jahres 1991 wurde die Turbine erstmals im Flug erprobt. Am 17. Dezember 1993 konnte die FAA-Musterzulassung für das CFE738-1 erreicht werden. Bis zum Jahr 2007 wurden mehr als 400 Stück des CFE738-Triebwerks gebaut. Das Triebwerk dient gemeinsam mit dem 1983 erprobten Technologiedemonstrator GE27 als Basis für eine Hubschrauberturbine mit dem Namen GE38-1B für die Sikorsky CH-53K und könnte auch im zukünftigen europäischen Schwerlasthubschrauber FTH zum Einsatz kommen. Sikorsky wählte die Turbine gegen das AE 1107 von Rolls-Royce und das PW100 von Pratt & Whitney Canada im Dezember 2006 aus. Der Erstlauf dieses 5.595 kW starken Antriebes war für Anfang 2009 geplant und fand dann am 19. Juni 2009 in Lynn (Massachusetts) statt. Aufbau Das CFE738 besteht aus einem einstufigen Fan mit 28 aus Titan hergestellten Blättern welcher von einer dreistufigen Niederdruckturbine angetrieben wird. Beim GE38-1B treibt die Niederdruckturbine die Abtriebswelle anstelle des Fans an. Der fünfstufige axiale Verdichter der durch einen einstufigen radialen Verdichter ergänzt wird, wird durch eine zweistufige gekühlte Hochdruckturbine angetrieben. Das Triebwerk verfügt über ein maximales Gesamtdruckverhältnis von 35:1. Das Nebenstromverhältnis liegt bei 5,3 und der Startschub bei 24,9 kN (Rating ISA+15C). Die Brennkammer ist ringförmig ausgeführt und verfügt über 15 Einspritzdüsen. Der Mixer besitzt 20 Mischrinnen. Es besteht die Möglichkeit, eine Schubumkehr anzubauen. Das Triebwerk wird durch ein zweifach redundantes FADEC-System gesteuert. Die Lebensdauer eines GE38-1B liegt bei 6000 Stunden. Technische Daten Fan/Verdichterstufen: 1/5 axial + 1 radial Hochdruck-/Niederdruck-Turbinenstufen: 2/3 Fan-Durchmesser: ~ 0,9 m (0,69 m beim GE38-1B) Länge: 2,51 m (1,46 m beim GE38-1B) Trockengewicht: 600 kg Schub (auf Meereshöhe): 26,33 kN Spezifischer Kraftstoffverbrauch (Meereshöhe/Reiseflug): 10,54/18,27 mg/Ns Gesamtdruckverhältnis (Meereshöhe/Reiseflughöhe): 23:1/30:1…"} {"instruction": "Determine how many characters are in a given string.", "input": "my_string = \"Hello, world!\"", "output": "length = len(my_string) print(length) # 13"} {"text": "[HI Wikipedia] साइक्स-पिकाट समझौता\n\nसाइक्स-पिकाट समझौता, जो आधिकारिक तौर पर एशिया माइनर समझौते के रूप में जाना जाता है। ब्रिटेन और फ्रांस की सरकारों के बीच एक गुप्त समझौता था, जिसे रूस की स्वीकृति भी थी। यह समझौता पश्चिमी एशिया में ट्रिपल अंतेंत के अपने प्रस्तावित नियंत्रण और प्रभाव क्षेत्रों को परिभाषित करने के लिए था, अगर प्रथम विश्व युद्घ में ट्रिपल अंतेंत तुर्क साम्राज्य को हराने में सफल होता है। संधि की बातचीत नवंबर 1915 और मार्च 1916 के बीच हुई। समझौता 16 मई 1916 को संपन्न हुआ था। समझौते में प्रभावी ढंग से अरब प्रायद्वीप के बाहर तुर्क साम्राज्य के अरब प्रांतों को भविष्य के ब्रिटिश और फ्रांसीसी नियंत्रण या प्रभाव के क्षेत्रों में विभाजित किया गया था। इस पर फ्रांसीसी राजनयिक फ्रंकोईस जॉरजिस पिकाट और ब्रिटिश सर मार्क साइक्स से बातचीत हुई। रूसी जारिस्ट सरकार साइक्स - पिकाट समझौता के लिए एक छोटी मध्यस्थ पार्टी थी। और जब अक्टूबर 1917 की रूसी क्रांति के बाद बोल्शेविकों ने इस समझौते को उजागरकर दिया तब ब्रिटिश शर्मिंदा, अरब निराश और तुर्क खुश थे। इन्हें भी देखें बाहरी कड़ियाँ सन्दर्भ बहुराष्ट्रीय संधियाँ"} {"text": "[DE Wikipedia] John Barton Payne\n\nJohn Barton Payne (* 26. Januar 1855 in Pruntytown, Taylor County, (Virginia); † 24. Januar 1935 in Washington, D.C.) war ein US-amerikanischer Rechtsanwalt und von 1920 bis 1921 Innenminister der Vereinigten Staaten im Kabinett von US-Präsident Woodrow Wilson. Von 1922 bis 1935 fungierte er als Chairman der Liga der Rotkreuz-Gesellschaften, der heutigen Internationalen Rotkreuz- und Rothalbmond-Bewegung. Leben Der im heutigen West Virginia geborene John Barton Payne erhielt 1876 die Zulassung als Anwalt und begann fünf Jahre später eine politische Karriere mit der Wahl zum Chairman der Demokratischen Partei im Preston County. 1883 zog er nach Chicago und wurde dort 1893 zum Richter gewählt. Fünf Jahre später trat er von diesem Amt zurück und wurde Seniorpartner in der Kanzlei Winston, Payne, Strawn and Shaw. Als Anwalt entwickelte er sich zu einem Spezialisten im Bereich des Bahnrechts. 1913 heiratete er Jennie Byrd, sie starb allerdings bereits sechs Jahre später. Mit dem Ausbruch des Ersten Weltkrieges ging er nach Washington und war dort als Berater der United States Shipping Board Merchant Fleet Corporation und der Bahnverwaltung tätig. Im Rahmen dieser Tätigkeit organisierte er nach dem Kriegseintritt die staatliche Übernahme des Bahnwesens in den USA. Von 1919 bis zu seiner Berufung ins Kabinett Wilson war er Chairman des United States Shipping Board. Am 15. März 1920 übernahm er das US-Innenministerium und leitete es bis zum 4. März 1921. Im Oktober 1921 wurde er Chairman des Amerikanischen Roten Kreuzes und übte dieses Amt bis zu seinem Tod aus. 1922 folgte er darüber hinaus Henry Pomeroy Davison als Chairman der 1919 gegründeten Liga der Rotkreuz-Gesellschaften. Schwerpunkt seiner Tätigkeit für das Amerikanische Rote Kreuz war die Werbung von Freiwilligen und die Professionalisierung der Rotkreuz-Arbeit durch die verstärkte Einstellung von hauptamtlichen Mitarbeitern. Darüber hinaus organisierte er eine Ausweitung der Aktivitäten des Amerikanischen Roten Kreuzes in internationalen Hilfsmissionen sowie im Bereich der Wohlfahrtspflege während der Zeit der Großen Depression. Schwerpunkt seiner Arbeit für die Liga war der Bereich der medizinischen Vorsorge und der Jugendarbeit des Roten Kreuzes. Durch eine Spende von 50 Gemälden 1919 und 100.000 US-Dollar im Jahr 1932 ermöglichte er darüber hinaus die Gründung des Virginia Museum of Fine Arts in Richmond. Er starb 1935 an einer Lungenentzündung infolge einer Appendizitis-Operation. Sein Nachfolger als Chairman des Amerikanischen Roten Kreuzes und der Liga der Rotkreuz-Gesellschaften wurde Cary Travers Grayson. Literatur Payne, John Barton. In: The Guide to American Law: Everyone's Legal Encyclopedia. West Publishers, St. Paul 1984, ISBN 0-31-473224-1, Band 8, S. 154 Weblinks John Barton Payne…"} {"instruction": "Create a web scraper in Python that extracts information from a webpage and stores it in a JSON object.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\nimport json\n\nurl = 'http://example.com/'\n\npage = requests.get(url)\nsoup = BeautifulSoup(page.content, 'html.parser')\n\n# Get the information\ninformation = {} \ninformation['title'] = soup.title.string\ninformation['h1'] = soup.h1.string\ninformation['description'] = soup.find('meta', attrs={'name':'description'})['content']\n\n# Save the information\nwith open('information.json', 'w') as f:\n json.dump(information, f)\nprint('Data saved!')"} {"instruction": "Create a Python script that scrapes a website for all the external links present in the page.", "input": "Not applicable", "output": "import requests \nfrom bs4 import BeautifulSoup \n \ndef extract_links_from_url(url): \n \n # make a request to the URL \n r = requests.get(url) \n \n # create a beautiful soup object \n soup = BeautifulSoup(r.content,'html5lib') \n \n # find and return hyperlinks(a tags) \n return [link['href'] for link in soup.find_all('a', href=True)]"} {"instruction": "Write a Python script to concatenate two strings.", "input": "", "output": "def concatenate(word1, word2):\n return word1 + word2"} {"instruction": "Develop a functional web spider in Python that can crawl the web and collect articles from a given topic related to technology.", "input": "Not applicable", "output": "import requests\nfrom bs4 import BeautifulSoup\n\ndef web_spider(max_pages):\n page = 1\n while page <= max_pages:\n # Make request to target page\n source_code = requests.get('http://example.com/tech/page' + str(page))\n plain_text = source_code.text\n soup = BeautifulSoup(plain_text, 'html.parser')\n # Get data from html page\n for link in soup.find_all('a', {'class': 'articles-list-item__title'}):\n href = link.get('href')\n title = link.string\n # print the link, title, page number\n print(href)\n print(title)\n # increment the page number\n page += 1\n\n# Main function\nif __name__ == '__main__':\n web_spider(2)"} {"instruction": "Write a Python program to generate a random number between 1 and 10.", "input": "", "output": "import random \n\nrandom_num = random.randint(1, 10) \nprint(random_num)"} {"instruction": "Using PHP, how can you print the JavaScript code that displays an alert message with the text “Hello World”?", "input": "", "output": "echo \"\";"} {"instruction": "What are the main components of an object oriented programming language?", "input": "", "output": "The main components of an object oriented programming language are classes, objects, methods, and inheritance. Classes are the blueprint used to create objects, methods are the functions which act on objects, and inheritance is the ability for classes to define a common set of characteristics."} {"instruction": "Write a python program to encrypt a string using the Caesar cipher.", "input": "plain_text = 'Lorem ipsum dolor sit amet'", "output": "def caesar_encrypt(plain_text, shift): \n cipher = ''\n for char in plain_text: \n if char == ' ': \n cipher = cipher + char \n elif char.isupper(): \n cipher = cipher + chr((ord(char) + shift - 65) % 26 + 65) \n \n else: \n cipher = cipher + chr((ord(char) + shift - 97) % 26 + 97) \n \n return cipher \n \n\nresult = caesar_encrypt(plain_text, 3)\nprint(result)"} {"text": "[HI Wikipedia] अहमदाबाद\n\nअहमदाबाद (Ahmedabad) या अमदावाद (Amdavad) भारत के गुजरात राज्य का सबसे बड़ा नगर है। यह अहमदाबाद ज़िले का मुख्यालय भी है। भारतवर्ष में यह नगर का सातवें स्थान पर है। इक्क्यावन लाख की जनसंख्या वाला ये शहर, साबरमती नदी के किनारे बसा हुआ है। १९७० में गांधीनगर में राजधानी स्थानांतरित होने से पहले अहमदाबाद ही गुजरात की राजधानी हुआ करता था। प्रारम्भ में अहमदाबाद को अशावल कहा जाता था। इस शहर की बुनियाद सन १४११ में डाली गयी थी। शहर का नाम सुलतान अहमद शाह पर पड़ा था। इतिहास अहमदाबाद को \"भारत का मेनचेस्टर\" भी कहा जाता है। वर्तमान समय में, अहमदाबाद को भारत के गुजरात राज्य के एक प्रमुख औद्योगिक शहर के रूप में जाना जाता है। अहमदाबाद का इतिहास भील राजाओं से प्रारंभ होता है। देवेन्द्र पटेल जी की श्रंखला \"पटेल महाजाती\" में भील राजा आशा भील जी को पटेलो का कड़वा पूर्वज बताया गया है। अंतिम भील राजा आशा भील थे। राजा आशा भील के समय अहमदाबाद साम्राज्य या अशावाल साम्राज्य स्थापित हुआ, जो साबरमती से लेकर कच्छ तक फैला हुआ था। कई इतिहासकारों ने कर्णदेव और अहमदशाह को भील राजा से संघर्ष करते हुए दिखाया है और फिर अहमदाबाद पर इन तीनों राजाओं का शासन इतिहास में बताया है। ऐतिहासिक तौर पर, भारतीय स्वतंत्रता संघर्ष के दौरान अहमदाबाद प्रमुख शिविर आधार रहा है। इसी शहर में महात्मा गांधी ने साबरमती आश्रम की स्थापना की और स्‍वतंत्रता संघर्ष से जुड़ें अनेक आन्‍दोलन की शुरुआत भी यही से हुई थी। अहमदाबाद ऊन की बुनाई के लिए भी काफ़ी प्रसिद्ध है। इसके साथ ही यह शहर व्यापार और वाणिज्य केन्द्र के रूप में बहुत अधिक विकसित हो रहा है। अंग्रेज़ी हुकूमत के दौरान, इस जगह को फ़ौज़ी तौर पर इस्तमाल किया जाता था। अहमदाबाद इस प्रदेश का सबसे प्रमुख शहर है। वर्तमान समय में अहमदाबाद को भारत के गुजरात प्रांत की राजधानी होने के साथ साथ अहमदाबाद को एक प्रमुख औद्योगिक शहर के रूप में जाना जाता है। भूगोल पश्चिम भारत में बसा ये शहर, समुद्र से १७४ फ़ुट की ऊंचाई पर स्थित है। शहर में दो झीलें हैं - कांकरीया और वस्त्रापुर। साबरमती नदी शहर को दो भागों में बांटती है – पूर्वी और पश्चिम अहमदाबाद। पूर्वी अहमदाबाद में अहमदाबाद का पुराना शहर स्थित है जिसकी विशेषता खचाखच भरे बाज़ारों, पोल प्रणाली और कई पूजा स्थल हैं। पोल एक आवास समूह है जिसमें एक विशेष समूह के कई परिवार शामिल होते हैं, जो जाति, पेशे या धर्म से जुड़े होते हैं। अंग्रेज़ी शाषण काल में साबरमती के पश्चिम तट पर शहर का विस्तार हुआ। १८७२ में साबरमती पर पहला पुल, एलिस पुल, बनाया गया था। आज पश्चिम अहमदाबाद में कई शैक्षिक संस्थान, आधुनिक भवन, आवासीय क्षेत्र, शॉपिंग मॉल, मल्टीप्लेक्स और नए व्यावसायिक जिले हैं। जलवायु बारिश के महिनों के अलावा पूरे साल गर्मी का माहौल रहता है। सबसे उच्च तापमान ४७ डिग्री तक पहुँचता है और कम से कम ५ डिग्री तक ठंड के समय। २० मई २०१६ को उच्च तापमान ४८ डिग्री दर्ज़ किया गया था। प्रशासन अहमदाबाद नगर निगम इस शहर के देख रेख का काम सम्भालता है और कुछ भाग औडा सम्भालता है। पर्यटन काँकरिया झील इस झील का निर्माण कुतुब-उद्-दीन ने 1451 ईसवी में करवाया था। आज के समय में अहमदाबाद के निवासियों के बीच यह जगह सबसे अधिक प्रसिद्ध है। इस झील के चारों ओर बहुत ही…"} {"text": "[DE Wikipedia] Sragen (Regierungsbezirk)\n\nSragen ist ein indonesischer Regierungsbezirk (Kabupaten) in der Provinz Jawa Tengah, im Zentrum der Insel Java. Mitte 2022 leben hier etwa mehr als eine Million Menschen. Hauptstadt und Regierungssitz des Verwaltungsbezirks ist die Stadt Sragen, etwa 75 km südöstlich der Provinzhauptstadt Semarang und 30 km nordöstlich von Surakarta gelegen. Geografie Sragen erstreckt sich zwischen 7°15′ und 7°30′ s. Br. sowie zwischen 110°45′ und 111°10′ ö. L. Er grenzt im Süden an den Regierungsbezirk Karanganyar, im Westen an Boyolali, im Norden an Grobogan sowie im Osten an Ngawi (zur Provinz Ostjawa gehörig). Der längste Fluss Javas, der Bengawan Solo, fließt durch die fruchtbaren Reisfelder der Region. Die archäologische Ausgrabungsstätte und UNESCO-Welterbestätte Sangiran befindet sich in Sragen. Verwaltungsgliederung Administrativ unterteilt sich Sragen in 20 Distrikte (Kecamatan), die aus 208 Dörfern bestehen (davon haben 12 als Kelurahan urbanen Charakter). Eine weitere Untergliederung erfolgt in 5.480 Rukun Tetangga (RT, Nachbarschaften). Demographie Zur Volkszählung im September 2020 lebten im Kabupaten Sragen 976.951 Menschen, davon 490.122 Frauen (50,17 %) und 486.829 Männer. Gegenüber dem letzten Census (2010) sank der Frauenanteil um 0,74 Prozent. 68,72 % (671.327) gehörten 2020 zur erwerbsfähigen Bevölkerung; 21,70 % waren Kinder (bis 14 Jahre) und 9,58 % waren im Rentenalter (ab 65 Jahren). Mitte 2022 bekannten sich 98,22 Prozent der Einwohner zum Islam, Christen waren mit 1,67 % (10.863 ev.-luth. / 5.934 röm.-kath.) vertreten, 0,08 % waren Hinus und 0,02 % waren Buddhisten. Zur gleichen Zeit waren von der Gesamtbevölkerung 40,58 % ledig; 51,17 % verheiratet; 2,18 % geschieden und 6,07 % verwitwet. Bevölkerungsentwicklung Bevölkerungsentwicklung des Kabupaten Sragen von 1971 bis 2020 Ergebnisse der Volkszählungen Nr. 3 bis 8 – Sensus Penduduk (SP) Ergebnisse von drei intercensalen Bevölkerungsübersichten (1995, 2005, 2015) – Survei Penduduk Antar Sensus (SUPAS) Jahresendbevölkerung durch Fortschreibung Weblinks mannigfaltige Publikationen im PDF-Format auf der Statistikseite des Kabupaten Sragen (indonesisch/englisch) Open Data Kabupaten Sragen (indonesisch) Einzelnachweise Kabupaten in Jawa Tengah Geographie (Java)"} {"text": "[EN Wikipedia] Te Arai River\n\nThe Te Arai River is a river of the Gisborne Region of New Zealand's North Island. It flows generally north from its origins in rough hill country north of Nūhaka before veering northeast past the township of Manutuke to reach the Waipaoa River five kilometres from the latter's outflow into Poverty Bay. Since 16 July 2020 the official name of the river has been Te Ārai River. See also List of rivers of New Zealand References Rivers of the Gisborne District Rivers of New Zealand"} {"instruction": "Write a JavaScript expression to check whether the string \"Hello World\" is present in another string.", "input": "var test_str = \"Hello World is a popular phrase\";", "output": "test_str.includes(\"Hello World\");"} {"text": "[HI Wikipedia] लोक जनशक्ति पार्टी\n\nलोक जनशक्ति पार्टी (:लोजपा), एक राज्य स्तरीय मान्यता प्राप्त राजनैतिक दल है, जो मुख्य रूप से भारत के बिहार राज्य की राजनीति में सक्रिय थी। पार्टी का गठन 2000 में हुआ जब रामविलास पासवान जनता दल से अलग हो गए। बिहार में दलितों के बीच पार्टी की अच्छी-खासी पकड़ थी। 2021 में पार्टी दो पार्टियों लोक जनशक्ति पार्टी (रामविलास) और राष्ट्रीय लोक जनशक्ति पार्टी में बंट गई। स्थापना लोक जनशक्ति पार्टी अथवा लोजपा की स्थापना रामविलास पासवान ने की थी। नेतृत्व राष्ट्रीय अध्यक्ष- चिराग पासवान, सांसद बिहार प्रदेशाध्यक्ष- प्रिंस राज, सांसद लोकसभा चुनावी राजनीति लोकसभा चुनाव 2009 लोकसभा चुनाव 2009 में रामविलास पासवान ने सपा अध्यक्ष मुलायम सिंह यादव और राजद अध्यक्ष लालू प्रसाद यादव के साथ उत्तर प्रदेश एवं बिहार की सभी 120 लोकसभा सीटों पर चुनाव लड़ने के लिए ऐतिहासिक गठबन्धन करते हुए चौथा मोर्चा बनाने का प्रयास किया। उस समय इस मोर्चे के पास लोकसभा में 64 सांसदों की संख्या थी। इस गठबन्धन के तहत उत्तर प्रदेश की सभी 80 सीटों पर सपा एवं बिहार की 40 सीटों में से 28 पर राजद तथा शेष 12 सीटों पर लोजपा ने उम्मीदवार उतारे। आशा के विपरीत यह मोर्चा अपेक्षाकृत प्रदर्शन करने में विफल रहा तथा 120 में से केवल 28 पर ही जीत सका। लोक जनशक्ति पार्टी को एक भी सीट पर जीत नहीं मिली। लोकसभा चुनाव २०१९ लोकसभा चुनाव २०१९ में लोजपा ने एक बार पुनः भाजपा के नेतृत्व वाले राजग के साथ चुनाव में भाग लिया था जिसके अनुसार बिहार की ४० सीटों में से भाजपा १७, जदयू १७ एवं लोजपा के हिस्से में ६ सीटें आईं, तथा साथ ही साथ एक राज्यसभा की सीट भी लोजपा के खाते में आई। लोजपा ने सभी छः स्थानों पर जीत हासिल की। इन चुनावों में पार्टी अध्यक्ष रामविलास पासवान ने स्वास्थ्य कारणोंवश भाग नहीं लिया तथा राज्यसभा के माध्यम से सांसद बने। बिहार विधानसभा चुनाव 2020 बिहार विधानसभा चुनाव, 2020 में लोजपा अध्यक्ष चिराग पासवान ने बिना किसी गठबन्धन के अकेले दम पर ही चुनाव लड़ने की घोषणा की। पार्टी पूरे राज्य की 143 सीटों पर चुनाव लड़ी। चिराग पासवान ने चुनाव के बाद भाजपा के नेतृत्व में राजग की सरकार बनाने के लिए समर्थन करने की बात कही। 10 नवम्बर 2020 को आए नतीजों में लोजपा को केवल एक सीट पर ही जीत हासिल हुई। पार्टी को पूरे राज्य में कुल 23,83,457 मत हासिल हुए जो कि कुल पड़े वैध मतों का 5.66% रहा। एकमात्र बेगूसराय ज़िले की मटिहानी विधानसभा सीट पर लोजपा के राज कुमार सिंह ने विजय प्राप्त की, उन्होंने निकट प्रतिद्वन्द्वी जदयू के नरेन्द्र कुमार सिंह उर्फ बोगो सिंह एवं भाकपा (माले) के राजेन्द्र प्रसाद सिंह को कड़े मुकाबले में क्रमशः 333 एवं 765 मतों के मामूली अन्तर से हराया। चुनावी प्रदर्शन लोकसभा बिहार विधानसभा इन्हें भी देखें राष्ट्रीय जनता दल जनता दल (यूनाइटेड) जनता दल संदर्भ पुलिस की नौकरी छोड़ राजनीति में आए थे रामविलास पासवान, हाजीपुर से जीत का बनाया था वर्ल्ड रिकॉर्ड भारत के राजनीतिक दल"} {"instruction": "Output a code to edit the following HTML to add a new heading 'Introduction' before the existing heading 'About'.", "input": "

    About

    ", "output": "

    Introduction

    About

    "} {"instruction": "Use classes and objects to create an employee class with attributes such as name, age, salary, and role.", "input": "", "output": "class Employee: def __init__(self, name, age, salary, role): self.name = name self.age = age self.salary = salary self.role = role # Create an employee employee = Employee(\"John Doe\", 34, 10000, \"Software Engineer\")"} {"instruction": "Develop an algorithm in Python that takes a number as input and outputs the sum of all its divisors.", "input": "6", "output": "def sum_divisors(num):\n   # Initialize sum \n   summation = 0\n   \n   # Iterate upto num \n   for i in range(1, num+1):\n       # If num is divisible \n       # by i, add it to sum \n       if num%i == 0:\n           summation += i\n   # Return summation \n   return summation\n \n \n# Driver Code \nnum = 6\nresult = sum_divisors(num) \n \n# Printing result \nprint(result)"} {"instruction": "You need to rearrange the characters in a given string such that no two same characters are adjacent to each other.", "input": "abccab", "output": "def rearrange(string): seen = set() result = [] for char in string: if char not in seen: seen.add(char) result.append(char) else: for ch in string: if ch not in seen: seen.add(ch) result.append(ch) return ''.join(result)"} {"instruction": "Create an algorithm in Python for the classification of numbers into even or odd.", "input": "3", "output": "def classifyNumber(num): \n if num % 2 == 0: \n return \"even\"\n else: \n return \"odd\" \n \nprint(classifyNumber(3))"} {"instruction": "Create a table in SQL to store the names and email addresses of users.", "input": "", "output": "CREATE TABLE users ( name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL );"} {"text": "[CS Wikipedia] Šavnik\n\nŠavnik () je město v severní části Černé Hory. Bylo založeno roku 1861. Je neoficiální střediskem regionu Drobnjaci pojmenovaného podle stejnojmenného srbského klanu. Je centrem stejnojmenné opštiny s 2 947 obyvateli rozkládající se na 553 km². Samotné město má 570 obyvatel (údaj z roku 2003). Opština je vedle města tvořena také 27 dalšími vesnicemi. Sídla v opštině Externí odkazy Šavnik Města v Černé Hoře"} {"text": "[EN Wikipedia] Alfons Maria Jakob\n\nAlfons Maria Jakob (2 July 1884 – 17 October 1931) was a German neurologist who worked in the field of neuropathology. He was born in Aschaffenburg, Bavaria and educated in medicine at the universities of Munich, Berlin, and Strasbourg, where he received his doctorate in 1908. During the following year, he began clinical work under the psychiatrist Emil Kraepelin and did laboratory work with Franz Nissl and Alois Alzheimer in Munich. In 1911, by way of an invitation from Wilhelm Weygandt, he relocated to Hamburg, where he worked with Theodor Kaes and eventually became head of the laboratory of anatomical pathology at the psychiatric State Hospital Hamburg-Friedrichsberg. Following the death of Kaes in 1913, Jakob succeeded him as prosector. During World War I he served as an army physician in Belgium, and afterwards returned to Hamburg. In 1919, he obtained his habilitation for neurology and in 1924 became a professor of neurology. Under Jakob's guidance the department grew rapidly. He made significant contributions to knowledge on concussion and secondary nerve degeneration and became a doyen of neuropathology. Jakob was the author of five monographs and nearly 80 scientific papers. His neuropathological research contributed greatly to the delineation of several diseases, including multiple sclerosis and Friedreich's ataxia. He first recognised and described Alper's disease and Creutzfeldt–Jakob disease (named along with Munich neuropathologist Hans Gerhard Creutzfeldt). He gained experience in neurosyphilis, having a 200-bed ward devoted entirely to that disorder. Jakob made a lecture tour of the United States (1924) and South America (1928), of which, he wrote a paper on the neuropathology of yellow fever. He suffered from chronic osteomyelitis for the last seven years of his life. This eventually caused a retroperitoneal abscess and paralytic ileus from which he died following operation. Associated eponym Creutzfeldt–Jakob disease: A very rare and incurable degenerative neurological disease. It is the most common form of transmissible spongiform encephalopathies caused by prions. Eponym introduced by Walther Spielmeyer in 1922. Bibliography Die extrapyramidalen Erkrankungen. In: Monographien aus dem Gesamtgebiete der Neurologie und Psychiatry, Berlin, 1923 Normale und pathologische Anatomie und Histologie des Grosshirns. Separate printing of Handbuch der Psychiatry. Leipzig, 1927–1928 Das Kleinhirn. In: Handbuch der mikroskopischen Anatomie, Berlin, 1928 Die Syphilis des Gehirns und seiner Häute. In: Oswald Bumke (edit.): Handbuch der Geisteskrankheiten, Berlin, 1930. References People from Aschaffenburg Academic staff of the University of Hamburg German neurologists German neuroscientists 1884 births 1931 deaths"} {"instruction": "Develop a web scraper in Python that visits a website and retrieves the contents of the web page.", "input": "The URL of the website: https://www.example.com", "output": "import requests\n\nurl = \"https://www.example.com\"\n\nresponse = requests.get(url)\nif response.status_code == 200:\n html = response.content\n print(html)"} {"instruction": "Construct a Python script that deletes all the characters in a given string except for the vowels.", "input": "\"Hello World!\"", "output": "# Get the input string\nstring = \"Hello World!\"\n\n# Modify the string\nvowels = \"aeiou\"\nnew_string = \"\"\nfor char in string:\n if char in vowels:\n new_string += char\n\n# Print the string\nprint(new_string)\n# prints \"eoo\""} {"instruction": "Create a Python program to fetch customer records from a database.", "input": "", "output": "import mysql.connector\n\nconn = mysql.connector.connect(\n host=\"localhost\",\n user=\"root\",\n passwd=\"\",\n database=\"yourdatabase\"\n)\ncursor = conn.cursor()\nquery = \"SELECT * FROM customers\"\n\ncursor.execute(query)\nrows = cursor.fetchall()\nfor row in rows:\n customer_id, customer_name, customer_address = row\n print(f\"ID: {customer_id}, Name: {customer_name}, Address: {customer_address}\")\n\ncursor.close()\nconn.close()"} {"text": "[CS Wikipedia] Návrat domů\n\nSlovní spojení Návrat domů má více konkrétních významů: Návrat domů (nakladatelství), evangelicky zaměřené nakladatelství v Praze Návrat domů je v češtině také titul řady literárních (viz ), případně jiných uměleckých děl. Skladba Jiřího Sternwalda: Návrat domů pro sbor a symfonický orchestr (1974) Návrat domů, divadelní hra Harolda Pintera (v orig. The Homecoming, 1964; překlad Milan Lukeš ve sborníku Anglické absurdní divadlo, Orbis 1966) Návrat domů, román Rosamunde Pilcherové, (v orig. Coming Home, Knižní klub 1998, ) Návrat domů (minisérie), britská dvoudílná minisérie na motivy románu Rosamunde Pilcherové Návrat domů, kniha psychologa Johna Bradshawa (v orig. Homecoming, 1990; Portál 2018, ) Několikrát byl název použit ve science fiction: nesou ho román Frederika Pohla (v orig. Homegoing, 1989; Laser 1995, ) pentalogie O. S. Carda (v orig. Homecoming, 1992–1995), z níž česky vyšel pouze první díl Vzpomínky na zemi (The Memory of Earth; Classic And 1996, ) novela Roberta Silverberga (v orig. Homefaring, Amazing listopad 1983; česky v omnibusu Návrat domů. Gilgameš v pustinách, SLAN, Slaný 1992, ) Návrat domů (Star Trek) – epizoda seriálu Star Trek: Stanice Deep Space Nine Návrat domů (film, 1948) je též název českého filmu z roku 1948 (režie Martin Frič, námět Leopold Lahola) o návratu českého důstojníka z 2. světové války Návrat domů (film, 1978) – americký oscarový film z roku 1978"} {"instruction": "Create a Python script that uses a for loop to display the items from a list.", "input": "[apple, orange, banana]", "output": "# Create a list\nlist = ['apple', 'orange', 'banana']\n\n# Loop over the list\nfor item in list:\n print(item)"} {"instruction": "You need to code a program that converts a given number of days to years, month and days.", "input": "450 days", "output": "def convertToYMD(num_days): years = int(num_days/365) rem_days = num_days % 365 months = int(rem_days / 30) days = rem_days % 30 return [years, months, days]"} {"text": "[EN Wikipedia] Nuritamburia metallurgica\n\nNuritamburia metallurgica is a moth of the family Tortricidae. It was first described by Lord Walsingham in 1907. It is endemic to the Hawaiian islands of Oahu, Molokai, Lanai and Hawaii. The larvae possibly feed on Phyllanthus and Xylosma species. External links Archipini Endemic moths of Hawaii"} {"instruction": "Write a Python program to populate a database from a given dataset of products. This program should loop through each record of the dataset and check if the product has already been persisted, and if not, it should save the record to the database.", "input": "products_dataset: List[Dict[str, str]] = [\n {'name': 'baseball bat', 'price': 19.99, 'quantity': 20},\n {'name': 'soccer ball', 'price': 9.99, 'quantity': 10},\n {'name': 'football', 'price': 14.99, 'quantity': 5},\n]", "output": "import sqlite3\n\ndb = sqlite3.connect('products.db')\n\ncursor = db.cursor()\ncursor.execute(\"CREATE TABLE IF NOT EXISTS products (name text, price real, quantity integer)\")\n\nfor product in products_dataset:\n product_name = product['name']\n product_price = product['price']\n product_quantity = product['quantity']\n if not cursor.execute(f\"SELECT * FROM products WHERE name='{product_name}'\").fetchone():\n cursor.execute(f\"INSERT INTO products (name, price, quantity) VALUES ({product_name}, {product_price}, {product_quantity})\")\n db.commit()\n\ndb.close()"} {"text": "[DE Wikipedia] OHL 2000/01\n\nDie OHL-Saison 2000/01 war die 21. Spielzeit der Ontario Hockey League. Die reguläre Saison begann am 21. September 2000 und endete am 23. März 2001. Die Play-offs starteten am 24. März 2001 und endeten mit dem dritten J.-Ross-Robertson-Cup-Gewinn der Ottawa 67’s am 15. Mai 2001, die sich im OHL-Finale gegen die Plymouth Whalers durchsetzten. Reguläre Saison Abschlussplatzierungen Abkürzungen: GP = Spiele, W = Siege, L = Niederlagen, T = Unentschieden, OTL = Niederlage nach Overtime, GF = Erzielte Tore, GA = Gegentore, Pts = Punkte Erläuterungen: = Play-off-Qualifikation, = Division-Sieger, = Conference-Sieger, = Hamilton-Spectator-Trophy-Gewinner Eastern Conference Western Conference Beste Scorer Abkürzungen: GP = Spiele, G = Tore, A = Assists, Pts = Punkte, PIM = Strafminuten; Fett: Saisonbestwert Beste Torhüter Abkürzungen: GP = Spiele, TOI = Eiszeit (in Minuten), W = Siege, L = Niederlagen, OTL = Overtime-Niederlagen, T = Unentschieden, GA = Gegentore, SO = Shutouts, Sv% = gehaltene Schüsse (in %), GAA = Gegentorschnitt Play-offs Play-off-Baum J.-Ross-Robertson-Cup-Sieger Beste Scorer Abkürzungen: GP = Spiele, G = Tore, A = Assists, Pts = Punkte, PIM = Strafminuten; Fett: Saisonbestwert Beste Torhüter Abkürzungen: GP = Spiele, TOI = Eiszeit (in Minuten), W = Siege, L = Niederlagen, OTL = Overtime/Shootout-Niederlagen, GA = Gegentore, SO = Shutouts, Sv% = gehaltene Schüsse (in %), GAA = Gegentorschnitt Auszeichnungen All-Star-Teams All-Rookie-Teams Vergebene Trophäen Siehe auch Saison 2000/01 der Québec Major Junior Hockey League Saison 2000/01 der Western Hockey League Memorial Cup 2001 Weblinks Homepage der Ontario Hockey League Homepage der Canadian Hockey League OHL-Saison Eishockeysaison 2000/01"} {"instruction": "Create a class in Python using object-oriented programming that creates instance of a book.", "input": "", "output": "class Book(object):\n def __init__(self, title, author, year_published):\n self.title = title\n self.author = author\n self.year_published = year_published\n\n def __str__(self):\n return '{0} by {1} published in {2}.'.format(\n self.title, self.author, self.year_published)"} {"instruction": "Given an array of strings, write a JavaScript function to filter out all elements that are not palindromes.", "input": "[\"a\", \" racecar\", \" abba \", \"civic\", \" pot op \"]", "output": "function filterPalindromes(arr) { return arr.filter(element => { let strippedString = element.replace(/\\s+/g, \"\"); let reversedString = strippedString.split('').reverse().join(''); return strippedString == reversedString; }); } console.log(filterPalindromes([\"a\", \" racecar\", \" abba \", \"civic\", \" pot op \"])); // Output: [\" racecar\", \"abba\", \"civic\", \"pot op\"]"} {"instruction": "Compute the sum of the prime numbers from 0 to n using Java.", "input": "n = 10", "output": "public class PrimeSum{ public static int sumOfPrime(int n){ int sum = 0; for(int i=2; i<=n; i++){ if(isPrime(i)) sum += i; } return sum; } private static boolean isPrime(int n){ for(int i=2; i 4 -> 5 -> 8 -> 10) List2 (2 -> 3 -> 6 -> 7 -> 9)", "output": "public static ListNode mergeLinkedLists(ListNode head1, ListNode head2) { if(head1 == null) return head2; if(head2 == null) return head1; ListNode mergedList; if(head1.val < head2.val) { mergedList = head1; mergedList.next = mergeLinkedLists(head1.next, head2); } else { mergedList = head2; mergedList.next = mergeLinkedLists(head1, head2.next); } return mergedList; }"} {"instruction": "Make a program that takes in a non-empty string and finds its longest palindrome.", "input": "", "output": "def longest_palindrome(text): longest_palindrome = \"\" for i in range(len(text)): for j in range(len(text), i, -1): substring = text[i:j] if substring == substring[::-1] and len(substring) > len(longest_palindrome): longest_palindrome = substring return longest_palindrome"} {"instruction": "This code defines a class called \"Attr\" that represents an attribute of an HTML element. To use it, create an instance of the class and pass in the document, parent element, and attribute name as arguments. The attribute value can be accessed and modified using the \"value\" property. Other properties and methods are available for working with the attribute and its parent element.", "input": "", "output": "#!/usr/bin/env python\n\nimport bs4 as BeautifulSoup\n\nfrom .Node import Node\n\n\nclass Attr(Node):\n _value = \"\"\n\n def __init__(self, doc, parent, attr):\n self.doc = doc\n self.parent = parent\n self.attr = attr\n self.tag = BeautifulSoup.Tag(parser = self.doc, name = 'attr')\n Node.__init__(self, doc)\n\n self._specified = False\n self._value = self.getValue()\n\n def __repr__(self):\n return \"\" % (\"%s.\" % self.parent.tagName if self.parent else \"\", self.attr, id(self))\n\n def __eq__(self, other):\n return hasattr(other, \"parent\") and self.parent == other.parent and \\\n hasattr(other, \"attr\") and self.attr == other.attr\n\n @property\n def nodeType(self):\n return Node.ATTRIBUTE_NODE\n\n @property\n def nodeName(self):\n return self.attr\n\n def getNodeValue(self):\n return self.getValue()\n\n def setNodeValue(self, value):\n return self.setValue(value)\n\n nodeValue = property(getNodeValue, setNodeValue)\n\n @property\n def childNodes(self):\n from .NodeList import NodeList\n\n return NodeList(self.parent.doc, [])\n\n @property\n def parentNode(self):\n return self.parent\n\n # Introduced in DOM Level 2\n @property\n def ownerElement(self):\n if self.parent:\n if self.parent.nodeType == Node.ELEMENT_NODE:\n return self.parent\n\n return None\n\n @property\n def ownerDocument(self):\n return self.parent.doc\n\n @property\n def name(self):\n return self.attr\n\n @property\n def specified(self):\n if self.ownerElement is None:\n return True\n\n return self._specified\n\n def getValue(self):\n if self.parent:\n if self.parent.tag.has_attr(self.attr):\n self._specified = True\n return self.parent.tag[self.attr]\n\n return self._value\n\n def setValue(self, value):\n self._value = value\n\n if self.parent:\n self._specified = True\n self.parent.tag[self.attr] = value\n\n value = property(getValue, setValue)"} {"instruction": "Create a program in Python that evaluates a postfix expression. The input to the program should be a string with the postfix expression. The output should be the evaluated value of the expression.", "input": "\"2 3 + 4 5 * *\"", "output": "def evaluate(expression): \n \n # split expression into list \n expression = expression.split() \n \n # stack to store integer values. \n stack = [] \n \n # do for every element of expression. \n for element in expression: \n \n # If element is an operand push \n # into stack it's a number only \n if element.isdigit(): \n stack.append(element) \n \n # if element is an operator, \n # pop two elements from stack \n # perform respective operations \n else: \n val1 = stack.pop() \n val2 = stack.pop() \n stack.append(str(eval(val2 + element + val1))) \n \n # return the value \n return (int(stack[0])) \n \n# Driver Code \nexpression = \"2 3 + 4 5 * *\"\n \nprint(evaluate(expression)) \n\nOutput: 46"} {"instruction": "Using ReactJS, develop a basic form component with two input fields, one for a Name and the other for Age.", "input": "", "output": "class BasicForm extends React.Component { constructor(props) { super(props); this.state = { name: '', age: '', }; } render() { return (
    ); } handleChange = (event) => { const target = event.target; const value = target.type === 'checkbox' ? target.checked : target.value; const name = target.name; this.setState({ [name]: value }); } }"} {"text": "[EN Wikipedia] List of Israeli films of 1966\n\nA list of films produced by the Israeli film industry in 1966. 1966 releases See also 1966 in Israel References External links Israeli films of 1966 at the Internet Movie Database Israeli Film 1966"} {"instruction": "Write a SQL query to select users whose age is greater than or equal to 20 from the user_data table.", "input": "", "output": "SELECT * FROM user_data WHERE age >= 20;"} {"instruction": "Create a SQL query to sort a table by its numerical contents.", "input": "Table: +-----------+-----------+ | Name | Score | +-----------+-----------+ | John | 90 | | Mary | 80 | | Miguel | 75 | | Fanny | 99 | +-----------+-----------+", "output": "SELECT * FROM table ORDER BY Score;"} {"instruction": "Generate the syntax for initializing an array of integers with the given elements.", "input": "[1, 2, 3]", "output": "int[] arr = {1, 2, 3};"} {"instruction": "Create a function to find the value of Pi rounded to the 3rd decimal point.", "input": "", "output": "def find_pi(): pi = 3.141 return round(pi, 3) # rounded to the 3rd decimal point"} {"instruction": "Write a SQL query to generate a table that contains the number of customers per county", "input": "", "output": "SELECT county, COUNT(*) AS 'Number of Customers' FROM Customers GROUP BY county;"} {"instruction": "Generate a unique 6 character alphanumeric string.", "input": "", "output": "j4xdu6."} {"text": "[EN Wikipedia] Kick Back\n\nKick Back is the third extended play by the Chinese boy band WayV with the lead single of the same name. It was released on March 10, 2021, by Label V and SM Entertainment, with Dreamus as the South Korean distributor and Owhat as the distributor for China. Consisting of six songs that fall mostly in the R&B genre with influences from hip-hop and pop, Kick Back featured the participation of various songwriters and production teams that have worked with SM previously, namely Alawn, Jasmine Kara, Bobii Lewis, Ebenezer Fabiyi, Dsign Music, Hyuk Shin, Simon Petrén, Cazzi Opeia, Ryan S. Jhun, and others. It is the final WayV album and overall NCT release to feature Lucas due to his hiatus and eventual departure in 2023. Upon its release, Kick Back saw an increase in physical sales in South Korea and Japan, peaking at number thirteen on the Oricon Albums Chart and selling more than 200,000 copies in its first month on the Gaon Album Chart. The album eventually earned the group their first certification with a Platinum for selling more than 250,000 copies in South Korea. Background and release After releasing their first studio album Awaken the World, WayV for the first time participated in NCT's project NCT 2020 for the rest of 2020 and released the song \"月之迷 (Nectar)\" to be a part of their albums. On February 23, 2021, WayV announced their upcoming extended play (EP) titled Kick Back was set to be released on March 10. The teaser photos for both versions of the album, Stranger Ver. and Hitchhiker Ver., were then released sequentially for the next two weeks. Composition Kick Back opens with the lead single of the same name, a progressive R&B dance song that combines a vibrant vocal and a calm flow of rap. The lyrics convey the message of \"gathering together in a secret place that only belongs to us, enjoying freedom, and planning the future together\". The following song \"Action Figure\" is based on brass music whose lyrics tell a story of a main character who is a doll or action figure that feels sad about the restraints of their cold reality, but leaves dreams and hopes for others in their wakes, and perseveres in protecting them. Following on from \"Face to Face\" from Take Over the Moon, members Kun, Ten, and Xiaojun teamed up again for the song \"Horizon\", a ballad that conveys the group's gratitude towards their fans. The fourth track is \"All For Love\", a trap R&B song that recalls the sentimental ambiance of the night. It is followed by \"Good Time\", a pop song with hip-hop beat with lyrics like, \"As long as we're together, all moments are happy.\" The album is then closed by the Korean version of \"Kick Back\". Singles and promotion Singles The music video of the lead single \"Kick Back\" was released at the same time as the album on March 10, 2021. It…"} {"instruction": "Using JavaScript, print the name of sites visited today on the web console.", "input": "", "output": "var visitedSites = [\"www.facebook.com\", \"www.google.com\", \"www.yahoo.com\"]; console.log(\"Visited sites today: \" +visitedSites);"} {"text": "[CS Wikipedia] I'll Tumble 4 Ya\n\n\"I'll Tumble 4 Ya\" je New Wave/pop-karibská píseň od skupiny Culture Club. Song je z jejich debutního alba Kissing to Be Clever. Píseň byla vydán firmou Virgin, trvá 2:36 minut. Tato píseň zazněla ve filmu \"Billy Madison\" (1995), kde hrál Adam Sandler. Verze Kanada 7\" vinyl A. \"I'll Tumble 4 Ya\" - 2:32 B. \"Man Shake\" - 2:34 USA 7\" vinyl A. \"I'll Tumble 4 Ya\" - 2:32 B. \"Mystery Boy\" USA 12\" vinyl A. \"I'll Tumble 4 Ya\" (12\") - 4:38 B. \"Man Shake\" - 2:34 Hitparáda U.S. Billboard Hot 100: #9 Canadian Singles Charts: #9 U.S. Hot Dance Club Play: #14 U.S. Adult Contemporary: #33 Singly Culture Club"} {"instruction": "Create a Python program to retrieve real time data from a web API.", "input": "", "output": "import requests\n \n# Make a get request to get the latest position of the International Space Station\nresponse = requests.get(\"http://api.open-notify.org/iss-now.json\")\n \n# Print the status code of the response\nprint(response.status_code)"} {"instruction": "Explain what API stands for and what it does.", "input": "", "output": "API stands for Application Programming Interface, which is a set of routines, protocols, and tools used to build software applications. It defines how two applications can interact with each other and allows for data to be exchanged between them. APIs provide developers with predefined sets of code which can be used to perform a variety of tasks and help developers build applications quickly and easily."} {"instruction": "Turn the following sentence into an imperative sentence.", "input": "Let's print \"Hello World\"", "output": "Print \"Hello World\"."} {"instruction": "Develop a Python program that counts the number of vowels in a string.", "input": "", "output": "def count_vowels(s):\n count = 0\n vowels = \"aeiou\"\n \n for char in s:\n if char in vowels: \n count += 1\n \n return count"} {"instruction": "Translate the following JavaScript code into Python.", "input": "let x = 10; if(x > 0){ console.log(\"x is positive\"); }", "output": "x = 10 if x > 0: print(\"x is positive\")"} {"instruction": "Generate a python program to print the first n elements of a given list.", "input": "", "output": "def print_n_elements(n, list):\n for i in range(n):\n print(list[i])"} {"text": "[DE Wikipedia] Ingvar Sandström\n\nJohn Ingvar Sandström (* 3. September 1942 in Lycksele) ist ein ehemaliger schwedischer Skilangläufer. Sandström, der für den Lycksele IF startete, errang bei den nordischen Skiweltmeisterschaften 1966 in Oslo den zehnten Platz über 15 km und jeweils den vierten Platz über 30 km und mit der Staffel. Im selben Jahr kam er bei den Svenska Skidspelen auf den dritten Platz mit der Staffel und in den Jahren 1967 und 1969 jeweils auf den zweiten Platz mit der Staffel. Bei seiner einzigen Olympiateilnahme im Februar 1968 in Grenoble lief er auf den 21. Platz über 30 km. Im folgenden Jahr wurde er schwedischer Meister über 15 km und errang im Jahr 1970 bei den Svenska Skidspelen in Falun den zweiten Platz über 15 km. Seinen größten internationalen Erfolg hatte er bei den nordischen Skiweltmeisterschaften 1970 in Vysoké Tatry. Dort holte er die Bronzemedaille mit der Staffel. Weblinks Ingvar Sandström auf skisport365.com Einzelnachweise Skilangläufer (Schweden) Olympiateilnehmer (Schweden) Teilnehmer der Olympischen Winterspiele 1968 Schwedischer Meister (Skilanglauf) Schwede Geboren 1942 Mann"} {"text": "[CS Wikipedia] Tlak\n\nTlak je fyzikální veličina, obvykle označovaná symbolem p nebo P (z anglického pressure), vyjadřující poměr velikosti síly F, působící kolmo na rovinnou plochu a rovnoměrně spojitě rozloženou po této ploše, a obsahu této plochy S, tedy . Pokud není tato síla F rozložena na dané ploše rovnoměrně, pak veličinu p, danou předchozím vzorcem, nazýváme střední tlak. Místním tlakem, tj. tlakem působícím v nějakém bodě uvažované plochy rozumíme diferenciální podíl . Pokud vnější síla působí pouze kolmo (neexistuje žádná tečná složka), je tlak označován jako prostý (čistý). Zobecněnou definici tlaku (pro síly působící libovolným směrem na obecně nerovinnou plochu) můžeme ve vektorovém tvaru zapsat rovnicí , kde je složka vektoru síly a kolmá k elementu plochy na který působí, přičemž směr vektoru popisujícího element má směr normály k této plošce. V případech, že existuje reálná tečná složka síly, se však pojem tlaku zpravidla nahrazuje obecnější tenzorovou veličinou mechanické napětí. Ve stlačitelných látkách způsobuje tlak deformaci. Při působení tlakové síly na pevné těleso se rozlišuje tah a tlak. Tahová síla způsobuje roztahování tělesa, tlaková jeho stlačování. Tahové a tlakové síly se odlišují pouze směrem působení, přičemž se předpokládá, že způsobené deformace jsou obdobné, avšak s opačnými znaménky. Pokud je tlak v nějaké uzavřené nádobě větší než tlak v jejím okolí, je v nádobě přetlak. Pokud naopak je v ní tlak nižší, je v nádobě podtlak. Přetlaku a podtlaku lze dosáhnout přesunem části hmoty do nebo z uzavřené nádoby, změnou její vnitřní velikosti nebo teploty jejího obsahu. Pro přesun části obsahu se používají pumpy. Sací pumpa pro odčerpání plynů z uzavřené nádoby se nazývá vývěva. Tlak se v průběhu let vyjadřoval velkým počtem jednotek. V současnosti je platná jednotka odvozená z jednotek SI, jeden pascal. Pascal je tlak, který vyvolává síla jednoho newtonu rovnoměrně rozložená na rovinné ploše s obsahem jednoho čtverečního metru, kolmé ke směru síly. Pro praktické použití v technické praxi je jednotka 1 Pa velmi malá, proto používáme jednotky násobné kPa, MPa. Fyzikální podstata tlaku Tlak v plynech je vyvoláván tepelným pohybem částic plynu (atomů nebo molekul); nárazy těchto částic na stěny nádoby se projevují tlakem na ně působícím. Podobně tomu je i v kapalinách. Tlak působí i v pevných tělesech, kde se přenáší interakcí mezi částicemi pevně vázanými v krystalové nebo pseudokrystalové struktuře látky. Tlaková síla Podle třetího pohybového zákona působí kapalina proti působící síle stejně velkou reakcí. Kapalina tedy působí tlakovou silou kolmou k ploše, na niž síla působí. Tato síla má velikost Působení tlakové síly lze demonstrovat na principu hydraulického lisu. Tlaková síla působí vždy kolmo na plochu. Na vodorovné dno působí svislá…"} {"text": "[CS Wikipedia] It's Raining Men\n\n„It's Raining Men“ je disco/dance píseň od kapely The Weather Girls. Píseň pochází z alba Success a trvá 4:06 minut, ale jako 12\" singl má kolem 5:24 minut. Skladbu napsali Paul Jabara a Paul Shaffer (frontman CBS Orchestra, kapela v Noční show Davida Lettermana). Skladba se stala gayskou, taneční, camp (ironický status kýčovitých věcí) a ženskou hymnou. Píseň coveroval RuPaul s Marthou Wash v roce 1997 a Geri Halliwell v roce 2001. Hitparáda Verze od Weather Girls se dostala do hitparády US Disco Chart a v říjnu 1982 obsadila 1. příčku. Píseň se rovněž probojovala na 34. místo US R&B hitparády, 46. místo US Pop hitparády a 2. místo v UK Singles Chart. V populární kultuře Je to oblíbená píseň Homera Simpsona ze seriálu Simpsonovi. V dílu „Strach z létání“, kdy Vočko vyhodí desku téhle písničky z jukeboxu ven na ulici, šťastný Waylon Smithers ihned desku popadne (reference na jeho homosexualitu). V roce 2008 kapela The McCain Girls nazpívala píseň \"It's Raining McCain\", kterou později publikovali na YouTube Píseň si zazpíval i Bill Kaulitz v show Star Search („hledáme hvězdy“) česká coververze Pod názvem „Já vítám déšť“ s textem Eduarda Krečmara ji v roce 2006 nazpívala Helena Vondráčková Singly z roku 1982 Písně v angličtině Disco písně"} {"instruction": "Create a function in Python which takes an integer n and an unsorted list of numbers as input and returns the nth smallest number in the list.", "input": "[5, 8, 1, 9, 4], 3", "output": "def nth_smallest(nums, n): sorted_nums = sorted(nums) return sorted_nums[n-1] print(nth_smallest([5, 8, 1, 9, 4], 3)) # Output: 5"} {"instruction": "Create a stack and add two elements to it.", "input": "", "output": "class Stack(): def __init__(self): self.items = [] def push(self, item): self.items.append(item) def pop(self): return self.items.pop() stack = Stack() stack.push(5) stack.push(7)"} {"instruction": "Write a CSS selector to select all the list items with class \"list-item\".", "input": "", "output": "li.list-item { }"} {"instruction": "Implement a random number generator in Python that returns a random number in the range of 1-100.", "input": "", "output": "import random def rand_num(): return random.randint(1, 100)"} {"instruction": "Write an SQL Query to print a list of all employees who have a higher salary than their managers.", "input": "", "output": "SELECT e1.name AS Employee, e2.name AS Manager, e1.salary AS Employee_Salary, e2.salary AS Manager_Salary FROM employee e1 JOIN employee e2 ON e1.managerid = e2.employeeid WHERE e1.salary > e2.salary;"} {"text": "[EN Wikipedia] Agaricicola\n\nAgaricicola is a genus in the phylum Pseudomonadota (Bacteria). Etymology The name Agaricicola derives from:Neo-Latin noun Agaricus, generic name of a mushroom; Latin suff. -cola (from Latin masculine gender or feminine gender noun incola), dweller; Neo-Latin masculine gender noun Agaricicola, Agaricus-dweller, reflecting isolation of the first strain from Agaricus blazei (Murrill). Species The genus contains a single species, namely A. taiwanensis (Chu et al. 2010), (Type species of the genus).; Neo-Latin masculine gender adjective taiwanensis, pertaining to Taiwan, where the type strain was isolated.) See also Bacterial taxonomy Microbiology References Bacteria genera Rhodobacteraceae Monotypic bacteria genera"} {"instruction": "Create a set containing the numbers from 1-10 that are divisible by 3.", "input": "", "output": "my_set = {3, 6, 9}"} {"instruction": "Build a binary search algorithm in Python that takes in an input list and a target value to search for.", "input": "", "output": "def binary_search(arr,target):\n low = 0\n high = len(arr) - 1\n while low <= high: \n mid = (low + high) // 2\n if arr[mid] == target:\n return mid\n elif arr[mid] < target: \n low = mid + 1\n else: \n high = mid - 1\n return -1\n\narr = [2, 3, 4, 10, 40]\ntarget = 10\nindex = binary_search(arr, target)\nif index != -1: \n print(\"Element is present at index\", index)\nelse: \n print(\"Element is not present in the array\")"} {"text": "[CS Wikipedia] Sonequa Martinová-Greenová\n\nSonequa Martinová-Greenová (* 21. března 1985 Russellville, Alabama) je americká herečka. Vystudovala divadelnictví na University of Alabama. Od roku 2005 postupně hrála v několika nezávislých filmech, v roce 2011 se představila ve snímku Yelling to the Sky. Od roku 2008 hostovala v různých televizních seriálech. Významnější role ztvárnila postupně v seriálech Dobrá manželka (2009–2011), Okrsek 22 (2012), Živí mrtví (2012–2017) a Bylo, nebylo (2013). Od roku 2017 hraje Michael Burnhamovou v seriálu Star Trek: Discovery. Externí odkazy Americké filmové herečky Americké televizní herečky Afroamerické herečky Narození 21. března Narození v roce 1985 Žijící lidé Ženy"} {"instruction": "Create a Python program that produces the output shown in this example.", "input": "3\n3\n3\n3\n3\n3", "output": "def print_grid(grid_size):\n for x in range(grid_size):\n for y in range(grid_size):\n print(grid_size, end=\" \")\n print()\n\ngrid_size = 3\nprint_grid(grid_size)"} {"text": "[EN Wikipedia] Naoki Murata\n\nwas an 8th dan Japanese judoka and author. He has written many books about judo. He was also the curator of the Kodokan Judo Museum in Tokyo. Biography Murata was born in Tokorozawa, Saitama in 1949. He studied at the Faculty of Physical Education, Department of Martial Arts of the Tokyo University of Education, where he obtained the MA degree in physical fitness in 1973. He has been a judo instructor in more than ten countries, including Iceland and Thailand. He also worked as an assistant professor at Kagawa University. He was a curator of the Kodokan Judo Museum and Library. In July 2008, he has been appointed the Head of Directors of the Japanese Academy of Budo, chairman of the All Japan Judo Federation's Committee of Education and Proliferation of Judo as well as a member of the federation's Referee Committee. In 2013 he was promoted to the rank of 8th dan in Kodokan judo. Murata died on 9 April 2020 at the age of 70. Bibliography Supotsu to shintai undo no kagakuteki tankyu (A Scientific Investigation of Sports and Physical Exercise), Bikosha Wa-ei taisho judo yogo kojiten (A Small Japanese-English Dictionary of Judo Vocabulary), Kodokan Wa-ei taisho judo - sono kokoro to kihon (Japanese-English Judo - Its Mind and Basics), Hon no Tomosha Gendai jūdōron: kokusaika jidai no jūdō o kangaeru (Modern Judo), Taishukan shoten, 1993 Jūdō daijiten (Great Judo Dictionary), Atene shobo, 1999 Budo o shiru (Knowing Budo), Fumaido Shuppan, 2000 Judo no shiten (The Judo Point of View), Dowa shoten, 2000 Kanō Jigorō shihan ni manabu (Learning from Jigoro Kano), Nihon Budokan, 2001 Mind over muscle: writings from the founder of Judo, Kodansha International, 2005 L'essence du judo (Essence of Judo), Noisy-sur-École, 2007 References External links Official profile 1949 births 2020 deaths Japanese male judoka Japanese writers University of Tsukuba alumni People from Tokorozawa, Saitama Sportspeople from Saitama Prefecture Writers from Saitama Prefecture"} {"instruction": "Write a Python program to select a random element from a given list.", "input": "", "output": "import random \ndef random_element(lst): \n return random.choice(lst)"} {"instruction": "Generate a program to output the most frequently used words in a given string", "input": "txt = \"Python is a powerful language that is used for a wide range of applications\"", "output": "from collections import Counter \n\ndef most_frequent(string): \n\tdata = string.split(\" \") \n\tdata1 = Counter(data) \n\t\n\treturn data1.most_common(1)[0] \n\ntxt = \"Python is a powerful language that is used for a wide range of applications\"\nassert most_frequent(txt) == ('is', 2)\nprint(\"Most frequent word is : \", most_frequent(txt))"} {"instruction": "Generate a Python program to find the longest increasing subsequence in a given list of numbers", "input": "", "output": "def find_longest_increasing_subsequence(array):\n n = len(array)\n Length = [1] * n\n SequenceArray = [None] * n\n for index1 in range(n):\n for index2 in range(index1):\n if array[index2] < array[index1] and Length[index2] >= Length[index1]:\n Length[index1] = Length[index2] + 1\n SequenceArray[index1] = index2\n\n maxIndex = Length.index(max(Length))\n SubsequenceArray = [array[maxIndex]]\n while SequenceArray[maxIndex] is not None:\n maxIndex = SequenceArray[maxIndex]\n SubsequenceArray.append(array[maxIndex])\n SubsequenceArray.reverse()\n return SubsequenceArray"} {"instruction": "Write a Python function to get the n-th number in the Fibonacci sequence.", "input": "", "output": "def fibonacci(n): \n a = 0\n b = 1\n if n < 0: \n print(\"Incorrect input\") \n elif n == 0: \n return a \n elif n == 1: \n return b \n else: \n for i in range(2,n): \n c = a + b \n a = b \n b = c \n return b"} {"instruction": "Take input of a Python list and return its reversed version", "input": "list_in = [3,5,7,9]", "output": "list_in.reverse() list_out = list_in print(list_out) # Output # [9,7,5,3]"} {"instruction": "Develop a Python function to determine the maximum possible sum of two numbers even after swapping.", "input": "", "output": "\"\"\"\ndef max_sum_swap(a, b): \n x = max(a, b) \n y = min(a, b) \n \n # swap the numbers \n x = x + y \n y = x - y \n x = x - y \n \n return x + y \n\"\"\""} {"instruction": "Generate a regex for email validation", "input": "", "output": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"} {"instruction": "What are the benefits of abstract classes in Java?", "input": "", "output": "Abstract classes in Java provide a way to define and enforce common behavior that is shared between derived classes. They also allow for code reuse as the shared code can be reused by other classes. Furthermore, with the help of abstract classes, one can create a structure for developers to follow and provide a standard for them to write code. This can lead to improved code quality by enforcing certain rules and standards."} {"instruction": "How do you represent a database table and its columns in an object-oriented programming language?", "input": "", "output": "Classes are typically used to represent a database table in an object-oriented programming language. Each of the database table's columns can be represented as fields in the class. The values for those fields can then be accessed though the class' accessor methods."} {"text": "[EN Wikipedia] Renny Lister\n\nRenny Lister (born 24 May 1934) is a British retired film and television actress. Personal life Lister was born on 24 May 1934 in Manchester. She married Eric Lister in 1953, the marriage later ended in divorce although she retained her first husband's name as her stage name. Lister married film and television actor Kenneth Cope in 1961. They had two sons and one daughter together. Their sons Nick and Mark Cope went on to form a rock band, The Candyskins. Their daughter, Martha Cope, is an actress. In 1997, Lister announced her retirement. Selected filmography Film The Curse of the Werewolf (1961) A Touch of the Other (1970) Personal Services (1987) Television Coronation Street (1961) The Massingham Affair (1964) Dr. Finlay's Casebook (Episode: The Spinster, 1965) Edgar Wallace Mysteries (Episode: Dead Man's Chest , Flora, 1965) Sergeant Cork Bowler Holding On Don't Forget to Write! Callan References External links 1934 births Living people British film actresses British television actresses"} {"instruction": "Develop an efficient sorting technique in Python to arrange the following list of strings.", "input": "L1= [\"This\", \"is\", \"a\", \"list\", \"of\", \"strings\"]", "output": "def sort_list(L1):\n L1.sort()\n return L1"} {"instruction": "Create a basic React component.", "input": "", "output": "import React from 'react'; const MyComponent = () => { return (

    Hello, world!

    ); }; export default MyComponent;"} {"instruction": "What function will you use to count the number of words in a string?", "input": "'Hello world, this is a sentence.'", "output": "There are 5 words in the given string. \n\nTo count the number of words in a string, you can use the `len()` or `count()` functions in Python. \n\nFor example: \n```\nnum_words = len(string.split())\n```\nor \n```\nnum_words = string.count(\" \") + 1\n```"} {"instruction": "Calculate the factorial of a positive integer in C.", "input": "", "output": "#include int factorial(int n) { int i, fact = 1; // handles cases greater than 1 if (n > 1) { for (i = 2; i <= n; i++) fact = fact * i; } return fact; } int main() { printf(\"The factorial of 5 is %d\", factorial(5)); return 0; }"} {"instruction": "Output the result of 3+5*2-9", "input": "", "output": "3 + 5 * 2 - 9 = 2"} {"text": "[CS Wikipedia] Village People\n\nVillage People je americká konceptuální disco formace, která vznikla v roce 1977. Skupina je známá svými podiovými kostýmy, které jsou vyobrazením amerických pracovních a společenských vrstev i chytlavou hudební produkcí. Skupinu vytvořil francouzský skladatel Jacques Morali; společně s producentem Henri Beloloem produkovali kapele Village People většinu hitů. Původními členy seskupení byli: Victor Willis (postava policisty), Felipe Rose (postava indiánského náčelníka), Randy Jones (kovboj), Glenn Hughes (motocyklista), David Hodo (stavební dělník) a Alex Briley (americký voják). Při vydání skladby \"In the Navy\", která se původně měla stát součástí televizních a rozhlasových reklamních spotů vojenského náboru pro americké námořnictvo, byli Willis a Briley převlečení za admirála a námořníka. Postavy, které představovali členové Village People, měly původně prezentovat ideály pro návštěvníky gay disko barů,[http://www.spin.com/articles/ymca-oral-history Spin Magazine Online: Y.M.C.A. (An Oral History) ] ale jejich popularita se ve velmi krátkém čase rozšířila do hlavního proudu hudebního průmyslu. Mezi písněmi Village People se nachází několik klasických disko hitů, jako jsou například \"Macho Man\", \"Go West\", klasická klubová směs \"San Francisco (You'Ve Got Me)\"/\"In Hollywood (Everybody is a Star)\", již zmíněná \"In the Navy\", \"Can not Stop the Music\" a hlavně jejich největší hit \"Y.M.C.A.\". V září 2008 získali hvězdu na Hollywoodském chodníku slávy (Hollywood Walk of Fame''). S prodejem do 100 milionů nosičů patří formace Village People do seznamu nejprodávanějších hudebních umělců na světě. Sestava Alex Briley – G.I. (voják)/námořník David Hodo – dělník Glenn M. Hughes – motorkář Randy Jones – kovboj Felipe Rose – Indian Victor Willis – policista/admirál Diskografie Alba Reference Externí odkazy Disco hudební skupiny Americké popové skupiny Američtí disco hudebníci Hollywoodský chodník slávy"} {"instruction": "Define a Python class called Appointment that creates appointment objects.", "input": "", "output": "class Appointment():\n \n def __init__(self, date, time, reason):\n self.date = date\n self.time = time\n self.reason = reason\n \n def get_details(self):\n return f\" The appointment is on {self.date}, at {self.time}, for {self.reason}.\""} {"text": "[HI Wikipedia] मार्च २३ अभियान\n\nमार्च २३ अभियान (), जिसे ऍम२३ (M23) और कांगोई क्रान्तिकारी सेना (Congolese Revolutionary Army) के नाम से भी जाना जाता है, अफ़्रीका के कांगो लोकतान्त्रिक गणराज्य के पूर्वी भागों में सक्रीय एक विद्रोही सैनिक संगठन है। यह विशेषकर उत्तर कीवू प्रान्त में गतिविधियाँ करता है। वर्तमान में यह कांगो की केन्द्रीय सरकार के विरुद्ध लड़ रहा है और इन मुठभेड़ों की वजह से बहुत से स्थानीय नागरिक अपने घरों से विस्थापित हुए हैं। २० नवम्बर २०१२ को ऍम२३ ने उत्तर कीवू की राजधानी गोमा पर क़ब्ज़ा कर लिया था, जो १० लाख से अधिक की आबादी रखता है, लेकिन कुछ ही दिनों बाद उसका नियंत्रण खो बैठा। इन्हें भी देखें कांगो लोकतान्त्रिक गणराज्य सन्दर्भ कांगो लोकतान्त्रिक गणराज्य कांगो लोकतान्त्रिक गणराज्य की राजनीति"} {"instruction": "Create a JavaScript object that stores three pieces of digital contact data, an email address, a phone number, and a website URL.", "input": "", "output": "const contact = { email: 'example@example.com', phone: '000-000-0000', website: 'www.example.com' };"} {"instruction": "Write a Python function to find all pairs in a given list of numbers whose sum equals a given target number", "input": "Given List: [1, 4, 2, 9, 5] Target number: 7", "output": "def find_pairs_sum(numbers, target): res = [] for i in range(len(numbers)): for j in range(i + 1, len(numbers)): if numbers[i] + numbers[j] == target: res.append([numbers[i], numbers[j]]) return res"} {"text": "[HI Wikipedia] हरेश बुधरानी\n\nहरेश किशिनचंद बुधरानी (), क्वींस काउंसेल, भारतीय मूल के जिब्राल्टेरियन बैरिस्टर हैं। इन्होंने अपनी शिक्षा इंग्लैंड के शैक्षणिक संस्थानो से प्राप्त करी थी तथा अगस्त 1975 में बैरिस्टर बन गए। यह 2004 तक हिन्दू मर्चेंट्स एसोसिएशन ऑफ़ जिब्राल्टर के अध्यक्ष रहे थे। यह जिब्राल्टर संसद में सितम्बर 2004 से अक्टूबर 2012 तक स्पीकर थे। इस पद पर रहते हुए इनके ऊपर व्यापार कर सम्बन्धी हेराफेरी का आरोप लगा था। जीवनी बुधरानी का जन्म भारत के महाराष्ट्र राज्य की राजधानी मुम्बई (जब बम्बई) में जून 1952 को हुआ था। इन्होंने अपनी स्कूली शिक्षा डर्बीशायर में पूरी की तथा उच्च शिक्षा प्राप्त करने के लिए सरी के गिल्डफोर्ड शहर में स्थित कॉलेज ऑफ़ लॉ (वर्तमान नाम: द युनिवर्सिटी ऑफ़ लॉ) में गए। बुधरानी के अनुसार जिब्राल्टर की हिन्दू आबादी धीरे-धीरे मुख्य धरा में आई है तथा यह प्रक्रिया लगातार जारी है। इनकी 1973 में की गई टिप्पणी के अनुसार हिन्दू जिब्राल्टर के अन्य नृजातीय समूहों के बीच धीरे-धीरे अपनाए गए। उदाहरण के तौर पर नवम्बर 2012 में हिन्दुओ के सबसे बड़े त्योहार दीपावली के आयोजन के लिए जिब्राल्टर के महापौर ने हिन्दू समाज को जिब्राल्टर सिटी हॉल में आमंत्रित किया था। वर्ष 1974 में इन्होंने लंदन के किंग्स कॉलेज से कानून में स्नातक की डिग्री प्राप्त करी। बुधरानी ने बाद में इन्स ऑफ़ कोर्ट स्कूल ऑफ़ लॉ में भाग लिया और अगस्त 1975 में बैरिस्टर बन गए। कैरियर बुधरानी हिन्दू मर्चेंट्स एसोसिएशन ऑफ़ जिब्राल्टर (हिन्दी: जिब्राल्टर का हिन्दू व्यापारी संघ) के वर्ष 2004 तक अध्यक्ष रहे। बुधरानी ने अपना पद जिब्राल्टर हाउस ऑफ़ असेम्बली के स्पीकर का पद संभालने के लिए छोड़ा था। जिब्राल्टर सोशल डैमोक्रैट्स ने न्यायाधीश जॉन ई॰ अलकैंटेरा के हाउस ऑफ़ असेम्बली के स्पीकर पद पर से दिए त्यागपत्र के पश्चात बुधरानी को रिक्त पद के लिए नामांकित किया। इस नामांकन में विपक्ष ने अपनी स्वीकृति नहीं दी थी। सितम्बर 2004 में बुधरानी ने जिब्राल्टर हाउस ऑफ़ असेम्बली (जो अब जिब्राल्टर संसद के नाम से जाना जाता है) में स्पीकर का पद संभाला। जिब्राल्टर में कोई इतना बड़ा पद सम्भालने वाले बुधरानी पहले भारतीय मूल के नागरिक थे। दिसम्बर 2011 में बुधरानी को मुख्यमंत्री फेबियन पिकार्डो (जिब्राल्टर सोशलिस्ट लेबर पार्टी के सदस्य) ने पुनर्नियुक्त किया। अक्टूबर 2012 में यह स्पीकर के पद से सेवानिवृत्त हो गए थे। विवाद मई 2012 में बुधरानी पर व्यापार कर सम्बन्धी हेराफेरी के आरोप के पश्चात जिब्राल्टर ट्रेज़री ने इनकी स्पीकर की तनख्वाह पर रोक लगा दी थी। बुधरानी इन आरोपो का पूर्ण रूप से तो खंडन नहीं किया परन्तु कहा था कि स्थानीय मीडिया द्वारा दिखाए गए आंकड़े सही नहीं हैं तथा उनके ऊपर के ऋण की राशि इतनी अधिक नहीं है। मीडिया द्वारा बताया गया ऋण 150,000 जिब्राल्टर पौंड से अधिक था। सन्दर्भ 1952 में जन्मे लोग जीवित लोग"} {"instruction": "Create a HTML code to make a hyperlink of \"https://www.example.com\" that shows the text \"Click Here\".", "input": "", "output": "Click Here"} {"text": "[HI Wikipedia] क्रिस्टीज़\n\nक्रिस्टी'ज़ () वर्तमान में कला व्यवसाय और ललित कला से संबंधित विश्व का सबसे बड़ा नीलामी घर है। क्रिस्टी'ज़ ने 2012 की पहली छमाही के लिए लगभग 3.5 अरब डॉलर की बिक्री के साथ, किसी समतुल्य अवधि के लिए कंपनी और कला बाजार के इतिहास में सबसे बेहतर परिणाम प्रदर्शित किया। लंदन किंग स्ट्रीट और रॉकफेलर प्लाजा न्यू यॉर्क में क्रिस्टी'ज़ के प्रमुख मुख्यालय स्थित हैं। इसका स्वामित्व फ़्रैंकॉयस-हेनरी पिनॉल्ट की धारक कंपनी अरतेमिस समूह के पास है। इतिहास प्रमुख नीलामियाँ सन्दर्भ बाहरी कड़ियाँ Christie's Education Graduate Programmes official website Christie's International Real Estate – Luxury Properties and Estates official website Christie's page on Arcadja Art database with several auction catalogs Bill Brooks – Daily Telegraph obituary Christie's and India Art Fair 2013 नीलामी घर"} {"instruction": "Write a Python program to optimize a given function using gradient descent.", "input": "", "output": "import numpy as np\ndef optimize(f, lr, num_iterations):\n x = 0.0\n \n for i in range(num_iterations):\n grad = numerical_diff(f, x)\n x -= lr * grad\n\n return x\n\ndef numerical_diff(f, x):\n h = 1e-4#0.0001\n return (f(x+h) - f(x-h)) / (2*h)"} {"instruction": "Convert this string to a float in Python.", "input": "string = \"1.25\"", "output": "string = \"1.25\" float_value = float(string)"} {"instruction": "Create a basic form in HTML containing two input boxes for first name and surname.", "input": "", "output": " User Information Form
    First Name:

    Surname:


    "} {"instruction": "Generate the Fibonacci sequence up to the 10th number.", "input": "", "output": "0, 1, 1, 2, 3, 5, 8, 13, 21, 34"} {"text": "[EN Wikipedia] Gerrit Beneker\n\nGerrit Albertus Beneker (January 26, 1882 – October 23, 1934) was an American painter and illustrator best known for his paintings of industrial scenes and for his poster work in World War I. Biography Beneker was born on January 26, 1882, in Grand Rapids, Michigan, the son of Bartel Albertus Beneker, who had immigrated from Serooskerke in the Netherlands, and Pauline Catherine Steketee. He first studied at the Chicago Art Institute, where his teachers included John Vanderpoel and Frederick Richardson; later he transferred to the Art Students League in New York. In September 1907 he married Flora Judd Van Vranken from Marcellus, New York, with whom he would have four children. After working as an illustrator in New York, he became a student of Charles Webster Hawthorne in 1912 at the Cape Cod School of Art; although his work brought about frequent moves, he returned to the area in the summers and in 1920 bought a summer house in Truro, Massachusetts. In July 1918, Beneker was hired, under the title of \"Expert Aid, Navy Department\", to create posters and illustrations for the war effort. It was in this period that he painted his most familiar work, \"Sure We'll Finish the Job\", which sold over three million copies. Later Beneker spent four years painting workers of the Hydraulic Pressed Steel Company in Cleveland, Ohio as part of a labor-management relations improvement project; similar projects were carried out at the General Electric plant in Schenectady, New York, and at the Rohm and Haas plant in Philadelphia. He died on 23 October 1934 in Truro. Beneker was one of the founders of the Provincetown Art Association and Museum. His papers are held by the Archives of American Art of the Smithsonian Institution. Analysis Beneker's output was prodigious, with some five hundred works in oil produced over a thirty-year period, exclusive of his many illustrations. Most of his work consists of portraits, landscapes, and genre paintings of industrial and manual labor, and it is for the last that he is best known. Beneker's industrial paintings are optimistic and uplift the common laborer. James Guimond lists him, along with such other artists as Alfred Stieglitz, Joseph Stella, and Margaret Bourke-White, as a participant in \"a popular genre of industrial art that was a kind of sooty romanticism.\" His industrial paintings toured the country, and Beneker was in great demand as a lecturer. While his portraiture and industrial works are conservatively realistic, his landscapes are noted for their impressionism. In addition, Beneker's illustrations appeared in over eighty publications including Scientific American and Harper's Weekly. He was noted for his Ivory Soap advertisements. References External links 1882 births 1934 deaths American genre painters American…"} {"instruction": "Create a NodeJS server that listens on port 8080 and serves a simple HTML page.", "input": "", "output": "const http = require('http'); const port = 8080; const server = http.createServer(function (request, response) { response.writeHead(200, { \"Content-Type\": \"text/html\" }); response.write('

    Hello, World!

    '); response.end(); }); server.listen(port); console.log(\"Listening at port\", port);"} {"text": "[CS Wikipedia] Weikendorf\n\nWeikendorf je městys v Rakousku ve spolkové zemi Dolní Rakousy v okrese Gänserndorf. Geografie Geografická poloha Weikendorf se nachází ve spolkové zemi Dolní Rakousy v regionu Weinviertel. Rozloha území městyse činí 46,3 km², z nichž 12,4 % je zalesněných. Části obce Území městyse Weikendorf se skládá ze čtyř částí (v závorce uveden počet obyvatel k 1. 1. 2017): Dörfles (262) Stripfing (332) Tallesbrunn (299) Weikendorf (1 122) Sousední obce na severu: Prottes, Angern an der March na východě: Weiden an der March na jihu: Untersiebenbrunn na západě: Gänserndorf Politika Obecní zastupitelstvo Obecní zastupitelstvo se skládá z 19 členů. Od komunálních voleb v roce 2015 zastávají následující strany tyto mandáty: 13 ÖVP 5 SPÖ 1 FPÖ Starosta Nynějším starostou městyse Weikendorf je Johann Zimmermann ze strany ÖVP. Reference Externí odkazy Oficiální stránky Statistiky Obce v okrese Gänserndorf"} {"instruction": "Create a class in Python and define several functions for that class.", "input": "", "output": "class MyClass: def __init__(self): pass def add(self, x, y): return x + y def subtract(self, x, y): return x - y def multiply(self, x, y): return x * y def divide(self, x, y): return x / y"} {"instruction": "Create an array of 10 numbers in JavaScript, each with a value of 0.", "input": "", "output": "let array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];"} {"instruction": "Create a virtual environment in Python using the \"virtualenv\" tool.", "input": "", "output": "python -m pip install virtualenv virtualenv envname source envname/bin/activate"} {"instruction": "Extract a specific key-value pair from the given dictionary", "input": "dic = {\"Name\": \"John\", \"age\": \"27\", \"Address\": \"Street 79\"}", "output": "Age = dic[\"age\"]"} {"instruction": "Write a script in Ruby for calculating the sum of two numbers.", "input": "a = 5 b = 10", "output": "a = 5 b = 10 def add_numbers(a, b) a + b end sum = add_numbers(a,b) puts \"The sum of #{a} and #{b} is #{sum}.\""} {"text": "[EN Wikipedia] Sanda Wuduroma of Borno\n\nSanda Wuduroma, or Abu Sanda bin Buqar al-Kanemi, (?-1894) was Shehu of Borno in 1894. Reign At the death of his brother and predecessor Shehu Kyari, Sanda Wuduroma (also known as Abba Sanda Limannambe) became Shehu of Borno in 1893 when the country was invaded by Rabih az-Zubayr. His reign was short-lived as he was captured and killed by one of Rabih's soldiers called Gadum in 1894. His name Wuduroma comes from the place of his assassination, Wuduro. Dynasty Footnotes Bibliography Adeleye, Rowland, Power and Diplomacy in Northern Nigeria: 1804-1906, the Sokoto Caliphate and Its Enemies (London: Longman Group, 1971). Amegboh, Joseph, and Cécile Clairval, Rabah: Conquérant Des Pays Tchadiens, Grandes Figures Africaines (Paris: Dakar ; Abidjan : Nouvelles Éditions Africaines, 1976). Brenner, Louis, The Shehus of Kukawa: A History of the Al-Kanemi Dynasty of Bornu, Oxford Studies in African Affairs (Oxford, Clarendon Press, 1973). Cohen, Ronald, The Kanuri of Bornu, Case Studies in Cultural Anthropology (New York: Holt, 1967). Hallam, W. K. R., The Life and Times of Rabih Fadl Allah (Ilfracombe: Stockwell, 1977). Hallam, W. K. R., ‘Rabih: His Place in History’, Borno Museum Society Newsletter, 15-16 (1993), 5-22. Horowitz, Michael M., ‘Ba Karim: An Account of Rabeh’s Wars’, African Historical Studies, 3 (1970), 391-402 . Lange, Dierk, 'The kingdoms and peoples of Chad', in General history of Africa, ed. by Djibril Tamsir Niane, IV (London: Unesco, Heinemann, 1984), pp. 238–265. Last, Murray, ‘Le Califat De Sokoto Et Borno’, in Histoire Generale De l'Afrique, Rev. ed. (Paris: Presence Africaine, 1986), pp. 599–646. Lavers, John, \"The Al- Kanimiyyin Shehus: a Working Chronology\" in Berichte des Sonderforschungsbereichs, 268, Bd. 2, Frankfurt a. M. 1993: 179-186. Mohammed, Kyari, Borno in the Rabih Years, 1893-1901 : The Rise and Crash of a Predatory State (Maiduguri Nigeria: University of Maiduguri, 2006). External links Kanuri Studies Association Royalty of Borno 1894 deaths 19th-century monarchs in Africa Year of birth missing 19th-century Nigerian people"} {"instruction": "Modify the given python program to accept an input string and output the length of that string.", "input": "def func(): print(\"Hello World!\")", "output": "def func(s): print(\"Length of the string is: \" + str(len(s)))"} {"text": "[DE Wikipedia] Champions League 2006\n\nChampions League 2006 steht für: AFC Champions League 2006, asiatischer Fußballwettbewerb für Vereinsmannschaften der Männer CAF Champions League 2006, afrikanischer Fußballwettbewerb für Vereinsmannschaften der Männer CONCACAF Champions’ Cup 2006, nord- und mittelamerikanischer Fußballwettbewerb für Vereinsmannschaften der Männer OFC Champions Cup 2006, ozeanischer Fußballwettbewerb für Vereinsmannschaften der Männer Siehe auch: Champions League 2005/06 Champions League 2006/07 Champions League"} {"instruction": "Create a Python script that takes a string as an input and outputs a list of words that all contain at least one vowel.", "input": "\"Hello my name is John\"", "output": "['Hello', 'name', 'John']"} {"instruction": "Construct a Fibonacci Heap class.", "input": "", "output": "\"\"\" Construct a Fibonacci Heap class \"\"\" class FibonacciHeap: def __init__(self): self.min = None self.nodes = [] def insert(self, node): self.nodes.append(node) if self.min is None or node.key < self.min.key: self.min = node def extract_min(self): min_node = self.min self.min = None return min_node if __name__ == '__main__': heap = FibonacciHeap() node1 = Node(3) node2 = Node(10) heap.insert(node1) heap.insert(node2) print(heap.extract_min().data) # prints 3"} {"instruction": "Create a Python script to format the following string with proper new lines and indentation.", "input": "'{ \"name\":\"John\", \"age\":30, \"city\":\"New York\"}'", "output": "formatted = '{\\n \"name\":\"John\",\\n \"age\":30,\\n \"city\":\"New York\"\\n}'"} {"instruction": "Create a Python program to generate random passwords of 8 alphanumeric characters.", "input": "", "output": "import string\nimport random\n\ndef generate_password():\n letters = string.ascii_letters + string.digits\n return ''.join(random.choice(letters) for i in range(8))"} {"instruction": "Develop a code to rotate a given list by a given value.", "input": "my_list = [1, 2, 3, 4, 5] k = 3", "output": "def rotate_list(my_list, k): \"\"\" A function to rotate a given list by a given value. Input: list, integer Output: list \"\"\" # Get the length of list length = len(my_list) # Rotate the list rotated = my_list[-k % length:] + my_list[:-k % length] return rotated"} {"text": "[DE Wikipedia] Haltestelle Wien Unter-Döbling\n\nDie Haltestelle Wien Unter-Döbling im 19. Wiener Gemeindebezirk Döbling war eine Haltestelle im Kreuzungsbereich Döblinger Hauptstraße / Hohe Warte / Barawitzkagasse / Ruthgasse / Nusswaldgasse. Trotz ihres Namens lag sie nicht in der Katastralgemeinde Unterdöbling, sondern östlich der Döblinger Hauptstraße und damit bereits in Heiligenstadt. Die in Tieflage errichtete Station am Streckenkilometer 8,415 der Vorortelinie verfügte über zwei Seitenbahnsteige, ihr betriebliches Kürzel lautete UD. Geschichte Im Zuge der Planung der Vorortelinie der Wiener Dampfstadtbahn entwarf der Architekt Otto Wagner für die Commission für Verkehrsanlagen in Wien auch das Aufnahmsgebäude der Haltestelle Unter-Döbling. Es wurde im Juni 1895 – als erstes Stationsgebäude der Stadtbahn überhaupt – baulich fertiggestellt. Die planmäßige Betriebsaufnahme folgte am 11. Mai 1898, zusammen mit den anderen Stationen der Strecke. Anfangs fuhr in diesem Bereich ausschließlich die Stadtbahn, die Straßenbahn zur Hohen Warte ging erst am 23. Dezember 1903 in Betrieb. Mit der Einstellung des regulären Personenverkehrs auf der Vorortelinie am 11. Juli 1932 verlor auch diese Haltestelle ihren ursprünglichen Verwendungszweck und verfiel in den folgenden Jahrzehnten zusehends, das Aufnahmsgebäude wurde Mitte der 1950er Jahre abgerissen. Die weiterhin verkehrenden Bäderzüge fuhren hingegen in Unter-Döbling ohne Halt durch. Als die Vorortelinie schließlich 1987 als Teil der Wiener S-Bahn reaktiviert wurde, ging Unter-Döbling als einzige Zwischenstation der Strecke nicht wieder in Betrieb. Darüber hinaus ist sie heute die einzige für die Wiener Stadtbahn eingerichtete Station überhaupt, die nicht mehr existiert. Die Bedienung erfolgt ersatzweise durch die Straßenbahnlinie 37 sowie die Autobuslinien 10A und 39A, die hier die Haltestelle Barawitzkagasse einhalten. Literatur Alfred Horn: Wiener Stadtbahn. 90 Jahre Stadtbahn, 10 Jahre U-Bahn. Bohmann-Verlag, Wien 1988, ISBN 3-7002-0678-X. Einzelnachweise Unter-Döbling Döbling"} {"text": "[EN Wikipedia] Aaron\n\nAccording to Abrahamic religions, Aaron ( or ) was a prophet, a high priest, and the elder brother of Moses. Information about Aaron comes exclusively from religious texts such as the Hebrew Bible, the New Testament (Luke, Acts, and Hebrews), and the Quran. The Hebrew Bible relates that, unlike Moses, who grew up in the Egyptian royal court, Aaron and his elder sister Miriam remained with their kinsmen in the northeastern region of the Nile Delta. When Moses first confronted the Egyptian king about the enslavement of the Israelites, Aaron served as his brother's spokesman to the Pharaoh (). Part of the Law given to Moses at Sinai granted Aaron the priesthood for himself and his male descendants, and he became the first High Priest of the Israelites. Levitical priests or kohanim are traditionally believed and halakhically required to be of direct patrilineal descent from Aaron. According to the Book of Numbers, Aaron died at 123 years of age, on Mount Hor, in the fortieth year after the Israelites had come out of the land of Egypt. Deuteronomy, however, places these events at Moseroth. Biblical narrative According to the Book of Exodus, Aaron first functioned as Moses' assistant. Because Moses complained that he could not speak well, God appointed Aaron as Moses' \"prophet\" (). At the command of Moses, he let his rod turn into a snake. Then he stretched out his rod in order to bring on the first three plagues. After that, Moses tended to act and speak for himself. During the journey in the wilderness, Aaron was not always prominent or active. At the battle with Amalek, he was chosen with Hur to support the hand of Moses that held the \"rod of God\". When the revelation was given to Moses at Mount Sinai, he headed the elders of Israel who accompanied Moses on the way to the summit. While Joshua went with Moses to the top, however, Aaron and Hur remained below to look after the people. From here on in Exodus, Leviticus and Numbers, Joshua appears in the role of Moses' assistant while Aaron functions instead as the first high priest. High Priest The books of Exodus, Leviticus and Numbers maintain that Aaron received from God a monopoly over the priesthood for himself and his male descendants. The family of Aaron had the exclusive right and responsibility to make offerings on the altar to Yahweh. The rest of his tribe, the Levites, were given subordinate responsibilities within the sanctuary. Moses anointed and consecrated Aaron and his sons to the priesthood, and arrayed them in the robes of office. He also related to them God's detailed instructions for performing their duties while the rest of the Israelites listened. Aaron and his successors as high priest were given control over the Urim and Thummim by which the will of God could be determined. God…"} {"instruction": "Construct a query in PostgreSQL to delete all the rows from a table.", "input": "", "output": "DELETE FROM table_name;"} {"text": "[CS Wikipedia] Le Crotoy\n\nLe Crotoy je francouzská obec v departementu Somme v regionu Hauts-de-France. V roce 2010 zde žilo 2 219 obyvatel. Vývoj počtu obyvatel Související články Seznam obcí v departementu Somme Externí odkazy Reference Obce v departementu Somme Přímořská letoviska ve Francii"} {"instruction": "Generate a regex to check if a given string contains any vowels", "input": "", "output": "let regex = /[aeiou]/i;"} {"instruction": "Make a program in Python that ensures that two dates provided by the user are within one year of each other.", "input": "date1 = \"10-02-2020\"\ndate2 = \"11-02-2021\"", "output": "from datetime import datetime\n\ndate1 = datetime.strptime(date1, \"%d-%m-%Y\")\ndate2 = datetime.strptime(date2, \"%d-%m-%Y\")\n\ndef within_year (date1, date2):\n if abs((date2 - date1).days) <= 365:\n return True\n else:\n return False\n\nif within_year(date1, date2):\n print(\"The two dates are within one year of each other.\")\nelse:\n print(\"The two dates are not within one year of each other.\")"} {"instruction": "Write a Python algorithm to find out whether a number is a palindrome or not.", "input": "", "output": "def is_palindrome(n):\n n_str = str(n)\n rev_str = n_str[::-1]\n if n_str == rev_str:\n return True\n else:\n return False"} {"text": "[HI Wikipedia] सुंग जू यिंग\n\nसुंग जू यिंग (, जन्म: 13 अगस्त 1966) चीनी गायक और चीन की कम्युनिस्ट पार्टी की सदस्य है। जीवनी सुंग गूज़ांग काउंटी, शियांशी तुजिया और मियाओ स्वायत्त दीचू, हूनान में पैदा हुई थी। वह मियाओ नस्ल की है। जब वो 12 साल की थी तभी उनके पिता का देहांत हो गया। 1991 में वह एक राष्ट्रीय प्रथम श्रेणी के गायक के रूप में चीनी पीपुल्स लिबरेशन आर्मी की नौसेना के गीत और नृत्य मंडली में शामिल हो गई। 2009 तक वह चीनी नौसेना में एक अयोद्धा रियर एडमिरल है। 1999 में वह चीनी कम्युनिस्ट पार्टी में शामिल हो गई। वह 9 वीं नेशनल पीपुल्स कांग्रेस में एक प्रतिनिधि बनने के लिए चुनी गई और 10 वीं चीनी पीपुल्स राजनीतिक सलाहकार सम्मेलन के सदस्य भी। वह चीन की कम्युनिस्ट यूथ लीग की एक स्थायी सदस्य है, अखिल चीन महिला संघ की एक कार्यकारी सदस्य, चीन की साहित्य और कला मण्डल फेडरेशन की सदस्य और चीन संगीतकार एसोसिएशन की एजेंट। पुरस्कार हाल के वर्षों में, उन्हें निम्नलिखित पुरस्कार प्राप्त हुए हैं: अल्पसंख्यक राष्ट्रीयता की चीन गायन प्रतियोगिता का पहला स्थान चीन के स्वर्ण डिस्क का पुरस्कार सीसीटीवी की चीनी राष्ट्रीय आवाज़ का उत्कृष्ट योगदान पुरस्कार नैतिक और क्षमता के कलाकार, कार्मिक चीन मंत्रालय और चीन साहित्य एसोसिएशन द्वारा सन्दर्भ 1966 में जन्मे लोग जीवित लोग"} {"instruction": "Create a Node.js script that logs a string.", "input": "", "output": "const fs = require('fs'); // Logs the specified string function logString(str) { console.log(str); } logString('Log this string');"} {"instruction": "Design a template system for generating emails using Python.", "input": "A JSON object containing the email's data", "output": "import re\nimport json\n\n# Load the data from the JSON\nwith open('email_data.json') as f:\n data = json.load(f)\n\n# Create a template for the email\nemail_template = \"\"\"\nDear {{ recipient }},\n\n{{ greeting }},\n\n{{ message }}\n\n{{ signature }}\n\"\"\"\n\n# Compile the regex\npattern = re.compile(r'{{\\s*(.*?)\\s*}}')\n\n# Function to format the template\ndef format_template(template, data):\n # Find all the placeholders\n placeholders = pattern.findall(template)\n\n # Replace the placeholders in the template with the actual values\n for placeholder in placeholders:\n value = data.get(placeholder)\n template = template.replace('{{ %s }}' % placeholder, value)\n\n return template\n\n# Format the email template\nformatted_email = format_template(email_template, data)\n\n# Print the formatted email\nprint(formatted_email)"} {"text": "[DE Wikipedia] Paris–Luxemburg 1964\n\nParis–Luxemburg 1964 war die 2. Austragung von Paris–Luxemburg, einem mehrtägigen Etappenrennen. Das Rennen wurde von Rik Van Looy vor Jean Stablinski und Edgard Sorgeloos gewonnen. Teilnehmende Mannschaften Etappenübersicht Ergebnisse Gesamtwertung Weblinks Paris–Luxembourg 1964 Einzelnachweise Radrennen 1964"} {"instruction": "Create a class Employee with constructor to initialize the instance variables _name and _age", "input": "", "output": "class Employee { private String _name; private int _age; public Employee(String name, int age) { this._name = name; this._age = age; } public String getName() { return _name; } public int getAge() { return _age; } }"} {"instruction": "Write a JavaScript function that accepts a string argument and returns its capitalized value.", "input": "", "output": "function capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); }"} {"text": "[HI Wikipedia] वेद\n\nवेद, प्राचीन भारत वर्ष के पवित्र साहित्य हैं जो धरती के प्राचीनतम सनातन हिन्दुओं के प्राचीनतम और आधारभूत धर्मग्रन्थ भी हैं । वेद, विश्व के सबसे प्राचीन साहित्य भी हैं। भारतीय संस्कृति में वेद सनातन एवं वर्णाश्रम धर्म के मूल और सबसे प्राचीन ग्रन्थ है। 'वेद' शब्द संस्कृत भाषा के विद् धातु से बना है, जिसका अर्थ होता है जानना,अतः वेद का शाब्दिक अर्थ है 'ज्ञान' । इसी धातु से 'विदित' (जाना हुआ), 'विद्या' (ज्ञान), 'विद्वान' (ज्ञानी) जैसे शब्द आए हैं। इन्हें देववाणी के रूप में माना गया है| इसीलिए ये ' श्रुति' कहलाते हैं| वेदों को परम सत्य माना गया है| उनमें लौकिक अलौकिक सभी विषयों का ज्ञान भरा पड़ा है| प्रत्येक वेद के चार अंग हैं| वे हैं वेदसंहिता, ब्राह्मण-ग्रन्थ, आरण्यक तथा उपनिषद्| आज 'चतुर्वेद' के रूप में ज्ञात इन ग्रंथों का विवरण इस प्रकार हैं :- ऋग्वेद - सबसे प्राचीन तथा प्रथम वेद जिसमें मन्त्रों की संख्या १०४६२,मंडल की संख्या १० तथा सूक्त की संख्या १०२८ है। ऐसा भी माना जाता है कि इस वेद में सभी मंत्रों के अक्षरों की कुल संख्या ४३२००० है। इसका मूल विषय ज्ञान है। विभिन्न देवताओं का वर्णन है तथा ईश्वर की स्तुति आदि। यजुर्वेद - इसमें कार्य (क्रिया) व यज्ञ (समर्पण) की प्रक्रिया के लिये १९७५ गद्यात्मक मन्त्र हैं। सामवेद - इस वेद का प्रमुख विषय उपासना है। संगीत में लगे सुर को गाने के लिये १८७५ संगीतमय मंत्र। अथर्ववेद - इसमें गुण, धर्म, आरोग्य, एवं यज्ञ के लिये ५९७७ कवितामयी मन्त्र हैं। चारों वेदों का सम्बन्ध यज्ञ से है| यज्ञ करने में चार प्रकार के ऋत्विजों की आवश्यकता होती है| यथा- • होता • उद्गाता •अध्वर्यु • ब्रह्मा | को अपौरुषेय (जिसे किसी पुरुष के द्वारा न किया जा सकता हो, (अर्थात् ईश्वर कृत) माना जाता है। यह ज्ञान विराटपुरुष से वा कारणब्रह्म से श्रुति परम्परा के माध्यम से सृष्टिकर्ता ब्रह्माजी ने प्राप्त किया माना जाता है। यह भी मान्यता है कि परमात्मा ने सबसे पहले चार महर्षियों जिनके अग्नि, वायु, आदित्य और अंगिरा नाम थे; के आत्माओं में क्रमशः ऋग्वेद, यजुर्वेद, सामवेद और अथर्ववेद का ज्ञान दिया, उन महर्षियों ने फिर यह ज्ञान ब्रह्मा को दिया। इन्हें श्रुति भी कहते हैं जिसका अर्थ है 'सुना हुआ ज्ञान'। क्योंकि इन्हें सुनकर के लिखा गया था। अन्य आर्य ग्रंथों को स्मृति कहते हैं, अर्थात वेदज्ञ मनुष्यों की वेदानुगत बुद्धि या स्मृति पर आधारित ग्रन्थ। वेद मंत्रों की व्याख्या करने के लिए अनेक ग्रंथों जैसे ब्राह्मण-ग्रन्थ, आरण्यक और उपनिषद की रचना की गई। इनमे प्रयुक्त भाषा वैदिक संस्कृत कहलाती है जो लौकिक संस्कृत से कुछ अलग है। ऐतिहासिक रूप से प्राचीन भारत और हिन्द-आर्य जाति के बारे में वेदों को एक अच्छा सन्दर्भ स्रोत माना जाता है। संस्कृत भाषा के प्राचीन रूप को लेकर भी इनका साहित्यिक महत्त्व बना हुआ है। वेदों को समझना प्राचीन काल से ही पहले भारतीय और बाद में संपूर्ण विश्व भर में एक वार्ता का विषय रहा है। इसको पढ़ाने के लिए छः अंगों - शिक्षा, कल्प, निरुक्त, व्याकरण, छन्द और ज्योतिष के अध्ययन और उपांगों जिनमें छः शास्त्र - पूर्वमीमांसा, वैशेषिक, न्याय, योग, सांख्य और वेदांत व दस उपनिषद् - इशावास्य, केन, कठ, प्रश्न, मुण्डक, मांडुक्य, ऐतरेय, तैतिरेय, छान्दोग्य और…"} {"instruction": "Create a class in Python which takes an employee name and salary as parameters and prints them.", "input": "Employee Name: John Smith, Salary: 5000", "output": "class Employee:\n def __init__(self, name, salary):\n self.name = name\n self.salary = salary\n \n def print_employee_details(self):\n print('Employee Name: {}, Salary: {}'.format(self.name, self.salary))\n\nemployee = Employee('John Smith', 5000)\nemployee.print_employee_details()"} {"instruction": "Design a class in Java to represent a student, with their name and grade fields.", "input": "", "output": "public class Student { String name; String grade; public Student(String name, String grade) { this.name = name; this.grade = grade; } public String getName() { return this.name; } public String getGrade() { return this.grade; } }"} {"instruction": "Isolate all the comments from a given piece of code", "input": "def square(x): # return square of x return x * x", "output": "# return square of x"} {"instruction": "Create a method in JavaScript that will return the area of a triangle.", "input": "", "output": "// Calculating area of triangle in JavaScript function areaOfTriangle(a, b, c) { // Calculate the semi-perimeter of the triangle var s = (a + b + c) / 2; // Calculate the area of triangle using Heron's Formula var area = Math.sqrt(s * (s - a) * (s - b) * (s - c)); // Return the area of triangle return area; }"} {"text": "[DE Wikipedia] Karl-Heinz Thomas (Schauspieler)\n\nKarl-Heinz Thomas (* 15. Februar 1937 in Hannover) ist ein deutscher Schauspieler bei Bühne, Film und Fernsehen. Leben und Wirken Thomas erhielt eine Ausbildung zum Sänger und Schauspieler. Seine künstlerische Laufbahn startete er 1959 als Bassbuffo im Chor von Münster. Anschließend wirkte der Hannoveraner als freischaffender Künstler an verschiedenen Münchner Bühnen. Nebenbei arbeitete Thomas auch für den Hörfunk und machte Synchron. Ab 1965 kamen für gut zwei Jahrzehnte zahlreiche Angebote vom Fernsehen hinzu. Meist besaßen seine Rollen dort Kleinstformat. In den 1970er Jahren sah man Thomas auch im Kinofilm – sowohl in ambitionierten Filmemacher-Produkten wie Erwin Keuschs Das Brot des Bäckers und Alexander Kluges Der starke Ferdinand als auch in Softsexfilmchen vom Schlage Rosemaries Schleckerland und Kasimir, der Kuckuckskleber. Am besten in Erinnerung geblieben ist Karl-Heinz Thomas mit seiner kleinen Dauerrolle als Polizeiarzt in diversen frühen Folgen der ZDF-Krimiserien Der Alte und Derrick, die er ab 1977 bis 1983 respektive bis 1986 übernahm. Filmografie 1965, 1968: Das Kriminalmuseum (TV-Serie, zwei Folgen) 1967: Zur blauen Palette 1967: Der Fall Ivar Kreuger 1968: Schmutzige Hände 1969: Todesschüsse am Broadway 1970: Der Bettelstudent 1971: Ehen vor Gericht (eine Folge) 1972: Die rote Kapelle 1973: Merkwürdige Lebensgeschichte des Friedrich Freiherrn von der Trenck 1975: Der starke Ferdinand 1976: Das Brot des Bäckers 1977: Kasimir, der Kuckuckskleber 1978: Rosemaries Schleckerland 1978: Götz von Berlichingen mit der eisernen Hand 1979: Lucky Star 1977–1983: Der Alte (TV-Serie, zahlreiche Folgen) 1977–1986: Derrick (TV-Serie, zahlreiche Folgen) 1981: Auf Achse Weblinks Theaterschauspieler Filmschauspieler Deutscher Geboren 1937 Mann"} {"instruction": "Create a Python script to extract emails from a given string.", "input": "\"Alice lives at alice@example.com and Bob lives at bob@example.com.\"", "output": "import re\n\ninput_str = \"Alice lives at alice@example.com and Bob lives at bob@example.com.\"\n\n# use regular expression to extract emails\npattern = r'[\\w\\.-]+@[\\w\\.-]+'\n\nemails = re.findall(pattern, input_str)\n\nprint(emails) # ['alice@example.com', 'bob@example.com']"} {"instruction": "How do you connect to a MySQL database in Python?", "input": "", "output": "You can connect to a MySQL database in Python using the mysql.connect() method. The syntax of this method is as follows: mysql.connect(host=\"localhost\", user=\"username\", password=\"password\", database=\"database_name\") Once you have successfully connected to the MySQL database, you can run SQL queries or perform other operations."} {"instruction": "Create a web crawler in Python that collects data from specific pages.", "input": "https://en.wikipedia.org/wiki/Python_(programming_language)", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = \"https://en.wikipedia.org/wiki/Python_(programming_language)\"\n\nr = requests.get(url)\nsoup = BeautifulSoup(r.content)\n\n# get page title\ntitle = soup.find('h1', attrs={'id': 'firstHeading'}).text\n\n# get all div nodes with class\ndivs = soup.find_all('div', class_='mw-body-content')\n\n# get all links\nlinks = []\nfor div in divs:\n links.extend(div.find_all('a'))\n\n# print title and links\nprint(\"Page title: {}\".format(title))\nfor link in links:\n print(\"Link: {}\".format(link['href']))"} {"instruction": "Write a function in Java for calculating the Modified Julian Date for a given date.", "input": "", "output": "public double calculateModifiedJulianDate(String date) { int year = Integer.parseInt(date.substring(0, 4)); int month = Integer.parseInt(date.substring(5, 7)); int day = Integer.parseInt(date.substring(8, 10)); int hour = Integer.parseInt(date.substring(11, 13)); int minute = Integer.parseInt(date.substring(14, 16)); int second = Integer.parseInt(date.substring(17)); double julianDayNumber = 367*year - (7.0/4.0) * (year + (month + 9)/12.0) + (275.0/9.0)*(month) + day - 719561.5; double modifiedJulianDayNumber = julianDayNumber + (hour + (minute + (second/60.0))/60.0)/24.0; return modifiedJulianDayNumber; }"} {"text": "[EN Wikipedia] Taharua River\n\nThe Taharua River is a river of the northwestern Hawke's Bay region of New Zealand's North Island. It flows south from its origins 25 kilometres southwest of Taupō to reach the Mohaka River of which it is one of the earliest tributaries. See also List of rivers of New Zealand References Rivers of the Hawke's Bay Region Rivers of New Zealand"} {"instruction": "Generate a correct python program to perform linear regression.", "input": "", "output": "import numpy as np\n\ndef linear_regression(X, y):\n X_b = np.array([np.ones(X.shape[0]), X]).T\n theta = np.linalg.inv(X_b.T @ X_b) @ X_b.T @ y\n return theta"} {"text": "[DE Wikipedia] Harald Stenger\n\nHarald Stenger (* 13. Februar 1951 in Frankfurt-Bornheim, Hessen) ist ein deutscher Sportjournalist und ehemaliger Pressesprecher beim Deutschen Fußball-Bund. Karriere Stenger begann seine journalistische Karriere schon während seiner Schulzeit als freier Mitarbeiter in der Sportredaktion der Frankfurter Rundschau. Er berichtete mehr als drei Jahrzehnte für diese, seit 1990 als „Fußballchef“. Vor allem kümmerte er sich um die Nationalmannschaft, aber auch um Bundesliga- und Europacupspiele. Außerdem engagierte er sich über zwanzig Jahre lang ehrenamtlich in der Jugendarbeit. Nachdem der einstige Medienchef Wolfgang Niersbach 2001 zum geschäftsführenden Vizepräsidenten und Pressechef des Organisationskomitees der Fußball-Weltmeisterschaft 2006 bestellt wurde, trat Stenger am 1. Juli 2001 seine Nachfolge an. Ursprünglich war er Direktor für Kommunikation und damit verantwortlich für die gesamte Öffentlichkeitsarbeit beim DFB. 2010 wurde sein Kompetenzbereich auf die deutsche A-Nationalmannschaft und die Pressearbeit bei der WM 2010 beschränkt. Die Fußball-Weltmeisterschaft 2010 war die neunte WM, die Stenger begleitete, und seine dritte als Angestellter des DFB. Danach war er noch bis zur Europameisterschaft 2012 als Pressesprecher der Nationalmannschaft aktiv. Sein zum 31. August 2012 auslaufender Vertrag wurde vom DFB nicht verlängert. Im Oktober 2013 wurde Stenger mit dem Herbert-Award ausgezeichnet. Den Medienpreis, der an Herbert Zimmermann erinnert, den legendären Reporter des 1954er-WM-Endspiels, erhielt Stenger in der Kategorie Lebensleistung für seine Arbeit als Pressesprecher der Nationalmannschaft und DFB-Mediendirektor. Wegen der von ihm bei Turnieren täglich geleiteten Pressekonferenzen der Nationalmannschaft wurde er von Pressevertretern gerne als „Daily Stenger“ bzw. „Daily Harry“ bezeichnet. Stenger war von 1998 bis 2001 Vorsitzender der Schlappekicker-Aktion der Frankfurter Rundschau, die unverschuldet in Not geratene Sportler bzw. Sportvereine und -Initiativen unterstützt, die sich in besonderer Weise gesellschaftlich engagieren. Seit April 2017 ist Stenger wieder Mitglied des Schlappekicker-Vorstands und stellvertretender Vorsitzender. Weblinks Interview (August 2012) Frankfurter Allgemeine Sonntagszeitung 8. Juni 2014: Die Saunagänge waren keine Therapie - Interview anlässlich der Fußball-Weltmeisterschaft 2014 Einzelnachweise Fußballfunktionär (Deutschland) Pressesprecher Person (Frankfurt am Main) Geboren 1951 Mann"} {"instruction": "Create a Python program to group elements of a list based on their length.", "input": "['cat', 'dog', 'apple']", "output": "def groupByLength(arr):\n result = {}\n for word in arr:\n if len(word) in result:\n result[len(word)].append(word)\n else:\n result[len(word)] = [word]\n return result\n\ngroupedByLength = groupByLength(['cat', 'dog', 'apple'])\nprint(groupedByLength)"} {"instruction": "Create a program to calculate the standard deviation of an array of numbers.", "input": "arr = [10, 8, 12, 5, 9]", "output": "def stdev(arr): n = len(arr) mean = sum(arr) / n variance = sum((x - mean) ** 2 for x in arr) / n return (variance ** 0.5)"} {"instruction": "Write a Python program to access an item of a list.", "input": "list1 = [1, 2, 3, 4, 5]\nitem_index = 3", "output": "list1 = [1, 2, 3, 4, 5]\nitem_index = 3\n\ndef access_list_item(my_list, index):\n return my_list[index]\n\nresult = access_list_item(list1, item_index)\nprint(result)"} {"instruction": "Create a python module that reads the sentiment of a given text.", "input": "Nothing", "output": "import nltk\nfrom nltk.sentiment.vader import SentimentIntensityAnalyzer\n\ndef sentiment_score(text): \n sentiment_scores = SentimentIntensityAnalyzer().polarity_scores(text) \n return sentiment_scores[\"compound\"]"} {"text": "[EN Wikipedia] Gmina Borowie\n\nGmina Borowie is a rural gmina (administrative district) in Garwolin County, Masovian Voivodeship, in east-central Poland. Its seat is the village of Borowie, which lies approximately north-east of Garwolin and south-east of Warsaw. The gmina covers an area of , and as of 2006 its total population is 5,131. Villages Gmina Borowie contains the villages and settlements of Borowie, Brzuskowola, Chromin, Dudka, Filipówka, Głosków, Gościewicz, Gózd, Iwowe, Jaźwiny, Kamionka, Laliny, Łętów, Łopacianka, Nowa Brzuza, Słup Drugi, Słup Pierwszy, Stara Brzuza and Wilchta. Neighbouring gminas Gmina Borowie is bordered by the gminas of Garwolin, Górzno, Latowicz, Miastków Kościelny, Parysów, Stoczek Łukowski and Wodynie. References Polish official population figures 2006 Borowie Garwolin County"} {"instruction": "Design a Python function that rearranges the elements of a given array", "input": "[1, 2, 3, 4, 5]", "output": "def rearrange_arr(arr): \n arr.sort(reverse = True) \n return arr"} {"text": "[HI Wikipedia] १७ सितम्बर\n\n17 सितंबर ग्रेगोरी कैलंडर के अनुसार वर्ष का 260वॉ (लीप वर्ष में 261 वॉ) दिन है। साल में अभी और 105 दिन बाकी है। प्रमुख घटनाएँ 1922- डच साइकिल चालकपीट मोस्कप्स विश्व चैंपियन बना। 1923 - बर्कले में भड़की आग ने कैलिफोर्निया में भीषण तबाही मचायी। इसमें कैलिफोर्निया विश्वविद्यालय के परिसर के उत्तर पड़ोस में सघन रूप से बनाए गए 584 घरों सहित कोई 640 भवन आग की चपेट में आ गए। 1630- अमेरिका के बॉस्टन शहर की स्थापना। 1761- कोसाब्रोमा का युद्ध लड़ा गया। 1867- भारतीय कलाकार गगनेंद्रनाथ टैगोर का जन्म। 1876- बंगाली उपन्यासकार शरतचंद्र चट्टोपाध्याय का जन्म। 1879- तमिल भारतीय स्वतंत्रता सेनानी, राजनेता और सामाजिक कार्यकर्ता ई वी रामास्वामी नायकर का जन्म। 1948- हैदराबाद रियासत का भारत में विलय। 1949- दक्षिण भारतीय राजनीतिक दल द्रविड़ मुनेत्र कषगम (द्रमुक) की स्थापना। 1950- भारतीय राजनेता और वर्तमान प्रधानमंत्री नरेन्द्र मोदी का जन्म। 1956- भारतीय तेल एवं प्राकृतिक गैस आयोग का गठन। 1957- मलेशिया संयुक्त राष्ट्र में शामिल हुआ। 1974- बंगलादेश, ग्रेनेडा और गिनी बिसाऊ संयुक्त राष्ट्र संघ में शामिल। 1982- भारत और सेलोन(श्रीलंका) के बीच पहला क्रिकेट टेस्ट मैच खेला गया। 1995 – चीन की राजधानी बीजिंग में ब्रिटिश शासन के अन्तर्गत अंतिम चुनाव सम्पन्न। 1999 – ओसामा बिन लादेन का भारत के विरुद्ध जेहाद का ऐलान। 2000 – जाफना प्राय:द्वीप का चवाक छेड़ी शहर लिट्टे से मुक्त। 2002 – इराक ने संयुक्त राष्ट्र हथियार निरीक्षकों को बिना शर्त देश में आने की अनुमति दी। 2011- न्यूयॉर्क के जुकोट्टी पार्क में वॉल स्ट्रीट घेरो आंदोलन की शुरूआत। जन्म 1892 श्री हनुमान प्रसाद पोद्दार \"भाईजी\" 1922- वंस बॉर्जैली, अमेरिकी लेखक, उपन्यासकार, नाटककार, पत्रकार और निबंधकार 1950 - नरेन्द्र मोदी, भारत का प्रधानमन्त्री 1876 - शरतचंद्र चट्टोपाध्याय,बंगाली उपन्यासकार निधन बाहरी कडियाँ बीबीसी पे यह दिन सितम्बर, १७"} {"instruction": "Design an algorithm in Python to sort an array of strings alphabetically.", "input": "", "output": "def sort_strings_alphabetically(arr):\n arr.sort(key=str.lower)\n return arr"} {"instruction": "Write a code to construct a new array with the elements reversed.", "input": "arr = [1, 2, 3, 4, 5]", "output": "def reverse_array(arr): \"\"\" Construct a new array with the elements reversed. \"\"\" new_arr = [] for i in range(len(arr)-1, -1, -1): new_arr.append(arr[i]) return new_arr"} {"instruction": "Design an algorithm in Python to traverse a 2D array top-down and left-right and output its contents as a single array.", "input": "[[1,2,3], [4,5,6], [7,8,9]]", "output": "def traverse2DArray(arr):\n output = []\n for i in range(len(arr)):\n for j in range(len(arr[0])):\n output.append(arr[i][j])\n return output\n\nprint(traverse2DArray([[1,2,3], [4,5,6], [7,8,9]])) # [1,2,3,4,5,6,7,8,9]"} {"text": "[DE Wikipedia] Santos FC Ouagadougou\n\nSantos Football Club ist ein Sportverein in Ouagadougou (Burkina Faso). Der 1977 gegründete Verein gewann dreimal die Meisterschaft der zweiten Division des Landes. Aufgrund der prekären finanziellen Situation des Klubs herrscht eine hohe Spielerfluktuation; junge vielversprechende Talente aus der Vereinsjugend verlassen den Klub früh, da Santos nur geringe Prämien und praktisch keine Gehälter zahlen kann. Ehemalige bekannte Spieler Aristide Bancé Moussa Kaboré Alassane Ouédraogo Ehemalige Trainer Moïse Oura (2007–2008) Aboubacar Cissé (2008–2012) Weblinks Artikel über den Verein (französisch) Burkinischer Fußballverein Santos FC Santos FC Ouagadougou"} {"instruction": "Create an MySQL table with four columns: \"id\", \"name\", \"age\", and \"city\".", "input": "", "output": "CREATE TABLE table_name ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(50) NOT NULL, age int(11) NOT NULL, city varchar(50) NOT NULL, PRIMARY KEY (id) );"} {"instruction": "Generate a Python class to represent a deck of cards in a card game.", "input": "", "output": "class Deck:\n \n #constructor\n def __init__(self):\n self.cards = []\n\n #function to create a deck of playing cards\n def create_deck(self):\n suits = [\"C\", \"S\", \"H\", \"D\"]\n ranks = [\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\", \"A\"]\n\n for suit in suits:\n for rank in ranks:\n card = (rank, suit)\n self.cards.append(card)\n\n #function to draw a card from the deck\n def draw_card(self):\n if self.cards:\n return self.cards.pop()\n else:\n return None"} {"text": "[CS Wikipedia] Slepičák\n\nSlepičák je zástupce plemene holuba domácího, které je charakteristické zvětšením hrudi ptáka až do té míry, že se tvarem těla podobá slepici. Plemenná skupina slepičáků je nepočetná, avšak vyhraněná a jednotlivá plemena jsou si značně podobná. Jsou podobní užitkovým plemenům a stejně jako oni mají kořeny v čistě užitkového zaměření chovu. V anglicky mluvících zemích je skupina slepičáků označovaná jako utility pigeons, tedy užitkoví holubi. V češtině se však užitkovými holuby obvykle myslí plemenná skupina, která je v zahraničí pojmenovaná holubi tvaru či holubi formy. Slepičáci jsou charakterističtí utvářením těla. Jejich trup je vodorovně nesený a hrudní partie jsou obzvláště vyvinuté. Ocas je relativně krátký a mírně až kolmo vztyčený. Původní užitkoví slepičáci měli kratší a silný krk, mírně protáhlý trup, kratší a jen lehce vztyčený ocas a středně vysoké nohy. Následně u některých plemen převážil exteriérový směr šlechtění, došlo ke zkrácení trupu a prodloužení krku i nohou a mezi současné slepičáky patří holubi s nejdokonalejšími a nejzvláštnějšími tělesnými tvary vůbec. V seznamu plemen EE je plemenné skupině slepičáků vyhrazena číselná řada 0200. Plemena slepičáků v seznamu EE Florentýnský slepičák Florentýnský slepičák, též florentský slepičák, florentský holub nebo florentýn, je nejstarším plemenem slepičáků. Je to velký a těžký holub s širokou a vypjatou hrudí, krátkými zády a výrazně zvednutým ocasem. Krk je silný a dlouhý, kratší však než u maltézského holuba. Nohy jsou dlouhé a silné. Florentýn se chová v pštrosí kresbě, základní barva opeření je bílá, barevná je hlava s obojkem, štíty křídel a ocas. Kvůli své velikosti florentský slepičák špatně létá. V seznamu plemen EE má číslo 0201. Vídeňský slepičák Vídeňský slepičák, též vídeňský slepičák straka nebo prostě slepičák, je velký, impozantně působící holub. Má dlouhý, štíhlý a vzpřímeně nesený krk a orlí hlavu: Zobák je klopený, silný a dlouhý. Linie hlavy a zobáku by neměla být ničím rušena. Hřbet je široký a krátký, křídla mírně odstávají od těla a zdůrazňují tak šířku hrudi ptáka. Ocas je nesen níže než u florentýna, nejvíce pod úhlem 35°. Nohy jsou velmi dlouhé, silné a rovné. Celková výška ptáka je asi 45 cm. Zvláštností vídeňského slepičáka je jeho kresba: celá hlava a náprsenka sahající až k hrudní kosti je barevná, stejně tak štíty křídel a ocas včetně podocasního klínu. Od kořene zobáku se po celém temeni až do záhlaví táhne 3–5 cm široká bílá pěšinka. Mezi barevnou náprsenkou a barevným ohbím křídel je asi 1 cm široká bílá mezera, bílé jsou také ruční letky. V seznamu plemen EE má číslo 0202. Maltézský slepičák Maltézský slepičák, též maltézský holub nebo maltézan, je staré, původně užitkové plemeno, které je v současné době exteriérově nejdokonalejším a nejextrémněji…"} {"instruction": "Explain the concept of the depth-first search algorithm and provide an example.", "input": "", "output": "Depth-first search (DFS) is an algorithm used to traverse a tree or graph data structure. It starts at the root of the tree, explores as far as possible down a given branch and then backtracks along the same path before exploring a new branch. For example, consider a BST (Binary Search Tree) where we want to traverse all the elements, the algorithm starts at the root node, then traverses all the elements in the left subtree before traversing all the elements in the right subtree."} {"instruction": "Describe the purpose of the ``await`` operator in an asynchronous JavaScript function.", "input": "", "output": "The purpose of the \"await\" operator in an asynchronous JavaScript function is to pause the execution of the function until a Promise is resolved and to return the resolved value from the Promise."} {"instruction": "Create a Python machine learning model that predicts the gender of the given data based on height and weight.", "input": "Height: 1.78m\nWeight: 80kg", "output": "import pandas as pd\nfrom sklearn.svm import SVC\nfrom sklearn.model_selection import train_test_split\n\n# Build dataset\ndata = [[1.78, 80, \"male\"], [1.69, 55, \"female\"], [1.68, 65, \"female\"], [1.68, 70, \"male\"], [1.73, 68, \"female\"]]\n\ndf = pd.DataFrame(data, columns=['height', 'weight', 'gender'])\n\n# Split data\nX = df[['height', 'weight']]\ny = df['gender']\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Train model\nmodel = SVC(kernel='linear')\nmodel.fit(X_train, y_train)\n\n# Make predictions\ny_pred = model.predict([[1.78, 80]])\nprint(\"Prediction:\", y_pred[0])"} {"text": "[EN Wikipedia] Bally Manufacturing\n\nBally Manufacturing, later renamed Bally Entertainment, was an American company that began as a pinball and slot machine manufacturer, and later expanded into casinos, video games, health clubs, and theme parks. It was acquired by Hilton Hotels in 1996. Its brand name, and mid-20th century pinball & slot machine logo, are still used by several businesses with some trademark rights, most notably Bally Technologies and Bally's Corporation. History The Bally Manufacturing Corporation was founded by Raymond Moloney on January 10, 1932, when Bally's original parent, Lion Manufacturing, established the company to make pinball games, taking its name from its first game, \"Ballyhoo\". The Chicago-based company quickly became a leading pinball maker. In the late 1930s, Moloney began making gambling equipment, and had great success developing and improving the mechanical slot machines that were the core of the nascent gaming industry. After manufacturing munitions and airplane parts during World War II, Bally Manufacturing Corporation continued producing innovations in flipperless pinball machines, bingo machines, payout machines and console slot machines through the late 1950s. They also designed and manufactured vending machines and established a coffee vending service. Additionally, they made a brief venture into the music business with their own record label, Bally Records. Moloney died in 1958, and the company briefly floundered. With the financial failure of its parent company, Bally was bought out by a group of investors in 1963. Throughout the 1960s, Bally continued to dominate the slot machine industry, cornering over 90% of the worldwide market by the end of the decade. In 1964, Bally introduced the first electromechanical slot machine, \"Money Honey.\" They became a publicly traded company, and in 1969 acquired Midway Manufacturing, an amusement game company from Schiller Park, Illinois. 1970s The company expanded internationally in 1974 when it acquired German company Guenter Wulff-Apparatebau, which was renamed Bally Wulff. In the late 1970s, Bally entered the casino ownership business when New Jersey legalized gambling in Atlantic City. The effort moved forward even though the company was temporarily unable to attain a permanent license for the completed casino. During this period, company head William T. O'Donnell was forced to resign because of alleged links to organized crime, which he strenuously denied. When questioned by the Moffitt Royal Commission in New South Wales, Australia, during an investigation of criminal activities between the US and Australia, O'Donnell admitted that Genovese Mafia boss Gerardo Catena once owned shares in Bally, but claimed to have bought him out. He also denied knowing Chicago mobster Joseph Dan Testa, even though…"} {"instruction": "Create a function to sort a given set of strings in dictionary order.", "input": "", "output": "def sort_dict(arr): arr.sort(key=lambda s: [s.lower(), s]) return arr"} {"instruction": "Write a Python program to optimize the following code to reduce its time complexity.", "input": "def isPrime(n):\n for i in range(2, n):\n if n % i == 0:\n return False\n return True", "output": "def isPrime(n):\n \"\"\"\nThis function takes a number and checks if it is a prime number\n \n Args:\n n: an integer\n\n Returns:\n true if number is prime, false otherwise\n \"\"\"\n # Edge case: 1 is not a prime number\n if n <= 1:\n return False\n\n # Check from 2 to the square root of number\n for i in range(2, int(math.sqrt(n))+1):\n # If number is divisible by i, it is not a prime number\n if (n % i == 0):\n return False\n\n # If not divisible by any number, it is a prime number\n return True\n\n# Call the function with the given input\nprint(isPrime(n))"} {"instruction": "To start pyHegel, import the module and call the function start_pyHegel(). If starting on Windows with the Console program, call start_console() instead.", "input": "", "output": "# -*- coding: utf-8 -*-\n\n########################## Copyrights and license ############################\n# #\n# Copyright 2011-2015 Christian Lupien #\n# #\n# This file is part of pyHegel. http://github.com/lupien/pyHegel #\n# #\n# pyHegel is free software: you can redistribute it and/or modify it under #\n# the terms of the GNU Lesser General Public License as published by the #\n# Free Software Foundation, either version 3 of the License, or (at your #\n# option) any later version. #\n# #\n# pyHegel is distributed in the hope that it will be useful, but WITHOUT #\n# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #\n# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public #\n# License for more details. #\n# #\n# You should have received a copy of the GNU Lesser General Public License #\n# along with pyHegel. If not, see . #\n# #\n##############################################################################\n\nfrom __future__ import absolute_import\n\n# Use version according to option 5 in https://packaging.python.org/en/latest/single_source_version.html\n\n# make sure that new versions numbers compare properly when using\n# pkg_resources.parse_version\n__version__ = '1.0.0rc2'\n__copyright__ = '2011-2015 Christian Lupien'\n\ndef start_pyHegel():\n \"\"\" This is the recommanded way to start pyHegel.\n It starts ipython in a standard way (pylab, autocall enabled,...)\n and then loads and initializes the pyHegel commands.\n\n If the python session was started with command line arguments\n --console, it will try to start pyHegel in the Console program\n that comes with pythonxy. This is windows only.\n\n If you later need access to the commands in a module:\n import pyHegel.commands as cmds\n cmds.get(somedevice)\n or\n from pyHe"} {"text": "[DE Wikipedia] Gold Stick\n\nGold Stick ist die Bezeichnung für einen Bediensteten am Hof des britischen Monarchen. Das Amt existiert seit der Tudor-Zeit, als zwei Offiziere zu persönlichen Leibwachen des Souveräns ernannt wurden und diesen Titel bekamen. Seit der Regentschaft von Königin Victoria sind die Aufgaben rein zeremonieller Natur. Die Gold Sticks sind im monatlichen Wechsel im Dienst. Der jeweils aktive Gold Stick führt die Bezeichnung Gold Stick-in-Waiting. Sie sind bei vielen protokollarischen Anlässen anwesend, z. B. Trooping the Colour und der alljährlichen Parlamentseröffnung. Der Name leitete sich von einem Stab mit goldenen Kopf her, der die Amtsgewalt symbolisiert. Die Regiments-Colonels der Gardekavallerieregimenter der britischen Armee sind stets kraft Amtes gleichzeitig Gold Stick. Zurzeit sind dies Prinzessin Anne als Colonel der Blues and Royals und Sir Edward Alexander Smyth-Osbourne als Colonel der Life Guards. In Schottland hat der Captain General der Royal Company of Archers, zur Zeit Richard Scott, 10. Duke of Buccleuch, das Amt inne. Stellvertreter der Gold Sticks ist der Silver Stick-in-Waiting, der bei weniger wichtigen protokollarischen Anlässen, wie dem Empfang eines Staatsoberhauptes, die Aufgaben allein wahrnimmt. Dieses Amt ist immer mit dem des Kommandeurs der Household Cavalry verbunden. Literatur Ronald Allison, Sarah Riddell (Hrsg.): The Royal Encyclopedia. Macmillan Press, London 1991, ISBN 0333538102, S. 234. Julian Paget: Discovering London Ceremonial and Traditions. (Band 281 von Discovering series). Shire, Princes Risborough 1989, ISBN 0852639945, S. 61. Militärisches Brauchtum und Ritual Militär (Vereinigtes Königreich)"} {"text": "[DE Wikipedia] Fuad Hassan\n\nFuad Hassan (* 26. Juni 1929 in Semarang; † 7. Dezember 2007 in Jakarta) war ein indonesischer Politiker. Leben Hassan hat an der Universitas Indonesia Psychologie studiert. Später fungierte er als Botschafter seines Landes in Ägypten. Von 1985 bis 1993 war er im vierten und fünften Kabinett unter Präsident Suharto Minister für Bildung und Kultur. Seit 2005 litt Fuad Hassan an Lungenkrebs. Am 7. Dezember 2007 starb der Politiker im Cipto Mangunkusumo Krankenhaus in Jakarta im Alter von 78 Jahren. Auszeichnungen 1992: Großes Goldenes Ehrenzeichen am Bande für Verdienste um die Republik Österreich Weblinks Kurzbiografie (englisch) Seamac President's Visit to Seameo Centres 1988 (englisch, mit Foto) Einzelnachweise Bildungsminister (Indonesien) Indonesischer Botschafter in Ägypten Träger des Großen Goldenen Ehrenzeichens am Bande für Verdienste um die Republik Österreich Indonesier Geboren 1929 Gestorben 2007 Mann"} {"text": "[EN Wikipedia] Barbara Slate\n\nBarbara Slate (born May 9, 1947) is an American artist, cartoonist, graphic novelist, comic book creator, and writer. She is one of the few female artists who has created, written, and drawn comics for both DC and Marvel Comics. Her textbook, You Can Do a Graphic Novel, was first published in 2010 by Alpha Books (Penguin/Putnam). In 1986 Barbara created Angel Love for DC Comics, an adult-themed series for teenagers. In an exhibition review, The New York Times described her art as \"emphatically of our time with its narrative of passion, gun violence, and female assertiveness.\" Career Early work In 1974, Slate's feminist cartoon character, Ms. Liz, appeared on millions of greeting cards, in a regular comic strip in Cosmopolitan magazine, and as the star in a series of animated segments on NBC's Today show in 1982. Many magazines and newspapers published extensive articles about Barbara Slate and Ms. Liz. Slate was interviewed about Ms. Liz for a seven-page feature in Cartoonist Profiles in 1983. Comics Comic Book Resources began Barbara Slate Week May 13, 2013, with a column about Angel Love. For Marvel Comics she created, wrote, and drew Sweet XVI, wrote 65 Barbie and Barbie Fashion comics and put her own spin on the Disney films Beauty and the Beast and Pocahontas. She also wrote and did the layout for the comic New Kids on the Block for Harvey Comics and Scooby Doo for DC Comics. Barbara wrote over one hundred Betty and Veronica stories for Archie Comics throughout the 1990s and 2000s. Comic Strips 1980s: Ms. Liz was featured in Cosmopolitan, Working Woman, SELF, and New Woman 1989-90: Yuppies From Hell (Marvel Comics) was excerpted in Cosmopolitan 1993-94: Makin' Ends Meet appeared in First for Women magazine; 1995: Violet appeared in International magazine 1998: Spinville appeared in React Magazine Columns 2008-2010: You Can Do A Graphic Novel] in Archie Digests, The Independent Newspaper, The Columbia Newspaper 2009: \"I Got Married and Other Mistakes\" in The Columbia Newspaper Graphic novels In 2012, Other Press published Getting Married and Other Mistakes. Jo is a successful wedding photographer who had followed her mother's advice to snag a husband. After nine years of an unblissful marriage she is dumped for another woman and desperately needs to get on with her life. She realizes that her Mr. Right was actually Mr. Wrong and that she was living her life according to everyone's rules but her own. The graphic novel delves into Jo's struggle with female guilt and her quest for self-awareness. Getting Married and Other Mistakes was featured May 17, 2013, as the final segment of Barbara Slate Week by Comic Book Resources. Teaching Barbara Slate travels nationwide as a keynote speaker, teacher, moderator and panelist. She teaches kids, teens, and…"} {"text": "[EN Wikipedia] Actrius\n\nActresses (Catalan: Actrius) is a 1997 Catalan language Spanish drama film produced and directed by Ventura Pons and based on the award-winning stage play E.R. by Josep Maria Benet i Jornet. The film has no male actors, with all roles played by females. The film was produced in 1996. Synopsis In order to prepare herself to play a role commemorating the life of legendary actress Empar Ribera, young actress (Mercè Pons) interviews three established actresses who had been the Ribera's pupils: the international diva Glòria Marc (Núria Espert), the television star Assumpta Roca (Rosa Maria Sardà), and dubbing director Maria Caminal (Anna Lizaran). Cast Núria Espert as Glòria Marc Rosa Maria Sardà as Assumpta Roca Anna Lizaran as Maria Caminal Mercè Pons as Estudiant Recognition Screenings Actrius screened in 2001 at the Grauman's Egyptian Theatre in an American Cinematheque retrospective of the works of its director. The film had first screened at the same location in 1998. It was also shown at the 1997 Stockholm International Film Festival. Reception In Movie - Film - Review, Christopher Tookey wrote that though the actresses were \"competent in roles that may have some reference to their own careers\", the film \"is visually unimaginative, never escapes its stage origins, and is almost totally lacking in revelation or surprising incident\". Noting that there were \"occasional, refreshing moments of intergenerational bitchiness\", they did not \"justify comparisons to All About Eve\", and were \"insufficiently different to deserve critical parallels with Rashomon\". He also wrote that The Guardian called the film a \"slow, stuffy chamber-piece\", and that The Evening Standard stated the film's \"best moments exhibit the bitchy tantrums seething beneath the threesome's composed veneers\". MRQE wrote \"This cinematic adaptation of a theatrical work is true to the original, but does not stray far from a theatrical rendering of the story.\" Awards and nominations 1997, won 'Best Catalan Film' at Butaca Awards for Ventura Pons 1997, won 'Best Catalan Film Actress' at Butaca Awards, shared by Núria Espert, Rosa Maria Sardà, Anna Lizaran, and Mercè Pons 1998, nominated for 'Best Screenplay' at Goya Awards, shared by Josep Maria Benet i Jornet and Ventura Pons References External links as archived 17 February 2009 (Spanish) 1997 films 1997 drama films Catalan-language films Films set in Barcelona Films directed by Ventura Pons Spanish drama films 1990s Spanish films"} {"instruction": "Create an object-oriented program in Python to calculate the total cost of an array of products. The program should include a Product class with fields for name, price, and quantity.", "input": "[\n {name: \"Apple\", price: 1.99, quantity: 2},\n {name: \"Banana\", price: 0.79, quantity: 5}\n]", "output": "class Product:\n def __init__(self, name, price, quantity):\n self.name = name\n self.price = price\n self.quantity = quantity\n\n \ndef calculateTotalCost(products):\n totalCost = 0\n \n for product in products:\n totalCost += product.price * product.quantity\n \n return totalCost\n \nproducts = [\n Product(\"Apple\", 1.99, 2),\n Product(\"Banana\", 0.79, 5)\n]\n \nprint(calculateTotalCost(products))\n# Output: 11.75"} {"instruction": "Create a function that creates a tuple of the given arguments and returns the tuple.", "input": "a=\"A\" b=\"B\"", "output": "def create_tuple(a, b): return (a, b)"} {"instruction": "Create a class to represent a complex number with two private fields (x, y) and two public member functions (getMagnitude, increment) in Java.", "input": "", "output": "public class ComplexNumber { private double x; private double y; public ComplexNumber(double x, double y) { this.x = x; this.y = y; } public double getMagnitude() { return Math.sqrt(x * x + y * y); } public void increment() { this.x++; this.y++; } }"} {"instruction": "Create a program to create a dictionary with words and their frequencies from a given sentence.", "input": "sentence = \"Python is an easy, powerful language with a simple syntax and high readability\"", "output": "def create_dict(sentence): words = sentence.split() res = {} for word in words: res[word] = words.count(word) return res # Output {'Python': 1, 'is': 1, 'an': 1, 'easy,': 1, 'powerful': 1, 'language': 1, 'with': 1, 'a': 1, 'simple': 1, 'syntax': 1, 'and': 1, 'high': 1, 'readability': 1}"} {"instruction": "Create a MySQL query to print all records from a specific table in descending order of their id.", "input": "", "output": "SELECT * FROM table_name ORDER BY id DESC;"} {"instruction": "Write a `PHP` script to sort an associative array based on its values.", "input": "$data = array(\"John\"=>45, \"Bob\"=>67, \"Ann\"=>55);", "output": "function sortByValue($data) { asort($data); return $data; }"} {"instruction": "The code is a Python script that checks for the latest episode of Bigg Boss 8 on colors.in.com. To use the script, run it from the command line with optional arguments for a custom search pattern or verbose output. The script will send a request to the server, get the page data as a string, and search for the latest episode link and episode list based on a pattern. If a new episode is found, the script will notify the user and print the link. Otherwise, it will print \"No new episode right now\". The script is free software under the GNU General Public License.", "input": "", "output": "#!/usr/bin/env python3\n#\n# Copyright (c) 2014 Shubham Chaudhary \n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program. If not, see .\n#\n\nimport os\nimport os.path\nimport platform\nimport random\nimport re\nimport sys\nimport time\n\nif sys.version_info >= (3,):\n import urllib.request as urllib2\n import urllib.parse as urlparse\n import urllib.error as urlerror\nelse:\n import urllib2\n import urlparse\n\n\ndef atoi(text):\n return int(text) if text.isdigit() else text\n\ndef natural_keys(text):\n '''\n alist.sort(key=natural_keys) sorts in human order\n http://nedbatchelder.com/blog/200712/human_sorting.html\n (See Toothy's implementation in the comments)\n '''\n return [atoi(c) for c in re.split('(\\d+)', text)]\n\ndef notify_user(message=None):\n ''' Notify the user about a particular event with given message\n '''\n if not message:\n message = 'Notification!!!'\n #print('-'*len(message))\n print('-'*int((len(message)-6)/2), 'NOTIFICATION', '-'*int((len(message)-6)/2))\n print(message)\n\ndef get_page_data():\n ''' Get page data as string from server\n '''\n print('Sending request to servers of Colors . . .')\n full_url = 'http://colors.in.com/in/biggboss'\n full_url = 'http://colors.in.com/in/biggboss/videos/episodes'\n # Send request\n try:\n #res.geturl(), .url=str, .status=200, .info=200, .msg=OK,\n response = urllib2.urlopen(full_url)\n except urlerror.HTTPError as exep:\n print('The server couldn\\'t fulfill the request.',\n 'Error code: ', exep.code)\n except urlerror.URLError as exep:\n print('We failed to reach a server.')\n print('Reason: ', exep.reason)\n else:\n # everything is fine\n #if verbose:\n print('Data received, Decoding . . .')\n web_page = str(response.read()) # More pythonic than .decode('utf-8')\n return web_page\n"} {"instruction": "Create a python function that takes two inputs as a string and returns their concatenated output.", "input": "String a = 'Hello'\nString b = 'World'", "output": "def concat(a,b):\n return a+b"} {"instruction": "Compose a query in MySQL to filter records from a table where the name contains \"John\".", "input": "", "output": "SELECT * FROM table WHERE name LIKE '%John%';"} {"text": "[CS Wikipedia] Ladislav Prášil\n\nLadislav Prášil (* 17. května 1990 Šternberk) je český atlet, vrhač. Je dvojnásobným držitelem bronzové medaile z halového mistrovství Evropy. Sportovní kariéra Rodák ze Šternberka začínal s atletikou v klubu AK Olomouc pod vedením Viktora Znojila. V roce 2010 přešel do Prahy do atletického tréninkového centra vrhačů Dukla Praha pod vedení Petra Stehlíka. V roce 2012 atakoval limit pro olympijské hry v Londýně (20 m) a zaostal za ním o 10 cm (19,90 m). Splnil však mírnější limit vrhače do 22 let pro účast na mistrovství Evropy v Helsinkách, kde nepostoupil z kvalifikace. Koncem srpna 2012 poprvé v kariéře překonal dvacetimetrovou hranici výkonem 20,04 m. V sezóně 2013 se stal pravidelným vrhačem za 20 m. V únoru vybojoval bronzovou medaili na halovém mistrovství Evropy v Göteborgu za výkon 20,29 m. V dubnu potom poprvé ve své kariéře převrhnul 21 m, když na přípravném závodě v jihoafrickém Potchefstroomu vrhnul 21,47 m a zařadil se na druhé místo českých tabulek za Remigia Machuru. Tímto výkonem se kvalifikoval na Mistrovství světa v atletice v Moskvě. Zajímavosti Přes své tělesné proporce nepatří Ladislav Prášil mezi silové vrhače. V roce 2008 utrpěl zranění kolene na levé noze. Problém řešil operativně po příchodu do Prahy na konci atletické sezony 2010. První plastika šlachy se nevydařila a po půl roce musel podstoupit plastiku znovu. Ani druhá operace však nedopadla podle představ. Kvůli tomuto zranění je Prášil limitován při odrazu. V současnosti se snaží řešit problém jinými metodami, především rehabilitací a speciálním posilováním. Osobní rekordy Venku 21,47 m (20. dubna 2013, Potchefstroom) V hale 20,82 m (22. ledna 2014, Jablonec nad Nisou) Odkazy Reference Externí odkazy Čeští koulaři Narození v roce 1990 Žijící lidé Narození ve Šternberku Muži Narození 17. května"} {"text": "[HI Wikipedia] मनोहर श्याम जोशी\n\nमनोहर श्याम जोशी 1933- (देहांत: मार्च ३०, २००६) आधुनिक हिन्दी साहित्य के श्रेष्ट गद्यकार, उपन्यासकार, व्यंग्यकार, पत्रकार, दूरदर्शन धारावाहिक लेखक, जनवादी-विचारक, फिल्म पट-कथा लेखक, उच्च कोटि के संपादक, कुशल प्रवक्ता तथा स्तंभ-लेखक थे। दूरदर्शन के प्रसिद्ध और लोकप्रिय धारावाहिकों- ' बुनियाद' 'नेताजी कहिन','सिल्वर वेडिंग' 'मुंगेरी लाल के हसीं सपने', 'हम लोग' आदि के कारण वे भारत के घर-घर में प्रसिद्ध हो गए थे। वे रंग-कर्म के भी अच्छे जानकार थे। उन्होंने धारावाहिक और फिल्म लेखन से संबंधित ' पटकथा-लेखन' नामक पुस्तक की रचना की है। दिनमान' और 'साप्ताहिक हिन्दुस्तान' के संपादक भी रहे। जीवन वृत्त उनका जन्म 09 अगस्त १९३३ को राजस्थान के अजमेर के एक प्रतिष्ठित एवं सुशिक्षित परिवार में हुआ था। उन्होंने स्नातक की शिक्षा विज्ञान में लखनऊ विश्वविद्यालय से पूरी की। परिवार में पीढ़ी दर पीढी शास्त्र-साधना एवं पठन-पाठन व विद्या-ग्रहण का क्रम पहले से चला आ रहा था, अतः विद्याध्ययन तथा संचार-साधनों के प्रति जिज्ञासु भाव उन्हें बचपन से ही संस्कार रूप में प्राप्त हुआ जो कालान्तर में उनकी आजीविका एवं उनके संपूर्ण व्यक्तित्व विकास का आधारबना। । रचानायें उपन्यास कुरु कुरु स्वाहा -1980 कसप - 1982 हरिया हरक्युलिस की हैरानी - 1994 हमज़ाद - 1996 टा टा प्रोफ़ेसर -2001 कयाप - 2001 कौन हूँ मैं - 2006 कपीशजी - 2009 वधस्थल - 2009 उत्तराधिकारिणी - 2015 * क्याप उपन्यास पर 2005 को साहित्य अकादमी पुरस्कार से सम्मानित किया दूरदर्शन धारावाहिक १९८२ में जब भारत के राष्ट्रीय चैनल दूरदर्शन पर उनका पहला नाटक \"हम लोग\" प्रसारित होना आरम्भ हुआ तब अधिकतर भारतीयों के लिये टेलिविज़न एक विलास की वस्तु के जैसा था। मनोहर श्याम जोशी ने यह नाटक एक आम भारतीय की रोज़मर्रा की ज़िन्दगी को छूते हुए लिखा था -इस लिये लोग इससे अपने को जुडा हुआ अनुभव करने लगे। इस नाटक के किरदार जैसे कि लाजो जी, बडकी, छुटकी, बसेसर राम का नाम तो जन-जन की ज़ुबान पर था। उनके प्रमुख धारावाहिक निम्नलिखित हैं- हमलोग बुनियाद कक्का जी कहिन मुंगेरी लाल के हसीन सपनें हमराही ज़मीन आसमान गाथा हिन्दी फ़िल्में हे राम पापा कहते हैं अप्पू राजा भ्रष्टाचार बाहरी कड़ियाँ क्याप (गूगल पुस्तक ; लेखक - मनोहर श्याम जोशी) पुस्तक में जोशीजी की रचनाएँ इन्हें भी देखें हिन्दी गद्यकार साहित्य अकादमी द्वारा पुरस्कृत हिन्दी भाषा के साहित्यकार २००६ में निधन हिन्दी गद्यकार"} {"instruction": "Create code that, given a string, returns the longest permutation of the same character", "input": "str = \"abcccdef\"", "output": "def longest_consecutive_character(str): # Store character, length of longest permutation, and current length max_char = str[0] max_length = 1 cur_length = 1 # Iterate over the string for i in range(1, len(str)): # If the characters are the same if str[i] == str[i-1]: cur_length += 1 # Check if the current permutation is longest if cur_length > max_length: max_char = str[i] max_length = cur_length # Reset count if character changes else: cur_length = 1 return max_char, max_length"} {"instruction": "Construct a code to filter a string for only numerical characters in Python.", "input": "\"4x4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s\"", "output": "def filter_string(string):\n filtered_string = ''\n for c in string:\n if c.isdigit():\n filtered_string += c\n return filtered_string\n\nprint(filter_string(\"4x4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s4s\"))"} {"instruction": "Complete the following bash script with conditional statements.", "input": "#!/bin/bash echo \" Enter an integer \" read num", "output": "#!/bin/bash echo \"Enter an integer\" read num if (( num > 0 )); then echo \"The number is positive\" elif (( num < 0 )); then echo \"The number is negative\" else echo \"The number is zero\" fi"} {"instruction": "Create a JavaScript class to represent an Employee object", "input": "", "output": "class Employee { constructor(name, age, salary) { this.name = name; this.age = age; this.salary = salary; } }"} {"instruction": "Develop a Python class which allows users to access and control additional hardware components which are connected to the computer.", "input": "", "output": "# Import necessary libraries\nimport sys, serial\n\nclass HardwareController:\n \"\"\"\n This class allows users to access and control additional hardware components which are connected to the computer via USB.\n \"\"\"\n\n def __init__(self):\n self.serial_port = None\n self.baud_rate = None\n\n # Establish connection between computer and hardware component\n def connect(self, serial_port, baud_rate):\n try: \n self.serial_port = serial.Serial(serial_port, baud_rate)\n self.baud_rate = baud_rate\n return True\n except:\n # Return false and print error if connection fails\n print(\"Error: Failed to connect to the device. Check baud rate and serial port.\")\n return False\n\n # Write data to the hardware component\n def write(self, data):\n if self.serial_port.isOpen():\n self.serial_port.write(data)\n else:\n print(\"Error: Device is not connected. Connect to the device first and try again.\")\n\n # Read data from the hardware component\n def read(self):\n if self.serial_port.isOpen():\n return self.serial_port.readline()\n else:\n print(\"Error: Device is not connected. Connect to the device first and try again.\")\n\n # Disconnect from the hardware component\n def disconnect(self):\n self.serial_port.close()\n self.serial_port = None"} {"instruction": "Use the reduce() method to sum the values of an array of numbers in JavaScript.", "input": "const numbers = [1, 2, 3, 4, 5];", "output": "let sum = numbers.reduce((total, num) => total + num); console.log(sum); // 15"} {"instruction": "Write a Python program to find all the Armstrong numbers between the given two numbers. An Armstrong number is a number such that the sum of its digits raised to the third power is equal to the number itself.", "input": "lower = 100 upper = 2000", "output": "def isArmstrong(num): s = 0 temp = num while temp > 0: digit = temp % 10 s += digit ** 3 temp //= 10 if num == s: return True else: return False for num in range(lower, upper + 1): if isArmstrong(num): print(num)"} {"instruction": "Design an AI system in Python to classify articles into 5 different classes.", "input": "The input dataset contains 3000 articles.", "output": "import nltk\nfrom nltk.tokenize import word_tokenize\nimport sklearn\n\n# load data\narticles = []\nlabels = []\n\n# create training and test datasets\nX_train, X_test, y_train, y_test = train_test_split(articles, labels, test_size=0.25, random_state=42)\n\n# prepare datasets for vectorization\nword_counter = Counter(word for article in X_train for word in word_tokenize(article[1])) \n\n# vectorize the datasets using word count\nvectorizer = TfidfVectorizer(max_features=1000, stop_words='english', max_df=0.5,\n min_df=2, tokenizer=word_tokenize).fit(X_train)\nX_train_vec = vectorizer.transform(X_train)\nX_test_vec = vectorizer.transform(X_test)\n\n# fit the classifier using the vectorized train dataset\nclf = SGDClassifier().fit(X_train_vec, y_train)\n\n# predict the test dataset\ny_pred = clf.predict(X_test_vec)"} {"instruction": "Develop a code to check if a given array is sorted or not.", "input": "[1, 2, 4, 3]", "output": "def is_sorted(array): for i in range(len(array)-1): if array[i] > array[i+1]: return False return True"} {"instruction": "Write a Python program to group a list of numbers based on their modulo with a given number.", "input": "list_numbers = [2, 6, 8, 10, 3, 7] \nnum = 3", "output": "def group_modulo(list_numbers, num):\n result = {i:[] for i in range(num)}\n for number in list_numbers:\n result[number % num].append(number)\n \n return result\n \nresult = group_modulo(list_numbers, num)\nprint(result)"} {"instruction": "Write a single line of code to remove an item from a list.", "input": "my_list = [1, 2, 3, 4]", "output": "my_list.remove(4)"} {"instruction": "Develop a Python program that prints \"Hello, World!\" whenever it is run.", "input": "", "output": "#Python program to print \"Hello World!\"\n\nprint(\"Hello, World!\")"} {"instruction": "Create a class in Python to store student details with the name and age data.", "input": "", "output": "class Student:\n def __init__(self, name, age):\n self.name = name\n self.age = age"} {"instruction": "Create a Python program to check if a given string can be formed from a given set of words.", "input": "String: \"justdoit\"\nSet of words: [\"just\", \"do\", \"it\"]", "output": "def word_set(string, words):\n words_set = set(words)\n string_set = set(string)\n \n if string_set.issubset(words_set):\n return True \n else:\n return False\n\nword_set(\"justdoit\", [\"just\", \"do\", \"it\"])"} {"text": "[DE Wikipedia] Queen Maud Gulf\n\nDer Queen Maud Gulf ist ein arktisches Gewässer vor der Nordküste von Nordamerika. Es liegt in der Region Kitikmeot im kanadischen Territorium Nunavut. Geographie Der Golf befindet sich zwischen dem amerikanischen Festland im Süden, der King William Island im Nordosten und der Victoria Island im Nordwesten. Er ist nach Westen über die Dease Strait mit dem Coronation Gulf verbunden. Nach Osten führt die Simpson Strait zum Rasmussen Basin. Im Norden geht der Queen Maud Gulf in die Victoria Strait über. Der Queen Maud Gulf ist reich an Inseln, Riffen und Untiefen. Im Norden, am Übergang zur Victoria Strait, befinden sich die Royal Geographical Society Islands, südlich davon, getrennt durch die Markham Strait, die Nordenskiöld Islands mit Amundsen Island. Südöstlich davon liegt Hat Island und direkt vor der Küste Klutschak-Halbinsel O’Reilly Island. Nordwestlich der Nordenskiöld Islands befindet sich Jenny Lind Island, noch weiter westlich Melbourne Island. Am Eingang zur Dease Strait liegt auf Victoria Island die Siedlung Cambridge Bay. Geschichte 1839 segelten Peter Warren Dease (1788–1863) und Thomas Simpson (1808–1840) durch den Queen Maud Gulf. Seinen Namen verdankt das Gewässer dem norwegischen Polarforscher Roald Amundsen, der es während der erstmaligen Durchfahrung der Nord-West-Passage im Jahre 1905 nach der ersten Königin des unabhängigen Königreichs Norwegen, Maud von Großbritannien und Irland, benannte. Im September 2014 wurde westlich von O’Reilly Island in nur elf Meter Tiefe die HMS Erebus gefunden, eines der beiden Schiffe der Franklin-Expedition. Das andere, die HMS Terror, wurde zwei Jahre später in der Terror Bay, einer Bucht des Queen Maud Gulf an der Südwestküste von King William Island lokalisiert. Naturschutz An der Südküste befindet sich seit 1961 das Vogelschutzgebiet Queen Maud Gulf Migratory Bird Sanctuary. Es ist mit einer Fläche von 62.928 km² das größte föderale Naturschutzgebiet Kanadas und anerkanntes Feuchtgebiet von internationaler Bedeutung nach der Ramsar-Konvention. BirdLife International weist es als Important Bird Area (NU009) aus. Literatur Einzelnachweise Geographie (Nunavut) Becken in Kanada Bucht in Kanada Bucht in Nordamerika Bucht (Arktischer Ozean) Meerenge in Kanada Maud von Großbritannien und Irland als Namensgeber"} {"instruction": "Use a machine learning algorithm to classify emails into two categories: junk and non-junk using Python.", "input": "", "output": "from sklearn.naive_bayes import MultinomialNB\n\n# Load training data\nX_train = ...\ny_train = ...\n\n# Create classifier\nclf = MultinomialNB() \n\n# Train the classifier\nclf.fit(X_train, y_train) \n\n# Make predictions\ny_predicted = clf.predict(X_test)"} {"text": "[HI Wikipedia] गुआंगज़ौ एबगरआनद\n\nगुआंगज़ौ एबगरआनद एक पेशेवर फुटबॉल क्लब गुआंगज़ौ, गुआंग्डोंग, चीन और भी चीनी सुपर लीग चैंपियन में आधारित है। टएनहअ स्टेडियम घर क्लब है।"} {"instruction": "Create a program which takes an array of integers and an integer as input, and returns the index of the integer in the array.", "input": "array = [1, 2, 3, 4]; number = 3;", "output": "def indexof(nums, target): for i in range(len(nums)): if nums[i] == target: return i return -1"} {"text": "[DE Wikipedia] Hepstedt\n\nHepstedt () ist eine Gemeinde in der Samtgemeinde Tarmstedt im niedersächsischen Landkreis Rotenburg (Wümme). Geschichte Hepstedt wird 1004 erstmals erwähnt, als König Heinrich II. dem Kloster Kemnade bei Bodenwerder an der Weser Hepstidi als Besitz bestätigt. Im Staatsforst Ummel liegt ein von Einheimischen so genannter „Russenfriedhof“ mit fünf Gräbern. Dort sind Kriegsgefangene beerdigt, die vom Stalag X-B in Sandbostel zum Arbeiten nach Hepstedt vermittelt wurden. Da sie schlecht versorgt wurden, starben viele dieser Kriegsgefangenen – einige wurden auch wegen kleinster Vergehen erschossen. Der Bürgermeister von Hepstedt ließ die Gefangenen auf einer Begräbnisstätte im Wald bestatten. Ein Mitarbeiter der Gedenkstätte Sandbostel, Ronald Sperling, ermittelte 2012 die Namen der im Ummel bestatteten Gefangenen. Herkunft des Ortsnamens Alte Bezeichnungen des Ortes sind um 1004 Hepstidi (Heinrich II.). Stidi oder stide ist die ostfälische Form zu stede und steht für „Stätte“. Der erste Teil des Wortes kommt aus dem Altsächsischen vom Wort hiopo für „Dornstrauch“. Ähnlich lautet der Begriff in der englischen Sprache: hip für „Dornstrauch“, beziehungsweise im Norwegischen: hjupa für „Hagebutte“. Daraus lässt sich schließen, dass sich Hepstedt auf eine Stätte in der Nähe von Dornensträuchern bezieht. Religion 68 % der Bevölkerung sind evangelisch, 2 % katholisch. Die Lutheraner gehören der Kirchengemeinde Kirchtimke im Kirchenkreis Osterholz-Scharmbeck der Landeskirche Hannovers. Auf reformierter Seite ist Hepstedt der Gemeinde Ringstedt im Synodalverband VIII der Evangelisch-reformierten Kirche zugeordnet. Die Katholiken gehören der Pfarrei Corpus Christi in Rotenburg (Wümme) an, die in Zeven eine Filialkirche (Christ König) hat. Politik Gemeinderat Der Rat der Gemeinde Hepstedt besteht aus neun Ratsmitgliedern. Dies ist die festgelegte Anzahl für die Mitgliedsgemeinde einer Samtgemeinde mit einer Einwohnerzahl zwischen 501 und 1000 Einwohnern. Die Ratsmitglieder werden durch eine Kommunalwahl für jeweils fünf Jahre gewählt. Die aktuelle Amtszeit begann am 1. November 2021 und endet am 31. Oktober 2026. Stimm- und sitzberechtigt im Gemeinderat ist außerdem der hauptamtliche Bürgermeister. Die letzte Kommunalwahl am 12. September 2021 ergab das folgende Ergebnis: Bürgermeister Der Gemeinderat wählte das Gemeinderatsmitglied Heidi Stelljes (WG Hepstedt) zur ehrenamtlichen Bürgermeisterin für die aktuelle Wahlperiode. Ihre Stellvertreter sind Günter Rosenbrock (WG Hepstedt) und Friederike Blanken (WG Hepstedt). Städtepartnerschaften Hepstedt ist seit 1988 Teil der Gemeinschaft European Charter – Villages of Europe, eine Gruppe ländlicher Gemeinden aus allen EU-Ländern. Die Partnergemeinden dieser Friends of Europe sind Esch/Haaren (Niederlande), Bièvre…"} {"instruction": "Create a function in Python that takes a string as an input and returns TRUE if it is a palindrome or FALSE if it is not.", "input": "", "output": "def is_palindrome(string): left_pos = 0 right_pos = len(string) - 1 while right_pos >= left_pos: if not string[left_pos] == string[right_pos]: return False left_pos += 1 right_pos -= 1 return True"} {"instruction": "Create a function for splitting a string into an array of characters.", "input": "", "output": "def split_string_to_chars(string): '''This function takes a string and splits it into an array of characters.''' return list(string)"} {"instruction": "Generate a Python script to create a random password of length 8 characters consisting of alphabets(lower and upper), numbers, and symbols.", "input": "Not applicable", "output": "import random\nimport string\n\n# generate a random password\ndef randomPassword():\n password = ''\n\n all_characters = string.ascii_letters + string.digits + string.punctuation\n # loop over the length\n for _ in range(8):\n # select a random character\n password += random.choice(all_characters)\n\n return password\n\n# print the generated password\nprint(randomPassword())"} {"instruction": "Represent the given content into a well-formatted JSON structure.", "input": "Name: John Doe Age: 33 Gender: Male", "output": "{ \"name\": \"John Doe\", \"age\": 33, \"gender\": \"Male\" }"} {"instruction": "Create a program that can identify the next number in a sequence.", "input": "Find the next number in 3, 7, 11, 15.", "output": "def get_next_number(arr): return arr[-1] + (arr[-1] - arr[-2]) if __name__ == \"__main__\": arr = [3, 7, 11, 15] print(get_next_number(arr))"} {"instruction": "Arrange in order of increasing magnitude the elements in an integer array.", "input": "arr = [4, 23, 1, 7, 10]", "output": "arr.sort(); // arr is now [1, 4, 7, 10, 23]"} {"instruction": "Create a function to calculate the following expression and output the result.", "input": "2^2 + 4 - 3*6", "output": "def expression_result(expression): result = eval(expression) return result print(expression_result(\"2**2 + 4 - 3*6\")) # Output: -6"} {"instruction": "Design a natural language processing algorithm in Python to extract names from a text.", "input": "", "output": "import nltk\n\n#tokenize the text\ntext = \"John and Mary went to the park. They had a great time.\"\ntokenized_text = nltk.word_tokenize(text)\n\n# tag the tokens with their part-of-speech\ntagged_words = nltk.pos_tag(tokenized_text)\n\n# filter for proper nouns\nnames = [word for word,pos in tagged_words if (pos == 'NNP' or pos == 'NNPS')]\n\nprint(names)\n# Output: ['John', 'Mary']"} {"text": "[CS Wikipedia] Vrh vodorovný\n\nVrh vodorovný je pohyb tělesa v tíhovém poli, při kterém počáteční rychlost tělesa má směr kolmý ke směru tíhového zrychlení. Vodorovný vrh je složený – pohyb vrženého tělesa vodorovným směrem a volný pád tělesa. Vodorovný vrh je speciálním případem šikmého vrhu. Pokud vrh probíhá ve vakuu a uvažujeme-li pouze homogenní tíhové pole (např. reálný případ vrhů relativně malou rychlostí v malých výškách nad povrchem astronomických těles bez atmosféry), je trajektorií část paraboly s vrcholem v místě hodu. Fyzikální vztahy Souřadnice bodu B, ve kterém se těleso ocitne za dobu t Délka vrhu , Rychlost v okamžiku dopadu , Čas letu , kde je počáteční rychlost, čas, výška vrhu a tíhové zrychlení. Poznámky Související články Gravitační pole Vrh svislý Vrh šikmý Volný pád Gravitace"} {"text": "[CS Wikipedia] Jan mladší Popel z Lobkovic\n\nJan mladší Popel z Lobkovic (8. listopadu 1510 – 12. dubna 1570 Praha-Hradčany), od roku 1569 starší, také Jan IV. Popel z Lobkowicz byl český šlechtic, představitel mladší – popelovské linie rodu Lobkoviců, zakladatel jeho tachovské pošlosti, nejvyšší komorník a nejvyšší purkrabí Českého království. Život Narodil se 8. listopadu 1510 jako třetí syn a třetí z devíti potomků Děpolta Popela z Lobkowicz, který zemřel 3. dubna 1527 v Bílině, kdy byl také pohřben. Jeho matkou byla Anna (Anežka) Mičanová z Klinštejna a Roztok († 1528). Jan mladší Popel z Lobkovic se aktivně účastnil české politiky 16. století. V letech 1544–1555 byl hejtmanem německých lén, roku 1549 prezidentem české komory, v letech 1549–1554 nejvyšším komorníkem. Vrchol jeho kariéry znamenalo jmenování do úřadu nejvyššího purkrabí roku 1554, kterýžto úřad zastával až do své smrti. Roku 1539 získal Jan z Lobkovic po svém švagrovi Horšovský Týn s panstvím. Po požáru roku 1547 nechal v padesátých letech 16. století horšovskotýnecký hrad honosně upravit v renesanční zámecké sídlo, které si svoji podobu zachovalo dodnes. Podle odhadu majetku českých stavů z roku 1557 byl Jan mladší Popel z Lobkovic nejbohatším příslušníkem panského stavu v Plzeňském kraji. Jan mladší z Lobkovic se těšil velké přízně u krále Ferdinanda I., jehož náklonnost si získal četnými půjčkami a také svou věrností, kterou prokázal při prvním stavovském odboji roku 1547. Král svou přízeň projevoval tím, že Janovi udílel prestižní zemské úřady. Ty jej však nutně připoutávaly k pražskému dvoru, a proto si nechal v letech 1543–1563 postavit na Hradčanském náměstí nový palác, zvaný jako Lobkovický, dnes známý jako Schwarzenberský palác, který si dodnes uchovává svou původní podobu, mu vtisknutou italským architektem Augustinem Gallim, zvaným Augustin Vlach. Jan mladší Popel z Lobkovic zemřel 12. dubna 1570 a byl pochován v horšovskotýnském farním kostele sv. Petra a Pavla. Majetek Většinu statků vlastnil v západních Čechách. Vlastnil třetinu Bíliny, Horšovský Týn, Němčany, Netiklov, Čilkov, Pátek, Netluky, Lipenec, Mašťov, Kost, třetinu Trosek a od roku 1556 měl v zástavě Tachov. Rodina Jan IV. se oženil třikrát, nejdříve 3. listopadu 1535 s Annou z Bibrštejna († 16. září 1554, pohřbena v kostele sv. Anny v Horšovském Týně), dědičkou jedné třetiny Kosti a Trosek, dcerou Jáchyma I. z Biberštejna na Frýdlantě († 1521) a Jitky z Landštejna. Podruhé se oženil 19. ledna 1556 v Českém Krumlově s Bohunkou z Rožmberka (17. březen 1536 – 17. listopad 1557 Horšovský Týn, pochována v kostele sv. Apolináře v Horšovském Týně), dcerou Jošta III. z Rožmberka (30. červen 1488 – 15. říjen 1539) a jeho druhé manželky Anny z Rogendorfu (kolem 1500 – 5. říjen 1562). Nakonec si 29. listopadu 1562 v Boru vzal Alžbětu z Rogendorfu (1519 – 2.…"} {"instruction": "Create a function to sort the given array of numbers in descending order.", "input": "[7, 2, 5, 1, 4]", "output": "def sort_number(arr): arr.sort(reverse=True) return arr arr = [7, 2, 5, 1, 4] print(sort_number(arr)) # Output: [7, 5, 4, 2, 1]"} {"text": "[EN Wikipedia] Will Ord\n\nWill Ord is a UK-based educational trainer and speaker, who is specialised in Thinking Skills, Religious Education, and Citizenship Education. He is also the Chair of the Society for Advancing Philosophical Enquiry and Reflection in Education (SAPERE). Ord advocates for education that promotes thinking and communication skills, reflective practice, and the 'community of learners' at the heart of learning and teaching. Bibliography 'Action for Change' Don Rowe and Will Ord Citizenship in Action 1' Peter Norton, Sarah Edwards, Andy Griffith and Will Ord Citizenship in Action 1: Teacher's Resource Pack' Clare Ricketts, Will Ord, Sarah Edwards and Peter Norton Citizenship in Action 2: Teacher's Resource Pack' Will Ord, Peter Norton, Anne Riley and Andy Griffith '''Citizenship in Action 3: Teacher's Resource Pack' Peter Norton, Will Ord, Anne Riley and Clare Ricketts Themes in RE (Book 3)' Joe Jenkins and Will Ord Themes in RE: Learning from Religions Teachers Resource File 3' Joe Jenkins and Will Ord Developing Citizens''' External links www.thinkingeducation.co.uk www.Sapere.org.uk www.citizenshipfoundation.co.uk References Living people Year of birth missing (living people)"} {"instruction": "Given a sequence of numbers, write a program to find the length of the longest subsequence in which all numbers are in increasing order.", "input": "arr = [1, 7, 4, 3, 2, 8]", "output": "def findLongestSubsequence(arr): n = len(arr) dp = [1]*n for i in range(1, n): for j in range(i): if arr[i] > arr[j] and dp[i] < dp[j] + 1 : dp[i] = dp[j]+1 return max(dp)"} {"instruction": "Given an array of numbers, generate a Python program to find the maximum value.", "input": "[1, 4, 6, 8, 3, 9, 5]", "output": "def find_max(arr):\n max_val = arr[0]\n for el in arr:\n if el > max_val:\n max_val = el\n return max_val\n\narr = [1, 4, 6, 8, 3, 9, 5]\nprint(find_max(arr))"} {"instruction": "Please fix the following broken HTML code.", "input": " Test HTML Page </head> <body> /body> </html>", "output": "<html> <head> <title>Test HTML Page "} {"text": "[HI Wikipedia] इटारसी\n\nइटारसी (Itarsi) मध्य प्रदेश प्रान्त का एक शहर है जो कि नर्मदापुरम जिले के अन्तर्गत आता हैं। इटारसी के नाम के उत्पत्ति ईंट और रस्सी शब्द के संयोग से हुई है इसका कारण प्राचीन काल में इन उद्योगों की बहुतायत होना। व्यावसायिक दृष्टि से, एक बड़ी कृषि मंडी, आयुध निर्माणी, एवम् रेलवे के कारखानो से। यह नर्मदापुरम जिले में एक महत्वपूर्ण स्थान रखती है। बोरी अभयारण और तवा बाँध निकट के कुछ दर्शन-योग स्थान है। इटारसी की कुछ प्रमुख बिभुतियों में श्री हरिशंकर परसाई एवं श्री विपिन जोशी का नाम सर्वोपरि है। इटारसी में केसर मल्टी लॉजिस्टिक हब की स्थापना ने यहां व्यापारियों के लिए एक्सपोर्ट की बड़ी सुविधा दे दी है भूगोल इटारसी 22°37′N 77°45′E / 22.62°N 77.75°E अक्षानंस पे स्थित है तथा इसकी समुद्र तल से औसत ऊँचाई ३०४ मीटर है। जन सांख्यिकी २००१ के जनगणना के अनुसार इटारसी के कुल आबादी ९९,७८३ रही थी जिसमें से ५२% पुरुष और ४८% महिलाएँ सम्मिलित थी। वर्तमान में इटारसी की जनसंख्या 1 लाख 17 हजार के आसपास हो गई है। प्रशासन इटारसी मुख रूप से तहसील के श्रेणी में आती जिसका मुख्यालय नर्मदापुरम जिला है। यह नर्मदापुरम विधानसभा एवं नर्मदापुरम- नरसिंहपुर संसदीय क्षेत्र अंतर्गत आती है। वर्तमान नगर पालिका अध्यक्ष श्री pankaj chourey जी है। यातायात इटारसी रेल एवं सड़क से जुड़ा हुआ है। रेल इटारसी जंक्शन रेल द्वारा बडी आसानी से पहुँचा जा सकता है। दिल्ली-चेन्नई मेन लाइन एवं मुम्बई-जबलपुर मुख्य मार्ग में इटारसी स्टेशन पड़ता है। दिल्ली से रेल द्वारा १०-१४ घंटे लगते हैं। इटारसी शहर पश्चिम मध्य रेल्वे का मुख्य स्टेशन एवं सबसे बड़ा जंक्शन है। यहां से हर रोज लगभग 350 गाड़िया गुजरती हैं। सड़क यात्रा इटारसी सड़क द्वारा भी अच्छी तरह से जुड़ा हुआ है। सरकारी और निजी बसें भोपाल के लिये उपलब्ध हैं। राष्ट्रीय राजमार्ग 69 से जुड़ा है। नामकरण ऐसा माना जाता है कि यहाँ ईंट और रस्सी बनाई जाती थी। दर्शनीय स्थल भगवान शिव का एतिहसिक तिलक सिंदूर मंदिर तवा डेम की सुरम्य वादियां बूड़ी माता मंदिर बड़ा हनुमान मंदिर (फाटक वाले) श्री दक्षिण मुखी हनुमान मंदिर रेलवे स्टेशन के सामने स्थापित वर्ष 1941 के पूर्व। स्वप्नेश्वर हनुमान मंदिर विंध्येश्वरी माता मंदिर (महर्षि नगर) द्वारकाधीश मंदिर बालाजी मंदिर पशुपतिनाथ मंदिर ग्रामीण क्षेत्र इटारसी के आस पास निम्न ग्रामीण क्षेत्र जुडे़ हैं- सनखेड़ा गुर्रा तारारोडा मलोथर पथरोटा देहरी सोनासाँवरी बोरतलाई बम्हनगाँव मेहरागाँव भीलाखेडी़ जुझारपुर रैसलपुर भट्टी साकेत सोनतलाई कोठा इटारसी से प्रकाशित होने वाले समाचार पत्र पत्रिका दैनिक भास्कर नव भारत दैनिक जागरण राज एक्सप्रेस औद्योगिक संस्थान विद्युत इंजन शेड डीजल इंजन शेड ऑर्डीनैन्स फैक्ट्री इटारसी ऑइल एंड फ्लोर मिल विद्यालय/स्कूल प्राथमिक शिक्षा के लिए काफी संस्थान अग्रणी है पश्चिम मध्य रेल्वे सीनियर हाई सेकेंडरी स्कूल केन्द्रीय विद्यालय ओ ई एफ केन्द्रीय विद्यालय सी पी ई शासकीय उच्चतर माध्यमिक विद्यालय शासकीय कन्या उच्चतर माध्यमिक विद्यालय श्री टैगौर विद्या मंदिर गुरुनानक पब्लिक स्कूल सरस्वती उच्चतर माध्यमिक विद्यालय एम जी एम स्कूल फ्रेन्ड्स स्कूल आदर्श हाई सेकेंडरी स्कूल नया यार्ड एम॰जी॰एम॰ स्कूल इटार्सी महाविद्यालय/कॉलेज एम जी एम शासकीय…"} {"instruction": "Create an object-oriented programming model using python to represent a student in a classroom.", "input": "", "output": "class Student:\n def __init__(self, name, age):\n self.name = name\n self.age = age\n \n def get_info(self):\n return \"Name: {}, Age: {}\".format(self.name, self.age)"} {"instruction": "Create a function that filters an array of elements based on a given criteria and returns an array of the resulting elements.", "input": "lst = [2, 3, 4, 5, 6, 7, 8, 9] # elements to filter criteria = lambda x: x > 5 # criterion to filter by", "output": "def filter_by(lst, criteria): \"\"\"This function takes an array of elements and a criteria and returns an array of elements filtered by the criteria.\"\"\" return [x for x in lst if criteria(x)]"} {"instruction": "Write a code to get the user input for two numbers and print the sum of the two numbers.", "input": "", "output": "# Get user input for two numbers num1 = int(input(\"Enter first number: \")) num2 = int(input(\"Enter second number: \")) # Print the sum of the two numbers print(\"The sum of the two numbers is:\", num1 + num2)"} {"text": "[EN Wikipedia] Alistipes\n\nAlistipes is a Gram-negative genus of rod-shaped anaerobic bacteria in the phylum Bacteroidota. When members of this genus colonize the human gastrointestinal (GI) tract, they provide protective effects against colitis (intestinal inflammation), autism, and cirrhosis (liver fibrosis). However, this genus can also cause dysbiosis by contributing to anxiety, chronic fatigue syndrome, depression, and hypertension. Showcasing priority effects in microbiome assembly, when infant GI tracts have bacteria of the species Staphylococcus but not the species Faecalibacterium, Alistipes species become less capable of colonization. Etymology Alistipes is derived from the Neo-Latin noun alistipes, meaning \"the other stick\", which is further derived from the Latin adjective alius (other) and noun stipes (log/post). Species This genus has eleven validly published species, as per the International Code of Nomenclature of Prokaryotes (ICNP): Alistipes communis Sakamoto et al. 2020 Alistipes dispar Sakamoto et al. 2020 Alistipes finegoldii Rautio et al. 2003 Alistipes hominis Liu et al. 2022 Alistipes ihumii Pfleiderer et al. 2017 Alistipes indistinctus Nagai et al. 2010 Alistipes inops Shkoporov et al. 2015 Alistipes onderdonkii Song et al. 2006 Alistipes putredinis (Weinberg et al. 1937) Rautio et al. 2003 Alistipes shahii Song et al. 2006 Alistipes timonensis Lagier et al. 2014 See also Bacterial taxonomy Microbiology References Bacteria genera Bacteroidia"} {"instruction": "Construct a Python class named Person which contains the instance variables name, age, and gender.", "input": "", "output": "Class Person:\n def __init__(self,name,age,gender):\n self.name = name\n self.age = age\n self.gender = gender"} {"instruction": "Design a program in Python to find the frequency of a specific word in a given sentence.", "input": "'Python is an interpreted, high-level and general-purpose programming language.'", "output": "def word_frequency(sentence, word):\n # remove special characters\n sentence = sentence.replace('.', '')\n # split the sentence into words\n words = sentence.split(' ')\n # count frequency\n count = 0\n for w in words:\n if w.lower() == word:\n count += 1\n return count\n\nwords_frequency = word_frequency('Python is an interpreted, high-level and general-purpose programming language.', 'Python')\nprint(words_frequency)"} {"instruction": "How can we create a class in C++ to represent a point on a 2D plane?", "input": "", "output": "class Point { int x; int y; public: Point(int _x, int _y) : x(_x), y(_y) {} };"} {"text": "[DE Wikipedia] Digya-Nationalpark\n\nDer Digya-Nationalpark ist mit einer Fläche von 3124 km² der zweitgrößte Nationalpark in Ghana. Er liegt auf einer Halbinsel, die von Westen in den Volta-See hineinragt. Sein Gebiet befindet sich zum Teil in der Bono East Region Ghanas und zum Teil in der Ashanti Region. Der Jahresniederschlag beträgt 1000 bis 1200 mm. Die Vegetation besteht aus baumbestandener Savanne und Galeriewäldern entlang der Flüsse. In den Savannen gibt es meist nur einmal jährlich ergiebige Regenfälle, in den stärker bewaldeten Teilen ist der Regenfall größer und auch auf zwei Regenzeiten verteilt. Im Digya-Nationalpark sind noch heute Wilderer anzutreffen, die den Wildtierbestand dezimieren. Dieser Park ist bekannt für seine Populationen an Elefanten und Leoparden, aber auch der Fischreichtum dieses am Volta-See gelegenen Nationalparks ist groß. Neben einigen seltenen Meerkatzen- und anderen Affenarten kommen hier verschiedene Antilopenarten vor. Siehe auch Nationalparks in Ghana Literatur Wally und Horst Hagen: Die afrikanischen Nationalparks als Lebensräume der Elefanten. In: Vitus B. Dröscher (1990): Rettet die Elefanten Afrikas (S. 213) Nationalpark in Ghana Nationalpark in Afrika Bono East Region Ashanti Region"} {"text": "[HI Wikipedia] कुवैत\n\nकुवैत (अरबी: دولة الكويت‎, दवालात अल-कुवैती) पश्चिम एशिया में स्थित एक संप्रभु अरब अमीरात है, जिसकी सीमा उत्तर में सउदी अरब और उत्तर और पश्चिम में इराक से मिलती है। उत्तर से लेकर दक्षिण तक की अधिकतम दूरी 200 कि॰मी॰ (120 मील) और पूर्व से लेकर पश्चिम तक की दूरी 170 किमी (110 मील) है। कुवैत एक अरबी शब्द है, जिसका अर्थ है 'पानी के करीब एक महल'। करीबन 30 लक्ष की जनसंख्या वाले इस संवैधानिक राजशाही वाले देश में संसदीय व्यवस्था वाली सरकार है। कुवैत नगर देश की आर्थिक और राजनीतिक राजधानी है। कुवैत में अनेक द्वीप भी शामिल हैं, जिसमें इराक की सीमा से लगा बुमियान सबसे बड़ा है। 1990 में कुवैत पर इराक ने आक्रमण कर कब्जा जमा लिया था। सात महीने का इराकी कब्जा संयुक्त राज्य अमेरिका नीत सेना द्वारा सीधे आक्रमण के बाद खत्म हुआ था। लौटती हुई इराकी सेना ने करीबन 750 तेल के कुंओं को खाक में मिला दिया, जो एक बड़ी आर्थिक और पयार्वरण त्रासदी के रूप में परिणीत हुई। युद्ध में कुवैत की आधारभूत संरचना बुरी तरह से क्षतिग्रस्त हुई, जिसे पुनः सुधारना पड़ा। तेल भंडारण के मामले में कुवैत दुनिया का पांचवां सबसे समृद्ध देश और प्रति व्यक्ति आय के हिसाब से दुनिया का ग्यारहवां सबसे धनी देश है। कुवैत में तेल क्षेत्र की खोज और दोहन की प्रक्रिया 1930 से प्रारंभ हुई। 1961 में यूनाइटेड किंगडम से स्वतंत्र होने के बाद इस क्षेत्र में अभूतपूर्व वृद्धि दर्ज की गई है। आज देश का करीबन 95 प्रतिशत निर्यात और 80 प्रतिशत सरकारी राजस्व तेल से बने उत्पाद से होती है। यह भी देखिए कुवैत का भूगोल wikt:कुवैत (विक्षनरी) एशिया के देश अरब लीग के देश"} {"instruction": "Create a SQL query to select customers who have spent more than $1000 in the last month.", "input": "", "output": "SELECT customerId FROM orders WHERE orderDate > DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND total > 1000"} {"instruction": "Generate a Python script that filters a list of strings, keeping only those that have a length greater than 5 characters.", "input": "words = [\"hello\", \"world\", \"example\", \"test\"]", "output": "def filter_words(words): \n filtered_words = [] \n for word in words: \n if len(word) > 5: \n filtered_words.append(word) \n return filtered_words \n\nwords = [\"hello\", \"world\", \"example\", \"test\"]\n\nfiltered_words = filter_words(words) \n\nprint(filtered_words) # Output: ['example', 'test']"} {"text": "[DE Wikipedia] Boo Nieves\n\nCristoval „Boo“ Nieves (* 23. Januar 1994 in Baldwinsville, New York) ist ein US-amerikanischer Eishockeyspieler, der zuletzt bis Juli 2021 bei den Tampa Bay Lightning aus der National Hockey League unter Vertrag stand. Karriere Nieves spielte zunächst zwischen 2010 und 2012 an der Kent School, einer High School im US-Bundesstaat Connecticut. Gegen Ende der Spielzeit 2011/12 absolvierte der Stürmer dann einige Einsätze für die Indiana Ice in der United States Hockey League, ehe er sich an der University of Michigan einschrieb. Bereits zuvor war er im NHL Entry Draft 2012 in der zweiten Runde an 59. Stelle von den New York Rangers aus der National Hockey League ausgewählt worden. An der University of Michigan lief der Angreifer in den folgenden vier Jahren bis zum Frühjahr 2016 neben seinem Studium für das Eishockeyteam der Universität auf, das in der Big Ten Conference, einer Division im Spielbetrieb der National Collegiate Athletic Association, aktiv war. Mit der Mannschaft gewann er zum Abschluss seiner letzten Saison die Meisterschaft der Big Ten. Nach Abschluss der College-Spielzeit unterschrieb Nieves Ende März 2016 einen Profivertrag bei den New York Rangers, die ihn noch zum Ende der Saison 2015/16 bei ihrem Farmteam, dem Hartford Wolf Pack, in der American Hockey League einsetzten. Dort erreichte der Mittelstürmer in acht Einsätzen fünf Scorerpunkte und fand sich auch zu Beginn der Spielzeit 2016/17 im Kader des Wolf Packs wieder. Seine Leistungen in der AHL führten schließlich dazu, dass er Mitte November erstmals in den NHL-Kader New Yorks berufen wurde und dort sein Debüt feierte. Nach vier Jahren in der Organisation der Rangers wurde sein auslaufender Vertrag nach der Spielzeit 2019/20 nicht verlängert. Als Free Agent schloss er sich im Januar 2021 den Tampa Bay Lightning an, ohne jedoch für Tampa oder in der AHL in der Saison 2020/21 zum Einsatz zu kommen. Sein auslaufender Vertrag wurde im Sommer 2021 nicht verlängert. International Für sein Heimatland spielte Nieves beim Ivan Hlinka Memorial Tournament 2011. Dort erreichte er mit dem Team den fünften Rang. In vier Turniereinsätzen erzielte er ein Tor und bereitete drei weitere vor. Erfolge und Auszeichnungen 2016 Big-Ten-Conference-Meisterschaft mit der University of Michigan Karrierestatistik Stand: Ende der Saison 2020/21 International Vertrat die USA bei: Ivan Hlinka Memorial Tournament 2011 Weblinks Eishockeyspieler (Michigan Wolverines) Eishockeyspieler (Hartford Wolf Pack) Eishockeyspieler (New York Rangers) US-Amerikaner Geboren 1994 Mann"} {"instruction": "Construct an algorithm that finds the minimum element in an array of values.", "input": "[5, 4, 11, 7, 12, 55, 3]", "output": "Create a variable called min and set its value to be the first element of the array. Loop through elements of the array and compare the value at each index to the value of min. If the value at the current index is less than min, update min with the current index's value. When the loop has finished, min will contain the minimum element of the array."} {"instruction": "Write an if-else statement in Java to check if a given number is greater than or equal to 15.", "input": "Number: 9", "output": "int number = 9; if (number >= 15) { System.out.println(\"Number is greater than or equal to 15\"); } else { System.out.println(\"Number is less than 15\"); }"} {"instruction": "Write a code which reverses the order of items in an array", "input": "my_list = [1,2,3,4,5]", "output": "# Reversing the order of items in an array def reverse_order(input_list): return input_list[::-1] my_list = [1,2,3,4,5] print(reverse_order(my_list)) # Output: [5, 4, 3, 2, 1]"} {"instruction": "Create a Python program to find the longest consecutive sequence of integers in an unsorted array.", "input": "[9, 6, 1, 3, 7, 5, 4, 8]", "output": "def find_longest_consecutive_sequence(arr):\n longest_val = 0\n current_val = 0\n for i in range(0, len(arr)-1):\n current_val = 0\n j = i\n while arr[j] + 1 == arr[j+1]:\n j += 1\n current_val += 1\n if current_val > longest_val:\n longest_val = current_val\n return longest_val \n\nprint(find_longest_consecutive_sequence([9, 6, 1, 3, 7, 5, 4, 8])) # 3"} {"instruction": "Write a Python script to swap two variables.", "input": "", "output": "x = 10\ny = 20\n\n#Swap the values\nx, y = y, x\n\nprint(\"After swapping: x =\", x, \"and y =\", y)"} {"instruction": "Construct a function in C++ to check if two numbers are co-prime or not.", "input": "", "output": "bool isCoprime(int a, int b) { // Everything divides 0 if (a == 0 || b == 0) return false; // base case if (a == 1 || b == 1) return true; // a is divisible by b if (a % b == 0 || b % a == 0) return false; // a is even if (a % 2 == 0) return (b % 2 == 1) ? isCoprime(a/2, b) : isCoprime(a/2, b/2); // b is even if (b % 2 == 0) return isCoprime(a, b/2); // reduce larger number return (a > b) ? isCoprime(a-b, b) : isCoprime(a, b-a); }"} {"instruction": "Create a function to return all possible sums of two numbers.", "input": "", "output": "def two_num_sums(nums): \"\"\"Returns a list of all possible sums of two numbers from nums.\"\"\" combinations = [] for i in range(len(nums)-1): for j in range(i+1, len(nums)): combination = nums[i]+nums[j] combinations.append(combination) return combinations"} {"instruction": "Write a code to edit a given column in an SQL table.", "input": "", "output": "ALTER TABLE my_table MODIFY my_column TYPE INT;"} {"instruction": "Create a Python program to detect outliers in a given dataset and replace them with the mean of the remaining non-outlier values.", "input": "[1.2, 3.4, 4.5, 3.1, 2.2, 4.9, 4.2, 2.1, 1.1, 5.1, 5.2]", "output": "import pandas as pd\n\ndef detect_outliers(data):\n # Calculate the mean\n mean = data.mean()\n\n # Calculate the standard deviation\n std_dev = data.std()\n\n # Set outliers limit\n outliers_limit = mean + 3*std_dev\n\n # For every data point compute the z-score and check if it's an outlier\n for data_point in data:\n z_score = (data_point - mean)/std_dev\n if z_score > outliers_limit:\n # if it is an outlier replace it with the mean\n data_point = mean\n\n return data\n\ndata = [1.2, 3.4, 4.5, 3.1, 2.2, 4.9, 4.2, 2.1, 1.1, 5.1, 5.2]\ndata = pd.Series(data)\n\nprint(detect_outliers(data))"} {"instruction": "Create a PHP form to register a user.", "input": "", "output": " User Registration Form

    User Registration Form

    "} {"instruction": "Write a Python function to compare two strings and check if they are equal.", "input": "Compare 'Hello' and 'World'", "output": "def str_compare(str1, str2):\nreturn str1 == str2\n\nstr_compare('Hello', 'World')"} {"text": "[HI Wikipedia] जवाहरलाल नेहरू\n\nजवाहरलाल नेहरू (नवम्बर १४,१८८९ - मई २७, १९६४) भारत के प्रथम प्रधानमन्त्री थे और स्वतन्त्रता के पूर्व और पश्चात् की भारतीय राजनीति में केन्द्रीय व्यक्तित्व थे। महात्मा गांधी के संरक्षण में, वे भारतीय स्वतन्त्रता आन्दोलन के सर्वोच्च नेता के रूप में उभरे और उन्होंने १९४७ में भारत के एक स्वतन्त्र राष्ट्र के रूप में स्थापना से लेकर १९६४ तक अपने निधन तक, भारत का शासन किया। वे आधुनिक भारतीय राष्ट्र-राज्य – एक सम्प्रभु, समाजवादी, धर्मनिरपेक्ष, और लोकतान्त्रिक गणतन्त्र - के वास्तुकार माने जाते हैं। कश्मीरी पण्डित समुदाय के साथ उनके मूल की वजह से वे पण्डित नेहरू भी बुलाए जाते थे, जबकि भारतीय बच्चे उन्हें चाचा नेहरू के रूप में जानते हैं। स्वतन्त्र भारत के प्रथम प्रधानमन्त्री का पद संभालने के लिए कांग्रेस द्वारा नेहरू निर्वाचित हुए, यद्यपि नेतृत्व का प्रश्न बहुत पहले 1941 में ही सुलझ चुका था, जब गांधीजी ने नेहरू को उनके राजनीतिक वारिस और उत्तराधिकारी के रूप में अभिस्वीकार किया। प्रधानमन्त्री के रूप में, वे भारत के सपने को साकार करने के लिए चल पड़े। भारत का संविधान १९५० में अधिनियमित हुआ, जिसके बाद उन्होंने आर्थिक, सामाजिक और राजनीतिक सुधारों के एक महत्त्वाकांक्षी योजना की शुरुआत की। मुख्यतः, एक बहुवचनी, बहु-दलीय लोकतन्त्र को पोषित करते हुए, उन्होंने भारत के एक उपनिवेश से गणराज्य में परिवर्तन होने का पर्यवेक्षण किया। विदेश नीति में, भारत को दक्षिण एशिया में एक क्षेत्रीय नायक के रूप में प्रदर्शित करनिरपेक्ष आन्दोलन में एक अग्रणी भूमिका निभाई। नेहरू के नेतृत्व में, कांग्रेस राष्ट्रीय और राज्य-स्तरीय चुनावों में प्रभुत्व दिखाते हुए और १९५१, १९५७, और १९६२ के लगातार चुनाव जीतते हुए, एक सर्व-ग्रहण पार्टी के रूप में उभरी। उनके अन्तिम वर्षों में राजनीतिक संकटों और १९६२ के चीनी-भारत युद्ध के बाद भी , वे भारत में लोगों के बीच लोकप्रिय बने रहे । भारत में, उनका जन्मदिन बाल दिवस के रूप में मनाया जाता है। जीवन जवाहरलाल नेहरू का जन्म १४ नवम्बर १८८९ को ब्रिटिश भारत में इलाहाबाद में हुआ। उनके पिता, मोतीलाल नेहरू (१८६१–१९३१), एक धनी बैरिस्टर जो कश्मीरी पण्डित थे। मोती लाल नेहरू सारस्वत कौल ब्राह्मण समुदाय से थे, स्वतन्त्रता संग्राम के दौरान भारतीय राष्ट्रीय कांग्रेस के दो बार अध्यक्ष चुने गए। उनकी माता स्वरूपरानी थुस्सू (१८६८–१९३८), जो लाहौर में बसे एक सुपरिचित कश्मीरी ब्राह्मण परिवार से थी, मोतीलाल की दूसरी पत्नी थी व पहली पत्नी की प्रसव के दौरान मृत्यु हो गई थी। जवाहरलाल तीन बच्चों में से सबसे बड़े थे, जिनमें बाकी दो लड़कियां थी। बड़ी बहन, विजया लक्ष्मी, बाद में संयुक्त राष्ट्र महासभा की पहली महिला अध्यक्ष बनी। सबसे छोटी बहन, कृष्णा हठीसिंग, एक उल्लेखनीय लेखिका बनी और उन्होंने अपने परिवार-जनों से संबंधित कई पुस्तकें लिखीं। जवाहरलाल नेहरू ने दुनिया के कुछ बेहतरीन स्कूलों और विश्वविद्यालयों में शिक्षा प्राप्त की थी। उन्होंने अपनी स्कूली शिक्षा हैरो से और कॉलेज की शिक्षा ट्रिनिटी कॉलेज, कैम्ब्रिज (लंदन) से पूरी की थी। इसके बाद उन्होंने अपनी लॉ की डिग्री कैम्ब्रिज विश्वविद्यालय से पूरी की। इंग्लैंड में उन्होंने सात साल व्यतीत किए जिसमें वहां के फैबियन समाजवाद और आयरिश राष्ट्रवाद के…"} {"instruction": "Construct a SQL query to get all the rows of a table ordered by the largest value in each row first.", "input": "SELECT ...", "output": "SELECT * FROM Table ORDER BY MAX(column1, column2, ...) DESC;"} {"text": "[EN Wikipedia] Badminton at the 2019 SEA Games – Men's team\n\nThe badminton men's team tournament at the 2019 SEA Games in Manila will be held from 1 to 4 December at the Muntinlupa Sports Complex, Metro Manila, Philippines. Schedule All times are Philippines Standard Time (UTC+08:00) Results Quarter-finals Semi-finals Final See also Women's team tournament Individual event References Men's team"} {"instruction": "Find the maximum value of an array without using any built-in functions", "input": "[7, 9, -2, 15, 3]", "output": "def find_max(arr): max = arr[0] for i in range(1, len(arr)): if arr[i] > max: max = arr[i] return max arr = [7, 9, -2, 15, 3] print(find_max(arr))"} {"instruction": "Create a program in Python that evaluates a given expression and displays the result in decimal.", "input": "\"3 + 4 * 5 + 9\"", "output": "def evaluate_expression(expression):\n \"\"\"\n Function to evaluate an arithmetic expression and return the result\n \"\"\"\n # define an operator precedence dictionary\n op_precedence = {'+': 1, '-': 1, '*': 2, '/': 2} \n \n # break the expression into tokens\n expression_tokens = expression.split(' ')\n \n # Initialize a stack\n expression_stack = []\n # loop through each token\n for token in expression_tokens:\n # push numbers onto the stack\n if token.isdigit():\n expression_stack.append(int(token))\n # if the token is an operator\n elif token in op_precedence:\n # pop two numbers off of the stack\n num2 = expression_stack.pop()\n num1 = expression_stack.pop()\n # perform the operation\n if token == '+':\n result = num1 + num2\n elif token == '-':\n result = num1 - num2\n elif token == '*':\n result = num1 * num2\n elif token == '/':\n result = num1 / num2\n # push the result onto the stack\n expression_stack.append(result)\n \n # return the result of the Expression\n return expression_stack[0]\n\nif __name__ == '__main__':\n expression = '3 + 4 * 5 + 9'\n print(evaluate_expression(expression))"} {"instruction": "How would you convert a binary number to decimal in JavaScript?", "input": "", "output": "const binaryToDecimal = binaryString => parseInt(binaryString, 2);"} {"text": "[DE Wikipedia] Rena (Norwegen)\n\nRena ist eine Ortschaft in der norwegischen Kommune Åmot in der Provinz (Fylke) Innlandet. Der Ort stellt das Verwaltungszentrum von Åmot dar und hat Einwohner (Stand: ). Geografie Rena ist ein sogenannter Tettsted, also eine Ansiedlung, die für statistische Zwecke als eine Ortschaft gezählt wird. Der Ort liegt in der Landschaft Østerdalen, etwa 30 Kilometer nördlich von Elverum. Rena liegt am Zusammenfluss der beiden Flüsse Glomma und Renaelva. Geschichte Der Ort wurde im April 1940 bombardiert. Die Åmot kirke ist eine Holzkirche im Jugendstil aus dem Jahr 1902, die im Zentrum des Ortes steht. Architekt war Henrik Bull, der den Entwurf dafür im Jahr 1898 anfertigte. Wirtschaft und Infrastruktur Verkehr Durch die Ortschaft führt der Riksvei 3, welcher parallel zur Glomma in den Süden nach Elverum führt, bevor die Straße nach Westen und nach Hamar abknickt. Richtung Norden stellt die Straße unter anderem die Verbindung nach Tynset her. In den Riksvei 3 münden in Rena unter anderem der von Osten kommende Fylkesvei 215 und der in den Westen führende Fylkesvei 2184. Ebenfalls parallel zur Glomma verlaufen die Schienen der Bahnlinie Rørosbanen. Der Bahnhof in Rena wurde im Oktober 1871 im Rahmen der Verlängerung der Bahnstrecke von Hamar nach Grundset geöffnet. Bis 1875 war Rena dabei der Endpunkt der Rørosbane. Wirtschaft In Rena wurde im Jahr 1997 das Rena leir, eine Niederlassung des norwegischen Militärs geöffnet. Dort ist das Telemark-Bataillon stationiert. Es gehört zu den größten Militärstützpunkten Nordeuropas. Durch die Etablierung wurde der in der Kommune Åmot in den 1960er-Jahren einsetzende Bevölkerungsrückgang gestoppt. Bis 1998 wurde in Rena das Unternehmen Rena Kartonfabrik geführt. Die Industrie war lange ein wichtiger Arbeitgeber, die Bedeutung ging allerdings mit der Zeit stark zurück. Sport Nahe der Ortschaft liegt die Skisprunganlage Renabakkene. Im Jahr 1902 wurde dort die erste Schanze errichtet. Im Jahr 1934 wurden zwei Schanzen fertiggestellt, später folgten weitere. Im Ort startet das traditionelle Skirennen Birkebeinerrennet, das von Rena nach Lillehammer führt. Persönlichkeiten Anne-Catharina Vestly (1920–2008), Schriftstellerin Weblinks Rena im Store norske leksikon (norwegisch) Einzelnachweise Åmot"} {"instruction": "Suggest a way to convert a JSON object to a string in JavaScript.", "input": "", "output": "The JSON.stringify() method can be used to convert a JSON object to a string in JavaScript. It takes two parameters: the object to be stringified and an optional replacer to modify the values before they are stringified. The result is a JSON-formatted string. Example: const object = {'name': 'John', 'age': 25}; const string = JSON.stringify(object); console.log(string); // '{\"name\": \"John\", \"age\": 25}'"} {"instruction": "Develop a bot in Python to simulate a conversation between two people.", "input": "", "output": "# Importing the necessary libraries\nimport random\n\n# Defining the responses for the bot\nquestions = [\"What is your favorite movie?\", \"What is your favorite color?\"]\nresponses = [\"My favorite movie is 'The Godfather'. I love the classic vibe of the movie.\", \n \"My favorite color is blue. It's soothing and calming to me.\"]\n\n# Function to respond to the questions\ndef respond(user_input):\n if user_input in questions:\n return random.choice(responses)\n else:\n return \"I'm sorry, I don't understand.\"\n\n# Driver code\nprint(\"Bot: Hi! What can I help you with?\")\nuser_input = input(\"User: \")\n\nwhile user_input != \"bye\":\n print(\"Bot: \" + respond(user_input))\n user_input = input(\"User: \")\n\nprint(\"Bot: Bye! It was nice talking to you!\")"} {"text": "[CS Wikipedia] Bochnatka\n\nBochnatka (Pectinatella) je rod mechovky žijící ve sladké vodě - žije jako volně plovoucí, či usedlá rosolovitá hmota o hmotnosti až několik kilogramů. Od roku 2003 se v České republice šíří bochnatka americká (Pectinatella magnifica Leidy, 1851), i když její výskyt se na území Česka objevil již dříve v roce 1922. Vyskytuje se převážně na Třeboňsku. Rozšíření: Původní - Severní Amerika. Nepůvodní - Evropa, např. také Třeboňsko Externí odkazy Bochnatka na Biolibu Reference Mechovky"} {"instruction": "Build a code program to index a set of strings of variable lengths.", "input": "Strings: \"I am learning python\", \"I love coding\", \"Coding is awesome\"", "output": "from collections import defaultdict\n\ndef index_strings(strings):\n index = defaultdict(list)\n for string in strings:\n for i, char in enumerate(string):\n index[char].append((i, string))\n return index\n\nstrings = [\"I am learning python\", \"I love coding\", \"Coding is awesome\"]\nprint(index_strings(strings))\n# {\n# 'I': [(0, 'I am learning python'), (0, 'I love coding')], \n# 'a': [(2, 'I am learning python')],\n# 'm': [(3, 'I am learning python')],\n# 'l': [(5, 'I am learning python'), (4, 'I love coding')],\n# 'e': [(7, 'I am learning python'), (6, 'I love coding')],\n# 'r': [(8, 'I am learning python'), (7, 'I love coding')],\n# 'n': [(10, 'I am learning python'), (9, 'I love coding'), (5, 'Coding is awesome')],\n# 'i': [(12, 'I am learning python'), (13, 'I love coding'), (6, 'Coding is awesome')],\n# 'g': [(14, 'I am learning python'), (15, 'I love coding'), (7, 'Coding is awesome')],\n# 'p': [(17, 'I am learning python')],\n# 'y': [(19, 'I am learning python')],\n# 't': [(20, 'I am learning python')],\n# 'h': [(21, 'I am learning python')],\n# 'o': [(16, 'I love coding'), (8, 'Coding is awesome')],\n# 'c': [(4, 'I love coding'), (0, 'Coding is awesome')],\n# 'd': [(5, 'I love coding'), (1, 'Coding is awesome')],\n# 's': [(2, 'Coding is awesome')],\n# 'a': [(3, 'Coding is awesome')],\n# 'w': [(4, 'Coding is awesome')],\n# 'e': [(5, 'Coding is awesome')],\n# }"} {"instruction": "Write a function to give the intersection of two unsorted linked lists.", "input": "", "output": "def intersection(head1, head2): s = set() current1 = head1 current2 = head2 while current1 is not None: s.add(current1.data) current1 = current1.next result = [] while current2 is not None: if current2.data in s: result.append(current2.data) current2 = current2.next return result"} {"text": "[EN Wikipedia] Afghanistan\n\nAfghanistan, officially the Islamic Emirate of Afghanistan, is a landlocked country located at the crossroads of Central Asia and South Asia. Referred to as the Heart of Asia, it is bordered by Pakistan to the east and south, Iran to the west, Turkmenistan to the northwest, Uzbekistan to the north, Tajikistan to the northeast, and China to the northeast and east. Occupying of land, the country is predominantly mountainous with plains in the north and the southwest, which are separated by the Hindu Kush mountain range. Kabul is the country's largest city and serves as its capital. According to the World Population review, , Afghanistan's population is 40.2 million The National Statistics Information Authority of Afghanistan estimated the population to be 32.9 million . Human habitation in Afghanistan dates to the Middle Paleolithic era. Popularly referred to as the graveyard of empires, the land has historically been home to various peoples and has witnessed numerous military campaigns, including those by the Persians, Alexander the Great, the Maurya Empire, Arab Muslims, the Mongols, the British, the Soviet Union, and a US-led coalition. Afghanistan also served as the source from which the Greco-Bactrians and the Mughals, amongst others, rose to form major empires. The various conquests and periods in both the Iranian and Indian cultural spheres made the area a center for Zoroastrianism, Buddhism, Hinduism, and later Islam. The modern state of Afghanistan began with the Durrani Afghan Empire in the 18th century, although Dost Mohammad Khan is sometimes considered to be the founder of the first modern Afghan state. Dost Mohammad died in 1863, days after his last campaign to unite Afghanistan, and Afghanistan was consequently thrown back into civil war. During this time, Afghanistan became a buffer state in the Great Game between the British Empire and the Russian Empire. From India, the British attempted to subjugate Afghanistan but were repelled in the First Anglo-Afghan War. However, the Second Anglo-Afghan War saw a British victory and the successful establishment of British political influence. Following the Third Anglo-Afghan War in 1919, Afghanistan became free of foreign political hegemony, and emerged as the independent Kingdom of Afghanistan in June 1926 under Amanullah Khan. This monarchy lasted almost half a century, until Zahir Shah was overthrown in 1973, following which the Republic of Afghanistan was established. Since the late 1970s, Afghanistan's history has been dominated by extensive warfare, including coups, invasions, insurgencies, and civil wars. The conflict began in 1978 when a communist revolution established a socialist state, and subsequent infighting prompted the Soviet Union to invade Afghanistan in 1979. Mujahideen…"} {"instruction": "Read a code and find all the function calls that are made.", "input": "print('Hello world!') my_function() my_function2(2, 3)", "output": "The two function calls made are \"my_function()\" and \"my_function2(2, 3)\"."} {"text": "[EN Wikipedia] Pearse River\n\nThe Pearse River is a river of the Tasman Region of New Zealand's South Island. It flows east from sources in the Wharepapa / Arthur Range, reaching the Motueka River 20 kilometres southwest of Motueka. The source is a resurgence near the Nettlebed Cave. The resurgence has been dived to a depth of 245 metres and a diver had died in one attempt. At least three undescribed species have been found by divers in the resurgence. See also List of rivers of New Zealand References Rivers of the Tasman District Rivers of New Zealand"} {"text": "[DE Wikipedia] Vendelinus\n\nVendelinus steht für: Govaert Wendelen (1580–1667, Gelehrtenname Vendelinus), flämischer Astronom Vendelinus (Mondkrater), benannt nach Govaert Wendelen"} {"instruction": "Create a Python program that, given a person's Birthdate and current date, returns the age of the person.", "input": "Birthdate: 6 Dec 1996\nCurrent Date: 18 March 2021", "output": "def calculate_age(birthdate, current_date):\n age = current_date.year - birthdate.year\n if current_date.month < birthdate.month:\n age -= 1\n elif (current_date.month == birthdate.month and\n current_date.day < birthdate.day):\n age -= 1\n return age\n\nimport datetime\nbirthdate = datetime.date(1996, 12, 6)\ncurrent_date = datetime.date(2021, 3, 18)\nage = calculate_age(birthdate, current_date)\nprint(age)"} {"instruction": "Create a web application using Python and Django that enables users to register and log in.", "input": "Not applicable", "output": "from django.contrib.auth.forms import UserCreationForm\n\nclass SignUpForm(UserCreationForm):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n \n self.fields['username'].label = 'Display Name'\n self.fields['email'].label = 'Email Address'\n \nform = SignUpForm(data=request.POST or None)\n\nif form.is_valid():\n new_user = form.save(commit=False)\n new_user.save()\n\nreturn render(request, 'register.html', {'form': form})"} {"instruction": "Train a machine learning model in Python using a given dataset and generate a confusion matrix.", "input": "// Dataset of 1000 samples and 30 features", "output": "from sklearn.model_selection import train_test_split\nfrom sklearn.metrics import confusion_matrix\n\nX_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0) \nmodel.fit(X_train, y_train)\npredictions = model.predict(X_test)\nconfusion_matrix(y_test, predictions)"} {"instruction": "Develop a function in Java that takes two integers as its arguments and prints out the maximum of the two.", "input": "A = 25 B = 27", "output": "/** * Develop a function in Java that takes two integers as its arguments and prints out the maximum of the two. */ public class maximum { public static int maximum(int a, int b){ if(a > b){ return a; } else { return b; } } public static void main(String[] args) { int a = 25; int b = 27; int max = maximum(a, b); System.out.println(\"Maximum of the two numbers is: \" + max); } }"} {"instruction": "Solve this regular expression problem.", "input": "A string should start with a letter, contain only letters and numbers, and should be at least 8 characters in length.", "output": "/^[A-Za-z][A-Za-z0-9]{7,}$/"} {"instruction": "Create a list containing a given number of random numbers.", "input": "", "output": "import random def random_list(length): rand_list = [] for i in range(length): rand_list.append(random.randint(0,100)) return rand_list"} {"instruction": "Create a Python function to evaluate a given polynomial equation", "input": "P(x) = x^2 - 4x + 6", "output": "def poly_evaluation(x):\n return x**2 - 4*x + 6\n\nx = 2\nresult = poly_evaluation(x)\nprint(result) # prints 0"} {"instruction": "Convert the following if-else scenerio into switch statements.", "input": "if (x == 1) { y = 10; } else if (x == 2) { y = 20; } else if (x == 3) { y = 30; }", "output": "switch (x) { case 1: y = 10; break; case 2: y = 20; break; case 3: y = 30; break; default: // no default required }"} {"instruction": "Create an SQL query to return the customer name and total amount spent on all orders in the past week.", "input": "", "output": "SELECT customer_name, SUM(amount) AS total_spent FROM orders WHERE order_date > DATE_SUB(NOW(), INTERVAL 1 WEEK) GROUP BY customer_name;"} {"text": "[HI Wikipedia] यौन हिंसा\n\nयौन हिंसा शारीरिक और मानसिक स्वास्थ्य पर गहरा प्रभाव डालती है। साथ ही साथ यह शारीरिक चोट का भी कारण बन रही है, इसमें यौन और प्रजनन स्वास्थ्य की समस्याओं के तात्कालिक और दीर्घकालिक दोनों तरह के परिणामों के जोखिम भी जुड़े हुए हैं। यौन हिंसा, दुनिया भर में होता है, हालांकि अधिकांश देशों में इस समस्या पर थोड़ा बहुत अनुसंधान आयोजित किया गया है। परिभाषा एफबीआई के अनुसार यौन हिंसा जरूरी नहीं की महिला के साथ ही हो इसके अनुसार,हमारे यौन अंगों में बग़ैर हमारी मर्ज़ी के किसी अंग या वस्तु का हल्का प्रवेश भी बलात्कार कहलाता है। कुछ लोगो के विचार से हल्की-फुल्की छेड़छाड़, बदतमीजी, अश्लीलता, छूने की कोशिश, फोन पर अभद्र टिप्पणी या संदेश भी यौन हिंसा की श्रेणी में आते हैं। महिला यौन हिंसा पर शोध स्रोत: विश्व स्वास्थ्य संगठन, स्वास्थ्य विज्ञान और ऊष्ण कटिबंधीय दवाओं की लंदन संस्था और दक्षिण अफ्रीकी आयुर्विज्ञान शोध परिषद। विश्व स्वास्थ्य संगठन के एक शोध के अनुसार दुनिया भर में हर तीन में से एक से ज्यादा महिला को शारीरिक या यौन हिंसा का शिकार होना पड़ा है। विश्व स्वास्थ्य संगठन प्रमुख मार्गरेट चान और सहयोगियों द्वारा निर्मित इस रपट के अनुसार में महिलाओं और लड़कियों के प्रति शारीरिक और मानसिक दुर्व्यवहार के असर को विस्तार से विवरण है। यौन हिंसा के स्रोत इस रपट के निष्कर्षों के अनुसर: दुनिया भर में 30 प्रतिशत महिलाएं नज़दीकी साथी द्वारा हिंसा दुर्व्यवहार की शिकार होती हैं। कत्ल होने वाली 38 प्रतिशत महिलाओं की हत्या उनके साथियों द्वाराज़्यादा की जाती है। अपने साथी द्वारा शारीरिक या यौन दुर्व्यवहार की शिकार होने वाली 42 प्रतिशत महिलाएं इससे चोटिल हो जाती हैं। किसी गैर के हमले का शिकार होने वाली महिलाओं के अवसाद और व्यग्रता का शिकार होने की आशंका उन महिलाओं के मुकाबले 2.6 फ़ीसदी अधिक होती है जिन्होंने हिंसा का सामना नहीं किया। जिन्हें अपने साथी द्वारा दुर्व्यवहार का सामना करना पड़ता है उन्हें ये दिक्कतें होने की आशंका दोगुनी होती है। पीड़ितों को शराबखोरी, गर्भपात, यौन संक्रमित रोग और एचवाईवी होने की आशंका अधिक रहती है। सन्दर्भ अपराध बलात्कार लिंग आधारित हिंसा"} {"instruction": "Write a Python code to create a dictionary which records the frequency of words in a given string.", "input": "\" this is a test string \"", "output": "# Create a dictionary to record the frequency of words in a given string\n\n# Split the string into words\nwords = \"this is a test string\".strip().split()\n\n# We use a dictionary to store the frequency of the words\nfreq = {}\n\n# Iterate through the words and count their frequency\nfor word in words:\n if word in freq:\n freq[word] += 1\n else:\n freq[word] = 1\n\nprint(freq)"} {"instruction": "Create a string parameter with a default value in golang.", "input": "", "output": "myString := flag.String(\"name\", \"Default Value\", \"description\")"} {"text": "[CS Wikipedia] Bielovodské Žabie plesá\n\nBielovodské Žabie plesá () je soubor dvou ledovcových jezer nacházejících se v horní části Žabí Bielovodské doliny ve Vysokých Tatrách na Slovensku. Plesa leží v nadmořské výšce 1675 m a 1699 m. Plesa Odkazy Poznámky Literatura Související články Žabia Bielovodská dolina Externí odkazy Wielka Encyklopedia Tatrzańska (WET), Żabie Stawy Białczańskie Ledovcová jezera na Slovensku Jezera v Prešovském kraji Vodstvo v okrese Poprad Povodí Dunajce Jezera v Tatrách na Slovensku Jezera ve Vysokých Tatrách Bielovodská dolina Skupiny jezer v Tatrách Skupiny jezer na Slovensku"} {"instruction": "Write a JavaScript code snippet that will add two numbers.", "input": "", "output": "let num1 = 5; let num2 = 8; let sum = num1 + num2; console.log(sum);"} {"instruction": "Write a Python program to print out the ASCII table.", "input": "", "output": "def print_ascii_table():\n for i in range(32, 127):\n print(f\"Character:{chr(i)}, ASCII Number:{i}\")"} {"instruction": "Write a Bash command that outputs the system's date as \"DD-MM-YYYY\".", "input": "", "output": "date +\"%d-%m-%Y\""} {"instruction": "Write a Python code to convert a given list of strings to all lowercase.", "input": "['CoDE', 'OF', 'LinK']", "output": "def to_lowercase(strings):\n return [string.lower() for string in strings]\n \nresult = to_lowercase(['CoDE', 'OF', 'LinK'])\nprint(result)"} {"instruction": "Implement Object-Oriented Programming in this blog post.", "input": "Blog post content:\n\nThis post is about the basics of Python programming. You'll learn about data types, loops, and functions", "output": "# Object-Oriented Programming Implementation\n\nclass Python:\n # Basic data types\n INTEGER = \"integer\"\n FLOAT = \"float\"\n STRING = \"string\"\n BOOLEAN = \"boolean\" \n\n def __init__(self):\n self.__data_types = [self.INTEGER, self.FLOAT, self.STRING, self.BOOLEAN]\n\n # Function to get the data types\n def get_data_types(self):\n return self.__data_types\n\n # Loops\n\n # Function to loop through a list\n def loop_list(self, collection):\n for item in collection:\n print(item)\n\n # Function to loop through a range\n def loop_range(self, start, end):\n for i in range(start,end):\n print(i)\n \n # Functions\n\n # Function to calculate the sum\n def sum_nums(self, num1, num2):\n return num1+num2\n\n # Function to calculate the product\n def multiply_nums(self, num1, num2):\n return num1*num2\n\n# Main code\npython = Python()\ndata_types = python.get_data_types()\n\nprint(\"Data Types: \", data_types)\n\nnumbers = [1,2,3,4]\npython.loop_list(numbers)\n\npython.loop_range(1, 10)\n\nprint(\"Sum: \", python.sum_nums(4,5))\nprint(\"Product: \", python.multiply_nums(4,5))"} {"instruction": "Design a python program that calculates a person's BMI (body mass index).", "input": "", "output": "def calculate_bmi(weight, height):\n bmi = weight/(height**2)\n return bmi"} {"instruction": "Implement a method to check if a given string has all unique characters.", "input": "", "output": "def has_unique_chars(string): chars = set() for char in string: if char in chars: return False else: chars.add(char) return True"} {"instruction": "Generate a Python program to remove all elements of given list present in other list.", "input": "list1 = [1, 2, 3, 4, 5, 6], list2 = [2, 4, 6]", "output": "def remove_from_list(list1, list2):\n for i in list2: \n list1.remove(i) \n \n return list1\n\nlist1 = [1, 2, 3, 4, 5, 6]\nlist2 = [2, 4, 6]\n \nprint(remove_from_list(list1, list2))"} {"instruction": "Prepare a training dataset for a Machine Learning model using Python.", "input": "Not applicable", "output": "import pandas as pd\n \n# Read in the data\ndf = pd.read_csv('data.csv')\n\n# Preprocess the data\ndf = preprocessData(df)\n\n# Split the data into training and test\ntrain_X, test_X, train_y, test_y = train_test_split(df.drop('X',axis=1),\n df['X'], test_size=0.2)\n\n# Save the training and test data to files\ntrain_X.to_csv('train_X.csv', index=False)\ntest_X.to_csv('test_X.csv', index=False)\ntrain_y.to_csv('train_y.csv', index=False)\ntest_y.to_csv('test_y.csv', index=False)"} {"instruction": "Edit the following code so that it will print out all the integer numbers between 0 and 10.", "input": "for x in range(10): print(x)", "output": "for x in range(11): print(x)"} {"instruction": "Create a Python function to strip a given string of its whitespace.", "input": "", "output": "def strip_whitespace(string):\n return string.replace(\" \", \"\")\n\nprint(strip_whitespace('Hello World')) # HelloWorld"} {"instruction": "Create a python code to generate a dictionary of char counts for a given string.", "input": "input_string = \"Hello World!\"", "output": "def char_count_dict(input_string):\n char_dict = {}\n\n for char in input_string:\n if char in char_dict:\n char_dict[char] += 1\n else:\n char_dict[char] = 1\n \n return char_dict\n\nprint(char_count_dict(input_string))"} {"instruction": "What is a text editor?", "input": "", "output": "A text editor is a computer program used for entering, editing, formatting and displaying text. Some text editors support syntax coloring, code completion and autopairing for programming languages. Text editors are used for programming, writing, composition, web design and many other forms of text-related work."} {"instruction": "Write a function in Python to implement a linear search algorithm. The algorithm should return the index of the number in the array if found, otherwise -1.", "input": "data = [7, 13, 11, 9, 12] search_num = 9", "output": "def linear_search(data, search_num): for index, num in enumerate(data): if num == search_num: return index return -1"} {"text": "[DE Wikipedia] Liste der Naturdenkmale in Aichelberg (Landkreis Göppingen)\n\nDie Liste der Naturdenkmale in Aichelberg nennt die verordneten Naturdenkmale (ND) der im baden-württembergischen Landkreis Göppingen liegenden Gemeinde Aichelberg. In Aichelberg gibt es insgesamt vier als Naturdenkmal geschützte Objekte, davon zwei flächenhafte Naturdenkmale (FND) und zwei Einzelgebilde-Naturdenkmale (END). Stand: 31. Oktober 2016. Flächenhafte Naturdenkmale (FND) Einzelgebilde (END) Weblinks Schutzgebietsverzeichnis der Landesanstalt für Umwelt, Messungen und Naturschutz Baden-Württemberg Übersichtstabelle: FND, END Naturdenkmale Aichelberg"} {"instruction": "Create a Python program to classify the digits in a dataset", "input": "Features: [0.25, 0.33, 0.46, 0.83, 0.14]\nLabels: [0, 0, 1, 1, 0]", "output": "import numpy as np \nfrom sklearn.svm import SVC \n\nfeatures = np.array([[0.25, 0.33, 0.46, 0.83, 0.14]]) \nlabels = np.array([0, 0, 1, 1, 0]) \nclf = SVC() \nclf.fit(features, labels) \n\n# predicting the class of the following data \ntest_data = np.array([[0.36, 0.22, 0.91, 0.81, 0.12]]) \nresult = clf.predict(test_data) \nprint(result)"} {"instruction": "Create a class in Python that takes two arguments a 'name' and 'age' and returns a greeting.", "input": "-", "output": "class Greeting:\n def __init__(self, name, age):\n self.name = name\n self.age = age\n \n def get_greeting(self):\n return f\"Hello, my name is {self.name} and I am {self.age} years old.\""} {"instruction": "Generate a list containing the squares of numbers from 0 to 10.", "input": "", "output": "[0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100]"} {"text": "[HI Wikipedia] समाजशास्त्र\n\nसमाजशास्त्र मानव समाज का अध्ययन है। यह सामाजिक विज्ञान की एक शाखा है, जो मानवीय सामाजिक संरचना और गतिविधियों से सम्बन्धित जानकारी को परिष्कृत करने और उनका विकास करने के लिए, अनुभवजन्य विवेचन और समालोचनात्मक विश्लेषण की विभिन्न पद्धतियों का उपयोग करता है, अक्सर जिसका ध्येय सामाजिक कल्याण के अनुसरण में ऐसे ज्ञान को लागू करना होता है। समाजशास्त्र की विषयवस्तु के विस्तार, आमने-सामने होने वाले सम्पर्क के सूक्ष्म स्तर से लेकर व्यापक तौर पर समाज के बृहद स्तर तक है। समाजशास्त्र, पद्धति और विषय वस्तु, दोनों के मामले में एक विस्तृत विषय है। परम्परागत रूप से इसकी केन्द्रियता सामाजिक स्तर-विन्यास (या \"वर्ग\"), सामाजिक संबंध, सामाजिक संपर्क, धर्म, संस्कृति और विचलन पर रही है, तथा इसके दृष्टिकोण में गुणात्मक और मात्रात्मक शोध तकनीक, दोनों का समावेश है। चूँकि अधिकांशतः मनुष्य जो कुछ भी करता है वह सामाजिक संरचना या सामाजिक गतिविधि की श्रेणी के अर्न्तगत सटीक बैठता है, समाजशास्त्र ने अपना ध्यान धीरे-धीरे अन्य विषयों जैसे- चिकित्सा, सैन्य और दंड संगठन, जन-संपर्क और यहाँ तक कि वैज्ञानिक ज्ञान के निर्माण में सामाजिक गतिविधियों की भूमिका पर केन्द्रित किया है। सामाजिक वैज्ञानिक पद्धतियों की सीमा का भी व्यापक रूप से विस्तार हुआ है। 20वीं शताब्दी के मध्य के भाषाई और सांस्कृतिक परिवर्तनों ने तेज़ी से सामाज के अध्ययन में भाष्य विषयक और व्याख्यात्मक दृष्टिकोण को उत्पन्न किया। इसके विपरीत, हाल के दशकों ने नये गणितीय रूप से कठोर पद्धतियों का उदय देखा है, जैसे सामाजिक नेटवर्क विश्लेषण। W.Shiv siddh आधार = इतिहास W.shiv siddh from Dhabipandusar Lunkransar Bikaner समाजशास्त्रीय तर्क इस शब्द की उत्पत्ति की तिथि उचित समय से पूर्व की बताते हैं। आर्थिक, राजनैतिक और सांस्कृतिक प्रणालीयों सहित समाजशास्त्र की उत्पत्ति, पश्चिमी ज्ञान और दर्शन के संयुक्त भण्डार में आद्य-समाजशास्त्रीय है। प्लेटो के समय से ही सामाजिक विश्लेषण किया जाना शुरू हो गया। यह कहा जा सकता है कि पहला समाजशास्त्री 14वीं सदी का उत्तर अफ्रीकी अरब विद्वान, इब्न खल्दून था, जिसकी मुक़द्दीमा, सामाजिक एकता और सामाजिक संघर्ष के सामाजिक-वैज्ञानिक सिद्धांतों को आगे लाने वाली पहली कृति थी। शब्द \"sociologie \" पहली बार 1780 में फ़्रांसीसी निबंधकार इमेनुअल जोसफ सीयस (1748-1836) द्वारा एक अप्रकाशित पांडुलिपि में गढ़ा गया। यह बाद में ऑगस्ट कॉम्ट(1798-1857) द्वारा 1838 में स्थापित किया गया। इससे पहले कॉम्ट ने \"सामाजिक भौतिकी\" शब्द का इस्तेमाल किया था, लेकिन बाद में वह दूसरों द्वारा अपनाया गया, विशेष रूप से बेल्जियम के सांख्यिकीविद् एडॉल्फ क्योटेलेट. कॉम्ट ने सामाजिक क्षेत्रों की वैज्ञानिक समझ के माध्यम से इतिहास, मनोविज्ञान और अर्थशास्त्र को एकजुट करने का प्रयास किया। फ्रांसीसी क्रांति की व्याकुलता के शीघ्र बाद ही लिखते हुए, उन्होंने प्रस्थापित किया कि सामाजिक निश्चयात्मकता के माध्यम से सामाजिक बुराइयों को दूर किया जा सकता है, यह द कोर्स इन पोसिटिव फिलोसफी (1830-1842) और ए जनरल व्यू ऑफ़ पॉसिटिविस्म (1844) में उल्लिखित एक दर्शनशास्त्रीय दृष्टिकोण है। कॉम्ट को विश्वास था कि एक 'प्रत्यक्षवादी स्तर' मानवीय समझ के क्रम में, धार्मिक अटकलों और…"} {"instruction": "Write a code for a Javascript program to return the nth Fibonacci number.", "input": "8", "output": "// returns the nth Fibonacci number function nthFibonacciNumber(n) { let fib = [0, 1]; for (i=2; i<=n; i++) { fib[i] = fib[i-2] + fib[i-1]; } return fib[n]; } console.log(nthFibonacciNumber(8));"} {"instruction": "Create a Python program to predict the type of fruit based on its color.", "input": "Red", "output": "import numpy as np\nfrom sklearn import datasets\nfrom sklearn.tree import DecisionTreeClassifier\n\n# Load the dataset\nfruits = datasets.load_iris()\n\n# Split the data into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(fruits.data, fruits.target, test_size=0.3, random_state=1)\n\n# Train the model with the Decision Tree Algorithm \nmodel = DecisionTreeClassifier()\nmodel.fit(X_train, y_train)\n\n# Make predictions with the model\npredicted_fruits = model.predict([[1, 0, 0.5, 1]])\n\nif predicted_fruits == [1]:\n print('The fruit is likely to be an apple')\nelif predicted_fruits == [2]:\n print('The fruit is likely to be an orange')\nelse:\n print('The fruit is likely to be a banana')"} {"instruction": "Write a Bash shell script to print the unique elements in the given array.", "input": "list=(1 2 3 1 4 2 5)", "output": "#!/bin/bash list=(1 2 3 1 4 2 5) unique_list=() for num in ${list[@]}; do if [[ ! ${unique_list[*]} =~ $num ]]; then unique_list+=($num) fi done echo ${unique_list[@]}"} {"instruction": "Create a boolean condition to check if the value is a real number.", "input": "", "output": "typeof value == 'number' && isFinite(value)"} {"instruction": "Write a Python program to print all the numbers from 1 to n (inclusive), where n is a given number.", "input": "n = 20", "output": "for i in range(1, n+1): \n print(i)"} {"instruction": "Create a Python program to find the square root of the sum of two numbers without using the sqrt() function.", "input": "Num1 = 4\nNum2 = 9", "output": "# Python program\nimport math \n\ndef square_root(a, b): \n return math.sqrt(a*a + b*b)\n \nNum1 = 4\nNum2 = 9\n\nprint(\"Square root of the sum of two numbers:\", square_root(Num1, Num2))"} {"instruction": "Write a class definition for a Box class.", "input": "", "output": "class Box: def __init__(self, width, length, height): self.width = width self.length = length self.height = height def calculate_volume(self): return self.width * self.length * self.height"} {"instruction": "Write Clojure code to solve the following problem.", "input": "Problem: Given a list of words and a target word, find the index of the target word in the list. Example: (\"apple\", \"banana\", \"citrus\") \"banana\"", "output": "(defn solve-problem [lst target] (-> lst (map #(first %) (map-indexed vector)) (filter #(= (second %) target)) (first) (first)))"} {"instruction": "Create a program that finds the sum of all numbers divisible by 4 between 150 and 300", "input": "", "output": "sum = 3750"} {"instruction": "Write a Python program to determine and-or operations", "input": "x = False and False", "output": "x = False and False\n\n# Output\nprint(x)\n# False"} {"text": "[CS Wikipedia] The Originals (seriál)\n\nThe Originals je americký dramatický fantasy televizní seriál, jehož autorkou je Julie Plecová. Premiérově byl vysílán v letech 2013–2018 na stanici The CW. Celkově bylo natočeno 92 dílů v pěti řadách. Vznikl jako spin-off seriálu Upíří deníky, naopak z The Originals byl dále odvozen seriál Odkaz. Příběh Seriál se odehrává v New Orleans a soustředí se na trojici původních upírů – sourozence Mikaelsonovy, Klause (Joseph Morgan), Elijaha (Daniel Gillies) a Rebeku (Claire Holt). Během backdoor pilotu (20. díl 4. řady Upířích deníků) bylo prozrazeno, že Hayley (Phoebe Tonkin) je těhotná a čeká Klausovo dítě. Nyní se Klaus musí zbavit svého dávného chráněnce Marcela (Charles Michael Davis), aby udržel své dítě v pořádku. Rodina Mikaelsonových je tak zapletena do nadpřirozené politiky města, které ovládá právě Marcel, navíc do New Orleans přijdou i osoby z jejich dávné minulosti Mikaelsonových. Obsazení Joseph Morgan jako Niklaus „Klaus“ Mikaelson, samozvaný Král New Orleans, původní hybrid, z poloviny původní upír, z poloviny vlkodlak Daniel Gillies jako Elijah Mikaelson, Klausův polorodý bratr, původní upír Claire Holt jako Rebekah Mikaelson (1. řada, jako host ve 2.–5. řadě), Klausova polorodá sestra, původní upír Phoebe Tonkin jako Hayley Marshall, vlkodlak, později hybrid, matka Klausovy dcery Hope, Elijahova přítelkyně Charles Michael Davis jako Marcellus „Marcel“ Gerard, upír (později vylepšený upír) a bývalý otrok, který soupeří s Klausem o město New Orleans Daniella Pineda jako Sophie Deveraux (1. řada), čarodějka Leah Pipes jako Camille O'Connell (1.–3. řada, jako host ve 4. a 5. řadě), lidská terapeutka Danielle Campbell jako Davina Claire (1.–3. řada, jako host ve 4. a 5. řadě), čarodějka a Marcelova adoptivní dcera Yusuf Gatewood jako Vincent Griffith (2.–5. řada, jako host v 1. a 2. řadě), čaroděj Riley Voelkel jako Freya Mikaelson (3.–5. řada, jako host ve 2. řadě), Klausova polorodá sestra, čarodějka Danielle Rose Russell jako Hope Mikaelson (5. řada), dcera Klause a Hayley, tribrid ve 4. a 5. řadě roli sedmileté Hope hrála jako host Summer Fontana Steven Krueger jako Joshua „Josh“ Rosza (5. řada, jako host v 1.–4. řadě), návštěvník v New Orleans, který se stane upírem Produkce V lednu 2013 stanice The CW oznámila, že jeden díl ve čtvrté řadě seriálu Upíří deníky bude tzv. backdoor pilotem zaměřeným na původní upíry. Odvysílán byl 25. dubna 2013 a již o den později stanice skutečně objednala spin-off Upířích deníků s názvem The Originals. Hlavním tvůrcem se stala Julie Plec, jedna z autorek původního seriálu. Seriál byl natáčen ve městě Conyers v Georgii, štáb však příležitostně zavítal i do skutečného New Orleans. Vysílání První díl seriálu The Originals byl na stanici The CW odvysílán 3. října 2014. Již 10. října došlo k objednání…"} {"instruction": "Write a JavaScript function that returns the first 50 prime numbers.", "input": "", "output": "function getFirstFiftyPrimes(){ let primes = [2]; let num = 3; while(primes.length < 50){ let isPrime = true; for(let i = 0; i < primes.length; i++){ if(num % primes[i] === 0){ isPrime = false; } } if(isPrime) primes.push(num); num += 1; } return primes; }"} {"instruction": "Generate code to implement quick sort in Python.", "input": "Not applicable", "output": "def quicksort(arr):\n if len(arr) <= 1:\n return arr\n pivot = arr[len(arr) // 2]\n left = [x for x in arr if x < pivot]\n middle = [x for x in arr if x == pivot]\n right = [x for x in arr if x > pivot]\n \nreturn quicksort(left) + middle + quicksort(right)"} {"instruction": "Create a python script to pass command line arguments to a function.", "input": "", "output": "# Pass command line arguments to a function\n\nimport sys\n \ndef command_line_args():\n args = []\n # Loop over the command line arguments\n for arg in sys.argv[1:]:\n args.append(arg)\n return args\n \nargs = command_line_args()\nprint(args)"} {"instruction": "Write a Python program that takes an array containing n elements and generates the power set.", "input": "n = 3", "output": "import itertools\n\ndef powerset(lst):\n powerset = []\n for n in range(len(lst) + 1):\n for subset in itertools.combinations(lst, n):\n powerset.append(subset)\n return powerset\n\narr = [1, 2, 3]\nprint(powerset(arr))"} {"instruction": "Create a PDF document from a Word document using Python.", "input": "word file", "output": "import win32com.client\n\n# word file to be converted\nwordFile = r'filename.docx'\n\n# Open the word file\nword = win32com.client.Dispatch(\"Word.Application\")\ndoc = word.Documents.Open(wordFile)\n\n# Set the pdf parameters\npdf_format_id = 17\nfile_name = r'filename.pdf'\n\n# Save the file as pdf\ndoc.SaveAs(file_name, FileFormat=pdf_format_id)\n\n# Close the word file\nword.Quit()"} {"instruction": "Develop a function in Python to accept a positive integer as input and print its reverse.", "input": "", "output": "def reverse_integer(number):\n reversed_number = 0\n while number > 0: \n remainder = number % 10\n reversed_number *= 10\n reversed_number += remainder\n number //= 10\n \n return reversed_number\n\nnumber = 12345\nprint(\"Reversed Number:\", reverse_integer(number))"} {"text": "[HI Wikipedia] कैयट\n\nकैयट पतंजलि के व्याकरण भाष्य की 'प्रदीप' नामक टीका के रचयिता। देवीशतक के व्याख्याकार कैयट इनसे भिन्न है। उनके पिता का नाम जैयटोपाध्याय था (महामाष्यार्णवाऽवारपारीणंविवृतिप्लवम्। यथागमं विधास्येहं कैयटो जैयटात्मज)। अनुमान है कि वे कश्मीर निवासी थे। पीटर्सन ने कश्मीर की रिपोर्ट में कैयट (और उव्वट) को प्रकाशक ऽर मम्मट का भाई और जैयट का पुत्र कहा है। काव्यप्रकाश की 'सुधासागर' नामक टीका में १८वीं शती के भीमसेन ने भी कैयट और औवट शुक्लयजुर्वेद को सम्मट के भाष्यकार को मम्मट का अनुज और शिष्य बताया है। पर यजुर्वेदभाष्य पुष्पिका में औवट (या उव्वट) के पिता का नाम वज्रट कहा गया है। काश्मीरी ब्राह्मणपंडितों के बीच प्रचलित अनुश्रुति के अनुसार कैयट पामपुर (या येच) गाँव के निवासी थे। महाभाष्यांत पाणिनि व्याकरण को वे कंठस्थ ही पढ़ाया करते थे। आर्थिक स्थिति दयनीय होने के कारण उदरपोषण के लिये उन्हें कृषि आदि शरीरश्रम करना पड़ता था। एक बार दक्षिण देश से कश्मीर आए हुए पंडित कृष्ण भट्ट ने कश्मीरराज से मिलकर तथा अन्य प्रयत्नों द्वारा कैयट के लिए एक गाँव का शासन और धनधान्य संग्रह किया और उसे लेकर जब वे उसे समर्पित करने उनके यहाँ पहुँचे तो उन्होने भिक्षा दान ग्रहण करना अस्वीकार कर दिया। वे कश्मीर से पैदल काशी आए और शास्त्रार्थ मे अनेक पंडितों को हराया। वहीं प्रदीप की रचना हुई। इस टीकाग्रंथ के संबंध में उन्होने लिखा है कि उसका आधार भर्तृहरि (वाक्यपदीयकार) की भाष्यटीका है जो अब पूर्णरूप से अप्राप्य है)। प्रदीप में स्थान स्थान पर पतंजलि और भर्तृहरि के स्फोटवाद का अच्छा दार्शनिक विवेचन हुआ है। बाहरी कड़ियाँ कैयट एवं हरदत्तमिश्र : समासीकरण के सन्दर्भ में संस्कृत वैयाकरण"} {"instruction": "Write a python program to replace the character ‘e' with the character ‘E' for strings of length more than 5", "input": "text = \"Hello world!\"", "output": "def replace_char(text): if len(text) > 5: return text.replace('e','E') else: return text"} {"instruction": "Write a Lambda function to filter out the even numbers", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "const evenNumbers = arr => arr.filter(num => num % 2 == 0); console.log(evenNumbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]));"} {"instruction": "Create a function to calculate the binomial coefficient for two integers.", "input": "n = 5 r = 3", "output": "def binomial_coefficient(n, r): fact = 1 if r > n - r: r = n - r for i in range(r): fact *= (n) - i fact /= (i+1) return int(fact) print(binomial_coefficient(n, r))"} {"instruction": "Develop a Python program to generate a random integer from a given range", "input": "", "output": "import random\n\ndef random_int(low, high):\n return random.randint(low, high)"} {"instruction": "Using regex, replace all occurrences of 'cat' with 'dog' in the following text.", "input": "text = \"I saw a cat in the park.\"", "output": "import re text = \"I saw a cat in the park.\" result = re.sub(r'cat', 'dog', text) print(result) # Output I saw a dog in the park."} {"instruction": "Modify the given Python code to improve its performance.", "input": "def find_sum(n):\n total = 0\n for i in range(n+1):\n total += i\n return total", "output": "def find_sum(n):\n # base case\n if n == 0:\n return 0\n # recursive case\n else:\n return n + find_sum(n-1)"} {"instruction": "Write a Python program to process a dataset of words and count how many times each unique word appears.", "input": "words = ['apple', 'apple', 'banana', 'apple', 'orange', 'banana', 'pear', 'orange', 'orange']", "output": "from collections import Counter\n\nwords = ['apple', 'apple', 'banana', 'apple', 'orange', 'banana', 'pear', 'orange', 'orange']\n\nword_counts = Counter(words)\n\nfor word, count in word_counts.items():\n print(f'{word}: {count}')"} {"instruction": "Create a Java program to generate and print Fibonacci series of a given size.", "input": "Size: 8", "output": "public class FibonacciSeries { public static void main(String[] args) { int n = 8; int f1 = 0, f2 = 1; System.out.print(\"The Fibonacci series of size \"+n+\" is : \"); for (int i = 1; i <= n; i++) { System.out.print(f1 + \" \"); int next = f1 + f2; f1 = f2; f2 = next; } } }"} {"text": "[DE Wikipedia] Kader der 3. Fußball-Liga 2023/24\n\nDieser Artikel ist eine Übersicht der Kader der 3. Fußball-Liga 2023/24. Es sind alle Spieler gelistet, die im Zeitraum des ersten Ligaspiels des jeweiligen Vereins bis zum Saisonfinale dem jeweiligen Profikader durchgehend oder zeitweise angehörten. Außerdem werden die Spieler aus den Nachwuchsmannschaften aufgeführt, die mindestens einmal auf der Bank saßen und somit im Spieltagskader standen. Die Teams sind nach der Abschlusstabelle der Vorsaison sortiert. Legende Trainer: Alle Cheftrainer, die das Team während der Saison betreuten. Die Klammer gibt die Spieltage an, an denen der Trainer das Traineramt innehatte, sofern dies nicht über die gesamte Saison der Fall war. Interimstrainer werden ebenfalls berücksichtigt. Die Nationalität ist nur bei ausländischen Trainern angegeben, Kapitän: Alle Kapitäne, die während der Saison die Mannschaft mindestens ein Mal anführten. Die Nationalität ist nur bei ausländischen Kapitänen angegeben. Die Klammer gibt die Spieltage an, an denen der Spieler als Kapitän fungierte, Nr.: Rückennummer des Spielers, Nat.: Nationalität des Spielers. Bei mehrfacher Staatsangehörigkeit das Land, für das der Spieler Länderspiele absolviert hat. Spieler ohne Angabe sind deutsche bzw. Doppelstaatsbürger, die für deutsche Auswahlmannschaften spielen, Name: Vor- und Zuname bzw. der Künstlername des Spielers. Der hochgestellte Zeitraum gibt die Spieltage an, in denen der Spieler dem jeweiligen Kader angehörte, sofern dies nicht über die gesamte Spielzeit der Fall war. Zum Beispiel 1–20 für einen Spieler, der einem Kader bis zur Winterpause angehörte bzw. ab 21 für einen Spieler, der einem Kader ab der Winterpause angehörte. Bei ab stieß der Spieler während der laufenden Saison zu einem Verein und gehörte diesem bis Saisonende an, Position: Angabe der Position des Spielers, Spiele: Spiele für den jeweiligen Verein in der Saison 2023/24 ohne Relegation, Tore: Tore für den jeweiligen Verein in der Saison 2023/24 ohne Relegation, Vorlagen: Vorlagen für den jeweiligen Verein in der Saison 2023/24 ohne Relegation, wobei Vorlagen zu Eigentoren oder Strafstößen nicht berücksichtigt werden, : Gelbe Karten für den jeweiligen Verein in der Saison 2023/24 ohne Relegation, : Gelb-Rote Karten für den jeweiligen Verein in der Saison 2023/24 ohne Relegation, : Rote Karten für den jeweiligen Verein in der Saison 2023/24 ohne Relegation, Fettgedruckte Werte sind Höchstwerte der Saison, Mit II oder U19 markierte Spieler standen auch im Kader der jeweiligen zweiten oder U19-Mannschaft, mit I markierte auch im Kader der ersten Mannschaft von Borussia Dortmund sowie des SC Freiburg. Kader Arminia Bielefeld Trainer: Michél Kniat Kapitän: Fabian Klos SSV Jahn Regensburg Trainer: Kapitän: Andreas Geipl SV Sandhausen Trainer: Danny Galm (1–12), Jens Keller…"} {"instruction": "Why is algorithmic complexity important?", "input": "", "output": "Algorithmic complexity is an important measure of how efficient a program is since it tells how much time and memory a program consumes in relation to its input size. A more efficient program can be built to solve a problem faster, use fewer resources, and be more scalable."} {"instruction": "Write a Python function to find the number of pairs of integers in an array that sum up to a given number", "input": "", "output": "def count_pairs(numbers, target_sum):\n count = 0\n for i in range(len(numbers)):\n for j in range(i + 1, len(numbers)):\n if numbers[i] + numbers[j] == target_sum:\n count += 1\n return count"} {"instruction": "Using an existing loop, create code to calculate the sum of all odd numbers up to a given number.", "input": "", "output": "def sum_odd_numbers(num): result = 0 for i in range(1, num+1): if i % 2 != 0: result += i return result"} {"text": "[CS Wikipedia] Kostel svatého Jiří (Lubojaty)\n\nKostel svatého Jiří se nachází v Moravskoslezském kraji ve vsi Lubojaty, která je jednou z nejstarších historicky doložených vsí na Bílovecku. Původní kostel byl založen Budislavem z Lubojat pravděpodobně na konci 13. století. Presbytář farního kostela svatého Jiří je jednou z nejstarších staveb na Novojičínsku. Kostel je chráněn jako kulturní památka České republiky, v roce 2011 byl prohlášen kulturní památkou i nově nalezený náhrobek jednoho z členů rodu Bítovských. Historie Slezsko bylo po dlouhou dobu středověku neprostupné kvůli lesům. V oblasti došlo k osídlení až na přelomu 12. a 13. století za české kolonizace. Ves na území moravské enklávy v historickém Slezsku byla vysazena patrně ve 14. století, kdy náležela k bíloveckému statku. U Olomouce byl roku 1078 založen benediktinský klášter Hradisko, pod jehož správu spadal kostel v Pusté Polomi, jehož součástí byla i ves Lubojaty. První historickou zmínkou z roku 1276 o existenci kaple je latinská listina CDM IV, CXXXIV. Listina dokumentuje, že Budislav z Lubojat nechal postavit kapli v Lubojatech bez souhlasu hradišťského opata. Tímto činem se dotkl práv fary v Pusté Polomi a zájmů hradišťského kláštera. Architektura První písemnou zprávu o středověké kapli sv. Jiří v Lubojatech máme z roku 1276. Tomuto období, kdy byl pravděpodobně gotický kostel postaven, nasvědčuje také jádro s pravoúhlým presbytářem a hranolovou věží. Podle děkanské matriky z r. 1672 byl kostel zasvěcen sv. Jiří a patřil k panství Bílovec. Budislav z Lubojat nechal postavit malý jednolodní kostel s jednou západní věží a interiér s nezaklenutou lodí, presbytářem, odděleným lomeným vítězným obloukem a klenutým vzdutou křížovou žebrovou klenbou, a sakristií s klenutou lomenou valenou klenbou. Zvenčí byl přístupný z boční strany lodi. Kolem kostela je hřbitov obehnaný ohradní kamennou zdí, která byla přistavěna až v 16. nebo 17. století. Vzhledem k tomu, že nic ze stávající zděné stavby nenasvědčuje tomu, že by stála již ve 13. stol., docházíme k domněnce, že původní stavba byla dřevěná. Západní věž v té době kostel neměl, jak vyplývá z archeologického průzkumu, který proběhl v roce 2010. Kamenná výstavba započala presbytářem ve druhé čtvrtině 14. stol., jehož zdobí křížová klenba s dvakráte vyžlabenými klenebními žebry vynášenými kružbovými konzolami a konzolami v podobě lidských tváří. Žebra z tufinu dosedají na nízko usazené konzoly. V severozápadním koutě má konzola podobu bezvousého mladého muže s pootevřenými ústy, v severovýchodním koutě pak hlavy staršího muže s mohutným knírem. Presbytář od lodi odděluje lomený pravidelně vyklenutý vítězný oblouk. Krátký, rovně ukončený presbytář, zvenčí zpevněný opěráky, se na území Slezska objevuje již od 3. čtvrtiny 13. století. Na sever od presbytáře se nachází přiléhající…"} {"text": "[CS Wikipedia] BNP Paribas Open 2018 – mužská čtyřhra\n\nMužská čtyřhra BNP Paribas Open 2018 probíhala v první polovině března 2018. Do deblové soutěže indianwellského tenisového turnaje nastoupilo šestnáct dvojic. Obhájcem titulu byl jihoafricko-americký pár Raven Klaasen a Rajeev Ram, jehož členové nestartovali společně. Klaasen nastoupil s Australanem Michaelem Venusem, aby ve druhém kole podlehli Ramovi hrajícímu po boku Chorvata Ivana Dodiga. Ti poté skončili ve čtvrtfinále na raketách Johna Isnera s Jackem Sockem. Vítězem se stal americký nenasazený pár John Isner a Jack Sock, který ve finále zdolal americké turnajové sedmičky Boba a Mika Bryanovi po zvládnutých tiebreacích obou setů. Američtí bratři startovali na turnaji podvacáté v řadě. Oba šampioni si do žebříčku ATP připsali 1000 bodů a po triumfu na Rolex Shanghai Masters 2016 získali druhou společnou trofej. Isner vybojoval pátý deblový titul na okruhu ATP Tour, respektive třetí ze série Masters, a pro Socka to bylo jubilejní desáté takové turnajové vítězství a také třetí v sérii Masters. Isner se Sockem se stali třetí dvojicí za předešlých 30 let Indian Wells Masters, která neztratila žádný set, čímž navázali na vítěze z let 2008 a 2012. Nasazení párů Łukasz Kubot / Marcelo Melo (1. kolo) Henri Kontinen / John Peers (1. kolo) Oliver Marach / Mate Pavić (semifinále) Jamie Murray / Bruno Soares (2. kolo) Pierre-Hugues Herbert / Nicolas Mahut (2. kolo) Jean-Julien Rojer / Horia Tecău (2. kolo) Bob Bryan / Mike Bryan (finále) Ivan Dodig / Rajeev Ram (čtvrtfinále) Pavouk Finálová fáze Horní polovina Dolní polovina Odkazy Reference Externí odkazy BNP Paribas Open 2018"} {"instruction": "Reformat the following HTML code to make it better readable.", "input": "
    • Item 1
    • Item 2
    ", "output": "
    • Item 1
    • Item 2
    "} {"text": "[DE Wikipedia] Moa Kikuchi\n\nMoa Kikuchi (japanisch , Kikuchi Moa, auch als Moametal bekannt; geboren am 4. Juli 1999 in Nagoya) ist eine japanische Sängerin. Sie ist seit 2010 Sängerin und Musikerin der Kawaii-Metal-Band Babymetal. Parallel dazu gehörte sie von 2010 bis 2015 der Idol-Popgruppe Sakura Gakuin an. Außerdem war sie als Model tätig. Biografie 2007 nahm Kikuchi im Alter von acht Jahren an der Ciao Girl Audition teil und gewann unter mehr als 10.000 Teilnehmerinnen den ersten Preis. Daraufhin wurde sie von der Talentagentur Amuse unter Vertrag genommen. Als so genanntes „Ciao Girl“ war sie Exklusiv-Model für das Manga-Magazin Ciao aus dem Verlag Shōgakukan. Sie war in mehreren Werbespots für Ciao-Produkte und auch für das Happy Meal von McDonalds zu sehen. Kikuchi trat im August 2010 der von Amuse geführten Idol-Popgruppe Sakura Gakuin bei. Diese thematisiert den Schulalltag und setzt sich aus mehreren Subgruppen zusammen, die verschiedenen von Schulen organisierten Freizeitaktivitäten nachempfunden sind. Eine dieser Subgruppen war der Jūon-bu (), der „Club für harte Musik“ (bestehend aus Kikuchi, Yui Mizuno und Suzuka Nakamoto), dessen Auftritte unter den Namen Babymetal erfolgten. Daneben gehörte sie zwei weiteren Subgruppen an, Twinklestars und Mini-pati. Zusammen mit Mizuno trat sie von 2011 bis 2013 in mehreren Folgen der Kindersendung Saku saku von TV Kanagawa auf, ebenso 2012 in Werbespots für W-LAN-Dienstleistungen von Nippon Telegraph and Telephone. Das Management von Amuse beschloss 2013, Babymetal wegen des unerwartet großen Erfolgs als eigenständiges Projekt weiterzuführen. Kikuchi blieb zwei Jahre lang parallel dazu auch Mitglied von Sakura Gakuin. Von April 2014 bis zu ihrem Austritt im März 2015 war sie als so genannte „Schülersprecherin“ die Leaderin der Gruppe. Bis zu Mizunos Austritt im Jahr 2018 bildete Kikuchi mit ihr zusammen die Subgruppe „Black Babymetal“ innerhalb von Babymetal, die im Duett sang, wenn Nakamoto nicht auf der Bühne stand. Kikuchi ist Co-Autorin von Song 4 (, Yon no uta) auf dem Debütalbum Babymetal; das Lied handelt von dem in Asien weit verbreiteten Aberglauben um die Zahl 4. In seltenen Fällen tritt sie bei Konzerten auch mit E-Gitarre auf – beispielsweise bei den Alternative Press Music Awards 2016, als Babymetal zusammen mit Rob Halford das Lied Breaking the Law von Judas Priest spielte. Diskografie Mit Sakura Gakuin Sakura Gakuin 2010 Nendo: Message (2011) Sakura Gakuin 2011 Nendo: Friends (2012) Sakura Gakuin 2012 Nendo: My Generation (2013) Sakura Gakuin 2013 Nendo: Kizuna (2014) Sakura Gakuin 2014 Nendo: Kimi ni Todoke (2015) Mit Babymetal Babymetal (2014) Metal Resistance (2016) Metal Galaxy (2019) The Other One (2023) Weblinks Einzelnachweise Metal-Sänger Popsänger Japanisches Idol Model Babymetal Japaner Geboren 1999…"} {"instruction": "Write code to parse a given IP address into its octets.", "input": "IP address: 10.23.6.17", "output": "def parse_ip_address(ip): octets = ip.split(\".\") return octets"} {"instruction": "Write a Python function to input a list of integers and a number and output the number of times that number appears in the list.", "input": "[1, 2, 3, 4, 5, 2, 6], 2", "output": "def count_occurrences(numbers, n):\n count = 0\n for num in numbers:\n if num == n:\n count += 1\n return count"} {"instruction": "Develop a code to identify the most commonly used words in a given text.", "input": "The quick brown fox jumps over the lazy dog", "output": "from collections import Counter def most_common_words(text): words = text.split() counter = Counter(words) high_occur = counter.most_common(3) return high_occur if __name__ == \"__main__\": text = \"The quick brown fox jumps over the lazy dog\" most_common_words(text)"} {"instruction": "Create a Python program to generate all combinations of 3 elements from an array.", "input": "array = [1, 2, 3, 4]", "output": "def comb3(arr):\n result = []\n for i in range(len(arr)):\n for j in range(i+1, len(arr)):\n for k in range(j+1, len(arr)):\n t = [arr[i],arr[j],arr[k]]\n result.append(t)\n return result"} {"instruction": "Write a Java program that displays the area of a triangle, given the three sides.", "input": "3, 4, 5", "output": "public class TriangleArea { public static void main(String[] args) { int a = 3; int b = 4; int c = 5; // calculate the semi-perimeter double s = (a + b + c) / 2; // calculate the area double area = Math.sqrt(s * (s - a) * (s - b) * (s - c)); // display the result System.out.println(\"The area of the triangle: \" + area); } }"} {"instruction": "Create a Python program that takes a list of numbers as input and outputs the sum of all numbers in the list.", "input": "list_of_numbers = [1,2,3,4,5]", "output": "# Sum of a list of numbers\n\n# Defining the function\ndef sum_list(input_list): \n \n # initializing sum to 0 \n total = 0\n \n # Iterating over the list \n for num in input_list: \n total += num \n \n # Returning the total value \n return total \n \n# Driver code \nlist_of_numbers = [1,2,3,4,5]\nresult = sum_list(list_of_numbers)\n\nprint(\"Sum of the list =\", result)"} {"text": "[HI Wikipedia] यूरोपीय दक्षिणी वेधशाला\n\nयूरोपीय दक्षिणी वेधशाला (European Southern Observatory (ESO)), खगोल विज्ञान के लिए एक पंद्रह देशों का एक अंतर सरकारी अनुसंधान संगठन है। सदस्य देश गैलेरी यह तस्वीरें ESO सूची की शीर्ष-100 से है। इतिहास सारे विडियो अंग्रेजी भाषा में है। खगोलशास्त्र वेधशाला यूरोपीय संघ चिली में खगोलीय वेधशालाएँ"} {"instruction": "Create a function to count how many vowels are in a given string.", "input": "", "output": "def count_vowels(string): vowels = \"aeiou\" count = 0 for char in string: if char in vowels: count += 1 return count"} {"instruction": "Optimize the following code snippet to reduce processing time as much as possible.", "input": "arr = [13, 18, 25, 1, 7, 23, 12]\n\ntime_start = time.time()\nfor i in range(0, len(arr)):\n for j in range(i + 1, len(arr)):\n if arr[i] > arr[j]:\n temp = arr[i]\n arr[i] = arr[j]\n arr[j] = temp\n\ntime_end = time.time()\nprint(f'Time taken: {time_end - time_start} seconds')", "output": "#Python code\n\narr = [13, 18, 25, 1, 7, 23, 12]\n\ntime_start = time.time()\n# Optimized code\narr.sort()\n\ntime_end = time.time()\nprint(f'Time taken: {time_end - time_start} seconds')"} {"instruction": "Modify the following code to prevent SQL injection attacks.", "input": "query = \"SELECT * FROM users WHERE username = '\" + username + \"'\"", "output": "import MySQLdb query = \"SELECT * FROM users WHERE username = %s\" db = MySQLdb.connect(host=\"localhost\", user=\"user\", passwd=\"pass\", db=\"mydb\") cur = db.cursor() cur.execute(query, (username,))"} {"instruction": "How to create a loop in Python which will iterate over a list?", "input": "", "output": "#Iterate over a list list = [1, 2, 3, 4, 5] for item in list: print(item)"} {"instruction": "Using HTML and CSS, create an input form with fields for name and address", "input": "", "output": "




    "} {"text": "[CS Wikipedia] Klasická mechanika\n\nKlasická mechanika je mechanika, zabývající se mechanickými jevy makroskopických těles, která se pohybují rychlostí zanedbatelnou vzhledem k rychlosti světla. S takovými jevy se člověk běžně kolem sebe setkává, proto byla většina mechanických jevů zkoumána již ve starověku (Archimédés, Hérón). Na samém konci středověku pak začaly znovu být poznatky upřesňovány a dále rozšiřovány (Galileo Galilei, Blaise Pascal). Vyvrcholením bylo dílo Isaaca Newtona, který postuloval zákony klasické mechaniky (Newtonovy pohybové zákony), přetrvávající až do konce 19. století. Proto bývá klasická mechanika často označována jako Newtonova mechanika, jde-li o doslovnou citaci Newtona, nebo newtonovská mechanika, jde-li o mechaniku v duchu Newtonově, případně však dále rozvinutou. Ke konci 19. století byly při pokusech sloužících k určení rychlosti světla zjištěny rozpory se stávající Newtonovou teorií. Tyto rozpory se podařilo odstranit Albertu Einsteinovi formulací teorie relativity. Relativistická fyzika je založena na obdobných principech jako newtonovská mechanika, proto bývá takto vzniklá relativistická mechanika dnes považována za součást klasické mechaniky. Někdy se v této souvislosti také hovoří o klasické relativistické mechanice, čímž se zdůrazňuje rozdíl od kvantové relativistické mechaniky. Max Planck našel ke konci 19. století řešení problému označovaného jako ultrafialová katastrofa. Jeho řešení vedlo ke změně chápání fyzikálních principů, jejichž důsledkem byl vznik kvantové mechaniky, která se zabývá především mikroskopickými tělesy. Jako klasická mechanika bývá primárně označována mechanika Newtonova (tedy mechanika pomalu se pohybujících makroskopických těles). Pokud je třeba rozlišovat pouze mezi principy, na nichž je založena kvantová mechanika, a principy, na nichž je založena Newtonova a Einsteinova teorie, pak je klasická mechanika společným označením pro Newtonovu i relativistickou mechaniku (jedná se tedy o společné označení pro pohyb makroskopických těles). Klasická mechanika se tedy zaměřuje na mechaniku makrosvěta, zatímco kvantová mechanika se zaměřuje na fyziku mikrosvěta. Externí odkazy Mechanika"} {"instruction": "Generate a random 3-digit number without using any in-built methods", "input": "", "output": "// Generate a random 3-digit number let num = Math.floor(Math.random() * (999 - 100 + 1) + 100);"} {"instruction": "Write a Python snippet to print the difference between the largest and smallest values in a given array.", "input": "[1,2,3,4,5]", "output": "def diff_max_min(numbers):\n return max(numbers) - min(numbers)\n \nif __name__ == '__main__':\n nums = [1,2,3,4,5]\n diff = diff_max_min(nums)\n print(diff)"} {"instruction": "Create a python program that determines the grade of a student based on the marks they received in their exams.", "input": "marks = {\n 'math': 90,\n 'history': 80,\n 'english': 75\n}", "output": "def determine_grade(marks):\n # Determine the average mark\n avg = (marks['math'] + marks['history'] + marks['english'])/3\n \n # If the average mark is greater than or equal to 90, the student's grade is A \n if avg >= 90:\n return 'A'\n # If the average mark is greater than or equal to 80, the student's grade is B \n elif avg >= 80:\n return 'B'\n # If the average mark is greater than or equal to 70, the student's grade is C \n elif avg >= 70:\n return 'C'\n # If the average mark is greater than or equal to 60, the student's grade is D \n elif avg >= 60:\n return 'D'\n # Anything less than 60 is an F \n else:\n return 'F'"} {"text": "[HI Wikipedia] धानी (धानीप्राणी)\n\nधानी या पाउच (pouch) मादा धानीप्राणियों (मारसूपियलों) के शरीर पर खाल मोड़कर बनी हुई एक विशेष थैली होती है। धानिप्राणी गर्भ धारण करने के बाद अन्य स्तनधारियों की तुलना में बहुत कम समय के लिए गर्भावस्था में रहते हैं। उनका शिशु जल्द ही पैदा हो जाता है और बहुत ही अविकसित अवस्था में होता है। वह फिर धानी में जाता है जहाँ वह सुरक्षित रहता है। उसकी माता के स्तन भी इसी धानी में होते हैं और वहाँ यह दूध प्राप्त करके विकसित होता है। कंगारू जैसे धानीप्राणियों के नवजात शिशु कई हफ़्तों या महीनों तक धानी में रहकर विकसित होते हैं और बाहर निलकने के बाद भी कुछ अरसे तक रक्षा, आहार और माता के साथ जगह-से-जगह जाने के लिए इसमें चले जाते हैं। कुछ तथ्य अलग-अलग धानीप्राणी जातियों की धानियों का अकार भी अलग होता है। कंगारुओं में धानी ऊपर की तरफ़ से खुली होती है जबकि चारों पाऊँ पर चलने वाले कुत्ते-नुमा तास्मानियाई डेविल​ की धानी पीछे की तरफ़ खुली होती है जिस से नवजात शिशु को पैदा होते ही उसमें चले जाने में आसानी होती है। कंगारुओं की धानी अन्दर से चिपचिपी होती है ताकि उन के छलांगे लगते हुए दौड़ने के समय भी शिशु अन्दर टिका रहे। कुछ बहुत ही कम ऐसे भी जातियाँ हैं जिनमें नर में भी धानी होती है, जैसे कि जल ओपॉस्सम और थाएलासीन​। यह बात भी ध्यान देने योग्य है कि अनुवांशिक (जेनेटिक) और जीववैज्ञानिक दृष्टि से 'धानीप्राणी' की श्रेणी में आने वाले सभी जानवरों में धानी नहीं होती। इन्हें भी देखें धानीप्राणी सन्दर्भ धानीप्राणी"} {"text": "[EN Wikipedia] Sugarloaf Point Light\n\nSugarloaf Point Light, also known as Seal Rocks Lighthouse, is an active lighthouse located on Sugarloaf Point, a point about southeast of Seal Rocks, Mid-Coast Council, New South Wales, Australia. It guards Seal Rocks, a treacherous rock formation to the south. It is the first lighthouse designed by James Barnet, and built from 1874 to 1875 by John McLeod. It is also one of only two towers in Australia with an external stairway. It is also known as Sugarloaf Point Lightstation Group, Seal Rocks Lightstation Complex and Sugarloaf Point Lighthouse. The property is owned by National Parks and Wildlife Service. It was added to the Commonwealth Heritage List on 22 June 2004; on the New South Wales State Heritage Register on 22 February 2019; and on the (now defunct) Register of the National Estate on 10 April 1989. The light is operated by the Australian Maritime Safety Authority, while the structures are maintained and operated by the Land and Property Management Authority. Sugarloaf Point is part of Myall Lakes National Park, managed by the National Parks and Wildlife Service. An unpaved road leads to the location and parking is provided. Although the tower is closed to the public, a nearby lookout provides good views. History Early history The Seal Rocks and Myall Lakes area is traditionally the land of the Worimi people whose territory stretches from Maitland and the Hunter River in the south; Forster-Tuncurry in the north; and Gloucester to the west. Evidence of the areas occupation by the Worimi people can be seen in the scarred trees, campsites, burial grounds, middens and rock engravings of the region. As with most Aboriginal groups in Australia prior to European colonisation, the Worimi people lived a traditional hunter-gatherer lifestyle that utilised the natural resources available in their environment and, being coastal people, the Worimi sought much of their food and resources from the ocean. The coastal environment also provided meeting places for the Worimi people and various sites in the region (both on land and water) are considered to be of mythological and spiritual importance. European exploration into the Myall Lakes region commenced in the early 19th century and various industries were established with varying degrees of success. By the mid-19th century, shipping traffic along the Seal Rocks coastline was increasing rapidly and the potential hazards presented by the rocky outcrops of Sugarloaf Point and Seal Rocks were quickly realised. More generally, the entire NSW coastline had become regarded as dangerous to the shipping industry of the colony and, although the first lighthouse had been constructed at South Head in 1818, it was some 40 years before a systematic approach to the installation of coastal lighthouses was considered.…"} {"instruction": "Compare and contrast the differences between sets and lists in Python.", "input": "", "output": "A set is an unordered collection of items while a list is an ordered collection of items. Sets have no duplicate elements so all the elements in a set must be unique. The elements inside a list may or may not be unique. Sets are faster when compared to lists for retrieving elements since lookups of items don't require continuous search whereas lists need linear search. The sets built-in functions such as union, intersection give us a quick way of performing mathematical set operations. The elements of set are unchangeable and once you create a set the element in the set remain the same. But, items in a list can be modified."} {"instruction": "Create an algorithmic trading program using Python that executes buy/sell orders when certain criteria are met.", "input": "Not applicable", "output": "import pandas as pd\nimport numpy as np\n\n# Set up the trading parameters\nbuy_threshold = 0.1\nsell_threshold = 0.1\n\n# Load the dataset\ndf = pd.read_csv('stock_data.csv', index_col=0)\n\n# Set up a \"buy\" flag and a \"sell\" flag\ndf['buy'] = np.where(df.Close > (df.Open * (1 + buy_threshold)), 1, 0)\ndf['sell'] = np.where(df.Close < (df.Open * (1 - sell_threshold)), 1, 0)\n\n# Loop through the dataset and execute buy/sell orders\nfor i in range(len(df)):\n if df.buy[i] == 1:\n print('Executing buy order')\n if df.sell[i] == 1:\n print('Executing sell order')"} {"instruction": "Suggest a MySQL query that retrieves all students from the \"Idaho\" state.", "input": "", "output": "SELECT * FROM students WHERE state = 'Idaho';"} {"instruction": "Select the appropriate language to implement a linked list data structure.", "input": "", "output": "C++ is the best language to implement a linked list data structure as it provides features like dynamic memory allocation, pointers and templates which make it easier to create a linked list."} {"instruction": "Write a python program to convert a time string \"hh:mm:ss\" into total number of seconds", "input": "time = \"08:11:15\"", "output": "time_in_secs = 8 * 3600 + 11 * 60 + 15"} {"instruction": "Write a Python script to generate a random 3 X 3 matrix of integers in the range [1, 9].", "input": "Not applicable", "output": "import random\n\n# Generate a random 3 X 3 matrix of integers in the range [1, 9].\nmatrix = [[random.randint(1, 9) for _ in range(3)] for _ in range(3)]\n\nfor row in matrix:\n print(row)"} {"instruction": "Find all prime numbers up to a given number.", "input": "", "output": "def list_primes(n): primes = [] for num in range(2, n+1): prime=True for i in range(2, int(num/2)+1): if num%i == 0: prime=False if prime: primes.append(num) return primes"} {"instruction": "Implement a linear regression model in Python to predict the target value given features.", "input": "", "output": "# import necessary libraries\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LinearRegression\n\n# load the dataset\ndf = pd.read_csv('data.csv')\n\n# separate the data into features (X) and target (y)\nX = df.drop('target', axis=1).values\ny = df['target'].values\n\n# split the data into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\n\n# train the model\nregressor = LinearRegression() \nregressor.fit(X_train, y_train)\n\n# evaluate the model\nscore = regressor.score(X_test, y_test)\nprint('Model accuracy on test set: ', score)"} {"instruction": "Generate code for a decision tree with entropy metric to classify the species of mushrooms.", "input": "No Input", "output": "import numpy as np\nfrom sklearn.tree import DecisionTreeClassifier\n\n# Load the dataset\nX = np.array([[...],[...], ....])\ny = np.array(['A', 'B', 'C', ...])\n\n# Create a decision tree model\nmodel = DecisionTreeClassifier(criterion=\"entropy\")\n\n# Fit the model using the data\nmodel.fit(X, y)\n\n# Generate the prediction code\nfrom sklearn.externals.six import StringIO\nfrom IPython.display import Image\nfrom sklearn.tree import export_graphviz\nimport pydotplus\n\ndot_data = StringIO()\nexport_graphviz(model, out_file=dot_data, filled=True, rounded=True, special_characters=True)\ngraph = pydotplus.graph_from_dot_data(dot_data.getvalue())\nImage(graph.create_png())"} {"instruction": "Describe an algorithm for sorting an array of n integers in O(n log n) time.", "input": "", "output": "A sorting algorithm applicable to an array of n integers in O(n log n) time is Merge Sort. Its procedure first divides the input array into two halves until there are no more divisions are possible. This is the \"divide and conquer\" step of the algorithm. Then, each pair of divided arrays is sorted and merged into a single, sorted array. This is the \"combine\" step of the sorting algorithm. Finally, the sorted sub-arrays are combined in an organized manner to obtain the final sorted array. This algorithm is considered to be efficient, as it runs in O(n log n) time, where n is the number of elements in the array."} {"instruction": "Write a function to remove all whitespace characters from a given string.", "input": "myString = \"Hello World \"", "output": "def remove_whitespaces(myString): return ''.join(myString.split()) myString = \"Hello World \" print(remove_whitespaces(myString))"} {"instruction": "Which data structure is most suitable for storing a large list of numbers?", "input": "", "output": "Heap or binary tree. A heap or binary tree data structure are most suitable for storing a large list of numbers as it provides O(log n) time complexity for insertion, search and deletion."} {"text": "[EN Wikipedia] Agreia\n\nAgreia is a genus in the phylum Actinomycetota (Bacteria). Etymology The generic name Agreia honours Nina S. Agre, a Russian microbiologist. Species The genus contains two species: A. bicolorata Evtushenko et al. 2001, type species of the genus; Latin bis, twice; coloratus, coloured; to give bicolorata, two-coloured.) A. pratensis (Behrendt et al. 2002) Schumann et al. 2003; Latin pratensis, found in meadows/grassland] See also Bacterial taxonomy Microbiology References Bacteria genera Microbacteriaceae"} {"text": "[HI Wikipedia] विद्युत-चुम्बकीय-दुर्बल अन्योन्य क्रिया\n\nकण भौतिकी में विद्युत-चुम्बकीय-दुर्बल अन्योन्य क्रिया प्रकृति की चार मूलभूत अन्योन्य क्रियाओं में से दो विद्युत-चुम्बकीय अन्योन्य क्रिया और दुर्बल अन्योन्य क्रिया का एकीकृत रूप है। यद्यपि ये दोनों बल निम्न ऊर्जा क्षेत्र में बहुत अलग दिखाई देते हैं, सैद्धान्तिक रूप से इन भिन्न छवि के दो बलों की एक बल के रूप में प्रतिकृती करते हैं। एकीकरण पैमाने से उपर, 100 GeV कोटि पर, वो एक बल में परिणीत हो जाते हैं। मूलभूत कणों में विद्युत-चुम्बकीय व दुर्बल अन्योन्य क्रियाओं के एकीकरण में सहयोग के लिए सन् १९७९ में अब्दुस सलाम, शेल्डन ग्लास्हौ और स्टीवन वाईनबर्ग को भौतिकी में नोबेल पुरस्कार से सम्मानित किया गया। विद्युत-चुम्बकीय-दुर्बल अन्योन्य क्रिया के अस्तित्व को प्रायोगिक रूप से दो स्तरों में प्रमाणित किया गया, प्रथम ई.सन् १९७३ में Gargamelle सहयोग द्वारा न्यूट्रिनो प्रकिर्णन द्वारा उदासीन धारा की खोज और द्वितीय १९८३ में यूए१ व यूए२ प्रयोगो ने सुपर प्रोटॉन सिंक्रोट्रॉन से प्राप्त प्रोटॉन प्रति-प्रोटॉन कीरण पूँज की टक्कर में W और Z आमान बोसोनों की का आविष्कार। सूत्रिकरण गणित में, एकीकरण, आमान समूह SU(2) × U(1) में पूरा किया जता है। इसके अनुरूप आमान बोसॉन SU(2) से दुर्बल समभारिक प्रचक्रण के तीन W बोसॉन (, और ) और U(1) से दुर्बल हायपर आवेश से B0, ये सभी द्रव्यमान रहित हैं। मानक प्रतिमान में और बोसॉन और फोटोन, हिग्स प्रक्रिया के कारण SU(2) × U(1)Y से U(1)em में विद्युत-चुम्बकीय-दुर्बल''' सममिति के स्वतः सममिति विघटन से उत्पन्न हुए। (हिग्स बोसॉन भी देखें) U(1)Y और U(1)em, U(1) की विभिन्न प्रतियाँ हैं।; U(1)em का जनक Q = Y/2 + I3 से दिया जाता है, जहां Y, U(1)Y का जनक है (जिसे हायपर आवेश कहा जाता है।) और I3, SU''(2) के जनकों में से एक है (दुर्बल समभारिक प्रचक्रण का एक घटक)। लाग्रांजियन विद्युत-चुम्बकीय-दुर्बल सममिति विघटन से पहले विद्युत-चुम्बकीय-दुर्बल अन्योन्य क्रियाओं के लिए लाग्रांजियन को विद्युत-चुम्बकीय-दुर्बल सममिति विघटन से पहले चार भागों में विभक्त किया जाता है : विद्युत-चुम्बकीय-दुर्बल सममिति विघटन के पश्चात ये भी देखें मूलभूत बल मानक प्रतिमान का गणितीय विश्लेषण वाईनबर्ग कोण एकिक आमान सन्दर्भ सामान्य पाठक Conveys much of the Standard Model with no formal mathematics. Very thorough on the weak interaction. विषय लेख कण भौतिकी"} {"instruction": "Create a program in Python to print the following output.", "input": "string = \"programming\"", "output": "str = \"programming\"\nprint(str[::-1])\n\nOutput: gnimmargorp"} {"instruction": "Write a code snippet to add two numbers provided in two lists.", "input": "list1 = [2, 4, 3] list2 = [5, 6, 4]", "output": "new_list = [] for i in range(len(list1)): new_list.append(list1[i] + list2[i]) print(new_list) # Output: [7, 10, 7]"} {"instruction": "Write a Python program to generate 10 random numbers and put them in a list.", "input": "", "output": "import random\n\nrandom_list = []\nfor i in range(10):\n number = random.randint(1, 100)\n random_list.append(number)"} {"instruction": "Create a class in C++ representing a 2D vector which has components (x, y).", "input": "", "output": "class Vector2D { private: int x; int y; public: Vector2D(int x, int y); int GetX() { return x; } int GetY() { return y; } void SetX(int newX) { x = newX; } void SetY(int newY) { y = newY; } }; Vector2D::Vector2D(int x, int y) { this->x = x; this->y = y; }"} {"text": "[DE Wikipedia] Staustufe Apach\n\nDie Staustufe Apach (franz.: Écluse d'Apach oder auch Écluse d'Apach-Schengen) mit der Schleuse Apach, dem Wehr Schengen-Apach und dem Kraftwerk Schengen–Apach an der Mosel wurde bis 1964 fertig gestellt und liegt auf französischem, luxemburgischem und deutschem Hoheitsgebiet nahe der französischen Gemeinde Apach (), direkt am Dreiländereck Deutschland – Luxemburg – Frankreich. Die Staustufe Apach ist von der Mündung der Mosel bei Koblenz gezählt die 13. Staustufe mit dem 13. Kraftwerk an diesem Gewässer. Die Schleuse wurde nach einem Pionier der Moselschifffahrt, Pierre Ricard (1899–1956) benannt. Sein Name und Relief schmücken den Schleusenturm. Geschichte Als erste Staustufe wurde die Mosel-Staustufe Koblenz 1941 begonnen. Bedingt durch den Zweiten Weltkrieg wurde das Bauprojekt 1944 eingestellt. Von 1948 bis 1951 wurde der Bau der Staustufe Koblenz unter Leitung der französischen Besatzungsmacht vollendet. Im Zuge der weiteren Moselkanalisierung von 1958 bis 1964 wurde die Mosel von Koblenz bis Metz schiffbar gemacht und auch die Staustufe Apach verwirklicht. Zwischen 2000 und 2006 wurde das Wehr von Gestion centralisée et coordonnée des barrages automatisiert. 2008 wurde festgestellt, dass der Klappschieber eines Wehres nicht mehr voll funktionsfähig war. Er wurde vorerst außer Betrieb genommen. 2009 erfolgten weitere Überprüfungen und Reparaturen. Die Entwicklung des Gütertransportverkehrs weist steigende Tendenzen auf. In den acht Jahren zwischen 1993 und 2001 stieg der Gütertransport um mehr als 25 % an. Der Großteil der Fracht wird von niederländischen und belgischen Schiffen transportiert, unter 10 % von deutschen Schiffen, weniger als 1 % von französischen bzw. luxemburgischen Schiffen. Staustufen Ab etwa Höhe der Schleusentore der Schleuse Apach beginnt auf eine Länge von rund 36,5 km der Mosel bis Wasserbillig/ Wasserbilligerbrück ein gemeinsames Hoheitsgebiet von Deutschland und Luxemburg (Mosel-Kondominium). Wenige Meter unterhalb der Staustufe Apach befindet sich die 1958 erbaute Moselbrücke Schengen (Schengen ↔ Perl / N10 ↔ B 407). Technische Daten Schleuse Die Schiffsschleuse der Staustufe liegt am französischen Ufer bei Apach auf französischem Hoheitsgebiet. Es ist eine Schleuse mit einer rechteckigen Schleusenkammer mit einer nutzbaren Länge von 172 Metern und einer Breite von 12 Metern. Die Fallhöhe beträgt im Mittel 4,40 Meter. Die Schleuse können Schiffe mit einer Breite bis 11,40 Meter passieren. Die Schleuse ist vom Wehr durch eine etwa 400 m lange und 70 m breite Insel getrennt, die fast ganz auf französischem Hoheitsgebiet liegt. Lediglich der unterste flussabwärts liegende Zipfel der Insel ist im Bereich des deutsch-luxemburgischen Kondominiums. Wehr Das an die Insel anschließende Wehr, das teilweise auf luxemburgischem,…"} {"text": "[EN Wikipedia] 1954–55 Norwegian 1. Divisjon season\n\nThe 1954–55 Norwegian 1. Divisjon season was the 16th season of ice hockey in Norway. Seven teams participated in the league, and Gamlebyen won the championship. Regular season External links Season on eliteprospects.com Nor Eliteserien (ice hockey) seasons 1954 in Norwegian sport 1955 in Norwegian sport"} {"instruction": "Suggest a function to find the second highest element in a list.", "input": "[10, 20, 30, 40]", "output": "def second_highest(List): List.sort() return List[-2] List = [10, 20, 30, 40] print(second_highest(List))"} {"text": "[EN Wikipedia] Ada Lovelace\n\nAugusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852) was an English mathematician and writer, chiefly known for her work on Charles Babbage's proposed mechanical general-purpose computer, the Analytical Engine. She was the first to recognise that the machine had applications beyond pure calculation. Ada Byron was the only legitimate child of poet Lord Byron and reformer Lady Byron. All Lovelace's half-siblings, Lord Byron's other children, were born out of wedlock to other women. Byron separated from his wife a month after Ada was born and left England forever. He died in Greece when Ada was eight. Her mother remained bitter and promoted Ada's interest in mathematics and logic in an effort to prevent her from developing her father's perceived insanity. Despite this, Ada remained interested in him, naming her two sons Byron and Gordon. Upon her death, she was buried next to him at her request. Although often ill in her childhood, Ada pursued her studies assiduously. She married William King in 1835. King was made Earl of Lovelace in 1838, Ada thereby becoming Countess of Lovelace. Her educational and social exploits brought her into contact with scientists such as Andrew Crosse, Charles Babbage, Sir David Brewster, Charles Wheatstone, Michael Faraday, and the author Charles Dickens, contacts which she used to further her education. Ada described her approach as \"poetical science\" and herself as an \"Analyst (& Metaphysician)\". When she was eighteen, her mathematical talents led her to a long working relationship and friendship with fellow British mathematician Charles Babbage, who is known as \"the father of computers\". She was in particular interested in Babbage's work on the Analytical Engine. Lovelace first met him in June 1833, through their mutual friend, and her private tutor, Mary Somerville. Between 1842 and 1843, Ada translated an article by the military engineer Luigi Menabrea (later Prime Minister of Italy) about the Analytical Engine, supplementing it with an elaborate set of seven notes, simply called \"Notes\". Lovelace's notes are important in the early history of computers, especially since the seventh one contained what many consider to be the first computer program—that is, an algorithm designed to be carried out by a machine. Other historians reject this perspective and point out that Babbage's personal notes from the years 1836/1837 contain the first programs for the engine. She also developed a vision of the capability of computers to go beyond mere calculating or number-crunching, while many others, including Babbage himself, focused only on those capabilities. Her mindset of \"poetical science\" led her to ask questions about the Analytical Engine (as shown in her notes) examining how individuals…"} {"instruction": "Write a Python code to generate Fibonacci sequence up to 'n' numbers, where 'n' is a given integer.", "input": "", "output": "def generateFib(n): fib = [0, 1] while len(fib) < n : fib.append(fib[-1] + fib[-2]) return fib[:n]"} {"instruction": "Answer what is the longest palindrome in a given string.", "input": "\"Run, spot, run. He ran up red hills\"", "output": "def longestPalindrome(st): palindromes = [] for i in range(len(st)): for j in range(i, len(st)): curr = st[i:j+1] rev = curr[::-1] if (curr == rev): palindromes.append(curr) res = max(palindromes, key = len) return res print(longestPalindrome(\"Run, spot, run. He ran up red hills\")) # output run"} {"instruction": "Write a Java code snippet to set the 3rd element in an array of integers to the value 5.", "input": "int[] arr = {1, 2, 3, 4, 5};", "output": "arr[2] = 5;"} {"text": "[DE Wikipedia] Dennis Polonich\n\nDennis Daniel Polonich (* 4. Dezember 1953 in Foam Lake, Saskatchewan) ist ein ehemaliger kanadischer Eishockeyspieler, -trainer und -funktionär, der im Verlauf seiner aktiven Karriere zwischen 1971 und 1987 unter anderem 397 Spiele für die Detroit Red Wings in der National Hockey League (NHL) auf der Position des Centers bestritten hat. Polonich, der in der Saison 1976/77 als Mannschaftskapitän der Detroit Red Wings fungierte, war der erste Spieler der NHL-Geschichte, dem ein Recht auf Schadenersatz durch eine zivilrechtliche Klage nach einem Vorfall während eines NHL-Spiels zugesprochen wurde. Seine größten Karriereerfolge feierte er jedoch in den Minor Leagues mit dem Gewinn des Calder Cups der American Hockey League (AHL) in Diensten der Adirondack Red Wings im Jahr 1981 sowie des Turner Cups der International Hockey League (IHL) mit den Muskegon Lumberjacks fünf Jahre später. Karriere Polonich verbrachte seine Juniorenzeit zwischen 1971 und 1973 in der Western Canada Hockey League (WCHL), wo der Stürmer für die Flin Flon Bombers auflief. Der kleingewachsene Mittelstürmer absolvierte in dem zweijährigen Zeitraum 147 Spiele für die Bombers und sammelte dabei 111 Scorerpunkte. Trotz seiner geringen Körpergröße, aber vor allem wegen seiner Qualitäten als Enforcer wurde er schließlich im NHL Amateur Draft 1973 in der achten Runde an 118. Position von den Detroit Red Wings aus der National Hockey League (NHL) ausgewählt. Zur Spielzeit 1973/74 wechselte der gerade einmal 19-Jährige in die Organisation der Detroit Red Wings, wurde jedoch auf Wunsch des damaligen Franchise-Besitzers Bruce Norris nach England zu den London Lions ausgeliehen. Für das unabhängige Team, das im Verlauf der Saison gegen zahlreiche europäische Spitzenteams antrat, absolvierte Polonich 67 Begegnungen und sammelte dabei 60 Punkte. Daraufhin wurde er zur Saison 1974/75 wieder nach Nordamerika geholt und empfahl sich schließlich über das Farmteam Virginia Wings aus der American Hockey League (AHL) für einen Stammplatz im NHL-Kader Detroits im folgenden Spieljahr. Bei den Red Wings gehörte der Angreifer in den folgenden fünf Jahren zum Stammpersonal und fungierte dabei zwischen Februar 1977 und dem Ende der Spielzeit 1976/77 als Mannschaftskapitän des Teams. Im Verlauf der Saison 1980/81 waren Polonichs Qualitäten als sogenannte Pest nicht mehr sonderlich gefragt und er wurde schließlich in die AHL zu den Adirondack Red Wings abgeschoben. Bei den Adirondack Red Wings verbrachte der Center den Großteil der folgenden viereinhalb Spielzeiten. In dieser Zeit gewann er im Frühjahr 1981 mit dem Team den Calder Cup der AHL. Für Detroit selbst lief er bis zum Sommer 1985 nur noch elfmal auf. Alle Spiele bestritt er in der Saison 1982/83. Zur Spielzeit 1985/86 verließ Polonich die…"} {"instruction": "Using the list of strings, create a new list without any vowels.", "input": "strings = ['apple', 'ball', 'cat']", "output": "def remove_vowels(strings): vowels = ['a', 'e', 'i', 'o', 'u'] new_strings = [] for string in strings: new_strings.append(''.join([char for char in string if char.lower() not in vowels])) return new_strings"} {"text": "[HI Wikipedia] मिस्र के मुहाफ़ज़ात\n\nमिस्र के २७ बड़े प्रशासनिक क्षेत्रीय विभाग हैं जिन्हें मुहाफ़ज़ाह (बहुवचन - मुहाफ़ज़ात) कहते हैं, यानि किसी राज्यपाल (मुहाफ़िज़) की हिफ़ाज़त या निगरानी में रखा गया क्षेत्र। इनका दर्जा लगभग भारत के प्रान्तों जैसा है। मिस्र के मुहाफ़ज़ात या तो शहरी होते हैं या फिर शहरी-देहाती का मिश्रण होते हैं। मराकज़ शहरी-देहाती मिश्रित मुहाफ़ज़ात को 'मरकज़' (बहुवचन - मराकज़) नाम के क्षेत्रों में बांटा जाता है। यह वही शब्द है जिसका मतलब हिन्दी-उर्दु में 'केन्द्र' होता है लेकिन मिस्र की अरबी उपभाषा में इसका अर्थ 'गाँवों का समूह' है। पूर्ण रूप से शहरी मुहाफ़ज़ात में गाँव नहीं होते इसलिए उन्हें मराकज़ में भी नहीं बाँटा जाता। तालिका २०११-२०१२ काल में मिस्र के मुहाफ़ज़ात का ब्योरा कुछ इस प्रकार है: इन्हें भी देखें मुहाफ़ज़ाह ओमान के मुहाफ़ज़ात सन्दर्भ मिस्र के मुहाफ़ज़ात मिस्र"} {"instruction": "How can you test a user-defined function with the name \"sum\" in JavaScript?", "input": "", "output": "function sumTest(){ let expectedResult = 15; let actualResult = sum(5, 10); if(expectedResult === actualResult){ console.log(\"sum test passed\"); } else{ console.log(\"sum test failed\"); } } sumTest();"} {"instruction": "This code is a Python script that checks disk usage recursively. To use it, you need to run the script with the following arguments: \n\n-b/--base: the base directory to monitor. For example, if you want to monitor only volumes mounted under /host/ (Default: /).\n\n-e/--excludes: a list of mount points to exclude recursively, for example, /var/lib will exclude /var/lib*.\n\n-w/--warning: the warning value (Default: 85).\n\n-c/--critical: the critical value (Default: 95).\n\n-v/--version: prints the script version.\n\nThe script will output the disk usage status and exit with a status code indicating the state of the disk usage.", "input": "", "output": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author: Florian Lambert \n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\n#\n# Requirments: python\n#\n\nimport sys\nimport argparse\nimport subprocess\n\nVERSION = '1.1'\n\nSTATE_TEXT = ['Ok', 'Warning', 'Critical', 'Unknow']\n\n\nPARSER = argparse.ArgumentParser(description='Disk check recurcive')\nPARSER.add_argument(\"-b\", \"--base\",\n type=str,\n help='base directory to monitor. For example if you want to monitor only volume mounted under /host/ (Default: /)',\n default=\"/\")\nPARSER.add_argument(\"-e\", \"--excludes\",\n type=str, nargs='+',\n help='List of mountpoint to exclude recurcively ex: /var/lib will exclude /var/lib*',\n default=[])\nPARSER.add_argument(\"-w\", \"--warning\",\n type=int,\n help='Warning value (Default: 85)',\n default=85)\nPARSER.add_argument(\"-c\", \"--critical\",\n type=int,\n help='Critical value (Default: 95)',\n default=95)\nPARSER.add_argument(\"-v\", \"--version\",\n action='store_true',\n help='Print script version')\nARGS = PARSER.parse_args()\n\n\n\ndef check_df(base,warning,critical,excludes):\n STATE_OK = 0\n STATE_WARNING = 1\n STATE_CRITICAL = 2\n STATE_UNKNOWN = 3\n STATE = STATE_OK\n\n df_cmd = (\"df --exclude-type=tmpfs \"\n \"--exclude-type=devtmpfs \"\n \"--output=source,target,fstype,iused,itotal,ipcent,used,size,pcent \"\n \"--block-size G\")\n\n stdout = subprocess.check_output(df_cmd, shell=True).strip().split(\"\\n\")\n # remove the header output\n del stdout[0]\n\n _output_message = []\n _disk_ok = []\n for line in stdout:\n # Exclude filter on target mount point\n col = line.split()\n # 0: source\n # 1: target\n # 2: fstype\n # 3: iused\n # 4: itotal"} {"instruction": "What is a MongoDB document?", "input": "", "output": "A MongoDB document is a record in a NoSQL database that is represented in the form of a JSON-like structure. It contains a set of key-value pairs where each key is associated with a specific value. Documents can also be nested and can contain arrays and other documents."} {"instruction": "Create an array and assign four elements to it.", "input": "", "output": "my_array = [\"John\", \"Paul\", \"George\", \"Ringo\"]"} {"text": "[EN Wikipedia] Taipa River\n\nThe Taipa River is a river of the northern Northland Region of New Zealand's North Island. It flows west then north, reaching the south of Doubtless Bay at the township of Taipa. See also List of rivers of New Zealand References Far North District Rivers of the Northland Region Rivers of New Zealand"} {"instruction": "Write a Python program to generate a random permutation of a given sequence.", "input": "sequence = [1, 2, 3]", "output": "from random import shuffle\n\nsequence = [1, 2, 3]\nshuffle(sequence)\nprint(sequence)"} {"instruction": "Convert the following pseudo code into a Python Program.", "input": "INPUT n\nOUTPUT \"Even\" OR \"Odd\"\nIF n is divisible by 2\n OUTPUT \"Even\"\nELSE\n OUTPUT \"Odd\"", "output": "n = int(input(\"Enter a number: \"))\nif n%2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")"} {"instruction": "Design a program in Python which generates a random mathematical equation with two numbers.", "input": "", "output": "import random\n\ndef generateRandomEquation():\n num1 = random.randint(0,9)\n num2 = random.randint(0,9)\n op = random.choice(['+','-','*','/'])\n equation = str(num1) + op + str(num2)\n return equation\n\nprint(generateRandomEquation())"} {"text": "[HI Wikipedia] भद्रक, ओड़िशा\n\nभद्रक (Bhadrak) भारत के ओड़िशा राज्य के भद्रक ज़िले में स्थित एक नगर है। यह उस ज़िले का मुख्यालय भी है। इन्हें भी देखें भद्रक ज़िला सन्दर्भ भद्रक ज़िला ओड़िशा के शहर भद्रक ज़िले के नगर"} {"instruction": "Generate a python program that prints the cube of a given number.", "input": "3", "output": "def print_cube(num):\n print(num**3)\n \nnum = 3\nprint_cube(num)"} {"instruction": "Generate a batch of X random numbers in Python using a for loop.", "input": "X = 10", "output": "import random\nnumbers = []\n\nfor i in range(10):\n number = random.randint(1, 100)\n numbers.append(number)\n \nprint(numbers)"} {"instruction": "Create an algorithm that prints the common elements of two arrays.", "input": "arr1 = [3, 10, 15, 7] arr2 = [7, 8, 5, 10]", "output": "def common_elements(arr1, arr2): result = [] for numbers in arr1: if numbers in arr2: result.append(numbers) return result print(common_elements(arr1, arr2)) # Output: [7, 10]"} {"instruction": "Compile a program to check whether an array is a subset of another array", "input": "example1 = [4, 5, 6] example2 = [5, 6, 7]", "output": "def is_subset(a, b): for i in a: if i not in b: return False return True"} {"text": "[CS Wikipedia] Druhá vláda Lubomíra Štrougala\n\nDruhá vláda Lubomíra Štrougala existovala v období 9. prosince 1971 – 11. listopadu 1976. Šlo o první československou vládu ve které byli zastoupeni pouze ministři za KSČ. Seznam členů vlády předseda vlády: Lubomír Štrougal místopředseda vlády: Josef Korčák Peter Colotka Ján Gregor, do 14. 9. 1976 František Hamouz, do 14. 9. 1976 Karol Laco Matej Lúčan Rudolf Rohlíček, od 14. 12. 1973 Jindřich Zahradník Vlastimil Ehrenberger, od 14. 12. 1973 do 2. 12. 1974 Václav Hůla (též předseda Státní plánovací komise) Josef Šimon, od 2. 12. 1974 ministr zahraničních věcí: Bohuslav Chňoupek ministr národní obrany: Martin Dzúr ministr vnitra: Radko Kaska, do 28. 2. 1973 (zemřel) Jaromír Obzina, od 30. 3. 1973 ministr financí: Rudolf Rohlíček, do 14. 12. 1973 Leopold Lér, od 14. 12. 1973 ministr zahraničního obchodu: Andrej Barčák ministr spojů: Vlastimil Chalupa ministr paliv a energetiky: Jaromír Matušek, do 26. 9. 1974 (zemřel) Vlastimil Ehrenberger, od 2. 12. 1974 ministr práce a sociálních věcí: Michal Štanceľ ministr hutnictví a těžkého průmyslu: Josef Šimon, do 2. 12. 1974 Zdeněk Půček, od 2. 12. 1974 ministr pro technický a investiční rozvoj: Ladislav Šupka ministr dopravy: Štefan Šutka, do 21. 11. 1975 Vladimír Blažek, od 21. 11. 1975 ministr zemědělství a výživy: Bohuslav Večeřa, do 14. 9. 1976 Josef Nágr, od 14. 9. 1976 ministr všeobecného strojírenství: Pavol Bahyl, od 1. 1. 1974 ministr – místopředseda Státní plánovací komise: Karol Martinka, do 11. 12. 1972 Pavol Bahyl, od 25. 1. do 14. 12. 1973 Vladimír Janza, od 14. 12. 1973 ministr – předseda Federálního cenového úřadu: Michal Sabolčík ministr – předseda Výboru lidové kontroly: Drahomír Kolder, do 20. 8. 1972 (zemřel) Josef Machačka, od 30. 10. 1972 do 6. 2. 1976 František Ondřich, od 6. 2. 1976 Odkazy Související články Druhá vláda Josefa Korčáka – tehdejší vláda ČSR První vláda Petera Colotky – tehdejší vláda SSR Pražská smlouva Kdo byl kdo v našich dějinách ve 20. století Externí odkazy vláda České republiky Štrougal Štrougal Štrougal Štrougal"} {"text": "[DE Wikipedia] Gromada Bzie Zameckie\n\nGromada Bzie Zameckie war eine Verwaltungseinheit in der Volksrepublik Polen von 1954 bis 1972. Verwaltet wurde die Gromada vom Gromadzka Rada Narodowa, dessen Sitz sich in Bzie Zameckie (heute Teil von Jastrzębie-Zdrój) befand und der aus 16 Mitgliedern bestand. Die Gromada Bystrzanowice gehörte zum Powiat Pszczyński in der Woiwodschaft Katowice (damals Stalinogród) und bestand aus den ehemaligen Gromadas Bzie Dolne, Bzie Górne und Bzie Zameckie der aufgelösten Gmina Golasowice. Am 1. Januar 1957 wurde die Gromada Bzie Zameckie in das Powiat Wodzisławski übertragen. Die Gromada Bzie Zameckie bestand bis zum 1. Januar 1973. Anmerkungen Fußnoten Bzie Zameckie"} {"instruction": "Write a Python program to automate adding products to an e-commerce website's database.", "input": "Products:\n\nName: iPhone 11 Pro\nPrice: 949\n\nName: AirPods Pro\nPrice: 249", "output": "import sqlite3\n\n# Establish the connection\nconn = sqlite3.connect(\"ecommerce_database.db\")\nc = conn.cursor()\n\n# Create the table\nc.execute('''CREATE TABLE IF NOT EXISTS products (\n name TEXT,\n price INTEGER\n)''')\n\n# Insert data into table\nproducts = [\n (\"iPhone 11 Pro\", 949),\n (\"AirPods Pro\", 249)\n]\n\nc.executemany('INSERT INTO products VALUES (?, ?)', products)\n\n# Commit changes\nconn.commit()\n\n# Close the connection\nconn.close()"} {"text": "[CS Wikipedia] Dugo Selo\n\nDugo Selo je město v Chorvatsku, administrativně spadající pod Záhřebskou župu. Nachází se asi 21 km východně od centra Záhřebu. V roce 2011 žilo ve městě 10 453 obyvatel, v celé připadající opčině pak 17 466 obyvatel. Historie První písemná zmínka o sídle je z počátku 13. století. V roce 1853 tu byla otevřena první základní škola. Pošta zde začala být činná v roce 1858 a první vlak zastavil na místním nádraží roku 1870. Železniční doprava umožnila rozvoj skromných provozů jižně od nádraží. Nedaleko města byla podepsána v předvečer druhé světové války Dohoda Cvetković–Maček. Během Dubnové války bylo místní nádraží bombardováno německým letectvem dříve, než hlavní stanice v Bělehradě. V závěru 20. století a v století 21. se město rozvíjelo díky suburbanizaci nedalekého Záhřebu. Roku 1966 byla provedena plynofikace města. Vývoj počtu obyvatel Opčina Dugo Selo Město Dugo Selo Pamětihodnosti Místní kostel je římskokatolický a je zasvěcen sv. Martinovi. Další objekty Ve městě se nachází kasárna chorvatské armády Milivoje Halara. Doprava Dopravně je město propojeno s chorvatskou metropolí Záhřebem prostřednictvím hlavní trati ze Záhřebu do Bělehradu. V Dugém Selu se nachází jediné nádraží jižně od středu města. Regionální trať z tohoto nádraží vede směrem na severovýchod k městu Križevci. Jižně od města také vede dálnice A3. Externí odkazy Města v Chorvatsku Sídla v Záhřebské župě"} {"text": "[EN Wikipedia] Bradley Eros\n\nBradley Eros (born in 1952 in Fairfield, Illinois) is an experimental film director, actor, curator, poet, and performance artist who also makes Musique concrète sound collages, music videos, photographs, live projection performances, works on paper and art objects. His work has been presented in multiple screenings and exhibitions at the Museum of Modern Art, and the Whitney Museum of American Art, including the 2004 Whitney Biennial, and is in the permanent collection of the museum. He has also created dozens of ‘zines, posters, soundtracks and unique artist’s books. He is represented by Microscope Gallery in New York City and is known for his work in the field of contracted cinema. Life and work Among his first projects following his relocation from Illinois to NYC was a series of expanded cinema films with (and performed live with) Aline Mare in a multi-media film and music partnership called Erotic Psyche. In 1982 he helped organize (and appeared in) the Colab sponsored Erotic Psyche Show at ABC No Rio after he participated in The Times Square Show. His sound collage The Atom & Eve of Destruction (1983) appears on the first issue of Tellus Audio Cassette Magazine in 1983. In 1984, he made Mutable Fire, a collage film about destruction and desire. From 1987 to 2016 he collaborated with the artist/filmmaker Jeanne Liotta. In 2020, he also collaborated with musician Lea Bertucci providing visuals for a video. He is manager and researcher at Anthology Film Archives, as well as a member of the board of directors of The Film-Makers' Cooperative in New York City. Selected works Warp & Weft (with Lea Burtucci; 2019) Trans Trans (Transformers Transformed) (with Tim Geraghty; 2009) Aerodynamics of the Black Sun (2006) eros.ion (1999) Dervish Machine (1992) Subverted Horseplay (with former partner Jeanne Liotta; 1987-2016) Erotic Psyche (with Aline Mare; 1985) Mutable Fire (1984) Osmosis (1972-2002) See also No Wave Cinema Underground film Cinema of Transgression Expanded Cinema References External links The Film-Makers' Cooperative Bradley Eros at IMDb Dervish Machine (1992) officially posted by Jeanne Liotta on Vimeo 1952 births Living people American experimental filmmakers American film directors American performance artists 21st-century male artists American conceptual artists Artists from New York (state) American installation artists Mass media theorists New media artists Postmodern artists Collage filmmakers"} {"instruction": "Explain the difference between a shallow copy and a deep copy.", "input": "", "output": "A shallow copy of an object creates a new object with the same values as the original but with a different location in memory. A deep copy of an object copies not just the values of the original object but also creates copies of any objects that the original object is referencing. The result is two objects which are completely independent of each other."} {"instruction": "Print all the permutations of a given list", "input": "[1, 2, 3]", "output": "def permute(lis): if len(lis) == 0: return [] if len(lis) == 1: return [lis] l = [] for i in range(len(lis)): m = lis[i] remLis = lis[:i] + lis[i+1:] for p in permute(remLis): l.append([m] + p) return l list1 = [1, 2, 3] result = permute(list1) for i in result: print(i)"} {"text": "[HI Wikipedia] दिल्ली मेट्रो\n\nदिल्ली मेट्रो भारत की राजधानी दिल्ली- एनसीआर की मेट्रो परिवहन व्यवस्था है जो दिल्ली मेट्रो रेल निगम लिमिटेड द्वारा संचालित है। इसका शुभारंभ २४ दिसंबर, २००२ को शहादरा तीस हजारी लाईन से हुई। इस परिवहन व्यवस्था की अधिकतम गति ८०किमी/घंटा (५०मील/घंटा) रखी गयी है और यह हर स्टेशन पर लगभग २० सेकेंड रुकती है। सभी ट्रेनों का निर्माण दक्षिण कोरिया की कंपनी रोटेम (ROTEM) द्वारा किया गया है। दिल्ली की परिवहन व्यवस्था में मेट्रो एक महत्वपूर्ण कड़ी है। इससे पहले परिवहन का ज्यादतर बोझ सड़क पर था। प्रारंभिक अवस्था में इसकी योजना छह मार्गों पर चलने की थी जो दिल्ली के ज्यादातर हिस्से को जोड़ते थे। इस प्रारंभिक चरण को २००६ में पूरा किय़ा गया। बाद में इसका विस्तार राष्ट्रीय राजधानी क्षेत्र से सटे शहरों गाजियाबाद, फरीदाबाद, गुड़गाँव और नोएडा तक किया गया। इस परिवहन व्यवस्था की सफलता से प्रभावित होकर भारत के दूसरे राज्यों जैसे उत्तर प्रदेश, राजस्थान, कर्नाटक, आंध्र प्रदेश एवं महाराष्ट्र में भी इसे चलाने की योजनाएं बन रही हैं। दिल्ली मेट्रो व्यव्स्था अपने शुरुआती दौर से ही ISO १४००१ प्रमाण-पत्र अर्जित करने में सफल रही है जो सुरक्षा और पर्यावरण की दृष्टि से काफी महत्वपूर्ण है। दिल्ली मेट्रो भारत में सबसे बड़ा और व्यस्ततम मेट्रो है, और दुनिया की 9वीं सबसे लंबी मेट्रो प्रणाली लंबी अवधि में और 16 वीं सबसे बड़ी सवारी में है। CoMET के एक सदस्य, नेटवर्क में आठ रंग-कोडित नियमित रेखाएं होती हैं, जिसमें कुल लंबाई है जो 229 स्टेशनों (6 स्टेशन सहित एयरपोर्ट एक्सप्रेस लाइन और इंटरचेंज स्टेशनों ) की सेवा करती है। इस प्रणाली में ब्रॉड-गेज और मानक-गेज दोनों का उपयोग करके भूमिगत, एट-ग्रेड और उन्नत स्टेशनों का मिश्रण है। पावर आउटपुट 25 किलोवाल्ट, 50-हर्ट्ज वैकल्पिक ओवरहेड कैटेनरी के माध्यम से वैकल्पिक रूप से आपूर्ति की जाती है। ट्रेन आमतौर पर छह और आठ कोच लंबाई होती है। डीएमआरसी प्रतिदिन 2,700 से अधिक यात्राएं संचालित करती है, पहली ट्रेनें लगभग 05:00 बजे शुरू होती हैं और आखिरी बार 23:30 बजे होती हैं। 2016-17 के वित्तीय वर्ष में, दिल्ली मेट्रो में 2.76 मिलियन यात्रियों की औसत दैनिक सवारता थी और वर्ष के दौरान कुल मिलाकर 100 करोड़ (1.0 अरब) सवार थे। सितंबर २०११ में संयुक्त राष्ट्र ने \"स्वच्छ विकास तंत्र\" योजना के तहत हरित गृह गैसों में कमी लाने के लिए दिल्ली मेट्रो को दुनिया का पहला \"कार्बन क्रेडिट\" दिया जिसके अंतर्गत उसे सात सालों के लिए 95 लाख डॉलर मिलेंगे। मेट्रो रेलमार्ग भारत सरकार और दिल्ली सरकार ने संयुक्त रूप से 3 मई 1995 को दिल्ली मेट्रो रेल कॉर्पोरेशन (DMRC) नामक एक कंपनी की स्थापना की, जिसमें ई श्रीधरन को प्रबंध निदेशक के रूप में रखा गया था। डॉ. ई श्रीधरन ने 31 दिसंबर 2011 को मंगू सिंह को DMRC के प्रबंध निदेशक के रूप में कार्यभार सौंपा। इस रेल व्यवस्था के प्रमच रण (फेज I) में मार्ग की कुल लंबाई लगभग ६५.११ किमी है जिसमे १३ किमी भूमिगत एवं ५२ किलोमीटर एलीवेटेड मार्ग है। द्वितीय चरण (फेज II) के अंतर्गत पूरे मार्ग की लंबाई १२८ किमी होगी एवं इसमें ७९ स्टेशन होंगे जो अभी निर्माणाधीन हैं, इस चरण के २०१० तक पूरा करने का लक्ष्य रखा गया है। तृतीय चरण (फेज III) (११२ किमी) एवं IV (१०८.५ किमी)…"} {"instruction": "Using the comment as a guide, edit the code to handle the error appropriately.", "input": "try: # TODO: Make API call except Exception: # TODO: Handle error", "output": "try: # Make API call except Exception as e: # Handle error print(\"An error occurred:\", e)"} {"instruction": "Design a function in Python to determine if a given number is prime.", "input": "37", "output": "def is_prime(n):\n if n <= 1: \n return False\n if n == 2: \n return True\n if n > 2 and n % 2 == 0: \n return False\n\n sqrt_n = int(n**0.5)\n for i in range(3, sqrt_n+1, 2):\n if n % i == 0:\n return False\n return True\n\nif is_prime(37):\n print('37 is a prime number!')"} {"text": "[DE Wikipedia] Ernst Rose\n\nHeinrich Ernst Rose (* 12. Juni 1821 in Nöschenrode; † vor 1893) war ein deutscher Marmormeister und Fotograf. Leben Ernst Rose wurde als Sohn des im Dienst der Grafen zu Stolberg-Wernigerode stehenden Bergmanns Johann Heinrich Rose auf der Voigtstiegmühle, die in jener Zeit auch als Marmormühle zum Schleifen des am Hartenberg bei Elbingerode (Harz) gebrochenen Marmors genutzt wurde, geboren. Johanne Marie Sophie geborene Volmer war seine Mutter. Wie sein Vater wurde Ernst Rose zunächst gräflich-stolberg-wernigerödischer Bergmann. Doch sein erlernter Beruf hatte in der Mitte des 19. Jahrhunderts keine Zukunftschancen. Der Bergbau in der Montanregion Harz lohnte sich kaum noch und immer mehr Bergwerke, darunter auch das, in dem Ernst Rose beschäftigt war, kamen zum Erliegen. Rose suchte daher nach einer anderen Verdienstmöglichkeit. Nachdem in den 1840er-Jahren auch im deutschsprachigen Raum erste Fotoateliers eröffnet wurden, begann sich auch Rose für das neue Medium der Fotografie zu interessieren. Ende der 1850er-Jahre richtete er in seinem Geburtshaus das erste Fotoatelier in Stadt und Grafschaft Wernigerode ein. Er nannte es Photograph. Atelier für Portrait und Landschaften. Im Jahr 1864 wurde er als „Marmormeister in Voigtstieg bei Wernigerode“ in den Photographischen Verein zu Berlin aufgenommen. Schon bald erhielten seine Fotografien regen Zuspruch, so dass er zuerst in Quedlinburg und dann in Thale zusätzliche Filialen eröffnete. Neben Porträts, die er in seinen drei Fotoateliers anfertigte, trat er vor allem mit Landschaftsaufnahmen aus dem Harz an die Öffentlichkeit, die heute zu den frühesten dokumentarischen Fotos dieser Landschaft zählen. Seit den 1890er-Jahren erschienen mehrere seiner Fotos in hoher Auflage auf Ansichtskarten und fanden somit eine größere Verbreitung. Am 29. April 1849 heiratete Ernst Rose in der Schlosskirche Wernigerode Johanne Louise Charlotte geborene Basse. Aus der Ehe ging der Sohn Friedrich (Fritz) Rose hervor, der ebenfalls den Beruf eines Fotografen erlernt hatte. Mit Zunahme des Harzer Tourismus verlegte dieser das vom Vater übernommene Fotoatelier aus dem Mühlental in das Gebäude Nicolaiplatz 1 im Stadtzentrum von Wernigerode. Nach seinem Tod ging dieses Fotoatelier an die Fotografin Hildegard Riekewolt. Weblinks E. Rose bei Fotorevers Einzelnachweise Fotograf (19. Jahrhundert) Fotograf (Sachsen-Anhalt) Person (Wernigerode) Deutscher Geboren 1821 Gestorben im 19. Jahrhundert Mann"} {"instruction": "Create a python program to compute the volume of a cube given its edge length as an input.", "input": "3", "output": "length = int(input(\"Enter the edge length of the cube: \"))\n\nvolume = length * length * length\n\nprint(\"The volume of the cube is\", volume)"} {"instruction": "Create a Python script which inputs a sentence and performs POS tagging and letter count for the text using NLTK library.", "input": "This is an example sentence.", "output": "import nltk\n\nsentence = 'This is an example sentence.'\nwords = nltk.word_tokenize(sentence)\ntagged_words = nltk.pos_tag(words)\n\nletter_count = 0\nfor word in words:\n letter_count += len(word)\n\nprint('POS Tags: ', tagged_words)\nprint('Letter Count: ', letter_count)"} {"instruction": "Name 3 methods for making a web page more responsive", "input": "", "output": "Three methods for making a web page more responsive are: 1. Minimize the number and size of images used in the page. This reduces the page size and load time. 2. Implement lazy loading of images, i.e. delay loading images until they are needed. This helps avoid loading images that are far down the page and will not be visible to the user. 3. Make use of modern web technologies such as AJAX to asynchronously update elements on the page without requiring a full page refresh."} {"instruction": "Use the given code to create a Pandas Dataframe.", "input": "data = {'Name': ['Jack', 'James', 'Joe'], 'Age': [21, 22, 23]}", "output": "import pandas as pd df = pd.DataFrame(data)"} {"instruction": "Create a GPT-3 model that can generate code snippets for Python programs.", "input": "Not applicable", "output": "The GPT-3 model should take in code snippets with given instructions, and generate code snippets in Python based on those instructions. It should be able to generate code for various programming tasks, from simple to complex, such as data cleaning, data manipulation, custom functions, feature engineering, testing, and object-oriented programming. The model should also be able to recognize patterns and apply them to new code snippets."} {"instruction": "Create a Twitter bot using Python that automatically retweets posts based on the user's profile.", "input": "A user's profile consists of their interests, hobbies and topics they like to talk about.", "output": "import tweepy\nimport time\n\nconsumer_key = 'your consumer key'\nconsumer_secret = 'your consumer secret'\n\naccess_token = 'your access token'\naccess_token_secret = 'your access token secret'\n\nauth = tweepy.OAuthHandler(consumer_key, consumer_secret)\nauth.set_access_token(access_token, access_token_secret)\n\napi = tweepy.API(auth)\n\ninterests = ['computers', 'cricket', 'movies'] # interests of the user\n\nwhile True:\n for interest in interests:\n search = '#' + interest\n tweets = api.search(search)\n for tweet in tweets:\n api.retweet(tweet.id)\n time.sleep(30) # sleep for 30 seconds"} {"text": "[DE Wikipedia] Chadakori\n\nChadakori (auch: Chada Kori, Chadakory, Shadakori) ist eine Landgemeinde im Departement Guidan Roumdji in Niger. Geographie Chadakori liegt am Übergang der Großlandschaft Sudan zur Sahelzone. Die Nachbargemeinden sind Sabon-Machi und Maïyara im Norden, Saé Saboua im Südosten, Guidan Sori und Tibiri im Süden sowie Guidan Roumdji im Südwesten. Bei den Siedlungen im Gemeindegebiet handelt es sich um 125 Dörfer, 56 Weiler und 26 Lager. Der Hauptort der Landgemeinde ist das Dorf Chadakori. Geschichte Chadakori wurde um 1816 gegründet. Seit 1953 befindet sich hier der Sitz eines Kantonschefs, eines von einem traditionellen Ortsvorsteher (chef traditionnel) wahrgenommenen Amts. Die Landgemeinde Chadakori ging 2002 im Zuge einer landesweiten Verwaltungsreform aus dem Kanton Chadakori hervor. Bei der Hungerkrise in Niger 2005 gehörte Chadakori zu den am stärksten betroffenen Orten. Hier hatte die Bevölkerung weniger als eine Mahlzeit am Tag zur Verfügung. Bevölkerung Bei der Volkszählung 2012 hatte die Landgemeinde 108.711 Einwohner, die in 12.674 Haushalten lebten. Bei der Volkszählung 2001 betrug die Einwohnerzahl 69.765 in 8768 Haushalten. Im Hauptort lebten bei der Volkszählung 2012 5271 Einwohner in 688 Haushalten, bei der Volkszählung 2001 4464 in 554 Haushalten und bei der Volkszählung 1988 548 in 72 Haushalten. In ethnischer Hinsicht ist die Gemeinde ein Siedlungsgebiet von Gobirawa, Azna, Fulbe und Tuareg. Politik Der Gemeinderat (conseil municipal) hat 25 gewählte Mitglieder. Mit den Kommunalwahlen 2020 sind die Sitze im Gemeinderat wie folgt verteilt: 11 CPR-Inganci, 7 MNSD-Nassara, 4 PNDS-Tarayya, 1 LRD-Jimiri, 1 MPR-Jamhuriya und 1 PJP-Génération Doubara. Jeweils ein traditioneller Ortsvorsteher (chef traditionnel) steht an der Spitze von 118 Dörfern in der Gemeinde, darunter dem Hauptort. Wirtschaft und Infrastruktur Die Gemeinde liegt in einer Zone, in der Regenfeldbau betrieben wird. In den 1980er Jahren wurde im Hauptort eine Getreidebank etabliert. Die Niederschlagsmessstation im Hauptort liegt auf Höhe und wurde 1959 in Betrieb genommen. Gesundheitszentren des Typs Centre de Santé Intégré (CSI) sind im Hauptort sowie in den Siedlungen Boussaragui, Dargué, Kouroungoussaou und Maïki vorhanden. Das Gesundheitszentrum im Hauptort verfügt über ein eigenes Labor und eine Entbindungsstation. Der CEG Chadakori ist eine allgemein bildende Schule der Sekundarstufe des Typs Collège d’Enseignement Général (CEG). Das Berufsausbildungszentrum Centre de Formation aux Métiers de Chadakori (CFM Chadakori) bietet Lehrgänge in familiärer Wirtschaft und Tischlerei an. Durch das Gemeindegebiet verläuft die Nationalstraße 30 zwischen Kadata und Abalak sowie die Landstraße RR4-003 zwischen Bader Tanko und Saé Saboua. Der Gemeindehauptort Chadakori ist durch die…"} {"instruction": "Construct a Python program that takes a string as input and creates a new string with the first character of each word in the given string", "input": "\"This is a sample string\"", "output": "def first_letter_string(input_str):\n output_str = \"\"\n\n for w in input_str.split():\n output_str += w[0]\n\n return output_str\n\ninput_str = \"This is a sample string\"\nprint(first_letter_string(input_str))"} {"text": "[DE Wikipedia] Wilhelm Behringer\n\nWilhelm Behringer ist der Name folgender Personen: * Wilhelm von Behringer (1820–1902), deutscher Richter und Politiker, MdR Wilhelm Behringer (Richter) (1853–1931), deutscher Richter Wilhelm Behringer (Politiker) (1893–1968), deutscher Politiker (FDP), MdL Bayern Wilhelm Heinrich Behringer (1651/1652–1716), deutscher Baumeister Siehe auch Wilhelm Beringer (1887–1949), Architekt und Eisenbahnbeamter"} {"instruction": "Find the frequency of a given phrase in the text", "input": "text = \"This is a phrase that I want to find the frequency of\" phrase = \"phrase\"", "output": "def find_frequency(text, phrase): fdist = nltk.FreqDist(text.lower().split()) return fdist[phrase]"} {"instruction": "Given a text string, write a function in Python to identify all the words that have more than 3 characters.", "input": "text = \"Python is an easy to learn language\"", "output": "def longer_words(text): words = text.split() longer = [word for word in words if len(word) > 3] return longer"} {"text": "[HI Wikipedia] मुस्तानसिर बार्मा\n\nपद्म श्री डॉ॰ मुस्तानसिर बार्मा सांख्यिकीय भौतिकी के क्षेत्र में कार्यरत भारतीय वैज्ञानिक हैं। वो टाटा मूलभूत अनुसंधान संस्थान के पूर्व निदेशक हैं। शोध उनका शोध कार्य मुख्यतः सांख्यिकीय भौतिकी के क्षेत्र में है। पुरस्कार और सम्मान युवा वैज्ञानिक, भारतीय राष्ट्रीय विज्ञान अकादमी (आईएनएसए) (1980). सह भारतीय विज्ञान अकादमी (1983 – 86). वैज्ञानिक तथा औद्योगिक अनुसंधान परिषद द्वारा भौतिकी के क्षेत्र में कार्य के लिएशांति स्वरूप भटनागर पुरस्कार (1995). मानद संकाय सदस्य, जवाहरलाल नेहरू सेंटर फॉर एडवांस्ड साइंटिफिक रिसर्च, बंगलौर (1998 – 2001). परमाणु ऊर्जा विभाग राजा रमन्ना पुरस्कार Lecture in Physics (2004). भारतीय विज्ञान कांग्रेस के एस.एन. बोस जन्म शताब्दी पुरस्कार (2007). विज्ञान और प्रौद्योगिकी विभाग के जे.सी. बोस फैलोशिप (2007). सातवीं अब्दुस सलाम स्मारक व्याख्यान, जामिया मिलिया इस्लामिया, नई दिल्ली (2009). भौतिकी के लिए आर.एस. गोयल पुरस्कार (2006), awarded in 2010. पद्म श्री पुरस्कार (2013) सन्दर्भ बाहरी कड़ियाँ मुस्तानसिर बार्मा का मुख पृष्ठ मुस्तानसिर बार्मा के वैज्ञानिक प्रकाशन ये भी देखें टाटा मूलभूत अनुसन्धान संस्थान भारतीय वैज्ञानिक भौतिक विज्ञान पद्म श्री भारतीय वैज्ञानिक जीवित लोग 1950 में जन्मे लोग"} {"instruction": "Write an SQL query to calculate the sum of all prices of items purchased by customers.", "input": "", "output": "SELECT SUM(price) FROM Purchases;"} {"instruction": "What is the sum of all the even numbers in the range 1-100 inclusive?", "input": "", "output": "2550 # The output will be 2550"} {"instruction": "Write a Python program to validate a US phone number.", "input": "", "output": "def is_valid_phone_number(phone):\n \n if len(phone) != 12:\n return False\n \n if phone[3] != '-' or phone[7] != '-':\n return False\n \n for i in range(0, 12):\n if i != 3 and i != 7:\n if not phone[i].isdecimal():\n return False\n \n return True\n\nresult = is_valid_phone_number(\"123-456-7890\")\nprint(result)"} {"instruction": "Create a program in Python to generate random numbers.", "input": "", "output": "import random\n\ndef generate_random_numbers(n):\n numbers = []\n for _ in range(n):\n numbers.append(random.randint(0, 100))\n return numbers\n\n# Generate 10 random numbers\nnumbers = generate_random_numbers(10)\nprint(numbers)"} {"text": "[EN Wikipedia] Pakiri River\n\nThe Pakiri River is a river of the Auckland Region of New Zealand's North Island. It flows generally northwest from hills overlooking Leigh, reaching the Pacific Ocean coast west of Wellsford. See also List of rivers of New Zealand References Rivers of the Auckland Region Rivers of New Zealand"} {"instruction": "Develop a tool to detect plagiarism in python programs.", "input": "program1.py\n\ndef factorial(n): \n res = 1\n\n for i in range(1, n+1): \n res = res * i\n return res \n\nprogram2.py\n\ndef factorial(n): \n res = 1\n for i in range(1, n+1): \n res = res * i\n return res", "output": "\"\"\"\nDevelop a tool to detect plagiarism in python programs\n\"\"\"\n\nimport difflib\n\ndef detect_plagiarism(file1, file2):\n file1_lines = open(file1).readlines()\n file2_lines = open(file2).readlines()\n\n similarity = difflib.SequenceMatcher(None, file1_lines, file2_lines).ratio()\n print(\"Similarity between the two files is : \" + str(similarity*100) + \"%\")\n if similarity > 0.7:\n print(\"Highly Plagiarised code!\")\n elif similarity <= 0.7 and similarity > 0.5:\n print(\"Moderately Plagiarised Code\")\n else:\n print(\"Unique code\")\n\n# Driver Code\ndetect_plagiarism(\"program1.py\", \"program2.py\")"} {"instruction": "Create a constructor in JavaScript that will assign a value to an object's properties.", "input": "properties: x, y, z", "output": "function MyObject(x, y, z) { this.x = x; this.y = y; this.z = z; }"} {"instruction": "Generate a rotating cube in Python using OpenGL.", "input": "", "output": "import pygame\nfrom pygame.locals import *\nfrom OpenGL.GL import *\nfrom OpenGL.GLU import *\n \n# cube vertices\nvertices = (\n (1, -1, -1),\n (1, 1, -1),\n (-1, 1, -1),\n (-1, -1, -1),\n (1, -1, 1),\n (1, 1, 1),\n (-1, -1, 1),\n (-1, 1, 1)\n )\n \n# cube edges\nedges = (\n (0,1),\n (0,3),\n (0,4),\n (2,1),\n (2,3),\n (2,7),\n (6,3),\n (6,4),\n (6,7),\n (5,1),\n (5,4),\n (5,7)\n )\n \ndef Cube():\n glBegin(GL_LINES)\n for edge in edges:\n for vertex in edge:\n glVertex3fv(vertices[vertex])\n glEnd()\n\ndef main():\n pygame.init()\n display = (800,600)\n pygame.display.set_mode(display, DOUBLEBUF|OPENGL)\n \n # set viewport\n gluPerspective(45, (display[0]/display[1]), 0.1, 90.0)\n glTranslatef(0.0, 0.0, -20)\n \n # cube rotation\n glRotatef(45.0, 0.0, 1.0, 0.0)\n glRotatef(45.0, 1.0, 0.0, 0.0)\n \n # render the sphere\n Cube()\n pygame.display.flip()\n pygame.time.wait(1000)\n \nif __name__ == '__main__':\n main()"} {"instruction": "Analyze a given text and generate a dictionary of frequency of each word in the text.", "input": "text = \"This is a sample text to analyze the frequency of the words\"", "output": "def analyze_text(text): text = text.lower().split() freqDict = {} for word in text: if word in freqDict: freqDict[word] += 1 else: freqDict[word] = 1 return freqDict if __name__ == '__main__': text = \"This is a sample text to analyze the frequency of the words\" print(analyze_text(text)) Output: {'this': 1, 'is': 1, 'a': 1, 'sample': 1, 'text': 1, 'to': 1, 'analyze': 1, 'the': 1, 'frequency': 1, 'of': 1, 'words': 1}"} {"instruction": "Using the provided text, remove all punctuation and store the resulting output in a new variable.", "input": "text = \"This is a text string with punctuation!\"", "output": "import re new_text = re.sub('[^\\w\\s]','', text)"} {"instruction": "Create a Python program to search for an item in a list and return its index.", "input": "[2, 3, 5, 7, 11], target = 5", "output": "def linear_search(list, target):\n for index, item in enumerate(list):\n if target == item:\n return index\n return -1\n\nresult = linear_search([2, 3, 5, 7, 11], 5)\nprint(result)"} {"instruction": "Write a C program to find the difference between the maximum and minimum values in an array.", "input": "arr = {2, 8, 10, 9}", "output": "#include int diffMaxMin(int arr[], int n) { int max_num = arr[0], min_num = arr[0]; int i; for (i = 0; i < n; i++) { max_num = max_num > arr[i] ? max_num : arr[i]; min_num = min_num < arr[i] ? min_num : arr[i]; } return (max_num - min_num); } int main() { int arr[] = {2, 8, 10, 9}; int n = sizeof(arr) / sizeof(arr[0]); printf(\"%d\\n\", diffMaxMin(arr, n)); return 0; }"} {"instruction": "Write a shell script to find all even numbers from 1 to 50.", "input": "", "output": "#!/bin/bash for i in {1..50..2} do echo $i done"} {"instruction": "Find the Big O notation of the following code", "input": "def factorial(n): answer = 1 for i in range(1, n+1): answer *= i return answer", "output": "The Big O notation of the given code is O(n)."} {"instruction": "Rearrange the given array in an ascending order using selection sort algorithm.", "input": "Array: [2, 8, 5, 3, 9]", "output": "function SelectionSort(arr) { for (let i = 0; i < arr.length; i++) { let min = i; for (let j = i+1; j < arr.length; j++) { if (arr[j] < arr[min]) min = j; } let temp = arr[i]; arr[i] = arr[min]; arr[min] = temp; } return arr; } SelectionSort([2, 8, 5, 3, 9]); // Output: [2, 3, 5, 8, 9]"} {"text": "[CS Wikipedia] Posuvný pohyb\n\nPosuvný pohyb (též postupný pohyb nebo translace) je takový pohyb tuhého tělesa, při kterém všechny body tělesa konají pohyb po stejných, pouze navzájem posunutých, trajektoriích. Rychlosti jednotlivých bodů tělesa jsou při posuvném pohybu stejné, proto lze zkoumání posuvného pohybu převést na zkoumání pohybu jediného z bodů, nejčastěji těžiště. Kinetická energie Ek tuhého tělesa při posuvném pohybu: Ek = 1/2 m · v2 , kde m je hmotnost celého tělesa, v je rychlost tělesa. Související články Přímočarý pohyb Mechanika Mechanika tuhého tělesa Kinematika"} {"text": "[DE Wikipedia] Isaak Habrecht\n\nIsaak Habrecht ist der Name folgender Personen: * Isaak Habrecht (Uhrmacher) (1544–1620), Schweizer Uhrmacher Isaak Habrecht (Mediziner) (1589–1633), Schweizer Mediziner, Astronom und Mathematiker"} {"text": "[DE Wikipedia] Entenfang\n\nEin Entenfang ist eine Anlage zum Fang von Wildenten, siehe Vogelkoje. Entenfang steht auch für verschiedene Orte in Deutschland. in Baden-Württemberg: Entenfang, Platz in Mühlburg (Karlsruhe), Haltestelle der Straßenbahn Karlsruhe Entenfang, Waldfläche im Naturschutzgebiet Hinterwörth-Laast in Brandenburg: Forsthaus Entenfang, ehemaliges Forsthaus im Ortsteil Golm der Landeshauptstadt Potsdam in Niedersachsen: Entenfang (bei Giesen), Naturschutzgebiet im Landkreis Hildesheim Entenfang Boye, Entenfangeinrichtung des 17. Jahrhunderts in Celle das dortiges Wasserwildreservat, siehe Entenfang Boye und Grobebach Fachwerkhaus Entenfang, Waldgasthaus, siehe Entenfang Hannover und Baudenkmal in Ledeburg, Hannover Haus Entenfang, Informationszentrum im Naturschutzgebiet Riddagshausen, Braunschweig in Nordrhein-Westfalen: Entenfang (Wesseling), Naturschutzgebiet im Rhein-Erft-Kreis Jagdschloss Entenfang in Wesseling, Rhein-Erft-Kreis Entenfang (Mülheim an der Ruhr), See zwischen Mülheim-Uhlenhorst und Duisburg Bahnhof Duisburg-Entenfang an der Bahnstrecke Troisdorf–Mülheim-Speldorf in Sachsen: Entenfang, Ort am Stadtrand von Torgau, siehe Endless Summer Open Air ehemaliger Bahnhof auf der Bahnstrecke Torgau–Belgern Entenfang, Ortslage in der Kulturlandschaft Moritzburg bei Dresden"} {"instruction": "Create a function to print out words that include the letter \"e\" from a given list of strings.", "input": "mylist = [\"hello\", \"world\", \"fire\", \"feline\"]", "output": "def print_words_with_e(mylist): for word in mylist: if 'e' in word: print(word) print_words_with_e(mylist) #Output: hello fire feline"} {"text": "[HI Wikipedia] पोर्ट सईद मुहाफ़ज़ाह\n\nपोर्ट सईद मुहाफ़ज़ाह (अरबी: , अंग्रेज़ी: Port Said Governorate) मिस्र का एक मुहाफ़ज़ाह (उच्च-स्तरीय प्रशासनिक विभाग) है। यह सुएज़ नहर के उत्तरी द्वार पर भूमध्य सागर पर स्थित एक बंदरगाह है। इन्हें भी देखें मिस्र के मुहाफ़ज़ात‎ सन्दर्भ पोर्ट सईद मुहाफ़ज़ाह मिस्र के मुहाफ़ज़ात मिस्र"} {"instruction": "Compute the absolute difference between two given numbers.", "input": "x = 7 y = 4", "output": "diff = abs(x - y) print(diff) # output: 3"} {"instruction": "Could you write a program in Python to simulate Conway's Game of Life?", "input": "size = 10", "output": "# create the grid function\ndef createGrid(length, width): \n grid = [[0 for x in range(width)] for y in range(length)] \n return grid \n \n# initialise the grid with cells \ndef initGrid(grid): \n for i in range(len(grid)): \n for j in range(len(grid[i])): \n grid[i][j] = int(random.random()+.5) \n return grid \n \n# display the grid \ndef display(grid): \n for i in range(len(grid)): \n for j in range(len(grid[i])): \n print(grid[i][j], \" \", end=\"\") \n print() \n \n# make each cell follow the game rules \ndef updateGrid(grid): \n newGrid = [[0 for x in range(len(grid[0]))] for y in range(len(grid))] \n \n for i in range(len(grid)): \n for j in range(len(grid[i])): \n # calculate the current cell's neighbors \n neighbors = 0\n for k in range(-1, 2): \n for l in range(-1, 2): \n if k == 0 and l == 0: \n continue\n elif (i+k >= 0 and i+k < len(grid) and \n j+l >= 0 and j+l < len(grid[i])): \n neighbors += grid[i+k][j+l] \n \n # rule 1 and rule 3 \n if (grid[i][j] == 1 and (neighbors < 2 or neighbors > 3)): \n newGrid[i][j] = 0\n # rule 4 \n elif (grid[i][j] == 0 and neighbors == 3): \n newGrid[i][j] = 1\n # rule 2 \n else: \n newGrid[i][j] = grid[i][j] \n return newGrid \n\nsize = 10\ngrid = createGrid(size, size)\ngrid = initGrid(grid) \n \n# display the initial grid \nprint(\"Initial Grid\") \ndisplay(grid) \n \n# update the grid for 25 iterations \nfor i in range(25): \n print(\"Iteration\", i+1) \n grid = updateGrid(grid) \n display(grid)"} {"instruction": "Write a shell script to print all the environment variables in use.", "input": "", "output": "# Using Bash: # Print the environment variables for var in $(env); do echo \"$var\"; done"} {"instruction": "Optimize the following Python code to be as efficient as possible.", "input": "def fun(N):\n result = 0\n for i in range(1, N+1):\n for j in range(1, N+1):\n result += i + j\n return result", "output": "def fun(N):\n result = (N*(N+1))/2\n result *= (2 * N + 1)\n result /= 3\n return int(result)"} {"text": "[HI Wikipedia] प्रभात खबर\n\nप्रभात खबर झारखंड, बिहार और पश्चिम बंगाल में दैनिक रूप से प्रकाशित होने वाला एक हिंदी भाषा का समाचार पत्र है। यह अखबार भारत के कई राज्यों में प्रसारित होता है, जिनमें बिहार, झारखंड, पश्चिम बंगाल और उड़ीसा के कुछ हिस्से शामिल हैं। इसकी स्थापना अगस्त 1984 में झारखंड की राजधानी रांची में हुई थी। अखबार सामाजिक मुद्दों की रिपोर्टिंग और चारा घोटाला जैसे घोटालों का खुलासा करने के लिए उल्लेखनीय है। अखबार ने 1992 में चारा घोटाले की रिपोर्ट करना शुरू किया। धमकियां मिलने के बावजूद, अखबार ने घोटाले पर 70 रिपोर्टें लिखीं और चार या पांच पत्रकारों ने कहानी की रिपोर्टिंग की। इतिहास 1984 में झारखंड की राजधानी रांची में गायन रंजन द्वारा प्रभात खबर का पहला संस्करण लॉन्च किया गया था। 1989 में वायर रोप बनाने वाली अग्रणी कंपनी उषा मार्टिन ग्रुप ने प्रभात खबर का अधिग्रहण किया। अखबार ने 1992 में चारा घोटाले की रिपोर्ट करना शुरू किया। धमकियां मिलने के बावजूद, अखबार ने घोटाले पर 70 रिपोर्टें लिखीं और चार या पांच पत्रकारों ने कहानी की रिपोर्टिंग की। 1995 में प्रभात खबर ने झारखंड के इस्पात शहर जमशेदपुर में लॉन्च के साथ अपनी महत्वाकांक्षी विस्तार योजना शुरू की। प्रभात खबर का 1996 में पटना, 1999 में धनबाद, 2000 में कोलकाता, 2004 में देवघर, 2006 में सिलीगुड़ी, 2010 में मुजफ्फरपुर, 2011 में भागलपुर और गया संस्करण लॉन्च किया गया। 2001 में प्रभात खबर ने गुणवत्तापूर्ण पत्रकारों को विकसित करने के लिए प्रभात खबर इंस्टीट्यूट ऑफ मीडिया स्टडीज नाम से मीडिया संस्थान शुरू किया। 2008 में प्रभात खबर ने रांची और जमशेदपुर में एफएम रेडियो चैनल 104.8 रेडियो धूम के लॉन्च के साथ इलेक्ट्रॉनिक्स मीडिया में प्रवेश किया। प्रभात खबर ने 2012 में ग्रामीण आबादी को लक्षित एक साप्ताहिक समाचार पत्रिका पंचायतनामा का शुभारंभ किया। प्रभात खबर रांची, जमशेदपुर, धनबाद, देवघर, पटना, मुजफ्फरपुर, भागलपुर, गया, कोलकाता और सिलीगुड़ी से छपी और प्रसारित होती है। इंडियन रीडरशिप सर्वे (आईआरएस) 2017 के अनुसार, 13.49 मिलियन की पाठक संख्या के साथ, प्रभात खबर सभी भाषाओं में दसवां सबसे अधिक पढ़ा जाने वाला समाचार पत्र है, और भारत में छठा सबसे अधिक पढ़ा जाने वाला हिंदी समाचार पत्र है। इन्हें भी देखें भारत में प्रकाशित होने वाले समाचार पत्रों की सूची सन्दर्भ बाहरी कड़ियाँ प्रभात खबर का जालघर प्रभात खबर का 30 वर्ष का सफर! हिन्दी भाषा के समाचार पत्र"} {"text": "[CS Wikipedia] Objemový průtok\n\nObjemový průtok (objemový tok) je objem kapaliny nebo plynu, který proteče jedním místem (celým průřezem v jednom místě trubice) za jednotku času. Značení Značka: QV Jednotka SI: metr krychlový za sekundu, zkratka m3·s−1 V imperiálních jednotkách se průtok měří v CFS, CFPS (, kubické stopy za sekundu) nebo CFM, CFPM (, kubické stopy za minutu). Tyto jednotky lze vidět v anglicky psaných technických textech, například u popisů větráků. Výpočet Podle definice objemového toku se jedná o množství kapaliny procházející za časový interval daným průřezem, tzn. Má-li proudové vlákno průřez o obsahu a kapalina v místě průřezu má rychlost , postoupí částice v průřezu za dobu o dráhu . Trubicí proteče kapalina o objemu . Předchozí vztah lze tedy pro homogenní rozložení rychlosti po průřezu vyjádřit jako , kde je okamžitá rychlost proudění. Vlastnosti Při ustáleném proudění ideální kapaliny v uzavřené trubici zůstává objemový průtok ve všech místech trubice stejný, kapalina se nestlačuje ani neroztahuje, nikde se neztrácí ani nehromadí. Tento jev popisuje rovnice kontinuity. Související články Hltnost Hmotnostní průtok Průtokoměr Mechanika tekutin"} {"instruction": "Create a function to determine if two strings are symmetrical.", "input": "", "output": "def is_symmetrical(str1, str2): for i in range(0, len(str1)): if str1[i] != str2[-i-1]: return False return True"} {"instruction": "Create an API in Python using the Flask framework that can create, read, update, and delete items in a database.", "input": "Not applicable", "output": "from flask import Flask, jsonify, request\n\napp = Flask(__name__)\n\n@app.route('/items', methods=['GET', 'POST'])\ndef items():\n if request.method == 'GET':\n # Return all items\n # ...\n elif request.method == 'POST':\n # Create a new item\n # ...\n\n@app.route('/items/', methods=['GET', 'PUT', 'DELETE'])\ndef item(id):\n if request.method == 'GET':\n # Return item with given id\n # ...\n elif request.method == 'PUT':\n # Update item with given id\n # ...\n elif request.method == 'DELETE':\n # Delete item with given id\n # ...\n\nif __name__ == '__main__': \n app.run(debug=True)"} {"text": "[DE Wikipedia] Fahad al-Mehallel\n\nFahad al-Mehallel (; * 11. November 1970 in Riad) ist ein ehemaliger saudi-arabischer Fußballspieler. Karriere Klub Er begann seiner Karriere in der Saison 1988/89 bei al-Shabab und verbrachte hier auch den Großteil seiner Karriere. Bis zur Saison 1999/2000 gewann er mit seinem Team drei Mal die Meisterschaft und ebenfalls drei Mal den Pokal. Während der Spielzeit 1999/2000 wechselte er zu al-Nasr, wo er bis zur Saison 2001/02 spielte und anschließend seine Karriere beendete. Nationalmannschaft Seinen ersten bekannten Einsatz für die saudi-arabische Nationalmannschaft hatte er am 15. September 1992 bei dem 2:0-Halbfinalsieg im Arabischen Nationenpokal 1992 über Kuwait Er wurde zur 85. Minute für Said al-Uwairan eingewechselt. Auch in beiden Spielen des König-Fahd-Pokals 1992 sowie in zwei Gruppenspielen und dem Finale der Asienmeisterschaft 1992 spielte er. Beim Golfpokal 1992 kam er danach noch auf drei Einsätze. Nun folgten Einsätze in Freundschafts- als auch Qualifikationsspielen zur Weltmeisterschaft 1994. In den Kader Endrunde wurde er dann zwar berufen, erhielt aber keinen Einsatz. Sein nächstes Turnier, wo er auch Spielzeit bekam, war somit der Golfpokal 1994, wo er sogar in jeder Partie eingesetzt wurde. Im darauffolgenden Jahr ging es weiter beim König-Fahd-Pokal 1995, wo er erneut in beiden Partien des Teams zum Einsatz kam. Darauf folgten weitere Freundschaftsspiele und erst mit dem Golfpokal 1996 im Oktober 1996 das nächste Turnier. Zum Ende des Jahres ging es aber nun zur Asienmeisterschaft 1996, wo er es mit seiner Mannschaft wieder bis ins Finale schaffte und letztlich auch den Titel gewann. Erneut ging es weiter mit Freundschaftsspielen, auf die dann auch die ersten Spiele für die Qualifikation zur Weltmeisterschaft 1998 folgten. Zum Ende des Jahres 1997 folgte dann noch die Teilnahme mit seinem Team am Konföderationen-Pokal 1997, wo er in allen drei Gruppenspielen seines Teams spielte. Bei der Weltmeisterschaft 1998 war er auch wieder dabei, kam aber lediglich in einem Gruppenspiel zum Einsatz. Es folgten nach dem Turnier noch einmal vier Freundschaftsspiele, von denen das am 30. September 1999 dann auch sein letztes im Nationaltrikot war. Weblinks Einzelnachweise Fußballnationalspieler (Saudi-Arabien) Teilnehmer an einer Fußball-Weltmeisterschaft (Saudi-Arabien) Fußballspieler (al-Shabab, Saudi-Arabien) Fußballspieler (al-Nassr FC) Saudi-Araber Geboren 1970 Mann"} {"instruction": "Explain what a constructor is and how it is used in C++.", "input": "", "output": "A constructor is a special member function of a class which is used to initialize objects of its class type. A constructor has the same name as the class and its purpose is to initialize the members of an object with the given values when an object of that class is declared. In C++, constructors can be either default or parameterized. The default constructor is used to construct an object without any parameters, while the parameterized constructor is used to initialize an object with given parameters."} {"instruction": "Parse a given JSON string and extract all the values of the key \"name\".", "input": "json_str = '{\"name\": \"Jack\", \"age\": 22, \"status\": \"Active\"}'", "output": "import json parsed = json.loads(json_str) name_list = [] for key, value in parsed.items(): if key == 'name': name_list.append(value) print(name_list)"} {"text": "[EN Wikipedia] Neidy Romero\n\nNeidy Katherine Romero Mendoza (born 14 February 1995) is a Venezuelan footballer who plays as a defender. She has been a member of the Venezuela women's national team. International career Romero represented Venezuela at the 2014 South American U-20 Women's Championship. At senior level, she played the 2014 Copa América Femenina and the 2014 Central American and Caribbean Games. References 1995 births Living people Women's association football defenders Women's association football midfielders Venezuelan women's footballers Venezuela women's international footballers Competitors at the 2014 Central American and Caribbean Games Caracas F.C. (women) players Cúcuta Deportivo footballers Venezuelan expatriate women's footballers Venezuelan expatriate sportspeople in Colombia Expatriate women's footballers in Colombia Venezuelan expatriate sportspeople in Ecuador Expatriate women's footballers in Ecuador People from Ciudad Guayana Sportspeople from Bolívar (state)"} {"instruction": "Create a MySQL query to find the name of all users in a table named \"users\".", "input": "", "output": "SELECT name FROM users;"} {"text": "[DE Wikipedia] Palazzo Nuovo\n\nDer Palazzo Nuovo (deutsch Neuer Palast) in Rom ist der von der Zugangsrampe zum Kapitolsplatz aus gesehen linke Palast. Hierin befinden sich, wie im gegenüberliegenden Konservatorenpalast, zahlreiche Ausstellungsstücke der Kapitolinischen Museen. Geschichte Die Grundsteinlegung für diesen Palast erfolgte im Jahre 1571. Allerdings zog sich dann die eigentliche Erbauung bis ins Jahr 1654 hin, da man im Grunde keinen weiteren Palast hier auf dem Kapitol benötigte. Letztlich war es wohl der Wunsch, die von Michelangelo erdachte Symmetrie des Kapitolsplatzes zu erlangen, die den Ausschlag gab, dass der Palazzo Nuovo als Zwilling zu seinem Gegenüber, dem Konservatorenpalast erstand. Um den Platz optisch zu vergrößern, hat sich Michelangelo eine trapezförmig Anordnung der Paläste zueinander vorgestellt. In der Umsetzung hatte dies zur Folge, dass die drei Paläste (Palazzo Nuovo, Konservatorenpalast und Senatorenpalast) nicht im rechten Winkel zueinander stehen. Auch wurden sie nicht aneinander gebaut, so dass Durchgänge zwischen den Gebäuden vorhanden sind, was dem gesamten Komplex ebenfalls Größe verleiht. Seit 1734 beherbergt der Palazzo Nuovo gemeinsam mit dem Konservatorenpalast die Kapitolinischen Museen – und ist somit Teil der weltweit ersten öffentlich zugänglichen Antiken- und Kunstsammlung. Weblinks Nuovo Campitelli Nuovo"} {"text": "[DE Wikipedia] Riesen-Scheidenstreifling\n\nDer Riesen- oder Doppeltbescheidete Scheidenstreifling (Amanita ceciliae) ist ein Ständerpilz aus der Familie der Wulstlingsverwandten (Amanitaceae). Er ist gekennzeichnet durch große Fruchtkörper mit braunem Hut, ringlosem Stiel und grauer Gesamthülle. Die Art gilt als selten und kommt in europäischen sowie nordamerikanischen Wäldern vor. Merkmale Makroskopische Merkmale Der Hut wird 7–15, selten bis 25 cm im Durchmesser, die Form ist zunächst eiförmig und breitet sich zu einer flachgewölbten oder abgeflachten Form aus. Er hat einen aufgeschlagenen, stark gerieften Hutrand und einen leichten Buckel. Die Oberfläche ist in der Mitte dunkler und zum Rand hin heller in Graubraun bis Braunschwarz gefärbt, glatt und feucht etwas klebrig. Charakteristisch sind darauf verteilte lose, flauschige, kohlegraue Flecken von Volva-Resten. Die Flecken sind leicht ablösbar. Die Hutfarbe ist oft veränderlich und es sind blasse Formen bekannt: Amanita inaurata f. decolora und Amanita ceciliae var. pallida . Amanita inaurata var. royeri ist eine aschschwarzhütige Varietät. Reaktionstests auf der Hutoberfläche mit Kalilauge fallen negativ aus. Das dünne, zarte und brüchige Hutfleisch schmeckt mild und riecht schwach, aber nicht besonders. Es ist weißlich und bleibt im Anschnitt unverfärbt. Die breiten und bauchigen Lamellen stehen frei, gedrängt und sind weiß gefärbt. Die Lamellenschneiden sind flockig besetzt. Der zylindrische und an der Spitze verjüngte Stiel ist 7–20 cm lang und bis zu 3 cm stark. Er ist innen locker ausgestopft und später hohl. Die Oberfläche ist schmutzig weiß bis blass bräunlich und etwas dunkler, bänderartig und feinflockig genattert. Der ringlose Stiel ist um die Basis und das untere Stielteil mit zerbrechlichen, wattigen und bräunlichen oder holzkohlefarbenen Volva-Resten schräg gegürtelt. Die Scheide ist weißlich bis gräulich, puderig und brüchig. Mikroskopische Merkmale Die Sporen sind weiß, sphärisch und nicht amyloid. Sie messen 10,2–14 Mikrometer. Gewöhnlich finden sich ein paar „Riesen“-Sporen in einem Wall von Lamellengewebe. Es finden sich keine Schnallen an den Ansätzen der Basidien. Artabgrenzung Gefährlich wären Verwechslungen mit anderen giftigen Wulstlingen, zu denen die giftigsten europäischen Pilze zählen. Allerdings ist der Riesen-Scheidenstreifling durch die großen Abmessungen und die Gestalt der Fruchtkörper, die 2–3 Ringzonen an der Stielbasis und das Fehlen eines Stielrings gut gekennzeichnet. Ansonsten kämen noch Verwechslungen mit anderen Scheidenstreiflingen infrage. Die potenziellen Doppelgänger entwickeln aber allesamt kleinwüchsigere Fruchtkörper. Ebenfalls auf kalkhaltigen Böden wächst der sehr ähnliche Hellflockige Scheidenstreifling (Amanita beckeri), dessen zunächst weiße Volva sich später etwas bräunlich…"} {"instruction": "Create a program to implement a selection sort in Python.", "input": "[5, 3, 2, 4, 1]", "output": "def selection_sort(arr):\n n = len(arr)\n for i in range(n-1):\n min_index = i\n for j in range(i+1, n):\n if arr[min_index] > arr[j]:\n min_index = j\n arr[i], arr[min_index] = arr[min_index], arr[i]\n return arr"} {"text": "[CS Wikipedia] Xylenol\n\nXylenol (též dimethylfenol) je aromatická sloučenina se dvěma methylovými skupinami a hydroxylovou skupinou (patří tedy mezi fenoly). Existuje šest izomerů z nichž nejdůležitější je 2,6-xylenol (2,6-dimethylfenol) s oběma methylovými skupinami v poloze ortho vůči hydroxylové skupině. Název „xylenol“ je kombinací názvů xylen a fenol, což jsou sloučeniny, od nichž je xylenol odvozen. Některé vlastnosti Fyzikální vlastnosti všech izomerů xylenolu jsou velmi podobné. Použití Xylenoly jsou společně s kresoly (a „kyselinou kresylovou“, což je triviální název pro směs kresolů, případně pro kyseliny obsažené v ropě nebo uhelném dehtu) důležitou třídou fenolů s velkým významem pro průmysl. Používají se jako pesticidy a pro výrobu antioxidantů. Xylenolová oranž je redoxní indikátor na bázi xylenolu. 2,6-xylenol je monomer pro přípravu poly(p-fenylenoxid)ových pryskyřic, a to prostřednictvím oxidativního párování uhlík-kyslík. Je možná také dimerizace uhlík-uhlík. V jedné studii se 2,6-xylenol oxiduje jodozobenzendiacetátem s pětinásobným nadbytkem fenolu. V prvním kroku navrženého reakčního mechanismu se acetylové skupiny v jodové sloučenině nahrazují fenolem. Tento komplex disociuje na arylový radikálový anion a fenoxidový zbytek. Dva arylové radikály rekombinují a tvoří novou kovalentní vazbu uhlík-uhlík, následně ztrácí dva protony v rearomatizačním kroku. Okamžitým reakčním produktem je difenochinon jakožto výsledek čtyřelektronové oxidace. Nicméně lze syntetizovat i bifenylové sloučeniny, a to komproporcionací chinonu již přítomným xylenolem. V této reakční posloupnosti se nakonec hypervalentní jodové reagencium redukuje na fenyljod. 3,5,3',5'-tetramethyl-bifenyl-4,4'-diol se používá jako redukční činidlo pro stříbrné sloučeniny ve fotografii a jako složka epoxidových pryskyřic. Externí odkazy Datasheet 2,6 isomer Datasheet 2,5 isomer Datasheet 2,4 isomer Datasheet 2,3 isomer Datasheet 3,4 isomer Datasheet 3,5 isomer Reference Alkylfenoly"} {"instruction": "Find and replace all occurrences of \"cat\" with \"dog\" in the given string.", "input": "I have a cat and two cats", "output": "I have a dog and two dogs"} {"instruction": "Write a function in JavaScript that takes a given array and prints its elements in reverse order.", "input": "[1, 2, 3, 4]", "output": "function reverseArray(arr) { let reversedArr = []; let index = arr.length - 1; while (index >= 0) { reversedArr.push(arr[index]); index--; } return reversedArr; }"} {"instruction": "Make changes to the following code to include a 'break' statement.", "input": "while True: print(\"Hello\")", "output": "while True: print(\"Hello\") if condition is met: break"} {"instruction": "Select all the records in the given table where the ID is greater than 5.", "input": "Table ID | Name | Address 1 | John | UK 2 | Jack | US 5 | Mary | UK 11 | Chris | Canada", "output": "SELECT * FROM Table WHERE ID > 5;"} {"text": "[CS Wikipedia] De Koel\n\nDe Koel nebo celým názvem podle sponzora Seacon Stadion – De Koel je fotbalový stadion v nizozemském městě Venlo a je domovem klubu VVV-Venlo. Kapacita je 8 000, z toho je 1 500 míst ke stání. Otevřen byl 19. března 1972 inauguračním zápasem mezi VVV-Venlo a Camburem, který skončil remízou 1:1. V roce 2007 prošel modernizací poté, co klub postoupil do nizozemské nejvyšší ligové soutěže Eredivisie. Od roku 2005 přijal název Seacon Stadion jako smluvní závazek vůči sponzorovi. De Koel je jedním z nejmenších stánků v Eredivisii, klub proto plánuje přestěhování do většího. Odkazy Reference Související články Seznam největších evropských stadionů podle kapacity Externí odkazy Info o stadionu na vvv-venlo.nl Info o stadionu na stadiumdbl.com Fotbalové stadiony v Nizozemsku"} {"text": "[EN Wikipedia] George Vasey (botanist)\n\nGeorge Vasey (February 28, 1822 – March 3, 1893) was an English-born American botanist who collected a lot in Illinois before integrating the United States Department of Agriculture (USDA), where he became Chief Botanist and curator of the greatly expanded National Herbarium. Biography George Vasey was born in 1822 near Scarborough, England, the fourth of ten children. His family emigrated to the United States the next year, and they established in Oriskany, New York. He left school at 12 to take a job as a store clerk. He took interest in botany after borrowing and, since he could not afford the volume, manually copying a book on the subject. This interest was later encouraged after a chance encounter with Peter D. Knieskern, another naturalist who allowed Vasey to begin writing to various other botanists. Until 1870 he would maintain an extensive correspondence and collect a great many specimens both in Oneida County and later McHenry County, but did not publish material of scientific relevance until the 1870s. Vasey married Martha Jane Scott in 1846, having graduated the same year from Berkshire Medical Institute with a M.D. degree, and shortly after they moved to establish themselves in Ringwood, Illinois. In 1854 he opened a dry good store to support his family of 7: four children and his mother. In 1858 he was a founding member of the Illinois Natural History Society, and over the next few years, began writing prolifically for the society and the Prairie Farmer. He had two more children by 1861, but in 1864 he lost his youngest to whooping cough. When his wife began to grow weaker, Vasey relocated the family to Richview, to no avail. Martha Vasey died in 1866. After a brief period where he stopped writing, he remarried to a widow, but was beset with heavy financial trouble by the time John Wesley Powell invited him to participate in an expedition in 1868. Greatly enthused by the adventure, he dedicated himself to scientific pursuit. He briefly edited Entomologist and Botanist before being curator of the Illinois State University Natural History Museum. He resigned the latter position to succeed Charles Christopher Parry as the USDA Chief Botanist. He quickly began work to improve the poor state of the National Herbarium, then organized an exhibit of the country's trees for the Centennial Exposition. The herbarium, hosted by the Smithsonian Institution, is considered the crowning of his career, particularly its grass collection, of which he was a specialist; in 1889 the Institute named him Honorary Curator. As Chief Botanist he launched the Contributions from the United States National Herbarium. With George Thurber he worked on grasses for Asa Gray and John Torrey's Flora of North America. He was granted an honorary M.A. in 1864 from Illinois…"} {"instruction": "Implement a function in Python that prints the average of the two numbers passed as arguments.", "input": "x=15\ny=20", "output": "def compute_average(x, y):\n\treturn (x + y) / 2\n\nprint(compute_average(x,y))"} {"instruction": "Write a Python program to modify a given list such that each element is equal to the square of the original element minus 2.", "input": "sample_list = [3, 5, 7, 9]", "output": "modified_list = [7, 15, 23, 31]\n\n# Python code\nsample_list = [3, 5, 7, 9]\n\nmodified_list = [x**2 - 2 for x in sample_list]"} {"instruction": "Create an SQL query to select all columns from the table \"Employees\" in a database named \"CompanyDB\".", "input": "", "output": "SELECT * FROM CompanyDB.Employees;"} {"text": "[EN Wikipedia] 2010 Omiya Ardija season\n\n2010 Omiya Ardija season Competitions J. League 1 Emperor's Cup J. League Cup Player statistics Other pages J. League official site Omiya Ardija Omiya Ardija seasons"} {"instruction": "Create a Python program to generate 10 random numbers between 0 and 10.", "input": "", "output": "import random\n\nrandom_numbers = []\n\nfor i in range(10):\n random_numbers.append(random.randint(0,10))\n\nprint(random_numbers)"} {"text": "[DE Wikipedia] Paris–Luxemburg 1969\n\nParis–Luxemburg 1969 war die 7. Austragung von Paris–Luxemburg, einem mehrtägigen Etappenrennen. Das Rennen wurde von Eddy Merckx vor Felice Gimondi und Roger De Vlaeminck gewonnen. Teilnehmende Mannschaften Etappenübersicht Ergebnisse Gesamtwertung Teamwertung Weblinks Paris–Luxembourg 1969 Einzelnachweise Radrennen 1969"} {"instruction": "Write a Python script that prints the numbers 1 to 10 and their squares.", "input": "Not applicable", "output": "def print_squares():\n for i in range(1, 11):\n print(f'{i} : {i*i}')\n\nprint_squares()"} {"text": "[DE Wikipedia] Viktor-Bubanj-Kaserne\n\nDie Kaserne „Viktor Bubanj“ war eine Kaserne der JNA in Sarajevo, die während des Bosnienkriegs offiziell als Militärgefängnis der bosnischen Regierungstruppen diente. Sie war nach dem ehemaligen Generalstabschef der JNA Viktor Bubanj († Oktober 1972) benannt, bekam zu Beginn des Krieges aber – nach einem gefallenen Kommandanten der ARBiH – den Namen Ramiz Salčin. Inzwischen wurde der Gebäudekomplex im Zentrum Sarajevos, Kraljice Jelene 88, zum Sitz der Staatsanwaltschaft und als Untersuchungsgefängnis umgebaut. Human Rights Watch berichtet von zahlreichen Misshandlungen an bosnischen Serben zwischen 1992 und 1995. Die Vereinigung serbischer Lagerinsassen der Republika Srpska spricht von über 2000 Zivilisten, die in diesem Lager gefoltert, misshandelt oder umgebracht wurden. 2003 wurde ein Mahnmal zur Erinnerung an die Opfer des Lagers aufgestellt. Weblinks Bericht von Human Rights Watch über Misshandlungen in der Viktor-Bubanj-Kaserne, 10/1994 Einzelnachweise Internierungslager Bosnienkrieg Kaserne Bauwerk in Sarajevo-Novi Grad"} {"instruction": "What are the characteristics of a Function in JavaScript?", "input": "", "output": "A function in JavaScript is a block of code that is delimited by curly brackets and is designed to perform a specific task. It consists of a function declaration, which includes the function name and its parameters, and a function body containing the code that is to be executed when the function is called. The function can return a value and can be either named or anonymous. Functions can also accept arguments and can be used to create objects and closures."} {"text": "[DE Wikipedia] OpenUI5\n\nOpenUI5 ist ein JavaScript-Framework, entwickelt um betriebssystemunabhängige Geschäftsanwendungen zu erstellen. Es ist ein Open-Source-Projekt und wird von der SAP SE unter der Apache-2.0-Lizenz entwickelt und ist offen für Erweiterungen. Der OpenUI5-Kernel basiert auf JavaScript, jQuery, und LESS. Die Bibliothek beinhaltet die MVC-Architekturbausteine mit Optionen für verschiedene Ansichten und Modellformate. Geschichte Die Bibliothek wurde im Dezember 2013 als Open Source veröffentlicht, nachdem sie einige Jahre bei SAP in der Produktion war. Seit Oktober 2014 akzeptiert das Team Erweiterungen über GitHub. Vertriebsstatus Im Gegensatz zu DHTMLX, Kend UI oder Webix, vergleichbar mit dōjō toolkit und Ext JS, sind alle Komponenten von OpenUI5 kostenlos und es gibt keine bezahlten „Premium“-Funktionen: Haupteigenschaften 180 Steuerungen für die Benutzeroberfläche, hardwareübergreifend gruppiert (Telefon, Tablets und Desktop-PCs): Menü, Karussell, Panel, Toolbar, Icon Tabelle, Layout, Verfügbarkeitsgrids, Splitter, Listen, Tabellen, Dialoge, Nachrichtenboxen, Verfügbarkeits-Popup, Kalender, Comboboxen, Datumsauswahlhilfe, Dateiuploader, Bewertungsindikator, Segmentknöpfe, Slider, Tagdisplays etc. und für die Desktop-Steuerung: Akkordeon, Farbauswahl, Landkarte, Tabellenbaum etc. WYSIWYG-Themendesigner (zurzeit noch nicht Opensource) MVC-Architektur Verschiedene Ansichten (XML, HTML, JavaScript oder JSON) Databinding mit OData-, JSON- oder XML-Modellen I18n, Rechts-nach-Links-Sprachsupport Konsistente UX-Bausteine auf allen Frontendeigenschaften Literatur Weblinks Offizielle Website Quelltextrepository auf GitHub Einzelnachweise JavaScript-Bibliothek"} {"instruction": "Create a code in Python to send automated email notifications to customers when their orders have been delivered.", "input": "", "output": "import smtplib\n\ndef send_notification(email):\n '''This function will send automated email notifications to customers when their orders have been delivered'''\n sender = eamil@example.com\n receiver = email\n message = f\"Your order has been delivered. Thank you for choosing us. \"\n try:\n smtpObj = smtplib.SMTP('smtp.example.com', 587)\n smtpObj.login('email@example.com', 'password')\n smtpObj.sendmail(sender, receiver, message)\n print('Notification sent successfully')\n except Exception as e:\n print('Could not send notification.')\n print(e)"} {"instruction": "Write a Python program that takes a dataset as input and calculates the sum, mean and median of the data.", "input": "DataSet = [1, 5, 8, 9, 12, 17, 20]", "output": "s=73\nmean=10.428571\nmedian=9\n \n# Program to calculate the sum,mean,median of the data\n \ndataset = [1,5,8,9,12,17,20]\n \n# calculate the sum\ns = 0\nfor items in dataset:\n s = s + items\n \n# calculate mean\nmean = s/len(dataset)\n \n# calculate median\ndataset_sorted = sorted(dataset)\nm_m = len(dataset_sorted)\n \nif m_m%2 == 0:\n # n is even\n m1 = dataset_sorted[int(m_m/2) - 1]\n m2 = dataset_sorted[int((m_m/2))]\n median = (m1 + m2)/2\nelse:\n # n is odd\n median = dataset_sorted[int((m_m+1)/2 - 1)]\n \n# display the results\nprint(\"sum:\", s)\nprint(\"mean:\", mean)\nprint(\"median:\", median)"} {"instruction": "Given a list of strings, write a function which will return only strings which start with an uppercase letter.", "input": "String List = [\"hello\", \"World\", \"foo\", \"bar\"]", "output": "def extract_capital_words(string_list): capital_words = [] for word in string_list: if word[0].isupper(): capital_words.append(word) return capital_words"} {"instruction": "Create a function to calculate the Levenshtein distance between two strings", "input": "str1 = \"geeks\", str2 = \"geek\"", "output": "def lev_dist(str1, str2): if len(str1) < len(str2): return lev_dist(str2, str1) if len(str2) == 0: return len(str1) previous_row = range(len(str2) + 1) for i, c1 in enumerate(str1): current_row = [i + 1] for j, c2 in enumerate(str2): insertions = previous_row[j + 1] + 1 deletions = current_row[j] + 1 substitutions = previous_row[j] + (c1 != c2) current_row.append(min(insertions, deletions, substitutions)) previous_row = current_row return previous_row[-1]"} {"instruction": "Create a program in Python that takes a sentence as an input and prints out the sentence in reverse.", "input": "Hello world!", "output": "def reverse_sentence(sentence): \n words = sentence.split() \n newWords = [word[::-1] for word in words] \n newSentence = \" \".join(newWords) \n return newSentence\n\nprint(reverse_sentence(\"Hello world!\"))"} {"instruction": "Generate code for an ML model object-tracking system in Python. The system should be able to detect the objects like pedestrian, vehicle, animals and track the movement of the object.", "input": "Not applicable", "output": "import cv2\nimport numpy as np\n\n# Setup Video Capture\ncap = cv2.VideoCapture(0) # 0 is the default webcam\n\n# Object Classifier\nobject_classifier = cv2.CascadeClassifier('object.xml')\n\n# Tracking\nwhile True: \n ret, frame = cap.read()\n gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)\n\n # Detect Objects\n objects = object_classifier.detectMultiScale(gray, 1.3, 5)\n\n for (x,y,w,h) in objects:\n cv2.rectangle(frame, (x,y), (x+w, y+h), (255,0,0), 2)\n cv2.putText(frame, 'Objects', (x,y), cv2.FONT_HERSHEY_COMPLEX, 1, (0,255,0), 2)\n\n # Track the objects\n cv2.imshow('Object Tracking', frame)\n if cv2.waitKey(1) == 27: # Press Escape to exit\n break\n\ncap.release()\ncv2.destroyAllWindows()"} {"text": "[HI Wikipedia] अरबी भाषा\n\nअरबी भाषा सामी भाषा परिवार की एक भाषा है। ये हिन्द यूरोपीय परिवार की भाषाओं से मुख़्तलिफ़ है, यहाँ तक कि फ़ारसी से भी। ये इब्रानी भाषा से सम्बन्धित है। अरबी इस्लाम धर्म की धर्मभाषा है, जिसमें क़ुरान-ए-शरीफ़ लिखी गयी है। देश अरब कई देशों की राजभाषा है, जैसे सउदी अरब, लेबनान, सीरिया, यमन, मिस्र, जॉर्डन, इराक़, अल्जीरिया, लीबिया, सूडान, क़तर, ट्यूनिशिया, मोरक्को, माली इत्यादि। दुनिया की सारी भाषाए लिपि अरबी भाषा को अरबी लिपि में लिखा जाता है। ये दाएँ से बाएँ लिखी जाती है। इसकी कई ध्वनियाँ उर्दू की ध्वनियों से अलग हैं। हर एक स्वर या व्यंजन के लिये (जो अरबी भाषा में प्रयुक्त होता है) इतिहास इन्हें भी देखें अरबी साहित्य बाहरी कड़ियाँ अरबी-हिन्दी कोश (केन्द्रीय हिन्दी निदेशालय) सामी भाषाएँ विश्व की प्रमुख भाषाएं अरबी भाषा"} {"text": "[HI Wikipedia] सिक्लिड\n\nसिक्लिड (Cichlid) पर्सिफ़ोर्मेज़ गण के सिक्लिडाए कुल की हड्डीदार मछलियाँ होती हैं। वे लैब्रोइडेइ (Labroidei) नामक उपगण की सदस्य होती हैं जिसमें कुछ अन्य मछली कुल भी शामिल हैं। सिक्लिडों का कुल विस्तृत और विविध है। वर्तमान में इस कुल में १,६५० से अधिक जातियाँ मिल चुकी हैं और हर वर्ष यह गिनती बढ़ती जाती है। सम्भव है कि इस कुल में २०००-३००० जातियाँ हों। मछली पालन के शौकीन अक्सर सिक्लिडों को अपने घरों में पालते हैं। इन्हें भी देखें पर्सिफ़ोर्मेज़ किरण-फ़िन मछलियाँ सन्दर्भ सिक्लिडाए लैब्रोइडेइ"} {"instruction": "Create a python program to test if a number is even or odd.", "input": "", "output": "def is_even(num):\n if num%2==0:\n return True\n else:\n return False"} {"instruction": "Design a Python dictionary for storing data about countries and their corresponding capital cities.", "input": "", "output": "countries_cities = {\n \"UK\": \"London\", \n \"France\": \"Paris\", \n \"Spain\": \"Madrid\", \n \"Germany\": \"Berlin\", \n \"Italy\": \"Rome\"\n }"} {"instruction": "What is the volume of a sphere with radius 7 cm?", "input": "", "output": "The volume of a sphere with radius 7 cm is 1436.755 cm3."} {"instruction": "Create a JavaScript function that takes a name as a parameter and replaces spaces with '_'", "input": "Tom Smith", "output": "function replaceSpace(name){ return name.replace(/\\s/g,'_'); }"} {"instruction": "Compose a Python function to retrieve all documents from a Firebase Realtime Database collection.", "input": "A Firebase project URL and collection name", "output": "def get_all_docs(project_url, collection_name): # project_url and collection name\n # Your Firebase Config\n firebaseConfig = {\n \"apiKey\": \"apiKey\",\n \"authDomain\": \"projectId.firebaseapp.com\",\n \"databaseURL\": project_url,\n \"storageBucket\": \"\",\n }\n\n # Initialize Firebase\n firebase = pyrebase.initialize_app(firebaseConfig)\n\n # Get a reference to the database\n db = firebase.database()\n \n # Get the documents in the specified collection\n docs = db.child(collection_name).get()\n\n return docs.val()"} {"instruction": "Write a function in JavaScript to perform the following operation:", "input": "Add two numbers a and b", "output": "function sum(a, b) { return a + b; }"} {"instruction": "Write an SQL query to find the oldest user in the users table.", "input": "", "output": "SELECT * FROM users ORDER BY age DESC LIMIT 1;"} {"instruction": "Construct an SQL query to find the number of records where the value in a certain column is greater than a specified value.", "input": "", "output": "SELECT COUNT(*) FROM TABLE_NAME WHERE COLUMN_NAME > VALUE;"} {"instruction": "Design a class in Java for creating a 2D point.", "input": "", "output": "public class Point { double x,y; public Point(double x, double y) { this.x = x; this.y = y; } public double getX() { return x; } public double getY() { return y; } public void setX(double x) { this.x = x; } public void setY(double y) { this.y = y; } public double distance(Point other) { return Math.sqrt(Math.pow(x - other.getX(), 2) + Math.pow(y - other.getY(), 2)); } }"} {"text": "[HI Wikipedia] गढ़वा\n\nगढ़वा (Garhwa) भारत के झारखण्ड राज्य के गढ़वा ज़िले में स्थित एक शहर है। यह ज़िले का मुख्यालय भी है। राष्ट्रीय राजमार्ग 39 यहाँ से गुज़रता है। विवरण यह गढवा ज़िले का मुख्यालय है। ज़िले का निर्माण पलामू के आठ प्रखंडो को मिलाकर 1 अप्रैल 1991 को किया गया जो पलामू के दक्षिण पश्चिम हिस्से में स्थित थे। गढवा के दक्षिण में कनहर नदी बहती है जो इसे छत्तीसगढ़ से अलग करती है, पूर्व में पलामू है और पश्चिम में छत्तीसगढ का सरगुजा जिला तथा उत्तर प्रदेश का सोनभद्र जिला है। गढवा के प्रखंडों में गढवा सहित- मेराल, रंका, भंडरिया, मंझिआंव, नगर उंटारी, भवनाथपुर एवं धुरकी शामिल थे। बाद में इन्हीं प्रखंडों में से छह और नये प्रखंड सृजित किए गए जिनमें डंडई, चिनिया, रमना, रमकंडा एवं कांडी शामिल थे। यातायात गढवा रेल एवं सडक द्वारा भारत के बाकी हिस्सों से सुगम संपर्क में है। झारखंड में रांचीएवं अन्य स्थानों से गढवा के लिए सीधी बस सेवा उपलब्ध है। इसके अलावा बिहार एवं छत्तीसगढ के भी कुछ अन्य स्थानों से यहां के लिए बस सुविधा है। इस जिले से होकर कोई राष्ट्रीय राजमार्ग नहीं गुजरती लेकिन २१० किलोमीटर राज्य उच्च पथ एवं ९६ किलोमीटर लंबाई की जिला सडक इस शहर के विभिन्न हिस्सों को जोडती है। जिनमें गढवा मुरीसेमर रोड जो नगर उंटारी होते हुए झारखंड को उत्तर प्रदेश के बनारस एवं इलाहाबाद क्षेत्रों से जोडता है, तथा रेहला गोदरमना]] रोड जो गढवा को नव निर्मित प्रदेश छत्तीसगढ़ से जोडता है। रेलगाडी से यहां पहुंचने के लिए सबसे नजदीकी स्टेशन गढ़वा टाउन है। यह जिला अभी भी वायु मार्ग से नहीं जुडा है। मंदिर यहां एक \"गढदेवी मंदिर\" है ,जो कि गढ़वा शहर के बीचों-बीच स्थित है तथा आसपास के क्षेत्र में लोकप्रिय एवं प्रसिद्ध है। और गढ़वा जिले के बिशुनपुरा प्रखंड में विष्णु मंदिर,खोटा बाबा का मंदिर और केतार के मां चतुर्भुजी भगवती मंदिर है ये मंदिर बहुत ही प्रतिष्ठित है। और साथ ही नगर उंटारी के बंशीधर मंदिर भी काफी लोकप्रिय हैं। पर्टयन स्थल गढ़वा के धुरकी प्रखंड में स्थित सुखालदारी जलप्रपात बहुत ही प्रशिद्ध है इन्हें भी देखें गढ़वा ज़िला सन्दर्भ गढ़वा ज़िला झारखंड के शहर गढ़वा ज़िले के नगर"} {"text": "[EN Wikipedia] Galaxy 4 (disambiguation)\n\nGalaxy 4 may refer to: Technology Samsung Galaxy S4, an Android smartphone produced by Samsung Samsung Galaxy Tab S4, an Android tablet produced by Samsung Galaxy IV, a satellite belonging to Intelsat's Galaxy fleet Other uses Galaxy 4, the first serial of the third season in the British science fiction television series Doctor Who"} {"instruction": "Create a Python function which takes a list of positive integers as its argument and returns the sum of the largest and the second largest number in the list.", "input": "[123, 534, 745, 321, 876]", "output": "def get_sum(nums):\n assert all(n >= 0 for n in nums), \"list items must all be positive!\"\n\n # return the sum of the two largest numbers\n max_num = max(nums)\n nums.remove(max_num)\n second_max_num = max(nums)\n return max_num + second_max_num\n\n# test\nmy_list = [123, 534, 745, 321, 876]\nprint(get_sum(my_list)) # will print out 1671"} {"text": "[DE Wikipedia] Champian Fulton\n\nChampian Fulton (* 12. September 1985 in Norman, Oklahoma) ist eine US-amerikanische Jazzpianistin und -sängerin. Leben und Wirken Champian Fultons Vater ist der Trompeter und Flügelhornspieler Stephen Fulton, der mit Clark Terry befreundet ist. Bereits in der Highschool arbeitete sie mit eigenen Bands in LeMars (Iowa), wo ihr Vater als Leiter des Clark Terry Institute for Jazz Studies tätig war. 2001 hatte sie ein erstes Engagement in Maker's Cigar & Piano Bar in Oklahoma City. Sie studierte dann Musik am Konservatorium der State University of New York at Purchase und zog anschließend nach New York City, um in Jazzclubs und Restaurants in Manhattan mit Standards-Interpretationen aufzutreten, u. a. im Birdland, Lincoln Center, Smalls und im Dizzy’s. Im Jahr 2006 nahm sie ihr Debütalbum mit den Sultans of Swing unter Leitung von David Berger auf, 2011 konzertierte sie in Deutschland mit der WDR Big Band Köln im Programm Songs from the Thirties. Sie arbeitete um 2012 im Trio mit dem Bassisten Neal Miner und dem Schlagzeuger Fukushi Tainaka; im Laufe ihrer bisherigen Karriere spielte sie u. a. mit Jimmy Cobb, Frank Wess, Lou Donaldson und Louis Hayes. 2014 brachte Cellar Live (Cory Weeds’ Cellar Jazz Club) das Album Change Partners: Live at the Yardbird Suite (mit Jodi Proznick (b), Julian MacDonough (dr) und Cory Weeds (ts)) heraus. Auszeichnungen Beim Critic’s Poll des Down Beat wurde Fulton 2013 und 2014 bester Newcomer (Rising star) ausgezeichnet; 2006 war sie Finalistin beim Kathleen B. Turner Jazz Piano Competition der University of West Florida. 2009 erhielt sie den American Music Award in der Kategorie Bester Jazzvokalist und Pianist des Jahres. Diskographische Hinweise Champian Fulton with David Berger & The Sultans of Swing (2007) Sometimes I'm Happy (2010) The Breeze And I (2011) Sings and Swings (Sharp Nine, 2012) Speechless (2017) Birdsong (2020) Live from Lockdown (2021), mit Stephen Fulton Meet Me at Birdland (2023) Weblinks Webpräsenz von Champian Fulton Einzelnachweise Jazz-Pianist Jazz-Sänger Musiker (Vereinigte Staaten) US-Amerikaner Geboren 1985 Frau"} {"instruction": "Create a code snippet for making a POST request using Python.", "input": "", "output": "import requests url = 'https://www.example.com' data = {'var1': 'value1', 'var2': 'value2'} response = requests.post(url, data=data)"} {"instruction": "Reverse this sentence: \"I can do coding.\"", "input": "", "output": "\"coding do can I\""} {"instruction": "Create a Python program to generate random passwords that contains numbers, alphabets (upper and lower) and special characters", "input": "", "output": "import random\n \n# define string of all characters\nstring = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+~<>?'\n \n# specify length of random password\nlength = 8\n \n# generate random password\nrandom_password = \"\"\nfor i in range(length):\n random_password = random_password + random.choice(string)\n\nprint(random_password)"} {"instruction": "Create a function in Python to find all elements of a given list whose sum is equal to a given number.", "input": "list = [5, 7, 9, 4] number = 18", "output": "def find_elements(list, number): result = [] for i in range(len(list)): for j in range(i + 1, len(list)): if list[i] + list[j] == number: result.append([list[i], list[j]]) return result # Driver code list = [5, 7, 9, 4] n = 18 print(find_elements(list, n))"} {"instruction": "Create a JavaScript function that takes two strings of equal length and returns the positions of the characters which don't match.", "input": "\"abcdefg\", \"hijklmn\"", "output": "function findNonMatchingPos(str1, str2) { let positions = []; if(str1.length != str2.length) { return -1; //handle unequal lengths } for(let i = 0; i < str1.length; i++) { if(str1.charAt(i) !== str2.charAt(i)) { positions.push(i); } } return positions; }"} {"text": "[EN Wikipedia] May-a\n\nMaya Cumming (born 2001), known professionally as May-a (stylised in all caps), is an Australian singer-songwriter from Sydney, New South Wales. On 2 February 2022, Cumming was featured on the single \"Say Nothing\", a collaboration with Australian electronic musician and producer Flume. Early life May-a grew up in Sydney, but moved to Byron in 2010. She moved back to Sydney age 13. Whilst living in Byron Bay she competed in songwriting competitions, and performed street busking around the ages of 11 to 14. She started out posting videos on YouTube under the username Heyit'smaya. Prior to discovering her attraction to women, May-a stated she was in a \"super awkward\" relationship with a boy that inspired her song \"Apricots\". Career May-a released their debut single \"Fools Paradise\" in September 2019. This was followed by \"All Girls Aren't the Same\", which is a twist of Juice WRLD's \"All Girls Are the Same\" and is a song about how women should know their worth, everyone is an individual with different quirks.\" On 1 May 2020, May-a released their third single, \"Green\" saying \"'Green' is an outlook on the way that validation fuels the way we live, especially in green teens. Young, impressionable and desperate to be accepted by people they don't even like.\" adding \"I wrote it when I was 15 and bored by the hierarchy of high school. It paints a picture of the things that teenagers think are important until they realise they aren't.\" In August 2020, May-a toured with Wafia and signed with Sony Music Australia. Her debut EP, Don't Kiss Ur Friends, was released on 6 August 2021. The EP debuted at number 31 on the ARIA Charts. In January 2023, May-a released \"Sweat You Out My System\". May-a topped Triple J Hottest 100, 2022 with a feature on Australian musician Flume's song \"Say Nothing\". The song was also featured in the 2022 Netflix show Heartbreak High. In June 2023, May-a released \"Lola\" and announced their second EP Analysis Paralysis. Discography Extended plays Singles As lead artist As featured artist Awards and nominations AIR Awards The Australian Independent Record Awards (commonly known informally as AIR Awards) is an annual awards night to recognise, promote and celebrate the success of Australia's Independent Music sector. ! |- | 2023 | \"Say Nothing\" (with Flume) | Best Independent Dance, Electronica or Club Single | | APRA Awards The APRA Awards are presented annually from 1982 by the Australasian Performing Right Association (APRA), \"honouring composers and songwriters\". They commenced in 1982. ! |- | rowspan=\"2\"| 2023 | rowspan=\"2\"| \"Say Nothing\" (Flume featuring May-a) | Song of the Year | | rowspan=\"2\"| |- | Most Performed Dance/ Electronic Work of the Year | ARIA Music Awards The ARIA Music Awards is an annual ceremony presented by Australian…"} {"instruction": "Identify any inefficient coding practices used in the following snippet.", "input": "def find_largest(number_list): #Define variable for holding the biggest number largest = 0 for num in number_list: if num > largest: largest = num return largest", "output": "The code works, however the variable `largest` is not properly initialized. Instead of setting it to 0, it should be set to the first element in the list - `number_list[0]`. This will improve the efficiency of the code, as it will not have to perform unnecessary comparisons."} {"instruction": "Suggest an efficient algorithm for sorting the following list.", "input": "[7, 1, 4, 8, 9, 2]", "output": "def sort(array): length = len(array) for i in range(length): j = i while j > 0 and array[j-1] > array[j]: # Swap elements array[j], array[j-1] = array[j-1], array[j] j -= 1 return array"} {"instruction": "Create a python script to identify if a given string is a valid IPv4 address or not.", "input": "String: 192.168.25.688", "output": "def is_valid_ipv4(ip):\n parts = ip.split('.')\n if len(parts) != 4:\n return False\n for part in parts:\n if not part.isdigit():\n return False\n if int(part) < 0 or int(part) > 255:\n return False\n return True\n\nprint(is_valid_ipv4('192.168.25.688'))\n\nOutput: False"} {"instruction": "Write a Python code to find the nearest integer to a given number.", "input": "", "output": "def nearest_integer(number):\n if number - int(number)>= 0.5:\n return int(number) + 1\n else:\n return int(number)"} {"text": "[CS Wikipedia] Kostel svatého Jana Křtitele (Horní Cerekev)\n\nKostel svatého Jana Křtitele je filiální a hřbitovní kostel v římskokatolické farnosti Horní Cerekev, nachází se na západním okraji města Horní Cerekev uprostřed hřbitova. Kostel je jednolodní barokní stavba s pozdně gotickým jádrem s polygonálním závěrem, předsazenou předsíní s kamennou deskou s erbem. Kostel je chráněn jako kulturní památka České republiky. Historie Kostel byl původně kaplí, která byla na místě hřbitova postavena v době před počátkem 15. století, kaple byla zasvěcena svatému Linhartovi. Koncem 15. století byla kaple upravena a přestavěna na kostel. V roce 1700 bylo zasvěcení kostela změněno k Janu Křtiteli. Roku 1821 byla obec postižena velkým požárem, kdy kostel vyhořel, spolu s ním shořel i Kostel Zvěstování Panny Marie v centru obce. Odkazy Reference Související články Horní Cerekev Římskokatolická farnost Horní Cerekev Externí odkazy Farnost na stránkách biskupství českobudějovického Jan Křtitel Horní Cerekev Jana Křtitele Horní Cerekev Horní Cerekev Kulturní památky v okrese Pelhřimov Stavby v Horní Cerekvi"} {"text": "[CS Wikipedia] Jan Verner\n\nJan Verner (* 3. března 1951, Mladá Boleslav) je bývalý československý motocyklový závodník, reprezentant v ploché dráze. Jeho bratrem byl plochodrážní závodník Václav Verner a strýcem bývalý plochodrážní závodník Miloslav Verner. Závodní kariéra Ve finále Mistrovství světa jednotlivců na ploché dráze startoval v letech 1977 v Göteborgu (15. místo) a 1978 v Londýně (12. místo). Ve finále Mistrovství světa dvojic na ploché dráze startoval v letech 1977 v Manchesteru (4. místo) a v roce 1981 v Chorzowě (4. místo). Ve finále Mistrovství světa družstev na ploché dráze v roce 1977 ve Wroclawi (s Jiří Štanclem, Václavem Vernerem a Alešem Drymlem) získal za 3. místo bronzovou medaili a v roce 1978 v Landshutu (s Jiřím Štanclem, Václavem Vernerem, Alešem Drymlem a Petrem Ondrašíkem) skončil na 4. místě. Dvakrát startoval ve finále Mistrovství světa na dlouhé ploché dráze – v roce 1977 skončil na 14. místě a v roce 1978 na 13. místě. V Mistrovství světa jednotlivců na ledové ploché dráze skončil v roce 1977 v Inzellu na 6. místě. V Mistrovství Československa na ploché dráze skončil na 3. místě v letech 1976-1978. V Československu jezdil za Rudou hvězdu Praha. V britské profesionální lize jezdil v letech 1978-1979 za Exeter Falcons a v letech 1980 a 1982 za Swindon Robins. Odkazy Reference Externí odkazy Speedway History Info Speedway riders, history and results Nezpomínejme na legendy Ojedinělý rekord Jana Vernera vydrží zřejmě na věky Českoslovenští plochodrážní jezdci Čeští plochodrážní jezdci Narození 3. března Narození v roce 1951 Narození v Mladé Boleslavi Žijící lidé Muži"} {"instruction": "Write a Python code that prints the longest continuous increasing sequence of integers within a given list.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9]", "output": "def longest_continuous_increasing(arr): \"\"\"Function to return the length of the longest continuous increasing sequence of integers within a given list Args: arr (list): a list of integers Returns: int: the length of the longest continuous increasing sequence \"\"\" n = len(arr) max_len = 0 curr_len = 1 for i in range(1, n): if arr[i] > arr[i-1]: curr_len += 1 else: # update current length of the increasing sequence max_len = max(curr_len, max_len) curr_len = 1 return max(max_len, curr_len) # Driver code arr = [1, 2, 3, 4, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9] print(longest_continuous_increasing(arr)) # Output: 9"} {"instruction": "Generate a Python program which reads a string as input and removes all vowels present in the string and print out the revised string.", "input": "apple", "output": "def removeVowels(string): \n vowels = ('a', 'e', 'i', 'o', 'u') \n revised_string = \"\"\n for letter in string:\n if letter.lower() not in vowels:\n revised_string += letter \n return revised_string\n \nstring = \"apple\"\nreviseString = removeVowels(string)\nprint(\"Revised string =\", reviseString)"} {"instruction": "Create a function in Python to multiply two matrices.", "input": "matrixA = [[1, 2], [3, 4]], matrixB = [[5, 6], [7, 8]]", "output": "def multiplyMatrix(A, B): rowsA = len(A) columnsA = len(A[0]) rowsB = len(B) columnsB = len(B[0]) if columnsA != rowsB: print(\"Cannot multiply\") return result = [[0 for row in range(columnsB)] for col in range(rowsA)] # Compute matrix multiplication for i in range(rowsA): for j in range(columnsB): for k in range(columnsA): result[i][j] += A[i][k] * B[k][j] return result A = [[1, 2], [3, 4]] B = [[5, 6], [7, 8]] print(\"Result:\") result = multiplyMatrix(A, B) for i in result: print(i)"} {"instruction": "Write a Python program to generate a list containing all permutations of the characters of a given string.", "input": "string = 'ABC'", "output": "from itertools import permutations\n\ndef generate_permutations(string):\n return list(permutations(string))\n\nstring = 'ABC'\nprint(generate_permutations(string))\n# Output: [('A', 'B', 'C'), ('A', 'C', 'B'), ('B', 'A', 'C'), ('B', 'C', 'A'), ('C', 'A', 'B'), ('C', 'B', 'A')]"} {"instruction": "Implement a decision tree classifier in Python.", "input": "", "output": "# Importing DecisionTreeClassifier from sklearn library\nfrom sklearn.tree import DecisionTreeClassifier\n\n# Defining the decision tree classifier\n# Using \"entropy\" as criterion to decide the further split\nclf = DecisionTreeClassifier(criterion=\"entropy\")\n\n# Fitting the decision tree classifier on the data\nclf = clf.fit(X, y)"} {"instruction": "Transform the following code from Python to JavaScript.", "input": "for i in range(10):\n print(i)", "output": "for (let i = 0; i < 10; i++) {\n console.log(i);\n}"} {"instruction": "Create an Android app to accept user input and calculate the area of a circle.", "input": "", "output": "public class MainActivity extends AppCompatActivity { EditText radiusEditText; TextView outputTextView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); radiusEditText = findViewById(R.id.radiusEditText); outputTextView = findViewById(R.id.outputTextView); findViewById(R.id.calculateButton).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { calculateAreaOfCircle(); } }); } private void calculateAreaOfCircle() { double radius = Double.parseDouble(radiusEditText.getText().toString()); double area = Math.PI * radius * radius; outputTextView.setText(String.valueOf(area)); } }"} {"instruction": "Create a Python program that takes a list of words given by the user and prints out a sentence constructed from these words.", "input": "words = ['The', 'quick', 'brown', 'fox']", "output": "words = ['The', 'quick', 'brown', 'fox']\n\nsentence = \" \".join(words)\nprint(sentence)\n# Output: The quick brown fox"} {"instruction": "Given a list of tuples, return a new list with the value of each tuple increased by one.", "input": "tuples = [(1,2), (2,3), (3,4)]", "output": "new_tuples = [] for t in tuples: new_tuples.append((t[0] + 1, t[1] + 1))"} {"instruction": "Output the first 20 prime numbers", "input": "", "output": "The first 20 prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71."} {"instruction": "Edit this HTML code to add the Google Font “Roboto”.", "input": " My First Web Page ", "output": " My First Web Page "} {"text": "[EN Wikipedia] Odessa Filmworks\n\nOdessa Filmworks is a Canadian film production company, based in Ottawa, Ontario founded by film director/producer Lee Demarbre. Odessa produced the internationally distributed feature film Jesus Christ Vampire Hunter. Productions 1998: Harry Knuckles (short film, trailer spoof) 1999: Harry Knuckles and the Treasure of the Aztec Mummy 2001: Jesus Christ Vampire Hunter (feature film) 2002: Where's Your Bobber? (documentary) 2003: Harry Knuckles and the Siege of the Leopard Lady (short film) 2004: Harry Knuckles and the Pearl Necklace (feature film) 2008: The Dead Sleep Easy (feature film, co-produced with Zed Filmworks/Zed Jamaica) 2008: Vampiro: Angel, Devil, Hero (documentary, co-produced with Zed Filmworks/Zed Jamaica) 2009: Smash Cut 2023: Enter the Drag Dragon References External links Slamdance Festival profile: Lee Demarbre, referencing Odessa Filmworks Variety review: Jesus Christ Vampire Hunter Film production companies of Canada Privately held companies of Canada"} {"instruction": "Develop a program to delete all nodes of a linked list at a given position.", "input": "[3, 9, 1, 5], position to delete: 2", "output": "# Node class class Node: def __init__(self, data): self.data = data self.next = None # Linked List class class LinkedList: def __init__(self): self.head = None # function to add a node at the given position def deleteNode(self, pos): # if list is empty if self.head == None: return # store head node temp = self.head # if head needs to be removed if pos == 0: self.head = temp.next temp = None return # find previous node of the node to be deleted for i in range(pos -1 ): temp = temp.next if temp is None: break # if position is more than number of nodes if temp is None: return if temp.next is None: return # Node temp.next is the node to be deleted # store pointer to the next of node to be deleted next = temp.next.next # Unlink the node from linked list temp.next = None temp.next = next"} {"text": "[HI Wikipedia] मलिक\n\nमलिक (मह्ल: މަލިކު ; ) भारतीय द्वीपसमूह लक्षद्वीप का सबसे दक्षिण में स्थित एटोल है। प्रशासकीय दृष्टि से यह केन्द्रशासित प्रदेश लक्षद्वीप का कस्बा है। यहां मौसम बेधशाला एवं प्रकाश स्तम्भ स्थित है। शब्द व्युत्पत्ति मलिक (मिनिकॉय) का प्राचीन नाम महिलादू था जो महिला और दू (द्वीप) की सन्धि से बना है अर्थात महिलाओं का द्वीप। हालांकि, मिनिकॉय को आज स्थानीय भाषा में मलिक कहा जाता है। मलिक शब्द की व्युत्पति द्वीप पर आने वाले अरबी व्यापारियों से सम्बंधित मानी जाती है। मिनिकॉय द्वीपसमूह लम्बे समय से बंगाल की खाड़ी के निकोबार द्वीपसमूह द्वारा शासित रहे हैं। वहाँ के उपनिवेशक लगातार मिनिकॉय की यात्रा करते रहे हैं। एक बार एक ब्रितानी अधिकारी ने मिनिकॉय निवासी से पूछा कि उनके द्वीप का नाम क्या था। द्वीपवासी ने अधिकारी को बताया कि वो मलिक से हैं लेकिन सामान्यतः \"मिनिका-राज्जे\" (निकोबार) में रहते हैं। आधिकारिक विचारों के अनुसार मलिक और मिनिका एक हीइ स्थान के नाम थे और इस द्वीपवासी का घर मिनिका के रूप में लिखा। बाद में इसका आँग्लीकरण मिनिकॉय के रूप में हो गया। भूगोल मिनिकॉय, लक्षद्वीप मण्डल का सबसे दक्षिणी और दूसरा सबसे बड़ा द्वीप है। यह कल्पेनी से २०१ किमी दक्षिण-दक्षिण-पश्चिम में, नौ डिग्री चैनल का सबसे दक्षिणी सीरे पर और थुराकुनु, मालदीव से १२५ किमी उत्तर में स्थित है। इसकी अदल लम्बाई १० किमी और अधिकत्तम चौड़ाई ६ किमी है। इसके निकटतम भौगोलिक सुविधा इन्वेस्टिगेटर बैंक है जो इसके उत्तर-पूर्व में ३१ किमी जलमग्न रेती पर स्थित है। गाँव मिनिकॉय में कुल ११ गाँव हैं। उत्तर से दक्षिण तक वो निम्न प्रकार हैं: केंडिफर्टी फल्लेस्सेरी कुडेही फुनहिलोलु अलूदी सेडिवलु राममेदु बोदुत्थिरि औयुमागु बडा दक्षिण बंडारा जलवायु मिनिकॉय वर्षभर में गर्म ताप के साथ उष्णकटिबंधीय सवाना जलवायु (कोपेन का जलवायु वर्गीकरण Aw) क्षेत्र में आता है। वर्षभर वर्षा भी होती रहती है; केवल जनवरी से मार्च का समय तुलनात्मक रूप से शुष्क होते हैं। जनसांख्यिकी २००१ की जनगणना के अनुसार मिनिकॉय द्वीप की कुल जनसंख्या ९,४९५ थी। इसमें ४९% पुरुष और ५१% महिलायें थीं। मिनिकॉय की औसत साक्षरता दर ८२% रहा जो भारत के राष्ट्रीय औसत ५९.५% से अधिक है। वहाँ पुरुष साक्षरता ८४% एवं महिला साक्षरता ८०% रही। मिनिकॉय की कुल जनसंख्या का १२% भाग ६ वर्ष से कम आयु के बच्चे हैं। सन्दर्भ बाहरी कड़ियाँ लक्षद्वीप लक्षद्वीप के द्वीप भारत के द्वीप लक्षद्वीप के नगर"} {"instruction": "Design a \"rock, paper, scissors\" game using Python.", "input": "", "output": "\"\"\"\nDesign a \"rock, paper, scissors\" game using Python.\n\"\"\"\n\nimport random\n\nOPTIONS = [\"rock\", \"paper\", \"scissors\"]\n\ndef play_game():\n # Player selection\n print(\"Choose your weapon: rock, paper, or scissors\")\n player_choice = input().lower()\n\n # Computer selection\n computer_choice = random.choice(OPTIONS)\n print(f\"Computer chose {computer_choice.title()}\")\n\n # Compare selections\n if player_choice == computer_choice:\n print(\"It's a tie!\")\n else:\n if player_choice == \"rock\":\n if computer_choice == \"paper\":\n print(\"Computer wins!\")\n elif computer_choice == \"scissors\":\n print(\"Player wins!\")\n elif player_choice == \"paper\":\n if computer_choice == \"scissors\":\n print(\"Computer wins!\")\n elif computer_choice == \"rock\":\n print(\"Player wins!\")\n elif player_choice == \"scissors\":\n if computer_choice == \"rock\":\n print(\"Computer wins!\")\n elif computer_choice == \"paper\":\n print(\"Player wins!\")\n\nif __name__ == \"__main__\":\n play_game()"} {"instruction": "Create a feature in Python to extract the category information from a given URL.", "input": "No input", "output": "def extract_category_from_url(url):\n # Extract the hostname from the URL\n hostname = urlparse(url).hostname\n # Split the hostname on '/'\n categories = hostname.split('/')\n return categories"} {"instruction": "Implement the merge sort algorithm to sort a given array ascending.", "input": "given_array = [7,9,3,8,1]", "output": "def merge_sort(arr): if len(arr) > 1: mid = len(arr) // 2 L = arr[:mid] R = arr[mid:] #calling merge sort function on left and right arrays merge_sort(L) merge_sort(R) i = j = k = 0 # Copying data to temp arrays L[] and R[] while i < len(L) and j < len(R): if L[i] < R[j]: arr[k] = L[i] i+=1 else: arr[k] = R[j] j+=1 k+=1 # Checking if any element was left while i < len(L): arr[k] = L[i] i+=1 k+=1 while j < len(R): arr[k] = R[j] j+=1 k+=1 ar =[7,9,3,8,1] merge_sort(ar) # printing sorted array print (ar)"} {"text": "[EN Wikipedia] Gmina Kozienice\n\nGmina Kozienice is an urban-rural gmina (administrative district) in Kozienice County, Masovian Voivodeship, in east-central Poland. Its seat is the town of Kozienice, which lies approximately south-east of Warsaw. The gmina covers an area of , and as of 2006 its total population is 30,270 (out of which the population of Kozienice amounts to 18,541, and the population of the rural part of the gmina is 11,729). Villages Apart from the town of Kozienice, Gmina Kozienice contains the villages and settlements of Aleksandrówka, Brzeźnica, Budy, Chinów, Cudów, Cztery Kopce, Dąbrówki, Holendry Kozienickie, Holendry Kuźmińskie, Janików, Janików-Folwark, Janów, Katarzynów, Kępa Bielańska, Kępa Wólczyńska, Kępeczki, Kociołki, Kuźmy, Łaszówka, Łuczynów, Majdany, Michałówka, Nowa Wieś, Nowiny, Opatkowice, Piotrkowice, Przewóz, Psary, Ruda, Samwodzie, Selwanówka, Śmietanki, Stanisławice, Staszów, Świerże Górne, Wilczkowice Górne, Wójtostwo, Wola Chodkowska, Wólka Tyrzyńska, Wólka Tyrzyńska B and Wymysłów. Neighbouring gminas Gmina Kozienice is bordered by the gminas of Garbatka-Letnisko, Głowaczów, Maciejowice, Magnuszew, Pionki, Sieciechów and Stężyca. References Polish official population figures 2006 Kozienice Kozienice County"} {"instruction": "Create a SQL query to count the total number of movies for every genre in the database.", "input": "", "output": "SELECT genre, COUNT(*) as total_movies FROM Movies GROUP BY genre"} {"text": "[EN Wikipedia] Teresa and Maria Milanollo\n\nTeresa Milanollo (1827–1904) and her younger sister, Maria Milanollo (1832–1848), were Italian violin-playing child prodigies who toured Europe extensively to great acclaim in the 1840s. After Maria died at age 16, Teresa, who was also a composer, had a long solo career. The name \"Milanollo\" has been perpetuated by the regimental march of the Life Guards, Coldstream Guards and Governor General's Foot Guards, written in their honour by their contemporary J.V. Hamm. The Teatro Milanollo in their native Savigliano was named for the sisters. Taught violin in infancy by Ferrero, Caldera, and Morra, Teresa made her concert debut in her native Savigliano aged nine. In 1836 she moved to Paris with her family. She toured Britain, France, the Netherlands and Belgium, sometimes with her virtuoso tutors, Lafont, subsequently Habeneck and later still, de Bériot. She eventually became her sister Maria's first and only violin coach. From 1838 to 1848, the Milanollo sisters toured throughout France, the Netherlands, Belgium, Germany, the Austro-Hungarian Empire, and England, charming royal courts and such composers as Johann Strauss the Elder, Berlioz, Liszt, Chopin and Meyerbeer. Their nicknames, \"Mademoiselle Staccato\" (Maria) and \"Mademoiselle Adagio\" (Teresa) reflected their contrasting personalities; the more solemn Teresa was acknowledged as the genius of the two. After Maria Milanollo's untimely death in 1848, Teresa continued performing solo, establishing a system of \"Concerts aux Pauvres\" (charitable concerts). She retired in 1857 on marriage and died in Paris in 1904. Although Teresa Milanollo was a pioneer among women violinists, her own musical compositions are now largely forgotten. Three of her violins survive today, a 1728 Stradivarius (the \"Milanollo-Dragonetti\") played by Paganini and bequeathed to Teresa by Domenico Dragonetti, a c. 1680 Ruggieri small violin (the \"Milanollo\") the property of her younger sister Maria, auctionied by Tarisio in April 2010, and a 1703 Stradivarius (the \"Milanollo-Hembert\"). The Coldstream march — \"Milanollo\" The tune of \"Milanollo\" was written by the 19th-century German composer for the Italian violinist virtuoso sisters and child prodigies, Teresa and Maria Milanollo. They introduced it to England in 1845 in the course of their extensive European tours. In the 1880s it was officially authorised, along with all regimental marches, by the War Office as a regimental march for the Coldstream Guards. The Coldstream Guards adopted the march under the title \"Milanollo\" and the official arrangement was authorised in 1882. From 1907 to 1936 it was known as \"The Coldstream March\", and republished under that title in 1925. The current arrangement was written by one of the Coldstream Guards' former Directors of Music, John…"} {"text": "[EN Wikipedia] Al Lewis (singer-songwriter)\n\nAl Lewis (born 1984 in Pwllheli, Wales) is a Welsh singer and songwriter. He became known in the Welsh language media after his song came second in the Cân i Gymru contest in 2007. Biography Lewis attended Ysgol y Creuddyn in Conwy, where he formed a cover band called Bluewood. He participated in Cân i Gymru in 2007, the 38th edition of the competition. He came second in the competition with the song Llosgi (Burning), jointly composed by Lewis and Arwel Lloyd Owen. In 2007, Lewis released his first Welsh language EP entitled Byw Mewn Breuddwyd. Lewis appeared at the Wakestock Festival, alongside Mark Ronson, and at the inaugural Sŵn Festival in Cardiff. In June 2009, Lewis released his first Welsh language album, Sawl Ffordd Allan, reaching number one in the C2 Radio Cymru Welsh language chart, and the Skin & Bones EP, in collaboration with fellow Welsh singer and songwriter Sarah Howells of Paper Aeroplanes. Lewis and Howells have also recorded a live video session for the BBC. BBC Radio Wales described his collaboration with Howells as showing \"cinematic mainstream melodies reminiscent of James Blunt or Simon and Garfunkel.\" Lewis' album, In the Wake, was released in October 2010. In early 2013, Lewis released his second English language album, which again featured backing vocals from Sarah Howells. The album also features a rerecorded version of Llosgi. The album was produced by Charlie Peacock. The album was recorded at his home studio in Nashville. In December 2013 Lewis released a Christmas single, A Child's Christmas in Wales, in homage to Welsh poet and writer Dylan Thomas. The song was added to the BBC Radio 2 playlist. By his links in Nashville, Lewis met Mississippi-born singer-songwriter Alva Leigh and they formed the band Lewis and Leigh. As of October 2014 Lewis and Leigh have released a four-track EP, Night Drives. The EP features three original songs and a cover of Wilco's Say You Miss Me. Lewis's music is regularly played on BBC Radio 2. In 2015 he headlined the bill at Sesiwn Fawr in Dolgellau. Discography Albums Sawl Ffordd Allan (2009), Sain In the Wake (2010), ALM Ar Gof a Chadw (2011) Battles (2013), ALM Heulwen o Hiraeth (2014) – as Al Lewis Band Ghost (2016), Celticana Records – with Alva Leigh as Lewis & Leigh Pethe Bach Aur (2018) – as Al Lewis Band Te yn y Grug (2020) – as Al Lewis EPs Byw mewn Breuddwyd (2007), ALM Dilyn pob Cam (2008), Sain One Way Love Affair (2008), ALM Skin and Bones (2009), ALM Our Lines Remain (2012), ALM References External links Official website in Welsh and English Lewis and Leigh website Al Lewis biography from BBC Wales Steve Winwood albums Welsh male singer-songwriters Welsh singer-songwriters Living people 1984 births People from Pwllheli Welsh-language singers British male singer-songwriters"} {"text": "[HI Wikipedia] नॉरबॉत्तेन लैन\n\nनॉरबॉत्तेन लैन (स्वीडी: Norrbottens län, अंग्रेज़ी: Norrbotten) स्वीडन का एक लैन है। 'लैन' स्वीडन का उच्च-स्तरीय प्रशासनिक विभाग होता है, जिसे कभी-कभी 'काउंटी' भी कहते हैं। इन्हें भी देखें स्वीडन की काउंटियाँ सन्दर्भ नॉरबॉत्तेन लैन स्वीडन की काउंटियाँ स्वीडन"} {"instruction": "Write a function in Python to sum all the positive integers of n numbers.", "input": "[1,2,3,4,5]", "output": "def sum_numbers(arr):\n total = 0\n for num in arr:\n if num > 0:\n total += num\n return total\n\nprint(sum_numbers([1,2,3,4,5])) # 15"} {"instruction": "Write an algorithm in Python that takes a string of characters and prints out the frequency of each character.", "input": "\"Hello, world!\"", "output": "\"\"\"\nWrite an algorithm in Python that takes a string of characters and \nprints out the frequency of each character.\n\"\"\"\n\ndef count_frequency(text):\n freq = {}\n for c in text:\n if c in freq:\n freq[c] += 1\n else:\n freq[c] = 1\n for key,value in freq.items():\n print(key + ': ' + str(value))\n\nif __name__ == '__main__':\n text = \"Hello, world!\"\n count_frequency(text)"} {"instruction": "Build a MapReduce job with Hadoop to find the 99th percentile of a given data set.", "input": "", "output": "//Mapper Code import java.io.IOException; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Mapper; public class MapperClass extends Mapper { LongWritable one = new LongWritable(1); Text data = new Text(); @Override protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { String[] line = value.toString().split(\",\"); String number = line[0]; // Emit key-value pair for number data.set(number); context.write(data, one); } } //Reducer Code import java.io.IOException; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Reducer; public class ReducerClass extends Reducer { int percentile; @Override protected void setup(Context context) throws IOException, InterruptedException { //Get percentile from context configuration percentile = context.getConfiguration().getInt(\"percentile\", 99); } @Override protected void reduce(Text key, Iterable values, Context context) throws IOException, InterruptedException { LongWritable result = new LongWritable(); int sum = 0; // Sum up the values for (LongWritable value : values) { sum += value.get(); } // Calculate percentile int percentage = (sum*100)/percentile; if (percentile == percentage) { result.set(Long.parseLong((key.toString()))); context.write(new Text(\"Percentile 99:\"), result); } } }"} {"instruction": "Write a JavaScript program to create a class 'Shape' and create an object 'circle' of this class.", "input": "", "output": "class Shape { constructor() { this.type = \"Shape\"; } } let circle = new Shape(); circle.type = \"Circle\"; console.log(circle.type);"} {"instruction": "Write a Python program to validate a given telephone number.", "input": "", "output": "import re\n\ndef validate_telephone_number(number): \n pattern = '^[0-9]{10}$'\n if re.match(pattern, number): \n return True\n else: \n return False"} {"instruction": "Create a Python code snippet to identify the root cause of a Software Bug.", "input": "", "output": "def find_causes(data): # identify the root cause of the bug causes = set() for line in data: for cause in line.get('causes', []): causes.add(cause) # filter insignificant causes causes = [cause for cause in causes if cause not in insignificant_causes] return causes"} {"instruction": "Modify the given Python code to calculate the sum of the given list and print the output.", "input": "list = [1,2,3,4,5]", "output": "def sumList(list): sum = 0 for i in list: sum = sum + i return sum print(sumList(list))"} {"instruction": "Write a function in Python to sort this dictionary by values.", "input": "my_dict = {\"Jerry\": 10, \"Marcus\": 3, \"Hanna\": 5}", "output": "def sort_dict_by_values(d): sorted_dict = dict(sorted(d.items(), key=lambda x: x[1])) return sorted_dict print(sort_dict_by_values(my_dict)) # Output: {'Marcus': 3, 'Hanna': 5, 'Jerry': 10}"} {"instruction": "Develop a C program for swapping two variables.", "input": "", "output": "#include void swap(int *x, int *y) { int temp = *x; *x = *y; *y = temp; } int main() { int x = 10, y = 20; // Call swap function to swap 'x' and 'y' swap(&x, &y); printf(\"x = %d, y = %d\", x, y); return 0; }"} {"instruction": "Create a python script that takes 2 arguments - an array and an integer - and prints the sum of the array multiplied by the integer.", "input": "Array: [3, 5, 8] \nInteger: 5", "output": "def sum_arr(arr, num):\n total = 0\n for i in arr:\n total += i\n total *= num\n return total\n\n# Output \n95"} {"instruction": "Create a program in Python that prints out the first 10 prime numbers.", "input": "\"\"", "output": "import math\n\ndef is_prime(n):\n if n == 1:\n return False\n \n for i in range(2, int(math.sqrt(n)) + 1):\n if n % i == 0:\n return False\n return True\n\nprime_nums = []\n\nfor i in range(2, 1000): \n if is_prime(i):\n prime_nums.append(i)\n if len(prime_nums) == 10:\n break\n\nfor item in prime_nums:\n print(item)"} {"text": "[HI Wikipedia] शेरपुर\n\nशेरपुर (Sherpur) या शेरपुर उपरवार (Sherpur Uparwar) भारत के उत्तर प्रदेश राज्य के भदोही ज़िले (संत रविदास नगर ज़िले) के डीघ मंडल में स्थित एक गाँव है। यह गंगा नदी के किनारे स्थित है। जनसांख्यिकी भारत की 2011 जनगणना के अनुसार इस गाँव की आबादी 383 थी जिसमे महिलाये 160 और पुरुष 223 थे। इन्हें भी देखें भदोही ज़िला सन्दर्भ भदोही ज़िला उत्तर प्रदेश के गाँव भदोही ज़िले के गाँव"} {"instruction": "Create a Kubernetes pod setup that publishes a tweet every 5 minutes.", "input": "Not applicable", "output": "apiVersion: v1\nkind: Pod\nmetadata:\n name: tweet-publisher\nspec:\n containers:\n - name: tweet-publisher\n image: \n command:\n - sh\n - -c\n - 'crontab -lcrontab && while true; do python publish-tweet.py && crontab -l | { cat; echo \"*/5 * * * * python publish-tweet.py\"; } | crontab -; sleep 31622400; done'\n volumeMounts:\n - mountPath: /crontab/crontab\n subPath: crontab\n name: cronmount\n volumes:\n - name: cronmount\n configMap:\n name: tweet-cron\n---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: tweet-cron\ndata:\n crontab: \"* * * * * python publish-tweet.py\""} {"instruction": "Create multiple classes in Java with the provided input.", "input": "class Player { String name; int age; String club; String position;", "output": "class Player { String name; int age; String club; String position; // Constructors public Player(String name, int age, String club, String position) { this.name = name; this.age = age; this.club = club; this.position = position; } // Getters and Setters public String getName() { return this.name; } public void setName(String name) { this.name = name; } public int getAge() { return this.age; } public void setAge(int age) { this.age = age; } public String getClub() { return this.club; } public void setClub(String club) { this.club = club; } public String getPosition() { return this.position; } public void setPosition(String position) { this.position = position; } }"} {"instruction": "Create a linear regression model in Python to predict house prices based on geographic features such as rooms, square footage, and zip code.", "input": "Rooms: 3\nSquare Footage: 2000\nZip Code: 92101", "output": "import pandas as pd\nimport numpy as np\n\ndata = pd.DataFrame({'Rooms': [3],\n 'Square_Footage': [2000],\n 'Zip_Code': [92101]\n })\n\n# Split the input data into independent and dependent variables\nX = data.iloc[:, :-1]\ny = data.iloc[:, -1]\n\n# Build the model\nfrom sklearn.linear_model import LinearRegression\n\nregressor = LinearRegression()\nregressor.fit(X, y)\n\n# Predict the price\nprediction = regressor.predict([[3, 2000, 92101]])\nprint(prediction)"} {"instruction": "Generate a python program to alphabetically sort the following list.", "input": "[\"Paul\", \"John\", \"George\", \"Ringo\"]", "output": "my_list = [\"Paul\", \"John\", \"George\", \"Ringo\"]\nmy_list.sort() \nprint(my_list)"} {"instruction": "Write a function in Python to print out the most common words in a given text.", "input": "This is a test text. It can be used to test a function for the most common words.", "output": "def most_common(text): text_list = text.lower().split() results = {} for word in text_list: if word not in results: results[word] = 1 else: results[word] += 1 sorted_words = sorted(results.items(), key=lambda kv: kv[1], reverse=True) for word, count in sorted_words[:10]: print(word, count)"} {"text": "[EN Wikipedia] Jenštejn\n\nJenštejn () is a municipality and village in Prague-East District in the Central Bohemian Region of the Czech Republic. It has about 1,500 inhabitants. Administrative parts The village of Dehtáry is an administrative part of Jenštejn. Etymology The original name of the village and the local castle was Jencenstein, meaning \"Jenc's stone\". It was later distorted to Jenštejn. Geography Jenštejn is located about northeast of Prague. It lies in a flat agricultural landscape in the Central Elbe Table. History The first written mention of Jenštejn is from 1368. The village was founded together with a small water castle in the 14th century by Jenc of Janovice. From 1368 to 1387, it was property of the Jenštejn family. Then the owners often changed. The last person to reside in the castle was Jan Dobřichovský of Dobřichov in the years 1560–1583. After his death, the castle was seized by the royal chamber due to his debts, and in 1587 Jenštejn was annexed to the Brandýs estate. After that, the castle was abandoned and fell into disrepair. In 1640, during the Thirty Years' War, Jenštejn and the castle were burned by the Swedish army under the command of Johan Banér. Between 1655 and 1660, the village was restored and promoted to a market town. It was a market town until the beginning of the 20th century. Sights Jenštejn is known for ruins of the Jenštejn Castle. Today it is owned by the municipality and is open to the public. Its well-preserved round, high tower is the main landmark of Jenštejn. References External links Villages in Prague-East District"} {"instruction": "Declare a C++ structure that stores data about employees including their name and employee id.", "input": "", "output": "struct employee { string name; int id; };"} {"instruction": "Write a MySQL query to select the names and phone numbers of people whose age is greater than 30", "input": "", "output": "SELECT Name, Phone FROM People WHERE Age > 30"} {"text": "[CS Wikipedia] Žulebino (stanice metra v Moskvě)\n\nŽulebino () je stanice moskevského metra na Tagansko-Krasnopresněnské lince. Stanice byla zprovozněna spolu s celým úsekem Vychino - Žulebino. Nachází se mezi stanicemi Lermontovskij prospekt a Kotělniki, do 21. září 2015 byla konečnou stanicí linky. Je pojmenována po přilehlém mikrorajonu. Charakter stanice Stanice Žulebino se nachází v čtvrti Žulebino () pod křižovatkou ulic Generala Kuzněcova () a Aviokonstruktora Milja () za Moskevským dálničním okruhem. Stanice disponuje dvěma podzemními vestibuly, severní je propojen s nástupištěm pomocí eskalátorů a výtahu a jižní je propojen s nástupištěm pomocí schodiště a výtahů. Východy ze severního vestibulu směřují na obě strany ulice Generala Kuzněcova, východy z jižního vestibulu jsou směřovány na všechny strany křižovatky ulic Generala Kuzněcova a Aviokonstruktora Milja. Severní vestibul směřující na stranu centra Moskvy je zbarven do červeno-oranžové barvy, zatímco jižní je laděn do zelené barvy. Na sloupech na nástupišti je použit barevný přechod právě od červeno-oranžové přes žlutou po zelenou barvu v celkem devíti odstínech. Místo obvyklého mramoru a žuly jsou stěny stanice obloženy keramikou a kovovými panely se zrcadlovým pokrytím, které je odolné před vandaly. Reference Externí odkazy Fotogalerie a krátký popis (rusky) Profil stanice na stránkách Nashtransport.ru (rusky) Stanice metra v Moskvě"} {"instruction": "Insert a code line in the existing program to fix a syntax error.", "input": "int main() { printf(\"Hello World!); }", "output": "int main() { printf(\"Hello World!\"); // added missing closing quotation mark }"} {"instruction": "Write a function to start a timer with the specified duration.", "input": "", "output": "def start_timer(duration): start_time = time.time() end_time = start_time + duration while time.time() < end_time: time.sleep(1) print(\"Timer finished!\")"} {"instruction": "Create a Python dictionary with three elements and print the key-value pairs.", "input": "", "output": "my_dict = { 'name': 'John', 'age': 30, 'city': 'New York' } for key, value in my_dict.items(): print(f'{key}: {value}')"} {"instruction": "Create a basic query using two variables.", "input": "sky, blue", "output": "SELECT * FROM table WHERE sky = 'blue';"} {"instruction": "Write a script in Java for printing the first n Fibonacci numbers.", "input": "", "output": "public class Fibonacci { static int fib(int n) { int f[] = new int[n+2]; // 1 extra to handle case, n = 0 int i; /* 0th and 1st number of the series are 0 and 1*/ f[0] = 0; f[1] = 1; for (i = 2; i <= n; i++) { f[i] = f[i-1] + f[i-2]; } return f[n]; } public static void main (String args[]) { int n = 5; System.out.println(fib(n)); } }"} {"instruction": "Build a python program to search for an element in a matrix", "input": "A matrix of size 3x4 and search for the element 6", "output": "def searchMatrix(mat, ele): \n row = len(mat) \n col = len(mat[0]) \n \n # Traverse the matrix \n i = 0\n j = col - 1\n while i < row and j >= 0: \n if mat[i][j] == ele: \n return True\n \n if mat[i][j] > ele: \n j -= 1\n else: \n i += 1\n \n return False\n \n# Driver Code \nmat = [[1, 3, 5, 7], \n [2, 4, 6, 8], \n [3, 7, 10, 11]] \n \n# Search for the elements 7, 1, 6 and 4 \nprint(searchMatrix(mat, 7)) \nprint(searchMatrix(mat, 1)) \nprint(searchMatrix(mat, 6)) \nprint(searchMatrix(mat, 4))"} {"instruction": "Write a Python program to convert a given list to a dictionary with each item as a key-value pair.", "input": "list = [(\"a\", 1), (\"b\", 2), (\"c\", 3), (\"d\", 4)]", "output": "list = [(\"a\", 1), (\"b\", 2), (\"c\", 3), (\"d\", 4)]\n\nd = dict(list)\n\nprint(d)\n# Output: {'a': 1, 'b': 2, 'c': 3, 'd': 4}"} {"instruction": "Modify the following Python code to generate more random numbers.", "input": "import random\n\nx = random.randint(1, 10)", "output": "import random\n\nx = random.randint(1, 10)\ny = random.randint(1, 10)\nz = random.randint(1, 10)"} {"instruction": "Write a C++ function that takes an array of strings and prints them out in reverse order.", "input": "myArray = [\"cat\",\"apple\",\"dog\"]", "output": "void print_reverse (string arr[], int size) { if (size > 0) { print_reverse (arr, size - 1); cout<= 16;"} {"text": "[CS Wikipedia] Josef Vrba\n\nJosef Vrba je bývalý český fotbalista, obránce a záložník. Fotbalová kariéra V československé lize hrál za SK Plzeň. Nastoupil ve 141 ligových utkáních. Gól v lize nedal. Ligová bilance Literatura JEŘÁBEK, Luboš: Český a československý fotbal: lexikon osobností a klubů 1906-2006, Praha, Grada 2007. Jindřich Horák, Lubomír Král: Encyklopedie našeho fotbalu – Libri 1997 Radovan Jelínek, Miloslav Jenšík a kol.: Atlas českého fotbalu – Radovan Jelínek 2006 Českoslovenští fotbalisté Čeští fotbalisté Fotbalisté SK Plzeň Osoby s nejistým datem narození Možná žijící lidé Muži"} {"text": "[EN Wikipedia] Lillemor Rachlew\n\nIngebjørg Lillemor Rachlew (née Enger; 7 January 1902 – 14 May 1983) was a Norwegian polar explorer. She was one of four Norwegians who were the first women to set foot on the Antarctic mainland. After their landing in 1937 the Four Ladies Bank in Prydz Bay was named after them. On an earlier voyage to Antarctica Rachlew took photographs which were published in 1934. Some sections from her diary were preserved and these are the earliest examples of a woman's writing about her travels in Antarctica. Personal life Ingebjørg Lillemor Enger was born on 7 January 1902 to Eugenie Marie Mejdell and Ivar Enger, owner-director of Norma Precision and brother of entrepreneur . In 1928 she married ex-naval officer Cato Rachlew (1883-1968), who had been on an Arctic expedition organised by the Duke of Orléans in 1907. He was a Norwegian naval attaché in London from 1917 to 1919, and stayed there some years as a representative of Norwegian paper and pulp companies. Lillemor Rachlew did charity work in London during the Great Depression before the couple moved back to Norway around 1932. Antarctica She joined two expeditions undertaken by whaling fleet owner Lars Christensen and his wife Ingrid Christensen on the tanker Thorshavn, one in 1933 and one in 1936–7. Recent research suggests Rachlew was the second woman ever to land on the mainland of Antarctica, and the third to step onto the continent including islands. The four women had \"travelled nearer to the South Pole than any woman had done before,\" Christensen was reported to have said when he arrived in London from South Africa on his way back. 1933 voyage Rachlew seems to have been an energetic and lively presence on the 1933 expedition. Equipped with a cine-camera and a rifle, she took photographs, hunted seals and kept a diary of which only fragments remain. We crept and slipped along, closer and closer in... It was all very exciting! But we had to give up when we were within 5 nautical miles of land...Great blocks of ice as big as church towers lay higgledy-piggledy, 5 miles deep, jammed tightly together, with only a few lanes intersecting them. It was impossible to get through. Not even a dog could scramble over those steep blocks. Her diary is now lost and the extracts quoted in Lars Christensen's book, Such is the Antarctic, are \"the only remaining words from the women who went to Antarctica before World War II\". At one time during the morning it became a little calmer and I made my way along to the verandah — as we called the built-in deck beneath the captain’s bridge — with my cine camera under my arm, to see if I could get any snaps of what could be seen of the after-deck between the waves. Suddenly the ship lurched violently and I fell and rolled in snow slush right across the verandah, coming to…"} {"instruction": "Optimize this Python code to reduce its run-time complexity.", "input": "def foo(l1, l2):\n result = []\n for i in l1:\n for j in l2:\n result.append(i + j)\n return result", "output": "def foo(l1, l2):\n result = [i + j for i in l1 for j in l2]\n return result"} {"instruction": "Analyze the following code and explain what it does: def func(n): if n == 0: return 0 else: return n + func(n - 1)", "input": "", "output": "This code implements a recursive function to compute the sum of numbers from 1 to n. Specifically, the base case is when n is 0, and the recursive case is when n is greater than 0. In the recursive case, the function will call itself with n-1 as the argument, and then adds n to the result of that call. Thus, each recursive call will add one more number until it reaches the base case. This is known as the base case and recursion principle. The result of the function will be the sum of the numbers from 1 to n."} {"instruction": "Create a for loop to traverse a list and print each element in the list in sequence.", "input": "list_to_traverse = [1,2,3,4,5]", "output": "for item in list_to_traverse: print(item)"} {"instruction": "Complete the following code to delete the item at a given index from a list.", "input": "index = 4 list_items = [2, 3, 4, 5, 6, 7, 8]", "output": "\"\"\" Complete the following code to delete the item at a given index from a list \"\"\" index = 4 list_items = [2, 3, 4, 5, 6, 7, 8] # remove the item at index 4 del list_items[index] # print the list print(list_items)"} {"instruction": "Create a function in Python to check if a given string contains two of the same characters next to each other.", "input": "", "output": "def check_for_two_same_chars(string):\n for i in range(len(string)-1):\n if string[i] == string[i+1]:\n return True\n return False"} {"text": "[CS Wikipedia] Dopady globálního oteplování\n\nJako dopady globálního oteplování jsou označovány mnohé změny ovlivňující lidstvo i Zemi. Globální oteplování je pozorovaný a předpokládaný trend směrem k vyšší globální průměrné teplotě ve srovnání s předindustriální úrovní, s důsledky, jako je vzestup hladiny oceánů, tání ledovců, změny klimatických zón, vegetačních zón a stanovišť, změny v průběhu srážek, silnějších nebo častějších extrémů počasí, jako jsou povodně, bouře a sucha, šíření parazitů a tropických nemocí, stejně jako nárůst environmentálních uprchlíků, či změn zemědělské produktivity. Předpokládané a pozorované negativní dopady změny klimatu jsou někdy označovány jako „klimatická katastrofa“. Zatímco o příčinách globálního oteplování – tedy o tom, že hlavní hnací silou tohoto jevu jsou antropogenní emise skleníkových plynů – existuje již mnoho let široká vědecká shoda, o dopadech oteplování se teprve rozsáhle diskutuje. Některé důsledky jsou již patrné, jiné se očekávají teprve v budoucnosti; dopady mohou být jak negativní, tak i pozitivní. Budoucí dopady změny klimatu se budou lišit v závislosti na politikách změny klimatu a sociálním vývoji. Dva hlavní nástroje zaměřené na řešení klimatických změn jsou snižování antropogenních emisí skleníkových plynů (opatření na zmírňování změny klimatu) a přizpůsobení se dopadům změny klimatu. Další řešení může přinést také geoinženýrství, ale většina kolem použití těchto metod existují velké nejistoty. Krátkodobé politiky změny klimatu by mohly významně ovlivnit dlouhodobé dopady změny klimatu. Účinné politiky zmírňování mohou být schopny omezit globální oteplování (v roce 2100) na přibližně 2 °C nebo nižší, relativně k předindustriálním úrovním, Bez zmírnění dopadů by zvýšená poptávka po energii a rozsáhlé využívání fosilních paliv mohly vést k globálnímu oteplování kolem 4 °C. Čím vyšší nárůst globální teploty by nastal, tím obtížnější by bylo se přizpůsobit a zvýšilo by se riziko negativních dopadů. Samostatným problémem pak je zvyšování kyselosti oceánů, které je přímo způsobeno rostoucím obsahem oxidu uhličitého v atmosféře. Pojmy Pojem \"změna klimatu\", používaný v tomto článku se vztahuje ke změnám klimatu, které probíhají přibližně od začátku 20. století. Světová meteorologická organizace definuje toto období jako 30 let. Změny klimatu se projevují zvýšením globální povrchové teploty (globální oteplování), změnami intenzity dešťových srážek a změnami frekvence extrémních povětrnostních jevů. Změny klimatu mohou být způsobeny přírodními příčinami, např. změnami radiace Slunce nebo vlivem lidské činnosti, např. změnou složení atmosféry. Změny klimatu vyvolané člověkem se projeví na pozadí přírodních klimatických změn a změn v lidské činnosti, jako je nárůst zalidnění pobřeží nebo v rozšiřování suchých oblastech, které zvyšují nebo snižují…"} {"instruction": "Generate a URL to search the desired content on Google using Python.", "input": "Search Keyword: Covid-19 Pandemic", "output": "import urllib url = 'https://www.google.com/search?q=Covid-19+Pandemic' urllib.request.urlopen(url)"} {"instruction": "Construct a for loop to print all the elements of a list numbered in sequence, as shown in the output.", "input": "list_elements = [\"apple\", \"banana\", \"cherry\"]", "output": "for index, element in enumerate(list_elements,start=1): print(index, element) #Output: #1 apple #2 banana #3 cherry"} {"instruction": "Design a program in Python that takes 4 numbers as input and prints out the product of the first three numbers.", "input": "1, 2, 3, 4", "output": "def product(nums):\n product = 1\n for i in range(3):\n product *= nums[i]\n return product\n\nnums = [int(x) for x in input().split(\",\")]\nprint(product(nums))"} {"text": "[CS Wikipedia] Americká hokejbalová reprezentace\n\nAmerická hokejbalová reprezentace je výběrem nejlepších amerických hráčů v hokejbale. Od roku 1998 se účastní mistrovství světa. Tým je řízen Americkým hokejbalovým institutem, který je členem ISBHF. Největším úspěchem amerického výběru je druhé místo z mistrovství světa 2015. Účast na mistrovství světa Externí odkazy Oficiální stránky Amerického hokejbalového institutu Hokejbalové reprezentace Americké sportovní reprezentace"} {"instruction": "Optimize a Python function to calculate the square of a number for maximum performance.", "input": "Not applicable", "output": "def square(x):\n return x * x\n \n# Using the exponentiation operator\ndef square_op(x):\n return x ** 2\n \n# Using bit-shift operator\ndef square_shift(x):\n return x << 1\n\n# Using multiplication\ndef square_mul(x):\n return (x + x) * x\n \n# Using pow() built-in\ndef square_builtin(x):\n return pow(x, 2)"} {"instruction": "Implement a web scraper in Python that downloads the contents of a given URL.", "input": "url = 'https://en.wikipedia.org/wiki/Web_scraping'", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = 'https://en.wikipedia.org/wiki/Web_scraping'\n\nr = requests.get(url)\nsoup = BeautifulSoup(r.text, 'html.parser')\n\nhtml = str(soup)\n\nwith open(\"output.html\", \"w\") as file:\n file.write(html)"} {"instruction": "You need to implement a function that finds the longest string inside an array.", "input": "array = [\"cherry\", \"apple\", \"applepie\", \"strawberry\", \"raspberry\"]", "output": "def find_longest_str(arr): longest_str = \"\" for s in arr: if len(s) > len(longest_str): longest_str = s return longest_str result = find_longest_str(array) print(result) # prints \"applepie\""} {"instruction": "Rewrite the following Bash program to print only even numbers between 0 and 100.", "input": "#!/bin/sh for i in $(seq 0 100) do echo $i done", "output": "#!/bin/sh # loop from 0 to 100 for i in $(seq 0 2 100) do echo $i done"} {"instruction": "Create a UI component in ReactJs to render a list of items from an array of objects.", "input": "const items = [ { name: \"Apple\", price: 12.99 }, { name: \"Orange\", price: 5.99 }, { name: \"Banana\", price: 3.99 }, ];", "output": "const ItemList = ({ items }) => (
      {items.map(item => (
    • {`${item.name}: ${item.price}`}
    • ))}
    );"} {"instruction": "Write code that removes spaces from a given string.", "input": "string = \" A B C D \"", "output": "def remove_spaces(string): return \"\".join(string.split())"} {"instruction": "How to define an array in PHP?", "input": "", "output": "An array in PHP is defined using the array() function. The syntax is as follows: $array = array($element1, $element2, ...); The elements can be of any type, such as strings, numbers, Booleans, objects, or even other arrays."} {"instruction": "How would you write a for loop to iterate over an array of integers in Bash?", "input": "", "output": "for i in $(seq 0 $((${#array[@]} - 1))); do echo \"${array[$i]}\" done"} {"instruction": "Create a function that takes a 2D array of numerical values and returns the number of times the maximum value appears.", "input": "my_array = [[1, 2, 4, 1], [2, 3, 3, 2], [3, 4, 3, 3]]", "output": "def count_max(arr): max_val = 0 count = 0 for row in arr: max_val = max(max_val, max(row)) for row in arr: if max(row) == max_val: count += 1 return count"} {"instruction": "Determine the average of 3 numbers.", "input": "30, 20, 60", "output": "The average of the 3 numbers is 36."} {"instruction": "Design a Python class to define a person.", "input": "", "output": "class Person:\n\n def __init__(self, name, age, gender):\n self.name = name\n self.age = age\n self.gender = gender\n\n def get_name(self):\n return self.name\n\n def get_age(self):\n return self.age\n\n def get_gender(self):\n return self.gender"} {"instruction": "Create a Python program that generates a random number between 5-15.", "input": "", "output": "import random\n\nx = random.randint(5,15)\nprint(x)"} {"instruction": "Replace the given SQL query with a Python program to calculate the sum of all the column values.", "input": "SELECT SUM(column) FROM table;", "output": "import pandas as pd\n\ndata = pd.read_sql\n\n query = \"SELECT * FROM table\"\n\ndf = pd.read_sql(query, conn)\n\nsum_column = df['column'].sum()\n\nprint(sum_column)"} {"instruction": "Create a simple chatbot in Python using NLTK", "input": "Not applicable", "output": "import nltk\nfrom nltk.stem import WordNetLemmatizer\nlemmatizer = WordNetLemmatizer()\nimport json\nimport pickle\n\nimport numpy as np\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation, Dropout\nfrom keras.optimizers import SGD\n\nwords=[]\nclasses = []\ndocuments = []\nignore_words = ['?', '!']\ndata_file = open('intents.json').read()\nintents = json.loads(data_file)\n\n# preprocessing data\nfor intent in intents['intents']:\n for pattern in intent['patterns']:\n # tokenize each word\n w = nltk.word_tokenize(pattern)\n words.extend(w)\n # add documents in the corpus\n documents.append((w, intent['tag']))\n\n # add to our classes list\n if intent['tag'] not in classes:\n classes.append(intent['tag'])\n \n# lemmaztize and lower each word and remove duplicates\nwords = [lemmatizer.lemmatize(w.lower()) for w in words if w not in ignore_words]\nwords = sorted(list(set(words)))\n\n# sort classes\nclasses = sorted(list(set(classes)))\n\n# documents = combination between patterns and intents\nprint (len(documents), \"documents\")\n# classes = intents\nprint (len(classes), \"classes\", classes)\n# words = all words, vocabulary\nprint (len(words), \"unique lemmatized words\", words)\n\n# create our training data\ntraining = []\noutput_empty = [0] * len(classes)\nfor doc in documents:\n # initialize our bag of words\n bag = []\n # list of tokenized words for the pattern\n pattern_words = doc[0]\n # lemmatize each word\n pattern_words = [lemmatizer.lemmatize(word.lower()) for word in pattern_words]\n # create our bag of words array with 1, if word match found in current pattern\n for w in words:\n bag.append(1) if w in pattern_words else bag.append(0)\n\n # output is a '0' for each tag and '1' for current tag (for each pattern)\noutput_row = list(output_empty)\noutput_row[classes.index(doc[1])] = 1\n\n training.append([bag, output_row])\n\n# shuffle our features and turn into np.array\nrandom.shuffle(training)\ntraining = np.array(training)\n\n# create train and test lists. X - patterns, Y - intents\ntrain_x = list(training[:,0])\ntrain_y = list(training[:,1])\n\n# Create model - 3 layers. First layer 128 neurons, second layer 64 neurons and 3rd output layer contains number of neurons\n# equal to number of intents to predict output intent with softmax\nmodel = Sequential()\nmodel.add(Dense(128, input_shape=(len(train_x[0]),), activation='relu'))\nmodel.add(Dropout(0.5))\nmodel.add(Dense(64, activation='relu'))\nmodel.add(Dropout(0.5))\nmodel.add(Dense(len(train_y[0]), activation='softmax'))\n\n# Compile model. Stochastic"} {"instruction": "Create a Python program that takes in two strings and compares them. It should output the number of common characters between them.", "input": "\"My cat\", \"Tasty snacks\"", "output": "def compare_str(str1, str2): \n common_count = 0\n\nfor char in str1:\n if char in str2:\n common_count += 1\n\nreturn common_count\n\nstr1 = \"My cat\"\nstr2 = \"Tasty snacks\"\nprint(\"Number of common characters between '{}' and '{}': {}\".format(\n str1, str2, compare_str(str1, str2)))\n# Output: Number of common characters between 'My cat' and 'Tasty snacks': 3"} {"instruction": "Create a program that finds the average of two numbers.", "input": "7 and 9", "output": "def find_average(num1, num2): return (num1 + num2) / 2 if __name__ == '__main__': print(find_average(7, 9))"} {"instruction": "Create a basic Python program that prints a message in the console every 3 seconds.", "input": "Not applicable", "output": "import time\n\nwhile True:\n print 'This message is printed every 3s'\n time.sleep(3) # Sleep for 3 seconds"} {"instruction": "You need to compute the Average of all numbers stored in an array", "input": "arr = [3, 2, 5, 9, 6]", "output": "average = 5.4"} {"instruction": "Augment an integer list with zeros after every 4 elements.", "input": "List = [1,2,3,4,5,6,7,8]", "output": "def list_augment(int_list): \"\"\" This function takes in a list of integers and augments it with zeros after every 4 elements. \"\"\" augmented_list = [] for i in range(0, len(int_list), 4): augmented_list.append(int_list[i:i + 4]) augmented_list.append(0) augmented_list.pop() return [item for sublist in augmented_list for item in sublist] int_list = [1,2,3,4,5,6,7,8] print(list_augment(int_list)) # Output: [1, 2, 3, 4, 0, 5, 6, 7, 8, 0]"} {"text": "[DE Wikipedia] Kloster Ripalta di Puglia\n\nDas Kloster Ripalta di Puglia (S. Maria di Ripalta di Puglia) ist ein ehemaliges Zisterzienserkloster in der Region Apulien, Italien. Lage Das Kloster lag 7 km von Lesina in der Provinz Foggia am rechten Ufer des Flusses Fortore auf einer kleinen, Ripalta genannten Anhöhe, in der ehemaligen Diözese Civitate, die 1580 mit der neu gegründeten von San Severo zusammengelegt wurde. Geschichte Das Kloster bestand vor seiner Eingliederung in den Zisterzienserorden bereits als Benediktinerkloster. 1201 nahm ein Konvent aus Kloster Casanova (Abruzzen) das Kloster in Besitz, das damit der Filiation der Primarabtei Clairvaux angehörte. Es ist nicht bekannt, ob die Zisterzienser die Kirche neu errichteten oder eine bereits bestehende an ihre Erfordernisse anpassten, jedoch sprechen Architekturdetails für einen Zisterzienserbau. 1255 wurde eine Grangie in Valleverde in der Capitanata eingerichtet. Später fiel das Kloster in Kommende. Nachdem die Zisterzienser das Kloster verlassen hatten, wurden Cölestiner angesiedelt. Anlage und Bauten Von dem Kloster ist nur noch die Kirche, wohl ursprünglich in Form eines lateinischen Kreuzes mit quadratischer Apsis mit drei Lanzettfenstern und Kelchknospenkapitellen sowie Blattkapitellen im Innenraum im bernhardinischen Plan, erhalten, die von drei Schiffen auf ein Schiff reduziert worden ist, und die als Gemeindekirche für die kleine Ansiedlung dient, die sich um das ehemalige Kloster entwickelt hat. Literatur Balduino Gustavo Bedini, Breve prospetto delle abazie cistercensi d’Italia, oO. (Casamari), 1964, ohne ISBN, S. 97–98; Valentino Pace, Kunstdenkmäler Italien: Apulien, Basilicata, Kalabrien, ein Bildhandbuch, Wissenschaftliche Buchgesellschaft Darmstadt 1994, S. 457, ISBN 3-534-08443-8, m. Abb. Weblinks Website der Certosa di Firenze zu Kloster Ripalta, mit Fotos Ripalta di Puglia, Kloster Ripalta di Puglia Ehemaliges Kloster in Apulien Lesina (Apulien) Christentum (Apulien)"} {"instruction": "Edit the following Python program to make it run without any syntax errors.", "input": "def sum(alist)\n total 0\n for i in range alist\n total += i\n return total", "output": "def sum(alist):\n total = 0\n for i in alist:\n total += i\n return total"} {"instruction": "Write a regular expression to validate a domain name.", "input": "", "output": "regex = r\"^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\\.[a-zA-Z]{2,3})$\""} {"text": "[EN Wikipedia] 1994 Nations Cup\n\nThe 1994 Nations Cup was held in Gelsenkirchen on November 17–20. Medals were awarded in the disciplines of men's singles, ladies' singles, pair skating, and ice dancing. Results Men Ladies Pairs Ice dancing External links Skate Canada results Nations Cup, 1994 Bofrost Cup on Ice"} {"instruction": "How can you flatten a list of lists?", "input": "", "output": "from itertools import chain flattened_list = list(chain.from_iterable(list_of_lists))"} {"instruction": "Using HTML, write a code to create a link that redirects to a specified webpage.", "input": "Link: https://www.google.com", "output": "Click here to visit Google"} {"instruction": "Write a Python function that validates a given credit card number.", "input": "", "output": "def validate(number): \"\"\" Validate credit card number using Luhn algorithm \"\"\" num = [int(x) for x in str(number)] return (sum(num[::-2] + [sum(divmod(d*2,10)) for d in num[-2::-2]]) % 10 == 0"} {"instruction": "Edit the following code to find the maximum of three numbers", "input": "a = 3 b = 5 c = 7", "output": "a = 3 b = 5 c = 7 maximum = max(a, b, c) print(\"The maximum of three numbers is: \", maximum)"} {"instruction": "Create a loop in Python with the given requirements.", "input": "Print out the numbers from 1 to 10, inclusive", "output": "for x in range(1, 11): print(x)"} {"text": "[EN Wikipedia] Nuritamburia chlorocalla\n\nNuritamburia chlorocalla is a moth of the family Tortricidae. It was first described by Lord Walsingham in 1907. It is endemic to the island of Hawaii. External links Archipini Endemic moths of Hawaii"} {"instruction": "Write a query for filtering an array of objects in a MongoDB collection by their 'age' field.", "input": "The collection is named 'users' and the filter should return objects with age greater than 21", "output": "db.users.find({\"age\": { $gt: 21 }});"} {"instruction": "Generate a list of the first 10 Fibonacci numbers in Python.", "input": "", "output": "def fibonacci(n): \n a = 0\n b = 1\n if n < 0: \n print(\"Incorrect input\") \n elif n == 0: \n return a \n elif n == 1: \n return b \n else: \n for i in range(2,n+1): \n c = a + b \n a = b \n b = c \n return b \n \n# Driver Program \nfib_list = [] \nfor i in range(10):\n fib_list.append(fibonacci(i)) \n\nprint(fib_list)"} {"instruction": "Create a web crawler in Python that takes a given URL and prints out a list of links.", "input": "https://www.example.com", "output": "from bs4 import BeautifulSoup\nimport requests\n\nurl = 'https://www.example.com'\nresponse = requests.get(url)\n\nsoup = BeautifulSoup(response.text, 'lxml')\nfor link in soup.find_all('a'):\n print(link.get('href'))"} {"instruction": "Create a method in Python to sort all the elements in the given dictionary in descending order of the values.", "input": "dictionary = {\"A\": 30, \"B\": 40, \"C\": 20}", "output": "def sortByValue(dictionary):\n sorted_dict = dict(sorted(dictionary.items(), key=lambda x: x[1], reverse=True))\n return sorted_dict\n\ndictionary = {\"A\": 30, \"B\": 40, \"C\": 20}\nresult = sortByValue(dictionary)\nprint(result) # prints {'B': 40, 'A': 30, 'C': 20}"} {"instruction": "Create a hash table in C with 5 elements.", "input": "", "output": "#include #include struct HashTable { int key; int value; } h[5]; void main() { for (int i = 0; i < 5; i++) { h[i].key = i; h[i].value = i * i; } for (int i = 0; i < 5 ; i++) printf(\"%d %d\\n\", h[i].key, h[i].value); }"} {"text": "[HI Wikipedia] संस्कृत भाषा\n\nसंस्कृत (संस्कृतम्, ) भारत की एक भाषा है। संस्कृत एक हिंद-आर्य भाषा है जो हिंद-यूरोपीय भाषा परिवार की एक शाखा है। संस्कृत दिव्य एवं समृद्ध भाषा है। ऐतिहासिकता की दृष्टि में यह संसार की सभी भाषाओं की जननी है। संस्कृत संसार की प्राचीनतम एवं प्रथम भाषा है। भारतीय आर्ष ग्रंथ का समस्त ज्ञान इसी भाषा में लिपिबद्ध है। संस्कृत ज्ञान की अभिव्यक्ति की भाषा है। आधुनिक भारतीय भाषाएँ जैसे, हिंदी, बांग्ला, मराठी, सिन्धी, पंजाबी, नेपाली, आदि इसी से उत्पन्न हुई हैं। इन सभी भाषाओं में यूरोपीय बंजारों की रोमानी भाषा भी शामिल है। संस्कृत में वैदिक धर्म से संबंधित लगभग सभी धर्मग्रंथ लिखे गए हैं। बौद्ध धर्म (विशेषकर महायान) तथा जैन मत के भी कई महत्त्वपूर्ण ग्रंथ संस्कृत में लिखे गए हैं। आज भी हिंदू धर्म के अधिकतर यज्ञ और पूजा संस्कृत में ही होते हैं। संस्कृत का अर्थ है \"संस्कार की गयी \" अर्थात \"बदलाव की गयी\", संस्कृत भाषा देवनागरी लिपि मे लिखी गयी है, धम्म लिपि में समय के साथ थोड़ा- थोड़ा सुधार (बदलाव) होता रहा उदाहरण के लिए मौर्य का व गुप्त काल के शिलालेखों व अभिलेखों में शब्दो मे थोड़ा फर्क दिखायी पड़ता है। अनेक शताब्दियों तक यह चलता गया तथा पाली प्राकृत भाषा ( धम्म लिपि मे ) से अनेक लिपियों का उदय हुआ जैसे दक्षिण मे तमिल, तेलुगु व उत्तर मे बांगला, नागरी शारदा । 10000 ईसा पूर्व में इंग्लिश लिपि का प्रचलन शुरू हुआ व 11 शताब्दी तक आते आते देवनागरी लिपि पूर्ण से विकसित हो गयी , अगर बात करे संस्कृत भाषा की चूंकि संस्कृत की लिपि देवनागरी है अत: यह भी 10 वीं शताब्दी के मध्य आयी है, इससे पहले संस्कृत भाषा का कोई पुरातात्विक प्रमाण नही मिला व ना ही कही इसका जिक्र है। अत: इससे सिद्ध होता है की भारत (जिसका प्राचीन नाम हिंदुस्तान है) की सबसे पुरानी भाषा प्राकृत पाली है व सबसे प्राचीन लिपि धम्म लिपि (आजकल ब्राह्मी लिपि) है। अगर देखा जाए सबसे प्राचीन भाषा व लिपि सिंधु घाटी सभ्यता की भाषा जो अब तक नही पढ़ी गयी है । संस्कृत आमतौर पर कई पुरानी इंडो-आर्यन किस्मों को जोड़ती है। इनमें से सबसे पुरातन ऋग्वेद में पाया जाने वाला वैदिक संस्कृत है, जो 9 वीं शताब्दी के बाद रचित 1000 भजनों का एक संग्रह है, जो इंडो-आर्यन जनजातियों द्वारा आज के उत्तरी अफगानिस्तान और उत्तरी भारत में अफगानिस्तान से पूर्व की ओर पलायन करते हैं। वैदिक संस्कृत ने उपमहाद्वीप की प्राचीन प्राचीन भाषाओं के साथ बातचीत की, नए पौधों और जानवरों के नामों को अवशोषित किया। भारत के संविधान की आठवीं अनुसूची में संस्कृत को भी सम्मिलित किया गया है। यह उत्तराखण्ड और हिमाचल प्रदेश की आधिकारिक राजभाषा है। आकाशवाणी और दूरदर्शन से संस्कृत में समाचार प्रसारित किए जाते हैं। कतिपय वर्षों से डी. डी. न्यूज (CC News) द्वारा वार्तावली नामक अर्धहोरावधि का संस्कृत-कार्यक्रम भी प्रसारित किया जा रहा है, जो हिन्दी चलचित्र गीतों के संस्कृतानुवाद, सरल-संस्कृत-शिक्षण, संस्कृत-वार्ता और महापुरुषों की संस्कृत जीवनवृत्तियों, सुभाषित-रत्नों आदि के कारण अनुदिन लोकप्रियता को प्राप्त हो रहा है। इतिहास संस्कृत का इतिहास बहुत पुराना है। वर्तमान समय में प्राप्त सबसे प्राचीन संस्कृत ग्रन्थ ॠग्वेद है जो कम से कम ढाई हजार ईसापूर्व की रचना है। व्याकरण संस्कृत भाषा का…"} {"instruction": "Add a method to a given class to check if an element is present in it.", "input": "", "output": "class MyClass: def __init__(self, elements): self.elements = elements def contains(self, element): return element in self.elements"} {"instruction": "Create a SQL statement to list all the entries with a rating greater than 3 from the table \"movies\".", "input": "", "output": "SELECT * FROM movies WHERE rating > 3;"} {"text": "[HI Wikipedia] ईरोस\n\nईरोस (यूनानी : एरोस ) प्राचीन यूनानी धर्म के प्रमुख देवताओं में से एक थे। वो प्यार, कामना, वासना और संभोग के देवता थे। कुछ इतिहासकारों के मुताबिक वो पुरुष-पुरुष प्रेम का ख़ास तौर पर प्रतिनिधित्व करते थे। प्राचीन रोमन धर्म में उनके समतुल्य देवता थे क्यूपिड। हिंदू समतुल्य देवता कामदेव. यूनान के देवी-देवता यूनानी धर्म"} {"text": "[HI Wikipedia] कोयंबतूर\n\nकोयम्बतूर (Coimbatore) या कोयंबुत्तूर भारत के तमिल नाडु राज्य के कोयम्बतूर ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। विवरण कर्नाटक और तमिलनाडु की सीमा पर बसा शहर मुख्य रूप से एक औद्योगिक नगरी है। शहर रेल और सड़क और वायु मार्ग से अच्छी तरह पूरे भारत से जुड़ा है। कोयंबुत्तूर एक महत्वपूर्ण औद्योगिक शहर है। दक्षिण भारत के मैनचेस्टर के नाम से प्रसिद्ध कोयंबुत्तूर एक प्रमुख कपड़ा उत्पादन केंद्र है। नीलगिरी की तराई में स्थित यह शहर पूरे साल सुहावने मौसम का अहसास कराता है। दक्षिण से नीलगिरी की यात्रा करने वाले पर्यटक कोयंबुत्तूर को आधार शिविर की तरह प्रयोग करते हैं। कपड़ा उत्पादन कारखानों के अतिरिक्त भी यहां बहुत कुछ है जहां सैलानी घूम-फिर सकते हैं। यहां का जैविक उद्यान, कृषि विश्‍वविद्यालय संग्रहालय और वीओसी पार्क विशेष रूप से पर्यटकों को आकर्षित करता है। कोयंबुत्तूर में बहुत सारे मंदिर भी हैं जो इस शहर के महत्त्व को और भी बढ़ाते हैं। प्रमुख आकर्षण वीओसी पार्क वीओसी पार्क कोयंबटूर का मुख्य आकर्षण है। इस उद्यान का नाम मशहूर स्वतंत्रता सैनानी वी.ओ. चिदंबरम के नाम पर पड़ा। यूं तो यह पार्क सभी आयु वर्ग के लोगों को पसंद आता है लेकिन बच्चों को यह उद्यान खास तौर से लुभाता है। यहां पर एक एक्वेरियम भी है जहां विभिन्न प्रजातियों की मछलियों को देखा जा सकता हैं। इसके अलावा यहां एक छोटा चिड़ियाघर और टॉय ट्रेन भी है जिनका आनंद उठाया जा सकता है। कृषि विश्‍वविद्यालय तमिलनाडु कृषि विश्‍वविद्यालय कोयंबटूर के रोचक पर्यटक स्थलों में से एक है। रेलवे स्टेशन से पांच किलोमीटर दूर स्थित यह विश्‍वविद्यालय एशिया के सर्वश्रेष्ठ कृषि विश्‍वविद्यालयों में से एक है। यहां का मुख्य आकर्षण यहां का जैविक उद्यान है। करीब 300 हैक्टेयर में फैले इस उद्यान में विविध प्रजाति के पेड़-पौधों का अच्छा संग्रह है। पेरुर मंदिर पेरुर कोयंबटूर से 6 किलोमीटर दूर स्थित एक छोटा सा शहर है। इसका मुख्य आकर्षण पेरुर मंदिर है जो सात कोंगु शिवालयम में से एक है। मंदिर की बाहरी इमारत मदुरै के शासकों ने 17वीं शताब्दी में बनवाई थी लेकिन अंदर का मुख्य मंदिर उससे काफी पुराना है। यह मंदिर भगवान शिव को समर्पित है। मंदिर के प्रवेश द्वार के पास स्तंभ के नीचे उकेरी गई एक सैनिक की प्रतिमा यहां का मुख्य आकर्षण है। इस सिपाही की वर्दी औरंगजेब के सैनिकों के समान है। मरुधमलाई मंदिर कोयंबटूर रेलवे स्टेशन से 12 किलोमीटर दूर पहाड़ी पर स्थित यह मंदिर भगवान सुब्रमण्यम को समर्पित है। यह मंदिर इस क्षेत्र के सबसे प्रसिद्ध मंदिरों में से एक है। इसकी प्रसिद्धि का मुख्य कारण इस मंदिर के मुख्य देवता दंडयुथपाणी हैं। इनके बारे में माना जाता है कि उन्होंने यहां कई चमत्कार किए थे। थाई पूसम और तिरुकर्तीगई उत्सव यहां बहुत धूम-धाम से मनाए जाते हैं। सिरुवनी वॉटरफॉल शहर से 37 किलोमीटर दूर स्थित है सिरुवनी जलप्रपात और बांध। इनकी खूबसूरती से यहां आने वाले दर्शक मंत्रमुग्ध हुए बिना नहीं रहते। इसी सुंदरता के कारण प्रतिवर्ष सैकड़ों पर्यटक यहां घूमने आते हैं। सिरुवनी के पानी का भी अलग ही स्वाद है। इसलिए यहां आने पर इसे जरूर चखना चाहिए। अन्नामलई वन्यजीव अभयारण्य पोल्लाची के पास स्थित अन्नामलई वन्यजीव अभयारण्य कोयंबटूर से कुछ दूरी पर स्थित एक…"} {"instruction": "Suggest a method in Java to compare two strings.", "input": "", "output": "The easiest way to compare two strings in Java is to use the built-in String class's equals() method. This method compares all characters in the strings, and returns true if the strings are equal or false otherwise. For example, given the strings \"Hello\" and \"Goodbye\", the following code would evaluate to false: String s1 = \"Hello\"; String s2 = \"Goodbye\"; boolean equal = s1.equals(s2); // false"} {"instruction": "Write an if statement to check if a string is equal to \"Hello\".", "input": "word = \"Hello\"", "output": "// program to check if a string is equal to \"Hello\" if (word == \"Hello\") { console.log(\"String is equal to 'Hello'\") }"} {"instruction": "Train a Random Forest classifier in Python on the Iris dataset.", "input": "", "output": "import pandas as pd from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier # Import Iris dataset iris_data = pd.read_csv(\"iris.csv\") # Split dataset into training and testing X = iris_data.drop(\"species\", axis=1) y = iris_data['species'] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3) # Train a Random Forest classifier clf = RandomForestClassifier() clf.fit(X_train, y_train) # Make predictions preds = clf.predict(X_test)"} {"instruction": "Generate a Python program that creates a list of five random integers between 1 and 100.", "input": "Not applicable", "output": "import random\n\nmy_list = []\nfor i in range(5):\n my_list.append(random.randint(1,100))\n\nprint(my_list)"} {"text": "[DE Wikipedia] Elisabeth Borchers\n\nElisabeth Borchers (* 27. Februar 1926 in Homberg, Niederrhein; † 25. September 2013 in Frankfurt am Main) war eine deutsche Schriftstellerin und literarische Übersetzerin. Leben Elisabeth Borchers wuchs in Homberg auf und lebte während des Zweiten Weltkrieges bei ihren Großeltern im elsässischen Niederbronn. Später floh die Familie nach Weißenau in Oberschwaben. Von 1945 bis 1954 arbeitete Borchers als Dolmetscherin bei der französischen Besatzungsmacht. Ihre 1946 geschlossene Ehe wurde 1957 geschieden. Von 1958 bis 1960 hielt sie sich in den USA auf. 1959 wurde sie Mitarbeiterin von Inge Aicher-Scholl an der Hochschule für Gestaltung Ulm. Von 1960 bis 1971 arbeitete Borchers als Lektorin im Luchterhand-Verlag. 1971 wechselte sie in gleicher Funktion zum Suhrkamp und Insel Verlag, bei dem sie bis 1998 blieb. Borchers entdeckte und förderte viele Autoren und Autorinnen. Sie verfasste Lyrikbände und zahlreiche Kinderbücher. Außerdem wurde sie als Herausgeberin einer Vielzahl von literarischen Anthologien mit Texten für Kinder und Erwachsene bekannt. Unter anderem übersetzte sie die sieben von Ivan Jakowlewitsch Bilibin illustrierten Märchen aus der Volksmärchensammlung von Alexander Nikolajewitsch Afanassjew aus dem Russischen und aus dem Französischen den Roman Paulina 1880 von Pierre Jean Jouve. Borchers war Mitglied des PEN-Zentrums Deutschland, der Mainzer Akademie der Wissenschaften und der Literatur, der Deutschen Akademie für Sprache und Dichtung in Darmstadt und der Else-Lasker-Schüler-Gesellschaft. Elisabeth Borchers starb 2013 mit 87 Jahren und wurde auf dem Frankfurter Hauptfriedhof bestattet. Auszeichnungen 1965: Funkerzählerpreis des SDR 1967: Literaturpreis des Kulturkreises im Bundesverband der Deutschen Industrie 1976: Roswitha-Preis der Stadt Bad Gandersheim 1976: Deutscher Jugendbuchpreis mit Wilhelm Schlote für Heute wünsch ich mir ein Nilpferd 1986: Friedrich-Hölderlin-Preis der Stadt Bad Homburg 1996: Verdienstkreuz 1. Klasse der Bundesrepublik Deutschland 2012: Horst-Bienek-Preis für Lyrik Werke Gedichte, Neuwied a. Rh. [u. a.] 1961 Bi Be Bo Ba Bu – die Igelkinder, Hamburg [u. a.] 1962 (zusammen mit Dietlind Blech) Das alte Auto, Gütersloh 1965 (zusammen mit Werner Maurer) Nacht aus Eis. Szenen und Spiele, Neuwied [u. a.] 1965 Und oben schwimmt die Sonne davon, München 1965 (zusammen mit Dietlind Blech) Reise mit Samuel, Recklinghausen 1967 Der Tisch, an dem wir sitzen. Gedichte, mit Illustrationen von Günter Bruno Fuchs, Neuwied [u. a.] 1967 Das rote Haus in einer kleinen Stadt, München 1969 Eine glückliche Familie und andere Prosa, Neuwied [u. a.] 1970 Herr Elf und seine elf Töchter, München 1971 (zusammen mit Ursel Maiorana) Papperlapapp, sagt Herr Franz, der Rennfahrer, München 1971 (zusammen mit Renate Sellig) Als…"} {"instruction": "Compare two integers and print the larger one.", "input": "a = 3, b = 5", "output": "if a > b: print(a) else: print(b)"} {"text": "[EN Wikipedia] Analog signal\n\nAn analog signal is any continuous-time signal representing some other quantity, i.e., analogous to another quantity. For example, in an analog audio signal, the instantaneous signal voltage varies continuously with the pressure of the sound waves. In contrast, a digital signal represents the original time-varying quantity as a sampled sequence of quantized values. Digital sampling imposes some bandwidth and dynamic range constraints on the representation and adds quantization error. The term analog signal usually refers to electrical signals; however, mechanical, pneumatic, hydraulic, and other systems may also convey or be considered analog signals. Representation An analog signal uses some property of the medium to convey the signal's information. For example, an aneroid barometer uses rotary position as the signal to convey pressure information. In an electrical signal, the voltage, current, or frequency of the signal may be varied to represent the information. Any information may be conveyed by an analog signal; such a signal may be a measured response to changes in a physical variable, such as sound, light, temperature, position, or pressure. The physical variable is converted to an analog signal by a transducer. For example, sound striking the diaphragm of a microphone induces corresponding fluctuations in the current produced by a coil in an electromagnetic microphone or the voltage produced by a condenser microphone. The voltage or the current is said to be an analog of the sound. Noise An analog signal is subject to electronic noise and distortion introduced by communication channels, recording and signal processing operations, which can progressively degrade the signal-to-noise ratio (SNR). As the signal is transmitted, copied, or processed, the unavoidable noise introduced in the signal path will accumulate as a generation loss, progressively and irreversibly degrading the SNR, until in extreme cases, the signal can be overwhelmed. Noise can show up as hiss and intermodulation distortion in audio signals, or snow in video signals. Generation loss is irreversible as there is no reliable method to distinguish the noise from the signal. Converting an analog signal to digital form introduces a low-level quantization noise into the signal due to finite resolution of digital systems. Once in digital form, the signal can be transmitted, stored, and processed without introducing additional noise or distortion using error detection and correction. Noise accumulation in analog systems can be minimized by electromagnetic shielding, balanced lines, low-noise amplifiers and high-quality electrical components. See also Amplifier Analog computer Analog device Analog signal processing Magnetic tape Preamplifier References Analog circuits Electronic…"} {"instruction": "Write a python program to classify a text into one of three categories: positive, negative, or neutral.", "input": "The airport experience was not bad at all.", "output": "import nltk\n\n# load in the text and tokenize it\ntext = \"The airport experience was not bad at all.\"\ntokens = nltk.word_tokenize(text)\n\n# define the category labels\nlabels = ['positive', 'negative', 'neutral']\n\n# define a function to predict the sentiment\ndef classify_sentiment(tokens):\n # TODO: write code to classify the sentiment\n # …\n return predicted_label\n\n# use the function to predict the sentiment\npredicted_label = classify_sentiment(tokens)\nprint(f\"The sentiment of the text is {predicted_label}.\")"} {"instruction": "Generate a password strength checker in Python that follows the NIST guidelines.", "input": "", "output": "import re\n\ndef check_password_strength(password):\n '''This function checks if the given password is strong according to NIST guidelines'''\n # check if password is atleast 8 characters long\n if len(password) < 8:\n return False\n \n # check if password contains atleast one lowercase letter\n if not re.search('[a-z]', password):\n return False\n \n # check if password contains atleast one uppercase letter\n if not re.search('[A-Z]', password):\n return False\n \n # check if password contains atleast one number\n if not re.search('[0-9]', password):\n return False\n \n return True"} {"instruction": "Create a python program to edit the given nested dictionary by adding a new element.", "input": "nested_dict = {\n 'makers': ['John', 'Alan'],\n 'printers':{\n 'color':['hp', 'canon'],\n 'black_white': ['epson']\n }\n }\nNew element to add:\n\n{'copiers':['Xerox', 'Ricoh']}", "output": "def edit_dict(nested_dict, new_element):\n \"\"\"Edit the given nested dictionary by adding a new element.\"\"\"\n nested_dict.update(new_element)\n return nested_dict\n\n# Usage Example \nnested_dict = {\n 'makers': ['John', 'Alan'],\n 'printers':{\n 'color':['hp', 'canon'],\n 'black_white': ['epson']\n }\n }\n\nnew_element = {'copiers':['Xerox', 'Ricoh']}\n\nedited_dict = edit_dict(nested_dict, new_element)\nprint(edited_dict)\n# {'makers': ['John', 'Alan'], \n# 'printers': {'color': ['hp', 'canon'], 'black_white': ['epson']}, \n# 'copiers': ['Xerox', 'Ricoh']"} {"text": "[EN Wikipedia] Wilbur Mack\n\nWilbur Mack (born George Frear Runyon, July 29, 1873 – March 13, 1964) was an American film actor and early vaudeville performer from the 1920s through the 1960s. His film acting career began during the silent film era. Biography Mack was born and raised in Binghamton, New York, and began acting professionally when he joined a repertory theatre when he was 16. He found success performing vaudeville with first wife Nella Walker (\"Mack and Walker\"). The couple divorced not far into the marriage and Walker subsequently found success as a supporting actress in the \"talkies.\" Mack, meantime, found a new partner: Gertrude Purdy, with whom he reprised his popular husband and wife vaudeville routine (this time headlined \"Mack and Purdy\"). In addition to performing, Mack wrote dialogue for skits and words and music for songs in their vaudeville shows. In 1925 Mack entered into a film acting career. His first film appearance was Gold and Grit. With wife Gertrude, he also wrote and performed in a Vitaphone romantic comedy pantomime An Everyday Occurrence (1928). Mack made a smooth transition to talking films, but despite racking up an impressive number of appearances had less success finding lead or even featured roles. In 1930 he made thirteen films; from 1931 through 1933 he appeared in twenty-four; and from 1934 until 1939, he was cast fifty-five times. However, forty-five of those appearances were uncredited. His most notable credited role during that period was the 1936 crime drama The Crime Patrol, alongside Ray Walker. Mack's career in subsequent decades was similar to his career up until that point, with moviegoers seeing him play mostly uncredited roles. Of the seventy-six film appearances he made from 1940 to 1949, only seven were credited. He would continue to appear in both films and television throughout the 1950s and into 1962, with his last being an uncredited part in the 1962 movie Who's Got the Action? starring Dean Martin, Lana Turner, Eddie Albert, and Walter Matthau. Mack was living in Hollywood when he died on March 13, 1964. His remains are interred at Forest Lawn Memorial Park in Hollywood Hills. Selected filmography Gold and Grit (1925) - Jack Crawford The Hidden Way (1926) - Sid Atkins Straight Shootin' (1927) - 'Black' Brody Beauty and Bullets (1928) The Avenging Shadow (1928) The Body Punch (1929) - Peyson Turner Sweethearts on Parade (1930) Scarlet Pages (1930) - Mr. Henry Mason Paid (1930) - Mr. Irwin (uncredited) The Lawyer's Secret (1931) - Frank - District Attorney (uncredited) Annabelle's Affairs (1931) - Vance, assistant hotel manager Advice to the Lovelorn (1933) - Reporter Million Dollar Baby (1934) The Crime Patrol (1936) - Vic Santell That Gang of Mine (1940) - Nick Buffalo The Fatal Hour (1940) - Police Medical Examiner…"} {"text": "[DE Wikipedia] Karl Kugler\n\nKarl Kugler (* 20. Mai 1803 in Monheim (Schwaben); † 30. April 1881 in Eichstätt) war ein deutscher Lehrer und Heimatforscher. Leben Kugler wurde im Mai 1803 in Monheim als Sohn eines Handelsmannes aus Monheim geboren. Er lernte als Schüler an den Königlichen Studien-Schulen zu Eichstätt im Oberdonaukreis, wo er beim Schülerwettbewerb der Unterprimär-Schule 1813 einen 8. Preis im I. Cursus und 1814 einen 6. Preis im II. Cursus gewann. Nach seiner Schulzeit studierte er ebenda für das Lehramt Philosophie. Nach Abschluss seiner Ausbildung arbeitete Kugler als Lehrer an dieser Bildungsanstalt. 1830 Lehramtskandidat, wurde er am 3. November 1834 Studienlehrer und am 16. Oktober 1840 Gymnasialprofessor. Bereits während seiner Tätigkeit als Lehrer schrieb Kugler einige Bücher. Am 2. April 1865 wegen Krankheit beurlaubt, wurde er mit Datum 6. Oktober 1865 auf Ansuchen in den Ruhestand versetzt. Nach seiner Pensionierung widmete er sich der Heimatforschung, speziell der Ortsnamenforschung, und verfasste neben anderen Büchern ein umfangreiches und bis heute vielzitiertes Buch über die Ortsnamen im Altmühltal und Umgebung. Bücher (Auswahl) Erklärung von tausend Ortsnamen der Altmülalp und ihres Umkreises: Ein Versuch von Karl Kugler, Eichstätt, 1873 Digitalisat Die Altmülalp, das heißt: das Altmülthal mit dem Flußgebiete innerhalb seines Berglandes: topographisch, historisch und landschaftlich dargestellt von Karl Kugler mit Zeichnungen von Gustav Schröpler, Ingolstadt: Krüll, 1868 Digitalisat Einige Worte über das Studium der Geschichte und Poesie an den gelehrten Schulen, Eichstätt, 1860. Geschichte Bayerns von der frühesten bis auf unsere Zeit, für Schule und Haus zusammen mit Sebastian Mutzl, Regensburg: Manz, 1857 Digitalisat Einige Bemerkungen über das Verhältniß zwischen Familie und Schule, Eichstätt, 1846 Einzelnachweise Heimatforscher (Bayern) Deutscher Geboren 1803 Gestorben 1881 Mann Gymnasiallehrer"} {"text": "[DE Wikipedia] Dorothee Lebeda\n\nDorothee Lebeda (* 1967) ist eine deutsche Pflegewissenschaftlerin und Professorin für Pflegepädagogik mit dem Schwerpunkt Beratung an der Katholischen Hochschule Nordrhein-Westfalen, Abteilung Köln. Leben Lebeda absolvierte eine Ausbildung als Krankenschwester, studierte Pflegewissenschaft und später Supervision. 2021 promovierte sie in Erziehungswissenschaften an der Universität Bielefeld bei Katharina Gröning. Lebeda ist verheiratet. Schriften (Auswahl) Mitherausgeberin der Onlinezeitschrift Forum Supervision Beratung bei Pflegebedürftigkeit. Perspektiven für die klinische Sozialarbeit und Pflegeberatung im gesellschaftlichen Modernisierungsprozess. Dissertation Universität Bielefeld: Universitätsbibliothek Bielefeld, 2021. Weblinks Pflegewissenschaftler Hochschullehrer (KatHo NRW, Abteilung Köln) Sachbuchautor Deutscher Geboren 1967 Frau"} {"instruction": "Modify the code below to create a new function called \"addSquares()\" that adds the squares of two numbers and returns the result.", "input": "def add(x, y): return x + y", "output": "def add(x, y): return x + y def addSquares(x, y): return x*x + y*y"} {"instruction": "Correct the following Python code so it prints out the current hour in 24-hour format.", "input": "import datetime current_hour = datetime.now() print(\"Current hour is\") print(current_hour.hour)", "output": "import datetime current_time = datetime.datetime.now() print(\"Current hour is\") print(current_time.strftime(\"%H\"))"} {"instruction": "Generate all the permutations of a string using Python.", "input": "str = \"abc\"", "output": "def permutations(str):\n\tif len(str) <= 1:\n\t\treturn [str]\n\n\tperms = [] \n\tfor i in range(len(str)):\n\t\trest_strings = str[:i] + str[i+1:]\n\t\tfor perm in permutations(rest_strings):\n\t\t\tperms.append(str[i:i+1] + perm)\n\t\n\treturn perms\n\nstr = \"abc\"\nperms = permutations(str)\nprint(perms) # ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']"} {"instruction": "Write a CSS style to make a
    element of width 500px and height 400px.", "input": "", "output": "div { width: 500px; height: 400px; }"} {"instruction": "Develop a Python script to add a given list of numbers.", "input": "[4, 8, 15, 20]", "output": "def sum_list(list_of_nums):\n total = 0\n for number in list_of_nums:\n total += number\n return total\n\nresult = sum_list([4, 8, 15, 20])\nprint(result)"} {"instruction": "Create a Swift program to print out the following: “Hello, World!”", "input": "", "output": "print(\"Hello, World!\")"} {"text": "[DE Wikipedia] Atomwaffenfreie Zone\n\nDer Begriff atomwaffenfreie Zone oder kernwaffenfreie Zone bezeichnet einen räumlichen Bereich, der frei von Kernwaffen ist. Erstmals tauchte er in den 1950er Jahren auf, als im Kalten Krieg das atomare Wettrüsten zwischen Ost und West begann und auch in der Bundesrepublik Deutschland über die atomare Bewaffnung der Bundeswehr nachgedacht wurde. Von Seiten der Friedensbewegung forderte man eine atomwaffenfreie Zone in Mitteleuropa. Der nach dem polnischen Außenminister benannte Rapacki-Plan von 1957 sah ebenfalls eine atomwaffenfreie Zone in Mitteleuropa vor, scheiterte aber. Nachdem jedoch Briten, US-Amerikaner und Franzosen Atomwaffen in der Bundesrepublik Deutschland stationiert hatten, schien der Begriff innerhalb Deutschlands obsolet geworden zu sein, hatte jedoch global weiter seine Berechtigung (siehe Atomwaffensperrvertrag). Kernwaffenfreie Zonen, die in völkerrechtlichen Verträgen festgehalten sind, existieren in der Antarktis, in Lateinamerika, im Südpazifik, in Südostasien, Afrika, Zentralasien und Teilen Deutschlands (durch den Zwei-plus-Vier-Vertrag, nach dem im Beitrittsgebiet und ganz Berlin weder ausländische NATO-Truppen noch Atomwaffen stationiert werden dürfen). Der Begriff lebte in Deutschland mit der Friedensbewegung Anfang der 1980er Jahre, die sich gegen die sogenannte Nachrüstung im Rahmen des NATO-Doppelbeschlusses wandte, wieder auf. Schulen, Kommunen u. ä. erklärten sich zur atomwaffenfreien Zone, um ihre Ablehnung gegen Atomwaffen kundzutun. Da jedoch diese Institutionen, selbst wenn sie Träger hoheitlicher Gewalt waren, juristisch keine Kompetenz der Verteidigung haben, galten diese rein deklaratorischen Stellungnahmen als rechtlich irrelevant. Heute taucht der Begriff immer wieder im Zusammenhang mit der atomaren Rüstung im Nahen Osten und Asien auf. Länder wie Israel, Pakistan und Indien sowie Nordkorea widersetzen sich mit ihren Atomprogrammen dem Ziel der fünf offiziellen Atommächte (USA, Großbritannien, Frankreich, Russland und Volksrepublik China), atomwaffenfreie Zonen aus sicherheitspolitischen Gründen zu erhalten. Siehe auch Atomwaffenverbotsvertrag Nuklearwaffenkonvention Budapester Memorandum Atomwaffen Atommacht Literatur Heinz Gärtner: A Nuclear-Weapon-Free Zone in the Middle East. Kurzanalyse. Österreichisches Institut für Internationale Politik. April 2011 (PDF, abgerufen am 27. April 2013). Axel Krohn: Nuklearwaffenfreie Zone. Regionales Disengagement unter der Rahmenbedingung globaler Grossmachtinteressen. Das Fallbeispiel Nordeuropa (= Militär, Rüstung, Sicherheit. Bd. 51). Nomos, Baden-Baden 1989, ISBN 3-7890-1698-5. Roberta Mulas: Nuclear Weapon Free Zones and the Nuclear Powers: Lessons for a WMD/DVs Free Zone in the Middle East. Policy Brief No. 5/2011, HSFK, Frankfurt am Main (PDF, abgerufen am 27.…"} {"instruction": "Generate a code to sort a list of floats.", "input": "[4.5, 7.5, 1.5, -2.5]", "output": "def sort_floats(arr): arr.sort(key=float) return arr"} {"instruction": "Create a user-defined type in Python to store information about a person.", "input": "", "output": "class Person: def __init__(self, firstname, lastname, age): self.firstname = firstname self.lastname = lastname self.age = age person1 = Person('John', 'Smith', 25)"} {"text": "[EN Wikipedia] Heterogyna\n\nHeterogynaidae is a minor and disputed lineage (only eight described species in a single genus, Heterogyna) of small spheciform wasps occurring in Madagascar, Botswana, Turkmenistan, Oman, the United Arab Emirates, and the Eastern Mediterranean area. The majority are dark in color and range in size from approximately 1.5 to 5.0 mm. Most specimens have been collected in arid climates, but one species from Madagascar is known to occur in a humid forest habitat. Although males have functional wings, heterogynaid females are typically brachypterous, a trait which is unique among spheciform wasps. Wing venation is reduced in both sexes. All species are diurnal, with the exception of H. nocticola. Other aspects of their biology are completely unknown, but details of their morphology have prompted researchers to hypothesize that they may be non-fossorial parasitoids adapted to hunt in tight spaces, such as under tree bark. This is speculative and has not yet been confirmed by actual observations of behavior. It is also possible that modifications of the female metasomal tergum VI and gonostyli may represent a unique prey transport mechanism, but this is also unconfirmed. The Heterogynaidae were historically considered the sister taxon to the remainder of the Apoidea, but recent studies utilizing molecular characters do not support this hypothesis. While monophyly of the genus is strongly supported, it is now considered to be related to the Crabronidae or, most recently, a lineage within the Bembicidae. References Goulet, H., Huber, J.T. (1993) Hymenoptera of the World. Agriculture Canada Research Branch, publication 1894/E. 668pp. Ohl, M. & Bleidorn, C. (2006) \"The phylogenetic position of the enigmatic wasp family Heterogynaidae based on molecular data, with a new description of a new, nocturnal species (Hymenoptera: Apoidea)\". Systematic Entomology, 31, 321–337. Apoidea genera"} {"text": "[DE Wikipedia] Younes Lalami\n\nYounes Lalami Laaroussi (; * 18. April 2001 in Montreal, Kanada) ist ein kanadisch-marokkanischer Tennisspieler. Persönliches Lalami Laaroussi wurde in Montreal, Quebec, geboren, spielt Tennis aber für das Geburtsland seines Vaters, Marokko. Seine Schwester Nadia Lalami (* 1990) erreichte die Top 300 der Weltrangliste und sein Bruder Othmane (* 1992) spielte für die Auburn University College-Tennis. Karriere Bis Mitte 2019 spielte er auf der ITF Junior Tour. In der Jugend-Rangliste erreichte er mit Rang 134 seine höchste Notierung. Sein bestes Ergebnis war der Sieg beim J1 Casablanca, der zweithöchsten Turnierkategorie, im Doppel. Im selben Jahr begann er ein Studium an der Old Dominion University im Fach International Business. In seiner ersten Saison im College Tennis war seine Bilanz 14:5. Bei den Profis spielte Lalami Laaroussi erstmals während seines Studiums, 2019 sammelte er erste Punkte für die Weltrangliste. 2022 war sein bis dato erfolgreichstes Jahr. Im Doppel gewann er zwei Turniere auf der ITF Future Tour. Im Einzel scheiterte er einmal im Halbfinale und einmal im Endspiel, wodurch er in beiden Wertungen das Jahr in den Top 1000 abschloss. In diesem Jahr spielte er auch sein erstes Match für die marokkanische Davis-Cup-Mannschaft, wo er bis 2023 alle seiner drei Matches gewann. Dank einer Wildcard gab er im April 2023 in Marrakesch sein Debüt auf der ATP Tour. Sowohl im Einzel gegen Alexei Popyrin als auch im Doppel, wo er mit Hamza El Amine antrat, verlor er ohne eigenen Satzgewinn. Weblinks Profil auf der Seite der Hochschule (englisch) Davis-Cup-Spieler (Marokko) Kanadier Marokkaner Geboren 2001 Mann"} {"instruction": "How many lines would the following algorithm require?", "input": "# Find all the prime numbers between two given numbers # Input: two numbers, n1 and n2 # Output: list of prime numbers between n1 and n2", "output": "It would require approximately 9 lines of code."} {"instruction": "Construct a regular expression that extracts substrings that match the pattern \"AAA_BBB_CCC\".", "input": "", "output": "Regex: ^([A-Za-z]{3})_([A-Za-z]{3})_([A-Za-z]{3})$"} {"instruction": "Write a Python program that takes a list of numbers and creates a new list of even numbers only.", "input": "lst = [2, 3, 5, 6, 7, 8, 10, 11]", "output": "def get_even_numbers(lst):\n even_lst = []\n for num in lst:\n if num % 2 == 0:\n even_lst.append(num)\n return even_lst"} {"instruction": "What can be changed in the following Python code to improve its readability?", "input": "def findMax(list):\n x=list[0]\n for i in list:\n if i>x:\n x=i\n return x", "output": "def findMax(list):\n # initialize the maximum variable to the first element of the list.\n maximum = list[0]\n\n # iterate through the list and compare each element to the current maximum element.\n for element in list:\n if element > maximum:\n maximum = element\n \n # return the maximum element.\n return maximum"} {"instruction": "Write a Python program to optimize the performance of a network by pruning redundant neurons in the model.", "input": "A simple MLP neural network with 9 neurons in the input layer, 2 hidden layers with 6 neurons each, and 2 output neurons.", "output": "import numpy as np\nfrom sklearn.neural_network import MLPClassifier\n\n# define model\nmodel = MLPClassifier(hidden_layer_sizes=(6, 6), activation='relu')\n\n# prune redundant neurons\npruned_model = MLPClassifier(hidden_layer_sizes=(4, 4), activation='relu')\n\n# define data\nx = np.random.rand(1000, 9)\ny = np.random.randint(2, size=(1000,2))\n\n# train pruned model\npruned_model.fit(x, y)\n\n# evaluate pruned model\nscore = pruned_model.score(x, y)\n\nprint(\"Pruned model performance:\", score)\n\n# train original model\nmodel.fit(x, y)\n\n# evaluate original model\nscore = model.score(x, y)\n\nprint(\"Original model performance:\", score)"} {"instruction": "Create a Ruby script to return the nth Fibonacci number.", "input": "", "output": "# Function to return the nth Fibonacci number def calculateFibonacci(num) if num < 0 return 'Incorrect input' elsif num == 0 return 0 elsif num == 1 return 1 end #Recursive Function return calculateFibonacci(num - 1) + calculateFibonacci(num - 2) end # Driver Program puts calculateFibonacci(7)"} {"instruction": "Replace each occurrence of the given character in a string with a space.", "input": "String: abcde Character: c", "output": "String: ab de"} {"instruction": "Create an angle converter function which converts degrees to radians.", "input": "", "output": "function degToRad(deg) { return deg * (Math.PI/180); }"} {"instruction": "Convert the following function call from Python to JavaScript.", "input": "def my_function(a, b):\n return a + b\n\nmy_function(3, 4)", "output": "function myFunction(a, b) {\n return a + b;\n}\n\nmyFunction(3, 4);"} {"instruction": "Given a string, write a program to reverse the words in the string.", "input": "", "output": "def reverse_words(s): return ' '.join(s.split()[::-1])"} {"instruction": "Create a JavaScript program to validate the username entered by the user.", "input": "", "output": "function validateUsername(username) { let rx = new RegExp('^[A-Za-z0-9_]{3,20}$'); return rx.test(username); }"} {"instruction": "Develop a program to convert an infix expression to prefix notation.", "input": "A*(B+C)-D/(E+F)", "output": "def infix_to_prefix(exp): # stack to store operators stack = [] # prefix expression pref_exp = \"\" # traverse through the expression for char in exp: # if the character is an operand # add it to prefix expression if char.isalpha(): pref_exp += char # if the character is an operator elif char in \"*/+-^\": # push the operator to the stack stack.append(char) # if the character is ')' elif char == ')': # pop all the operators from # the stack until '(' is found while(stack[-1] != '('): pref_exp += stack.pop() # remove '(' from the stack stack.pop() # add all the operators to the prefix expression while len(stack) != 0: pref_exp += stack.pop() return pref_exp"} {"instruction": "Modify the following Python program to calculate the factorial of a given number.", "input": "n=5", "output": "def factorial(n):\n if n == 0:\n return 1\n else:\n return n * factorial(n-1)\n\nnum = 5\nprint(f\"The factorial of {num} is {factorial(num)}\")"} {"text": "[HI Wikipedia] नंगलामी भाषा\n\nनंगलामी (Nangalami, ), जिसे ग्रंगाली (Grangali) भी कहते हैं, कुनर (कुनड़) शाखा की एक दार्दी भाषा है जो अफ़ग़ानिस्तान​ के कुनर प्रान्त और नंगरहार प्रान्त की सीमा पर विस्तृत क्षेत्र में बोली जाती है जहाँ निंगलाम गाँव भी पड़ता है। यह पेच नदी और वाएगल नदी के संगम स्थल के पास है। इसकी तीन उपभाषाएँ है - नंगलामी, ग्रंगाली और ज़ेमियाकी - हालांकि ज़ेमियाकी के बारे में कुछ विवाद है कि यह वास्तव में इसकी उपभाषा है कि नहीं। सन्दर्भ हिन्द-आर्य भाषाएँ दार्दी भाषाएँ अफ़ग़ानिस्तान की भाषाएँ"} {"instruction": "Create a Python script for a sorting algorithm that can efficiently sort an array of integers.", "input": "[8, 3, 5, 1, 4, 6]", "output": "def bubble_sort(lst):\n for i in range(len(lst)):\n for j in range(0, len(lst) - i - 1): \n if lst[j] > lst[j + 1] : \n lst[j], lst[j + 1] = lst[j + 1], lst[j]\n return lst\n \nlst = [8, 3, 5, 1, 4, 6]\nsorted_list = bubble_sort(lst)\n\nprint(\"Sorted Array:\", sorted_list)"} {"instruction": "Parse the following JSON string and create a JavaScript object.", "input": "{\"name\":\"John\", \"age\":30, \"city\":\"New York\"}", "output": "const jsonString = '{\"name\":\"John\", \"age\":30, \"city\":\"New York\"}'; const obj = JSON.parse(jsonString); console.log(obj); // {\"name\":\"John\", \"age\":30, \"city\":\"New York\"}"} {"instruction": "Write a script which receives two integers as parameters and returns their average as output.", "input": "", "output": "def average(a, b): return (a+b)/2"} {"instruction": "Create a Python class that contains methods to calculate the area of a square and a rectangle.", "input": "", "output": "class AreaCalculator:\n def __init__(self):\n pass\n \n def square_area(self, side_length):\n return side_length * side_length\n\n def rectangle_area(self, length, width):\n return length * width"} {"instruction": "Write a short python program to sort a list of words in lowercase alphabetical order", "input": "", "output": "def sort_words(word_list):\n word_list.sort(key = lambda x : x.lower())\n return word_list"} {"text": "[CS Wikipedia] Rechenburk\n\nRechenburk (někdy též Rechemberk) je zaniklý hrad mezi Horním Starým Městem a Libčí v Trutnově v Královéhradeckém kraji. Existoval po krátkou dobu ve druhé polovině třináctého století, kdy ho jako mocenský opěrný bod postavili páni ze Švábenic. Historie Hrad, jehož název je odvozen z osobního jména Hrabiše, založili ve druhé polovině třináctého století jako svůj opěrný bod páni ze Švábenic spříznění s Hrabišici, kteří v této době kolonizovali Trutnovsko. Zanikl poté, co Švábenicové na přelomu třináctého a čtrnáctého století Trutnovsko opustili. Hrad zřejmě neměl rezidenční funkci, ale sloužil jako opěrný bod při kolonizačních aktivitách na hranici mezi Čechami a Slezskem. Podobný účel a charakter zástavby měl pravděpodobně také nedaleký hrad na Zámeckém vrchu u Trutnova. Dobu existence hradu potvrdila keramika nalezená během archeologických výzkumů provedených v sedmdesátých letech dvacátého století. Kromě ní byly v areálu hradu nalezeny dva železné hřeby. Stavební podoba Jednodílný hrad byl asi 120 metrů dlouhý a 40–60 metrů široký. Přístupnou jihozápadní stranu přetíná trojitý příkop a val. Za nimi se nacházelo okrouhlé hradní jádro, ve kterém byla archeologicky doložena stavba postavená na podezdívce z nasucho kladených kamenů. Měla nejspíše věžovitý charakter a představovala hlavní budovu. Ve vnitřním příkopu bývala ve skále vytesaná cisterna. Další, na sucho stavěná, podezdívka byla odkryta po obvodu hradního jádra. Zadní část hradu na severovýchodní straně od jádra odděloval další příkop. Odkazy Reference Související články Seznam hradů v Královéhradeckém kraji Externí odkazy Rechenburk na webu Hrady.cz Zaniklé hrady v okrese Trutnov Hrady v Krkonošském podhůří Hrady založené ve 13. století Stavby v Trutnově"} {"instruction": "Clone a remote Git repository using a Python program.", "input": "", "output": "import git\n\n# Clone a remote Git repository\nrepo = git.Repo.clone_from(\"https://github.com/username/repo.git\")"} {"text": "[HI Wikipedia] धानीप्राणी\n\nधानीप्राणी या मारसूपियल​ (Marsupial) स्तनधारी जानवरों की एक वर्ग है जो अपने शिशुओं को अपने पेट के पास बनी हुई एक धानी (थैली) में रखकर चलते हैं। यह ज़्यादातर पृथ्वी के [अपने अस्तित्व में आने के समय से ही उत्तरी गोलार्ध ]] (हेमिस्फ़ीयर​) में पाए जाते हैं। जाने-माने धानीप्राणियों में कंगारू, कोआला, पॉस्सम, वोम्बैट​ और तास्मानियाई डेविल​ शामिल हैं। धानिप्राणी के नवजात शिशु अन्य स्तनधारियों के नवजात बच्चों की तुलना में बहुत अविकसित होते हैं और पैदा होने के बाद यह काफ़ी समय (कई हफ़्तों या महीनों तक) अपनी माता की धानी में ही रहकर विकसित होते हैं। जीववैज्ञानिकों को धानीप्राणियों की ३३४ जातियाँ ज्ञात हैं जिनमें से लगभग ७०% ऑस्ट्रेलिया, नया गिनी और उनके आसपास के द्वीपों में मिलती हैं। शेष १०० जातियाँ मुख्यतः दक्षिण अमेरिका में मिलती हैं हालांकि १३ मध्य अमेरिका में और एक उत्तर अमेरिका में भी मिलती है। यह बात भी ध्यान देने योग्य है कि अनुवांशिक (जेनेटिक) और जीववैज्ञानिक दृष्टि से 'धानीप्राणी' की श्रेणी में आने वाले सभी जानवरों में धानी नहीं होती। इन्हें भी देखें कंगारू सन्दर्भ धानीप्राणी"} {"instruction": "Write a Python program to reformat a string using a given dictionary.", "input": "\"Hello {name}, it's {time} to go\",{'name':'John', 'time':'2pm'}", "output": "def reformat_string(string, mapping):\n for k, v in mapping.items():\n string = string.replace('{' + k + '}', v)\n return string\n\nif __name__ == \"__main__\":\n string = \"Hello {name}, it's {time} to go\"\n mapping = {\"name\": \"John\", \"time\": \"2pm\"}\n print(reformat_string(string, mapping)) # Output: Hello John, it's 2pm to go"} {"instruction": "Develop a function that returns the sum of three numbers", "input": "three integers a, b, c", "output": "# Python3 program to return the sum of three numbers\n\ndef sum_three(a,b,c): \n return a + b + c"} {"instruction": "Write a distributed Python program which can generate the Fibonacci series using Spark.", "input": "Not applicable", "output": "import findspark\nfindspark.init()\n\nfrom pyspark import SparkContext\n\nsc = SparkContext('local', 'fibonacci-generator')\n\ndef generate_fibonacci():\n rdd = sc.parallelize([0,1])\n for _ in range(100):\n rdd = rdd.flatMap(lambda x: [x, x + rdd.takeSample(withReplacement=True)[0]])\n return rdd.collect()\n\nresult = generate_fibonacci()\nprint(result)"} {"instruction": "Create a function in Python to generate a multiplication table with numbers in a range given start and end parameters.", "input": "start = 5\nend = 10", "output": "def multiplication_table(start, end):\n\tfor x in range(start, end + 1):\n\t\tfor y in range(start, end + 1):\n\t\t\tprint(x * y, end = \" \")\n\t\tprint(\"\\n\")\n\t\t\nmultiplication_table(start, end)"} {"instruction": "Create a program in Python that implements bubble sort.", "input": "", "output": "def bubble_sort(nums):\n for i in range(len(nums)-1):\n for j in range(len(nums)-i-1):\n if nums[j] > nums[j+1]:\n nums[j], nums[j+1] = nums[j+1], nums[j]\n return nums"} {"instruction": "Create a new View subclass of UIView and name it \"MainView\".", "input": "", "output": "class MainView: UIView { override func draw(_ rect: CGRect) { // code to customize the main view } }"} {"instruction": "Write a Python function to calculate the cosine similarity between two vectors.", "input": "vector1 = [1,2,3]\nvector2 = [2,4,6]", "output": "def cosine_similarity(vector1, vector2):\n '''\n Calculate the cosine similarity between two vectors\n Inputs:\n vector1 - list of numbers\n vector2 - list of numbers\n Output:\n cosine_similarity - float value\n '''\nimport math \n\n#Error handling\nif len(vector1) != len(vector2):\n return \"Error: vector lengths must be equal\"\n\n#Calculate dot product \ndot_product = 0\nfor i in range(len(vector1)):\n dot_product += vector1[i] * vector2[i]\n\n#Calculate vector magnitude and lengths\nmagnitude1 = 0\nmagnitude2 = 0\nfor i in range(len(vector1)):\n magnitude1 += vector1[i]**2\n magnitude2 += vector2[i]**2\n magnitude1 = math.sqrt(magnitude1)\n magnitude2 = math.sqrt(magnitude2)\n\n#Calculate and return cosine similarity\ncosine_similarity = dot_product / (magnitude1 * magnitude2)\nreturn cosine_similarity"} {"instruction": "Write a function that checks if a given string contains a valid date.", "input": "", "output": "function isValidDate(dateString) { var regEx = /^\\d{4}-\\d{2}-\\d{2}$/; if(!dateString.match(regEx)) return false; // Invalid format var d = new Date(dateString); if(Number.isNaN(d.getTime())) return false; // Invalid date return d.toISOString().slice(0,10) === dateString; };"} {"instruction": "Generate a correct Python program to compute the reverse of the given string", "input": "string = \"hello\"", "output": "def reverse_string(string):\n output = \"\"\n for i in range(len(string)):\n output += string[len(string)-1-i]\n return output"} {"instruction": "Use the string `'Hello world!'` and print it reversed.", "input": "", "output": "!dlrow olleH"} {"instruction": "Create an HTML form to ask the user for their email and password.", "input": "", "output": "
    Email:
    Password:
    "} {"instruction": "Design a SQL query to select the top 5 movies based on the number of 'likes'.", "input": "Table Name: Movies Columns: Movie_ID, Movie_Name, Likes", "output": "SELECT Movie_Name FROM Movies ORDER BY Likes LIMIT 5;"} {"instruction": "Create a Python script that takes two strings as an input and returns the longest common subsequence of those two strings.", "input": "ABCD\nBCEA", "output": "def longestCommonSubsequence(str1, str2): \n # find the length of the strings \n m = len(str1) \n n = len(str2)\n \n # declaring the array for storing the dp values \n L = [[None]*(n+1) for i in range(m+1)] \n \n \"\"\"Following steps build L[m+1][n+1] in bottom up fashion \n Note: L[i][j] contains length of LCS of str1[0..i-1] \n and str2[0..j-1]\"\"\"\n for i in range(m+1): \n for j in range(n+1): \n if i == 0 or j == 0 : \n L[i][j] = 0\n elif str1[i-1] == str2[j-1]: \n L[i][j] = L[i-1][j-1]+1\n else: \n L[i][j] = max(L[i-1][j] , L[i][j-1])\n counter = L[m-1][n-1] \n \n # Create lcs and return it\n lcs = [\"\"] * (counter+1) \n lcs[counter] = \"\" \n \n # Start from the right-most-bottom-most corner and \n # one by one store characters in lcs[] \n i = m-1\n j = n-1\n while i > 0 and j > 0: \n \n # If current character in X[] and Y are same, then \n # current character is part of LCS \n if str1[i-1] == str2[j-1]: \n lcs[counter-1] = str1[i-1] \n i-=1\n j-=1\n counter-=1\n \n # If not same, then find the larger of two and \n # go in the direction of larger value \n elif L[i-1][j] > L[i][j-1]: \n i-=1\n else: \n j-=1\n \n return ''.join(lcs)\n \n# Driver Code \nstr1 = \"ABCD\"\nstr2 = \"BCEA\"\nprint(longestCommonSubsequence(str1, str2))"} {"text": "[DE Wikipedia] Zlib\n\nDie zlib ist eine freie Programmbibliothek zum Komprimieren und Dekomprimieren von Daten mit dem Deflate-Algorithmus. Technik zlib kann sowohl gzip-Dateien (.gz) erstellen als auch einen Datenstrom bearbeiten. Das Format des ausgegebenen Datenstromes, der Deflate-Algorithmus und das gzip-Dateiformat wurden als RFC 1950, RFC 1951 und RFC 1952 standardisiert. zlib handelt Daten blockweise ab. Die ausgegebenen Blöcke werden durch Adler-32-Prüfsummen geschützt. Geschichte Die Programmbibliothek stammt von Jean-Loup Gailly (Kompression) und Mark Adler (Dekompression), den Autoren von gzip und anderen bekannten Datenkompressionsprogrammen. Ursprünglich erstellt wurde sie für die libpng, die Referenz-Bibliothek für die Deflate-Kompression im PNG-Format. Die erste öffentliche Version 0.9 wurde am 1. Mai 1995 herausgegeben. Neben der mit dem Programm eingeführten Freie-Software-Lizenz (zlib-Lizenz, anerkannt von der OSI und für zahlreiche andere Projekte übernommen) wurde auch darauf geachtet, keine patentierten Algorithmen zu verwenden. Die kleine, effiziente und vielseitige Bibliothek hat sich besonders unter Linux als De-facto-Standard für die Deflate-(De-)Kompression etabliert, wird von hunderten Programmen benutzt und ist wegen ihres vergleichsweise geringen Speicherverbrauchs auch für Embedded-Systeme beliebt. Einzelnachweise Freie Datenkompressionssoftware C-Bibliothek Abkürzung"} {"instruction": "Create a function in Python which takes a list as input and returns the sum of the items in the list.", "input": "", "output": "def sum_list(input_list):\n sum = 0\n for i in input_list:\n sum += i\n return sum"} {"instruction": "Generate a Python program that computes the Euclidean distance between two points in a two-dimensional space.", "input": "Point A - x: 3, y: 5\nPoint B - x: 7, y: 6", "output": "import math\n\n# Define the two points\npointA = (3, 5) \npointB = (7, 6)\n\n# Calculate the Euclidean distance\ndistance = math.sqrt( (pointB[0] - pointA[0])**2 + (pointB[1] - pointA[1])**2 )\n\nprint(\"The Euclidean distance between the two points is:\", distance)"} {"instruction": "Write an HLSL code snippet that creates a 3D vector with the components (x, y, z) = (1, 0, 1).", "input": "", "output": "float3 vec = float3(1.0f, 0.0f, 1.0f);"} {"instruction": "Create an AI chatbot in Python to respond to simple natural language questions about the weather.", "input": "Not Applicable", "output": "#create a simple AI chatbot in Python\ndef chatbot():\n print(\"Hello, my name is Weather Bot. I can help you with questions about the weather!\")\n\n while True:\n query = input(\"You: \")\n query = query.lower()\n \n # exit the loop is the user enters \"quit\"\n if query == \"quit\":\n break\n \n # responses to certain queries\n if \"what is the temperature\" in query:\n print(\"The current temperature is 65 degrees Fahrenheit.\")\n \n if \"what will the weather be tomorrow\" in query:\n print(\"Tomorrow's forecast is sunny with a high of 75 degrees Fahrenheit.\")\n\n# call the function\nchatbot()"} {"text": "[EN Wikipedia] Louise Jordan (disambiguation)\n\nLouise Jordan was a geologist. Louise Jordan may also refer to: Louise Jordan (novelist) See also Louise Jordan Smith, American painter and academic Louisa Jordan (disambiguation)"} {"instruction": "Design a basic graphic user interface (GUI) for a calculator.", "input": "", "output": "import tkinter as tk root = tk.Tk() # design the window root.title(\"Calculator\") root.geometry(\"200x250\") # create the buttons button1 = tk.Button(root, text=\"1\", width=5, height=2) button1.grid(row=0, column=0, padx=4, pady=4) button2 = tk.Button(root, text=\"2\", width=5, height=2) button2.grid(row=0, column=1, padx=4, pady=4) button3 = tk.Button(root, text=\"3\", width=5, height=2) button3.grid(row=0, column=2, padx=4, pady=4) # create more buttons # and so on root.mainloop()"} {"instruction": "Write a Python program to sum up the prime numbers below 100.", "input": "", "output": "def sum_prime_numbers(limit):\n sum = 0\n for num in range(2, limit + 1):\n if all(num % i != 0 for i in range(2, num)):\n sum += num\n return sum\n\nprint(sum_prime_numbers(100))"} {"instruction": "How does the following CSS style the first letter of a paragraph?", "input": "p::first-letter { font-weight: bold; }", "output": "The first letter of a paragraph will be rendered with a bold font style."} {"instruction": "Use the Paginator library in Python to create a list of items divided into multiple pages.", "input": "Items: [\"apple\", \"banana\", \"carrot\", \"date\", \"elderberry\", \"fig\", \"grape\", \"honeydew\", \"iceberg lettuce\"]", "output": "from paginator import Paginator\n\ndef page_items(items, page_number):\n p = Paginator(items, 3) # items per page\n return p.page(page_number).object_list\n\npage_1 = page_items([\"apple\", \"banana\", \"carrot\", \"date\", \"elderberry\", \"fig\", \"grape\", \"honeydew\", \"iceberg lettuce\"], 1)\nprint(page_1) # [\"apple\", \"banana\", \"carrot\"]\n\npage_2 = page_items([\"apple\", \"banana\", \"carrot\", \"date\", \"elderberry\", \"fig\", \"grape\", \"honeydew\", \"iceberg lettuce\"], 2)\nprint(page_2) # [\"date\", \"elderberry\", \"fig\"]"} {"instruction": "Create a python program to check the length of a given string", "input": "", "output": "def check_length(string):\n return len(string)"} {"instruction": "Create a Python program to sort a dictionary in order of the values.", "input": "", "output": "# using lambda function to sort the dictionary \nsorted_by_value = sorted(dictionary.items(), key = lambda kv: kv[1]) \n \n# printing the dictionary sorted by value \nprint(sorted_by_value)"} {"instruction": "Develop a code in Java to calculate the BMI given the height and weight of a person.", "input": "", "output": "public double calculateBMI(double height, double weight){ double bmi; height = height/100; bmi = weight / Math.pow(height, 2); return bmi; }"} {"instruction": "Create a function in Python that will convert a string to all uppercase letters.", "input": "input_string = \"This Is A String\"", "output": "def uppercase_string(input_string):\n return input_string.upper()"} {"text": "[EN Wikipedia] Dora del Hoyo\n\nDora del Hoyo Alonso, (11 January 1914 - 10 January 2004; born Salvadora Honorata del Hoyo Alonso in Leon, Spain) was one of the first women members of Opus Dei. A domestic worker by profession, del Hoyo was the first to join the Prelature of Opus Dei as an assistant numerary meaning that she dedicated herself professionally to caring for people and looking after the material needs of Opus Dei centers. From 1946 until her death, she lived in Rome, Italy where she collaborated first with Josemaría Escrivá de Balaguer, Opus Dei's founder, and later on with his successors Álvaro del Portillo and Bishop Javier Echevarría, in the domestic management of the first Opus Dei center there, later the movement's headquarters. Her process of canonization was opened in Rome on June 18, 2012 by Echevarría, at the request of many who knew and worked with her. Her mortal remains lie close to the tomb of Escriva, in the crypt of Our Lady of Peace Church in Rome. Biography Dora del Hoyo was born on January 11, 1914, in the village of Boca de Huérgano in Leon, Spain, the fifth of six children. Her father, Demetrio del Hoyo, was a farm-laborer and her mother, Carmen Alonso, a home-maker. To support her family, at an early age del Hoyo began working as a housekeeper for the village doctor. In 1935, del Hoyo decided to look for better housework opportunities in Astorga, León, but the onset of the Spanish Civil War (1936-1939) caused her to have to return to her hometown. In 1940, del Hoyo moved to Madrid, once again in search of better opportunities. Through the help of the Daughters of Mary Immaculate for Domestic Service (a religious congregation founded by Vincentia Maria López y Vicuña and dedicated to helping young girls find employment in household work), del Hoyo got hired as a housemaid for the Marquess of Almunia, and later on for the Dukes of Nájera. In 1944, del Hoyo was still working for the Duke when she came in contact with Opus Dei. Josemaria Escriva, founder of the then-new Opus Dei movement, had turned to the Daughters for Domestic Service for help in hiring household employees for a student dormitory he was opening called the Moncloa Residence. The Mother Superior of the Domestic Service Daughters recommended del Hoyo, who happened to have some days off at the time. In spite of the low pay offered and her little desire to go, at the nun's insistence del Hoyo agreed to help out the residence for a few days. Later on, del Hoyo decided to give up the job at the Dukes of Nájera to devote herself full-time to the Moncloa, even though the pay there was lower and the working conditions significantly worse. Later on when asked why she did this, del Hoyo said that she was moved \"to see how hard they worked\" and that she was also impressed by Escriva and his…"} {"text": "[HI Wikipedia] ऐक्विटेन\n\nऐक्विटेन (Aquitaine) फ्रांस के २७ प्रभागों में से एक है। परिचय यह फ्रांस के दक्षिण-पश्चिम भाग में स्थित एक नीची भूमिवाला प्रदेश है, जिसमें शाराँत, गारौं तथा आदूर घाटियाँ समिलित हैं। यह ऊबड़ खाबड़ त्रैकोणिक मैदान है, जो पूर्व की ओर ऊँचा होता हुआ मध्य पठार हो गया है। यह प्रदेश भूमध्यसागर तटीय प्रदेश के कारकार्सो के सँकरे द्वार द्वारा मिला हुआ है, जो मध्य पठार तथा पिरेनीज़ के मध्य में स्थित है; उत्तर-पूर्व में पेरिस द्रोणी से प्वातू के द्वार द्वारा संबंधित है। ऐक्विटेन का अधिकतर भाग दोमट का मैदान है, लेकिन शाराँत द्रोणी चूने के पत्थरवाला क्षेत्र है। ऐक्विटेन का तट काफी सीधा है, जो बालुकनिर्मित ऐसे टीलों से भरा है जिनके पृष्ठभाग में खारी झीलें बन गई हैं। केवल भेड़ों के चरागाहों के अतिरिक्त यह तटीय क्षेत्र बेकार है, परंतु कुछ वर्षो से इस क्षेत्र को उपजाऊ बनाने के बहुतेरे प्रयोग किए गए हैं और थोड़ी बहुत सफलता भी मिली है। दलदली भूमि का पानी सुखा दिया गया है और चीड़ इत्यादि के कोणधारी वृक्ष लगाए गए हैं जिससे बालू का बढ़ाव रुका रहे। ये वृक्ष अब सरकार के लिए आमदनी के अच्छे साधन हो गए हैं; इनसे पर्याप्त मात्रा में तारपीन का तेल, लकड़ी इत्यादि प्राप्त की जाती है। एताँ दि पारेंती के समीप मिट्टी का तेल प्राप्त हुआ है। इसके और दक्षिण में प्राकृतिक गैस एवं गंधक भी पाया जाता है। अच्छे तापक्रम एवं अच्छी वर्षा के कारण ऐक्विटेन उन्नतिशील कृषि-प्रदेश है। शाराँत की घाटी अपने गेहूँ तथा अंगूरों के लिए प्रसिद्ध है; यहाँ ब्रांडी (कोन्यैक) तथा हलकी मदिराएँ बनाई जाती हैं। गारौं की घाटी में मकई, तंबाकू और गेहूँ का उत्पादन होता है। यह प्रदेश फ्रांस में मदिरा निर्मित करनेवाला प्रमुख क्षेत्र है। यहाँ की क्लैरेट शराब प्रसिद्ध है। ऐक्विटेन के मुख्य नगर बोर्डो, तूलूज़, तथा कारकासौं हैं। सन्दर्भ फ़्रांस"} {"instruction": "Generate an object using JavaScript that contains the numbers from 1 to 10.", "input": "", "output": "const myObject = { \"1\": 1, \"2\": 2, \"3\": 3, \"4\": 4, \"5\": 5, \"6\": 6, \"7\": 7, \"8\": 8, \"9\": 9, \"10\": 10 };"} {"instruction": "Using the given variables, create an if-else statement that prints \"You are an adult\" when age is greater than or equal to 18, otherwise print \"You are a minor\".", "input": "age = 18", "output": "if age >= 18: print(\"You are an adult\") else: print(\"You are a minor\")"} {"instruction": "Generate a python function to find the largest number from the given list", "input": "[10, 20, 40, 19]", "output": "def largest_number(list):\n largest = list[0]\n for number in list:\n if number > largest:\n largest = number\n return largest"} {"instruction": "Fetch the item from the given JSON response.", "input": "JSON Response: { \"results\": [ { \"id\": 1, \"name\": \"John\" }, { \"id\": 2, \"name\": \"Dave\" } ] }", "output": "item = json_response['results'][1] id = item['id'] name = item['name']"} {"instruction": "Write a function in PHP that takes in two arrays, and returns a new array that contains only elements present in both arrays.", "input": "[1, 3, 4], [2, 4, 6]", "output": "function intersect_arrays($arr1, $arr2) { return array_intersect($arr1, $arr2); }"} {"instruction": "Optimize a Python program that calculates the sum of the numbers up to a given integer.", "input": "integer = 5\n\ndef calculateSum(n):\n\tsum = 0\n\tfor i in range(n+1):\n\t\tsum = sum + i\n\t\n\treturn sum\n\nprint(calculateSum(integer))", "output": "def calculateSum(n):\n\treturn (n * (n+1))//2\n\nprint(calculateSum(integer))"} {"text": "[EN Wikipedia] Billy Wootton\n\nWilliam Wootton (27 August 1904 – 2000) was an English footballer who played as a full-back for Stoke, Congleton Town, Port Vale, and Southend United. He later managed Northwich Victoria, Oldham Athletic, and Halifax Town. He won the Third Division North title with Port Vale in 1929–30, and led Northwich Victoria to victory in the Cheshire Senior Cup in 1937. Playing career Wootton played for Trentham, Stoke and Congleton Town, before joining Port Vale in June 1925. He made three Second Division appearances in the 1925–26 season. He remained a bit-part player for the \"Valiants\", featuring seven times in 1926–27, 12 times in 1927–28, and six times in 1928–29. Vale were relegated in 1929, and Wootton played 20 league games in 1929–30 as Vale won the Third Division North title. However, he only played four games in 1930–31 and six games in 1931–32. In August 1932, he was transferred to Third Division South side Southend United. He became the player-manager of Cheshire County League club Northwich Victoria in 1935. He spent 12 years at Drill Field, leading them to the Cheshire Senior Cup in 1937. Managerial career After leaving the position of player-manager with Northwich Victoria, Wootton became the manager of Third Division North side Oldham Athletic in June 1947. He oversaw 141 games at Boundary Park and achieved a 38.28 win percentage but failed to gain the club the promotion to the Second Division they craved. He left Oldham in September 1950 and took up the reins at Halifax Town the following year. He spent just one season with Halifax, and left The Shay after leading the \"Shaymen\" to a 20th-place finish in the Third Division North in 1951–52. Career statistics Managerial statistics Source: Honours Port Vale Football League Third Division North: 1929–30 Northwich Victoria Cheshire Senior Cup: 1937 References People from Longton, Staffordshire Footballers from Stoke-on-Trent English men's footballers Men's association football fullbacks Stoke City F.C. players Port Vale F.C. players Southend United F.C. players Congleton Town F.C. players Northwich Victoria F.C. players English Football League players Men's association football player-managers English football managers Northwich Victoria F.C. managers Oldham Athletic A.F.C. managers Halifax Town A.F.C. managers English Football League managers 1904 births 2000 deaths"} {"instruction": "Write a Python function that takes a list of strings and returns the concatenation of all the elements with a separator/delimiter.", "input": "strings = [\"Sample\",\"Text\",\"Hello\"]", "output": "def concatenate_strings(strings, separator):\n return separator.join(strings)"} {"instruction": "Given a Python dictionary, write a program to remove all the keys whose value is greater than a specified number.", "input": "dictionary = {'a': 1, 'b': 2, 'c': 3, 'd':4}, threshold = 2", "output": "dictionary = {'a': 1, 'b': 2, 'c': 3, 'd':4}\nthreshold = 2\n\ndef remove_keys(dict, threshold):\n to_remove = [k for k, v in dict.items() if v > threshold]\n for k in to_remove:\n del dict[k]\n return dict\n\nprint(remove_keys(dictionary, threshold))\n# Output: {'a': 1, 'b':2}"} {"instruction": "Create a REST API in Python with the Flask framework that returns a list of posts from a blog when a GET request is made.", "input": "Not applicable", "output": "from flask import Flask, jsonify\n\napp = Flask(__name__)\n\nposts = [\n {\n \"id\": 1,\n \"title\": \"Lorem Ipsum\",\n \"body\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"\n },\n {\n \"id\": 2,\n \"title\": \"Sed Ut Perspiciatis\",\n \"body\": \"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.\"\n }\n]\n\n@app.route('/posts', methods=['GET'])\ndef get_posts():\n return jsonify({'posts': posts})\n\nif __name__ == '__main__':\n app.run(debug=True)"} {"instruction": "Suggest a way to identify and remove duplicate elements from the list.", "input": "numbers = [2, 3, 2, 5, 8, 3, 10]", "output": "# Method 1 - Using Set numbers_set = set(numbers) numbers_set = list(numbers_set) print(numbers_set) # Output: [2, 3, 5, 8, 10] # Method 2 - Using Loop no_duplicate = [] for num in numbers: if num not in no_duplicate: no_duplicate.append(num) print(no_duplicate) # Output: [2, 3, 5, 8, 10]"} {"instruction": "Explain different types of sorting algorithms in brief.", "input": "", "output": "There are several types of sorting algorithms which can be used to sort a list of items. The most common ones are Bubble Sort, Insertion Sort, Selection Sort, Quick Sort, Merge Sort and Heap Sort. Bubble Sort works by repeatedly swapping adjacent elements if they are in the wrong order. Insertion Sort works by inserting elements one by one into the correct sorted position. Selection Sort works by repeatedly selecting the minimum (or maximum) element of the unsorted part and placing it at the beginning of the sorted part. Quick Sort works by selecting a pivot element and partitioning the array around the pivot in order to find the correct position of the pivot. Merge Sort works by dividing the array into two halves, sorting each half recursively, and then merging them back together. Heap Sort works by first creating a Max Heap from the list, and then continuously extracting the maximum element from the heap until the list is sorted."} {"instruction": "Detect if the given URL contains a query string.", "input": "url = https://www.example.com/?food=burger", "output": "True"} {"instruction": "How can you access the fourth element of a linked list in Java?", "input": "", "output": "The fourth element of a linked list in Java can be accessed by traversing the list from the start node three times, where each traverse proceeds one node at a time. The fourth node can be accessed by calling getData() on the traversed node."} {"text": "[CS Wikipedia] Jižní Amerika\n\nJižní Amerika je jižní část amerického kontinentu. Celá tato část se nachází na západní polokouli. Její větší část je na jižní polokouli, menší na severní polokouli (čtyři země – Venezuela, Guyana, Surinam a Francouzská Guyana – leží celým svým územím na severní polokouli). Kontinentem prochází rovník a obratník Kozoroha; kontinent je na západě ohraničen Tichým oceánem, Atlantským oceánem je ohraničen na východě. Jižní Amerika je spojena se Severní Amerikou úzkou pevninskou šíjí většinou nazývanou Střední Amerika. K propojení kontinentů došlo z geologického hlediska teprve v nedávné době. Na jihu odděluje Drakeův průliv jižní cíp kontinentu tvořený ostrovem Ohňová země od Antarktidy. Na jih od Ohňové země se nachází Hornův mys, který spojuje Atlantský a Tichý oceán. Historie K prvnímu osídlení Jižní Ameriky došlo zřejmě přechodem lidí přes pevninský most v dnešním Beringově průlivu. Ovšem existují i náznaky migrace z oblasti jižního Tichého oceánu. Některé fosilní objevy z Argentiny naznačují, že lidé tu byli přítomni již před 30 000 lety. Obě Ameriky byly pojmenovány po Amerigo Vespuccim. Poznal jako první, že země, kterou objevil Kryštof Kolumbus není Indie, ale nový kontinent. Jihoamerický kontinent byl od 16. století do počátku 19. století téměř zcela rozdělen do kolonií pod španělskou a portugalskou správou. V současnosti zde existuje 12 nezávislých republik a 3 závislá území: Francouzská Guyana, Falklandy a Jižní Georgie. Po celé délce západního pobřeží Jižní Ameriky se vypíná pohoří And. Na východ od And, směrem do vnitrozemí se nachází rozlehlé oblasti porostlé tropickým deštným lesem. Většina jihoamerické pevniny východně od And patří do povodí Amazonky. K jihoamerickému kontinentu se počítají také přilehlé ostrovy, z nichž většina je kontrolována zeměmi na kontinentu (např. Galapágy). Ostrovy v Karibiku se přiřazují k Severní nebo Střední Americe. Poloha Jižní Amerika je napojena na Severní Ameriku 48 km širokou Panamskou šíjí. Za rozhraní obou světadílů se obvykle považuje až státní hranice mezi Panamou a Kolumbií. Z karibských ostrovů se většina přiřazuje k Severní, resp. Střední Americe. Výjimkou je souostroví Trinidad a Tobago, případně též Aruba, Curaçao, Bonaire a ostrovy spravované jihoamerickými státy. Nejzazší body na pevnině: Severní bod: Punta Gallinas na poloostrově Guajira v Kolumbii (12° 27' s.š.) Jižní bod: Cabo Froward na poloostrově Brunswick v Chile (53° 54' j.š.) Západní bod: Punta Pariñas v severním Peru (81° 22' z.d.) Východní bod: mys Branco v Brazílii (34° 45' z.d.) Nejzazší body včetně ostrovů: Severní bod: ostrovy Los Monjes pod správou Venezuely (12° 30' s.š.) Jižní bod: ostrov Diego Ramírez v Drakeově průlivu pod správou Chile (56° 32' j.š.) Západní bod: Darwinův ostrov na Galapágách spravovaných Ekvádorem (92°…"} {"instruction": "Using variable A, write a code snippet in Java to iterate through ArrayList and delete odd values.", "input": "// ArrayList A ArrayList A = new ArrayList<>(Arrays.asList(1,2,3,4,5,6));", "output": "for(int i=0; i max_price) {\n max_price = cur_price;\n}", "output": "if cur_price > max_price:\n max_price = cur_price"} {"instruction": "Write a code to get the sum of all the unique values in a dictionary.", "input": "d = {'a': 2, 'b': 3, 'c': 4, 'd': 5}", "output": "total_sum = 0 for key in d: total_sum += d[key] print(total_sum)"} {"instruction": "Write a function to calculate the sum of the elements of an array with float values.", "input": "", "output": "def sum_float_array(float_array): total = 0 for i in float_array: total += i return total"} {"text": "[CS Wikipedia] Philip Seymour Hoffman\n\nPhilip Seymour Hoffman (23. července 1967 Fairport, New York, USA – 2. února 2014 Manhattan, New York, USA) byl americký filmový herec, režisér a producent. Byl nejlépe známý pro jeho specifický styl hraní, kdy hrál většinou tyrany a nepřizpůsobivé hrdiny. Byl nominován na mnoho ocenění; získal Zlatý glóbus za film Capote a další ocenění za tento film, dále pak ocenění za film Magnolia nebo za Talentovaný pan Ripley. Osobní život Hoffman se narodil 23. července 1967 v Rochesteru na předměstí Fairport v New Yorku. Jeho matka, Marilyn O'Connor (rozená Loucks), pocházela z nedalekého Waterloo a pracovala jako učitelka na základní škole, pak se ale stala právničkou a nakonec soudkyní. Jeho otec, Gordon Stowell Hoffman, pocházel z New Yorku,a pracoval pro společnosti Xerox Corporation. Philip měl dvě sestry, Jill a Emily, a bratra Gordona, který se později stal spisovatelem. Hoffman se narodil do římskokatolické rodiny, ale jeho výchova nebyla příliš nábožensky zaměřená. Jeho rodiče se rozvedli, když mu bylo 9 let a Philip i se svými sourozenci proto vyrůstal jen s matkou. Philip měl rád sport, především baseball. Ve 14 letech ale utrpěl zranění krku, kvůli kterému dále sportovat nemohl, a tehdy prý začal uvažovat o herectví. V brzké době se začal věnovat i činohře. Nakonec úspěšně vystudoval Newyorskou univerzitu umění (The New York University Tisch School of the Arts). Oženil se s výtvarnicí Mimi O'Donnell, se kterou žil v New Yorku a se kterou měl tři děti: syna Coopera (2003), dceru Tallulah (2006) a další dceru jménem Willa (2008). Na podzim 2013 už ale s Mimi žili odděleně. Philip Hoffman měl také problémy s drogovou závislostí. Po jeho promoci v roce 1989, když mu bylo 22 let, vstoupil do rehabilitačního program a zůstal \"čistý\" dalších 23 let. Přesto ve věku 46 let, tedy v roce 2014, zemřel na předávkování. Byl nalezen v koupelně svého přítele z branže; scenáristy David Bara. Vyšetřující policisté zde našli injekční stříkačku a později bylo prokázáno, že zemřel na předávkování heroinem, kokainem a amfetaminem. Po jeho smrti jej The New York Times popsali jako \"snad nejambicióznějšího a nejobdivovanějšího amerického herce své generace\". Kariéra Svoji filmovou kariéru začal v roce 1991 epizodě krimi seriálu Zákon a pořádek (Law & Order), kde si zahrál krátkou scénku. Další role následovaly: Vůně ženy, Muž zázraků, Můj nový revolver... Většinou se ale jednalo jen o vedlejší role. Mezi jeho největší role patřil film Capote, za který získal několik ocenění, dále pak Magnolia, Hunger games a Piráti na vlnách. Zemřel v době natáčení Hunger games: Síla vzdoru 1. část a to sedm dní před ukončením natáčení. Hrál ve filmech se slavnými herci, jako je Al Pacino, Tom Hanks, Julia Roberts, Emily Watson, Adam Sandler, Ben Stiller a dalšími. Filmografie 1992…"} {"instruction": "Construct a web crawler in python and count the number of words in a web page.", "input": "", "output": "import requests\nfrom bs4 import BeautifulSoup \n \n# url of the website to crawl \nURL = \"https://www.example.com/\"\n \n# get the whole page content in \n# the form of text \npage = requests.get(URL).text\n \n# number of words in the page \nword_count = 0\n \n# create a Beautiful Soup parsable string \nsoup = BeautifulSoup(page, 'html.parser') \n \n# find all the tags of type p \nparagraphs = soup.find_all('p') \nfor para in paragraphs: \n words = para.text.split() \n word_count += len(words) \n \n# print the word count \nprint(\"Total words in the page:\", word_count)"} {"instruction": "Create a Python program to find the nth Fibonacci number", "input": "", "output": "def Fibonacci(n): \n if n<0: \n print(\"Incorrect input\") \n elif n==0: \n return 0\n elif n==1: \n return 1\n else: \n return Fibonacci(n-1)+Fibonacci(n-2)"} {"instruction": "Construct a linked list data structure in Python", "input": "", "output": "class Node:\n def __init__(self, data):\n self.data = data\n self.next = None\n\n\n# Linked List class contains a Node object \nclass LinkedList:\n def __init__(self):\n self.head = None\n\n \n def push(self, data):\n # Allocate the Node & Put in the data \n new_node = Node(data)\n \n # Make next of new Node as head \n new_node.next = self.head\n \n # Move the head to point to new Node \n self.head = new_node \n \n # Utility function to print the linked LinkedList \n def printList(self): \n temp = self.head \n while(temp): \n print(temp.data, end=\" \") \n temp = temp.next"} {"instruction": "Create an array from a given string and sort it in ascending order.", "input": "string = \"cbaefd\"", "output": "string = \"cbaefd\" array = list(string) array.sort() print(array)"} {"instruction": "Develop a function in Python which takes two inputs and returns the greatest common divisor of those two numbers.", "input": "12, 24", "output": "def greatest_common_divisor(a, b):\n if a < b:\n a, b = b, a\n\n while b > 0:\n a, b = b, a % b\n\n return a\n\nresult = greatest_common_divisor(12, 24)\nprint(result)"} {"instruction": "Explain why this code doesn't work.", "input": "def celsius_to_fahrenheit(celsius): return celsius + 5", "output": "This code doesn't work because it doesn't follow the formula for converting Celsius temperatures to Fahrenheit. The formula for converting Celsius to Fahrenheit is F = (C * 9/5) + 32, where F is the Fahrenheit temperature and C is the Celsius temperature. The code provided only adds 5 to the Celsius temperature, which is incorrect and results in an incorrect conversion."} {"instruction": "Add styling to the HTML anchor tag.", "input": "Home", "output": "Home"} {"text": "[DE Wikipedia] Angeliki Papoulia\n\nAngeliki Papoulia (, * 1975 in Agios Dimitrios bei Athen) ist eine griechische Theater- und Filmschauspielerin. Sie ist vor allem für ihre Rollen in den Filmen von Giorgos Lanthimos bekannt. Leben Nach mehreren Kurzfilmrollen zwischen 1999 und 2002 und einem kleineren Auftritt 2001 in Alexandria von Maria Iliou spielte sie 2002 in dem Vorläufer des „neuen griechischen Kinos“ Spirtokouto von Yannis Economidis als Tochter Kiki erstmals eine größere Filmrolle. Papoulia war 2004 Mitbegründerin des Athener Theaterkollektivs Blitz und zählt seither zu den ständigen Ensemblemitgliedern. Die Mitglieder erarbeiten gemeinsam Theaterproduktionen, bei denen sie nach Antworten auf gesellschaftliche Fragen suchen. Es folgte 2008 in Panos Karkanevatos Kala krymmena mystika (Athanasia Well Kept Secrets) ein Auftritt als Georgia. Für die Rolle der älteren Tochter in Lanthimos’ Dogtooth erhielt sie 2009 beim Sarajevo Film Festival die Auszeichnung als beste Darstellerin gemeinsam mit ihrer Filmpartnerin Mary Tsoni, die in der Rolle der jüngeren Tochter zu sehen war. Auch bei der Griechischen Film Akademie 2010 war sie in der Kategorie Beste Schauspielerin nominiert. In Lanthimos' Alpis spielte sie eine Krankenschwester, die einsame Menschen tröstet und dabei ihnen Nahestehende mimt. Am Nationaltheater Athen spielte Papoulia 2011 in einer Inszenierung von Lanthimos in Tschechows Platonow die Anna Petrowna. Nach dem 2002 gedrehten Kurzfilm Vrochi war A Blast 2014 die zweite Zusammenarbeit mit Syllas Tzoumerkas. Der Film hatte seine Premiere beim Internationalen Filmfestival von Locarno, Angeliki Papoulia besetzte die „beeindruckend intensiv gespielte“ Hauptrolle der Maria und war im folgenden Jahr als beste Schauspielerin der Griechischen Film Akademie nominiert. In The Lobster, dem ersten englischsprachigen Film von Lanthimos war Papoulia als herzlose Frau zu sehen. Auf dem 69. Internationalen Filmfestival in Locarno war Papoulia 2016 Jurymitglied des Concorso Cineasti del Presente. Filmografie (Auswahl) 2009: Dogtooth (Kynódontas) 2011: Alpis 2014: A Blast 2015: The Lobster 2017–2018: The Tunnel – Mord kennt keine Grenzen (Fernsehserie, 3 Folgen) 2019: Das Wunder im Meer von Sargasso (To thávma tis thálassas ton Sargassón) 2021: Patchwork 2022: A Little Love Package 2022: The City and the City 2022: Human Flowers of Flesh Weblinks (mit Fotogalerie) Einzelnachweise Filmschauspieler Theaterschauspieler Grieche Geboren 1975 Frau Wikipedia:Artikel mit Video"} {"instruction": "Design a Python program to randomize a list of given integers using an optimized Fisher-Yates algorithm.", "input": "", "output": "def randomized_list(num_list):\n for i in range(len(num_list)-1,0,-1):\n j = random.randint(0,i)\n num_list[i],num_list[j] = num_list[j],num_list[i]\n return num_list"} {"instruction": "Create a program that extracts a given pattern from a given string", "input": "text = \"Hello world!\", pattern = \"l\"", "output": "\"\"\" Create a program that extracts a given pattern from a given string \"\"\" def extract_pattern(text, pattern): result = [] for i in range(len(text)): if text[i] == pattern: result.append(i) return result if __name__ == '__main__': text = \"Hello world!\" pattern = \"l\" print(extract_pattern(text, pattern))"} {"instruction": "Describe how to add an element in a linked list in Python.", "input": "", "output": "// To add an element in a linked list in Python: // 1. Create a new node containing the value to be added // 2. Set the \"next\" attribute of the new node to point to the current head node // 3. Set the head node to be the newly created node // 4. Increase the size of the linked list by 1"} {"instruction": "Design a SVM classifier in Python to classify the given dataset for sentiment analysis.", "input": "dataset = [\n {'text': 'I love this product', 'sentiment': 'positive'},\n {'text': 'I hate this product', 'sentiment': 'negative'},\n {'text': 'This product is awful', 'sentiment': 'negative'},\n {'text': 'This product is great', 'sentiment': 'positive'}\n]", "output": "import pandas as pd\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.svm import SVC\n\ndf = pd.DataFrame(dataset)\nX = df['text']\ny = df['sentiment']\n\n# Create the vectorizer\nvectorizer = TfidfVectorizer()\n\n# Fit and transform the vectorizer to X\nX_vect = vectorizer.fit_transform(X)\n\n# Initialize the SVM classifier\nclf = SVC()\n\n# Fit the SVM classifier to the data\nclf.fit(X_vect, y)"} {"instruction": "Write a Python program to generate a password of length 10 from lowercase alphabets, uppercase alphabets, digits and special characters.", "input": "", "output": "import random\nimport string\n\nlength = 10\n\ndef generatePassword(length):\n chars = string.ascii_lowercase + string.ascii_uppercase + string.digits + \"!@#$%^&*\"\n return ''.join([random.choice(chars) for _ in range(length)])\n\npassword = generatePassword(length)\nprint(password)"} {"text": "[DE Wikipedia] ULEB Cup 2007/08\n\nDie Saison 2007/08 war die 6. Spielzeit des von der ULEB ausgetragenen ULEB Cup, der heute als EuroCup firmiert. Es war die letzte Durchführung des Wettbewerbs unter diesem Namen. Am 2. Juli 2008 gaben die ULEB und FIBA Europa bekannt, dass ab der nächsten Saison dieser Wettbewerb unter dem Namen ULEB EuroCup durchgeführt wird. Den Titel gewann DKV Joventut aus Spanien. Modus Es nahmen 54 Mannschaften aus 27 Nationen teil. Die Saison begann am 15. November 2007 und endete mit dem Finale am 13. April 2008. Die 54 Teams wurden aufgeteilt in 9 Gruppen mit je sechs Teams. Es wurde eine Doppelrunde jeder gegen jeden gespielt. Die drei Besten jeder Gruppe, sowie die fünf besten Viertplatzierten erreichten das Sechzehntelfinale. Die Sieger in diesem, sowie im Achtelfinale wurden in Hin- und Rückspiel ermittelt. Der Sieger des Turniers wurde in einem Final 8-Turnier ermittelt. Teilnehmer an der Hauptrunde Gruppenphase Gruppe A Gruppe B Gruppe C Gruppe D Gruppe E Gruppe F Gruppe G Gruppe H Gruppe I Sechzehntelfinale Achtelfinale Final 8-Turnier Das Final 8-Turnier fand vom 10. bis zum 13. April 2008 im Palavela in Turin statt. Finals (MVP) Rudy Fernández (DKV Joventut) Weblinks Offizielle Website des Eurocups (englisch) 2007 Basketballsaison 2007/08"} {"text": "[CS Wikipedia] Tripolis (Řecko)\n\nTripoli (řecky , do 19. století , , italsky Tripolizza) je město v Řecku, v Peloponéském kraji Arkádie, jejímž je i hlavním městem. Žije zde 25 520 obyvatel. Název Původ jména Tripolitsa je pravděpodobně slovanský, protože se město původně nazývalo Droboglitsa (Δρομπογλίτσα), což se mělo postupně Řeky komolit na Ντροπολιτσά (Dropolitsa) a konečně na Tripolitsa (Τριπολιτσά), tedy v překladu z řečtiny Tři městečka. Název pochází ze slovanského drobol (dub). Jméno však může být i řeckého původu; z řeckých slov Treis a poleis, tedy zmíněná Tři města, což potvrzují i archeologické nálezy, kde se zjistilo, že město vzniklo spojením několika osad. Město bylo někdy nazývané také jako Ydropolitsa (Υδροπολιτσά), tedy Vodní městečko. Historie Tripoli vzniklo mezi 8.–10. stoletím, kdy zde vznikla malá slovanská osada. Peloponésští Slované, kteří zde žili od 6. století, byli totiž definitivně poraženi a byzantská vláda většinu z nich odsunula pryč a zbytek co zůstal se trvale usadil nebo uprchl do hor. Malá slovanská osada na území dnešního Tripoli se později spojila s několika početnějšími řeckými osadami a Slované s Řeky splynuli a zanikli. Později se osada, kvůli přelidnění, přesunula o pár kilometrů. Skutečné město tu však vzniklo asi v 15. století, tedy během vlády Benátčanů. Ital Stefano Magno popisuje město jako Drobolizza. Největší rozvoj však přišel až během turecké nadvlády, i když už tady Řekové netvořili většinu. V 17. století zde žilo přibližně 20 000 obyvatel, většinu však tvořili muslimové, tedy Turci (spousta z nich byli potomci islamizovaných Řeků) a muslimští Arvaniti, místní Řekové se vystěhovali na venkov. Tripolitsa byla sídlem tureckého místodržícího oblasti Peloponés. V 18. století, Řekové povstali, ale Turci jie porazili a tak obehnali Tripolis hradbami. Turci poté mnoho Řeků ve městě vyvraždili. V roce 1821, během Řecké války za nezávislost, řečtí povstalci pod vedením Theodora Kolokotronise dobyli město Tripolis a tím zároveň padla turecká správa nad Peloponésem. Řekové mnoho muslimů ve městě vyvraždili. Arvaniti a Turci, kteří přežili, utekli do Malé Asie. Řekové dále zničili všechny městské mešity. Po osvobození Řecka v roce 1830 mělo město Tripoli pouze 3 380 obyvatel, všichni byli Řekové. Do konce 19. století se ve městě usadili Řekové z nedalekých venkovských krajů a přišel sem velký počet Kréťanů. V roce 1831 zde vznikla první škola. Literatura Ελλάδα, ανάμεσα στο μύθο και την ιστορία / Μαρία Μαυροματάκη Externí odkazy https://web.archive.org/web/20041217095958/http://www.cs.bham.ac.uk/~gkt/www/tripoli.html https://web.archive.org/web/20110709031411/http://arcadia.ceid.upatras.gr/arkadia/places/trip/tripoli.htm Města v Řecku Sídla na Peloponésu Řecká krajská hlavní města"} {"text": "[HI Wikipedia] वीर्य\n\nवीर्य एक जैविक तरल पदार्थ है, जिसे औरत कि योनि मे छौड़ा जाता हैबीजीय या वीर्य तरल भी कहते हैं, जिसमे सामान्यतः शुक्राणु (स्पर्म) होते हैं। यह जननग्रन्थि (यौन ग्रंथियाँ) तथा नर या उभयलिंगी प्राणियों के अन्य अंगों द्वारा स्रावित होता है और मादा अंडाणु को निषेचित कर सकता है। इंसानों में, शुक्राणुओं के अलावा बीजीय तरल में अनेक घटक होते हैं: बीजीय तरल के प्रोटियोलिटिक और अन्य एंजाइमों के साथ-साथ फलशर्करा तत्व शुक्राणुओं के अस्तित्व की रक्षा करते हैं और उन्हें एक ऐसा माध्यम प्रदान करते हैं जहाँ वे चल-फिर सकें या \"तैर\" सकें. वो प्रक्रिया जिसके परिणामस्वरूप वीर्य का प्रवाह होता है उसे स्खलन कहा जाता है। निर्माण डॉ. कोवन ने अपनी प्रसिद्ध पुस्तक 'दि सायन्स ऑफ़ ए न्यू लाइफ़ के १०६ पृष्ठ पर लिखा है : “शरीर के किसी भाग में से यदि ४० औंस रुधिर निकाल लिया जाय तो वह एक औंस वीर्य के बराबर होता है- अर्थात् ४० औंस रुधिर से एक औंस वीर्य है ।\" आयुर्वेद अष्टांगहृदय , शारीर स्थान , अध्याय ३ , श्लोक ६ में लिखा है : “रसाद्रक्तं ततो मांसं मांसात्मेदस्ततोऽस्विच अनो मज्जा ततः शुक्रं ....\" अर्थात् भोजन किये हुए पदार्थ से पहले रस बनता है । रस से रक्त , रक्त से माँस , माँस से मेढ़ , मेढ़ से हड्डी , हड्डी से मज्जा , मज्जा से वीर्य ; वीर्य अन्तिम धातु है । मैशीन में वनने का दर्जा सातवाँ है । इस के बनाने में , शरीर को , जीवन के लिये आवश्यक अन्य पदार्थों की अपेक्षा अधिक मेहनत करनी पड़ती है । रस की अपेक्षा रक्त में तत्व - भाग अधिक है । उत्तरोत्तर सार - भाग बढ़ता ही जाता है । शरीर की भौतिक शक्तियों का अन्तिम सार वीर्य है । थोड़े - से वीर्य को बनाने के लिये रक्त की पर्याप्त मात्रा की आवश्यकता पड़ती है । किंचिन्मात्र वीर्य का नष्ट हो जाना अत्यधिक रुधिर के नष्ट हो जाने के बराबर है । आयुर्वेद के इस सिद्धान्त को अनेक पाश्चात्य पण्डितों ने भी मुक्त कण्ठ से स्वीकार किया है । अमेरिका के प्रसिद्ध शरीर - वृद्धि - शास्त्रज्ञ , मैकफेडन महोदय ने अपनी पुस्तक 'मैनहुड एण्ड मैरेज' में इसी विचार को प्रकट किया है । 'एनसाइक्लोपीडिया ऑफ फिज़िकल कल्चर''' के २७७२ पृष्ठ पर वे लिखते हैं : \"कई विद्वानों के कथनानुसार ४० औंस रुधिर से १ औंस वीर्य बनता है परन्तु कुछ - एक विद्वानों का कथन है कि १ औंस वीर्य की शक्ति ६० औंस रुधिर के बराबर है ।\" डॉ. एन्ड्रू जैक्सन डेविअपनी पुस्तक 'ऐन्सर्स टु एवर रिकरिंग क्वेश्चन्स फ्रॉम दि पीपल के २६३ पृष्ठ पर लिखते हैं : “कई शारीर - शास्त्रियों ने यह भ्रम मूलक विचार फैला दिया है कि वीर्य की उत्पत्ति रुधिर से होती है, वास्तव में सच्चाई यह है कि 'उत्पादक-वीर्य ' , 'वीर्य कीटाणु' अथवा 'स्पर्मेटोज़ोआ' की उत्पत्ति मस्तिष्क से होती है और अन्य द्रवों के साथ मिल कर वह अण्ड-कोशों में बहिःस्राव के रूप में प्रकट होता है ।मस्तिष्क से उत्पन्न हुआ प्रत्येक 'शुक्र-कीटाणु' यदि बाहर निकलता है तो मस्तिष्क के उतने अंश का पूरा नाश समझना चाहिये ।\" शारीरिक पहलू आंतरिक और बाह्य निषेचन प्रजातियों के आधार पर, शुक्राणु आंतरिक या बाह्य रूप से अंडाणु को निषेचित कर सकता है। बाह्य निषेचन में, शुक्राणु सीधे-सीधे अंडाणु को निषेचित करता है, मादा के यौनांगों के बाहर से. मादा मछली, उदाहरण के लिए, अपने जलीय वातावरण में…"} {"instruction": "Create a Python script to perform sentiment analysis on a given text. The application should use a pre-trained machine learning model to analyze the sentiment and output either 'positive', 'negative', 'neutral', or 'mixed' sentiment.", "input": "The product was amazing and I highly recommend it!", "output": "import nltk\nimport sklearn\nnltk.download('vader_lexicon')\n\nfrom nltk.sentiment.vader import SentimentIntensityAnalyzer\n\ntext = \"The product was amazing and I highly recommend it!\"\n\nanalyzer = SentimentIntensityAnalyzer()\nsentiment = analyzer.polarity_scores(text)\n\nif sentiment['compound'] > 0.05:\n sentiment_text = \"positive\"\nelif sentiment['compound'] < -0.05:\n sentiment_text = \"negative\"\nelse:\n sentiment_text = \"neutral\"\n\nprint(sentiment_text)"} {"instruction": "Write a code to parse the following JSON into a dictionary", "input": "{ \"firstName\": \"John\", \"lastName\": \"Smith\", \"age\": 25 }", "output": "import json def parse_json(json_data): data = json.loads(json_data) return {key: data[key] for key in data}"} {"instruction": "Create a ruby method for finding the frequency of an element in an array.", "input": "array = [2, 3, 4, 3, 2, 5, 2]", "output": "def frequency(array) frequency_hash = Hash.new(0) array.each { |num| frequency_hash[num] += 1 } frequency_hash end puts frequency(array) // {2=>3, 3=>2, 4=>1, 5=>1}"} {"instruction": "Debug the following code so it can print the corresponding JSON data correctly.", "input": "import json people_string = '{\"name\": \"John Smith\", \"age\": 50, \"profession\": \"engineer\"}' data = json.loads(people_string) print(\"Name: \", data[\"name\"])", "output": "import json people_string = '{\"name\": \"John Smith\", \"age\": 50, \"profession\": \"engineer\"}' data = json.loads(people_string) print(\"Name: \", data[\"name\"]) print(\"Age: \", data[\"age\"]) print(\"Profession: \", data[\"profession\"])"} {"instruction": "Develop a C program to print a pattern like a pyramid.", "input": "", "output": "#include int main() { int i, j, k, rows; printf(\"Enter the number of rows \\n\"); scanf(\"%d\",&rows); for(i=1; i<=rows; i++ ) { for(k=rows; k >= i; k--) printf(\" \"); for(j=1; j<= (2*i-1) ; j++ ) printf(\"*\"); printf(\"\\n\"); } return 0; }"} {"instruction": "Implement a Python method to encrypt a given string.", "input": "text = \"Hello, World!\"", "output": "def encrypt(text): \n result = \"\" \n for i in range(len(text)): \n char = text[i] \n if (char.isupper()): \n result += chr((ord(char) + 7)) \n else: \n result += chr((ord(char) + 3)) \n return result \n\ntext = \"Hello, World!\"\nprint(encrypt(text))"} {"instruction": "Write a python program to clean up a list of emails and put them into a new list.", "input": "The original list of emails:\n['bob@example.com', 'alice+bob@cafe.com', 'bob@gmail.com.uk', 'bob+alice@example']", "output": "original_list = ['bob@example.com', 'alice+bob@cafe.com', 'bob@gmail.com.uk', 'bob+alice@example']\n\nclean_list = []\n\nfor email in original_list:\n email_without_plus = email.split('+')[0]\n email_without_dot_uk = email_without_plus.split('.uk')[0]\n clean_list.append(email_without_dot_uk)\n\nprint(clean_list) # prints ['bob@example.com', 'alice@cafe.com', 'bob@gmail.com', 'bob@example']"} {"text": "[HI Wikipedia] हिन्दी शब्द संसाधक\n\nअधिकतर नये शब्द संसाधक इण्डिक समर्थन युक्त हैं, इसलिये हिन्दी में अच्छा कार्य करते हैं। माइक्रोसॉफ्ट ऑफिस हिन्दीकाफी सुविधाजनक हिन्दी शब्द संसाधक (वर्ड प्रोसैसर) है। इसके अतिरिक्त सीडैक का आइलीप, मोड्यूलर इन्फोटैक का श्रीलिपि, देशवेब का अक्षरमाला, बालेन्दु दाधीच का माध्यम (निःशुल्क), वेबदुनिया का टाइप एंड कास्ट, सी-डैक का एच-वर्ड आदि देवनागरी में काम करने के अच्छे साधन हैं। इन्हें भी देखें वर्ड प्रोसैसर माइक्रोसॉफ्ट ऑफिस हिन्दी २००३ ओपनऑफिस.ऑर्ग बाहरी कड़ियाँ हिन्दी टैक्स्ट एडीटर तथा वर्ड प्रोसैसरों का विवरण हिन्दी टाइपिंग औजारों की सूची हिन्दी शब्द संसाधन (आनलाइन पुस्तक) हिंदी अक्षरमाला (पुस्तक एव जानकारी) हिन्दी हिन्दी टाइपिंग हिन्दी कम्प्यूटिंग"} {"instruction": "Edit the given code to fix the bug", "input": "def calculate_tax(price): tax_rate = 0.20 total = price + (price * tax_rate) return total", "output": "def calculate_tax(price): tax_rate = 0.20 total = price + (price * tax_rate) return round(total, 2)"} {"text": "[DE Wikipedia] 2,4,5-Triphenylimidazol\n\n2,4,5-Triphenylimidazol (Trivialname: Lophin) ist ein Vertreter der Imidazole, welcher unter Einwirkung von UV-Licht fluoresziert und in basischem Medium chemoluminesziert. Es wurde 1877 erstmals von dem polnischen Chemiker Bronisław Radziszewski (1838–1914) als erste künstliche, organische, chemolumineszierende Verbindung dargestellt. In der heutigen Zeit findet Lophin in der chemischen Industrie Anwendung, ist aber aufgrund des deutlich bekannteren Luminols in Vergessenheit geraten. Darstellung 2,4,5-Triphenylimidazol kann durch die Radziszewski-Synthese (siehe unten) hergestellt werden. Hierfür wird Benzil mit Benzaldehyd und Ammoniumacetat (als Ammoniakquelle) in Eisessig für etwa 1,5 Stunden bei 120–125 °C unter Rückfluss zum Sieden erhitzt. Bei direkter Zugabe der heißen Lösung in Eiswasser fällt verunreinigtes, gelbes 2,4,5-Triphenylimidazol aus. Dieses kann durch mehrfache Umkristallisation in Ethanol oder ähnlichen Lösungsmitteln und anschließender Ausfällung mit kochendem Wasser als reines, weißes Pulver erhalten werden. Fluoreszenz und Chemolumineszenz 2,4,5-Triphenylimidazol weist eine grüne Fluoreszenz auf. Das Absorptionsmaximum in Ethanol liegt bei 300 nm. Die Chemolumineszenz von Lophin läuft im basischen Medium ab. Dafür werden vier Lösungen (A–D) benötigt. Lösung A besteht aus einer Lösung aus Lophin in Ethanol, Lösung B aus Wasserstoffperoxid in Ethanol, Lösung C aus Kaliumhydroxid in verdünntem Ethanol und Lösung D aus einer Natriumhypochloritlösung. Um die Chemolumineszenz zu starten, werden Lösungen A–C miteinander vermischt, wozu dann die Lösung D gegeben wird. Es entsteht eine gelbe Chemolumineszenz, welche in einem abgedunkelten Raum mit bloßem Auge zu betrachten ist. Ein besonders gut zu beobachtendes Ergebnis lässt sich durch Erhitzen des Gemischs auf 40–45 °C erhalten. Durch das Lösen der Edukte Kaliumhydroxid und Lophin in der kleinstmöglichen Menge Ethanol lässt sich eine hohe Konzentration erreichen, was sich ebenfalls positiv auf die Chemolumineszenz auswirkt. Lophin wird durch Natriumhypochlorit in alkalischer, ethanolischer Lösung zu Benzoesäure und Ammoniak oxidiert. Wird das Lophin mit Wasserstoffperoxid versetzt und mit ultraviolettem Licht der Wellenlänge 365 nm bestrahlt, lässt sich eine Dunkelblau/-Violettfärbung feststellen. Dies ist auf die Bildung von Lophinhydroperoxiden, genauer gesagt 1,2-Dioxetanen zurückzuführen, welche instabil sind und durch ihre rote Farbe in Lösung zu erkennen sind. Diese weisen neben der Fluoreszenz auch eine Thermochemolumineszenz auf. Die Lophinhydroperoxide können durch Reaktion mit den Lophyl-Radikalen oder dem Dimer (siehe unten) synthetisiert werden. Radziszewski-Synthese Bronisław Radziszewski (1838–1914) stellte Lophin ausgehend von Hydrobenzamid her, welches beim Erhitzen…"} {"instruction": "Given two integers, write a Python function to find their greatest common divisor (GCD).", "input": "num1 = 24\nnum2 = 18", "output": "def find_gcd(num1, num2):\n gcd = 1\n while num2 != 0:\n temp = num2\n num2 = num1 % num2\n num1 = temp\n gcd = num1\n return gcd"} {"instruction": "Create an algorithm in Python that takes a string and returns the longest palindromic substring in it.", "input": "Not applicable", "output": "# Function to find the longest palindromic substring \ndef longestPalindrome(string): \n \n # Find the longest palindrome in the string \n n = len(string) \n start = 0\n maxLength = 0\n\n for i in xrange(1, n): \n \n # Case 1 \n start = i-1\n end = i \n while start >= 0 and end < n and string[start] == string[end]: \n if end-start+1 > maxLength: \n maxLength = end-start+1\n result = string[start:end+1]\n start -= 1\n end += 1\n \n # Case 2 \n start = i-1\n end = i+1\n while start >= 0 and end < n and string[start] == string[end]: \n if end-start+1 > maxLength: \n maxLength = end-start+1\n result = string[start:end+1]\n start -= 1\n end += 1\n \n return result"} {"instruction": "Create a Python script to check the validity of a given password string", "input": "", "output": "def is_valid_password(password): \n if len(password) < 8: \n return False\n\n has_uppercase = False\n has_lowercase = False\n has_digit = False\n\n for i in range(len(password)): \n ch = password[i] \n if ch.isupper(): \n has_uppercase = True\n elif ch.islower():\n has_lowercase = True \n elif ch.isdigit(): \n has_digit = True\n\n if has_uppercase and has_lowercase and has_digit: \n return True\n\n return False"} {"text": "[HI Wikipedia] ऋग्वेद संहिता\n\nऋग्‍वेद-संहिता ऋग्वैदिक वाङ्मय का मन्त्र-भाग है। इसमें १०२८ सूक्‍त हैं। इसे विश्‍व का प्राचीनतम ग्रंथ माना जाता है। विद्वानों के अनुसार ऋग्‍वेद ६००० इशापूर्व वर्षों से भी अधिक प्राचीन है। परिचय चारों वेदों में सर्वोच्च स्थान ऋग्वेद को ही प्राप्त है। ऋग्वेद को विश्व का प्राचीनतम ग्रन्थ होने का गौरव प्राप्त है। वैदिक वाङ्मय में ऋग्वेद को परम पूजनीय माना जाता है और वसन्त पूजा आदि के अवसर पर सर्वप्रथम वेदपाठ ऋग्वेद से ही प्रारम्भ किया जाता है। पुरुषसूक्त में आदि पुरुष से उत्पन्न वेदमन्त्रों में सर्वप्रथम 'ऋक' को गिनाया गया है। ऋग्वेद की संहिता को 'ऋकसंहिता' कहते हैं। वस्तुत: 'ऋक' का अर्थ है- 'स्तुतिपरक मन्त्र और 'संहिता' का अभिप्राय संकलन से है। अत: ऋचाओं के संकलन का नाम 'ऋकसंहिता' है। ऋक की परिभाषा दी जाती है- ऋच्यन्ते स्तूयन्ते देवा अनया इति ऋक ; अर्थात् जिससे देवताओं की स्तुति हो उसे 'ऋक' कहते हैें। एक दूसरी व्याख्या के अनुसार छन्दों में बंधी रचना को 'ऋक' नाम दिया जाता है। ब्राह्रण ग्रन्थों में ऋक को ब्रह्म, वाक, प्राण, अमृत आदि कहा गया है जिसका तात्पर्य यही है कि ऋग्वेद के मन्त्र ब्रह्म की प्रापित कराने वाले, वाक की प्रापित कराने वाले, प्राण या तेज की प्रापित कराने वाले और अमरत्व के साधन हैं। सामान्य रूप से इससे ऋग्वेद के मन्त्रों की महिमा का ग्रहण किया जाना चाहिए। पतंजलि के महाभाष्य के अनुसार ऋग्वेद की कदाचित २१ शाखाएं थीं। इनमें से 'चरणव्यूह' नामक ग्रन्थ में उल्लखित ये पांच शाखाएं प्रमुख मानी जाती हैं- शाकल, वाष्कल, आश्वलायनी, शांखायनी और माण्डूकायनी। सम्प्रति ऋग्वेद की शाकल शाखा तथा आश्वलायनी शाखा की संहिता ही प्राप्त होती है। यह संहिताएं कई दृष्टियों से अत्यधिक महत्त्वपूर्ण है। ऋग्वेद की संहिता का महत्त्व सम्पूर्ण वैदिक वाङ्मय का प्राचीनतम ग्रन्थ होने के कारण इस (शाकल) संहिता को विश्वसाहित्य का प्रथम ग्रन्थ होने का गौरव प्राप्त है। चारों वेदों की संहिताओं की तुलना में यह सबसे बड़ी संहिता है। एक विशालकाय वैदिक ग्रन्थ के रूप में यह अद्भुत और विविध अनंत ज्ञान का स्रोत है। भाव, भाषा और छन्द की दृषिट से भी यह अत्यन्त प्राचीन है। इसमें अधिकांश देव इन्द्र, विष्णु, मरुत आदि प्राकृतिक तत्त्वों के प्रतिनिधि हैं। ये पंचतत्त्वों- अगिन, वायु, आदि तथा मेघ, विद्युत, सूर्य आदि का प्रतिनिधित्व करते हैं। सभी वेदों और ब्राह्राण ग्रन्थों में ऋग्वेद या इसकी संहिता का ही नाम सर्वप्रथम गिनाया जाता है। फिर अनेक विषयों की व्यापक चर्चा करने के कारण इस संहिता का वर्ण्यविषयपरक महत्त्व भी स्वीकार किया जाता है। ऋग्वेद संहिता का विभाजन ऋग्वेद की संहिता ऋचाओं का संग्रह है। ऋकसंहिता का विभाजन दो प्रकार से किया जाता है- (1) अष्टक-क्रम और (2) मण्डल-क्रम। अष्टक क्रम के अन्तर्गत सम्पूर्ण संहिता आठ अष्टकों में विभाजित है और प्रत्येक अष्टक में आठ अध्याय हैं। अध्याय वर्गों में विभाजित हैं और वर्ग के अन्तर्गत ऋचाएं हैं। कुल अध्यायों की संख्या 64 और वर्गों की संख्या 2006 है। मण्डल-क्रम में सम्पूर्ण संहिता में दस मण्डल हैं। प्रत्येक मण्डल में कई अनुवाक, प्रत्येक अनुवाक में कई सूक्त और प्रत्येक सूक्त में कई मन्त्र हैं। तदनुसार ऋग्वेद-संहिता में 10 मण्डल, 85 अनुवाक, 1028 सूक्त और 10552…"} {"instruction": "Create a method in Python to find the sum of all even numbers between two integers including the first and last number.", "input": "Low: 10\nHigh: 20", "output": "def even_sum(low, high):\n sum = 0\n for i in range(low, high+1):\n if i % 2 == 0:\n sum += i\n return sum\n\nresult = even_sum(10, 20)\nprint(result)"} {"instruction": "Create a Java class named \"Card\" to represent a standard playing card. The class should contain a constructor which takes the card's suit and number as parameters. It should also contain two getter methods to get the suit and number of the card.", "input": "< noinput >", "output": "public class Card { private String suit; private int number; public Card(String suit, int number) { this.suit = suit; this.number = number; } public String getSuit() { return suit; } public int getNumber() { return number; } }"} {"instruction": "Write a code to get all the records from the users table with role \"admin\".", "input": "", "output": "SELECT * FROM users WHERE role = 'admin';"} {"instruction": "Write an algorithm in Python to determine the largest number in an array.", "input": "arr = [10, 8, 12, 4, 6]", "output": "def find_max(arr): \n max_val = arr[0] \n \n for i in range(1, len(arr)): \n if arr[i] > max_val: \n max_val = arr[i] \n \n return max_val \n \n# Driver code \narr = [10, 8, 12, 4, 6]\nresult = find_max(arr) \nprint(result) \n\n# Output: 12"} {"instruction": "Generate a C++ function to print the Fibonacci series", "input": "", "output": "#include using namespace std; void Fibonacci(int n) { int f1 = 0, f2 = 1, i; if (n == 0) return; for (i = 1; i <= n; i++) { cout << f2 << \" \"; int next = f1 + f2; f1 = f2; f2 = next; } } int main() { int n = 10; Fibonacci(n); return 0; }"} {"instruction": "Design a Python class for an Employee, containing person's name, age, salary, and designation.", "input": "", "output": "class Employee: \n def __init__(self, name, age, salary, designation): \n self.name = name \n self.age = age \n self.salary = salary \n self.designation = designation \n \n def get_details(self): \n return self.name + \" \" + str(self.age) + \" \" + str(self.salary) + \" \" + self.designation \n \n def __str__(self): \n return self.name + \" \" + str(self.age) + \" \" + str(self.salary) + \" \" + self.designation"} {"text": "[HI Wikipedia] कुआलालम्पुर\n\nकुआला लम्पुर, जिसे संक्षेप में \"के एल\" भी कहा जाता है, मलेशिया की संघीय राजधानी व सबसे अधिक जनसंख्या वाला नगर है। इस नगर का क्षेत्रफल है तथा 2012 की अनुमानित जनसँख्या 16 लाख है। वृहत्तर कुआला लम्पुर, जिसे क्लाँग घाटी के नाम से भी जाना जाता है, में आसपास के शहरी समुदाय भी सम्मिलित किए जाते हैं, जिन्हें मिलाकर इस क्षेत्र की कुल अनुमानित जनसँख्या 57 लाख (2010 में) है। जनसँख्या व अर्थव्यवस्था के हिसाब से यह इस देश का सर्वाधिक तीव्रगति से वृद्धिरत क्षेत्र है। मलेशिया की ही नई दूसरी राजधानी पुत्रजय भी है। सन्दर्भ मलेशिया के आबाद स्थान एशिया के आबाद स्थान मलेशिया के राज्य व संघीय क्षेत्र"} {"instruction": "Write a bash script that searches for a given text string in a directory tree recursively.", "input": "", "output": "#!/bin/bash search_string=\"text string\" directory=\"directory_name\" #searching for text string recursive in the directory grep -rnw $directory -e \"$search_string\""} {"instruction": "Create a Python script to print out 10 random values between 1 and 10.", "input": "", "output": "import random\n\nfor i in range(10):\n print(random.randint(1, 10))"} {"instruction": "Write a for loop in Python which prints out the contents of the given stack.", "input": "sample_stack = [\"first\", \"second\", \"third\"]", "output": "for item in sample_stack: print(item)"} {"instruction": "Write a script in Python to take an age as an input and return a boolean which indicates if a person is a minor or not.", "input": "", "output": "def is_minor(age): \"\"\" Function to determine if a person is a minor or not \"\"\" if age < 18: return True else: return False # Let's test it age = 18 print(is_minor(age)) # Output: False"} {"text": "[HI Wikipedia] कायोटी\n\nकायोटी (coyote), जिसे अमेरीकी सियार (American jackal) और झाड़ भेड़िया (brush wolf) भी कहते हैं, उत्तर अमेरिका और मध्य अमेरिका में विस्तृत एक लोमड़ी-जैसी जाति है। यह दक्षिण में पनामा से लेकर उत्तर में अलास्का व कनाडा तक पाई जाती है। अमेरिकी प्राकृतिक मंडल में इसका वही स्थान है जो यूरेशिया में सियार (लोमड़ी) का है। मानव सभ्यता के फैलाव के साथ जहाँ लोमड़ी और भेड़ियों का निवास स्थल सिकुड़ा है उसके विपरीत कायोटी ने जंगली रहने के बावजूद मानवों के साथ जीना सीख लिया है और अक्सर यह शहरी क्षेत्रों में भी बच्चे पैदा कर लेते हैं। इन्हें भी देखें सियार भेड़िया सन्दर्भ कैनिडाए उत्तर अमेरिका के स्तनधारी"} {"text": "[DE Wikipedia] Ondonga\n\nOndonga steht für: Ondonga (Clan), ein Clan der Ovambo im südlichen Afrika, siehe Könige der Ovambo #Ondonga Olukonda, andere Bezeichnung der Ansiedlung in der Region Oshikoto, Namibia"} {"instruction": "Create a neural network with two layers using Keras, a Python library for deep learning.", "input": "", "output": "import keras\nfrom keras.models import Sequential\nfrom keras.layers import Dense\n\n# Define the model\nmodel = Sequential()\nmodel.add(Dense(8, input_dim=6, activation='relu'))\nmodel.add(Dense(4, activation='softmax'))\nmodel.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])"} {"instruction": "Create an optimized data structure in Python to store information about a person's profile.", "input": "profile = {\n \"name\": \"Kiran\", \n \"age\": 25, \n \"location\": \"Australia\", \n \"hobbies\": [\n \"Travelling\",\n \"Swimming\"\n ]\n}", "output": "class Profile(object):\n def __init__(self, name, age, location, hobbies):\n self.name = name\n self.age = age\n self.location = location\n self.hobbies = hobbies\n\nprofile = Profile(\"Kiran\", 25, \"Australia\", [\"Travelling\", \"Swimming\"])"} {"instruction": "Write a Python program that takes a sequence of strings, sorts them alphabetically, and prints them to the console.", "input": "sequence = [\"Hello\", \"world\", \"Welcome\", \"to\", \"the\", \"Coding\", \"Revolution\"]", "output": "sequence = [\"Hello\", \"world\", \"Welcome\", \"to\", \"the\", \"Coding\", \"Revolution\"]\n\nsorted_sequence = sorted(sequence)\n\nfor word in sorted_sequence:\n print(word)"} {"instruction": "Identify all the statements that are erroneous or have logical errors.", "input": "a = 2 b = 1 if a > b print(\"a is greater than b\") elif a == b print(\"a is equal to b\") else print(\"b is greater than a\")", "output": "The statements that are erroneous or have logical errors are: 1) There is no colon (:) after the 'if' and 'elif' statements 2) There is no colon (:) after the 'else' statement. 3) The parentheses after 'print' are unnecessary."} {"instruction": "Write a Python program for linear regression using gradient descent.", "input": "A 2-dimensional sample dataset:\nX = [1, 2, 3, 4]\nY = [2, 7, 3, 8]", "output": "import numpy as np\n\ndef gradient_descent(x, y, alpha, num_iters):\n \n # Initialize theta\n theta = np.ones(x.shape[1]) \n m = len(y)\n J_history = list()\n \n # Perform Gradient Descent\n for _ in range(num_iters):\n # Compute Hypothesis\n h = np.dot(x, theta)\n \n # Compute errors\n error = h - y\n \n # Compute gradient\n grad = np.dot(x.T, error) / m\n \n # Update theta\n theta = theta - alpha * grad\n \n # Save cost function\n J_history.append(calculate_cost(h, y))\n \n return theta, J_history\n\n\ndef calculate_cost(h, y):\n m = len(y)\n return np.sum(np.power(h-y, 2)) / (2*m)"} {"instruction": "You need to run a loop 'n' times and print a value each time.", "input": "let n = 10;", "output": "for (let i = 0; i < n; i++) { console.log(i); }"} {"instruction": "Create a neural network in Python capable of solving a multiple classification problem.", "input": "", "output": "import tensorflow as tf\n\n# Create an input layer with two input features\ninputs = tf.keras.Input(shape=(2,))\n\n# Add a dense layer with three neurons\nx = tf.keras.layers.Dense(3, activation='sigmoid')(inputs)\n\n# Add a dense layer with three neurons\noutputs = tf.keras.layers.Dense(3, activation='softmax')(x)\n\n# Create the model\nmodel = tf.keras.Model(inputs=inputs, outputs=outputs)\n\n# Compile\nmodel.compile(optimizer='adam',\n loss='categorical_crossentropy',\n metrics=['accuracy'])"} {"text": "[DE Wikipedia] Olympische Winterspiele 2014/Eisschnelllauf – 10.000 m (Männer)\n\nDie 10.000 m im Eisschnelllauf der Männer bei den Olympischen Winterspielen 2014 wurden am 23. Februar 2014 in der Adler Arena ausgetragen. Rekorde Ergebnisse Weblinks 10.000 m (Männer)"} {"instruction": "Create a TensorFlow model in Python to classify hand-written numbers.", "input": "Not applicable", "output": "import tensorflow as tf\n\n# load the MNIST dataset\n(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()\n\n# reshape and rescale the data\nx_train = x_train.reshape(x_train.shape[0], 28, 28, 1).astype('float32')\nx_test = x_test.reshape(x_test.shape[0], 28, 28, 1).astype('float32')\nx_train = x_train / 255.0\nx_test = x_test / 255.\n\n# build the model\nmodel = tf.keras.models.Sequential([\ntf.keras.layers.Conv2D(32, (3, 3), input_shape=(28, 28 ,1), activation='relu'),\ntf.keras.layers.MaxPooling2D(2, 2),\ntf.keras.layers.Dropout(0.2),\ntf.keras.layers.Flatten(),\ntf.keras.layers.Dense(128, activation='relu'),\ntf.keras.layers.Dense(10, activation='softmax')])\n\n# compile and train the model\nmodel.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])\nmodel.fit(x_train, y_train, epochs=10)\n\n# evaluate the model\ntest_loss, test_accuracy = model.evaluate(x_test, y_test, verbose=1)\nprint('Test Accuracy:', test_accuracy)"} {"instruction": "What is the SQL query to select all the values that are greater than 10 in the \"Age\" column in the table \"Students\"?", "input": "", "output": "SELECT * FROM Students WHERE Age > 10"} {"instruction": "Create a function that returns true if a given set is a subset of another set.", "input": "set1 = {1,2,3} set2 = {1,2,3,4,5,6}", "output": "def is_subset(s1, s2): for e in s1: if e not in s2: return False return True is_subset({1,2,3}, {1,2,3,4,5,6}) # Output: True"} {"text": "[HI Wikipedia] गेंदबाज\n\nक्रिकेट के खेल में गेंदबाज़ गेंद फेंकने की जिम्मेदारी लेता है और गेंद फेंकने की इस क्रिया या कला को गेंदबाज़ी कहा जाता है। सबसे तेज गेंद अभी तक शोएब़ अख्तर द्वारा फरवरी २००३ में फेंकी गेंद को सबसे तेज़ गेंद (१००.२३ मील प्रति घंटा या १६१.३ किलोमीटर प्रति घंटा) माना जाता है। प्रमुख गेंदबाज यह भी देखिये दायें हाथ का गेंदबाज बायें हाथ का गेंदबाज तेज गति का गेंदबाज मध्यम तेज गति का गेंदबाज लेग ब्रेक फिरकी गेंदबाज ऑफ ब्रेक फिरकी गेंदबाज क्रिकेट"} {"instruction": "What is the maximum number of threads simultaneously running in a single process?", "input": "", "output": "The maximum number of threads that can simultaneously run in a single process is limited by the resources of the system, such as the amount of available memory and the scheduling algorithm employed. Generally, a typical modern system will allow up to hundreds or even thousands of threads to run concurrently."} {"instruction": "Design a neural network application in Python to predict the price of real estate.", "input": "Table Name: Properties\n\nColumns:\n- id: int\n- location: varchar\n- size: int\n- price: int", "output": "# Imports\nimport numpy as np\nimport pandas as pd\nfrom sklearn import preprocessing\nimport tensorflow as tf\nimport keras\n\n# Read in the data\ndata = pd.read_csv('data/properties.csv')\n\n# Split data into features and labels\nX = data[['location', 'size']]\ny = data['price']\n\n# Preprocess the data\nscaler = preprocessing.StandardScaler()\nX = scaler.fit_transform(X)\n\n# Build the model\nmodel = keras.Sequential()\n\n# Input Layer\nmodel.add(tf.keras.layers.InputLayer(input_shape=(2,)))\n\n# Hidden Layers\nmodel.add(tf.keras.layers.Dense(128, activation='relu'))\nmodel.add(tf.keras.layers.Dense(128, activation='relu'))\nmodel.add(tf.keras.layers.Dense(128, activation='relu'))\n\n# Output Layer\nmodel.add(tf.keras.layers.Dense(1))\n\n# Compile the model\nmodel.compile(\n optimizer='adam',\n loss='mean_squared_error',\n metrics=['mae']\n)\n\n# Train the model\nmodel.fit(X, y, epochs=10, batch_size=256)\n\n# Test the model\ntest_data = np.array([[127, 2123]], dtype=float)\ntest_data = scaler.transform(test_data)\nprediction = model.predict(test_data)\n\nprint(prediction)"} {"text": "[CS Wikipedia] Jaroslav Mařík\n\nJaroslav Mařík (22. prosinec 1913 Zahradnice – 5. květen 1997 Praha) byl český esperantista, čestný člen Českého esperantského svazu a Světového esperantského svazu. Život Esperanto se naučil jako samouk v r. 1934 a v českém esperantském hnutí zastával řadu funkcí a aktivit: byl mj. vedoucí Tiskové služby, pokladník rozhlasové komise, člen jazykové a slovníkářské komise, hlavní delegát mládeže, redaktor mládežnického esperantistického časopisu „Tagiĝo“, učitel v letních jazykových táborech, člen výboru Svazu esperantistů Československé republiky, člen výboru Mezinárodního esperantského svazu (1950–1951), profesionální redaktor každodenních esperantských vysílání v pražském rozhlase, aktivní účastník uměleckých programů Verda Stacio. Po likvidaci Svazu esperantistů ČSR a Klubu esperantistů Praha v roce 1952 působil jako vedoucí zájmového esperantského kroužku v Praze (rezignoval v r. 1962 pro neúnosné intervence ze strany Státní bezpečnosti). V letech 1968–1969 byl předsedou Přípravného výboru Českého esperantského svazu a v této funkci 27. ledna 1969 slavnostně převzal na Ministerstvu vnitra povolení (schválené stanovy) pro znovuobnovení ČES. Jako člen výboru ČES působil až do roku 1977. Velmi aktivně přispíval do časopisu ČES „Starto“. Dílo Vlastní tvorbu realizoval pouze v esperantu; šlo především o odbornou literaturu. Mezi esperantisty byl znám jako „chodící encyklopedie hnutí“. Resuma historio de Esperanto-movado (Souhrnná historie esperantského hnutí) Fremdulo antaŭ vendotablo (Cizinec před pultem) – esperantská verze obchodní příručky Fremdlingva korespondado de filatelistoj (Cizojazyčná korespondence filatelistů) – esperantská verze devítijazyčného díla Mimo vlastní tvorbu se podílel na několika esperantských dílech. Významná byla jeho spolupráce s R. Hromadou na několika slovnících, dále se podílel na vzniku díla Esperanto en perspektivo, jehož hlavním autorem byl I. Lapenna. Gvidlibro tra Praha (Průvodce Prahou) Poŝatlaso de la mondo (Kapesní atlas světa) Juĝu mem (Faktoj pri ČSSR) (Posuďte sami - Fakta o ČSSR) Překlady Ĉeĥoslovaka konstitucio (Československá ústava) Lerneja reformo en Ĉeĥoslovakio (Školská reforma v Československu) Odkazy Reference Čeští novináři Čeští esperantisté Narození v roce 1913 Úmrtí v roce 1997 Muži"} {"instruction": "Implement the bubble sort algorithm for an array of integers.", "input": "arr = [34, 16, 12, 9, 5]", "output": "def bubbleSort(arr): n = len(arr) # Traverse through all array elements for i in range(n): # Last i elements are already in place for j in range(0, n-i-1): # traverse the array from 0 to n-i-1 # Swap if the element found is greater # than the next element if arr[j] > arr[j+1] : arr[j], arr[j+1] = arr[j+1], arr[j] # Driver code to test above arr = [34, 16, 12, 9, 5] bubbleSort(arr) print (\"Sorted array is:\") for i in range(len(arr)): print (\"%d\" %arr[i]),"} {"text": "[EN Wikipedia] Potha Bainsi\n\nPotha Bainsi is a village in Mirpur District of Azad Kashmir, Pakistan. The nearest town is Kakra. It is approximately 8 miles east from the city of Mirpur and approx 20 miles from the city of Jhelum. Demography According to the 1998 census of Pakistan, its population was 1,391. History Potha Bainsi is relatively new town, built in the 1960s. The original Potha village was engulfed by the construction of the Mangla Dam. As a result of building of the dam, the residents of old Potha and surrounding villages either moved to new Potha Bainsi or migrated to Punjab and Sindh province of Pakistan. Some of the residents even migrated to other parts of world especially the United Kingdom after the local fields, where the majority of residents worked, were engulfed by the waters and the lack of work opportunities in nearby cities. References Populated places in Mirpur District"} {"text": "[DE Wikipedia] Kingston (Mississippi)\n\nKingston (auch Jersey Town genannt) ist eine Unincorporated Community im Adams County, Mississippi in den Vereinigten Staaten. Die Siedlung wurde 1784 im damaligen Britisch-Westflorida gegründet und war eine der ersten Niederlassungen weißer Siedler im Adams County. Geschichte Das Gebiet wurde 1772 durch Richard und Samuel Swayze aus New Jersey besiedelt, die 1900 Acre (770 Hektar) Land erwarben. Eine Reihe von Familien aus New Jersey folgte ihnen und; die Schauspieler William Holden und Patrick Swayze sind Nachkömmlinge von ihnen. Im Jahr 1773 organisierte Samuel Swayze, ein kongregationaler Pastor die damals erste protestantische Kirche in Britisch-Westflorida. Die Kirche bestand allerdings nur bis zu seinem Tod im Jahr 1784. Ein früher Siedler, Caleb King, legte 1784 den Grundstein für Kingston und benannte sie nach sich selbst. King war von Beruf Landvermesser und kam in die Niederlassung der Siedler aus New Jersey, um das von ihnen neu erworbene Land zu vermessen. King kehrte noch kurz nach New Jersey zurück, um dort Richard Swayzes Tochter Mary zu heiraten; danach kehrte das Paar nach Mississippi zurück. Tobias Gibson, der Gründer von Port Gibson, Mississippi, gründete 1799 im Kingston eine methodistische Kirche. Die Kingston Methodist Church wurde um 1802 aus Baumstämmen erbaut, und ihre Errichtung war die erste einer protestantischen Gemeinde im damaligen Mississippi-Territorium. 1822 stiftete Caleb Kings Schwiegersohn Daniel Farrar ein Stück Land, auf dem aus Backsteinen gebaute Kirche erbaut wurde. Kingston prosperierte in den ersten Jahrzehnten des 19. Jahrhunderts. 1824 gab es drei Kaufhäuser und eine Reihe von Geschäften, und die Ortschaft hatte etwa 150 Einwohner. 1840 zerstörte ein Tornado den größten Teil von Kingston. Zu Beginn des 20. Jahrhunderts gab es in Kingston nur noch eine Arztpraxis, die Kirche und ein Wohnhaus. Gegenwart Die Kingston Methodist Church und der Friedhof befinden sich auf der Südseite der Siedlung. Sie wurden 1982 in das National Register of Historic Places aufgenommen. Das Feuerwehrhaus der Freiwilligen Feuerwehr befindet sich westlich des Siedlungskerns. Belege Gemeindegründung 1784"} {"instruction": "Design a function in Python to return the length of the longest common subsequence in two given strings.", "input": "\"abcde\", \"ace\"", "output": "def longestCommonSubsequence(s1, s2): \n m = len(s1) \n n = len(s2) \n \n LCSuff = [[0 for k in range(n+1)] for l in range(m+1)] \n result = 0\n for i in range(m + 1): \n for j in range(n + 1): \n if (i == 0 or j == 0): \n LCSuff[i][j] = 0\n elif s1[i-1] == s2[j-1]: \n LCSuff[i][j] = LCSuff[i-1][j-1] + 1\n result = max(result, LCSuff[i][j]) \n else: \n LCSuff[i][j] = 0\n return result\n\nresult = longestCommonSubsequence(\"abcde\", \"ace\")\nprint(result)"} {"instruction": "Create a function that compares two binary strings and returns the number of differences between them.", "input": "string1 = \"100100\" string2 = \"100011\"", "output": "def differences_in_binary_strings(string1, string2): # initialise a variable to store total differences total_differences = 0 # loop through each digit in the strings for i in range(len(string1)): # check if the digits in the same position in each string are different if string1[i] != string2[i]: # increment the total differences total_differences += 1 return total_differences"} {"instruction": "Devise a Python code snippet to return the last character of a given string.", "input": "string = \"stackoverflow\"", "output": "last_char = string[-1] print(last_char)"} {"instruction": "Develop an algorithm in Python that finds the minimum number of coins required to make a given amount.", "input": "8", "output": "def minCoins(amount): \n \n # Initializing the list of coins with the given amount \n coins = [1, 2, 5] \n num_coins = [999999999] * (amount+1) \n num_coins[0] = 0\n \n for i in range(1, amount+1): \n for j in coins: \n if j <= i: \n sub_res = num_coins[i-j] \n if sub_res + 1 < num_coins[i]: \n num_coins[i] = sub_res + 1\n \n return num_coins[amount] \n\nprint(minCoins(8))"} {"instruction": "Design a SQL query to find all records from the table \"Users\" where the user's name is \"John\".", "input": "", "output": "SELECT * FROM Users WHERE name = 'John';"} {"instruction": "Generate Python code to get all unique items in a nested dictionary.", "input": "dict1 = {\n \"key1\": [1,2],\n \"key2\": [2,3],\n \"key3\": {\n \"key4\": [3,4]\n }\n}", "output": "def get_all_keys(input_dict):\n keys = set()\n if isinstance(input_dict, dict):\n keys.update(input_dict.keys())\n for v in input_dict.values():\n keys.update(get_all_keys(v))\n return keys\n\ndict1 = {\n \"key1\": [1,2],\n \"key2\": [2,3],\n \"key3\": {\n \"key4\": [3,4]\n }\n}\n\nunique_items = get_all_keys(dict1)\nprint(unique_items)"} {"instruction": "Based on the following input array, return the largest two numbers in the array.", "input": "numbers = [10, 9, 8, 7, 6, 5]", "output": "# return the two largest numbers in the array largestOne = max(numbers) numbers.remove(largestOne) largestTwo = max(numbers) print(largestOne, largestTwo) 10 9"} {"instruction": "Create a function to print a table using a given dictionary.", "input": "example_dict = { 'Name': ['John', 'Stella', 'Daniel'], 'Age': [20, 23, 19] }", "output": "def print_table(dictionary): \"\"\"Prints a table from a dictionary of lists.\"\"\" # retrieve the lists names = dictionary['Name'] ages = dictionary['Age'] # print the table print('\\tName\\tAge') print('-' * 20) for i, name in enumerate(names): age = ages[i] print(f'\\t{name}\\t{age}')"} {"text": "[HI Wikipedia] ग्वार-बती भाषा\n\nग्वार-बती (Gawar-Bati, ) कुनर (कुनड़) शाखा की एक दार्दी भाषा है जो अफ़ग़ानिस्तान​ के कुनर प्रान्त और उसके साथ लगे पाकिस्तान के चित्राल ज़िले के कुछ भागों में बोली जाती है। इसके लगभग ९,००० मातृभाषी अफ़ग़ानिस्तान​ में और १,५०० पाकिस्तान में रहते हैं। सन्दर्भ हिन्द-आर्य भाषाएँ दार्दी भाषाएँ पाकिस्तान की भाषाएँ अफ़ग़ानिस्तान की भाषाएँ"} {"text": "[CS Wikipedia] Sojuz TMA-16\n\nSojuz TMA-16 je ruská kosmická loď řady Sojuz k Mezinárodní vesmírné stanici (ISS), kam dopravila dva členy Expedice 21 a na nějakou dobu posledního „vesmírného turistu“. Posádka Maxim Surajev (1), velitel, CPK Jeffrey Williams (3), palubní inženýr, NASA Pouze start Guy Laliberté (1), účastník kosmického letu, soukromník Záložní posádka Alexandr Skvorcov ml., velitel, CPK Shannon Walkerová, palubní inženýr 1, NASA Barbara Barrettová, účastník kosmického letu, soukromník Průběh letu Sojuz TMA-16 hladce odstartoval jako 103. let Sojuzu z kosmodromu Bajkonur 30. září 2009 v 9:14:42 SELČ. Spojení s Mezinárodní vesmírnou stanicí (ISS) po standardním dvoudenním letu proběhlo 2. října 2009 v 10:35 SELČ, poprvé tak byly (do 11. října, kdy Sojuz TMA-14 přistál na Zemi) k ISS připojeny tři Sojuzy. V lodi na ISS přiletěli dva členové základní posádky – Maxim Surajev a Jeffrey Williams – a „vesmírný turista“ Guy Laliberté. Laliberté se po necelých 11 dnech v Sojuzu TMA-14 vrátil na Zem, Surajev a Williams zůstali na ISS a zařadili se do Expedice 21, resp. od 1. prosince 2009 Expedice 22. Sojuz TMA-16 byl připojen k modulu Zvezda. 21. ledna 2010 v 5:03 a.m. EST za pilotáže Surajeva byl \"přeparkován\" k modulu Poisk (5:24 a.m. EST). Sojuz TMA-16 se s posádkou Surajev, Williams ve čtvrtek 18.03.2010 v 9:03 SEČ odpoutal od ISS a následně přistál v Kazachstánu (18.03.2010 ve 12:24 SEČ). Vesmírná turistika Tímto letem byla prozatím ukončena vesmírná turistika. Vzhledem k plánovanému ukončení letů amerických raketoplánů Space Shuttle které mají definitivně odslouženo a přítomnosti 6 členů posádky na ISS bude nadále celá kapacita letů Sojuzů alokována pro dopravu členů posádky expedičních letů. USA rozjížděly projekt Orion který měl raketoplány nahradit, ale tento projekt prezident Obama v roce 2010 zrušil a doprava amerických astronautů nyní může být realizována jedině ruskými Sojuzy. Ruská strana již stanovila cenu letenky na 50 miliónů USD na člověka. Alternativa k Sojuzu momentálně neexistuje a ještě několik let existovat nebude. USA se tak z kosmické velmoci náhle staly v oblasti dopravy svých astronautů na ISS zcela závislými na Rusku. Navíc budou muset vyřešit i zásobování, které rovněž realizovaly svými raketoplány. Reference Externí odkazy Pilotované lety programu Sojuz Kosmonautika v roce 2009 Kosmonautika v roce 2010"} {"instruction": "Write a code to connect to a remote database.", "input": "username: john password: john123 IP: 100.10.0.10", "output": "import psycopg2 conn = psycopg2.connect(host=\"100.10.0.10\", database=\"mydb\", user=\"john\", password=\"john123\")"} {"instruction": "Write a Python program that calculates the distance between two points on a two-dimensional plane.", "input": "Point1 (x1: 3, y1: 4); Point2 (x2: -9, y2: -2)", "output": "#include \n#include \n\nint main() \n{ \n int x1 = 3; \n int y1 = 4; \n\n int x2 = -9; \n int y2 = -2;\n\n float distance = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)); \n\n std::cout << \"Distance between the two points is: \" << distance << std::endl; \n\n return 0; \n}"} {"instruction": "Subtract the second number from the first.", "input": "8, 6", "output": "2"} {"instruction": "Design a Python program to stop a loop after some specific iterations", "input": "", "output": "for i in range(100):\n if (i > 10):\n break\n print(i)"} {"text": "[CS Wikipedia] Pražský rejdič středozobý\n\nPražský rejdič středozobý je plemeno holuba domácího pocházející z České republiky. Má společný původ s pražským rejdičem krátkozobým. Je to drobný holub s hranatou hlavou, lehce nazad skloněným trupem a vypjatou, zaoblenou hrudí. Má vynikající letové schopnosti, trénované hejno by mělo vydržet létat ve velkých výškách aspoň dvě hodiny. K letovému sportu se ale v současnosti nepoužívá a střednězobý pražský rejdič se chová převážně jen jako chůvka pro krátkozobé rejdiče. Je to nejohroženější české národní plemeno holubů, v roce 2012 bylo v České republice chováno jen 125 ptáků. V seznamu plemen EE není dosud zařazen, v českém vzorníku patří mezi rejdiče. Historie Rejdiči jsou ve městech Střední Evropy chováni už dlouho. Kromě Prahy se tato plemena rozvíjela také ve Vídni, Budapešti, v Berlíně nebo v Bratislavě. V těchto lokalitách vznikala svérázná plemena krátkozobých rejdičů s typickými znaky a většina těchto krátkozobých plemen měli i svoji variantu s delším zobákem, přičemž tito rejdiči jsou velmi podobného vzhledu. První zmínka o existenci pražského středozobého rejdiče pochází z roku 1886, kdy byla vydána monografie Holubářství, jejímž autorem je Vladislav Šír. V této knize je popsán jak krátkozobý pražský rejdič, tak rejdič označovaný jako pražský bělouš. O dlouhozobém rejdiči zvaném pražský bělouš nebo pražský čápík píše i Bohumil Bauše ve svém překladu knihy Drůbež od Carla Gottloba Fridricha, která byla vydána v Německu v roce 1896. Středozobí rejdiči byli po vzniku pražského krátkozobého rejdiče vždy méně ceněni než jejich krátkozobá forma, ale byli početnější a chovatelé krátkozobých rejdičů často začínali právě u holubů středozobých, protože jejich chov je jednodušší. Postupem času se ze středozobých rejdičů stali ptáci, kteří byli považováni za odpad vyštěpující se občas v chovu krátkozobých pražských rejdičů a kteří se používají jen jako chůvky pro krátkozobé rejdiče, kteří kvůli extrémně zkrácenému zobáku nemohou sami odchovávat holoubata. V současné době je to plemeno na pokraji vyhynutí, chovají ho pouze čtyři chovatelé. Popis Pražský rejdič středozobý je starším vývojovým typem krátkozobého rejdiče. Plemennými znaky se mu velmi podobá, výrazně se od něj odlišuje tvarem hlavy a zobáku a letovými schopnostmi. Je to holub menšího tělesného rámce se středně dlouhou postavou, od ohbí křídel po konec ocasu není delší než 22 cm, celková délka ptáka od špičky zobáku po konec ocasu, je 32–34 cm. Má vždy působit dojmem dobrého letce. Hlava je jemná, hranatá, ale ne tak výrazně kostkovitá jako u krátkozobého rejdiče. Je spíše nižší, širší, s mírně zploštělým čelem a jemně klenutým temenem. Hrbolky nad očnicemi a na temeni nejsou výrazné, ale aspoň jejich náznak je žádoucí. Zobák je velmi široce nasazený, přiměřeně silný a mírně tupý. Je…"} {"instruction": "Convert the following temperature to its equivalent Fahrenheit measurement.", "input": "Temperature: 20 degrees Celsius", "output": "The equivalent Fahrenheit measurement is 68 degrees Fahrenheit."} {"instruction": "Write Python code snippets that will convert comma separated values to a list of dictionaries.", "input": "name,age\nAlbert,22\nBob,24\nCharles,20", "output": "csv_data = [\n {'name': 'Albert', 'age': 22},\n {'name': 'Bob', 'age': 24},\n {'name': 'Charles', 'age': 20}\n]"} {"text": "[EN Wikipedia] Andrius Giedraitis\n\nAndrius Giedraitis (born July 23, 1973) is a Lithuanian former professional basketball player and coach. Professional career Giedraitis started his career in the LPA Vilnius team, and he later moved to BC Sakalai. In 1998, he became a member of BC Lietuvos Rytas. He was one of the leaders of that team. In 2001, he moved to Telindus Oostende. During the 2002–03 season, he played with Śląsk Wrocław, where he became one of the team's leaders (avergaing 11.6 points per game). In 2003, he signed a contract with BC Lietuvos Rytas, however, due to an injury, he did not play. In 2004, he moved to BSG Basket Ludwigsburg, where he also immediately became one of the team's leaders. In 2005, he played with BC Dynamo Moscow Region. In 2007, he moved to Grupo Capitol Valladolid. Coaching career On August 12, 2010, Giedraitis became an assistant coach for Sakalai. Career statistics EuroLeague |- | style=\"text-align:left;\"| 2001–02 | style=\"text-align:left;\"| Telindus Oostende | 14 || 13 || 27.2 || .521 || .529 || .884 || 3.5 || 1.6 || 1.1 || .2 || 13.6 || 16.0 |- | style=\"text-align:left;\"| 2002–03 | style=\"text-align:left;\"| Śląsk Wrocław | 14 || 8 || 25.2 || .618 || .552 || .825 || 2.4 || 1.8 || .9 || .0 || 13.1 || 14.3 References External links Eurobasket.com Profile 1973 births Living people Basketball players at the 2000 Summer Olympics BC Rytas players CB Valladolid players Liga ACB players Lithuanian expatriate basketball people in Germany Lithuanian expatriate basketball people in Poland Lithuanian expatriate basketball people in Russia Lithuanian expatriate basketball people in Spain Lithuanian men's basketball players Medalists at the 2000 Summer Olympics Olympic basketball players for Lithuania Olympic bronze medalists for Lithuania Olympic medalists in basketball Sportspeople from Marijampolė Lithuanian expatriate basketball people in Belgium Shooting guards"} {"text": "[CS Wikipedia] MGM-31 Pershing\n\nMGM-31 Pershing byla americká balistická raketa nahrazující rakety Redstone. Mohla být vybavena jadernou hlavicí. Podle amerického kódového označení z roku 1962 šlo o řízenou střelu odpalovanou z mobilního prostředku (vozidla) určenou k ničení povrchových cílů (včetně např. podzemních bunkrů). Dle verze se jednalo o střelu krátkého či středního doletu. Pojmenována byla podle amerického vojevůdce Johna J. Pershinga. K roku 1991 byly tyto střely dohodou o jaderných zbraních středního doletu mezi SSSR a USA (Intermediate-Range Nuclear Forces Treaty) vyřazeny ze služby a zlikvidovány. Pershing IA (MGM-31A Pershing I) - balistická střela krátkého doletu (tzv. SRBM) - taktická zbraň Spojených států pro evropské bojiště (v 1965 umístěny v SRN). Dolet 740 km. Pershing II (MGM-31B Pershing II) - balistická střela středního doletu (tzv. IRBM) - zaměřena proti vojenským cílům - podzemní velitelské bunkry, zpevněná raketová sila apod. Dolet 1 600 km. Galerie Reference Literatura Zbraně 20. století: 600 nejznámějších zbraní světa. Praha : Ottovo nakladatelství, 1997. . Externí odkazy Americké jaderné zbraně Raketové zbraně USA Balistické střely"} {"instruction": "Create a bash script that prints out \"Hello World\" five times.", "input": "", "output": "#!/bin/bash for i in `seq 1 5`; do echo \"Hello World!\" done"} {"instruction": "Create a Java program to count and print the distinct elements in an array.", "input": "int[] arr = {1, 2, 3, 2, 1, 4, 3, 2}", "output": "public class DistinctElements { public static void main(String[] args) { int[] arr = {1, 2, 3, 2, 1, 4, 3, 2}; // Initialize all element with the value 0. int[] temp = new int[arr.length]; int visited = -1; for (int i = 0; i < arr.length; i++) { int count = 1; for (int j = i + 1; j < arr.length; j++) { if (arr[i] == arr[j]) { count++; temp[j] = visited; } } if (temp[i] != visited) { temp[i] = count; } } for (int i = 0; i < temp.length; i++) { if (temp[i] != visited) { System.out.println(arr[i] + \"->\" + temp[i]); } } } }"} {"text": "[DE Wikipedia] Rudi Bayerl\n\nRudolf „Rudi“ Bayerl (* 10. März 1942 in Ballertshofen bei Lauterhofen) ist ein Oberpfälzer Heimatpfleger, Sachbuchautor, Mundartdichter und Kommunalpolitiker (UPW/FW Neumarkt). Leben Bayerl ist pensionierter Volksschul- und Sonderschullehrer. Er war zuletzt als Konrektor der Erwin-Lesch-Schule (Förderschule) in Neumarkt in der Oberpfalz tätig. 1974 wurde er zum Kreisheimatpfleger im Landkreis Neumarkt in der Oberpfalz berufen, 1991 zusätzlich zum Stadtheimatpfleger in Neumarkt. Unter anderem setzte er sich für die Sanierung und den Wiederaufbau von Marterln und Feldkreuzen ein, beispielsweise in den Ortsteilen Stauf, Holzheim und Pelchenhofen sowie beim Bildstock „Weiße Marter“ vor der Hofkapelle St. Maria in Weichselstein. Seit 1975 ist er Mitglied, seit 2004 Vorsitzender des Historischen Vereins für Neumarkt/OPf. und Umgebung e.V., und war in dieser Funktion Mitherausgeber einiger Publikationen. Als Autor und Gründungsmitglied der im Sommer 1981 auf Initiative von Georg Gick gegründeten kleinen Mundartdichtergruppe „Sindlbacher Kreis“ widmet er sich der Pflege von Mundartdichtung. Die Gruppe, der auch Josef Fendl angehört, veröffentlichte vier Gedichtbände mit selbst verfassten Gedichten der Mitglieder in der Reihe Gereimtes und Ungereimtes aus der Oberpfalz. Er ist unter anderem auch Gründungsmitglied der Oberpfälzer Volksmusikfreunde, leitet den von ihm ins Leben gerufenen Volkstanzkreis in Neumarkt und ist Volkstanzbeauftragter des Vereins. Bayerl ist Mitglied der Wählervereinigung UPW/FW Neumarkt. Er sitzt seit 1984 im Neumarkter Kreistag, zudem seit 1990 auch im Stadtrat und fungiert als Referent für Museum/Denkmäler/Archiv. Unter anderem fielen in seine Amtszeit die Sanierung des Stadtmuseums, die Sanierung des denkmalgeschützten Schreiberhauses (Bräugasse 19) und der Neubau des Stadtarchivs in der Bräugasse 18 mit 360 Quadratmetern Nutzfläche auf vier Ebenen. Er ist seit 1990 Mitglied im Aufsichtsrat der Stadtwerke Neumarkt in der Oberpfalz, seit 1990 Mitglied in der Zweckverbandsversammlung der Sparkasse Neumarkt i.d.OPf.-Parsberg und seit 2008 Mitglied im Festausschuss. Unter anderem wirkte er 1999 und 2009 bei den Neumarkter Passionsspielen mit und organisierte auch die 1988 und 2009 in Neumarkt ausgetragenen Bayerischen Heimattage. Von 1996 bis 2014 war er wie auch zeitgleich sein CSU-Kollege Willibald Gailler Stellvertretender Landrat. Publikationen (unvollständig) im Bereich Heimatkunde: Vom Ousterbrand zum Pfingstkuttn. In: Schönere Heimat, 77 (1988), 2, Bayerischer Landesverein für Heimatpflege e.V., München 1988, S. 341–344. zwei Beiträge zu: Landkreis Neumarkt in der Oberpfalz. Das große Heimatbuch der westlichen Oberpfalz. In Zsarb. mit dem Landratsamt Neumarkt i.d. Opf., Buchverlag der Mittelbayerischen Zeitung, 1993 [2. Aufl.…"} {"instruction": "Write an algorithm in MIPS assembly language to determine if a given character is an uppercase letter or not.", "input": "Character: ‘A’", "output": "li $t0, 65 li $t1, 90 beq $t0, $t1, isUpperLetter j isNotUpperLetter isUpperLetter: # Do something isNotUpperLetter: # Do something"} {"instruction": "Using SQLite3, how can one create a table in an existing database?", "input": "", "output": "CREATE TABLE table_name (column_name data_type PRIMARY KEY, ...);"} {"instruction": "Find the number of triplets in this array which sum up to zero.", "input": "arr = [-1, 0, 1, 2, 3, 4]", "output": "The number of triplets in this array which sum up to zero is 1. The triplets are [-1, 0, 1]."} {"text": "[HI Wikipedia] समता (भौतिकी)\n\nसमता (अंग्रेजी : Parity) एक भौतिक राशी है। समता रूपांतरण (अथवा समता व्युत्क्रमण) कार्तिय निर्देशाकों का चिह्न परिवर्तन है। त्रिविम में, सामान्यतः तीनों कार्तिय निर्देंशाकों के एक साथ चिह्न परिवर्तन से भी समझाया जाता है: यह घटना की काइरलता (इंगिता) को समझने का विचार है, जिसमें इसके वृहत चित्रण में काइरल घटना, समता व्युत्क्रम को निरूपित करती है। किसी अकाइरल वस्तु पर समता रूपांरतण को इकाई (तत्समक) रूपांतरण कहते हैं। भौतिक इकाई"} {"instruction": "Create a function that counts the number of an specific letter in a given string.", "input": "string = \"hello, world\" letter = \"l\"", "output": "def countLetter(string, letter): count = 0 for char in string: if char == letter: count += 1 return count"} {"instruction": "Using a Decision Tree model, create a Python program to predict whether a customer is likely to churn given 5 different features.", "input": "Features: Purchase history, Gender, Age, Location, Billing Amount", "output": "import pandas as pd\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.model_selection import train_test_split\n\n# Read the dataset\ndataset = pd.read_csv('data.csv')\n\n# Extract the input and output\nX = dataset.iloc[:, :5].values\ny = dataset.iloc[:, 5].values\n\n# Split the data into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.4, random_state=42)\n\n# Train the decision tree\nclf = DecisionTreeClassifier()\nclf.fit(X_train, y_train)\n\n# Predict the output\ny_pred = clf.predict(X_test)\n\n# Print the accuracy\nprint('Accuracy:', clf.score(X_test, y_test))"} {"text": "[HI Wikipedia] खजुराहो\n\nखजुराहो(पूर्व में खजूरपुरा) भारत के मध्य प्रदेश प्रान्त में स्थित एक प्रमुख शहर है, जो अपने प्राचीन एवं मध्यकालीन मंदिरों के लिये विश्वविख्यात है। यह मध्य प्रदेश के छतरपुर जिले में स्थित है। खजुराहो को प्राचीन काल में 'खजूरपुरा'(खजूरी) और 'खजूर वाहिका' के नाम से भी जाना जाता था। यहां बहुत संख्या में प्राचीन हिन्दू और जैन मंदिर हैं। मंदिरों का शहर खजुराहो पूरे विश्व में मुड़े हुए पत्थरों से निर्मित मंदिरों के लिए प्रसिद्ध है। खजुराहो को इसके अलंकृत मंदिरों की वजह से जाना जाता है, जो कि देश के सर्वोत्कृष्ठ(सर्वश्रेष्ठ) मध्यकालीन स्मारक हैं। भारत के अलावा दुनिया भर के आगन्तुक और पर्यटक प्रेम के इस अप्रतिम सौंदर्य के प्रतीक को देखने के लिए निरंतर आते रहते हैं। हिन्दू कला और संस्कृति को शिल्पियों ने इस शहर के पत्थरों पर मध्यकाल में उत्कीर्ण(निर्मित) किया था। विभिन्न कामक्रीडाओं को इन मंदिरों में बेहद खूबसूरती के उभारा(बनाया) गया है। खजुराहो का मंदिर एक सभ्य सन्दर्भ, जीवंत सांस्कृतिक संपत्ति, और एक हजार आवाजें, जो सेरेब्रम, से अलग हो रही हैं, खजुराहो ग्रुप ऑफ मॉन्यूमेंट्स, समय और स्थान के अन्तिम बिंदु की तरह हैं, जो मानव संरचनाओं और संवेदनाओं को संयुक्त करती सामाजिक संरचनाओं की भरपाई करती है, जो हमारे पास है। सब रोमांच में। यह मिट्टी से पैदा हुआ एक कैनवास है, जो अपने शुद्धतम रूप में जीवन का चित्रण करने और जश्न मनाने वाले लकड़ी के ब्लॉकों पर फैला हुआ है। चंदेल वंश द्वारा 950 - 1050 CE के बीच निर्मित, खजुराहो मंदिर भारतीय कला के सबसे महत्वपूर्ण नमूनों में से एक हैं। हिंदू और जैन मंदिरों के इन सेटों को आकार लेने में लगभग सौ साल लगे। मूल रूप से 85 मंदिरों का एक संग्रह, संख्या 25 तक नीचे आ गई है। एक यूनेस्को विश्व विरासत स्थल, मंदिर परिसर को तीन क्षेत्रों में विभाजित किया गया है: पश्चिमी, पूर्वी और दक्षिणी। पश्चिमी समूह में अधिकांश मंदिर हैं, पूर्वी में नक्काशीदार जैन मंदिर हैं, जबकि दक्षिणी समूह में केवल कुछ मंदिर हैं। पूर्वी समूह के मंदिरों में जैन मंदिर चंदेल शासन के दौरान क्षेत्र में फलते-फूलते जैन धर्म के लिए बनाए गए थे। पश्चिमी और दक्षिणी भाग के मंदिर विभिन्न हिंदू देवी-देवताओं को समर्पित हैं। इनमें से आठ मंदिर विष्णु को समर्पित हैं, छह शिव को, और एक गणेश और सूर्य को जबकि तीन जैन तीर्थंकरों को हैं। कंदरिया महादेव मंदिर उन सभी मंदिरों में सबसे बड़ा है, जो बने हुए हैं। इतिहास खजुराहो का इतिहास लगभग एक हजार साल पुराना है।(950 से 1050 ईसवी में निर्मित) अपने क्षेत्र में खजुराहो की सबसे पुरानी ज्ञात शक्ति वत्स थी। क्षेत्र में उनके उत्तराधिकारियों में, सुंग, कुषाण, पद्मावती के नागा, वाकाटक वंश, गुप्त, पुष्यभूति,मौर्य,प्रतिहार,बुन्देला राजवंश और चन्देल राजवंश शामिल थे। यह विशेष रूप से गुप्त काल के दौरान था कि इस क्षेत्र में वास्तुकला और कला का विकास शुरू हुआ, हालांकि उनके उत्तराधिकारियों ने कलात्मक परंपरा जारी रखी। य शहर चन्देल क्षत्रिय साम्राज्‍य की प्रथम राजधानी था। चन्देल वंश और खजुराहो के संस्थापक चन्द्रवर्मन चंदेल थे। चन्द्रवर्मन मध्यकाल में बुंदेलखंड में शासन करने वाले [ धनगर]] राजा थे। वे अपने आप को चन्द्रवंशी(यदुवंशी) मानते थे। चंदेल राजाओं ने दसवीं से…"} {"instruction": "Edit the given SQL query to make it efficient.", "input": "SELECT * FROM table1, table2 WHERE table1.id = table2.id", "output": "SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.id The suggested modification is to replace the two-table join with an inner join. This will be more efficient as it reduces the number of cartesian products which have to be computed."} {"instruction": "Convert the following string from lower case to upper case", "input": "hello world", "output": "HELLO WORLD"} {"instruction": "Edit the following code to return a length 5 array of zeros.", "input": "int[] array = new int[10];", "output": "int[] array = new int[5]; for(int i=0; i{{ dateTime | date:'dd/MM/yyyy HH:mm:ss' }} ` }) export class AppComponent { dateTime = new Date(); }"} {"instruction": "Explain how a Depth-First-Search (DFS) algorithm works.", "input": "", "output": "A Depth-First-Search (DFS) algorithm is a graph traversal technique used to traverse a graph or tree. It starts at the root node of the graph and visits each of its adjacent nodes in a pre-defined order. For each adjacent node, it visits the node and checks to see if the node has been visited. If the node has not been visited, the algorithm visits the node and adds it to the visited set. The algorithm then recursively visits the adjacent nodes of the node it just visited. It repeats this process until it has visited all the nodes in the graph."} {"instruction": "Write HTML code to generate a table of 5 rows and 4 columns.", "input": "", "output": "
    Col1 Col2 Col3 Col4
    Row1 Row1 Row1 Row1
    Row2 Row2 Row2 Row2
    Row3 Row3 Row3 Row3
    Row4 Row4 Row4 Row4
    Row5 Row5 Row5 Row5
    "} {"text": "[HI Wikipedia] राहुल द्रविड़\n\nराहुल शरद द्रविड़ (कन्नड़: ರಾಹುಲ್ ಶರದ್ ದ್ರಾವಿಡ, ) (जन्म - 11 जनवरी 1973) भारतीय क्रिकेट टीम के सबसे अनुभवी खिलाड़ियों में से एक हैं, 1996 से वे इसके नियमित सदस्य रहें हैं। अक्टूबर 2005 में वे भारतीय क्रिकेट टीम के कप्तान के रूप में नियुक्त किये गए और सितम्बर 2007 में उन्होंने अपने इस पद से इस्तीफा दे दिया। १६ साल तक भारत का प्रतिनिधित्व करते रहने के बाद उन्होंने वर्ष २०१२ के मार्च में अंतर्राष्ट्रीय और राष्ट्रीय क्रिकेट के सभी फॉर्मैट से सन्यास ले लिया। वर्तमान में ये भारतीय क्रिकेट टीम के मुख्य कोच के पद पर कार्यरत हैं। द्रविड़ को वर्ष 2000 में पांच विसडेन क्रिकेटरों में से एक के रूप में सम्मानित किया गया। द्रविड़ को 2004 के उद्घाटन पुरस्कार समारोह में आईसीसी प्लेयर ऑफ़ द ईयर और वर्ष के टेस्ट प्लेयर के पुरस्कार से सम्मानित किया गया। लम्बे समय तक बल्लेबाजी करने की उनकी क्षमता के कारण उन्हें दीवार के रूप में जाना जाता है, द्रविड़ ने क्रिकेट की दुनिया में बहुत से रिकॉर्ड बनाये हैं। द्रविड़ बहुत शांत व्यक्ति है। \"दीवार\" के रूप में लोकप्रिय द्रविड़ पिच पर लम्बे समय तक टिके रहने के लिए जाने जाते हैं। सुनील गावस्कर और सचिन तेंदुलकर के बाद वे तीसरे ऐसे बल्लेबाज हैं जिन्होंने टेस्ट क्रिकेट में दस हज़ार से अधिक रन बनाये हैं। 14 फ़रवरी 2007 को, वे दुनिया के क्रिकेट इतिहास में छठे और भारत में सचिन तेंडुलकर और सौरव गांगुली के बाद तीसरे खिलाड़ी बन गए जब उन्होंने एक दिवसीय अंतर्राष्ट्रीय क्रिकेट में दस हज़ार रन का स्कोर बनाया। वे पहले और एकमात्र बल्लेबाज हैं जिन्होंने सभी 10 टेस्ट खेलने वाले राष्ट्र के विरुद्ध शतक बनाया है। 182 से अधिक कैच के साथ वर्तमान में टेस्ट क्रिकेट में सबसे ज्यादा कैच का रिकॉर्ड द्रविड़ के नाम है। द्रविड़ ने 18 अलग-अलग भागीदारों के साथ 75 बार शतकीय साझेदारी की है, यह एक विश्व रिकॉर्ड है। निजी जीवन द्रविड़ का जन्म इंदौर, मध्य प्रदेश[6] में, कर्नाटक में रहने वाले एक मराठा परिवार[7] में हुआ। उनके पैतृक पूर्वज थंजावुर, थंजावुर के [[तमिल नाडू]] के अय्यर थे। वे बेंगलोर कर्नाटक में बड़े हुए.[9] वे मराठी और कन्नड़ बोलते है। विजय उनके छोटे भाई हैं। दोनों भाई एक साधारण मध्यम वर्ग के माहौल में बड़े हुए| द्रविड़ के पिता GE Electric के लिए काम करते थे, यह एक कम्पनी है जो जेम और अन्य संरक्षित खाद्य बनाने के लिए जानी जाती है, इसीलिए सेंट जोसेफ हाई स्कूल बेंगलोर में उनकी टीम के सदस्यों ने उन्हें उपनाम दे दिया जेमी. उनकी माँ पुष्पा, बंगलौर विश्वविद्यालय में वास्तुकला की प्रोफेसर थीं। राहुल द्रविड़ ने 4 मई 2003 को कर्नाटक के सेंट जोसेफ कॉलेज ऑफ़ कॉमर्स बेंगलोर से डिग्री प्राप्त की। राहुल ने नागपुर की एक सर्जन डॉक्टर विजेता पेंधारकर से शादी की और 11 अक्टूबर 2005 को उनके बेटे समित, का जन्म हुआ। 27 अप्रैल 2009 को विजेता ने उनके दूसरे बेटे को जन्म दिया। [12] प्रारम्भिक वर्ष द्रविड़ ने 11 वर्ष की उम्र में क्रिकेट खेलना शुरू किया और अंडर-15, अंडर-17 और अंडर-19 के स्तर पर उन्होंने राज्य का प्रतिनिधित्व किया। राहुल की प्रतिभा को एक पूर्व क्रिकेटर केकी तारापोरे ने देखा जो चिन्ना स्वामी स्टेडियम में ग्रीष्मकालीन प्रशिक्षण शिविर में कोचिंग कर रहे थे। उन्होंने अपनी…"} {"text": "[DE Wikipedia] Mercédès Jellinek\n\nMercédès Adrienne Ramona Manuela von Weigl, geborene Jellinek, geschiedene von Schlosser (* 16. September 1889 in Wien; † 23. Februar 1929 ebenda), ist die Namenspatin der Automobilmarke Mercedes und in Folge von Mercedes-Benz. Leben Mercédès Jellineks Eltern waren der österreichisch-ungarische Diplomat und Autohändler Emil Jellinek und seine Frau Rachel Goggmann Cenrobert. Mercédès hatte zwei ältere Brüder, Adolph und Raoul Fernand. 1893 starb die Mutter. Aus der 1899 geschlossenen zweiten Ehe des Vaters gingen drei Söhne und eine Tochter hervor. Mercédès Jellinek heiratete 1909 den Wiener Karl Freiherr von Schlosser in Nizza, mit dem sie 1912 die Tochter Elfriede und 1916 den Sohn Hans-Peter bekam. 1926 trennte sie sich von ihrem Mann und heiratete den Wiener Bildhauer Rudolf von Weigl, der aber nach wenigen Monaten an Schwindsucht starb. Mercédès von Weigl selbst starb 1929 an Knochenkrebs. Sie fand im Familiengrab auf dem Wiener Zentralfriedhof ihre letzte Ruhestätte (Gruppe 59C, Nr. 26), wo auch mehrere ihrer Geschwister sowie ihr Onkel Max Hermann Jellinek bestattet sind. Obwohl eine der bekanntesten Automarken ihren Vornamen trägt, hat sie selbst nie ein Auto besessen. Ihr Bruder Raoul Fernand verübte unter dem Druck der antisemitischen Verfolgung 1939 Suizid. Ihre Tochter Elfriede war Verfolgungen durch die Nationalsozialisten ausgesetzt. Ihr Sohn Hans-Peter wurde während der deutschen Besetzung Frankreichs von der Gestapo verhaftet und 1944 durch die US-Army gerettet. Vermächtnis Namenspatin Mercédès Jellineks Vater entwickelte schon früh ein Interesse am Automobil. Nach dem Tod seiner Frau 1893 richtete er ein Büro in Nizza ein. 1897 erhielt er seinen ersten Wagen der Daimler-Motoren-Gesellschaft (DMG). Bei der Tourenfahrt Nizza–Colomars–Tourrettes-sur-Loup–Magagnosc–Nizza (ca. 80 km, laut Mercedes-Benz-Archiv „Tourettes“ und „Magagnone“) am 21. März 1899 erzielten 12 PS starke Daimler-Phönix-Rennwagen einen Doppelsieg bei Zweisitzern und den Sieg bei Viersitzern, mit Schnitten von knapp 35 und 32 km/h. Einen Siegerwagen hatte Emil Jellinek unter dem Pseudonym Monsieur Mercédès angemeldet. Im April 1900 bestellte Jellinek 36 Daimler-Wagen – ein Drittel der Jahresproduktion – und forderte die Konstruktion eines neuen Wagens, den er Mercedes nannte und dessen erstes Exemplar am 22. Dezember nach Nizza geliefert wurde. Im März 1901 erzielte der neue Wagen eine Serie von Siegen bei der Rennwoche in Nizza. Am 23. Juni 1902 meldete die Daimler-Motoren-Gesellschaft den Namen Mercedes als Warenzeichen an. Am 26. September wurde die Marke gesetzlich geschützt. 1909 wurde der Mercedes-Stern als Warenzeichen eingetragen. Die Automobile der 1926 geschaffenen Daimler-Benz AG wurden unter dem Markennamen Mercedes-Benz bekannt. Emil Jellinek wollte auch…"} {"text": "[HI Wikipedia] पश्चिमी विक्षोभ\n\nपश्चिमी विक्षोभ या वेस्टर्न डिस्टर्बन्स (Western Disturbance) भारतीय उपमहाद्वीप के उत्तरी इलाक़ों में सर्दियों के मौसम में आने वाले ऐसे तूफ़ान को कहते हैं जो वायुमंडल की ऊँची तहों में भूमध्य सागर, अन्ध महासागर और कुछ हद तक कैस्पियन सागर से नमी लाकर उसे अचानक वर्षा और बर्फ़ के रूप में उत्तर भारत, पाकिस्तान व नेपाल पर गिरा देता है। उत्तर भारत में रबी की फ़सल के लिये, विशेषकर गेंहू के लिये, यह तूफ़ान अति-आवश्यक होते हैं। मानसून से अंतर ध्यान दें कि उत्तर भारत में गर्मियों के मौसम (सावन) में आने वाले मानसून से पश्चिमी विक्षोभ का बिलकुल कोई सम्बन्ध नहीं होता। मानसून की बारिशों में गिरने वाला जल दक्षिण से हिन्द महासागर से आता है और इसका प्रवाह वायुमंडल की निचली तहों में होता है। मानसून की बारिश ख़रीफ़ की फ़सल के लिये ज़रूरी होती है, जिसमें चावल जैसे अन्न शामिल हैं। इन्हें भी देखें रबी की फ़सल मॉनसून सन्दर्भ भारत की जलवायु तूफ़ान पवन वर्षण"} {"text": "[CS Wikipedia] Esperanto\n\nEsperanto (původně Lingvo Internacia – „mezinárodní jazyk“) je nejrozšířenějším mezinárodním plánovým jazykem. Název esperanto je odvozen ze pseudonymu, pod nímž roku 1887 polský židovský lékař Ludvík Lazar Zamenhof základy této řeči publikoval. Záměrem tvůrce bylo vytvořit snadno naučitelný neutrální jazyk, vhodný pro použití v mezinárodní komunikaci; jeho cílem však nebylo nahradit ostatní národní řeči. Ačkoliv žádná oficiálně uznaná země nepřijala esperanto jako úřední jazyk, je používáno komunitou o odhadovaném počtu 100 000 až 2 000 000 mluvčích, z čehož asi tisícovku tvoří mluvčí rodilí. Dosáhlo také některých mezinárodních uznání, jako jsou dvě rezoluce UNESCO či podpora známých osobností veřejného života. V současnosti je esperanto využíváno pro účely cestování, dopisování, mezinárodních setkání a kulturních výměn, kongresů, vědeckých diskuzí, původní i překladové literatury, divadla a kina, hudby, tištěného i internetového zpravodajství, rozhlasového a televizního vysílání. Slovní zásoba esperanta pochází především ze západoevropských jazyků, zatímco jeho skladba a tvarosloví poukazují na silný slovanský vliv. Morfémy jsou neměnné a lze je téměř bez omezení kombinovat do rozmanitých slov; esperanto má tedy mnoho společného s izolujícími jazyky jako je čínština, zatímco vnitřní struktura jeho slov připomíná jazyky aglutinační jako je japonština, svahilština nebo turečtina. Dějiny Zamenhofovo dětství U zrodu esperanta stál Ludvík Lazar Zamenhof. Vyrůstal v mnohojazyčném, tehdy k Ruskému impériu náležejícím, dnes polském městě Bělostoku, kde byl svědkem častých rozepří mezi jednotlivými etniky (Rusové, Poláci, Němci, Židé). Protože za jednu z hlavních příčin těchto konfliktů považoval neexistenci společného jazyka, začal již jako školák pracovat na projektu nové vhodné řeči, která by tuto roli mohla plnit. Měla by být – na rozdíl od národních jazyků – neutrální a snadno naučitelná, tedy také přijatelná jako druhý jazyk pro všechny, jazyk vyučovaný společně s těmi národními a používaný v situacích vyžadujících dorozumění mezi národy. První pokusy Zamenhof nejdříve uvažoval o oživení latiny, kterou se učil ve škole, ale usoudil, že je pro běžné dorozumívání zbytečně složitá. Když studoval angličtinu, povšiml si, že časování sloves podle osoby a čísla není nutné a že gramatický systém jazyka může být mnohem jednodušší, než si předtím myslel. Stále však zůstávala překážka v učení se velkému množství slovíček nazpaměť. Jednou Zamenhofa zaujaly dva ruské nápisy: швейцарская [švejcarskaja] (vrátnice, odvozeno od швейцар [švejcar] – vrátný) a кондитерская [konditěrskaja] (cukrárna, odvozeno od кондитер [konditěr] – cukrář). Tato slova stejného zakončení mu vnukla myšlenku, že užívání pravidelných předpon a přípon by mohlo významně snížit množství…"} {"text": "[DE Wikipedia] W. Kerr Scott\n\nWilliam Kerr Scott (* 17. April 1896 in Haw River, Alamance County, North Carolina; † 16. April 1958 in Burlington, North Carolina) war ein US-amerikanischer Politiker (Demokratische Partei) und von 1949 bis 1953 Gouverneur von North Carolina. Von 1954 bis 1958 vertrat er diesen Bundesstaat im US-Senat. Frühe Jahre Kerr Scott besuchte die Hawfield High School und das North Carolina State College, an dem er im Jahr 1917 seinen Abschluss machte. Nach dem Eintritt der Vereinigten Staaten in den Ersten Weltkrieg wurde er Soldat bei einer Feldartillerie-Einheit. Nach dem Krieg versorgte er als Händler die Farmen im Alamance County mit landwirtschaftlichen Bedarfsartikeln. Zwischen 1930 und 1933 war er Leiter einer staatseigenen Farm (North Carolina State Grange). Von 1934 bis 1936 war er Leiter eines Umschuldungsprogramms für Farmer, das zur Überwindung der Wirtschaftskrise aufgelegt worden war. Zwischen 1937 und 1948 amtierte er als Landwirtschaftsminister (Commissioner of Agriculture) von North Carolina. Gouverneur von North Carolina Im Jahr 1948 wurde er von seiner Partei als Kandidat für die anstehende Gouverneurswahl nominiert, die er mit 73,2 Prozent der Stimmen gegen den Republikaner George M. Pritchard für sich entschied. Nach der gewonnenen Wahl trat er sein neues Amt als 62. Gouverneur von North Carolina am 6. Januar 1949 an. In den folgenden vier Jahren bis zum 8. Januar 1953 ließ er das Straßennetz des Staates weiter ausbauen. In Wilmington und Morehead City wurden die Seehäfen ausgebaut und durch eine größere Wassertiefe für Schiffe mit großem Tiefgang erreichbarer gemacht. Staatsweit wurde ein Programm zur Verbesserung der Gesundheit vor allem im Jugend- und Schulbereich aufgelegt. Scott ist der Begründer des \"Go Forward\"-Programms, das vom Staatsparlament 1949 gebilligt wurde. US-Senator Nach Ablauf seiner Amtszeit wurde er in den US-Senat gewählt. Dort amtierte er ab dem 2. November 1954 bis zu seinem Tod am 16. April 1958. In seiner Amtszeit im Kongress war er einer von 19 US-Senatoren, die das Southern Manifesto 1956 unterzeichneten. Es handelte sich hierbei um ein Protestschreiben, das sich gegen die „Aufhebung der Rassentrennung“ (Desegregation) richtete. Unumstritten ist sein Einsatz für die Landwirtschaft. Als Bewohner des Alamance County und gebildeter Farmer war Scott lebenslang ein Fürsprecher für landwirtschaftliche Themen, sodass er in seinem Heimatstaat als „the Squire of Haw River“ (der Junker von Haw River) bekannt wurde. Kerr Scott war mit Mary Elizabeth White verheiratet. Das Paar hatte drei Kinder, unter ihnen war auch der spätere Gouverneur Robert W. Scott. Würdigung Der Stausee W. Kerr Scott Dam and Reservoir im Wilkes County trägt zu Ehren des früheren Gouverneurs und Senators seinen Namen, da er bei dem…"} {"text": "[EN Wikipedia] North Carolina General Assembly of 1862–1864\n\nThe North Carolina General Assembly of 1862–1864 met in Raleigh from November 17, 1862, to December 22, 1862. Extra sessions were held on January 19, 1863 – February 12, 1863; June 30, 1863 – July 7, 1863; November 23, 1863 – December 14, 1863; and May 17–30, 1864 . The assembly consisted of the 120 members of the North Carolina House of Commons from 82 counties and 50 senators representing one or more counties in North Carolina Senate elected by the voters in October 1862. Zebulon Baird Vance was Governor of North Carolina during this assembly. This assembly met during the American Civil War as part of the Confederate States of America. Much of the legislation passed by this assembly dealt with the managing the state and its population during wartime. Assembly membership House of Commons members There were 82 counties with 120 delegates, 5 counties with three delegates, 28 counties with two delegates, and 49 counties with one delegate. The House of Commons delegates elected a Speaker (Richard Spaight Donnell, Robert B. Gilliam, Marmaduke Swain Robins, William E. Mann), Clerk, Assistant Clerk, Doorkeeper, and Assistant Doorkeeper. The following delegates to the House of Commons were elected by the voters of North Carolina to represent each county and district: Senate members The Senators elected a President, Clerk, Assistant Clerk, Doorkeeper, and Assistant Doorkeeper. The following Senators were elected by the voters of North Carolina to represent each county: Legislation The Civil War was ongoing during the entire term of this assembly. The assembly passed public laws dealing with the following: the destroyed court house in Hertford County, funding of the state insane asylum (Dorothea Dix Hospital), establishing the eighth judicial district, prohibiting the distillation of spirituous liquors, modifying acts so that justices of the peace absent from counties under occupation of Union troops would not lose their position, acts dealing with the state militia, purchase and hiding of emergency provisions, authorization to the governor for the use of slave labor for building fortifications, provisions to survivors of soldiers dying in service, resolution to declare the separation of the United States and Confederate State final, creating a Roll of Honor maintained by the Governor of Confederate soldiers and patriots from North Carolina, a resolution condemning the confiscation of North Carolina government iron by the Confederate Government, extending the statute of limitations till the war is over, allowing the governor to draft all able bodied men between 18 and 45 years old into the militia, making monopolies, extortions, and speculation illegal during the war, and raising wartime taxes. The senate and house occasionally went into secret sessions,…"} {"text": "[CS Wikipedia] Adolf Staňura\n\nAdolf Staňura (12. března 1915 – 16. března 2004) byl přední český esperantský literát. Zabýval se především překlady děl českých autorů do esperanta: La perdita vizaĝo (Ztracená tvář) — vědeckofantastický román Josefa Nesvadby Meze de Eŭropo… skize pri la historio de Ĉeĥoslovakio — přeložil spolu s Evou Seemannovou a Oldřichem Kníchalem Vypracoval rovněž soustavu esperantského těsnopisu podle systému Herout–Mikulík. Související články Esperantská literatura Externí odkazy Čeští esperantisté Čeští překladatelé Narození v roce 1915 Úmrtí v roce 2004 Narození 12. března Úmrtí 16. března Muži Překladatelé z češtiny Překladatelé do esperanta"} {"instruction": "Construct a SQL query to find the maximum salary from a table named \"employees\".", "input": "", "output": "SELECT MAX(salary) FROM employees;"} {"instruction": "Design a regular expression for validating email address.", "input": "", "output": "^[a-z0-9]+@[a-z]+\\.[a-z]+$"} {"instruction": "Write a CSS code to style all links (a element) with a red color.", "input": "", "output": "a { color: red; }"} {"text": "[EN Wikipedia] Halectinosoma\n\nHalectinosoma is a genus of copepods belonging to the family Ectinosomatidae. The genus has almost cosmopolitan distribution. Species: Halectinosoma abyssicola Bodin, 1968 Halectinosoma angulifrons (Sars, 1919) References Harpacticoida Copepod genera"} {"instruction": "Create a class in Python for a Pizza. The Pizza class should have attributes for size, crust, and toppings", "input": "Not applicable", "output": "class Pizza:\n def __init__(self, size, crust, *toppings):\n self.size = size\n self.crust = crust\n self.toppings = toppings\n\n def describe_pizza(self):\n print(f\"This pizza is a {self.size}-inch pizza with a {self.crust} crust and the following toppings:\")\n for topping in self.toppings:\n print(f\"- {topping}\")\n\nmy_pizza = Pizza(12, 'thin', 'mushrooms', 'olives', 'pepperoni')\nmy_pizza.describe_pizza()"} {"text": "[HI Wikipedia] किशनगंगा नदी\n\nकिशनगंगा नदी (Kishanganga River) भारत के जम्मू और कश्मीर प्रदेश में बहने वाली एक नदी है। यह कृशनसर में उत्पन्न होती है और झेलम नदी की एक उपनदी है, जो स्वयं सिन्धु नदी की उपनदी है। इसके प्रवाह मार्ग का कुछ भाग पाक-अधिकृत कश्मीर में है, जहाँ भारत अपनी सम्प्रभुता का दावा करता है। पाकिस्तान अपने कब्ज़े बाले क्षेत्र में इसका नाम \"किशनगंगा\" से बदलकर नीलम नदी (Neelum River) रखता है। मार्ग किशनगंगा नदी जम्मू और कश्मीर प्रदेश के सोनमर्ग शहर के पास स्थित कृशनसर झील (कृष्णसर झील) से शुरू होती है और उत्तर को चलती है जहाँ बदोआब गाँव के पास द्रास से आने वाली एक उपनदी इसमें मिल जाती है। फिर यह कुछ दूर तक नियंत्रण रेखा के साथ-साथ चलकर गुरेज़ के पास पाक अधिकृत कश्मीर के गिलगित-बल्तिस्तान क्षेत्र में दाख़िल हो जाती है। वहाँ से पश्चिम की तरफ़ बहकर यह मुज़फ़्फ़राबाद के उत्तर में झेलम नदी में जा मिलती है। इसके कुल २४५ किमी के मार्ग में से ५० किमी भारतीय नियंत्रण वाले इलाक़े में आता है और शेष १९५ किमी पाक-अधिकृत कश्मीर में। किशनगंगा घाटी किशनगंगा घाटी, जिसे पाकिस्तान नीलम वादी कहता है, एक २५० किमी लम्बी हरी-भरी हिमालय की गोद में स्थित तंग घाटी है। यह मुज़्ज़फ़राबाद​ से होकर अठमुक़ाम तक जाती है। यहाँ हिन्दू व बौद्ध धर्मों का ऐतिहासिक शिक्षा संस्थान, शारदा पीठ, स्थित है। यह पूर्व क्षेत्र सरस्वती देवी से सम्बंधित माना जाता था और इसे पुराने ज़माने में 'शारदादेश' भी कहा जाता था। पाकिस्तान के कब्ज़े वाले क्षेत्र में नीलम वादी में प्रवेश करने के दो रास्ते हैं। एक तो मुज़्ज़फ़राबाद​ से आता है और दूसरा ख़ैबर-पख़्तूनख़्वा के मानसेहरा ज़िले के काग़ान​ शहर से। इन्हें भी देखें कृशनसर झेलम नदी गिलगित-बल्तिस्तान शारदा (नगर) बाहरी कड़ियाँ किशनगंगा प्रॉजेक्टः भारत की जीत, पाक को झटका सन्दर्भ भारत की नदियाँ पाकिस्तान की नदियाँ जम्मू और कश्मीर की नदियाँ सिन्धु नदी की उपनदियाँ गिलगित-बल्तिस्तान सिन्धु जलसम्भर द्रोणी"} {"instruction": "Sort the list of numbers [3,2,7,9,1] in ascending order.", "input": "list = [3,2,7,9,1]", "output": "list.sort() print(list) # Output [1,2,3,7,9]"} {"text": "[HI Wikipedia] एर्नाकुलम\n\nएर्नाकुलम (Ernakulam) भारत के केरल राज्य का एक नगर है। यह कोच्चि महानगर का केन्द्रीय भाग है। इसके नाम पर एर्नाकुलम ज़िले का नाम रखा गया है। विवरण एर्नाकुलम केरल राज्य के मध्य में स्थित है। यह कोच्चि शहर के पूर्वी, मुख्यभूमि हिस्से को संदर्भित करता है। यह कोच्चि का सबसे शहरी भाग है। एरनाकुलम को केरल राज्य की वाणिज्यिक राजधानी कहा जाता है। केरल हाईकोर्ट, कोचिंग कॉरपोरेशन का कार्यालय और कोचीन स्टॉक एक्सचेंच यहाँ स्थित है। शहर मे कई मलयाली उद्यमियों के लिए इनक्यूबेटर के रूप मे काम किया है और केरल के एक प्रमुख वित्तीय और वाणिज्यिक केंद्र है। पर्यटन स्थल मरीन ड्राइव, कोची दरबार हॉल ग्राउंड सुभाष पार्क बच्चों के पार्क महात्मा गांधी रोड (कोच्चि) केरल उच्च न्यायालय बी.आर. अम्बेडकर स्टेडियम इन्हें भी देखें कोच्चि एर्नाकुलम ज़िला सन्दर्भ एर्नाकुलम ज़िला केरल के शहर एर्नाकुलम ज़िले के नगर"} {"instruction": "Create a Python Class to handle JSON formatted data", "input": "", "output": "import json\n\nclass JSONHandler():\n '''A class to handle JSON-formatted data'''\n \n def __init__(self, json_string):\n self.json_string = json_string\n self.data = self.__parse_json_data()\n \n def __parse_json_data(self):\n parsed_data = json.loads(self.json_string)\n return parsed_data\n \n def get_data(self):\n return self.data\n \n def set_data(self, new_data):\n self.data = new_data\n self.__update_json_data()\n\n def __update_json_data(self):\n self.json_string = json.dumps(self.data)"} {"instruction": "Generate a solution in python that takes a string containing letters and numbers and returns the frequency of each character.", "input": "\"helloWorld12345\"", "output": "def count_frequency(string):\n counts = {}\n for char in string:\n if char in counts:\n counts[char] += 1\n else:\n counts[char] = 1\n return counts"} {"text": "[CS Wikipedia] Walter Bedell Smith\n\nGenerál Walter Bedell Smith (5. října 1895 Indianapolis – 9. srpna 1961 Washington, D.C.) byl americký voják, zpravodajský důstojník, diplomat a státní úředník. Působil jako náčelník štábu vrchního velitele západních Spojenců ve 2. světové válce Dwighta D. Eisenhowera, v období 1946–1948 byl velvyslancem USA v Sovětském svazu a v letech 1950 až 1953 ředitelem Ústřední zpravodajské služby USA. Život Již v 16 letech vstoupil do americké Národní gardy. V roce 1917 se stal důstojníkem a se 4. americkou divizí se zúčastnil 1. světové války, kterou ukončil na území Francie v hodnosti nadporučíka. Období mezi oběma světovými válkami strávil v různých štábních a zpravodajských armádních funkcích, také studoval na různých vojenských školách. Na počátku 2. světové války si jej v roce 1941 (tehdy v hodnosti majora) generál George Catlett Marshall vybral do funkce asistenta (tajemníka) náčelníka svého generálního štábu. V roce 1942 se stal státním sekretářem USA ve spojeném anglo-americkém výboru náčelníků štábů. Před invazí USA v Severní Africe v roce 1943 byl odeslán do Evropy, aby v Anglii působil jako náčelník štábu vrchního velitele Spojenců Dwighta D. Eisenhowera, kde úspěšně sloužil až do konce 2. světové války, kterou ukončil v hodnosti generálporučíka. Jakožto náčelník štábu vrchního velitele Spojeneckých sil se aktivně se podílel na přípravě dne „D“ a spojeneckého vylodění v Normandii. Po 2. světové válce od 3. dubna 1946 do 25. prosince 1948 působil jako velvyslanec USA v Sovětském svazu. Poté krátce velel 1. americké armádě (1949–1950). Od roku 1950 do roku 1954 byl ředitelem CIA, od 9. února, 1953 do 1. října, 1954 pracoval ve funkci podtajemníka na ministerstvu zahraničních věcí. Zemřel na srdeční infarkt dne 9. srpna 1961 ve vojenské nemocnici Walter Reed Army ve Washingtonu D. C. Pohřben byl na Arlingtonském národním hřbitově. Jeho žena Mary Eleanor Smith (1893–1963) je pohřbena společně s ním. Odkaz v kultuře Nejdelší den, hraný film o invazi do Normandie z roku 1962 Generál Patton, americký film z roku 1970 Generál Eisenhower: Velitel invaze, americký televizní film z roku 2004 Externí odkazy Arlington bio The Last Salute: Civil and Military Funeral, 1921-1969, CHAPTER XX, General Walter Bedell Smith, Special Full Honor Funeral, 9-14 August 1961 Papers and World War II Documents of Walter Bedell Smith, Dwight D. Eisenhower Presidential Library Američtí generálové Američtí velitelé druhé světové války Osobnosti operace Overlord Ředitelé CIA Velvyslanci USA Čestní rytíři-komandéři Řádu britského impéria Nositelé Řádu grunwaldského kříže 2. třídy Narození v Indianapolis Úmrtí ve Washingtonu, D.C. Zemřelí na infarkt myokardu Pohřbení na Arlingtonském národním hřbitově Narození v roce 1895 Úmrtí v roce 1961 Narození 5. října Úmrtí 9. srpna Muži…"} {"instruction": "Write a Python code snippet to calculate the area of a triangle with side lengths 3, 4, and 5.", "input": "", "output": "def area(a, b, c): s = (a + b + c) / 2 return (s*(s-a)*(s-b)*(s-c)) ** 0.5 print(area(3, 4, 5)) # 6.0"} {"instruction": "Write a code to create a sentence from a given list of words.", "input": "words = [\"Today\",\"I\",\"am\",\"happy\"]", "output": "def create_sentence(words): sentence = \"\" for word in words: sentence += word + \" \" return sentence.strip() if __name__ == \"__main__\": words = [\"Today\",\"I\",\"am\",\"happy\"] print(create_sentence(words)) Output: Today I am happy"} {"instruction": "Create a C# class that contains two private fields, one public method, and one property.", "input": "", "output": "public class myClass { private int myField1; private string myField2; public void myMethod() { Console.WriteLine(\"myMethod is called\"); } public int MyProperty { get { return myField1; } set { myField1 = value; } } }"} {"instruction": "Write a Python program to create a tic-tac-toe game.", "input": "", "output": "# define a function to draw the board\ndef draw_board(): \n \n print(\"\\n\") \n print(\" --- | --- | --- \")\n print(\" 7 | 8 | 9 \") \n print(\" --- | --- | --- \")\n print(\" 4 | 5 | 6 \") \n print(\" --- | --- | --- \")\n print(\" 1 | 2 | 3 \") \n print(\" --- | --- | --- \")\n \n# define a function to check if position is empty \ndef check_position(position, board): \n return board[position] == ' '\n \n# define a function to check if board is full and return boolean \ndef is_board_full(board): \n for i in range(1, 10): \n if check_position(i, board): \n return False\n return True"} {"instruction": "Organize the following array of objects in ascending order by the 'name' field.", "input": "[ { name: 'Jill', lastname: 'Smith' }, { name: 'Bob', lastname: 'Jones' }, { name: 'Jack', lastname: 'Bauer' } ]", "output": "let arr = [ { name: 'Jill', lastname: 'Smith' }, { name: 'Bob', lastname: 'Jones' }, { name: 'Jack', lastname: 'Bauer' } ]; arr.sort((a, b) => (a.name > b.name) ? 1 : -1); console.log(arr);"} {"text": "[CS Wikipedia] Jindřich IV. z Hradce\n\nJindřich IV. z Hradce (13. dubna 1442 – 17. ledna 1507) byl český šlechtic z rodu pánů z Hradce, který za Vladislava Jagellonského zastával funkce nejvyššího komorníka Českého království a nejvyššího pražského purkrabího. Život Byl synem Jana IV. z Hradce, zvaného Telecký, a Kateřiny ze Šternberka, dcery Jaroslava ze Šternberka a Veselí. Protože v roce 1453 Oldřich z jindřichohradecké větve rodu zemřel bez potomků a také Jan Telecký již byl po smrti, zdědili veškeré majetky pánů z Hradce Jindřich a jeho bratr Heřman (král Ladislav Pohrobek se zřekl práva odúmrti). Poručníkem nezletilých bratrů byl Arnošt z Leskovce; po jeho smrti došlo ke sporům s jeho dědici, které musel rozhodnout král Jiří z Poděbrad. Novým poručníkem se stal jejich strýc Zdeněk ze Šternberka, který prý (dle Jana z Rabštejna) více dbal svého obohacení než prospěchu sirotků. Jindřich se ujal správy rodového majetku po smrti bratra a dosažení zletilosti. Jeho politické postoje pravděpodobně ovlivňoval i poté Zdeněk ze Šternberka, s jehož dcerou Eliškou, tedy svou sestřenicí, se oženil. Jindřich patřil k zakládajícím členům zelenohorské jednoty, která se postavila proti králi Jiřímu z Poděbrad. V roce 1467 došlo právě na jeho Hradci k jednání obou znesvářených stran, dohody však nebylo dosaženo. V průběhu následných bojů pak byl Jindřichův Hradec obležen vojskem vedeným Jindřichem Minsterberským a Janem z Rožmberka, ale město se ubránilo. Spolu s ostatními katolickými pány jednoty podporoval Jindřich Matyáše Korvína a poté, co Matyáše jednotníci zvolili roku 1469 v Olomouci za českého (vzdoro)krále, byl Jindřich odměněn funkcí nejvyššího komorníka. Matyášovi zůstal věrný i po smrti Jiřího z Poděbrad a po nástupu Vladislava Jagellonského, teprve po roce 1479 se dal do služeb krále Vladislava. Působil jako hejtman kraje Bechyňského a Vltavského. Na Vladislavově dvoře dosáhl vysokých hodností, v roce 1484 byl jmenován nejvyšším komorníkem, v roce 1503 se stal nejvyšším purkrabím. Když po Matyášově smrti získal Vladislav i Uhry a sídlil v Budíně, byl Jindřich z Hradce jedním ze čtyř správců českého království. Věnoval se také přestavbě a rozšíření svého sídla v Jindřichově Hradci. V roce 1483 povýšil král Vladislav znak města o svůj monogram „W“ s korunkou, přestože šlo o poddanské město. O život přišel Jindřich nešťastnou náhodou na honu, když se při převrácení saní probodl oštěpem. Rodina Jindřich IV. z Hradce byl čtyřikrát ženatý. Po smrti Elišky ze Šternberka se oženil s Anežkou Tovačovskou z Cimburka a potom s Magdalenou z Gleichenu, obě však brzy zemřely a nedaly mu potomka. Jeho poslední manželkou se stala Anna z Minsterberka, dcera Hynka z Poděbrad. S ní měl dvě děti: 1. Adam I. z Hradce (14. květen 1494 – 15. červen 1531 Praha)[1] – nejvyšší kancléř Českého království ∞ (1515)…"} {"text": "[DE Wikipedia] Château d’Urville\n\nDas Château d’Urville (Schloss Urville) ist ein Schloss in der historischen Landschaft Lothringen. Bekannt ist es vor allem, weil es von 1890 bis 1918 Kaiser Wilhelm II. gehörte. Geographie Das Schloss liegt am linken Ufer der Nied auf dem Gebiet der Gemeinde Courcelles-Chaussy im Département Moselle. Geschichte Mittelalter bis 19. Jahrhundert Im 12. Jahrhundert gehörte der Ort zur Grafschaft Kriechingen und den Herren von Rollingen. Damals eine Burg, stellte die Anlage einen vorgeschobenen Posten an der Grenze von Lothringen dar. Aufgrund ihrer strategisch bedeutsamen Lage zu Metz wurde sie 1444 von einer Abteilung der französischen Armee überfallen, das damals Krieg gegen die Stadt Metz führte. Die Burg Urville wurde 1588 während des Durchzugs der katholischen Truppen von Henri I. de Guise zerstört. Aus der Zeit vor der Zerstörung sind heute nur noch zwei Zeugnisse erhalten: ein auf Arkaden gebauter Taubenschlag mit kleinen Schießscharten und eine Kaminplatte mit dem Wappen der Herren von Rollingen. Ende des 16. Jahrhunderts kaufte Nicolas Houillon, ein Bürger von Metz, die Anlage und baute sie als Schloss wieder auf. Bis 1680 blieb sie im Besitz der Familie, wurde dann an Esther Domangin, Witwe des Herrn von Vigy, verkauft. 1754 ging das Schloss an Guillaume Othon, einen ehemaligen Oberst der Kavallerie und Kammerherrn der Herzöge von Lothringen über. 1764 wechselte es erneut den Besitzer: François-Louis Durant, Major aus Metz, war der neue Eigentümer. Ihm folgte François-Louis-Benoit-Charles-Pantaléon Durand, Generalanwalt im Parlement von Metz und Bürgermeister. Er war es wahrscheinlich, der den großen Schlosspark anlegte, der seit 1926 unter Denkmalschutz steht. 1808 musste er das Schloss aufgrund wirtschaftlicher Not an General Jean-Baptiste Semellé, Baron des Kaiserreichs Frankreich, verkaufen, der dort am 25. Januar 1839 starb. 1813 diente das Schloss Prinz Wilhelm von Preußen als Hauptquartier. 1847 wurde es von Baron Louis Sers erheblich verändert. Er fügte den polygonalen Risalit auf der Rückseite und die Terrasse mit Balustrade auf der Vorderseite hinzu. Während des Deutsch-Französischen Kriegs war Napoleon III. nach den Kämpfen in Stiring entschlossen, die entscheidende Schlacht auf dem linken Ufer der Nied zu schlagen. Marschall Bazaine richtete sein Hauptquartier im Schloss Urville ein und empfing den Kaiser dort am 10. August 1870, während Pont-à-Chaussy in Verteidigungszustand versetzt wurde. Am 13. August 1870, nach dem Rückzug der französischen Armee auf Borny, zog die deutsche 1. Armee zur Nied vor und besetzte auch das Schloss. Im Vertrag von Frankfurt fiel Elsaß-Lothringen an das neu gegründete Deutsche Reich und damit auch Courcelles-Chaussy und das Schloss. Wilhelm II. 1876 kaufte Romain Sendret, ein Industrieller aus…"} {"instruction": "Write a function which takes a number and returns the Fibonacci sequence up to that number.", "input": "n = 10", "output": "def fibonacci(n): fib_list = [1] if n == 1: return fib_list else: fib_list.append(1) while len(fib_list) < n: fib_list.append(fib_list[-1] + fib_list[-2]) return fib_list"} {"instruction": "Modify the code to convert any temperature from Celsius to Fahrenheit", "input": "def CtoF(x): #TODO", "output": "def CtoF(x): F = (9/5 * x) + 32 return F"} {"instruction": "Write a web scraper in Python that can extract the text content from a block of HTML.", "input": "
    \n

    This is an example block of HTML

    \n
      \n
    • This is the first item
    • \n
    • This is the second item
    • \n
    \n
    ", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nhtml = '

    This is an example block of HTML

    • This is the first item
    • This is the second item
    '\n soup = BeautifulSoup(html, 'html.parser')\n\nfor item in soup.find_all('li'):\n print(item.text)\n\n# Output\n# This is the first item\n# This is the second item"} {"instruction": "Create a program in Python to find the maximum value in a given sequence.", "input": "[3, 4, 6, 2, 8, 9, 5]", "output": "def findMaxValue(arr):\n max_val = arr[0]\n\n for i in range(1, len(arr)):\n if arr[i] > max_val:\n max_val = arr[i]\n\n return max_val\n\narr = [3, 4, 6, 2, 8, 9, 5]\nmaxValue = findMaxValue(arr)\nprint('Max value in given array is: {}'.format(maxValue))"} {"instruction": "Generate a random sample of size 10 using numpy", "input": "", "output": "import numpy as np rand_sample = np.random.randint(low=0, high=100, size=10)"} {"instruction": "Create a JavaScript function that takes an array of numbers and returns the median value from the array.", "input": "", "output": "function getMedian(arr) { arr.sort(function (a, b) { return a - b; }); let mid = Math.floor(arr.length / 2); if (arr.length % 2 === 0) { return (arr[mid - 1] + arr[mid]) / 2; } else { return arr[mid]; } }"} {"instruction": "Construct a JavaScript object with three properties: name, age, and profession.", "input": "", "output": "const person = { name: 'John Doe', age: 36, profession: 'developer' };"} {"instruction": "Update the following HTML page so that it refreshes the page every 5 seconds.", "input": " My Webpage Hello World! ", "output": " My Webpage Hello World! "} {"text": "[CS Wikipedia] Terminologie\n\nTerminologie je nauka o termínech, tj. o odborných názvech, a o způsobu jejich vytváření a sestavování do systémů. Výraz terminologie se častěji používá pro označení konkrétních systémů termínů, česky označovaných též slovem názvosloví, případně odborné názvosloví. Rozdělení názvosloví Neodborné názvosloví, většinou běžná hovorová mluva. Odborné názvosloví pak může být dále děleno na názvosloví: oficiální (pokud možno zcela přesné) vymezené právními normami (například právní názvosloví) vymezené technickými normami (a jinými předpisy podobné normativní povahy) dané zvykem, tradicí či ústním podáním neoficiální, tedy většinou odborný slang. Speciální názvosloví Svou specifickou terminologii, respektive názvosloví mívají i mnohé někdy i úzce specializované lidské činnosti – má ho i činnost prováděná na Wikipedii, jež budiž tohoto tvrzení příkladem (viz termíny: rozcestník, článek, šablona, wikifizace, pahýl, seznam, zdrojování atd.) Časový vývoj názvosloví Názvosloví se během času přirozeně vyvíjí: společně se změnami v příslušném jazyce jako takovém, který je dán jeho přirozeným vývojem; s rozvojem vědy a techniky a s ním spojeného lidského poznání. Odkazy Literatura TRÁVNÍČEK, František. Slovník jazyka českého. 4., přeprac. a dopl. vyd. Slovanské nakl., 1952. [Katalogové číslo 301 12 2-51 624/50/III-67-1] DOSTÁL, J. Vzájemné vztahy mezi pojmy v technické výchově. Modernizace výuky v technicky orientovaných předmětech a oborech. Dodatky. 1. vyd. Olomouc: Votobia, 2003, s. 10–13. . DOSTÁL, J. Termín a jeho definice ve výkladových, terminologických a naučných slovnících a encyklopediích. In: Modernizace výuky v technicky orientovaných předmětech a oborech. Dodatky. 1. vyd. Olomouc: Votobia, 2003, s. 57. . Související články Eugen Wüster nomenklatura Carl Linné taxon slang jazyk (lingvistika) fylogenetika biologická klasifikace Externí odkazy Věda"} {"instruction": "Write an SQL query for finding all books with the title “The Great Gatsby”.", "input": "", "output": "SELECT * FROM BOOKS WHERE Title = 'The Great Gatsby'"} {"instruction": "Given an array of numbers, write a Python program to calculate the sum of the integers in the array.", "input": "[5, 2, 8, 4, 23]", "output": "def sum_integer(arr):\n \"\"\"\n Args :\n arr (list): List of integer\n \n Returns :\n int : Sum of integers\n \"\"\"\n \n res = 0\n \n for num in arr:\n res += num\n \n return res\n\nsum_integer([5, 2, 8, 4, 23])\n# output: 42"} {"instruction": "Create a JavaScript function for the linear search algorithm.", "input": "", "output": "// Linear search algorithm function linearSearch(array, item) { for (let i = 0; i < array.length; i++) { if (array[i] === item) { return i; } } return -1; } // Example Usage let array = [2, 3, 4, 5, 6, 7]; let item = 5; let index = linearSearch(array, item); // index should be 3"} {"instruction": "Create a SQL query to count all buyers from a country.", "input": "TableName: Customers Columns: CustomerID INT Name VARCHAR(40) Country VARCHAR(20) TableName: Purchases Columns: PurchaseID INT CustomerID INT", "output": "SELECT COUNT(*) FROM Customers c INNER JOIN Purchases p ON c.CustomerID = p.CustomerID WHERE c.Country = 'CountryName';"} {"instruction": "Write a Python script to convert a given temperature from Fahrenheit to Celsius.", "input": "", "output": "def fahrenheit_to_celsius(fahrenheit):\n return (fahrenheit - 32) * 5/9"} {"instruction": "Edit the following function to only accept lowercase parameters.", "input": "def greeting(name): print('Hello, ' + name + '!')", "output": "def greeting(name): name = name.lower() print('Hello, ' + name + '!')"} {"instruction": "Create two classes, Dog and Cat, that extend the Animal class.", "input": "class Animal: def __init__(self, name): self.name = name self.health = 100", "output": "class Animal: def __init__(self, name): self.name = name self.health = 100 class Dog(Animal): def bark(self): print(\"Woof!\") class Cat(Animal): def meow(self): print(\"Meow!\")"} {"instruction": "Generate all possible permutations of this list.", "input": "my_list = [1, 2, 3]", "output": "from itertools import permutations permutation_list = list(permutations(my_list)) print(permutation_list) # Output: [(1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)]"} {"text": "[DE Wikipedia] 9. Panzergrenadierbrigade\n\nDie 9. Panzergrenadierbrigade war eine Brigade des Österreichischen Bundesheeres und bestand aus Bataillonen verschiedener Waffengattungen in Niederösterreich. Die Brigade wurde im Zuge der Neuausrichtung des Bundesheeres 1998 aufgelöst. Geschichte Die 9. Panzergrenadierbrigade wurde am 1. August 1960 aufgestellt. Die Brigade ging aus der Panzertruppenschule hervor und war der erste mechanisierte Großverband des Bundesheeres. Die ersten Kampfpanzer waren russische Panzer vom Typ T-34, später folgten amerikanische Kampfpanzer der Typen M24, M47 (1960) und M60 (1964). Außerhalb der US-Armee war die 9. Brigade der erste Verband, der über den M60 Kampfpanzer verfügte. Am 1. Juli 1975 wurde die Brigade der 1. Panzergrenadierdivision unterstellt. Kurz vor der Auflösung der Brigade, wurde diese mit dem deutschen Leopard 2 ausgestattet. Zum 1. November 1998 wurde die Brigade aufgelöst und das Brigadekommando, zusammen mit dem Panzerstabsbataillon 9 und dem Kommando Auslandseinsätze in das Kommando für internationale Einsätze (KdoIE) umgewandelt. Einsätze (Auswahl) 1990 der Assistenzeinsatz an der Staatsgrenze im Burgenland 1991 Sicherungseinsatz an der österreichisch-jugoslawischen Grenze in der Steiermark Hochwassereinsatz im Juli 1997 Gliederung Die Brigade hatte zuletzt folgende Gliederung: 9. Panzergrenadierbrigade Panzerstabsbataillon 9 (Götzendorf) Panzerbataillon 33 (Zwölfaxing) Jagdpanzerbataillon 1 (Wiener Neustadt) Panzergrenadierbataillon 35 (Großmittel) Panzerartilleriebataillon 9 (Baden) Gliederung zur Gründung 1960 9. Panzergrenadierbrigade Panzerversorgungsbataillon 9 (Götzendorf) Panzerbataillon 33 (Götzendorf) Panzerbataillon 34 (Zwölfaxing) Panzergrenadierbataillon 35 (Großmittel) 3. Kompanie Panzerartillerieabteilung 9 (Kaisersteinbruch) Bewaffnung der 9. Panzergrenadierbrigade Die 9. Panzergrenadierbrigade verfügte im Laufe ihres Bestehens über folgende Panzerfahrzeuge: Kommandanten Oberst dG Emil Spannocchi 1960–1963 Oberst dG Nikolaus Chorinsky 1963–1967 Oberstleutnant dG Karl Liko 1967–1972 Oberst dG Dr. Johann Tretter 1972–1975 Oberst Karl Malina 1975–1976 (mit der Führung betraut) Oberst dG Hugo Kirsch 1976 Oberst dG Peter Koman 1976–1979 Oberst dG Heinz Danzmayer 1979–1983 Oberst dG Adolf-Erwin Felber 1983–1985 Oberst dG Hans Helmut Moser 1985–1989 Brigadier Alexander Trözmüller 1989–1991 (mit der Führung betraut) Oberst dG Wolfgang Jilke 1991–1996 Brigadier Josef Weingast 1996–1998 (mit der Führung betraut) Brigadier Wolfgang Jilke 1998–1998 Stabschefs ObstdG Heinz Scharff 1959–1960 ObstdG Wilhelm Kuntner 1960–1963 ObstdG Fritz Adrario 1963–1966 ObstdG Gerhard Donat 1966–1967 ObstdG Erich Eder 1967–1973 ObstltdG Karl Budik 1973–1978 ObstdG Wilhelm Figl 1978–1984 ObstltdG Freyo Abfalter 1984–1988 ObstltdG Helmut Meerkatz 1988–1994…"} {"instruction": "Create a function to search for a given element in a list and output its index.", "input": "list_numbers = [1, 2, 3, 4, 5]", "output": "def search_list(list_numbers, element): for i in range(len(list_numbers)): if list_numbers[i] == element: return i"} {"instruction": "Create a Java program to list out all prime numbers between 1 and n.", "input": "n = 20", "output": "public class AllPrimeNumbers { public static void main(String args[]) { int n = 20; System.out.print(\"All Prime Numbers between 1 and \" + n + \" are: \"); for (int i = 2; i <= n; i++) { boolean isPrime = true; for (int j = 2; j < i; j++) { if (i % j == 0) { isPrime = false; break; } } if (isPrime) { System.out.print(i + \" \"); } } } }"} {"instruction": "Construct a simple algorithm to check if a number is prime", "input": "11", "output": "def is_prime(n): # check if n is divisible by any number between 2 and n-1 for i in range (2, n): # if a number is divisible, then return False if (n % i == 0): return False # if n is only divisible by itself, return True return True if __name__ == '__main__': n = 11 if(is_prime(n)): print(n, \"is a prime number\") else: print(n, \"is not a prime number\")"} {"instruction": "Create a Python script that takes an array of integers and prints the number of positive,negative, and zero elements in the array.", "input": "[1, 0, -2, 3, 4, -6]", "output": "# Defining the function\ndef count_positive_negative_zero(arr):\n # Keeping track of the counts\n positive_count = 0\n negative_count = 0\n zero_count = 0\n\n # Iterating over the array of integers\n for number in arr:\n if number > 0:\n positive_count += 1\n elif number == 0:\n zero_count += 1\n elif number < 0:\n negative_count += 1\n\n # Printing the results\n print('Number of positive elements:', positive_count)\n print('Number of zero elements:', zero_count)\n print('Number of negative elements:', negative_count)\n\n# Testing the function\narr = [1, 0, -2, 3, 4, -6]\ncount_positive_negative_zero(arr)\n\n# Output\n# Number of positive elements: 3\n# Number of zero elements: 1\n# Number of negative elements: 2"} {"text": "[HI Wikipedia] होली\n\nहोली वसंत ऋतु में मनाया जाने वाला एक महत्वपूर्ण भारतीय और नेपाली लोगों का त्यौहार है। यह पर्व हिंदू पंचांग के अनुसार फाल्गुन मास की पूर्णिमा को मनाया जाता है। होली रंगों का तथा हँसी-खुशी का त्योहार है। यह भारत का एक प्रमुख और प्रसिद्ध त्योहार है, जो आज विश्वभर में मनाया जाने लगा है। रंगों का त्यौहार कहा जाने वाला यह पर्व पारंपरिक रूप से दो दिन मनाया जाता है। यह प्रमुखता से भारत तथा नेपाल में मनाया जाता है। यह त्यौहार कई अन्य देशों जिनमें अल्पसंख्यक हिन्दू लोग रहते हैं वहाँ भी धूम-धाम के साथ मनाया जाता है। पहले दिन को होलिका जलायी जाती है, जिसे होलिका दहन भी कहते हैं। दूसरे दिन, जिसे प्रमुखतः धुलेंडी व धुरड्डी, धुरखेल या धूलिवंदन इसके अन्य नाम हैं, लोग एक दूसरे पर रंग, अबीर-गुलाल इत्यादि फेंकते हैं, ढोल बजा कर होली के गीत गाये जाते हैं और घर-घर जा कर लोगों को रंग लगाया जाता है। ऐसा माना जाता है कि होली के दिन लोग पुरानी कटुता को भूल कर गले मिलते हैं और फिर से दोस्त बन जाते हैं। एक दूसरे को रंगने और गाने-बजाने का दौर दोपहर तक चलता है। इसके बाद स्नान कर के विश्राम करने के बाद नए कपड़े पहन कर शाम को लोग एक दूसरे के घर मिलने जाते हैं, गले मिलते हैं और मिठाइयाँ खिलाते हैं। राग-रंग का यह लोकप्रिय पर्व वसंत का संदेशवाहक भी है। राग अर्थात संगीत और रंग तो इसके प्रमुख अंग हैं ही पर इनको उत्कर्ष तक पहुँचाने वाली प्रकृति भी इस समय रंग-बिरंगे यौवन के साथ अपनी चरम अवस्था पर होती है। फाल्गुन माह में मनाए जाने के कारण इसे फाल्गुनी भी कहते हैं। होली का त्यौहार वसंत पंचमी से ही आरंभ हो जाता है। उसी दिन पहली बार गुलाल उड़ाया जाता है। इस दिन से फाग और धमार का गाना प्रारंभ हो जाता है। खेतों में सरसों खिल उठती है। बाग-बगीचों में फूलों की आकर्षक छटा छा जाती है। पेड़-पौधे, पशु-पक्षी और मनुष्य सब उल्लास से परिपूर्ण हो जाते हैं। खेतों में गेहूँ की बालियाँ इठलाने लगती हैं। बच्चे-बूढ़े सभी व्यक्ति सब कुछ संकोच और रूढ़ियाँ भूलकर ढोलक-झाँझ-मंजीरों की धुन के साथ नृत्य-संगीत व रंगों में डूब जाते हैं। चारों तरफ़ रंगों की फुहार फूट पड़ती है। गुझिया होली का प्रमुख पकवान है जो कि मावा (खोया) और मैदा से बनती है और मेवाओं से युक्त होती है इस दिन कांजी के बड़े खाने व खिलाने का भी रिवाज है। नए कपड़े पहन कर होली की शाम को लोग एक दूसरे के घर होली मिलने जाते है जहाँ उनका स्वागत गुझिया,नमकीन व ठंडाई से किया जाता है। होली के दिन आम्र मंजरी तथा चंदन को मिलाकर खाने का बड़ा माहात्म्य है। इतिहास होली भारत का अत्यंत प्राचीन पर्व है जो होली, होलिका या होलाका नाम से मनाया जाता था। वसंत की ऋतु में हर्षोल्लास के साथ मनाए जाने के कारण इसे वसंतोत्सव और काम-महोत्सव भी कहा गया है। इतिहासकारों का मानना है कि आर्यों में भी इस पर्व का प्रचलन था लेकिन अधिकतर यह पूर्वी भारत में ही मनाया जाता था। इस पर्व का वर्णन अनेक पुरातन धार्मिक पुस्तकों में मिलता है। इनमें प्रमुख हैं, जैमिनी के पूर्व मीमांसा-सूत्र और कथा गार्ह्य-सूत्र। नारद पुराण औऱ भविष्य पुराण जैसे पुराणों की प्राचीन हस्तलिपियों और ग्रंथों में भी इस पर्व का उल्लेख मिलता है। विंध्य क्षेत्र के रामगढ़ स्थान पर स्थित ईसा से ३०० वर्ष पुराने एक अभिलेख में भी…"} {"instruction": "Define a function in Python that takes a number as an argument and returns its cube.", "input": "", "output": "def cube(number): return number**3"} {"instruction": "Calculate the area of a circle using a Python program", "input": "radius = 7", "output": "import math\n\ndef areaOfCircle(radius):\n area = round(math.pi * (radius ** 2), 2)\n return area\n\narea = areaOfCircle(7)\nprint(area)"} {"instruction": "Build a Python program to compute the sum of the two given integers.", "input": "a = 10\nb = 20", "output": "def add_two_ints(a, b):\n return a + b"} {"instruction": "Generate a neural network model in Python to predict the outcome of a basketball match given the players' stats.", "input": "Player 1: \nHeight: 185cm; Weight: 80kg, Number of Points scored: 20\n\nPlayer 2:\nHeight: 202cm; Weight: 100kg, Number of Points scored: 30", "output": "model = Sequental()\n\nmodel.add(Dense(units=64, input_shape=(3,)))\nmodel.add(Activation('relu'))\nmodel.add(Dropout(.2))\nmodel.add(Dense(32))\nmodel.add(Activation('relu'))\nmodel.add(Dropout(.2))\nmodel.add(Dense(1))\nmodel.add(Activation('sigmoid'))\n\nmodel.compile(loss='binary_crossentropy',\n optimizer='Adam',\n metrics=['accuracy'])"} {"instruction": "Create a basic class in JavaScript that includes a constructor, a method for changing the greeting, and a method for saying the greeting.", "input": "", "output": "\"\"\" Basic class in JavaScript with a constructor, a method for changing the greeting and a method for saying the greeting \"\"\" class GreetingGenerator { constructor(greeting) { this.greeting = greeting } setGreeting(greeting) { this.greeting = greeting } sayGreeting() { console.log(this.greeting) } } const greet = new GreetingGenerator('Hello World!') greet.setGreeting('Good Morning!') greet.sayGreeting() // 'Good Morning!'"} {"instruction": "Develop a program to encrypt a text", "input": "", "output": "#include #include // Encode a string using Ceasar cipher string ceasar_encode(string s, int k) { // Declare a variable to store the encoded string string encoded_str = \"\"; // Loop through the string and encode each character for (int i=0; i Col1 Col2 One Alpha Two Beta Three Gamma "} {"instruction": "Write a python program to create a class called cube.", "input": "", "output": "class Cube: def __init__(self, length, width, height): self.length = length self.width = width self.height = height def calculate_volume(self): return self.length * self.width * self.height"} {"instruction": "Provide an example of a valid JSON object.", "input": "", "output": "{ \"name\": \"John Doe\", \"age\": 25, \"address\": { \"street\": \"123 Main Street\", \"city\": \"New York\", \"state\": \"NY\" }, \"hobbies\": [\"sports\", \"reading\", \"writing\"] }"} {"instruction": "How would you create a table in a database using SQL commands?", "input": "", "output": "To create a table in a database using SQL commands, you would use the following SQL statement: CREATE TABLE (column_name datatype);"} {"instruction": "Write a python program to complete this task.", "input": "Given two strings, find the length of the smallest substring that contains both of them.\n\nInput: \"abbcd\" and \"accde\"", "output": "def shortest_substring(s1, s2): \n \n s1_len = len(s1) \n s2_len = len(s2) \n\n res_str = \"\"\n res_len = s1_len + s2_len \n \n for i in range(s1_len): \n for j in range(s2_len): \n \n # Initializing starting and ending indexes \n # of current substring \n x = i \n y = j \n \n # Initializing substring \n tmp_str = \"\" \n \n # flag to keep track of the order in which two \n # characters have been found \n flag = 0\n \n while (x < s1_len and y < s2_len): \n if s1[x] != s2[y]: \n break\n \n # tmp_str stores the current substring \n if flag == 0: \n tmp_str += s1[x] \n else: \n tmp_str += s2[y]; \n \n x += 1\n y += 1\n \n flag = 1 - flag \n \n # Updating minimum length substring \n if (len(tmp_str) < res_len): \n res_len = len(tmp_str) \n res_str = tmp_str \n \n return res_str \n\nresult = shortest_substring(\"abbcd\", \"accde\")\nprint(result)"} {"instruction": "Create a C# function to edit the contents of a list.", "input": "", "output": "public void EditList(List list, string oldVal, string newVal) { for(int i = 0; i < list.Count; i++ ) { if (list[i] == oldVal){ list[i] = newVal; } } }"} {"instruction": "Write a Python function to convert a list of integers into a comma separated string.", "input": "int_list = [1, 4, 5, 6, 7]", "output": "def list_to_string(int_list):\n string = \"\"\n\n for i in int_list:\n string += str(i) + \",\"\n\n # Remove trailing comma\n string = string[:-1]\n\n return string\n\nint_list = [1, 4, 5, 6, 7] \nprint(list_to_string(int_list)) // \"1,4,5,6,7\""} {"instruction": "Create a SQL query to select the rows with column B equal to \"test\" and column C equal to \"example\"", "input": "", "output": "SELECT * FROM table WHERE B = 'test' AND C = 'example'"} {"instruction": "Syntax to declare an array in JavaScript.", "input": "", "output": "const arrayName = [];"} {"instruction": "Update the given array to replace all the zeroes with ones.", "input": "my_array = [1, 0, 2, 0, 3, 0]", "output": "my_array = [1, 1, 2, 1, 3, 1]"} {"text": "[EN Wikipedia] Atlantic Ocean\n\nThe Atlantic Ocean is the second-largest of the world's five oceans, with an area of about . It covers approximately 17% of Earth's surface and about 24% of its water surface area. It is known to separate the \"Old World\" of Africa, Europe, and Asia from the \"New World\" of the Americas in the European perception of the World. Through its separation of Europe, Africa, and Asia from the Americas, the Atlantic Ocean has played a central role in the development of human society, globalization, and the histories of many nations. While the Norse were the first known humans to cross the Atlantic, it was the expedition of Christopher Columbus in 1492 that proved to be the most consequential. Columbus' expedition ushered in an age of exploration and colonization of the Americas by European powers, most notably Portugal, Spain, France, and the United Kingdom. From the 16th to 19th centuries, the Atlantic Ocean was the center of both an eponymous slave trade and the Columbian exchange while occasionally hosting naval battles. Such naval battles, as well as growing trade from regional American powers like the United States and Brazil, both increased in degree during the early 20th century, and while no major military conflicts took place in the Atlantic in the present day, the ocean remains a core component of trade around the world. The Atlantic Ocean occupies an elongated, S-shaped basin extending longitudinally between Europe and Africa to the east, and the Americas to the west. As one component of the interconnected World Ocean, it is connected in the north to the Arctic Ocean, to the Pacific Ocean in the southwest, the Indian Ocean in the southeast, and the Southern Ocean in the south (other definitions describe the Atlantic as extending southward to Antarctica). The Atlantic Ocean is divided in two parts, the Northern and Southern Atlantic, by the Equator. Toponymy The oldest known mentions of an \"Atlantic\" sea come from Stesichorus around mid-sixth century BC (Sch. A. R. 1. 211): (Greek: ; English: 'the Atlantic sea'; etym. 'Sea of Atlas') and in The Histories of Herodotus around 450 BC (Hdt. 1.202.4): (Greek: ; English: 'Sea of Atlas' or 'the Atlantic sea') where the name refers to \"the sea beyond the pillars of Heracles\" which is said to be part of the sea that surrounds all land. In these uses, the name refers to Atlas, the Titan in Greek mythology, who supported the heavens and who later appeared as a frontispiece in medieval maps and also lent his name to modern atlases. On the other hand, to early Greek sailors and in ancient Greek mythological literature such as the Iliad and the Odyssey, this all-encompassing ocean was instead known as Oceanus, the gigantic river that encircled the world; in contrast to the enclosed seas well known to the Greeks:…"} {"text": "[CS Wikipedia] Paul Neergaard\n\nPierre Paul Ferdinand Mourier de Neergaard, , známější jako Paul Neergard (19. února 1907 – 13. listopadu 1987), byl dánský profesor agronomie, esperantista a redaktor.. Dílo Atakoj kontraü gardenplantoj, La vivo de I.A Plantoj, dílo bylo přeloženo do mnoha jazyků Terminaro hortikultura Scienco kaj pseüdoscienci pri heredo kaj rasoj Fremd-vortoj en esperanto Odkazy Externí odkazy Esperantská literatura Narození v roce 1907 Úmrtí v roce 1987 Úmrtí v Kodani Muži"} {"instruction": "Write C++ code to calculate the sum of the elements in an array.", "input": "", "output": "int sumArrayElements(int arr[], int n) { int sum = 0; for (int i = 0; i < n; i++) sum += arr[i]; return sum; }"} {"instruction": "Write an algorithm in Python that takes an input of positive integers and for each element in the list multiplies it by 2 if it is even and divide it by 3 if it is odd.", "input": "[2, 3, 4, 6, 8, 10]", "output": "def multiplyOddDivideEven(lst):\n new_list = []\n for element in lst:\n if element % 2 == 0:\n new_list.append(element / 3)\n else:\n new_list.append(element * 2)\n return new_list\n\nprint(multiplyOddDivideEven([2, 3, 4, 6, 8, 10])) # prints [1.0, 6, 2.0, 4.0, 4.0, 5.0]"} {"instruction": "Build a Python program that takes in two lists as an input and returns a third list with the common elements across the two inputs.", "input": "list1 = [2, 3, 4, 5, 6]\nlist2 = [3, 5, 7, 8, 9]", "output": "def common_elements(list1, list2):\n common_elements = []\n\n for element in list1: \n if element in list2:\n common_elements.append(element)\n return common_elements\n\nlist1 = [2, 3, 4, 5, 6]\nlist2 = [3, 5, 7, 8, 9]\n\nprint(common_elements(list1, list2))"} {"instruction": "Create an algorithm to convert temperatures from Celsius to Fahrenheit in Python.", "input": "", "output": "def celcius_to_fahrenheit(temp):\n return ((temp*9/5) + 32)\n\nprint(celcius_to_fahrenheit(20))"} {"instruction": "Create a function in Java to remove all the values equal to the given number from an array.", "input": "", "output": "public static int[] removeFromArray(int[] arr, int num){ int[] newArr = new int[arr.length]; int newIndex = 0; for(int i = 0; i < arr.length; i++){ if(arr[i] != num){ newArr[newIndex] = arr[i]; newIndex++; } } return Arrays.copyOfRange(newArr, 0, newIndex); }"} {"text": "[DE Wikipedia] Lauerzersee\n\nDer Lauerzersee befindet sich im Kanton Schwyz zwischen Vierwaldstättersee und Zugersee. Mit seiner maximalen Wassertiefe von 14 m gehört er zu den flachsten Seen der Schweiz. Geographie Eingebettet ist der Lauerzersee zwischen Steinerberg, Rigi und dem Kleinen und Grossen Mythen. Nahe dem Südufer liegen die beiden kleinen Inseln des Sees: Schwanau (5'728 m²) und Roggenburg (750 m²; unbewohnt). Im Sommer kann im See gebadet werden. Öffentliche Seebäder gibt es in Seewen, Lauerz und Steinen. Friert der See zu, bilden sich unter dem Eis häufig Faulgas-Blasen, die seit Jahrzehnten von der örtlichen Jugend durch Löcher im Eis abgefackelt werden. Geschichte Der Name des Sees stammt von der gleichnamigen Ortschaft Lauerz. Eine Flutwelle, die durch den Bergsturz von Goldau im Jahre 1806 ausgelöst wurde, zerstörte den gesamten westlichen Dorfkern. 457 Menschen kamen dabei ums Leben. Frühere Schreibweise: „Lowerzer See“. Abbildungen Siehe auch Liste der Seen im Kanton Schwyz Weblinks Zum Goldauer Bergsturz von 1806 Entwicklungskonzept Lauerzersee (EKL) Einzelnachweise See in Europa See im Kanton Schwyz Bundesinventar der Landschaften und Naturdenkmäler von nationaler Bedeutung SLauerzersee Lauerz Schwyz (Gemeinde) Steinen SZ"} {"instruction": "Write a python program to print a frequency table of the data in a two-dimensional array", "input": "data = [[6, 2, 8], [9, 5, 6], [4, 5, 2]]", "output": "def print_freq_table(data):\n row_count = len(data)\n col_count = len(data[0]) \n freq_table = [[0] * col_count for i in range(row_count)]\n\n for i in range(row_count):\n for j in range(col_count):\n freq_table[i][j] = data[i][j] * 100 / sum([data[k][j] for k in range(row_count)]) \n\n for i in range(row_count): \n for j in range(col_count): \n print('%d : %.2f' %(data[i][j], freq_table[i][j]))"} {"text": "[HI Wikipedia] करीमनगर\n\nकरीमनगर (Karimnagar) भारत के तेलंगाना राज्य के करीमनगर ज़िले में स्थित एक नगर है। यह ज़िले का मुख्यालय भी है। विवरण करीमनगर आंध्र प्रदेश राज्य में स्थित एक ऐतिहासिक स्थान और नगर भी है। यहाँ सातवाहन काल के लुहार की उपस्थिति के प्रमाण मिले है। सातवाहनो ने करीमनगर में लौह अयस्कों का उपयोग किया होगा, इसकी जानकारी यहाँ मिली महापाषाण काल के लोहे की खदानों से मिलती है। करीमनगर में ज़मीन के अन्दर बनी ढकी हुई नालियाँ भी मिलती हैं जिनसे गंदा पानी गड्ढ़ों में जाता था। इन्हें भी देखें करीमनगर ज़िला तेलंगाना सन्दर्भ करीमनगर ज़िला तेलंगाना के नगर करीमनगर ज़िले के नगर"} {"instruction": "What is the output of the following code? def check_even(num): if num % 2 == 0: return \"Even\" else: return \"Odd\" print(check_even(3))", "input": "", "output": "Odd"} {"text": "[HI Wikipedia] जमशेदपुर महिला महाविद्यालय\n\nजमशेदपुर महिला महाविद्यालय () जमशेदपुर का एक कालेज है। यह शहर के बिष्टुपुर क्षेत्र में गोपाल मैदान (जिसे पहले रीगल ग्राउंड के नाम से जाना जाता था), के पास स्थित है। यह महाविद्यालय रांची विश्वविद्यालय से संबद्ध है। प्रमुख विभाग विज्ञान नामांकन प्रक्रिया महाविधालय प्रशासन प्राचार्या श्रीमति श्रीलता मोहंती जमशेदपुर झारखंड शिक्षण संस्थान"} {"text": "[HI Wikipedia] आईडीई की सूची\n\nनीचे प्रमुख आईडीई पैकेजों की सूची दी गई है। ऐक्शनस्क्रिप्ट (ActionScript) अडा (Ada) बेसिक (Basic) सी/सी++ कॉमन लिस्प (Common Lisp) कम्पोनेन्ट पास्कल (Component Pascal) सी शार्प (C#) एफेल (Eiffel) फोर्ट्रान (Fortran) जावा जावास्क्रिप्ट Lua पास्कल, आब्जेक्ट पास्कल (Pascal, Object Pascal) पर्ल (Perl) पीएचपी (PHP) पाइथन (Python) रैकेट (Racket) रूबी (Ruby) स्केला (Scala) स्माल बेसिक स्मालटाल्क (Smalltalk) डब्ल्यूभाषा (WLanguage) अवर्गीकृत आईबीएम रेशनल अप्लिकेशन डेवलपर आईबीएम रेशनल बिजिनेस डेवलपर (IBM Rational Business Developer) इन्हें भी देखें एकीकृत विकास परिवेश सन्दर्भ सॉफ्टवेयर सूची आईडीई"} {"instruction": "Using the input, create a new list of strings where all strings in the new list have an uppercase first letter.", "input": "my_list = [\"hello\", \"world\", \"how\", \"are\", \"you?\"]", "output": "new_list = [] for string in my_list: new_list.append(string.capitalize()) print(new_list) # prints ['Hello', 'World', 'How', 'Are', 'You?']"} {"instruction": "Create an object-oriented structure to solve a maze by using python.", "input": "", "output": "import collections\n\nclass Maze:\n def __init__(self, n, m):\n self._n, self._m = n, m\n self._grid = [[None] * m for _ in range(n)]\n\n def solve_maze(self):\n result, found = [], False\n start, end = (0, 0), (self._n-1, self._m-1)\n\n for i in range(self._n):\n for j in range(self._m):\n if self._grid[i][j] == 1:\n value = 0\n self._find_omega(i, j, value, result, start, end,\n found)\n return result\n\n def _find_omega(self, i, j, value,\n result, start, end, found):\n rowNbr, colNbr = [-1, 0, 0, 1], [0, -1, 1, 0]\n\n if (i, j) == end:\n found = True\n result.append(value)\n return\n\n if found == True:\n return\n\n self._grid[i][j] = 0\n for k in range(4):\n if self._on_board(i + rowNbr[k], j + colNbr[k]):\n self._find_omega(i + rowNbr[k], j + colNbr[k],\n value + 1, result,\n start, end, found)\n\n def _on_board(self, i, j):\n return 0 <= i < self._n and 0 <= j < self._m and self._grid[i][j] == 1"} {"instruction": "Generate a code to calculate the mean absolute difference of items in a list in Python.", "input": "my_list = [1, 2, 3, 4, 5]", "output": "def mean_absolute_difference(my_list):\n diff = 0\n for i in range(len(my_list) - 1):\n diff += abs(my_list[i] - my_list[i + 1])\n return diff / (len(my_list) - 1)\n\nif __name__ == \"__main__\":\n print(mean_absolute_difference(my_list))"} {"instruction": "Create an AI agent in Python to play the game of Tic Tac Toe.", "input": "Not applicable", "output": "import random\n\n# Define the board\nboard = ['_', '_', '_', \n '_', '_', '_', \n '_', '_', '_']\n\n# Define the players\nplayer = 'X'\nai = 'O'\n\n# Define the rules of the game\ndef play_game():\n # Draw initial board\n draw_board(board)\n\n # Choose the player to start (randomly)\n choose_player()\n \n # Start playing the game\n game_state = 'Playing'\n while game_state == 'Playing':\n if player == 'X':\n # Ask the player to make a move\n make_move(player)\n # Check if anyone has won the game after the player's move\n game_state = check_game(board, player)\n # Change the player\n player = ai\n else:\n # Let the AI make a move\n make_move(ai)\n # Check if anyone has won the game after the AI's move\n game_state = check_game(board, ai)\n # Change the player\n player = 'X'\n \n\n# Draw the board\ndef draw_board(board):\n print(\"-----------------\")\n for i in range(3):\n print(\"| \", board[i*3], \" | \", board[i*3 + 1], \" | \", board[i*3 + 2], \" |\")\n print(\"-----------------\") \n\n# Choose the player to start (randomly)\ndef choose_player():\n global player\n random_num = random.randint(0,1)\n if random_num == 0:\n player = 'X'\n else:\n player = 'O'\n\n# Make a move\ndef make_move(player):\n legal_moves = [i for i, x in enumerate(board) if x == '_']\n move = -1\n\n # Player is human\n if player == 'X':\n while move not in legal_moves:\n move = int(input(\"Choose your move: (0-9)\"))\n \n # Player is AI\n else:\n move = random.choice(legal_moves)\n\n # Make the move\n board[move] = player\n\n# Check if anyone has won\ndef check_game(board, player):\n for row in range(3):\n if board[row*3] == board[row*3 + 1] and board[row*3 + 1] == board[row*3 + 2]:\n if board[row*3] == player:\n return 'Player ' + player + ' won the game!'\n\n for col in range(3):\n if board[col] == board[col + 3] and board[col + 3] == board[col + 6]:\n if board[col] == player:\n return 'Player ' + player + ' won the game!'\n\n if board[0] == board[4] and board[4] == board[8]:\n if board[0] == player:\n return 'Player ' + player + ' won the game!'\n\n if board[2] == board[4] and board[4] == board[6]:\n if board[2] == player:\n return 'Player ' + player + ' won the game!'\n\n # Check if all the squares are filled\n if board.count('_') == 0:\n return 'Draw!'\n\n return 'Playing'\n\n# Execute the game\nplay_game()"} {"instruction": "Create a list of 10 strings in Python and print each string in a separate line.", "input": "", "output": "mylist = ['string1', 'string2', 'string3', 'string4', 'string5', 'string6', 'string7', 'string8', 'string9', 'string10'] for item in mylist: print(item)"} {"instruction": "Write a Python script to print out the max and min values from the given list.", "input": "[2,10,18,24,36,95]", "output": "list = [2,10,18,24,36,95] max_value = max(list) min_value = min(list) print(\"Max value: \", max_value) print(\"Min value: \", min_value)"} {"instruction": "Create a Python web interface to facilitate text analysis of a given set of documents.", "input": "library used: NLTK", "output": "import nltk\nimport math\n\n# Load the given set of documents\ndocs = [...]\n\n# Tokenize documents\ntokens = [nltk.word_tokenize(doc) for doc in docs]\n\n# Create list of all tokens\nall_tokens = [token for doc in tokens for token in doc]\n\n# Calculate IDF (Inverse Document Frequency) for each token\nidf_scores = {token: math.log(len(docs) / len(all_tokens.count(token))) for token in all_tokens}\n\n# Create Web Interface\nfrom flask import Flask\nfrom flask import render_template\n\napp = Flask(__name__)\n\n@app.route('/')\ndef index():\n return render_template('index.html', len=len(docs), tokens=tokens, idf_scores=idf_scores)\n \nif __name__ == \"__main__\":\n app.run()"} {"instruction": "Write a Python program to create a join of two given strings being separated by a given separator.", "input": "First string: Apples \nSecond string: Oranges \nSeparator: and", "output": "a = \"Apples\"\nb = \"Oranges\"\n\n#joining the strings, using the separator\njoinedString = a +\" \"+ \"and\" +\" \"+ b\n\n# print the joined string\nprint(joinedString)"} {"instruction": "Write an HTML code to display a table of 3 columns and 5 rows.", "input": "", "output": "
    Column1 Column2 Column3
    Row1_data1 Row1_data2 Row1_data3
    Row2_data1 Row2_data2 Row2_data3
    Row3_data1 Row3_data2 Row3_data3
    Row4_data1 Row4_data2 Row4_data3
    Row5_data1 Row5_data2 Row5_data3
    "} {"instruction": "Find the area of a triangle using the Heron's formula", "input": "lengths = [3, 4, 5]", "output": "def herons_formula(lengths): a, b, c = lengths[0], lengths[1], lengths[2] s = (a + b + c) / 2 area = (s*(s-a)*(s-b)*(s-c))** 0.5 return area"} {"instruction": "Design a Fibonacci sequence calculator in Python.", "input": "Not applicable", "output": "def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n-1) + fibonacci(n-2)\n\n# Main Program\nn = int(input(\"Enter number of terms: \"))\n\nfor i in range(n):\n print(fibonacci(i), end=\" \")"} {"instruction": "Classify this code error as a runtime error or a compile error", "input": "def foo(x): if x > 0 print(\"x is positive\")", "output": "Compile error"} {"instruction": "Generate code to create a REST API in Python that parses JSON and returns the values of a nested object.", "input": "{\n \"data\": {\n \"name\": \"John Doe\",\n \"age\": 25\n }\n}", "output": "@app.route('/parseJSON', methods=['POST'])\ndef parse_json():\n data = request.get_json()\n name = data['data']['name']\n age = data['data']['age']\n\n response = {\n \"name\": name,\n \"age\": age\n }\n return jsonify(response)"} {"instruction": "Edit a program to show the area of the rectangle", "input": "#include int main() { int length, width; printf(\"Enter the length : \"); scanf(\"%d\", &length); printf(\"Enter the width : \"); scanf(\"%d\", &width); printf(\"The Perimeter of rectangle is : %d \\n\", 2*(length + width)); return 0; }", "output": "#include int main() { int length, width; printf(\"Enter the length : \"); scanf(\"%d\", &length); printf(\"Enter the width : \"); scanf(\"%d\", &width); printf(\"The Perimeter of rectangle is : %d \\n\", 2*(length + width)); printf(\"The Area of rectangle is : %d \\n\", length * width); return 0; }"} {"instruction": "Classify the given text as \"positive\" or \"negative\" using Natural Language Processing.", "input": "This movie is terrible.", "output": "negative"} {"text": "[HI Wikipedia] अकात्सुकी (अंतरिक्ष यान)\n\nअकात्सुकी (), एक जापानी मानवरहित अंतरिक्ष यान है, जिसका उद्देश्य शुक्र ग्रह का अन्वेषण था | इसे 20 मई 2010 को एक H-IIA 202 रॉकेट पर लादकर प्रमोचित किया गया था | सन्दर्भ अंतरिक्ष यान"} {"instruction": "Generate a random 8 digit string composed of numbers and letters in Python 3.", "input": "", "output": "import string import random #Generate 8 character random string def generate_random_string(stringLength=8): lettersAndDigits = string.ascii_letters + string.digits return ''.join(random.choice(lettersAndDigits) for i in range(stringLength)) #Driver code random_string = generate_random_string() print(f\"Random String Generator: {random_string}\")"} {"text": "[HI Wikipedia] हैफ़ीस्टस\n\nहैफ़ीस्टस (अंग्रेज़ी : :en:Hephaestus, यूनानी : हैफाइस्तोस ) प्राचीन यूनानी धर्म के प्रमुख देवताओं में से एक थे। वो अग्नि, लोहारो, धातुकी और कारख़ानों के देवता थे। प्राचीन रोमन धर्म में उनके समतुल्य देवता थे वुल्कन। यूनान के देवी-देवता यूनानी धर्म"} {"instruction": "Write an SQL query to find all the employees based in France.", "input": "", "output": "SELECT * FROM employees WHERE country = 'France';"} {"text": "[EN Wikipedia] Senior (album)\n\nSenior is the fourth studio album by Norwegian electronic music duo Röyksopp. It was released on 8 September 2010 by Wall of Sound. Consisting of instrumental tracks only, the album is described as more introspective and withdrawn than its predecessor, Junior (2009). The final track on the CD version, \"A Long, Long Way\", also includes the hidden track \"The Final Day\", which is available as a separate track on the iTunes Store. The album debuted at number 33 on the UK Albums Chart with first-week sales of 3,864 copies. Senior spawned two singles: \"The Drug\" and \"Forsaken Cowboy\". In December 2012, the album was awarded a silver certification from the Independent Music Companies Association (IMPALA), indicating sales in excess of 20,000 copies throughout Europe. Background Senior is intended to be an introspective, withdrawn, atmospheric counterpart to the \"bubbly dance grooves\" of Junior (2009), with Röyksopp stating it has a more \"autumn mood\" to it, in contrast to Juniors \"spring feel\". In an interview with KCRW's Morning Becomes Eclectic, Svein Berge dubbed Senior \"the senile sibling of Junior who lives in the attic\". Berge cited \"The Alcoholic\" as a standout track, explaining that they had \"this romantic, nostalgic idea based on this hobo who hitchhikes on trains and travels from place to place\". Promotion To promote Senior, Röyksopp released a 10-minute film titled Röyksopp's Adventures in Barbieland on 6 August 2010, containing six tracks from the album. Directed by Andreas Nilsson, the film shows Röyksopp living as two elderly musicians in a house full of Barbie dolls. \"The Drug\" was released as the album's lead single on 8 August 2010. The music video for the song, directed by Norwegian film duo That Go (Noel Paul and Stefan Moore), premiered on 3 September 2010. The video features three girls (Amanda Bauer, Jessie Vanatta and Jenna Lammert) in airbrushed T-shirts walking through an apocalyptic landscape in Detroit, Michigan. An extended, 10-minute cut of the video, redubbed \"Senior Living\", that uses six tracks from the album was released on 18 November 2010. The album's second single, \"Forsaken Cowboy\", was released on 25 February 2011. On 4 November 2010, Röyksopp partnered with Genero.tv to launch a competition allowing fans to create videos for each one of the tracks from Senior. The winners were announced on 27 January 2011, with a video for \"The Alcoholic\" being chosen as the overall winner. Track listing Personnel Credits adapted from the liner notes of Senior. Röyksopp – performance, recording, production, instruments ; bass Ole Vegard Skauge – bass Kato Ådland – guitar ; bass Davide Rossi – string arrangements, strings Lindy-Fay Hella – vocals Bjørn Sæther – drums Mike Marsh – mastering Charts Release history References 2010 albums…"} {"instruction": "Create a function in Python that takes a string as an argument and replace all vowels with underscores.", "input": "teststring", "output": "def replace_vowels(input_string):\n vowels = [\"a\", \"e\", \"i\", \"o\", \"u\", \"A\", \"E\", \"I\", \"O\", \"U\"]\n output_string = ''\n for s in input_string:\n if s in vowels:\n output_string += '_'\n else:\n output_string += s\n return output_string\n\nresult = replace_vowels('teststring')\nprint(result)"} {"instruction": "Optimize the following application in Python to reduce startup time.", "input": "import time\n\ndef func():\n start=time.time()\n i=0\n while(i<100000000):\n i+=1\n end=time.time()\n print(end-start)\n\nfunc()", "output": "import time\n\ndef func():\n start=time.time()\n # Optimized code using range instead of while loop\n lst = range(100000000)\n end=time.time()\n print(end-start)\n\nfunc()"} {"instruction": "Write a JavaScript function to determine if an array is sorted or not.", "input": "", "output": "function isSorted(arr) { for (let i=1; i Column 1 Column 2 Column 3 {Array.from(Array(10).keys()).map((x) => { return ( Data 1 Data 2 Data 3 ); })} ); } } export default Table;"} {"text": "[EN Wikipedia] Danguolė Brogienė\n\nDanguolė Brogienė (born 1959) is a Lithuanian textile designer, and Associate Professor of the Costume Design Department of Vilnius Academy of Arts, Lithuania. In 1982, she graduated from the Lithuanian Institute of Art (since 1990 Vilnius Academy of Fine Arts). She is on the jury of Habitus Baltija. She is the creator resolution texture tapestries, textile works of hybrid technology in space, Earth's theme (\"Land application\" I-III in 1982, \"Nepalikim land\" in 1987, \"Moon strain, 7, cafe\" weather vane \"in Vilnius, 1989 ). Since 1995, she joins the copyrighted silk, viscose thread technique (\"Hope\" Ministry of Internal Affairs, 1995, \"Letters of Light,\" \"Ornament\", both Lithuanian international carriers association Linava, 1996, \"Poems: Air, Water, Earth, Fire \"2001-2002). A typical fragmentary rhythm pattern, rich colors, optically variable image. Creator textile miniatures, jewelry. Since 1982, she participated in exhibitions in Lithuania and abroad, individual exhibitions: Detroit in 1993, Vilnius in 2002-2003, an international exhibition in 1999 Kanadzavoje Works, Lithuanian Museum of Art. See also List of Lithuanian painters References External links \"Danguolė Brogienė\" This article was initially translated from \"Danguolė Brogienė\", Lithuanian Wikipedia 1959 births Living people 20th-century Lithuanian women artists 21st-century Lithuanian women artists Artists from Vilnius Textile designers Lithuanian designers Lithuanian painters"} {"instruction": "Generate a Python program that creates a GUI window with two buttons: one to change the window background to red and the other to change the window background to green.", "input": "", "output": "#Import the necessary modules\nimport tkinter as tk\nfrom tkinter import *\n\n#Create the main window\nwindow = tk.Tk()\n\n#Create a window content\ndef change_background_to_red():\n window.configure(background='red')\ndef change_background_to_green():\n window.configure(background='green')\n \n#Creating the button\nred_btn = Button(text=\"Red\", command=change_background_to_red)\ngreen_btn = Button(text=\"Green\", command=change_background_to_green)\n\n#Adding the button to the window\nred_btn.pack()\ngreen_btn.pack()\n\n#Run the mainloop\nwindow.mainloop()"} {"instruction": "Write a Python program to translate a string into pig latin.", "input": "Hello", "output": "def toPigLatin(word):\n vowels = [\"a\",\"e\",\"i\",\"o\",\"u\"]\n first_letter = word[0]\n if first_letter in vowels:\n modified_word = word + \"way\"\n else:\n modified_word = word[1:] + first_letter + \"ay\"\n return modified_word\n\nresult = toPigLatin(\"Hello\")\nprint(result)"} {"text": "[EN Wikipedia] Brazilian coral snake\n\nThe Brazilian coral snake (Micrurus decoratus) is a species of coral snake in the family Elapidae. References Micrurus Snakes of South America Reptiles of Brazil Endemic fauna of Brazil Reptiles described in 1858 Taxa named by Giorgio Jan it is a very venomous snake"} {"instruction": "Read the following pseudocode and generate a Python program to complete the given task.", "input": "Given a list of numbers, print the numbers in reverse order", "output": "numbers = [1, 2, 3, 4, 5]\n \nnumbers.reverse()\n \nfor num in numbers:\n print(num)"} {"instruction": "Create an SQL query to find the id of the customer whose name is \"John Doe\".", "input": "", "output": "SELECT id FROM customers WHERE name = 'John Doe';"} {"text": "[HI Wikipedia] क्रूनुबैर्य लैन\n\nक्रूनुबैर्य लैन (स्वीडी: Kronobergs län, अंग्रेज़ी: Kronoberg) स्वीडन का एक लैन है। 'लैन' स्वीडन का उच्च-स्तरीय प्रशासनिक विभाग होता है, जिसे कभी-कभी 'काउंटी' भी कहते हैं। इन्हें भी देखें स्वीडन की काउंटियाँ सन्दर्भ क्रूनुबैर्य लैन स्वीडन की काउंटियाँ स्वीडन"} {"instruction": "Create a boolean expression in JavaScript, which returns false if a variable named \"result\" is an empty string.", "input": "var result = '';", "output": "if (result === '') { var result = false; }"} {"instruction": "Write a JavaScript code to add the numbers 8 and 4.", "input": "", "output": "var num1 = 8; var num2 = 4; var sum = num1 + num2; console.log(sum);"} {"instruction": "Change the HTML element to have a font size of 10px", "input": "

    Hello World!

    ", "output": "

    Hello World!

    "} {"instruction": "Write a function to construct a new string by appending the provided string to itself.", "input": "my_string = 'Hello'", "output": "def append_string(my_string): return my_string + my_string final_string = append_string(my_string) print(\"Final string:\", final_string)"} {"instruction": "Identify the variables and operators in the following Java code.", "input": "int a = 3 + 4; int b = a * 2;", "output": "Variables: a, b Operators: +, *"} {"instruction": "Process the following array of numbers to get the max, min, and average scores.", "input": "scores = [90, 75, 70, 85, 80]", "output": "const scores = [90, 75, 70, 85, 80]; let maxScore = Math.max(...scores); let minScore = Math.min(...scores); let avgScore = scores.reduce((a, b) => a + b, 0) / scores.length; console.log(`Max Score = ${maxScore}`); console.log(`Min Score = ${minScore}`); console.log(`Average Score = ${avgScore}`);"} {"instruction": "Implement a decision-making algorithm for a rock-paper-scissors game using Python.", "input": "", "output": "# Rock, paper, scissors game!\n\ndef play_game(player1, player2):\n # Define the winning rules\n rules = {'rock': 'scissors', 'scissors': 'paper', 'paper': 'rock'}\n if player1 == player2:\n return 'It is a draw!'\n elif rules[player1] == player2:\n return 'Player 1 wins!'\n elif rules[player2] == player1:\n return 'Player 2 wins!'\n\n# Get user input\nplayer1 = input('Player 1, make a choice: rock, paper, or scissors? ').lower()\nplayer2 = input('Player 2, make a choice: rock, paper, or scissors? ').lower()\n\n# Start the game and get the result\nresult = play_game(player1, player2)\nprint(result)"} {"text": "[HI Wikipedia] इस्माइल सामानी पर्वत\n\nइस्माइल सामानी (ताजिक भाषा: Қуллаи Исмоили Сомонӣ, क़ुल्लई इस्मोइलि सोमोनी; अंग्रेज़ी: Ismoil Somoni Peak) ताजिकिस्तान का सबसे ऊँचा पर्वत है। जब ताजिकिस्तान रूसी साम्राज्य और फिर सोवियत संघ का हिस्सा था, जब यह पर्वत उन देशों का भी सबसे ऊँचा पहाड़ हुआ करता था। यह पूरे मध्य एशिया और पूरी पामीर पर्वतमाला का भी सबसे बुलंद पर्वत है। इसका नाम सामानी राजवंश के पूर्वज इस्माइल सामानी पर रखा गया है। सोवियत संघ के ज़माने में १९३३ में इसका नाम पहले सोवियत तानाशाह जोसेफ़ स्टालिन के सम्मान में स्टालिन पर्वत और फिर, १९६२ में, साम्यवादी विचारधारा के सम्मान में कोम्युनिज़म पर्वत रख दिया गया। सोवियत संघ के टूटने और ताजिकिस्तान के आज़ाद होने के बाद १९९८ में इसका नाम परिवर्तित करके 'इस्माइल सामानी पर्वत' कर दिया गया। इन्हें भी देखें पामीर पर्वतमाला सन्दर्भ कूहिस्तोनी-बदख़्शान स्वशासित प्रान्त ताजिकिस्तान के पर्वत"} {"instruction": "Create a function in Python that prints the sentence \"Hello, World!\" n times.", "input": "", "output": "def print_hello_world(n): \n for i in range(n):\n print(\"Hello, World!\")\n\nprint_hello_world(3)\n# Output:\nHello, World!\nHello, World!\nHello, World!"} {"text": "[CS Wikipedia] Šíření tepla\n\nŠíření tepla (někdy též sdílení tepla) je jedním ze způsobů přenosu energie. Spočívá v tepelné výměně, což je termodynamický děj, při kterém dochází k výměně tepla mezi dvěma tělesy s různou teplotou. Tepelná výměna vždy probíhá tak, že teplejší těleso předává část své vnitřní energie chladnějšímu tělesu. Tepelná výměna se měří pomocí kalorimetru. V tepelných vodičích se děje výměna rychleji, v tepelných izolantech – za stejných podmínek – pomaleji. Způsoby šíření tepla Výměna tepla může probíhat vedením (kondukcí), sáláním (radiací) nebo prouděním (konvekcí). Tepelná energie se může šířit vedením a prouděním pouze v prostředí, které je vyplněno látkou. Příčinou šíření je neustálý pohyb částic hmoty. Vzájemným působením mezi jednotlivými částicemi (např. srážkami) dochází k předávání kinetické energie, a to tak dlouho, dokud nedojde k vyrovnání teploty. Sálání se svou povahou odlišuje od vedení a proudění, neboť tepelná energie se může přenášet i v prostoru, který není vyplněn látkou (tedy ve vakuu). Důvodem je skutečnost, že sálání představuje elektromagnetické záření, které ke svému přenosu hmotu nepotřebuje. Samovolným (tedy bez konání práce) šířením tepla se zabývá obor termiky zvaný termokinetika. Související články Teplo Termika Termodynamika První termodynamický zákon Tepelný výměník Parogenerátor Výměník tepla Externí odkazy Termika Termodynamika"} {"text": "[HI Wikipedia] ग़ज़ल\n\nयह अरबी साहित्य की प्रसिद्ध काव्य विधा है जो बाद में फ़ारसी, उर्दू, नेपाली और हिंदी साहित्य में भी बेहद लोकप्रिय हुइ। संगीत के क्षेत्र में इस विधा को गाने के लिए इरानी और भारतीय संगीत के मिश्रण से अलग शैली निर्मित हुई। शब्दार्थ अरबी भाषा के इस शब्द का अर्थ है औरतों से या औरतों के बारे में बातें करना। स्वरूप ग़ज़ल एक ही बहर और वज़न के अनुसार लिखे गए शेरों का समूह है। इसके पहले शेर को मतला कहते हैं। ग़ज़ल के अंतिम शेर को मक़्ता कहते हैं। मक़्ते में सामान्यतः शायर अपना नाम रखता है। आम तौर पर ग़ज़लों में शेरों की विषम संख्या होती है (जैसे तीन, पाँच, सात..)। एक ग़ज़ल में 5 से लेकर 25 तक शेर हो सकते हैं। ये शेर एक दूसरे से स्वतंत्र होते हैं। कभी-कभी एक से अधिक शेर मिलकर अर्थ देते हैं। ऐसे शेर कता बंद कहलाते हैं। ग़ज़ल के शेर में तुकांत शब्दों को क़ाफ़िया कहा जाता है और शेरों में दोहराए जाने वाले शब्दों को रदीफ़ कहा जाता है। शेर की पंक्ति को मिस्रा कहा जाता है। मतले के दोनों मिस्रों में काफ़िया आता है और बाद के शेरों की दूसरी पंक्ति में काफ़िया आता है। रदीफ़ हमेशा काफ़िये के बाद आता है। रदीफ़ और काफ़िया एक ही शब्द के भाग भी हो सकते हैं और बिना रदीफ़ का शेर भी हो सकता है जो काफ़िये पर समाप्त होता हो। ग़ज़ल के सबसे अच्छे शेर को शाहे बैत कहा जाता है। ग़ज़लों के ऐसे संग्रह को दीवान कहते हैं जिसमें हर हर्फ से कम से कम एक ग़ज़ल अवश्य हो। उर्दू का पहला दीवान शायर कुली कुतुबशाह है। ग़ज़ल के प्रकार तुकांतता के आधार पर ग़ज़लें दो प्रकार की होती हैं- मुअद्दस ग़जलें- जिन ग़ज़ल के अश'आरों में रदीफ़ और काफ़िया दोनों का ध्यान रखा जाता है। मुकफ़्फ़ा ग़ज़लें- जिन ग़ज़ल के अश'आरों में केवल काफ़िया का ध्यान रखा जाता है। भाव के आधार पर भी गज़लें दो प्रकार की होती हैं- मुसल्सल गज़लें- जिनमें शेर का भावार्थ एक दूसरे से आद्यंत जुड़ा रहता है। ग़ैर मुसल्सल गज़लें- जिनमें हरेक शेर का भाव स्वतंत्र होता है। इतिहास अरबी में ग़ज़लों का आरंभ अरबी साहित्य की काव्य विधा के रूप में हुआ। अरबी भाषा में कही गयी ग़ज़लें वास्तव में नाम के ही अनुरूप थी अर्थात उसमें औरतों से बातें या उसके बारे में बातें होती थी। फ़ारसी में अरबी से फारसी साहित्य में आकर यह विधा शिल्प के स्तर पर तो अपरिवर्तित रही किंतु कथ्य की दृष्टि से वे उनसे आगे निकल गई। उनमें बात तो दैहिक या भौतिक प्रेम की ही की गई किंतु उसके अर्थ विस्तार द्वारा दैहिक प्रेम को आध्यात्मिक प्रेम में बदल दिया गया। अरबी का इश्के मजाज़ी फारसी में इश्के हक़ीक़ी हो गया। फारसी ग़ज़ल में प्रेमी को सादिक (साधक) और प्रेमिका को माबूद (ब्रह्म) का दर्जा मिल गया। ग़ज़ल को यह रूप देने में सूफ़ी साधकों की निर्णायक भूमिका रही। सूफी साधना विरह प्रधान साधना है। इसलिए फ़ारसी ग़ज़लों में भी संयोग के बजाय वियोग पक्ष को ही प्रधानता मिली। उर्दू में फ़ारसी से उर्दू में आने पर भी ग़ज़ल का शिल्पगत रूप ज्यों का त्यों स्वीकार कर लिया गया लेकिन कथ्य भारतीय हो गया। लेकिन उत्तर भारत की आम अवधारणा के विपरीत हिन्दोस्तानी ग़ज़लों का जन्म बहमनी सल्तनत के समय दक्कन में हुआ जहाँ गीतों से प्रभावित ग़ज़लें लिखी गयीं। भाषा का नाम रेख़्ता (गिरा-पड़ा) पड़ा। वली दकनी, सिराज दाउद आदि इसी…"} {"instruction": "Using the given data point, train a linear regression model.", "input": "[4, 7], [2, 5], [3, 6]", "output": "import numpy as np X = np.array([[4,7], [2,5], [3,6]]) y = np.array([7, 5, 6]) from sklearn.linear_model import LinearRegression model = LinearRegression() model.fit(X, y)"} {"instruction": "Write a JavaScript program to find the maximum number from the given three numbers.", "input": "5, 10, 3", "output": "let num1 = 5; let num2 = 10; let num3 = 3; let maxNum = Math.max(num1, num2, num3); console.log(\"The maximum number of the three numbers given is \" + maxNum);"} {"instruction": "Design a Python function that generates a password string from random alphabets, numbers and special characters.", "input": "", "output": "import random\nimport string\n\ndef generate_password(length):\n ''' \n Generate a password string of specified length \n containing random alphabets, numbers and special characters. \n '''\n password = ''.join(random.choice(string.ascii_letters + string.digits + string.punctuation) for i in range(length))\n return password"} {"text": "[DE Wikipedia] Tetraeder-Puzzle\n\nEin Tetraeder-Puzzle ist ein Geduldsspiel und gehört zu den 3D-Puzzles. Abhängig von der Anzahl der zusammenzusetzenden Teile und deren räumlicher Struktur erfordert es ein hohes Maß an Geduld, bis die einzelnen Teile zum Ausgangstetraeder zusammengefügt sind. Spielregel und Lösungsstrategie Der Standardtyp des Tetraeder-Puzzles besteht aus nur zwei abgeschrägten dreiseitigen Prismen mit quadratischer Grundfläche, die in Form und Größe identisch sind und zu einer Pyramide zusammenzusetzen sind. Die Prismen bestehen aus je einem Quadrat, zwei gleichseitigen Dreiecken und zwei Trapezen mit den Seitenverhältnissen 1:1:1:2. Hierbei müssen die beiden Quadrate exakt aufeinander gesetzt werden und dürfen somit nicht Teil der Oberfläche sein. Weitere Tetraeder-Puzzletypen bestehen aus jeweils drei, vier oder fünf Puzzle-Teilen. Die Lösungsstrategie basiert jeweils auf der zuvor beschriebenen Vorgehensweise beim Standardtyp. Literatur Katrin Kanatschnig, Kristina Kiendler: Knobeltisch PDF-Dokument des regionalen Fachdidaktikzentrums Mathematik und Geometrie Graz, Seite 2, abgerufen am 27. April 2023 Siehe auch Pyraminx Weblinks Jürgen Köller (2007): Tetraeder-Puzzles aus mathematische-basteleien.de, abgerufen am 27. April 2023 Einzelnachweise Geduldsspiel"} {"instruction": "Format this list such that each element is in a new line.", "input": "list_of_numbers = [1,2, 3, 4, 5]", "output": "\"\"\" Format this list such that each element is in a new line \"\"\" list_of_numbers = [1,2, 3, 4, 5] # Format the list such that each element is in a new line for num in list_of_numbers: print(num)"} {"instruction": "Modify a given JavaScript code snippet to add a random background color to all elements with the class name 'box'.", "input": "document.querySelectorAll('.box').forEach(function(el) { el.style.backgroundColor = \"red\"; });", "output": "document.querySelectorAll('.box').forEach(function(el) { const randomHex = Math.floor(Math.random()*16777215).toString(16); el.style.backgroundColor = `#${randomHex}`; });"} {"text": "[HI Wikipedia] विश्वनाथ प्रताप सिंह\n\nविश्वनाथ प्रताप सिंह भारत गणराज्य के 10 ‌‌दसवे क्रम के (७वें व्यक्ति) प्रधानमंत्री थे और उत्तर प्रदेश के मुख्यमंत्री रह चुके है। उनका शासन एक साल से कम चला, २ दिसम्बर १९८९ से १० नवम्बर १९९० तक। विश्वनाथ प्रताप सिंह (जन्म- 25 जून 1931, डईया राजघराना, राजा माण्डा (कोरांव के निकट , माण्डा इलाहाबाद) उत्तर प्रदेश; मृत्यु- 27 नवम्बर 2008, दिल्ली)। विश्वनाथ प्रताप सिंह भारत के आठवें प्रधानमंत्री थे। राजीव गांधी सरकार के पतन के कारण प्रधानमंत्री बने विश्वनाथ प्रताप सिंह ने आम चुनाव के माध्यम से 2 दिसम्बर 1989 को यह पद प्राप्त किया था। सिंह प्रधान मंत्री के रूप में भारत की पिछड़ी जातियों में सुधार करने की कोशिश के लिए जाने जाते हैं। जन्म एवं परिवार विश्वनाथ प्रताप सिंह का जन्म 25 जून 1931 उत्तर प्रदेश के इलाहाबाद ज़िले में एक राजपूत ज़मीनदार परिवार में (मांडा संपत्ति पर शासन किया) हुआ था। इनका जन्म राजा डईया (जो कोरांव मे बेलन नदी के किनारे है ) के घर हुआ था। बाद में इन्हे मांडा के राजा राम गोपाल सिंह ने गोद लिया। इन्हें दो पुत्र रत्नों की प्राप्ति हुई। उन्होंने कोरांव,इलाहाबाद (उत्तर प्रदेश) में गोपाल इंटरमीडिएट कॉलेज की स्थापना की थी। विद्यार्थी जीवन विश्वनाथ प्रताप सिंह ने इलाहाबाद और पूना विश्वविद्यालय में अध्ययन किया था। वह 1947-1948 में उदय प्रताप कॉलेज, वाराणसी के विद्यार्थी यूनियन के अध्यक्ष रहे। विश्वनाथ प्रताप सिंह इलाहाबाद विश्वविद्यालय की स्टूडेंट यूनियन में उपाध्यक्ष भी थे। 1957 में उन्होंने भूदान आन्दोलन में सक्रिय भूमिका निभाई थी। सिंह ने अपनी ज़मीनें दान में दे दीं। इसके लिए पारिवारिक विवाद हुआ, जो कि न्यायालय भी जा पहुँचा था। वह इलाहाबाद की अखिल भारतीय कांग्रेस समिति के अधिशासी प्रकोष्ठ के सदस्य भी रहे। राजनीतिक जीवन विश्वनाथ प्रताप सिंह को अपने विद्यार्थी जीवन में ही राजनीति से दिलचस्पी हो गई थी। वह समृद्ध परिवार से थे, इस कारण युवाकाल की राजनीति में उन्हें सफलता प्राप्त हुई। उनका सम्बन्ध भारतीय कांग्रेस पार्टी के साथ हो गया। 1969-1971 में वह उत्तर प्रदेश विधानसभा में पहुँचे। उन्होंने उत्तर प्रदेश में मुख्यमंत्री का कार्यभार भी सम्भाला। उनका मुख्यमंत्री कार्यकाल 9 जून 1980 से 28 जून 1982 तक ही रहा। इसके पश्चात्त वह 29 जनवरी 1983 को केन्द्रीय वाणिज्य मंत्री बने। विश्वनाथ प्रताप सिंह राज्यसभा के भी सदस्य रहे। 31 दिसम्बर 1984 को वह भारत के वित्तमंत्री भी बने। भारतीय राजनीति के परिदृश्य में विश्वनाथ प्रताप सिंह उस समय वित्तमंत्री थे जब राजीव गांधी के साथ में उनका टकराव हुआ। विश्वनाथ प्रताप सिंह के पास यह सूचना थी कि कई भारतीयों द्वारा विदेशी बैंकों में अकूत धन जमा करवाया गया है। इस पर वी. पी. सिंह अर्थात् विश्वनाथ प्रताप सिंह ने अमेरिका की एक जासूस संस्था फ़ेयरफ़ैक्स की नियुक्ति कर दी ताकि ऐसे भारतीयों का पता लगाया जा सके। इसी बीच स्वीडन ने 16 अप्रैल 1987 को यह समाचार प्रसारित किया कि भारत के बोफोर्स कम्पनी की 410 तोपों का सौदा हुआ था, उसमें 60 करोड़ की राशि कमीशन के तौर पर दी गई थी। जब यह समाचार भारतीय मीडिया तक पहुँचा, यह 'समाचार' संसद में मुद्दा बन कर उभरा। इससे जनता को यह पता चला कि 60 करोड़ की दलाली में राजीव गांधी का हाथ था। बोफोर्स कांड…"} {"text": "[EN Wikipedia] WGLY-FM\n\nWGLY-FM (91.5 FM, \"The Light\") is a Christian radio station licensed to Bolton, Vermont, serving the Burlington, Vermont area. The station is owned by Christian Ministries, Inc. Programming The Light Radio Network's programming includes Christian Talk and Teaching and Christian music. Christian Talk and Teaching shows heard on The Light Radio network include; Mornings with Shawn, The Gail Robbins Show, Saturday's With Susan, The Brant Hansen Show, Turning Point with David Jeremiah, Truth for Life with Alistair Begg, Enjoying Everyday Life with Joyce Meyer, Insight For Living with Chuck Swindoll, Joni and Friends, Focus On The Family, and In The Market with Janet Parshall. The Light Radio Network also carries Air 1 programming on WGLY-FM HD2, and repeaters. Stations The Light Radio Network is also heard on five other full powered stations in Vermont, as well as four low powered translators. Translators History WGLY-FM began broadcasting in 1996, holding the call sign WCMK. The station's call sign was changed to WGLY-FM in 1999. WGLG was formerly WNGF, owned by Northeast Gospel Broadcasting; in August 2013, Christian Ministries reached a deal to acquire WNGF. Upon the deal's completion on April 15, 2014, WNGF's call letters were changed to WGLG. WFAD was formerly owned by Northeast Broadcasting; in December 2022, Christian Ministries agreed to acquire the station. Following the deal's completion in February 2023, WFAD was expected to switch from carrying Northeast's The Point network to The Light. References External links GLY-FM Radio stations established in 1996 1996 establishments in Vermont"} {"instruction": "FOr a given list, create a program that prints out the standard deviation of the elements in the list.", "input": "list = [1, 4, 9, 16]", "output": "def std_dev(list): \"\"\"Print the standard deviation of elements in a given list.\"\"\" numerator = 0 mean = sum(list) / len(list) for num in list: numerator += (num - mean) ** 2 sd = (numerator / (len(list) - 1)) ** 0.5 return sd"} {"instruction": "Add a 3x3 identity matrix to the following matrix.", "input": "[[1, 2, -3] [0, 1, 3] [-2, 0, 4]]", "output": "[[4, 2, -3], [0, 4, 3], [-2, 0, 7]]"} {"text": "[CS Wikipedia] Bartholomeus Breenbergh\n\nBartholomeus Breenbergh (před 13. listopadem 1598 - po 3. říjnu 1657) byl nizozemský malíř krajinář. V letech 1619 až 1630 působil v Římě, od roku 1630 do 1657 v Amsterdamu. Životopis O jeho počátcích toho není mnoho známo. Nizozemský malíř a životopisec Arnold Houbraken v prvním svazku svého třídílného De groote schouburgh der Nederlantsche konstschilders en schilderessen (Velké divadlo nizozemských malířů) prosil laskavé čtenáře, aby mu napsali další informace o životě tohoto malíře. Podle zpráv, které dostal se Breenbergh narodil v Utrechtu a byl mistrem u Cornelise van Poelenburgha. Houbraken usoudil, že podle informací, které již měl, to není možné, a to vzhledem k datům narození a úmrtí těchto malířů. Poelenburg se narodil v roce 1586 a Breenberg zemřel v roce 1660. Houbraken nikdy informace, o které čtenáře požádal, nedostal. I přesto Breenbergha znovu uvedl ve svém druhém svazku v seznamu 59 kvalifikovaných malířů, kteří byli současníky Abrahama Bloemaerta a Pauluse Pottera. Podle Nizozemského institutu pro historii umění (Netherlands Institute for Art History-RKD) se Breenbergh narodil v nizozemském městě Deventer, ale po smrti svého otce v roce 1607 se přestěhoval i se zbytkem rodiny, a to pravděpodobně do nizozemského města Hoorn. Tam byl současníkem Jacquesa Wabena a možná zde získal první malířské zkušenosti. Jeho prvním učitelem měl být jeden z mnoha zapomenutých amsterdamských malířů krajinářů z roku 1610. Jeho registrovaní učitelé jsou Pieter Lastman a Jacob Symonsz Pynas. První záznam o Breenberghovi jako malíři pochází z Amsterodamu, z archivních záznamů z roku 1619. Dá se předpokládat, že malíř zde pracoval již před tímto rokem. Ve stejném roce odešel Breenbergh do Říma. Tam žil a spolupracoval s vlámským malířem Fransem van de Kasteelem a byl silně ovlivněn jiným vlámským umělcem, krajinářem Paulem Brilem. Po roce 1623 jej však okouzlila italská krajina a byl ovlivněn prací Cornelise van Poelenburgha - mnohdy je těžké díla Breenbergha a van Poelenburgha rozlišit. Breenbergh byl také ovlivněn Nicolaesem Moeyaertem, on sám pak dále ovlivnil francouzského malíře Clauda Lorraina, který přišel do města kolem roku 1620. V roce 1620 se Breenbergh stal jedním ze zakladatelů spolku holandských a vlámských malířů, Bentvueghels, mezi nimiž byl přezdíván het fret (fretka). V roce 1630 se Breenbergh vrátil do Amsterdamu. V roce 1633 se oženil a získal roční plat 60 liber od dvora anglického krále Karla I. Stuarta. Zůstal v Amsterdamu až do své smrti. Vytvořil zde oblíbené obrazy a lepty italských staveb. Byl ovlivněn pre-Rembrandtisty jako Pieter Lastman a Nicolaes Moeyaert. Jejich mytologické a biblické scény přenesl do italské krajiny. Jeho jediným registrovaným žákem je Jan de Bisschop. Byl jeho žákem od roku 1640 až do roku 1648.…"} {"instruction": "Write a JavaScript program to replace a specific word in a string.", "input": "The given string is: \"Welcome to my website!\" To replace the word “website” with “blog”", "output": "var str = \"Welcome to my website!\"; var newStr = str.replace(\"website\", \"blog\"); console.log(newStr);"} {"instruction": "Write an SQL query to select the names of employees and their salaries from a table named 'employees', in ascending order of the salaries.", "input": "", "output": "SELECT name, salary FROM employees ORDER BY salary ASC;"} {"instruction": "Construct a program to print the Pyramid pattern using asterisks.", "input": "", "output": "\"\"\" Construct a program to print the Pyramid pattern using asterisks \"\"\" for i in range(0, 5): for j in range(0, i+1): print(\"*\", end=\"\") print()"} {"instruction": "Convert a given array of strings to an array of numbers.", "input": "Array: ['1', '2', '3']", "output": "nums = list(map(int, ['1', '2', '3']))"} {"instruction": "Create a new string that is the reverse of the original string.", "input": "my_string = \"Hello World!\"", "output": "new_string = \"!dlroW olleH\""} {"instruction": "Generate a regular expression to match words that contain only lowercase letters.", "input": "", "output": "^[a-z]+$"} {"instruction": "Edit the following code to check if the resulting output of the division is an integer.", "input": "a = 15 b = 4 output = a/b", "output": "if b != 0: output = a/b assert output.is_integer(), \"Result of division is not an integer\""} {"instruction": "Build a machine learning model in Python to predict whether a customer should be contacted or not.", "input": "The data given consists of the columns; age, salary, bank balance, purchased product and response.", "output": "import pandas as pd\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\n\n# Read the dataset\ndata = pd.read_csv('data.csv')\n\n# Separate the features and targets\nX = data.iloc[:, 0:4] # independent variables\ny = data.iloc[:, 4] # target variable\n\n# Create an instance of a linear regression model\nmodel = LinearRegression()\n\n# Fit model to training data\nmodel.fit(X, y)\n\n# Make predictions\npredictions = model.predict(X)\n\n# Determine whether a customer should be contacted or not\ncontacted = np.where(predictions > 0.5, \"Yes\", \"No\")\n\nprint(contacted)"} {"instruction": "Write an R program to print out the numbers from 0-50, in steps of 4.", "input": "", "output": "x <- seq(from = 0, to = 50, by = 4) print(x)"} {"instruction": "Write a function that prints Fibonacci numbers up to N (N>1).", "input": "", "output": "def Fibonacci(n): a = 0 b = 1 if n < 0: print(\"Incorrect input\") elif n == 0: return a elif n == 1: return b else: for i in range(2, n+1): c = a + b a = b b = c return b"} {"instruction": "Can you write a Python code that can sort dictionaries based on the values", "input": "", "output": "def sort_dict_by_values(dict):\n return sorted(dict.items(), key=lambda kv: kv[1])"} {"instruction": "Design a code for clustering data using Python and the K-means algorithm.", "input": "", "output": "import numpy as np\nfrom sklearn.cluster import KMeans\n\n# Load the data\ndata = np.loadtxt('data.txt')\n\n#Train Clustering Model\nkmeans = KMeans(n_clusters=3, random_state=0)\nkmeans.fit(data)\n\n#Make Predictions\nlabels = kmeans.predict(data)\n\n#Print the labels\nprint(labels)"} {"text": "[DE Wikipedia] Reimer von Essen\n\nReimer von Essen (* 31. Oktober 1940 in Hamburg) ist als Jazz-Klarinettist und -Bandleader bekannt durch die Frankfurter Barrelhouse Jazzband. Leben und Wirken Von Essen (Klarinette, Altsaxophon, Klavier, Arrangements, Komposition) verbrachte seine Schulzeit zunächst in Shanghai, später in Plön und ab 1949 in Frankfurt am Main. Erste Jazzkontakte bekam er durch Platten von Freunden und nahm daraufhin Klarinettenunterricht bei J. Englert (1954–1956) sowie in Jazztheorie bei Alfons M. Dauer. Nach dem Abitur 1958 studierte er Deutsch, Englisch und Musik und machte sein Examen 1966 in Frankfurt. Von 1966 bis 1991 unterrichtete er als Lehrer an der Albert-Schweitzer-Schule in Frankfurt, wo er auch zwei Schulopern komponierte, mit denen sein Einstieg in sein Leben als Berufsmusiker begann. 1957 kam es zu ersten Auftritte mit der Beale Street Seven. 1958 gründete er die Blue Washboard Five (eine Aufnahme auf einer Festival-LP). 1959 wechselte von Essen zur Smokehaus Jazzband und 1962 zur Barrelhouse Jazzband, deren Leiter er wurde. Mit der Barrelhouse Jazzband führten ihn Tourneen durch über 56 Länder der Erde (Stand 2011). Die Barrelhouse Jazzband nahm bisher über 30 LPs und CDs auf, von denen eine in New Orleans verlegt ist. Ab 1978 nahm von Essen mit Klaus Pehls Ragtime Society (2 LPs) auf und bei den Jazz Classics (2 LPs). 1982 war er Mitgründer des Art Hodes International Trio (1 LP, 2 CDs, Tapes), das seit dem Tod von Hodes 1992 als International Trio zunächst mit Ralph Sutton fortgeführt wurde (3 CDs) und nach dessen Tod mit Christian Azzi (3 CDs) und David Boeddinghaus (1 CD). Reimer von Essen nahm auch als Solist auf (3 LPs/CDs bei Stomp Off Records, einer amerikanischen Firma, und 7 CDs in Deutschland mit internationalen Besetzungen), als Leiter bei der The New Orleans Four Plus One (2 CDs) und mit dem Reimer von Essen Trio. Er ist Mitgründer der Original Union Brassband und der Big Band Memories. Diese Gruppen existieren seit Jahrzehnten und sind aktiv. In unterschiedlichen Besetzung nahm von Essen zwischen 1996 und 2002 alljährliche am seinerzeit wichtigsten Festival des traditionellen Jazz, dem JazzAscona teil, auch mit im Trio und mit den New Orleans Four. 2007 feierte er sein 50-jähriges persönliches Bühnenjubiläum und seine 50. LP/CD-Einspielung. Tom Lord zählt zwischen 1958 und 2016 149 Aufnahmen mit ihm. 1965 war von Essen Mitgründer der GFN und Mitveranstalter der Hot Jazz Festivals bis 1970. Gelegentlich lehrte er am Goethe-Institut und an der Sommer-Universität Alpbach. Er ist Autor und Mitautor von diversen Jazzpublikationen. Ab 1990 war er Vorstandsmitglied der Hessischen Jazzakademie bis zu deren Auflösung 2000, seit 1992 war er künstlerischer Leiter der Plöner Jazztage. 1995 bis 2001 war er Leiter des jährlichen Ascona Hot Jazz…"} {"instruction": "Parse an XML document using Python.", "input": "", "output": "import xml.etree.ElementTree as ET tree = ET.parse(\"file.xml\") root = tree.getroot() for child in root: print(f\"{child.tag}: {child.text}\")"} {"instruction": "Create a function in Python that takes an integer argument and returns True if the argument is an even number and False if it is an odd number.", "input": "", "output": "def even_odd(n):\n if n % 2 == 0:\n return True\n else:\n return False"} {"instruction": "Implement a simple machine learning algorithm in R to classify a given dataset.", "input": "", "output": "# Load the libraries library(caret) library(Metrics) # Create the training and testing sets split = createDataPartition(iris$Species, p = 0.75, list = FALSE) train_set = iris[split, ] test_set = iris[-split, ] # Train the model model = train(Species ~ ., data = train_set, method = \"rpart\") # Make Predictions on the test set predictions = predict(model, newdata = test_set) # Evaluate Model Performance confusionMatrix(predictions, test_set$Species)"} {"instruction": "Develop an algorithm in Python for sorting the following array in ascending order.", "input": "[9, 8, 11, 5]", "output": "def bubble_sort(arr):\n n = len(arr)\n for i in range(n):\n for j in range(0, n - i - 1):\n if arr[j] > arr[j + 1]:\n arr[j], arr[j + 1] = arr[j + 1], arr[j]\n\narray = [9, 8, 11, 5]\nbubble_sort(array)\nprint(array)"} {"instruction": "Create a basic web crawler in Python. The crawler should take a URL as input and return a list of all external links found on the page.", "input": "https://canvas.elte.hu/", "output": "import requests\nfrom bs4 import BeautifulSoup\n\n# make an HTTP request to the given URL\nr = requests.get(url)\n\n# parse the response\nsoup = BeautifulSoup(r.content, 'html.parser')\n\n# find all the links on the page\nlinks = soup.find_all('a')\nexternal_links = []\n\n# loop through the links and extract the external ones\nfor link in links:\n href = link.get('href')\n # check if the link is valid and external (not on the same page)\n if href and href.startswith('http'):\n external_links.append(href)\n\n# print the list of external links\nprint(external_links)"} {"instruction": "Convert the given Python code to Java.", "input": "def search(arr, x): \n n = len(arr) \n for i in range (0, n): \n if (arr[i] == x): \n return i; \n return -1;", "output": "public static int search(int[] arr, int x) { \n int n = arr.length; \n for (int i = 0; i < n; i++) { \n if (arr[i] == x) { \n return i; \n } \n } \n return -1; \n }"} {"instruction": "Write a function to find the average of given numbers using a list.", "input": "nums = [2, 4, 6, 8]", "output": "\"\"\" Write a function to find the average of given numbers using a list \"\"\" def find_average(nums): return sum(nums) / len(nums) if __name__ == '__main__': nums = [2, 4, 6, 8] print(find_average(nums))"} {"instruction": "This code attaches hooks to the return statements of functions in a module. To use it, import the immlib library and create an instance of the ReturnBP or ReturnLog class. Then, call the add method on the instance with the name of the hook and the address of the return statement as arguments. Finally, run the program to attach the hooks. The program will log the address of each hooked return statement.", "input": "", "output": "#!/usr/bin/env python\n\nimport immlib\nfrom immlib import LogBpHook, BpHook\n\n\nclass ReturnBP(BpHook):\n def __init__(self):\n BpHook.__init__(self)\n \n def run(self, regs):\n imm = immlib.Debugger()\n eip = regs[\"EIP\"]\n imm.log(\"bp, EIP is 0x%08X \" % eip)\n imm.addKnowledge(\"0x%08X\" % eip, eip)\n #self.UnHook()\n imm.deleteBreakpoint(eip, eip+4)\n imm.run()\n \nclass ReturnLog(LogBpHook):\n def __init__(self):\n LogBpHook.__init__(self)\n \n def run(self, regs):\n imm = immlib.Debugger()\n eip = regs[\"EIP\"]\n imm.log(\"log, EIP is 0x%08X \" % eip)\n imm.addKnowledge(\"0x%08X\" % eip, eip)\n self.UnHook()\n imm.deleteBreakpoint(eip, eip+4)\n\ndef main(args): \n imm = immlib.Debugger() \n module = imm.getModule(imm.getDebuggedName())\n imm.log(\"module %s at 0x%08X\" % (module.getName(), module.getBase()))\n use_log_bp = True\n\n if len(args) > 0 and args[0] == \"false\":\n imm.log(\"Using non logging bp\")\n use_log_bp = False\n \n \n # make sure module is analysed\n if not module.isAnalysed():\n module.Analyse()\n knowledge = imm.listKnowledge()\n hooked = 0\n not_hooked = 0\n \n for f in imm.getAllFunctions(module.getBase()): \n for ret in imm.getFunctionEnd(f):\n if \"0x%08X\" % ret not in knowledge:\n #imm.log(\"function 0x%08X ret at 0x%08X\" % (f, ret))\n if use_log_bp:\n hook = ReturnLog()\n hook.add(\"ReturnLog 0x%08X\"%f, ret) \n hooked +=1\n else:\n hook = ReturnBP()\n hook.add(\"ReturnBP 0x%08X\"%f, ret) \n hooked +=1\n \n # i think fasthook because fast hook is over writing rets, getFunctionEnd is having trouble\n #fast = immlib.FastLogHook(imm)\n #fast.logFunction(ret)\n #fast.logRegister(\"EIP\")\n #fast.Hook()\n else:\n not_hooked += 1\n \n \n imm.log(\"Hooked %i, skipped %i\" % (hooked, not_hooked)) \n return \"Found returns, attached hooks\""} {"instruction": "Edit this HTML code to add a link element in the head of the page.", "input": " Example page ", "output": " Example page "} {"text": "[CS Wikipedia] Alexandr Ioan Cuza\n\nAlexandr Jan Cuza (rumunsky: Alexandr Ioan Cuza) (20. březen 1820, Huși, Rumunsko – 15. květen 1873, Heidelberg, Německo) byl v letech 1859–1862 kníže Valašska a Moldávie a zároveň v letech 1859–1866 vládce resp. domnitor Spojených knížectví Valašska a Moldávie (od roku 1862 Spojené knížectví Rumunska). Historie Když se v roce 1859 stal zároveň valašským i moldavským knížetem, spojil svou osobou obě rumunská knížectví, a to i později jako Spojená knížectví Valašska a Moldávie, čímž byl položen základ budoucímu Rumunsku. V roce 1862 byl tento celek přejmenován na Spojená knížectví Rumunska. Alexander Ioan Cuza však neuspěl při realizaci své zemědělské reformy a také v systému vlády, v němž měl za vzor Napoleona III. Když byl (díky tomu) v roce 1866 domnitor Cuza svržen, byla nabídnuta rumunská knížecí koruna hohenzollernskému princi Karlu Eitelovi von Hohenzollern-Sigmaringen. Ten nabídku přijal a stal se v roce 1866 rumunským knížetem a v roce 1881 prvním rumunským králem. Dynastie Hohenzollern-Sigmaringen pak v Rumunsku vládla až do komunistického převratu v roce 1947. Rodina V roce 1844 se Alexandr oženil s moldavskou šlechtičnou Elenou Rosetti (1825–1909). Elena nemohla mít děti. V šedesátých letech měl Alexandr vztah s Marijou Catargiu-Obrenovičovou. Marija byla vdova po srbském knížeti Miloši Obrenovičovi a matka budoucího srbského krále Milana I. Obrenoviče. Alexandr měl s Marijou dva syny, Alexandra a Dimitrie, které Alexandrova manželka Elena vychovávala jako vlastní. Elena byla velkou filantropkou, starala se především o sirotky. Moldavsko a Valašsko I po vyhnání Turků ze Sedmihradska koncem 17. století zůstávala podunajská vévodství Moldavsko a Valašsko pod jejich nadvládou. Od počátku 18. století na jimi kontrolovaná území Turci dosazovali své vládce. Těmi byli tzv. fanarioné - bohatí Řekové, žijící v cařihradské čtvrti Fanaru. Jejich úkolem bylo hlavně násobit zisky plynoucí z Moldavska a Valašska do turecké pokladny. Od konce 18. století v oblasti stoupal vliv Ruska. Roku 1775 Moldavsko ztratilo Bukovinu ve prospěch rodu Habsburků. Roku 1812 získalo Rusko Besarábii, moldavské území východně od řeky Prut. Roku 1829 tzv. drinopolským mírem získalo Rusko v podunajských knížectvích velký vliv a ovlivňovalo i obsazování knížecích stolců. Carskými vojáky bylo potlačeno i revoluční povstání z roku 1848. Nadvláda Petrohradu v zemi byla ukončena po porážce Ruska v krymské válce (1853–1856). Ochrana obou států, Moldávie a Valašska byla poté svěřena evropským velmocím. Alexandru I. – sjednotitel Po svém otci pocházel Alexandru Ioan Cuza z moldavské bojarské rodiny. Jeho matka Sultana pocházela z bohaté fanarionské rodiny. Své vzdělání získal v kadetních školách v Postupimi a v Paříži. Jako účastník moldavské revoluce v roce 1848 byl zatčen. Uprchl…"} {"instruction": "Identify which language the following code snippet is written in.", "input": "#include using namespace std; int main() { cout << \"Hello, World\"; return 0; }", "output": "C++"} {"instruction": "Develop a Python module to generate random numbers.", "input": "", "output": "import random\n\ndef generate_random_numbers(length, min_value, max_value):\n return [random.uniform(min_value, max_value) for _ in range(length)]"} {"instruction": "Use CSS to style an HTML paragraph.", "input": "

    This is a sample paragraph.

    ", "output": "

    This is a sample paragraph.

    "} {"instruction": "Edit the code to create a class for a profile.", "input": "class Profile { }", "output": "class Profile { constructor(name, email, avatar_url) { this.name = name; this.email = email; this.avatar_url = avatar_url; } updateName(name) { // update the profile's name this.name = name; } updateEmail(email) { // update the profile's email address this.email = email; } updateAvatar(url) { // update the profile's avatar url this.avatar_url = url; } getName() { // return the profile's name return this.name; } getEmail() { // return the profile's email return this.email; } getAvatarUrl() { // return the profile's avatar url return this.avatar_url; } }"} {"text": "[DE Wikipedia] Erdumlaufbahn\n\nErdumlaufbahn kann bedeuten Umlaufbahn eines Satelliten um die Erde → Satellitenorbit Umlaufbahn der Erde um die Sonne → Erdbahn Siehe auch: Umlaufbahn"} {"instruction": "Compare and contrast HTTP and HTTPS.", "input": "", "output": "HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure) are both protocols used to transfer data over the internet. The main difference between them is that HTTPS is a secure connection, using encryption technology to protect and authenticate data exchanged over the connection. HTTP on the other hand is a plain text protocol and does not provide secure communication. Thus, HTTPS is much more secure and is preferred when sending and receiving sensitive data such as passwords and credit card information."} {"text": "[CS Wikipedia] Gossip\n\nGossip (původně The Gossip) bylo trojčlenné americké indie rock seskupení, založené Beth Dittovou, kytaristou Bracem Painem a hráčkou na bicí Hannah Blilieovou. Kapela pochází ze státu Arkansas a většinou hrála po hudebních klubech. V roce 2016 ohlásila Beth Dittová rozpad skupiny. Obsazení Beth Ditto – zpěvačka, piano (1999–2016) Brace Paine – elektrická kytara, baskytara (1999–2016) Hannah Blilie – bicí (2004–2016) Kathy Mendonça – bicí (1999–2003) Diskografie Alba That's Not What I Heard (2001) Movement (2003) Standing in the Way of Control (2006) Music for Men (2009) A Joyful Noise (2012) Hlavní singly Standing in the Way of Control (2005 Le Tigre Remix) UK #64 Listen Up! (2006) Standing in the Way of Control (2006) UK #13 Standing in the Way of Control (2007) UK #7 Listen-Up (Re-Release 2007) UK #39 Jealous Girls (2007) UK #89, UK Indie #3 Heavy Cross (2009) Love Long Distance (2009) Pop Goes the World (2010) Move In The Right Direction (2012) Odkazy Reference Externí odkazy Ženské hudební skupiny Hudební skupiny založené v roce 1999 Hudební skupiny zaniklé v roce 2016 LGBT hudebníci Americké indie rockové skupiny"} {"instruction": "Create a function that checks if a string contains all the vowels.", "input": "", "output": "def check_if_string_contains_all_vowels(string): vowels = ['a', 'e', 'i', 'o', 'u'] str_vowels = [ltr for ltr in string.lower() if ltr in vowels] return len(str_vowels) == len(vowels)"} {"instruction": "Create a program to print out all prime numbers below 100.", "input": "", "output": "# Function to print prime numbers def prime_numbers_below_100(): for num in range(2, 100): prime = True for i in range(2, num//2 + 1): if num % i == 0: prime = False break if prime: print(num, end=\" \") print(\"Prime numbers below 100 are:\") prime_numbers_below_100()"} {"text": "[EN Wikipedia] SSBN Degree College\n\nSri Sai Baba National Degree College is an autonomous degree college located in Anantapur, Andhra Pradesh, India. It is a Government Aided College also known as Sai Baba College.The College, named after Sri Shiridi Sai Baba, was established in October 1981 under the aegis of the Anantapur District National Education (ADNE) Trust, Anantapur founded by late Sri Sirivaram Adinarayana Rao in the year 1942. History This co-educational Institution was inaugurated by Sri Bhavanam Venkatarami Reddy, the then honourable Minister for Education, Government of A.P. In October 1981, this Institution was started under able stewardship of the Late Dr. B.Purnachandra Rao as the Special Officer and the Late Sri P.Konappa Sastry, an advocate, as the Correspondent. S.V. University, Tirupati granted affiliation at the first instance for six years and approved the Courses offered in the Institution. To start with, there were 500 Students, limited Staff, and a few Courses spread over the different faculties of History, Economics, Commerce, Political science, Botany, Zoology, Physics, Chemistry and Mathematics. Under the leadership of the Correspondent and the Special Officer, the first All Association Day was celebrated in February 1983. In keeping with the motto of service to society, the first NSS unit was also started during this period and the Late Dr. G.L.N. Murthy, Reader in Commerce, was the first Programme Officer. In the year 1984, Dr. K.V.S. Prasad assumed the office of Principal-in-Charge and the Late Sri K.S.Jayaram was the pro tem Correspondent. Dr. K.V.S. Prasad was elevated to the position of Principal in 1992. Sri P.L.N. Reddy, who was, an experienced Correspondent for both the High School and Junior College for two decades, took of the charge from Sri K.S.Jayaram as the Correspondent of the Degree College in the year 1985. Dr. K.V.S. Prasad, the first Principal of the Institution, served over a long period of two decades. There was a rapid expansion of buildings year by year with required infrastructure and increase in the intake of the students. Introduction of self-financing Courses and multidisciplinary Courses in B.Sc. (Microbiology, Biochemistry, Electronics and Computer Sciences) and B.Com. (Computer Applications) are the order of the day. IGNOU Study Centre was started in 1988 with strength of 50. It provides opportunities for employees to acquire higher academic qualifications. The Study Centre has grown by leaps and bonds since then. Many Students are pursuing different Undergraduate and Postgraduate Courses and Diploma and Certificate Courses at SSBN College Study Centre through IGNOU. Sri Venkateswara University, Tirupati, granted the College permanent affiliation in the year 1987. Later, in the year 1988, the affiliation of the College was…"} {"instruction": "Design and write a Python program to search a particular website for links that contain a certain keyword.", "input": "Not applicable", "output": "from urllib.request import urlopen\nfrom bs4 import BeautifulSoup\n\n# URL to search for (keyword included)\nurl = 'http://example.com/search?query=keyword'\n\n# Parse HTML and save to BeautifulSoup object\nhtml = urlopen(url)\nbs = BeautifulSoup(html.read(), 'html.parser')\n\n# Save all links found in the HTML document\nlinks = bs.find_all('a')\n\n# Iterate over the links and print out the link URLs\nfor link in links:\n print(link.get('href'))"} {"text": "[DE Wikipedia] Vermutung von Feit-Thompson\n\nDie Vermutung von Feit-Thompson ist eine zahlentheoretische Vermutung, die den Beweis des Satzes von Feit-Thompson und damit der Klassifikation der endlichen einfachen Gruppen erheblich vereinfachen würde. Die Vermutung besagt, dass es keine Primzahlen und mit gibt, für die durch teilbar ist. Eine ursprüngliche, stärkere Version der Vermutung besagte, dass und für je zwei Primzahlen und mit teilerfremd sind. Diese stärkere Version ist jedoch falsch, das einfachste Gegenbeispiel ist . Literatur Feit, Walter; Thompson, John G. (1962), \"A solvability criterion for finite groups and some consequences\", Proc. Natl. Acad. Sci. U.S.A., 48 (6): 968–970 Feit, Walter; Thompson, John G. (1963), \"Solvability of groups of odd order\", Pacific J. Math., 13: 775–1029 Weblinks Feit-Thompson Conjecture (MathWorld) Einzelnachweise Feit-Thompson, Vermutung von Zahlentheorie"} {"instruction": "Can you write a code snippet in Python that replaces all occurrences of a specific character in a string?", "input": "string = \"Hello World\"\ncharacter = \"o\"", "output": "def replace_all_occurrences(string, character): \n return string.replace(character, \"\")"} {"instruction": "Create a function to iterate a list of strings and print them.", "input": "", "output": "def iterate_strings(string_list): for string in string_list: print(string) if __name__ == '__main__': string_list = [\"apple\", \"banana\", \"cherry\"] iterate_strings(string_list)"} {"instruction": "Create an end-to-end machine learning system in Python by using a deep neural network to solve a multi-class classification problem.", "input": "Not applicable", "output": "# Importing Libraries\nimport numpy as np\nfrom keras.models import Sequential\nfrom keras.layers import Dense\n\n# Defining Input and Output\nx = np.array([[1, 3], [1, 4], [2, 4], [3, 1], [4, 1], [4, 2]])\ny = np.array([[1], [1], [2], [3], [3], [2]])\n\n# Defining and Compiling the Model\nmodel = Sequential()\nmodel.add(Dense(4, input_dim=2, activation='relu'))\nmodel.add(Dense(1, activation='sigmoid'))\nmodel.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])\n\n# Training the Model\nmodel.fit(x, y, epochs=100, batch_size=5)\n\n# Testing the Model\ntest_x = np.array([[5, 2], [4, 3]])\nresults = model.predict(test_x)\nprint(\"Classes predicted: \", np.round(results))"} {"text": "[HI Wikipedia] सर्वभारतीय तृणमूल कांग्रेस\n\nतृणमूल कांग्रेस (बंगाली: সর্বভারতীয় তৃণমূল কংগ্রেস) मुख्यतः पश्चिम बंगाल में सक्रिय एक भारतीय राजनैतिक दल है। इस दल का जन्म भारतीय राष्ट्रीय कांग्रेस से विघटन होकर हुआ। इस दल की नेता ममता बनर्जी है। सर्वभारतीय तृणमूल कांग्रेस (संक्षेप में एआईटीसी, टीएमसी या तृणमूल कांग्रेस) पश्चिम बंगाल में स्थित एक भारतीय राजनैतिक दल है। 1 जनवरी 1998 को स्थापित, पार्टी का नेतृत्व इसके संस्थापक और पश्चिम बंगाल के मौजूदा मुख्यमन्त्री ममता बनर्जी ने किया। 2009 के आम चुनाव से पहले यह 19 सीटों के साथ लोकसभा में छठी सबसे बड़ी पार्टी थी; 2019 के आम चुनाव के बाद, वर्तमान में यह लोकसभा में चौथी सबसे बड़ी पार्टी है जिसमें 22 सीटें हैं। यह दल तृणमूल का प्रकाशन करता है। इस दल का युवा संगठन तृणमूल यूथ कांग्रेस है। इतिहास 26 वर्षों से भारतीय राष्ट्रीय कांग्रेस के सदस्य होने के बाद, ममता बनर्जी ने बंगाल की अपनी पार्टी बनाई, तृणमूल कांग्रेस, जो दिसम्बर 1999 के मध्य के दौरान भारत के निर्वाचन आयोग के साथ पंजीकृत थी। चुनाव आयोग को आवण्टित किया गया पार्टी जोरा घास फुल का एक विशेष प्रतीक है। 2 सितम्बर 2016 को चुनाव आयोग ने एआईटीसी को राष्ट्रीय राजनीतिक दल के रूप में मान्यता दी। नन्दीग्राम आन्दोलन दिसम्बर 2006 में, नन्दीग्राम के लोगों को हल्दिया विकास प्राधिकरण ने नोटिस दिया था कि नन्दीग्राम का बड़ा हिस्सा जब्त कर लिया जाएगा और 70,000 लोगों को उनके घरों से निकाल दिया जाएगा। लोगों ने इस भूमि अधिग्रहण के विरुद्ध आन्दोलन शुरू किया और तृणमूल कांग्रेस ने आन्दोलन का नेतृत्व किया। भूमि उछाल और बेदखल के खिलाफ भूमि उचचेड प्रतिरोध समिति (बीयूपीसी) का गठन किया गया था। 14 मार्च 2007 को पुलिस ने फायरिंग खोला और 14 ग्रामीणों की हत्या कर दी। बहुत से गायब हो गए। कई सूत्रों ने दावा किया कि सीबीआई ने अपनी रिपोर्ट में समर्थन दिया था, जिसमें सशस्त्र सीपीएम कार्यकर्ताओं ने पुलिस के साथ नन्दीग्राम में प्रदर्शनकारियों पर गोलीबारी की थी। सड़कों पर बड़ी संख्या में बुद्धिजीवियों ने विरोध किया और इस घटना ने एक नए आन्दोलन को जन्म दिया। एसयूसीआई (सी) नेता नन्दा पत्र (तमलुक के एक स्कूल शिक्षक) ने आन्दोलन का नेतृत्व किया। 2009 के लोकसभा चुनाव में, तृणमूल कांग्रेस ने पश्चिम बंगाल में 19 सीटें जीतीं। 2010 कोलकाता नगरपालिका चुनाव में, पार्टी ने 141 सीटों में से 97 सीटें जीतीं। यह अन्य नगर पालिकाओं के बहुमत भी जीता। त्रिपुरा में तृणमूल विपक्ष के पूर्व नेता और फिर त्रिपुरा के विधायक सुदीप रॉय बरमान के नेतृत्व में, कई पूर्व मन्त्रियों, विधायी विधानसभा के पूर्व सदस्यों, वरिष्ठ राज्य और जिला नेताओं के साथ-साथ हजारों पार्टी कार्यकर्ताओं और समर्थकों के साथ मिलकर 6 विधायकों को शामिल किया गया। त्रिपुरा में कम्युनिस्टों से लड़ने के लिए एआईटीसी त्रिपुरा प्रदेश त्रिपुरा कांग्रेस त्रिपुरा में मा मती मनुश सरकार की स्थापना के लिए त्रिपुरा में काम कर रही है। लेकिन हाल ही में, वरिष्ठ राज्य के नेताओं और पार्टी के केंद्रीय नेताओं दोनों के नेतृत्व में अक्षमता और लापरवाही के कारण, त्रिनुम त्रिपुरा में राजनीतिक अपरिहार्यता की ओर तेजी से आ रहा है। हर रोज सैकड़ों और हजारों पार्टी कार्यकर्ता और नेता पार्टी छोड़ रहे हैं, अधिकतर भारतीय जनता…"} {"instruction": "Create a CNN classifier in Python using Keras that can classify the MNIST dataset.", "input": "Not applicable", "output": "import keras \nfrom keras.datasets import mnist\nfrom keras.models import Sequential \nfrom keras.layers import Dense, Dropout, Flatten \nfrom keras.layers import Conv2D, MaxPooling2D \nfrom keras import backend as K\n\n# Set image dimensions\nimg_rows, img_cols = 28, 28\n\n# Load data\n(X_train, y_train), (X_test, y_test) = mnist.load_data()\n\n# Reshape data\nif K.image_data_format() == 'channels_first':\n X_train = X_train.reshape(X_train.shape[0], 1, img_rows, img_cols)\n X_test = X_test.reshape(X_test.shape[0], 1, img_rows, img_cols)\n inpx_shape = (1, img_rows, img_cols)\nelse:\n X_train = X_train.reshape(X_train.shape[0], img_rows, img_cols, 1)\n X_test = X_test.reshape(X_test.shape[0], img_rows, img_cols, 1)\n inpx_shape = (img_rows, img_cols, 1)\n\n# Normalize data\nX_train = X_train.astype('float32')\nX_test = X_test.astype('float32')\nX_train /= 255\nX_test /= 255\n\n# Number of catogries\nnum_catogries = 10\n\n# Create neuron network\nmodel = Sequential()\nmodel.add(Conv2D(32, kernel_size=(3, 3),\n activation='relu',\n input_shape=inpx_shape))\nmodel.add(MaxPooling2D(pool_size=(2, 2)))\nmodel.add(Dropout(0.25))\nmodel.add(Flatten())\nmodel.add(Dense(128, activation='relu'))\nmodel.add(Dropout(0.5))\nmodel.add(Dense(num_catogries, activation='softmax'))\n\n# Compile\nmodel.compile(loss=keras.losses.categorical_crossentropy,\n optimizer=keras.optimizers.Adadelta(),\n metrics=['accuracy'])\n \n# Fit data \nmodel.fit(X_train, y_train,\n batch_size=256,\n epochs=4,\n verbose=1,\n validation_data=(X_test, y_test))\n\n# Evaluate\nscore = model.evaluate(X_test, y_test, verbose=0)\nprint('Test loss:', score[0])\nprint('Test accuracy:', score[1])"} {"text": "[CS Wikipedia] Mark Woodforde\n\nMark Woodforde (* 23. září 1965, Adelaide) je bývalý australský profesionální tenista, specializující se na čtyřhru, v níž dosáhl nejlepších výsledků. Tenisová kariéra V mužské čtyřhře získal dvanáct titulů z Grand Slamu a dalších pět ve smíšené čtyřhře. Společně s krajanem Toddem Woodbridgem, přezdívaní „Woodies“, se stali olympijskými vítězi ve čtyřhře na LOH 1996 v Atlantě a stříbrnou medaili přivezli z LOH 2000 v Sydney. Dvakrát také zvítězili na Turnaji mistrů (1992, 1996). Woodforde vyhrál na okruhu ATP 4 turnaje ve dvouhře a 67 ve čtyřhře. Woodies vytvořili jako pár rekord ATP, když společně vyhráli 61 turnajů, včetně 11 grandslamů. Asociace profesionálních tenistů jej pětkrát vyhlásila nejlepším deblistou roku. Také byl součástí australského daviscupového družstva. V Davisově poháru odehrál tři finále. V roce 1999 se jednalo o pařížské finále proti Francii, které přineslo Australanům po třinácti letech zisk salátové mísy. Společně s Woodbridgem jsou nejúspěšnější dvojicí v australském družstvu s poměrem 14 vítězství a 2 prohry. Jeho aktivní profesionální období trvalo šestnáct let 1984–2000. Hráčskou kariéru opustil po prohraném daviscupovém finále se Španělskem v prosinci 2000. Na žebříčku ATP ve dvouhře byl nejvýše na 19. místě (26. duben 1996), ve čtyřhře pak na 1. místě (16. listopad 1992). Finálová utkání na Grand Slamu Mužská čtyřhra – 16 (12-4) Vítězství – mužská čtyřhra (12) Finalista – mužská čtyřhra (4) Smíšená čtyřhra: 7 (5-2) Finálová utkání na turnajích ATP Dvouhra (9) Vítězství (4) Finalista (5) Čtyřhra – 91 (67-24) Vítězství (67) Finalista (24) Odkazy Reference Externí odkazy Australští tenisté Australští olympijští vítězové Olympijští vítězové v tenise Australští stříbrní olympijští medailisté Stříbrní olympijští medailisté v tenise Vítězové Australian Open Vítězové French Open Wimbledonští vítězové Vítězové US Open Členové Tenisové síně slávy Nositelé Medaile Řádu Austrálie Muži Žijící lidé Narození v roce 1965 Narození 23. září Narození v Adelaide"} {"instruction": "Create a function in Python to identify consecutive numbers in a given list.", "input": "[1, 4, 6, 5, 2, 7, 9]", "output": "def consecutive_numbers(lst):\n count = 0\n for i in range(len(lst)-1):\n if lst[i+1] - lst[i] == 1:\n count += 1\n else:\n count = 0\n return count\n\n# Test Code\nlst = [1, 4, 6, 5, 2, 7, 9]\nresult = consecutive_numbers(lst)\nprint(result)\n\n# Output --> 2"} {"text": "[DE Wikipedia] Live at the Berlin Philharmonic 1977\n\nLive at the Berlin Philharmonic 1977 ist ein Jazzalbum von Hal Galper. Die am 4. November 1977 auf den Berliner Jazztagen in der Berliner Philharmonie entstandenen Aufnahmen erschienen am 15. Januar 2021 auf Origin Records. Hintergrund Der Pianist Hal Galper hatte – nach Jahrzehnten als Begleitmusiker für Jazzgrößen wie Chet Baker, Cannonball Adderley und Phil Woods – Gelegenheit, eine Reihe von Alben für das Label Origin Records einzuspielen, beginnend mit Furious Rubatto. Es folgten sechs weitere Trio- und Quartett-Alben, was mit The Zone: Live at the Yardbird Suite (2019) endete. Das Origin-Label veröffentlichte schließlich 2021 einen Mitschnitt unter Galpers Namen von 1977, als der Pianist mit den Brecker-Brüdern, dem Trompeter Randy Brecker und dem Saxophonisten Michael Brecker zusammenarbeitete. Hal Galper hatte mit den Brecker Brothers zwei Alben in den frühen 1970er Jahren aufgenommen, The Guerilla Band und Wild Bird; im November 1976 entstand noch Reach Out (SteepleChase), neben Randy und Michael Brecker mit Wayne Dockery und Billy Hart. Im folgenden Jahr trat Galper mit den Brecker Brothers, begleitet von Wayne Dockery am Bass und Bob Moses am Schlagzeug, in der Berliner Philharmonie auf. Die Gruppe spielte fünf Kompositionen Galpers; der Standard „I’ll Never Stop Loving You“ war die einzige Fremdkomposition. Titelliste Hal Galper Quintet: Live at the Berlin Philharmonic 1977 (Origin 82810) CD 1 Now Hear This 13:59 Speak With a Single Voice 24:36 I'll Never Stop Loving You (Nikolaus Brodsky, Sammy Cahn) 12:56 CD 2 Triple Play 14:04 This Is the Thing 12:33 Hey Fool 9:31 Wenn nicht anders vermerkt, stammen die Kompositionen von Hal Galper. Rezeption Die Zeitschrift Down Beat vergab fünf Sterne und zählte das Album (mit Keith Jarretts Sun Bear Concerts und Louis Armstrongs The Complete Louis Armstrong Columbia and RCA Victor Sessions 1946–1966) zu den besten Veröffentlichungen von historischen Aufnahmen. Nach Ansicht von Dan McClenaghan, der das Album in All About Jazz rezensierte, biete Galper mit den Brecker Brothers mit voller Wucht einen rohen, freilaufenden Straight-ahead-Jazz mit Haltung, Adrenalin und Testosteron. Randy und Michael Brecker seien hier Feuer und Flamme; während Galper wie ein Schmied, der auf ein Stück heißes Metall schlage, auf die Klaviertasten hämmere. Selbst eine Piano Battle mit McCoy Tyner scheine da eine gute Idee. Die Band habe allesamt ausgedehnte Workouts geliefert, einschließlich des explosiven 25-minütigen außer Kontrolle geratenen „Speak with a Single Voice“. „Diese Jungs kamen, um kompromisslosen Jazz zu spielen, mit einem Powerhouse-Trendsetter an der Spitze.“ Olaf Maikopf schrieb in Jazzthing, nun gebe es – neben dem erst 1991 unter dem Titel „Redux ’78“ veröffentlichten Mitschnitt aus dem Rosie's Club in…"} {"instruction": "Create a Python script that generates a list of the prime numbers between two given numbers. The script should use the Sieve of Eratosthenes algorithm to generate the prime numbers", "input": "Start=1, End=20", "output": "def sieve_of_eratosthenes(start, end):\n prime = [True] * (end + 1)\n p = 2\n while p * p <= end:\n if prime[p]:\n for i in range(p * p, end + 1, p):\n prime[i] = False\n p += 1\n prime_numbers = []\n\n for p in range (start, end):\n if prime[p]:\n prime_numbers.append(p)\n\n return prime_numbers\n\nprint (sieve_of_eratosthenes(1, 20))"} {"instruction": "Train a logistic regression model using Scikit-Learn.", "input": "import numpy as np from sklearn.linear_model import LogisticRegression X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]]) Y = np.array([0, 0, 1, 1])", "output": "model = LogisticRegression(solver='lbfgs') model.fit(X, Y)"} {"instruction": "Write a function in C that returns the maximum element in an integer array.", "input": "", "output": "int findMaximum(int arr[], int size) { int max = arr[0]; for (int i=1; i max) max = arr[i]; return max; }"} {"text": "[EN Wikipedia] Pavelló de la Vall d'Hebron\n\nThe Pavelló de la Vall d'Hebron () is an indoor venue located in Barcelona, Spain. The building was completed in 1991 for the Games. For the 1992 Summer Olympics, it hosted the basque pelota demonstration and the volleyball preliminaries. For the 1992 Summer Paralympics, it hosted goalball, a team sport designed specifically for athletes with a vision impairment. References 1992 Summer Olympics official report. Volume 2. pp. 242–5. Sports venues completed in 1991 Venues of the 1992 Summer Olympics Olympic volleyball venues Indoor arenas in Catalonia Sports venues in Barcelona Volleyball venues in Spain 1991 establishments in Spain Badminton venues"} {"instruction": "Construct a list in Python that contains the names of the months in order, starting with January.", "input": "", "output": "months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]"} {"instruction": "Generate a class in python to represent a student with properties described below:\n- name: a string\n- age: an integer\n- marks: an array of integers", "input": "student1 {\n name: \"John\",\n age: 18,\n marks: [80,90,85]\n}", "output": "class Student:\n def __init__(self, name, age, marks):\n self.name = name\n self.age = age\n self.marks = marks\n\n def get_name(self):\n return self.name\n\n def get_age(self):\n return self.age\n\n def get_marks(self):\n return self.marks"} {"instruction": "Use the given code to optimize the dimensions of a beam. Import the necessary libraries and define the parameters P and E. Define the objective function to calculate the volume of the beam. Define the constraints for the optimization problem. Use the fmin_cobyla function to find the optimal dimensions of the beam. Print the optimal dimensions and the objective function value.", "input": "", "output": "from scipy.optimize import fmin_cobyla\nimport sys, os, subprocess, numpy\n\nP, E = 1000.0, 69e9 # N, Pa, m, m\n\nfileName = 'optimizeTest.txt'\nresultName = '../TestsResults/opt.txt'\n\ndef objective(x):\n height = x[0]\n width = x[1]\n length = x[2]\n volume = length * width * height\n return volume\n\ndef g0(x):\n height = 0.0\n width = 0.0\n length = 0.0\n if type(x) is numpy.ndarray:\n height = x[0]\n width = x[1]\n length = x[2]\n else:\n height = x[0]\n width = x[1]\n length = x[2]\n print 'Calculating for Height, Width, Length:', height, width, length, '\\n'\n \n # fail-safes\n if height <= 0.0 or width <= 0.0 or length <= 0.0:\n return -100\n \n file_write = open(fileName, 'w')\n file_write.write(fileName + \".scad \"+str(length)+\" \"+str(width*1000)+\" \"+str(height*1000))\n file_write.close()\n subprocess.check_output(['python', 'pipeline.py', '--template', 'templateBeam.py', '--batch', fileName, '--sConfig', 'slic3rConfig.ini', '--ind', str(height* 1000 + width * 1000 + length * 1000), '-c'])\n # read results from file and return those\n opt = open(resultName)\n for line in opt.readlines():\n curLine = line.strip().split(' ')\n disp = float(curLine[0]) / 1000\n\n I = width * height**3 / 12\n tip_disp = (P * length**3)/(3*E*I)\n\n print 'Displacement for Height, Width, Length', height, width, length 'is ::', disp\n print 'Analytical Disp for Height, Width, Length', height, width, length, 'is ::', tip_disp, '\\n'\n\n return 1e-4 - (float(curLine[0]) / -1000)\n\n return -1000000 \n\ndef g1(x):\n # height > 0.01 m (10 mm)\n if x[0] > 0.01 and x[1] > 0.01 and x[2] > 0.01:\n return 1\n return -1\n \ndef g2(x):\n # height < 0.5 m (500 mm)\n if x[0] < 0.5 and x[1] < 0.5 and x[2] < 0.5\n return 1\n return -1 \n \nh0 = [0.02, 0.02, 0.02] # 20 mm\nconstraints = [g0, g1, g2]\nh_opt = fmin_cobyla(objective, h0, constraints, rhoend=1e-6, maxfun=100, catol=1e-6)\nprint h_opt, objective(h_opt), g0(h_opt)"} {"instruction": "Create a Python program to scrape data from a website. The program should accept the website's URL as input.", "input": "https://example.com", "output": "import requests\nfrom bs4 import BeautifulSoup\n\nurl = \"https://example.com\"\nresponse = requests.get(url)\nsoup = BeautifulSoup(response.text, 'html.parser')\n\n# Scrape data from the website\n# ...\n# ..."} {"instruction": "How to create a basic HTML page in JavaScript?", "input": "", "output": "We can create a basic HTML page using the document.write() method. The syntax to create an HTML page using document.write() is as follows: document.write(\"\"); document.write(\"\"); document.write(\"My Page\"); document.write(\"\"); document.write(\"\"); document.write(\"My first web page with JavaScript\"); document.write(\"\"); document.write(\"\");"} {"instruction": "Convert this Python function to JavaScript.", "input": "def string_to_num_list(string):\n numbers = []\n for letter in string:\n numbers.append(ord(letter))\n return numbers", "output": "function stringToNumList(string) {\n let numbers = [];\n for (let letter of string) {\n numbers.push(letter.charCodeAt(0));\n }\n return numbers;\n}"} {"instruction": "Write a Bash script for creating a directory in the current working directory.", "input": "", "output": "#!/bin/bash # Create a directory mkdir myDir"} {"text": "[EN Wikipedia] Albedo\n\nAlbedo (; ) is the fraction of sunlight that is diffusely reflected by a body. It is measured on a scale from 0 (corresponding to a black body that absorbs all incident radiation) to 1 (corresponding to a body that reflects all incident radiation). Surface albedo is defined as the ratio of radiosity Je to the irradiance Ee (flux per unit area) received by a surface. The proportion reflected is not only determined by properties of the surface itself, but also by the spectral and angular distribution of solar radiation reaching the Earth's surface. These factors vary with atmospheric composition, geographic location, and time (see position of the Sun). While bi-hemispherical reflectance is calculated for a single angle of incidence (i.e., for a given position of the Sun), albedo is the directional integration of reflectance over all solar angles in a given period. The temporal resolution may range from seconds (as obtained from flux measurements) to daily, monthly, or annual averages. Unless given for a specific wavelength (spectral albedo), albedo refers to the entire spectrum of solar radiation. Due to measurement constraints, it is often given for the spectrum in which most solar energy reaches the surface (between 0.3 and 3 μm). This spectrum includes visible light (0.4–0.7 μm), which explains why surfaces with a low albedo appear dark (e.g., trees absorb most radiation), whereas surfaces with a high albedo appear bright (e.g., snow reflects most radiation). Ice–albedo feedback is a positive feedback climate process where a change in the area of ice caps, glaciers, and sea ice alters the albedo and surface temperature of a planet. Ice is very reflective, therefore it reflects far more solar energy back to space than the other types of land area or open water. Ice–albedo feedback plays an important role in global climate change. Albedo is an important concept in climatology, astronomy, and environmental management. The average albedo of the Earth from the upper atmosphere, its planetary albedo, is 30–35% because of cloud cover, but widely varies locally across the surface because of different geological and environmental features. Terrestrial albedo Any albedo in visible light falls within a range of about 0.9 for fresh snow to about 0.04 for charcoal, one of the darkest substances. Deeply shadowed cavities can achieve an effective albedo approaching the zero of a black body. When seen from a distance, the ocean surface has a low albedo, as do most forests, whereas desert areas have some of the highest albedos among landforms. Most land areas are in an albedo range of 0.1 to 0.4. The average albedo of Earth is about 0.3. This is far higher than for the ocean primarily because of the contribution of clouds. Earth's surface albedo is regularly…"} {"text": "[CS Wikipedia] Recep Tayyip Erdoğan\n\nRecep Tayyip Erdoğan (tureckou výslovností ; * 26. února 1954 Istanbul) je prezident Turecké republiky, bývalý starosta Istanbulu a v letech 2003 až 2014 turecký premiér. Život Erdoğan se narodil na předměstí Istanbulu ve čtvrti Kasımpaşa, v rodině, která se sem přestěhovala z provincie Rize. Vychodil náboženské školy a v mládí byl nucen si přivydělávat pouličním prodejem. Politická kariéra Je zakladatelem Strany spravedlnosti a rozvoje (, zkráceně AK Parti), která má většinu poslaneckých mandátů v tureckém parlamentu. Pochází z islamistického politického zázemí, ale sám sebe popisuje jako konzervativního demokrata. V roce 1994 byl zvolen starostou Istanbulu. V roce 2002 jeho strana AKP vyhrála parlamentní volby a v roce 2003 se stal tureckým premiérem. Jako jediný turecký politik dokázal vyhrál parlamentní volby třikrát po sobě, vždy s vyšší podporou zejména díky hospodářskému růstu země. V historicky první přímé prezidentské volbě byl 10. srpna 2014 zvolen již v prvním kole prezidentem Turecké republiky. Dne 28. srpna se ujal úřadu a od opozičních novinářů a politiků si vysloužil nálepku diktátora. Po neúspěšném pokusu o vojenský převrat v červenci 2016 zahájil rozsáhlé čistky v armádě, policii, justici, státní správě a ve školství. Dne 20. července vyhlásil výjimečný stav na následující tři měsíce, díky kterému může Erdogan vládnout pomocí dekretů, může omezit či pozastavit právo shromažďovací nebo svobodu slova. Následně svým dekretem nařídil uzavření 1043 soukromých škol, 1229 spolků a nadací, 19 odborových svazů, 15 univerzit a 35 zdravotnických zařízení s tím, že tyto instituce jsou údajně podezřelé ze styků s Fethullahem Gülenem, kterého Erdogan označuje za údajného strůjce neúspěšného převratu. K březnu 2018 bylo více než 160 000 lidí propuštěno nebo postaveno mimo službu a 50 000 lidí skončilo ve vězení. Do února 2019 bylo zatčeno na 77 000 lidí. V květnu 2023 obhájil prezidentský mandát, když svého soupeře Kemala Kılıçdaroğlu ve druhém kole prezidentských voleb 2023 těsně porazil. Přes své dlouhodobě kritické připomínky 23. října 2023 podepsal protokol o přistoupení Švédska k NATO a odeslal ho do Velkého národního shromáždění Turecka. Názory a kontroverze Turecko neuznává existenci řecké Kyperské republiky, která je členským státem EU. Podle Erdoğana „žádná země jménem Kypr neexistuje“. V červenci 2015 u příležitosti 41. výročí turecké invaze na Kypr navštívil Erdoğan mezinárodně neuznávanou Severokyperskou tureckou republiku, kterou podporuje a uznává jen Turecko. Severní Kypr je okupován tureckou armádou a podle Erdoğana „nepřichází v úvahu“, aby byli turečtí vojáci z ostrova staženi. Erdoğan odmítá označit masakry Arménů v Osmanské říši jako genocidu a v červnu 2016 stáhl tureckého velvyslance z Německa v reakci na rezoluci německého…"} {"instruction": "Name the components of a typical machine learning pipeline.", "input": "", "output": "A typical machine learning pipeline consists of data pre-processing, model training, model evaluation and model deployment. Data pre-processing involves cleaning, formatting, and transforming the data, while model training involves selecting an appropriate model and using it to learn from the data. Model evaluation evaluates the models and assists in model selection. The final step is deployment of the model, to enable inference from and prediction on new data points."} {"instruction": "Create a HTML page with a form that takes in two numbers as input and adds them together when the form is submitted.", "input": "", "output": " Adding Form
    "} {"text": "[DE Wikipedia] Weißschwanz-Antilopenziesel\n\nDer Weißschwanz-Antilopenziesel (Ammospermophilus leucurus) gehören zur Gattung der Antilopenziesel. Er kommt in Teilen der westlichen Vereinigten Staaten sowie in Mexiko (Baja California) vor. Merkmale Weißschwanz-Antilopenziesel haben eine Länge von 18 bis 23 cm und ein Gewicht von 100 bis 140 g. Die Art ist braun gefärbt und hat einen weißen Schwanz. Sie leben in Wüsten, Halbwüsten und auf sandigen Ebenen mit wenig Grasbewuchs, wo sie gut graben können, um der Hitze und den Fressfeinden (u. a. Füchse, Luchse, Greifvögel, Klapperschlangen) zu entgehen. Verbreitung Die Tiere kommen in den Vereinigten Staaten vom Süden von Oregon und dem Osten Kaliforniens bis Colorado, Utah, Nevada, New-Mexico und Arizona sowie auf der mexikanischen Halbinsel Baja California vor. Lebensweise Ziesel fressen Samen, Früchte und Wurzeln und gegebenenfalls auch Insekten. Die Nahrung wird in den Backentaschen verstaut. Systematik Der Weißschwanz-Antilopenziesel wird als eigenständige Art innerhalb der Gattung der Antilopenziesel (Ammospermophilus) eingeordnet, die aus fünf Arten besteht. Die wissenschaftliche Erstbeschreibung als Spermophilus harrisii stammt von Clinton Hart Merriam aus dem Jahr 1889 anhand von Individuen vom San-Gorgonio-Pass, Riverside County, in Kalifornien. Er beschrieb die Art als Tamias leucurus in Abgrenzung zum Harris-Antilopenziesel (Ammospermophilus harrisii, damals Tamias harrisii) und ordnete sie damit den Streifenhörnchen (Gattung Tamias). Dabei benutzte er bereits den Namen antelope squirrel und stellte die Zuordnung zu Tamias in Frage. 1907 wurde die Art durch Edgar Alexander Mearns in die bereits 1862 von Clinton Hart Merriam eingerichtete Gattung Ammospermophilus überstellt. Innerhalb der Art werden mit der Nominatform neun Unterarten unterschieden: Ammospermophilus leucurus leucurus: Nominatform Ammospermophilus leucurus canfieldiae Ammospermophilus leucurus cinamomeus Ammospermophilus leucurus escalante Ammospermophilus leucurus extimus Ammospermophilus leucurus notom Ammospermophilus leucurus peninsulae Ammospermophilus leucurus pennipes Ammospermophilus leucurus tersus Status, Bedrohung und Schutz Der Weißschwanz-Antilopenziesel wird von der International Union for Conservation of Nature and Natural Resources (IUCN) als nicht gefährdet (least concern) eingestuft. Begründet wird dies durch das vergleichbar große Verbreitungsgebiet, die angenommen großen Bestandszahlen und die relativ geringen Rückgänge der Populationen. Die Bestandsdichte in den Vereinigten Staaten ist gering und liegt bei 0,06 pro Hektar im Frühjahr bis 0,35 pro Hektar im Herbst, wobei die Bestandszahlen jährlich stark fluktuieren können. Bestandsgefährdende Risiken für die Art sind nicht bekannt, allerdings sind sie auf einigen Inseln im Golf von Kalifornien durch…"} {"instruction": "Build a mathematical model in Python to calculate the probability of heads on a coin toss.", "input": "", "output": "def probability_of_heads(n):\n total_outcomes = 2**n\n heads_outcomes = total_outcomes/2\n \n probability_of_heads = heads_outcomes / total_outcomes\n \n return probability_of_heads"} {"text": "[HI Wikipedia] अकबर\n\nजलाल उद्दीन मोहम्मद अकबर () (15 अक्तूबर, 1542 ,७ अक्तूबर, १६०५) तैमूरी वंशावली के मुगल वंश का तीसरा शासक थे। अकबर को अकबर-ऐ-आज़म (अर्थात अकबर महान), शहंशाह अकबर, महाबली शहंशाह के नाम से भी जाने जाते हैं। सम्राट अकबर मुगल साम्राज्य के संस्थापक जहीरुद्दीन मुहम्मद बाबर का पौत्र और नासिरुद्दीन हुमायूं एवं हमीदा बानो का पुत्र थे। बाबर का वंश तैमूर और मंगोल नेता चंगेज खां से संबंधित था अर्थात् उनके वंशज तैमूर लंग के खानदान से थे और मातृपक्ष का संबंध चंगेज खां से था। अकबर के शासन के अंत तक १६०५ में मुगल साम्राज्य में उत्तरी और मध्य भारत के अधिकाश भाग सम्मिलित थे और उस समय के सर्वाधिक शक्तिशाली साम्राज्यों में से एक था। बादशाहों में अकबर ही एक ऐसा बादशाह थे, जिसे हिन्दू मुस्लिम दोनों वर्गों का बराबर प्यार और सम्मान मिला। उसने हिन्दू-मुस्लिम संप्रदायों के बीच की दूरियां कम करने के लिए दीन-ए-इलाही नामक धर्म की स्थापना की। उसका दरबार सबके लिए हर समय खुला रहता था। उसके दरबार में मुस्लिम सरदारों की अपेक्षा हिन्दू सरदार अधिक थे। अकबर ने हिन्दुओं पर लगने वाला जज़िया ही नहीं समाप्त किया, बल्कि ऐसे अनेक कार्य किए जिनके कारण हिन्दू और मुस्लिम दोनों उसके प्रशंसक बने। अकबर मात्र तेरह वर्ष की आयु में अपने पिता नसीरुद्दीन मुहम्मद हुमायुं की मृत्यु उपरांत दिल्ली की राजगद्दी पर बैठा थे। अपने शासन काल में उसने शक्तिशाली पश्तून वंशज शेरशाह सूरी के आक्रमण बिल्कुल बंद करवा दिये थे, साथ ही पानीपत के द्वितीय युद्ध में नवघोषित हिन्दू राजा हेमू को पराजित किया था। अपने साम्राज्य के गठन करने और उत्तरी और मध्य भारत के सभी क्षेत्रों को एकछत्र अधिकार में लाने में अकबर को दो दशक लग गये थे। उसका प्रभाव लगभग पूरे भारतीय उपमहाद्वीप पर था और इस क्षेत्र के एक बड़े भूभाग पर सम्राट के रूप में उसने शासन किया। सम्राट के रूप में अकबर ने शक्तिशाली और बहुल हिन्दू राजपूत राजाओं से राजनयिक संबंध बनाये और उनके यहाँ विवाह भी किये। अकबर के शासन का प्रभाव देश की कला एवं संस्कृति पर भी पड़ा। उसने चित्रकारी आदि ललित कलाओं में काफ़ी रुचि दिखाई और उसके प्रासाद की भित्तियाँ सुंदर चित्रों व नमूनों से भरी पड़ी थीं। मुगल चित्रकारी का विकास करने के साथ साथ ही उसने यूरोपीय शैली का भी स्वागत किया। उसे साहित्य में भी रुचि थी और उसने अनेक संस्कृत पाण्डुलिपियों व ग्रन्थों का फारसी में तथा फारसी ग्रन्थों का संस्कृत व हिन्दी में अनुवाद भी करवाया था। अनेक फारसी संस्कृति से जुड़े चित्रों को अपने दरबार की दीवारों पर भी बनवाया। अपने आरम्भिक शासन काल में अकबर की हिन्दुओं के प्रति सहिष्णुता नहीं थी, किन्तु समय के साथ-साथ उसने अपने आप को बदला और हिन्दुओं सहित अन्य धर्मों में बहुत रुचि दिखायी। उसने हिन्दू राजपूत राजकुमारियों से वैवाहिक संबंध भी बनाये। अकबर के दरबार में अनेक हिन्दू दरबारी, सैन्य अधिकारी व सामन्त थे। उसने धार्मिक चर्चाओं व वाद-विवाद कार्यक्रमों की अनोखी शृंखला आरम्भ की थी, जिसमें मुस्लिम आलिम लोगों की जैन, सिख, हिन्दु, चार्वाक, नास्तिक, यहूदी, पुर्तगाली एवं कैथोलिक ईसाई धर्मशस्त्रियों से चर्चाएं हुआ करती थीं। उसके मन में इन धार्मिक नेताओं के प्रति आदर भाव था, जिसपर उसकी निजि धार्मिक भावनाओं का किंचित भी प्रभाव…"} {"instruction": "Write a Python algorithm to compute the number of islands. An island is a group of connected 1s in an array where all four adjacent lands have value 0.", "input": "", "output": "def count_islands(grid): \n if not grid: \n return 0 \n \n row = len(grid) \n col = len(grid[0]) \n \n num_islands = 0\n \n for i in range(row): \n for j in range(col): \n if grid[i][j] == 1: \n num_islands += dfs(grid, i, j, row, col) \n \n return num_islands \n \n \ndef dfs(grid, i, j, row, col): \n if i < 0 or i >= row or j < 0 or j >= col or grid[i][j] == 0: \n return 0\n \n grid[i][j] = 0\n \n dfs(grid, i + 1, j, row, col) \n dfs(grid, i - 1, j, row, col) \n dfs(grid, i, j + 1, row, col) \n dfs(grid, i, j - 1, row, col) \n \n return 1"} {"instruction": "Create a Python function that takes two lists, compare them, and return True if both lists are identical and False if they differ.", "input": "list1 = [1, 2, 3]\nlist2 = [1, 2, 3]", "output": "def compare_lists(list1, list2):\n if len(list1) != len(list2):\n return False\n\n for i in range(len(list1)):\n if list1[i] != list2[i]:\n return False\n\n return True"} {"instruction": "What is the Big-O notation of a given algorithm", "input": "", "output": "Big-O notation is a method of expressing the time complexity of an algorithm. It quotes the upper bound of an algorithm’s running time in terms of a function of the size of the input data. This is useful for determining the efficacy of an algorithm as different inputs of different sizes require different run times from the same algorithm. Big-O notation is typically expressed in terms of the number of operations on the input data, with each scale increasing the complexity exponentially."} {"text": "[DE Wikipedia] Living Targets\n\nLiving Targets ist das dritte Studioalbum der Beatsteaks. Geschichte Es ist das erste Album der Beatsteaks mit Torsten Scholz am Bass. Das Album sollte ursprünglich The Ordinary Me heißen, weswegen das erste Lied auch mit den Worten „My name is Tom and I am funky“ beginnt. Jedoch wurde dieser Arbeitstitel nicht verwendet. Aufgenommen wurde zunächst im Minirock Studio in Köln mit Uwe Sabirowsky als Produzent, wo unter anderem Let Me In und Summer entstanden. Sänger Arnim Teutoburg-Weiß kommentiert diese Phase mit den Worten: „Ich dachte so, wir machen 'n super Album - Haben wir ja auch, aber nur zur Hälfte. Also wir haben da schon Hammer-Songs auch aufgenommen, (…) aber wir hatten einfach nicht genug Songs.“ Nach der Rauf auf die Bühne, Unsichtbarer-Tour als Support der Ärzte ging es mit Billy Gould, bekannt als Bassist von Faith No More, ins Tritonus-Studio nach Berlin, um den Rest der Platte aufzunehmen. Die erste Single Summer wurde als Single wegen Verzögerungen beim Pressen der CDs nie offiziell veröffentlicht, war aber später beim bandeigenen Merchandise-Label und Onlineshop Beatstuff erhältlich, sodass Let Me In zur eigentlich ersten Single der Band wurde. Zu den Single-Veröffentlichungen Summer und Let Me In produzierten die Beatsteaks ihre ersten professionellen Videos: das Video zu Summer, produziert von Peter Thorwarth und Ali Eckert, stellt die Band im September 2001 bei der Autofahrt zu einem Auftritt nach Portugal dar. Das Let Me In-Video unter Regie von Bas Vink wurde als Performance-Video gedreht und lief auch relativ häufig im Musikfernsehen, was erheblich zur Bekanntheit der Beatsteaks beitrug. Als Hidden Track befindet sich wenige Sekunden nach dem Ende von Summer der Track Yeah! Titelliste Not Ready to Rock (Teutoburg/Götz/Kurtzke) – 1:27 God Knows (Teutoburg/Baumann) – 2:32 Let Me In (Teutoburg/Baumann) – 3:32 Soothe Me (Götz) – 2:30 Above Us (Teutoburg/Kurtzke/Baumann/Götz) – 3:03 This One (Teutoburg/Baumann) – 2:47 Disconnected (Teutoburg/Kurtzke/Baumann) – 3:05 A-Way (Götz/Scholz) – 3:40 Run Run (Teutoburg/Baumann) – 2:55 Mirrored (Kurtzke/Scholz) – 3:48 To Be Strong (Teutoburg) – 2:49 Summer (Teutoburg/Baumann/Götz/Kurtzke) – 3:25 (+ Hidden Track) Weblinks Rezension auf laut.de Einzelnachweise Beatsteaks Album (Alternative Rock) Album 2002"} {"instruction": "Generate a random number between 1 and 10 using Python.", "input": "", "output": "import random\n\n# Generate a random number between 1 and 10\nrandom_number = random.randint(1, 10)\nprint(random_number)"} {"text": "[DE Wikipedia] Castello di Rende\n\nDas Castello di Rende (auch Castello Normanno genannt) ist eine Burg aus dem 11. Jahrhundert im historischen Zentrum von Rende in der italienischen Region Kalabrien. Dort ist heute ein Museum für zeitgenössische Kunst untergebracht, das nach Roberto Bilotti Ruggi d’Aragón benannt ist. Geschichte Die imposante Burg wurde 1095 auf Geheiß von Bohemund von Tarent erbaut, der die Verteidigungsanlage zum Schutz der Stadt und ihrer Bewohner errichten ließ. Die Festung war zusammen mit ihrer Umfassungsmauer nur der Beginn eines umfangreicheren und ambitionierteren Projektes, das von Robert Guiskard, seinem Vater, erdacht worden war und eine Verteidigungslinie durch das gesamte Cratital vorsah, das die Gebiete von Bisignano, Montalto Uffugo, Rende und Cosenza umfasste. Die Burg in Rende, die als eine der ersten gebaut wurde, diente als Militärbasis für die Vorbereitung und die Teilnahme am 1. Kreuzzug, der 1096 begann und von dem vorher erwähnten Bothemund von Tarent angeführt wurde. Das Castello di Rende fiel später an die Staufer und von ihnen an das Haus Anjou, an das Haus Aragón und an die Grafen Adorno. In der Neuzeit wurde es in einen Adelspalast umgewandelt und kam in den Besitz illustrer Familien, wie den Alacóns von Mendoza und den Magdalones, den letzten Bewohnern, bevor die Burg 1922 Sitz der Stadtverwaltung von Rende wurde, was sie bis 2011 blieb. Beschreibung Dank der besonderen Form des Hügels, auf dem der mächtige Gebäudekomplex steht, ist der Zugang zur Festung zweifellos schwierig: Seine Mauern mit gut zwei Metern Dicke und diese Elemente machen die Burg absolut unangreifbar. Die Normannen vermieden es sogar, einen Burggraben auszuheben, wie es sonst ihre Art war (wenn man an die Burgen von Fiumefreddo oder Corigliano Calabro denkt), aber legten besonderen Wert auf die Wachtürme, heute vier, aber ursprünglich vielleicht sogar fünf, die mit zahlreichen Schießscharten für Langstreckenwaffen ausgestattet waren. Der Schutz war auch während der hartnäckigsten Belagerungen gewährleistet: Im Hof wurde eine große Zisterne zur Sammlung von Regenwasser gebaut, das in Notzeiten genutzt werden konnte. Die Burg wurde mit zahlreichen Schießscharten und kleinen Fenstern ausgestattet, die den Angriffen dienten, die mit Bögen von der Balustrade aus ausgeführt wurden. Unterhalb der Mauern wurde eine große Zisterne zur Sammlung von Wasser errichtet, das als Grundstock für alle Bewohner innerhalb der Wehrmauer diente. Neben dem zentralen Turm, dem höchsten, erwiesen sich die beiden seitlichen Türme als besonders effektiv: Die drei Türme, die man um die Burganlage sehen kann, wurden zu einem Teil des Wappens der Stadt Rende, das um 1222 anlässlich der Einweihung des Doms von Cosenza in Gegenwart des Kaisers Friedrich II. installiert wurde. Im Inneren der Burg…"} {"instruction": "Write a Python code to search for an input keyword in the given string and replace it with another keyword.", "input": "str = \"Hello, world\"\nsearch_substring = \"world\" \nreplace_substring = \"Earth\"", "output": "str = \"Hello, world\"\nsearch_substring = \"world\" \nreplace_substring = \"Earth\" \n\ndef replace_substring(str, search_substring, replace_substring):\n if search_substring in str:\n str = str.replace(search_substring, replace_substring)\n return str\n\nprint(replace_substring(str, search_substring, replace_substring))"} {"text": "[CS Wikipedia] Cordulia\n\nCordulia je rod vážek z čeledi lesklicovitých. Česky je rod pojmenovaný lesklice, stejně jako rody Antipodochlora, Epitheca, Oxygastra a Somatochlora . Na celém světě existují 3 druhy tohoto rodu. V Česku se vyskytuje jen jeden druh, lesklice měděná. Seznam druhů Seznam podle Cordulia aenea (Linnaeus, 1758) - lesklice měděná Cordulia amurensis Selys, 1887 Cordulia shurtleffii Scudder, 1866 Reference Externí odkazy Lesklicovití"} {"instruction": "Create a function that takes an array as a parameter and continuously adds each item to the total sum.", "input": "arr = [6, 4, 3, 10]", "output": "def addItems(arr): total = 0 for number in arr: total = total + number return total"} {"instruction": "Create a function in Python that takes as input a list of strings and returns a dictionary of all the unique words and their frequency", "input": "The list of strings is [\"hello\", \"world\", \"hello\", \"goodbye\"]", "output": "def get_freq_dict(strings):\n words = set()\n freq_dict = {}\n\n for string in strings:\n words.update(string.split(' '))\n\n for word in words:\n freq_dict[word] = strings.count(word)\n\n return freq_dict\n\nstrings = [\"hello\", \"world\", \"hello\", \"goodbye\"]\nfreq_dict = get_freq_dict(strings)\n\nprint(freq_dict) # prints {'hello': 2, 'world': 1, 'goodbye': 1}"} {"instruction": "Create a function that takes three parameters and adds them together.", "input": "No input.", "output": "def my_func(a, b, c): return a + b + c"} {"instruction": "Implement a program in Python to find the average of an array of length n.", "input": "Input: [2, 4, 6, 8, 10]", "output": "def findAverage(arr):\n # Initialize sum\n sum = 0\n \n # Iterate over the array to calculate sum\n for n in arr:\n sum += n\n \n # Calculate the average and return \n return sum/len(arr)\n\n\n# Driver code\narr = [2, 4, 6, 8, 10]\nprint(findAverage(arr))"} {"text": "[DE Wikipedia] Grafschaft Beaumont-le-Roger\n\nDie Grafschaft Beaumont-le-Roger heißt eigentlich Grafschaft Beaumont; der Zusatz ist lediglich eine Erweiterung des Namens des Hauptortes Beaumont-le-Roger nach Roger de Beaumont, dem ersten Herren von Beaumont, dient aber auch dazu, die Grafschaft Beaumont-le-Roger von anderen Lehen, vor allem der Grafschaft Beaumont-sur-Oise zu unterscheiden, zumal beide zeitweise im Besitz derselben Person waren. Beaumont war ein Lehen, das im 11. Jahrhundert von den Herren von Pont-Audemer gehalten wurde. Im 12. Jahrhundert ging es an die Grafen von Meulan und wurde 1203 vom französischen König Philipp II. August im Zusammenhang mit der Rückeroberung der Normandie durch die Franzosen besetzt und eingezogen. König Ludwig IX. kaufte dem Erben des Herren von Beaumont 1255 dessen formelle Ansprüche auf das Lehen ab. Beaumont wurde anschließend an Ludwig von Évreux (1298) und Robert III. von Artois vergeben. 1329 wurde Beaumont zur Grafschaft erhoben. Mit der Verurteilung Roberts III. wegen einer Urkundenfälschung im Zusammenhang mit Erbschaftsstreitigkeiten um die Grafschaft fiel Beaumont wieder an die Krone. 1344 wurde die Grafschaft an Philipp von Valois gegeben, der dafür auf die zunächst ihm zugedachte Dauphiné verzichtete. 1354 musste er die Grafschaft wieder aufgeben, der diese im Vertrag von Mantes an Karl II. den Bösen, König von Navarra, abtreten musste. In den Wirren der Folgejahre wurde die Grafschaft wieder konfisziert. Durch den Vertrag von Calais 1360 erhielt Karl der Böse die Grafschaft zurück und reichte sie an seinen Bruder Ludwig von Navarra weiter, der Beaumont bald an König Karl V. verpfändete. 1375 erhielt Ludwigs Sohn Karl der Edelmütige, ältester Sohn Karls des Bösen, anlässlich seiner Heirat mit Leonore von Kastilien die Grafenwürde von Beaumont, doch wurde er am französischen Hof festgehalten und Beaumont eingezogen und der Krondomäne eingegliedert. 1404 verzichtete Karl der Edelmütige formell auf die Grafschaften Beaumont-le-Roger und Évreux und erhielt dafür das Herzogtum Nemours. Während Beaumont 1417 bis 1448 englisch besetzt war, führte Richard, Herzog von York den Grafentitel von Beaumont-le-Roger. Nach der französischen Rückeroberung durch König Karl VII. wurde Beaumont endgültig der Krondomäne eingegliedert. Herren und Grafen von Beaumont Haus Beaumont vor 1066–1094: Roger der Bärtige († 1094), Herr von Beaumont und Pont-Audemer; ⚭ Adeline de Meulan († 1081), Schwester von Graf Hugo II. 1094–1118:Robert I. de Beaumont († 1118), Rogers Sohn, Herr von Beaumont und Pont-Audemer, 1081 Graf von Meulan, 1107 Earl of Leicester; ⚭ Elisabeth von Vermandois († 1131), Dame d’Elbeuf, Tochter des Grafen Hugo (Kapetinger) und der Adelheid von Vermandois (Karolinger) 1118–1166: Galéran IV. (Walram IV.) (* 1104; † 1166), Sohn Roberts I., Graf von…"} {"text": "[DE Wikipedia] Miyako-Sprache\n\nDie Miyako-Sprache (Eigenbezeichnung: //, Myāku-futsu; jap. Miyako-hōgen „Miyako-Dialekt“) gehört zu den Ryūkyū-Sprachen und wird auf den Miyako-Inseln in der japanischen Präfektur Okinawa gesprochen. Unterschieden wird die Miyako-Sprache noch in den Miyako-Dialekt auf Miyako-jima, den Irabu-Dialekt auf Irabu-jima und den Tarama-Dialekt auf Tarama-shima. Letzterer unterscheidet sich auf Grund der Entfernung zu den beiden anderen Inseln (50 bzw. 45 km) am deutlichsten. Sie unterscheidet sich von anderen regionalen Sprachen sowohl lexikalisch (wahrscheinlich auch aufgrund der geographischen Nähe zu Taiwan) als auch in der Aussprache beträchtlich, z. B. wird /mi/ und /mu/ am Wortanfang zu /n/: mukashi () → // () migi () → // () Die Sprache ist sowohl für Sprecher der auf Okinawa gesprochenen Sprache ( Uchinā-guchi) als auch für Sprecher der auf den japanischen Hauptinseln gesprochenen Sprache völlig unverständlich. Trivia Der auf Miyako-jima geborene Sänger Isamu Shimoji () singt fast ausschließlich in der Miyako-Sprache. Die seinen Alben beigefügten Hefte enthalten sowohl die in der Miyako-Sprache gesungenen Texte als auch deren Übersetzungen ins Standardjapanische. Weblinks Wörterbuch Miyako → Japanisch der Universität Ryūkyū Basic Vocabulary: Miyako (basiert auf dem Wörterbuch) Liste mit Begriffspaaren auf Myāku-futsu und Standardjapanisch Einzelnachweise Einzelsprache Japanische Sprache Ryūkyū-Inseln Kultur (Präfektur Okinawa)"} {"instruction": "Create a Python program to classify a text document into one of five categories (news, sports, health, politics, and entertainment).", "input": "Document text", "output": "import nltk\nimport string\nfrom nltk.corpus import stopwords\nfrom nltk.tokenize import word_tokenize\n\n# Data for model training\ncategories = [\"news\", \"sports\", \"health\", \"politics\", \"entertainment\"]\ndata = {\n \"news\": [[\"This is a news article.\"], [\"An event occurred in the news today.\"]],\n \"sports\": [[\"A huge basketball game was played today.\"], [\"The Lakers won the basketball game.\"]],\n \"health\": [[\"Someone ate an unhealthy snack today.\"], [\"The doctor said to exercise every day.\"]],\n \"politics\": [[\"The President is holding a meeting today.\"], [\"The senators are discussing a bill.\"]],\n \"entertainment\": [[\"A new movie came out this week.\"], [\"A famous celebrity was seen at the premiere.\"]]\n}\n\n# Tokenize the text\ndef tokenize_doc(doc):\n tokens = word_tokenize(doc)\n tokens = [word.lower() for word in tokens if word not in string.punctuation]\n tokens = [word for word in tokens if word not in stopwords.words('english')]\n return tokens\n\n# Vectorize the tokens\ndef vectorize_tokens(tokens):\n vec = {}\n for token in tokens:\n if token in vec:\n vec[token] += 1\n else:\n vec[token] = 1\n return vec\n\n# Train the model\ntraining_data = [(vectorize_tokens(tokenize_doc(doc)), category)\n for category in data\n for doc in data[category]]\n\n# Classify the text\ndef classify_doc(doc):\n tokens = tokenize_doc(doc)\n vec = vectorize_tokens(tokens)\n best_category = None\n best_score = 0\n for (category, v) in training_data:\n score = 0\n for token, count in vec.items():\n if token in v:\n score += v[token]\n if score > best_score:\n best_score = score\n best_category = category\n return best_category\n\n# Sample data\ntext = \"A famous celebrity was seen today.\"\n \npredicted_category = classify_doc(text)\nprint(\"Predicted category:\", predicted_category)\n\n# Output\n# Predicted category: entertainment"} {"text": "[HI Wikipedia] रक्सौल\n\nरक्सौल (Raxaul) भारत के बिहार राज्य के पूर्वी चम्पारण ज़िले में स्थित एक शहर है। नेपाल सीमा रक्सौल भारत-नेपाल सीमा पर स्थित है और अपने चीनी उद्योग के कारण जाना जाता है। इसके पास ही नेपाल का बीरगंज स्थित है। बीरगंज रेलवे स्टेशन नेपाल सरकार रेलवे (NGR) से भारत की सीमा के पार बिहार के रक्सौल स्टेशन से जुड़ा है। 47 किमी (29 मील) रेलवे उत्तर में नेपाल के अमलेखगंज तक फैली हुई है। यह 1927 में अंग्रेजों द्वारा बनाया गया था, लेकिन दिसंबर 1965 में बीरगंज से परे बंद कर दिया गया था। [3] रक्सौल से बिरगंज तक 6 किमी (3.7 मील) रेलवे ट्रैक को दो साल बाद ब्रॉड गेज में बदल दिया गया था, क्योंकि भारतीय रेलवे ने ट्रैक को भारत के रक्सौल में ब्रॉड गेज में बदल दिया था। अब, ब्रॉड गेज रेलवे लाइन रक्सौल को सिरसिया (बीरगंज) अंतर्देशीय कंटेनर डिपो (ICD) से जोड़ती है, जो 2005 में पूरी तरह से चालू हो गई थी। नेपाल के बीरगंज से नेपाल के अमलेगंज तक रेल मार्ग को फिर से खोलने के लिए वार्ता हुई है, क्योंकि इसे ब्रॉड गेज में परिवर्तित कर दिया गया है। इसका सामाजिक-आर्थिक महत्व है। इतिहास रक्सौल : अतीत और वर्तमान’ (रक्सौल नगर के उद्धव व क्रमागत विकास पर संदर्भ पुस्तक) इन्हें भी देखें पूर्वी चम्पारण ज़िला सन्दर्भ बिहार के शहर पूर्वी चम्पारण जिला पूर्वी चम्पारण ज़िले के नगर"} {"instruction": "Create a Python program to build a dictionary of each unique word in the text and the number of times it appears.", "input": "text = \"In computing, a hash table (hash map) is a data structure which implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found.\"", "output": "words = text.split(' ')\nwords_dict = {}\nfor word in words:\n if word not in words_dict:\n words_dict[word] = 1\n else:\n words_dict[word] += 1\n\nprint(words_dict)"} {"instruction": "Create a text classification model using Scikit-learn to classify a message with either \"positive\" or \"negative\" sentiment.", "input": "", "output": "from sklearn.feature_extraction.text import CountVectorizer from sklearn.linear_model import LogisticRegression # Vectorize the message into a format that the model can accept vect = CountVectorizer().fit(X_train) X_train_vectorized = vect.transform(X_train) # Train a Logistic Regression model model = LogisticRegression() model.fit(X_train_vectorized, y_train) # Use the model to predict the sentiment of a given message message_sentiment = model.predict([vect.transform([message])])"} {"instruction": "Design a CSS style to make an element a circle and have a red border", "input": "", "output": "#circle { width: 50px; height: 50px; border-radius: 50%; border: 1px solid red; }"} {"instruction": "Create a Python program to compare two given strings and returns the number of mismatched letters.", "input": "string1 = \"abcdefg\"\nstring2 = \"accfghe\"", "output": "def compare_strings(string1, string2):\n mismatched = 0\n for i in range(min(len(string1), len(string2))):\n if string1[i] != string2[i]:\n mismatched += 1\n return mismatched\n\nstring1 = \"abcdefg\"\nstring2 = \"accfghe\" \ncompared = compare_strings(string1, string2)\nprint(\"Number of mismatched letters:\", compared)"} {"instruction": "Generate a regular expression to match a valid email address.", "input": "", "output": "/^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/"} {"instruction": "Rewrite the following if-statement into a switch statement.", "input": "if (grade == \"A\") { gradeValue = 4.0; } else if (grade == \"B\") { gradeValue = 3.0; } else if (grade == \"C\") { gradeValue = 2.0; } else if (grade == \"D\") { gradeValue = 1.0; }", "output": "switch(grade) { case 'A': gradeValue = 4.0; break; case 'B': gradeValue = 3.0; break; case 'C': gradeValue = 2.0; break; case 'D': gradeValue = 1.0; break; default: gradeValue = 0; break; }"} {"instruction": "Design an algorithm in Python which will traverse a linked list and select all elements that are greater than 10.", "input": "", "output": "# Linked List Node \nclass Node: \n\t\n\t# Constructor to initialise the node object \n\tdef __init__(self, data): \n\t\tself.data = data \n\t\tself.next = None\n\n# Linked List class contains a Node object \nclass LinkedList: \n\n\t# Function to initialize head \n\tdef __init__(self): \n\t\tself.head = None\n\n # Traverses linked list and prints its elements \n\tdef traverse(self): \n\n\t\t# Set current to head node \n\t\tcurrent = self.head \n\t\t\n\t\twhile current is not None: \n\t\t\t\n\t\t\t# If the data of a node is greater \n\t\t\t# than 10 \n\t\t\tif current.data > 10: \n\t\t\t\t\n\t\t\t\t# Print the data of the node \n\t\t\t\tprint(current.data) \n\t\t\t\n\t\t\t# Go to next node \n\t\t\tcurrent = current.next"} {"instruction": "Write a function in Python to convert a dictionary into a list and then sort the list alphabetically.", "input": "Example Dictionary: {'a':1, 'b':2, 'c':3}", "output": "def dict_to_sorted_list(d):\n # Convert Dictionary to List\n lst = list(d.items())\n \n # Sort List Alphabetically\n lst.sort(key=lambda x: x[0])\n \n return lst\n \nexample_dict = {'a':1, 'b':2, 'c':3}\nsorted_list = dict_to_sorted_list(example_dict)\nprint(sorted_list)\n\n# Output:\n# [('a', 1), ('b', 2), ('c', 3)]"} {"instruction": "Create a script in Python that checks a provided URL for a specific keyword within its content and outputs either a pass or fail result.", "input": "URL: http://www.example.com\nKeyword: success", "output": "import requests\n\nurl = 'http://www.example.com'\nkeyword = 'success'\n\nr = requests.get(url)\nif keyword in r.text:\n print('Pass')\nelse:\n print('Fail')"} {"instruction": "Write a script in Python for printing the given second level sub-dictionary.", "input": "data = {'first': {'A': 1, 'B': 2}, 'second': {'C': 3, 'D': 4}}", "output": "second_dict = data.get('second') for key, value in second_dict.items(): print(key, value)"} {"text": "[CS Wikipedia] Pneumatické zařízení\n\nPneumatické zařízení je mechanický stroj, který využívá tlaku plynu k přenesení nebo zvětšení síly. Pneumatická zařízení využívají často i rozdílu mezi atmosférickým tlakem a tlakem plynu (přetlak nebo podtlak), příp. proudění plynu. Princip pneumatických zařízení spočívá v tom, že stlačením plynu v uzavřené nádobě se zvětší tlak ve všech místech plynu. Naopak zvětšením objemu se tlak ve všech místech plynu zmenší. Tím se síla působící na píst na jedné straně nádoby přenese na píst na druhé straně. Přitom velikostí pístu lze ovlivnit i velikost síly, na větší píst působí větší tlaková síla, na menší píst působí menší síla. Příklady pneumatických zařízení Kompresor - zdroj stlačeného plynu pro další aplikace Průběžná brzda, sací brzda Potrubní pošta Pneumatický počítač Stříkací pistole pneumatický servomotor pneumatická vrtačka, pneumatické kladivo ofukovací pistole pneumatická tramvaj, pneumatické metro pneumatika hydropneumatické pérování Stroje Mechanika tekutin Vakuová technika Pneumatický pohon"} {"instruction": "Create a python generator that prints fibonacci numbers from n to 2*n-1.", "input": "n = 10", "output": "def fibonacci_generator(n): a, b = 0, 1 while a < 2 * n - 1: yield a a, b = b, a + b"} {"text": "[EN Wikipedia] Girls Do Not Joke\n\nGirls Do Not Joke (Italian: Ragazze non scherzate) is a 1929 Italian silent comedy film directed by Alfred Lind and starring Leda Gloria, Maurizio D'Ancora and Giuseppe Pierozzi. Cast Isa Bluette Maurizio D'Ancora Leda Gloria Piero Pastore Giuseppe Pierozzi References Bibliography Riccardo Redi. Cinema muto italiano: 1896-1930. Fondazione Scuola nazionale di cinema, 1999. External links 1929 films 1929 comedy films Italian silent feature films 1920s Italian-language films Films directed by Alfred Lind Italian black-and-white films Silent Italian comedy films 1920s Italian films"} {"text": "[CS Wikipedia] Evropa\n\nEvropa je území vnímané buďto jako jeden ze šesti světadílů v jejich tradičních pojetích, nebo jako západní část Eurasie. Ze severu jej ohraničuje Severní ledový oceán, ze západu Atlantský oceán, z jihu Středozemní a Černé moře spolu s vodními cestami, které je spojují, a z východu Asie (o přesném průběhu této části hranice nepanuje konsenzus). Jde o druhý nejmenší světadíl s rozlohou asi 10 058 912 km² (2009) (asi 7 % zemského povrchu), který je zároveň druhý nejhustěji zalidněný (asi 72 obyvatel/km²), takže asi 742 500 000 obyvatel Evropy (2013) představuje přibližně 9,6% podíl na světové populaci (údaje k roku 2009). V Evropě se mimo jiné formovala tzv. západní civilizace. Některé evropské národy hrály roli ve světovém dění v období kolonialismu od cca 16. století do počátku století 20., kdy byl jejich vliv zatlačen do pozadí Spojenými státy americkými – důvodem byla politická a národnostní různorodost Evropy, válečné boje obou světových válek, čtyřicetileté rozdělení Evropy tzv. železnou oponou a přijetí amerického dolaru jako základního mezinárodní platidla (tvorba měnových rezerv jednotlivých států apod.). Současná politická a jazyková pestrost Evropy komplikují snahy o její politickou centralizaci, včetně území, které jsou součástí Evropské unie. V Evropě se mluví 218 jazykyRaymond G. Gordon, Jr. (ed.): Ethnologue: Languages of the World, Fifteenth edition. Online version. SIL International, Dallas, Texas, 2005. Znakové řeči nejsou započítány. z nejméně 6 jazykových rodin (indoevropská, uralská, altajská, afroasijská, severokavkazská a baskičtina); naprostá většina mluvčích však připadá na jazyky indoevropské. Jednotlivé státy jsou obvykle založeny na národních základech. Název Název kontinentu se odvozuje z řeckého slova Ευρώπη (Európé) a prostřednictvím latinské podoby Europa pronikl do téměř všech jazyků světa. Etymologie vlastního výrazu Ευρώπη je nejasná: může pocházet od výrazu ευρωπός (europos) – „libě se nesoucí“, nebo ευρύς (eurys) – „široký, s velkýma očima“. Jiné teorie odvozují původ názvu od asyrského erebu – „západ (slunce)“ či od akkadského slova s významem „temný“. Podle řecké mytologie je název kontinentu spojován s bájnou postavou krásné Európy, dcery týrského krále Agénora, do níž se zamiloval sám vládce bohů Zeus. Aby mohl Európu unést, proměnil se v krásného bílého býka; když na něj zmámená dívka usedla, přeplul s ní moře na břeh vzdálené pevniny a posléze na ostrov Krétu. Európa mu zde dala tři syny: Mínoa, který se později stal krétským králem, Sarpédonta, který se stal králem v Lýkii, a Rhadamanta, pozdějšího člena podsvětního soudního tribunálu. Z Diovy vůle se Európa poté, co ji vládce bohů opustil, provdala za krétského krále Asteria. Její jméno nebylo nikdy zapomenuto, připomíná ji navždy název světadílu…"} {"text": "[DE Wikipedia] Barcode (Band)\n\nBarcode war eine dänische Hardcore-Band aus Aarhus. Sie war die Band von Gitarrist Jacob Bredahl, der von 1997 bis 2007 auch der Sänger von Hatesphere war. Geschichte Die Band wurde 1995 in Dänemark gegründet und veröffentlichte ein Jahr später ihr erstes Demo. Das Debütalbum Hard Jet Super Flash erschien 1997 und im Anschluss an die Aufnahmen zum Zweitwerk Beerserk ging Barcode mit Madball auf Europatournee. Während die Band auf den ersten beiden Alben „zumindest amtlichen Old School-Hardcore der erdigen Sorte“ spielte, attestierte das Ox-Fanzine dem dritten, schlicht Hardcore betitelten Werk eine „enorme Güteklasse“, die Pro-Pain mit einem „ähnlich fetten Biest […] nie mehr hinbekommen“ würden. Anschließend erfolgte der Wechsel zu Nuclear Blast, wo das vierte Album Showdown veröffentlicht wurde. Das bislang letzte Album Ahead of the Game erschien im Dezember 2006 bei dem italienischen Label Scarlet Records. Die Produktion übernahm Tue Madsen, als Gastsänger war Lou Koller von Sick of It All auf einem Stück zu hören. Stil Die Musik auf dem 1999 erschienenen Zweitwerk wurde vom Ox-Fanzine als „New York Hardcore mit einem kräftigen Schuß Streetpunk und englischem Oi! und ein kleines bißchen Metal“ bezeichnet. Auf dem fünften und bislang letzten Album führte New-Core.de Sick of It All, Terror, Ryker’s, Strife oder Hatebreed als Referenz an, deren „besten Momente“ verbunden und mit einer „gewissen eigenen Note verknüpft“ wurden. Weniger euphorisch zeigte sich der Rezensent von Metal.de, der ein „solides Hardcore Album mit rockigem Unterton und gutem Shouter“ erkannte. Diskografie 1996: Demo (Demo) 1997: Hard Jet Super Flash (Album, Diehard Music Worldwide, RRS) 1999: Beerserk (Album, Hardboiled) 2002: Hardcore (Album, Hardboiled) 2002: Ciaff Vs Barcode (Split-EP mit Ciaff, Nocturnal Music) 2005: Showdown (Single, Nuclear Blast) 2005: Showdown (Album, Nuclear Blast) 2006: Ahead of the Game (Album, Scarlet) Weblinks Einzelnachweise Hardcore-Punk-Band Dänische Band Kultur (Aarhus)"} {"instruction": "Read a code and identify the data type of the variables a and b", "input": "a = 8 b = \"Hello\"", "output": "A is an integer and B is a string."} {"instruction": "Create a function which takes in an array and returns a list of all the elements which appear only once in the array.", "input": "", "output": "def find_unique_elements(arr): unique_elements = [] for elem in arr: if arr.count(elem) == 1: unique_elements.append(elem) return unique_elements"} {"instruction": "Create a Python 3 function that takes a list of integers as an input and output the maximum sum of an increasing subsequence of the list.", "input": "[10, 12, 4, 6, 5, 3]", "output": "def max_inc_subseq_sum(arr):\n n = len(arr)\n \n max_sum = [0]*n\n \n for i in range(n):\n max_sum[i] = arr[i]\n \n for i in range(1, n):\n for j in range(i):\n if arr[i] > arr[j] and max_sum[i] < max_sum[j] + arr[i]:\n max_sum[i] = max_sum[j] + arr[i]\n \n return max(max_sum)\n\nprint(max_inc_subseq_sum([10, 12, 4, 6, 5, 3]))\n# Output: 22 (4 + 6 + 12)"} {"instruction": "Create an HTML form containing four text inputs: Name, Email, Phone Number and Address.", "input": "", "output": "
    "} {"instruction": "Convert the following JSON string to a valid Python dictionary.", "input": "'{\"name\": \"John\", \"age\": 32, \"city\": \"New York\"}'", "output": "data = json.loads('{\"name\": \"John\", \"age\": 32, \"city\": \"New York\"}')"} {"text": "[CS Wikipedia] Oldřich Kníchal\n\nOldřich Kníchal (9. ledna 1939 Humenné – 21. března 2021) byl novinář, spisovatel a překladatel, píšící česky, slovensky a esperantsky, překládal z maďarštiny. Život V Praze vystudoval historii a filologii, pracoval jako redaktor ČTK, přispíval do různých deníků, redigoval časopisy v esperantu. V roce 1979 se oženil s maďarskou esperantistkou Evou Tófalvi a přestěhoval se do Budapešti. Psal a překládal povídky a básně. Díla Jagavé bozky hviezd Zvony dolnozemské Kráľovstvo z iného sveta Suterén na sever Mlyny prozreteľnosti Predjarie More a čajka Storočiami slovenskej literatúry Fudži a Górajgó Překlady z maďarštiny do slovenštiny Nemes Nagy Ágnes - Ekhnáton az égben - Achnaton v nebi More a čajka, Trinásť poviedok súčasných maďarských autorov V esperantu nebo o esperantu Adiaŭ, Kuzko! (Sbohem, Kuzko) Adolesko (Dospívání) Antaŭ 70 jaroj fondiĝis Esperantista klubo en Praha (Před 70 lety byl založen esperantský klub v Praze) Bildo pri la epoko (Obraz doby – na okraj románu \"Jako voda v řece\" od R. Schwartze) Co nevíte o esperantu Doktor se zelenou hvězdou El mitologio (Z mytologie) Esperanto kiel pontolingva fenomeno (Esperanto jako fenomén jazykového mostu) Evakuado (Evakuace) Festotago (Svátek) Filino (Dcera) Jazykový problém v mezinárodních stycích Kníchal recenzas: Flugilhava ŝtono (Kníchal recenzuje. Okřídlený kámen) Komenio kaj la internacia lingvo (Komenský a mezinárodní jazyk – s V. Novobilským) Kiuj semas plorante (Kdo sejí s pláčem – román napsaný s manželkou Evou Tófalvi Lando promesita (Země zaslíbená) Lasta spektaklo (Poslední představení) La ŝtata teatro populara el Lodzo (Státní populární divadlo v Lodži) Ľudovít Štúr Maldormi en luna nokto (Bdít za měsíčné noci) Miraklo de Altamira (Zázrak v Altamiře) Naturvizioj (Přírodní vize) Některé aspekty jazykové politiky v mezinárodních stycích Odpověď bojujícího Vietnamu Patrino (Matka) Světadíl bez tlumočníků Teceremonio (Čajový rituál) Violono finludas (Housle dohrávají) Vizito ĉe Hemingway (Návštěva u Heminwaye) Související články Esperantská literatura Externí odkazy Životopis O. Kníchala ve slovenštině Kníchalův projekt překladů z maďarštiny do slovenštiny Čeští esperantisté Čeští novináři Čeští spisovatelé 20. století Spisovatelé píšící slovensky Spisovatelé píšící česky Spisovatelé píšící esperantem Překladatelé z maďarštiny Překladatelé do slovenštiny Slovenští esperantisté Narození v roce 1939 Narození 9. ledna Narození v Humenném Úmrtí v roce 2021 Úmrtí 21. března Muži"} {"instruction": "In Python, create an algorithm for efficiently sorting a list of numbers in ascending order.", "input": "[4,7,2,1,11,0,29]", "output": "def sort_list(numbers):\n for i in range(len(numbers)-1):\n for j in range(i+1, len(numbers)):\n if numbers[i] > numbers[j]:\n numbers[i], numbers[j] = numbers[j], numbers[i]\n return numbers"} {"instruction": "Develop a Python program that finds the maximum value in a given array.", "input": "[1, 2, 7, 4, 5]", "output": "def findMax(arr):\n max = arr[0]\n for i in range(1, len(arr)):\n if max < arr[i]:\n max = arr[i]\n return max\n\nmax_num = findMax([1,2,7,4,5])\nprint(max_num)"} {"text": "[CS Wikipedia] Margaret Beachamová\n\nMargaret Beachamová (* 28. září 1946) je bývalá britská atletka, běžkyně, která se věnovala středním tratím. Sportovní kariéra Na přelomu 60. a 70. let 20. století patřila k evropské mílařské špičce. Jejím největším úspěchem je titul halové mistryně Evropy v běhu na 1500 metrů z roku 1971. Externí odkazy Profil na trackfield.brinkster.net Narození v roce 1946 Britští běžci Mistryně Evropy v běhu na 1 500 m Žijící lidé Ženy Narození 28. září"} {"instruction": "Build a Python program to print out the 3 largest odd numbers in a given list.", "input": "[4, 7, -1, 2, 8, 5]", "output": "list_of_nums = [4, 7, -1, 2, 8, 5]\n\nlargest_odd_numbers = []\n\nfor num in list_of_nums:\n if num % 2 != 0 and len(largest_odd_numbers) < 3:\n largest_odd_numbers.append(num)\n\nlargest_odd_numbers.sort()\nprint (largest_odd_numbers)"} {"instruction": "Given a list of strings, write a Python program to calculate the maximum length of a string.", "input": "list_of_strings = [\"dog\", \"cat\", \"elephant\", \"bird\"]", "output": "max_length = 0\n\nfor string in list_of_strings:\n max_length = max(max_length, len(string))\n\nprint(max_length)"} {"text": "[CS Wikipedia] Martin Horváth\n\nMartin Horváth (27. prosince 1982 – 21. dubna 2016 Tomice II) byl český fotbalový záložník. Jeho bratrem je zpěvák Vlastimil Horváth. Fotbalová kariéra V české lize hrál za FC Marila Příbram. Nastoupil ve 3 ligových utkáních. Ligová bilance Literatura Radovan Jelínek, Miloslav Jenšík a kol.: Atlas českého fotbalu − Radovan Jelínek 2006 Externí odkazy HET Liga Vlasta Horváth promluvil o tragicky zesnulém bratrovi! Před dvěma lety zemřel při autonehodě Fotbal.idnes.cz Zdrcující zpráva pro hvězdu SuperStar: Bratr Vlasty Horvátha se zabil! Ďolíček pláče. Zemřel Martin Horváth, brácha vítěze Superstar Čeští fotbalisté Romští fotbalisté Čeští Romové Fotbalisté FK Viagem Příbram Fotbalisté FK Chmel Blšany Fotbalisté Bohemians Praha 1905 Narození v roce 1982 Narození 27. prosince Úmrtí v roce 2016 Úmrtí 21. dubna Muži"} {"instruction": "Create a python program to assess whether or not a movie genre is representing violent behavior, given a review of the movie.", "input": "Review: The movie is full of thrilling action scenes and lots of violence.", "output": "\"\"\"\nCreate a program to assess whether or not a movie genre is representing violent behaviour\n\"\"\"\n\nimport nltk\nfrom nltk.tokenize import word_tokenize\n\ndef classify_movie(review):\n # Tokenize review\n tokens = word_tokenize(review)\n\n # Check for violent words in the review\n violent_words = ['violence', 'violent', 'killing', 'fight', 'bloody', 'war']\n\n for token in tokens:\n if token in violent_words:\n return 'Yes'\n\n return 'No'\n\nif __name__ == '__main__':\n review = 'The movie is full of thrilling action scenes and lots of violence.'\n result = classify_movie(review)\n print(result)"} {"instruction": "Design a sorting algorithm in Python that is capable of sorting very large lists.", "input": "[25, 6, 7, 3, 12, 89, 74, 55]", "output": "def sort(array):\n for i in range(len(array)):\n low = i\n for j in range(i+1, len(array)):\n if array[low] > array[j]:\n low = j\n array[i], array[low] = array[low], array[i]\n return array\n \nexample = [25, 6, 7, 3, 12, 89, 74, 55]\nsorted_array = sort(example)\nprint(sorted_array)"} {"instruction": "Create a function to add two integers x and y.", "input": "", "output": "def add_two_integers(x, y): return x + y"} {"instruction": "Write a function that returns the day of the week given a date.", "input": "date = '2020-12-30'", "output": "date = '2020-12-30' import datetime def getDayofWeek(date): # Convert the string to datetime d = datetime.datetime.strptime(date, \"%Y-%m-%d\") # Return the day of the week return d.strftime(\"%A\") print(f\"The day of the week for {date} is {getDayofWeek(date)}.\")"} {"instruction": "Create a SQL query that returns the maximum and minimum order amounts from the database.", "input": "", "output": "SELECT MAX(order_amount) AS max_order, MIN(order_amount) AS min_order FROM orders;"} {"instruction": "Create a class named “Vehicle” that has 3 instance variables.", "input": "", "output": "class Vehicle: def __init__(self, name, color, max_speed): self.name = name self.color = color self.max_speed = max_speed"} {"instruction": "Use the OpenGL API to create a vertex buffer object (VBO).", "input": "", "output": "GLuint vbo; glGenBuffers(1, &vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo);"} {"instruction": "Add a try-except clause to the given code to catch IndexError exceptions.", "input": "list1 = [1, 2, 3] print(list1[5])", "output": "try: list1 = [1, 2, 3] print(list1[5]) except IndexError: print(\"IndexError occurred.\")"} {"instruction": "Find the index of the letter 'a' in the string 'abcde'.", "input": "string = \"abcde\"", "output": "Index of 'a' in the given string is 0."} {"text": "[DE Wikipedia] Amalie Christiane von Baden\n\nKatharina Amalie Christiane Luise von Baden (* 13. Juli 1776 in Karlsruhe; † 26. Oktober 1823 in Bruchsal) war eine Prinzessin von Baden. Biografie Familie Amalie war die älteste Tochter des Erbprinzen Karl Ludwig von Baden und der Erbprinzessin Amalie von Hessen-Darmstadt und die Zwillingsschwester von Karoline, spätere Königin von Bayern, sowie älteste Schwester von Louise, später als Zarin Elisabeth Alexejewna von Russland bekannt, und Friederike, spätere Königin von Schweden. Ihr einziger Bruder Karl Louis folgte seinem Großvater als zweiter Großherzog von Baden. Da sie zeitlebens unverheiratet blieb, lebte Amalie Christiane abwechselnd bei ihren Schwestern Karoline und Elisabeth, in Bayern bzw. Russland, oder am badischen Hofe. Heiratspläne Heiratsversuch mit Preußen Obwohl Amalie Christiane bis zu ihrem Lebensende ledig blieb, gab es mehrfach den Versuch, sie standesgemäß zu verheiraten. Als Erste strebte ihre Tante mütterlicherseits, Königin Friederike von Preußen, danach ihren Sohn, Kronprinz Friedrich Wilhelm III., mit einer ihrer Nichten zu verehelichen. Friederikes Ziel war, die Freundschaft zwischen den beiden Ländern weiter zu vertiefen. Jedoch zeigte Friedrich Wilhelm III. wenig Interesse an seinen badischen Cousinen. Weder für die als hübsch geltende Karoline, noch für die als unattraktiv angesehene Amalie Christiane konnte er sich erwärmen. Gegen den Willen seiner Mutter heiratete Friedrich Wilhelm schließlich Luise von Mecklenburg-Strelitz. Noch während der Hochzeitsverhandlungen mit Preußen traten zwei weitere Heiratskandidaten an den Hof in Karlsruhe heran. Dies waren Erbprinz Friedrich von Anhalt-Dessau und Wilhelm, Prinz von Großbritannien und Herzog von Clarence und St. Andrews. Beide wurden jedoch vertröstet, solange die Verhandlungen mit Preußen andauerten. Aufgrund der lang anhaltenden preußischen Verhandlungen verloren beide schließlich das Interesse. So blieben zwischen 1791 und 1793 drei Heiratsverhandlungen erfolglos. In den Folgejahren ergaben sich für Amalie Christiane vorerst keine weiteren Heiratsmöglichkeiten. So reiste sie viel und besuchte ihre beiden Schwestern an den bayerischen bzw. russischen Höfen. Dort verweilte sie auch für einige Jahre. Heiratsversuch mit Österreich Im Jahre 1811 besuchte Amalie Christiane, mittlerweile 35-jährig, den kaiserlichen Hof Österreichs zu Wien. Kaiser Franz I. gedachte bald, seinen Bruder Erzherzog Karl mit der badischen Prinzessin zu verehelichen. Karl und Amalie Christiane kannten sich bereits seit ihrer Jugend, Karl fand die Prinzessin aber nicht sehr anziehend. Der Hof zu Baden befürchtete derweil, dass es durch diese Ehe zu politischen Konflikten mit ihrem Verbündeten und Gönner Kaiser Napoléon I. Bonaparte kommen könnte. So wurde um dessen Zustimmung gebeten. Napoléon…"} {"instruction": "Code a function in R which concatenates two strings of a given length and returns the resulting string.", "input": "let string1 = \"Hello\"; let string2 = \"World\"; let length = 10;", "output": "concat_strings <- function(string1, string2, length) { return( substr(paste0(string1,string2), 1, length) ) }"} {"instruction": "Write a JavaScript function to create an array with given size and filled with the characters given in second argument.", "input": "3, \"*\"", "output": "``` function createArray(size, character) { let arr = []; for (let i = 0; i < size; i++) { arr[i] = character; } return arr; }; ```"} {"instruction": "Optimize the following Python code to compute the sum of even numbers in a list.", "input": "my_list = [1, 2, 3, 4, 5, 6]\ntotal = 0\nfor num in my_list:\n if num % 2 == 0:\n total += num\nprint(total)", "output": "my_list = [1, 2, 3, 4, 5, 6]\n\n# sum comprehension \ntotal = sum(num for num in my_list if num % 2 == 0)\nprint(total)"} {"instruction": "Write a script in Python to format a date.", "input": "", "output": "import datetime \nnow = datetime.datetime.now().strftime(\"%d/%m/%Y\") \nprint(now)"} {"instruction": "Create an SQL table with four columns and necessary parameters.", "input": "", "output": "CREATE TABLE mytable ( id INTEGER NOT NULL, name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, age INTEGER NOT NULL, PRIMARY KEY(id) );"} {"instruction": "Implement Binary Search in Python", "input": "[2, 3, 4, 5, 11, 19, 20]", "output": "# function to do binary search def binarySearch(array, x): l, r = 0, len(array)-1 while l <= r: mid = l + (r - l)//2; # Check if x is present at mid if array[mid] == x: return mid # If x is greater, ignore left half elif array[mid] < x: l = mid + 1 # If x is smaller, ignore right half else: r = mid - 1 # If we reach here, then the element # was not present return -1 array = [2, 3, 4, 5, 11, 19, 20] x = 11 result = binarySearch(array, x) if result != -1: print (\"Element is present at index\", result) else: print (\"Element is not present in array\")"} {"text": "[CS Wikipedia] Dehtáře (Žabovřesky)\n\nVes Dehtáře () se nachází v okrese České Budějovice, kraj Jihočeský, zhruba 14 km ZSZ od Českých Budějovic a představuje jednu ze dvou částí obce Žabovřesky. Historie První písemná zmínka o vesnici pochází z roku 1334. Archeologické nálezy však dokládají neolitické sídliště z 5. tisíciletí před naším letopočtem. Po roce 1850 spadaly Dehtáře pod Čakov. V letech 1924–1943 a opět 1945–1960 byly samostatnou obcí. Během války a definitivně od roku 1960 jsou součástí Žabovřesk. V roce 2011 zde trvale žilo 75 obyvatel. Pamětihodnosti Kaple sv. Floriana z poloviny 19. století Boží muka na východním konci vesnice Rybník Dehtář vybudovaný Rožmberky v době největšího rozkvětu hlubockého rybářství na přelomu 15. a 16. století, byl napuštěn v roce 1479 a má rozlohu 260 ha. U cesty na hrázi rybníka roste památný dub. Pomník padlým v první světové válce postavený v roce 1928 Příroda V katastrálním území Dehtáře u Českých Budějovic je ptačí oblast Dehtář (kód lokality CZ0311038). Odkazy Reference Externí odkazy Dehtáře na webu Selské baroko Web Mikroregion Blanský les - podhůří, Dehtáře jsou pod Žabovřesky Vesnice v okrese České Budějovice Sídla v Českobudějovické pánvi Žabovřesky (okres České Budějovice)"} {"instruction": "Convert the following list of strings to a dictionary whose keys are numbers and whose values are strings.", "input": "list1 = [\"One\", \"Two\", \"Three\"]", "output": "dict1 = {} for i, s in enumerate(list1): dict1[i+1] = s Input: list1 = [\"One\", \"Two\", \"Three\"] Output: dict1 = {1: \"One\", 2: \"Two\", 3: \"Three\"}"} {"instruction": "Generate a Python function that takes a string and reverses its order of characters.", "input": "", "output": "def reverse_string(my_string):\n reversed_string = ''\n for i in range(len(my_string) - 1, -1, -1):\n reversed_string += my_string[i]\n\n return reversed_string"} {"instruction": "Write a shell script to print the unique values from an array.", "input": "[1, 2, 2, 3, 4, 4, 5]", "output": "#!/bin/bash InputArray=(1 2 2 3 4 4 5) echo \"Unique values in the array: \" echo $(echo \"${InputArray[@]}\" | tr ' ' '\\n' | sort -u | tr '\\n' ' ')"} {"instruction": "Create an algorithm in Python that receives an array of integers and returns an array with the unique values of the input array.", "input": "", "output": "def unique(arr): \n uniq_arr = []\n for x in arr:\n if x not in uniq_arr: \n uniq_arr.append(x) \n return uniq_arr"} {"text": "[EN Wikipedia] Treaty of the Cedars\n\nThe Treaty of the Cedars was concluded on the Fox River, west of what is today the village of Little Chute, Wisconsin, on September 3, 1836. Under the treaty, the Menominee Indian nation ceded to the United States about of land for $700,000. The Wisconsin cities of Marinette, Oconto, Appleton, Neenah, Menasha, Oshkosh, Wausau, Wisconsin Rapids, and Stevens Point are today within this area, along with many other towns. The treaty was concluded after six days of meetings. Governor Henry Dodge and Menominee Chief Oshkosh later represented the two sides. The treaty was proclaimed February 15, 1837, and the Indians began moving to their new homes west of the Wolf River. Today there is a Wisconsin historical marker at the site where the treaty was signed. See also Treaty of Washington, with Menominee (1831) Sources Wisconsin Historical Society Notes Native American history of Wisconsin Pre-statehood history of Wisconsin Cedars 1836 treaties 1836 in the United States September 1836 events"} {"text": "[HI Wikipedia] अनुरूप संकेत\n\nअनुरूप संकेत या एनालॉग सिग्नल (अंग्रेजी:Analog signal), एक सतत संकेत है जिसका समय परिवर्ती गुण (चर) किसी अन्य समय परिवर्ती राशि को निरूपित करता है, यानि यह उस दूसरे समय परिवर्ती संकेत के अनुरूप होता है। उदाहरण के लिए, एक अनुरूप श्रव्य संकेत (एनालॉग ऑडियो सिग्नल) में, संकेत की तात्कालिक वोल्टता (वोल्टेज) ध्वनि तरंगों के दाब के साथ लगातार बदलती रहती है। यह एक अंकीय संकेत (डिजिटल सिग्नल) से भिन्न होता है, जिसमें एक सतत राशि का निरूपण एक असतत फलन द्वारा किया जाता है जो परिमित संख्या के मूल्यों में से सिर्फ एक को ही ले सकता है। आमतौर पर अनुरूप संकेत, विद्युत संकेतों को संदर्भित करता है, तथापि, यांत्रिक, वायवीय, हाइड्रोलिक और अन्य प्रणालियां भी अनुरूप संकेतों की वाहक हो सकती हैं। १ सन्दर्भ विद्युत परिपथ"} {"text": "[EN Wikipedia] Algorithms (journal)\n\nAlgorithms is a monthly peer-reviewed open-access scientific journal of mathematics, covering design, analysis, and experiments on algorithms. The journal is published by MDPI and was established in 2008. The founding editor-in-chief was Kazuo Iwama (Kyoto University). From May 2014 to September 2019, the editor-in-chief was Henning Fernau (Universität Trier). The current editor-in-chief is Frank Werner (Otto-von-Guericke-Universität Magdeburg). Abstracting and indexing According to the Journal Citation Reports, the journal has a 2022 impact factor of 2.3. The journal is abstracted and indexed in: See also Journals with similar scope include: ACM Transactions on Algorithms Algorithmica Journal of Algorithms (Elsevier) References External links Computer science journals Open access journals MDPI academic journals English-language journals Academic journals established in 2008 Mathematics journals Monthly journals"} {"instruction": "Store this JSON data into a database of your choice.", "input": "[ { \"name\": \"Bob\", \"age\": 30, \"city\": \"New York\" }, { \"name\": \"Alice\", \"age\": 25, \"city\": \"San Francisco\" } ]", "output": "Using MongoDB: const MongoClient = require('mongodb').MongoClient; const users = [ { \"name\": \"Bob\", \"age\": 30, \"city\": \"New York\" }, { \"name\": \"Alice\", \"age\": 25, \"city\": \"San Francisco\" } ]; const url = 'mongodb://localhost:27017'; const dbName = 'myDatabase'; MongoClient.connect(url, {useNewUrlParser: true}, (err, client) => { if(err){ console.log(\"Error connecting to database \" + err); return; } else { console.log(\"Successfully connected to database\"); const db = client.db(dbName); const collection = db.collection('users'); collection.insertMany(users, (err, result) => { if(err){ console.log(\"Error inserting users: \" + err); } else { console.log(\"Successfully inserted users into database\"); } }); } });"} {"text": "[EN Wikipedia] Prince-Désir Gouano\n\nPrince Désiré Gnahoré Gouano (born 24 December 1993), known as Prince-Désir Gouano, is a French professional footballer who plays as a defender. He primarily plays as a centre-back in a four or three man back-line. Club career Le Havre Born in Paris, Gouano began his career with the CFF Paris youth academy. In 2007, he was transferred to Le Havre at the age of 14. At Le Havre, he worked his way through the club's youth academy until 2010, when he joined his team's B squad. Gouano went on to make 12 CFA appearances in Group A of the 2010–11 season, prior to earning his debut for the first team. On 27 May 2011, he made his professional debut with Le Havre's senior team in a league match against Metz. That would ultimately prove to be his first and only first team appearance for the French outfit, prior to his transfer to Italian champions, Juventus in the summer of 2011. Juventus On 31 July 2011, Gouano was officially transferred to Juventus, where he was enlisted into the club's Primavera youth team, where he was a first team regular in the side that won 2012 Viareggio Tournament. Gouano was promoted from the youth academy ahead of the 2012–13 Serie A campaign, though he was loaned out to Serie B outfit, Virtus Lanciano on 29 August 2012. He was joined by fellow Juventus loanee Nicola Leali just two days later. During his loan spell with the newly promoted Serie B side, Gouano made just 1 first team appearance in a 0–3 home loss to Bari on 17 November 2012 after spending much of his time with the club's youth squad. Juventus recalled the player during the January market, and loaned him to fellow Serie B side, Vicenza Calcio in a multiple player part-exchange deal. On 25 August 2013, it was announced that Gouano was again sent on loan at Dutch side RKC Waalwijk for the remainder of the season. Atalanta On 2 September 2013, it was announced that Gouano was transferred from Juventus to Atalanta, along with Edoardo Ceria, as part of the deal that Juve signed Luca Barlocco. On 10 September 2013, it was announced that Gouano would still be sent on loan at Dutch side RKC Waalwijk for the remainder of the season. In June 2014, Atalanta acquired Gouano outright by selling James Troisi back to Juventus. Bolton Wanderers (loan) Gouano signed for Bolton Wanderers on 6 August 2015. Amiens On 2 July 2017, Atalanta announced that the club had sold Gouano to Ligue 1 newcomer Amiens SC. International career Gouano is a France youth international, having earned caps at under-18 and under-19 level. Career statistics Club Honours Juventus Viareggio Tournament: 2012 Supercoppa Italiana: 2012 References External links Voetbal International profile 1993 births Living people Men's association football central defenders French men's footballers French expatriate men's…"} {"text": "[DE Wikipedia] Wasserburg Schloß-Nauses\n\nDie Wasserburg Schloß-Nauses befindet sich in der Gemeinde Otzberg im südhessischen Landkreis Darmstadt-Dieburg in einem Tal bei etwa 170 m über NN südöstlich des Otzbergs. Nahe der Wasserburg liegen die Örtchen Schloß-Nauses und Ober-Nauses. Geschichte 766 kam das Gebiet um den Otzberg, wozu auch Nauses gehört, durch eine Schenkung König Pippins an die Abtei Fulda. Im 14. Jahrhundert besaß Ritter Kilian das Dorf Ober-Nauses sowie Güter zu Nieder-Nauses als fuldisches Lehen und hatte für den Schutz der Besitzgüter eine Burg erbaut oder eine ältere Anlage übernommen. Die Burg war als Talsperre gegen das Mümlingtal gerichtet. 1357 erwarb Diether Gans von Otzberg den Besitz. Nach Beendigung der Lehnshoheit der Pfalzgrafen erhielt 1471 Philipp Gans II. von Otzberg Sloßlin Nuwses von Pfalzgraf Friedrich I. als Lehen. Dies ist die erste urkundliche Erwähnung von Schloß-Nauses. Er erneuerte die Anlage und ließ gegen Ende des 15. Jahrhunderts die noch heute bestehenden Gebäude errichten. Nach dem Aussterben der Gans von Otzberg kam 1698 die Burg an die Freiherrn von Sickingen, welche sie 1792 den Fürsten von Löwenstein-Wertheim-Rosenberg überließen. 1806 fiel sie durch den Reichsdeputationshauptschluss an Hessen-Darmstadt. Heute befindet sich Schloß-Nauses in Privatbesitz. Die Besitzer betrieben dort eine Gastwirtschaft, die aber Stand November 2018 schon länger geschlossen ist. Baubeschreibung Ursprünglich wurde das Schloss Nauses als Wasserburg angelegt, die von dem im Talgrund direkt daneben vorbeifließenden Bach gespeist wurde. Die in etwa trapezförmige Anlage mit Seitenlängen von 26 m × 32 m war von einer Ringmauer, knapp 5 Meter hoch und 0,85 m mächtig und einem Wassergraben umgeben, allerdings ist von den Wehranlagen, Gräben und den Wirtschaftsgebäuden nichts mehr zu sehen (nur den Ansatz der Ringmauer am Torturm). Das Haupthaus (Herrenhaus) und der Torturm sind noch erhalten. Die vorhandenen Nebengebäude wurden im 19. und 20. Jahrhundert errichtet. Die Reste sind jedoch ein gutes Beispiel eines spätmittelalterlichen Niederadelssitzes. Herrenhaus Das schmale rechteckige Haupthaus (Herrenhaus) wurde im 15. Jahrhundert erbaut und erhebt sich auf einem sehr hohen, massiv aufgemauerten Sockel- und Erdgeschoss, während das Obergeschoss in Fachwerk ausgeführt ist (um 1500). An der südlichen Giebelseite des Herrenhauses ist ein Erker vorgebaut, in dessen Erdgeschoss ein originales dreiteiliges Fenster aus der Gründerzeit erhalten ist. 1583 wurde ein halbrunder Treppenturm an das Herrenhaus angefügt. Über seinem Eingang, der als Rundbogen ausgeführt wurde, befindet sich der Wappenschild der Gans von Otzberg und der Schelme von Bergen mit Jahresangabe. Das früher hohe Satteldach wurde um 1900 abgeflacht. Torturm Der heute freistehende Torturm aus…"} {"instruction": "For a given list of numbers, write a palindrome checker.", "input": "sample = [1, 2, 3, 4, 5, 4, 3, 2, 1]", "output": "def is_palindrome(sample): res = True i = 0 j = len(sample) - 1 while i < j: if sample[i] != sample[j]: res = False break else: i += 1 j -= 1 return res"} {"instruction": "Generate a regular expression that matches any number that is greater than 0.", "input": "No input", "output": "/[1-9]\\d*\\.?\\d*|0\\.\\d*[1-9]\\d*/"} {"instruction": "Create an API using Python Flask that returns a list of customer data fetched from a database. The API should be able to handle requests with query parameters to filter the results based on customer name.", "input": "Not applicable", "output": "\"\"\"\nFlask API to return customer data\n\"\"\"\n\nimport sqlite3\nfrom flask import Flask, jsonify, request, g\n\nDATABASE = 'customer_database.db'\n\napp = Flask(__name__)\n\ndef get_db():\n db = getattr(g, '_database', None)\n if db is None:\n db = g._database = sqlite3.connect(DATABASE)\n return db\n\n@app.teardown_appcontext\ndef close_connection(exception):\n db = getattr(g, '_database', None)\n if db is not None:\n db.close()\n\n@app.route('/customers', methods=['GET'])\ndef get_customers():\n query_parameters = request.args\n sqlCursor = get_db().cursor().execute(\"SELECT * FROM customers\")\n customers = [dict(zip([key[0] for key in sqlCursor.description], row)) for row in sqlCursor.fetchall()]\n if len(query_parameters) > 0:\n customers = filter_customers(customers, query_parameters)\n \n return jsonify(customers)\n\ndef filter_customers(customers, query_parameters):\n filtering_params = {}\n for param in query_parameters:\n if param not in ['name']:\n return \"Input not valid\"\n filtering_params[param] = query_parameters[param]\n \n filtered_customers = []\n for customer in customers:\n for key in filtering_params.keys():\n if customer[key] == filtering_params[key]:\n filtered_customers.append(customer)\n \n return filtered_customers\n\nif __name__ == \"__main__\":\n app.run(host=\"localhost\", port=5000, debug=True)"} {"instruction": "Train a machine learning model to classify cats and dogs.", "input": "", "output": "\"\"\" Train a machine learning model to classify cats and dogs \"\"\" import numpy as np import pandas as pd import matplotlib.pyplot as plt from keras.preprocessing.image import ImageDataGenerator from keras.models import Sequential from keras.layers import Conv2D, MaxPooling2D from keras.layers import Activation, Dropout, Flatten, Dense from keras import backend as K # Setting up Image Data Generator train_data_dir = 'data/train' validation_data_dir = 'data/validation' img_width, img_height = 100, 100 train_datagen = ImageDataGenerator( rescale=1. / 255, shear_range=0.2, zoom_range=0.2, horizontal_flip=True) test_datagen = ImageDataGenerator(rescale=1. / 255) train_generator = train_datagen.flow_from_directory( train_data_dir, target_size=(img_width, img_height), batch_size=32, class_mode='binary') validation_generator = test_datagen.flow_from_directory( validation_data_dir, target_size=(img_width, img_height), batch_size=32, class_mode='binary') # Setting up the model model = Sequential() model.add(Conv2D(32, (3, 3), input_shape=(img_width, img_height, 3))) model.add(Activation('relu')) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Conv2D(32, (3, 3))) model.add(Activation('relu')) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Conv2D(64, (3, 3))) model.add(Activation('relu')) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Flatten()) model.add(Dense(64)) model.add(Activation('relu')) model.add(Dropout(0.5)) model.add(Dense(1)) model.add(Activation('sigmoid')) model.compile(loss='binary_crossentropy', optimizer='rmsprop', metrics=['accuracy']) # Training the model model.fit_generator( train_generator, steps_per_epoch=2000, epochs=50, validation_data=validation_generator, validation_steps=800)"} {"instruction": "Write a code to create a function to rotate a given linked list.", "input": "", "output": "\"\"\" Create a function to rotate a given linked list \"\"\" # Create a class node class Node: # Create a constructor to initialise the node object def __init__(self, data): self.data = data self.next = None class LinkedList: # Create a constructor to initialise the linked list def __init__(self): self.head = None # Create a function to rotate the linked list def rotate(self, index): if (index == 0): return prev = None curr = self.head while (index > 0): prev = curr curr = curr.next index -= 1 prev.next = None self.head = curr while (curr.next != None): curr = curr.next curr.next = self.head"} {"instruction": "Edit the following python code such that it can take a list of elements and return the distinct elements in the list", "input": "def unique_elements(lst): \n elements = [] \n for num in lst: \n if num not in elements: \n elements.append(num) \n return elements", "output": "def unique_elements(lst): \n elements = [] \n for num in lst: \n if num not in elements: \n elements.append(num) \n return list(set(elements))"} {"instruction": "Develop a web service to convert a temperature value from Fahrenheit to Celsius.", "input": "Temperature in Fahrenheit: 98", "output": "#!/bin/bash import web urls = ( '/convert', 'ConvertFahrenheitToCelcius' ) app = web.application(urls, globals()) class ConvertFahrenheitToCelcius: def GET(self): web.header('Content-Type', 'text/plain; charset=utf-8') tempFahrenheit = web.input().t tempCelcius = (tempFahrenheit - 32) * (5/9) return str(tempCelcius) if __name__ == \"__main__\": app.run()"} {"instruction": "Create a HTML table element with 4 columns and 5 rows.", "input": "", "output": "
    Column1 Column2 Column3 Column4
    Row1 Row1 Row1 Row1
    Row2 Row2 Row2 Row2
    Row3 Row3 Row3 Row3
    Row4 Row4 Row4 Row4
    Row5 Row5 Row5 Row5
    "} {"instruction": "We have a list of numbers and a given sum. Write a program to determine if any two numbers from the list sum up to the given sum.", "input": "[1,2,3,4], 6", "output": "def two_sum(nums, target): for i in range(len(nums) - 1): for j in range(i+1, len(nums)): if nums[i] + nums[j] == target: return (i, j) return -1"} {"instruction": "Generate code to programmatically generate the Fibonacci Sequence in Python.", "input": "Not applicable", "output": "def fibonacci(n):\n a, b = 0, 1\n for i in range(n):\n a, b = b, a + b\n return a\n \nfor i in range(10):\n print(fibonacci(i))"} {"text": "[CS Wikipedia] Anexe Savojska\n\nAnnexe Savojska je obecný název používaný pro připojení (réunion, podle výrazu použitého ve smlouvě) Savojska (budoucí departmenty Savojsko a Horní Savojsko), tou dobou součástí Sardinského království, k Francii v roce 1860. Stalo se tak na základě dohody mezi oběma zeměmi, kdy Francie získala tato území výměnou za pomoc ve válce proti Rakousku. Ačkoliv bylo vévodství okupováno, resp. anektováno opakovaně, termín se odkazuje na ustanovení o připojení ve smyslu prvního článku Turínské smlouvy z 24. března 1860. Odkazy Poznámky Reference Externí odkazy Historie Savojska Anexe"} {"instruction": "Generate a program in Python to print the union of two given sets.", "input": "[1, 2, 3], [2, 3, 4, 5]", "output": "def union_sets(set1, set2):\n return list(set(set1) | set(set2))\n\nset1 = [1, 2, 3]\nset2 = [2, 3, 4, 5]\n\nprint(union_sets(set1, set2)"} {"instruction": "Create a method that deletes all the empty elements from a given array of strings.", "input": "arr = [\"a\", \"\", \"b\", \"\", \"c\"]", "output": "def delete_empty_elements(arr): return [e for e in arr if e] # Output: [\"a\", \"b\", \"c\"]"} {"instruction": "Use the given test data to debug the following code.", "input": "def check_odd_even(number): if number % 2 == 0: print(\"even\") else: print(\"odd\") Test data: 1. number: 4 2. number: -7", "output": "Test 1: check_odd_even(4) Output: 'even' Test 2: check_odd_even(-7) Output: 'odd'"} {"text": "[EN Wikipedia] Marlbrook, Virginia\n\nMarlbrook is an unincorporated community in Rockbridge County, Virginia, United States. It sits at an elevation of 1204 feet (367 m). References Unincorporated communities in Rockbridge County, Virginia Unincorporated communities in Virginia"} {"text": "[HI Wikipedia] तक्षक\n\nहिन्दू पौराणिक कथाओं के अनुसार, तक्षक नागों में से एक नाग जो कश्यप का पुत्र था और कद्रु के गर्भ से उत्पन्न हुआ था श्रृंगी ऋषि का शाप पूरा करने के लिये राजा परीक्षित को इसी ने काटा था। इसी कारण राजा जनमेजय इससे बहुत बिगड़े और उन्होंने संसार भर के नागों का नाश करने के लिये नागयज्ञ आरंभ किया। तक्षक इससे डरकर इंद्र की शरण में चला गया। इसपर जनमेजय ने अपने ऋषियों को आज्ञा दी कि इंद्र यदि तक्षक को न छोड़े, तो उसे भी तक्षक के साथ खींच मँगाओ और भस्म कर दो। ऋत्विकों के मंत्र पढ़ने पर तक्षक साथ इंद्र भी खिंचने लगे। तब इंद्र ने डरकर तक्षक को छोड़ दिया। जब तक्षक खिंचकर अग्निकुंड के समीप पहुँचा, तब आस्तीक ने आकर जनमेजय से प्रार्थना की और तक्षक के प्राण बच गए। कुछ विद्धानों का विश्वास है कि प्राचीन काल में भारत में तक्षक नाम की एक जाति ही निवास करती थी। नाग जाति के लोग अपने आपको तक्षक की संतान ही बतलाते हैं। प्राचीन काल में ये लोग नाग का पूजन करते थे। कुछ पाश्चात्य विद्वानों का मत है कि प्राचीन काल में कुछ विशिष्ट अनार्यों को हिंदू लोग तक्षक या नाग कहा करते थे। और ये लोग संभवतः शक थे। तिब्बत, मंगोलिया और चीन के निवासी अबतक अपने आपको तक्षक या नाग के वंशधर बतलाते हैं। महाभारत के युद्ध के उपरान्त धीरे धीरे तक्षकों का अधिकार बढ़ने लगा और उत्तर-पश्चिम भारत में तक्षक लोगों का बहुत दिनों तक, यहाँ तक कि सिकन्दर के भारत आने के समय तक राज्य रहा। इनका जातीय चिह्न नाग था। ऊपर परीक्षित और जनमेजय की जो कथा दी गई है, उसके संबंध में कुछ पाश्चात्य विद्वानों का गत है कि तक्षकों के साथ एक बार पांडवों का बड़ा भारी युद्ध हुआ था जिसमें तक्षकों की जीत हुई थी ओर राजा परीक्षित मारे गए थे, और अंत से जनमेजय ने फिर तक्षशिला में युद्ध करके तक्षकों का नाश किया था और यही घटना जनमेजय के नागयज्ञ के नाम से प्रसिद्ध हुई है। नागोंं में शेषनाग सबसे बड़े और तक्षक दूसरे स्थान के भाई हैं जब शेषनाग भगवान विष्णु की शरण में गए तब नागलोक से जाते जाते छोटे भाई तक्षक का राजतिलक किया तथा उन्हें नागराज के पद पर अभिषिक्त किया। गरुड पुराण के अनुसार गरुड पुराण में महर्षि कश्यप और तक्षक नाग को लेकर एक सुन्दर उपाख्यान दिया गया है। ऋषि शाप से जब राजा परीक्षित को तक्षक नाग डसने जा रहा था, तब मार्ग में उसकी भेंट कश्यप ऋषि से हुई। तक्षक ने ब्राह्मण का वेश धरकर उनसे पूछा कि वे इस तरह उतावली में कहां जा रहे हैं? इस पर कश्यप ने कहा कि तक्षक नाग महाराज परीक्षित को डसने वाला है। मैं उनका विष प्रभाव दूर करके उन्हें पुन: जीवन दे दूंगा। यह सुनकर तक्षक ने अपना परिचय दिया और उनसे लौट जाने के लिए कहा। क्योंकि उसके विष-प्रभाव से आज तक कोई भी व्यक्ति जीवित नहीं बचा था। तब कश्यप ऋषि ने कहा कि वे अपनी मन्त्र शक्ति से राज परीक्षित का विष-प्रभाव दूर कर देंगे। इस पर तक्षक ने कहा कि यदि ऐसी बात है तो आप इस वृक्ष को फिर से हरा-भरा करके दिखाइए। मैं इसे डसकर अभी भस्म किए देता हूं। तक्षक ने वृक्ष को अपने विष प्रभाव से तत्काल भस्म कर दिया। इस पर कश्यप ऋषि ने उस वृक्ष की भस्म एकत्र की और अपना मन्त्र फूंका। तभी तक्षक ने आश्चर्य से देखा कि उस भस्म में से कोंपल फूट आई और देखते ही देखते वह हरा-भरा वृक्ष हो गया। हैरान तक्षक ने ऋषि से पूछा कि वे राजा…"} {"instruction": "Generate a code to merge two python dictionaries and update the values.", "input": "dict_1 = {\n 'a': 1,\n 'b': 2\n}\n\ndict_2 = {\n 'b': 3,\n 'c': 4\n}", "output": "def merge_dicts(dict_1, dict_2):\n # copy both dictionaries\n merged_dict = dict_1.copy() \n merged_dict.update(dict_2) \n return merged_dict\n\nprint(merge_dicts(dict_1, dict_2))"} {"instruction": "Using the given data, write a Python program to extract each name along with its age in the following format:", "input": "data = [{\"name\": \"John\", \"age\": 25}, {\"name\": \"James\", \"age\": 26}]", "output": "for item in data:\n print(f'Name: {item[\"name\"]}, Age: {item[\"age\"]}')"} {"text": "[CS Wikipedia] Parlamentní volby na Kubě 2018\n\nParlamentní volby na Kubě 2018 do Národního shromáždění lidové moci Kuby se uskutečnily dne 11. března 2018. Zástupci byli voleni na pětileté funkční období. Jedinou kandidující stranou byla Komunistická strana Kuby. Kandidovat však mohli i lidé bez politické příslušnosti, pod záštitou Komunistické strany Kuby. Výsledky Všech 605 navržených kandidátů bylo zvoleno, protože žádný nezískal méně než 50% hlasů. Voličů bylo celkem 8 926 575 a voleb se účastnilo 7 399 891 (82,90 %). Komunistická strana Kuby získala 94,42 %. Reference Volby na Kubě Volby 2018"} {"instruction": "Given a list of integers, find the numbers which are greatest than the given number X.", "input": "List: [-3, 0, 3, 5, 9], X = 4", "output": "function greaterThan(list, x) { let result = []; for (let i=0; i x) result.push(list[i]); return result; }"} {"instruction": "What is the data structure of a hash table?", "input": "", "output": "A hash table is a data structure that maps keys to values using a hash function. It is composed of a key-value pair, where the key is used to locate a specific item in the table, and the value is the item itself."} {"instruction": "Create a JavaScript object with two properties and their respective values.", "input": "", "output": "var myData = { name: 'John', age: 28 };"} {"text": "[CS Wikipedia] Jan Kašpar (herec)\n\nJan Kašpar (6. září 1952 Praha – 11. června 2013 Praha) byl český divadelní a filmový herec a komik, dlouholetý člen Divadla Járy Cimrmana. Život Byl vyučeným zámečníkem, ale hned po vojenské službě nastoupil do Městských divadel pražských jako kulisák. V roce 1975 odtud musel odejít kvůli účinkování v tajném představení Žebrácké opery Václava Havla, a tak se dostal do Divadla Járy Cimrmana. Postupně se zde z kulisáka a technika stal hercem, což bylo pro toto divadlo typické. (Tento proces byl zobrazen i ve filmu Nejistá sezóna, kde Kašpar ztvárnil v podstatě sebe sama, kulisáka Melichara, který je angažován jako herec, aby nahradil náhlou ztrátu v ansámblu.) Na začátku 80. let 20. století se rozvinul milostný vztah mezi Janem Kašparem a Olgou Havlovou, manželkou Václava Havla, který trval do druhé poloviny 80. let, kdy byl Olgou Havlovou ukončen. V dubnu 1988 si pádem ze stromu přivodil těžký úraz, po němž zůstal ochrnutý a upoutaný na invalidní vozík. Autoři cimrmanovských her Zdeněk Svěrák a Ladislav Smoljak však chtěli, aby mohl v divadle dál hrát, takže do nově psaných kusů vždy zařadili nějakou „sedací“ roli (Smil Flek z Nohavic v Blaníku, Praotec Čech ve hře České nebe), či přímo role invalidů na vozíku (Principál v Záskoku, Sváťa ve Švestce, náčelník v Africe). V některých starších hrách také náhodou existovala v podstatě sedací role (Děd Vševěd, továrník Bierhanzel), takže i v nich se Kašpar mohl nadále uplatnit. Jako většina členů Divadla Járy Cimrmana se objevoval i v malých rolích ve filmech. V rehabilitačním ústavu v Kladrubech se aktivně zapojil do skupiny dobrovolníků, z níž vznikl svaz paraplegiků a s účastí Zdeňka Svěráka i centrum Paraple a také byl předsedou Moto klubu vozíčkářů ČR Zemřel 11. června 2013 na selhání plic. Jeho poslední rolí před kamerou byl invalidní host pan Benál v seriálu Čtvrtá hvězda. Ten byl dokončen a odvysílán až po Kašparově smrti a 2. díl (v němž hrál) mu byl posmrtně věnován. Práce v disentu V 80. letech 20. století se Kašpar zapojil do práce v disentu, v roce 1987 se stal členem úzké redakční rady Originálního videojournalu. Události nafilmované po 17. listopadu 1989 pro revoluční čísla videožurnálu se zpracovávaly v jeho bytě. Ten byl v Čajkovského ulici č. 33 na Žižkově, zde se materiál shromažďoval, stříhal, množil a distribuoval 24 hodin denně. Zpravodajské videožurnály pak byly promítány na veřejnosti přístupných místech nejen v Praze. Divadelní role Afrika – *Náčelník Líná huba Blaník – *Rytíř Smil Flek z Nohavic České nebe – *Praotec Čech Dlouhý, Široký a Krátkozraký – Pocestný, *Děd Vševěd Dobytí severního pólu – Náčelník Posel z Liptákova – *Artur, František Švestka – *Sváťa Pulec Záskok – *Principál Němý Bobeš – Papoušek, Baronova matka Hospoda Na mýtince – Trachta Vražda v salónním coupé –…"} {"instruction": "In Python, generate a 3 layer feed-forward neural network for a binary classification problem.", "input": "", "output": "# import necessary libraries\nimport numpy as np\nfrom keras.layers import Dense\nfrom keras.models import Sequential\n\n# define model\nmodel = Sequential()\n# first layer\nmodel.add(Dense(16, activation='relu', input_dim=2))\n# second layer\nmodel.add(Dense(8, activation='relu'))\n# output layer\nmodel.add(Dense(1, activation='sigmoid'))\n\n# compile the model\nmodel.compile(optimizer='adam',\n loss='binary_crossentropy',\n metrics=['accuracy'])"} {"instruction": "Develop a user interface in python tkinter to add, modify, and delete items from a list.", "input": "", "output": "# imports \nimport tkinter as tk\n\n# window config\nwin = tk.Tk()\nwin.title(\"list operations\")\n\n# list variable\ndata = []\n\n# functions\ndef add_item():\n data.append(txt_input.get())\n refresh_list()\n \ndef delete_item():\n data.remove(lst_data.get(tk.ACTIVE))\n refresh_list()\n\ndef modify_item():\n data[lst_data.curselection()[0]] = txt_input.get()\n refresh_list()\n \ndef refresh_list():\n lst_data.delete(0, tk.END)\n for item in data:\n lst_data.insert(tk.END, item)\n\n# frame\nfrm_list = tk.Frame(win)\nlbl_input = tk.Label(frm_list, text=\"Input\")\ntxt_input = tk.Entry(frm_list, width=15)\n\nlbl_input.grid(row=0, column=0)\ntxt_input.grid(row=0, column=1)\n\n# listbox config\nlst_data = tk.Listbox(frm_list, height=5)\nlst_data.grid(row=1, column=0, columnspan=2)\n\n# button config\nbtn_add = tk.Button(frm_list, text=\"add\", command=add_item)\nbtn_delete = tk.Button(frm_list, text=\"delete\", command=delete_item)\nbtn_modify = tk.Button(frm_list, text=\"modify\", command=modify_item)\nbtn_add.grid(row=2, column=0)\nbtn_delete.grid(row=2, column=1)\nbtn_modify.grid(row=2, column=2)\n\n# frame grid\nfrm_list.grid(row=0, column=0)\n\nwin.mainloop()"} {"instruction": "Using the existing code as guidance, add a 2nd player and 2nd input field to the game.", "input": "playername1=input(\"What is your name? \") player_score1=0 if turn==1: player_score1+=1 print(\"It is now \" + playername1 + \" turn. You have \" + str(player_score1) + \" points\")", "output": "playername1=input(\"What is your name? \") playername2=input(\"What is your opponent's name? \") player_score1=0 player_score2=0 if turn==1: player_score1+=1 if turn==2: player_score2+=1 print(\"It is now \" + playername1 + \"'s turn. You have \" + str(player_score1) + \" points\") print(\"It is now \" + playername2 + \"'s turn. You have \" + str(player_score2) + \" points\")"} {"instruction": "Build an artificial neural network in Python to predict the price of a house", "input": "", "output": "import numpy as np\nfrom tensorflow.keras import models, layers\n\n#create basic model\ndef create_model():\n model = models.Sequential()\n model.add(layers.Dense(128, activation = 'relu', input_dim = 18))\n model.add(layers.Dense(64, activation = 'relu'))\n model.add(layers.Dense(32, activation = 'relu'))\n model.add(layers.Dense(1))\n model.compile(optimizer = 'rmsprop', loss = 'mse', metrics=['mae'])\n return model\n\n#train model\nmodel = create_model()\nmodel.fit(X_train, y_train, epochs = 100, batch_size = 32)"} {"instruction": "Write a Python program for finding the root of a given quadratic equation.", "input": "a = 1, b = 5, c = 4", "output": "def quadratic(a, b, c):\n # calculate the discriminant\n d = (b**2) - (4*a*c)\n\n # find the two roots\n root1 = (-b-d**0.5)/(2*a)\n root2 = (-b+d**0.5)/(2*a)\n return root1, root2"} {"instruction": "Create a function to evaluate a given expression written in infix notation.", "input": "exp = \"5 + (7 * 8) / 3\"", "output": "def eval_exp(exp): stack = [] for char in exp: if char in \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" or char in \"0123456789\": stack.append(char) else: val1 = stack.pop() val2 = stack.pop() stack.append(str(eval(val2 + char + val1))) return int(stack.pop()) print(eval_exp(exp))"} {"instruction": "Write a code to print the common elements of two given arrays", "input": "arr1 = [2, 3, 4, 5] arr2 = [3, 6, 7, 8]", "output": "def common_elements(arr1, arr2): common = [] for i in arr1: if i in arr2: common.append(i) return common"} {"instruction": "Generate an SQL query that returns the names of all employees who are engineers.", "input": "", "output": "SELECT name FROM Employees WHERE title = 'Engineer'"} {"text": "[EN Wikipedia] Henry Hervey\n\nHenry Hervey may refer to: Henry Hervey, 1st Baron Hervey, of the Barons Hervey Henry Hervie, Archdeacon of Middlesex See also Henry Harvey (disambiguation)"} {"instruction": "Develop an algorithm in Python to find the average of four numbers.", "input": "[2, 4, 8, 5]", "output": "def avg(numbers): sum = 0 for num in numbers: sum += num return sum/len(numbers) average = avg([2, 4, 8, 5]) print(average)"} {"instruction": "Write a Python program to replace all empty strings in a given list with \"NULL\".", "input": "data = [\"A\", \"\", \"B\", \"\", \"C\", \"\"]", "output": "data = [\"A\", \"NULL\", \"B\", \"NULL\", \"C\", \"NULL\"]\n\n##\nnew_data = []\nfor i in data:\n if i == \"\":\n new_data.append(\"NULL\")\n else:\n new_data.append(i)\n\nprint(new_data)"} {"instruction": "Create a class named 'Animal' with one private data member 'numberOfLegs'.", "input": "", "output": "public class Animal { private int numberOfLegs; }"} {"instruction": "Create a Python program to generate a multiplication table.", "input": "", "output": "def generate_table():\n for i in range(1, 11):\n for j in range(1, 11):\n print('{0} x {1} = {2}'.format(i, j, i*j))\n print('\\n')"} {"instruction": "Write a SQL query that outputs the names of all the students in a given table sorted in descending order", "input": "", "output": "SELECT name FROM students ORDER BY name DESC;"} {"instruction": "Identify the type of data present in the given JSON string.", "input": "String: [true, false, 0, \"Sample String\"]", "output": "Boolean, Boolean, Integer, String."} {"instruction": "Create a Python script that monitors a given URL and sends an email notification if there is an error while accessing the resource", "input": "", "output": "\"\"\"\nCreate a Python script that monitors a given URL and sends an email notification if there is an error while accessing the resource\n\"\"\"\n\nimport requests\nimport smtplib\n\n# Monitor the URL\nURL = 'https://example.com'\nresponse = requests.get(URL)\nstatus_code = response.status_code\n\n# Send an email if there is an error\nif status_code == 404:\n # Set up the email server\n server = smtplib.SMTP('smtp.example.com', 25)\n server.ehlo()\n server.starttls()\n\n # Set the 'from' and 'to' addresses\n from_email = 'monitor@example.com'\n to_email = 'admin@example.com'\n\n # Construct the message\n message = 'Error 404 on ' + URL\n\n # Send the email\n server.sendmail(from_email, to_email, message)\n server.quit()"} {"instruction": "Optimize the following Python function. The function calculates the sum of squares of two given numbers.", "input": "def SumOfSquares(x,y):\n result = x**2 + y**2\n return result", "output": "def SumOfSquares(x, y):\n return x * (x + y) + y * y"} {"instruction": "Generate a function in Python for generating a random integer between two given numbers (inclusive).", "input": "", "output": "import random\n\ndef random_integer(start, end):\n return random.randint(start, end)"} {"instruction": "Write a JavaScript program to convert a given number of seconds into the equivalent time in days, hours, minutes and seconds.", "input": "15000", "output": "let totalSeconds = 15000; let days = Math.floor(totalSeconds / (24*60*60)); let remainingSeconds = totalSeconds % (24*60*60); let hours = Math.floor(remainingSeconds / (60*60)); let remainingSeconds2 = remainingSeconds % (60*60); let minutes = Math.floor(remainingSeconds2 / (60)); let seconds = remainingSeconds2 % (60); console.log(`${days} days, ${hours} hours, ${minutes} minutes, ${seconds} seconds.`);"} {"instruction": "Using a while loop, create a Python program that prints the Fibonacci sequence from 0 to 100.", "input": "", "output": "a, b = 0, 1\nwhile b <= 100:\n print(b)\n a, b = b, a+b"} {"instruction": "Construct an SQL query to read the contents of a table called \"users\".", "input": "", "output": "SELECT * FROM users;"} {"instruction": "Find the maximum subarray sum in an array of integers.", "input": "arr = [-2, -3, 4, -1, -2, 1, 5, -3]", "output": "def max_subarray_sum(arr): \"\"\"This function takes an array of integers and returns the maximum subarray sum \"\"\" current_max = arr[0] overall_max = arr[0] for num in arr[1:]: current_max = max(current_max + num, num) overall_max = max(current_max, overall_max) return overall_max # Example Usage arr = [-2, -3, 4, -1, -2, 1, 5, -3] max_sum = max_subarray_sum(arr) # max_sum should be 7"} {"instruction": "Generate a web service in Python Flask to provide the weather data for a given date and region.", "input": "", "output": "# Import packages\nfrom flask import Flask, jsonify, request \nimport requests\n\n# Create Flask app \napp = Flask(__name__) \n\n# Make a GET request to fetch weather data for a given date and region \n@app.route('/weather', methods=['GET'])\n\ndef get_weather_data(): \n region = request.args.get('region') \n date = request.args.get('date') \n url = 'http://api.openweathermap.org/data/2.5/forecast?q='+region+'&appid= YOUR_API_KEY'+'&date='+date \n data = requests.get(url).json()\n\n return jsonify(data)\n\nif __name__ == '__main__': \n app.run(host='0.0.0.0', port=8000, debug = True)"} {"instruction": "Output the Fibonacci sequence from 0 to 15.", "input": "", "output": "The Fibonacci sequence from 0 to 15 is 0, 1, 1, 2, 3, 5, 8, 13."} {"instruction": "Create a new Python list containing the square of the values in the given list.", "input": "[2, 4, 6]", "output": "new_list = [4, 16, 36]"} {"instruction": "Write a HTML web page with a heading, paragraph, and a form with two input fields, one for name and one for age.", "input": "", "output": " Example HTML

    Heading

    This is a paragraph.

    Name: Age:
    "} {"text": "[EN Wikipedia] Alexander Graham Bell\n\nAlexander Graham Bell (, born Alexander Bell; March 3, 1847 – August 2, 1922) was a Scottish-born inventor, scientist and engineer who is credited with patenting the first practical telephone. He also co-founded the American Telephone and Telegraph Company (AT&T) in 1885. Bell's father, grandfather, and brother had all been associated with work on elocution and speech, and both his mother and wife were deaf; profoundly influencing Bell's life's work. His research on hearing and speech further led him to experiment with hearing devices which eventually culminated in Bell being awarded the first U.S. patent for the telephone, on March 7, 1876. Bell considered his invention an intrusion on his real work as a scientist and refused to have a telephone in his study. Many other inventions marked Bell's later life, including groundbreaking work in optical telecommunications, hydrofoils, and aeronautics. Bell also had a strong influence on the National Geographic Society and its magazine while serving as the second president from January 7, 1898, until 1903. Beyond his work in engineering, Bell had a deep interest in the emerging science of heredity. His work in this area has been called \"the soundest, and most useful study of human heredity proposed in nineteenth-century America...Bell's most notable contribution to basic science, as distinct from invention.\" Early life Bell was born in Edinburgh, Scotland, on March 3, 1847. The family home was at South Charlotte Street, and has a stone inscription marking it as Bell's birthplace. He had two brothers: Melville James Bell (1845–1870) and Edward Charles Bell (1848–1867), both of whom would die of tuberculosis. His father was Alexander Melville Bell, a phonetician, and his mother was Eliza Grace Bell (née Symonds). Born as just \"Alexander Bell\", at age 10, he made a plea to his father to have a middle name like his two brothers. For his 11th birthday, his father acquiesced and allowed him to adopt the name \"Graham\", chosen out of respect for Alexander Graham, a Canadian being treated by his father who had become a family friend. To close relatives and friends he remained \"Aleck\". Bell and his siblings attended a Presbyterian Church in their youth. First invention As a child, Bell displayed a curiosity about his world; he gathered botanical specimens and ran experiments at an early age. His best friend was Ben Herdman, a neighbour whose family operated a flour mill. At the age of 12, Bell built a homemade device that combined rotating paddles with sets of nail brushes, creating a simple dehusking machine that was put into operation at the mill and used steadily for a number of years. In return, Ben's father John Herdman gave both boys the run of a small workshop in which to \"invent\". From his early years, Bell…"} {"instruction": "Implement a method in C# that reverses the digits of an integer.", "input": "", "output": "public static int ReverseDigits (int num) { int result = 0; while (num > 0) { int temp = num % 10; result = (result * 10) + temp; num = num / 10; } return result; }"} {"instruction": "Create a program in Java that sort a given array using bubble sort algorithm.", "input": "Array: [4, 3, 5, 2, 1]", "output": "public static void bubbleSort(int[] arr) { int n = arr.length; int temp = 0; for(int i=0; i < n; i++){ for(int j=1; j < (n-i); j++){ if(arr[j-1] > arr[j]){ temp = arr[j-1]; arr[j-1] = arr[j]; arr[j] = temp; } } } }"} {"instruction": "Use a for-loop in PHP to generate a random number between 0 and 10.", "input": "", "output": ""} {"instruction": "Create a class in Python which implements a binary search tree for integers and a method to print the results.", "input": "Not applicable", "output": "class Node:\n def __init__(self,value):\n self.left = None\n self.right = None\n self.value = value\n\nclass BinarySearchTree:\n def __init__(self):\n self.root = None\n \n # Insert nodes to the binary search tree.\n def insert(self,value):\n new_node = Node(value)\n if self.root == None:\n self.root = new_node\n return\n else:\n current_node = self.root\n while True:\n if value < current_node.value:\n if current_node.left == None:\n current_node.left = new_node\n return\n current_node = current_node.left\n else:\n if current_node.right == None: \n current_node.right = new_node\n return\n current_node = current_node.right\n \n def printTree(self, node): \n if node != None: \n self.printTree(node.right)\n print(node.value)\n self.printTree(node.left)\n\n# Test code\nbst = BinarySearchTree()\nnums = [10,4,2,15,14,16]\nfor num in nums:\n bst.insert(num)\nbst.printTree(bst.root)"} {"instruction": "Make a class in Python which will represent a binary search tree.", "input": "", "output": "class BinarySearchTree: def __init__(self, value): self.left = None self.right = None self.value = value def inorder(self): if self.left: self.left.inorder() print(self.value) if self.right: self.right.inorder() def insert(self, value): if value <= self.value: if self.left is None: self.left = BinarySearchTree(value) else: self.left.insert(value) elif value > self.value: if self.right is None: self.right = BinarySearchTree(value) else: self.right.insert(value)"} {"instruction": "Write a CSS style for a h3 heading to always have a purple background and white text color.", "input": "", "output": "h3 { background-color: purple; color: white; }"} {"instruction": "With given input string, create a program that returns a new string with the first character capitalized.", "input": "hello world", "output": "def capitalize(text): return text[0].upper() + text[1:]"} {"text": "[DE Wikipedia] Plymouth (Vermont)\n\nPlymouth ist eine Town im Windsor County des Bundesstaates Vermont in den Vereinigten Staaten mit 641 Einwohnern (laut Volkszählung von 2020). Geografie Geografische Lage Plymouth liegt in Zentral-Vermont inmitten der Green Mountains. Im Gebiet der Town entspringen mehrere Flüsse, so der Black River sowie der Ottauquechee River und der North Branch Ottauquechee River. An der Nordgrenze der Town erhebt sich der Mount Tom, an dessen Fuß 1818 eine Tropfsteinhöhle entdeckt wurde. Nachbargemeinden Alle Entfernungen sind als Luftlinien zwischen den offiziellen Koordinaten der Orte aus der Volkszählung 2010 angegeben. Norden: Bridgewater, 4,7 km Nordosten: Woodstock, 17,6 km Osten: Reading, 11,6 km Südosten: Cavendish, 12,2 km Süden: Ludlow, 3,7 km Südwesten: Mount Holly, 11,8 km Westen: Shrewsbury, 17,4 km Nordwesten: Mendon, 23,3 km Nordwesten: Killington, 10,2 km Hinweis: Zwischen Plymouth und Woodstock besteht keine gemeinsame Grenze. Die beiden Gemeinden liegen aber derart dicht bei einander, dass eine Aufnahme in die oben stehende Liste sinnvoll ist. Klima Die mittlere Durchschnittstemperatur in Plymouth liegt zwischen −14,5 °C (6 °Fahrenheit) im Januar und 27,8 °C (82 °Fahrenheit) im Juli. Damit ist der Ort gegenüber dem langjährigen Mittel Vermonts im Sommer um etwa 3 Grad wärmer, während die Wintertemperaturen nahe dem Durchschnittswert liegen. Die Schneefälle zwischen Oktober und Mai liegen mit bis zu zwei Metern etwa doppelt so hoch wie die mittlere Schneehöhe in den USA. Die tägliche Sonnenscheindauer liegt am unteren Rand des Wertespektrums der USA. Geschichte Die Town wurde am 6. Juli 1761 unter dem Namen Saltash durch Benning Wentworth ausgerufen, aber erst ab 1777 besiedelt. Die erste Stadtversammlung fand etwa 1787 statt; das genaue Datum ist nicht überliefert. Funde von Kalkstein und Marmor führten zur Gründung von Steinbrüchen um 1800, die aber der schlechten Verkehrsanbindung wegen keinen dauerhaften kommerziellen Erfolg hatten und aufgegeben wurden, als andere Steinbrüche wie die in Rutland mit Bahnlinien erschlossen wurden. 1859 wurde in Plymouth Gold gefunden, was zu einem kleinen Goldrausch führte. Im Ortsteil Plymouth Notch wurde im Jahr 1872 der spätere Präsident Calvin Coolidge geboren. Das Geburtshaus, die Farm der Familie, seine Grabstätte und weitere Gebäude mit Bezug zu Coolidge bilden den Calvin Coolidge Homestead District, der seit Juni 1965 den Status einer National Historic Landmark hat. Religionen Im Siedlungskern Tyson besteht eine Gemeinde der United Church of Christ. Einwohnerentwicklung Wirtschaft und Infrastruktur Verkehr Die Vermont State Route 100 führt entlang des Coolidge State Forest in nordsüdlicher Richtung zentral durch die Town. Sie verbindet Plymouth mit Killington im Norden und Ludlow im Süden. Von der…"} {"text": "[CS Wikipedia] Chvála\n\nChvála může být: vyslovená, psaná nebo přednesená pochvala, kladně hodnocená lidská činnost římskokatolický pozdrav Chvála Kristu křesťanský chvalozpěv, vzdaní chvály Hospodinu příjmení Emanuel Chvála (1851–1924), český hudební kritik a skladatel Jan Chvála (1981–2021), český sportovní lezec a mistr ČR v boulderingu Jiří Chvála (* 1933), český sbormistr a hudební pedagog Josef Chvála (1826–1872), český architekt Buštěhradské dráhy Tomáš Chvála (Hardy; * 1984), český filmový publicista, novinář, spisovatel a scenárista jiný význam Chvála bláznivosti, filozofický spis Erasma Rotterdamského z roku 1509"} {"text": "[HI Wikipedia] हिन्दी समाचारपत्र\n\n(Official/Personal) भारत के प्रमुख हिन्दी समाचारपत्र हैं :- हिन्दुस्तान (समाचार पत्र) चौथी दुनिया पाञ्चजन्य नई दुनिया नवभारत टाइम्स आज प्रभात खबर अमर उजाला प्रयुक्ति जलते दीप दैनिक जागरण जनसत्ता पंजाब केसरी देशबन्धु दैनिक भास्कर हरिभूमि राँची एक्सप्रेस राजस्थान पत्रिका स्वतंत्र भारत दीपशील भारत उगता भारत धरातल टीवी सबूरी टाइम्स धर्म क्रांति"} {"instruction": "Generate a program using Python which collects environmental data from a list of cities and organizes it in a table.", "input": "Cities: New York, Los Angeles, San Francisco, Chicago", "output": "\"\"\"\nGenerate a program using Python which collects environmental data from a list of cities and organizes it in a table.\n\"\"\"\n\nimport requests\n\n# API key for openweathermap\nKEY = '123456789'\n\ndef get_weather_data(cities):\n weather_data = []\n\n for city in cities:\n url = 'http://api.openweathermap.org/data/2.5/weather?q=' + city +'&APPID='+KEY\n response = requests.get(url)\n data = response.json()\n\n city_data = {\n 'name': city,\n 'temperature': data['main']['temp'],\n 'humidity': data['main']['humidity'],\n 'wind speed': data['wind']['speed']\n }\n weather_data.append(city_data)\n \n return weather_data\n\nif __name__ == '__main__':\n cities = ['New York', 'Los Angeles', 'San Francisco', 'Chicago']\n data = get_weather_data(cities)\n\n for city_data in data:\n print('Name:', city_data['name'])\n print('Temperature:', city_data['temperature'])\n print('Humidity:', city_data['humidity'])\n print('Wind speed:', city_data['wind speed'], '\\n')"} {"instruction": "Generate a Python script to cluster handwritten numbers by a given similarity metric.", "input": "", "output": "# import the necessary libraries\nimport matplotlib.pyplot as plt\nfrom sklearn.cluster import KMeans\nfrom sklearn.datasets import load_digits\n\n# load the digits dataset\ndigits = load_digits()\n\n# define the clustering model\nkmeans_model = KMeans(n_clusters=10, random_state=42)\n\n# fit the model to the digits dataset \nkmeans_model.fit(digits.data)\n\n# assign labels to the clusters\nlabels = kmeans_model.labels_\n\n# plot the clusters\nfor i in range(10):\n # create a mask to isolate each cluster\n mask = labels == i\n \n # plot the images of the cluster\n plt.title(f\"Cluster {i}\")\n plt.imshow(digits.images[mask][0], cmap=\"gray\")\n plt.show()"} {"instruction": "Create a basic class in Python with three properties and a constructor.", "input": "", "output": "class MyClass:\n def __init__(self, data1, data2, data3):\n self.data1 = data1\n self.data2 = data2\n self.data3 = data3"} {"instruction": "What should be the return type of the following function in Java?", "input": "public int add(int a, int b) { return a + b; }", "output": "int."} {"instruction": "Create a function to calculate the sum of a sequence of integers.", "input": "[1, 2, 3, 4, 5]", "output": "# Python code\ndef sum_sequence(sequence):\n sum = 0\n for num in sequence:\n sum += num\n return sum"} {"instruction": "Generate a random string of 10 characters with two vowels, three consonants and five digits.", "input": "", "output": "import random def generate_string(vowels,consonants,digits): s = '' for _ in range(vowels): s+=random.choice('aeiou') for _ in range(consonants): s+=random.choice('bcdfghjklmnpqrstvwxyz') for _ in range(digits): s+=str(random.randint(0,9)) return s print(generate_string(2,3,5))"} {"instruction": "Write an SQL query to find the maximum salary of an employee in the same department as the given employee.", "input": "Employee name: ‘John Doe’ Department: ‘Finance’", "output": "SELECT MAX(salary) FROM employees WHERE department = 'Finance' AND NOT employee_name = 'John Doe';"} {"instruction": "Write a Python script to detect if two numbers have the same frequency of digits.", "input": "", "output": "def same_frequency(num1,num2): str1 = str(num1) str2 = str(num2) if len(str1) != len(str2): return False dict = {} for char in str1: if char in dict: dict[char] += 1 else: dict[char] = 1 for char in str2: if not char in dict: return False dict[char] -= 1 for k in dict: if dict[k] != 0: return False return True"} {"text": "[CS Wikipedia] Xenopithecus koruensis\n\nXenopithecus koruensis je druh vyhynulých úzkonosých primátů, žijících v časném miocénu (před 19 – 20 miliony let) v západní části dnešní Keni. Byl popsán v roce 1933 na základě pouze jednoho zlomku horní čelisti z lokality Legetet u obce Koru. Dosud nebyly další ostatky tohoto rodu identifikovány. Autor popisu – Arthur Tindell Hopwood – navrhl nový rod Xenopithecus, protože se nalezená čelist mírně odlišuje od čelisti rodu Proconsul, které se jinak velmi podobá. Po revizi čelisti v roce 1951 bylo navrženo sloučení druhu Xenopithecus koruensis s druhem Proconsul africanus, což bylo obecně přijato. V novější literatuře někteří badatelé rody Xenopithecus a Proconsul opět rozlišují. Literatura Proconsulidae"} {"text": "[DE Wikipedia] Hofwiesenpark\n\nDer Hofwiesenpark ist eine Parkanlage in Gera in Thüringen, der die westliche Innenstadt vom Stadtteil Untermhaus trennt. Benannt ist der Park nach seiner Lage am Berg mit dem ehemaligen Schloss Osterstein. Im Park befinden sich ein Hallenbad (Hofwiesenbad) und das Stadion der Freundschaft. Zur Bundesgartenschau 2007 in Gera und Ronneburg war der Hofwiesenpark (neben der Neuen Landschaft Ronneburg) einer der beiden Hauptausstellungsbereiche. Geschichte Die Hofwiesen, erstmals in den Jahren 1636 und 1647 erwähnt, waren ursprünglich eine weite, unbebaute Fläche zwischen dem westlichen Rand der ursprünglichen Stadt (die um 1900 durch den Mühlgraben und die noch heute vorhandene Eisenbahnlinie begrenzt wurde) und der Weißen Elster. Nördlich schlossen sich der Küchengarten mit der barocken Orangerie sowie die Küchengartenallee an, die in dem damals wohlhabenden Industriegebiet einen beliebten Villenstandort darstellte. 1934 gab es Pläne zum Bau einer großen Stadthalle auf den Hofwiesen, die aber nicht realisiert wurden. Nach dem Zweiten Weltkrieg wurde das Areal der Hofwiesen von der DDR-Führung zu einem Sportpark umgestaltet, beginnend mit dem Stadion der Freundschaft (1952), dem später die Erwin-Panndorf-Sporthalle (1969), ein modernes Hallenbad (1974) und zahlreiche kleinere Sportanlagen folgten. Am 10. Januar 1974 wurde außerdem die 18. Polytechnische Oberschule neben der Erwin-Panndorf-Halle übergeben, die 1975 ebenfalls den Namen Panndorfs erhielt. Als östliche Begrenzung wurde die vierspurige Straße Am Stadion errichtet, über die die Fernstraße (und spätere Bundesstraße) F 2 geleitet wurde. Den südlichen Abschluss des Areals bildete das bereits vorher vorhandene Sommerbad (1924) mit dem alten Hallenbad von 1892. Bundesgartenschau 2007 Im Hinblick auf die Bundesgartenschau erhielt das Areal durch umfangreiche Baumaßnahmen seinen früheren Parkcharakter und damit auch den Namen Hofwiesen zurück. Planungen In den Planungen für die BUGA, die 1997 nach Gera vergeben wurde, spielte der Hofwiesenpark eine entscheidende Rolle als Geraer Hauptteil der Schau und zugleich westlicher Abschluss des grünen Bandes, das sich bis ins Zentrum von Ronneburg ziehen sollte. Im Februar 2000 wurde ein europaweiter Gestaltungswettbewerb für den Park ausgeschrieben; bei der Tagung des Preisgerichts am 23. und 24. Juni 2000 wurde der Plan des Büros der Dresdner Landschaftsarchitekten Hermann Kokenge und Christoph Ritter zur Siegerarbeit gekürt. Er enthielt bereits die Idee der Gliederung der Parkanlage durch die charakteristischen Ovale. Bis September 2002 wurden die Planungen durch das Siegerbüro weiter konkretisiert. Unter anderem sah der Entwurf vor, Teile der Parkfläche abzusenken und den Damm an der Weißen Elster an mehreren Stellen aufzubrechen, um so Sichtachsen aus…"} {"instruction": "Develop a web resource monitor in Python that records the amount of data transferred from a given web resource.", "input": "", "output": "import requests\n\ndef monitor_web_resource(url):\n response = requests.get(url)\n\n total_data = 0\n\n while response.status_code == 200:\n total_data += len(response.content)\n response = requests.get(url)\n\n return total_data\n\ntotal_data = monitor_web_resource(\"http://example.com\")"} {"text": "[DE Wikipedia] Rhäden\n\nDer Rhäden ist ein Feuchtgebiet in Hessen und Thüringen im Gebiet der Gemeinde Wildeck (Landkreis Hersfeld-Rotenburg, Hessen) und der Stadt Werra-Suhl-Tal (Wartburgkreis, Thüringen). Der Landes- und Gemeindezugehörigkeit entsprechend unterteilt sich das Gebiet in die Naturschutzgebiete Dankmarshäuser Rhäden und Rhäden bei Obersuhl und Bosserode. Geografische Lage Der Rhäden erstreckt sich zwischen den Ortslagen von Dankmarshausen und Obersuhl. Naturräumlich liegt er südöstlich des Richelsdorfer Gebirges im Berka-Gerstunger-Becken am äußersten Rand der Werraaue und wird vom Gewässer Suhl durchflossen, das ab hier auch den Alternativnamen Rhedengraben führt. Das Gebiet wird von der hessisch-thüringischen Landesgrenze durchschnitten und ist Teil des Biotopverbundes Grünes Band Deutschland. Geschichte Das ausgedehnte Feuchtgebiet Rhäden wurde ab 1859 in mehreren Phasen trockengelegt um es als Grün- und Ackerland für die Landwirtschaft nutzbar zu machen. Nach dem Zweiten Weltkrieg durchschnitt die Innerdeutsche Grenze das Gebiet, Teile der landwirtschaftlichen Flächen fielen brach oder wurden auf Thüringer Seite von Anlagen der Grenzbefestigung überbaut. In den 1970er Jahren begannen auf hessischer Seite gestaltende Renaturierungsmaßnahmen, um das Gebiet als Rastgebiet für Wat-, Wasser- und Wiesenvögel zu entwickeln. Nach der Deutschen Wiedervereinigung wurde das Gebiet auch auf Thüringer Seite renaturiert und zum Naturschutzgebiet entwickelt. Seit 2015 läuft auf Thüringer Seite ein Beweidungsprojekt von Stiftung Naturschutz Thüringen, BUND und NABU, bei dem die Flächen extensiv mit Heckrindern und Wildponys beweidet werden. Im Jahre 2021 wurde das Pachtverhältnis mit dem ortsansässigen Agrarbetrieb gekündigt, da ein langanhaltend zu hoher Tierbesatz zu Überweidungerscheinungen und dem Verhungern zahlreicher Weidetiere führte. Ein neuer Pächter setzt nun Wasserbüffel ein um die Offenlandhabitate kurz zu halten und vermarktet das Fleisch regional. Infrastruktur Um das Naturschutzgebiet Rhäden verläuft ein Rundwanderweg; zur Naturbeobachtung stehen drei Aussichtsplattformen und ein Beobachtungspunkt mit Infotafeln am Lindenhauptskopf zur Verfügung. In Wildeck-Obersuhl steht ein Informationszentrum offen. Arten Die Gesamtpopulation des Gebietes ist mit durchschnittlich etwa 2.500 Vögeln angegeben. Zu den gesichteten Arten zählen Bekassine, Bruchwasserläufer, Dunkler Wasserläufer, Brachvogel, Kampfläufer, Knäkente, Krickente, Löffelente, Pfeifente, Reiherente, Schnatterente, Spießente, Tafelente, Waldwasserläufer, Weißstorch. Im Sommer 2016 wurde einmalig auch ein Pelikan gesichtet. Schutzstatus Das Gebiet ist beidseits der hessisch-thüringischen Landesgrenze als Naturschutzgebiet und als FFH-Gebiet ausgewiesen: FFH-Gebiet 5026-305 Dankmarshäuser Rhäden…"} {"text": "[HI Wikipedia] पारो-भूटान\n\nपारो (जोंगखा; སྤ་རོ་) भूटान की पारो घाटी में स्थित एक नगर और पारो जिले का मुख्यालय है। यह एक ऐतिहासिक नगर है जिसमें कई पवित्र स्थल और ऐतिहासिक इमारतें बिखरी हुई हैं। भूटान का एकमात्र अंतर्राष्ट्रीय हवाई अड्डा, पारो हवाई अड्डा भी यहीं स्थित है। भूटान के आबाद स्थान"} {"instruction": "Write a code to convert HTML to Markdown using Python.", "input": "", "output": "import markdown import re def convert_html_to_markdown(html): lines = html.split('\\n') for line in lines: line = markdown.markdown(line) # remove HTML tags line = re.sub(r'<[^>]*>', '', line) # strip whitespace line = line.strip() print line html = '

    This is an example of HTML text.

    ' convert_html_to_markdown(html) # Output This is an example of HTML text."} {"instruction": "Create a basic HTML page with a title, a heading and a brief introduction to yourself.", "input": "My name is John Doe, I am an engineer and webdeveloper.", "output": " Introducing John Doe

    Introducing John Doe

    Hi, I'm John Doe. I am an engineer and webdeveloper with 20 years of experience. I have worked on projects for some of the biggest companies in the world, and I'm proud to say that I have always delivered quality work. I'm excited to have a chance to work on new projects and be part of an amazing team.

    "} {"instruction": "Write a CSS rule to change the font color of the h1 element to green.", "input": "", "output": "h1 { color: green; }"} {"instruction": "Create a Python script to generate the following pattern:", "input": "", "output": "for i in range(1,6):\n for j in range(1,i+1):\n print(\"*\", end=\" \")\n print()"} {"instruction": "Using SQL, write a query to get the last three rows from a table.", "input": "Table name: \"customer\"", "output": "SELECT * FROM customer ORDER BY id DESC LIMIT 3;"} {"instruction": "Create a Python program that calculates the longest increasing subsequence of an array.", "input": "[10, 22, 9, 33, 21, 50, 41, 60, 80]", "output": "def longest_increasing_subsequence(nums):\n n = len(nums)\n lengths = [1] * n\n\n for i in range(n):\n for j in range(i):\n if nums[j] < nums[i]:\n lengths[i] = max(lengths[i], lengths[j] + 1)\n \n longest_increasing_subsequence_length = max(lengths)\n \n return longest_increasing_subsequence_length\n\nnums = [10, 22, 9, 33, 21, 50, 41, 60, 80]\nprint(longest_increasing_subsequence(nums)) // prints 6"} {"instruction": "Create a function in Python that takes two parameters, x and y, and prints out all numbers between x and y.", "input": "", "output": "def display_numbers(x, y): for i in range(x,y+1): print(i)"} {"text": "[HI Wikipedia] प्राचीन इतिहास\n\nप्राचीन इतिहास अतीत की घटनाओं का समुच्चय है। इसकी शुरआत दर्ज किये गए मानव इतिहास से प्रारंभिक मध्य युग, यहाँ तक कि वैदिक युग तक विस्तृत है। इतिहास की अवधि 5000 साल है जिसकी शुरुआत सुमेरियन क्यूनीफ़ॉर्म लिपि, जो 30 वीं सदी की प्राचीनतम व सुसंगत लेखन पद्दति से होती है। सन्दर्भ प्राचीन इतिहास"} {"instruction": "Generate a python program to modify all the characters in a string to lowercase", "input": "string = \"HELLO WORLD\"", "output": "def to_lowercase(string):\n lowercase_string = \"\"\n for char in string:\n lowercase_string += char.lower()\n return lowercase_string\n\nif __name__ == '__main__':\n string = \"HELLO WORLD\"\n print(to_lowercase(string))"} {"instruction": "Design a function in Python to calculate the Fibonacci sequence up to a particular number.", "input": "", "output": "def fibonacci(n): if n <= 1: return n else: return fibonacci(n-1) + fibonacci(n-2) for i in range(1, n+1): print(fibonacci(i))"} {"instruction": "Construct a while loop in C for printing even numbers from 0 to 10.", "input": "", "output": "int num = 0; while(num <= 10) { printf(\"%d \", num); num += 2; }"} {"text": "[CS Wikipedia] Ánand (Gudžarát)\n\nÁnand (, ) je město v Gudžarátu, jednom z indických svazových států. K roku 2011 měl bezmála 200 tisíc obyvatel. Od roku 1997 je centrem stejnojmenného okresu. Město je známé jako hlavní sídlo mlékárenského družstva Amul, které sdružuje přibližně tři milióny výrobců mléka. Poloha a doprava Ánand leží na spojnici mezi Ahmadábádem, největším gudžarátským městem, které se nachází přibližně 65 kilometrů od Ánandu, a Vadodará, které leží přibližně 35 kilometrů jihovýchodně od Ánandu. Přes Ánand vedou dálnice NE 1 i železnice spojující obě tato větší města. Odkazy Reference Externí odkazy Města v Gudžarátu"} {"instruction": "Generate the ternary operator for the following expression: x > 0 ? 10 : 5.", "input": "", "output": "x > 0 ? 10 : 5"} {"instruction": "Develop a function in Python to generate a random number between 1 and 10.", "input": "Not applicable", "output": "import random\n \n# Function to generate a random number between 1 and 10\ndef random_num(): \n number = random.randint(1, 10) \n return number \n \n# Driver code \nnum = random_num() \nprint(\"Random number between 1 and 10 is: \", num)"} {"instruction": "How would you implement a function to determine if a number is even or odd in Python?", "input": "", "output": "def even_odd(number): if number % 2 == 0: print(\"Even\") else: print(\"Odd\")"} {"instruction": "Design a function to get the length of the longest increasing subsequence in a given list of integers.", "input": "", "output": "def longest_increasing_subsequence_length(nums): n = len(nums) LIS = [1] * n for i in range(1, n): for j in range(0, i): if nums[i] > nums[j] and LIS[i] < LIS[j] + 1: LIS[i] = LIS[j] + 1 return max(LIS)"} {"text": "[DE Wikipedia] Die Medici\n\nDie Medici (Originaltitel: I Medici und The Medici), in Staffel 1 mit Herrscher von Florenz (Originaltitel: Masters of Florence) , in Staffel 2 und 3 mit Lorenzo der Prächtige (Originaltitel: The Magnificent) untertitelt, ist eine italienisch-britische Fernsehserie, deren Produktion 2015 begann. Sie kam im Oktober 2016 in Italien ins Fernsehen. Nach dem Muster von Die Tudors und Borgia wird versucht, im Stil eines opulenten Kostümfilms und mit einem großen Ensemble an internationalen Schauspielern, die Geschichte einer der bekanntesten Dynastien Italiens, der Medici, in Szene zu setzen. Im deutschsprachigen Raum wurde die erste Staffel vom 27. bis zum 30. Dezember 2016 beim Pay-TV-Sender Sky 1 ausgestrahlt. Die acht Folgen der zweiten Staffel wurden zwischen dem 23. Oktober und dem 13. November 2018 auf Rai 1 gesendet, während die Ausstrahlung auf Deutsch in vier Doppelfolgen zwischen dem 24. und dem 27. Dezember 2018 erfolgte. Die finale dritte Staffel wurde ab dem 2. Dezember 2019 auf Rai 1 in Italien ausgestrahlt. Die deutschsprachige Ausstrahlung erfolgt auf Sky 1 in Doppelfolgen ab dem 23. Dezember 2019. Handlung In den ersten Folgen wird in Rückblenden die Geschichte der Bankiersfamilie Medici aus Florenz um das Jahr 1410 erzählt. Der Patriarch Giovanni de Medici verhilft dem Grafen von Troia, Baldassare Cossa, zum Papsttum; im Gegenzug darf das Bankhaus die Finanzen des Papstes abwickeln, was zum rasanten wirtschaftlichen Aufstieg der Familie führt. Giovanni führt seine beiden Söhne Cosimo und Lorenzo ins Bankgeschäft ein. Bei einem Besuch in Rom lernt Cosimo, der statt Bankier lieber Künstler wäre, den Künstler Donatello kennen, der in den Folgejahren für Florenz viele Kunstwerke erschafft. Für Cosimo wird eine Ehe mit Contessina de’ Bardi arrangiert, aus der der Sohn Piero hervorgeht. Die Haupthandlung setzt 1429 ein und dauert in der ersten Staffel bis etwa 1435. Giovanni wurde im Weinberg vergiftet. Seinen Sitz im Florenzer Stadtrat, der Signoria, erhält Cosimo in einem manipulierten Losverfahren. Für den technisch anspruchsvollen Bau der Kuppel der unvollendeten Kathedrale von Florenz engagiert Cosimo den Architekten Filippo Brunelleschi. Als in Florenz die Pest ausbricht, machen Medicis Gegner in der Signoria den größenwahnsinnigen Kuppelbau verantwortlich und zerstören die begonnenen Arbeiten. Cosimo kann den Abriss beenden. Ein Krieg mit dem Herzogtum Mailand um die Stadt Lucca bringt die Bank in finanzielle Schwierigkeiten, kann durch einen Friedensvertrag aber entschärft und beendet werden. Auf der Suche nach Giovannis Mörder spürt Cosimos Freund Marco Bello einen Apotheker auf, der das Gift angerührt hatte. Der Apotheker wird mit einem Dolch erstochen, der Lorenzo gehört. Cosimo beschuldigt zunächst seinen Bruder, lässt dann aber…"} {"instruction": "Create a data structure in Python to calculate the most popular item over time.", "input": "The items are python dictionaries in the form [{'name': 'item_a', 'count': 10}, {'name': 'item_b', 'count': 5}, {'name': 'item_c', 'count': 1}]", "output": "from collections import defaultdict\n\ndef most_popular_item(data):\n counts = defaultdict(int)\n for item in data:\n name = item['name']\n counts[name] += item['count']\n\n m = counts.get(max(counts, key=counts.get))\n print(\"The most popular item is \" + m + \" with a count of \" + str(counts[m]))"} {"instruction": "Create a function in Python that takes a number N and returns the sum of the first N odd numbers.", "input": "N = 5", "output": "def sum_of_odds(N):\n return sum([i for i in range(1, 2*N + 1, 2)])\n\nN = 5\nprint(sum_of_odds(N))"} {"text": "[DE Wikipedia] Russki Witjas\n\nDie russische Sikorsky Russki Witjas (, „Russischer Recke“, auch Le Grand) von 1913 gilt als einer der Meilensteine in der Luftfahrtgeschichte. Sie war das erste viermotorige Flugzeug der Welt und das erste reine Passagierflugzeug, das aufgrund seiner für die damaligen Zeit enormen Ausmaße auch als Riesenflugzeug bezeichnet wurde. Entwicklung Gebaut wurde die Russki Witjas von Igor Iwanowitsch Sikorski. Als er 1911 mit den Planungen für das Flugzeug begann, konnte kein Flugzeug mehr als 600 kg tragen. Den Rekord hielt der französische Pilot Ducis, der einen 800 m weiten Flug mit dieser Last vollführte. Als die Welt Anfang 1913 vom Bau der Russki Witjas erfuhr, glaubten die Experten und die Presse, dass diese Maschine niemals fliegen könnte. Trotz der Expertenmeinung flog die Russki Witjas am 13. Mai 1913 in Sankt Petersburg mit den Piloten Sikorski und Aleknowitsch erstmals. Die erste Version hatte noch die beiden 100-PS-Argus-Reihenmotoren hintereinander geschaltet, die zwei Zugpropeller antrieben. Sikorski war allerdings mit der Leistung unzufrieden und baute das Flugzeug auf vier Propeller um. In dieser Konfiguration wurde das Flugzeug erstmals am 23. Juli 1913 geflogen. Die Russki Witjas war ein sehr großer Doppeldecker mit 27 Metern Spannweite, der aus Fichten-, Kiefern- und Eschenholz aufgebaut war. Die Tragflächen waren mit Mahagonisperrholz und Leinengewebe bespannt. Das Flugzeug hatte eine 5,75 Meter lange und 1,85 Meter breite Kabine für den Piloten und die Passagiere. Die Passagierkabine war luxuriös mit vier Sitzen, einem Sofa, einem Tisch, elektrischem Licht sowie einem Waschraum ausgestattet. Die Passagiere durften während des Fluges umhergehen, ohne dass die Stabilität gefährdet gewesen wäre. Vor der Pilotenkabine befand sich ein Beobachtungsstand mit Suchscheinwerfer, sowie ein MG-Stand. Das Flugzeug hatte 16 Räder, vier große Kufen und benötigte eine Startstrecke von rund 700 m zum Abheben. Am 2. August 1913 errang die Russki Witjas eine Bestleistung, als sie mit sieben Passagieren beladen eine Stunde und 54 Minuten in der Luft verblieb. Insgesamt machte die Russki Witjas 53 Flüge ohne Unfall. Allerdings wurde die Tragfläche der Maschine am 11. September 1913 auf der Landebahn des Flugplatzes Krasnoje Selo schwer beschädigt, als ein Voisin-Doppeldecker im Flug sein Triebwerk verlor. Sikorski entschloss sich daraufhin, die Maschine zu zerlegen und ein neues Flugzeug zu bauen, die Ilja Muromez. Diese wurde später der erste viermotorige Bomber der Welt. Technische Daten Literatur Einzelnachweise Weblinks Sikorsky Erstflug 1913 Viermotoriges Flugzeug mit Kolbenmotoren Kurzstreckenflugzeug"} {"text": "[EN Wikipedia] Bódog Török\n\nBódog Török (2 November 1923 – 16 October 2012 in Budapest) was a Hungarian handball player, coach and sports official. He was the longest serving and the most successful coach in the history of the Hungarian women's national team. Török was born and died in Budapest. He began his playing career with Dunai Repülőgépgyár in 1943. In 1945, he switched to MÁV Északi Főműhely and a year later to Rendőrség. From 1947 until his retirement in 1965 he played for Kistext. Beside playing, he also took the head coaching position of the Hungarian women's national team. He led Hungary on nine major tournaments between 1956 and 1978 and won a medal on seven occasions. First, yet with the field handball team, he obtained the bronze medal on the 1956 World Championship held in West Germany. In the next year, Hungary finished runners-up in the first official team handball World Championship. In 1962, they experienced a setback, finishing only fifth in the World Championship. However, they bounced back at the next tournament in 1965, where Hungary went undefeated to win their first, and so far only, World title. This was followed by a long bronze-era, as Hungary ended up in the third position in three World Championships (1971, 1975, 1978) and on the Olympics in 1976. They only missed out the podium finish on the 1973 World Championship, where the Soviet Union proved to be too strong for Hungary in the bronze final. Török led the national team in a total of 307 matches. From 1979 to 1987, he was a member of the Board of Hungarian Handball Federation, and between 1983 and 1987 he was the editor of Kézilabdázás, a specialist handball journal. References Kozák, Péter (1995). Ki kicsoda a magyar sportéletben?, vol. III. (S–Z). Szekszárd: Babits Kiadó. . 1923 births 2012 deaths Handball players from Budapest Hungarian male handball players Hungarian handball coaches National team coaches Hungarian journalists"} {"instruction": "Create a Python function that takes in a list of words and check if every word in the list is a palindrome.", "input": "[\"abcd\", \"anna\", \"mom\", \"live\"]", "output": "def is_all_palindrome(words):\n for word in words:\n if word == word[::-1]:\n continue\n else:\n return False\n return True\n\nwords = [\"abcd\", \"anna\", \"mom\", \"live\"]\n\nprint(is_all_palindrome(words))"} {"text": "[HI Wikipedia] चुकिसाका विभाग\n\nचुकिसाका बोलिविया का एक प्रशासनिक विभाग (देपार्तामेन्त) है जो उस देश के दक्षिण-मध्य भाग में स्थित है। इसकी राजधानी सूक्रे शहर है जो बोलिविया की राष्ट्रीय संवैधानिक राजधानी भी है। विभाग के कुछ दृश्य इन्हें भी देखें बोलिविया के विभाग सन्दर्भ चुकिसाका विभाग बोलिविया के विभाग"} {"text": "[DE Wikipedia] Samuel Loew Hommel\n\nSamuel Loew Hommel (* 1839 in Gersfeld, heute Hessen; gest. 1912 in Nürnberg) war ein deutscher Religions- und Elementarlehrer jüdischen Glaubens. Hommel war eines von mehreren Kindern des jüdischen Ehepaares Jacob und Regina Hommel, die laut Matrikelliste Vieh- und Gewürzhändler waren. 1859 schloss er die Ausbildung zum Religions- und Elementarlehrer ab. Danach war er an mehreren Orten Hilfslehrer. 1864 wurde er Lehrer in Thalmässing. Im Rechnungsjahr 1864/1865 zahlte er das Bürgeraufnahmebuch. Er heiratete Klara Dachauer, Tochter einer Brödlingsfamilie der israelitischen Kultusgemeinde in Thalmässing und die beiden waren von 1864 bis 1907 im ehemaligen Kantorenhaus, dem damaligen israelitischen Schulhaus, neben der St. Marienkirche wohnhaft. Sie hatten acht gemeinsame Kinder, die alle in Thalmässing geboren wurden. Jette (1866–1942), lebte in Merseburg, in Theresienstadt ermordet Max (1867–1942), lebte in Stuttgart, Arzt, wurde vom NS-Staat deportiert Oskar (1868–?), lebte in Nürnberg Kathi (1869–1942), lebte in Frankfurt am Main, in Auschwitz ermordet Simon (1871–1901), lebte in Tahlmässing, Kaufmann die Zwillinge Salomon (1877–1877), starb nach 10 Tagen Recha (1877–?), lebt in Bad Mergentheim, nach Theresienstadt deportiert und ermordet Justus (1878–1941), lebte in Nürnberg, in Riga-Jungfernhof ermordet Fünf der acht Kinder wurden vom NS-Regime ermordet. 1867 erhielt er wie alle bayerischen Juden die rechtliche Gleichstellung mit allen anderen Bürgern des Landes. 1871 erhielt er auch die deutsche Staatsbürgerschaft. 1906 wurde er zum Volksschuloberlehrer befördert. 1907 wurde ihm mit 68 Jahren der Ruhestand bewilligt. Seine Heimatgemeinde Thalmässing verlieh ihm die Ehrenbürgerwürde. Da er seine Dienstwohnung verlassen musste, zog er nach Nürnberg. Auch der evangelische Dekan Gruber, als königlich bayerischer Lokalschulinspektor Hommels Vorgesetzter, fand lobende Worte. Der Israelitische Kultusvorsteher Salomon Neuburger überreichte als Zeichen der Wertschätzung eine goldene Uhr. Nach seinem Tod erhielt er postum von Prinzregent Luitpold von Bayern das Luitpoldkreuz verliehen. Quelle Ehrenbürger im Landkreis Roth Deutscher Geboren 1839 Gestorben 1912 Mann Schullehrer"} {"instruction": "Create a script to delete all system logs.", "input": "", "output": "#!/bin/bash # Remove all system log files sudo rm /var/log/*.log"} {"instruction": "Install and set up a database management system called MongoDB.", "input": "", "output": "1. Download and install the MongoDB server 2. Create data directories, a log file and a configuration file 3. Update configuration entries to reflect storage capacity and logging preferences 4. Start the MongoDB service 5. Create new users, roles and databases 6. Connect applications to MongoDB"} {"instruction": "Write a Python program to find the first non-repeated letter in a string.", "input": "\"apple\"", "output": "def first_non_repeating_letter(str):\n for char in str:\n if str.lower().count(char.lower()) == 1:\n return char\n\n return ''\n\n# main\nstr = \"apple\"\nprint(\"First non-repeating letter:\", first_non_repeating_letter(str))"} {"text": "[CS Wikipedia] Pod cirkusovým stanem\n\nKvapík pro lipicány v češtině, Sub cirkotendo (Pod cirkusovým stanem) v esperantu, je vzpomínková kniha českého autora Stanislava Bubeníčka, kterou napsal nejdříve česky (1965) a pak sám přeložil do esperanta pod literárním pseudonymem Stan Bubenič. Autor hrál v cirkusovém orchestru na klarinet a poutavě vylíčil své zážitky z cirkusového prostředí. Bubeníčkův esperantský překlad připravila do tisku jeho nizozemská přítelkyně Jenny Heetkamp-Senstius, které zaslal rukopis v roce 1969, ale vydání se podařilo až po autorově smrti v roce 1988. Protože se Stanislav Bubeníček naučil esperanto až v důchodu a krátce nato začal psát, kniha měla četné jazykové nedostatky, takže před vydáním prošla důkladnou redakcí. Původní název zněl Sub cirkotuko (Pod cirkusovou plachtou), před vydáním byly odstraněny drobné mluvnické a stylistické chyby, ale celková atmosféra cirkusu včetně cirkusácké hantýrky zůstala zachována. Související články Esperantská literatura Esperantská literatura Knihy z roku 1988"} {"instruction": "Create an array with the following elements: 1, 2, 3, 2, 1.", "input": "", "output": "[1, 2, 3, 2, 1]"} {"text": "[HI Wikipedia] राजस्व मंडल, राजस्थान\n\nभूमिका भूमि संबंधी विवाद अत्‍यन्‍त जटिल होते हैं। भूमि संबंधी तथ्यों को क्षेत्र में जा कर उपलब्‍ध तथ्‍यों के ठोस आधार पर अनुभवी अधिकारियों द्वारा ही ठीक तरह समझा जा सकता है। किन्तु चूंकि भूमि संबंधी मामले राज्‍य की अधिकांश कृषि आश्रित आम जनता से सीधा संबंध रखते हैं, उनसे राज्‍य की, विशेषतः ग्रामीण क्षेत्रों की, शान्ति एवं व्‍यवस्‍था के प्रश्न भी जुड़े हैं। भूमि सम्बन्धी विवादों में फंसे गरीब और अशिक्षित किसानों को, अनावश्‍यक कानूनी औपचारिकताओं में उलझाए बिना, सस्‍ता, शीघ्र और सुलभ न्‍याय मिले, इन सभी आशाओं और विश्‍वासों को पूरा करने के लिए राजस्थान सरकार द्वारा राजस्‍व मंडल, अजमेर को एक अधिष्‍ठान-न्यायालय बनाया गया है। राजस्व मुकद्दमों के निपटारे के लिए यह राजस्थान का सर्वोच्च अपील न्यायालय है जिसके निर्णय को केवल उच्च न्यायालय जोधपुर/जयपुर या उच्चतम न्यायालय दिल्ली में ही चुनौती दी जा सकती है। इसके अध्यक्ष और सदस्य मिल कर भूमि से सम्बंधित सभी विवादों का निपटारा राजस्व रिकॉर्ड आदि का अध्ययन कर करते हैं। राजस्व मुकद्दमों के निपटारे की प्रक्रिया अजमेर में राजस्थान राजस्व मंडल का मुख्यालय है, जयपुर में इसकी सर्किट बेंच है। राजस्व मंडल के सदस्य अपना चल-न्यायालय राज्य के संभागीय मुख्यालयों पर भी नियमित रूप से लगाते हैं ताकि ग्रामीण परिवादियों को अजमेर या जयपुर न आना पड़े और उनके निकटतम स्थान पर ही उनके मुकद्दमे की सुनवाई हो जाए| राजस्थान में १९४७ में भूमि सम्बन्धी वास्तविकताएं भारत-संघ में शामिल होते समय राजस्‍थान की जनसंख्‍या 201.5 लाख थी, जिसमें 1951 में 8.95 लाख शिक्षित नागरिक थे। उसके समूचे भू क्षेत्र 3.40 लाख वर्ग कि॰मी॰ में से मात्र 0.01 लाख वर्ग किमी ही शहरी क्षेत्र था। तब 32,240 गांवों में राजस्‍थान की 83.7 प्रतिशत आबादी रहती थी। इनमें से भी 76.7 प्रतिशत आबादी केवल कृषिकार्य में लगी हुई थी। उसके समस्‍त गांवों में से 67 प्रतिशत गांव 500 से भी कम आबादी वाले थे। राजस्‍थान की भूमि का 56.8 प्रतिशत भाग एकदम सूखा रेगिस्तानी क्षेत्र था। राजस्‍थान वस्‍तुतः हजारों छोटी छोटी ढाणियों, गुवाडों, गांवों तथा बिखरी हुई आबादी-बस्तियों का प्रदेश था। राजस्‍थान के बहुत बड़े भाग में सर्वेक्षण-कार्य और भूमि-बन्‍दोबस्‍त नहीं हुआ था। जब भू अभिलेख निदेशालय की स्‍थापना की गई थी, उस समय 3,387,94 वर्ग किमी में से केवल 2,136,42 वर्ग किमी क्षेत्र ही ‘बन्‍दोबस्‍त’ के अन्‍तर्गत आ पाया था। यहां तक कि पटवार-संस्‍था केवल 1,736,02 वर्ग किमी क्षेत्र में ही उपलब्‍ध थी। राजस्थान में ज़मींदारी प्रथा और किसान-का शोषण स्वाधीनता से पूर्व राजा या शासक ही अन्तिम अपील का न्‍यायालय था। वही स्‍वेच्‍छा से न्‍यायाधीशों को नियुक्‍त करता एवं हटाता था। समस्‍त भूमि का 60.7 प्रतिशत भाग जागीरदारों के तथा शेष 39.3 प्रतिशत भाग खालसा अर्थात् शासक के पास था। जागीरदार असल में समस्‍त कृषक से सम्बद्ध समस्‍याओं का स्रोत थे। अन्‍य बिचौलिये- ज़मींदार एवं बिस्‍वेदार भी उनके शोषण के ही माध्यम थे। अन्‍यायपूर्ण राजस्‍व दरों, तरह तरह के करों तथा फिरौतियों आदि के लिए आम किसान पर निर्बाध अत्‍याचार किये जाते थे। नये राज्‍य का 207920 वर्ग किमी भाग विविध प्रकार के जागीरदारों के अधिकार में था। जोधपुर और जयपुर में तों…"} {"instruction": "Construct a linked list of nodes in Python.", "input": "No Input", "output": "class Node:\n def __init__(self, data):\n self.data = data\n self.next = None\n\nclass LinkedList:\n def __init__(self):\n self.head = None\n\n def push(self, new_data): \n new_node = Node(new_data) \n new_node.next = self.head \n self.head = new_node \n \n def insert_after(self, prev_node, new_data): \n if prev_node is None: \n print \"The given previous node must be in Linked List.\"\n return\n \n new_node = Node(new_data) \n new_node.next = prev_node.next\n prev_node.next = new_node \n \n def append(self, new_data): \n new_node = Node(new_data) \n if self.head is None: \n self.head = new_node \n return\n \n last = self.head \n while (last.next):\n last = last.next\n last.next = new_node"} {"instruction": "Identify the advantages of using deep learning models.", "input": "", "output": "The advantages of using deep learning models include: the ability to handle large and complex datasets; the ability to achieve better generalization performance; greater accuracy than traditional machine learning algorithms; the ability to capture non-linear relationships; and improved efficiency."} {"instruction": "Write a Python program that parses an XML document and presents the data as an interactive web page. The program should generate HTML from the data in the XML document, and present it in a browser.", "input": "\n\n \n \n John Doe\n 30\n \n \n Jane Smith\n 25\n \n \n", "output": "import webbrowser\nfrom bs4 import BeautifulSoup\n\nxml_doc = \"John Doe30Jane Smith25\"\nsoup = BeautifulSoup(xml_doc, 'xml')\n\nhtml = \"\"\"\n\n \n People\n \n \n

    People

    \n \n \n \n \n \n \n \n \n\"\"\"\n\nfor person in soup.find_all('person'):\n name = person.find('name').text\n age = person.find('age').text\n html += f\" \"\n\nhtml += \"\"\"\n \n
    NameAge
    {name}{age}
    \n \n\n\"\"\"\n\nwith open('file.html', 'w') as f:\n f.write(html)\n\nwebbrowser.open('file.html')"} {"instruction": "Write a MySQL query to find the names of all the students who took both math and science classes.", "input": "", "output": "SELECT students.name FROM students WHERE EXISTS ( SELECT 1 FROM classes WHERE classes.student_id = students.id AND classes.subject IN ('math','science') GROUP BY classes.student_id HAVING COUNT(DISTINCT classes.subject) = 2 );"} {"text": "[EN Wikipedia] Mahendra Engineering College\n\nMahendra Engineering College (Autonomous) is an Engineering College in the Indian state of Tamil Nadu. It teaches engineering subjects for approximately 10,000 students pursuing the Bachelor of Engineering and/or MBAs. The college offers undergraduate programs in the disciplines of mechanical, civil, EEE, ECE, EIE, CSE, IT, MAE (Mechanical and Automation), petrochemical, food technology, chemical, pharmaceutical, MCT (Mechatronics) and Aeronautical engineering and postgraduate programs in Mechanical, Electrical and Communication fields along with the MBA and the MCA. Facilities The college is located on a 250-acre campus. It has bus facilities for commuting students and 25 km from Salem and 15 km from Tiruchengode. History Shri M.G.Barath Kumar is the founder and the chairman. The college was established in 1995. Demographics Students are from Tamil Nadu, Kerala, Andhra Pradesh, Uttar Pradesh, Bihar, Delhi, Rajasthan, Manipur, the Andaman and Nicobar islands etc., and other countries. The students are provided with food through a subsidized catering system, and hostel occupancy with separate hostels for girls and boys, graduate and post-graduate students, and newcomers. The hostel complex is situated inside the Mahendra combined campus only. The college is known for its support to students from all classes of the society. Scholarships and other monetary supports are offered to students in need. The fee structure of the college is determined as per the Anna University-decided fee system. Special support and encouragement are given to students who excel in academics. Approval & Affiliation A Pioneer in Technical Education in South India was established by the Mahendra Educational Trust which has been offering education since the 1980s.. Approved by All India Council for Technical Education (AICTE), Government of India. Affiliated to Anna University, Tamil Nadu, India (A University of international repute) Autonomous Institution. Accredited by NAAC with 'A' Grade Approved by UGC under 2(f) and 12(B) sections. Certified ISO 9001:2008 by BSI Quality International. accredited by NBA TIER-1 (Washington Accord) for UG: (CSE, ECE, EEE) Courses Mechanical engineering civil engineering Computer science and engineering Information technology Electrical and Electronic engineering Electronics and communication engineering Electronics and Instrumentation engineering Mechatronics engineering Mechanical and Automation engineering Agriculture engineering Aeronautical engineering Food technology Chemical engineering Petrochemical engineering pharmaceutical engineering U.G. Programmes offered (Bachelor's degree) B.E. / B.Tech. Degree Programmes Aeronautical Engineering Agricultural Engineering Civil Engineering Computer Science and Engineering Electronics and…"} {"text": "[EN Wikipedia] What Do You Meme?\n\nWhat Do You Meme? is a humorous party card game from Jerry Media in which players propose caption cards as a match to a designated photo (or meme) card. The judge of the round chooses the caption that they think is the best match to photo card, and whoever played that card gets a point. The name of the game refers to internet memes and is a play on the phrase what do you mean. The game has been compared to Cards Against Humanity. The game was created by Elliot Tebele and Ben Kaplan in 2016. It was launched on Kickstarter on June 14, 2016, and it exceeded its goal of $10,000. The following year, in 2017, it was the 9th best selling game on Amazon. Gameplay The game comes with 75 photo cards and 360 caption cards. Intended for between three and twenty people at once, the game requires players to choose a caption card to match a given photo card. A judge, called \"The Jerry,\" chooses the funniest caption card out of all those submitted during that round, and whoever had submitted it is the champion of the round. What Do You Meme sells themed expansion packs. The game has partnered with various brands to launch expansion packs such as the SpongeBob SquarePants Family Edition. References Dedicated deck card games Party games"} {"instruction": "Create a Python web application for a car insurance calculator. The application should have a page where the user can input the data (e.g age, gender, car model, etc) and should return a calculated insurance price.", "input": "Not applicable", "output": "import flask\nfrom flask import request, jsonify\n\n# Creating the application app\napp = flask.Flask(__name__)\n\n\n@app.route('/calculate', methods=['POST'])\ndef calculate():\n # Get the input data from the user\n data = request.get_json()\n\n age = data['age']\n gender = data['gender']\n car_model = data['car_model']\n\n # Calculate the insurance price\n # ...\n insurance_price = 0.00\n\n # Return the calculated insurance price in JSON format\n return jsonify({'insurance_price': insurance_price})\n\t\napp.run(host='0.0.0.0', port=8006)"} {"instruction": "Can you code a solution to Bubble Sort an array of integers?", "input": "[5, 4, 3, 2, 1]", "output": "def bubbleSort(arr): n = len(arr) # Traverse through all array elements for i in range(n): # Last i elements are already in place for j in range(0, n-i-1): # traverse the array from 0 to n-i-1 # Swap if the element found is greater # than the next element if arr[j] > arr[j+1] : arr[j], arr[j+1] = arr[j+1], arr[j] # Driver code to test above arr = [5, 4, 3, 2, 1] bubbleSort(arr) print (\"Sorted array is:\") for i in range(len(arr)): print (\"%d\" %arr[i]),"} {"text": "[EN Wikipedia] Alps\n\nThe Alps () are the highest and most extensive mountain range that is entirely in Europe, stretching approximately across eight Alpine countries (from west to east): Monaco, France, Switzerland, Italy, Liechtenstein, Germany, Austria and Slovenia. The Alpine arch extends from Nice on the western Mediterranean to Trieste on the Adriatic and Vienna at the beginning of the Pannonian Basin. The mountains were formed over tens of millions of years as the African and Eurasian tectonic plates collided. Extreme shortening caused by the event resulted in marine sedimentary rocks rising by thrusting and folding into high mountain peaks such as Mont Blanc and the Matterhorn. Mont Blanc spans the French–Italian border, and at is the highest mountain in the Alps. The Alpine region area contains 128 peaks higher than . The altitude and size of the range affect the climate in Europe; in the mountains, precipitation levels vary greatly and climatic conditions consist of distinct zones. Wildlife such as ibex live in the higher peaks to elevations of , and plants such as edelweiss grow in rocky areas in lower elevations as well as in higher elevations. Evidence of human habitation in the Alps goes back to the Palaeolithic era. A mummified man (\"Ötzi\"), determined to be 5,000 years old, was discovered on a glacier at the Austrian–Italian border in 1991. By the 6th century BC, the Celtic La Tène culture was well established. Hannibal notably crossed the Alps with a herd of elephants, and the Romans had settlements in the region. In 1800, Napoleon crossed one of the mountain passes with an army of 40,000. The 18th and 19th centuries saw an influx of naturalists, writers, and artists, in particular, the Romantics, followed by the golden age of alpinism as mountaineers began to ascend the peaks of the Alps. The Alpine region has a strong cultural identity. The traditional culture of farming, cheesemaking, and woodworking still exists in Alpine villages, although the tourist industry began to grow early in the 20th century and expanded greatly after World War II to become the dominant industry by the end of the century. The Winter Olympic Games have been hosted in the Swiss, French, Italian, Austrian and German Alps. the region is home to 14 million people and has 120 million annual visitors. Etymology and toponymy The English word Alps comes from the Latin Alpes. The Latin word Alpes could possibly come from the adjective albus (\"white\"), or could possibly come from the Greek goddess Alphito, whose name is related to alphita, the \"white flour\"; alphos, a dull white leprosy; and finally the Proto-Indo-European word *albʰós. Similarly, the river god Alpheus is also supposed to derive from the Greek alphos and means whitish. In his commentary on the Aeneid of Vergil, the…"} {"instruction": "Generate an HTML table with 3 columns for Name, Email and Phone Number.", "input": "", "output": "
    Name Email Phone Number
    John Doe john@example.com 123-456-7890
    "} {"instruction": "Create a JavaScript statement to output the prompt \"Please enter your name:\".", "input": "", "output": "prompt(\"Please enter your name:\");"} {"text": "[CS Wikipedia] Pavel Rynt\n\nPavel Rynt (* 18. dubna 1943 Kralupy nad Vltavou) je český komunální politik, člen Klubu angažovaných nestraníků a v letech 1990–2006 starosta města Kralupy nad Vltavou. Je ženatý (manželka Olga) a má dva syny, Pavla (* 1966) a Milana (* 1971). Vzdělání a profesní kariéra Vystudoval Pedagogický institut Univerzity Karlovy v Brandýse nad Labem, obor Matematika a hudební výchova pro II. stupeň ZŠ. Do svého zvolení starostou města působil jako učitel matematiky a hudební výchovy na 2. stupni ZŠ a hudebník. Politická kariéra První polistopadový starosta města Kralupy nad Vltavou zvolený za Občanské fórum. Před revolucí bez politické příslušnosti, od roku 1990 člen Klubu angažovaných nestraníků. V roce 2001 byl zvolen členem Ústřední rady KAN a jejím místopředsedou. Ve funkci starosty působil čtyři volební období od roku 1990 až do roku 2006. První úkoly, které musel ve své nové funkci řešit, byl přerod bývalého národního výboru na plně fungující radnici města, restituce a privatizace, včetně privatizace městského bytového fondu. Za svého působení se zasloužil např. o výstavbu lávky pro pěší a cyklisty, dvou penzionů pro seniory, stavbu nových a rekonstrukci stávajících bytových domů, vybudování sítě místních komunikací a cyklostezek, nových parkovacích ploch i ploch veřejné zeleně a hřišť. Za jeho vedení se městu dařilo hospodařit s vyrovnaným rozpočtem bez zbytečných úvěrů. Z jeho iniciativy byla také založena tradice řady sportovních a kulturních akcí (festival poezie Seifertovy Kralupy, Dny Kralup, turnaj v malé kopané O pohár starosty města aj.) a navázáno partnerství s několika městy v zahraničí (Banyuls sur Mer, Henningsdorf, Ikast, Komárno). Stál u založení Sdružení rodáků a příznivců Kralup nad Vltavou. Při rozsáhlé povodni roku 2002 řídil činnost krizového štábu a následné odstraňování následků a obnovu města. Externí odkazy http://www.kan.cz/predsednictvo/rynt.htm http://www.kralupy.cz/zpravodaj/index.php?v=261&x=1797 http://www.rozhlas.cz/zpravy/domaci/_zprava/128719 http://blisty.cz/art/11456.html http://melnicky.denik.cz/zpravy_region/tucet-otazek-pro-kralupske-politiky-pavel-rynt.html Starostové Kralup nad Vltavou Narození v roce 1943 Žijící lidé Muži"} {"instruction": "Using a given array of numbers, create a function to display the frequency of each number.", "input": "", "output": "def frequency(array): count = {} # Count the number of occurances for element in array: if element not in count: count[element] = 1 else: count[element] += 1 # Display the count for element in count: print(\"Number {} occurs {} times\".format(element, count[element]))"} {"instruction": "Create a Python script that prints the top three words from a given sentence.", "input": "sentence= \"This is a really long sentence with many words.\"", "output": "import collections\n\nsentence = \"This is a really long sentence with many words.\"\n\n# Split the given sentence into a list of words\nwords = sentence.split(\" \")\n\n# Count the occurrence of each word\nword_freq = collections.Counter(words)\n\n# Print out the top three words\nfor word, count in word_freq.most_common(3):\n print(f'{word}: {count}')"} {"instruction": "Given a string containing a sentence, create a function in Python that returns a list of words in the sentence that are longer than 5 characters.", "input": "Not applicable", "output": "def long_words(sentence):\n words = sentence.split(' ')\n long_words = []\n \n for word in words:\n if len(word) > 5:\n long_words.append(word)\n \n return long_words"} {"text": "[EN Wikipedia] No Light, No Light\n\n\"No Light, No Light\" is a song by English indie rock band Florence and the Machine from their second studio album, Ceremonials (2011). The song was written by band members Florence Welch and Isabella Summers while the production was handled by Paul Epworth. Island Records released the song as the second single from the album on 16 January 2012. The song was the first one written for the album in the band's tour bus in Amsterdam. Lyrically, in the song, Welch expresses frustration about the state of her fragile relationship and further tries to keep it together. \"No Light, No Light\" received positive reviews by music critics who generally praised Welch's vocals and the drum-led instrumentation. It was also placed on several critics' year-end lists of best singles. The song peaked at number 50 on the UK Singles Chart, the Irish Singles Chart and number 39 on the US Billboard Alternative Songs chart. An accompanying music video for the song premiered on 18 November 2011 and was directed by Icelandic duo Arni & Kinski. It includes shots of Welch singing on a skyscraper and being chased by a contortionist. Upon its release, the video received mixed to positive reviews by critics who praised the dramatic shots, the religion and voodoo references. However, following its online release, several publications and users on various websites commented on the use of racism and racial imagery due to the black face of the voodoo man at the beginning, which Welch later denied. \"No Light, No Light\" was performed live by the band several times on television shows and at the 2012 BRIT Awards held at The O2 Arena in London. They also performed the song during the encore of their second worldwide Ceremonials Tour (2011–12). Background and release \"No Light, No Light\" was written by band members Florence Welch and Isabella Summers while the production was handled by Paul Epworth. The song was recorded in 2011 at the Abbey Road Studios. According to Welch, \"No Light, No Light\" was the first song written for the album. During an interview with MTV News she confirmed the release of the song. Welch further revealed that the intro of the song was written during the tour in Amsterdam, \"We had gone out for Rob [Ackroyd]'s birthday to an all-night restaurant in Brussels called Midnights. We went to this funny restaurant and then got on the tour bus and everyone was a bit drunk and it was like, 'Yeah, let's write a song.'\" Welch also said that \"No Light, No Light\" was also recorded in Amsterdam, \"And we recorded the sound of the bus moving, a real drone-y bass sound, and that's the intro, and then the tour bus arrived in Amsterdam [and we were saying], 'Let's go toast this song! We will find a bar that will serve us drinks at 7 in the morning! Come!'.[...] So we trotted off into…"} {"instruction": "Create a method to multiply two numbers.", "input": "", "output": "public static int multiply(int num1, int num2) { return num1 * num2; }"} {"instruction": "Create an Angular controller that adds two numbers.", "input": "", "output": "app.controller(\"addNumbersController\", function($scope) { $scope.total = 0; $scope.add = function() { $scope.total = $scope.number1 + $scope.number2; } });"} {"instruction": "Create an SQL table with three columns called id (int type), name (text type), and age (int type).", "input": "", "output": "CREATE TABLE people ( id INT PRIMARY KEY, name TEXT, age INT );"} {"text": "[DE Wikipedia] Csilla Madarász-Dobay\n\nCsilla Madarász-Dobay (* 23. Juni 1943 in Budapest als Csilla Madarász; † 31. Dezember 2021) war eine ungarische Schwimmerin. Leben Csilla Madarász stellte am 2. Juli 1960 mit einer Zeit von 1:02,9 Minuten einen neuen Europarekord über 100 Meter Freistil auf. Nur zwei Wochen später konnte sie diesen um 4 Hundertstel verbessern. Bei den Olympischen Spielen 1960 in Rom wurde sie im Wettkampf über 100 m Freistil Fünfte. In den Staffelwettkämpfen über 4 × 100 m Freistil sowie den 4 × 100 m Lagen belegte sie mit ihrer Nation den vierten respektive sechsten Platz. Ein Jahr später machte sie ihren Abschluss am Hámán Kató Leánygimnáziumban und gewann bei den Europameisterschaften 1962 mit der 4 × 100-m-Freistilstaffel die Bronzemedaille. Bei der Sommer-Universiade 1963 und 1965 gewann Madarász jeweils drei Goldmedaillen. Auch bei den Olympischen Spielen 1964 konnte Madarász in jedem ihrer Wettkämpfe das Finale erreichen. So schwamm sie im Wettkampf über 100 m Freistil auf Rang sechs und wurde mit der 4 × 100 m Freistil Vierte. Im Staffelwettkampf über 4 × 100 m Lagen wurde die ungarische Staffel im Finale disqualifiziert. Auf nationaler Ebene gewann Madarász 14 Meistertitel. In den 1960er Jahren heiratete sie ihren Schwimmkollegen Gyula Dobay. Weblinks Schwimmer (Ungarn) Olympiateilnehmer (Ungarn) Teilnehmer der Olympischen Sommerspiele 1960 Teilnehmer der Olympischen Sommerspiele 1964 Universiadeteilnehmer (Ungarn) Sieger bei den World University Games (Schwimmen) Teilnehmer der Sommer-Universiade 1963 Teilnehmer der Sommer-Universiade 1965 Ungarischer Meister (Schwimmen) Ungar Geboren 1943 Gestorben 2021 Frau"} {"instruction": "Create a python program for predicting user ratings for a movie on the IMDB database.", "input": "Features: director_name, num_critic_for_reviews, duration, gross, \n\nIMDB rating for movie 'Grey Island': 3.6", "output": "import pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LinearRegression\n\n# Read IMDB data\ndata_df = pd.read_csv('imdb_data.csv')\n\n# Create input data\nX = data_df[['director_name', 'num_critic_for_reviews', 'duration', 'gross']]\ny = data_df['imdb_score']\n\n# Split 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=0)\n\n# Train model\nregressor = LinearRegression() \nregressor.fit(X_train, y_train)\n\n# Predict rating for movie 'Grey Island'\ngrey_island_X = [['Grey Island', 2, 101, 1607800]]\n\nprint(regressor.predict(grey_island_X)) # Output: [3.6]"} {"instruction": "Find the sum of the first 10 positive integers", "input": "", "output": "The sum of the first 10 positive integers is 55."} {"instruction": "Generate a python program that creates a new list by appending an element to the last of an existing list.", "input": "[1, 2, 3]", "output": "def appendElementToList(list, element):\n list.append(element)\n return list\n\nlist = [1, 2, 3]\nelement = 4\nprint(appendElementToList(list, element))"} {"instruction": "Write a Python program to generate customer profiles from a large data set.", "input": "The dataset contains 1000 customer records with fields such as age, gender, location, product purchase, etc.", "output": "import numpy as np\nimport pandas as pd\n\n# Read the data set\ndataset = pd.read_csv('customer-data.csv') \n\n# Determine the unique features in the data\nfeatures = np.unique(np.concatenate([dataset[column].value_counts().keys() for column in dataset.columns]))\n\n# Create the customer profile from the data\ncustomer_profile = dict()\n\nfor f in features:\n # Find the frequency of feature across the dataset\n freq = np.sum(dataset == f)\n # Calculate the probability of the feature\n prob = freq / dataset.shape[0]\n # Store the results in customer_profile\n if prob >= 0.5:\n customer_profile[f] = 'High'\n elif prob < 0.5 and prob > 0.2:\n customer_profile[f] = 'Medium'\n else:\n customer_profile[f] = 'Low'\n \nprint(customer_profile)"} {"instruction": "Edit the code to extract the data from the given dictionary.", "input": "data = { 'name': 'John', 'age': 23, 'address': { 'street': '123 Main Street', 'city': 'Los Angeles' } }", "output": "name = data['name'] age = data['age'] street = data['address']['street'] city = data['address']['city']"} {"instruction": "Write a Python function to check whether a year is leap year or not.", "input": "", "output": "def is_leap_year(year):\n if (year % 4 == 0):\n if (year % 100 == 0):\n if (year % 400 == 0):\n return True\n else:\n return False\n else:\n return True\n else:\n return False\n\nyear = int(input(\"Enter a year: \"))\n\nif is_leap_year(year):\n print(year, \"is a leap year\")\nelse:\n print(year, \"is not a leap year\")"} {"instruction": "Develop a Python script to extract some text from a website.", "input": "Website URL: http://example.com", "output": "import requests\nfrom bs4 import BeautifulSoup\n \nresponse = requests.get(\"http://example.com\")\n \nsoup = BeautifulSoup(response.content, \"html.parser\")\n \ntext = soup.get_text()\nprint(text)"} {"instruction": "Write a JavaScript program to loop through an array in reverse order.", "input": "var arr = [5, 2, 6, 9, 3];", "output": "var arr = [5, 2, 6, 9, 3]; for (var i = arr.length-1; i >= 0; i--) { console.log(arr[i]); }"} {"text": "[CS Wikipedia] Veněra-D\n\nVenera-D (rusky Венера-Д) je připravovaná ruská vesmírná planetární sonda k Venuši, která má být vypuštěná okolo roku 2026. Jejím hlavním cílem budou vzdálené pozorování Venuše podobně jako americká sonda Magellan v 90. letech 20. století, ale s využitím výkonnějšího radaru. Jejím dalším úkolem bude mapování budoucích míst vhodných na přistání. V misi se plánuje i kapsle, která má přistát na povrchu, s dlouhou životností (podobně jako při předcházejících misích Veněra). Venera-D je první ruská sonda k Venuši (všechny předcházející sondy Veněra patřily bývalému SSSR). Veněra-D bude vlajkovou lodí nové generace ruských sond k Venuši, dohromady s kapslí pro přistání na povrchu planety, která bude schopná odolávat tvrdému prostředí Venuše více než 1,5 hodiny. Kvůli udržení nízkých nákladů na vývoj a výzkum se bude Veněra-D podobat předcházejícím sondám typu Veněra ze sovětské éry, ale bude vybavená novými technologiemi vyvinutými v Rusku od poslední mise k Venuši (Vega 1 a Vega 2 v roce 1985). Nosnou raketou Veněry-D bude pravděpodobně Proton nebo výkonnější raketa Angara. Reference Externí odkazy Program Veněra de:Venera-Mission#Venera D"} {"instruction": "Create a dictionary containing the key-value pair of a given string.", "input": "string = \"test string\"", "output": "\"\"\" Create a dictionary containing the key-value pair of a given string \"\"\" # Given string string = \"test string\" # Initialising an empty dictionary my_dict = {} # Looping through the given string for char in string: # If the character is not already in dictionary if char not in my_dict: # Adding the character to the dictionary my_dict[char] = 1 # If the character already exists in dictionary else: # Incrementing the frequency my_dict[char] += 1 # Printing the dictionary print(my_dict)"} {"text": "[CS Wikipedia] Oleg Salenko\n\nOleg Anatoljevič Salenko (rusky Олег Анатольевич Саленко; ukrajinsky Олег Анатолійович Саленко, transkripcí z ukrajinštiny Oleh Anatolijovyč Salenko; * 25. říjen 1969, Leningrad) je bývalý rusko-ukrajinský fotbalista. Reprezentoval ve svém životě tři země: Sovětský svaz (4 zápasy v reprezentaci do 20 let), Ukrajinu (1 start roku 1992) a Rusko, za něž v letech 1993–1994 odehrál 8 utkání, v nichž dal 6 gólů - všechny na mistrovství světa roku 1994 v USA, což z něj udělalo nejlepšího střelce šampionátu (spolu s Christo Stoičkovem). Jeho výkon byl ojedinělým také v tom, že pět branek zaznamenal v jediném zápase, v základní skupině s Kamerunem. Je jediným hráčem historie mistrovství světa, který se stal nejlepším střelcem, i když jeho tým vypadl již v základní skupině. Reprezentační góly Góly Olega Salenka za A-tým Ruska Reference Externí odkazy Statistiky RSSSF Profil na stránkách věnovaných ruské fotbalové reprezentaci Statistiky FIFA Sovětští fotbalisté Ruští fotbalisté Ukrajinští fotbalisté Ruští fotbaloví reprezentanti Ukrajinští fotbaloví reprezentanti Fotbaloví útočníci Fotbalisté Glasgow Rangers Fotbalisté Dynama Kyjev Fotbalisté Zenitu Petrohrad Fotbalisté Pogoń Szczecin Fotbalisté Valencie Fotbalisté Córdoba CF Fotbalisté Istanbulsporu Narození v roce 1969 Narození 25. října Narození v Petrohradu Sportovci z Petrohradu Žijící lidé Muži Fotbalisté CD Logroñés Hráči Mistrovství světa ve fotbale 1994"} {"text": "[EN Wikipedia] Last word (cocktail)\n\nThe last word is a gin-based Prohibition-era cocktail originally developed at the Detroit Athletic Club. While the drink eventually fell out of favor, it enjoyed a renewed popularity after being rediscovered by the bartender Murray Stenson in 2003 during his tenure at the Zig Zag Café and becoming a cult hit in the Seattle area. Original recipe and variations The Last Word consists of equal amounts of gin, green Chartreuse, maraschino liqueur and freshly pressed lime juice, which are combined in a shaker with ice. After shaking, the mix is poured through a cocktail strainer into the glass so that the cocktail contains no ice and is served straight up. The cocktail has a pale greenish color, primarily due to the Chartreuse. Audrey Saunders of the Pegu Bar in New York City considers it one of her bar's best cocktails and describes its taste as follows: The taste may also vary slightly depending on the brand of gin being used. The original cocktail at the Detroit Athletic Club during the Prohibition era used bathtub gin, and even today the club is using its own recreation of \"Prohibition era bathtub gin\" (vodka, spices, herbs, citrus) for it. Some variations of the cocktail have sprung up, which usually replace the gin with another base liquor and sometimes switch the limes for lemons. A particularly well-known variation is the Final Ward, created by the New York bartender Phil Ward, who replaced the gin with rye whiskey and the lime juice with lemon juice. Rick Dobbs adapted the Last Word by substituting smoky mezcal for gin, emphasizing the earthy, savoury taste of mezcal. He named the drink Last of The Oaxacans. History The first publication in which the Last Word appeared was Ted Saucier's 1951 cocktail book Bottoms Up!. In it, Saucier states that the cocktail was first served around 30 years earlier at the Detroit Athletic Club and later introduced in New York by Frank Fogarty. Since this dates the creation of the drink to the first years of the prohibition (1919-1933), it is usually considered a prohibition era drink. A research in the archives of the Detroit Athletic Club by St. John Frizell revealed later that the drink was slightly older predating the prohibition era by a few years. It was already offered on the club's 1916 menu for a price of 35 cents (about $8.22 in 2019 currency) making it the club's most expensive cocktail at the time. Fogarty himself was no bartender but one of the best known vaudevillian monologists (roughly comparable to today's stand-up comedians) of his time. Some assume that this occupation gave rise to the cocktail's name. Nicknamed the \"Dublin minstrel\" Fogarty often opened his performance with a song and ended it with a serious heartthrob recitation. In 1912 he won the New York Morning Telegraph contest for the…"} {"instruction": "Create a code to sort a list of strings based on the length of the strings.", "input": "my_list = ['apples', 'bananas', 'oranges']", "output": "def sort_strings_by_length(my_list): \"\"\"This function takes in a list of strings and sorts them based on the length of the strings. Parameters ---------- my_list : list The list of strings. Returns ------- The sorted list of strings. \"\"\" return sorted(my_list, key=len)"} {"instruction": "Generate a Python function to calculate the area of a triangle given the three sides.", "input": "", "output": "def triangle_area(side1, side2, side3):\n s = (side1 + side2 + side3) / 2\n area = (s * (s - side1) * (s - side2) * (s - side3)) ** 0.5\n return area"} {"instruction": "Design a program that takes a date in the format dd/mm/yyyy as input and prints the day of that given date", "input": "01/02/2020", "output": "day = int(input(\"Enter date in dd/mm/yyyy format: \").split('/')[0]) month = int(input(\"Enter date in dd/mm/yyyy format: \").split('/')[1]) year = int(input(\"Enter date in dd/mm/yyyy format: \").split('/')[2]) # Determine day name day_num = datetime(year, month, day).weekday() days = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"] day_name = days[day_num] print(\"The day is: \", day_name)"} {"instruction": "Create a python script to group values according to given conditions.", "input": "group1 = [1, 2, 3, 4] \ngroup2 = [5, 6, 7, 8] \ncondition = lambda x: x > 5", "output": "group1 = [1, 2, 3, 4] \ngroup2 = [5, 6, 7, 8] \ncondition = lambda x: x > 5\n\ngroup_1 = list(filter(condition, group1))\ngroup_2 = list(filter(condition, group2))\n\nprint(group_1)\nprint(group_2)"} {"instruction": "Write a SQL query to find records where the name starts with ‘Jo’.", "input": "", "output": "SELECT * FROM tableName WHERE name LIKE 'Jo%'"} {"instruction": "Implement a stack data structure using linked lists.", "input": "", "output": "class Node: def __init__(self, data): self.data = data self.next = None class Stack: def __init__(self): self.head = None self.num_elements = 0 def push(self, element): new_node = Node(element) if self.head == None: self.head = new_node else: new_node.next = self.head self.head = new_node self.num_elements += 1 def pop(self): if self.is_empty(): return None temp = self.head self.head = self.head.next self.num_elements -= 1 return temp.data def is_empty(self): if self.num_elements == 0: return True return False def top(self): if self.head: return self.head.data return None"} {"instruction": "List the different access modifiers in Java", "input": "", "output": "The access modifiers in Java are public, private, protected, and default. Public members are accessible everywhere and can be inherited. Private members can only be accessed within the same class. Protected members are accessible within the same package but can be inherited to a subclass in a different package. Default, or package-private, members are accessible within the same package but cannot be inherited."} {"instruction": "Print the first 10 Fibonacci numbers using a loop.", "input": "", "output": "a, b = 0, 1 for i in range(10): print(a) a, b = b, a + b"} {"instruction": "Retrieve the last character of a given string.", "input": "Programming", "output": "g"} {"text": "[EN Wikipedia] Daniel Hallberg\n\nDaniel Hallberg, (born 30 September 1987) is a Swedish comedian and television presenter. In 2019, Hallberg presented Grammisgalan 2019 along with Rennie Mirro. Hallberg has participated in the stageshow and later on the talk show television version of Luuk & Hallberg along with Kristian Luuk which has been broadcast on SVT. Hallberg presented Musikhjälpen 2019, which were broadcast on Sveriges Radio and SVT. References 1987 births Living people Swedish comedians"} {"instruction": "Find all occurrences of a substring in a given string.", "input": "string = \"the cat in the hat\" substring = \"cat\"", "output": "def find_substring_occurrences(string, substring): occurrence_list = [] index = 0 while string.find(substring, index) != -1: index = string.find(substring, index) occurrence_list.append(index) index += 1 return occurrence_list"} {"text": "[CS Wikipedia] Albánie\n\nAlbánie (, také ), plným názvem Albánská republika (), je středomořský stát v jihovýchodní Evropě na Balkánském poloostrově. Na severu sousedí s Černou Horou, na severovýchodě s Kosovem, na východě se Severní Makedonií a na jihovýchodě s Řeckem. Západní část Albánie leží na pobřeží Jaderského moře, zatímco její jihozápadní část leží na pobřeží Jónského moře. Od Itálie, kterou od Albánie odděluje Otrantský průliv, je vzdálena 72 kilometrů. Hlavní město Tirana, kde žije přibližně 895 tisíc obyvatel, je finančním centrem země. K roku 2011 žilo v zemi 2 821 997 obyvatel. Etnicky se jedná o poměrně homogenní zemi, kterou z 95 % tvoří Albánci, z náboženství zde převažuje islám. Demograficky se jedná o velmi mladou zemi, neboť střední věk obyvatelstva je 29,9 let (pro srovnání: v Česku je to 40,1 let). Albánie je členem Organizace spojených národů (OSN), Severoatlantické aliance (NATO), Organizace pro bezpečnost a spolupráci v Evropě (OBSE), Rady Evropy, Světové obchodní organizace (WTO), Středoevropské zóny volného obchodu (CEFTA), Organizace islámské spolupráce (OIC) a jedním ze zakládajících členů Unie pro Středomoří. Od ledna 2003 byla potenciálním kandidátem na vstup do Evropské unie a 28. dubna 2009 o členství v Evropské unii formálně požádala. Od roku 2014 je oficiálním žadatelem o členství, přístupové rozhovory začaly v březnu 2020. Albánie je parlamentní republikou s tržní ekonomikou. Reformy a transformace trhu otevřely zemi zahraničním investicím, zejména co se týká rozvoje energetického průmyslu a dopravní infrastruktury. Dějiny Důkazy o paleolitické populaci neandrtálců na území Albánie byly objeveny na jihu země v Xarrë (v kraji Vlora) a v jejím středu, nedaleko Tirany, v pohoří Dajti. Mezi objevené předměty v jeskyni poblíž Xarrë patří nástroje z pazourku a jaspisu, zatímco v Dajti šlo o kostěné a kamenné nástroje podobné těm z aurignacienské kultury. Ve střední a jižní Albánii bylo nalezeno také mnoho artefaktů z doby železné a bronzové, poblíž mohylových pohřebišť. Archeologové došli k závěru, že tyto oblasti byly osídleny od poloviny třetího tisíciletí před naším letopočtem indoevropskými lidmi, kteří mluvili protořeckým jazykem. Část této historické populace se později kolem roku 1600 př. n. l. přestěhovala do Mykén, kde založila mykénskou civilizaci. Dalším starořecky mluvícím kmenem byli Chaoniané na jihu dnešní Albánie, ti vybudovali město Foiniké (dnešní Finiq). Jejich území se později stalo součástí Epiru, důležitého antického království, jež ovlivňovalo i starořecké dějiny. Dalším z příchozích kmenů byli Thrákové, kteří se usadili zejména na západě země. Důležitou skupinou kmenů pro albánskou etnogenezi pak byli Ilyrové, kteří se na albánském území začali objevovat kolem roku 2000 př. n. l.. Byli to lidé mluvící indoevropským…"} {"instruction": "Insert this HTML element at the appropriate place.", "input": "

    Important Text

    ", "output": "

    Some other text here

    Important Text

    "} {"instruction": "What is the purpose of treemaps in data visualization?", "input": "", "output": "Treemaps are used to represent hierarchical data visually. They are used to visualize large datasets by dividing them into rectangles proportional to their values. This makes it easier to quickly compare values and identify patterns across datasets."} {"text": "[EN Wikipedia] Rosemary Ames\n\nRosemary Ames (December 11, 1906 – April 15, 1988) was an American film actress who had a brief career in the early 1930s. Born in Evanston, Illinois, Ames's father was Knowlton Lyman (Snake) Ames, who played fullback for Princeton University in the 1880s. She made her film acting debut in the 1932 movie Love on the Spot, portraying the lead role opposite Richard Dolman. She starred in Mr. Quincey of Monte Carlo in 1933, again playing the lead role opposite John Stuart. In 1934 she starred in I Believed in You, Such Women Are Dangerous, and Pursued. Her first premier role was alongside Janet Gaynor and Warner Baxter in the 1935 film One More Spring. She followed that starring opposite Edmund Lowe and Victor McLaglen in The Great Hotel Murder, and opposite Shirley Temple and Joel McCrea in Our Little Girl that same year. That was her last film role. For reasons unknown, although her career was on track and she had been successful with leading roles throughout, she retired unexpectedly in 1935. She never returned to acting. Marriages She married three times; to Abner Stillwell, to British theatre manager Bertie Alexander Meyer, and E. Ogden Ketting. She had one child, a daughter Julie Brosseau by Ketting. She died on April 15, 1988, aged 81, in Truth or Consequences, New Mexico where she lived. Filmography Love on the Spot (1932) Mr. Quincey of Monte Carlo (1933) Pursued (1934) I Believed in You (1934) Such Women Are Dangerous (1934) One More Spring (1935) The Great Hotel Murder (1935) Our Little Girl (1935) References 20th-century American actresses 1906 births 1988 deaths Actresses from Evanston, Illinois American film actresses People from Truth or Consequences, New Mexico"} {"text": "[CS Wikipedia] Elektrický náboj\n\nElektrický náboj je fyzikální veličina a vlastnost hmoty. Hmota nesoucí elektrický náboj je zdrojem elektromagnetického pole a zároveň v elektromagnetickém poli na ni působí Lorentzova síla. Polarita elektrického náboje může být kladná nebo záporná. Dle konvence protony nesou kladný náboj a elektrony záporný. V klidu se náboje stejné polarity elektrostaticky odpuzují, opačné přitahují. Celkový elektrický náboj se zachovává a těleso s nulovým celkovým nábojem se označuje jako elektricky neutrální. Náboj není neomezeně dělitelný, ale vyskytuje se v násobcích elementárního náboje (proton nese náboj +, elektron −). Elektrický náboj je skalární a extenzivní veličina. Jeho hlavní jednotkou v soustavě SI je coulomb (C), pojmenovaný po francouzském fyzikovi Charlesi-Augustinovi de Coulombovi. Klasická elektrodynamika pomocí chování elektrického náboje popisuje elektromagnetickou interakci, jednu ze čtyř základních interakcí. V případě významných kvantových jevů je však nutné použít kvantovou elektrodynamiku, která s elektrickým nábojem přímo nepracuje. Namísto něj se zabývá interakcí kvantového pole fotonů s kvantovými poli ostatních druhů elementárních částic. Elektrický náboj se měří přímo pomocí elektrometru či elektroskopu a nepřímo integrací elektrického proudu podle času. Historie George Stoney navrhl po objevu kvantování elektrického náboje, aby se základnímu kvantu elektrického náboje říkalo „elektron“. Bylo to před objevením elektronu (částice) J. J. Thomsonem v roce 1897. Dnes tuto veličinu nazýváme elementární náboj . Jednotka elektrického náboje coulomb byla navržena v roce 1946 a ratifikována v roce 1948. Veličina a jednotky Elektrický náboj (též velikost nebo množství elektrického náboje) je skalární a extenzivní veličina s obvyklou značkou nebo . Hlavní jednotka Hlavní jednotkou elektrického náboje v soustavě SI je coulomb (C), pojmenovaný po francouzském fyzikovi Charlesi-Augustinovi de Coulombovi. Jedná se o odvozenou jednotku rovnou ampérsekundě (A·s) neboli náboji, který je elektrickým proudem jeden ampér přenesen za jednu sekundu: 1 C = 1 A·s Velikost coulombu i ampéru je definovaná fixací číselné hodnoty velikosti elementárního náboje  : = (přesně) Dílčí jednotky Z dílčích jednotek soustavy SI se používá zejména milicoulomb (mC, tisícina coulombu) a mikrocoulomb (μC, miliontina coulombu). Vedlejší jednotky Ampérhodina (1 Ah = 3600 C) se používá v elektrotechnice zejména při uvádění kapacity galvanických článků. Častá je též miliampérhodina (mAh), tedy tisícina ampérhodiny. Elementární náboj () zmíněný výše se jako jednotka náboje často vyskytuje ve fyzice a chemii. Jiné soustavy jednotek V soustavách jiných než SI má náboj obecně jiný rozměr a jeho jednotka i jinou velikost. Například v elektrostatické variantě soustavy…"} {"text": "[EN Wikipedia] 1829 in Denmark\n\nEvents from the year 1829 in Denmark. Incumbents Monarch – Frederick VI Prime minister – Otto Joachim Events 7 June – C. F. Hansen's new Church of Our Lady in Copenhagen inaugurated after the previous building was destroyed in the British Bombardment of Copenhagen in 1807. 19 June – Adam Oehlenschläger is publicly crowned with laurel by the Swedish poet Esaias Tegner in front of the high altar in Lund Cathedral, as the \"Scandinavian King of Song.\". The event cements his position as the leading proponent of Romanticism in the region and at the same time heralds the emergence the Scandinavismmovement. 5 November – The College of Advanced Technology (DTU) is inaugurated with Hans Christian Ørsted, who had also been one of the driving forces behind its establishment, as its first principal. Undated Births 29 January – Ludvig Lorenz, mathematician and physicist (died 1891) 7 February – Theobald Stein, sculptor (died 1901) 19 March – Carl Frederik Tietgen, financier, businessman (died 1901) 22 August Carl Baagøe, painter (died 1902) 16 October Sophus Berendsen, businessman (died 1884) 30 November – Thomas Lange, novelist (died 1887) 20 December – Hans Peter Hansen, xylographer (died 1899) Deaths 21 January – Kamma Rahbek, salonist and lady of letters (born 1775) 18 February – Olfert Fischer, vice admiral (born 1747) 21 February Christian Ludvig von Holten, colonial administrator (born 1774) 4 March – Grímur Jónsson Thorkelin, scholar, archivist (born 1752) 8 October Iver Qvistgaard, civil servant, landowner and mayor (died 1767) 25 October – Andreas Birch, academic, bishop (born 1758) 18 December – Christen Berg, politician (died 1891) References 1820s in Denmark Denmark Years of the 19th century in Denmark"} {"text": "[EN Wikipedia] Karl Laurenz\n\nKarl Laurenz (11 September 1905 - 23 November 1955) trained as a lawyer, but worked, for much of his life, as a German journalist and specialist translator. He was executed as a western spy on the guillotine in Dresden. Approximately ten minutes later, Laurenz's lover, Elli Barczatis, was also executed. Life In Brünn/Brno Karl Anton Laurenz was born and grew up in Brünn (since 1919 \"Brno\"), a large multi-cultural city, and at that time the principal city in the Austro-Hungarian territory of Moravia. His school career concluded successfully when he passed his school leaving exams (\"Abitur\"), which opened the way to university-level education. Remaining in Brünn, he studied Jurisprudence at the city's recently opened Masaryk University. His studies included a dissertation which he wrote with the title \"De poena capitali mutandis in temporibus\" (\"On the Death Penalty through the ages\"). By this time, following frontier changes mandated at Versailles, Austro-Hungary had ceased to exist, and Brno had ended up in Czechoslovakia. Defined according to its 1918 city limits, the city was predominantly German speaking, but several neighbouring municipalities had subsequently been concatenated into a new enlarged city area, as a result of which German speakers in Brno, such as the Laurenz family, were now a minority, albeit a very substantial minority. In 1924 Laurenz took a job as a contributing editor with the publishers of \"Tageboten\", while also moonlighting as a translator (from Czech to German), and sometimes obtaining work as a simultaneous court translator. He also worked as a correspondent for the Vienna-based Neue Freie Presse (newspaper) and the Ostrava-based \"Morgen-Zeitung\" (\"Morning Newspaper\"). Until 1939 Laurenz was a member of the German Democratic Liberal Party (\"Deutsche Demokratische Freiheitspartei\"; DDFP), founded in Czechoslovakia to preserve liberal political traditions on behalf of the German speaking minority. The party lost support after 1933, following the establishment of the more overtly nationalistic Sudeten German Party, but there is no sign that Laurenz himself defected from the DDFP as the political mood across Europe became progressively more shrill. In 1934, in a lead article that he wrote for the Neue Freie Presse, he condemned an attack by Nazi party supporters on a barracks in Brno, but otherwise he was for the most part apolitical. Even after the German invasion of 1938 Laurenz was not among the ethnic Germans who joined the Nazi party, and according to his own later testimony was reprimanded by the security services for his \"lack of political sensitivity\" (wegen \"fehlendem politischem Fingerspitzengefühl\") and then, despite his physical unsuitability, conscripted into the military in 1941. Laurenz himself later placed…"} {"instruction": "Create a python program to store personal contact information in a dictionary format.", "input": "{\n \"name\": \"John Doe\",\n \"phone\": \"+1 123-456-7891\",\n \"email\": \"john_doe@example.com\"\n }", "output": "def store_contact_info(contact_dict):\n \n name = contact_dict[\"name\"]\n phone = contact_dict[\"phone\"]\n email = contact_dict[\"email\"]\n\n # Create dictionary to store contact info\n contact_info_dict = {\n \"Name\": name,\n \"Phone\": phone,\n \"Email\": email\n }\n return contact_info_dict"} {"instruction": "Write a python program to classify the sentiment of a given piece of text.", "input": "The government has done a tremendous job in handling the pandemic situation.", "output": "import nltk\nfrom nltk.sentiment.vader import SentimentIntensityAnalyzer\n\ndef classify_sentiment(text):\n sid = SentimentIntensityAnalyzer()\n score = sid.polarity_scores(text)\n if score['compound'] >= 0.05:\n return 'positive'\n elif score['compound'] <= - 0.05:\n return 'negative'\n else:\n return 'neutral'\n\nsentiment = classify_sentiment(\"The government has done a tremendous job in handling the pandemic situation.\")\nprint(sentiment)\n# Output: positive"} {"instruction": "Generate an algorithm in Python to count the number of inversions in an array.", "input": "[3, 5, 2, 1, 4]", "output": "def count_inversions(arr):\n inv_count = 0\n for i in range(len(arr)):\n for j in range(i + 1, len(arr)):\n if arr[i] > arr[j]:\n inv_count += 1\n return inv_count\n\narr = [3, 5, 2, 1, 4] \nprint(count_inversions(arr))"} {"text": "[CS Wikipedia] Macudo (rozcestník)\n\nMacudo může znamenat: sídlo Macudo - (: 松戸市; Macudo-ši) město v prefektuře Čiba na ostrově Honšú Macudo (městys) - (: 松戸町; Macudo-mači) zaniklý (1943) městys, nyní na území města Macudo příjmení Naoki Macudo (松戸 直樹, *1973) - závodník motorkář Šina Macudo (松戸 思奈, *1973) - japonská plavkyně volnostylařka, reprezentovala na LOH 1992 Takadži Macudo (松土 隆二, *1947) - japonský producent anime Tóru Macudo (松戸 徹, *1954) - japonský politik, starosta města Funabaši Kakunosuke Macudo - (松戸 覚之助, 1875 - 1934) v Japonsku známý pěstitel hrušek naši Masaja Macudo - (松戸 政也, * 1987) japonský žokej Šundži Macudo - (松戸 俊二, * 1963) japonský herec firma Macudo kósan Co., Ltd., 松戸公産 Japonská příjmení"} {"instruction": "Produce a program in python which takes a given list of numbers and creates a dictionary where each number is the key and its multiple of the given number is the value.", "input": "my_list = [3, 5, 7]", "output": "def create_dictionary(my_list):\n res = {num: num * 2 for num in my_list}\n return res\n\n# run the code\nmy_list = [3, 5, 7]\n\nres = create_dictionary(my_list)\nprint('The dictionary is ' + str(res))"} {"instruction": "Write a REGEX pattern to only match valid JavaScript variable names.", "input": "", "output": "^[a-zA-Z_$][\\w$]*$"} {"instruction": "Create a bash script that sorts a list of numbers", "input": "list = [3,12,1,4,5]", "output": "#!/bin/bash arr=($list) sort=`echo ${arr[*]} | tr \" \" \"\\n\" | sort -n` echo $sort"} {"text": "[DE Wikipedia] Langar (Begriffsklärung)\n\nLangar steht für: Langar, eine freie Küche der Sikhs Langar (Kasachstan), eine Stadt in Kasachstan Langar (Tadschikistan), einen Ort in Tadschikistan Langar (Fargʻona), ein Dorf in der Provinz Fargʻona in Usbekistan Langar (Navoiy), eine Siedlung städtischen Typs in der Provinz Navoiy in Usbekistan Langar (Nottinghamshire), ein Ort in Nottinghamshire im Vereinigten Königreich"} {"text": "[EN Wikipedia] Dionigi\n\nDionigi is both a masculine Italian given name and a surname. Notable people with the name include: Dionigi di Borgo San Sepolcro (c. 1300 – 1342), Augustinian friar Dionigi Bussola (1615–1687), Italian sculptor Dionigi Donnini (1681–1743), Italian painter Dionigi Galletto (1932–2011), Italian mathematician Dionigi da Palacenza Carli, 17th-century Capuchin missionary Dionigi Tettamanzi (1934–2017), Italian cardinal Dionigi Valesi (c.1730–c.1780), Italian printmaker Davide Dionigi (born 1974), Italian footballer and manager Italian-language surnames Italian masculine given names Masculine given names"} {"instruction": "Write a Python program to generate a random string containing lowercase and uppercase letters with a length of 8 characters.", "input": "", "output": "import random\n\ndef generate_string(length):\n letters = string.ascii_letters\n return ''.join(random.choice(letters) for i in range(length))\n\nprint(generate_string(8))"} {"text": "[EN Wikipedia] 1822 in Denmark\n\nEvents from the year 1822 in Denmark. Incumbents Monarch – Frederick VI Events 28 February – Spare- og Laanekassen i Marstal, a savings bank on the island of Ørø, is founded by a group of local residents. Culture Music Carl Nielsen's Wind Quintet is performed in public for the first time. Births 6 April – August Ferdinand Michael van Mehren, philologist (died 1907) 24 April – Henrik August Flindt, gardener and landscape architect (died 1901) 17 June – Erik Bøgh, journalist, playwright and songwriter (died 1899) 4 July – Vilhelm Christesen, silver smith (died 1899) 2 August – Ida Marie Bille, court member (died 1902) 15 August – Carl Frederik Blixen-Finecke, politician and nobleman (died 1873 in Germany) Date unknown Georg Grothe, composer (died 1876) Deaths 6 January – John Christmas, businessman (born 1757 in England) 4 May – Hedevig Johanne Bagger, businesswoman (born 1740) 20 May – Otto Fabricius, missionary, naturalist, ethnographer and explorer (born 1744) References 1820s in Denmark Denmark Years of the 19th century in Denmark"} {"instruction": "Create a Visual Studio Code extension that provides auto-complete features for a specific language.", "input": "", "output": "This Visual Studio Code extension will create an Auto-Complete Provider for a specific language (e.g. JavaScript, Python, etc.). It will analyze the syntax of a given language and provide word suggestions while typing in the source code. The extension should be able to detect the language type from the file extension and then provide the auto-complete suggestions accordingly."} {"text": "[CS Wikipedia] Oděv vrcholného středověku\n\nOděv vrcholného středověku procházel postupným vývojem. Navazuje na volný raně středověký oděv, postupem desetiletí se stává vypasovanějším. O jeho podobě se dozvídáme z dobových pramenů (obrazy, ilustrace, sochy, literární prameny) i ze zachovaných nálezů (kterých ale není mnoho). Základem oděvu mužů i žen byl dvouvrstvý šat, obvykle lněná spodní tunika (cotte, košile) a svrchní vlněná tunika (surcot). Cotte mělo dlouhý rukáv, u žen bylo v délce na zem, u mužů se postupně zkracovalo z délky ke kotníkům v ranějších fázích po délku těsně pod zadek koncem vrcholného středověku. Díky vrstvení šlo reagovat na změny teplot. V létě se nosil surcot spíše lněný (hedvábný u vysoce postavených), v zimě vlněný. Rukávy podléhaly značně módním vlivům, buďto mohly být zúženy zapínáním pomocí mnoha knoflíčků, aby těsně obepínaly předloktí, nebo byly v módě široké rukávy, které přecházely i v přívěsky zvané pachy. Pod cotte nosívala ještě spodní košilka. Oděv se nosil přepásán páskem, na kterém byl zavěšen např. růženec, nůž či nejrůznější tašvice a váčky, protože oblečení nemělo kapsy. V chladném období se přes oděv nosíval buďto plášť či různé typy kabátů (karnáč, gardecorps, houpelande…). Oděv býval zdoben v závislosti na movitosti nositele, používalo se například vyšívání, lemování kožešinami, stuhami a karetkami, našívání korálků či jiných ozdob. Při práci bylo obvyklé nosit zástěru. Na nohy se oblékaly nespojené nohavice, které se přivazovaly k opasku. Měly buďto kryté i chodidlo, nebo končily pod kotníkem, občas měly pásek pod chodidlem jako kamaše. Kalhoty se spojenými nohavicemi se nenosily. Jako spodní prádlo sloužily bruchy nebo hace. Funkci ponožek plnily buďto nohavice s ťapkami, nebo onuce či ovinky. Boty byly kožené, zprvu s vnějším šitím, později obracené s švem uvnitř. Tvar boty obvykle kopíroval chodidlo. Boty s dlouhými špičkami byly pouze módním výstřelkem jedné éry středověku. Podle určení byly boty buď nízké, kotníkové či vysoké. Dřeváky se obouvaly přes boty a sloužily jako ochrana bot před blátem. Nosily se i jednoduší boty, jako krpce. Hlava se nosila většinou pokrytá, i když to nebylo striktním pravidlem, například mladé dívky nosívaly i účesy bez závoje. Ženy obvykle nosily hlavu pokrytou šátkem, závojem ze lnu či hedvábí nebo síťkou. Závoj držel na hlavě díky přišpendlení k páskům (okolo hlavy – fillet, pod bradou – barbet) ozdobnými špendlíky. Muži nosívali obvykle lněnou čapku (coif) popř. klobouk. Před chladem chránila kukla (kápě), která kryla nejen hlavu, ale i ramena a krk (neboť středověký oděv neměl límec). Reference Externí odkazy Středověká kultura Oděvy Gotika"}